@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,288 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* TabMenu is a navigation component that displays items as tab headers. Example below uses nested routes with TabMenu.
|
|
4
|
+
*
|
|
5
|
+
* [Live Demo](https://www.WangsVue.org/tabmenu/)
|
|
6
|
+
*
|
|
7
|
+
* @module tabmenu
|
|
8
|
+
*
|
|
9
|
+
*/
|
|
10
|
+
import { VNode } from 'vue';
|
|
11
|
+
import { ComponentHooks } from '../basecomponent';
|
|
12
|
+
import { MenuItem } from '../menuitem';
|
|
13
|
+
import { PassThroughOptions } from '../passthrough';
|
|
14
|
+
import { ClassComponent, PassThrough } from '../ts-helpers';
|
|
15
|
+
|
|
16
|
+
export declare type TabMenuPassThroughOptionType =
|
|
17
|
+
| TabMenuPassThroughAttributes
|
|
18
|
+
| ((
|
|
19
|
+
options: TabMenuPassThroughMethodOptions,
|
|
20
|
+
) => TabMenuPassThroughAttributes | string)
|
|
21
|
+
| string
|
|
22
|
+
| null
|
|
23
|
+
| undefined;
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Custom passthrough(pt) option method.
|
|
27
|
+
*/
|
|
28
|
+
export interface TabMenuPassThroughMethodOptions {
|
|
29
|
+
/**
|
|
30
|
+
* Defines instance.
|
|
31
|
+
*/
|
|
32
|
+
instance: any;
|
|
33
|
+
/**
|
|
34
|
+
* Defines valid properties.
|
|
35
|
+
*/
|
|
36
|
+
props: TabMenuProps;
|
|
37
|
+
/**
|
|
38
|
+
* Defines current inline state.
|
|
39
|
+
*/
|
|
40
|
+
state: TabMenuState;
|
|
41
|
+
/**
|
|
42
|
+
* Defines current options.
|
|
43
|
+
*/
|
|
44
|
+
context: TabMenuContext;
|
|
45
|
+
/**
|
|
46
|
+
* Defines valid attributes.
|
|
47
|
+
*/
|
|
48
|
+
attrs: any;
|
|
49
|
+
/**
|
|
50
|
+
* Defines parent options.
|
|
51
|
+
*/
|
|
52
|
+
parent: any;
|
|
53
|
+
/**
|
|
54
|
+
* Defines passthrough(pt) options in global config.
|
|
55
|
+
*/
|
|
56
|
+
global: object | undefined;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Custom passthrough(pt) options.
|
|
61
|
+
* @see {@link TabMenuProps.pt}
|
|
62
|
+
*/
|
|
63
|
+
export interface TabMenuPassThroughOptions {
|
|
64
|
+
/**
|
|
65
|
+
* Used to pass attributes to the root's DOM element.
|
|
66
|
+
*/
|
|
67
|
+
root?: TabMenuPassThroughOptionType;
|
|
68
|
+
/**
|
|
69
|
+
* Used to pass attributes to the list's DOM element.
|
|
70
|
+
*/
|
|
71
|
+
menu?: TabMenuPassThroughOptionType;
|
|
72
|
+
/**
|
|
73
|
+
* Used to pass attributes to the list item's DOM element.
|
|
74
|
+
*/
|
|
75
|
+
menuitem?: TabMenuPassThroughOptionType;
|
|
76
|
+
/**
|
|
77
|
+
* Used to pass attributes to the action's DOM element.
|
|
78
|
+
*/
|
|
79
|
+
action?: TabMenuPassThroughOptionType;
|
|
80
|
+
/**
|
|
81
|
+
* Used to pass attributes to the icon's DOM element.
|
|
82
|
+
*/
|
|
83
|
+
icon?: TabMenuPassThroughOptionType;
|
|
84
|
+
/**
|
|
85
|
+
* Used to pass attributes to the label's DOM element.
|
|
86
|
+
*/
|
|
87
|
+
label?: TabMenuPassThroughOptionType;
|
|
88
|
+
/**
|
|
89
|
+
* Used to pass attributes to the inkbar's DOM element.
|
|
90
|
+
*/
|
|
91
|
+
inkbar?: TabMenuPassThroughOptionType;
|
|
92
|
+
/**
|
|
93
|
+
* Used to manage all lifecycle hooks.
|
|
94
|
+
* @see {@link BaseComponent.ComponentHooks}
|
|
95
|
+
*/
|
|
96
|
+
hooks?: ComponentHooks;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* Custom passthrough attributes for each DOM elements
|
|
101
|
+
*/
|
|
102
|
+
export interface TabMenuPassThroughAttributes {
|
|
103
|
+
[key: string]: any;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* Defines current inline state in TabMenu component.
|
|
108
|
+
*/
|
|
109
|
+
export interface TabMenuState {
|
|
110
|
+
/**
|
|
111
|
+
* Current active index state as a number.
|
|
112
|
+
* @defaulValue 0
|
|
113
|
+
*/
|
|
114
|
+
d_activeIndex: number;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* Defines current options in TabMenu component.
|
|
119
|
+
*/
|
|
120
|
+
export interface TabMenuContext {
|
|
121
|
+
/**
|
|
122
|
+
* Current menuitem
|
|
123
|
+
*/
|
|
124
|
+
item: any;
|
|
125
|
+
/**
|
|
126
|
+
* Index of the menuitem
|
|
127
|
+
*/
|
|
128
|
+
index: number;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* Custom change event.
|
|
133
|
+
* @see {@link TabMenuEmits['tab-change']}
|
|
134
|
+
*/
|
|
135
|
+
export interface TabMenuChangeEvent {
|
|
136
|
+
/**
|
|
137
|
+
* Browser event
|
|
138
|
+
*/
|
|
139
|
+
originalEvent: Event;
|
|
140
|
+
/**
|
|
141
|
+
* Index of the selected tab
|
|
142
|
+
*/
|
|
143
|
+
index: number;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* Defines valid router binding props in TabMenu component.
|
|
148
|
+
*/
|
|
149
|
+
export interface TabMenuRouterBindProps {
|
|
150
|
+
/**
|
|
151
|
+
* Action element binding
|
|
152
|
+
*/
|
|
153
|
+
action: object;
|
|
154
|
+
/**
|
|
155
|
+
* Icon element binding
|
|
156
|
+
*/
|
|
157
|
+
icon: object;
|
|
158
|
+
/**
|
|
159
|
+
* Label element binding
|
|
160
|
+
*/
|
|
161
|
+
label: object;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
/**
|
|
165
|
+
* Defines valid properties in TabMenu component.
|
|
166
|
+
*/
|
|
167
|
+
export interface TabMenuProps {
|
|
168
|
+
/**
|
|
169
|
+
* An array of menuitems.
|
|
170
|
+
*/
|
|
171
|
+
menu?: MenuItem[] | undefined;
|
|
172
|
+
/**
|
|
173
|
+
* Defines type of TabMenu.
|
|
174
|
+
* @defaultValue 'tab'
|
|
175
|
+
*/
|
|
176
|
+
type?: 'tab' | 'pill';
|
|
177
|
+
/**
|
|
178
|
+
* Active index of menuitem.
|
|
179
|
+
* @defaultValue 0
|
|
180
|
+
*/
|
|
181
|
+
activeIndex?: number | undefined;
|
|
182
|
+
/**
|
|
183
|
+
* Whether to use trailing line at the end of tab menu.
|
|
184
|
+
* @defaultValue true - when type is tab, otherwise true
|
|
185
|
+
*/
|
|
186
|
+
useTrailingLine?: boolean | undefined;
|
|
187
|
+
/**
|
|
188
|
+
* Defines a string value that labels an interactive element.
|
|
189
|
+
*/
|
|
190
|
+
ariaLabel?: string | undefined;
|
|
191
|
+
/**
|
|
192
|
+
* Identifier of the underlying input element.
|
|
193
|
+
*/
|
|
194
|
+
ariaLabelledby?: string | undefined;
|
|
195
|
+
/**
|
|
196
|
+
* Used to pass attributes to DOM elements inside the component.
|
|
197
|
+
* @type {TabMenuPassThroughOptions}
|
|
198
|
+
*/
|
|
199
|
+
pt?: PassThrough<TabMenuPassThroughOptions>;
|
|
200
|
+
/**
|
|
201
|
+
* Used to configure passthrough(pt) options of the component.
|
|
202
|
+
* @type {PassThroughOptions}
|
|
203
|
+
*/
|
|
204
|
+
ptOptions?: PassThroughOptions;
|
|
205
|
+
/**
|
|
206
|
+
* When enabled, it removes component related styles in the core.
|
|
207
|
+
* @defaultValue false
|
|
208
|
+
*/
|
|
209
|
+
unstyled?: boolean;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
/**
|
|
213
|
+
* Defines valid slots in TabMenu component.
|
|
214
|
+
*/
|
|
215
|
+
export interface TabMenuSlots {
|
|
216
|
+
/**
|
|
217
|
+
* Custom content for each item.
|
|
218
|
+
* @param {Object} scope - item slot's params.
|
|
219
|
+
*/
|
|
220
|
+
item(scope: {
|
|
221
|
+
/**
|
|
222
|
+
* Menuitem instance
|
|
223
|
+
*/
|
|
224
|
+
item: MenuItem;
|
|
225
|
+
/**
|
|
226
|
+
* Index of the menuitem
|
|
227
|
+
*/
|
|
228
|
+
index: number;
|
|
229
|
+
/**
|
|
230
|
+
* Current active state of the menuitem
|
|
231
|
+
*/
|
|
232
|
+
active: boolean;
|
|
233
|
+
/**
|
|
234
|
+
* Label property of the menuitem
|
|
235
|
+
*/
|
|
236
|
+
label: string | ((...args: any) => string) | undefined;
|
|
237
|
+
/**
|
|
238
|
+
* Binding properties of the menuitem
|
|
239
|
+
*/
|
|
240
|
+
props: TabMenuRouterBindProps;
|
|
241
|
+
}): VNode[];
|
|
242
|
+
/**
|
|
243
|
+
* Custom item icon template.
|
|
244
|
+
* @param {Object} scope - item icon slot's params.
|
|
245
|
+
*/
|
|
246
|
+
itemicon(scope: {
|
|
247
|
+
/**
|
|
248
|
+
* Menuitem instance
|
|
249
|
+
*/
|
|
250
|
+
item: MenuItem;
|
|
251
|
+
/**
|
|
252
|
+
* Style class of the item icon element.
|
|
253
|
+
*/
|
|
254
|
+
class: any;
|
|
255
|
+
}): VNode[];
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
/**
|
|
259
|
+
* Defines valid emits in TabMenu component.
|
|
260
|
+
*/
|
|
261
|
+
export type TabMenuEmits = {
|
|
262
|
+
/**
|
|
263
|
+
* Callback to invoke when an active tab is changed.
|
|
264
|
+
* @param {TabMenuChangeEvent} event - Custom tab change event.
|
|
265
|
+
*/
|
|
266
|
+
'tab-change': [event: TabMenuChangeEvent];
|
|
267
|
+
'update:activeIndex': [index: number];
|
|
268
|
+
};
|
|
269
|
+
|
|
270
|
+
/**
|
|
271
|
+
* **WangsVue - TabMenu**
|
|
272
|
+
*
|
|
273
|
+
* _TabMenu is a navigation component that displays items as tab headers. Example below uses nested routes with TabMenu._
|
|
274
|
+
*
|
|
275
|
+
* [Live Demo](https://www.WangsVue.org/tabmenu/)
|
|
276
|
+
* --- ---
|
|
277
|
+
* 
|
|
278
|
+
*
|
|
279
|
+
* @group Component
|
|
280
|
+
*
|
|
281
|
+
*/
|
|
282
|
+
declare class TabMenu extends ClassComponent<
|
|
283
|
+
TabMenuProps,
|
|
284
|
+
TabMenuSlots,
|
|
285
|
+
TabMenuEmits
|
|
286
|
+
> {}
|
|
287
|
+
|
|
288
|
+
export default TabMenu;
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
import { TextareaHTMLAttributes } from 'vue';
|
|
2
|
+
import {
|
|
3
|
+
ClassComponent,
|
|
4
|
+
GlobalComponentConstructor,
|
|
5
|
+
Nullable,
|
|
6
|
+
Numberish,
|
|
7
|
+
} from '../ts-helpers.d';
|
|
8
|
+
import { CustomValidation } from '../form/Form.vue.d';
|
|
9
|
+
|
|
10
|
+
export interface TextareaLocaleConfig {
|
|
11
|
+
/**
|
|
12
|
+
* @example '{label} must not be empty' - label will be replaced with props.label
|
|
13
|
+
*/
|
|
14
|
+
emptyInvalidText?: string;
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* @example 'Max. {maxLength} characters' - maxLength will be replaced with props.maxLength
|
|
18
|
+
*/
|
|
19
|
+
exceedMaxLengthInvalidText?: string;
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* @example 'Enter {label}' - label can be ommited, and if exist will be replaced with props.label
|
|
23
|
+
*/
|
|
24
|
+
defaultPlaceholder?: string;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Defines valid properties in Textarea component. In addition to these, all properties of TextareaHTMLAttributes can be used in this component.
|
|
29
|
+
* @extends TextareaHTMLAttributes
|
|
30
|
+
*/
|
|
31
|
+
export interface TextareaProps
|
|
32
|
+
extends /* @vue-ignore */ TextareaHTMLAttributes {
|
|
33
|
+
/**
|
|
34
|
+
* The model value of text area.
|
|
35
|
+
*/
|
|
36
|
+
modelValue?: Nullable<string>;
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Sets the initial value of the field. This will only available with option 'useValidator'.
|
|
40
|
+
*
|
|
41
|
+
* In use case like edit form, you need to display the previous inputted value.
|
|
42
|
+
*/
|
|
43
|
+
value?: Nullable<string>;
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Set invalid input state. And show validatorMessage if available.
|
|
47
|
+
*/
|
|
48
|
+
invalid?: boolean;
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Disabled input state.
|
|
52
|
+
*/
|
|
53
|
+
disabled?: boolean;
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* When present, height of textarea changes as being typed.
|
|
57
|
+
* @defaultValue true
|
|
58
|
+
*/
|
|
59
|
+
autoResize?: boolean | undefined;
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Specifies the input variant of the component.
|
|
63
|
+
* @defaultValue outlined
|
|
64
|
+
*/
|
|
65
|
+
variant?: 'outlined' | 'filled' | undefined;
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Whether the input should be validated with vee-validator or not.
|
|
69
|
+
* If you use this component within form input, you need to set this props as true.
|
|
70
|
+
*/
|
|
71
|
+
useValidator?: boolean;
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Set custom validator message.
|
|
75
|
+
* Will be show if invalid="true" or in some conditions. {@link Condition}
|
|
76
|
+
*
|
|
77
|
+
* @example: 'This field is required'
|
|
78
|
+
* @example: { empty: 'This field is required' }
|
|
79
|
+
*/
|
|
80
|
+
validatorMessage?: string | CustomValidation<'empty' | 'exceed'>;
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* This prop is required if you use this component in a form input.
|
|
84
|
+
* Specify the unique field name, match with your needs for API request.
|
|
85
|
+
*
|
|
86
|
+
* @default 'textareaInput'
|
|
87
|
+
*/
|
|
88
|
+
fieldName?: string;
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* Show information to user about the field with a tooltip.
|
|
92
|
+
*/
|
|
93
|
+
fieldInfo?: string;
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* Make the field mandatory.
|
|
97
|
+
*/
|
|
98
|
+
mandatory?: boolean;
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* The maximum character length allowed by validator.
|
|
102
|
+
*
|
|
103
|
+
* @default unlimited
|
|
104
|
+
*/
|
|
105
|
+
maxInput?: number;
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* The maximum character length allowed on input.
|
|
109
|
+
*
|
|
110
|
+
* @default unlimited
|
|
111
|
+
*/
|
|
112
|
+
maxlength?: number;
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* Prevent input once the max length is reached, allowing only backspace.
|
|
116
|
+
*
|
|
117
|
+
* @default true
|
|
118
|
+
*/
|
|
119
|
+
preventInputOnMaxLength?: boolean;
|
|
120
|
+
|
|
121
|
+
inputClass?: string;
|
|
122
|
+
rows?: Numberish;
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* Specify the input placeholder.
|
|
126
|
+
*
|
|
127
|
+
* @default 'Enter {label}' or 'Enter {type}'
|
|
128
|
+
*/
|
|
129
|
+
placeholder?: string;
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* The input label. Tell the user what input is this.
|
|
133
|
+
*/
|
|
134
|
+
label?: string;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* Defines valid emits in Textarea component.
|
|
139
|
+
*/
|
|
140
|
+
export type TextareaEmits = {
|
|
141
|
+
/**
|
|
142
|
+
* Emitted when the value changes.
|
|
143
|
+
*/
|
|
144
|
+
'update:modelValue': [value: Nullable<string>];
|
|
145
|
+
};
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* **TSVue - Textarea**
|
|
149
|
+
*
|
|
150
|
+
* _Textarea is a multi-line text input element._
|
|
151
|
+
*
|
|
152
|
+
* --- ---
|
|
153
|
+
* 
|
|
154
|
+
*
|
|
155
|
+
* @group Component
|
|
156
|
+
*
|
|
157
|
+
*/
|
|
158
|
+
declare class Textarea extends ClassComponent<
|
|
159
|
+
TextareaProps,
|
|
160
|
+
Record<string, unknown>,
|
|
161
|
+
TextareaEmits
|
|
162
|
+
> {}
|
|
163
|
+
|
|
164
|
+
declare module '@vue/runtime-core' {
|
|
165
|
+
interface GlobalComponents {
|
|
166
|
+
Textarea: GlobalComponentConstructor<Textarea>;
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
export default Textarea;
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import { JSONContent } from '../editor/Editor.vue.d';
|
|
2
|
+
import { BadgeProps } from '../badge/Badge.vue.d';
|
|
3
|
+
import { ClassComponent } from '../ts-helpers';
|
|
4
|
+
|
|
5
|
+
export interface AttachmentFile {
|
|
6
|
+
type: 'image' | 'xls' | 'doc' | 'pdf' | 'csv' | 'video' | 'data';
|
|
7
|
+
filePath?: string;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export interface AttachmentLink {
|
|
11
|
+
type: 'link';
|
|
12
|
+
url?: string;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface LinkTaskURL {
|
|
16
|
+
type: 'taskUrl';
|
|
17
|
+
url: string;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export interface LinkTaskIframeEmbed {
|
|
21
|
+
type: 'embed';
|
|
22
|
+
code: string;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export interface DetailText {
|
|
26
|
+
type: 'text';
|
|
27
|
+
value: string;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export interface DetailBadge extends BadgeProps {
|
|
31
|
+
type: 'badge';
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export interface DetailUserText {
|
|
35
|
+
type: 'userText';
|
|
36
|
+
user: {
|
|
37
|
+
_id: string;
|
|
38
|
+
nickName: string;
|
|
39
|
+
};
|
|
40
|
+
text: string;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export interface DetailBullet {
|
|
44
|
+
type: 'bullet';
|
|
45
|
+
value: (string | DetailUserText)[];
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export interface DetailJSONContent {
|
|
49
|
+
type: 'json';
|
|
50
|
+
value: JSONContent;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export type Attachment =
|
|
54
|
+
| AttachmentLink
|
|
55
|
+
| AttachmentFile
|
|
56
|
+
| LinkTaskIframeEmbed
|
|
57
|
+
| LinkTaskURL;
|
|
58
|
+
|
|
59
|
+
export type LinkTaskEditAction = Record<
|
|
60
|
+
'Sebelum' | 'Sesudah',
|
|
61
|
+
LinkTaskURL | LinkTaskIframeEmbed
|
|
62
|
+
>;
|
|
63
|
+
|
|
64
|
+
export type DetailType =
|
|
65
|
+
| Attachment
|
|
66
|
+
| LinkTaskEditAction
|
|
67
|
+
| DetailText
|
|
68
|
+
| DetailUserText
|
|
69
|
+
| DetailBullet
|
|
70
|
+
| DetailJSONContent
|
|
71
|
+
| DetailBadge;
|
|
72
|
+
|
|
73
|
+
export type KeyValue = Record<string, string | DetailType>;
|
|
74
|
+
|
|
75
|
+
export type TimelineItem = {
|
|
76
|
+
_id: string;
|
|
77
|
+
action: string;
|
|
78
|
+
createdAt: string;
|
|
79
|
+
user?: {
|
|
80
|
+
_id: string;
|
|
81
|
+
nickName: string;
|
|
82
|
+
};
|
|
83
|
+
detail?: KeyValue | DetailType;
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
export type TimelineProps = {
|
|
87
|
+
value: TimelineItem[];
|
|
88
|
+
/**
|
|
89
|
+
* Whether the detail values should be aligned with each other or not.
|
|
90
|
+
* @defaultValue false
|
|
91
|
+
*/
|
|
92
|
+
alignDetail?: boolean;
|
|
93
|
+
/**
|
|
94
|
+
* Whether the timeline should be scrollable or not.
|
|
95
|
+
* @defaultValue false
|
|
96
|
+
*/
|
|
97
|
+
noScroll?: boolean;
|
|
98
|
+
/**
|
|
99
|
+
* Whether the createdAt field should be displayed in raw format or not.
|
|
100
|
+
* @defaultValue false
|
|
101
|
+
*/
|
|
102
|
+
noFormatDate?: boolean;
|
|
103
|
+
};
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* **WangsVue - Timeline**
|
|
107
|
+
*
|
|
108
|
+
* _Timeline visualizes a series of chained events._
|
|
109
|
+
*
|
|
110
|
+
* [Live Demo](https://fewangsit.github.io/wangsvue/timeline/)
|
|
111
|
+
* --- ---
|
|
112
|
+
*
|
|
113
|
+
* @group Component
|
|
114
|
+
*/
|
|
115
|
+
declare class Timeline extends ClassComponent<
|
|
116
|
+
TimelineProps,
|
|
117
|
+
unknown,
|
|
118
|
+
unknown
|
|
119
|
+
> {}
|
|
120
|
+
|
|
121
|
+
export default Timeline;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import {
|
|
2
|
+
AttachmentFile,
|
|
3
|
+
AttachmentLink,
|
|
4
|
+
DetailBullet,
|
|
5
|
+
DetailJSONContent,
|
|
6
|
+
DetailText,
|
|
7
|
+
DetailUserText,
|
|
8
|
+
LinkTaskIframeEmbed,
|
|
9
|
+
LinkTaskURL,
|
|
10
|
+
DetailBadge,
|
|
11
|
+
} from './Timeline.vue.d';
|
|
12
|
+
declare const _default: import('vue').DefineComponent<
|
|
13
|
+
__VLS_TypePropsToOption<{
|
|
14
|
+
detail:
|
|
15
|
+
| AttachmentFile
|
|
16
|
+
| LinkTaskIframeEmbed
|
|
17
|
+
| LinkTaskURL
|
|
18
|
+
| AttachmentLink
|
|
19
|
+
| DetailText
|
|
20
|
+
| DetailUserText
|
|
21
|
+
| DetailBullet
|
|
22
|
+
| DetailJSONContent
|
|
23
|
+
| DetailBadge;
|
|
24
|
+
}>,
|
|
25
|
+
{},
|
|
26
|
+
unknown,
|
|
27
|
+
{},
|
|
28
|
+
{},
|
|
29
|
+
import('vue').ComponentOptionsMixin,
|
|
30
|
+
import('vue').ComponentOptionsMixin,
|
|
31
|
+
{},
|
|
32
|
+
string,
|
|
33
|
+
import('vue').PublicProps,
|
|
34
|
+
Readonly<
|
|
35
|
+
import('vue').ExtractPropTypes<
|
|
36
|
+
__VLS_TypePropsToOption<{
|
|
37
|
+
detail:
|
|
38
|
+
| AttachmentFile
|
|
39
|
+
| LinkTaskIframeEmbed
|
|
40
|
+
| LinkTaskURL
|
|
41
|
+
| AttachmentLink
|
|
42
|
+
| DetailText
|
|
43
|
+
| DetailUserText
|
|
44
|
+
| DetailBullet
|
|
45
|
+
| DetailJSONContent
|
|
46
|
+
| DetailBadge;
|
|
47
|
+
}>
|
|
48
|
+
>
|
|
49
|
+
>,
|
|
50
|
+
{},
|
|
51
|
+
{}
|
|
52
|
+
>;
|
|
53
|
+
export default _default;
|
|
54
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
55
|
+
type __VLS_TypePropsToOption<T> = {
|
|
56
|
+
[K in keyof T]-?: {} extends Pick<T, K>
|
|
57
|
+
? {
|
|
58
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
59
|
+
}
|
|
60
|
+
: {
|
|
61
|
+
type: import('vue').PropType<T[K]>;
|
|
62
|
+
required: true;
|
|
63
|
+
};
|
|
64
|
+
};
|