@fewangsit/wangsvue-fats 1.0.0-alpha.30 → 1.0.0-alpha.31
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/event-bus/mitt.d.ts +7 -25
- package/package.json +1 -1
- package/plugins/WangsVue.d.ts +14 -64
- package/plugins/formValidation.d.ts +2 -11
- package/plugins/i18n.d.ts +4 -8
- package/utils/addAttachment.util.d.ts +2 -18
- package/utils/date.util.d.ts +4 -33
- package/utils/filterOptions.util.d.ts +1 -3
- package/utils/genPlaceholder.util.d.ts +6 -11
- package/utils/mergePropsWithDefaults.util.d.ts +1 -4
- package/utils/object.util.d.ts +3 -14
- package/utils/textFormatter.util.d.ts +3 -15
- package/components/animation/Animation.vue.d.ts +0 -24
- package/components/approverinfo/ApproverInfo.vue.d.ts +0 -51
- package/components/assetinfo/AssetInfo.vue.d.ts +0 -31
- package/components/badge/Badge.vue.d.ts +0 -73
- package/components/badgegroup/BadgeGroup.vue.d.ts +0 -52
- package/components/basecomponent/index.d.ts +0 -28
- package/components/basetree/BaseTree.vue.d.ts +0 -591
- package/components/basetree/TreeNode.vue.d.ts +0 -35
- package/components/breadcrumb/Breadcrumb.vue.d.ts +0 -26
- package/components/button/Button.vue.d.ts +0 -193
- package/components/buttonbulkaction/ButtonBulkAction.vue.d.ts +0 -104
- package/components/buttoncopy/ButtonCopy.vue.d.ts +0 -26
- package/components/buttondownload/ButtonDownload.vue.d.ts +0 -49
- package/components/buttonfilter/ButtonFilter.vue.d.ts +0 -12
- package/components/buttonradio/ButtonRadio.vue.d.ts +0 -257
- package/components/buttonscan/ButtonScan.vue.d.ts +0 -201
- package/components/buttonscan/helpers/getErrorCode.helper.d.ts +0 -3
- package/components/buttonscan/helpers/index.d.ts +0 -1
- package/components/buttonscan/workers/scanner.worker.d.ts +0 -1
- package/components/buttonsearch/ButtonSearch.vue.d.ts +0 -38
- package/components/buttonselecttree/ButtonSelectTree.vue.d.ts +0 -200
- package/components/buttonsync/ButtonSync.vue.d.ts +0 -22
- package/components/buttontoggle/ButtonToggle.vue.d.ts +0 -18
- package/components/buttonviewlog/ButtonViewLog.vue.d.ts +0 -17
- package/components/calendar/BaseCalendar.vue.d.ts +0 -127
- package/components/calendar/Calendar.vue.d.ts +0 -570
- package/components/card/Card.vue.d.ts +0 -139
- package/components/checkbox/Checkbox.vue.d.ts +0 -329
- package/components/customcolumn/ColumnList.vue.d.ts +0 -47
- package/components/customcolumn/CustomColumn.vue.d.ts +0 -37
- package/components/customcolumn/helpers/setVisibilityColumn.helper.d.ts +0 -16
- package/components/datatable/DataTable.vue.d.ts +0 -735
- package/components/datatable/MultiRow.vue.d.ts +0 -36
- package/components/datatable/helpers/adjustMenuPosition.helper.d.ts +0 -1
- package/components/datatable/helpers/filter.helper.d.ts +0 -38
- package/components/datatable/helpers/index.d.ts +0 -6
- package/components/datatable/helpers/readConfig.helper.d.ts +0 -5
- package/components/datatable/store/dataTable.store.d.ts +0 -25
- package/components/dialog/Dialog.vue.d.ts +0 -464
- package/components/dialogconfirm/DialogConfirm.vue.d.ts +0 -164
- package/components/dialogform/DialogForm.vue.d.ts +0 -349
- package/components/dialogselecttree/DialogSelectTree.vue.d.ts +0 -136
- package/components/dropdown/Dropdown.vue.d.ts +0 -274
- package/components/editor/CodeSnippetAdapter.vue.d.ts +0 -152
- package/components/editor/Editor.vue.d.ts +0 -191
- package/components/editor/EditorButton.vue.d.ts +0 -35
- package/components/editor/MentionList.vue.d.ts +0 -49
- package/components/editor/MentionSection.vue.d.ts +0 -152
- package/components/editor/codeSnippetExtension.d.ts +0 -3
- package/components/editor/mentionSectionExtension.d.ts +0 -3
- package/components/editor/suggestion.d.ts +0 -2
- package/components/fieldwrapper/FieldWrapper.vue.d.ts +0 -69
- package/components/fileupload/FileUpload.vue.d.ts +0 -169
- package/components/filtercontainer/FilterContainer.vue.d.ts +0 -181
- package/components/filtercontainer/helpers/applyFilter.helper.d.ts +0 -14
- package/components/filtercontainer/helpers/formatDateTimeRange.helper.d.ts +0 -7
- package/components/filtercontainer/helpers/getOption.helper.d.ts +0 -12
- package/components/form/Form.vue.d.ts +0 -316
- package/components/icon/Icon.vue.d.ts +0 -256
- package/components/image/Image.vue.d.ts +0 -403
- package/components/imagecompressor/BackgroundImageCropper.vue.d.ts +0 -59
- package/components/imagecompressor/ImageCompressor.vue.d.ts +0 -229
- package/components/imagecompressor/ImageInputInfo.vue.d.ts +0 -55
- package/components/index.d.ts +0 -58
- package/components/inputbadge/InputBadge.vue.d.ts +0 -122
- package/components/inputcurrency/InputCurrency.vue.d.ts +0 -170
- package/components/inputcurrency/helpers/currency.helper.d.ts +0 -8
- package/components/inputemail/InputEmail.vue.d.ts +0 -25
- package/components/inputnumber/InputNumber.vue.d.ts +0 -282
- package/components/inputpassword/InputPassword.vue.d.ts +0 -32
- package/components/inputphonenumber/InputPhoneNumber.vue.d.ts +0 -99
- package/components/inputphonenumber/helpers/getUserLocation.helper.d.ts +0 -8
- package/components/inputrangenumber/InputRangeNumber.vue.d.ts +0 -120
- package/components/inputsearch/InputSearch.vue.d.ts +0 -33
- package/components/inputtext/InputText.vue.d.ts +0 -352
- package/components/inputurl/InputURL.vue.d.ts +0 -36
- package/components/invisiblefield/InvisibleField.vue.d.ts +0 -32
- package/components/litedropdown/LiteDropdown.vue.d.ts +0 -96
- package/components/loading/Loading.vue.d.ts +0 -47
- package/components/loading/store/loading.store.d.ts +0 -8
- package/components/menu/Menu.vue.d.ts +0 -390
- package/components/menu/helpers/filterMenu.helper.d.ts +0 -15
- package/components/menu/helpers/index.d.ts +0 -1
- package/components/menuitem/MenuItem.vue +0 -70
- package/components/menuitem/MenuItem.vue.d.ts +0 -39
- package/components/menuitem/index.d.ts +0 -106
- package/components/multiselect/MultiSelect.vue.d.ts +0 -194
- package/components/overlaypanel/OverlayPanel.vue.d.ts +0 -301
- package/components/passthrough/index.d.ts +0 -16
- package/components/tabmenu/TabMenu.vue.d.ts +0 -288
- package/components/textarea/Textarea.vue.d.ts +0 -170
- package/components/timeline/Timeline.vue.d.ts +0 -121
- package/components/timeline/TimelineContentByType.vue.d.ts +0 -64
- package/components/toast/Toast.vue.d.ts +0 -367
- package/components/toggleswitch/ToggleSwitch.vue.d.ts +0 -281
- package/components/tree/Tree.vue.d.ts +0 -148
- package/components/tree/helpers/filterNodeKeys.helper.d.ts +0 -22
- package/components/tree/helpers/flattenTreeNodeChildren.helper.d.ts +0 -8
- package/components/tree/helpers/index.d.ts +0 -3
- package/components/ts-helpers.d.ts +0 -85
- package/components/username/UserName.vue.d.ts +0 -113
- package/components/userwithicon/UserWithIcon.vue.d.ts +0 -20
- package/config/defaultProps.d.ts +0 -3
- package/config/index.d.ts +0 -3
- package/config/locale.d.ts +0 -3
- package/loading-page-BrQattYE.js +0 -1
- package/loading-page-CgfbWppy.js +0 -1
- package/loading-page-CoC9UhfC.js +0 -4
- package/loading-page-CoXtqoc9.js +0 -4
- package/loading-page-DbLuqCHa.js +0 -1
- package/loading-page-f8D03l3G.js +0 -4
- package/loading-plane-CgfbWppy.js +0 -1
- package/loading-plane-CoXtqoc9.js +0 -4
- package/loading-table-Bdr9ZhtP.js +0 -1
- package/loading-table-ByUoWqUo.js +0 -4
- package/loading-table-BygEMzFM.js +0 -4
- package/loading-table-BzrSQlA0.js +0 -1
- package/loading-table-D9bw9OcI.js +0 -4
- package/loading-table-chOgXi94.js +0 -1
- package/main.d.ts +0 -31
- package/no-data-CTKux8RI.js +0 -4
- package/no-data-Cgze_Rvp.js +0 -1
- package/no-data-DLHO1L_u.js +0 -4
- package/no-data-Dep79CBh.js +0 -1
- package/no-data-g0dJCy2p.js +0 -4
- package/no-data-y1X5WtcQ.js +0 -1
- package/plugins/i18n-extension.d.ts +0 -4
- package/style.css +0 -1
- package/utils/getSeverityByAssetStatus.util.d.ts +0 -3
- package/utils/index.d.ts +0 -21
- package/utils/listenSidebarChanges.util.d.ts +0 -16
- package/utils/role.util.d.ts +0 -6
- package/wangsvue-fats.es.js +0 -123730
- package/wangsvue-fats.system.js +0 -478
|
@@ -1,164 +0,0 @@
|
|
|
1
|
-
import { Slot } from 'vue';
|
|
2
|
-
import { WangsIcons } from '../icon/Icon.vue.d';
|
|
3
|
-
import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
|
|
4
|
-
|
|
5
|
-
type ConfirmDialogSeverity = 'success' | 'danger';
|
|
6
|
-
|
|
7
|
-
export interface DialogConfirmLocaleConfig {
|
|
8
|
-
actionableCloseButtonLabel?: string;
|
|
9
|
-
nonActionableCloseButtonLabel?: string;
|
|
10
|
-
/**
|
|
11
|
-
* @example Are you sure?
|
|
12
|
-
*/
|
|
13
|
-
defaultConfirmMessage?: string;
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* @example Yakin
|
|
17
|
-
*/
|
|
18
|
-
defaultConfirmLabel?: string;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* Props for DialogConfirm component
|
|
23
|
-
*/
|
|
24
|
-
export interface DialogConfirmProps {
|
|
25
|
-
/**
|
|
26
|
-
* The header of the dialog.
|
|
27
|
-
*/
|
|
28
|
-
header: string;
|
|
29
|
-
/**
|
|
30
|
-
* The severity of the dialog.
|
|
31
|
-
* The severity will determine the dialog icons and color scheme.
|
|
32
|
-
*/
|
|
33
|
-
severity: ConfirmDialogSeverity;
|
|
34
|
-
/**
|
|
35
|
-
* The severity of the confirm button.
|
|
36
|
-
* The severity will determine the confirm button color scheme in case button severity is different from header/dialog severity.
|
|
37
|
-
*
|
|
38
|
-
* @default undefined - to fallback to props.severity
|
|
39
|
-
*/
|
|
40
|
-
confirmButtonSeverity?: ConfirmDialogSeverity | 'primary';
|
|
41
|
-
/**
|
|
42
|
-
* The boolean modelValue to show dialog.
|
|
43
|
-
*/
|
|
44
|
-
visible: boolean;
|
|
45
|
-
|
|
46
|
-
/**
|
|
47
|
-
* Determines if the dialog should close after confirm.
|
|
48
|
-
* @default true
|
|
49
|
-
*/
|
|
50
|
-
closeAfterConfirm?: boolean;
|
|
51
|
-
/**
|
|
52
|
-
* The label of the close/cancel button.
|
|
53
|
-
*/
|
|
54
|
-
closeLabel?: string;
|
|
55
|
-
/**
|
|
56
|
-
* To hide/show the confirm button.
|
|
57
|
-
*
|
|
58
|
-
* Set to 'false' Make the confirm dialog cannot be confirmed.
|
|
59
|
-
*
|
|
60
|
-
* @default true;
|
|
61
|
-
*/
|
|
62
|
-
actionable?: boolean;
|
|
63
|
-
/**
|
|
64
|
-
* The label of the confirm button.
|
|
65
|
-
*/
|
|
66
|
-
confirmLabel?: string;
|
|
67
|
-
/**
|
|
68
|
-
* Props to disable confirm button.
|
|
69
|
-
*/
|
|
70
|
-
disableConfirmButton?: boolean;
|
|
71
|
-
/**
|
|
72
|
-
* Custom header icon. Default is 'error' icon for danger severity, and 'checkbox-circle' for success severity.
|
|
73
|
-
*/
|
|
74
|
-
headerIcon?: WangsIcons;
|
|
75
|
-
/**
|
|
76
|
-
* The lists to be displayed in the dialog.
|
|
77
|
-
*/
|
|
78
|
-
list?: (string | object)[] | Set<string | object>;
|
|
79
|
-
/**
|
|
80
|
-
* The label of the list if your list item is an object.
|
|
81
|
-
* Choose a property from the item to be displayed on the list.
|
|
82
|
-
*/
|
|
83
|
-
listLabel?: string;
|
|
84
|
-
/**
|
|
85
|
-
* The confirmation message.
|
|
86
|
-
*/
|
|
87
|
-
message?: string;
|
|
88
|
-
/**
|
|
89
|
-
* Whether show icon header or not.
|
|
90
|
-
* @default true;
|
|
91
|
-
*/
|
|
92
|
-
showIcon?: boolean;
|
|
93
|
-
/**
|
|
94
|
-
* Whether show close button or not (footer button that has label, not close button with icon 'X').
|
|
95
|
-
* @default true;
|
|
96
|
-
*/
|
|
97
|
-
showCloseButton?: boolean;
|
|
98
|
-
|
|
99
|
-
/**
|
|
100
|
-
* Set class for content element.
|
|
101
|
-
*/
|
|
102
|
-
contentClass?: any;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
/**
|
|
106
|
-
* Slots for DialogConfirm component
|
|
107
|
-
*/
|
|
108
|
-
export interface DialogConfirmSlots {
|
|
109
|
-
/**
|
|
110
|
-
* The body slot for the dialog. Here is where you can put your dialog body.
|
|
111
|
-
*/
|
|
112
|
-
body?: Slot | string;
|
|
113
|
-
/**
|
|
114
|
-
* The footer slot for the dialog. Here is where you can put your dialog footer.
|
|
115
|
-
* Use this slot if you need to custom the dialog buttons.
|
|
116
|
-
*/
|
|
117
|
-
footer?: Slot | string;
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
/**
|
|
121
|
-
* Emits for DialogConfirm component
|
|
122
|
-
*/
|
|
123
|
-
export type DialogConfirmEmits = {
|
|
124
|
-
/**
|
|
125
|
-
* Emits when close button clicked.
|
|
126
|
-
*/
|
|
127
|
-
'close': [];
|
|
128
|
-
/**
|
|
129
|
-
* Emits when Confirm button clicked.
|
|
130
|
-
*/
|
|
131
|
-
'confirm': [];
|
|
132
|
-
/**
|
|
133
|
-
* Emits when dialog closed.
|
|
134
|
-
*/
|
|
135
|
-
'hide': [];
|
|
136
|
-
/**
|
|
137
|
-
* Emits when the dialog is closed. Wether from cancel button, close button, or ESC button pressed.
|
|
138
|
-
*/
|
|
139
|
-
'update:visible': [state: boolean];
|
|
140
|
-
};
|
|
141
|
-
|
|
142
|
-
/**
|
|
143
|
-
* **WangsVue - DialogConfirm**
|
|
144
|
-
*
|
|
145
|
-
* _DialogConfirm is a component for creating confirmation dialogs._
|
|
146
|
-
*
|
|
147
|
-
* --- ---
|
|
148
|
-
* 
|
|
149
|
-
*
|
|
150
|
-
* @group components
|
|
151
|
-
*/
|
|
152
|
-
declare class DialogConfirm extends ClassComponent<
|
|
153
|
-
DialogConfirmProps,
|
|
154
|
-
DialogConfirmSlots,
|
|
155
|
-
DialogConfirmEmits
|
|
156
|
-
> {}
|
|
157
|
-
|
|
158
|
-
declare module '@vue/runtime-core' {
|
|
159
|
-
interface GlobalComponents {
|
|
160
|
-
DialogConfirm: GlobalComponentConstructor<DialogConfirm>;
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
export default DialogConfirm;
|
|
@@ -1,349 +0,0 @@
|
|
|
1
|
-
import { GenericObject } from 'vee-validate';
|
|
2
|
-
import { Slot } from 'vue';
|
|
3
|
-
import FormInstance, { FormPayload, FormProps } from '../form/Form.vue.d';
|
|
4
|
-
import { WangsIcons } from '../icon/Icon.vue.d';
|
|
5
|
-
import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
|
|
6
|
-
|
|
7
|
-
export type DialogFormValue =
|
|
8
|
-
| string
|
|
9
|
-
| string[]
|
|
10
|
-
| number
|
|
11
|
-
| number[]
|
|
12
|
-
| boolean
|
|
13
|
-
| boolean[]
|
|
14
|
-
| Record<string, unknown>
|
|
15
|
-
| Record<string, unknown>[];
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* Generic form payload, able to receive types from outside
|
|
19
|
-
*/
|
|
20
|
-
export type DialogFormPayload<
|
|
21
|
-
FormValuesType = Record<string, DialogFormValue>,
|
|
22
|
-
> = {
|
|
23
|
-
stayAfterSubmit: boolean;
|
|
24
|
-
formValues: FormValuesType;
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
export interface DialogFormLocaleConfig {
|
|
28
|
-
/**
|
|
29
|
-
* @example 'Cancel'
|
|
30
|
-
*/
|
|
31
|
-
cancelBtnLabel?: string;
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* @example 'Clear Field'
|
|
35
|
-
*/
|
|
36
|
-
clearBtnLabel?: string;
|
|
37
|
-
|
|
38
|
-
/**
|
|
39
|
-
* @example 'Stay after submit'
|
|
40
|
-
*/
|
|
41
|
-
stayCheckboxLabel?: string;
|
|
42
|
-
|
|
43
|
-
/**
|
|
44
|
-
* @example 'Submit'
|
|
45
|
-
*/
|
|
46
|
-
submitBtnLabel?: string;
|
|
47
|
-
|
|
48
|
-
/**
|
|
49
|
-
* Set the label for button expand sidebar right when it is expanded.
|
|
50
|
-
*
|
|
51
|
-
* @example 'Tutup <'
|
|
52
|
-
*/
|
|
53
|
-
asideRightExpandedButtonLabel?: string;
|
|
54
|
-
|
|
55
|
-
/**
|
|
56
|
-
* Set the label for button expand sidebar right when it is collapsed.
|
|
57
|
-
*
|
|
58
|
-
* @example 'Lihat data yang ada >'
|
|
59
|
-
*/
|
|
60
|
-
asideRightCollapsedButtonLabel?: string;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
/**
|
|
64
|
-
* Props for DialogForm component
|
|
65
|
-
*/
|
|
66
|
-
export interface DialogFormProps extends FormProps {
|
|
67
|
-
/**
|
|
68
|
-
* The template for form buttons.
|
|
69
|
-
*/
|
|
70
|
-
buttonsTemplate: ('clear' | 'submit' | 'cancel')[];
|
|
71
|
-
|
|
72
|
-
/**
|
|
73
|
-
* The dialog header.
|
|
74
|
-
*/
|
|
75
|
-
header: string;
|
|
76
|
-
|
|
77
|
-
/**
|
|
78
|
-
* Value binding to show/hide the dialog.
|
|
79
|
-
*/
|
|
80
|
-
visible: boolean;
|
|
81
|
-
|
|
82
|
-
/**
|
|
83
|
-
* With in pixel
|
|
84
|
-
*
|
|
85
|
-
* @default 260
|
|
86
|
-
*/
|
|
87
|
-
asideRightWidth?: number;
|
|
88
|
-
class?: string | string[];
|
|
89
|
-
|
|
90
|
-
/**
|
|
91
|
-
* Custom button cancel label.
|
|
92
|
-
*
|
|
93
|
-
* @default - The default value from locale configuration {@link DialogFormLocaleConfig.cancelBtnLabel}
|
|
94
|
-
*
|
|
95
|
-
*/
|
|
96
|
-
cancelBtnLabel?: string;
|
|
97
|
-
|
|
98
|
-
/**
|
|
99
|
-
* Custom button clear label.
|
|
100
|
-
*
|
|
101
|
-
* @default - The default value from locale configuration {@link DialogFormLocaleConfig.clearBtnLabel}
|
|
102
|
-
*/
|
|
103
|
-
clearBtnLabel?: string;
|
|
104
|
-
|
|
105
|
-
/**
|
|
106
|
-
* Wether show the Close icon or not.
|
|
107
|
-
*/
|
|
108
|
-
closable?: boolean;
|
|
109
|
-
|
|
110
|
-
/**
|
|
111
|
-
* Close dialog after form validated and submitted.
|
|
112
|
-
*
|
|
113
|
-
* @default true
|
|
114
|
-
*/
|
|
115
|
-
closeOnSubmit?: boolean;
|
|
116
|
-
|
|
117
|
-
/**
|
|
118
|
-
* @deprecated
|
|
119
|
-
*/
|
|
120
|
-
contentClass?: string | string[];
|
|
121
|
-
|
|
122
|
-
/**
|
|
123
|
-
* Show Date time on header.
|
|
124
|
-
*/
|
|
125
|
-
dateHeader?: string;
|
|
126
|
-
|
|
127
|
-
/**
|
|
128
|
-
* Set the header icon left beside of the title.
|
|
129
|
-
*/
|
|
130
|
-
headerIcon?: WangsIcons;
|
|
131
|
-
|
|
132
|
-
/**
|
|
133
|
-
* Sets the invalid state.
|
|
134
|
-
*
|
|
135
|
-
* @default false
|
|
136
|
-
*/
|
|
137
|
-
invalid?: boolean;
|
|
138
|
-
|
|
139
|
-
/**
|
|
140
|
-
* Prevent form resets after submitted. Default is resetted.
|
|
141
|
-
*
|
|
142
|
-
* @default true
|
|
143
|
-
*/
|
|
144
|
-
resetAfterSubmit?: boolean;
|
|
145
|
-
|
|
146
|
-
/**
|
|
147
|
-
* The severity of the dialog.
|
|
148
|
-
* The severity will determine the dialog icons and color scheme.
|
|
149
|
-
*/
|
|
150
|
-
severity?: 'success' | 'danger' | 'primary';
|
|
151
|
-
|
|
152
|
-
/**
|
|
153
|
-
* Show or hide the checkbox 'Stay after submit.'
|
|
154
|
-
*
|
|
155
|
-
* @default true - if the action is submit.
|
|
156
|
-
* @default false - if the action is save.
|
|
157
|
-
*/
|
|
158
|
-
showStayCheckbox?: boolean;
|
|
159
|
-
|
|
160
|
-
/**
|
|
161
|
-
* Custom label for stay checkbox.
|
|
162
|
-
*
|
|
163
|
-
* @default - The default value from locale configuration {@link DialogFormLocaleConfig.stayCheckboxLabel}
|
|
164
|
-
*/
|
|
165
|
-
stayCheckboxLabel?: string;
|
|
166
|
-
|
|
167
|
-
/**
|
|
168
|
-
* Custom button submit label.
|
|
169
|
-
* @default - The default value from locale configuration {@link DialogFormLocaleConfig.submitBtnLabel}
|
|
170
|
-
*/
|
|
171
|
-
submitBtnLabel?: string;
|
|
172
|
-
|
|
173
|
-
/**
|
|
174
|
-
* Define the invalid message to be shown on invalid state above the Form submit button.
|
|
175
|
-
*
|
|
176
|
-
* @default undefined
|
|
177
|
-
*/
|
|
178
|
-
validatorMessage?: string;
|
|
179
|
-
|
|
180
|
-
/**
|
|
181
|
-
* Additional validation function.
|
|
182
|
-
* Within this this function, you need to set the invalid props value.
|
|
183
|
-
*
|
|
184
|
-
* If after executing this function the props invalid is true, the form will not be submitted.
|
|
185
|
-
* Otherwise, 'submit' event will be emitted.
|
|
186
|
-
*
|
|
187
|
-
* @param values - the Form values
|
|
188
|
-
*/
|
|
189
|
-
validationFunction?: (values: GenericObject) => void | Promise<void>;
|
|
190
|
-
|
|
191
|
-
/**
|
|
192
|
-
* Set the dialog size.
|
|
193
|
-
*
|
|
194
|
-
* - small: 400px
|
|
195
|
-
* - medium: 500px
|
|
196
|
-
* - large: 572px
|
|
197
|
-
* - semi-xlarge: 600px
|
|
198
|
-
* - xlarge: 800px
|
|
199
|
-
*
|
|
200
|
-
* @default 'small';
|
|
201
|
-
*/
|
|
202
|
-
width?: 'small' | 'medium' | 'large' | 'semi-xlarge' | 'xlarge';
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
export interface ConfirmSlots {
|
|
206
|
-
/**
|
|
207
|
-
* The Visible state.
|
|
208
|
-
*/
|
|
209
|
-
visible: boolean;
|
|
210
|
-
|
|
211
|
-
/**
|
|
212
|
-
* Hide the confirm dialog.
|
|
213
|
-
*/
|
|
214
|
-
hide: () => void;
|
|
215
|
-
|
|
216
|
-
/**
|
|
217
|
-
* The submit function to be called after confirmation.
|
|
218
|
-
*/
|
|
219
|
-
submit: (submitFn: (value: FormPayload) => Promise<void> | void) => void;
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
export interface ActionSlots {
|
|
223
|
-
/**
|
|
224
|
-
* The submit function to be called after confirmation.
|
|
225
|
-
*/
|
|
226
|
-
submit: (submitFn: () => Promise<void> | void) => void;
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
/**
|
|
230
|
-
* Slots for DialogForm component
|
|
231
|
-
*/
|
|
232
|
-
export interface DialogFormSlots {
|
|
233
|
-
/**
|
|
234
|
-
* Slot for action buttons.
|
|
235
|
-
*/
|
|
236
|
-
'actionButtons': Slot<ActionSlots>;
|
|
237
|
-
|
|
238
|
-
/**
|
|
239
|
-
* Slot for aside right expansion.
|
|
240
|
-
*/
|
|
241
|
-
'aside-right': Slot;
|
|
242
|
-
|
|
243
|
-
/**
|
|
244
|
-
* Slot for dialog confirm.
|
|
245
|
-
*/
|
|
246
|
-
'confirm': Slot<ConfirmSlots>;
|
|
247
|
-
|
|
248
|
-
/**
|
|
249
|
-
* The fields slot for the Dialogform. Here is where you can put your Dialogform fields.
|
|
250
|
-
*/
|
|
251
|
-
'fields': Slot<{ formValues: GenericObject; key?: number }>;
|
|
252
|
-
|
|
253
|
-
/**
|
|
254
|
-
* Slot for dialog header.
|
|
255
|
-
*/
|
|
256
|
-
'header': Slot;
|
|
257
|
-
}
|
|
258
|
-
|
|
259
|
-
/**
|
|
260
|
-
* Emits for DialogForm component
|
|
261
|
-
*/
|
|
262
|
-
export type DialogFormEmits = {
|
|
263
|
-
/**
|
|
264
|
-
* Emits when 'Clear Field' button clicked.
|
|
265
|
-
*/
|
|
266
|
-
'clear': [];
|
|
267
|
-
|
|
268
|
-
/**
|
|
269
|
-
* When dialog is closed by close button.
|
|
270
|
-
*/
|
|
271
|
-
'close': [];
|
|
272
|
-
|
|
273
|
-
/**
|
|
274
|
-
* Callback to invoke when dialog is hidden.
|
|
275
|
-
*/
|
|
276
|
-
'hide': [];
|
|
277
|
-
|
|
278
|
-
/**
|
|
279
|
-
* Callback to invoke when dialog is shown.
|
|
280
|
-
*/
|
|
281
|
-
'show': [];
|
|
282
|
-
|
|
283
|
-
/**
|
|
284
|
-
* Emits when the form validation succes and props.invalid is 'false'.
|
|
285
|
-
*/
|
|
286
|
-
'submit': [values: DialogFormPayload];
|
|
287
|
-
|
|
288
|
-
/**
|
|
289
|
-
* When dialog is closed.
|
|
290
|
-
*/
|
|
291
|
-
'update:visible': [state: boolean];
|
|
292
|
-
};
|
|
293
|
-
|
|
294
|
-
/**
|
|
295
|
-
* **WangsVue - DialogForm**
|
|
296
|
-
*
|
|
297
|
-
* _DialogForm is combination of Form and Dialog. Handles validation on submit using vee-validate.
|
|
298
|
-
* You need to install vee-validate while using this component._
|
|
299
|
-
*
|
|
300
|
-
* --- ---
|
|
301
|
-
* 
|
|
302
|
-
*
|
|
303
|
-
* @group components
|
|
304
|
-
*/
|
|
305
|
-
declare class DialogForm extends ClassComponent<
|
|
306
|
-
DialogFormProps,
|
|
307
|
-
DialogFormSlots,
|
|
308
|
-
DialogFormEmits
|
|
309
|
-
> {
|
|
310
|
-
/**
|
|
311
|
-
* Exposed function to clears the form fields.
|
|
312
|
-
*/
|
|
313
|
-
clearField: () => void;
|
|
314
|
-
|
|
315
|
-
/**
|
|
316
|
-
* The ref of form element.
|
|
317
|
-
*/
|
|
318
|
-
form: FormInstance;
|
|
319
|
-
|
|
320
|
-
/**
|
|
321
|
-
* Set initial values for all fields.
|
|
322
|
-
*/
|
|
323
|
-
setValues: (values: GenericObject) => void;
|
|
324
|
-
|
|
325
|
-
/**
|
|
326
|
-
* Set value for specific field.
|
|
327
|
-
*/
|
|
328
|
-
setFieldValue: <T extends string>(
|
|
329
|
-
field: T,
|
|
330
|
-
value: GenericObject[T],
|
|
331
|
-
shouldValidate?: boolean,
|
|
332
|
-
) => void;
|
|
333
|
-
|
|
334
|
-
/**
|
|
335
|
-
* Set errors fields
|
|
336
|
-
* @param fields - {
|
|
337
|
-
* name: 'This name already exists'
|
|
338
|
-
* }
|
|
339
|
-
*/
|
|
340
|
-
setErrors(fields: GenericObject): void;
|
|
341
|
-
}
|
|
342
|
-
|
|
343
|
-
declare module '@vue/runtime-core' {
|
|
344
|
-
interface GlobalComponents {
|
|
345
|
-
DialogForm: GlobalComponentConstructor<DialogForm>;
|
|
346
|
-
}
|
|
347
|
-
}
|
|
348
|
-
|
|
349
|
-
export default DialogForm;
|
|
@@ -1,136 +0,0 @@
|
|
|
1
|
-
import { TreeSelectionKeys } from 'primevue/tree';
|
|
2
|
-
import { TreeNode } from '../basetree/BaseTree.vue.d';
|
|
3
|
-
import { QueryParams, ShortFetchResponse } from '../datatable/DataTable.vue.d';
|
|
4
|
-
import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
|
|
5
|
-
import TreeInstance, { TreeProps } from '../tree/Tree.vue.d';
|
|
6
|
-
import { Slot } from 'vue';
|
|
7
|
-
|
|
8
|
-
export interface DialogSelectTreeProps
|
|
9
|
-
extends Omit<TreeProps, 'type' | 'filter'> {
|
|
10
|
-
fetchTree?: (
|
|
11
|
-
type: 'group' | 'category',
|
|
12
|
-
params?: QueryParams,
|
|
13
|
-
) => Promise<ShortFetchResponse<TreeNode> | undefined>;
|
|
14
|
-
params?: QueryParams;
|
|
15
|
-
visible?: boolean;
|
|
16
|
-
type?: 'group' | 'category';
|
|
17
|
-
/**
|
|
18
|
-
* Specify wether the all tree node should be auto checked once it rendered.
|
|
19
|
-
* @default false
|
|
20
|
-
*/
|
|
21
|
-
autoSelectAll?: boolean;
|
|
22
|
-
header?: string;
|
|
23
|
-
subHeader?: string;
|
|
24
|
-
selectionMode?: 'single' | 'checkbox';
|
|
25
|
-
/**
|
|
26
|
-
* Current behavior is preventing select if there is no node selected.
|
|
27
|
-
*
|
|
28
|
-
* @default true
|
|
29
|
-
*/
|
|
30
|
-
allowEmptySelection?: boolean;
|
|
31
|
-
/**
|
|
32
|
-
* The previously selected tree key to be displayed again.
|
|
33
|
-
*/
|
|
34
|
-
keys?: number[];
|
|
35
|
-
/**
|
|
36
|
-
* The lists to be displayed in the dialog.
|
|
37
|
-
*/
|
|
38
|
-
lists?: (string | object)[];
|
|
39
|
-
/**
|
|
40
|
-
* The label of the list if your list item is an object.
|
|
41
|
-
* Choose a property from the item to be displayed on the list.
|
|
42
|
-
*/
|
|
43
|
-
listLabel?: string;
|
|
44
|
-
/**
|
|
45
|
-
* Disable node 'All' selection
|
|
46
|
-
*/
|
|
47
|
-
disableNodeAll?: boolean;
|
|
48
|
-
/**
|
|
49
|
-
* @deprecated
|
|
50
|
-
*/
|
|
51
|
-
exactDisableKey?: number;
|
|
52
|
-
/**
|
|
53
|
-
* A list of node keys that should be disabled along with their children.
|
|
54
|
-
*/
|
|
55
|
-
disableKeys?: number[];
|
|
56
|
-
/**
|
|
57
|
-
* A list of node keys that should be disabled, affecting only the specified nodes and not their children.
|
|
58
|
-
*/
|
|
59
|
-
exactDisableKeys?: number[];
|
|
60
|
-
/**
|
|
61
|
-
* Defines the tree is readonly and disabled.
|
|
62
|
-
*/
|
|
63
|
-
readonly?: boolean;
|
|
64
|
-
/**
|
|
65
|
-
* Defines the group tree to showing disposable groups.
|
|
66
|
-
*/
|
|
67
|
-
showDisposableGroups?: boolean;
|
|
68
|
-
/**
|
|
69
|
-
* Defines the tree to be flattened and shows disposable only
|
|
70
|
-
*/
|
|
71
|
-
flattenDisposableNode?: boolean;
|
|
72
|
-
/**
|
|
73
|
-
* Defines the group tree to disable excluded keys
|
|
74
|
-
*/
|
|
75
|
-
excludedKeys?: number[];
|
|
76
|
-
/**
|
|
77
|
-
* Render hidden dialog to trigger fetch tree
|
|
78
|
-
*/
|
|
79
|
-
hidden?: boolean;
|
|
80
|
-
|
|
81
|
-
propagateSelection?: boolean;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
export type TreeSelectPayload = {
|
|
85
|
-
keys: TreeSelectionKeys | undefined;
|
|
86
|
-
selectedNodes: TreeNode[] | undefined;
|
|
87
|
-
singleNode: TreeNode | undefined;
|
|
88
|
-
};
|
|
89
|
-
|
|
90
|
-
export type DialogSelectTreeEmits = {
|
|
91
|
-
select: [keys?: TreeSelectPayload];
|
|
92
|
-
hide: [];
|
|
93
|
-
};
|
|
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
|
-
|
|
114
|
-
/**
|
|
115
|
-
* **TSVue v2 - DialogSelectTree**
|
|
116
|
-
*
|
|
117
|
-
* --- ---
|
|
118
|
-
* 
|
|
119
|
-
*
|
|
120
|
-
* @group components
|
|
121
|
-
*/
|
|
122
|
-
declare class DialogSelectTree extends ClassComponent<
|
|
123
|
-
DialogSelectTreeProps,
|
|
124
|
-
DialogSelectTreeSlots,
|
|
125
|
-
DialogSelectTreeEmits
|
|
126
|
-
> {
|
|
127
|
-
treeComponent: TreeInstance;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
declare module '@vue/runtime-core' {
|
|
131
|
-
interface GlobalComponents {
|
|
132
|
-
DialogSelectTree: GlobalComponentConstructor<DialogSelectTree>;
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
export default DialogSelectTree;
|