-
Notifications
You must be signed in to change notification settings - Fork 155
/
Copy pathmenu-base-model.d.ts
299 lines (257 loc) · 7.68 KB
/
menu-base-model.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
import { Component, Property, ChildProperty, NotifyPropertyChanges, INotifyPropertyChanged, AnimationModel, isBlazor } from '@syncfusion/ej2-base';import { Event, EventHandler, EmitType, BaseEventArgs, KeyboardEvents, KeyboardEventArgs, Touch, TapEventArgs } from '@syncfusion/ej2-base';import { Animation, AnimationOptions, TouchEventArgs, MouseEventArgs } from '@syncfusion/ej2-base';import { Browser, Collection, setValue, getValue, getUniqueID, getInstance, isNullOrUndefined } from '@syncfusion/ej2-base';import { select, selectAll, closest, detach, append, rippleEffect, isVisible, Complex, addClass, removeClass } from '@syncfusion/ej2-base';import { ListBase, ListBaseOptions } from '@syncfusion/ej2-lists';import { getZindexPartial, calculatePosition, OffsetPosition, isCollide, fit, Popup } from '@syncfusion/ej2-popups';import { extend, SanitizeHtmlHelper } from '@syncfusion/ej2-base';import { getScrollableParent } from '@syncfusion/ej2-popups';import { HScroll } from '../common/h-scroll';import { VScroll } from '../common/v-scroll';import { addScrolling, destroyScroll } from '../common/menu-scroll';
import {MenuEffect,MenuEventArgs,BeforeOpenCloseMenuEventArgs,OpenCloseMenuEventArgs} from "./menu-base";
import {ComponentModel} from '@syncfusion/ej2-base';
/**
* Interface for a class FieldSettings
*/
export interface FieldSettingsModel {
/**
* Specifies the itemId field for Menu item.
*
* @default 'id'
*/
itemId?: string | string[];
/**
* Specifies the parentId field for Menu item.
*
* @default 'parentId'
*/
parentId?: string | string[];
/**
* Specifies the text field for Menu item.
*
* @default 'text'
*/
text?: string | string[];
/**
* Specifies the css icon field for Menu item.
*
* @default 'iconCss'
*/
iconCss?: string | string[];
/**
* Specifies the Url field for Menu item.
*
* @default 'url'
*/
url?: string | string[];
/**
* Specifies the separator field for Menu item.
*
* @default 'separator'
*/
separator?: string | string[];
/**
* Specifies the children field for Menu item.
*
* @default 'items'
*/
children?: string | string[];
}
/**
* Interface for a class MenuItem
*/
export interface MenuItemModel {
/**
* Defines class/multiple classes separated by a space for the menu Item that is used to include an icon.
* Menu Item can include font icon and sprite image.
*
* @default null
*/
iconCss?: string;
/**
* Specifies the id for menu item.
*
* @default ''
*/
id?: string;
/**
* Specifies separator between the menu items. Separator are either horizontal or vertical lines used to group menu items.
*
* @default false
*/
separator?: boolean;
/**
* Specifies the sub menu items that is the array of MenuItem model.
*
* @default []
*/
items?: MenuItemModel[];
/**
* Specifies text for menu item.
*
* @default ''
*/
text?: string;
/**
* Specifies url for menu item that creates the anchor link to navigate to the url provided.
*
* @default ''
*/
url?: string;
}
/**
* Interface for a class MenuAnimationSettings
*/
export interface MenuAnimationSettingsModel {
/**
* Specifies the effect that shown in the sub menu transform.
* The possible effects are:
* * None: Specifies the sub menu transform with no animation effect.
* * SlideDown: Specifies the sub menu transform with slide down effect.
* * ZoomIn: Specifies the sub menu transform with zoom in effect.
* * FadeIn: Specifies the sub menu transform with fade in effect.
*
* @default 'SlideDown'
* @aspType Syncfusion.EJ2.Navigations.MenuEffect
* @blazorType Syncfusion.EJ2.Navigations.MenuEffect
* @isEnumeration true
*/
effect?: MenuEffect;
/**
* Specifies the time duration to transform object.
*
* @default 400
*/
duration?: number;
/**
* Specifies the easing effect applied while transform.
*
* @default 'ease'
*/
easing?: string;
}
/**
* Interface for a class MenuBase
* @private
*/
export interface MenuBaseModel extends ComponentModel{
/**
* Triggers while rendering each menu item.
*
* @event beforeItemRender
* @blazorProperty 'OnItemRender'
*/
beforeItemRender?: EmitType<MenuEventArgs>;
/**
* Triggers before opening the menu item.
*
* @event beforeOpen
* @blazorProperty 'OnOpen'
*/
beforeOpen?: EmitType<BeforeOpenCloseMenuEventArgs>;
/**
* Triggers while opening the menu item.
*
* @event onOpen
* @blazorProperty 'Opened'
*/
onOpen?: EmitType<OpenCloseMenuEventArgs>;
/**
* Triggers before closing the menu.
*
* @event beforeClose
* @blazorProperty 'OnClose'
*/
beforeClose?: EmitType<BeforeOpenCloseMenuEventArgs>;
/**
* Triggers while closing the menu.
*
* @event onClose
* @blazorProperty 'Closed'
*/
onClose?: EmitType<OpenCloseMenuEventArgs>;
/**
* Triggers while selecting menu item.
*
* @event select
* @blazorProperty 'ItemSelected'
*/
select?: EmitType<MenuEventArgs>;
/**
* Triggers once the component rendering is completed.
*
* @event created
* @blazorProperty 'Created'
*/
created?: EmitType<Event>;
/**
* Defines class/multiple classes separated by a space in the Menu wrapper.
*
* @default ''
*/
cssClass?: string;
/**
* If hoverDelay is set by particular number, the menu will open after that period.
*
* @default 0
*/
hoverDelay?: number;
/**
* Specifies whether to show the sub menu or not on click.
* When set to true, the sub menu will open only on mouse click.
*
* @default false
*/
showItemOnClick?: boolean;
/**
* Specifies target element selector in which the ContextMenu should be opened.
* Specifies target element to open/close Menu while click in Hamburger mode.
*
* @default ''
* @private
*/
target?: string;
/**
* Specifies the filter selector for elements inside the target in that the context menu will be opened.
* Not applicable to Menu component.
*
* @default ''
* @private
*/
filter?: string;
/**
* Specifies the template for Menu item.
* Not applicable to ContextMenu component.
*
* @default null
* @private
*/
template?: string;
/**
* Specifies whether to enable / disable the scrollable option in Menu.
* Not applicable to ContextMenu component.
*
* @default false
* @private
*/
enableScrolling?: boolean;
/**
* Defines whether to allow the cross-scripting site or not.
*
* @default false
*/
enableHtmlSanitizer?: boolean;
/**
* Specifies mapping fields from the dataSource.
* Not applicable to ContextMenu component.
*
* @default { itemId: "id", text: "text", parentId: "parentId", iconCss: "iconCss", url: "url", separator: "separator",
* children: "items" }
* @private
*/
// eslint:disable-next-line
fields?: FieldSettingsModel;
/**
* Specifies menu items with its properties which will be rendered as Menu.
*
* @default []
*/
items?: MenuItemModel[] | { [key: string]: Object }[];
/**
* Specifies the animation settings for the sub menu open.
*
* @default { duration: 400, easing: 'ease', effect: 'SlideDown' }
*/
animationSettings?: MenuAnimationSettingsModel;
}