@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,8 +1,20 @@
1
1
  import { Slot } from 'vue';
2
- import { DropdownOption, OptionValue } from 'lib/types/options.type';
2
+
3
+ import { BadgeProps } from '../../components/badge/Badge.vue.d';
4
+ import { WangsIcons } from '../../components/icon/Icon.vue.d';
5
+
3
6
  import { CustomValidation } from '../form/Form.vue.d';
4
7
  import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
5
- import { BadgeProps } from 'lib/components/badge/Badge.vue.d';
8
+
9
+ export type OptionValue = string | number | boolean | Record<string, any>;
10
+
11
+ export type Option = {
12
+ label?: string;
13
+ value?: OptionValue;
14
+ visible?: boolean;
15
+ icon?: WangsIcons;
16
+ [key: string]: any;
17
+ };
6
18
 
7
19
  /**
8
20
  * Configuration interface for localizing dropdown component placeholders and error messages.
@@ -77,7 +89,7 @@ export interface DropdownProps {
77
89
  /**
78
90
  * List of options to display.
79
91
  */
80
- options?: DropdownOption[] | string[] | Record<string, any>;
92
+ options?: Option[] | string[] | Record<string, any>;
81
93
 
82
94
  /**
83
95
  * Allows `null` to be treated as a valid selectable option in the dropdown.
@@ -208,11 +220,18 @@ export interface DropdownProps {
208
220
  * @default 'Search'
209
221
  */
210
222
  filterPlaceholder?: string;
223
+
224
+ /**
225
+ * To determine whether dropdown panel width should fit its max content or not
226
+ *
227
+ * @default false
228
+ */
229
+ panelMaxContent?: boolean;
211
230
  }
212
231
 
213
232
  export interface DropdownSlots {
214
233
  'value': Slot<{ value: string; originalValue: any }>;
215
- 'option': Slot<{ option: DropdownOption }>;
234
+ 'option': Slot<{ option: Option }>;
216
235
  'addon-left': Slot;
217
236
  'addon-right': Slot;
218
237
  }
@@ -230,6 +249,11 @@ export type DropdownEmits = {
230
249
  * Emits when overlay shown.
231
250
  */
232
251
  'show': [];
252
+
253
+ /**
254
+ * Emits when the Field Info icon is clicked.
255
+ */
256
+ 'fieldInfoClick': [];
233
257
  };
234
258
 
235
259
  /**
@@ -1,4 +1,5 @@
1
1
  import { EditorEvents } from '@tiptap/vue-3';
2
+
2
3
  import { ClassComponent } from '../ts-helpers';
3
4
 
4
5
  export interface EditorProps {
@@ -1,4 +1,6 @@
1
- import { DefineComponent } from 'vue';
1
+ import { Slot } from 'vue';
2
+
3
+ import { ClassComponent } from '../ts-helpers';
2
4
 
3
5
  export interface FieldWrapperLocaleConfig {
4
6
  /**
@@ -64,6 +66,21 @@ export interface FieldWrapperProps {
64
66
  tooltipPos?: 'top' | 'right' | 'bottom' | 'left';
65
67
  }
66
68
 
67
- declare const FieldWrapper: DefineComponent<FieldWrapperProps>;
69
+ export interface FieldWrapperSlots {
70
+ 'label-addon': Slot;
71
+ }
72
+
73
+ declare class FieldWrapper extends ClassComponent<
74
+ FieldWrapperProps,
75
+ FieldWrapperSlots,
76
+ unknown
77
+ > {}
78
+
79
+ export type FieldWrapperEmits = {
80
+ /**
81
+ * Emitted when the information (tooltip) is clicked.
82
+ */
83
+ infoClick: [];
84
+ };
68
85
 
69
86
  export default FieldWrapper;
@@ -2,6 +2,7 @@ import {
2
2
  FileUploadErrorEvent,
3
3
  FileUploadUploadEvent,
4
4
  } from 'primevue/fileupload';
5
+
5
6
  import { CustomValidation } from '../form/Form.vue.d';
6
7
  import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
7
8
 
@@ -1,11 +1,17 @@
1
- import { MultiSelectOption } from 'lib/types/options.type';
1
+ import { AxiosResponse } from 'axios';
2
2
  import { DefineComponent, Slot } from 'vue';
3
+
4
+ import {
5
+ DropdownProps,
6
+ Option,
7
+ } from '../../components/dropdown/Dropdown.vue.d';
8
+
9
+ import { ButtonSelectTreeProps } from '../buttonselecttree/ButtonSelectTree.vue.d';
3
10
  import { CalendarProps } from '../calendar/Calendar.vue.d';
4
11
  import { QueryParams } from '../datatable/DataTable.vue.d';
5
- import { DropdownProps } from '../dropdown/Dropdown.vue.d';
6
12
  import { InputRangeNumberProps } from '../inputrangenumber/InputRangeNumber.vue.d';
7
13
  import { MultiSelectProps } from '../multiselect/MultiSelect.vue.d';
8
- import { ButtonSelectTreeProps } from '../buttonselecttree/ButtonSelectTree.vue.d';
14
+ import { StringKeyOf, TypeError } from '../ts-helpers';
9
15
 
10
16
  export type FilterMatchMode =
11
17
  | 'CONTAINS'
@@ -19,66 +25,76 @@ export type FilterMatchMode =
19
25
  | 'BETWEEN'
20
26
  | 'DATE_BETWEEN';
21
27
 
22
- // More specific filter field types
23
- export interface MultiSelectFilterField extends MultiSelectProps {
24
- type: 'multiselect';
28
+ type BaseSelectField<OptionsQueryParams extends QueryParams> = {
25
29
  /**
26
- * The name of the field this filter applies to.
30
+ * Represents a function type for fetching options based on query parameters.
27
31
  *
28
- * When using a static filter, it also specifies the field in the data to be used for generating unique options.
29
- * For example, if filtering by a user's full name, the field could be 'user.fullName', which will extract
30
- * unique full names from the table data and use them as filter options.
31
- */
32
- field: string;
33
- optionField?: string; // @example - actionOptions
34
- params?: QueryParams; // Additional QueryParams for the fetchOptionFn
35
- fetchOptionFn?:
36
- | ((args?: any) => MultiSelectOption[] | undefined) // Sync function to fetch options
37
- | ((args?: any) => Promise<MultiSelectOption[] | undefined>); // Async function
38
- }
39
-
40
- export interface DropdownFilterField extends DropdownProps {
41
- type: 'dropdown';
42
- /**
43
- * The name of the field this filter applies to.
32
+ * @template T - The type of query parameters, extending `QueryParams`. Defaults to `any`.
44
33
  *
45
- * When using a static filter, it also specifies the field in the data to be used for generating unique options.
46
- * For example, if filtering by a user's full name, the field could be 'user.fullName', which will extract
47
- * unique full names from the table data and use them as filter options.
48
- */
49
- field: string;
50
- optionField?: string; // @example - actionOptions
51
- params?: QueryParams; // Additional QueryParams for the fetchOptionFn
52
- fetchOptionFn?:
53
- | ((args?: any) => MultiSelectOption[] | undefined) // Sync function to fetch options
54
- | ((args?: any) => Promise<MultiSelectOption[]> | undefined); // Async function
55
- }
56
-
57
- export interface RangeNumberFilterField extends InputRangeNumberProps {
58
- type: 'rangenumber';
59
- /**
60
- * Specify min and max field
34
+ * This function can have one of the following signatures:
35
+ * - A synchronous function that takes query parameters and returns an array of `Option` objects.
36
+ * - An asynchronous function that takes query parameters and returns a `Promise` resolving to an array of `Option` objects.
37
+ * - An asynchronous function that takes query parameters and returns a `Promise` resolving to an `AxiosResponse` containing a `FetchOptionResponse` object.
61
38
  *
62
- * @example ['minAge', 'maxAge']
39
+ * @param args - The query parameters of type `T` used to fetch the options.
40
+ * @returns One of the following:
41
+ * - An array of `Option` objects.
42
+ * - A `Promise` resolving to an array of `Option` objects.
43
+ * - A `Promise` resolving to an `AxiosResponse` containing a `FetchOptionResponse` object.
63
44
  */
64
- fields?: string[];
45
+ fetchOptionFn?(
46
+ args: OptionsQueryParams,
47
+ ): Option[] | Promise<Option[]> | Promise<AxiosResponse<FetchOptionResponse>>;
65
48
 
66
- /**
67
- * Specify single field for both min and max input.
68
- * The value will be a number array.
69
- *
70
- * Prever use this property when you are working with Static Filtering
71
- *
72
- * @example value: [1000,5000] or equal to 'value.0': 1000 & 'value.1': 5000
73
- */
74
- field?: string;
75
- tooltip?: string;
49
+ optionField?: keyof OptionsQueryParams; // @example - actionOptions
50
+ params?: OptionsQueryParams; // Additional QueryParams for the fetchOptionFn
51
+ };
52
+
53
+ export interface MultiSelectFilterField<OptionsQueryParams extends QueryParams>
54
+ extends BaseSelectField<OptionsQueryParams>,
55
+ MultiSelectProps {
56
+ type: 'multiselect';
57
+ }
58
+
59
+ export interface DropdownFilterField<OptionsQueryParams extends QueryParams>
60
+ extends BaseSelectField<OptionsQueryParams>,
61
+ DropdownProps {
62
+ type: 'dropdown';
76
63
  }
77
64
 
78
- export interface ButtonSelectTreeFilterField
79
- extends Omit<ButtonSelectTreeProps, 'type' | 'label' | 'fieldLabel'> {
65
+ type RangeNumberFilterField<Field extends string> =
66
+ | (InputRangeNumberProps & {
67
+ type: 'rangenumber';
68
+ /**
69
+ * Specify min and max field
70
+ *
71
+ * @example ['minAge', 'maxAge']
72
+ */
73
+ fields: [Field, Field];
74
+ field?: TypeError<'`field` must not be specified when using `fields` property'>;
75
+ tooltip?: string;
76
+ })
77
+ | (InputRangeNumberProps & {
78
+ type: 'rangenumber';
79
+ /**
80
+ * Specify single field for both min and max input.
81
+ * The value will be a number array.
82
+ *
83
+ * Prefer using this property when working with Static Filtering
84
+ *
85
+ * @example value: [1000, 5000] or equivalent to 'value.0': 1000 & 'value.1': 5000
86
+ */
87
+ field: Field;
88
+ fields?: TypeError<'`fields` must not be specified when using `field` property'>;
89
+ tooltip?: string;
90
+ });
91
+
92
+ export interface ButtonSelectTreeFilterField<
93
+ Field extends string,
94
+ Params = QueryParams,
95
+ > extends Omit<ButtonSelectTreeProps, 'type' | 'label' | 'fieldLabel'> {
80
96
  type: 'group' | 'category';
81
- field: string; // The name of the field this filter applies to
97
+ field: Field; // The name of the field this filter applies to
82
98
  /**
83
99
  * The field label.
84
100
  */
@@ -88,26 +104,50 @@ export interface ButtonSelectTreeFilterField
88
104
  * @default to Select Group|Category
89
105
  */
90
106
  buttonLabel?: string;
91
- params?: QueryParams; // Override QueryParams for the fetchTree
107
+ params?: Params; // Override QueryParams for the fetchTree
92
108
  }
93
109
 
94
110
  export interface CalendarFilterField extends CalendarProps {
95
111
  type: 'calendar';
96
- field: string;
97
112
  }
98
113
 
99
- export type AdditionalFilterField = ButtonSelectTreeFilterField;
114
+ export type AdditionalFilterField<Field extends string = string> =
115
+ ButtonSelectTreeFilterField<Field>;
100
116
 
101
- export type FilterField =
102
- | AdditionalFilterField
103
- | MultiSelectFilterField
104
- | DropdownFilterField
105
- | RangeNumberFilterField
106
- | CalendarFilterField;
117
+ export type BaseFilterField<Params extends QueryParams = QueryParams> = {
118
+ /**
119
+ * Filter field visibility
120
+ *
121
+ * You dont need manually filter, this component already handle it.
122
+ */
123
+ visible?: boolean;
124
+ /**
125
+ * The name of the field this filter applies to.
126
+ *
127
+ * When using a static filter, it also specifies the field in the data to be used for generating unique options.
128
+ * For example, if filtering by a user's full name, the field could be 'user.fullName', which will extract
129
+ * unique full names from the table data and use them as filter options.
130
+ */
131
+ field: keyof Params;
132
+ };
133
+
134
+ export type FilterField<
135
+ Params extends QueryParams = QueryParams,
136
+ OptionsQueryParams extends QueryParams = QueryParams,
137
+ > =
138
+ | (BaseFilterField<Params> &
139
+ (
140
+ | AdditionalFilterField<StringKeyOf<Params>>
141
+ | MultiSelectFilterField<OptionsQueryParams>
142
+ | DropdownFilterField<OptionsQueryParams>
143
+ | CalendarFilterField
144
+ ))
145
+ | (Omit<BaseFilterField<Params>, 'field'> &
146
+ RangeNumberFilterField<StringKeyOf<Params>>);
107
147
 
108
148
  export type FilterOptions<Opt = Record<string, boolean>> = Record<
109
149
  keyof Opt,
110
- MultiSelectOption[]
150
+ Option[]
111
151
  >;
112
152
 
113
153
  export type LoadingFilters = Record<string, boolean>;
@@ -146,11 +186,6 @@ export interface FilterContainerProps {
146
186
  * Slots for FilterContainer component
147
187
  */
148
188
  export type FilterContainerSlots = {
149
- /**
150
- * @deprecated Please use props.fields instead
151
- */
152
- default: Slot;
153
-
154
189
  /**
155
190
  * Additional template for field.
156
191
  */
@@ -5,11 +5,12 @@ import {
5
5
  MaybeArray,
6
6
  } from 'vee-validate';
7
7
  import { Ref, Slot } from 'vue';
8
+
8
9
  import {
9
10
  ClassComponent,
10
11
  GlobalComponentConstructor,
11
- Nullable,
12
12
  HintedString,
13
+ Nullable,
13
14
  } from '../ts-helpers';
14
15
 
15
16
  export type Condition =
@@ -305,6 +306,8 @@ declare class Form extends ClassComponent<FormProps, FormSlots, FormEmits> {
305
306
  * The form values
306
307
  */
307
308
  values: GenericObject;
309
+
310
+ isSubmitClicked: boolean;
308
311
  }
309
312
 
310
313
  declare module '@vue/runtime-core' {
@@ -103,6 +103,7 @@ export type WangsIcons =
103
103
  | 'filter'
104
104
  | 'folder'
105
105
  | 'folder-add-line'
106
+ | 'gate'
106
107
  | 'group'
107
108
  | 'hand-coin'
108
109
  | 'handheld'
@@ -123,6 +124,7 @@ export type WangsIcons =
123
124
  | 'link-unlink-m'
124
125
  | 'list-settings'
125
126
  | 'loader-4'
127
+ | 'lock-line'
126
128
  | 'logout-box-r'
127
129
  | 'mail-open'
128
130
  | 'mail-send'
@@ -131,6 +133,7 @@ export type WangsIcons =
131
133
  | 'map-pin'
132
134
  | 'menu'
133
135
  | 'menu-unfold'
136
+ | 'mind-map'
134
137
  | 'minus'
135
138
  | 'money-cny-box'
136
139
  | 'money-dollar-circle'
@@ -151,6 +154,7 @@ export type WangsIcons =
151
154
  | 'qr'
152
155
  | 'qr-scan'
153
156
  | 'reception'
157
+ | 'recycle-bin'
154
158
  | 'refresh'
155
159
  | 'replace-tag'
156
160
  | 'report-tag'
@@ -9,6 +9,7 @@
9
9
  *
10
10
  */
11
11
  import { TransitionProps, VNode } from 'vue';
12
+
12
13
  import { ComponentHooks } from '../basecomponent';
13
14
  import { PassThroughOptions } from '../passthrough';
14
15
  import {
@@ -195,6 +196,13 @@ export interface ImageProps {
195
196
  * The thumbnail image.
196
197
  */
197
198
  src?: string | Blob;
199
+
200
+ /**
201
+ * Wether use preview full image functionality
202
+ *
203
+ * @default true
204
+ */
205
+ preview?: boolean;
198
206
  /**
199
207
  * The thumbnail image width.
200
208
  *
@@ -141,6 +141,12 @@ export interface ImageCompressorProps {
141
141
  * @default true
142
142
  */
143
143
  showInfo?: boolean;
144
+ /**
145
+ * Change the requirements of the photo
146
+ *
147
+ * @default undefined - will use maxSizeRequirement, imageTypeRequirement from LocaleConfig
148
+ */
149
+ customRequirements?: string[];
144
150
  /**
145
151
  * Show dialog confirmation before delete the image.
146
152
  */
@@ -162,6 +168,10 @@ export interface ImageCompressorProps {
162
168
  * @default 'webp'
163
169
  */
164
170
  fileType?: 'webp' | 'jpeg' | 'jpg';
171
+ /**
172
+ * @default normal
173
+ */
174
+ type?: 'inline-table' | 'normal';
165
175
  }
166
176
 
167
177
  export interface ImageCompressorSlots {
@@ -178,6 +188,10 @@ export type ImageCompressorEmits = {
178
188
  */
179
189
  'applyProp': [];
180
190
  'update:defaultImage': [index?: number];
191
+ /**
192
+ * Emits on every changes in `field.value`
193
+ */
194
+ 'update:fieldValue': [value?: File[] | File];
181
195
  /**
182
196
  * On delete button clicked.
183
197
  *
@@ -1,68 +1,80 @@
1
- export * from '.././components';
2
- export { default as Animation } from './animation/Animation.vue';
3
1
  export { default as ApproverInfo } from './approverinfo/ApproverInfo.vue';
4
- export { default as AssetInfo } from './assetinfo/AssetInfo.vue';
5
2
  export { default as Badge } from './badge/Badge.vue';
6
3
  export { default as BadgeGroup } from './badgegroup/BadgeGroup.vue';
7
- export { default as BaseTree } from '.././components/basetree/BaseTree.vue';
4
+ export { default as BaseTree } from './basetree/BaseTree.vue';
8
5
  export { default as Breadcrumb } from './breadcrumb/Breadcrumb.vue';
9
6
  export { default as Button } from './button/Button.vue';
10
7
  export { default as ButtonBulkAction } from './buttonbulkaction/ButtonBulkAction.vue';
11
8
  export { default as ButtonCopy } from './buttoncopy/ButtonCopy.vue';
12
9
  export { default as ButtonDownload } from './buttondownload/ButtonDownload.vue';
13
10
  export { default as ButtonFilter } from './buttonfilter/ButtonFilter.vue';
14
- export { default as ButtonImportExcel } from './buttonImportExcel/ButtonImportExcel.vue';
15
11
  export { default as ButtonRadio } from './buttonradio/ButtonRadio.vue';
16
- export { default as ButtonScan } from '.././components/buttonscan/ButtonScan.vue';
12
+ export { default as ButtonScan } from './buttonscan/ButtonScan.vue';
13
+ export { default as ButtonSearchByScan } from './buttonsearchbyscan/ButtonSearchByScan.vue';
17
14
  export { default as ButtonSearch } from './buttonsearch/ButtonSearch.vue';
18
- export { default as ButtonSelectTree } from '.././components/buttonselecttree/ButtonSelectTree.vue';
19
- export { default as ButtonSplit } from './buttonsplit/ButtonSplit.vue';
20
- export { default as ButtonSync } from '.././components/buttonsync/ButtonSync.vue';
15
+ export { default as ButtonSelectTree } from './buttonselecttree/ButtonSelectTree.vue';
16
+ export { default as ButtonSync } from './buttonsync/ButtonSync.vue';
21
17
  export { default as ButtonToggle } from './buttontoggle/ButtonToggle.vue';
22
- export { default as Calendar } from '.././components/calendar/Calendar.vue';
18
+ export { default as Calendar } from './calendar/Calendar.vue';
23
19
  export { default as Card } from './card/Card.vue';
20
+ export { default as Carousel } from './carousel/Carousel.vue';
24
21
  export { default as Checkbox } from './checkbox/Checkbox.vue';
25
- export { default as CodeSnippet } from './codesnippet/CodeSnippet.vue';
26
22
  export { default as DataTable } from './datatable/DataTable.vue';
27
23
  export { default as Dialog } from './dialog/Dialog.vue';
28
24
  export { default as DialogConfirm } from './dialogconfirm/DialogConfirm.vue';
29
25
  export { default as DialogForm } from './dialogform/DialogForm.vue';
30
- export { default as DialogSelectTree } from '.././components/dialogselecttree/DialogSelectTree.vue';
26
+ export { default as DialogSelectTree } from './dialogselecttree/DialogSelectTree.vue';
31
27
  export { default as Dropdown } from './dropdown/Dropdown.vue';
32
- export { default as Editor } from './editor/Editor.vue';
33
28
  export { default as FileUpload } from './fileupload/FileUpload.vue';
34
- export { default as FilterContainer } from './filtercontainer/FilterContainer.vue';
35
29
  export { default as Form } from './form/Form.vue';
36
30
  export { default as Icon } from './icon/Icon.vue';
37
31
  export { default as Image } from './image/Image.vue';
38
32
  export { default as ImageCompressor } from './imagecompressor/ImageCompressor.vue';
39
- export { default as InlineMessage } from '.././components/inlinemessage/InlineMessage.vue';
33
+ export { default as InlineMessage } from './inlinemessage/InlineMessage.vue';
40
34
  export { default as InputBadge } from './inputbadge/InputBadge.vue';
41
35
  export { default as InputCurrency } from './inputcurrency/InputCurrency.vue';
42
36
  export { default as InputEmail } from './inputemail/InputEmail.vue';
43
37
  export { default as InputNumber } from './inputnumber/InputNumber.vue';
38
+ export { default as InputOtp } from './inputotp/InputOtp.vue';
44
39
  export { default as InputPassword } from './inputpassword/InputPassword.vue';
45
40
  export { default as InputPhoneNumber } from './inputphonenumber/InputPhoneNumber.vue';
46
41
  export { default as InputRangeNumber } from './inputrangenumber/InputRangeNumber.vue';
47
- export { default as InputSearch } from './inputsearch/InputSearch.vue';
48
42
  export { default as InputText } from './inputtext/InputText.vue';
49
43
  export { default as InputURL } from './inputurl/InputURL.vue';
50
44
  export { default as InvisibleField } from './invisiblefield/InvisibleField.vue';
51
- export { default as LanguageDropdown } from './languagedropdown/LanguageDropdown.vue';
52
45
  export { default as LiteDropdown } from './litedropdown/LiteDropdown.vue';
46
+ export { default as LanguageSwitcher } from './languageswitcher/LanguageSwitcher.vue';
53
47
  export { default as Loading } from './loading/Loading.vue';
54
48
  export { default as Menu } from './menu/Menu.vue';
55
49
  export { default as MultiSelect } from './multiselect/MultiSelect.vue';
56
50
  export { default as OverlayPanel } from './overlaypanel/OverlayPanel.vue';
57
- export { default as ProgressBar } from './progressbar/ProgressBar.vue';
58
- export { default as QuickFilter } from './quickfilter/QuickFilter.vue';
51
+ export { default as Paginator } from './paginator/Paginator.vue';
59
52
  export { default as TabMenu } from './tabmenu/TabMenu.vue';
53
+ export { default as TagType } from './tagtype/TagType.vue';
60
54
  export { default as Textarea } from './textarea/Textarea.vue';
61
55
  export { default as Timeline } from './timeline/Timeline.vue';
62
56
  export { default as Toast } from './toast/Toast.vue';
63
57
  export { default as ToggleSwitch } from './toggleswitch/ToggleSwitch.vue';
64
- export { default as TooltipSpan } from './tooltipspan/TooltipSpan.vue';
65
- export { default as Tree } from '.././components/tree/Tree.vue';
66
- export { default as UserGroup } from './usergroup/UserGroup.vue';
58
+ export { default as Tree } from './tree/Tree.vue';
67
59
  export { default as UserName } from './username/UserName.vue';
60
+ export { default as ValidatorMessage } from './validatormessage/ValidatorMessage.vue';
61
+
62
+ export { default as AssetInfo } from './assetinfo/AssetInfo.vue';
63
+ export { default as ButtonAddByScan } from './buttonaddbyscan/ButtonAddByScan.vue';
64
+ export { default as ButtonSelectUser } from './buttonselectuser/ButtonSelectUser.vue';
65
+ export { default as ButtonViewLog } from './buttonviewlog/ButtonViewLog.vue';
66
+ export { default as DialogLinkedAsset } from './dialoglinkedasset/DialogLinkedAsset.vue';
67
+ export { default as DialogSelectUser } from './dialogselectuser/DialogSelectUser.vue';
68
68
  export { default as UserWithIcon } from './userwithicon/UserWithIcon.vue';
69
+ export { default as FilterContainer } from './filtercontainer/FilterContainer.vue';
70
+ export { default as InputSearch } from './inputsearch/InputSearch.vue';
71
+ export { default as TransactionRoles } from './transactionroles/TransactionRoles.vue';
72
+ export { default as DialogPrintQR } from './dialogprintqr/DialogPrintQR.vue';
73
+ export { default as DialogAssetNameDetail } from './dialogassetnamedetail/DialogAssetNameDetail.vue';
74
+ export { default as DialogReportTag } from './dialogreporttag/DialogReportTag.vue';
75
+ export { default as DialogReportDamage } from './dialogreportdamage/DialogReportDamage.vue';
76
+ export { default as DialogReportMissing } from './dialogreportmissing/DialogReportMissing.vue';
77
+ export { default as DialogTransferLog } from './dialogtransferlog/DialogTransferLog.vue';
78
+ export { default as DialogDamageLog } from './dialogdamagelog/DialogDamageLog.vue';
79
+ export { default as DisposalReport } from './disposalreport/DisposalReport.vue';
80
+ export { default as Steps } from './steps/Steps.vue';
@@ -1,4 +1,8 @@
1
1
  import { CurrencyFormat } from '../InputCurrency.vue.d';
2
2
  declare const getCurrency: (code?: string) => CurrencyFormat;
3
- declare const formatCurrency: (value?: number | string | null, currency?: string, prefix?: boolean) => string;
3
+ declare const formatCurrency: (
4
+ value?: number | string | null,
5
+ currency?: string,
6
+ prefix?: boolean,
7
+ ) => string;
4
8
  export { getCurrency, formatCurrency };
@@ -1,4 +1,5 @@
1
1
  import { DefineComponent } from 'vue';
2
+
2
3
  import { InputTextEmits, InputTextProps } from '../inputtext/InputText.vue.d';
3
4
 
4
5
  /**
@@ -1,4 +1,5 @@
1
1
  import { DefineComponent, Slot } from 'vue';
2
+
2
3
  import { CustomValidation } from '../form/Form.vue.d';
3
4
 
4
5
  export type InputNumberEvent = number | string | undefined;
@@ -261,6 +262,11 @@ export type InputNumberEmits = {
261
262
  export interface InputNumberSlots {
262
263
  'addon-left': Slot;
263
264
  'addon-right': Slot;
265
+ /**
266
+ * Slot for content in the right side of field label
267
+ */
268
+ 'field-label-addon': Slot;
269
+ 'validatormessage': Slot;
264
270
  }
265
271
 
266
272
  /**
@@ -0,0 +1,3 @@
1
+ import { WangsInputOtp } from '@wangs-ui/vue';
2
+
3
+ export default WangsInputOtp;
@@ -1,4 +1,5 @@
1
1
  import { DefineComponent } from 'vue';
2
+
2
3
  import { CustomValidation } from '../form/Form.vue.d';
3
4
 
4
5
  export type InputPasswordProps = {
@@ -1,4 +1,5 @@
1
1
  import { DefineComponent } from 'vue';
2
+
2
3
  import { CustomValidation } from '../form/Form.vue.d';
3
4
 
4
5
  export interface InputrangeNumberLocaleConfig {
@@ -1,4 +1,8 @@
1
- import { ClassComponent, GlobalComponentConstructor } from '../.././components/ts-helpers';
1
+ import {
2
+ ClassComponent,
3
+ GlobalComponentConstructor,
4
+ } from '../../components/ts-helpers';
5
+
2
6
  export type InputSearchEmits = {
3
7
  /**
4
8
  * Emits when the Enter key is pressed.
@@ -28,3 +32,5 @@ declare module '@vue/runtime-core' {
28
32
  InputSearch: GlobalComponentConstructor<InputSearch>;
29
33
  }
30
34
  }
35
+
36
+ export default InputSearch;
@@ -8,9 +8,10 @@
8
8
  *
9
9
  */
10
10
  import { InputHTMLAttributes, Slot } from 'vue';
11
+
11
12
  import { ComponentHooks } from '../basecomponent';
12
- import { ClassComponent, Nullable } from '../ts-helpers';
13
13
  import { CustomValidation } from '../form/Form.vue.d';
14
+ import { ClassComponent, Nullable } from '../ts-helpers';
14
15
  export declare type InputTextPassThroughOptionType<T = any> =
15
16
  | InputTextPassThroughAttributes
16
17
  | ((
@@ -1,9 +1,11 @@
1
1
  import { Slot } from 'vue';
2
- import { ClassComponent } from '../ts-helpers';
2
+
3
3
  import {
4
4
  InputTextEmits,
5
5
  InputTextProps,
6
- } from 'lib/components/inputtext/InputText.vue.d';
6
+ } from '../../components/inputtext/InputText.vue.d';
7
+
8
+ import { ClassComponent } from '../ts-helpers';
7
9
 
8
10
  /**
9
11
  * InputURL component props