@fewangsit/wangsvue-fats 1.0.0-alpha.12 → 1.0.0-alpha.121

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (161) hide show
  1. package/components/animation/Animation.vue.d.ts +9 -1
  2. package/components/assetinfo/AssetInfo.vue.d.ts +44 -0
  3. package/components/badgegroup/BadgeGroup.vue.d.ts +3 -1
  4. package/components/basetree/BaseTree.vue.d.ts +6 -1
  5. package/components/button/Button.vue.d.ts +7 -3
  6. package/components/buttonaddbyscan/ButtonAddByScan.vue.d.ts +40 -0
  7. package/components/buttonbulkaction/ButtonBulkAction.vue.d.ts +1 -0
  8. package/components/buttonradio/ButtonRadio.vue.d.ts +1 -0
  9. package/components/buttonscan/ButtonScan.vue.d.ts +202 -0
  10. package/components/buttonsearchbyscan/ButtonSearchByScan.vue.d.ts +46 -0
  11. package/components/buttonselecttree/ButtonSelectTree.vue.d.ts +2 -1
  12. package/components/buttonsplit/ButtonSplit.vue.d.ts +352 -34
  13. package/components/buttonsync/ButtonSync.vue.d.ts +22 -0
  14. package/components/buttontoggle/ButtonToggle.vue.d.ts +1 -0
  15. package/components/buttonviewlog/ButtonViewLog.vue.d.ts +17 -0
  16. package/components/calendar/Calendar.vue.d.ts +32 -4
  17. package/components/card/Card.vue.d.ts +1 -0
  18. package/components/carousel/Carousel.vue.d.ts +28 -0
  19. package/components/checkbox/Checkbox.vue.d.ts +1 -0
  20. package/components/datatable/DataTable.vue.d.ts +12 -4
  21. package/components/dialog/Dialog.vue.d.ts +4 -3
  22. package/components/dialogassetnamedetail/DialogAssetNameDetail.vue.d.ts +46 -0
  23. package/components/dialogassetnamedetail/options/columns.d.ts +2 -0
  24. package/components/dialogassetnamedetail/options/filter.d.ts +2 -0
  25. package/components/dialogconfirm/DialogConfirm.vue.d.ts +1 -0
  26. package/components/dialogform/DialogForm.vue.d.ts +3 -2
  27. package/components/dialoglinkedasset/DialogLinkedAsset.vue.d.ts +106 -0
  28. package/components/dialogprintqr/DialogPrintQR.vue.d.ts +18 -0
  29. package/components/dialogreportdamage/DialogReportDamage.vue.d.ts +34 -0
  30. package/components/dialogreportmissing/DialogReportMissing.vue.d.ts +33 -0
  31. package/components/dialogreporttag/DialogReportTag.vue.d.ts +31 -0
  32. package/components/dialogselecttree/DialogSelectTree.vue.d.ts +3 -2
  33. package/components/dialogselectuser/DialogSelectUser.vue.d.ts +102 -0
  34. package/components/dialogselectuser/options/columns.d.ts +3 -0
  35. package/components/dialogtransferlog/DialogTransferLog.vue.d.ts +16 -0
  36. package/components/dropdown/Dropdown.vue.d.ts +28 -4
  37. package/components/editor/Editor.vue.d.ts +1 -0
  38. package/components/fieldwrapper/FieldWrapper.vue.d.ts +19 -2
  39. package/components/fileupload/FileUpload.vue.d.ts +1 -0
  40. package/components/filtercontainer/FilterContainer.vue.d.ts +42 -12
  41. package/components/form/Form.vue.d.ts +2 -1
  42. package/components/icon/Icon.vue.d.ts +4 -0
  43. package/components/image/Image.vue.d.ts +8 -0
  44. package/components/imagecompressor/ImageCompressor.vue.d.ts +6 -0
  45. package/components/index.d.ts +33 -19
  46. package/components/inputcurrency/helpers/currency.helper.d.ts +5 -1
  47. package/components/inputemail/InputEmail.vue.d.ts +1 -0
  48. package/components/inputnumber/InputNumber.vue.d.ts +6 -0
  49. package/components/inputotp/InputOtp.vue.d.ts +3 -0
  50. package/components/inputpassword/InputPassword.vue.d.ts +1 -0
  51. package/components/inputrangenumber/InputRangeNumber.vue.d.ts +1 -0
  52. package/components/inputsearch/InputSearch.vue.d.ts +6 -2
  53. package/components/inputtext/InputText.vue.d.ts +2 -1
  54. package/components/inputurl/InputURL.vue.d.ts +4 -2
  55. package/components/invisiblefield/InvisibleField.vue.d.ts +32 -36
  56. package/components/languagedropdown/LanguageDropdown.vue.d.ts +5 -19
  57. package/components/litedropdown/LiteDropdown.vue.d.ts +5 -3
  58. package/components/loading/store/loading.store.d.ts +3 -3
  59. package/components/menu/Menu.vue.d.ts +2 -1
  60. package/components/multiselect/MultiSelect.vue.d.ts +7 -4
  61. package/components/overlaypanel/OverlayPanel.vue.d.ts +1 -0
  62. package/components/paginator/Paginator.vue.d.ts +285 -0
  63. package/components/tabmenu/TabMenu.vue.d.ts +6 -190
  64. package/components/tagtype/TagType.vue.d.ts +26 -0
  65. package/components/textarea/Textarea.vue.d.ts +2 -1
  66. package/components/timeline/Timeline.vue.d.ts +21 -2
  67. package/components/toast/Toast.vue.d.ts +2 -1
  68. package/components/toggleswitch/ToggleSwitch.vue.d.ts +1 -0
  69. package/components/transactionroles/TransactionRoles.vue.d.ts +58 -0
  70. package/components/tree/Tree.vue.d.ts +6 -3
  71. package/components/tree/helpers/filterNodeKeys.helper.d.ts +8 -2
  72. package/components/tree/helpers/flattenTreeNodeChildren.helper.d.ts +3 -1
  73. package/components/username/UserName.vue.d.ts +6 -1
  74. package/components/userwithicon/UserWithIcon.vue.d.ts +21 -0
  75. package/config/defaultProps.d.ts +1 -1
  76. package/config/index.d.ts +1 -1
  77. package/config/locale.d.ts +1 -1
  78. package/directives/focus.d.ts +1 -1
  79. package/event-bus/index.d.ts +55 -52
  80. package/event-bus/mitt.d.ts +29 -14
  81. package/main.d.ts +34 -2
  82. package/package.json +14 -6
  83. package/plugins/VueHtmlToPaper.d.ts +11 -0
  84. package/plugins/WangsVue.d.ts +272 -98
  85. package/plugins/formValidation.d.ts +15 -6
  86. package/plugins/i18n-extension.d.ts +1 -1
  87. package/plugins/i18n.d.ts +90 -67
  88. package/stats.html +4949 -0
  89. package/style.css +1 -1
  90. package/utils/date.util.d.ts +64 -31
  91. package/utils/formatTagCode.util.d.ts +1 -0
  92. package/utils/getStatusSeverity.util.d.ts +23 -0
  93. package/utils/index.d.ts +7 -21
  94. package/utils/isBasic.util.d.ts +1 -0
  95. package/utils/listenSidebarChanges.util.d.ts +14 -9
  96. package/utils/object.util.d.ts +14 -3
  97. package/utils/role.util.d.ts +63 -26
  98. package/utils/toast.util.d.ts +78 -78
  99. package/wangsvue-fats.js +57715 -0
  100. package/wangsvue-fats.system.js +204 -267
  101. package/assets/json/currencies.json.d.ts +0 -1068
  102. package/assets/lottie/admin/loading-page.lottie +0 -0
  103. package/assets/lottie/admin/loading-table.lottie +0 -0
  104. package/assets/lottie/admin/no-data.lottie +0 -0
  105. package/assets/lottie/supplyasset/loading-page.lottie +0 -0
  106. package/assets/lottie/supplyasset/loading-table.lottie +0 -0
  107. package/assets/lottie/supplyasset/no-data.lottie +0 -0
  108. package/assets/lottie/workspace/loading-page.lottie +0 -0
  109. package/assets/lottie/workspace/loading-plane.lottie +0 -0
  110. package/assets/lottie/workspace/loading-table.lottie +0 -0
  111. package/assets/lottie/workspace/no-data.lottie +0 -0
  112. package/build-entry.d.ts +0 -14
  113. package/components/buttonsplit/ButtonSplit.d.ts +0 -350
  114. package/components/calendar/BaseCalendar.vue.d.ts +0 -86
  115. package/components/codesnippet/CodeSnippet.vue.d.ts +0 -14
  116. package/components/customcolumn/ColumnList.vue.d.ts +0 -27
  117. package/components/customcolumn/helpers/setVisibilityColumn.helper.d.ts +0 -12
  118. package/components/datatable/MultiRow.vue.d.ts +0 -16
  119. package/components/datatable/helpers/adjustMenuPosition.helper.d.ts +0 -1
  120. package/components/datatable/helpers/filter.helper.d.ts +0 -28
  121. package/components/datatable/helpers/index.d.ts +0 -3
  122. package/components/datatable/helpers/readConfig.helper.d.ts +0 -2
  123. package/components/datatable/store/dataTable.store.d.ts +0 -22
  124. package/components/editor/CodeSnippetAdapter.vue.d.ts +0 -92
  125. package/components/editor/EditorButton.vue.d.ts +0 -15
  126. package/components/editor/MentionList.vue.d.ts +0 -35
  127. package/components/editor/MentionSection.vue.d.ts +0 -92
  128. package/components/editor/codeSnippetExtension.d.ts +0 -3
  129. package/components/editor/mentionSectionExtension.d.ts +0 -3
  130. package/components/editor/suggestion.d.ts +0 -2
  131. package/components/filtercontainer/helpers/applyFilter.helper.d.ts +0 -5
  132. package/components/filtercontainer/helpers/formatDateTimeRange.helper.d.ts +0 -7
  133. package/components/filtercontainer/helpers/getOption.helper.d.ts +0 -3
  134. package/components/gallerypreview/GalleryPreview.vue.d.ts +0 -31
  135. package/components/helpers/convertToArrayClass.helper.d.ts +0 -2
  136. package/components/helpers/index.d.ts +0 -2
  137. package/components/helpers/label.d.ts +0 -15
  138. package/components/imagecompressor/BackgroundImageCropper.vue.d.ts +0 -36
  139. package/components/imagecompressor/ImageInputInfo.vue.d.ts +0 -30
  140. package/components/inputgroup/InputGroup.vue.d.ts +0 -141
  141. package/components/inputphonenumber/helpers/getUserLocation.helper.d.ts +0 -8
  142. package/components/languagedropdown/LanguageDropdownOption.vue.d.ts +0 -18
  143. package/components/menu/helpers/filterMenu.helper.d.ts +0 -12
  144. package/components/menu/helpers/index.d.ts +0 -1
  145. package/components/menuitem/MenuItem.vue.d.ts +0 -19
  146. package/components/progressbar/ProgressBar.vue.d.ts +0 -72
  147. package/components/quickfilter/QuickFilter.vue.d.ts +0 -25
  148. package/components/timeline/TimelineContentByType.vue.d.ts +0 -16
  149. package/components/tooltipspan/TooltipSpan.vue.d.ts +0 -20
  150. package/components/tree/helpers/index.d.ts +0 -3
  151. package/components/usergroup/UserGroup.vue.d.ts +0 -57
  152. package/components/validatormessage/ValidatorMessage.vue.d.ts +0 -12
  153. package/types/options.type.d.ts +0 -16
  154. package/utils/addAttachment.util.d.ts +0 -43
  155. package/utils/exportToExcel.util.d.ts +0 -20
  156. package/utils/filterOptions.util.d.ts +0 -3
  157. package/utils/genPlaceholder.util.d.ts +0 -8
  158. package/utils/getAttachmentIcon.util.d.ts +0 -8
  159. package/utils/mergePropsWithDefaults.util.d.ts +0 -20
  160. package/utils/textFormatter.util.d.ts +0 -17
  161. package/wangsvue-fats.es.js +0 -132454
@@ -1,26 +1,41 @@
1
1
  export type EventType = string | symbol;
2
2
  export type Handler<T = unknown> = (event: T) => void;
3
- export type WildcardHandler<T = Record<string, unknown>> = (type: keyof T, event: T[keyof T]) => void;
3
+ export type WildcardHandler<T = Record<string, unknown>> = (
4
+ type: keyof T,
5
+ event: T[keyof T],
6
+ ) => void;
4
7
  export type EventHandlerList<T = unknown> = Array<Handler<T>>;
5
- export type WildCardEventHandlerList<T = Record<string, unknown>> = Array<WildcardHandler<T>>;
6
- export type EventHandlerMap<Events extends Record<EventType, unknown>> = Map<keyof Events | '*', EventHandlerList<Events[keyof Events]> | WildCardEventHandlerList<Events>>;
8
+ export type WildCardEventHandlerList<T = Record<string, unknown>> = Array<
9
+ WildcardHandler<T>
10
+ >;
11
+ export type EventHandlerMap<Events extends Record<EventType, unknown>> = Map<
12
+ keyof Events | '*',
13
+ EventHandlerList<Events[keyof Events]> | WildCardEventHandlerList<Events>
14
+ >;
7
15
  export interface Emitter<Events extends Record<EventType, unknown>> {
8
- all: EventHandlerMap<Events>;
9
- on<Key extends keyof Events>(type: Key, handler: Handler<Events[Key]>): void;
10
- on(type: '*', handler: WildcardHandler<Events>): void;
11
- off<Key extends keyof Events>(type: Key, handler?: Handler<Events[Key]>): void;
12
- off(type: '*', handler: WildcardHandler<Events>): void;
13
- emit<Key extends keyof Events>(type: Key, event: Events[Key]): void;
14
- emit<Key extends keyof Events>(type: undefined extends Events[Key] ? Key : never): void;
16
+ all: EventHandlerMap<Events>;
17
+ on<Key extends keyof Events>(type: Key, handler: Handler<Events[Key]>): void;
18
+ on(type: '*', handler: WildcardHandler<Events>): void;
19
+ off<Key extends keyof Events>(
20
+ type: Key,
21
+ handler?: Handler<Events[Key]>,
22
+ ): void;
23
+ off(type: '*', handler: WildcardHandler<Events>): void;
24
+ emit<Key extends keyof Events>(type: Key, event: Events[Key]): void;
25
+ emit<Key extends keyof Events>(
26
+ type: undefined extends Events[Key] ? Key : never,
27
+ ): void;
15
28
  }
16
29
  /**
17
30
  * Mitt: Tiny (~200b) functional event emitter / pubsub.
18
31
  * @name mitt
19
32
  * @returns {Mitt}
20
33
  */
21
- export default function mitt<Events extends Record<EventType, unknown>>(all?: EventHandlerMap<Events>): Emitter<Events>;
34
+ export default function mitt<Events extends Record<EventType, unknown>>(
35
+ all?: EventHandlerMap<Events>,
36
+ ): Emitter<Events>;
22
37
  declare global {
23
- interface Window {
24
- eventBus: Emitter<any>;
25
- }
38
+ interface Window {
39
+ eventBus: Emitter<any>;
40
+ }
26
41
  }
package/main.d.ts CHANGED
@@ -1,2 +1,34 @@
1
- export * from './build-entry'
2
- export {}
1
+ export { default as mitt } from './event-bus/mitt';
2
+ export { default as eventBus, extendEventBus } from './event-bus';
3
+
4
+ // PrimeVue
5
+ export { default as ToastService } from 'primevue/toastservice';
6
+
7
+ // Utils
8
+ export * from './utils';
9
+
10
+ // Helpers
11
+ export { formatCurrency } from './components/inputcurrency/helpers/currency.helper';
12
+
13
+ // Component store
14
+ export { default as useLoadingStore } from './components/loading/store/loading.store';
15
+
16
+ // Directives
17
+ export { default as Tooltip } from 'primevue/tooltip';
18
+ export { Focus } from './directives';
19
+
20
+ // Plugins
21
+ export { useForm, useField } from './plugins/formValidation';
22
+ export type { FormContext } from './plugins/formValidation';
23
+
24
+ // Translation
25
+ export * from './plugins/i18n';
26
+ export { default as i18n } from './plugins/i18n-extension';
27
+
28
+ // Used for dialog print qr
29
+ export { default as VueHtmlToPaper } from './plugins/VueHtmlToPaper';
30
+
31
+ export * from './components';
32
+
33
+ // Config
34
+ export { default as WangsVue } from './config';
package/package.json CHANGED
@@ -1,16 +1,24 @@
1
1
  {
2
2
  "name": "@fewangsit/wangsvue-fats",
3
- "version": "1.0.0-alpha.12",
4
- "author": "fewangsit",
5
- "description": "Admin Console Tagsamurai VueJS Component Library",
3
+ "version": "1.0.0-alpha.121",
4
+ "author": "Wangsit FE Developer",
5
+ "description": "Fixed Asset Tagsamurai VueJS Component Library",
6
6
  "type": "module",
7
- "module": "./wangsvue-fats.es.js",
7
+ "module": "./wangsvue-fats.js",
8
8
  "types": "./main.d.ts",
9
+ "repository": "https://github.com/fewangsit/wangsvue",
9
10
  "exports": {
10
- ".": "./wangsvue-fats.es.js",
11
+ ".": "./wangsvue-fats.js",
11
12
  "./style.css": "./style.css",
12
- "./types": "./types",
13
+ "./config": "./config",
14
+ "./plugins": "./plugins",
15
+ "./directives": "./directives",
16
+ "./components": "./components",
13
17
  "./event-bus": "./event-bus",
14
18
  "./utils": "./utils"
19
+ },
20
+ "dependencies": {
21
+ "@wangs-ui/core": "latest",
22
+ "@wangs-ui/vue": "latest"
15
23
  }
16
24
  }
@@ -0,0 +1,11 @@
1
+ import { App } from 'vue';
2
+ type PrintOptions = {
3
+ name?: string;
4
+ specs?: string[];
5
+ replace?: boolean;
6
+ styles?: string[];
7
+ };
8
+ declare const VueHtmlToPaper: {
9
+ install(app: App, globalOptions?: PrintOptions): void;
10
+ };
11
+ export default VueHtmlToPaper;
@@ -1,131 +1,305 @@
1
1
  import { Plugin } from 'vue';
2
- import { PrimeVueLocaleOptions } from 'primevue/config';
3
- import { FieldWrapperLocaleConfig, FieldWrapperProps } from '../components/fieldwrapper/FieldWrapper.vue.d';
4
- import { InputTextLocaleConfig, InputTextProps } from '../components/inputtext/InputText.vue.d';
5
- import { TreeProps } from '../components/tree/Tree.vue.d';
6
- import { DialogConfirmLocaleConfig } from '../components/dialogconfirm/DialogConfirm.vue.d';
7
- import { CustomColumnLocaleConfig } from '../components/customcolumn/CustomColumn.vue.d';
2
+ import { InputOtpRawPreset } from '@wangs-ui/core/dist/types/components/inputotp/inputotp.type';
3
+ import { TabMenuRawPreset } from '@wangs-ui/core/dist/types/components/tabmenu/tabmenu.type';
4
+ import { AnimationDefaultConfig } from '../components/animation/Animation.vue.d';
5
+ import { BadgeComponentConfigs } from '../components/badge/Badge.vue.d';
6
+ import {
7
+ ButtonBulkActionLocaleConfig,
8
+ ButtonBulkActionProps,
9
+ } from '../components/buttonbulkaction/ButtonBulkAction.vue.d';
8
10
  import { ButtonSearchLocaleConfig } from '../components/buttonsearch/ButtonSearch.vue.d';
11
+ import {
12
+ CalendarLocaleConfig,
13
+ CalendarPresetOptions,
14
+ } from '../components/calendar/Calendar.vue.d';
15
+ import { CustomColumnLocaleConfig } from '../components/customcolumn/CustomColumn.vue.d';
16
+ import {
17
+ DataTableLocaleConfig,
18
+ DataTableProps,
19
+ } from '../components/datatable/DataTable.vue.d';
20
+ import { DialogConfirmLocaleConfig } from '../components/dialogconfirm/DialogConfirm.vue.d';
21
+ import { DialogFormLocaleConfig } from '../components/dialogform/DialogForm.vue.d';
22
+ import {
23
+ DropdownLocaleConfig,
24
+ DropdownProps,
25
+ } from '../components/dropdown/Dropdown.vue.d';
26
+ import {
27
+ FieldWrapperLocaleConfig,
28
+ FieldWrapperProps,
29
+ } from '../components/fieldwrapper/FieldWrapper.vue.d';
9
30
  import { FilterContainerLocaleConfig } from '../components/filtercontainer/FilterContainer.vue.d';
10
- import { MultiSelectLocaleConfig } from '../components/multiselect/MultiSelect.vue.d';
11
- import { DropdownLocaleConfig, DropdownProps } from '../components/dropdown/Dropdown.vue.d';
31
+ import { ImageProps } from '../components/image/Image.vue.d';
32
+ import { ImageCompressorLocaleConfig } from '../components/imagecompressor/ImageCompressor.vue.d';
12
33
  import { InputCurrencyLocaleConfig } from '../components/inputcurrency/InputCurrency.vue.d';
13
- import { TextareaLocaleConfig } from '../components/textarea/Textarea.vue.d';
14
- import { InputrangeNumberLocaleConfig } from '../components/inputrangenumber/InputRangeNumber.vue.d';
15
- import { DialogFormLocaleConfig } from '../components/dialogform/DialogForm.vue.d';
16
- import { InputPhoneNumberLocaleConfig } from '../components/inputphonenumber/InputPhoneNumber.vue.d';
34
+ import { InputEmailProps } from '../components/inputemail/InputEmail.vue.d';
17
35
  import { InputNumberLocaleConfig } from '../components/inputnumber/InputNumber.vue.d';
18
- import { CalendarLocaleConfig, CalendarPresetOptions } from '../components/calendar/Calendar.vue.d';
19
- import { OverlayPanelPassThroughOptions } from '../components/overlaypanel/OverlayPanel.vue.d';
36
+ import { InputPhoneNumberLocaleConfig } from '../components/inputphonenumber/InputPhoneNumber.vue.d';
37
+ import { InputrangeNumberLocaleConfig } from '../components/inputrangenumber/InputRangeNumber.vue.d';
38
+ import {
39
+ InputTextLocaleConfig,
40
+ InputTextProps,
41
+ } from '../components/inputtext/InputText.vue.d';
20
42
  import { InputURLProps } from '../components/inputurl/InputURL.vue.d';
21
- import { InputEmailProps } from '../components/inputemail/InputEmail.vue.d';
22
- import { ImageProps } from '../components/image/Image.vue.d';
23
- import { MenuLocaleConfig } from '../components/menu/Menu.vue.d';
24
- import { ButtonBulkActionLocaleConfig, ButtonBulkActionProps } from '../components/buttonbulkaction/ButtonBulkAction.vue.d';
25
- import { AnimationDefaultConfig } from '../components/animation/Animation.vue.d';
26
43
  import { LoadingPresetOptions } from '../components/loading/Loading.vue.d';
27
- import { DataTableLocaleConfig, DataTableProps } from '../components/datatable/DataTable.vue.d';
28
- import { BadgeComponentConfigs } from '../components/badge/Badge.vue.d';
29
- import { UserNameComponentConfigs, UserNameLocaleConfig, UserNamePresetOptions } from '../components/username/UserName.vue.d';
30
- import { ImageCompressorLocaleConfig } from '../components/imagecompressor/ImageCompressor.vue.d';
31
- import { UseToastConfig } from '../utils';
44
+ import { MenuLocaleConfig } from '../components/menu/Menu.vue.d';
45
+ import { MultiSelectLocaleConfig } from '../components/multiselect/MultiSelect.vue.d';
46
+ import { OverlayPanelPassThroughOptions } from '../components/overlaypanel/OverlayPanel.vue.d';
47
+ import { TagTypeProps } from '../components/tagtype/TagType.vue.d';
48
+ import { TextareaLocaleConfig } from '../components/textarea/Textarea.vue.d';
49
+ import { TreeProps } from '../components/tree/Tree.vue.d';
50
+ import {
51
+ UserNameComponentConfigs,
52
+ UserNameLocaleConfig,
53
+ UserNamePresetOptions,
54
+ } from '../components/username/UserName.vue.d';
55
+ import { type UseToastConfig } from '../utils/toast.util';
32
56
  /**
33
57
  * A Record of component names with theirs props interface
34
58
  */
35
59
  export interface ComponentDefaultPropsConfig {
36
- FieldWrapper?: FieldWrapperProps;
37
- InputText?: InputTextProps;
38
- InputURL?: InputURLProps;
39
- InputEmail?: InputEmailProps;
40
- Tree?: TreeProps;
41
- Image?: ImageProps;
42
- ButtonBulkAction?: Omit<ButtonBulkActionProps, 'selectedData' | 'options'>;
43
- Animation?: AnimationDefaultConfig;
44
- DataTable?: Partial<DataTableProps>;
45
- Badge?: Partial<BadgeComponentConfigs>;
46
- UserName?: UserNameComponentConfigs;
47
- Dropdown?: DropdownProps;
60
+ FieldWrapper?: FieldWrapperProps;
61
+ InputText?: InputTextProps;
62
+ InputURL?: InputURLProps;
63
+ InputEmail?: InputEmailProps;
64
+ Tree?: TreeProps;
65
+ Image?: ImageProps;
66
+ ButtonBulkAction?: Omit<ButtonBulkActionProps, 'selectedData' | 'options'>;
67
+ Animation?: AnimationDefaultConfig;
68
+ DataTable?: Partial<DataTableProps>;
69
+ Badge?: Partial<BadgeComponentConfigs>;
70
+ UserName?: UserNameComponentConfigs;
71
+ Dropdown?: DropdownProps;
72
+ TagType?: Partial<TagTypeProps>;
48
73
  }
49
74
  interface ComponentLocaleConfig {
50
- FieldWrapper?: FieldWrapperLocaleConfig;
51
- InputText?: InputTextLocaleConfig;
52
- DialogConfirm?: DialogConfirmLocaleConfig;
53
- CustomColumn?: CustomColumnLocaleConfig;
54
- ButtonSearch?: ButtonSearchLocaleConfig;
55
- FilterContainer?: FilterContainerLocaleConfig;
56
- MultiSelect?: MultiSelectLocaleConfig;
57
- Dropdown?: DropdownLocaleConfig;
58
- InputCurrency?: InputCurrencyLocaleConfig;
59
- TextArea?: TextareaLocaleConfig;
60
- InputRangeNumber?: InputrangeNumberLocaleConfig;
61
- DialogForm?: DialogFormLocaleConfig;
62
- InputPhoneNumber?: InputPhoneNumberLocaleConfig;
63
- InputNumber?: InputNumberLocaleConfig;
64
- Calendar?: CalendarLocaleConfig;
65
- Menu?: MenuLocaleConfig;
66
- ButtonBulkAction?: ButtonBulkActionLocaleConfig;
67
- UserName?: UserNameLocaleConfig;
68
- DataTable?: DataTableLocaleConfig;
69
- ImageCompressor?: ImageCompressorLocaleConfig;
75
+ FieldWrapper?: FieldWrapperLocaleConfig;
76
+ InputText?: InputTextLocaleConfig;
77
+ DialogConfirm?: DialogConfirmLocaleConfig;
78
+ CustomColumn?: CustomColumnLocaleConfig;
79
+ ButtonSearch?: ButtonSearchLocaleConfig;
80
+ FilterContainer?: FilterContainerLocaleConfig;
81
+ MultiSelect?: MultiSelectLocaleConfig;
82
+ Dropdown?: DropdownLocaleConfig;
83
+ InputCurrency?: InputCurrencyLocaleConfig;
84
+ TextArea?: TextareaLocaleConfig;
85
+ InputRangeNumber?: InputrangeNumberLocaleConfig;
86
+ DialogForm?: DialogFormLocaleConfig;
87
+ InputPhoneNumber?: InputPhoneNumberLocaleConfig;
88
+ InputNumber?: InputNumberLocaleConfig;
89
+ Calendar?: CalendarLocaleConfig;
90
+ Menu?: MenuLocaleConfig;
91
+ ButtonBulkAction?: ButtonBulkActionLocaleConfig;
92
+ UserName?: UserNameLocaleConfig;
93
+ DataTable?: DataTableLocaleConfig;
94
+ ImageCompressor?: ImageCompressorLocaleConfig;
70
95
  }
71
96
  export interface LocaleConfig {
72
- global: Partial<PrimeVueLocaleOptions>;
73
- components: ComponentLocaleConfig;
97
+ global: Partial<typeof DEFAULT_GLOBAL_LOCALE_CONFIG>;
98
+ components: ComponentLocaleConfig;
74
99
  }
75
100
  export interface ComponentPresetOptions {
76
- calendar: CalendarPresetOptions;
77
- overlaypanel: OverlayPanelPassThroughOptions;
78
- loading: LoadingPresetOptions;
79
- username: UserNamePresetOptions;
80
- [key: string]: any;
101
+ calendar: CalendarPresetOptions;
102
+ overlaypanel: OverlayPanelPassThroughOptions;
103
+ loading: LoadingPresetOptions;
104
+ username: UserNamePresetOptions;
105
+ inputotp: InputOtpRawPreset;
106
+ tabmenu: TabMenuRawPreset;
107
+ [key: string]: any;
81
108
  }
82
- export type WangsVueComponentConfig<ComponentName extends keyof ComponentDefaultPropsConfig | keyof ComponentLocaleConfig> = {
83
- defaultProps: ComponentName extends keyof ComponentDefaultPropsConfig ? ComponentDefaultPropsConfig[ComponentName] : undefined;
84
- locale: (ComponentName extends keyof ComponentLocaleConfig ? ComponentLocaleConfig[ComponentName] : undefined) & {
85
- global: LocaleConfig['global'];
86
- };
109
+ export type WangsVueComponentConfig<
110
+ ComponentName extends
111
+ | keyof ComponentDefaultPropsConfig
112
+ | keyof ComponentLocaleConfig,
113
+ > = {
114
+ defaultProps: ComponentName extends keyof ComponentDefaultPropsConfig
115
+ ? ComponentDefaultPropsConfig[ComponentName]
116
+ : undefined;
117
+ locale: (ComponentName extends keyof ComponentLocaleConfig
118
+ ? ComponentLocaleConfig[ComponentName]
119
+ : undefined) & {
120
+ global: LocaleConfig['global'];
121
+ };
87
122
  };
88
123
  export interface WangsVueOptions {
89
- defaultProps: ComponentDefaultPropsConfig;
90
- locale: LocaleConfig;
91
- useToastConfig?: UseToastConfig;
92
- zIndex?: Record<string, number>;
93
- filterMatchModeOptions?: Record<string, string[]>;
94
- /**
95
- * @deprecated - partially replaced with {@link preset}
96
- */
97
- pt?: ComponentPresetOptions;
98
- preset?: ComponentPresetOptions;
99
- ptOptions?: {
100
- mergeSections: boolean;
101
- mergeProps: boolean;
102
- };
103
- /**
104
- * @deprecated - Will always be unstyled
105
- */
106
- unstyled?: boolean;
107
- csp?: {
108
- nonce?: string;
109
- };
124
+ defaultProps: ComponentDefaultPropsConfig;
125
+ locale: LocaleConfig;
126
+ useToastConfig?: UseToastConfig;
127
+ zIndex?: Record<string, number>;
128
+ filterMatchModeOptions?: Record<string, string[]>;
129
+ /**
130
+ * @deprecated - partially replaced with {@link preset}
131
+ */
132
+ pt?: ComponentPresetOptions;
133
+ preset?: ComponentPresetOptions;
134
+ ptOptions?: {
135
+ mergeSections: boolean;
136
+ mergeProps: boolean;
137
+ };
138
+ /**
139
+ * @deprecated - Will always be unstyled
140
+ */
141
+ unstyled?: boolean;
142
+ csp?: {
143
+ nonce?: string;
144
+ };
110
145
  }
111
146
  export interface WangsVueInstance {
112
- config: WangsVueOptions;
113
- getComponentConfig<ComponentName extends keyof ComponentDefaultPropsConfig | keyof ComponentLocaleConfig>(componentName: ComponentName): WangsVueComponentConfig<ComponentName>;
147
+ config: WangsVueOptions;
148
+ getComponentConfig<
149
+ ComponentName extends
150
+ | keyof ComponentDefaultPropsConfig
151
+ | keyof ComponentLocaleConfig,
152
+ >(
153
+ componentName: ComponentName,
154
+ ): WangsVueComponentConfig<ComponentName>;
114
155
  }
156
+ declare const DEFAULT_GLOBAL_LOCALE_CONFIG: {
157
+ startsWith: string;
158
+ contains: string;
159
+ notContains: string;
160
+ endsWith: string;
161
+ equals: string;
162
+ notEquals: string;
163
+ noFilter: string;
164
+ lt: string;
165
+ lte: string;
166
+ gt: string;
167
+ gte: string;
168
+ dateIs: string;
169
+ dateIsNot: string;
170
+ dateBefore: string;
171
+ dateAfter: string;
172
+ clear: string;
173
+ apply: string;
174
+ matchAll: string;
175
+ matchAny: string;
176
+ addRule: string;
177
+ removeRule: string;
178
+ accept: string;
179
+ reject: string;
180
+ choose: string;
181
+ upload: string;
182
+ cancel: string;
183
+ completed: string;
184
+ pending: string;
185
+ fileSizeTypes: string[];
186
+ monthNames: string[];
187
+ monthNamesShort: string[];
188
+ dayNames: string[];
189
+ dayNamesShort: string[];
190
+ dayNamesMin: string[];
191
+ chooseYear: string;
192
+ chooseMonth: string;
193
+ chooseDate: string;
194
+ prevDecade: string;
195
+ nextDecade: string;
196
+ prevYear: string;
197
+ nextYear: string;
198
+ prevMonth: string;
199
+ nextMonth: string;
200
+ prevHour: string;
201
+ nextHour: string;
202
+ prevMinute: string;
203
+ nextMinute: string;
204
+ prevSecond: string;
205
+ nextSecond: string;
206
+ pm: string;
207
+ am: string;
208
+ today: string;
209
+ weekHeader: string;
210
+ firstDayOfWeek: number;
211
+ showMonthAfterYear: boolean;
212
+ dateFormat: string;
213
+ weak: string;
214
+ medium: string;
215
+ strong: string;
216
+ passwordPrompt: string;
217
+ emptyFilterMessage: string;
218
+ searchMessage: string;
219
+ selectionMessage: string;
220
+ emptySelectionMessage: string;
221
+ emptySearchMessage: string;
222
+ emptyMessage: string;
223
+ aria: {
224
+ trueLabel: string;
225
+ falseLabel: string;
226
+ nullLabel: string;
227
+ star: string;
228
+ stars: string;
229
+ selectAll: string;
230
+ unselectAll: string;
231
+ close: string;
232
+ previous: string;
233
+ next: string;
234
+ navigation: string;
235
+ scrollTop: string;
236
+ moveTop: string;
237
+ moveUp: string;
238
+ moveDown: string;
239
+ moveBottom: string;
240
+ moveToTarget: string;
241
+ moveToSource: string;
242
+ moveAllToTarget: string;
243
+ moveAllToSource: string;
244
+ pageLabel: string;
245
+ firstPageLabel: string;
246
+ lastPageLabel: string;
247
+ nextPageLabel: string;
248
+ prevPageLabel: string;
249
+ rowsPerPageLabel: string;
250
+ jumpToPageDropdownLabel: string;
251
+ jumpToPageInputLabel: string;
252
+ selectRow: string;
253
+ unselectRow: string;
254
+ expandRow: string;
255
+ collapseRow: string;
256
+ showFilterMenu: string;
257
+ hideFilterMenu: string;
258
+ filterOperator: string;
259
+ filterConstraint: string;
260
+ editRow: string;
261
+ saveEdit: string;
262
+ cancelEdit: string;
263
+ listView: string;
264
+ gridView: string;
265
+ slide: string;
266
+ slideNumber: string;
267
+ zoomImage: string;
268
+ zoomIn: string;
269
+ zoomOut: string;
270
+ rotateRight: string;
271
+ rotateLeft: string;
272
+ listLabel: string;
273
+ };
274
+ };
115
275
  export declare const defaultOptions: WangsVueOptions;
116
- export declare const useWangsVueConfig: <T extends (keyof ComponentDefaultPropsConfig | keyof ComponentLocaleConfig) | undefined>(componentName?: T) => T extends keyof ComponentDefaultPropsConfig | keyof ComponentLocaleConfig ? WangsVueComponentConfig<T> : WangsVueOptions;
117
- export declare const mergeWangsVueConfig: (baseConfig: WangsVueOptions, overrideConfig: Partial<WangsVueOptions>) => WangsVueOptions;
276
+ export declare const useWangsVueConfig: <
277
+ T extends
278
+ | (keyof ComponentDefaultPropsConfig | keyof ComponentLocaleConfig)
279
+ | undefined,
280
+ >(
281
+ componentName?: T,
282
+ ) => T extends keyof ComponentDefaultPropsConfig | keyof ComponentLocaleConfig
283
+ ? WangsVueComponentConfig<T>
284
+ : WangsVueOptions;
285
+ export declare const mergeWangsVueConfig: (
286
+ baseConfig: WangsVueOptions,
287
+ overrideConfig: Partial<WangsVueOptions>,
288
+ ) => WangsVueOptions;
118
289
  /**
119
290
  *
120
291
  * @param predefinedOptions
121
292
  * @param mergeConfig Wether merge predefined config with defualt config @default true
122
293
  * @returns
123
294
  */
124
- declare const createWangsVuePlugin: (predefinedOptions?: Partial<WangsVueOptions>, mergeConfig?: boolean) => Plugin<Partial<WangsVueOptions>>;
295
+ declare const createWangsVuePlugin: (
296
+ predefinedOptions?: Partial<WangsVueOptions>,
297
+ mergeConfig?: boolean,
298
+ ) => Plugin<Partial<WangsVueOptions>>;
125
299
  export default createWangsVuePlugin;
126
300
  declare module 'vue' {
127
- interface ComponentCustomProperties {
128
- $wangsvue: WangsVueInstance;
129
- $preset: ComponentPresetOptions;
130
- }
301
+ interface ComponentCustomProperties {
302
+ $wangsvue: WangsVueInstance;
303
+ $preset: ComponentPresetOptions;
304
+ }
131
305
  }
@@ -1,10 +1,19 @@
1
+ import {
2
+ FieldContext,
3
+ FieldOptions,
4
+ FormContext as VeeFormContext,
5
+ RuleExpression,
6
+ } from 'vee-validate';
1
7
  import { MaybeRef, MaybeRefOrGetter } from 'vue';
2
- import { FormContext as VeeFormContext, FieldContext, RuleExpression, FieldOptions } from 'vee-validate';
3
8
  export interface FormContext<T> {
4
- values: T;
5
- handleSubmit: VeeFormContext['handleSubmit'];
6
- setValues: VeeFormContext['setValues'];
7
- setFieldValue: VeeFormContext['setFieldValue'];
9
+ values: T;
10
+ handleSubmit: VeeFormContext['handleSubmit'];
11
+ setValues: VeeFormContext['setValues'];
12
+ setFieldValue: VeeFormContext['setFieldValue'];
8
13
  }
9
14
  export declare const useForm: <T>() => FormContext<T>;
10
- export declare const useField: <T>(path: MaybeRefOrGetter<string>, rules?: MaybeRef<RuleExpression<T>>, opts?: Partial<FieldOptions<T>>) => FieldContext<T>;
15
+ export declare const useField: <T>(
16
+ path: MaybeRefOrGetter<string>,
17
+ rules?: MaybeRef<RuleExpression<T>>,
18
+ opts?: Partial<FieldOptions<T>>,
19
+ ) => FieldContext<T>;
@@ -1,4 +1,4 @@
1
1
  declare const _default: {
2
- install: (app: import('vue').App) => void;
2
+ install: (app: import('vue').App) => void;
3
3
  };
4
4
  export default _default;