@fewangsit/wangsvue-gsts 1.0.0-alpha.2 → 1.0.0-alpha.20
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.
- package/components/animation/Animation.vue.d.ts +1 -1
- package/components/badge/Badge.vue.d.ts +11 -2
- package/components/badgegroup/BadgeGroup.vue.d.ts +19 -4
- package/components/basetree/BaseTree.vue.d.ts +24 -0
- package/components/button/Button.vue.d.ts +12 -4
- package/components/buttonbulkaction/ButtonBulkAction.vue.d.ts +7 -0
- package/components/buttoncopy/ButtonCopy.vue.d.ts +26 -0
- package/components/buttonselecttree/ButtonSelectTree.vue.d.ts +8 -3
- package/components/calendar/BaseCalendar.vue.d.ts +4 -1
- package/components/calendar/Calendar.vue.d.ts +9 -0
- package/components/datatable/DataTable.vue.d.ts +35 -5
- package/components/dialogconfirm/DialogConfirm.vue.d.ts +14 -2
- package/components/dialogselecttree/DialogSelectTree.vue.d.ts +30 -5
- package/components/dropdown/Dropdown.vue.d.ts +9 -2
- package/components/fileupload/FileUpload.vue.d.ts +22 -2
- package/components/filtercontainer/FilterContainer.vue.d.ts +49 -9
- package/components/filtercontainer/helpers/applyFilter.helper.d.ts +2 -0
- package/components/form/Form.vue.d.ts +5 -0
- package/components/icon/Icon.vue.d.ts +7 -0
- package/components/imagecompressor/ImageCompressor.vue.d.ts +33 -1
- package/components/index.d.ts +2 -1
- package/components/inputurl/InputURL.vue.d.ts +1 -1
- package/components/litedropdown/LiteDropdown.vue.d.ts +1 -1
- package/components/multiselect/MultiSelect.vue.d.ts +1 -1
- package/components/tabmenu/TabMenu.vue.d.ts +1 -1
- package/components/tree/Tree.vue.d.ts +5 -3
- package/components/ts-helpers.d.ts +20 -0
- package/components/username/UserName.vue.d.ts +69 -17
- package/event-bus/index.d.ts +3 -0
- package/loading-table-Bdr9ZhtP.js +1 -0
- package/loading-table-D9bw9OcI.js +4 -0
- package/package.json +2 -2
- package/plugins/WangsVue.d.ts +10 -2
- package/style.css +1 -1
- package/types/options.type.d.ts +1 -1
- package/utils/addAttachment.util.d.ts +43 -0
- package/utils/date.util.d.ts +9 -0
- package/utils/index.d.ts +3 -1
- package/utils/object.util.d.ts +8 -1
- package/utils/toast.util.d.ts +2 -113
- package/wangsvue-gsts.es.js +24748 -26138
- package/wangsvue-gsts.system.js +133 -133
- package/assets/lottie/admin/loading-page.lottie +0 -0
- package/assets/lottie/admin/loading-table.lottie +0 -0
- package/assets/lottie/admin/no-data.lottie +0 -0
- package/assets/lottie/supplyasset/loading-page.lottie +0 -0
- package/assets/lottie/supplyasset/loading-table.lottie +0 -0
- package/assets/lottie/supplyasset/no-data.lottie +0 -0
- package/assets/lottie/workspace/loading-page.lottie +0 -0
- package/assets/lottie/workspace/loading-plane.lottie +0 -0
- package/assets/lottie/workspace/loading-table.lottie +0 -0
- package/assets/lottie/workspace/no-data.lottie +0 -0
- package/loading-table-Bb2MtjdD.js +0 -4
- package/loading-table-Br25QIny.js +0 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { ClassComponent } from '
|
|
1
|
+
import { ClassComponent } from '../.././components/ts-helpers';
|
|
2
|
+
|
|
2
3
|
|
|
3
4
|
export interface BadgeComponentConfigs {
|
|
4
5
|
/**
|
|
@@ -25,7 +26,15 @@ export interface BadgeProps extends BadgeComponentConfigs {
|
|
|
25
26
|
/**
|
|
26
27
|
* Sets the severity level for styling purposes. This prop might be omitted if getSeverity is provided.
|
|
27
28
|
*/
|
|
28
|
-
severity?:
|
|
29
|
+
severity?:
|
|
30
|
+
| 'success'
|
|
31
|
+
| 'info'
|
|
32
|
+
| 'danger'
|
|
33
|
+
| 'warning'
|
|
34
|
+
| 'dark'
|
|
35
|
+
| 'primary'
|
|
36
|
+
| 'fixed-primary'
|
|
37
|
+
| 'supply-primary';
|
|
29
38
|
/**
|
|
30
39
|
* Specifies the format for text truncation rules based on the usage context.
|
|
31
40
|
*/
|
|
@@ -1,10 +1,18 @@
|
|
|
1
1
|
import { Slot } from 'vue';
|
|
2
|
-
import { BadgeProps } from '
|
|
3
|
-
import { ClassComponent, HintedString } from '
|
|
2
|
+
import { BadgeProps } from '../.././components/badge/Badge.vue.d';
|
|
3
|
+
import { ClassComponent, HintedString } from '../.././components/ts-helpers';
|
|
4
|
+
|
|
4
5
|
|
|
5
6
|
export type ObjectBadge = {
|
|
6
7
|
text: string;
|
|
7
|
-
severity:
|
|
8
|
+
severity:
|
|
9
|
+
| 'success'
|
|
10
|
+
| 'danger'
|
|
11
|
+
| 'warning'
|
|
12
|
+
| 'dark'
|
|
13
|
+
| 'primary'
|
|
14
|
+
| 'fixed-primary'
|
|
15
|
+
| 'supply-primary';
|
|
8
16
|
};
|
|
9
17
|
|
|
10
18
|
export interface BadgeGroupProps
|
|
@@ -19,7 +27,14 @@ export interface BadgeGroupProps
|
|
|
19
27
|
* @default undefined
|
|
20
28
|
*/
|
|
21
29
|
textMoreSeverity?: HintedString<
|
|
22
|
-
|
|
30
|
+
| 'secondary'
|
|
31
|
+
| 'info'
|
|
32
|
+
| 'success'
|
|
33
|
+
| 'warning'
|
|
34
|
+
| 'danger'
|
|
35
|
+
| 'contrast'
|
|
36
|
+
| 'fixed-primary'
|
|
37
|
+
| 'supply-primary'
|
|
23
38
|
>;
|
|
24
39
|
/**
|
|
25
40
|
* The text shown on the more button
|
|
@@ -420,6 +420,30 @@ export interface BaseTreeProps {
|
|
|
420
420
|
* @default false
|
|
421
421
|
*/
|
|
422
422
|
useOption?: boolean;
|
|
423
|
+
|
|
424
|
+
/**
|
|
425
|
+
* A function to determine when the node should be disabled,
|
|
426
|
+
* When true, it will disabled selection on current node and all level childrend
|
|
427
|
+
*
|
|
428
|
+
* @return true to disabled
|
|
429
|
+
*/
|
|
430
|
+
disableNodeWhen?: (node: TreeNode) => boolean;
|
|
431
|
+
|
|
432
|
+
/**
|
|
433
|
+
* A function to determine when the node should be disabled
|
|
434
|
+
* It will only disable current node
|
|
435
|
+
*
|
|
436
|
+
* @return true to disabled
|
|
437
|
+
*/
|
|
438
|
+
exactDisableNodeWhen?: (node: TreeNode) => boolean;
|
|
439
|
+
|
|
440
|
+
/**
|
|
441
|
+
* A function to determine when the node should selected
|
|
442
|
+
* It will only disable current node when propagateSelection false
|
|
443
|
+
*
|
|
444
|
+
* @return true to disabled
|
|
445
|
+
*/
|
|
446
|
+
nodeSelectedWhen?: (node: TreeNode) => boolean;
|
|
423
447
|
}
|
|
424
448
|
|
|
425
449
|
/**
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { ButtonHTMLAttributes, VNode } from 'vue';
|
|
2
|
-
import { WangsIcons } from '../icon/Icon.vue.d';
|
|
3
2
|
import { TooltipOptions } from 'primevue/tooltip';
|
|
4
|
-
import { GlobalComponentConstructor } from '
|
|
5
|
-
import { ClassComponent, HintedString } from '
|
|
3
|
+
import { GlobalComponentConstructor } from '../.././components/ts-helpers.d';
|
|
4
|
+
import { ClassComponent, HintedString } from '../.././components/ts-helpers';
|
|
5
|
+
import { WangsIcons } from '../.././components/icon/Icon.vue.d';
|
|
6
|
+
|
|
6
7
|
|
|
7
8
|
/**
|
|
8
9
|
* Defines valid properties in Button component.
|
|
@@ -55,7 +56,14 @@ export interface ButtonProps extends /* @vue-ignore */ ButtonHTMLAttributes {
|
|
|
55
56
|
*/
|
|
56
57
|
badgeSeverity?:
|
|
57
58
|
| HintedString<
|
|
58
|
-
|
|
59
|
+
| 'secondary'
|
|
60
|
+
| 'info'
|
|
61
|
+
| 'success'
|
|
62
|
+
| 'warning'
|
|
63
|
+
| 'danger'
|
|
64
|
+
| 'contrast'
|
|
65
|
+
| 'fixed-primary'
|
|
66
|
+
| 'supply-primary'
|
|
59
67
|
>
|
|
60
68
|
| null
|
|
61
69
|
| undefined;
|
|
@@ -52,6 +52,13 @@ export interface ButtonBulkActionProps {
|
|
|
52
52
|
* @options dropdown overlay-panel
|
|
53
53
|
*/
|
|
54
54
|
selectMenuType?: 'dropdown' | 'overlay-panel';
|
|
55
|
+
/**
|
|
56
|
+
* Specify the name/label for selected data.
|
|
57
|
+
*
|
|
58
|
+
* @example 'Asset(s)' will be displayed as '3 Asset(s) Selected'
|
|
59
|
+
* @default 'Data' for all packages
|
|
60
|
+
*/
|
|
61
|
+
naming?: string;
|
|
55
62
|
}
|
|
56
63
|
|
|
57
64
|
export interface ButtonBulkActionSlots {
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { DefineComponent } from 'vue';
|
|
2
|
+
|
|
3
|
+
export interface ButtonCopyProps {
|
|
4
|
+
/**
|
|
5
|
+
* Text to be copied.
|
|
6
|
+
*/
|
|
7
|
+
text: string;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* **WangsVue - ButtonCopy**
|
|
12
|
+
*
|
|
13
|
+
* _ButtonCopy is a component for copying text to the clipboard._
|
|
14
|
+
*
|
|
15
|
+
* --- ---
|
|
16
|
+
* 
|
|
17
|
+
*
|
|
18
|
+
* @group buttons
|
|
19
|
+
*/
|
|
20
|
+
declare const ButtonCopy: DefineComponent<
|
|
21
|
+
ButtonCopyProps,
|
|
22
|
+
Record<string, unknown>,
|
|
23
|
+
Record<string, unknown>
|
|
24
|
+
>;
|
|
25
|
+
|
|
26
|
+
export default ButtonCopy;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Slot } from 'vue';
|
|
1
2
|
import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
|
|
2
3
|
import { TreeNode } from '../basetree/BaseTree.vue.d';
|
|
3
4
|
import { ShortFetchResponse } from '../datatable/DataTable.vue.d';
|
|
@@ -98,7 +99,7 @@ export interface ButtonSelectTreeProps {
|
|
|
98
99
|
*/
|
|
99
100
|
disableNodeAll?: boolean;
|
|
100
101
|
/**
|
|
101
|
-
*
|
|
102
|
+
* Old behavior is preventing select if there is no node selected.
|
|
102
103
|
*
|
|
103
104
|
* This props comes to make options, wether the selection can be empty or not.
|
|
104
105
|
* @default true
|
|
@@ -168,6 +169,10 @@ export type ButtonSelectTreeEmits = {
|
|
|
168
169
|
'reset': [];
|
|
169
170
|
};
|
|
170
171
|
|
|
172
|
+
export interface ButtonSelectTreeSlots {
|
|
173
|
+
treenode: Slot<{ node: TreeNode }>;
|
|
174
|
+
}
|
|
175
|
+
|
|
171
176
|
/**
|
|
172
177
|
* **TSVue v2 - ButtonSelectTree**
|
|
173
178
|
*
|
|
@@ -180,8 +185,8 @@ export type ButtonSelectTreeEmits = {
|
|
|
180
185
|
*/
|
|
181
186
|
declare class ButtonSelectTree extends ClassComponent<
|
|
182
187
|
ButtonSelectTreeProps,
|
|
183
|
-
|
|
184
|
-
|
|
188
|
+
ButtonSelectTreeSlots,
|
|
189
|
+
ButtonSelectTreeEmits
|
|
185
190
|
> {}
|
|
186
191
|
|
|
187
192
|
declare module '@vue/runtime-core' {
|
|
@@ -18,6 +18,7 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_WithDefaults<
|
|
|
18
18
|
stepHour: number;
|
|
19
19
|
stepMinute: number;
|
|
20
20
|
timeSeparator: string;
|
|
21
|
+
exactSelection: boolean;
|
|
21
22
|
}>, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
22
23
|
"update:modelValue": (date: Date | Date[]) => void;
|
|
23
24
|
"update:epochTimeMillis": (millis?: number | number[]) => void;
|
|
@@ -37,6 +38,7 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_WithDefaults<
|
|
|
37
38
|
stepHour: number;
|
|
38
39
|
stepMinute: number;
|
|
39
40
|
timeSeparator: string;
|
|
41
|
+
exactSelection: boolean;
|
|
40
42
|
}>>> & {
|
|
41
43
|
"onUpdate:modelValue"?: (date: Date | Date[]) => any;
|
|
42
44
|
"onUpdate:epochTimeMillis"?: (millis?: number | number[]) => any;
|
|
@@ -48,14 +50,15 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_WithDefaults<
|
|
|
48
50
|
showOptionalText: boolean;
|
|
49
51
|
mode: "range" | "single";
|
|
50
52
|
view: "date" | "month" | "year" | undefined;
|
|
51
|
-
valueFormat: "date" | "millis";
|
|
52
53
|
selectionMode: "range" | "single";
|
|
54
|
+
valueFormat: "date" | "millis";
|
|
53
55
|
hideOnRangeSelection: boolean | undefined;
|
|
54
56
|
showYear: boolean;
|
|
55
57
|
hourFormat: "12" | "24" | undefined;
|
|
56
58
|
timeSeparator: string | undefined;
|
|
57
59
|
stepHour: number | undefined;
|
|
58
60
|
stepMinute: number | undefined;
|
|
61
|
+
exactSelection: boolean;
|
|
59
62
|
}, {}>;
|
|
60
63
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
|
|
61
64
|
export default _default;
|
|
@@ -495,6 +495,15 @@ export interface CalendarProps {
|
|
|
495
495
|
* @todo Support number, currently only support 'current'
|
|
496
496
|
*/
|
|
497
497
|
maxMonth?: 'current' | number | undefined;
|
|
498
|
+
/**
|
|
499
|
+
* When using range selection mode, selecting only the "start date" (without an "end date") will, by default, return a range ending 24 hours later.
|
|
500
|
+
* Enabling this prop will instead return the exact dates selected, without adding an extra day.
|
|
501
|
+
*
|
|
502
|
+
* @example Selecting dates from the 1st to the 5th will return an array of epoch timestamps for each day: [1st, 2nd, 3rd, 4th, 5th].
|
|
503
|
+
* @default false
|
|
504
|
+
* @requires selectionMode = 'range'
|
|
505
|
+
*/
|
|
506
|
+
exactSelection?: boolean;
|
|
498
507
|
}
|
|
499
508
|
|
|
500
509
|
/**
|
|
@@ -1,8 +1,25 @@
|
|
|
1
|
-
import { DialogConfirmProps } from '
|
|
2
|
-
import { MenuItem } from '
|
|
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
|
-
import { DateOptions } from '
|
|
5
|
+
import { DateOptions } from '../../utils/date.util';
|
|
6
|
+
|
|
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;
|
|
22
|
+
}
|
|
6
23
|
|
|
7
24
|
export type ChildGroup = {
|
|
8
25
|
groupHeader: string;
|
|
@@ -151,8 +168,8 @@ export type TogglePresetConfirmDialogProps = Omit<
|
|
|
151
168
|
showWhen?:
|
|
152
169
|
| 'active'
|
|
153
170
|
| 'inactive'
|
|
154
|
-
| ((data: any) => boolean)
|
|
155
|
-
| ((data: any) => Promise<boolean>);
|
|
171
|
+
| ((data: any, state: boolean) => boolean)
|
|
172
|
+
| ((data: any, state: boolean) => Promise<boolean>);
|
|
156
173
|
};
|
|
157
174
|
|
|
158
175
|
interface ColumnConfirmActionPresetBase {
|
|
@@ -304,6 +321,12 @@ export interface TableColumn {
|
|
|
304
321
|
* Within this property, you only need to set the `showTime` or `showDate` options.
|
|
305
322
|
*/
|
|
306
323
|
dateFormatOptions?: DateOptions;
|
|
324
|
+
/**
|
|
325
|
+
* Set the fallback text when the cell value is empty. Used in export excel.
|
|
326
|
+
*
|
|
327
|
+
* @example 'N/A'
|
|
328
|
+
*/
|
|
329
|
+
emptyText?: string;
|
|
307
330
|
bodyTemplate?: (data: any, index: number) => string | undefined;
|
|
308
331
|
bodyComponent?: (data: any, index: number) => TableCellComponent;
|
|
309
332
|
headerTemplate?: () => string;
|
|
@@ -495,10 +518,13 @@ export interface BaseDataTableProps {
|
|
|
495
518
|
disableAllRows?: boolean;
|
|
496
519
|
/**
|
|
497
520
|
* The query search from ButtonSearch component.
|
|
521
|
+
*
|
|
522
|
+
* @deprecated - not fully supported, may not works properly
|
|
498
523
|
*/
|
|
499
524
|
search?: string;
|
|
500
525
|
/**
|
|
501
526
|
* Tag query for search by scan
|
|
527
|
+
* @deprecated - not fully supported, may not works properly
|
|
502
528
|
*/
|
|
503
529
|
tag?: string;
|
|
504
530
|
/**
|
|
@@ -592,6 +618,8 @@ export interface BaseDataTableProps {
|
|
|
592
618
|
reorderable?: boolean;
|
|
593
619
|
/**
|
|
594
620
|
* An array of fields as string to use in global filtering.
|
|
621
|
+
*
|
|
622
|
+
* @default undefined - All fields are used
|
|
595
623
|
*/
|
|
596
624
|
globalFilterFields?: string[];
|
|
597
625
|
/**
|
|
@@ -600,6 +628,8 @@ export interface BaseDataTableProps {
|
|
|
600
628
|
totalDisabledRows?: number;
|
|
601
629
|
/**
|
|
602
630
|
* Specify the error message download excel
|
|
631
|
+
*
|
|
632
|
+
* @example 'Error, failed to download {fileName}' - fileName will be replaced
|
|
603
633
|
*/
|
|
604
634
|
excelToastErrorMessage?: string;
|
|
605
635
|
/**
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import { WangsIcons } from '../.././components/icon/Icon.vue.d';
|
|
2
|
+
import { ClassComponent } from '../.././components/ts-helpers';
|
|
3
|
+
import { GlobalComponentConstructor } from '../.././components/ts-helpers.d';
|
|
1
4
|
import { Slot } from 'vue';
|
|
2
|
-
|
|
3
|
-
import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
|
|
5
|
+
|
|
4
6
|
|
|
5
7
|
type ConfirmDialogSeverity = 'success' | 'danger';
|
|
6
8
|
|
|
@@ -31,6 +33,16 @@ export interface DialogConfirmProps {
|
|
|
31
33
|
* The severity will determine the dialog icons and color scheme.
|
|
32
34
|
*/
|
|
33
35
|
severity: ConfirmDialogSeverity;
|
|
36
|
+
/**
|
|
37
|
+
* The severity of the confirm button.
|
|
38
|
+
* The severity will determine the confirm button color scheme in case button severity is different from header/dialog severity.
|
|
39
|
+
*
|
|
40
|
+
* @default undefined - to fallback to props.severity
|
|
41
|
+
*/
|
|
42
|
+
confirmButtonSeverity?:
|
|
43
|
+
| ConfirmDialogSeverity
|
|
44
|
+
| 'fixed-primary'
|
|
45
|
+
| 'supply-primary';
|
|
34
46
|
/**
|
|
35
47
|
* The boolean modelValue to show dialog.
|
|
36
48
|
*/
|
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
import { TreeSelectionKeys } from 'primevue/tree';
|
|
2
2
|
import { TreeNode } from '../basetree/BaseTree.vue.d';
|
|
3
|
-
import { ShortFetchResponse } from '../datatable/DataTable.vue.d';
|
|
3
|
+
import { QueryParams, ShortFetchResponse } from '../datatable/DataTable.vue.d';
|
|
4
4
|
import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
|
|
5
|
-
import TreeInstance from '../tree/Tree.vue.d';
|
|
5
|
+
import TreeInstance, { TreeProps } from '../tree/Tree.vue.d';
|
|
6
|
+
import { Slot } from 'vue';
|
|
6
7
|
|
|
7
|
-
export interface DialogSelectTreeProps
|
|
8
|
+
export interface DialogSelectTreeProps
|
|
9
|
+
extends Omit<TreeProps, 'type' | 'filter'> {
|
|
8
10
|
fetchTree?: (
|
|
9
11
|
type: 'group' | 'category',
|
|
12
|
+
params?: QueryParams,
|
|
10
13
|
) => Promise<ShortFetchResponse<TreeNode> | undefined>;
|
|
14
|
+
params?: QueryParams;
|
|
11
15
|
visible?: boolean;
|
|
12
16
|
type?: 'group' | 'category';
|
|
13
17
|
/**
|
|
@@ -19,7 +23,7 @@ export interface DialogSelectTreeProps {
|
|
|
19
23
|
subHeader?: string;
|
|
20
24
|
selectionMode?: 'single' | 'checkbox';
|
|
21
25
|
/**
|
|
22
|
-
*
|
|
26
|
+
* Current behavior is preventing select if there is no node selected.
|
|
23
27
|
*
|
|
24
28
|
* @default true
|
|
25
29
|
*/
|
|
@@ -73,6 +77,8 @@ export interface DialogSelectTreeProps {
|
|
|
73
77
|
* Render hidden dialog to trigger fetch tree
|
|
74
78
|
*/
|
|
75
79
|
hidden?: boolean;
|
|
80
|
+
|
|
81
|
+
propagateSelection?: boolean;
|
|
76
82
|
}
|
|
77
83
|
|
|
78
84
|
export type TreeSelectPayload = {
|
|
@@ -86,6 +92,25 @@ export type DialogSelectTreeEmits = {
|
|
|
86
92
|
hide: [];
|
|
87
93
|
};
|
|
88
94
|
|
|
95
|
+
export interface DialogSelectTreeSlots {
|
|
96
|
+
header: Slot<{
|
|
97
|
+
dialogHeader: string;
|
|
98
|
+
subHeader?: string;
|
|
99
|
+
lists?: (string | object)[];
|
|
100
|
+
listLabel?: string;
|
|
101
|
+
isLoading: boolean;
|
|
102
|
+
filter: string;
|
|
103
|
+
updateFilter: (newFilter?: string) => void; // Hooks to update internal state filter
|
|
104
|
+
}>;
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* Slot to customize tree node item
|
|
108
|
+
*/
|
|
109
|
+
treenode: Slot<{ node: TreeNode; checked: boolean; disabled: boolean }>;
|
|
110
|
+
|
|
111
|
+
footer: Slot;
|
|
112
|
+
}
|
|
113
|
+
|
|
89
114
|
/**
|
|
90
115
|
* **TSVue v2 - DialogSelectTree**
|
|
91
116
|
*
|
|
@@ -96,7 +121,7 @@ export type DialogSelectTreeEmits = {
|
|
|
96
121
|
*/
|
|
97
122
|
declare class DialogSelectTree extends ClassComponent<
|
|
98
123
|
DialogSelectTreeProps,
|
|
99
|
-
|
|
124
|
+
DialogSelectTreeSlots,
|
|
100
125
|
DialogSelectTreeEmits
|
|
101
126
|
> {
|
|
102
127
|
treeComponent: TreeInstance;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Slot } from 'vue';
|
|
2
|
-
import { DropdownOption, OptionValue } from '
|
|
2
|
+
import { DropdownOption, OptionValue } from '../../types/options.type';
|
|
3
3
|
import { CustomValidation } from '../form/Form.vue.d';
|
|
4
4
|
import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
|
|
5
|
-
import { BadgeProps } from '
|
|
5
|
+
import { BadgeProps } from '../../components/badge/Badge.vue.d';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Configuration interface for localizing dropdown component placeholders and error messages.
|
|
@@ -79,6 +79,13 @@ export interface DropdownProps {
|
|
|
79
79
|
*/
|
|
80
80
|
options?: DropdownOption[] | string[] | Record<string, any>;
|
|
81
81
|
|
|
82
|
+
/**
|
|
83
|
+
* Allows `null` to be treated as a valid selectable option in the dropdown.
|
|
84
|
+
*
|
|
85
|
+
* When enabled, `null` can be included in the options list and selected by the user.
|
|
86
|
+
*/
|
|
87
|
+
allowNullOption?: boolean;
|
|
88
|
+
|
|
82
89
|
/**
|
|
83
90
|
* Specify the property name of option to be used as label.
|
|
84
91
|
*
|
|
@@ -24,6 +24,18 @@ export type FileUploadProps = {
|
|
|
24
24
|
* Maximum file size allowed in bytes.
|
|
25
25
|
*/
|
|
26
26
|
maxFileSize?: number | undefined;
|
|
27
|
+
/**
|
|
28
|
+
* Sets the initial value of the field.
|
|
29
|
+
* This will only available with option 'useValidator'.
|
|
30
|
+
* If you use this prop, it is not recommended to use 'v-model' to avoid unexpected behavior.
|
|
31
|
+
*/
|
|
32
|
+
value?: File | File[];
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* V-model for the file upload component.
|
|
36
|
+
*/
|
|
37
|
+
modelValue?: File | File[];
|
|
38
|
+
|
|
27
39
|
/**
|
|
28
40
|
* Props to determine whether file upload support multiple files or not
|
|
29
41
|
*
|
|
@@ -116,14 +128,22 @@ export type FileUploadProps = {
|
|
|
116
128
|
};
|
|
117
129
|
|
|
118
130
|
export type FileUploadEmits = {
|
|
131
|
+
/**
|
|
132
|
+
* Callback to invoke when there is a file selected.
|
|
133
|
+
*/
|
|
134
|
+
'select': [event: File | File[]];
|
|
135
|
+
/**
|
|
136
|
+
* Callback to invoke when model changed.
|
|
137
|
+
*/
|
|
138
|
+
'update:modelValue': [event: File | File[]];
|
|
119
139
|
/**
|
|
120
140
|
* Callback to invoke when file upload is complete.
|
|
121
141
|
*/
|
|
122
|
-
upload: [event: FileUploadUploadEvent];
|
|
142
|
+
'upload': [event: FileUploadUploadEvent];
|
|
123
143
|
/**
|
|
124
144
|
* Callback to invoke if file upload fails.
|
|
125
145
|
*/
|
|
126
|
-
error: [event: FileUploadErrorEvent | InputErrorCodes];
|
|
146
|
+
'error': [event: FileUploadErrorEvent | InputErrorCodes];
|
|
127
147
|
};
|
|
128
148
|
|
|
129
149
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { MultiSelectOption } from '
|
|
1
|
+
import { MultiSelectOption } from '../../types/options.type';
|
|
2
2
|
import { DefineComponent, Slot } from 'vue';
|
|
3
3
|
import { CalendarProps } from '../calendar/Calendar.vue.d';
|
|
4
4
|
import { QueryParams } from '../datatable/DataTable.vue.d';
|
|
@@ -7,25 +7,51 @@ import { InputRangeNumberProps } from '../inputrangenumber/InputRangeNumber.vue.
|
|
|
7
7
|
import { MultiSelectProps } from '../multiselect/MultiSelect.vue.d';
|
|
8
8
|
import { ButtonSelectTreeProps } from '../buttonselecttree/ButtonSelectTree.vue.d';
|
|
9
9
|
|
|
10
|
+
export type FilterMatchMode =
|
|
11
|
+
| 'CONTAINS'
|
|
12
|
+
| 'EQUALS'
|
|
13
|
+
| 'NOT_EQUALS'
|
|
14
|
+
| 'IN'
|
|
15
|
+
| 'LESS_THAN'
|
|
16
|
+
| 'LESS_THAN_OR_EQUAL_TO'
|
|
17
|
+
| 'GREATER_THAN'
|
|
18
|
+
| 'GREATER_THAN_OR_EQUAL_TO'
|
|
19
|
+
| 'BETWEEN'
|
|
20
|
+
| 'DATE_BETWEEN';
|
|
21
|
+
|
|
10
22
|
// More specific filter field types
|
|
11
23
|
export interface MultiSelectFilterField extends MultiSelectProps {
|
|
12
24
|
type: 'multiselect';
|
|
13
|
-
|
|
25
|
+
/**
|
|
26
|
+
* The name of the field this filter applies to.
|
|
27
|
+
*
|
|
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;
|
|
14
33
|
optionField?: string; // @example - actionOptions
|
|
15
34
|
params?: QueryParams; // Additional QueryParams for the fetchOptionFn
|
|
16
35
|
fetchOptionFn?:
|
|
17
|
-
| ((args?: any) => MultiSelectOption[]) // Sync function to fetch options
|
|
18
|
-
| ((args?: any) => Promise<MultiSelectOption[]>); // Async function
|
|
36
|
+
| ((args?: any) => MultiSelectOption[] | undefined) // Sync function to fetch options
|
|
37
|
+
| ((args?: any) => Promise<MultiSelectOption[] | undefined>); // Async function
|
|
19
38
|
}
|
|
20
39
|
|
|
21
40
|
export interface DropdownFilterField extends DropdownProps {
|
|
22
41
|
type: 'dropdown';
|
|
23
|
-
|
|
42
|
+
/**
|
|
43
|
+
* The name of the field this filter applies to.
|
|
44
|
+
*
|
|
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;
|
|
24
50
|
optionField?: string; // @example - actionOptions
|
|
25
51
|
params?: QueryParams; // Additional QueryParams for the fetchOptionFn
|
|
26
52
|
fetchOptionFn?:
|
|
27
|
-
| ((args?: any) => MultiSelectOption[]) // Sync function to fetch options
|
|
28
|
-
| ((args?: any) => Promise<MultiSelectOption[]>); // Async function
|
|
53
|
+
| ((args?: any) => MultiSelectOption[] | undefined) // Sync function to fetch options
|
|
54
|
+
| ((args?: any) => Promise<MultiSelectOption[]> | undefined); // Async function
|
|
29
55
|
}
|
|
30
56
|
|
|
31
57
|
export interface RangeNumberFilterField extends InputRangeNumberProps {
|
|
@@ -35,7 +61,17 @@ export interface RangeNumberFilterField extends InputRangeNumberProps {
|
|
|
35
61
|
*
|
|
36
62
|
* @example ['minAge', 'maxAge']
|
|
37
63
|
*/
|
|
38
|
-
fields
|
|
64
|
+
fields?: string[];
|
|
65
|
+
|
|
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;
|
|
39
75
|
tooltip?: string;
|
|
40
76
|
}
|
|
41
77
|
|
|
@@ -99,6 +135,10 @@ export interface FilterContainerProps {
|
|
|
99
135
|
*/
|
|
100
136
|
fieldsPerRow?: number;
|
|
101
137
|
fields: FilterField[];
|
|
138
|
+
/**
|
|
139
|
+
* Enable static filtering
|
|
140
|
+
*/
|
|
141
|
+
static?: boolean;
|
|
102
142
|
}
|
|
103
143
|
|
|
104
144
|
/**
|
|
@@ -113,7 +153,7 @@ export type FilterContainerSlots = {
|
|
|
113
153
|
/**
|
|
114
154
|
* Additional template for field.
|
|
115
155
|
*/
|
|
116
|
-
field: Slot<{ field: AdditionalFilterField }>;
|
|
156
|
+
field: Slot<{ field: AdditionalFilterField; fieldName: string }>;
|
|
117
157
|
};
|
|
118
158
|
|
|
119
159
|
export type FilterContainerEmits = {
|
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
import { GenericObject } from 'vee-validate';
|
|
2
|
+
import { FilterField } from '../FilterContainer.vue.d';
|
|
2
3
|
declare const applyFilter: (values: GenericObject, tableName: string, emit?: (...args: any[]) => any) => void;
|
|
4
|
+
export declare const applyStaticFilter: (values: GenericObject, tableName: string, fields: FilterField[], emit?: (...args: any[]) => any) => void;
|
|
3
5
|
export default applyFilter;
|
|
@@ -295,6 +295,11 @@ declare class Form extends ClassComponent<FormProps, FormSlots, FormEmits> {
|
|
|
295
295
|
* }
|
|
296
296
|
*/
|
|
297
297
|
setErrors(fields: GenericObject): void;
|
|
298
|
+
|
|
299
|
+
/**
|
|
300
|
+
* The form values
|
|
301
|
+
*/
|
|
302
|
+
values: GenericObject;
|
|
298
303
|
}
|
|
299
304
|
|
|
300
305
|
declare module '@vue/runtime-core' {
|