UNPKG

@uozi-admin/curd

Version:
1,010 lines (860 loc) 36.2 kB
import { CascaderProps } from 'ant-design-vue/es/cascader'; import { CheckboxGroupProps } from 'ant-design-vue'; import { CheckboxValueType } from 'ant-design-vue/es/checkbox/interface'; import { ColProps } from 'ant-design-vue'; import { ComponentOptionsMixin } from 'vue'; import { ComponentProvideOptions } from 'vue'; import { DatePickerProps } from 'ant-design-vue'; import { Dayjs } from 'dayjs'; import { DebouncedFunc } from 'lodash-es'; import { DefineComponent } from 'vue'; import { DescriptionsProps } from 'ant-design-vue'; import { EventValue } from 'ant-design-vue/es/vc-picker/interface'; import { FilterValue } from 'ant-design-vue/es/table/interface'; import { FormItemProps } from 'ant-design-vue'; import { I18nOptions } from 'vue-i18n'; import { InputNumberProps } from 'ant-design-vue'; import { InputProps } from 'ant-design-vue'; import { JSX } from 'vue/jsx-runtime'; import { Key } from 'ant-design-vue/es/vc-table/interface'; import { ModalProps } from 'ant-design-vue'; import { MonthPickerProps } from 'ant-design-vue/es/date-picker'; import { ObjectPlugin } from 'vue'; import { PanelMode } from 'ant-design-vue/es/vc-picker/interface'; import { PublicProps } from 'vue'; import { RadioGroupProps } from 'ant-design-vue'; import { RangePickerProps } from 'ant-design-vue/es/date-picker'; import { RateProps } from 'ant-design-vue'; import { Reactive } from 'vue'; import { Ref } from 'vue'; import { RendererElement } from 'vue'; import { RendererNode } from 'vue'; import { RowProps } from 'ant-design-vue'; import { SelectProps } from 'ant-design-vue'; import { SelectValue } from 'ant-design-vue/es/select'; import { SliderProps } from 'ant-design-vue'; import { SorterResult } from 'ant-design-vue/es/table/interface'; import { default as StdCurd } from './StdCurd.vue'; import { default as StdForm } from './StdForm.vue'; import { SwitchProps } from 'ant-design-vue'; import { TableColumnType } from 'ant-design-vue'; import { TablePaginationConfig } from 'ant-design-vue/lib/table/interface'; import { TableProps } from 'ant-design-vue'; import { TableRowSelection } from 'ant-design-vue/es/table/interface'; import { TextAreaProps } from 'ant-design-vue'; import { TimePickerProps } from 'ant-design-vue'; import { TransferProps } from 'ant-design-vue'; import { UploadChangeParam } from 'ant-design-vue'; import { UploadFile } from 'ant-design-vue'; import { UploadProps } from 'ant-design-vue'; import { ValueType } from 'ant-design-vue/es/vc-cascader/Cascader'; import { ValueType as ValueType_2 } from 'ant-design-vue/es/input-number/src/utils/MiniDecimal'; import { VNode } from 'vue'; import { WeekPickerProps } from 'ant-design-vue/es/date-picker'; declare const __VLS_component: DefineComponent<Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<Props> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>; declare const __VLS_component_2: DefineComponent<__VLS_Props_3, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & { reset: () => any; "update:data": (data: Record<string, any>) => any; }, string, PublicProps, Readonly<__VLS_Props_3> & Readonly<{ onReset?: (() => any) | undefined; "onUpdate:data"?: ((data: Record<string, any>) => any) | undefined; }>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>; declare const __VLS_component_3: DefineComponent<__VLS_PublicProps, { refresh: DebouncedFunc<() => Promise<void>>; tableData: Ref<Record<string, any>[], Record<string, any>[]>; }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, { "update:tableLoading": (value: boolean) => any; "update:selectedRowKeys": (value: any[]) => any; "update:selectedRows": (value: any[]) => any; } & { view: (record: any) => any; deleteItemTemporarily: (record: any) => any; deleteItemPermanently: (record: any) => any; restoreItem: (record: any) => any; change: (payload: { pagination: TablePaginationConfig; filters: Record<string, FilterValue>; sorter: SorterResult | SorterResult<any>[]; }) => any; editItem: (record: any) => any; }, string, PublicProps, Readonly<__VLS_PublicProps> & Readonly<{ onView?: ((record: any) => any) | undefined; onDeleteItemTemporarily?: ((record: any) => any) | undefined; onDeleteItemPermanently?: ((record: any) => any) | undefined; onRestoreItem?: ((record: any) => any) | undefined; onChange?: ((payload: { pagination: TablePaginationConfig; filters: Record<string, FilterValue>; sorter: SorterResult | SorterResult<any>[]; }) => any) | undefined; onEditItem?: ((record: any) => any) | undefined; "onUpdate:tableLoading"?: ((value: boolean) => any) | undefined; "onUpdate:selectedRowKeys"?: ((value: any[]) => any) | undefined; "onUpdate:selectedRows"?: ((value: any[]) => any) | undefined; }>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>; declare type __VLS_Props = { record: any; columns: StdTableColumn[]; detailProps?: DescriptionsProps; }; declare type __VLS_Props_10 = { props?: PasswordConfig & { placeholder?: string | number; }; }; declare type __VLS_Props_11 = { props?: RadioGroupConfig; }; declare type __VLS_Props_12 = { props?: RangePickerConfig & { placeholder?: string | number; } & TimeT; type: PanelMode | 'datetime'; }; declare type __VLS_Props_13 = { props?: RateConfig & { placeholder?: string | number; }; }; declare type __VLS_Props_14 = { props?: SelectConfig & { placeholder?: string | number; }; }; declare type __VLS_Props_15 = SelectorConfig & { placeholder?: string | number; }; declare type __VLS_Props_16 = { props?: SliderConfig & { placeholder?: string | number; }; }; declare type __VLS_Props_17 = { props?: SwitchConfig & { placeholder?: string | number; }; }; declare type __VLS_Props_18 = { props?: TimePickerConfig & { placeholder?: string | number; }; }; declare type __VLS_Props_19 = { props?: UploadConfig & { placeholder?: string | number; }; }; declare type __VLS_Props_2 = { formData: Reactive<Record<string, any>>; column: StdTableColumn; formConfigKey?: 'edit' | 'search'; }; declare type __VLS_Props_3 = { columns: StdTableColumn[]; hideResetBtn?: boolean; showSearchBtn?: boolean; data: Record<string, any>; }; declare type __VLS_Props_4 = StdTableProps; declare type __VLS_Props_5 = { props?: CascaderConfig & { placeholder?: string | number; }; }; declare type __VLS_Props_6 = { props?: CheckboxGroupConfig; }; declare type __VLS_Props_7 = { props?: (DatePickerConfig | WeekPickerConfig | MonthPickerConfig) & { placeholder?: string | number; } & TimeT; type: PanelMode | 'datetime'; }; declare type __VLS_Props_8 = { props?: InputConfig & { placeholder?: string | number; }; }; declare type __VLS_Props_9 = { props?: Omit<InputNumberConfig, 'placeholder'> & { placeholder?: string; }; }; declare type __VLS_PublicProps = { 'tableLoading'?: boolean; 'selectedRowKeys'?: any[]; 'selectedRows'?: any[]; } & __VLS_Props_4; declare type __VLS_PublicProps_10 = { 'value'?: RateConfig['value']; } & __VLS_Props_13; declare type __VLS_PublicProps_11 = { 'value'?: SelectConfig['value']; } & __VLS_Props_14; declare type __VLS_PublicProps_12 = { 'value'?: any; 'visible'?: boolean; } & __VLS_Props_15; declare type __VLS_PublicProps_13 = { 'value'?: SliderConfig['value']; } & __VLS_Props_16; declare type __VLS_PublicProps_14 = { 'value'?: SwitchConfig['checked']; } & __VLS_Props_17; declare type __VLS_PublicProps_15 = { 'value'?: TimePickerConfig['value']; } & __VLS_Props_18; declare type __VLS_PublicProps_16 = { 'value'?: UploadChangeParam['fileList']; } & __VLS_Props_19; declare type __VLS_PublicProps_2 = { 'value'?: CascaderConfig['value']; } & __VLS_Props_5; declare type __VLS_PublicProps_3 = { 'value'?: CheckboxGroupProps['value']; } & __VLS_Props_6; declare type __VLS_PublicProps_4 = { 'value'?: DatePickerConfig['value'] | WeekPickerConfig['value'] | MonthPickerConfig['value'] | number | string; } & __VLS_Props_7; declare type __VLS_PublicProps_5 = { 'value'?: InputConfig['value']; } & __VLS_Props_8; declare type __VLS_PublicProps_6 = { 'value'?: InputNumberConfig['value']; } & __VLS_Props_9; declare type __VLS_PublicProps_7 = { 'value'?: PasswordConfig['value']; } & __VLS_Props_10; declare type __VLS_PublicProps_8 = { 'value'?: RadioGroupConfig['value']; } & __VLS_Props_11; declare type __VLS_PublicProps_9 = { 'value'?: RangePickerConfig['value'] & [number, number] & [string, string]; } & __VLS_Props_12; declare function __VLS_template(): { attrs: Partial<{}>; slots: { default?(_: {}): any; }; refs: {}; rootEl: any; }; declare function __VLS_template_2(): { attrs: Partial<{}>; slots: { extra?(_: { formData: Record<string, any>; }): any; }; refs: {}; rootEl: any; }; declare function __VLS_template_3(): { attrs: Partial<{}>; slots: { beforeSearch?(_: {}): any; searchFormAction?(_: { formData: Record<string, any>; }): any; beforeTable?(_: {}): any; beforeActions?(_: { record: Record<string, any>; column: any; }): any; afterActions?(_: { record: Record<string, any>; column: any; }): any; }; refs: {}; rootEl: HTMLDivElement; }; declare type __VLS_TemplateResult = ReturnType<typeof __VLS_template>; declare type __VLS_TemplateResult_2 = ReturnType<typeof __VLS_template_2>; declare type __VLS_TemplateResult_3 = ReturnType<typeof __VLS_template_3>; declare type __VLS_WithTemplateSlots<T, S> = T & { new (): { $slots: S; }; }; declare type __VLS_WithTemplateSlots_2<T, S> = T & { new (): { $slots: S; }; }; declare type __VLS_WithTemplateSlots_3<T, S> = T & { new (): { $slots: S; }; }; export declare function actualFieldRender(actualFieldName: string): (props: CustomRenderArgs) => any; export declare const ApiActions: { GET_LIST: string; GET_ITEM: string; CREATE_ITEM: string; UPDATE_ITEM: string; DELETE_ITEM_TEMPORARY: string; DELETE_ITEM_PERMANENTLY: string; RESTORE_ITEM: string; BATCH_UPDATE: string; BATCH_DELETE_TEMPORARY: string; BATCH_DELETE_PERMANENTLY: string; BATCH_RESTORE: string; }; declare interface BaseConfig { defaultValue?: any; class?: string; style?: string; } export declare type CascaderConfig = Omit<CascaderProps, 'placeholder'> & PlaceholderT & BaseConfig; export declare type CheckboxGroupConfig = CheckboxGroupProps & BaseConfig; export declare function createCosyCurd(config?: Partial<CurdConfigT>): ObjectPlugin; export declare function createCosyProCurd(config?: Partial<CurdConfigT>): ObjectPlugin; export declare function createCurdConfig(config: Partial<CurdConfigT>): ObjectPlugin; export declare const CURD_CONFIG_KEY: unique symbol; declare interface CurdApi<T = any, P = any> { getList: (params?: Record<string, any>, config?: Record<string, any>) => Promise<{ data: T[]; pagination: P; }>; getItem: (id: string | number, params?: Record<string, any>, config?: Record<string, any>) => Promise<T>; createItem: (data: Record<string, any>, config?: Record<string, any>) => Promise<T>; updateItem: (id: string | number, data: Record<string, any>, config?: Record<string, any>) => Promise<T>; deleteItem: (id: string | number, params?: Record<string, any>, config?: Record<string, any>) => Promise<any>; restoreItem: (id: string | number, params?: Record<string, any>, config?: Record<string, any>) => Promise<any>; } export declare interface CurdConfigT { listApi?: { /** * The path to the pagination data in the response * @default '$.pagination' * @description `$.` is the root of the response data * @example * ```json * { * paginationPath: '$.pagination', * } * ``` */ paginationPath?: string; /** * The mapping of the pagination data in the response * @default { * total: 'total', * current: 'current', * pageSize: 'pageSize', * totalPages: 'totalPages', * } */ paginationMap?: PaginationMap; /** * The response format function * @description The function is used to format the response data * @example * ```ts * const responseFormat = (response: any) => { * return { * data: response.data, * pagination: response.pagination, * } * } */ responseFormat?: ResponseFormatFn; /** * The request format function * @description The function is used to format the request parameters * @example * ```ts * const requestFormat = (params: Record<string, any>) => { * return { * ...params, * } * } */ requestFormat?: RequestFormatFn; }; /** * The i18n options * @description The options for the i18n same as the vue-i18n options * @example * ```ts * const i18nOptions = { * locale: 'zh-CN', * fallbackLocale: 'en-US', * messages: { * 'zh-CN': { * ...I18nLanguageObject, * }, * 'zh-HK': { * ...I18nLanguageObject, * }, * 'zh-TW': { * ...I18nLanguageObject, * }, * }, * } */ i18n?: I18nOptions<{ message: I18nLanguageObject; }>; /** * The time config * @description The config for the time */ time?: TimeConfig; /** * The selector config * @description The config for the selector */ selector?: { /** * The omit zero string * @description The flag to omit the zero string */ omitZeroString?: boolean; }; /** * The search config * @description The config for the search */ search?: { /** * The show search btn * @description The flag to show the search btn */ showSearchBtn?: boolean; /** * The hide reset btn */ hideResetBtn?: boolean; }; } declare type CustomHeaderRenderFn = (data: StdTableHeaderScope) => VNode | JSX.Element; export declare interface CustomRenderArgs<T = any, U = any> { column: StdTableColumn; record: T; text: U; value?: any; index?: number; renderIndex?: number; export?: boolean; } declare type CustomRenderFn<T> = ((props: CustomRenderArgs<T>) => VNode | VNode[] | JSX.Element | JSX.Element[] | string | string[]); export declare const DATE_FORMAT = "YYYY-MM-DD"; export declare const DATE_TIME_FORMAT = "YYYY-MM-DD HH:mm:ss"; export declare type DatePickerConfig = Omit<DatePickerProps, 'placeholder'> & PlaceholderT & TimeT & BaseConfig; export declare function dateRender(props: CustomRenderArgs): string; export declare namespace dateRender { var isDate: boolean; } export declare function datetimeRender(props: CustomRenderArgs): string; export declare namespace datetimeRender { var isDatetime: boolean; } export declare const defaultConfig: Required<CurdConfigT>; export declare type ExportColumn = Required<StdTableColumn> & { checked: boolean; }; export declare const Format: { date: string; datetime: string; time: string; year: string; month: string; week: string; }; export declare type FormItemType = 'input' | 'password' | 'inputNumber' | 'select' | 'selector' | 'date' | 'datetime' | 'year' | 'month' | 'week' | 'time' | 'textarea' | 'radioGroup' | 'checkboxGroup' | 'switch' | 'rate' | 'slider' | 'upload' | 'cascader' | 'transfer' | 'dateRange' | 'datetimeRange' | 'yearRange' | 'monthRange' | 'weekRange' | 'timeRange' | ((formData: any, column: StdTableColumn, config: Record<any, any>) => VNode | JSX.Element) | JSX.Element | DefineComponent<any, any, any>; export declare enum FormType { Input = "input", Password = "password", InputNumber = "inputNumber", Date = "date", DateTime = "datetime", Year = "year", Month = "month", Week = "week", Time = "time", Radio = "radio", Checkbox = "checkbox", Switch = "switch", Rate = "rate", Slider = "slider", Upload = "upload", Cascader = "cascader", Transfer = "transfer", DateRange = "dateRange", DateTimeRange = "datetimeRange", YearRange = "yearRange", MonthRange = "monthRange", WeekRange = "weekRange", TimeRange = "timeRange", Select = "select", Selector = "selector" } export declare function getColumnKey(column: StdTableColumn): Key; export declare function getDataIndexStr(dataIndex?: string | string[]): string; export declare function getEditLabel(c: StdTableColumn, mode?: 'Edit' | 'Detail' | 'Search'): string | undefined; export declare function getPlaceholder(column: StdTableColumn, config?: StdFormConfig): string; export declare function getPopupContainer(triggerNode: HTMLElement | null): HTMLElement; export declare function getRealContent(content?: string | (() => string)): string; export declare function getSearchLabel(c: StdTableColumn): string | undefined; export declare function hiddenMiddleText(len?: number): (props: CustomRenderArgs) => any; /** * The i18n language * @description The Languages built-in in the curd */ export declare type I18nLanguage = 'zh-CN' | 'zh-HK' | 'zh-TW' | 'en-US'; export declare type I18nLanguageObject = Partial<Record<I18nToken, any>>; /** * The i18n token * @description The token used in the curd i18n */ export declare type I18nToken = 'total' | 'list' | 'item(s)' | 'view' | 'edit' | 'delete' | 'restore' | 'deletePermanently' | 'reset' | 'close' | 'ok' | 'selectorTitle' | 'generate' | 'save' | 'add' | 'trash' | 'backToList' | 'exportExcel' | 'formValidateError' | 'deleteConfirm' | 'restoreConfirm' | 'deletePermanentlyConfirm' | 'savedSuccessfully' | 'deletedSuccessfully' | 'restoredSuccessfully' | 'selectAll' | 'upload' | 'This field should not be empty' | 'This field should be a valid email address' | 'This value is already taken' | 'This field should be a valid hostname' | 'This field should only contain letters, unicode characters, numbers, and -_.'; export declare function image(props: CustomRenderArgs): VNode<RendererNode, RendererElement, { [key: string]: any; }>; export declare type InputConfig = Omit<InputProps, 'placeholder'> & PlaceholderT & BaseConfig; export declare type InputNumberConfig = Omit<InputNumberProps, 'placeholder'> & PlaceholderT & BaseConfig; export declare function isFunction(value: any): value is Function; export declare function isPlainObject(value: any): value is object; export declare type MaskOptions = Record<string | number, any>; export declare function maskRender(maskOptions: MaskOptions): (options: CustomRenderArgs) => any; export declare const MONTH_FORMAT = "YYYY-MM"; export declare type MonthPickerConfig = Omit<MonthPickerProps, 'placeholder'> & PlaceholderT & BaseConfig; /** * The pagination data * @description The data of the pagination */ export declare interface PaginationData { total: number; current: number; pageSize: number; totalPages: number; } /** * The pagination map * @description The map of the pagination data */ export declare interface PaginationMap { params: { current: string; pageSize: string; }; response: { total: string; current: string; pageSize: string; totalPages: string; }; } export declare type PasswordConfig = Omit<InputProps, 'placeholder'> & PlaceholderT & BaseConfig & { generate?: boolean; maxLength?: number; }; export declare interface PlaceholderT { placeholder?: number | string | (() => string) | [string, string]; } declare interface Props { dataIndex?: StdTableColumn['dataIndex']; label?: string; extra?: string; hint?: string | (() => string); error?: string; required?: boolean; noValidate?: boolean; formItem?: FormItemProps; } export declare type RadioGroupConfig = RadioGroupProps & BaseConfig; export declare type RangePickerConfig = Omit<RangePickerProps, 'placeholder'> & PlaceholderT & TimeT & BaseConfig; export declare type RateConfig = RateProps & BaseConfig; /** * The request format function * @description The function is used to format the request parameters */ export declare interface RequestFormatFn { (params: Record<string, any>): Record<string, any>; } /** * The response data * @description The data of the response */ export declare interface ResponseData { data: any[]; pagination: PaginationData; } /** * The response format function * @description The function is used to format the response data */ export declare interface ResponseFormatFn { (response: any): ResponseData; } export declare type SelectConfig = Omit<SelectProps, 'placeholder'> & PlaceholderT & { remote?: { valueKey: string; labelKey: string; api: (...args: any[]) => Promise<{ data: any[]; }>; }; mask?: Record<string | number, any>; valueKey?: string; } & BaseConfig; export declare type SelectorConfig = { tableProps?: TableProps; valueKey?: string; displayKey?: string; selectionType?: 'radio' | 'checkbox'; selectionConfig?: TableRowSelection; getListApi: CurdApi['getList']; columns: StdTableColumn[]; tips?: string; disabled?: boolean; hideInputContainer?: boolean; modalWidth?: number | string; modalProps?: ModalProps; overwriteParams?: Record<string, any>; labelRender?: (row: any) => string; omitZeroString?: boolean; } & PlaceholderT & BaseConfig; export declare type SliderConfig = SliderProps & BaseConfig; export declare const StdCascader: DefineComponent<__VLS_PublicProps_2, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, { "update:value": (value: ValueType | undefined) => any; }, string, PublicProps, Readonly<__VLS_PublicProps_2> & Readonly<{ "onUpdate:value"?: ((value: ValueType | undefined) => any) | undefined; }>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>; export declare const StdCheckboxGroup: DefineComponent<__VLS_PublicProps_3, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, { "update:value": (value: CheckboxValueType[] | undefined) => any; }, string, PublicProps, Readonly<__VLS_PublicProps_3> & Readonly<{ "onUpdate:value"?: ((value: CheckboxValueType[] | undefined) => any) | undefined; }>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>; export { StdCurd } export declare interface StdCurdProps { detailProps?: DescriptionsProps; formRowProps?: RowProps; columns: StdTableColumn[]; rowKey?: string; rowSelectionType?: 'checkbox' | 'radio'; rowSelection?: TableRowSelection; scrollX?: number | string; scrollY?: number | string; title?: string | (() => string); api: CurdApi; tableProps?: TableProps; customQueryParams?: Record<string, any>; overwriteParams?: Record<string, any>; modalWidth?: string | number; formClass?: string | string[] | Record<string, boolean>; disableRouterQuery?: boolean; disableSearch?: boolean; disableAdd?: boolean; disableView?: boolean; disableEdit?: boolean; disableDelete?: boolean; disableExport?: boolean; disableTrash?: boolean; hideResetBtn?: boolean; showSearchBtn?: boolean; hideTitle?: boolean; hideExtra?: boolean; hideHeader?: boolean; rowDraggable?: boolean; rowDraggableOptions?: { onMove?: (oldRow: number[], newRow: number[]) => void; onEnd?: (data: { target_id: number; direction: number; affected_ids: number[]; }) => void; }; beforeSave?: (data: Record<string, any>) => Promise<boolean> | boolean; } export declare const StdDatePicker: DefineComponent<__VLS_PublicProps_4, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, { "update:value": (value: string | number | Dayjs | (Dayjs & string) | undefined) => any; }, string, PublicProps, Readonly<__VLS_PublicProps_4> & Readonly<{ "onUpdate:value"?: ((value: string | number | Dayjs | (Dayjs & string) | undefined) => any) | undefined; }>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>; export declare const StdDetail: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>; export { StdForm } export declare interface StdFormConfig extends Record<any, any> { type: FormItemType; defaultValue?: any; valueKey?: string; col?: ColProps; password?: PasswordConfig; input?: InputConfig; inputNumber?: InputNumberConfig; textarea?: TextareaConfig; select?: SelectConfig; selector?: SelectorConfig; cascader?: CascaderConfig; date?: DatePickerConfig; datetime?: DatePickerConfig; year?: DatePickerConfig; week?: WeekPickerConfig; month?: MonthPickerConfig; time?: TimePickerConfig; dateRange?: RangePickerConfig; datetimeRange?: RangePickerConfig; yearRange?: RangePickerConfig; monthRange?: RangePickerConfig; weekRange?: RangePickerConfig; timeRange?: RangePickerConfig; radioGroup?: RadioGroupConfig; checkboxGroup?: CheckboxGroupConfig; rate?: RateConfig; slider?: SliderConfig; switch?: SwitchConfig; transfer?: TimePickerConfig; upload?: UploadConfig; customComponent?: Record<string | number | symbol, any>; formItem?: FormItemProps & { name?: string | string[]; label?: string | (() => string); hiddenLabelInEdit?: boolean; hiddenLabelInSearch?: boolean; hiddenLabelInDetail?: boolean; }; } export declare const StdFormController: DefineComponent<__VLS_Props_2, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props_2> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>; export declare const StdFormItem: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>; export declare const StdInput: DefineComponent<__VLS_PublicProps_5, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, { "update:value": (value: string | number | undefined) => any; }, string, PublicProps, Readonly<__VLS_PublicProps_5> & Readonly<{ "onUpdate:value"?: ((value: string | number | undefined) => any) | undefined; }>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>; export declare const StdInputNumber: DefineComponent<__VLS_PublicProps_6, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, { "update:value": (value: ValueType_2 | undefined) => any; }, string, PublicProps, Readonly<__VLS_PublicProps_6> & Readonly<{ "onUpdate:value"?: ((value: ValueType_2 | undefined) => any) | undefined; }>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>; export declare const StdPassword: DefineComponent<__VLS_PublicProps_7, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, { "update:value": (value: string | number | undefined) => any; }, string, PublicProps, Readonly<__VLS_PublicProps_7> & Readonly<{ "onUpdate:value"?: ((value: string | number | undefined) => any) | undefined; }>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>; export declare const StdRadioGroup: DefineComponent<__VLS_PublicProps_8, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, { "update:value": (value: any) => any; }, string, PublicProps, Readonly<__VLS_PublicProps_8> & Readonly<{ "onUpdate:value"?: ((value: any) => any) | undefined; }>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>; export declare const StdRangePicker: DefineComponent<__VLS_PublicProps_9, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, { "update:value": (value: ([EventValue<Dayjs>, EventValue<Dayjs>] & [number, number] & [string, string]) | ([EventValue<Dayjs>, EventValue<Dayjs>] & [EventValue<string>, EventValue<string>] & [number, number] & [string, string])) => any; }, string, PublicProps, Readonly<__VLS_PublicProps_9> & Readonly<{ "onUpdate:value"?: ((value: ([EventValue<Dayjs>, EventValue<Dayjs>] & [number, number] & [string, string]) | ([EventValue<Dayjs>, EventValue<Dayjs>] & [EventValue<string>, EventValue<string>] & [number, number] & [string, string])) => any) | undefined; }>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>; export declare const StdRate: DefineComponent<__VLS_PublicProps_10, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, { "update:value": (value: number | undefined) => any; }, string, PublicProps, Readonly<__VLS_PublicProps_10> & Readonly<{ "onUpdate:value"?: ((value: number | undefined) => any) | undefined; }>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>; export declare const StdSearch: __VLS_WithTemplateSlots_2<typeof __VLS_component_2, __VLS_TemplateResult_2["slots"]>; export declare const StdSelect: DefineComponent<__VLS_PublicProps_11, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, { "update:value": (value: SelectValue) => any; }, string, PublicProps, Readonly<__VLS_PublicProps_11> & Readonly<{ "onUpdate:value"?: ((value: SelectValue) => any) | undefined; }>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>; export declare const StdSelector: DefineComponent<__VLS_PublicProps_12, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, { "update:value": (value: any) => any; "update:visible": (value: boolean) => any; } & { selectedRecords: (records: any[]) => any; }, string, PublicProps, Readonly<__VLS_PublicProps_12> & Readonly<{ "onUpdate:value"?: ((value: any) => any) | undefined; onSelectedRecords?: ((records: any[]) => any) | undefined; "onUpdate:visible"?: ((value: boolean) => any) | undefined; }>, { valueKey: string; selectionType: "radio" | "checkbox"; omitZeroString: boolean; }, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>; export declare const StdSlider: DefineComponent<__VLS_PublicProps_13, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, { "update:value": (value: (number | [number, number]) | undefined) => any; }, string, PublicProps, Readonly<__VLS_PublicProps_13> & Readonly<{ "onUpdate:value"?: ((value: (number | [number, number]) | undefined) => any) | undefined; }>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>; export declare const StdSwitch: DefineComponent<__VLS_PublicProps_14, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, { "update:value": (value: string | number | boolean | undefined) => any; }, string, PublicProps, Readonly<__VLS_PublicProps_14> & Readonly<{ "onUpdate:value"?: ((value: string | number | boolean | undefined) => any) | undefined; }>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>; export declare const StdTable: __VLS_WithTemplateSlots_3<typeof __VLS_component_3, __VLS_TemplateResult_3["slots"]>; export declare interface StdTableBodyScope { text: any; value: any; record: Record<string, any>; index: number; column: any; } export declare interface StdTableColumn<T = any> extends Omit<TableColumnType, 'customRender'> { title: string | (() => string); dataIndex: string | string[]; customHeaderRender?: CustomHeaderRenderFn; pure?: boolean; search?: boolean | Partial<StdFormConfig>; edit?: StdFormConfig; customRender?: CustomRenderFn<T>; hiddenInTable?: boolean; hiddenInEdit?: boolean; hiddenInAdd?: boolean; hiddenInDetail?: boolean; hiddenInExport?: boolean; } export declare interface StdTableHeaderScope { title: string; column: any; } export declare interface StdTableProps extends Pick<StdCurdProps, 'tableProps' | 'columns' | 'customQueryParams' | 'overwriteParams' | 'rowSelectionType' | 'rowSelection' | 'disableRouterQuery' | 'disableView' | 'disableEdit' | 'disableSearch' | 'disableDelete' | 'disableTrash' | 'rowDraggable' | 'rowDraggableOptions' | 'hideResetBtn' | 'showSearchBtn'> { getListApi: CurdApi['getList']; refreshConfig?: { timestamp: number; reset?: boolean; }; onlyQuery?: boolean; isTrash?: boolean; } export declare const StdTimePicker: DefineComponent<__VLS_PublicProps_15, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, { "update:value": (value: Dayjs | null | undefined) => any; }, string, PublicProps, Readonly<__VLS_PublicProps_15> & Readonly<{ "onUpdate:value"?: ((value: Dayjs | null | undefined) => any) | undefined; }>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>; export declare const StdUpload: DefineComponent<__VLS_PublicProps_16, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, { "update:value": (value: UploadFile<any>[]) => any; }, string, PublicProps, Readonly<__VLS_PublicProps_16> & Readonly<{ "onUpdate:value"?: ((value: UploadFile<any>[]) => any) | undefined; }>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>; export declare type SwitchConfig = SwitchProps & BaseConfig; export declare type TextareaConfig = Omit<TextAreaProps, 'placeholder'> & PlaceholderT & BaseConfig; export declare const TIME_FORMAT = "HH:mm:ss"; /** * The time config * @description The config for the time */ export declare interface TimeConfig { timestamp?: boolean; } export declare type TimePickerConfig = Omit<TimePickerProps, 'placeholder'> & PlaceholderT & BaseConfig; export declare interface TimeT extends BaseConfig { timestamp?: boolean; } export declare type TransferConfig = Omit<TransferProps, 'placeholder'> & PlaceholderT & BaseConfig; export declare type UploadConfig = Omit<UploadProps, 'placeholder'> & PlaceholderT & BaseConfig & { multiple?: boolean; }; export declare function useExport(config: { columns: StdTableColumn[]; api?: (params: Record<string, any>) => Promise<any>; }): { exportExcel: (selectedRowKey: any, selectedRows: any) => void; exportColumns: Ref<ExportColumn[], ExportColumn[]>; state: { indeterminate: boolean; checkAll: boolean; }; onCheckAllChange: () => void; }; export declare function useSearch(): void; export declare const WEEK_FORMAT = "YYYY-wo"; export declare type WeekPickerConfig = Omit<WeekPickerProps, 'placeholder'> & PlaceholderT & BaseConfig; export declare const YEAR_FORMAT = "YYYY"; export { }