@fewangsit/wangsvue-fats 1.0.0-alpha.15 → 1.0.0-alpha.150

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