import { Option } from '../dropdown'; import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers.d'; import { ChangelogDefaultField, ChangelogTemplateColumn, ChangelogTemplateFilter, } from '../changelog'; export interface ChangelogType { _id: string; action: string; field: string; oldValue?: string; newValue?: string; modifiedBy: string; modifiedById: string; object: string; objectId: string; objectName: string; createdAt: string; updatedAt: string; } export interface ChangelogFilterRaw { createdAt?: number[]; action?: string[]; field?: string[]; objectName?: string[]; modifiedBy?: string[]; object?: string; objectId?: string; } export type ChangelogFilterQuery = Partial< Record & ChangelogFilterRaw >; export type ChangelogOptionBoolean = { objectNameOptions?: boolean; fieldOptions?: boolean; actionOptions?: boolean; modifiedByOptions?: boolean; object?: string; }; export type ChangelogOptionFilter = Partial< Record >; /** * Props for Changelog component */ export interface BaseChangelogPageProps { /** * Note: Dont use this props since it's just for changelog dialog purpose * @ignore */ isDialog?: boolean; /** * To give additional columns in changelog table */ additionalTemplateColumns?: ChangelogTemplateColumn[]; /** * To give additional filters in changelog filter */ additionalTemplateFilters?: ChangelogTemplateFilter[]; /** * Array to determine that these columns will be hidden */ removedColumns?: ChangelogDefaultField[]; /** * Array to determine that these filter fields will be hidden */ removedFilters?: Omit[]; /** * To set custom name for specific column in changelog table */ objectNameColumn?: string; /** * Title content of the dialog. */ header?: string | undefined; /** * Changelog object. */ object: string; /** * Changelog object ID. */ objectId?: string; /** * Changelog custom params, contains stringified filter query needed. */ defaultParamsQuery?: ChangelogFilterQuery; /** * Changelog custom params, contains stringified filter query needed. */ customParams?: ChangelogFilterQuery; /** * Now changelog support custom table name from outside */ tableName?: string; /** * Show changelog for employee project */ isEmployee?: boolean; } export interface ButtonDownloadTrue extends BaseChangelogPageProps { /** * Use this props if changelog need button download */ useButtonDownload: true; /** * File name is a must if there's button download * @default 'Changelog' only */ fileName: string; } export interface ButtonDownloadFalse extends BaseChangelogPageProps { /** * Use this props if changelog need button download */ useButtonDownload: false; /** * File name is a must if there's button download * @default 'Changelog' only */ fileName?: string; } export type ChangelogPageProps = ButtonDownloadFalse | ButtonDownloadTrue; /** * Emits for Changelog component */ export type ChangelogPageEmits = { hide: []; }; /** * **WangsVue - Changelog** * * _Changelog is a component for to show changelog dialog. * You need to install vee-validate while using this component._ * * --- --- * ![WangsVue](https://www.wangsit.id/wp-content/uploads/2023/12/cropped-Logo_Wangsid-removebg-preview-192x192.png) * * @group components */ declare class ChangelogPage extends ClassComponent< ChangelogPageProps, unknown, ChangelogPageEmits > {} declare module '@vue/runtime-core' { interface GlobalComponents { Changelog: GlobalComponentConstructor; } } export default ChangelogPage;