@fewangsit/wangsvue-fats 1.0.0-alpha.14 → 1.0.0-alpha.140

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 (189) 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 +3 -2
  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 +3 -2
  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 +13 -1
  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 +2 -1
  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 +104 -69
  41. package/components/form/Form.vue.d.ts +4 -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 +14 -0
  45. package/components/index.d.ts +34 -21
  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 +7 -1
  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/steps/Steps.vue.d.ts +20 -0
  64. package/components/tabmenu/TabMenu.vue.d.ts +7 -191
  65. package/components/tagtype/TagType.vue.d.ts +26 -0
  66. package/components/textarea/Textarea.vue.d.ts +2 -1
  67. package/components/timeline/Timeline.vue.d.ts +21 -2
  68. package/components/toast/Toast.vue.d.ts +2 -1
  69. package/components/toggleswitch/ToggleSwitch.vue.d.ts +1 -0
  70. package/components/transactionroles/TransactionRoles.vue.d.ts +58 -0
  71. package/components/tree/Tree.vue.d.ts +6 -3
  72. package/components/tree/helpers/filterNodeKeys.helper.d.ts +8 -2
  73. package/components/tree/helpers/flattenTreeNodeChildren.helper.d.ts +3 -1
  74. package/components/ts-helpers.d.ts +8 -0
  75. package/components/username/UserName.vue.d.ts +6 -1
  76. package/components/userwithicon/UserWithIcon.vue.d.ts +21 -0
  77. package/config/defaultProps.d.ts +1 -1
  78. package/config/index.d.ts +1 -1
  79. package/config/locale.d.ts +1 -1
  80. package/directives/focus.d.ts +1 -1
  81. package/event-bus/index.d.ts +59 -53
  82. package/event-bus/mitt.d.ts +29 -14
  83. package/loading-page-BKLGrwQz.js +1 -0
  84. package/loading-page-fUogn1yP.js +1 -0
  85. package/loading-page-vGlJdJXh.js +1 -0
  86. package/loading-plane-BKLGrwQz.js +1 -0
  87. package/loading-table-15LLi35m.js +1 -0
  88. package/loading-table-CN9d0zPh.js +1 -0
  89. package/loading-table-Crgp9X_l.js +1 -0
  90. package/main.d.ts +34 -2
  91. package/no-data-CA5oLyk_.js +1 -0
  92. package/no-data-DPErfTY5.js +1 -0
  93. package/no-data-DcQXm3zT.js +1 -0
  94. package/package.json +16 -8
  95. package/plugins/VueHtmlToPaper.d.ts +11 -0
  96. package/plugins/WangsVue.d.ts +272 -98
  97. package/plugins/formValidation.d.ts +16 -6
  98. package/plugins/i18n-extension.d.ts +1 -1
  99. package/plugins/i18n.d.ts +90 -67
  100. package/stats.html +4949 -0
  101. package/style.css +1 -1
  102. package/utils/date.util.d.ts +64 -31
  103. package/utils/exportToExcel.util.d.ts +7 -14
  104. package/utils/formatTagCode.util.d.ts +1 -0
  105. package/utils/getStatusSeverity.util.d.ts +27 -0
  106. package/utils/index.d.ts +8 -21
  107. package/utils/isBasic.util.d.ts +1 -0
  108. package/utils/listenSidebarChanges.util.d.ts +14 -9
  109. package/utils/object.util.d.ts +14 -3
  110. package/utils/role.util.d.ts +63 -26
  111. package/utils/toast.util.d.ts +78 -78
  112. package/utils/xlsx.util.d.ts +19 -0
  113. package/wangsvue-fats.js +56922 -0
  114. package/wangsvue-fats.system.js +199 -281
  115. package/wangsvue-fats.umd.cjs +427 -0
  116. package/assets/json/currencies.json.d.ts +0 -1068
  117. package/assets/lottie/admin/loading-page.lottie +0 -0
  118. package/assets/lottie/admin/loading-table.lottie +0 -0
  119. package/assets/lottie/admin/no-data.lottie +0 -0
  120. package/assets/lottie/supplyasset/loading-page.lottie +0 -0
  121. package/assets/lottie/supplyasset/loading-table.lottie +0 -0
  122. package/assets/lottie/supplyasset/no-data.lottie +0 -0
  123. package/assets/lottie/workspace/loading-page.lottie +0 -0
  124. package/assets/lottie/workspace/loading-plane.lottie +0 -0
  125. package/assets/lottie/workspace/loading-table.lottie +0 -0
  126. package/assets/lottie/workspace/no-data.lottie +0 -0
  127. package/build-entry.d.ts +0 -14
  128. package/components/buttonscan/helpers/getErrorCode.helper.d.ts +0 -3
  129. package/components/buttonscan/helpers/index.d.ts +0 -1
  130. package/components/buttonscan/workers/scanner.worker.d.ts +0 -1
  131. package/components/buttonsplit/ButtonSplit.d.ts +0 -350
  132. package/components/calendar/BaseCalendar.vue.d.ts +0 -86
  133. package/components/codesnippet/CodeSnippet.vue.d.ts +0 -14
  134. package/components/customcolumn/ColumnList.vue.d.ts +0 -27
  135. package/components/customcolumn/helpers/setVisibilityColumn.helper.d.ts +0 -12
  136. package/components/datatable/MultiRow.vue.d.ts +0 -16
  137. package/components/datatable/helpers/adjustMenuPosition.helper.d.ts +0 -1
  138. package/components/datatable/helpers/filter.helper.d.ts +0 -28
  139. package/components/datatable/helpers/index.d.ts +0 -3
  140. package/components/datatable/helpers/readConfig.helper.d.ts +0 -2
  141. package/components/datatable/store/dataTable.store.d.ts +0 -22
  142. package/components/editor/CodeSnippetAdapter.vue.d.ts +0 -92
  143. package/components/editor/EditorButton.vue.d.ts +0 -15
  144. package/components/editor/MentionList.vue.d.ts +0 -35
  145. package/components/editor/MentionSection.vue.d.ts +0 -92
  146. package/components/editor/codeSnippetExtension.d.ts +0 -3
  147. package/components/editor/mentionSectionExtension.d.ts +0 -3
  148. package/components/editor/suggestion.d.ts +0 -2
  149. package/components/filtercontainer/helpers/applyFilter.helper.d.ts +0 -5
  150. package/components/filtercontainer/helpers/formatDateTimeRange.helper.d.ts +0 -7
  151. package/components/filtercontainer/helpers/getOption.helper.d.ts +0 -3
  152. package/components/gallerypreview/GalleryPreview.vue.d.ts +0 -31
  153. package/components/hardwaresync/store/device.store.d.ts +0 -36
  154. package/components/helpers/convertToArrayClass.helper.d.ts +0 -2
  155. package/components/helpers/index.d.ts +0 -2
  156. package/components/helpers/label.d.ts +0 -15
  157. package/components/imagecompressor/BackgroundImageCropper.vue.d.ts +0 -36
  158. package/components/imagecompressor/ImageInputInfo.vue.d.ts +0 -30
  159. package/components/inputgroup/InputGroup.vue.d.ts +0 -141
  160. package/components/inputphonenumber/helpers/getUserLocation.helper.d.ts +0 -8
  161. package/components/languagedropdown/LanguageDropdownOption.vue.d.ts +0 -18
  162. package/components/menu/helpers/filterMenu.helper.d.ts +0 -12
  163. package/components/menu/helpers/index.d.ts +0 -1
  164. package/components/menuitem/MenuItem.vue.d.ts +0 -19
  165. package/components/progressbar/ProgressBar.vue.d.ts +0 -72
  166. package/components/quickfilter/QuickFilter.vue.d.ts +0 -25
  167. package/components/timeline/TimelineContentByType.vue.d.ts +0 -16
  168. package/components/tooltipspan/TooltipSpan.vue.d.ts +0 -20
  169. package/components/tree/helpers/index.d.ts +0 -3
  170. package/components/usergroup/UserGroup.vue.d.ts +0 -57
  171. package/components/validatormessage/ValidatorMessage.vue.d.ts +0 -12
  172. package/loading-page-BrQattYE.js +0 -1
  173. package/loading-page-CgfbWppy.js +0 -1
  174. package/loading-page-DbLuqCHa.js +0 -1
  175. package/loading-plane-CgfbWppy.js +0 -1
  176. package/loading-table-Bdr9ZhtP.js +0 -1
  177. package/loading-table-BzrSQlA0.js +0 -1
  178. package/loading-table-chOgXi94.js +0 -1
  179. package/no-data-Cgze_Rvp.js +0 -1
  180. package/no-data-Dep79CBh.js +0 -1
  181. package/no-data-y1X5WtcQ.js +0 -1
  182. package/types/options.type.d.ts +0 -16
  183. package/utils/addAttachment.util.d.ts +0 -43
  184. package/utils/filterOptions.util.d.ts +0 -3
  185. package/utils/genPlaceholder.util.d.ts +0 -8
  186. package/utils/getAttachmentIcon.util.d.ts +0 -8
  187. package/utils/mergePropsWithDefaults.util.d.ts +0 -20
  188. package/utils/textFormatter.util.d.ts +0 -17
  189. package/wangsvue-fats.es.js +0 -133530
@@ -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,20 @@
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'];
13
+ errors: VeeFormContext['errors'];
8
14
  }
9
15
  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>;
16
+ export declare const useField: <T>(
17
+ path: MaybeRefOrGetter<string>,
18
+ rules?: MaybeRef<RuleExpression<T>>,
19
+ opts?: Partial<FieldOptions<T>>,
20
+ ) => 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;
package/plugins/i18n.d.ts CHANGED
@@ -1,80 +1,103 @@
1
- import { App, Ref } from 'vue';
2
1
  import { AxiosResponse } from 'axios';
3
- import { LanguageOption } from '../components/languagedropdown/LanguageDropdown.vue.d';
2
+ import { App, Ref } from 'vue';
4
3
  export type Locale = string;
4
+ export interface LanguageOption {
5
+ /**
6
+ * ISO 639-1 language code (e.g., "en" for English, "fr" for French).
7
+ */
8
+ isoCode?: string;
9
+ /**
10
+ * The name of the language in English (e.g., "English", "Français").
11
+ */
12
+ name: string;
13
+ /**
14
+ * The URL of the country's flag image.
15
+ * Flags are sourced from https://flagcdn.com and are typically in SVG format for high-quality resolution.
16
+ */
17
+ flag?: string;
18
+ }
5
19
  export interface I18n {
6
- /**
7
- * Locale message translation
8
- *
9
- * @param key - The translation key
10
- * @param params - A values of named interpolation
11
- * @param args - Positional interpolation values
12
- *
13
- * @returns translation message
14
- * @example `t('Hello {user}!', { user: 'John Doe' })` - returns: 'Hello John Doe!'
15
- * @example `t('Hello %s! I am %s.', "John Doe", "Peter Smith")` - returns: 'Hello John Doe! I am Peter Smith.'
16
- */
17
- t: {
18
- (key: string, params: Record<string, any>): string;
19
- (key: string, ...args: (string | number | boolean)[]): string;
20
- };
21
- /**
22
- * Change the locale dynamically
23
- *
24
- * @param newLocale - The locale to switch to
25
- */
26
- setLocale: (newLocale: Locale) => Promise<void>;
27
- /**
28
- * Get the current locale
29
- *
30
- * @returns Current locale
31
- */
32
- locale: Ref<Locale>;
33
- /**
34
- * Service methods handle fetch requests
35
- */
36
- service?: I18nService;
20
+ /**
21
+ * Locale message translation
22
+ *
23
+ * @param key - The translation key
24
+ * @param params - A values of named interpolation
25
+ * @param args - Positional interpolation values
26
+ *
27
+ * @returns translation message
28
+ * @example `t('Hello {user}!', { user: 'John Doe' })` - returns: 'Hello John Doe!'
29
+ * @example `t('Hello %s! I am %s.', "John Doe", "Peter Smith")` - returns: 'Hello John Doe! I am Peter Smith.'
30
+ */
31
+ t: {
32
+ (key: string, params: Record<string, any>): string;
33
+ (key: string, ...args: (string | number | boolean)[]): string;
34
+ };
35
+ /**
36
+ * Change the locale dynamically
37
+ *
38
+ * @param newLocale - The locale to switch to
39
+ */
40
+ setLocale: (newLocale: Locale) => Promise<void>;
41
+ /**
42
+ * Get the current locale
43
+ *
44
+ * @returns Current locale
45
+ */
46
+ locale: Ref<Locale>;
47
+ /**
48
+ * Service methods handle fetch requests
49
+ */
50
+ service?: I18nService;
37
51
  }
38
52
  type MessageMap = Record<string, string>;
39
53
  export interface I18nService {
40
- /**
41
- * Fetch all translation messages for a specific locale.
42
- * @param locale The locale code (e.g., 'en', 'id').
43
- * @returns A promise resolving to a key-value record of messages.
44
- */
45
- getMessages(locale: string): Promise<AxiosResponse<{
46
- data: MessageMap;
47
- }>>;
48
- /**
49
- * Fetch all available lang options for LanguageDropdown and LanguageSwitcher
50
- *
51
- * @returns Promise Array of options
52
- */
53
- getLanguageOptions(): Promise<LanguageOption[]>;
54
- /**
55
- * Fetch single lang option meta data
56
- *
57
- * @param locale The locale code (e.g., 'en', 'id').
58
- * @returns Promise LanguageMeta
59
- */
60
- getLanguageOptionMeta(locale: string): Promise<LanguageOption>;
61
- /**
62
- * Translate a specific text to the target locale.
63
- * @param key Unique translation key.
64
- * @param locale Target locale code.
65
- * @returns A promise resolving to the translated string.
66
- */
67
- translateText(key: string, locale: string): Promise<string>;
54
+ /**
55
+ * Fetch all translation messages for a specific locale.
56
+ * @param locale The locale code (e.g., 'en', 'id').
57
+ * @returns A promise resolving to a key-value record of messages.
58
+ */
59
+ getMessages(locale: string): Promise<
60
+ AxiosResponse<{
61
+ data: MessageMap;
62
+ }>
63
+ >;
64
+ /**
65
+ * Fetch all available lang options for LanguageDropdown and LanguageSwitcher
66
+ *
67
+ * @returns Promise Array of options
68
+ */
69
+ getLanguageOptions(): Promise<LanguageOption[]>;
70
+ /**
71
+ * Fetch single lang option meta data
72
+ *
73
+ * @param locale The locale code (e.g., 'en', 'id').
74
+ * @returns Promise LanguageMeta
75
+ */
76
+ getLanguageOptionMeta(locale: string): Promise<LanguageOption>;
77
+ /**
78
+ * Translate a specific text to the target locale.
79
+ * @param key Unique translation key.
80
+ * @param locale Target locale code.
81
+ * @returns A promise resolving to the translated string.
82
+ */
83
+ translateText(key: string, locale: string): Promise<string>;
68
84
  }
69
85
  export declare const useI18n: () => I18n;
70
86
  declare const i18n: {
71
- install: (app: App) => void;
87
+ install: (app: App) => void;
72
88
  };
73
- export declare const createI18nWithExtension: (service: I18nService) => typeof i18n;
89
+ export declare const createI18nWithExtension: (
90
+ service: I18nService,
91
+ ) => typeof i18n;
74
92
  export default i18n;
75
93
  declare module 'vue' {
76
- interface ComponentCustomProperties {
77
- $i18n: I18n;
78
- $t: I18n['t'];
79
- }
94
+ interface ComponentCustomProperties {
95
+ $i18n: I18n;
96
+ $t: I18n['t'];
97
+ }
98
+ }
99
+ declare global {
100
+ interface Window {
101
+ i18n: I18n;
102
+ }
80
103
  }