@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,274 +0,0 @@
|
|
|
1
|
-
import { Slot } from 'vue';
|
|
2
|
-
import { CustomValidation } from '../form/Form.vue.d';
|
|
3
|
-
import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
|
|
4
|
-
import { BadgeProps } from '../badge/Badge.vue.d';
|
|
5
|
-
import { WangsIcons } from '../icon/Icon.vue.d';
|
|
6
|
-
|
|
7
|
-
export type OptionValue = string | number | boolean | Record<string, any>;
|
|
8
|
-
|
|
9
|
-
export type Option = {
|
|
10
|
-
label?: string;
|
|
11
|
-
value?: OptionValue;
|
|
12
|
-
visible?: boolean;
|
|
13
|
-
icon?: WangsIcons;
|
|
14
|
-
[key: string]: any;
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* Configuration interface for localizing dropdown component placeholders and error messages.
|
|
19
|
-
*/
|
|
20
|
-
export interface DropdownLocaleConfig {
|
|
21
|
-
/**
|
|
22
|
-
* Placeholder text for the filter input field.
|
|
23
|
-
*
|
|
24
|
-
* @default undefined
|
|
25
|
-
*/
|
|
26
|
-
filterPlaceholder?: string;
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* Placeholder text displayed while the dropdown is loading.
|
|
30
|
-
*
|
|
31
|
-
* @example 'Loading...'
|
|
32
|
-
* @default undefined
|
|
33
|
-
*/
|
|
34
|
-
loadingPlaceholder?: string;
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
* Placeholder text for the input field when no selection has been made.
|
|
38
|
-
*
|
|
39
|
-
* This text can include a placeholder `{label}` which will be replaced with the value of `props.label`.
|
|
40
|
-
*
|
|
41
|
-
* @example 'Select {label}' - If `props.label` is 'Option', the placeholder will be 'Select Option'.
|
|
42
|
-
* @example 'Select {lowercaseLabel}' - If `props.label` is 'Option', the placeholder will be 'Select option'.
|
|
43
|
-
* @default undefined
|
|
44
|
-
*/
|
|
45
|
-
inputPlaceholder?: string;
|
|
46
|
-
|
|
47
|
-
/**
|
|
48
|
-
* Error message displayed when no selection has been made.
|
|
49
|
-
*
|
|
50
|
-
* This message can include placeholders:
|
|
51
|
-
* - `{label}`: Replaced with the value of `props.label`.
|
|
52
|
-
* - `{formattedLabel}`: Replaced with the value of `props.label` formatted with an appropriate article (a/an).
|
|
53
|
-
*
|
|
54
|
-
* @example
|
|
55
|
-
* // If `props.label` is 'Label', the error message will be:
|
|
56
|
-
* '{label} must be picked' - 'Label must be picked'
|
|
57
|
-
*
|
|
58
|
-
* @example
|
|
59
|
-
* // If `props.label` is 'user', the error message will be:
|
|
60
|
-
* 'You must pick {formattedLabel}' - 'You must pick a user'
|
|
61
|
-
*
|
|
62
|
-
* @default undefined
|
|
63
|
-
*/
|
|
64
|
-
emptySelectionErrorMessage?: string;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
/**
|
|
68
|
-
* Dropdown component props
|
|
69
|
-
*/
|
|
70
|
-
export interface DropdownProps {
|
|
71
|
-
/**
|
|
72
|
-
* Don't use modelValue with useValidator at the same time.
|
|
73
|
-
* It may lead unexpected behavior.
|
|
74
|
-
*/
|
|
75
|
-
modelValue?: OptionValue;
|
|
76
|
-
|
|
77
|
-
/**
|
|
78
|
-
* If you deals with form validation on edit form action, you can set the initial value of the field.
|
|
79
|
-
*/
|
|
80
|
-
initialValue?: OptionValue;
|
|
81
|
-
|
|
82
|
-
/**
|
|
83
|
-
* The input label. Tell the user what input is this.
|
|
84
|
-
*/
|
|
85
|
-
label?: string;
|
|
86
|
-
|
|
87
|
-
/**
|
|
88
|
-
* List of options to display.
|
|
89
|
-
*/
|
|
90
|
-
options?: Option[] | string[] | Record<string, any>;
|
|
91
|
-
|
|
92
|
-
/**
|
|
93
|
-
* Allows `null` to be treated as a valid selectable option in the dropdown.
|
|
94
|
-
*
|
|
95
|
-
* When enabled, `null` can be included in the options list and selected by the user.
|
|
96
|
-
*/
|
|
97
|
-
allowNullOption?: boolean;
|
|
98
|
-
|
|
99
|
-
/**
|
|
100
|
-
* Specify the property name of option to be used as label.
|
|
101
|
-
*
|
|
102
|
-
* @default undefined - the label will be sets to the option itself.
|
|
103
|
-
*/
|
|
104
|
-
optionLabel?: string;
|
|
105
|
-
|
|
106
|
-
/**
|
|
107
|
-
* Specify the property name of option to be used as value.
|
|
108
|
-
*
|
|
109
|
-
* @default undefined - the value will be sets to the option itself.
|
|
110
|
-
*/
|
|
111
|
-
optionValue?: string;
|
|
112
|
-
|
|
113
|
-
/**
|
|
114
|
-
* Define the value style, whether badge or plain text
|
|
115
|
-
*
|
|
116
|
-
* @default 'plain'
|
|
117
|
-
*/
|
|
118
|
-
valueType?: 'badge' | 'plain';
|
|
119
|
-
|
|
120
|
-
/**
|
|
121
|
-
* Bind the badge property to the dropdown value
|
|
122
|
-
*/
|
|
123
|
-
badgeValueProps?: Omit<BadgeProps, 'label'>;
|
|
124
|
-
|
|
125
|
-
/**
|
|
126
|
-
* Set the input border style
|
|
127
|
-
*
|
|
128
|
-
* @default 'default'
|
|
129
|
-
*/
|
|
130
|
-
inputBorder?: 'none' | 'default';
|
|
131
|
-
|
|
132
|
-
/**
|
|
133
|
-
* A property to uniquely identify an option.
|
|
134
|
-
*/
|
|
135
|
-
dataKey?: string | undefined;
|
|
136
|
-
|
|
137
|
-
/**
|
|
138
|
-
* Determines if the field uses a validator
|
|
139
|
-
*/
|
|
140
|
-
useValidator?: boolean;
|
|
141
|
-
|
|
142
|
-
/**
|
|
143
|
-
* Determines if the field is mandatory
|
|
144
|
-
*/
|
|
145
|
-
mandatory?: boolean;
|
|
146
|
-
|
|
147
|
-
/**
|
|
148
|
-
* Show the text (opsional)
|
|
149
|
-
*
|
|
150
|
-
* @default true if mandatory true
|
|
151
|
-
*/
|
|
152
|
-
showOptionalText?: boolean;
|
|
153
|
-
|
|
154
|
-
/**
|
|
155
|
-
* Set custom validator message.
|
|
156
|
-
* It is rarely use, this component has handled the validator message.
|
|
157
|
-
*
|
|
158
|
-
*
|
|
159
|
-
* @example: 'This field is required'
|
|
160
|
-
* @example: { empty: 'This field is required' }
|
|
161
|
-
*/
|
|
162
|
-
validatorMessage?: string | CustomValidation<'empty'>;
|
|
163
|
-
|
|
164
|
-
/**
|
|
165
|
-
* Wether to format the message
|
|
166
|
-
*
|
|
167
|
-
* @default true
|
|
168
|
-
*/
|
|
169
|
-
formatValidatorMessage?: boolean;
|
|
170
|
-
|
|
171
|
-
/**
|
|
172
|
-
* Set custom invalid state.
|
|
173
|
-
*/
|
|
174
|
-
invalid?: boolean;
|
|
175
|
-
|
|
176
|
-
/**
|
|
177
|
-
* This prop is required if you use this component in a form input.
|
|
178
|
-
* Specify the unique field name, match with your needs for API request.
|
|
179
|
-
*
|
|
180
|
-
* @default 'dropdown'
|
|
181
|
-
*/
|
|
182
|
-
fieldName?: string;
|
|
183
|
-
|
|
184
|
-
/**
|
|
185
|
-
* Default text to display when no option is selected.
|
|
186
|
-
*
|
|
187
|
-
* @default `Select ${label}`
|
|
188
|
-
*/
|
|
189
|
-
placeholder?: string;
|
|
190
|
-
|
|
191
|
-
/**
|
|
192
|
-
* Whether the dropdown is in loading state.
|
|
193
|
-
* @defaultValue false
|
|
194
|
-
*/
|
|
195
|
-
loading?: boolean;
|
|
196
|
-
|
|
197
|
-
/**
|
|
198
|
-
* Show icon 'info' on the right side of label.
|
|
199
|
-
* Show information to user about the field on icon hover.
|
|
200
|
-
*/
|
|
201
|
-
fieldInfo?: string;
|
|
202
|
-
|
|
203
|
-
/**
|
|
204
|
-
* Set disabled state for input dropdown.
|
|
205
|
-
*/
|
|
206
|
-
disabled?: boolean;
|
|
207
|
-
|
|
208
|
-
/**
|
|
209
|
-
* Whether show the Dropdown option search or not.
|
|
210
|
-
*
|
|
211
|
-
* @default true,
|
|
212
|
-
*/
|
|
213
|
-
filter?: boolean;
|
|
214
|
-
|
|
215
|
-
/**
|
|
216
|
-
* The filter input Placeholder
|
|
217
|
-
*
|
|
218
|
-
* @default 'Search'
|
|
219
|
-
*/
|
|
220
|
-
filterPlaceholder?: string;
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
export interface DropdownSlots {
|
|
224
|
-
'value': Slot<{ value: string; originalValue: any }>;
|
|
225
|
-
'option': Slot<{ option: Option }>;
|
|
226
|
-
'addon-left': Slot;
|
|
227
|
-
'addon-right': Slot;
|
|
228
|
-
}
|
|
229
|
-
|
|
230
|
-
/**
|
|
231
|
-
* Dropdown component emits
|
|
232
|
-
*/
|
|
233
|
-
export type DropdownEmits = {
|
|
234
|
-
/**
|
|
235
|
-
* Emits when an option selected.
|
|
236
|
-
*/
|
|
237
|
-
'update:modelValue': [value: OptionValue | undefined];
|
|
238
|
-
|
|
239
|
-
/**
|
|
240
|
-
* Emits when overlay shown.
|
|
241
|
-
*/
|
|
242
|
-
'show': [];
|
|
243
|
-
};
|
|
244
|
-
|
|
245
|
-
/**
|
|
246
|
-
* **WangsVue - Dropdown**
|
|
247
|
-
*
|
|
248
|
-
* _Dropdown also known as Select, is used to choose an item from a collection of options._
|
|
249
|
-
*
|
|
250
|
-
* --- ---
|
|
251
|
-
* 
|
|
252
|
-
*
|
|
253
|
-
* @group Component
|
|
254
|
-
*/
|
|
255
|
-
declare class Dropdown extends ClassComponent<
|
|
256
|
-
DropdownProps,
|
|
257
|
-
DropdownSlots,
|
|
258
|
-
DropdownEmits
|
|
259
|
-
> {
|
|
260
|
-
/**
|
|
261
|
-
* Shows the overlay.
|
|
262
|
-
*
|
|
263
|
-
* @memberof MultiSelect
|
|
264
|
-
*/
|
|
265
|
-
showOverlay(): void;
|
|
266
|
-
}
|
|
267
|
-
|
|
268
|
-
declare module '@vue/runtime-core' {
|
|
269
|
-
interface GlobalComponents {
|
|
270
|
-
Dropdown: GlobalComponentConstructor<Dropdown>;
|
|
271
|
-
}
|
|
272
|
-
}
|
|
273
|
-
|
|
274
|
-
export default Dropdown;
|
|
@@ -1,152 +0,0 @@
|
|
|
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;
|
|
@@ -1,191 +0,0 @@
|
|
|
1
|
-
import { EditorEvents } from '@tiptap/vue-3';
|
|
2
|
-
import { ClassComponent } from '../ts-helpers';
|
|
3
|
-
|
|
4
|
-
export interface EditorProps {
|
|
5
|
-
/**
|
|
6
|
-
* Model Value For Editor Content
|
|
7
|
-
*/
|
|
8
|
-
modelValue?: JSONContent;
|
|
9
|
-
/**
|
|
10
|
-
* Model Value For Editor Content
|
|
11
|
-
*/
|
|
12
|
-
initialValue?: JSONContent;
|
|
13
|
-
/**
|
|
14
|
-
* Specify the input placeholder.
|
|
15
|
-
*/
|
|
16
|
-
placeholder?: string;
|
|
17
|
-
/**
|
|
18
|
-
* Determine Editor State Readonly / Editable.
|
|
19
|
-
* @default 'editable'
|
|
20
|
-
*/
|
|
21
|
-
editorState?: EditorState;
|
|
22
|
-
/**
|
|
23
|
-
* Change Editor Border Content.
|
|
24
|
-
* @default false
|
|
25
|
-
*/
|
|
26
|
-
borderLess?: boolean;
|
|
27
|
-
/**
|
|
28
|
-
* The input label. Tell the user what input is this.
|
|
29
|
-
*/
|
|
30
|
-
label?: string;
|
|
31
|
-
/**
|
|
32
|
-
* Wether the input should be validated with vee-validator or not.
|
|
33
|
-
* If you use this component within form input, you need to set this props as true.
|
|
34
|
-
*/
|
|
35
|
-
useValidator?: boolean;
|
|
36
|
-
/**
|
|
37
|
-
* This prop is required if you use this component in a form input.
|
|
38
|
-
* Specify the unique field name, match with your needs for API request.
|
|
39
|
-
*
|
|
40
|
-
* @default 'editorInput'
|
|
41
|
-
*/
|
|
42
|
-
fieldName?: string;
|
|
43
|
-
/**
|
|
44
|
-
* Specify classes for label.
|
|
45
|
-
*/
|
|
46
|
-
labelClass?: string;
|
|
47
|
-
/**
|
|
48
|
-
* Show information to user about the field.
|
|
49
|
-
*/
|
|
50
|
-
fieldInfo?: string;
|
|
51
|
-
/**
|
|
52
|
-
* Classes for validator message in input field.
|
|
53
|
-
*/
|
|
54
|
-
validatorMessageClass?: string;
|
|
55
|
-
/**
|
|
56
|
-
* Set custom validator message.
|
|
57
|
-
* Will be show if invalid="true"
|
|
58
|
-
*/
|
|
59
|
-
validatorMessage?: string | { empty: string };
|
|
60
|
-
/**
|
|
61
|
-
* Wether this input field is required or not.
|
|
62
|
-
*/
|
|
63
|
-
mandatory?: boolean;
|
|
64
|
-
/**
|
|
65
|
-
* Invalid input state.
|
|
66
|
-
*/
|
|
67
|
-
invalid?: boolean;
|
|
68
|
-
/**
|
|
69
|
-
* Showing Optional value text on Label.
|
|
70
|
-
* @default true
|
|
71
|
-
*/
|
|
72
|
-
showOptionalText?: boolean;
|
|
73
|
-
/**
|
|
74
|
-
* Determine for image upload from local machine if value is true, no need to use postImageLocal emitter
|
|
75
|
-
* @default false
|
|
76
|
-
*/
|
|
77
|
-
isImageUploadBase64?: boolean;
|
|
78
|
-
/**
|
|
79
|
-
* Fetch function for mention this will get triger if putting @ in editor
|
|
80
|
-
*/
|
|
81
|
-
fetchMentionSuggestionFunction?: () => Promise<
|
|
82
|
-
GetMentionSuggestionResponse | undefined
|
|
83
|
-
>;
|
|
84
|
-
/**
|
|
85
|
-
* Getting all mentioned list
|
|
86
|
-
*/
|
|
87
|
-
mentionedList?: string[];
|
|
88
|
-
/**
|
|
89
|
-
* Add custom class tailwind for editor wrapper/container
|
|
90
|
-
* and preferred for using "!" bang! for your tailwind class just to make sure it apply
|
|
91
|
-
*/
|
|
92
|
-
editorWrapperClass?: string;
|
|
93
|
-
/**
|
|
94
|
-
* Add custom class tailwind for editor toolbar wrapper/container
|
|
95
|
-
* and preferred for using "!" bang! for your tailwind class just to make sure it apply
|
|
96
|
-
*/
|
|
97
|
-
toolbarWrapperClass?: string;
|
|
98
|
-
/**
|
|
99
|
-
* Add custom class tailwind for editor content wrapper/container
|
|
100
|
-
* and preferred for using "!" bang! for your tailwind class just to make sure it apply
|
|
101
|
-
*/
|
|
102
|
-
contentWrapperClass?: string;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
export type EditorEmits = {
|
|
106
|
-
/**
|
|
107
|
-
* Event emitted when the model value is updated
|
|
108
|
-
*/
|
|
109
|
-
'update:modelValue': [value: JSONContent];
|
|
110
|
-
/**
|
|
111
|
-
* Event emitted when try to upload image from local machine,
|
|
112
|
-
* and need to send file image to server first using value.image params and then
|
|
113
|
-
* get back image url that already get hosted.
|
|
114
|
-
* to set the image url back to editor to be show up simply using value.setImageCb from params
|
|
115
|
-
*/
|
|
116
|
-
'postImageLocal': [value: PostImage];
|
|
117
|
-
/**
|
|
118
|
-
* Event emitted when button in floating menu named :(unset image) is clicked,
|
|
119
|
-
* but this only get triger if selected image get set by postImageLocal function
|
|
120
|
-
*/
|
|
121
|
-
'deleteImageLocal': [value: ImageProperties];
|
|
122
|
-
/**
|
|
123
|
-
* Event emitted when the editor is blurred
|
|
124
|
-
*/
|
|
125
|
-
'blur': [value: EditorEvents['blur']];
|
|
126
|
-
/**
|
|
127
|
-
* Event emitted when the editor is focused
|
|
128
|
-
*/
|
|
129
|
-
'focus': [value: EditorEvents['focus']];
|
|
130
|
-
/**
|
|
131
|
-
* Emited Everytime mentioned user in editor change
|
|
132
|
-
*/
|
|
133
|
-
'update:mentionedList': [value: string[]];
|
|
134
|
-
};
|
|
135
|
-
|
|
136
|
-
export type PostImage = {
|
|
137
|
-
/**
|
|
138
|
-
* This Is Image File that should be send to server
|
|
139
|
-
*/
|
|
140
|
-
image: File;
|
|
141
|
-
/**
|
|
142
|
-
* Set Image Cb Is Callback For setting back image url that get send back
|
|
143
|
-
* from server through response
|
|
144
|
-
*/
|
|
145
|
-
setImageCb: (imageUrl: string) => void;
|
|
146
|
-
};
|
|
147
|
-
|
|
148
|
-
/**
|
|
149
|
-
* Editor Content Meta Data
|
|
150
|
-
*/
|
|
151
|
-
export type JSONContent = {
|
|
152
|
-
type?: string;
|
|
153
|
-
attrs?: Record<string, any>;
|
|
154
|
-
content?: JSONContent[];
|
|
155
|
-
marks?: {
|
|
156
|
-
type: string;
|
|
157
|
-
attrs?: Record<string, any>;
|
|
158
|
-
[key: string]: any;
|
|
159
|
-
}[];
|
|
160
|
-
text?: string;
|
|
161
|
-
[key: string]: any;
|
|
162
|
-
};
|
|
163
|
-
|
|
164
|
-
export type ImageProperties = {
|
|
165
|
-
alt?: string;
|
|
166
|
-
src: string;
|
|
167
|
-
title: string;
|
|
168
|
-
};
|
|
169
|
-
|
|
170
|
-
export type GetMentionSuggestionResponse = {
|
|
171
|
-
status: number;
|
|
172
|
-
message: string;
|
|
173
|
-
data: MentionSuggestion[];
|
|
174
|
-
};
|
|
175
|
-
|
|
176
|
-
export type MentionSuggestion = {
|
|
177
|
-
_id: string;
|
|
178
|
-
fullName: string;
|
|
179
|
-
nickName: string;
|
|
180
|
-
profilePicture: string;
|
|
181
|
-
};
|
|
182
|
-
|
|
183
|
-
export type EditorState = 'editable' | 'readonly';
|
|
184
|
-
|
|
185
|
-
declare class Editor extends ClassComponent<
|
|
186
|
-
EditorProps,
|
|
187
|
-
unknown,
|
|
188
|
-
EditorEmits
|
|
189
|
-
> {}
|
|
190
|
-
|
|
191
|
-
export default Editor;
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
declare const _default: import('vue').DefineComponent<
|
|
2
|
-
__VLS_TypePropsToOption<{
|
|
3
|
-
classButton?: string[];
|
|
4
|
-
}>,
|
|
5
|
-
{},
|
|
6
|
-
unknown,
|
|
7
|
-
{},
|
|
8
|
-
{},
|
|
9
|
-
import('vue').ComponentOptionsMixin,
|
|
10
|
-
import('vue').ComponentOptionsMixin,
|
|
11
|
-
{},
|
|
12
|
-
string,
|
|
13
|
-
import('vue').PublicProps,
|
|
14
|
-
Readonly<
|
|
15
|
-
import('vue').ExtractPropTypes<
|
|
16
|
-
__VLS_TypePropsToOption<{
|
|
17
|
-
classButton?: string[];
|
|
18
|
-
}>
|
|
19
|
-
>
|
|
20
|
-
>,
|
|
21
|
-
{},
|
|
22
|
-
{}
|
|
23
|
-
>;
|
|
24
|
-
export default _default;
|
|
25
|
-
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
26
|
-
type __VLS_TypePropsToOption<T> = {
|
|
27
|
-
[K in keyof T]-?: {} extends Pick<T, K>
|
|
28
|
-
? {
|
|
29
|
-
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
30
|
-
}
|
|
31
|
-
: {
|
|
32
|
-
type: import('vue').PropType<T[K]>;
|
|
33
|
-
required: true;
|
|
34
|
-
};
|
|
35
|
-
};
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
declare const _default: import('vue').DefineComponent<
|
|
2
|
-
__VLS_TypePropsToOption<{
|
|
3
|
-
items: {
|
|
4
|
-
id: string;
|
|
5
|
-
label: string;
|
|
6
|
-
nickName: string;
|
|
7
|
-
profilePicture: string;
|
|
8
|
-
}[];
|
|
9
|
-
command: (arg: { id: string; label: string }) => void;
|
|
10
|
-
}>,
|
|
11
|
-
{
|
|
12
|
-
onKeyDown: (event: KeyboardEvent) => boolean;
|
|
13
|
-
},
|
|
14
|
-
unknown,
|
|
15
|
-
{},
|
|
16
|
-
{},
|
|
17
|
-
import('vue').ComponentOptionsMixin,
|
|
18
|
-
import('vue').ComponentOptionsMixin,
|
|
19
|
-
{},
|
|
20
|
-
string,
|
|
21
|
-
import('vue').PublicProps,
|
|
22
|
-
Readonly<
|
|
23
|
-
import('vue').ExtractPropTypes<
|
|
24
|
-
__VLS_TypePropsToOption<{
|
|
25
|
-
items: {
|
|
26
|
-
id: string;
|
|
27
|
-
label: string;
|
|
28
|
-
nickName: string;
|
|
29
|
-
profilePicture: string;
|
|
30
|
-
}[];
|
|
31
|
-
command: (arg: { id: string; label: string }) => void;
|
|
32
|
-
}>
|
|
33
|
-
>
|
|
34
|
-
>,
|
|
35
|
-
{},
|
|
36
|
-
{}
|
|
37
|
-
>;
|
|
38
|
-
export default _default;
|
|
39
|
-
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
40
|
-
type __VLS_TypePropsToOption<T> = {
|
|
41
|
-
[K in keyof T]-?: {} extends Pick<T, K>
|
|
42
|
-
? {
|
|
43
|
-
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
44
|
-
}
|
|
45
|
-
: {
|
|
46
|
-
type: import('vue').PropType<T[K]>;
|
|
47
|
-
required: true;
|
|
48
|
-
};
|
|
49
|
-
};
|