@fewangsit/wangsvue-fats 1.0.0-alpha.31 → 1.0.0-alpha.32
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 +34 -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 +188 -0
- package/components/buttonImportExcel/ButtonImportExcel.vue.d.ts +35 -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/buttonsearch/ButtonSearch.vue.d.ts +38 -0
- package/components/buttonselecttree/ButtonSelectTree.vue.d.ts +200 -0
- package/components/buttonsplit/ButtonSplit.vue.d.ts +350 -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 +17 -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/CustomColumn.vue.d.ts +37 -0
- package/components/datatable/DataTable.vue.d.ts +735 -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/Editor.vue.d.ts +191 -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 +184 -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/ImageCompressor.vue.d.ts +229 -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/inputrangenumber/InputRangeNumber.vue.d.ts +120 -0
- package/components/inputsearch/InputSearch.vue.d.ts +36 -0
- package/components/inputtext/InputText.vue.d.ts +352 -0
- package/components/inputurl/InputURL.vue.d.ts +39 -0
- package/components/invisiblefield/InvisibleField.vue.d.ts +32 -0
- package/components/languagedropdown/LanguageDropdown.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/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/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/treesearchinput/TreeSearchInput.vue.d.ts +16 -0
- package/components/ts-helpers.d.ts +83 -0
- package/components/username/UserName.vue.d.ts +113 -0
- package/components/userwithicon/UserWithIcon.vue.d.ts +20 -0
- package/config/defaultProps.d.ts +3 -0
- package/config/index.d.ts +3 -0
- package/config/locale.d.ts +3 -0
- package/directives/focus.d.ts +1 -1
- package/event-bus/index.d.ts +51 -51
- package/event-bus/mitt.d.ts +29 -14
- package/main.d.ts +31 -0
- package/package.json +8 -4
- package/plugins/WangsVue.d.ts +249 -199
- package/plugins/formValidation.d.ts +15 -6
- package/plugins/i18n-extension.d.ts +4 -0
- package/plugins/i18n.d.ts +82 -78
- package/utils/date.util.d.ts +59 -30
- package/utils/getSeverityByAssetStatus.util.d.ts +3 -0
- package/utils/index.d.ts +8 -0
- package/utils/listenSidebarChanges.util.d.ts +16 -0
- package/utils/object.util.d.ts +14 -3
- package/utils/role.util.d.ts +68 -0
- package/utils/toast.util.d.ts +78 -78
- package/utils/addAttachment.util.d.ts +0 -43
- package/utils/exportToExcel.util.d.ts +0 -20
- package/utils/filterOptions.util.d.ts +0 -3
- package/utils/genPlaceholder.util.d.ts +0 -8
- package/utils/getAttachmentIcon.util.d.ts +0 -8
- package/utils/mergePropsWithDefaults.util.d.ts +0 -20
- package/utils/textFormatter.util.d.ts +0 -17
|
@@ -0,0 +1,301 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* OverlayPanel is a container component positioned as connected to its target.
|
|
4
|
+
*
|
|
5
|
+
* [Live Demo](https://primevue.org/overlaypanel)
|
|
6
|
+
*
|
|
7
|
+
* @module overlaypanel
|
|
8
|
+
*
|
|
9
|
+
*/
|
|
10
|
+
import { TransitionProps, VNode } from 'vue';
|
|
11
|
+
import { ComponentHooks } from '../basecomponent';
|
|
12
|
+
import { PassThroughOptions } from '../passthrough';
|
|
13
|
+
import {
|
|
14
|
+
ClassComponent,
|
|
15
|
+
GlobalComponentConstructor,
|
|
16
|
+
PassThrough,
|
|
17
|
+
} from '../ts-helpers';
|
|
18
|
+
|
|
19
|
+
export declare type OverlayPanelPassThrougMethodType = (
|
|
20
|
+
options: OverlayPanelPassThroughMethodOptions,
|
|
21
|
+
) => OverlayPanelPassThroughAttributes;
|
|
22
|
+
|
|
23
|
+
export declare type OverlayPanelPassThroughTransitionType =
|
|
24
|
+
| TransitionProps
|
|
25
|
+
| ((options: OverlayPanelPassThroughMethodOptions) => TransitionProps)
|
|
26
|
+
| undefined;
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Custom passthrough(pt) option method.
|
|
30
|
+
*/
|
|
31
|
+
export interface OverlayPanelPassThroughMethodOptions {
|
|
32
|
+
/**
|
|
33
|
+
* Defines instance.
|
|
34
|
+
*/
|
|
35
|
+
instance: any;
|
|
36
|
+
/**
|
|
37
|
+
* Defines valid properties.
|
|
38
|
+
*/
|
|
39
|
+
props: OverlayPanelProps;
|
|
40
|
+
/**
|
|
41
|
+
* Defines current inline state.
|
|
42
|
+
*/
|
|
43
|
+
state: OverlayPanelState;
|
|
44
|
+
/**
|
|
45
|
+
* Defines valid attributes.
|
|
46
|
+
*/
|
|
47
|
+
attrs: any;
|
|
48
|
+
/**
|
|
49
|
+
* Defines parent options.
|
|
50
|
+
*/
|
|
51
|
+
parent: any;
|
|
52
|
+
/**
|
|
53
|
+
* Defines passthrough(pt) options in global config.
|
|
54
|
+
*/
|
|
55
|
+
global: object | undefined;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Custom passthrough(pt) options.
|
|
60
|
+
* @see {@link OverlayPanelProps.pt}
|
|
61
|
+
*/
|
|
62
|
+
export interface OverlayPanelPassThroughOptions {
|
|
63
|
+
/**
|
|
64
|
+
* Used to pass attributes to the root's DOM element.
|
|
65
|
+
*/
|
|
66
|
+
root?: OverlayPanelPassThroughAttributes;
|
|
67
|
+
/**
|
|
68
|
+
* Used to pass attributes to the content's DOM element.
|
|
69
|
+
*/
|
|
70
|
+
content?: OverlayPanelPassThroughAttributes;
|
|
71
|
+
/**
|
|
72
|
+
* Used to pass attributes to the close button's DOM element.
|
|
73
|
+
*/
|
|
74
|
+
closeButton?: OverlayPanelPassThroughAttributes;
|
|
75
|
+
/**
|
|
76
|
+
* Used to pass attributes to the close icon's DOM element.
|
|
77
|
+
*/
|
|
78
|
+
closeIcon?: OverlayPanelPassThroughAttributes;
|
|
79
|
+
/**
|
|
80
|
+
* Used to manage all lifecycle hooks.
|
|
81
|
+
* @see {@link BaseComponent.ComponentHooks}
|
|
82
|
+
*/
|
|
83
|
+
hooks?: ComponentHooks;
|
|
84
|
+
/**
|
|
85
|
+
* Used to control Vue Transition API.
|
|
86
|
+
*/
|
|
87
|
+
transition?: OverlayPanelPassThroughTransitionType;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* Custom passthrough attributes for each DOM elements
|
|
92
|
+
*/
|
|
93
|
+
export interface OverlayPanelPassThroughAttributes {
|
|
94
|
+
class: any;
|
|
95
|
+
style?: any;
|
|
96
|
+
[key: string]: any;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* Defines current inline state in OverlayPanel component.
|
|
101
|
+
*/
|
|
102
|
+
export interface OverlayPanelState {
|
|
103
|
+
/**
|
|
104
|
+
* Current visible state as a boolean.
|
|
105
|
+
* @defaultValue false
|
|
106
|
+
*/
|
|
107
|
+
visible: boolean;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* OverlayPanel breakpoint metadata.
|
|
112
|
+
*/
|
|
113
|
+
export interface OverlayPanelBreakpoints {
|
|
114
|
+
/**
|
|
115
|
+
* Breakpoint for responsive mode.
|
|
116
|
+
*
|
|
117
|
+
* Example:
|
|
118
|
+
*
|
|
119
|
+
* <OverlayPanel :breakpoints="{'960px': '75vw', '640px': '100vw'}" ... />
|
|
120
|
+
*
|
|
121
|
+
* Result:
|
|
122
|
+
*
|
|
123
|
+
* @media screen and (max-width: ${breakpoint[key]}) {
|
|
124
|
+
* .p-overlaypanel[attributeSelector] {
|
|
125
|
+
* width: ${breakpoint[value]} !important;
|
|
126
|
+
* }
|
|
127
|
+
* }
|
|
128
|
+
*/
|
|
129
|
+
[key: string]: string;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* Defines valid properties in OverlayPanel component.
|
|
134
|
+
*/
|
|
135
|
+
export interface OverlayPanelProps {
|
|
136
|
+
/**
|
|
137
|
+
* Enables to hide the overlay when outside is clicked.
|
|
138
|
+
* @defaultValue true
|
|
139
|
+
*/
|
|
140
|
+
dismissable?: boolean;
|
|
141
|
+
/**
|
|
142
|
+
* Enables to hide the overlay when another overlay is clicked.
|
|
143
|
+
* @defaultValue true
|
|
144
|
+
*/
|
|
145
|
+
dismissableOverlay?: boolean;
|
|
146
|
+
/**
|
|
147
|
+
* When enabled, displays a close icon at top right corner.
|
|
148
|
+
* @defaultValue false
|
|
149
|
+
*/
|
|
150
|
+
showCloseIcon?: boolean;
|
|
151
|
+
/**
|
|
152
|
+
* A valid query selector or an HTMLElement to specify where the overlay gets attached.
|
|
153
|
+
* @defaultValue body
|
|
154
|
+
*/
|
|
155
|
+
// AppendTo?: HintedString<'body' | 'self'> | undefined | HTMLElement;
|
|
156
|
+
/**
|
|
157
|
+
* Base zIndex value to use in layering.
|
|
158
|
+
* @defaultValue 0
|
|
159
|
+
*/
|
|
160
|
+
baseZIndex?: number;
|
|
161
|
+
/**
|
|
162
|
+
* Whether to automatically manage layering.
|
|
163
|
+
* @defaultValue true
|
|
164
|
+
*/
|
|
165
|
+
autoZIndex?: boolean;
|
|
166
|
+
/**
|
|
167
|
+
* Object literal to define widths per screen size.
|
|
168
|
+
*/
|
|
169
|
+
breakpoints?: OverlayPanelBreakpoints;
|
|
170
|
+
/**
|
|
171
|
+
* Icon to display in the overlaypanel close button.
|
|
172
|
+
* @deprecated since v3.27.0. Use 'closeicon' slot.
|
|
173
|
+
*/
|
|
174
|
+
closeIcon?: string | undefined;
|
|
175
|
+
/**
|
|
176
|
+
* Used to pass attributes to DOM elements inside the component.
|
|
177
|
+
* @type {OverlayPanelPassThroughOptions}
|
|
178
|
+
*/
|
|
179
|
+
pt?: PassThrough<OverlayPanelPassThroughOptions>;
|
|
180
|
+
/**
|
|
181
|
+
* Used to configure passthrough(pt) options of the component.
|
|
182
|
+
* @type {PassThroughOptions}
|
|
183
|
+
*/
|
|
184
|
+
ptOptions?: PassThroughOptions;
|
|
185
|
+
/**
|
|
186
|
+
* When enabled, it removes component related styles in the core.
|
|
187
|
+
* @defaultValue false
|
|
188
|
+
*/
|
|
189
|
+
unstyled?: boolean;
|
|
190
|
+
/**
|
|
191
|
+
* Specifies if pressing escape key should hide the dialog.
|
|
192
|
+
* @defaultValue true
|
|
193
|
+
*/
|
|
194
|
+
closeOnEscape?: boolean | undefined;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
/**
|
|
198
|
+
* Defines valid slots in OverlayPanel component.
|
|
199
|
+
*/
|
|
200
|
+
export interface OverlayPanelSlots {
|
|
201
|
+
/**
|
|
202
|
+
* Custom content template.
|
|
203
|
+
*/
|
|
204
|
+
default(): VNode[];
|
|
205
|
+
/**
|
|
206
|
+
* Custom close icon template.
|
|
207
|
+
*/
|
|
208
|
+
closeicon(): VNode[];
|
|
209
|
+
/**
|
|
210
|
+
* Custom container slot.
|
|
211
|
+
* @param {Object} scope - container slot's params.
|
|
212
|
+
*/
|
|
213
|
+
container(scope: {
|
|
214
|
+
/**
|
|
215
|
+
* Close overlay panel function.
|
|
216
|
+
* @deprecated since v3.39.0. Use 'closeCallback' property instead.
|
|
217
|
+
*/
|
|
218
|
+
onClose: () => void;
|
|
219
|
+
/**
|
|
220
|
+
* Close button keydown function.
|
|
221
|
+
* @param {Event} event - Browser event
|
|
222
|
+
* @deprecated since v3.39.0. Use 'keydownCallback' property instead.
|
|
223
|
+
*/
|
|
224
|
+
onKeydown: (event: Event) => void;
|
|
225
|
+
/**
|
|
226
|
+
* Close overlay panel function.
|
|
227
|
+
*/
|
|
228
|
+
closeCallback: () => void;
|
|
229
|
+
/**
|
|
230
|
+
* Close button keydown function.
|
|
231
|
+
* @param {Event} event - Browser event
|
|
232
|
+
*/
|
|
233
|
+
keydownCallback: (event: Event) => void;
|
|
234
|
+
}): VNode[];
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
/**
|
|
238
|
+
* Defines valid emits in OverlayPanel component.
|
|
239
|
+
*/
|
|
240
|
+
export interface OverlayPanelEmits {
|
|
241
|
+
/**
|
|
242
|
+
* Callback to invoke when the overlay is shown.
|
|
243
|
+
*/
|
|
244
|
+
show(): void;
|
|
245
|
+
/**
|
|
246
|
+
* Callback to invoke when the overlay is hidden.
|
|
247
|
+
*/
|
|
248
|
+
hide(): void;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
/**
|
|
252
|
+
* **PrimeVue - OverlayPanel**
|
|
253
|
+
*
|
|
254
|
+
* _OverlayPanel, also known as Popover, is a container component that can overlay other components on page._
|
|
255
|
+
*
|
|
256
|
+
* [Live Demo](https://www.primevue.org/overlaypanel/)
|
|
257
|
+
* --- ---
|
|
258
|
+
* 
|
|
259
|
+
*
|
|
260
|
+
* @group Component
|
|
261
|
+
*/
|
|
262
|
+
declare class OverlayPanel extends ClassComponent<
|
|
263
|
+
OverlayPanelProps,
|
|
264
|
+
OverlayPanelSlots,
|
|
265
|
+
OverlayPanelEmits
|
|
266
|
+
> {
|
|
267
|
+
/**
|
|
268
|
+
* Aligns overlay panel based on the current position of the container.
|
|
269
|
+
*/
|
|
270
|
+
alignOverlay(): void;
|
|
271
|
+
/**
|
|
272
|
+
* Toggles the visibility of the overlay.
|
|
273
|
+
* @param {Event} event - Browser event.
|
|
274
|
+
* @param {*} [target] - Optional target if event.currentTarget should not be used.
|
|
275
|
+
*
|
|
276
|
+
* @memberof OverlayPanel
|
|
277
|
+
*/
|
|
278
|
+
toggle(event: Event, target?: unknown): void;
|
|
279
|
+
/**
|
|
280
|
+
* Shows the overlay.
|
|
281
|
+
* @param {Event} event - Browser event.
|
|
282
|
+
* @param {*} [target] - Optional target if event.currentTarget should not be used.
|
|
283
|
+
*
|
|
284
|
+
* @memberof OverlayPanel
|
|
285
|
+
*/
|
|
286
|
+
show(event: Event, target?: unknown): void;
|
|
287
|
+
/**
|
|
288
|
+
* Hides the overlay.
|
|
289
|
+
*
|
|
290
|
+
* @memberof OverlayPanel
|
|
291
|
+
*/
|
|
292
|
+
hide(): void;
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
declare module '@vue/runtime-core' {
|
|
296
|
+
interface GlobalComponents {
|
|
297
|
+
OverlayPanel: GlobalComponentConstructor<OverlayPanel>;
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
export default OverlayPanel;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2
|
+
export declare type PassThroughMergePropsType =
|
|
3
|
+
| ((...args: any) => object | undefined)
|
|
4
|
+
| boolean
|
|
5
|
+
| undefined;
|
|
6
|
+
|
|
7
|
+
export interface PassThroughOptions {
|
|
8
|
+
mergeSections?: boolean | undefined;
|
|
9
|
+
mergeProps?: PassThroughMergePropsType;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export declare function usePassThrough(
|
|
13
|
+
pt1: object,
|
|
14
|
+
pt2: object,
|
|
15
|
+
options?: PassThroughOptions,
|
|
16
|
+
): object;
|
|
@@ -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;
|