@syncfusion/ej2-ribbon 30.2.4 → 31.1.17
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/dist/ej2-ribbon.umd.min.js +1 -1
- package/dist/global/ej2-ribbon.min.js +1 -1
- package/dist/global/index.d.ts +1 -1
- package/dist/ts/index.d.ts +1 -0
- package/dist/ts/index.ts +3 -0
- package/dist/ts/ribbon/base/constant.d.ts +201 -0
- package/dist/ts/ribbon/base/constant.ts +204 -0
- package/dist/ts/ribbon/base/index.d.ts +8 -0
- package/dist/ts/ribbon/base/index.ts +8 -0
- package/dist/ts/ribbon/base/interface.d.ts +398 -0
- package/dist/ts/ribbon/base/interface.ts +424 -0
- package/dist/ts/ribbon/base/ribbon-model.d.ts +195 -0
- package/dist/ts/ribbon/base/ribbon.d.ts +608 -0
- package/dist/ts/ribbon/base/ribbon.ts +4896 -0
- package/dist/ts/ribbon/base/utils.d.ts +139 -0
- package/dist/ts/ribbon/base/utils.ts +341 -0
- package/dist/ts/ribbon/index.d.ts +7 -0
- package/dist/ts/ribbon/index.ts +7 -0
- package/dist/ts/ribbon/items/index.d.ts +8 -0
- package/dist/ts/ribbon/items/index.ts +8 -0
- package/dist/ts/ribbon/items/ribbon-button.d.ts +64 -0
- package/dist/ts/ribbon/items/ribbon-button.ts +160 -0
- package/dist/ts/ribbon/items/ribbon-checkbox.d.ts +55 -0
- package/dist/ts/ribbon/items/ribbon-checkbox.ts +130 -0
- package/dist/ts/ribbon/items/ribbon-colorpicker.d.ts +72 -0
- package/dist/ts/ribbon/items/ribbon-colorpicker.ts +228 -0
- package/dist/ts/ribbon/items/ribbon-combobox.d.ts +77 -0
- package/dist/ts/ribbon/items/ribbon-combobox.ts +201 -0
- package/dist/ts/ribbon/items/ribbon-dropdown.d.ts +128 -0
- package/dist/ts/ribbon/items/ribbon-dropdown.ts +400 -0
- package/dist/ts/ribbon/items/ribbon-gallery.d.ts +97 -0
- package/dist/ts/ribbon/items/ribbon-gallery.ts +773 -0
- package/dist/ts/ribbon/items/ribbon-groupbutton.d.ts +73 -0
- package/dist/ts/ribbon/items/ribbon-groupbutton.ts +531 -0
- package/dist/ts/ribbon/items/ribbon-splitbutton.d.ts +85 -0
- package/dist/ts/ribbon/items/ribbon-splitbutton.ts +257 -0
- package/dist/ts/ribbon/models/index.d.ts +42 -0
- package/dist/ts/ribbon/models/index.ts +44 -0
- package/dist/ts/ribbon/models/ribbon-back-button-model.d.ts +29 -0
- package/dist/ts/ribbon/models/ribbon-back-button.d.ts +24 -0
- package/dist/ts/ribbon/models/ribbon-back-button.ts +31 -0
- package/dist/ts/ribbon/models/ribbon-back-stage-settings-model.d.ts +83 -0
- package/dist/ts/ribbon/models/ribbon-back-stage-settings.d.ts +81 -0
- package/dist/ts/ribbon/models/ribbon-back-stage-settings.ts +109 -0
- package/dist/ts/ribbon/models/ribbon-backstage-item-model.d.ts +69 -0
- package/dist/ts/ribbon/models/ribbon-backstage-item.d.ts +80 -0
- package/dist/ts/ribbon/models/ribbon-backstage-item.ts +102 -0
- package/dist/ts/ribbon/models/ribbon-button-settings-model.d.ts +64 -0
- package/dist/ts/ribbon/models/ribbon-button-settings.d.ts +63 -0
- package/dist/ts/ribbon/models/ribbon-button-settings.ts +80 -0
- package/dist/ts/ribbon/models/ribbon-checkbox-settings-model.d.ts +57 -0
- package/dist/ts/ribbon/models/ribbon-checkbox-settings.d.ts +58 -0
- package/dist/ts/ribbon/models/ribbon-checkbox-settings.ts +74 -0
- package/dist/ts/ribbon/models/ribbon-collection-model.d.ts +30 -0
- package/dist/ts/ribbon/models/ribbon-collection.d.ts +33 -0
- package/dist/ts/ribbon/models/ribbon-collection.ts +45 -0
- package/dist/ts/ribbon/models/ribbon-colorpicker-settings-model.d.ts +137 -0
- package/dist/ts/ribbon/models/ribbon-colorpicker-settings.d.ts +129 -0
- package/dist/ts/ribbon/models/ribbon-colorpicker-settings.ts +165 -0
- package/dist/ts/ribbon/models/ribbon-combobox-settings-model.d.ts +275 -0
- package/dist/ts/ribbon/models/ribbon-combobox-settings.d.ts +257 -0
- package/dist/ts/ribbon/models/ribbon-combobox-settings.ts +313 -0
- package/dist/ts/ribbon/models/ribbon-contextual-tab-settings-model.d.ts +30 -0
- package/dist/ts/ribbon/models/ribbon-contextual-tab-settings.d.ts +33 -0
- package/dist/ts/ribbon/models/ribbon-contextual-tab-settings.ts +44 -0
- package/dist/ts/ribbon/models/ribbon-dropdown-settings-model.d.ts +114 -0
- package/dist/ts/ribbon/models/ribbon-dropdown-settings.d.ts +107 -0
- package/dist/ts/ribbon/models/ribbon-dropdown-settings.ts +139 -0
- package/dist/ts/ribbon/models/ribbon-file-menu-settings-model.d.ts +123 -0
- package/dist/ts/ribbon/models/ribbon-file-menu-settings.d.ts +173 -0
- package/dist/ts/ribbon/models/ribbon-file-menu-settings.ts +220 -0
- package/dist/ts/ribbon/models/ribbon-gallery-group-model.d.ts +44 -0
- package/dist/ts/ribbon/models/ribbon-gallery-group.d.ts +38 -0
- package/dist/ts/ribbon/models/ribbon-gallery-group.ts +50 -0
- package/dist/ts/ribbon/models/ribbon-gallery-item-model.d.ts +43 -0
- package/dist/ts/ribbon/models/ribbon-gallery-item.d.ts +38 -0
- package/dist/ts/ribbon/models/ribbon-gallery-item.ts +47 -0
- package/dist/ts/ribbon/models/ribbon-gallery-settings-model.d.ts +108 -0
- package/dist/ts/ribbon/models/ribbon-gallery-settings.d.ts +95 -0
- package/dist/ts/ribbon/models/ribbon-gallery-settings.ts +123 -0
- package/dist/ts/ribbon/models/ribbon-group-button-item-model.d.ts +64 -0
- package/dist/ts/ribbon/models/ribbon-group-button-item.d.ts +65 -0
- package/dist/ts/ribbon/models/ribbon-group-button-item.ts +85 -0
- package/dist/ts/ribbon/models/ribbon-group-button-settings-model.d.ts +32 -0
- package/dist/ts/ribbon/models/ribbon-group-button-settings.d.ts +29 -0
- package/dist/ts/ribbon/models/ribbon-group-button-settings.ts +38 -0
- package/dist/ts/ribbon/models/ribbon-group-model.d.ts +112 -0
- package/dist/ts/ribbon/models/ribbon-group.d.ts +105 -0
- package/dist/ts/ribbon/models/ribbon-group.ts +138 -0
- package/dist/ts/ribbon/models/ribbon-item-model.d.ts +144 -0
- package/dist/ts/ribbon/models/ribbon-item.d.ts +141 -0
- package/dist/ts/ribbon/models/ribbon-item.ts +190 -0
- package/dist/ts/ribbon/models/ribbon-splitbutton-settings-model.d.ts +114 -0
- package/dist/ts/ribbon/models/ribbon-splitbutton-settings.d.ts +107 -0
- package/dist/ts/ribbon/models/ribbon-splitbutton-settings.ts +140 -0
- package/dist/ts/ribbon/models/ribbon-tab-model.d.ts +44 -0
- package/dist/ts/ribbon/models/ribbon-tab.d.ts +45 -0
- package/dist/ts/ribbon/models/ribbon-tab.ts +61 -0
- package/dist/ts/ribbon/models/ribbon-tooltip-model.d.ts +43 -0
- package/dist/ts/ribbon/models/ribbon-tooltip.d.ts +36 -0
- package/dist/ts/ribbon/models/ribbon-tooltip.ts +47 -0
- package/dist/ts/ribbon/modules/index.d.ts +4 -0
- package/dist/ts/ribbon/modules/index.ts +5 -0
- package/dist/ts/ribbon/modules/ribbon-backstage.d.ts +117 -0
- package/dist/ts/ribbon/modules/ribbon-backstage.ts +620 -0
- package/dist/ts/ribbon/modules/ribbon-contextualtab.d.ts +27 -0
- package/dist/ts/ribbon/modules/ribbon-contextualtab.ts +93 -0
- package/dist/ts/ribbon/modules/ribbon-filemenu.d.ts +96 -0
- package/dist/ts/ribbon/modules/ribbon-filemenu.ts +353 -0
- package/dist/ts/ribbon/modules/ribbon-keytip.d.ts +56 -0
- package/dist/ts/ribbon/modules/ribbon-keytip.ts +580 -0
- package/package.json +55 -19
|
@@ -0,0 +1,424 @@
|
|
|
1
|
+
import { BaseEventArgs } from '@syncfusion/ej2-base';
|
|
2
|
+
import { RibbonCollectionModel, RibbonGalleryItemModel, RibbonGroupButtonItemModel, RibbonGroupModel, RibbonItemModel, RibbonTooltipModel } from '../models';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Defines the layout types of ribbon.
|
|
6
|
+
*/
|
|
7
|
+
export enum RibbonLayout {
|
|
8
|
+
/**
|
|
9
|
+
* Displays the ribbon tab content in classic layout.
|
|
10
|
+
*/
|
|
11
|
+
Classic = 'Classic',
|
|
12
|
+
/**
|
|
13
|
+
* Displays the ribbon tab content in simplified layout.
|
|
14
|
+
*/
|
|
15
|
+
Simplified = 'Simplified'
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Defines the alignment of the items in the ribbon group.
|
|
20
|
+
*/
|
|
21
|
+
export enum ItemOrientation {
|
|
22
|
+
/**
|
|
23
|
+
* Displays the collection of items in rows.
|
|
24
|
+
*/
|
|
25
|
+
Row = 'Row',
|
|
26
|
+
/**
|
|
27
|
+
* Displays the collection of items in column.
|
|
28
|
+
*/
|
|
29
|
+
Column = 'Column'
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Defines the current size of the ribbon item in normal mode.
|
|
34
|
+
*
|
|
35
|
+
* @aspNumberEnum
|
|
36
|
+
*/
|
|
37
|
+
export enum RibbonItemSize {
|
|
38
|
+
/**
|
|
39
|
+
* The item appears with large icon and text at the bottom.
|
|
40
|
+
*/
|
|
41
|
+
Large = 1 << 2,
|
|
42
|
+
/**
|
|
43
|
+
* The item appears with small icon and text at the right.
|
|
44
|
+
*/
|
|
45
|
+
Medium = 1 << 1,
|
|
46
|
+
/**
|
|
47
|
+
* The item appears with small icon only.
|
|
48
|
+
*/
|
|
49
|
+
Small = 1 << 0
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Defines how to show an item in ribbon simplified layout.
|
|
54
|
+
*
|
|
55
|
+
* @aspNumberEnum
|
|
56
|
+
*/
|
|
57
|
+
export enum DisplayMode {
|
|
58
|
+
/**
|
|
59
|
+
* The item appears in the classic layout group.
|
|
60
|
+
*/
|
|
61
|
+
Classic = 1 << 2,
|
|
62
|
+
/**
|
|
63
|
+
* The item appears in the simplified layout group.
|
|
64
|
+
*/
|
|
65
|
+
Simplified = 1 << 1,
|
|
66
|
+
/**
|
|
67
|
+
* The item appears in overflow popup.
|
|
68
|
+
*/
|
|
69
|
+
Overflow = 1 << 0,
|
|
70
|
+
/**
|
|
71
|
+
* The item appears in classic layout group, simplified layout group, and overflow popup based on ribbon overflow state.
|
|
72
|
+
*/
|
|
73
|
+
Auto = Classic | Simplified | Overflow,
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* Defines the type of the ribbon item.
|
|
78
|
+
*/
|
|
79
|
+
export enum RibbonItemType {
|
|
80
|
+
/**
|
|
81
|
+
* Renders button as ribbon item.
|
|
82
|
+
*/
|
|
83
|
+
Button = 'Button',
|
|
84
|
+
/**
|
|
85
|
+
* Renders checkbox as ribbon item.
|
|
86
|
+
*/
|
|
87
|
+
CheckBox = 'CheckBox',
|
|
88
|
+
/**
|
|
89
|
+
* Renders color picker as ribbon item.
|
|
90
|
+
*/
|
|
91
|
+
ColorPicker = 'ColorPicker',
|
|
92
|
+
/**
|
|
93
|
+
* Renders combobox as ribbon item.
|
|
94
|
+
*/
|
|
95
|
+
ComboBox = 'ComboBox',
|
|
96
|
+
/**
|
|
97
|
+
* Renders dropdownbutton as ribbon item.
|
|
98
|
+
*/
|
|
99
|
+
DropDown = 'DropDown',
|
|
100
|
+
/**
|
|
101
|
+
* Renders splitbutton as ribbon item.
|
|
102
|
+
*/
|
|
103
|
+
SplitButton = 'SplitButton',
|
|
104
|
+
/**
|
|
105
|
+
* Renders the group button content as ribbon item.
|
|
106
|
+
*/
|
|
107
|
+
GroupButton = 'GroupButton',
|
|
108
|
+
/**
|
|
109
|
+
* Renders the gallery as ribbon item.
|
|
110
|
+
*/
|
|
111
|
+
Gallery = 'Gallery',
|
|
112
|
+
/**
|
|
113
|
+
* Renders the template content as ribbon item.
|
|
114
|
+
*/
|
|
115
|
+
Template = 'Template'
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* Defines the alignment of the items in the ribbon group.
|
|
120
|
+
*/
|
|
121
|
+
export enum RibbonGroupButtonSelection {
|
|
122
|
+
/**
|
|
123
|
+
* Allows selecting single button from button group.
|
|
124
|
+
*/
|
|
125
|
+
Single = 'Single',
|
|
126
|
+
/**
|
|
127
|
+
* Allows selecting multiple buttons from button group.
|
|
128
|
+
*/
|
|
129
|
+
Multiple = 'Multiple'
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* Event triggers before selecting the tab item.
|
|
134
|
+
*/
|
|
135
|
+
export interface TabSelectingEventArgs extends BaseEventArgs {
|
|
136
|
+
/**
|
|
137
|
+
* Defines whether to cancel the event or not.
|
|
138
|
+
*/
|
|
139
|
+
cancel: boolean;
|
|
140
|
+
/**
|
|
141
|
+
* Specifies whether the event is triggered via user interaction or programmatic way.
|
|
142
|
+
*/
|
|
143
|
+
isInteracted: boolean;
|
|
144
|
+
/**
|
|
145
|
+
* Defines the index of the previously selected tab.
|
|
146
|
+
*/
|
|
147
|
+
previousIndex: number;
|
|
148
|
+
/**
|
|
149
|
+
* Defines the index of the selected tab.
|
|
150
|
+
*/
|
|
151
|
+
selectedIndex: number;
|
|
152
|
+
/**
|
|
153
|
+
* Defines whether the tab is a contextual tab.
|
|
154
|
+
*/
|
|
155
|
+
isContextual: boolean;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* Event triggers after selecting the tab item.
|
|
160
|
+
*/
|
|
161
|
+
export interface TabSelectedEventArgs extends BaseEventArgs {
|
|
162
|
+
/**
|
|
163
|
+
* Defines the index of the previously selected tab.
|
|
164
|
+
*/
|
|
165
|
+
previousIndex: number;
|
|
166
|
+
/**
|
|
167
|
+
* Defines the index of the selected tab.
|
|
168
|
+
*/
|
|
169
|
+
selectedIndex: number;
|
|
170
|
+
/**
|
|
171
|
+
* Defines whether the tab is a contextual tab.
|
|
172
|
+
*/
|
|
173
|
+
isContextual: boolean;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
/**
|
|
177
|
+
* Event triggers before expanding and before collapsing the ribbon.
|
|
178
|
+
*/
|
|
179
|
+
export interface ExpandCollapseEventArgs extends BaseEventArgs {
|
|
180
|
+
/**
|
|
181
|
+
* Defines whether to cancel the event or not.
|
|
182
|
+
*/
|
|
183
|
+
cancel: boolean;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
/**
|
|
187
|
+
* Event triggers when the ribbon layout is switched.
|
|
188
|
+
*/
|
|
189
|
+
export interface LayoutSwitchedEventArgs extends BaseEventArgs {
|
|
190
|
+
/**
|
|
191
|
+
* Specifies the active layout of the ribbon.
|
|
192
|
+
*/
|
|
193
|
+
activeLayout: string;
|
|
194
|
+
/**
|
|
195
|
+
* Provides the actual native event.
|
|
196
|
+
*/
|
|
197
|
+
event: Event;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
/**
|
|
201
|
+
* Event Triggers when the launcher icon is clicked.
|
|
202
|
+
*/
|
|
203
|
+
export interface LauncherClickEventArgs extends BaseEventArgs {
|
|
204
|
+
/**
|
|
205
|
+
* Provides the ID of the group in which the launcher icon is present.
|
|
206
|
+
*/
|
|
207
|
+
groupId: string;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
/**
|
|
211
|
+
* Triggers before clicking the button from group button
|
|
212
|
+
*/
|
|
213
|
+
export interface BeforeClickGroupButtonEventArgs extends BaseEventArgs {
|
|
214
|
+
/**
|
|
215
|
+
* Defines whether to cancel the event or not.
|
|
216
|
+
*/
|
|
217
|
+
cancel: boolean;
|
|
218
|
+
/**
|
|
219
|
+
* Defines the collection of previous selected group button item(s).
|
|
220
|
+
*/
|
|
221
|
+
previousItems: RibbonGroupButtonItemModel[];
|
|
222
|
+
/**
|
|
223
|
+
* Defines the collection of current selecting group button item(s).
|
|
224
|
+
*/
|
|
225
|
+
selectingItems: RibbonGroupButtonItemModel[];
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
/**
|
|
229
|
+
* Triggers after clicking the button from group button.
|
|
230
|
+
*/
|
|
231
|
+
export interface ClickGroupButtonEventArgs extends BaseEventArgs {
|
|
232
|
+
/**
|
|
233
|
+
* Defines the collection of previous selected group button item(s).
|
|
234
|
+
*/
|
|
235
|
+
previousItems: RibbonGroupButtonItemModel[];
|
|
236
|
+
/**
|
|
237
|
+
* Defines the collection of current selected group button item(s).
|
|
238
|
+
*/
|
|
239
|
+
selectedItems: RibbonGroupButtonItemModel[];
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
/**
|
|
243
|
+
* Triggers before open / close of overflow popup menu.
|
|
244
|
+
*/
|
|
245
|
+
export interface OverflowPopupEventArgs extends BaseEventArgs {
|
|
246
|
+
/**
|
|
247
|
+
* Provides the HTML element of the overflow popup.
|
|
248
|
+
*/
|
|
249
|
+
element: HTMLElement;
|
|
250
|
+
/**
|
|
251
|
+
* Defines the original event arguments.
|
|
252
|
+
*/
|
|
253
|
+
event: Event;
|
|
254
|
+
/**
|
|
255
|
+
* Defines whether to cancel the overflow popup open or close.
|
|
256
|
+
*/
|
|
257
|
+
cancel?: boolean;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
/**
|
|
261
|
+
* Event triggers when the gallery popup open / close.
|
|
262
|
+
*/
|
|
263
|
+
export interface GalleryPopupEventArgs extends BaseEventArgs {
|
|
264
|
+
/**
|
|
265
|
+
* Defines whether to cancel the gallery popup open or close.
|
|
266
|
+
*/
|
|
267
|
+
cancel: boolean;
|
|
268
|
+
/**
|
|
269
|
+
* Provides the original event.
|
|
270
|
+
*/
|
|
271
|
+
event: Event;
|
|
272
|
+
/**
|
|
273
|
+
* Specifies name of the event.
|
|
274
|
+
*/
|
|
275
|
+
name: string;
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
/**
|
|
279
|
+
* Event triggers when a user hovers over a gallery item.
|
|
280
|
+
*/
|
|
281
|
+
export interface GalleryHoverEventArgs extends BaseEventArgs {
|
|
282
|
+
/**
|
|
283
|
+
* Provides the original event.
|
|
284
|
+
*/
|
|
285
|
+
event: Event;
|
|
286
|
+
/**
|
|
287
|
+
* Specifies name of the event.
|
|
288
|
+
*/
|
|
289
|
+
name: string;
|
|
290
|
+
/**
|
|
291
|
+
* Provides gallery item.
|
|
292
|
+
*/
|
|
293
|
+
item: RibbonGalleryItemModel;
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
/**
|
|
297
|
+
* Event triggers before rendering each gallery item.
|
|
298
|
+
*/
|
|
299
|
+
export interface GalleryItemEventArgs extends BaseEventArgs {
|
|
300
|
+
/**
|
|
301
|
+
* Specifies name of the event.
|
|
302
|
+
*/
|
|
303
|
+
name: string;
|
|
304
|
+
/**
|
|
305
|
+
* Provides gallery item.
|
|
306
|
+
*/
|
|
307
|
+
item: RibbonGalleryItemModel;
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
/**
|
|
311
|
+
* Event triggers before selecting gallery item.
|
|
312
|
+
*/
|
|
313
|
+
export interface GalleryBeforeSelectEventArgs extends BaseEventArgs {
|
|
314
|
+
/**
|
|
315
|
+
* Provides the previous selected gallery item.
|
|
316
|
+
*/
|
|
317
|
+
previousItem: RibbonGalleryItemModel;
|
|
318
|
+
/**
|
|
319
|
+
* Provides the current selecting gallery item.
|
|
320
|
+
*/
|
|
321
|
+
currentItem: RibbonGalleryItemModel;
|
|
322
|
+
/**
|
|
323
|
+
* Defines whether to cancel the selecting event or not.
|
|
324
|
+
*/
|
|
325
|
+
cancel: boolean;
|
|
326
|
+
/**
|
|
327
|
+
* Specifies name of the event.
|
|
328
|
+
*/
|
|
329
|
+
name: string;
|
|
330
|
+
/**
|
|
331
|
+
* Provides whether the change is triggered by user interaction.
|
|
332
|
+
*/
|
|
333
|
+
isInteracted: boolean;
|
|
334
|
+
/**
|
|
335
|
+
* Provides the original event.
|
|
336
|
+
*/
|
|
337
|
+
event: Event;
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
/**
|
|
341
|
+
* Event triggers after selected gallery item.
|
|
342
|
+
*/
|
|
343
|
+
export interface GallerySelectEventArgs extends BaseEventArgs {
|
|
344
|
+
/**
|
|
345
|
+
* Provides the previous selected gallery item.
|
|
346
|
+
*/
|
|
347
|
+
previousItem: RibbonGalleryItemModel;
|
|
348
|
+
/**
|
|
349
|
+
* Provides the current selected gallery item.
|
|
350
|
+
*/
|
|
351
|
+
currentItem: RibbonGalleryItemModel;
|
|
352
|
+
/**
|
|
353
|
+
* Specifies name of the event.
|
|
354
|
+
*/
|
|
355
|
+
name: string;
|
|
356
|
+
/**
|
|
357
|
+
* Provides whether the change is triggered by user interaction.
|
|
358
|
+
*/
|
|
359
|
+
isInteracted: boolean;
|
|
360
|
+
/**
|
|
361
|
+
* Provides the original event.
|
|
362
|
+
*/
|
|
363
|
+
event: Event;
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
/** @hidden */
|
|
367
|
+
export interface itemProps {
|
|
368
|
+
item?: RibbonItemModel;
|
|
369
|
+
collection?: RibbonCollectionModel;
|
|
370
|
+
group?: RibbonGroupModel;
|
|
371
|
+
element?: HTMLElement;
|
|
372
|
+
tabIndex?: number;
|
|
373
|
+
groupIndex?: number;
|
|
374
|
+
collectionIndex?: number;
|
|
375
|
+
itemIndex?: number;
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
/** @hidden */
|
|
379
|
+
export interface commonProperties {
|
|
380
|
+
enableRtl?: boolean;
|
|
381
|
+
enablePersistence?: boolean;
|
|
382
|
+
locale?: string;
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
/** @hidden */
|
|
386
|
+
export interface EJ2Control {
|
|
387
|
+
destroy(): void;
|
|
388
|
+
setProperties(prop: Object, muteOnChange?: boolean): void;
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
/**
|
|
392
|
+
* @hidden
|
|
393
|
+
*/
|
|
394
|
+
export interface ribbonItemPropsList {
|
|
395
|
+
items?: RibbonItemModel[];
|
|
396
|
+
collections?: RibbonCollectionModel[];
|
|
397
|
+
groups?: RibbonGroupModel[];
|
|
398
|
+
id?: string;
|
|
399
|
+
setProperties?: Function;
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
/**
|
|
403
|
+
* @hidden
|
|
404
|
+
*/
|
|
405
|
+
export interface ribbonTooltipData {
|
|
406
|
+
id: string,
|
|
407
|
+
data: RibbonTooltipModel
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
/**
|
|
411
|
+
* @hidden
|
|
412
|
+
*/
|
|
413
|
+
export interface KeyTipDataType {
|
|
414
|
+
id: string,
|
|
415
|
+
keyTip: string,
|
|
416
|
+
type: string
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
/**
|
|
420
|
+
* @hidden
|
|
421
|
+
*/
|
|
422
|
+
export interface KeyTipElements {
|
|
423
|
+
[key: string]: object
|
|
424
|
+
}
|
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
import { addClass, append, Event, Collection, Complex, Component, EmitType, EventHandler, formatUnit, getInstance, getComponent, getUniqueID, closest, KeyboardEventArgs, KeyboardEvents } from '@syncfusion/ej2-base';import { INotifyPropertyChanged, isNullOrUndefined, isUndefined, ModuleDeclaration, NotifyPropertyChanges, Property, remove, removeClass } from '@syncfusion/ej2-base';import { Tab, TabAnimationSettings, TabAnimationSettingsModel, TabItemModel, SelectEventArgs, SelectingEventArgs, HScroll, Toolbar } from '@syncfusion/ej2-navigations';import { RibbonTab, RibbonTabModel, RibbonGroupModel, RibbonCollectionModel, RibbonItemModel, FileMenuSettings, FileMenuSettingsModel, BackStageMenu, BackStageMenuModel, RibbonItem, RibbonCollection, RibbonGroup, RibbonContextualTabSettingsModel, RibbonContextualTabSettings } from '../models/index';import { commonProperties, DisplayMode, ExpandCollapseEventArgs, itemProps, LauncherClickEventArgs, LayoutSwitchedEventArgs, OverflowPopupEventArgs, ribbonItemPropsList, RibbonLayout, ribbonTooltipData, TabSelectedEventArgs, TabSelectingEventArgs } from './interface';import { ItemOrientation, RibbonItemSize, RibbonItemType, KeyTipDataType } from './interface';import { RibbonButton, RibbonComboBox, RibbonCheckBox, RibbonDropDown, RibbonColorPicker, RibbonSplitButton, RibbonGroupButton } from '../items/index';import { destroyControl, getCollection, getGroup, getIndex, getItem, getItemElement, updateCommonProperty, updateControlDisabled, isTooltipPresent, getTemplateFunction, createTooltip, destroyTooltip, updateTooltipProp } from './utils';import * as constants from './constant';import { RibbonFileMenu, RibbonBackstage, RibbonKeyTip } from '../modules/index';import { RibbonTooltipModel } from '../models/ribbon-tooltip-model';import { Popup } from '@syncfusion/ej2-popups';import { BeforeOpenCloseMenuEventArgs, DropDownButton, SplitButton } from '@syncfusion/ej2-splitbuttons';import { CheckBox } from '@syncfusion/ej2-buttons';import { RibbonContextualTab } from '../modules/ribbon-contextualtab';import { RibbonGallery } from '../items/ribbon-gallery';
|
|
2
|
+
import {ComponentModel} from '@syncfusion/ej2-base';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Interface for a class Ribbon
|
|
6
|
+
*/
|
|
7
|
+
export interface RibbonModel extends ComponentModel{
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Specifies the active layout of the ribbon.
|
|
11
|
+
* Accepts one of the below values.
|
|
12
|
+
* * Classic – Renders the ribbon tab contents in classic layout.
|
|
13
|
+
* * Simplified – Renders the ribbon tab contents in single row.
|
|
14
|
+
*
|
|
15
|
+
* @isenumeration true
|
|
16
|
+
* @default RibbonLayout.Classic
|
|
17
|
+
* @asptype RibbonLayout
|
|
18
|
+
*/
|
|
19
|
+
activeLayout?: RibbonLayout | string;
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Defines one or more CSS classes to customize the appearance of ribbon.
|
|
23
|
+
*
|
|
24
|
+
* @default ''
|
|
25
|
+
*/
|
|
26
|
+
cssClass?: string;
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Defines whether to enable the key tip or not.
|
|
30
|
+
*
|
|
31
|
+
* @default false
|
|
32
|
+
*/
|
|
33
|
+
enableKeyTips?: boolean;
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Defines the key tip text for the layoutSwitcher icon.
|
|
37
|
+
*
|
|
38
|
+
* @default ''
|
|
39
|
+
*/
|
|
40
|
+
layoutSwitcherKeyTip?: string;
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Defines the properties of ribbon file menu.
|
|
44
|
+
*
|
|
45
|
+
* @default {}
|
|
46
|
+
*/
|
|
47
|
+
fileMenu?: FileMenuSettingsModel;
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Defines the properties of ribbon backstage.
|
|
51
|
+
*
|
|
52
|
+
* @default {}
|
|
53
|
+
*/
|
|
54
|
+
backStageMenu?: BackStageMenuModel;
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Defines the icon CSS for the launcher icon button in group header.
|
|
58
|
+
*
|
|
59
|
+
* @default ''
|
|
60
|
+
*/
|
|
61
|
+
launcherIconCss?: string;
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Specifies whether the ribbon is minimized or not.
|
|
65
|
+
* When minimized, only the tab header is shown.
|
|
66
|
+
*
|
|
67
|
+
* @default false
|
|
68
|
+
*/
|
|
69
|
+
isMinimized?: boolean;
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Provides the localization value for the controls present in ribbon items.
|
|
73
|
+
*
|
|
74
|
+
* @default 'en-us'
|
|
75
|
+
*/
|
|
76
|
+
locale?: string;
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* Specifies the index of the current active tab.
|
|
80
|
+
*
|
|
81
|
+
* @default 0
|
|
82
|
+
*/
|
|
83
|
+
selectedTab?: number;
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Specifies the animation configuration settings for showing the content of the Ribbon Tab.
|
|
87
|
+
*
|
|
88
|
+
* @default { previous: { effect: 'SlideLeftIn', duration: 600, easing: 'ease' },next: { effect: 'SlideRightIn', duration: 600, easing: 'ease' } }
|
|
89
|
+
*/
|
|
90
|
+
tabAnimation?: TabAnimationSettingsModel;
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* Defines the list of ribbon tabs.
|
|
94
|
+
*
|
|
95
|
+
* @default []
|
|
96
|
+
*/
|
|
97
|
+
tabs?: RibbonTabModel[];
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* Defines the properties of ribbon contextual tab.
|
|
101
|
+
*
|
|
102
|
+
* @default []
|
|
103
|
+
*/
|
|
104
|
+
contextualTabs?: RibbonContextualTabSettingsModel[];
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* Specifies the width of the ribbon.
|
|
108
|
+
*
|
|
109
|
+
* @default '100%'
|
|
110
|
+
*/
|
|
111
|
+
width?: string | number;
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* Specifies the template content for the help pane of ribbon.
|
|
115
|
+
* The help pane appears on the right side of the ribbon header row.
|
|
116
|
+
*
|
|
117
|
+
* @default ''
|
|
118
|
+
* @angularType string | object | HTMLElement
|
|
119
|
+
* @reactType string | function | JSX.Element | HTMLElement
|
|
120
|
+
* @vueType string | function | HTMLElement
|
|
121
|
+
* @aspType string
|
|
122
|
+
*/
|
|
123
|
+
helpPaneTemplate?: string | HTMLElement | Function;
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* Defines whether to show the layout switcher button or not.
|
|
127
|
+
*
|
|
128
|
+
* @default false
|
|
129
|
+
*/
|
|
130
|
+
hideLayoutSwitcher?: boolean;
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* Event triggers before selecting the tab item.
|
|
134
|
+
*
|
|
135
|
+
* @event tabSelecting
|
|
136
|
+
*/
|
|
137
|
+
tabSelecting?: EmitType<TabSelectingEventArgs>;
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* Event triggers after selecting the tab item.
|
|
141
|
+
*
|
|
142
|
+
* @event tabSelected
|
|
143
|
+
*/
|
|
144
|
+
tabSelected?: EmitType<TabSelectedEventArgs>;
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* Event triggers before expanding the ribbon.
|
|
148
|
+
*
|
|
149
|
+
* @event ribbonExpanding
|
|
150
|
+
*/
|
|
151
|
+
ribbonExpanding?: EmitType<ExpandCollapseEventArgs>;
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* Event triggers before collapsing the ribbon.
|
|
155
|
+
*
|
|
156
|
+
* @event ribbonCollapsing
|
|
157
|
+
*/
|
|
158
|
+
ribbonCollapsing?: EmitType<ExpandCollapseEventArgs>;
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* Event triggers when the ribbon layout is switched.
|
|
162
|
+
*
|
|
163
|
+
* @event ribbonLayoutSwitched
|
|
164
|
+
*/
|
|
165
|
+
ribbonLayoutSwitched?: EmitType<LayoutSwitchedEventArgs>;
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
* Event triggers when the launcher icon of the group is clicked.
|
|
169
|
+
*
|
|
170
|
+
* @event launcherIconClick
|
|
171
|
+
*/
|
|
172
|
+
launcherIconClick?: EmitType<LauncherClickEventArgs>;
|
|
173
|
+
|
|
174
|
+
/**
|
|
175
|
+
* Event triggers once the Ribbon Component rendering is completed.
|
|
176
|
+
*
|
|
177
|
+
* @event created
|
|
178
|
+
*/
|
|
179
|
+
created?: EmitType<Event>;
|
|
180
|
+
|
|
181
|
+
/**
|
|
182
|
+
* Event triggers when the overflow popup opens.
|
|
183
|
+
*
|
|
184
|
+
* @event overflowPopupOpen
|
|
185
|
+
*/
|
|
186
|
+
overflowPopupOpen?: EmitType<OverflowPopupEventArgs>;
|
|
187
|
+
|
|
188
|
+
/**
|
|
189
|
+
* Event triggers when the overflow popup closes.
|
|
190
|
+
*
|
|
191
|
+
* @event overflowPopupClose
|
|
192
|
+
*/
|
|
193
|
+
overflowPopupClose?: EmitType<OverflowPopupEventArgs>;
|
|
194
|
+
|
|
195
|
+
}
|