import { InputOtpRawPreset } from '@wangs-ui/core/dist/types/components/inputotp/inputotp.type'; import { TabMenuRawPreset } from '@wangs-ui/core/dist/types/components/tabmenu/tabmenu.type'; import { Plugin } from 'vue'; import { AnimationDefaultConfig } from '../animation'; import { BadgeComponentConfigs } from '../badge'; import { ButtonBulkActionLocaleConfig, ButtonBulkActionProps, } from '../buttonbulkaction'; import { ButtonDownloadLocaleConfig, ButtonDownloadProps, } from '../buttondownload'; import { ButtonSearchLocaleConfig } from '../buttonsearch'; import { CalendarLocaleConfig, CalendarPresetOptions } from '../calendar'; import { CustomColumnLocaleConfig } from '../customcolumn'; import { DataTableLocaleConfig, DataTableProps, TreeTableProps, } from '../datatable'; import { DialogConfirmLocaleConfig } from '../dialogconfirm'; import { DialogFormLocaleConfig } from '../dialogform'; import { DropdownLocaleConfig, DropdownProps } from '../dropdown'; import { FieldWrapperLocaleConfig, FieldWrapperProps } from '../fieldwrapper'; import { FilterContainerLocaleConfig } from '../filtercontainer'; import { ImageProps } from '../image'; import { ImageCompressorLocaleConfig } from '../imagecompressor'; import { InputCurrencyLocaleConfig } from '../inputcurrency'; import { InputEmailProps } from '../inputemail'; import { InputNumberLocaleConfig } from '../inputnumber'; import { InputPhoneNumberLocaleConfig } from '../inputphonenumber'; import { InputrangeNumberLocaleConfig } from '../inputrangenumber'; import { InputTextLocaleConfig, InputTextProps } from '../inputtext'; import { InputURLProps } from '../inputurl'; import { LoadingPresetOptions } from '../loading'; import { MenuLocaleConfig } from '../menu'; import { MultiSelectLocaleConfig } from '../multiselect'; import { OverlayPanelPassThroughOptions } from '../overlaypanel'; import { TagTypeProps } from '../tagtype'; import { TextareaLocaleConfig } from '../textarea'; import { ToastLocaleConfig } from '../toast'; import { TreeProps } from '../tree'; import { UserNameComponentConfigs, UserNameLocaleConfig, UserNamePresetOptions, } from '../username'; import { type UseToastConfig } from '../utils/baseToast.util'; /** * A Record of component names with theirs props interface */ export interface ComponentDefaultPropsConfig { FieldWrapper?: FieldWrapperProps; InputText?: InputTextProps; InputURL?: InputURLProps; InputEmail?: InputEmailProps; Tree?: TreeProps; Image?: ImageProps; ButtonBulkAction?: Omit; Animation?: AnimationDefaultConfig; DataTable?: Partial; Badge?: Partial; UserName?: UserNameComponentConfigs; Dropdown?: DropdownProps; TagType?: Partial; ButtonDownload?: Partial; } interface ComponentLocaleConfig { FieldWrapper?: FieldWrapperLocaleConfig; InputText?: InputTextLocaleConfig; DialogConfirm?: DialogConfirmLocaleConfig; CustomColumn?: CustomColumnLocaleConfig; ButtonSearch?: ButtonSearchLocaleConfig; FilterContainer?: FilterContainerLocaleConfig; MultiSelect?: MultiSelectLocaleConfig; Dropdown?: DropdownLocaleConfig; InputCurrency?: InputCurrencyLocaleConfig; TextArea?: TextareaLocaleConfig; InputRangeNumber?: InputrangeNumberLocaleConfig; DialogForm?: DialogFormLocaleConfig; InputPhoneNumber?: InputPhoneNumberLocaleConfig; InputNumber?: InputNumberLocaleConfig; Calendar?: CalendarLocaleConfig; Menu?: MenuLocaleConfig; ButtonBulkAction?: ButtonBulkActionLocaleConfig; UserName?: UserNameLocaleConfig; DataTable?: DataTableLocaleConfig; ImageCompressor?: ImageCompressorLocaleConfig; ButtonDownload?: ButtonDownloadLocaleConfig; Toast?: ToastLocaleConfig; } export interface LocaleConfig { global: Partial; components: ComponentLocaleConfig; } export interface ComponentPresetOptions { calendar: CalendarPresetOptions; overlaypanel: OverlayPanelPassThroughOptions; loading: LoadingPresetOptions; username: UserNamePresetOptions; inputotp: InputOtpRawPreset; tabmenu: TabMenuRawPreset; [key: string]: any; } export type WangsVueComponentConfig< ComponentName extends | keyof ComponentDefaultPropsConfig | keyof ComponentLocaleConfig, > = { defaultProps: ComponentName extends keyof ComponentDefaultPropsConfig ? ComponentDefaultPropsConfig[ComponentName] : undefined; locale: (ComponentName extends keyof ComponentLocaleConfig ? ComponentLocaleConfig[ComponentName] : undefined) & { global: LocaleConfig['global']; }; }; export interface WangsVueOptions { defaultProps: ComponentDefaultPropsConfig; locale: LocaleConfig; useToastConfig?: UseToastConfig; zIndex?: Record; filterMatchModeOptions?: Record; /** * @deprecated - partially replaced with {@link preset} */ pt?: ComponentPresetOptions; preset?: ComponentPresetOptions; ptOptions?: { mergeSections: boolean; mergeProps: boolean; }; /** * @deprecated - Will always be unstyled */ unstyled?: boolean; csp?: { nonce?: string; }; } export interface WangsVueInstance { config: WangsVueOptions; getComponentConfig< ComponentName extends | keyof ComponentDefaultPropsConfig | keyof ComponentLocaleConfig, >( componentName: ComponentName, ): WangsVueComponentConfig; } export declare const DEFAULT_GLOBAL_LOCALE_CONFIG: { startsWith: string; contains: string; notContains: string; endsWith: string; equals: string; notEquals: string; noFilter: string; lt: string; lte: string; gt: string; gte: string; dateIs: string; dateIsNot: string; dateBefore: string; dateAfter: string; clear: string; apply: string; matchAll: string; matchAny: string; addRule: string; removeRule: string; accept: string; reject: string; choose: string; upload: string; cancel: string; completed: string; pending: string; fileSizeTypes: string[]; monthNames: string[]; monthNamesShort: string[]; dayNames: string[]; dayNamesShort: string[]; dayNamesMin: string[]; chooseYear: string; chooseMonth: string; chooseDate: string; prevDecade: string; nextDecade: string; prevYear: string; nextYear: string; prevMonth: string; nextMonth: string; prevHour: string; nextHour: string; prevMinute: string; nextMinute: string; prevSecond: string; nextSecond: string; pm: string; am: string; today: string; weekHeader: string; firstDayOfWeek: number; showMonthAfterYear: boolean; dateFormat: string; weak: string; medium: string; strong: string; passwordPrompt: string; emptyFilterMessage: string; searchMessage: string; selectionMessage: string; emptySelectionMessage: string; emptySearchMessage: string; emptyMessage: string; aria: { trueLabel: string; falseLabel: string; nullLabel: string; star: string; stars: string; selectAll: string; unselectAll: string; close: string; previous: string; next: string; navigation: string; scrollTop: string; moveTop: string; moveUp: string; moveDown: string; moveBottom: string; moveToTarget: string; moveToSource: string; moveAllToTarget: string; moveAllToSource: string; pageLabel: string; firstPageLabel: string; lastPageLabel: string; nextPageLabel: string; prevPageLabel: string; rowsPerPageLabel: string; jumpToPageDropdownLabel: string; jumpToPageInputLabel: string; selectRow: string; unselectRow: string; expandRow: string; collapseRow: string; showFilterMenu: string; hideFilterMenu: string; filterOperator: string; filterConstraint: string; editRow: string; saveEdit: string; cancelEdit: string; listView: string; gridView: string; slide: string; slideNumber: string; zoomImage: string; zoomIn: string; zoomOut: string; rotateRight: string; rotateLeft: string; listLabel: string; }; }; export declare const defaultOptions: WangsVueOptions; export declare const useWangsVueConfig: < T extends | (keyof ComponentDefaultPropsConfig | keyof ComponentLocaleConfig) | undefined, >( componentName?: T, ) => T extends keyof ComponentDefaultPropsConfig | keyof ComponentLocaleConfig ? WangsVueComponentConfig : WangsVueOptions; export declare const mergeWangsVueConfig: ( baseConfig: WangsVueOptions, overrideConfig: Partial, ) => WangsVueOptions; /** * * @param predefinedOptions * @param mergeConfig Wether merge predefined config with defualt config @default true * @returns */ declare const createWangsVuePlugin: ( predefinedOptions?: Partial, mergeConfig?: boolean, ) => Plugin>; export default createWangsVuePlugin; declare module 'vue' { interface ComponentCustomProperties { $wangsvue: WangsVueInstance; $preset: ComponentPresetOptions; } }