@fewangsit/wangsvue-fats 1.0.0-alpha.34 → 1.0.0-alpha.35

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 (150) hide show
  1. package/components/animation/Animation.vue.d.ts +6 -6
  2. package/components/approverinfo/ApproverInfo.vue.d.ts +36 -36
  3. package/components/assetinfo/AssetInfo.vue.d.ts +21 -18
  4. package/components/badge/Badge.vue.d.ts +46 -46
  5. package/components/badgegroup/BadgeGroup.vue.d.ts +38 -38
  6. package/components/basecomponent/index.d.ts +15 -15
  7. package/components/basetree/BaseTree.vue.d.ts +458 -458
  8. package/components/basetree/TreeNode.vue.d.ts +25 -25
  9. package/components/breadcrumb/Breadcrumb.vue.d.ts +7 -7
  10. package/components/button/Button.vue.d.ts +142 -147
  11. package/components/buttonImportExcel/ButtonImportExcel.vue.d.ts +35 -0
  12. package/components/buttonbulkaction/ButtonBulkAction.vue.d.ts +73 -73
  13. package/components/buttoncopy/ButtonCopy.vue.d.ts +7 -7
  14. package/components/buttondownload/ButtonDownload.vue.d.ts +26 -26
  15. package/components/buttonfilter/ButtonFilter.vue.d.ts +4 -4
  16. package/components/buttonradio/ButtonRadio.vue.d.ts +189 -189
  17. package/components/buttonscan/ButtonScan.vue.d.ts +154 -154
  18. package/components/buttonsearch/ButtonSearch.vue.d.ts +13 -13
  19. package/components/buttonselecttree/ButtonSelectTree.vue.d.ts +164 -164
  20. package/components/buttonsplit/ButtonSplit.vue.d.ts +350 -0
  21. package/components/buttonsync/ButtonSync.vue.d.ts +10 -10
  22. package/components/buttontoggle/ButtonToggle.vue.d.ts +4 -4
  23. package/components/buttonviewlog/ButtonViewLog.vue.d.ts +6 -6
  24. package/components/calendar/Calendar.vue.d.ts +469 -469
  25. package/components/card/Card.vue.d.ts +82 -82
  26. package/components/checkbox/Checkbox.vue.d.ts +245 -245
  27. package/components/customcolumn/CustomColumn.vue.d.ts +21 -21
  28. package/components/datatable/DataTable.vue.d.ts +595 -595
  29. package/components/dialog/Dialog.vue.d.ts +367 -367
  30. package/components/dialogconfirm/DialogConfirm.vue.d.ts +117 -117
  31. package/components/dialogform/DialogForm.vue.d.ts +288 -288
  32. package/components/dialogselecttree/DialogSelectTree.vue.d.ts +98 -98
  33. package/components/dropdown/Dropdown.vue.d.ts +226 -226
  34. package/components/editor/Editor.vue.d.ts +156 -156
  35. package/components/fieldwrapper/FieldWrapper.vue.d.ts +48 -48
  36. package/components/fileupload/FileUpload.vue.d.ts +132 -132
  37. package/components/filtercontainer/FilterContainer.vue.d.ts +116 -113
  38. package/components/form/Form.vue.d.ts +258 -258
  39. package/components/icon/Icon.vue.d.ts +235 -237
  40. package/components/image/Image.vue.d.ts +306 -306
  41. package/components/imagecompressor/ImageCompressor.vue.d.ts +186 -186
  42. package/components/index.d.ts +57 -58
  43. package/components/inputbadge/InputBadge.vue.d.ts +90 -90
  44. package/components/inputcurrency/InputCurrency.vue.d.ts +126 -126
  45. package/components/inputcurrency/helpers/currency.helper.d.ts +3 -3
  46. package/components/inputnumber/InputNumber.vue.d.ts +245 -245
  47. package/components/inputpassword/InputPassword.vue.d.ts +19 -19
  48. package/components/inputphonenumber/InputPhoneNumber.vue.d.ts +68 -68
  49. package/components/inputrangenumber/InputRangeNumber.vue.d.ts +88 -88
  50. package/components/inputsearch/InputSearch.vue.d.ts +14 -11
  51. package/components/inputtext/InputText.vue.d.ts +281 -281
  52. package/components/inputurl/InputURL.vue.d.ts +9 -6
  53. package/components/invisiblefield/InvisibleField.vue.d.ts +18 -18
  54. package/components/languagedropdown/LanguageDropdown.vue.d.ts +32 -0
  55. package/components/litedropdown/LiteDropdown.vue.d.ts +64 -64
  56. package/components/loading/Loading.vue.d.ts +5 -5
  57. package/components/loading/store/loading.store.d.ts +3 -3
  58. package/components/menu/Menu.vue.d.ts +282 -282
  59. package/components/menuitem/index.d.ts +84 -84
  60. package/components/multiselect/MultiSelect.vue.d.ts +161 -161
  61. package/components/overlaypanel/OverlayPanel.vue.d.ts +207 -207
  62. package/components/passthrough/index.d.ts +8 -8
  63. package/components/tabmenu/TabMenu.vue.d.ts +185 -185
  64. package/components/textarea/Textarea.vue.d.ts +131 -131
  65. package/components/timeline/Timeline.vue.d.ts +60 -60
  66. package/components/toast/Toast.vue.d.ts +265 -265
  67. package/components/toggleswitch/ToggleSwitch.vue.d.ts +211 -211
  68. package/components/tree/Tree.vue.d.ts +116 -116
  69. package/components/tree/helpers/filterNodeKeys.helper.d.ts +4 -4
  70. package/components/tree/helpers/flattenTreeNodeChildren.helper.d.ts +1 -1
  71. package/components/treesearchinput/TreeSearchInput.vue.d.ts +16 -0
  72. package/components/ts-helpers.d.ts +41 -43
  73. package/components/username/UserName.vue.d.ts +71 -71
  74. package/components/userwithicon/UserWithIcon.vue.d.ts +8 -8
  75. package/directives/focus.d.ts +1 -1
  76. package/event-bus/index.d.ts +51 -51
  77. package/event-bus/mitt.d.ts +21 -24
  78. package/package.json +8 -4
  79. package/plugins/WangsVue.d.ts +226 -226
  80. package/plugins/formValidation.d.ts +11 -11
  81. package/plugins/i18n-extension.d.ts +1 -1
  82. package/plugins/i18n.d.ts +80 -80
  83. package/utils/date.util.d.ts +53 -53
  84. package/utils/index.d.ts +2 -28
  85. package/utils/listenSidebarChanges.util.d.ts +9 -9
  86. package/utils/object.util.d.ts +8 -8
  87. package/utils/role.util.d.ts +43 -44
  88. package/utils/toast.util.d.ts +78 -78
  89. package/components/buttonscan/helpers/getErrorCode.helper.d.ts +0 -3
  90. package/components/buttonscan/helpers/index.d.ts +0 -1
  91. package/components/buttonscan/workers/scanner.worker.d.ts +0 -1
  92. package/components/calendar/BaseCalendar.vue.d.ts +0 -127
  93. package/components/customcolumn/ColumnList.vue.d.ts +0 -47
  94. package/components/customcolumn/helpers/setVisibilityColumn.helper.d.ts +0 -16
  95. package/components/datatable/MultiRow.vue.d.ts +0 -36
  96. package/components/datatable/helpers/adjustMenuPosition.helper.d.ts +0 -1
  97. package/components/datatable/helpers/filter.helper.d.ts +0 -38
  98. package/components/datatable/helpers/index.d.ts +0 -6
  99. package/components/datatable/helpers/readConfig.helper.d.ts +0 -5
  100. package/components/datatable/store/dataTable.store.d.ts +0 -25
  101. package/components/editor/CodeSnippetAdapter.vue.d.ts +0 -152
  102. package/components/editor/EditorButton.vue.d.ts +0 -35
  103. package/components/editor/MentionList.vue.d.ts +0 -49
  104. package/components/editor/MentionSection.vue.d.ts +0 -152
  105. package/components/editor/codeSnippetExtension.d.ts +0 -3
  106. package/components/editor/mentionSectionExtension.d.ts +0 -3
  107. package/components/editor/suggestion.d.ts +0 -2
  108. package/components/filtercontainer/helpers/applyFilter.helper.d.ts +0 -14
  109. package/components/filtercontainer/helpers/formatDateTimeRange.helper.d.ts +0 -7
  110. package/components/filtercontainer/helpers/getOption.helper.d.ts +0 -12
  111. package/components/imagecompressor/BackgroundImageCropper.vue.d.ts +0 -59
  112. package/components/imagecompressor/ImageInputInfo.vue.d.ts +0 -55
  113. package/components/inputphonenumber/helpers/getUserLocation.helper.d.ts +0 -8
  114. package/components/menu/helpers/filterMenu.helper.d.ts +0 -15
  115. package/components/menu/helpers/index.d.ts +0 -1
  116. package/components/menuitem/MenuItem.vue +0 -70
  117. package/components/menuitem/MenuItem.vue.d.ts +0 -39
  118. package/components/timeline/TimelineContentByType.vue.d.ts +0 -64
  119. package/components/transactionroles/TransactionRoles.vue.d.ts +0 -58
  120. package/components/tree/helpers/index.d.ts +0 -3
  121. package/loading-page-BrQattYE.js +0 -1
  122. package/loading-page-CgfbWppy.js +0 -1
  123. package/loading-page-CoC9UhfC.js +0 -4
  124. package/loading-page-CoXtqoc9.js +0 -4
  125. package/loading-page-DbLuqCHa.js +0 -1
  126. package/loading-page-f8D03l3G.js +0 -4
  127. package/loading-plane-CgfbWppy.js +0 -1
  128. package/loading-plane-CoXtqoc9.js +0 -4
  129. package/loading-table-Bdr9ZhtP.js +0 -1
  130. package/loading-table-ByUoWqUo.js +0 -4
  131. package/loading-table-BygEMzFM.js +0 -4
  132. package/loading-table-BzrSQlA0.js +0 -1
  133. package/loading-table-D9bw9OcI.js +0 -4
  134. package/loading-table-chOgXi94.js +0 -1
  135. package/no-data-CTKux8RI.js +0 -4
  136. package/no-data-Cgze_Rvp.js +0 -1
  137. package/no-data-DLHO1L_u.js +0 -4
  138. package/no-data-Dep79CBh.js +0 -1
  139. package/no-data-g0dJCy2p.js +0 -4
  140. package/no-data-y1X5WtcQ.js +0 -1
  141. package/style.css +0 -1
  142. package/utils/addAttachment.util.d.ts +0 -59
  143. package/utils/exportToExcel.util.d.ts +0 -20
  144. package/utils/filterOptions.util.d.ts +0 -5
  145. package/utils/genPlaceholder.util.d.ts +0 -13
  146. package/utils/getAttachmentIcon.util.d.ts +0 -8
  147. package/utils/mergePropsWithDefaults.util.d.ts +0 -23
  148. package/utils/textFormatter.util.d.ts +0 -29
  149. package/wangsvue-fats.es.js +0 -123948
  150. package/wangsvue-fats.system.js +0 -478
@@ -1,34 +1,34 @@
1
- import { DialogConfirmProps } from '../dialogconfirm/DialogConfirm.vue.d';
2
- import { MenuItem } from '../menuitem';
1
+ import { DialogConfirmProps } from '../../components/dialogconfirm/DialogConfirm.vue.d';
2
+ import { MenuItem } from '../../components/menuitem';
3
3
  import { ClassComponent, HintedString } from '../ts-helpers.d';
4
4
  import { Component } from 'vue';
5
5
  import { DateOptions } from '../../utils/date.util';
6
6
 
7
7
  export interface DataTableLocaleConfig {
8
- /**
9
- * Message to display on loading ovevrlay while downloading
10
- */
11
- downloadingMessage: string;
12
-
13
- /**
14
- * Text when booleanValue is true
15
- */
16
- trueText: string;
17
-
18
- /**
19
- * Text when booleanValue is false
20
- */
21
- falseText: string;
8
+ /**
9
+ * Message to display on loading ovevrlay while downloading
10
+ */
11
+ downloadingMessage: string;
12
+
13
+ /**
14
+ * Text when booleanValue is true
15
+ */
16
+ trueText: string;
17
+
18
+ /**
19
+ * Text when booleanValue is false
20
+ */
21
+ falseText: string;
22
22
  }
23
23
 
24
24
  export type ChildGroup = {
25
- groupHeader: string;
26
- groupItems: Data[];
25
+ groupHeader: string;
26
+ groupItems: Data[];
27
27
  };
28
28
 
29
29
  export type Data = Record<string, any> & {
30
- children?: ChildGroup[];
31
- hasChildren?: boolean;
30
+ children?: ChildGroup[];
31
+ hasChildren?: boolean;
32
32
  };
33
33
 
34
34
  export type QueryParams = Partial<Record<string, any>>;
@@ -38,22 +38,22 @@ export type QueryParams = Partial<Record<string, any>>;
38
38
  * @see {@link BaseDataTableEmits.sort}
39
39
  */
40
40
  export interface DataTableSortEvent {
41
- /**
42
- * Browser event.
43
- */
44
- originalEvent: Event;
45
- /**
46
- * Number of rows to display in new page
47
- */
48
- rows: number;
49
- /**
50
- * Field to sort against
51
- */
52
- sortField: string | undefined;
53
- /**
54
- * Sort order as integer
55
- */
56
- sortOrder: 1 | 0 | -1 | undefined | null;
41
+ /**
42
+ * Browser event.
43
+ */
44
+ originalEvent: Event;
45
+ /**
46
+ * Number of rows to display in new page
47
+ */
48
+ rows: number;
49
+ /**
50
+ * Field to sort against
51
+ */
52
+ sortField: string | undefined;
53
+ /**
54
+ * Sort order as integer
55
+ */
56
+ sortOrder: 1 | 0 | -1 | undefined | null;
57
57
  }
58
58
 
59
59
  /**
@@ -62,349 +62,349 @@ export interface DataTableSortEvent {
62
62
  * @extends DataTableSortEvent
63
63
  */
64
64
  export interface DataTablePageEvent extends DataTableSortEvent {
65
- /**
66
- * New page number
67
- */
68
- page: number;
69
- /**
70
- * Total page count
71
- */
72
- pageCount: number;
65
+ /**
66
+ * New page number
67
+ */
68
+ page: number;
69
+ /**
70
+ * Total page count
71
+ */
72
+ pageCount: number;
73
73
  }
74
74
 
75
75
  /**
76
76
  * Custom datatable operator filter metadata.
77
77
  */
78
78
  export interface DataTableOperatorFilterMetaData {
79
- /**
80
- * Filter operator
81
- */
82
- operator: string;
83
- /**
84
- * Array of filter meta data.
85
- */
86
- constraints: DataTableFilterMetaData[];
79
+ /**
80
+ * Filter operator
81
+ */
82
+ operator: string;
83
+ /**
84
+ * Array of filter meta data.
85
+ */
86
+ constraints: DataTableFilterMetaData[];
87
87
  }
88
88
 
89
89
  /**
90
90
  * Custom datatable filter metadata.
91
91
  */
92
92
  export interface DataTableFilterMetaData {
93
- /**
94
- * Filter value
95
- */
96
- value: any;
97
- /**
98
- * Filter match mode
99
- */
100
- matchMode:
101
- | HintedString<
102
- | 'startsWith'
103
- | 'contains'
104
- | 'notContains'
105
- | 'endsWith'
106
- | 'equals'
107
- | 'notEquals'
108
- | 'in'
109
- | 'lt'
110
- | 'lte'
111
- | 'gt'
112
- | 'gte'
113
- | 'between'
114
- | 'dateIs'
115
- | 'dateIsNot'
116
- | 'dateBefore'
117
- | 'dateAfter'
118
- >
119
- | undefined;
93
+ /**
94
+ * Filter value
95
+ */
96
+ value: any;
97
+ /**
98
+ * Filter match mode
99
+ */
100
+ matchMode:
101
+ | HintedString<
102
+ | 'startsWith'
103
+ | 'contains'
104
+ | 'notContains'
105
+ | 'endsWith'
106
+ | 'equals'
107
+ | 'notEquals'
108
+ | 'in'
109
+ | 'lt'
110
+ | 'lte'
111
+ | 'gt'
112
+ | 'gte'
113
+ | 'between'
114
+ | 'dateIs'
115
+ | 'dateIsNot'
116
+ | 'dateBefore'
117
+ | 'dateAfter'
118
+ >
119
+ | undefined;
120
120
  }
121
121
 
122
122
  /**
123
123
  * Custom datatable filter metadata.
124
124
  */
125
125
  export interface DataTableFilterMeta {
126
- /**
127
- * Extra options
128
- */
129
- [key: string]:
130
- | string
131
- | DataTableFilterMetaData
132
- | DataTableOperatorFilterMetaData;
126
+ /**
127
+ * Extra options
128
+ */
129
+ [key: string]:
130
+ | string
131
+ | DataTableFilterMetaData
132
+ | DataTableOperatorFilterMetaData;
133
133
  }
134
134
 
135
135
  export type FetchResponse<T = Data> = {
136
- message: string;
137
- data: {
138
- data: T[];
139
- totalRecords: number;
140
- };
136
+ message: string;
137
+ data: {
138
+ data: T[];
139
+ totalRecords: number;
140
+ };
141
141
  };
142
142
 
143
143
  export type ShortFetchResponse<T = Data> = {
144
- status: number;
145
- message: string;
146
- data: T[];
144
+ status: number;
145
+ message: string;
146
+ data: T[];
147
147
  };
148
148
 
149
149
  export type TableCellComponent = {
150
- component: Component;
151
- props?: object;
152
- model?: any;
153
- events?: any;
154
- onChange?: (itemData: any) => void;
155
- disabled?: boolean;
150
+ component: Component;
151
+ props?: object;
152
+ model?: any;
153
+ events?: any;
154
+ onChange?: (itemData: any) => void;
155
+ disabled?: boolean;
156
156
  };
157
157
 
158
158
  export type TogglePresetConfirmDialogProps = Omit<
159
- DialogConfirmProps,
160
- 'visible' | 'list' | 'onConfirm'
159
+ DialogConfirmProps,
160
+ 'visible' | 'list' | 'onConfirm'
161
161
  > & {
162
- /**
163
- * When the dialog should be shown?
164
- * Pass a boolean returning function to show dialog when it returns true.
165
- *
166
- * @default both - leave this as undefined to show on both states
167
- */
168
- showWhen?:
169
- | 'active'
170
- | 'inactive'
171
- | ((data: any, state: boolean) => boolean)
172
- | ((data: any, state: boolean) => Promise<boolean>);
162
+ /**
163
+ * When the dialog should be shown?
164
+ * Pass a boolean returning function to show dialog when it returns true.
165
+ *
166
+ * @default both - leave this as undefined to show on both states
167
+ */
168
+ showWhen?:
169
+ | 'active'
170
+ | 'inactive'
171
+ | ((data: any, state: boolean) => boolean)
172
+ | ((data: any, state: boolean) => Promise<boolean>);
173
173
  };
174
174
 
175
175
  interface ColumnConfirmActionPresetBase {
176
- /**
177
- * Use dialog confirmation
178
- */
179
- confirmDialogProps?:
180
- | TogglePresetConfirmDialogProps
181
- | ((state: boolean, data: any) => TogglePresetConfirmDialogProps);
182
-
183
- /**
184
- * Callback for confirmation
185
- */
186
- onConfirm?: (state: boolean, data: any, revertFunction: () => void) => void;
176
+ /**
177
+ * Use dialog confirmation
178
+ */
179
+ confirmDialogProps?:
180
+ | TogglePresetConfirmDialogProps
181
+ | ((state: boolean, data: any) => TogglePresetConfirmDialogProps);
182
+
183
+ /**
184
+ * Callback for confirmation
185
+ */
186
+ onConfirm?: (state: boolean, data: any, revertFunction: () => void) => void;
187
187
  }
188
188
 
189
189
  export interface ColumnTogglePreset extends ColumnConfirmActionPresetBase {
190
- type: 'toggle';
191
-
192
- /**
193
- *
194
- * @param state boolean - the toggle state
195
- * @param revertFunction - function to revert previous state when action failed or canceled
196
- * @returns
197
- */
198
- onToggle?: (state: boolean, data: any, revertFunction: () => void) => void;
199
-
200
- /**
201
- * Add conditional disabling for each row
202
- */
203
- disabled?: boolean | ((data: any) => boolean);
190
+ type: 'toggle';
191
+
192
+ /**
193
+ *
194
+ * @param state boolean - the toggle state
195
+ * @param revertFunction - function to revert previous state when action failed or canceled
196
+ * @returns
197
+ */
198
+ onToggle?: (state: boolean, data: any, revertFunction: () => void) => void;
199
+
200
+ /**
201
+ * Add conditional disabling for each row
202
+ */
203
+ disabled?: boolean | ((data: any) => boolean);
204
204
  }
205
205
 
206
206
  export interface ColumnCheckboxPreset extends ColumnConfirmActionPresetBase {
207
- type: 'checkbox';
208
-
209
- /**
210
- *
211
- * @param state boolean - the checkbox state
212
- * @param revertFunction - function to revert previous state when action failed or canceled
213
- * @returns
214
- */
215
- onCheck?: (state: boolean, data: any, revertFunction: () => void) => void;
216
-
217
- /**
218
- * Add conditional disabling for each row
219
- */
220
- disabled?: boolean | ((data: any) => boolean);
207
+ type: 'checkbox';
208
+
209
+ /**
210
+ *
211
+ * @param state boolean - the checkbox state
212
+ * @param revertFunction - function to revert previous state when action failed or canceled
213
+ * @returns
214
+ */
215
+ onCheck?: (state: boolean, data: any, revertFunction: () => void) => void;
216
+
217
+ /**
218
+ * Add conditional disabling for each row
219
+ */
220
+ disabled?: boolean | ((data: any) => boolean);
221
221
  }
222
222
 
223
223
  export interface ColumnMultiRowPreset {
224
- type: 'multirow';
225
- fieldAttributes?: (data: any) => MultiRowAttribute[];
224
+ type: 'multirow';
225
+ fieldAttributes?: (data: any) => MultiRowAttribute[];
226
226
  }
227
227
 
228
228
  export interface MultiRowAttribute {
229
- class?: string | string[];
230
- value?: string;
231
- bodyComponent?: TableCellComponent;
229
+ class?: string | string[];
230
+ value?: string;
231
+ bodyComponent?: TableCellComponent;
232
232
  }
233
233
 
234
234
  export type ColumnPreset =
235
- | ColumnTogglePreset
236
- | ColumnMultiRowPreset
237
- | ColumnCheckboxPreset;
235
+ | ColumnTogglePreset
236
+ | ColumnMultiRowPreset
237
+ | ColumnCheckboxPreset;
238
238
 
239
239
  export interface TableColumn {
240
- header?: string;
241
- field: string;
242
- fieldType?: 'string' | 'number' | 'boolean' | 'array';
243
- info?: string;
244
- editable?: boolean;
245
- /**
246
- * If the column is editable, only allow number inputs.
247
- */
248
- numberInputOnly?: boolean;
249
- sortable?: boolean;
250
- /**
251
- * Whether the column can be re-ordered by column visibility.
252
- * If set to false, the column will not appear on column visibility.
253
- */
254
- reorderable?: boolean;
255
- /**
256
- * Make the column cannot reordered by disabled drag-ability.
257
- */
258
- dragable?: boolean;
259
- fixed?: boolean;
260
- visible?: boolean;
261
- /**
262
- * Use commonly used component as preset
263
- */
264
- preset?: ColumnPreset;
265
- /**
266
- * Whether the column is checked by default, only for Custom Report Table
267
- * @default true
268
- */
269
- checkedByDefault?: boolean;
270
- /**
271
- * The column width in pixel.
272
- */
273
- width?: number | string;
274
- /**
275
- * Exclude column from download/export excel.
276
- */
277
- excluded?: boolean;
278
- /**
279
- * Set the field for Export Excel, when you need to export different field of column field.
280
- *
281
- * @default undefined - the export field using column 'field'
282
- */
283
- exportField?: string;
284
- /**
285
- * Specify the header when exported
286
- */
287
- exportHeader?: string;
288
- /**
289
- * Specify the property or field which value in the array should be used for exporting to Excel.
290
- *
291
- * @example 'field.name.fullName'
292
- */
293
- arrayValueField?: string;
294
- /**
295
- * Download Excel Config
296
- *
297
- * When needs to export only the property has Truthy value, set this to true,
298
- * The Excel result will only get the property object which the value is truthy.
299
- *
300
- * @example
301
- * Example Object:
302
- * "roles": {
303
- * roleA: true,
304
- * roleB: true,
305
- * roleC: false,
306
- * roleD: null, // falsy
307
- * roleE: '', // falsy
308
- * roleF: 'role', // truthy
309
- * }
310
- *
311
- * The result will be: "roleA, roleB, roleF" - Only the properties with truthy values will be included.
312
- */
313
- includeTruthyProperties?: boolean;
314
- /**
315
- * Convert boolean into text Yes/No
316
- */
317
- booleanValue?: boolean;
318
- /**
319
- * Specify the options for formatting date values using the formatDate utility.
320
- *
321
- * The date format primarily uses the general settings configurations.
322
- * Within this property, you only need to set the `showTime` or `showDate` options.
323
- */
324
- dateFormatOptions?: DateOptions;
325
- /**
326
- * Set the fallback text when the cell value is empty. Used in export excel.
327
- *
328
- * @example 'N/A'
329
- */
330
- emptyText?: string;
331
- bodyTemplate?: (data: any, index: number) => string | undefined;
332
- bodyComponent?: (data: any, index: number) => TableCellComponent;
333
- headerTemplate?: () => string;
334
- headerComponent?: () => {
335
- component: string | Component;
336
- props?: any;
337
- model?: any;
338
- events?: any;
339
- onChange?: (data: any) => void;
340
- disabled?: boolean;
341
- };
342
- /**
343
- * Inline style of header, body and footer cells.
344
- */
345
- style?: string | (() => string);
346
- /**
347
- * Style class of header, body and footer cells.
348
- */
349
- class?: string | string[] | (() => string | string[]);
350
- /**
351
- * Inline style of the column header.
352
- */
353
- headerStyle?: string | (() => string);
354
- /**
355
- * Style class of the column header.
356
- */
357
- headerClass?: string | string[] | (() => string | string[]);
358
- /**
359
- * Inline style of the column body.
360
- */
361
- bodyStyle?: string | (() => string);
362
- /**
363
- * Style class of the column body.
364
- */
365
- bodyClass?: string | string[] | ((data?: any) => string | string[]);
240
+ header?: string;
241
+ field: string;
242
+ fieldType?: 'string' | 'number' | 'boolean' | 'array';
243
+ info?: string;
244
+ editable?: boolean;
245
+ /**
246
+ * If the column is editable, only allow number inputs.
247
+ */
248
+ numberInputOnly?: boolean;
249
+ sortable?: boolean;
250
+ /**
251
+ * Whether the column can be re-ordered by column visibility.
252
+ * If set to false, the column will not appear on column visibility.
253
+ */
254
+ reorderable?: boolean;
255
+ /**
256
+ * Make the column cannot reordered by disabled drag-ability.
257
+ */
258
+ dragable?: boolean;
259
+ fixed?: boolean;
260
+ visible?: boolean;
261
+ /**
262
+ * Use commonly used component as preset
263
+ */
264
+ preset?: ColumnPreset;
265
+ /**
266
+ * Whether the column is checked by default, only for Custom Report Table
267
+ * @default true
268
+ */
269
+ checkedByDefault?: boolean;
270
+ /**
271
+ * The column width in pixel.
272
+ */
273
+ width?: number | string;
274
+ /**
275
+ * Exclude column from download/export excel.
276
+ */
277
+ excluded?: boolean;
278
+ /**
279
+ * Set the field for Export Excel, when you need to export different field of column field.
280
+ *
281
+ * @default undefined - the export field using column 'field'
282
+ */
283
+ exportField?: string;
284
+ /**
285
+ * Specify the header when exported
286
+ */
287
+ exportHeader?: string;
288
+ /**
289
+ * Specify the property or field which value in the array should be used for exporting to Excel.
290
+ *
291
+ * @example 'field.name.fullName'
292
+ */
293
+ arrayValueField?: string;
294
+ /**
295
+ * Download Excel Config
296
+ *
297
+ * When needs to export only the property has Truthy value, set this to true,
298
+ * The Excel result will only get the property object which the value is truthy.
299
+ *
300
+ * @example
301
+ * Example Object:
302
+ * "roles": {
303
+ * roleA: true,
304
+ * roleB: true,
305
+ * roleC: false,
306
+ * roleD: null, // falsy
307
+ * roleE: '', // falsy
308
+ * roleF: 'role', // truthy
309
+ * }
310
+ *
311
+ * The result will be: "roleA, roleB, roleF" - Only the properties with truthy values will be included.
312
+ */
313
+ includeTruthyProperties?: boolean;
314
+ /**
315
+ * Convert boolean into text Yes/No
316
+ */
317
+ booleanValue?: boolean;
318
+ /**
319
+ * Specify the options for formatting date values using the formatDate utility.
320
+ *
321
+ * The date format primarily uses the general settings configurations.
322
+ * Within this property, you only need to set the `showTime` or `showDate` options.
323
+ */
324
+ dateFormatOptions?: DateOptions;
325
+ /**
326
+ * Set the fallback text when the cell value is empty. Used in export excel.
327
+ *
328
+ * @example 'N/A'
329
+ */
330
+ emptyText?: string;
331
+ bodyTemplate?: (data: any, index: number) => string | undefined;
332
+ bodyComponent?: (data: any, index: number) => TableCellComponent;
333
+ headerTemplate?: () => string;
334
+ headerComponent?: () => {
335
+ component: string | Component;
336
+ props?: any;
337
+ model?: any;
338
+ events?: any;
339
+ onChange?: (data: any) => void;
340
+ disabled?: boolean;
341
+ };
342
+ /**
343
+ * Inline style of header, body and footer cells.
344
+ */
345
+ style?: string | (() => string);
346
+ /**
347
+ * Style class of header, body and footer cells.
348
+ */
349
+ class?: string | string[] | (() => string | string[]);
350
+ /**
351
+ * Inline style of the column header.
352
+ */
353
+ headerStyle?: string | (() => string);
354
+ /**
355
+ * Style class of the column header.
356
+ */
357
+ headerClass?: string | string[] | (() => string | string[]);
358
+ /**
359
+ * Inline style of the column body.
360
+ */
361
+ bodyStyle?: string | (() => string);
362
+ /**
363
+ * Style class of the column body.
364
+ */
365
+ bodyClass?: string | string[] | ((data?: any) => string | string[]);
366
366
  }
367
367
 
368
368
  /**
369
369
  * Extending the base table column, tree table column will only available when props.treeTable is sets to be `true`
370
370
  */
371
371
  export interface TreeTableColumns extends TableColumn {
372
- /**
373
- * How much the column spanning
374
- */
375
- colspan?: number;
376
- /**
377
- * The list of parents columns fields
378
- * The colspan will be counted from it lengths
379
- * This column will be shown when at least one of parent columns is visible
380
- *
381
- * @example
382
- * This column spans from parent column A to C,
383
- * this property value should be ['a', 'b', 'c'],
384
- * which each value in array is a 'column.field' of the parent columns
385
- *
386
- * The counted colspan will be 3
387
- */
388
- parentColumnsFields?: string[];
372
+ /**
373
+ * How much the column spanning
374
+ */
375
+ colspan?: number;
376
+ /**
377
+ * The list of parents columns fields
378
+ * The colspan will be counted from it lengths
379
+ * This column will be shown when at least one of parent columns is visible
380
+ *
381
+ * @example
382
+ * This column spans from parent column A to C,
383
+ * this property value should be ['a', 'b', 'c'],
384
+ * which each value in array is a 'column.field' of the parent columns
385
+ *
386
+ * The counted colspan will be 3
387
+ */
388
+ parentColumnsFields?: string[];
389
389
  }
390
390
 
391
391
  /**
392
392
  * Emit payload for `cellEdited`
393
393
  */
394
394
  export interface DataTableCellEditedEvent {
395
- item: Data;
396
- field: string;
397
- index: number;
398
- value?: string;
395
+ item: Data;
396
+ field: string;
397
+ index: number;
398
+ value?: string;
399
399
  }
400
400
 
401
401
  /**
402
402
  * Emit payload for `rowReorder`
403
403
  */
404
404
  export interface DataTableRowReorderEvent {
405
- item: Data;
406
- fromIndex?: number;
407
- toIndex?: number;
405
+ item: Data;
406
+ fromIndex?: number;
407
+ toIndex?: number;
408
408
  }
409
409
 
410
410
  /**
@@ -412,305 +412,305 @@ export interface DataTableRowReorderEvent {
412
412
  * @see {@link DataTableEmits['row-click']}
413
413
  */
414
414
  export interface DataTableRowClickEvent {
415
- /**
416
- * Browser event.
417
- */
418
- originalEvent: Event;
419
- /**
420
- * Selected row data.
421
- */
422
- data: any;
423
- /**
424
- * Row index.
425
- */
426
- index: number;
415
+ /**
416
+ * Browser event.
417
+ */
418
+ originalEvent: Event;
419
+ /**
420
+ * Selected row data.
421
+ */
422
+ data: any;
423
+ /**
424
+ * Row index.
425
+ */
426
+ index: number;
427
427
  }
428
428
 
429
429
  export type ChildTableProps = Partial<Omit<TreeTableProps, 'fetchFunction'>> & {
430
- /**
431
- * Use the header of each column in child table
432
- *
433
- * @default false
434
- */
435
- useColumnsHeader?: boolean;
436
- /**
437
- * The function to fetch data on row expand
438
- */
439
- fetchFunction?: (
440
- parentData: Data,
441
- ) => Promise<ShortFetchResponse<ChildGroup> | undefined>;
430
+ /**
431
+ * Use the header of each column in child table
432
+ *
433
+ * @default false
434
+ */
435
+ useColumnsHeader?: boolean;
436
+ /**
437
+ * The function to fetch data on row expand
438
+ */
439
+ fetchFunction?: (
440
+ parentData: Data,
441
+ ) => Promise<ShortFetchResponse<ChildGroup> | undefined>;
442
442
  };
443
443
 
444
444
  export interface TreeTableProps
445
- extends Omit<
446
- BaseDataTableProps,
447
- 'columns' | 'treeTable' | 'childTableProps'
448
- > {
449
- /**
450
- * Activate tree table mode
451
- */
452
- treeTable?: true;
453
- /**
454
- * V-model single selection. Works with selectionType 'single'
455
- */
456
- singleSelection?: Data;
457
- /**
458
- * An array of table columns to display.
459
- */
460
- columns: TreeTableColumns[];
461
- /**
462
- * Properties to be passed into sub table
463
- */
464
- childTableProps?: ChildTableProps;
445
+ extends Omit<
446
+ BaseDataTableProps,
447
+ 'columns' | 'treeTable' | 'childTableProps'
448
+ > {
449
+ /**
450
+ * Activate tree table mode
451
+ */
452
+ treeTable?: true;
453
+ /**
454
+ * V-model single selection. Works with selectionType 'single'
455
+ */
456
+ singleSelection?: Data;
457
+ /**
458
+ * An array of table columns to display.
459
+ */
460
+ columns: TreeTableColumns[];
461
+ /**
462
+ * Properties to be passed into sub table
463
+ */
464
+ childTableProps?: ChildTableProps;
465
465
  }
466
466
 
467
467
  export interface BaseDataTableProps {
468
- /**
469
- * Disable tree table mode
470
- */
471
- treeTable?: false;
472
- childTableProps?: undefined;
473
- /**
474
- * Optional property to set a unique name for the table. This name will be used as part of the unique table ID.
475
- *
476
- * @optional
477
- */
478
- tableName?: string;
479
- /**
480
- * Optional property to set a unique name for the table. This name will be used as table title when export table into excel.
481
- *
482
- * @optional
483
- */
484
- tableTitle?: string;
485
- /**
486
- * An array of table columns to display.
487
- */
488
- columns: TableColumn[];
489
- /**
490
- * Whether show single action option.
491
- * @default true;
492
- */
493
- useOption?: boolean;
494
- /**
495
- * An array of objects to display in the table.
496
- */
497
- data?: Data[];
498
- /**
499
- * The key of the data object to use as a unique identifier.
500
- *
501
- * @default '_id'
502
- */
503
- dataKey?: string;
504
- /**
505
- * The key of the data object to determine whether the row data should be disabled.
506
- */
507
- disableKey?: string;
508
- /**
509
- * Determine whether disabled rows should be included in the check all process or not
510
- */
511
- includeCheckDisabledRows?: boolean;
512
- /**
513
- * The key of data object to determine whether the row data has context highlighted or not
514
- */
515
- highlightKey?: string;
516
- /**
517
- * Boolean to specify whether all rows should be disabled.
518
- */
519
- disableAllRows?: boolean;
520
- /**
521
- * The query search from ButtonSearch component.
522
- *
523
- * @deprecated - not fully supported, may not works properly
524
- */
525
- search?: string;
526
- /**
527
- * Tag query for search by scan
528
- * @deprecated - not fully supported, may not works properly
529
- */
530
- tag?: string;
531
- /**
532
- * The default query params that must be included every fetch request.
533
- */
534
- defaultQueryParams?: Readonly<Record<string, any>>;
535
- /**
536
- * The function to fetch data on DataTable mounted and on queryParams dependencies updated.
537
- *
538
- * @param params this is required
539
- */
540
- fetchFunction?: (params: QueryParams) => Promise<FetchResponse | undefined>;
541
- /**
542
- * The number of rows to display per page.
543
- * @defaultValue 5
544
- */
545
- rows?: number;
546
- /**
547
- * Whether all rows are selected or not.
548
- */
549
- isSelectedAll?: boolean;
550
- filters?: DataTableFilterMeta;
551
- /**
552
- * Determine the type of DataTable.
553
- *
554
- * Sets to lazy if you need to dynamically shows data.
555
- */
556
- lazy?: boolean;
557
- // Sets loading animation for DataTable that's not lazy.
558
- loading?: boolean;
559
- /**
560
- * Whether to enable 'checkbox' | 'single' selection.
561
- *
562
- * @default 'checkbox'
563
- */
564
- selectionType?: 'single' | 'checkbox' | 'none';
565
- /**
566
- * Whether to enable checkbox multi-selection.
567
- *
568
- * @deprecated use 'selection-type="checkbox"'
569
- */
570
- useSelection?: boolean;
571
- /**
572
- * An array of selected objects from `data`.
573
- */
574
- selectedData?: Data[];
575
- /**
576
- * An array of selected objects from `data`.
577
- */
578
- expandedRows?: { [key: string]: boolean };
579
- /**
580
- * Whether display pagination under the table or not.
581
- */
582
- usePaginator?: boolean;
583
- /**
584
- * The options that will be visible for each row data.
585
- *
586
- * __Provide at least one option to display an Options Menu for each row.__
587
- *
588
- * The options menu will be displayed on the right side of the table row.
589
- */
590
- options?: MenuItem[];
591
- /**
592
- * Whether to enable single selection or not.
593
- * If enabled, clicking a row will trigger the `rowSelect` event with the corresponding data object passed as a parameter.
594
- *
595
- * @deprecated use 'selection-type="single"'
596
- * @note Do not combine `singleSelect` with `useSelection`, as it may lead to unexpected behavior.
597
- */
598
- singleSelect?: boolean;
599
- /**
600
- * Whether the column is customizable or not.
601
- *
602
- * @default true - the table is able to reorder and toggle visibility column;
603
- */
604
- customColumn?: boolean;
605
- /**
606
- * Props to set scroll height, this will make table content scrollable
607
- * @example '50vh' or '300px'
608
- */
609
- scrollHeight?: string;
610
- /**
611
- * When the row height sets to fixed, it will have 35px height
612
- *
613
- * @defaultValue 'fixed'
614
- */
615
- rowHeight?: 'fixed' | 'auto';
616
- /**
617
- * To determine if row table is reorder-able
618
- */
619
- reorderable?: boolean;
620
- /**
621
- * An array of fields as string to use in global filtering.
622
- *
623
- * @default undefined - All fields are used
624
- */
625
- globalFilterFields?: string[];
626
- /**
627
- * Total disabled rows in table (used for synchronizing with bulk action button)
628
- */
629
- totalDisabledRows?: number;
630
- /**
631
- * Specify the error message download excel
632
- *
633
- * @example 'Error, failed to download {fileName}' - fileName will be replaced
634
- */
635
- excelToastErrorMessage?: string;
636
- /**
637
- * Custom message when data table is empty
638
- *
639
- * Will be shown bellow no-data animation
640
- */
641
- emptyTableMessage?: string;
468
+ /**
469
+ * Disable tree table mode
470
+ */
471
+ treeTable?: false;
472
+ childTableProps?: undefined;
473
+ /**
474
+ * Optional property to set a unique name for the table. This name will be used as part of the unique table ID.
475
+ *
476
+ * @optional
477
+ */
478
+ tableName?: string;
479
+ /**
480
+ * Optional property to set a unique name for the table. This name will be used as table title when export table into excel.
481
+ *
482
+ * @optional
483
+ */
484
+ tableTitle?: string;
485
+ /**
486
+ * An array of table columns to display.
487
+ */
488
+ columns: TableColumn[];
489
+ /**
490
+ * Whether show single action option.
491
+ * @default true;
492
+ */
493
+ useOption?: boolean;
494
+ /**
495
+ * An array of objects to display in the table.
496
+ */
497
+ data?: Data[];
498
+ /**
499
+ * The key of the data object to use as a unique identifier.
500
+ *
501
+ * @default '_id'
502
+ */
503
+ dataKey?: string;
504
+ /**
505
+ * The key of the data object to determine whether the row data should be disabled.
506
+ */
507
+ disableKey?: string;
508
+ /**
509
+ * Determine whether disabled rows should be included in the check all process or not
510
+ */
511
+ includeCheckDisabledRows?: boolean;
512
+ /**
513
+ * The key of data object to determine whether the row data has context highlighted or not
514
+ */
515
+ highlightKey?: string;
516
+ /**
517
+ * Boolean to specify whether all rows should be disabled.
518
+ */
519
+ disableAllRows?: boolean;
520
+ /**
521
+ * The query search from ButtonSearch component.
522
+ *
523
+ * @deprecated - not fully supported, may not works properly
524
+ */
525
+ search?: string;
526
+ /**
527
+ * Tag query for search by scan
528
+ * @deprecated - not fully supported, may not works properly
529
+ */
530
+ tag?: string;
531
+ /**
532
+ * The default query params that must be included every fetch request.
533
+ */
534
+ defaultQueryParams?: Readonly<Record<string, any>>;
535
+ /**
536
+ * The function to fetch data on DataTable mounted and on queryParams dependencies updated.
537
+ *
538
+ * @param params this is required
539
+ */
540
+ fetchFunction?: (params: QueryParams) => Promise<FetchResponse | undefined>;
541
+ /**
542
+ * The number of rows to display per page.
543
+ * @defaultValue 5
544
+ */
545
+ rows?: number;
546
+ /**
547
+ * Whether all rows are selected or not.
548
+ */
549
+ isSelectedAll?: boolean;
550
+ filters?: DataTableFilterMeta;
551
+ /**
552
+ * Determine the type of DataTable.
553
+ *
554
+ * Sets to lazy if you need to dynamically shows data.
555
+ */
556
+ lazy?: boolean;
557
+ // Sets loading animation for DataTable that's not lazy.
558
+ loading?: boolean;
559
+ /**
560
+ * Whether to enable 'checkbox' | 'single' selection.
561
+ *
562
+ * @default 'checkbox'
563
+ */
564
+ selectionType?: 'single' | 'checkbox' | 'none';
565
+ /**
566
+ * Whether to enable checkbox multi-selection.
567
+ *
568
+ * @deprecated use 'selection-type="checkbox"'
569
+ */
570
+ useSelection?: boolean;
571
+ /**
572
+ * An array of selected objects from `data`.
573
+ */
574
+ selectedData?: Data[];
575
+ /**
576
+ * An array of selected objects from `data`.
577
+ */
578
+ expandedRows?: { [key: string]: boolean };
579
+ /**
580
+ * Whether display pagination under the table or not.
581
+ */
582
+ usePaginator?: boolean;
583
+ /**
584
+ * The options that will be visible for each row data.
585
+ *
586
+ * __Provide at least one option to display an Options Menu for each row.__
587
+ *
588
+ * The options menu will be displayed on the right side of the table row.
589
+ */
590
+ options?: MenuItem[];
591
+ /**
592
+ * Whether to enable single selection or not.
593
+ * If enabled, clicking a row will trigger the `rowSelect` event with the corresponding data object passed as a parameter.
594
+ *
595
+ * @deprecated use 'selection-type="single"'
596
+ * @note Do not combine `singleSelect` with `useSelection`, as it may lead to unexpected behavior.
597
+ */
598
+ singleSelect?: boolean;
599
+ /**
600
+ * Whether the column is customizable or not.
601
+ *
602
+ * @default true - the table is able to reorder and toggle visibility column;
603
+ */
604
+ customColumn?: boolean;
605
+ /**
606
+ * Props to set scroll height, this will make table content scrollable
607
+ * @example '50vh' or '300px'
608
+ */
609
+ scrollHeight?: string;
610
+ /**
611
+ * When the row height sets to fixed, it will have 35px height
612
+ *
613
+ * @defaultValue 'fixed'
614
+ */
615
+ rowHeight?: 'fixed' | 'auto';
616
+ /**
617
+ * To determine if row table is reorder-able
618
+ */
619
+ reorderable?: boolean;
620
+ /**
621
+ * An array of fields as string to use in global filtering.
622
+ *
623
+ * @default undefined - All fields are used
624
+ */
625
+ globalFilterFields?: string[];
626
+ /**
627
+ * Total disabled rows in table (used for synchronizing with bulk action button)
628
+ */
629
+ totalDisabledRows?: number;
630
+ /**
631
+ * Specify the error message download excel
632
+ *
633
+ * @example 'Error, failed to download {fileName}' - fileName will be replaced
634
+ */
635
+ excelToastErrorMessage?: string;
636
+ /**
637
+ * Custom message when data table is empty
638
+ *
639
+ * Will be shown bellow no-data animation
640
+ */
641
+ emptyTableMessage?: string;
642
642
  }
643
643
 
644
644
  export type DataTableProps = BaseDataTableProps | TreeTableProps;
645
645
 
646
646
  export type BaseDataTableEmits = {
647
- /**
648
- * Emits when option menu button clicked.
649
- */
650
- 'toggleOption': [data: Data];
651
- /**
652
- * @deprecated use 'v-model:selected-data' instead.
653
- */
654
- 'selectData': [data: Data[]];
655
- 'rowSelect': [data: DataTableRowClickEvent];
656
- /**
657
- * Event emitted when the page changes in the data table.
658
- *
659
- * @event page
660
- * @param {DataTablePageEvent} data - The event data containing information about the new page.
661
- *
662
- * @example
663
- * <DataTable @page="handlePageChange" />
664
- *
665
- * This will call the `handlePageChange` method whenever the page changes in the data table.
666
- */
667
- 'page': [data: DataTablePageEvent];
668
-
669
- /**
670
- * Event emitted when the sort order changes in the data table.
671
- *
672
- * @event sort
673
- * @param {DataTableSortEvent} data - The event data containing information about the new sort order.
674
- *
675
- * @example
676
- * <DataTable @sort="handleSortChange" />
677
- *
678
- * This will call the `handleSortChange` method whenever the sort order changes in the data table.
679
- */
680
- 'sort': [data: DataTableSortEvent];
681
- /**
682
- * Event emitted when the `selectedData` property is updated.
683
- *
684
- * @event update:selectedData
685
- * @param {Data[]} datas - The updated array of selected data objects.
686
- *
687
- * @example
688
- * <DataTable v-model:selected-data="selectedData" />
689
- *
690
- * This will update the `selectedData` value whenever a row is selected or deselected.
691
- */
692
- 'update:selectedData': [datas: Data[]];
647
+ /**
648
+ * Emits when option menu button clicked.
649
+ */
650
+ 'toggleOption': [data: Data];
651
+ /**
652
+ * @deprecated use 'v-model:selected-data' instead.
653
+ */
654
+ 'selectData': [data: Data[]];
655
+ 'rowSelect': [data: DataTableRowClickEvent];
656
+ /**
657
+ * Event emitted when the page changes in the data table.
658
+ *
659
+ * @event page
660
+ * @param {DataTablePageEvent} data - The event data containing information about the new page.
661
+ *
662
+ * @example
663
+ * <DataTable @page="handlePageChange" />
664
+ *
665
+ * This will call the `handlePageChange` method whenever the page changes in the data table.
666
+ */
667
+ 'page': [data: DataTablePageEvent];
668
+
669
+ /**
670
+ * Event emitted when the sort order changes in the data table.
671
+ *
672
+ * @event sort
673
+ * @param {DataTableSortEvent} data - The event data containing information about the new sort order.
674
+ *
675
+ * @example
676
+ * <DataTable @sort="handleSortChange" />
677
+ *
678
+ * This will call the `handleSortChange` method whenever the sort order changes in the data table.
679
+ */
680
+ 'sort': [data: DataTableSortEvent];
681
+ /**
682
+ * Event emitted when the `selectedData` property is updated.
683
+ *
684
+ * @event update:selectedData
685
+ * @param {Data[]} datas - The updated array of selected data objects.
686
+ *
687
+ * @example
688
+ * <DataTable v-model:selected-data="selectedData" />
689
+ *
690
+ * This will update the `selectedData` value whenever a row is selected or deselected.
691
+ */
692
+ 'update:selectedData': [datas: Data[]];
693
693
  };
694
694
 
695
695
  export type TreeTableEmits = BaseDataTableEmits & {
696
- /**
697
- * Emitted when a row is clicked/selected. Only available on `single` selectionType
698
- */
699
- 'update:singleSelection': [data: Data];
700
- /**
701
- * Emitted when cell has lost focus.
702
- */
703
- 'cellEdited': [payload: DataTableCellEditedEvent];
704
- /**
705
- * @deprecated - use new emits `cellEdited`
706
- */
707
- 'input': [payload: DataTableCellEditedEvent];
708
- /**
709
- * Emitted on Drop Event occurred after dragging a row.
710
- * Only available on
711
- *
712
- */
713
- 'rowReorder': [payload?: DataTableRowReorderEvent];
696
+ /**
697
+ * Emitted when a row is clicked/selected. Only available on `single` selectionType
698
+ */
699
+ 'update:singleSelection': [data: Data];
700
+ /**
701
+ * Emitted when cell has lost focus.
702
+ */
703
+ 'cellEdited': [payload: DataTableCellEditedEvent];
704
+ /**
705
+ * @deprecated - use new emits `cellEdited`
706
+ */
707
+ 'input': [payload: DataTableCellEditedEvent];
708
+ /**
709
+ * Emitted on Drop Event occurred after dragging a row.
710
+ * Only available on
711
+ *
712
+ */
713
+ 'rowReorder': [payload?: DataTableRowReorderEvent];
714
714
  };
715
715
 
716
716
  export type DataTableEmits = TreeTableEmits;
@@ -727,9 +727,9 @@ export type DataTableEmits = TreeTableEmits;
727
727
  * @group Component
728
728
  */
729
729
  declare class DataTable extends ClassComponent<
730
- DataTableProps,
731
- Record<string, unknown>,
732
- DataTableEmits
730
+ DataTableProps,
731
+ Record<string, unknown>,
732
+ DataTableEmits
733
733
  > {}
734
734
 
735
735
  export default DataTable;