@syncfusion/ej2-ribbon 21.2.3 → 22.1.39
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/.eslintrc.json +1 -0
- package/CHANGELOG.md +8 -0
- package/dist/ej2-ribbon.umd.min.js +2 -2
- package/dist/ej2-ribbon.umd.min.js.map +1 -1
- package/dist/es6/ej2-ribbon.es2015.js +1254 -165
- package/dist/es6/ej2-ribbon.es2015.js.map +1 -1
- package/dist/es6/ej2-ribbon.es5.js +1275 -180
- package/dist/es6/ej2-ribbon.es5.js.map +1 -1
- package/dist/global/ej2-ribbon.min.js +2 -2
- package/dist/global/ej2-ribbon.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/package.json +16 -13
- package/src/ribbon/base/interface.d.ts +6 -6
- package/src/ribbon/base/interface.js +6 -6
- package/src/ribbon/base/ribbon-model.d.ts +2 -2
- package/src/ribbon/base/ribbon.d.ts +43 -1
- package/src/ribbon/base/ribbon.js +1074 -163
- package/src/ribbon/base/utils.d.ts +2 -2
- package/src/ribbon/base/utils.js +16 -10
- package/src/ribbon/items/ribbon-button.js +1 -0
- package/src/ribbon/items/ribbon-checkbox.js +1 -0
- package/src/ribbon/items/ribbon-colorpicker.js +1 -0
- package/src/ribbon/items/ribbon-combobox.js +1 -0
- package/src/ribbon/items/ribbon-dropdown.d.ts +7 -1
- package/src/ribbon/items/ribbon-dropdown.js +152 -1
- package/src/ribbon/items/ribbon-splitbutton.js +24 -0
- package/src/ribbon/models/ribbon-combobox-settings-model.d.ts +10 -5
- package/src/ribbon/models/ribbon-combobox-settings.d.ts +10 -5
- package/src/ribbon/models/ribbon-file-menu-settings-model.d.ts +3 -1
- package/src/ribbon/models/ribbon-file-menu-settings.d.ts +3 -1
- package/src/ribbon/models/ribbon-item-model.d.ts +1 -1
- package/src/ribbon/models/ribbon-item.d.ts +1 -1
- package/styles/bootstrap-dark.css +27 -0
- package/styles/bootstrap.css +27 -0
- package/styles/bootstrap4.css +27 -0
- package/styles/bootstrap5-dark.css +27 -0
- package/styles/bootstrap5.css +27 -0
- package/styles/fabric-dark.css +27 -0
- package/styles/fabric.css +27 -0
- package/styles/fluent-dark.css +27 -0
- package/styles/fluent.css +27 -0
- package/styles/highcontrast-light.css +27 -0
- package/styles/highcontrast.css +31 -4
- package/styles/material-dark.css +27 -0
- package/styles/material.css +27 -0
- package/styles/material3-dark.css +1672 -0
- package/styles/material3-dark.scss +3 -0
- package/styles/material3.css +1728 -0
- package/styles/material3.scss +3 -0
- package/styles/ribbon/_bootstrap-dark-definition.scss +4 -0
- package/styles/ribbon/_bootstrap-definition.scss +4 -0
- package/styles/ribbon/_bootstrap4-definition.scss +4 -0
- package/styles/ribbon/_bootstrap5-definition.scss +4 -0
- package/styles/ribbon/_fabric-dark-definition.scss +4 -0
- package/styles/ribbon/_fabric-definition.scss +4 -0
- package/styles/ribbon/_fluent-definition.scss +4 -0
- package/styles/ribbon/_fusionnew-definition.scss +4 -0
- package/styles/ribbon/_highcontrast-definition.scss +6 -2
- package/styles/ribbon/_highcontrast-light-definition.scss +4 -0
- package/styles/ribbon/_layout.scss +28 -0
- package/styles/ribbon/_material-dark-definition.scss +4 -0
- package/styles/ribbon/_material-definition.scss +4 -0
- package/styles/ribbon/_material3-dark-definition.scss +1 -0
- package/styles/ribbon/_material3-definition.scss +210 -0
- package/styles/ribbon/_tailwind-definition.scss +4 -0
- package/styles/ribbon/bootstrap-dark.css +27 -0
- package/styles/ribbon/bootstrap-dark.scss +1 -0
- package/styles/ribbon/bootstrap.css +27 -0
- package/styles/ribbon/bootstrap.scss +1 -0
- package/styles/ribbon/bootstrap4.css +27 -0
- package/styles/ribbon/bootstrap4.scss +1 -0
- package/styles/ribbon/bootstrap5-dark.css +27 -0
- package/styles/ribbon/bootstrap5-dark.scss +1 -0
- package/styles/ribbon/bootstrap5.css +27 -0
- package/styles/ribbon/bootstrap5.scss +1 -0
- package/styles/ribbon/fabric-dark.css +27 -0
- package/styles/ribbon/fabric-dark.scss +1 -0
- package/styles/ribbon/fabric.css +27 -0
- package/styles/ribbon/fabric.scss +1 -0
- package/styles/ribbon/fluent-dark.css +27 -0
- package/styles/ribbon/fluent-dark.scss +1 -0
- package/styles/ribbon/fluent.css +27 -0
- package/styles/ribbon/fluent.scss +1 -0
- package/styles/ribbon/highcontrast-light.css +27 -0
- package/styles/ribbon/highcontrast-light.scss +1 -0
- package/styles/ribbon/highcontrast.css +31 -4
- package/styles/ribbon/highcontrast.scss +1 -0
- package/styles/ribbon/icons/_material3-dark.scss +1 -0
- package/styles/ribbon/material-dark.css +27 -0
- package/styles/ribbon/material-dark.scss +1 -0
- package/styles/ribbon/material.css +27 -0
- package/styles/ribbon/material.scss +1 -0
- package/styles/ribbon/material3-dark.css +1672 -0
- package/styles/ribbon/material3-dark.scss +19 -0
- package/styles/ribbon/material3.css +1728 -0
- package/styles/ribbon/material3.scss +19 -0
- package/styles/ribbon/tailwind-dark.css +27 -0
- package/styles/ribbon/tailwind-dark.scss +1 -0
- package/styles/ribbon/tailwind.css +27 -0
- package/styles/ribbon/tailwind.scss +1 -0
- package/styles/tailwind-dark.css +27 -0
- package/styles/tailwind.css +27 -0
|
@@ -14,11 +14,11 @@ export declare function getIndex<T>(arr: Array<T>, condition: (value: T, index:
|
|
|
14
14
|
/**
|
|
15
15
|
* Gets template content based on the template property value.
|
|
16
16
|
*
|
|
17
|
-
* @param {string | HTMLElement} template - Template property value.
|
|
17
|
+
* @param {string | HTMLElement| Function} template - Template property value.
|
|
18
18
|
* @returns {Function} - Return template function.
|
|
19
19
|
* @hidden
|
|
20
20
|
*/
|
|
21
|
-
export declare function getTemplateFunction(template: string | HTMLElement): Function;
|
|
21
|
+
export declare function getTemplateFunction(template: string | HTMLElement | Function): Function;
|
|
22
22
|
/**
|
|
23
23
|
* Gets the ribbon item
|
|
24
24
|
*
|
package/src/ribbon/base/utils.js
CHANGED
|
@@ -22,7 +22,7 @@ export function getIndex(arr, condition) {
|
|
|
22
22
|
/**
|
|
23
23
|
* Gets template content based on the template property value.
|
|
24
24
|
*
|
|
25
|
-
* @param {string | HTMLElement} template - Template property value.
|
|
25
|
+
* @param {string | HTMLElement| Function} template - Template property value.
|
|
26
26
|
* @returns {Function} - Return template function.
|
|
27
27
|
* @hidden
|
|
28
28
|
*/
|
|
@@ -183,16 +183,21 @@ export function getItemElement(parent, id, itemProp) {
|
|
|
183
183
|
return null;
|
|
184
184
|
}
|
|
185
185
|
if (parent.activeLayout === RibbonLayout.Classic) {
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
186
|
+
if (itemProp.item.displayOptions & DisplayMode.Classic) {
|
|
187
|
+
contentEle = (itemProp.group.isCollapsed) ? parent.ribbonDropDownModule.getOverflowDropDownPopup(itemProp, contentEle)
|
|
188
|
+
: contentEle;
|
|
189
|
+
return contentEle.querySelector('#' + id);
|
|
190
|
+
}
|
|
191
|
+
else {
|
|
192
|
+
return null;
|
|
193
|
+
}
|
|
189
194
|
}
|
|
190
195
|
else {
|
|
191
|
-
//Checks for Simplified and Auto options (Auto = simplified + popup)
|
|
196
|
+
//Checks for Simplified and Auto options (Auto = classic + simplified + popup)
|
|
192
197
|
var ele = (itemProp.item.displayOptions & DisplayMode.Simplified) ?
|
|
193
198
|
contentEle.querySelector('#' + itemProp.item.id) : null;
|
|
194
199
|
// element will be null for "Popup" and if the item is moved to overflow in "Auto" mode
|
|
195
|
-
if (!ele
|
|
200
|
+
if (!ele) {
|
|
196
201
|
var dropdown = itemProp.group.enableGroupOverflow ?
|
|
197
202
|
getComponent(contentEle.querySelector('#' + itemProp.group.id + constants.GROUPOF_BUTTON_ID), DropDownButton)
|
|
198
203
|
: parent.overflowDDB;
|
|
@@ -239,7 +244,7 @@ export function setToolTipContent(args, tooltip, tooltipData) {
|
|
|
239
244
|
content.appendChild(textContainer);
|
|
240
245
|
if (data.iconCss) {
|
|
241
246
|
var customCss = tooltip.createElement('div', {
|
|
242
|
-
className: data.
|
|
247
|
+
className: data.iconCss + ' ' + constants.RIBBON_TOOLTIP_ICON
|
|
243
248
|
});
|
|
244
249
|
textContainer.appendChild(customCss);
|
|
245
250
|
}
|
|
@@ -251,7 +256,8 @@ export function setToolTipContent(args, tooltip, tooltipData) {
|
|
|
251
256
|
textContainer.appendChild(tooltipContent);
|
|
252
257
|
}
|
|
253
258
|
tooltip.setProperties({
|
|
254
|
-
content: content
|
|
259
|
+
content: content,
|
|
260
|
+
cssClass: data.cssClass ? data.cssClass + ' ' + constants.RIBBON_TOOLTIP : constants.RIBBON_TOOLTIP
|
|
255
261
|
});
|
|
256
262
|
}
|
|
257
263
|
/**
|
|
@@ -264,9 +270,9 @@ export function setToolTipContent(args, tooltip, tooltipData) {
|
|
|
264
270
|
*/
|
|
265
271
|
export function createTooltip(element, ribbon) {
|
|
266
272
|
var ribbonTooltip = new Tooltip({
|
|
267
|
-
cssClass: (constants.RIBBON_TOOLTIP + ' ' + ribbon.cssClass).trim(),
|
|
268
273
|
target: '.' + constants.RIBBON_TOOLTIP_TARGET,
|
|
269
|
-
beforeRender: beforeTooltipRender.bind(this)
|
|
274
|
+
beforeRender: beforeTooltipRender.bind(this),
|
|
275
|
+
windowCollision: true
|
|
270
276
|
});
|
|
271
277
|
ribbonTooltip.appendTo(element);
|
|
272
278
|
/**
|
|
@@ -62,6 +62,7 @@ var RibbonButton = /** @class */ (function () {
|
|
|
62
62
|
RibbonButton.prototype.addOverFlowEvents = function (item, itemEle, overflowButton) {
|
|
63
63
|
var _this = this;
|
|
64
64
|
var buttonEle = itemEle.querySelector('#' + item.id);
|
|
65
|
+
buttonEle.setAttribute('data-control', item.type.toString());
|
|
65
66
|
var buttonObj = getComponent(buttonEle, Button);
|
|
66
67
|
buttonObj.setProperties({ cssClass: buttonObj.cssClass + SPACE + RIBBON_POPUP_CONTROL });
|
|
67
68
|
buttonEle.onclick = function (e) {
|
|
@@ -58,6 +58,7 @@ var RibbonCheckBox = /** @class */ (function () {
|
|
|
58
58
|
RibbonCheckBox.prototype.addOverFlowEvents = function (item, itemEle, overflowButton) {
|
|
59
59
|
var _this = this;
|
|
60
60
|
var inputEle = itemEle.querySelector('#' + item.id);
|
|
61
|
+
inputEle.setAttribute('data-control', item.type.toString());
|
|
61
62
|
var checkBoxObj = getComponent(inputEle, CheckBox);
|
|
62
63
|
checkBoxObj.cssClass = checkBoxObj.cssClass + SPACE + RIBBON_POPUP_CONTROL;
|
|
63
64
|
checkBoxObj.dataBind();
|
|
@@ -86,6 +86,7 @@ var RibbonColorPicker = /** @class */ (function () {
|
|
|
86
86
|
RibbonColorPicker.prototype.addOverFlowEvents = function (item, itemEle, overflowButton) {
|
|
87
87
|
var _this = this;
|
|
88
88
|
var colorPickerEle = itemEle.querySelector('#' + item.id);
|
|
89
|
+
colorPickerEle.setAttribute('data-control', item.type.toString());
|
|
89
90
|
var colorPickerObj = getComponent(colorPickerEle, ColorPicker);
|
|
90
91
|
colorPickerObj.setProperties({ cssClass: colorPickerObj.cssClass + SPACE + RIBBON_POPUP_CONTROL });
|
|
91
92
|
//Accessing the private property 'splitBtn' of ColorPicker component to get the colorpicker instance as there is no close event in colorpicker.
|
|
@@ -83,6 +83,7 @@ var RibbonComboBox = /** @class */ (function () {
|
|
|
83
83
|
RibbonComboBox.prototype.addOverFlowEvents = function (item, itemEle, overflowButton) {
|
|
84
84
|
var _this = this;
|
|
85
85
|
var inputEle = itemEle.querySelector('#' + item.id);
|
|
86
|
+
inputEle.setAttribute('data-control', item.type.toString());
|
|
86
87
|
var comboBoxObj = getComponent(inputEle, ComboBox);
|
|
87
88
|
comboBoxObj.setProperties({ cssClass: comboBoxObj.cssClass + SPACE + RIBBON_POPUP_CONTROL });
|
|
88
89
|
comboBoxObj.close = function (e) {
|
|
@@ -9,6 +9,8 @@ export declare class RibbonDropDown {
|
|
|
9
9
|
constructor(parent: Ribbon);
|
|
10
10
|
protected getModuleName(): string;
|
|
11
11
|
protected destroy(): void;
|
|
12
|
+
private itemIndex;
|
|
13
|
+
private enableRtl;
|
|
12
14
|
/**
|
|
13
15
|
* Creates DropDown.
|
|
14
16
|
*
|
|
@@ -48,7 +50,11 @@ export declare class RibbonDropDown {
|
|
|
48
50
|
* @returns {void}
|
|
49
51
|
* @hidden
|
|
50
52
|
*/
|
|
51
|
-
createOverFlowDropDown(id: string, name: string, iconCss: string, groupEle: HTMLElement, overflowEle: HTMLElement): DropDownButton;
|
|
53
|
+
createOverFlowDropDown(id: string, name: string, iconCss: string, groupEle: HTMLElement, overflowEle: HTMLElement, enableRtl?: boolean): DropDownButton;
|
|
54
|
+
private keyActionHandler;
|
|
55
|
+
private handleNavigation;
|
|
56
|
+
private focusLauncherIcon;
|
|
57
|
+
private updateItemIndex;
|
|
52
58
|
/**
|
|
53
59
|
* Removes Overflow DropDown.
|
|
54
60
|
*
|
|
@@ -74,6 +74,7 @@ var RibbonDropDown = /** @class */ (function () {
|
|
|
74
74
|
RibbonDropDown.prototype.addOverFlowEvents = function (item, itemEle, overflowButton) {
|
|
75
75
|
var _this = this;
|
|
76
76
|
var dropdownElement = itemEle.querySelector('#' + item.id);
|
|
77
|
+
dropdownElement.setAttribute('data-control', item.type.toString());
|
|
77
78
|
var dropdown = getComponent(dropdownElement, DropDownButton);
|
|
78
79
|
dropdown.cssClass = dropdown.cssClass + SPACE + RIBBON_POPUP_CONTROL;
|
|
79
80
|
dropdown.dataBind();
|
|
@@ -131,10 +132,13 @@ var RibbonDropDown = /** @class */ (function () {
|
|
|
131
132
|
* @returns {void}
|
|
132
133
|
* @hidden
|
|
133
134
|
*/
|
|
134
|
-
RibbonDropDown.prototype.createOverFlowDropDown = function (id, name, iconCss, groupEle, overflowEle) {
|
|
135
|
+
RibbonDropDown.prototype.createOverFlowDropDown = function (id, name, iconCss, groupEle, overflowEle, enableRtl) {
|
|
136
|
+
var _this = this;
|
|
137
|
+
this.enableRtl = enableRtl;
|
|
135
138
|
var buttonEle = this.parent.createElement('button', {
|
|
136
139
|
id: id + OVERFLOW_ID + DROPDOWN_ID
|
|
137
140
|
});
|
|
141
|
+
groupEle.setAttribute('tabindex', '0');
|
|
138
142
|
overflowEle.appendChild(buttonEle);
|
|
139
143
|
var dropdown = new DropDownButton({
|
|
140
144
|
iconCss: iconCss,
|
|
@@ -150,8 +154,155 @@ var RibbonDropDown = /** @class */ (function () {
|
|
|
150
154
|
}
|
|
151
155
|
}, buttonEle);
|
|
152
156
|
createTooltip(groupEle, this.parent);
|
|
157
|
+
buttonEle.onclick = buttonEle.onkeydown = function () { _this.itemIndex = 0; };
|
|
158
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
|
|
159
|
+
groupEle.onkeydown = function (e) { _this.keyActionHandler(e, groupEle), _this; };
|
|
153
160
|
return dropdown;
|
|
154
161
|
};
|
|
162
|
+
RibbonDropDown.prototype.keyActionHandler = function (e, target) {
|
|
163
|
+
var items = target.querySelectorAll('.e-control');
|
|
164
|
+
var comboBoxElements = target.querySelectorAll('.e-combobox');
|
|
165
|
+
var comboBoxEle;
|
|
166
|
+
if (comboBoxElements) {
|
|
167
|
+
for (var i = 0; i < comboBoxElements.length; i++) {
|
|
168
|
+
if (comboBoxElements[parseInt(i.toString(), 10)].closest('.e-input-focus')) {
|
|
169
|
+
comboBoxEle = comboBoxElements[parseInt(i.toString(), 10)];
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
if (comboBoxEle) {
|
|
174
|
+
for (var i = 0; i < items.length; i++) {
|
|
175
|
+
if (items[parseInt(i.toString(), 10)].classList.contains('e-combobox')) {
|
|
176
|
+
if (items[parseInt(i.toString(), 10)].closest('.e-input-focus')) {
|
|
177
|
+
this.itemIndex = i;
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
if (e.target.classList.contains('e-control') || e.target.classList.contains('e-ribbon-launcher-icon') ||
|
|
183
|
+
e.target.classList.contains('e-ribbon-last-item') || e.target.classList.contains('e-ribbon-first-item')) {
|
|
184
|
+
if (e.key === 'ArrowRight' || (!e.shiftKey && e.key === 'Tab')) {
|
|
185
|
+
this.handleNavigation(e, !this.enableRtl, items);
|
|
186
|
+
}
|
|
187
|
+
if (e.key === 'ArrowLeft' || (e.shiftKey && e.key === 'Tab')) {
|
|
188
|
+
this.handleNavigation(e, this.enableRtl, items);
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
};
|
|
192
|
+
RibbonDropDown.prototype.handleNavigation = function (e, enableRtl, items) {
|
|
193
|
+
if (!(items[0].classList.contains('e-ribbon-first-item'))) {
|
|
194
|
+
items[0].classList.add('e-ribbon-first-item');
|
|
195
|
+
}
|
|
196
|
+
if (!(items[items.length - 1].classList.contains('e-ribbon-last-item'))) {
|
|
197
|
+
items[items.length - 1].classList.add('e-ribbon-last-item');
|
|
198
|
+
}
|
|
199
|
+
if (enableRtl) {
|
|
200
|
+
if (this.itemIndex === 0 && items[parseInt(this.itemIndex.toString(), 10)].classList.contains('e-ribbon-first-item')) {
|
|
201
|
+
this.updateItemIndex(e, items, true);
|
|
202
|
+
}
|
|
203
|
+
if (!e.target.classList.contains('e-combobox') && !e.target.classList.contains('e-ribbon-last-item') &&
|
|
204
|
+
!e.target.classList.contains('e-ribbon-group-container') && (e.target.classList.contains('e-ribbon-first-item')
|
|
205
|
+
|| this.itemIndex !== 0) && e.target.classList.contains('e-control')) {
|
|
206
|
+
this.itemIndex++;
|
|
207
|
+
this.updateItemIndex(e, items, true);
|
|
208
|
+
}
|
|
209
|
+
if (e.target.classList.contains('e-ribbon-last-item')) {
|
|
210
|
+
var launcherIcon = false;
|
|
211
|
+
launcherIcon = this.focusLauncherIcon(e, items);
|
|
212
|
+
if (!launcherIcon) {
|
|
213
|
+
this.itemIndex = 0;
|
|
214
|
+
this.updateItemIndex(e, items, true);
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
if (e.target.classList.contains('e-ribbon-launcher-icon')) {
|
|
218
|
+
this.itemIndex = 0;
|
|
219
|
+
this.updateItemIndex(e, items, true);
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
else {
|
|
223
|
+
if (!e.target.classList.contains('e-combobox') && this.itemIndex !== 0) {
|
|
224
|
+
this.itemIndex--;
|
|
225
|
+
this.updateItemIndex(e, items, false);
|
|
226
|
+
}
|
|
227
|
+
if (e.target.classList.contains('e-ribbon-first-item')) {
|
|
228
|
+
var launcherIcon = false;
|
|
229
|
+
launcherIcon = this.focusLauncherIcon(e, items);
|
|
230
|
+
if (!launcherIcon) {
|
|
231
|
+
this.itemIndex = items.length - 1;
|
|
232
|
+
this.updateItemIndex(e, items, false);
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
if (e.target.classList.contains('e-ribbon-launcher-icon')) {
|
|
236
|
+
this.itemIndex = items.length - 1;
|
|
237
|
+
this.updateItemIndex(e, items, false);
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
if (e.target.classList.contains('e-combobox') && (e.key === 'Tab')) {
|
|
241
|
+
if (enableRtl) {
|
|
242
|
+
if (this.itemIndex < items.length - 1) {
|
|
243
|
+
this.itemIndex++;
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
else {
|
|
247
|
+
if (this.itemIndex > 0) {
|
|
248
|
+
this.itemIndex--;
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
};
|
|
253
|
+
RibbonDropDown.prototype.focusLauncherIcon = function (e, items) {
|
|
254
|
+
var groupContainer = items[parseInt(this.itemIndex.toString(), 10)].closest('.e-ribbon-group-container');
|
|
255
|
+
var launcherIconEle;
|
|
256
|
+
if (groupContainer) {
|
|
257
|
+
launcherIconEle = groupContainer.querySelector('.e-ribbon-launcher-icon');
|
|
258
|
+
}
|
|
259
|
+
if (launcherIconEle) {
|
|
260
|
+
if (e.key === 'Tab') {
|
|
261
|
+
e.preventDefault();
|
|
262
|
+
}
|
|
263
|
+
groupContainer.querySelector('.e-ribbon-launcher-icon').focus();
|
|
264
|
+
return true;
|
|
265
|
+
}
|
|
266
|
+
else {
|
|
267
|
+
return false;
|
|
268
|
+
}
|
|
269
|
+
};
|
|
270
|
+
RibbonDropDown.prototype.updateItemIndex = function (e, items, enableRtl) {
|
|
271
|
+
var ribbonItem = items[this.itemIndex].closest('.e-ribbon-item');
|
|
272
|
+
while (ribbonItem && ribbonItem.classList.contains('e-disabled')) {
|
|
273
|
+
if (enableRtl) {
|
|
274
|
+
if (this.itemIndex < items.length - 1) {
|
|
275
|
+
this.itemIndex++;
|
|
276
|
+
}
|
|
277
|
+
else {
|
|
278
|
+
var launcherIcon = false;
|
|
279
|
+
launcherIcon = this.focusLauncherIcon(e, items);
|
|
280
|
+
if (launcherIcon) {
|
|
281
|
+
break;
|
|
282
|
+
}
|
|
283
|
+
this.itemIndex = 0;
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
else {
|
|
287
|
+
if (this.itemIndex > 0) {
|
|
288
|
+
this.itemIndex--;
|
|
289
|
+
}
|
|
290
|
+
else {
|
|
291
|
+
var launcherIcon = false;
|
|
292
|
+
launcherIcon = this.focusLauncherIcon(e, items);
|
|
293
|
+
if (launcherIcon) {
|
|
294
|
+
break;
|
|
295
|
+
}
|
|
296
|
+
this.itemIndex = items.length - 1;
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
ribbonItem = items[this.itemIndex].closest('.e-ribbon-item');
|
|
300
|
+
}
|
|
301
|
+
if (e.key === 'Tab') {
|
|
302
|
+
e.preventDefault();
|
|
303
|
+
}
|
|
304
|
+
items[parseInt(this.itemIndex.toString(), 10)].focus();
|
|
305
|
+
};
|
|
155
306
|
/**
|
|
156
307
|
* Removes Overflow DropDown.
|
|
157
308
|
*
|
|
@@ -70,6 +70,13 @@ var RibbonSplitButton = /** @class */ (function () {
|
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
72
|
}, buttonEle);
|
|
73
|
+
var dropdownEle = buttonEle.parentElement.querySelector('.e-dropdown-btn');
|
|
74
|
+
dropdownEle.onkeydown = function (e) {
|
|
75
|
+
if (e.key === 'Enter') {
|
|
76
|
+
e.stopImmediatePropagation();
|
|
77
|
+
dropdownEle.click();
|
|
78
|
+
}
|
|
79
|
+
};
|
|
73
80
|
this.setContent(item, splitbutton);
|
|
74
81
|
var wrapper = splitbutton['wrapper'];
|
|
75
82
|
EventHandler.add(wrapper, 'mouseenter', function () { wrapper.classList.add(RIBBON_HOVER); }, this);
|
|
@@ -87,9 +94,26 @@ var RibbonSplitButton = /** @class */ (function () {
|
|
|
87
94
|
RibbonSplitButton.prototype.addOverFlowEvents = function (item, itemEle, overflowButton) {
|
|
88
95
|
var _this = this;
|
|
89
96
|
var splitButtonEle = itemEle.querySelector('#' + item.id);
|
|
97
|
+
splitButtonEle.setAttribute('data-control', item.type.toString());
|
|
90
98
|
var splitbutton = getComponent(splitButtonEle, SplitButton);
|
|
91
99
|
splitbutton.cssClass = splitbutton.cssClass + SPACE + RIBBON_POPUP_CONTROL;
|
|
92
100
|
splitbutton.dataBind();
|
|
101
|
+
var dropdownEle = splitButtonEle.parentElement.querySelector('.e-dropdown-btn');
|
|
102
|
+
var ddbId = dropdownEle.getAttribute('id');
|
|
103
|
+
var popupEle = document.querySelector('#' + ddbId + '-popup');
|
|
104
|
+
dropdownEle.onkeydown = function (e) {
|
|
105
|
+
if (e.key === 'Enter') {
|
|
106
|
+
e.stopImmediatePropagation();
|
|
107
|
+
dropdownEle.click();
|
|
108
|
+
}
|
|
109
|
+
};
|
|
110
|
+
popupEle.onkeydown = function (e) {
|
|
111
|
+
if (e.key === 'Enter') {
|
|
112
|
+
e.preventDefault();
|
|
113
|
+
splitbutton['wrapper'].classList.remove('e-ribbon-open');
|
|
114
|
+
popupEle.querySelector('.e-focused').click();
|
|
115
|
+
}
|
|
116
|
+
};
|
|
93
117
|
var target;
|
|
94
118
|
splitbutton.beforeClose = function (e) {
|
|
95
119
|
if (item.splitButtonSettings.beforeClose) {
|
|
@@ -82,22 +82,25 @@ export interface RibbonComboBoxSettingsModel {
|
|
|
82
82
|
* Specifies the template content for the footer container of the popup list.
|
|
83
83
|
*
|
|
84
84
|
* @default null
|
|
85
|
+
* @aspType string
|
|
85
86
|
*/
|
|
86
|
-
footerTemplate?: string;
|
|
87
|
+
footerTemplate?: string | Function;
|
|
87
88
|
|
|
88
89
|
/**
|
|
89
90
|
* Specifies the template content for the group headers present in the popup list.
|
|
90
91
|
*
|
|
91
92
|
* @default null
|
|
93
|
+
* @aspType string
|
|
92
94
|
*/
|
|
93
|
-
groupTemplate?: string;
|
|
95
|
+
groupTemplate?: string | Function;
|
|
94
96
|
|
|
95
97
|
/**
|
|
96
98
|
* Specifies the template content for the header container of the popup list.
|
|
97
99
|
*
|
|
98
100
|
* @default null
|
|
101
|
+
* @aspType string
|
|
99
102
|
*/
|
|
100
|
-
headerTemplate?: string;
|
|
103
|
+
headerTemplate?: string | Function;
|
|
101
104
|
|
|
102
105
|
/**
|
|
103
106
|
* Specifies the index of the selected item in the combobox.
|
|
@@ -110,15 +113,17 @@ export interface RibbonComboBoxSettingsModel {
|
|
|
110
113
|
* Specifies the template content for each list item present in the popup.
|
|
111
114
|
*
|
|
112
115
|
* @default null
|
|
116
|
+
* @aspType string
|
|
113
117
|
*/
|
|
114
|
-
itemTemplate?: string;
|
|
118
|
+
itemTemplate?: string | Function;
|
|
115
119
|
|
|
116
120
|
/**
|
|
117
121
|
* Specifies the template content for the popup list of combobox when no data is available.
|
|
118
122
|
*
|
|
119
123
|
* @default 'No records found'
|
|
124
|
+
* @aspType string
|
|
120
125
|
*/
|
|
121
|
-
noRecordsTemplate?: string;
|
|
126
|
+
noRecordsTemplate?: string | Function;
|
|
122
127
|
|
|
123
128
|
/**
|
|
124
129
|
* Specifies a short hint that describes the expected value of the combobox.
|
|
@@ -78,20 +78,23 @@ export declare class RibbonComboBoxSettings extends ChildProperty<RibbonComboBox
|
|
|
78
78
|
* Specifies the template content for the footer container of the popup list.
|
|
79
79
|
*
|
|
80
80
|
* @default null
|
|
81
|
+
* @aspType string
|
|
81
82
|
*/
|
|
82
|
-
footerTemplate: string;
|
|
83
|
+
footerTemplate: string | Function;
|
|
83
84
|
/**
|
|
84
85
|
* Specifies the template content for the group headers present in the popup list.
|
|
85
86
|
*
|
|
86
87
|
* @default null
|
|
88
|
+
* @aspType string
|
|
87
89
|
*/
|
|
88
|
-
groupTemplate: string;
|
|
90
|
+
groupTemplate: string | Function;
|
|
89
91
|
/**
|
|
90
92
|
* Specifies the template content for the header container of the popup list.
|
|
91
93
|
*
|
|
92
94
|
* @default null
|
|
95
|
+
* @aspType string
|
|
93
96
|
*/
|
|
94
|
-
headerTemplate: string;
|
|
97
|
+
headerTemplate: string | Function;
|
|
95
98
|
/**
|
|
96
99
|
* Specifies the index of the selected item in the combobox.
|
|
97
100
|
*
|
|
@@ -102,14 +105,16 @@ export declare class RibbonComboBoxSettings extends ChildProperty<RibbonComboBox
|
|
|
102
105
|
* Specifies the template content for each list item present in the popup.
|
|
103
106
|
*
|
|
104
107
|
* @default null
|
|
108
|
+
* @aspType string
|
|
105
109
|
*/
|
|
106
|
-
itemTemplate: string;
|
|
110
|
+
itemTemplate: string | Function;
|
|
107
111
|
/**
|
|
108
112
|
* Specifies the template content for the popup list of combobox when no data is available.
|
|
109
113
|
*
|
|
110
114
|
* @default 'No records found'
|
|
115
|
+
* @aspType string
|
|
111
116
|
*/
|
|
112
|
-
noRecordsTemplate: string;
|
|
117
|
+
noRecordsTemplate: string | Function;
|
|
113
118
|
/**
|
|
114
119
|
* Specifies a short hint that describes the expected value of the combobox.
|
|
115
120
|
*
|
|
@@ -46,13 +46,15 @@ export interface FileMenuSettingsModel {
|
|
|
46
46
|
* Specifies the template for file menu item.
|
|
47
47
|
*
|
|
48
48
|
* @default ''
|
|
49
|
+
* @aspType string
|
|
49
50
|
*/
|
|
50
|
-
itemTemplate?: string;
|
|
51
|
+
itemTemplate?: string | Function;
|
|
51
52
|
|
|
52
53
|
/**
|
|
53
54
|
* Specifies the custom content for the file menu popup.
|
|
54
55
|
*
|
|
55
56
|
* @default ''
|
|
57
|
+
* @aspType string
|
|
56
58
|
*/
|
|
57
59
|
popupTemplate?: string | HTMLElement;
|
|
58
60
|
|
|
@@ -40,12 +40,14 @@ export declare class FileMenuSettings extends ChildProperty<FileMenuSettings> {
|
|
|
40
40
|
* Specifies the template for file menu item.
|
|
41
41
|
*
|
|
42
42
|
* @default ''
|
|
43
|
+
* @aspType string
|
|
43
44
|
*/
|
|
44
|
-
itemTemplate: string;
|
|
45
|
+
itemTemplate: string | Function;
|
|
45
46
|
/**
|
|
46
47
|
* Specifies the custom content for the file menu popup.
|
|
47
48
|
*
|
|
48
49
|
* @default ''
|
|
50
|
+
* @aspType string
|
|
49
51
|
*/
|
|
50
52
|
popupTemplate: string | HTMLElement;
|
|
51
53
|
/**
|
|
@@ -50,7 +50,7 @@ export declare class RibbonItem extends ChildProperty<RibbonItem> {
|
|
|
50
50
|
* @default ''
|
|
51
51
|
* @aspType string
|
|
52
52
|
*/
|
|
53
|
-
itemTemplate: string | HTMLElement;
|
|
53
|
+
itemTemplate: string | HTMLElement | Function;
|
|
54
54
|
/**
|
|
55
55
|
* Defines the type of control to be added as the Ribbon Item.
|
|
56
56
|
*
|
|
@@ -138,6 +138,7 @@
|
|
|
138
138
|
border-width: unset;
|
|
139
139
|
font-size: 14px;
|
|
140
140
|
font-weight: 400;
|
|
141
|
+
box-shadow: none;
|
|
141
142
|
}
|
|
142
143
|
.e-ribbon.e-rbn .e-ribbon-tab .e-ribbon-file-menu.e-active {
|
|
143
144
|
border-radius: unset;
|
|
@@ -275,6 +276,7 @@
|
|
|
275
276
|
border: none;
|
|
276
277
|
height: 32px;
|
|
277
278
|
margin: auto;
|
|
279
|
+
box-shadow: none;
|
|
278
280
|
}
|
|
279
281
|
.e-ribbon.e-rbn.e-ribbon-overflow .e-ribbon-group-of-btn .e-btn-icon,
|
|
280
282
|
.e-ribbon.e-rbn.e-ribbon-overflow .e-ribbon-overall-of-btn .e-btn-icon {
|
|
@@ -414,6 +416,8 @@
|
|
|
414
416
|
.e-ribbon.e-rbn .e-input-group.e-control-wrapper .e-clear-icon,
|
|
415
417
|
.e-ribbon-group-overflow-ddb .e-input-group.e-control-wrapper .e-clear-icon {
|
|
416
418
|
min-width: auto;
|
|
419
|
+
min-height: auto;
|
|
420
|
+
border-radius: unset;
|
|
417
421
|
}
|
|
418
422
|
.e-ribbon.e-rbn .e-input-group .e-clear-icon,
|
|
419
423
|
.e-ribbon-group-overflow-ddb .e-input-group .e-clear-icon {
|
|
@@ -497,6 +501,7 @@
|
|
|
497
501
|
font-weight: 400;
|
|
498
502
|
font-size: 12px;
|
|
499
503
|
text-transform: none;
|
|
504
|
+
box-shadow: none;
|
|
500
505
|
}
|
|
501
506
|
.e-ribbon.e-rbn .e-ribbon-group-overflow .e-btn:focus,
|
|
502
507
|
.e-ribbon.e-rbn .e-ribbon-item .e-btn:focus,
|
|
@@ -605,6 +610,7 @@
|
|
|
605
610
|
.e-ribbon-group-overflow-ddb .e-ribbon-item .e-split-btn-wrapper {
|
|
606
611
|
border: 1px solid transparent;
|
|
607
612
|
border-radius: 2px;
|
|
613
|
+
box-shadow: none;
|
|
608
614
|
}
|
|
609
615
|
.e-ribbon.e-rbn .e-ribbon-item .e-split-btn-wrapper .e-btn,
|
|
610
616
|
.e-ribbon-group-overflow-ddb .e-ribbon-item .e-split-btn-wrapper .e-btn {
|
|
@@ -729,6 +735,7 @@
|
|
|
729
735
|
.e-ribbon-group-overflow-ddb .e-ribbon-overflow-target .e-ribbon-item.e-ribbon-medium-item > .e-split-btn-wrapper .e-btn,
|
|
730
736
|
.e-ribbon-group-overflow-ddb .e-ribbon-overflow-target .e-ribbon-item.e-ribbon-medium-item > .e-btn {
|
|
731
737
|
line-height: 22px;
|
|
738
|
+
overflow: hidden;
|
|
732
739
|
}
|
|
733
740
|
.e-ribbon-group-overflow-ddb .e-ribbon-overflow-target .e-ribbon-item.e-ribbon-medium-item > .e-split-btn-wrapper {
|
|
734
741
|
width: inherit;
|
|
@@ -776,6 +783,17 @@
|
|
|
776
783
|
padding-left: 37px !important; /* stylelint-disable-line declaration-no-important */
|
|
777
784
|
}
|
|
778
785
|
|
|
786
|
+
.e-ribbon-control.e-dropdown-popup ul .e-item {
|
|
787
|
+
font-size: 14px;
|
|
788
|
+
height: 26px;
|
|
789
|
+
-ms-flex-align: center;
|
|
790
|
+
align-items: center;
|
|
791
|
+
}
|
|
792
|
+
.e-ribbon-control.e-dropdown-popup ul .e-item .e-menu-icon {
|
|
793
|
+
font-size: 16px;
|
|
794
|
+
line-height: 16px;
|
|
795
|
+
}
|
|
796
|
+
|
|
779
797
|
.e-ribbon-tooltip .e-tip-content {
|
|
780
798
|
padding: 4px;
|
|
781
799
|
}
|
|
@@ -1152,6 +1170,15 @@
|
|
|
1152
1170
|
padding: 10px;
|
|
1153
1171
|
}
|
|
1154
1172
|
|
|
1173
|
+
.e-bigger .e-ribbon-control.e-dropdown-popup ul .e-item {
|
|
1174
|
+
font-size: 14px;
|
|
1175
|
+
height: 32px;
|
|
1176
|
+
}
|
|
1177
|
+
.e-bigger .e-ribbon-control.e-dropdown-popup ul .e-item .e-menu-icon {
|
|
1178
|
+
font-size: 20px;
|
|
1179
|
+
line-height: 20px;
|
|
1180
|
+
}
|
|
1181
|
+
|
|
1155
1182
|
.e-bigger .e-ribbon-menu.e-menu-wrapper ul.e-vertical .e-menu-item.e-blankicon,
|
|
1156
1183
|
.e-bigger.e-ribbon-menu.e-menu-wrapper ul.e-vertical .e-menu-item.e-blankicon,
|
|
1157
1184
|
.e-bigger .e-ribbon-menu.e-menu-wrapper ul.e-ul .e-menu-item.e-blankicon,
|
package/styles/bootstrap.css
CHANGED
|
@@ -143,6 +143,7 @@
|
|
|
143
143
|
border-width: unset;
|
|
144
144
|
font-size: 14px;
|
|
145
145
|
font-weight: 400;
|
|
146
|
+
box-shadow: none;
|
|
146
147
|
}
|
|
147
148
|
.e-ribbon.e-rbn .e-ribbon-tab .e-ribbon-file-menu.e-active {
|
|
148
149
|
border-radius: unset;
|
|
@@ -280,6 +281,7 @@
|
|
|
280
281
|
border: none;
|
|
281
282
|
height: 32px;
|
|
282
283
|
margin: auto;
|
|
284
|
+
box-shadow: none;
|
|
283
285
|
}
|
|
284
286
|
.e-ribbon.e-rbn.e-ribbon-overflow .e-ribbon-group-of-btn .e-btn-icon,
|
|
285
287
|
.e-ribbon.e-rbn.e-ribbon-overflow .e-ribbon-overall-of-btn .e-btn-icon {
|
|
@@ -419,6 +421,8 @@
|
|
|
419
421
|
.e-ribbon.e-rbn .e-input-group.e-control-wrapper .e-clear-icon,
|
|
420
422
|
.e-ribbon-group-overflow-ddb .e-input-group.e-control-wrapper .e-clear-icon {
|
|
421
423
|
min-width: auto;
|
|
424
|
+
min-height: auto;
|
|
425
|
+
border-radius: unset;
|
|
422
426
|
}
|
|
423
427
|
.e-ribbon.e-rbn .e-input-group .e-clear-icon,
|
|
424
428
|
.e-ribbon-group-overflow-ddb .e-input-group .e-clear-icon {
|
|
@@ -502,6 +506,7 @@
|
|
|
502
506
|
font-weight: 400;
|
|
503
507
|
font-size: 12px;
|
|
504
508
|
text-transform: none;
|
|
509
|
+
box-shadow: none;
|
|
505
510
|
}
|
|
506
511
|
.e-ribbon.e-rbn .e-ribbon-group-overflow .e-btn:focus,
|
|
507
512
|
.e-ribbon.e-rbn .e-ribbon-item .e-btn:focus,
|
|
@@ -610,6 +615,7 @@
|
|
|
610
615
|
.e-ribbon-group-overflow-ddb .e-ribbon-item .e-split-btn-wrapper {
|
|
611
616
|
border: 1px solid transparent;
|
|
612
617
|
border-radius: 4px;
|
|
618
|
+
box-shadow: none;
|
|
613
619
|
}
|
|
614
620
|
.e-ribbon.e-rbn .e-ribbon-item .e-split-btn-wrapper .e-btn,
|
|
615
621
|
.e-ribbon-group-overflow-ddb .e-ribbon-item .e-split-btn-wrapper .e-btn {
|
|
@@ -734,6 +740,7 @@
|
|
|
734
740
|
.e-ribbon-group-overflow-ddb .e-ribbon-overflow-target .e-ribbon-item.e-ribbon-medium-item > .e-split-btn-wrapper .e-btn,
|
|
735
741
|
.e-ribbon-group-overflow-ddb .e-ribbon-overflow-target .e-ribbon-item.e-ribbon-medium-item > .e-btn {
|
|
736
742
|
line-height: 22px;
|
|
743
|
+
overflow: hidden;
|
|
737
744
|
}
|
|
738
745
|
.e-ribbon-group-overflow-ddb .e-ribbon-overflow-target .e-ribbon-item.e-ribbon-medium-item > .e-split-btn-wrapper {
|
|
739
746
|
width: inherit;
|
|
@@ -781,6 +788,17 @@
|
|
|
781
788
|
padding-left: 34px !important; /* stylelint-disable-line declaration-no-important */
|
|
782
789
|
}
|
|
783
790
|
|
|
791
|
+
.e-ribbon-control.e-dropdown-popup ul .e-item {
|
|
792
|
+
font-size: 14px;
|
|
793
|
+
height: 26px;
|
|
794
|
+
-ms-flex-align: center;
|
|
795
|
+
align-items: center;
|
|
796
|
+
}
|
|
797
|
+
.e-ribbon-control.e-dropdown-popup ul .e-item .e-menu-icon {
|
|
798
|
+
font-size: 16px;
|
|
799
|
+
line-height: 16px;
|
|
800
|
+
}
|
|
801
|
+
|
|
784
802
|
.e-ribbon-tooltip .e-tip-content {
|
|
785
803
|
padding: 4px;
|
|
786
804
|
}
|
|
@@ -1157,6 +1175,15 @@
|
|
|
1157
1175
|
padding: 10px;
|
|
1158
1176
|
}
|
|
1159
1177
|
|
|
1178
|
+
.e-bigger .e-ribbon-control.e-dropdown-popup ul .e-item {
|
|
1179
|
+
font-size: 14px;
|
|
1180
|
+
height: 32px;
|
|
1181
|
+
}
|
|
1182
|
+
.e-bigger .e-ribbon-control.e-dropdown-popup ul .e-item .e-menu-icon {
|
|
1183
|
+
font-size: 20px;
|
|
1184
|
+
line-height: 20px;
|
|
1185
|
+
}
|
|
1186
|
+
|
|
1160
1187
|
.e-bigger .e-ribbon-menu.e-menu-wrapper ul.e-vertical .e-menu-item.e-blankicon,
|
|
1161
1188
|
.e-bigger.e-ribbon-menu.e-menu-wrapper ul.e-vertical .e-menu-item.e-blankicon,
|
|
1162
1189
|
.e-bigger .e-ribbon-menu.e-menu-wrapper ul.e-ul .e-menu-item.e-blankicon,
|