@fewangsit/wangsvue-fats 1.0.0-alpha.20 → 1.0.0-alpha.22

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 (179) hide show
  1. package/event-bus/mitt.d.ts +25 -7
  2. package/package.json +1 -1
  3. package/plugins/WangsVue.d.ts +184 -16
  4. package/plugins/formValidation.d.ts +11 -2
  5. package/plugins/i18n.d.ts +23 -5
  6. package/utils/addAttachment.util.d.ts +18 -2
  7. package/utils/date.util.d.ts +33 -4
  8. package/utils/filterOptions.util.d.ts +4 -2
  9. package/utils/genPlaceholder.util.d.ts +11 -6
  10. package/utils/mergePropsWithDefaults.util.d.ts +4 -1
  11. package/utils/object.util.d.ts +14 -3
  12. package/utils/role.util.d.ts +5 -32
  13. package/utils/textFormatter.util.d.ts +15 -3
  14. package/assets/json/currencies.json.d.ts +0 -1068
  15. package/assets/lottie/admin/loading-page.lottie +0 -0
  16. package/assets/lottie/admin/loading-table.lottie +0 -0
  17. package/assets/lottie/admin/no-data.lottie +0 -0
  18. package/assets/lottie/supplyasset/loading-page.lottie +0 -0
  19. package/assets/lottie/supplyasset/loading-table.lottie +0 -0
  20. package/assets/lottie/supplyasset/no-data.lottie +0 -0
  21. package/assets/lottie/workspace/loading-page.lottie +0 -0
  22. package/assets/lottie/workspace/loading-plane.lottie +0 -0
  23. package/assets/lottie/workspace/loading-table.lottie +0 -0
  24. package/assets/lottie/workspace/no-data.lottie +0 -0
  25. package/build-entry.d.ts +0 -14
  26. package/components/animation/Animation.vue.d.ts +0 -24
  27. package/components/approverinfo/ApproverInfo.vue.d.ts +0 -51
  28. package/components/assetinfo/AssetInfo.vue.d.ts +0 -32
  29. package/components/badge/Badge.vue.d.ts +0 -73
  30. package/components/badgegroup/BadgeGroup.vue.d.ts +0 -52
  31. package/components/basecomponent/index.d.ts +0 -28
  32. package/components/basetree/BaseTree.vue.d.ts +0 -591
  33. package/components/basetree/TreeNode.vue.d.ts +0 -35
  34. package/components/breadcrumb/Breadcrumb.vue.d.ts +0 -26
  35. package/components/button/Button.vue.d.ts +0 -188
  36. package/components/buttonImportExcel/ButtonImportExcel.vue.d.ts +0 -35
  37. package/components/buttonbulkaction/ButtonBulkAction.vue.d.ts +0 -104
  38. package/components/buttoncopy/ButtonCopy.vue.d.ts +0 -26
  39. package/components/buttondownload/ButtonDownload.vue.d.ts +0 -49
  40. package/components/buttonfilter/ButtonFilter.vue.d.ts +0 -12
  41. package/components/buttonradio/ButtonRadio.vue.d.ts +0 -257
  42. package/components/buttonscan/ButtonScan.vue.d.ts +0 -201
  43. package/components/buttonscan/helpers/getErrorCode.helper.d.ts +0 -3
  44. package/components/buttonscan/helpers/index.d.ts +0 -1
  45. package/components/buttonscan/workers/scanner.worker.d.ts +0 -1
  46. package/components/buttonsearch/ButtonSearch.vue.d.ts +0 -38
  47. package/components/buttonselecttree/ButtonSelectTree.vue.d.ts +0 -200
  48. package/components/buttonsplit/ButtonSplit.d.ts +0 -350
  49. package/components/buttonsplit/ButtonSplit.vue.d.ts +0 -34
  50. package/components/buttonsync/ButtonSync.vue.d.ts +0 -10
  51. package/components/buttontoggle/ButtonToggle.vue.d.ts +0 -18
  52. package/components/buttonviewlog/ButtonViewLog.vue.d.ts +0 -17
  53. package/components/calendar/BaseCalendar.vue.d.ts +0 -86
  54. package/components/calendar/Calendar.vue.d.ts +0 -570
  55. package/components/card/Card.vue.d.ts +0 -139
  56. package/components/checkbox/Checkbox.vue.d.ts +0 -329
  57. package/components/codesnippet/CodeSnippet.vue.d.ts +0 -14
  58. package/components/customcolumn/ColumnList.vue.d.ts +0 -27
  59. package/components/customcolumn/CustomColumn.vue.d.ts +0 -37
  60. package/components/customcolumn/helpers/setVisibilityColumn.helper.d.ts +0 -12
  61. package/components/datatable/DataTable.vue.d.ts +0 -735
  62. package/components/datatable/MultiRow.vue.d.ts +0 -16
  63. package/components/datatable/helpers/adjustMenuPosition.helper.d.ts +0 -1
  64. package/components/datatable/helpers/filter.helper.d.ts +0 -28
  65. package/components/datatable/helpers/index.d.ts +0 -3
  66. package/components/datatable/helpers/readConfig.helper.d.ts +0 -2
  67. package/components/datatable/store/dataTable.store.d.ts +0 -22
  68. package/components/dialog/Dialog.vue.d.ts +0 -464
  69. package/components/dialogconfirm/DialogConfirm.vue.d.ts +0 -164
  70. package/components/dialogform/DialogForm.vue.d.ts +0 -349
  71. package/components/dialogselecttree/DialogSelectTree.vue.d.ts +0 -136
  72. package/components/dropdown/Dropdown.vue.d.ts +0 -264
  73. package/components/editor/CodeSnippetAdapter.vue.d.ts +0 -92
  74. package/components/editor/Editor.vue.d.ts +0 -191
  75. package/components/editor/EditorButton.vue.d.ts +0 -15
  76. package/components/editor/MentionList.vue.d.ts +0 -35
  77. package/components/editor/MentionSection.vue.d.ts +0 -92
  78. package/components/editor/codeSnippetExtension.d.ts +0 -3
  79. package/components/editor/mentionSectionExtension.d.ts +0 -3
  80. package/components/editor/suggestion.d.ts +0 -2
  81. package/components/fieldwrapper/FieldWrapper.vue.d.ts +0 -69
  82. package/components/fileupload/FileUpload.vue.d.ts +0 -169
  83. package/components/filtercontainer/FilterContainer.vue.d.ts +0 -182
  84. package/components/filtercontainer/helpers/applyFilter.helper.d.ts +0 -5
  85. package/components/filtercontainer/helpers/formatDateTimeRange.helper.d.ts +0 -7
  86. package/components/filtercontainer/helpers/getOption.helper.d.ts +0 -3
  87. package/components/form/Form.vue.d.ts +0 -316
  88. package/components/gallerypreview/GalleryPreview.vue.d.ts +0 -31
  89. package/components/hardwaresync/store/device.store.d.ts +0 -36
  90. package/components/helpers/convertToArrayClass.helper.d.ts +0 -2
  91. package/components/helpers/index.d.ts +0 -2
  92. package/components/helpers/label.d.ts +0 -15
  93. package/components/icon/Icon.vue.d.ts +0 -256
  94. package/components/image/Image.vue.d.ts +0 -403
  95. package/components/imagecompressor/BackgroundImageCropper.vue.d.ts +0 -36
  96. package/components/imagecompressor/ImageCompressor.vue.d.ts +0 -229
  97. package/components/imagecompressor/ImageInputInfo.vue.d.ts +0 -32
  98. package/components/index.d.ts +0 -69
  99. package/components/inlinemessage/InlineMessage.vue.d.ts +0 -167
  100. package/components/inputbadge/InputBadge.vue.d.ts +0 -122
  101. package/components/inputcurrency/InputCurrency.vue.d.ts +0 -170
  102. package/components/inputcurrency/helpers/currency.helper.d.ts +0 -4
  103. package/components/inputemail/InputEmail.vue.d.ts +0 -25
  104. package/components/inputgroup/InputGroup.vue.d.ts +0 -141
  105. package/components/inputnumber/InputNumber.vue.d.ts +0 -282
  106. package/components/inputpassword/InputPassword.vue.d.ts +0 -32
  107. package/components/inputphonenumber/InputPhoneNumber.vue.d.ts +0 -99
  108. package/components/inputphonenumber/helpers/getUserLocation.helper.d.ts +0 -8
  109. package/components/inputrangenumber/InputRangeNumber.vue.d.ts +0 -120
  110. package/components/inputsearch/InputSearch.vue.d.ts +0 -32
  111. package/components/inputtext/InputText.vue.d.ts +0 -352
  112. package/components/inputurl/InputURL.vue.d.ts +0 -39
  113. package/components/invisiblefield/InvisibleField.vue.d.ts +0 -36
  114. package/components/languagedropdown/LanguageDropdown.vue.d.ts +0 -47
  115. package/components/languagedropdown/LanguageDropdownOption.vue.d.ts +0 -18
  116. package/components/languageswitcher/LanguageSwitcher.vue.d.ts +0 -15
  117. package/components/litedropdown/LiteDropdown.vue.d.ts +0 -96
  118. package/components/loading/Loading.vue.d.ts +0 -47
  119. package/components/loading/store/loading.store.d.ts +0 -8
  120. package/components/menu/Menu.vue.d.ts +0 -390
  121. package/components/menu/helpers/filterMenu.helper.d.ts +0 -12
  122. package/components/menu/helpers/index.d.ts +0 -1
  123. package/components/menuitem/MenuItem.vue.d.ts +0 -19
  124. package/components/menuitem/index.d.ts +0 -106
  125. package/components/multiselect/MultiSelect.vue.d.ts +0 -192
  126. package/components/overlaypanel/OverlayPanel.vue.d.ts +0 -301
  127. package/components/passthrough/index.d.ts +0 -16
  128. package/components/progressbar/ProgressBar.vue.d.ts +0 -72
  129. package/components/quickfilter/QuickFilter.vue.d.ts +0 -25
  130. package/components/tabmenu/TabMenu.vue.d.ts +0 -288
  131. package/components/tagtype/TagType.vue.d.ts +0 -21
  132. package/components/textarea/Textarea.vue.d.ts +0 -170
  133. package/components/timeline/Timeline.vue.d.ts +0 -121
  134. package/components/timeline/TimelineContentByType.vue.d.ts +0 -16
  135. package/components/toast/Toast.vue.d.ts +0 -367
  136. package/components/toggleswitch/ToggleSwitch.vue.d.ts +0 -281
  137. package/components/tooltipspan/TooltipSpan.vue.d.ts +0 -20
  138. package/components/tree/Tree.vue.d.ts +0 -148
  139. package/components/tree/helpers/filterNodeKeys.helper.d.ts +0 -16
  140. package/components/tree/helpers/flattenTreeNodeChildren.helper.d.ts +0 -6
  141. package/components/tree/helpers/index.d.ts +0 -3
  142. package/components/treesearchinput/TreeSearchInput.vue.d.ts +0 -16
  143. package/components/ts-helpers.d.ts +0 -83
  144. package/components/usergroup/UserGroup.vue.d.ts +0 -57
  145. package/components/username/UserName.vue.d.ts +0 -113
  146. package/components/userwithicon/UserWithIcon.vue.d.ts +0 -21
  147. package/components/validatormessage/ValidatorMessage.vue.d.ts +0 -12
  148. package/config/defaultProps.d.ts +0 -3
  149. package/config/index.d.ts +0 -3
  150. package/config/locale.d.ts +0 -3
  151. package/loading-page-BrQattYE.js +0 -1
  152. package/loading-page-CgfbWppy.js +0 -1
  153. package/loading-page-CoC9UhfC.js +0 -4
  154. package/loading-page-CoXtqoc9.js +0 -4
  155. package/loading-page-DbLuqCHa.js +0 -1
  156. package/loading-page-f8D03l3G.js +0 -4
  157. package/loading-plane-CgfbWppy.js +0 -1
  158. package/loading-plane-CoXtqoc9.js +0 -4
  159. package/loading-table-Bdr9ZhtP.js +0 -1
  160. package/loading-table-ByUoWqUo.js +0 -4
  161. package/loading-table-BygEMzFM.js +0 -4
  162. package/loading-table-BzrSQlA0.js +0 -1
  163. package/loading-table-D9bw9OcI.js +0 -4
  164. package/loading-table-chOgXi94.js +0 -1
  165. package/main.d.ts +0 -2
  166. package/no-data-CTKux8RI.js +0 -4
  167. package/no-data-Cgze_Rvp.js +0 -1
  168. package/no-data-DLHO1L_u.js +0 -4
  169. package/no-data-Dep79CBh.js +0 -1
  170. package/no-data-g0dJCy2p.js +0 -4
  171. package/no-data-y1X5WtcQ.js +0 -1
  172. package/plugins/i18n-extension.d.ts +0 -4
  173. package/style.css +0 -1
  174. package/types/options.type.d.ts +0 -16
  175. package/utils/getSeverityByAssetStatus.util.d.ts +0 -3
  176. package/utils/index.d.ts +0 -22
  177. package/utils/listenSidebarChanges.util.d.ts +0 -11
  178. package/wangsvue-fats.es.js +0 -133302
  179. package/wangsvue-fats.system.js +0 -489
@@ -1,24 +1,42 @@
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
16
  all: EventHandlerMap<Events>;
9
- on<Key extends keyof Events>(type: Key, handler: Handler<Events[Key]>): void;
17
+ on<Key extends keyof Events>(
18
+ type: Key,
19
+ handler: Handler<Events[Key]>,
20
+ ): void;
10
21
  on(type: '*', handler: WildcardHandler<Events>): void;
11
- off<Key extends keyof Events>(type: Key, handler?: Handler<Events[Key]>): void;
22
+ off<Key extends keyof Events>(
23
+ type: Key,
24
+ handler?: Handler<Events[Key]>,
25
+ ): void;
12
26
  off(type: '*', handler: WildcardHandler<Events>): void;
13
27
  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;
28
+ emit<Key extends keyof Events>(
29
+ type: undefined extends Events[Key] ? Key : never,
30
+ ): void;
15
31
  }
16
32
  /**
17
33
  * Mitt: Tiny (~200b) functional event emitter / pubsub.
18
34
  * @name mitt
19
35
  * @returns {Mitt}
20
36
  */
21
- export default function mitt<Events extends Record<EventType, unknown>>(all?: EventHandlerMap<Events>): Emitter<Events>;
37
+ export default function mitt<Events extends Record<EventType, unknown>>(
38
+ all?: EventHandlerMap<Events>,
39
+ ): Emitter<Events>;
22
40
  declare global {
23
41
  interface Window {
24
42
  eventBus: Emitter<any>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fewangsit/wangsvue-fats",
3
- "version": "1.0.0-alpha.20",
3
+ "version": "1.0.0-alpha.22",
4
4
  "author": "fewangsit",
5
5
  "description": "Admin Console Tagsamurai VueJS Component Library",
6
6
  "type": "module",
@@ -1,32 +1,53 @@
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';
2
+ import {
3
+ FieldWrapperLocaleConfig,
4
+ FieldWrapperProps,
5
+ } from '../components/fieldwrapper/FieldWrapper.vue.d';
6
+ import {
7
+ InputTextLocaleConfig,
8
+ InputTextProps,
9
+ } from '../components/inputtext/InputText.vue.d';
5
10
  import { TreeProps } from '../components/tree/Tree.vue.d';
6
11
  import { DialogConfirmLocaleConfig } from '../components/dialogconfirm/DialogConfirm.vue.d';
7
12
  import { CustomColumnLocaleConfig } from '../components/customcolumn/CustomColumn.vue.d';
8
13
  import { ButtonSearchLocaleConfig } from '../components/buttonsearch/ButtonSearch.vue.d';
9
14
  import { FilterContainerLocaleConfig } from '../components/filtercontainer/FilterContainer.vue.d';
10
15
  import { MultiSelectLocaleConfig } from '../components/multiselect/MultiSelect.vue.d';
11
- import { DropdownLocaleConfig, DropdownProps } from '../components/dropdown/Dropdown.vue.d';
16
+ import {
17
+ DropdownLocaleConfig,
18
+ DropdownProps,
19
+ } from '../components/dropdown/Dropdown.vue.d';
12
20
  import { InputCurrencyLocaleConfig } from '../components/inputcurrency/InputCurrency.vue.d';
13
21
  import { TextareaLocaleConfig } from '../components/textarea/Textarea.vue.d';
14
22
  import { InputrangeNumberLocaleConfig } from '../components/inputrangenumber/InputRangeNumber.vue.d';
15
23
  import { DialogFormLocaleConfig } from '../components/dialogform/DialogForm.vue.d';
16
24
  import { InputPhoneNumberLocaleConfig } from '../components/inputphonenumber/InputPhoneNumber.vue.d';
17
25
  import { InputNumberLocaleConfig } from '../components/inputnumber/InputNumber.vue.d';
18
- import { CalendarLocaleConfig, CalendarPresetOptions } from '../components/calendar/Calendar.vue.d';
26
+ import {
27
+ CalendarLocaleConfig,
28
+ CalendarPresetOptions,
29
+ } from '../components/calendar/Calendar.vue.d';
19
30
  import { OverlayPanelPassThroughOptions } from '../components/overlaypanel/OverlayPanel.vue.d';
20
31
  import { InputURLProps } from '../components/inputurl/InputURL.vue.d';
21
32
  import { InputEmailProps } from '../components/inputemail/InputEmail.vue.d';
22
33
  import { ImageProps } from '../components/image/Image.vue.d';
23
34
  import { MenuLocaleConfig } from '../components/menu/Menu.vue.d';
24
- import { ButtonBulkActionLocaleConfig, ButtonBulkActionProps } from '../components/buttonbulkaction/ButtonBulkAction.vue.d';
35
+ import {
36
+ ButtonBulkActionLocaleConfig,
37
+ ButtonBulkActionProps,
38
+ } from '../components/buttonbulkaction/ButtonBulkAction.vue.d';
25
39
  import { AnimationDefaultConfig } from '../components/animation/Animation.vue.d';
26
40
  import { LoadingPresetOptions } from '../components/loading/Loading.vue.d';
27
- import { DataTableLocaleConfig, DataTableProps } from '../components/datatable/DataTable.vue.d';
41
+ import {
42
+ DataTableLocaleConfig,
43
+ DataTableProps,
44
+ } from '../components/datatable/DataTable.vue.d';
28
45
  import { BadgeComponentConfigs } from '../components/badge/Badge.vue.d';
29
- import { UserNameComponentConfigs, UserNameLocaleConfig, UserNamePresetOptions } from '../components/username/UserName.vue.d';
46
+ import {
47
+ UserNameComponentConfigs,
48
+ UserNameLocaleConfig,
49
+ UserNamePresetOptions,
50
+ } from '../components/username/UserName.vue.d';
30
51
  import { ImageCompressorLocaleConfig } from '../components/imagecompressor/ImageCompressor.vue.d';
31
52
  import { UseToastConfig } from '../utils';
32
53
  /**
@@ -69,7 +90,7 @@ interface ComponentLocaleConfig {
69
90
  ImageCompressor?: ImageCompressorLocaleConfig;
70
91
  }
71
92
  export interface LocaleConfig {
72
- global: Partial<PrimeVueLocaleOptions>;
93
+ global: typeof DEFAULT_GLOBAL_LOCALE_CONFIG;
73
94
  components: ComponentLocaleConfig;
74
95
  }
75
96
  export interface ComponentPresetOptions {
@@ -79,9 +100,17 @@ export interface ComponentPresetOptions {
79
100
  username: UserNamePresetOptions;
80
101
  [key: string]: any;
81
102
  }
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) & {
103
+ export type WangsVueComponentConfig<
104
+ ComponentName extends
105
+ | keyof ComponentDefaultPropsConfig
106
+ | keyof ComponentLocaleConfig,
107
+ > = {
108
+ defaultProps: ComponentName extends keyof ComponentDefaultPropsConfig
109
+ ? ComponentDefaultPropsConfig[ComponentName]
110
+ : undefined;
111
+ locale: (ComponentName extends keyof ComponentLocaleConfig
112
+ ? ComponentLocaleConfig[ComponentName]
113
+ : undefined) & {
85
114
  global: LocaleConfig['global'];
86
115
  };
87
116
  };
@@ -110,18 +139,157 @@ export interface WangsVueOptions {
110
139
  }
111
140
  export interface WangsVueInstance {
112
141
  config: WangsVueOptions;
113
- getComponentConfig<ComponentName extends keyof ComponentDefaultPropsConfig | keyof ComponentLocaleConfig>(componentName: ComponentName): WangsVueComponentConfig<ComponentName>;
142
+ getComponentConfig<
143
+ ComponentName extends
144
+ | keyof ComponentDefaultPropsConfig
145
+ | keyof ComponentLocaleConfig,
146
+ >(
147
+ componentName: ComponentName,
148
+ ): WangsVueComponentConfig<ComponentName>;
114
149
  }
150
+ declare const DEFAULT_GLOBAL_LOCALE_CONFIG: {
151
+ startsWith: string;
152
+ contains: string;
153
+ notContains: string;
154
+ endsWith: string;
155
+ equals: string;
156
+ notEquals: string;
157
+ noFilter: string;
158
+ lt: string;
159
+ lte: string;
160
+ gt: string;
161
+ gte: string;
162
+ dateIs: string;
163
+ dateIsNot: string;
164
+ dateBefore: string;
165
+ dateAfter: string;
166
+ clear: string;
167
+ apply: string;
168
+ matchAll: string;
169
+ matchAny: string;
170
+ addRule: string;
171
+ removeRule: string;
172
+ accept: string;
173
+ reject: string;
174
+ choose: string;
175
+ upload: string;
176
+ cancel: string;
177
+ completed: string;
178
+ pending: string;
179
+ fileSizeTypes: string[];
180
+ monthNames: string[];
181
+ monthNamesShort: string[];
182
+ dayNames: string[];
183
+ dayNamesShort: string[];
184
+ dayNamesMin: string[];
185
+ chooseYear: string;
186
+ chooseMonth: string;
187
+ chooseDate: string;
188
+ prevDecade: string;
189
+ nextDecade: string;
190
+ prevYear: string;
191
+ nextYear: string;
192
+ prevMonth: string;
193
+ nextMonth: string;
194
+ prevHour: string;
195
+ nextHour: string;
196
+ prevMinute: string;
197
+ nextMinute: string;
198
+ prevSecond: string;
199
+ nextSecond: string;
200
+ pm: string;
201
+ am: string;
202
+ today: string;
203
+ weekHeader: string;
204
+ firstDayOfWeek: number;
205
+ showMonthAfterYear: boolean;
206
+ dateFormat: string;
207
+ weak: string;
208
+ medium: string;
209
+ strong: string;
210
+ passwordPrompt: string;
211
+ emptyFilterMessage: string;
212
+ searchMessage: string;
213
+ selectionMessage: string;
214
+ emptySelectionMessage: string;
215
+ emptySearchMessage: string;
216
+ emptyMessage: string;
217
+ aria: {
218
+ trueLabel: string;
219
+ falseLabel: string;
220
+ nullLabel: string;
221
+ star: string;
222
+ stars: string;
223
+ selectAll: string;
224
+ unselectAll: string;
225
+ close: string;
226
+ previous: string;
227
+ next: string;
228
+ navigation: string;
229
+ scrollTop: string;
230
+ moveTop: string;
231
+ moveUp: string;
232
+ moveDown: string;
233
+ moveBottom: string;
234
+ moveToTarget: string;
235
+ moveToSource: string;
236
+ moveAllToTarget: string;
237
+ moveAllToSource: string;
238
+ pageLabel: string;
239
+ firstPageLabel: string;
240
+ lastPageLabel: string;
241
+ nextPageLabel: string;
242
+ prevPageLabel: string;
243
+ rowsPerPageLabel: string;
244
+ jumpToPageDropdownLabel: string;
245
+ jumpToPageInputLabel: string;
246
+ selectRow: string;
247
+ unselectRow: string;
248
+ expandRow: string;
249
+ collapseRow: string;
250
+ showFilterMenu: string;
251
+ hideFilterMenu: string;
252
+ filterOperator: string;
253
+ filterConstraint: string;
254
+ editRow: string;
255
+ saveEdit: string;
256
+ cancelEdit: string;
257
+ listView: string;
258
+ gridView: string;
259
+ slide: string;
260
+ slideNumber: string;
261
+ zoomImage: string;
262
+ zoomIn: string;
263
+ zoomOut: string;
264
+ rotateRight: string;
265
+ rotateLeft: string;
266
+ listLabel: string;
267
+ };
268
+ };
115
269
  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;
270
+ export declare const useWangsVueConfig: <
271
+ T extends
272
+ | (keyof ComponentDefaultPropsConfig | keyof ComponentLocaleConfig)
273
+ | undefined,
274
+ >(
275
+ componentName?: T,
276
+ ) => T extends keyof ComponentDefaultPropsConfig | keyof ComponentLocaleConfig
277
+ ? WangsVueComponentConfig<T>
278
+ : WangsVueOptions;
279
+ export declare const mergeWangsVueConfig: (
280
+ baseConfig: WangsVueOptions,
281
+ overrideConfig: Partial<WangsVueOptions>,
282
+ ) => WangsVueOptions;
118
283
  /**
119
284
  *
120
285
  * @param predefinedOptions
121
286
  * @param mergeConfig Wether merge predefined config with defualt config @default true
122
287
  * @returns
123
288
  */
124
- declare const createWangsVuePlugin: (predefinedOptions?: Partial<WangsVueOptions>, mergeConfig?: boolean) => Plugin<Partial<WangsVueOptions>>;
289
+ declare const createWangsVuePlugin: (
290
+ predefinedOptions?: Partial<WangsVueOptions>,
291
+ mergeConfig?: boolean,
292
+ ) => Plugin<Partial<WangsVueOptions>>;
125
293
  export default createWangsVuePlugin;
126
294
  declare module 'vue' {
127
295
  interface ComponentCustomProperties {
@@ -1,5 +1,10 @@
1
1
  import { MaybeRef, MaybeRefOrGetter } from 'vue';
2
- import { FormContext as VeeFormContext, FieldContext, RuleExpression, FieldOptions } from 'vee-validate';
2
+ import {
3
+ FormContext as VeeFormContext,
4
+ FieldContext,
5
+ RuleExpression,
6
+ FieldOptions,
7
+ } from 'vee-validate';
3
8
  export interface FormContext<T> {
4
9
  values: T;
5
10
  handleSubmit: VeeFormContext['handleSubmit'];
@@ -7,4 +12,8 @@ export interface FormContext<T> {
7
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>;
package/plugins/i18n.d.ts CHANGED
@@ -1,7 +1,21 @@
1
1
  import { App, Ref } from 'vue';
2
2
  import { AxiosResponse } from 'axios';
3
- import { LanguageOption } from '../components/languagedropdown/LanguageDropdown.vue.d';
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
20
  /**
7
21
  * Locale message translation
@@ -42,9 +56,11 @@ export interface I18nService {
42
56
  * @param locale The locale code (e.g., 'en', 'id').
43
57
  * @returns A promise resolving to a key-value record of messages.
44
58
  */
45
- getMessages(locale: string): Promise<AxiosResponse<{
46
- data: MessageMap;
47
- }>>;
59
+ getMessages(locale: string): Promise<
60
+ AxiosResponse<{
61
+ data: MessageMap;
62
+ }>
63
+ >;
48
64
  /**
49
65
  * Fetch all available lang options for LanguageDropdown and LanguageSwitcher
50
66
  *
@@ -70,7 +86,9 @@ export declare const useI18n: () => I18n;
70
86
  declare const i18n: {
71
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
94
  interface ComponentCustomProperties {
@@ -1,4 +1,17 @@
1
- export type FileType = 'link' | 'image' | 'txt' | 'doc' | 'xls' | 'pdf' | 'csv' | 'html' | 'json' | 'mp4' | 'mkv' | 'compressed' | 'unknown';
1
+ export type FileType =
2
+ | 'link'
3
+ | 'image'
4
+ | 'txt'
5
+ | 'doc'
6
+ | 'xls'
7
+ | 'pdf'
8
+ | 'csv'
9
+ | 'html'
10
+ | 'json'
11
+ | 'mp4'
12
+ | 'mkv'
13
+ | 'compressed'
14
+ | 'unknown';
2
15
  export type FormattedFile = {
3
16
  name: string;
4
17
  type: string;
@@ -32,7 +45,10 @@ export declare const formatFile: (file: File) => FormattedFile;
32
45
  * @param customFileSize The maximum size limit in megabytes. @default 1
33
46
  * @returns True if the file is under the maximum size limit, false otherwise.
34
47
  */
35
- export declare const validateFileSize: (file: File, customFileSize?: number) => boolean;
48
+ export declare const validateFileSize: (
49
+ file: File,
50
+ customFileSize?: number,
51
+ ) => boolean;
36
52
  /**
37
53
  * Checks if a file has a valid type.
38
54
  * Make sure user doesn't upload a folder.
@@ -1,8 +1,34 @@
1
- export type TDateFormat = 'd/m/yy' | 'm/d/yy' | 'd/mm/yy' | 'dd/mm/yy' | 'dd/mm/yyyy' | 'dd M yy' | 'dd M yyyy' | 'dd MM yy' | 'dd MM yyyy' | 'D dd M yy' | 'D dd M yyyy' | 'DD dd MM yy' | 'DD dd MM yyyy' | 'D, dd M yy' | 'D, dd M yyyy' | 'DD, dd MM yy' | 'DD, dd MM yyyy';
2
- export type GoDateLayout = '02/01/06' | '_2/_1/06' | '_1/_2/06' | '02 Jan 06' | 'Mon, 02 Jan 06' | 'Mon, 02 Jan 2006';
1
+ export type TDateFormat =
2
+ | 'd/m/yy'
3
+ | 'm/d/yy'
4
+ | 'd/mm/yy'
5
+ | 'dd/mm/yy'
6
+ | 'dd/mm/yyyy'
7
+ | 'dd M yy'
8
+ | 'dd M yyyy'
9
+ | 'dd MM yy'
10
+ | 'dd MM yyyy'
11
+ | 'D dd M yy'
12
+ | 'D dd M yyyy'
13
+ | 'DD dd MM yy'
14
+ | 'DD dd MM yyyy'
15
+ | 'D, dd M yy'
16
+ | 'D, dd M yyyy'
17
+ | 'DD, dd MM yy'
18
+ | 'DD, dd MM yyyy';
19
+ export type GoDateLayout =
20
+ | '02/01/06'
21
+ | '_2/_1/06'
22
+ | '_1/_2/06'
23
+ | '02 Jan 06'
24
+ | 'Mon, 02 Jan 06'
25
+ | 'Mon, 02 Jan 2006';
3
26
  export type TTimeFormat = 'HH:mm' | 'HH:mm a' | 'HH:mm:ss' | 'HH:mm:ss a';
4
27
  export type GoTimeLayout = '15:04' | '03:04 PM' | '15:04:05' | '03:04:05 PM';
5
- export type CustomDateTimeFormatOptions = Omit<Intl.DateTimeFormatOptions, 'timeZone'> & {
28
+ export type CustomDateTimeFormatOptions = Omit<
29
+ Intl.DateTimeFormatOptions,
30
+ 'timeZone'
31
+ > & {
6
32
  timezone?: string;
7
33
  locale?: string;
8
34
  };
@@ -37,7 +63,10 @@ export declare const formatISODate: (date: string | Date) => string;
37
63
  * @param maxSeconds - Max value of seconds difference. Use it for formats a date according to the user's general settings.
38
64
  * @returns The formatted date string.
39
65
  */
40
- export declare const formatDateReadable: (date: Date, maxSeconds?: number) => string;
66
+ export declare const formatDateReadable: (
67
+ date: Date,
68
+ maxSeconds?: number,
69
+ ) => string;
41
70
  export declare const getRemainingTime: (deadline: string) => {
42
71
  seconds: number;
43
72
  days: number;
@@ -1,3 +1,5 @@
1
- import { DropdownOption } from '../types/options.type';
2
- declare const filterOptions: (options?: DropdownOption[] | string[]) => DropdownOption[] | string[];
1
+ import { Option } from '../components/dropdown/Dropdown.vue.d';
2
+ declare const filterOptions: (
3
+ options?: Option[] | string[],
4
+ ) => Option[] | string[];
3
5
  export default filterOptions;
@@ -1,8 +1,13 @@
1
1
  export declare const genRandomPlaceholderBg: () => string;
2
- export declare const genPlaceholder: (text: string, size: 30 | 125, bgColor?: string, fontOptions?: {
3
- font?: string;
4
- fontWeight?: string;
5
- fontSize?: number;
6
- fontColor?: string;
7
- }) => HTMLCanvasElement;
2
+ export declare const genPlaceholder: (
3
+ text: string,
4
+ size: 30 | 125,
5
+ bgColor?: string,
6
+ fontOptions?: {
7
+ font?: string;
8
+ fontWeight?: string;
9
+ fontSize?: number;
10
+ fontColor?: string;
11
+ },
12
+ ) => HTMLCanvasElement;
8
13
  export default genPlaceholder;
@@ -17,4 +17,7 @@
17
17
  * const mergedProps = mergePropsWithDefaults(defaultProps, props);
18
18
  * console.log(mergedProps); // Output: { showOptionalText: true, tooltipPos: 'bottom' }
19
19
  */
20
- export default function mergePropsWithDefaults<T extends Record<string, any>>(props: Record<string, any>, defaultProps: T): T;
20
+ export default function mergePropsWithDefaults<T extends Record<string, any>>(
21
+ props: Record<string, any>,
22
+ defaultProps: T,
23
+ ): T;
@@ -1,14 +1,25 @@
1
1
  /**
2
2
  * Utility function to get nested property value.
3
3
  */
4
- export declare const getNestedPropertyValue: (obj: Record<string, any>, path: string) => any;
4
+ export declare const getNestedPropertyValue: (
5
+ obj: Record<string, any>,
6
+ path: string,
7
+ ) => any;
5
8
  /**
6
9
  * Utility function to set nested property value.
7
10
  */
8
- export declare const setNestedPropertyValue: (obj: Record<string, any>, path: string, value: any) => void;
11
+ export declare const setNestedPropertyValue: (
12
+ obj: Record<string, any>,
13
+ path: string,
14
+ value: any,
15
+ ) => void;
9
16
  export declare const isEmptyObject: (obj: object) => boolean;
10
17
  export declare const deepEquals: (a: object, b: object) => boolean;
11
- export declare const equals: (obj1: object, obj2: object, field?: string) => boolean;
18
+ export declare const equals: (
19
+ obj1: object,
20
+ obj2: object,
21
+ field?: string,
22
+ ) => boolean;
12
23
  export declare const resolveFieldData: (data: object, field?: string) => object;
13
24
  export declare const contains: (value: object, list: object[]) => boolean;
14
25
  export declare const isNotEmpty: (value: object) => boolean;
@@ -1,33 +1,6 @@
1
1
  import { NavigationGuardNext, RouteLocationNormalized } from 'vue-router';
2
- export * from '.././utils';
3
- export type TransactionRole = {
4
- manager: boolean;
5
- monitoringReport: boolean;
6
- staff: boolean;
7
- approver: boolean;
8
- };
9
- export type SystemRole = {
10
- create: boolean;
11
- view: boolean;
12
- update: boolean;
13
- delete: boolean;
14
- };
15
- export type SystemRoleAttribute = 'importData' | 'assetAttribute' | 'assetPolicies' | 'depreciationGroup' | 'depreciationMethod' | 'documentDeletion' | 'group' | 'iotReader' | 'license' | 'purchaseDocument' | 'purchaseInformation' | 'userAndRole' | 'tag' | 'tagType' | 'registerAsset';
16
- export type TransactionAttribute = 'borrowingRole' | 'assignmentRole' | 'disposalRole' | 'transferRole' | 'auditRole' | 'maintenanceRole' | 'repairRole' | 'trackingRole' | 'damagedRole' | 'missingRole';
17
- export interface UserLogin {
18
- transactionRoles: Record<TransactionAttribute, TransactionRole>;
19
- systemRoles: Record<SystemRoleAttribute, SystemRole>;
20
- userType: 'Admin' | 'Basic';
21
- }
22
- declare const getTransactionRole: (name: keyof UserLogin["transactionRoles"]) => TransactionRole;
23
- declare const getSystemRole: (name: keyof UserLogin["systemRoles"]) => SystemRole;
24
- declare const hasSystemRole: (name: SystemRoleAttribute) => boolean;
25
- declare const hasTransactionRole: (name: TransactionAttribute) => boolean;
26
- declare const hasManagerRole: (name: TransactionAttribute) => boolean;
27
- declare const hasAnyManagerRole: () => boolean;
28
- declare const hasAnyMonitoringReportRole: () => boolean;
29
- declare const hasStaffRole: (name: TransactionAttribute) => boolean;
30
- declare const hasMonitoringReportRole: (name: TransactionAttribute) => boolean;
31
- declare const hasApprovalRole: (name: TransactionAttribute) => boolean;
32
- declare const checkRouteAccess: (to: RouteLocationNormalized, from: RouteLocationNormalized, next: NavigationGuardNext) => void;
33
- export { getTransactionRole, getSystemRole, hasTransactionRole, hasApprovalRole, hasSystemRole, checkRouteAccess, hasManagerRole, hasAnyManagerRole, hasMonitoringReportRole, hasAnyMonitoringReportRole, hasStaffRole, };
2
+ export declare const checkRouteAccess: (
3
+ to: RouteLocationNormalized,
4
+ from: RouteLocationNormalized,
5
+ next: NavigationGuardNext,
6
+ ) => void;
@@ -1,7 +1,19 @@
1
1
  export declare const formatUserName: (name?: string) => string;
2
- export declare const getInititalName: (existing: string[], fullName?: string, maxLength?: number) => string;
3
- export declare const getInitialsByConsonant: (existingInitials: string[], fullName: string, maxLength: number) => string;
4
- export declare const getInitialsBy3FirstLetter: (existingInitials: string[], fullName: string, maxLength: number) => string;
2
+ export declare const getInititalName: (
3
+ existing: string[],
4
+ fullName?: string,
5
+ maxLength?: number,
6
+ ) => string;
7
+ export declare const getInitialsByConsonant: (
8
+ existingInitials: string[],
9
+ fullName: string,
10
+ maxLength: number,
11
+ ) => string;
12
+ export declare const getInitialsBy3FirstLetter: (
13
+ existingInitials: string[],
14
+ fullName: string,
15
+ maxLength: number,
16
+ ) => string;
5
17
  /**
6
18
  * Formats the label with the appropriate article ("a" or "an") based on its vowel sound.
7
19
  * This function checks if the label starts with a vowel or has a special case for silent "h" words.