@fewangsit/wangsvue-fats 1.0.0-alpha.12 → 1.0.0-alpha.121

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 (161) hide show
  1. package/components/animation/Animation.vue.d.ts +9 -1
  2. package/components/assetinfo/AssetInfo.vue.d.ts +44 -0
  3. package/components/badgegroup/BadgeGroup.vue.d.ts +3 -1
  4. package/components/basetree/BaseTree.vue.d.ts +6 -1
  5. package/components/button/Button.vue.d.ts +7 -3
  6. package/components/buttonaddbyscan/ButtonAddByScan.vue.d.ts +40 -0
  7. package/components/buttonbulkaction/ButtonBulkAction.vue.d.ts +1 -0
  8. package/components/buttonradio/ButtonRadio.vue.d.ts +1 -0
  9. package/components/buttonscan/ButtonScan.vue.d.ts +202 -0
  10. package/components/buttonsearchbyscan/ButtonSearchByScan.vue.d.ts +46 -0
  11. package/components/buttonselecttree/ButtonSelectTree.vue.d.ts +2 -1
  12. package/components/buttonsplit/ButtonSplit.vue.d.ts +352 -34
  13. package/components/buttonsync/ButtonSync.vue.d.ts +22 -0
  14. package/components/buttontoggle/ButtonToggle.vue.d.ts +1 -0
  15. package/components/buttonviewlog/ButtonViewLog.vue.d.ts +17 -0
  16. package/components/calendar/Calendar.vue.d.ts +32 -4
  17. package/components/card/Card.vue.d.ts +1 -0
  18. package/components/carousel/Carousel.vue.d.ts +28 -0
  19. package/components/checkbox/Checkbox.vue.d.ts +1 -0
  20. package/components/datatable/DataTable.vue.d.ts +12 -4
  21. package/components/dialog/Dialog.vue.d.ts +4 -3
  22. package/components/dialogassetnamedetail/DialogAssetNameDetail.vue.d.ts +46 -0
  23. package/components/dialogassetnamedetail/options/columns.d.ts +2 -0
  24. package/components/dialogassetnamedetail/options/filter.d.ts +2 -0
  25. package/components/dialogconfirm/DialogConfirm.vue.d.ts +1 -0
  26. package/components/dialogform/DialogForm.vue.d.ts +3 -2
  27. package/components/dialoglinkedasset/DialogLinkedAsset.vue.d.ts +106 -0
  28. package/components/dialogprintqr/DialogPrintQR.vue.d.ts +18 -0
  29. package/components/dialogreportdamage/DialogReportDamage.vue.d.ts +34 -0
  30. package/components/dialogreportmissing/DialogReportMissing.vue.d.ts +33 -0
  31. package/components/dialogreporttag/DialogReportTag.vue.d.ts +31 -0
  32. package/components/dialogselecttree/DialogSelectTree.vue.d.ts +3 -2
  33. package/components/dialogselectuser/DialogSelectUser.vue.d.ts +102 -0
  34. package/components/dialogselectuser/options/columns.d.ts +3 -0
  35. package/components/dialogtransferlog/DialogTransferLog.vue.d.ts +16 -0
  36. package/components/dropdown/Dropdown.vue.d.ts +28 -4
  37. package/components/editor/Editor.vue.d.ts +1 -0
  38. package/components/fieldwrapper/FieldWrapper.vue.d.ts +19 -2
  39. package/components/fileupload/FileUpload.vue.d.ts +1 -0
  40. package/components/filtercontainer/FilterContainer.vue.d.ts +42 -12
  41. package/components/form/Form.vue.d.ts +2 -1
  42. package/components/icon/Icon.vue.d.ts +4 -0
  43. package/components/image/Image.vue.d.ts +8 -0
  44. package/components/imagecompressor/ImageCompressor.vue.d.ts +6 -0
  45. package/components/index.d.ts +33 -19
  46. package/components/inputcurrency/helpers/currency.helper.d.ts +5 -1
  47. package/components/inputemail/InputEmail.vue.d.ts +1 -0
  48. package/components/inputnumber/InputNumber.vue.d.ts +6 -0
  49. package/components/inputotp/InputOtp.vue.d.ts +3 -0
  50. package/components/inputpassword/InputPassword.vue.d.ts +1 -0
  51. package/components/inputrangenumber/InputRangeNumber.vue.d.ts +1 -0
  52. package/components/inputsearch/InputSearch.vue.d.ts +6 -2
  53. package/components/inputtext/InputText.vue.d.ts +2 -1
  54. package/components/inputurl/InputURL.vue.d.ts +4 -2
  55. package/components/invisiblefield/InvisibleField.vue.d.ts +32 -36
  56. package/components/languagedropdown/LanguageDropdown.vue.d.ts +5 -19
  57. package/components/litedropdown/LiteDropdown.vue.d.ts +5 -3
  58. package/components/loading/store/loading.store.d.ts +3 -3
  59. package/components/menu/Menu.vue.d.ts +2 -1
  60. package/components/multiselect/MultiSelect.vue.d.ts +7 -4
  61. package/components/overlaypanel/OverlayPanel.vue.d.ts +1 -0
  62. package/components/paginator/Paginator.vue.d.ts +285 -0
  63. package/components/tabmenu/TabMenu.vue.d.ts +6 -190
  64. package/components/tagtype/TagType.vue.d.ts +26 -0
  65. package/components/textarea/Textarea.vue.d.ts +2 -1
  66. package/components/timeline/Timeline.vue.d.ts +21 -2
  67. package/components/toast/Toast.vue.d.ts +2 -1
  68. package/components/toggleswitch/ToggleSwitch.vue.d.ts +1 -0
  69. package/components/transactionroles/TransactionRoles.vue.d.ts +58 -0
  70. package/components/tree/Tree.vue.d.ts +6 -3
  71. package/components/tree/helpers/filterNodeKeys.helper.d.ts +8 -2
  72. package/components/tree/helpers/flattenTreeNodeChildren.helper.d.ts +3 -1
  73. package/components/username/UserName.vue.d.ts +6 -1
  74. package/components/userwithicon/UserWithIcon.vue.d.ts +21 -0
  75. package/config/defaultProps.d.ts +1 -1
  76. package/config/index.d.ts +1 -1
  77. package/config/locale.d.ts +1 -1
  78. package/directives/focus.d.ts +1 -1
  79. package/event-bus/index.d.ts +55 -52
  80. package/event-bus/mitt.d.ts +29 -14
  81. package/main.d.ts +34 -2
  82. package/package.json +14 -6
  83. package/plugins/VueHtmlToPaper.d.ts +11 -0
  84. package/plugins/WangsVue.d.ts +272 -98
  85. package/plugins/formValidation.d.ts +15 -6
  86. package/plugins/i18n-extension.d.ts +1 -1
  87. package/plugins/i18n.d.ts +90 -67
  88. package/stats.html +4949 -0
  89. package/style.css +1 -1
  90. package/utils/date.util.d.ts +64 -31
  91. package/utils/formatTagCode.util.d.ts +1 -0
  92. package/utils/getStatusSeverity.util.d.ts +23 -0
  93. package/utils/index.d.ts +7 -21
  94. package/utils/isBasic.util.d.ts +1 -0
  95. package/utils/listenSidebarChanges.util.d.ts +14 -9
  96. package/utils/object.util.d.ts +14 -3
  97. package/utils/role.util.d.ts +63 -26
  98. package/utils/toast.util.d.ts +78 -78
  99. package/wangsvue-fats.js +57715 -0
  100. package/wangsvue-fats.system.js +204 -267
  101. package/assets/json/currencies.json.d.ts +0 -1068
  102. package/assets/lottie/admin/loading-page.lottie +0 -0
  103. package/assets/lottie/admin/loading-table.lottie +0 -0
  104. package/assets/lottie/admin/no-data.lottie +0 -0
  105. package/assets/lottie/supplyasset/loading-page.lottie +0 -0
  106. package/assets/lottie/supplyasset/loading-table.lottie +0 -0
  107. package/assets/lottie/supplyasset/no-data.lottie +0 -0
  108. package/assets/lottie/workspace/loading-page.lottie +0 -0
  109. package/assets/lottie/workspace/loading-plane.lottie +0 -0
  110. package/assets/lottie/workspace/loading-table.lottie +0 -0
  111. package/assets/lottie/workspace/no-data.lottie +0 -0
  112. package/build-entry.d.ts +0 -14
  113. package/components/buttonsplit/ButtonSplit.d.ts +0 -350
  114. package/components/calendar/BaseCalendar.vue.d.ts +0 -86
  115. package/components/codesnippet/CodeSnippet.vue.d.ts +0 -14
  116. package/components/customcolumn/ColumnList.vue.d.ts +0 -27
  117. package/components/customcolumn/helpers/setVisibilityColumn.helper.d.ts +0 -12
  118. package/components/datatable/MultiRow.vue.d.ts +0 -16
  119. package/components/datatable/helpers/adjustMenuPosition.helper.d.ts +0 -1
  120. package/components/datatable/helpers/filter.helper.d.ts +0 -28
  121. package/components/datatable/helpers/index.d.ts +0 -3
  122. package/components/datatable/helpers/readConfig.helper.d.ts +0 -2
  123. package/components/datatable/store/dataTable.store.d.ts +0 -22
  124. package/components/editor/CodeSnippetAdapter.vue.d.ts +0 -92
  125. package/components/editor/EditorButton.vue.d.ts +0 -15
  126. package/components/editor/MentionList.vue.d.ts +0 -35
  127. package/components/editor/MentionSection.vue.d.ts +0 -92
  128. package/components/editor/codeSnippetExtension.d.ts +0 -3
  129. package/components/editor/mentionSectionExtension.d.ts +0 -3
  130. package/components/editor/suggestion.d.ts +0 -2
  131. package/components/filtercontainer/helpers/applyFilter.helper.d.ts +0 -5
  132. package/components/filtercontainer/helpers/formatDateTimeRange.helper.d.ts +0 -7
  133. package/components/filtercontainer/helpers/getOption.helper.d.ts +0 -3
  134. package/components/gallerypreview/GalleryPreview.vue.d.ts +0 -31
  135. package/components/helpers/convertToArrayClass.helper.d.ts +0 -2
  136. package/components/helpers/index.d.ts +0 -2
  137. package/components/helpers/label.d.ts +0 -15
  138. package/components/imagecompressor/BackgroundImageCropper.vue.d.ts +0 -36
  139. package/components/imagecompressor/ImageInputInfo.vue.d.ts +0 -30
  140. package/components/inputgroup/InputGroup.vue.d.ts +0 -141
  141. package/components/inputphonenumber/helpers/getUserLocation.helper.d.ts +0 -8
  142. package/components/languagedropdown/LanguageDropdownOption.vue.d.ts +0 -18
  143. package/components/menu/helpers/filterMenu.helper.d.ts +0 -12
  144. package/components/menu/helpers/index.d.ts +0 -1
  145. package/components/menuitem/MenuItem.vue.d.ts +0 -19
  146. package/components/progressbar/ProgressBar.vue.d.ts +0 -72
  147. package/components/quickfilter/QuickFilter.vue.d.ts +0 -25
  148. package/components/timeline/TimelineContentByType.vue.d.ts +0 -16
  149. package/components/tooltipspan/TooltipSpan.vue.d.ts +0 -20
  150. package/components/tree/helpers/index.d.ts +0 -3
  151. package/components/usergroup/UserGroup.vue.d.ts +0 -57
  152. package/components/validatormessage/ValidatorMessage.vue.d.ts +0 -12
  153. package/types/options.type.d.ts +0 -16
  154. package/utils/addAttachment.util.d.ts +0 -43
  155. package/utils/exportToExcel.util.d.ts +0 -20
  156. package/utils/filterOptions.util.d.ts +0 -3
  157. package/utils/genPlaceholder.util.d.ts +0 -8
  158. package/utils/getAttachmentIcon.util.d.ts +0 -8
  159. package/utils/mergePropsWithDefaults.util.d.ts +0 -20
  160. package/utils/textFormatter.util.d.ts +0 -17
  161. package/wangsvue-fats.es.js +0 -132454
@@ -1,5 +1,6 @@
1
1
  import { GenericObject } from 'vee-validate';
2
2
  import { Slot } from 'vue';
3
+
3
4
  import FormInstance, { FormPayload, FormProps } from '../form/Form.vue.d';
4
5
  import { WangsIcons } from '../icon/Icon.vue.d';
5
6
  import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
@@ -85,7 +86,7 @@ export interface DialogFormProps extends FormProps {
85
86
  * @default 260
86
87
  */
87
88
  asideRightWidth?: number;
88
- class?: string | string[];
89
+ class?: string | string[] | object[];
89
90
 
90
91
  /**
91
92
  * Custom button cancel label.
@@ -117,7 +118,7 @@ export interface DialogFormProps extends FormProps {
117
118
  /**
118
119
  * @deprecated
119
120
  */
120
- contentClass?: string | string[];
121
+ contentClass?: string | string[] | object[];
121
122
 
122
123
  /**
123
124
  * Show Date time on header.
@@ -0,0 +1,106 @@
1
+ import { DefineComponent } from 'vue';
2
+ import { AssetName } from '@tagsamurai/fats-api-services/src/types/oldAssetService.type';
3
+
4
+ import { DialogConfirmProps } from '../../../../library/components/dialogconfirm/DialogConfirm.vue.d';
5
+ import { WangsIcons } from '../../../../library/components/icon/Icon.vue.d';
6
+
7
+ /**
8
+ * Type of the asset data, it refers to data response from Asset API, but since this component only using asset's name and _id then only those field are required for type.
9
+ */
10
+ export type LinkedAsset = {
11
+ _id: string;
12
+ name: AssetName;
13
+ };
14
+
15
+ /**
16
+ * Type of linked asset, it contains parent and its child(s).
17
+ */
18
+ export type LinkedAssetFamily = {
19
+ parent: LinkedAsset;
20
+ children: LinkedAsset[];
21
+ };
22
+
23
+ export type ChildAsset = {
24
+ parent: LinkedAsset;
25
+ children: LinkedAsset[]; // Empty children
26
+ family: LinkedAsset[];
27
+ };
28
+
29
+ export type ParentAsset = {
30
+ parent: undefined; // If the asset is parent, the parent will undefined
31
+ children: LinkedAsset[];
32
+ family: LinkedAsset[]; // Family is combination of parent, children and asset itself.
33
+ // If it only contains one asset in family, it means the asset has not linked yet.
34
+ };
35
+
36
+ export type FamilyData = (ParentAsset | ChildAsset) & {
37
+ _id: string;
38
+ };
39
+
40
+ /**
41
+ * Props for DialogSelectAsset component
42
+ */
43
+ export interface DialogLinkedAssetProps extends DialogConfirmProps {
44
+ /**
45
+ * The header of the dialog.
46
+ */
47
+ header: string;
48
+ /**
49
+ * The list of selected asset to be transacted.
50
+ */
51
+ list?: LinkedAsset[];
52
+ /**
53
+ * The list of selected asset to be transacted.
54
+ *
55
+ * @deprecated - no longer supported, use `list` instead
56
+ */
57
+ lists?: LinkedAsset[];
58
+ /**
59
+ * The label of the dialog button.
60
+ */
61
+ label?: string;
62
+ /**
63
+ * The body text of the dialog.
64
+ */
65
+ confirmBody?: string;
66
+ /**
67
+ * Specify the custom header icon.
68
+ * If not, the default rules by it severity.
69
+ *
70
+ * @default 'success' > hidden;
71
+ * @default 'danger' > 'error';
72
+ */
73
+ headerIcon?: WangsIcons;
74
+ /**
75
+ * @default - 'confirmation'
76
+ */
77
+ type?: 'detail' | 'confirmation';
78
+ }
79
+
80
+ /**
81
+ * Emits for DialogSelectAsset component
82
+ */
83
+ export type DialogLinkedAssetEmit = {
84
+ /**
85
+ * Emits when button confirm clicked.
86
+ */
87
+ 'confirm': [families: LinkedAssetFamily[]];
88
+ /**
89
+ * Emits when the dialog is closed. Wether from cancel button, close button, or ESC button pressed.
90
+ */
91
+ 'update:visible': [state: boolean];
92
+ };
93
+
94
+ /**
95
+ * Wangsvue - DialogLinkedAsset
96
+ *
97
+ * DialogLinkedAsset is a component for creating dialog confirmation of linked assets.
98
+ *
99
+ * @group components
100
+ */
101
+ declare const DialogLinkedAsset: DefineComponent<
102
+ DialogLinkedAssetProps,
103
+ DialogLinkedAssetEmit
104
+ >;
105
+
106
+ export default DialogLinkedAsset;
@@ -0,0 +1,18 @@
1
+ import { ClassComponent } from '../../components/ts-helpers.d';
2
+
3
+ export interface DialogPrintQRProps {
4
+ visible?: boolean;
5
+ }
6
+
7
+ export type DialogPrintQREmits = {
8
+ 'printed': [];
9
+ 'update:visible': [state: boolean];
10
+ };
11
+
12
+ declare class DialogPrintQR extends ClassComponent<
13
+ DialogPrintQRProps,
14
+ unknown,
15
+ DialogPrintQREmits
16
+ > {}
17
+
18
+ export default DialogPrintQR;
@@ -0,0 +1,34 @@
1
+ import { ClassComponent } from '../../components/ts-helpers.d';
2
+
3
+ export type ReportSourceType =
4
+ | 'Available Asset'
5
+ | 'Audit Asset'
6
+ | 'Borrowed Asset'
7
+ | 'Assigned Asset'
8
+ | 'Tracking Asset'
9
+ | 'Maintenance Asset';
10
+
11
+ export interface DialogReportDamageProps {
12
+ id: string;
13
+ reportSource: ReportSourceType;
14
+ visible?: boolean;
15
+ byUser?: boolean;
16
+ successMessage?: string;
17
+ submitFunction?: (body: {
18
+ notes: string;
19
+ image: File;
20
+ }) => Promise<{ status?: number; message?: string } | undefined>;
21
+ }
22
+
23
+ export type DialogReportDamageEmits = {
24
+ 'update:visible': [value: boolean];
25
+ 'reported': [];
26
+ };
27
+
28
+ declare class DialogReportDamage extends ClassComponent<
29
+ DialogReportDamageProps,
30
+ unknown,
31
+ DialogReportDamageEmits
32
+ > {}
33
+
34
+ export default DialogReportDamage;
@@ -0,0 +1,33 @@
1
+ import { ClassComponent } from '../../components/ts-helpers.d';
2
+
3
+ export type ReportSourceType =
4
+ | 'Available Asset'
5
+ | 'Borrowed Asset'
6
+ | 'Assigned Asset'
7
+ | 'Transfer Asset';
8
+
9
+ export interface DialogReportMissingProps {
10
+ id: string; // The Asset id to get asset detail
11
+ reportSource: ReportSourceType;
12
+ trackingId?: string; // The tracking Id to submit permanently missing report
13
+ visible?: boolean;
14
+ permanentlyMissing?: boolean;
15
+ successMessage?: string;
16
+ submitWithoutApi?: boolean;
17
+ submitFunction?: (body: {
18
+ notes: string;
19
+ }) => Promise<{ status?: number; message?: string } | undefined>;
20
+ }
21
+
22
+ export type DialogReportMissingEmits = {
23
+ 'update:visible': [value: boolean];
24
+ 'reported': [payload?: { notes: string }];
25
+ };
26
+
27
+ declare class DialogReportMissing extends ClassComponent<
28
+ DialogReportMissingProps,
29
+ unknown,
30
+ DialogReportMissingEmits
31
+ > {}
32
+
33
+ export default DialogReportMissing;
@@ -0,0 +1,31 @@
1
+ import { ClassComponent } from '../../components/ts-helpers.d';
2
+
3
+ export interface DialogReportTagProps {
4
+ id: string;
5
+ tagReported?: ReportTagBody;
6
+ visible?: boolean;
7
+ successMessage?: string;
8
+ submitLabel?: string;
9
+ submitWithoutApi?: boolean;
10
+ submitFunction?: (
11
+ body: ReportTagBody,
12
+ ) => Promise<{ status?: number; message?: string } | undefined>;
13
+ }
14
+
15
+ export type DialogReportTagEmits = {
16
+ 'update:visible': [value: boolean];
17
+ 'reported': [payload?: ReportTagBody];
18
+ };
19
+
20
+ export type ReportTagBody = {
21
+ qr: boolean;
22
+ rfid: boolean;
23
+ };
24
+
25
+ declare class DialogReportTag extends ClassComponent<
26
+ DialogReportTagProps,
27
+ unknown,
28
+ DialogReportTagEmits
29
+ > {}
30
+
31
+ export default DialogReportTag;
@@ -1,9 +1,10 @@
1
1
  import { TreeSelectionKeys } from 'primevue/tree';
2
+ import { Slot } from 'vue';
3
+
2
4
  import { TreeNode } from '../basetree/BaseTree.vue.d';
3
5
  import { QueryParams, ShortFetchResponse } from '../datatable/DataTable.vue.d';
4
- import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
5
6
  import TreeInstance, { TreeProps } from '../tree/Tree.vue.d';
6
- import { Slot } from 'vue';
7
+ import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
7
8
 
8
9
  export interface DialogSelectTreeProps
9
10
  extends Omit<TreeProps, 'type' | 'filter'> {
@@ -0,0 +1,102 @@
1
+ import { FetchListResponse } from '@fewangsit/workspace-api-services/src/types/fetchResponse.type';
2
+ import { FetchUserRoleOptionResponse } from '@tagsamurai/fats-api-services/src/dto/role.dto';
3
+ import { User } from '@tagsamurai/fats-api-services/src/types/user.type';
4
+
5
+ import { QueryParams } from '../../components/datatable/DataTable.vue.d';
6
+ import { ClassComponent } from '../../components/ts-helpers';
7
+
8
+ export type EmitSelectionValue = {
9
+ checkbox: User[];
10
+ single: User;
11
+ };
12
+
13
+ export type SelectionType = 'single' | 'checkbox';
14
+
15
+ /**
16
+ * Props for DialogSelectUser component
17
+ */
18
+ export interface DialogSelectUserProps {
19
+ /**
20
+ * The header of the dialog.
21
+ *
22
+ * @defaultValue "Select User"
23
+ */
24
+ header?: string;
25
+
26
+ /**
27
+ * The description of the table.
28
+ *
29
+ * @defaultValue "Select user"
30
+ */
31
+ description?: string;
32
+
33
+ /**
34
+ * Table's selection type
35
+ */
36
+ selectionType: SelectionType;
37
+
38
+ /**
39
+ * Specifies the visibility of the dialog.
40
+ * @defaultValue false
41
+ */
42
+ visible?: boolean | undefined;
43
+
44
+ /**
45
+ * List that will be show above the table
46
+ * @defaultValue undefined
47
+ */
48
+ list?: string[];
49
+
50
+ /**
51
+ * Set custom button select label
52
+ */
53
+ selectButtonLabel?: string;
54
+
55
+ /**
56
+ * The function to fetch data on DataTable mounted and on queryParams dependencies updated.
57
+ *
58
+ * @param params this is required
59
+ */
60
+ fetchFunction?: (
61
+ params: QueryParams,
62
+ ) => Promise<FetchListResponse | undefined>;
63
+
64
+ /**
65
+ * The function to fetch options on DialogSelectUserFilter.
66
+ *
67
+ */
68
+ fetchOptionFunction?: () => Promise<
69
+ FetchUserRoleOptionResponse['data'] | undefined
70
+ >;
71
+ }
72
+
73
+ /**
74
+ * Emits for DialogSelectUser component
75
+ */
76
+ export type DialogSelectUserEmits<T = User> = {
77
+ /**
78
+ * Emits when the dialog is closed. Wether from cancel button, close button, or ESC button pressed.
79
+ */
80
+ 'update:visible': [state: boolean];
81
+
82
+ /**
83
+ * Emits when you done selected user.
84
+ */
85
+ 'selected': [user: T];
86
+ };
87
+
88
+ /**
89
+ * **TSVue - DialogSelectUser**
90
+ *
91
+ * --- ---
92
+ * ![TSVue](https://ik.imagekit.io/kurniadev/TS-HEAD-BLACK.png)
93
+ *
94
+ * @group components
95
+ */
96
+ declare const DialogSelectUser: ClassComponent<
97
+ DialogSelectUserProps,
98
+ unknown,
99
+ DialogSelectUserEmits
100
+ >;
101
+
102
+ export default DialogSelectUser;
@@ -0,0 +1,3 @@
1
+ import { Ref } from 'vue';
2
+ import { TableColumn } from '../../../components/datatable/DataTable.vue.d';
3
+ export declare const selectUserColumns: () => Ref<TableColumn[]>;
@@ -0,0 +1,16 @@
1
+ import { ClassComponent } from '../../components/ts-helpers.d';
2
+
3
+ // You need to provide requestIds with Ref<string[]> to enable prev and next buttons
4
+
5
+ export interface DialogTransferLogProps {
6
+ id: string;
7
+ visible?: boolean;
8
+ }
9
+
10
+ declare class DialogTransferLog extends ClassComponent<
11
+ DialogTransferLogProps,
12
+ unknown,
13
+ unknown
14
+ > {}
15
+
16
+ export default DialogTransferLog;
@@ -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,16 @@
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';
9
14
 
10
15
  export type FilterMatchMode =
11
16
  | 'CONTAINS'
@@ -19,6 +24,27 @@ export type FilterMatchMode =
19
24
  | 'BETWEEN'
20
25
  | 'DATE_BETWEEN';
21
26
 
27
+ /**
28
+ * Represents a function type for fetching options based on query parameters.
29
+ *
30
+ * @template T - The type of query parameters, extending `QueryParams`. Defaults to `any`.
31
+ *
32
+ * This function can have one of the following signatures:
33
+ * - A synchronous function that takes query parameters and returns an array of `Option` objects.
34
+ * - An asynchronous function that takes query parameters and returns a `Promise` resolving to an array of `Option` objects.
35
+ * - An asynchronous function that takes query parameters and returns a `Promise` resolving to an `AxiosResponse` containing a `FetchOptionResponse` object.
36
+ *
37
+ * @param args - The query parameters of type `T` used to fetch the options.
38
+ * @returns One of the following:
39
+ * - An array of `Option` objects.
40
+ * - A `Promise` resolving to an array of `Option` objects.
41
+ * - A `Promise` resolving to an `AxiosResponse` containing a `FetchOptionResponse` object.
42
+ */
43
+ export type FetchOptionFn<T extends QueryParams = any> =
44
+ | ((args: T) => Option[])
45
+ | ((args: T) => Promise<Option[]>)
46
+ | ((args: T) => Promise<AxiosResponse<FetchOptionResponse<T>>>);
47
+
22
48
  // More specific filter field types
23
49
  export interface MultiSelectFilterField extends MultiSelectProps {
24
50
  type: 'multiselect';
@@ -32,9 +58,7 @@ export interface MultiSelectFilterField extends MultiSelectProps {
32
58
  field: string;
33
59
  optionField?: string; // @example - actionOptions
34
60
  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
61
+ fetchOptionFn?: FetchOptionFn;
38
62
  }
39
63
 
40
64
  export interface DropdownFilterField extends DropdownProps {
@@ -49,9 +73,7 @@ export interface DropdownFilterField extends DropdownProps {
49
73
  field: string;
50
74
  optionField?: string; // @example - actionOptions
51
75
  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
76
+ fetchOptionFn?: FetchOptionFn;
55
77
  }
56
78
 
57
79
  export interface RangeNumberFilterField extends InputRangeNumberProps {
@@ -98,16 +120,24 @@ export interface CalendarFilterField extends CalendarProps {
98
120
 
99
121
  export type AdditionalFilterField = ButtonSelectTreeFilterField;
100
122
 
101
- export type FilterField =
123
+ export type FilterField = (
102
124
  | AdditionalFilterField
103
125
  | MultiSelectFilterField
104
126
  | DropdownFilterField
105
127
  | RangeNumberFilterField
106
- | CalendarFilterField;
128
+ | CalendarFilterField
129
+ ) & {
130
+ /**
131
+ * Filter field visibility
132
+ *
133
+ * You dont need manually filter, this component already handle it.
134
+ */
135
+ visible?: boolean;
136
+ };
107
137
 
108
138
  export type FilterOptions<Opt = Record<string, boolean>> = Record<
109
139
  keyof Opt,
110
- MultiSelectOption[]
140
+ Option[]
111
141
  >;
112
142
 
113
143
  export type LoadingFilters = Record<string, boolean>;
@@ -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 =
@@ -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
  */