@fewangsit/wangsvue-fats 1.0.0-alpha.31 → 1.0.0-alpha.33
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 +24 -0
- package/components/approverinfo/ApproverInfo.vue.d.ts +51 -0
- package/components/assetinfo/AssetInfo.vue.d.ts +30 -0
- package/components/badge/Badge.vue.d.ts +73 -0
- package/components/badgegroup/BadgeGroup.vue.d.ts +52 -0
- package/components/basecomponent/index.d.ts +28 -0
- package/components/basetree/BaseTree.vue.d.ts +591 -0
- package/components/basetree/TreeNode.vue.d.ts +35 -0
- package/components/breadcrumb/Breadcrumb.vue.d.ts +26 -0
- package/components/button/Button.vue.d.ts +193 -0
- package/components/buttonbulkaction/ButtonBulkAction.vue.d.ts +104 -0
- package/components/buttoncopy/ButtonCopy.vue.d.ts +26 -0
- package/components/buttondownload/ButtonDownload.vue.d.ts +49 -0
- package/components/buttonfilter/ButtonFilter.vue.d.ts +12 -0
- package/components/buttonradio/ButtonRadio.vue.d.ts +257 -0
- package/components/buttonscan/ButtonScan.vue.d.ts +201 -0
- package/components/buttonscan/helpers/getErrorCode.helper.d.ts +3 -0
- package/components/buttonscan/helpers/index.d.ts +1 -0
- package/components/buttonscan/workers/scanner.worker.d.ts +1 -0
- package/components/buttonsearch/ButtonSearch.vue.d.ts +38 -0
- package/components/buttonselecttree/ButtonSelectTree.vue.d.ts +200 -0
- package/components/buttonsync/ButtonSync.vue.d.ts +22 -0
- package/components/buttontoggle/ButtonToggle.vue.d.ts +18 -0
- package/components/buttonviewlog/ButtonViewLog.vue.d.ts +16 -0
- package/components/calendar/BaseCalendar.vue.d.ts +127 -0
- package/components/calendar/Calendar.vue.d.ts +570 -0
- package/components/card/Card.vue.d.ts +139 -0
- package/components/checkbox/Checkbox.vue.d.ts +329 -0
- package/components/customcolumn/ColumnList.vue.d.ts +47 -0
- package/components/customcolumn/CustomColumn.vue.d.ts +37 -0
- package/components/customcolumn/helpers/setVisibilityColumn.helper.d.ts +16 -0
- package/components/datatable/DataTable.vue.d.ts +735 -0
- package/components/datatable/MultiRow.vue.d.ts +36 -0
- package/components/datatable/helpers/adjustMenuPosition.helper.d.ts +1 -0
- package/components/datatable/helpers/filter.helper.d.ts +38 -0
- package/components/datatable/helpers/index.d.ts +6 -0
- package/components/datatable/helpers/readConfig.helper.d.ts +5 -0
- package/components/datatable/store/dataTable.store.d.ts +25 -0
- package/components/dialog/Dialog.vue.d.ts +464 -0
- package/components/dialogconfirm/DialogConfirm.vue.d.ts +164 -0
- package/components/dialogform/DialogForm.vue.d.ts +349 -0
- package/components/dialogselecttree/DialogSelectTree.vue.d.ts +136 -0
- package/components/dropdown/Dropdown.vue.d.ts +274 -0
- package/components/editor/CodeSnippetAdapter.vue.d.ts +152 -0
- package/components/editor/Editor.vue.d.ts +191 -0
- package/components/editor/EditorButton.vue.d.ts +35 -0
- package/components/editor/MentionList.vue.d.ts +49 -0
- package/components/editor/MentionSection.vue.d.ts +152 -0
- package/components/editor/codeSnippetExtension.d.ts +3 -0
- package/components/editor/mentionSectionExtension.d.ts +3 -0
- package/components/editor/suggestion.d.ts +2 -0
- package/components/fieldwrapper/FieldWrapper.vue.d.ts +69 -0
- package/components/fileupload/FileUpload.vue.d.ts +169 -0
- package/components/filtercontainer/FilterContainer.vue.d.ts +181 -0
- package/components/filtercontainer/helpers/applyFilter.helper.d.ts +14 -0
- package/components/filtercontainer/helpers/formatDateTimeRange.helper.d.ts +7 -0
- package/components/filtercontainer/helpers/getOption.helper.d.ts +12 -0
- package/components/form/Form.vue.d.ts +316 -0
- package/components/icon/Icon.vue.d.ts +256 -0
- package/components/image/Image.vue.d.ts +403 -0
- package/components/imagecompressor/BackgroundImageCropper.vue.d.ts +59 -0
- package/components/imagecompressor/ImageCompressor.vue.d.ts +229 -0
- package/components/imagecompressor/ImageInputInfo.vue.d.ts +55 -0
- package/components/index.d.ts +58 -0
- package/components/inputbadge/InputBadge.vue.d.ts +122 -0
- package/components/inputcurrency/InputCurrency.vue.d.ts +170 -0
- package/components/inputcurrency/helpers/currency.helper.d.ts +8 -0
- package/components/inputemail/InputEmail.vue.d.ts +25 -0
- package/components/inputnumber/InputNumber.vue.d.ts +282 -0
- package/components/inputpassword/InputPassword.vue.d.ts +32 -0
- package/components/inputphonenumber/InputPhoneNumber.vue.d.ts +99 -0
- package/components/inputphonenumber/helpers/getUserLocation.helper.d.ts +8 -0
- package/components/inputrangenumber/InputRangeNumber.vue.d.ts +120 -0
- package/components/inputsearch/InputSearch.vue.d.ts +32 -0
- package/components/inputtext/InputText.vue.d.ts +352 -0
- package/components/inputurl/InputURL.vue.d.ts +36 -0
- package/components/invisiblefield/InvisibleField.vue.d.ts +32 -0
- package/components/litedropdown/LiteDropdown.vue.d.ts +96 -0
- package/components/loading/Loading.vue.d.ts +47 -0
- package/components/loading/store/loading.store.d.ts +8 -0
- package/components/menu/Menu.vue.d.ts +390 -0
- package/components/menu/helpers/filterMenu.helper.d.ts +15 -0
- package/components/menu/helpers/index.d.ts +1 -0
- package/components/menuitem/MenuItem.vue +70 -0
- package/components/menuitem/MenuItem.vue.d.ts +39 -0
- package/components/menuitem/index.d.ts +106 -0
- package/components/multiselect/MultiSelect.vue.d.ts +194 -0
- package/components/overlaypanel/OverlayPanel.vue.d.ts +301 -0
- package/components/passthrough/index.d.ts +16 -0
- package/components/tabmenu/TabMenu.vue.d.ts +288 -0
- package/components/textarea/Textarea.vue.d.ts +170 -0
- package/components/timeline/Timeline.vue.d.ts +121 -0
- package/components/timeline/TimelineContentByType.vue.d.ts +64 -0
- package/components/toast/Toast.vue.d.ts +367 -0
- package/components/toggleswitch/ToggleSwitch.vue.d.ts +281 -0
- package/components/tree/Tree.vue.d.ts +148 -0
- package/components/tree/helpers/filterNodeKeys.helper.d.ts +22 -0
- package/components/tree/helpers/flattenTreeNodeChildren.helper.d.ts +8 -0
- package/components/tree/helpers/index.d.ts +3 -0
- package/components/ts-helpers.d.ts +85 -0
- package/components/username/UserName.vue.d.ts +113 -0
- package/components/userwithicon/UserWithIcon.vue.d.ts +19 -0
- package/config/defaultProps.d.ts +3 -0
- package/config/index.d.ts +3 -0
- package/config/locale.d.ts +3 -0
- package/event-bus/mitt.d.ts +25 -7
- package/loading-page-BrQattYE.js +1 -0
- package/loading-page-CgfbWppy.js +1 -0
- package/loading-page-CoC9UhfC.js +4 -0
- package/loading-page-CoXtqoc9.js +4 -0
- package/loading-page-DbLuqCHa.js +1 -0
- package/loading-page-f8D03l3G.js +4 -0
- package/loading-plane-CgfbWppy.js +1 -0
- package/loading-plane-CoXtqoc9.js +4 -0
- package/loading-table-Bdr9ZhtP.js +1 -0
- package/loading-table-ByUoWqUo.js +4 -0
- package/loading-table-BygEMzFM.js +4 -0
- package/loading-table-BzrSQlA0.js +1 -0
- package/loading-table-D9bw9OcI.js +4 -0
- package/loading-table-chOgXi94.js +1 -0
- package/main.d.ts +31 -0
- package/no-data-CTKux8RI.js +4 -0
- package/no-data-Cgze_Rvp.js +1 -0
- package/no-data-DLHO1L_u.js +4 -0
- package/no-data-Dep79CBh.js +1 -0
- package/no-data-g0dJCy2p.js +4 -0
- package/no-data-y1X5WtcQ.js +1 -0
- package/package.json +1 -1
- package/plugins/WangsVue.d.ts +64 -14
- package/plugins/formValidation.d.ts +11 -2
- package/plugins/i18n-extension.d.ts +4 -0
- package/plugins/i18n.d.ts +8 -4
- package/style.css +1 -0
- package/utils/addAttachment.util.d.ts +18 -2
- package/utils/date.util.d.ts +33 -4
- package/utils/filterOptions.util.d.ts +3 -1
- package/utils/genPlaceholder.util.d.ts +11 -6
- package/utils/getSeverityByAssetStatus.util.d.ts +3 -0
- package/utils/index.d.ts +34 -0
- package/utils/listenSidebarChanges.util.d.ts +16 -0
- package/utils/mergePropsWithDefaults.util.d.ts +4 -1
- package/utils/object.util.d.ts +14 -3
- package/utils/role.util.d.ts +69 -0
- package/utils/textFormatter.util.d.ts +15 -3
- package/wangsvue-fats.es.js +123730 -0
- package/wangsvue-fats.system.js +478 -0
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<
|
|
2
|
+
{
|
|
3
|
+
editor: {
|
|
4
|
+
type: import('vue').PropType<
|
|
5
|
+
import('@tiptap/vue-3').NodeViewProps['editor']
|
|
6
|
+
>;
|
|
7
|
+
required: true;
|
|
8
|
+
};
|
|
9
|
+
node: {
|
|
10
|
+
type: import('vue').PropType<
|
|
11
|
+
import('@tiptap/vue-3').NodeViewProps['node']
|
|
12
|
+
>;
|
|
13
|
+
required: true;
|
|
14
|
+
};
|
|
15
|
+
decorations: {
|
|
16
|
+
type: import('vue').PropType<
|
|
17
|
+
import('@tiptap/vue-3').NodeViewProps['decorations']
|
|
18
|
+
>;
|
|
19
|
+
required: true;
|
|
20
|
+
};
|
|
21
|
+
selected: {
|
|
22
|
+
type: import('vue').PropType<
|
|
23
|
+
import('@tiptap/vue-3').NodeViewProps['selected']
|
|
24
|
+
>;
|
|
25
|
+
required: true;
|
|
26
|
+
};
|
|
27
|
+
extension: {
|
|
28
|
+
type: import('vue').PropType<
|
|
29
|
+
import('@tiptap/vue-3').NodeViewProps['extension']
|
|
30
|
+
>;
|
|
31
|
+
required: true;
|
|
32
|
+
};
|
|
33
|
+
getPos: {
|
|
34
|
+
type: import('vue').PropType<
|
|
35
|
+
import('@tiptap/vue-3').NodeViewProps['getPos']
|
|
36
|
+
>;
|
|
37
|
+
required: true;
|
|
38
|
+
};
|
|
39
|
+
updateAttributes: {
|
|
40
|
+
type: import('vue').PropType<
|
|
41
|
+
import('@tiptap/vue-3').NodeViewProps['updateAttributes']
|
|
42
|
+
>;
|
|
43
|
+
required: true;
|
|
44
|
+
};
|
|
45
|
+
deleteNode: {
|
|
46
|
+
type: import('vue').PropType<
|
|
47
|
+
import('@tiptap/vue-3').NodeViewProps['deleteNode']
|
|
48
|
+
>;
|
|
49
|
+
required: true;
|
|
50
|
+
};
|
|
51
|
+
view: {
|
|
52
|
+
type: import('vue').PropType<
|
|
53
|
+
import('@tiptap/vue-3').NodeViewProps['view']
|
|
54
|
+
>;
|
|
55
|
+
required: true;
|
|
56
|
+
};
|
|
57
|
+
innerDecorations: {
|
|
58
|
+
type: import('vue').PropType<
|
|
59
|
+
import('@tiptap/vue-3').NodeViewProps['innerDecorations']
|
|
60
|
+
>;
|
|
61
|
+
required: true;
|
|
62
|
+
};
|
|
63
|
+
HTMLAttributes: {
|
|
64
|
+
type: import('vue').PropType<
|
|
65
|
+
import('@tiptap/vue-3').NodeViewProps['HTMLAttributes']
|
|
66
|
+
>;
|
|
67
|
+
required: true;
|
|
68
|
+
};
|
|
69
|
+
},
|
|
70
|
+
{},
|
|
71
|
+
unknown,
|
|
72
|
+
{},
|
|
73
|
+
{},
|
|
74
|
+
import('vue').ComponentOptionsMixin,
|
|
75
|
+
import('vue').ComponentOptionsMixin,
|
|
76
|
+
{},
|
|
77
|
+
string,
|
|
78
|
+
import('vue').PublicProps,
|
|
79
|
+
Readonly<
|
|
80
|
+
import('vue').ExtractPropTypes<{
|
|
81
|
+
editor: {
|
|
82
|
+
type: import('vue').PropType<
|
|
83
|
+
import('@tiptap/vue-3').NodeViewProps['editor']
|
|
84
|
+
>;
|
|
85
|
+
required: true;
|
|
86
|
+
};
|
|
87
|
+
node: {
|
|
88
|
+
type: import('vue').PropType<
|
|
89
|
+
import('@tiptap/vue-3').NodeViewProps['node']
|
|
90
|
+
>;
|
|
91
|
+
required: true;
|
|
92
|
+
};
|
|
93
|
+
decorations: {
|
|
94
|
+
type: import('vue').PropType<
|
|
95
|
+
import('@tiptap/vue-3').NodeViewProps['decorations']
|
|
96
|
+
>;
|
|
97
|
+
required: true;
|
|
98
|
+
};
|
|
99
|
+
selected: {
|
|
100
|
+
type: import('vue').PropType<
|
|
101
|
+
import('@tiptap/vue-3').NodeViewProps['selected']
|
|
102
|
+
>;
|
|
103
|
+
required: true;
|
|
104
|
+
};
|
|
105
|
+
extension: {
|
|
106
|
+
type: import('vue').PropType<
|
|
107
|
+
import('@tiptap/vue-3').NodeViewProps['extension']
|
|
108
|
+
>;
|
|
109
|
+
required: true;
|
|
110
|
+
};
|
|
111
|
+
getPos: {
|
|
112
|
+
type: import('vue').PropType<
|
|
113
|
+
import('@tiptap/vue-3').NodeViewProps['getPos']
|
|
114
|
+
>;
|
|
115
|
+
required: true;
|
|
116
|
+
};
|
|
117
|
+
updateAttributes: {
|
|
118
|
+
type: import('vue').PropType<
|
|
119
|
+
import('@tiptap/vue-3').NodeViewProps['updateAttributes']
|
|
120
|
+
>;
|
|
121
|
+
required: true;
|
|
122
|
+
};
|
|
123
|
+
deleteNode: {
|
|
124
|
+
type: import('vue').PropType<
|
|
125
|
+
import('@tiptap/vue-3').NodeViewProps['deleteNode']
|
|
126
|
+
>;
|
|
127
|
+
required: true;
|
|
128
|
+
};
|
|
129
|
+
view: {
|
|
130
|
+
type: import('vue').PropType<
|
|
131
|
+
import('@tiptap/vue-3').NodeViewProps['view']
|
|
132
|
+
>;
|
|
133
|
+
required: true;
|
|
134
|
+
};
|
|
135
|
+
innerDecorations: {
|
|
136
|
+
type: import('vue').PropType<
|
|
137
|
+
import('@tiptap/vue-3').NodeViewProps['innerDecorations']
|
|
138
|
+
>;
|
|
139
|
+
required: true;
|
|
140
|
+
};
|
|
141
|
+
HTMLAttributes: {
|
|
142
|
+
type: import('vue').PropType<
|
|
143
|
+
import('@tiptap/vue-3').NodeViewProps['HTMLAttributes']
|
|
144
|
+
>;
|
|
145
|
+
required: true;
|
|
146
|
+
};
|
|
147
|
+
}>
|
|
148
|
+
>,
|
|
149
|
+
{},
|
|
150
|
+
{}
|
|
151
|
+
>;
|
|
152
|
+
export default _default;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { DefineComponent } from 'vue';
|
|
2
|
+
|
|
3
|
+
export interface FieldWrapperLocaleConfig {
|
|
4
|
+
/**
|
|
5
|
+
* The indicator for mandatory field.
|
|
6
|
+
* @default '*''
|
|
7
|
+
*/
|
|
8
|
+
labelRequired?: string;
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* The indicator for optional field.
|
|
12
|
+
* @default '(optional)''
|
|
13
|
+
*/
|
|
14
|
+
labelOptional?: string;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Props for the FieldWrapper component.
|
|
19
|
+
*/
|
|
20
|
+
export interface FieldWrapperProps {
|
|
21
|
+
/**
|
|
22
|
+
* The label text to display for the field.
|
|
23
|
+
* @default undefined
|
|
24
|
+
*/
|
|
25
|
+
label?: string;
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Indicates whether the field is mandatory (required).
|
|
29
|
+
* If `true`, this may trigger the display of a required indicator.
|
|
30
|
+
* @default false
|
|
31
|
+
*/
|
|
32
|
+
mandatory?: boolean;
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* When `true`, displays an "(optional)" text next to the label if the field is not mandatory.
|
|
36
|
+
*/
|
|
37
|
+
showOptionalText?: boolean;
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* When `true`, displays an asterisk (`*`) next to the label if the field is mandatory.
|
|
41
|
+
* @default false
|
|
42
|
+
*/
|
|
43
|
+
showAsterisk?: boolean;
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Additional information or description for the field.
|
|
47
|
+
* Can be used to display tooltips or inline helper text.
|
|
48
|
+
* @default undefined
|
|
49
|
+
*/
|
|
50
|
+
info?: string;
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Custom CSS class to apply to the label element.
|
|
54
|
+
* Useful for styling the label specifically.
|
|
55
|
+
* @default undefined
|
|
56
|
+
*/
|
|
57
|
+
labelClass?: string;
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Position of the tooltip, if one is displayed.
|
|
61
|
+
* Accepted values are `'top'`, `'right'`, `'bottom'`, and `'left'`.
|
|
62
|
+
* @default undefined
|
|
63
|
+
*/
|
|
64
|
+
tooltipPos?: 'top' | 'right' | 'bottom' | 'left';
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
declare const FieldWrapper: DefineComponent<FieldWrapperProps>;
|
|
68
|
+
|
|
69
|
+
export default FieldWrapper;
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
import {
|
|
2
|
+
FileUploadErrorEvent,
|
|
3
|
+
FileUploadUploadEvent,
|
|
4
|
+
} from 'primevue/fileupload';
|
|
5
|
+
import { CustomValidation } from '../form/Form.vue.d';
|
|
6
|
+
import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
|
|
7
|
+
|
|
8
|
+
export type InputErrorCodes = 'FILE_SIZE_TOO_LARGE';
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Defines valid properties in FileUpload component.
|
|
12
|
+
*/
|
|
13
|
+
export type FileUploadProps = {
|
|
14
|
+
/**
|
|
15
|
+
* Pattern to restrict the allowed file types such as 'image/*'.
|
|
16
|
+
*/
|
|
17
|
+
accept?: string | undefined;
|
|
18
|
+
/**
|
|
19
|
+
* Disables the upload functionality.
|
|
20
|
+
* @defaultValue false
|
|
21
|
+
*/
|
|
22
|
+
disabled?: boolean | undefined;
|
|
23
|
+
/**
|
|
24
|
+
* Maximum file size allowed in bytes.
|
|
25
|
+
*/
|
|
26
|
+
maxFileSize?: number | undefined;
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* V-model for the file upload component.
|
|
30
|
+
* Be careful while using this props since the validation can't work while using this.
|
|
31
|
+
* You must do manual validation when choosing the file to be set on the component.
|
|
32
|
+
*/
|
|
33
|
+
modelValue?: File | File[];
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Props to determine whether file upload support multiple files or not
|
|
37
|
+
*
|
|
38
|
+
* @default false
|
|
39
|
+
*/
|
|
40
|
+
multiple?: boolean;
|
|
41
|
+
/**
|
|
42
|
+
* Message of the invalid fize size.
|
|
43
|
+
* - Use {0} to get the file's name
|
|
44
|
+
* - Use {1} to get the max file size
|
|
45
|
+
* - Use {2} to get the accepted file types from props.accept
|
|
46
|
+
* - Use {2.1} to get the accepted file types from props.fileExtensions
|
|
47
|
+
* @defaultValue {0}: Invalid file size, file size should be smaller than {1}.
|
|
48
|
+
*/
|
|
49
|
+
invalidFileSizeMessage?: string | undefined;
|
|
50
|
+
/**
|
|
51
|
+
* Message of the invalid fize type.
|
|
52
|
+
* - Use {0} to get the file's name
|
|
53
|
+
* - Use {1} to get the max file size
|
|
54
|
+
* - Use {2} to get the accepted file types
|
|
55
|
+
* - Use {2.1} to get the accepted file types from props.fileExtensions
|
|
56
|
+
* @defaultValue '{0}: Invalid file type, allowed file types: {2}'
|
|
57
|
+
*/
|
|
58
|
+
invalidFileTypeMessage?: string | undefined;
|
|
59
|
+
/**
|
|
60
|
+
* Label of the file upload.
|
|
61
|
+
* @defaultValue 'Upload File'
|
|
62
|
+
*/
|
|
63
|
+
label?: string | undefined;
|
|
64
|
+
/**
|
|
65
|
+
* Whether to use an upload button.
|
|
66
|
+
* @defaultValue true
|
|
67
|
+
*/
|
|
68
|
+
withUpload?: boolean | undefined;
|
|
69
|
+
/**
|
|
70
|
+
* Label of the upload button.
|
|
71
|
+
* @defaultValue 'Upload'.
|
|
72
|
+
*/
|
|
73
|
+
uploadLabel?: string | undefined;
|
|
74
|
+
/**
|
|
75
|
+
* Placeholder of the file upload.
|
|
76
|
+
* @defaultValue 'Select File'
|
|
77
|
+
*/
|
|
78
|
+
placeholder?: string | undefined;
|
|
79
|
+
/**
|
|
80
|
+
* File extensions to display the accepted extensions.
|
|
81
|
+
*/
|
|
82
|
+
fileExtensions?: string | undefined;
|
|
83
|
+
/**
|
|
84
|
+
* The note about the requirements of file for being uploaded.
|
|
85
|
+
*
|
|
86
|
+
* Placed at the bottom right of input.
|
|
87
|
+
*/
|
|
88
|
+
fileRequirements?: string | undefined;
|
|
89
|
+
/**
|
|
90
|
+
* The function to be called after the upload button is clicked. (Must be used when withUpload is true)
|
|
91
|
+
*/
|
|
92
|
+
uploadFunction?: (files: File[]) => Promise<void>;
|
|
93
|
+
/**
|
|
94
|
+
* Whether the input should be validated with vee-validator or not.
|
|
95
|
+
* If you use this component within form input, you need to set this props as true.
|
|
96
|
+
*/
|
|
97
|
+
useValidator?: boolean;
|
|
98
|
+
/**
|
|
99
|
+
* This prop is required if you use this component in a form input.
|
|
100
|
+
* Specify the unique field name, match with your needs for API request.
|
|
101
|
+
*
|
|
102
|
+
* @default 'fileUpload'
|
|
103
|
+
*/
|
|
104
|
+
fieldName?: string;
|
|
105
|
+
/**
|
|
106
|
+
* Whether this input field is required or not.
|
|
107
|
+
*/
|
|
108
|
+
mandatory?: boolean;
|
|
109
|
+
/**
|
|
110
|
+
* Whether show toast error message on invalid file input
|
|
111
|
+
*
|
|
112
|
+
* @default true;
|
|
113
|
+
*/
|
|
114
|
+
useErrorToast?: boolean;
|
|
115
|
+
/**
|
|
116
|
+
* Set custom validator message.
|
|
117
|
+
* Will be show if invalid="true"
|
|
118
|
+
*/
|
|
119
|
+
validatorMessage?: string | CustomValidation;
|
|
120
|
+
/**
|
|
121
|
+
* Classes for validator message in input field.
|
|
122
|
+
*/
|
|
123
|
+
validatorMessageClass?: string;
|
|
124
|
+
};
|
|
125
|
+
|
|
126
|
+
export type FileUploadEmits = {
|
|
127
|
+
/**
|
|
128
|
+
* Callback to invoke when there is a file selected.
|
|
129
|
+
*/
|
|
130
|
+
'select': [event: File | File[]];
|
|
131
|
+
/**
|
|
132
|
+
* Callback to invoke when model changed.
|
|
133
|
+
*/
|
|
134
|
+
'update:modelValue': [event: File | File[]];
|
|
135
|
+
/**
|
|
136
|
+
* Callback to invoke when file upload is complete.
|
|
137
|
+
*/
|
|
138
|
+
'upload': [event: FileUploadUploadEvent];
|
|
139
|
+
/**
|
|
140
|
+
* Callback to invoke if file upload fails.
|
|
141
|
+
*/
|
|
142
|
+
'error': [event: FileUploadErrorEvent | InputErrorCodes];
|
|
143
|
+
};
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* **WangsVue - FileUpload**
|
|
147
|
+
*
|
|
148
|
+
* _FileUpload is an advanced uploader with dragdrop support, multi file uploads, auto uploading, progress tracking and validations._
|
|
149
|
+
*
|
|
150
|
+
* [Live Demo](https://fewangsit.github.io/wangsvue/button)
|
|
151
|
+
* --- ---
|
|
152
|
+
* 
|
|
153
|
+
*
|
|
154
|
+
* @group Component
|
|
155
|
+
*
|
|
156
|
+
*/
|
|
157
|
+
declare class FileUpload extends ClassComponent<
|
|
158
|
+
FileUploadProps,
|
|
159
|
+
null,
|
|
160
|
+
FileUploadEmits
|
|
161
|
+
> {}
|
|
162
|
+
|
|
163
|
+
declare module '@vue/runtime-core' {
|
|
164
|
+
interface GlobalComponents {
|
|
165
|
+
FileUpload: GlobalComponentConstructor<FileUpload>;
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
export default FileUpload;
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
import { DefineComponent, Slot } from 'vue';
|
|
2
|
+
import { CalendarProps } from '../calendar/Calendar.vue.d';
|
|
3
|
+
import { QueryParams } from '../datatable/DataTable.vue.d';
|
|
4
|
+
import { DropdownProps, Option } from '../dropdown/Dropdown.vue.d';
|
|
5
|
+
import { InputRangeNumberProps } from '../inputrangenumber/InputRangeNumber.vue.d';
|
|
6
|
+
import { MultiSelectProps } from '../multiselect/MultiSelect.vue.d';
|
|
7
|
+
import { ButtonSelectTreeProps } from '../buttonselecttree/ButtonSelectTree.vue.d';
|
|
8
|
+
|
|
9
|
+
export type FilterMatchMode =
|
|
10
|
+
| 'CONTAINS'
|
|
11
|
+
| 'EQUALS'
|
|
12
|
+
| 'NOT_EQUALS'
|
|
13
|
+
| 'IN'
|
|
14
|
+
| 'LESS_THAN'
|
|
15
|
+
| 'LESS_THAN_OR_EQUAL_TO'
|
|
16
|
+
| 'GREATER_THAN'
|
|
17
|
+
| 'GREATER_THAN_OR_EQUAL_TO'
|
|
18
|
+
| 'BETWEEN'
|
|
19
|
+
| 'DATE_BETWEEN';
|
|
20
|
+
|
|
21
|
+
// More specific filter field types
|
|
22
|
+
export interface MultiSelectFilterField extends MultiSelectProps {
|
|
23
|
+
type: 'multiselect';
|
|
24
|
+
/**
|
|
25
|
+
* The name of the field this filter applies to.
|
|
26
|
+
*
|
|
27
|
+
* When using a static filter, it also specifies the field in the data to be used for generating unique options.
|
|
28
|
+
* For example, if filtering by a user's full name, the field could be 'user.fullName', which will extract
|
|
29
|
+
* unique full names from the table data and use them as filter options.
|
|
30
|
+
*/
|
|
31
|
+
field: string;
|
|
32
|
+
optionField?: string; // @example - actionOptions
|
|
33
|
+
params?: QueryParams; // Additional QueryParams for the fetchOptionFn
|
|
34
|
+
fetchOptionFn?:
|
|
35
|
+
| ((args?: any) => Option[] | undefined) // Sync function to fetch options
|
|
36
|
+
| ((args?: any) => Promise<Option[] | undefined>); // Async function
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export interface DropdownFilterField extends DropdownProps {
|
|
40
|
+
type: 'dropdown';
|
|
41
|
+
/**
|
|
42
|
+
* The name of the field this filter applies to.
|
|
43
|
+
*
|
|
44
|
+
* When using a static filter, it also specifies the field in the data to be used for generating unique options.
|
|
45
|
+
* For example, if filtering by a user's full name, the field could be 'user.fullName', which will extract
|
|
46
|
+
* unique full names from the table data and use them as filter options.
|
|
47
|
+
*/
|
|
48
|
+
field: string;
|
|
49
|
+
optionField?: string; // @example - actionOptions
|
|
50
|
+
params?: QueryParams; // Additional QueryParams for the fetchOptionFn
|
|
51
|
+
fetchOptionFn?:
|
|
52
|
+
| ((args?: any) => Option[] | undefined) // Sync function to fetch options
|
|
53
|
+
| ((args?: any) => Promise<Option[]> | undefined); // Async function
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export interface RangeNumberFilterField extends InputRangeNumberProps {
|
|
57
|
+
type: 'rangenumber';
|
|
58
|
+
/**
|
|
59
|
+
* Specify min and max field
|
|
60
|
+
*
|
|
61
|
+
* @example ['minAge', 'maxAge']
|
|
62
|
+
*/
|
|
63
|
+
fields?: string[];
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Specify single field for both min and max input.
|
|
67
|
+
* The value will be a number array.
|
|
68
|
+
*
|
|
69
|
+
* Prever use this property when you are working with Static Filtering
|
|
70
|
+
*
|
|
71
|
+
* @example value: [1000,5000] or equal to 'value.0': 1000 & 'value.1': 5000
|
|
72
|
+
*/
|
|
73
|
+
field?: string;
|
|
74
|
+
tooltip?: string;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export interface ButtonSelectTreeFilterField
|
|
78
|
+
extends Omit<ButtonSelectTreeProps, 'type' | 'label' | 'fieldLabel'> {
|
|
79
|
+
type: 'group' | 'category';
|
|
80
|
+
field: string; // The name of the field this filter applies to
|
|
81
|
+
/**
|
|
82
|
+
* The field label.
|
|
83
|
+
*/
|
|
84
|
+
label?: string;
|
|
85
|
+
/**
|
|
86
|
+
* The button label.
|
|
87
|
+
* @default to Select Group|Category
|
|
88
|
+
*/
|
|
89
|
+
buttonLabel?: string;
|
|
90
|
+
params?: QueryParams; // Override QueryParams for the fetchTree
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
export interface CalendarFilterField extends CalendarProps {
|
|
94
|
+
type: 'calendar';
|
|
95
|
+
field: string;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
export type AdditionalFilterField = ButtonSelectTreeFilterField;
|
|
99
|
+
|
|
100
|
+
export type FilterField =
|
|
101
|
+
| AdditionalFilterField
|
|
102
|
+
| MultiSelectFilterField
|
|
103
|
+
| DropdownFilterField
|
|
104
|
+
| RangeNumberFilterField
|
|
105
|
+
| CalendarFilterField;
|
|
106
|
+
|
|
107
|
+
export type FilterOptions<Opt = Record<string, boolean>> = Record<
|
|
108
|
+
keyof Opt,
|
|
109
|
+
Option[]
|
|
110
|
+
>;
|
|
111
|
+
|
|
112
|
+
export type LoadingFilters = Record<string, boolean>;
|
|
113
|
+
|
|
114
|
+
export type FetchOptionResponse<Opt = Record<string, boolean>> = {
|
|
115
|
+
message: string;
|
|
116
|
+
data: FilterOptions<Opt>;
|
|
117
|
+
};
|
|
118
|
+
|
|
119
|
+
export interface FilterContainerLocaleConfig {
|
|
120
|
+
clearFieldText?: string;
|
|
121
|
+
applyText?: string;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
export interface FilterContainerProps {
|
|
125
|
+
/**
|
|
126
|
+
* Specify the table name integrated with this filter.
|
|
127
|
+
*
|
|
128
|
+
* @default datatable - the default table name
|
|
129
|
+
*/
|
|
130
|
+
tableName?: string;
|
|
131
|
+
/**
|
|
132
|
+
* Set the fields count in a row
|
|
133
|
+
*
|
|
134
|
+
* @default 4 grid columns
|
|
135
|
+
*/
|
|
136
|
+
fieldsPerRow?: number;
|
|
137
|
+
fields: FilterField[];
|
|
138
|
+
/**
|
|
139
|
+
* Enable static filtering
|
|
140
|
+
*/
|
|
141
|
+
static?: boolean;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* Slots for FilterContainer component
|
|
146
|
+
*/
|
|
147
|
+
export type FilterContainerSlots = {
|
|
148
|
+
/**
|
|
149
|
+
* @deprecated Please use props.fields instead
|
|
150
|
+
*/
|
|
151
|
+
default: Slot;
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* Additional template for field.
|
|
155
|
+
*/
|
|
156
|
+
field: Slot<{ field: AdditionalFilterField; fieldName: string }>;
|
|
157
|
+
};
|
|
158
|
+
|
|
159
|
+
export type FilterContainerEmits = {
|
|
160
|
+
apply: [filter: QueryParams];
|
|
161
|
+
};
|
|
162
|
+
|
|
163
|
+
/**
|
|
164
|
+
* **WangsVue - FilterContainer**
|
|
165
|
+
*
|
|
166
|
+
* _FilterContainer is a component for generating a dynamic grid-based layout for any count of filter fields.
|
|
167
|
+
* It calculates the number of children in the container and sets their grid area style dynamically.
|
|
168
|
+
*
|
|
169
|
+
* The grid layout is determined by the row and column position, which are incremented based on the child count.
|
|
170
|
+
* If the child count is odd and the child is the last one (which is Buttons Action),
|
|
171
|
+
* it is placed in the 4th column._
|
|
172
|
+
*
|
|
173
|
+
* @group components
|
|
174
|
+
*/
|
|
175
|
+
declare const FilterContainer: DefineComponent<
|
|
176
|
+
FilterContainerProps,
|
|
177
|
+
FilterContainerEmits,
|
|
178
|
+
FilterContainerSlots
|
|
179
|
+
>;
|
|
180
|
+
|
|
181
|
+
export default FilterContainer;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { GenericObject } from 'vee-validate';
|
|
2
|
+
import { FilterField } from '../FilterContainer.vue.d';
|
|
3
|
+
declare const applyFilter: (
|
|
4
|
+
values: GenericObject,
|
|
5
|
+
tableName: string,
|
|
6
|
+
emit?: (...args: any[]) => any,
|
|
7
|
+
) => void;
|
|
8
|
+
export declare const applyStaticFilter: (
|
|
9
|
+
values: GenericObject,
|
|
10
|
+
tableName: string,
|
|
11
|
+
fields: FilterField[],
|
|
12
|
+
emit?: (...args: any[]) => any,
|
|
13
|
+
) => void;
|
|
14
|
+
export default applyFilter;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Format the time in range selection when not show time.
|
|
3
|
+
* It will adjust the end range time to 23.59.59 and the start to 00.00.00
|
|
4
|
+
*
|
|
5
|
+
* @returns {number[]} - The formatted date time range in millis. [start, end]
|
|
6
|
+
*/
|
|
7
|
+
export declare const formatDateTimeRange: (e: number[]) => number[];
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import {
|
|
2
|
+
FilterOptions,
|
|
3
|
+
LoadingFilters,
|
|
4
|
+
MultiSelectFilterField,
|
|
5
|
+
} from '../FilterContainer.vue.d';
|
|
6
|
+
declare const getOptions: (
|
|
7
|
+
fn: MultiSelectFilterField['fetchOptionFn'],
|
|
8
|
+
field: string,
|
|
9
|
+
filterOption: FilterOptions,
|
|
10
|
+
loading: LoadingFilters,
|
|
11
|
+
) => Promise<void>;
|
|
12
|
+
export default getOptions;
|