@fewangsit/wangsvue-fats 1.0.0-alpha.3 → 1.0.0-alpha.31

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 (160) hide show
  1. package/event-bus/index.d.ts +3 -1
  2. package/package.json +1 -1
  3. package/plugins/WangsVue.d.ts +120 -2
  4. package/plugins/i18n.d.ts +94 -0
  5. package/utils/filterOptions.util.d.ts +2 -2
  6. package/assets/json/currencies.json.d.ts +0 -1068
  7. package/assets/json/supported-official-langs.json.d.ts +0 -530
  8. package/assets/lottie/admin/loading-page.lottie +0 -0
  9. package/assets/lottie/admin/loading-table.lottie +0 -0
  10. package/assets/lottie/admin/no-data.lottie +0 -0
  11. package/assets/lottie/supplyasset/loading-page.lottie +0 -0
  12. package/assets/lottie/supplyasset/loading-table.lottie +0 -0
  13. package/assets/lottie/supplyasset/no-data.lottie +0 -0
  14. package/assets/lottie/workspace/loading-page.lottie +0 -0
  15. package/assets/lottie/workspace/loading-plane.lottie +0 -0
  16. package/assets/lottie/workspace/loading-table.lottie +0 -0
  17. package/assets/lottie/workspace/no-data.lottie +0 -0
  18. package/build-entry.d.ts +0 -14
  19. package/components/animation/Animation.vue.d.ts +0 -24
  20. package/components/approverinfo/ApproverInfo.vue.d.ts +0 -51
  21. package/components/badge/Badge.vue.d.ts +0 -73
  22. package/components/badgegroup/BadgeGroup.vue.d.ts +0 -52
  23. package/components/basecomponent/index.d.ts +0 -28
  24. package/components/basetree/BaseTree.vue.d.ts +0 -591
  25. package/components/basetree/TreeNode.vue.d.ts +0 -35
  26. package/components/breadcrumb/Breadcrumb.vue.d.ts +0 -26
  27. package/components/button/Button.vue.d.ts +0 -185
  28. package/components/buttonImportExcel/ButtonImportExcel.vue.d.ts +0 -35
  29. package/components/buttonbulkaction/ButtonBulkAction.vue.d.ts +0 -104
  30. package/components/buttoncopy/ButtonCopy.vue.d.ts +0 -26
  31. package/components/buttondownload/ButtonDownload.vue.d.ts +0 -49
  32. package/components/buttonfilter/ButtonFilter.vue.d.ts +0 -12
  33. package/components/buttonradio/ButtonRadio.vue.d.ts +0 -257
  34. package/components/buttonsearch/ButtonSearch.vue.d.ts +0 -38
  35. package/components/buttonselecttree/ButtonSelectTree.vue.d.ts +0 -198
  36. package/components/buttonsplit/ButtonSplit.d.ts +0 -350
  37. package/components/buttonsplit/ButtonSplit.vue.d.ts +0 -34
  38. package/components/buttontoggle/ButtonToggle.vue.d.ts +0 -18
  39. package/components/calendar/BaseCalendar.vue.d.ts +0 -86
  40. package/components/calendar/Calendar.vue.d.ts +0 -570
  41. package/components/card/Card.vue.d.ts +0 -139
  42. package/components/checkbox/Checkbox.vue.d.ts +0 -329
  43. package/components/codesnippet/CodeSnippet.vue.d.ts +0 -14
  44. package/components/customcolumn/ColumnList.vue.d.ts +0 -27
  45. package/components/customcolumn/CustomColumn.vue.d.ts +0 -37
  46. package/components/customcolumn/helpers/setVisibilityColumn.helper.d.ts +0 -12
  47. package/components/datatable/DataTable.vue.d.ts +0 -735
  48. package/components/datatable/MultiRow.vue.d.ts +0 -16
  49. package/components/datatable/helpers/adjustMenuPosition.helper.d.ts +0 -1
  50. package/components/datatable/helpers/filter.helper.d.ts +0 -28
  51. package/components/datatable/helpers/index.d.ts +0 -3
  52. package/components/datatable/helpers/readConfig.helper.d.ts +0 -2
  53. package/components/datatable/store/dataTable.store.d.ts +0 -22
  54. package/components/dialog/Dialog.vue.d.ts +0 -464
  55. package/components/dialogconfirm/DialogConfirm.vue.d.ts +0 -164
  56. package/components/dialogform/DialogForm.vue.d.ts +0 -349
  57. package/components/dialogselecttree/DialogSelectTree.vue.d.ts +0 -136
  58. package/components/dropdown/Dropdown.vue.d.ts +0 -264
  59. package/components/editor/CodeSnippetAdapter.vue.d.ts +0 -92
  60. package/components/editor/Editor.vue.d.ts +0 -191
  61. package/components/editor/EditorButton.vue.d.ts +0 -15
  62. package/components/editor/MentionList.vue.d.ts +0 -35
  63. package/components/editor/MentionSection.vue.d.ts +0 -92
  64. package/components/editor/codeSnippetExtension.d.ts +0 -3
  65. package/components/editor/mentionSectionExtension.d.ts +0 -3
  66. package/components/editor/suggestion.d.ts +0 -2
  67. package/components/fieldwrapper/FieldWrapper.vue.d.ts +0 -69
  68. package/components/fileupload/FileUpload.vue.d.ts +0 -169
  69. package/components/filtercontainer/FilterContainer.vue.d.ts +0 -181
  70. package/components/filtercontainer/helpers/applyFilter.helper.d.ts +0 -5
  71. package/components/filtercontainer/helpers/formatDateTimeRange.helper.d.ts +0 -7
  72. package/components/filtercontainer/helpers/getOption.helper.d.ts +0 -3
  73. package/components/form/Form.vue.d.ts +0 -316
  74. package/components/gallerypreview/GalleryPreview.vue.d.ts +0 -31
  75. package/components/helpers/convertToArrayClass.helper.d.ts +0 -2
  76. package/components/helpers/index.d.ts +0 -2
  77. package/components/helpers/label.d.ts +0 -15
  78. package/components/icon/Icon.vue.d.ts +0 -256
  79. package/components/image/Image.vue.d.ts +0 -403
  80. package/components/imagecompressor/BackgroundImageCropper.vue.d.ts +0 -36
  81. package/components/imagecompressor/ImageCompressor.vue.d.ts +0 -223
  82. package/components/imagecompressor/ImageInputInfo.vue.d.ts +0 -30
  83. package/components/index.d.ts +0 -63
  84. package/components/inlinemessage/InlineMessage.vue.d.ts +0 -167
  85. package/components/inputbadge/InputBadge.vue.d.ts +0 -122
  86. package/components/inputcurrency/InputCurrency.vue.d.ts +0 -170
  87. package/components/inputcurrency/helpers/currency.helper.d.ts +0 -4
  88. package/components/inputemail/InputEmail.vue.d.ts +0 -25
  89. package/components/inputgroup/InputGroup.vue.d.ts +0 -141
  90. package/components/inputnumber/InputNumber.vue.d.ts +0 -282
  91. package/components/inputpassword/InputPassword.vue.d.ts +0 -32
  92. package/components/inputphonenumber/InputPhoneNumber.vue.d.ts +0 -99
  93. package/components/inputphonenumber/helpers/getUserLocation.helper.d.ts +0 -8
  94. package/components/inputrangenumber/InputRangeNumber.vue.d.ts +0 -120
  95. package/components/inputtext/InputText.vue.d.ts +0 -352
  96. package/components/inputurl/InputURL.vue.d.ts +0 -39
  97. package/components/invisiblefield/InvisibleField.vue.d.ts +0 -36
  98. package/components/languagedropdown/LanguageDropdown.vue.d.ts +0 -50
  99. package/components/languagedropdown/LanguageDropdownOption.vue.d.ts +0 -18
  100. package/components/languageswitcher/LanguageSwitcher.vue.d.ts +0 -15
  101. package/components/litedropdown/LiteDropdown.vue.d.ts +0 -96
  102. package/components/loading/Loading.vue.d.ts +0 -47
  103. package/components/loading/store/loading.store.d.ts +0 -8
  104. package/components/menu/Menu.vue.d.ts +0 -390
  105. package/components/menu/helpers/filterMenu.helper.d.ts +0 -12
  106. package/components/menu/helpers/index.d.ts +0 -1
  107. package/components/menuitem/MenuItem.vue.d.ts +0 -19
  108. package/components/menuitem/index.d.ts +0 -106
  109. package/components/multiselect/MultiSelect.vue.d.ts +0 -192
  110. package/components/overlaypanel/OverlayPanel.vue.d.ts +0 -301
  111. package/components/passthrough/index.d.ts +0 -16
  112. package/components/progressbar/ProgressBar.vue.d.ts +0 -72
  113. package/components/quickfilter/QuickFilter.vue.d.ts +0 -25
  114. package/components/tabmenu/TabMenu.vue.d.ts +0 -288
  115. package/components/textarea/Textarea.vue.d.ts +0 -170
  116. package/components/timeline/Timeline.vue.d.ts +0 -115
  117. package/components/timeline/TimelineContentByType.vue.d.ts +0 -16
  118. package/components/toast/Toast.vue.d.ts +0 -367
  119. package/components/toggleswitch/ToggleSwitch.vue.d.ts +0 -281
  120. package/components/tooltipspan/TooltipSpan.vue.d.ts +0 -20
  121. package/components/tree/Tree.vue.d.ts +0 -148
  122. package/components/tree/helpers/filterNodeKeys.helper.d.ts +0 -16
  123. package/components/tree/helpers/flattenTreeNodeChildren.helper.d.ts +0 -6
  124. package/components/tree/helpers/index.d.ts +0 -3
  125. package/components/treesearchinput/TreeSearchInput.vue.d.ts +0 -16
  126. package/components/ts-helpers.d.ts +0 -83
  127. package/components/usergroup/UserGroup.vue.d.ts +0 -57
  128. package/components/username/UserName.vue.d.ts +0 -113
  129. package/components/validatormessage/ValidatorMessage.vue.d.ts +0 -12
  130. package/config/defaultProps.d.ts +0 -3
  131. package/config/index.d.ts +0 -3
  132. package/config/locale.d.ts +0 -3
  133. package/loading-page-BrQattYE.js +0 -1
  134. package/loading-page-CgfbWppy.js +0 -1
  135. package/loading-page-CoC9UhfC.js +0 -4
  136. package/loading-page-CoXtqoc9.js +0 -4
  137. package/loading-page-DbLuqCHa.js +0 -1
  138. package/loading-page-f8D03l3G.js +0 -4
  139. package/loading-plane-CgfbWppy.js +0 -1
  140. package/loading-plane-CoXtqoc9.js +0 -4
  141. package/loading-table-Bdr9ZhtP.js +0 -1
  142. package/loading-table-ByUoWqUo.js +0 -4
  143. package/loading-table-BygEMzFM.js +0 -4
  144. package/loading-table-BzrSQlA0.js +0 -1
  145. package/loading-table-D9bw9OcI.js +0 -4
  146. package/loading-table-chOgXi94.js +0 -1
  147. package/main.d.ts +0 -2
  148. package/no-data-CTKux8RI.js +0 -4
  149. package/no-data-Cgze_Rvp.js +0 -1
  150. package/no-data-DLHO1L_u.js +0 -4
  151. package/no-data-Dep79CBh.js +0 -1
  152. package/no-data-g0dJCy2p.js +0 -4
  153. package/no-data-y1X5WtcQ.js +0 -1
  154. package/plugins/translation.d.ts +0 -84
  155. package/style.css +0 -1
  156. package/types/options.type.d.ts +0 -16
  157. package/utils/index.d.ts +0 -20
  158. package/utils/role.util.d.ts +0 -2
  159. package/wangsvue-fats.es.js +0 -132744
  160. package/wangsvue-fats.system.js +0 -489
@@ -48,7 +48,9 @@ export type Events<CustomEvents = Record<string, any>> = CustomEvents & {
48
48
  'toast:add': ToastParams;
49
49
  'tree:update-tree-nodes': unknown;
50
50
  'tree:tree-updated': unknown;
51
- 'tree:selection-changed': unknown;
51
+ 'tree:selection-changed': {
52
+ keys: string;
53
+ };
52
54
  'overlay:show': {
53
55
  overlayId: number;
54
56
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fewangsit/wangsvue-fats",
3
- "version": "1.0.0-alpha.3",
3
+ "version": "1.0.0-alpha.31",
4
4
  "author": "fewangsit",
5
5
  "description": "Admin Console Tagsamurai VueJS Component Library",
6
6
  "type": "module",
@@ -1,5 +1,4 @@
1
1
  import { Plugin } from 'vue';
2
- import { PrimeVueLocaleOptions } from 'primevue/config';
3
2
  import { FieldWrapperLocaleConfig, FieldWrapperProps } from '../components/fieldwrapper/FieldWrapper.vue.d';
4
3
  import { InputTextLocaleConfig, InputTextProps } from '../components/inputtext/InputText.vue.d';
5
4
  import { TreeProps } from '../components/tree/Tree.vue.d';
@@ -69,7 +68,7 @@ interface ComponentLocaleConfig {
69
68
  ImageCompressor?: ImageCompressorLocaleConfig;
70
69
  }
71
70
  export interface LocaleConfig {
72
- global: Partial<PrimeVueLocaleOptions>;
71
+ global: typeof DEFAULT_GLOBAL_LOCALE_CONFIG;
73
72
  components: ComponentLocaleConfig;
74
73
  }
75
74
  export interface ComponentPresetOptions {
@@ -112,6 +111,125 @@ export interface WangsVueInstance {
112
111
  config: WangsVueOptions;
113
112
  getComponentConfig<ComponentName extends keyof ComponentDefaultPropsConfig | keyof ComponentLocaleConfig>(componentName: ComponentName): WangsVueComponentConfig<ComponentName>;
114
113
  }
114
+ declare const DEFAULT_GLOBAL_LOCALE_CONFIG: {
115
+ startsWith: string;
116
+ contains: string;
117
+ notContains: string;
118
+ endsWith: string;
119
+ equals: string;
120
+ notEquals: string;
121
+ noFilter: string;
122
+ lt: string;
123
+ lte: string;
124
+ gt: string;
125
+ gte: string;
126
+ dateIs: string;
127
+ dateIsNot: string;
128
+ dateBefore: string;
129
+ dateAfter: string;
130
+ clear: string;
131
+ apply: string;
132
+ matchAll: string;
133
+ matchAny: string;
134
+ addRule: string;
135
+ removeRule: string;
136
+ accept: string;
137
+ reject: string;
138
+ choose: string;
139
+ upload: string;
140
+ cancel: string;
141
+ completed: string;
142
+ pending: string;
143
+ fileSizeTypes: string[];
144
+ monthNames: string[];
145
+ monthNamesShort: string[];
146
+ dayNames: string[];
147
+ dayNamesShort: string[];
148
+ dayNamesMin: string[];
149
+ chooseYear: string;
150
+ chooseMonth: string;
151
+ chooseDate: string;
152
+ prevDecade: string;
153
+ nextDecade: string;
154
+ prevYear: string;
155
+ nextYear: string;
156
+ prevMonth: string;
157
+ nextMonth: string;
158
+ prevHour: string;
159
+ nextHour: string;
160
+ prevMinute: string;
161
+ nextMinute: string;
162
+ prevSecond: string;
163
+ nextSecond: string;
164
+ pm: string;
165
+ am: string;
166
+ today: string;
167
+ weekHeader: string;
168
+ firstDayOfWeek: number;
169
+ showMonthAfterYear: boolean;
170
+ dateFormat: string;
171
+ weak: string;
172
+ medium: string;
173
+ strong: string;
174
+ passwordPrompt: string;
175
+ emptyFilterMessage: string;
176
+ searchMessage: string;
177
+ selectionMessage: string;
178
+ emptySelectionMessage: string;
179
+ emptySearchMessage: string;
180
+ emptyMessage: string;
181
+ aria: {
182
+ trueLabel: string;
183
+ falseLabel: string;
184
+ nullLabel: string;
185
+ star: string;
186
+ stars: string;
187
+ selectAll: string;
188
+ unselectAll: string;
189
+ close: string;
190
+ previous: string;
191
+ next: string;
192
+ navigation: string;
193
+ scrollTop: string;
194
+ moveTop: string;
195
+ moveUp: string;
196
+ moveDown: string;
197
+ moveBottom: string;
198
+ moveToTarget: string;
199
+ moveToSource: string;
200
+ moveAllToTarget: string;
201
+ moveAllToSource: string;
202
+ pageLabel: string;
203
+ firstPageLabel: string;
204
+ lastPageLabel: string;
205
+ nextPageLabel: string;
206
+ prevPageLabel: string;
207
+ rowsPerPageLabel: string;
208
+ jumpToPageDropdownLabel: string;
209
+ jumpToPageInputLabel: string;
210
+ selectRow: string;
211
+ unselectRow: string;
212
+ expandRow: string;
213
+ collapseRow: string;
214
+ showFilterMenu: string;
215
+ hideFilterMenu: string;
216
+ filterOperator: string;
217
+ filterConstraint: string;
218
+ editRow: string;
219
+ saveEdit: string;
220
+ cancelEdit: string;
221
+ listView: string;
222
+ gridView: string;
223
+ slide: string;
224
+ slideNumber: string;
225
+ zoomImage: string;
226
+ zoomIn: string;
227
+ zoomOut: string;
228
+ rotateRight: string;
229
+ rotateLeft: string;
230
+ listLabel: string;
231
+ };
232
+ };
115
233
  export declare const defaultOptions: WangsVueOptions;
116
234
  export declare const useWangsVueConfig: <T extends (keyof ComponentDefaultPropsConfig | keyof ComponentLocaleConfig) | undefined>(componentName?: T) => T extends keyof ComponentDefaultPropsConfig | keyof ComponentLocaleConfig ? WangsVueComponentConfig<T> : WangsVueOptions;
117
235
  export declare const mergeWangsVueConfig: (baseConfig: WangsVueOptions, overrideConfig: Partial<WangsVueOptions>) => WangsVueOptions;
@@ -0,0 +1,94 @@
1
+ import { App, Ref } from 'vue';
2
+ import { AxiosResponse } from 'axios';
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
+ }
19
+ export interface I18n {
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;
51
+ }
52
+ type MessageMap = Record<string, string>;
53
+ export interface I18nService {
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<AxiosResponse<{
60
+ data: MessageMap;
61
+ }>>;
62
+ /**
63
+ * Fetch all available lang options for LanguageDropdown and LanguageSwitcher
64
+ *
65
+ * @returns Promise Array of options
66
+ */
67
+ getLanguageOptions(): Promise<LanguageOption[]>;
68
+ /**
69
+ * Fetch single lang option meta data
70
+ *
71
+ * @param locale The locale code (e.g., 'en', 'id').
72
+ * @returns Promise LanguageMeta
73
+ */
74
+ getLanguageOptionMeta(locale: string): Promise<LanguageOption>;
75
+ /**
76
+ * Translate a specific text to the target locale.
77
+ * @param key Unique translation key.
78
+ * @param locale Target locale code.
79
+ * @returns A promise resolving to the translated string.
80
+ */
81
+ translateText(key: string, locale: string): Promise<string>;
82
+ }
83
+ export declare const useI18n: () => I18n;
84
+ declare const i18n: {
85
+ install: (app: App) => void;
86
+ };
87
+ export declare const createI18nWithExtension: (service: I18nService) => typeof i18n;
88
+ export default i18n;
89
+ declare module 'vue' {
90
+ interface ComponentCustomProperties {
91
+ $i18n: I18n;
92
+ $t: I18n['t'];
93
+ }
94
+ }
@@ -1,3 +1,3 @@
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: (options?: Option[] | string[]) => Option[] | string[];
3
3
  export default filterOptions;