@syncfusion/ej2-ribbon 21.1.35 → 21.1.37
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/CHANGELOG.md +3 -1
- package/README.md +61 -1
- 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 +42 -21
- package/dist/es6/ej2-ribbon.es2015.js.map +1 -1
- package/dist/es6/ej2-ribbon.es5.js +42 -21
- 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 +12 -12
- package/src/ribbon/base/ribbon-model.d.ts +1 -1
- package/src/ribbon/base/ribbon.js +18 -10
- package/src/ribbon/base/utils.d.ts +15 -1
- package/src/ribbon/base/utils.js +16 -1
- package/src/ribbon/items/ribbon-button.d.ts +0 -1
- package/src/ribbon/items/ribbon-button.js +2 -1
- package/src/ribbon/items/ribbon-checkbox.d.ts +0 -1
- package/src/ribbon/items/ribbon-checkbox.js +0 -1
- package/src/ribbon/items/ribbon-colorpicker.d.ts +0 -1
- package/src/ribbon/items/ribbon-colorpicker.js +0 -1
- package/src/ribbon/items/ribbon-combobox.d.ts +0 -1
- package/src/ribbon/items/ribbon-combobox.js +0 -1
- package/src/ribbon/items/ribbon-dropdown.d.ts +0 -1
- package/src/ribbon/items/ribbon-dropdown.js +0 -1
- package/src/ribbon/items/ribbon-splitbutton.d.ts +0 -1
- package/src/ribbon/items/ribbon-splitbutton.js +0 -1
- package/src/ribbon/modules/ribbon-filemenu.js +6 -4
- package/styles/bootstrap-dark.css +11 -0
- package/styles/bootstrap.css +11 -0
- package/styles/bootstrap4.css +11 -0
- package/styles/bootstrap5-dark.css +11 -0
- package/styles/bootstrap5.css +11 -0
- package/styles/fabric-dark.css +11 -0
- package/styles/fabric.css +11 -0
- package/styles/fluent-dark.css +11 -0
- package/styles/fluent.css +11 -0
- package/styles/highcontrast-light.css +11 -0
- package/styles/highcontrast.css +11 -0
- package/styles/material-dark.css +11 -0
- package/styles/material.css +11 -0
- package/styles/ribbon/_layout.scss +16 -0
- package/styles/ribbon/bootstrap-dark.css +11 -0
- package/styles/ribbon/bootstrap.css +11 -0
- package/styles/ribbon/bootstrap4.css +11 -0
- package/styles/ribbon/bootstrap5-dark.css +11 -0
- package/styles/ribbon/bootstrap5.css +11 -0
- package/styles/ribbon/fabric-dark.css +11 -0
- package/styles/ribbon/fabric.css +11 -0
- package/styles/ribbon/fluent-dark.css +11 -0
- package/styles/ribbon/fluent.css +11 -0
- package/styles/ribbon/highcontrast-light.css +11 -0
- package/styles/ribbon/highcontrast.css +11 -0
- package/styles/ribbon/material-dark.css +11 -0
- package/styles/ribbon/material.css +11 -0
- package/styles/ribbon/tailwind-dark.css +11 -0
- package/styles/ribbon/tailwind.css +11 -0
- package/styles/tailwind-dark.css +11 -0
- package/styles/tailwind.css +11 -0
package/dist/global/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* filename: index.d.ts
|
|
3
|
-
* version : 21.1.
|
|
3
|
+
* version : 21.1.37
|
|
4
4
|
* Copyright Syncfusion Inc. 2001 - 2020. All rights reserved.
|
|
5
5
|
* Use of this code is subject to the terms of our license.
|
|
6
6
|
* A copy of the current license can be obtained at any time by e-mailing
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"_from": "@syncfusion/ej2-ribbon@*",
|
|
3
|
-
"_id": "@syncfusion/ej2-ribbon@
|
|
3
|
+
"_id": "@syncfusion/ej2-ribbon@21.1.35",
|
|
4
4
|
"_inBundle": false,
|
|
5
|
-
"_integrity": "sha512
|
|
5
|
+
"_integrity": "sha512-/LDAXvqgmh7oonyPvW0RpUpmajmXn6OHEHDWuQN/4ijVcs+G8xOwH5kD5uFdDKX1uY7mgsFS4CxmIIq2G5JJ0A==",
|
|
6
6
|
"_location": "/@syncfusion/ej2-ribbon",
|
|
7
7
|
"_phantomChildren": {},
|
|
8
8
|
"_requested": {
|
|
@@ -23,8 +23,8 @@
|
|
|
23
23
|
"/@syncfusion/ej2-react-ribbon",
|
|
24
24
|
"/@syncfusion/ej2-vue-ribbon"
|
|
25
25
|
],
|
|
26
|
-
"_resolved": "https://nexus.syncfusion.com/repository/ej2-
|
|
27
|
-
"_shasum": "
|
|
26
|
+
"_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-ribbon/-/ej2-ribbon-21.1.35.tgz",
|
|
27
|
+
"_shasum": "c0b6b9ec2253aa727068716ab0d79c122c2d2a89",
|
|
28
28
|
"_spec": "@syncfusion/ej2-ribbon@*",
|
|
29
29
|
"_where": "/jenkins/workspace/elease-automation_release_21.1.1/packages/included",
|
|
30
30
|
"author": {
|
|
@@ -35,13 +35,13 @@
|
|
|
35
35
|
},
|
|
36
36
|
"bundleDependencies": false,
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@syncfusion/ej2-base": "~21.1.
|
|
39
|
-
"@syncfusion/ej2-buttons": "~21.1.
|
|
40
|
-
"@syncfusion/ej2-dropdowns": "~21.1.
|
|
41
|
-
"@syncfusion/ej2-lists": "~21.1.
|
|
42
|
-
"@syncfusion/ej2-navigations": "~21.1.
|
|
43
|
-
"@syncfusion/ej2-popups": "~21.1.
|
|
44
|
-
"@syncfusion/ej2-splitbuttons": "~21.1.
|
|
38
|
+
"@syncfusion/ej2-base": "~21.1.37",
|
|
39
|
+
"@syncfusion/ej2-buttons": "~21.1.37",
|
|
40
|
+
"@syncfusion/ej2-dropdowns": "~21.1.37",
|
|
41
|
+
"@syncfusion/ej2-lists": "~21.1.37",
|
|
42
|
+
"@syncfusion/ej2-navigations": "~21.1.37",
|
|
43
|
+
"@syncfusion/ej2-popups": "~21.1.37",
|
|
44
|
+
"@syncfusion/ej2-splitbuttons": "~21.1.37"
|
|
45
45
|
},
|
|
46
46
|
"deprecated": false,
|
|
47
47
|
"description": "Essential JS 2 Component",
|
|
@@ -62,6 +62,6 @@
|
|
|
62
62
|
"url": "git+https://github.com/syncfusion/ej2-ribbon-component.git"
|
|
63
63
|
},
|
|
64
64
|
"typings": "index.d.ts",
|
|
65
|
-
"version": "21.1.
|
|
65
|
+
"version": "21.1.37",
|
|
66
66
|
"sideEffects": false
|
|
67
67
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { addClass, append, Event, Collection, Complex, Component, EmitType, EventHandler, formatUnit, getInstance, getComponent, getUniqueID, closest } 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, RibbonItem, RibbonCollection, RibbonGroup } from '../models/index';import { commonProperties, DisplayMode,
|
|
1
|
+
import { addClass, append, Event, Collection, Complex, Component, EmitType, EventHandler, formatUnit, getInstance, getComponent, getUniqueID, closest } 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, RibbonItem, RibbonCollection, RibbonGroup } from '../models/index';import { commonProperties, DisplayMode, ExpandCollapseEventArgs, itemProps, LauncherClickEventArgs, ribbonItemPropsList, RibbonLayout, ribbonTooltipData, TabSelectedEventArgs, TabSelectingEventArgs } from './interface';import { ItemOrientation, RibbonItemSize, RibbonItemType } from './interface';import { RibbonButton, RibbonComboBox, RibbonCheckBox, RibbonDropDown, RibbonColorPicker, RibbonSplitButton } 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 } from '../modules/index';import { RibbonTooltipModel } from '../models/ribbon-tooltip-model';import { Popup } from '@syncfusion/ej2-popups';import { BeforeOpenCloseMenuEventArgs, DropDownButton, SplitButton } from '@syncfusion/ej2-splitbuttons';
|
|
2
2
|
import {ComponentModel} from '@syncfusion/ej2-base';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -221,7 +221,9 @@ var Ribbon = /** @class */ (function (_super) {
|
|
|
221
221
|
}
|
|
222
222
|
//Adds Scroll if the tabwidth is less the content width even after adding overflow dropdown.
|
|
223
223
|
if ((tabContent.offsetWidth < activeContent.offsetWidth) && (!this.scrollModule)) {
|
|
224
|
-
this.scrollModule = new HScroll({
|
|
224
|
+
this.scrollModule = new HScroll({
|
|
225
|
+
enableRtl: this.enableRtl
|
|
226
|
+
}, this.tabObj.element.querySelector('.' + constants.TAB_CONTENT));
|
|
225
227
|
}
|
|
226
228
|
}
|
|
227
229
|
else if (!isOverFlow) {
|
|
@@ -302,8 +304,8 @@ var Ribbon = /** @class */ (function (_super) {
|
|
|
302
304
|
var group = orderedGroups[parseInt(i.toString(), 10)];
|
|
303
305
|
var groupEle = tabContent.querySelector('#' + group.id);
|
|
304
306
|
var groupContainer = groupEle.querySelector('#' + group.id + constants.CONTAINER_ID);
|
|
305
|
-
for (var j =
|
|
306
|
-
var collection = group.collections[parseInt(j.toString(), 10)];
|
|
307
|
+
for (var j = group.collections.length; ((j >= 1) && (tabContent.offsetWidth < activeContent.offsetWidth)); j--) {
|
|
308
|
+
var collection = group.collections[parseInt((j - 1).toString(), 10)];
|
|
307
309
|
var collectionEle = groupEle.querySelector('#' + collection.id);
|
|
308
310
|
for (var k = collection.items.length; ((k >= 1) && (tabContent.offsetWidth < activeContent.offsetWidth)); k--) {
|
|
309
311
|
var item = collection.items[k - 1];
|
|
@@ -370,8 +372,8 @@ var Ribbon = /** @class */ (function (_super) {
|
|
|
370
372
|
overflowDDB = this.overflowDDB;
|
|
371
373
|
overflowtarget = this.overflowDDB ? this.overflowDDB.target : null;
|
|
372
374
|
}
|
|
373
|
-
for (var j =
|
|
374
|
-
var collection = group.collections[parseInt(
|
|
375
|
+
for (var j = 0; ((j < group.collections.length) && flag); j++) {
|
|
376
|
+
var collection = group.collections[parseInt(j.toString(), 10)];
|
|
375
377
|
// eslint-disable-next-line max-len
|
|
376
378
|
for (var k = 0; ((k < collection.items.length) && flag && !isClear && (tabContent.offsetWidth > activeContent.offsetWidth)); k++) {
|
|
377
379
|
var item = collection.items[parseInt(k.toString(), 10)];
|
|
@@ -1195,11 +1197,11 @@ var Ribbon = /** @class */ (function (_super) {
|
|
|
1195
1197
|
this.collapseButton = this.createElement('span', {
|
|
1196
1198
|
className: constants.RIBBON_COLLAPSE_BUTTON + constants.SPACE + constants.EXPAND_COLLAPSE_ICON,
|
|
1197
1199
|
id: this.tabObj.element.id + constants.COLLAPSE_BUTTON_ID,
|
|
1198
|
-
attrs: { 'tabindex': '0', 'type': 'button', 'aria-label': 'Layout Switcher' }
|
|
1200
|
+
attrs: { 'tabindex': '0', 'type': 'button', 'aria-label': 'Layout Switcher', 'role': 'button' }
|
|
1199
1201
|
});
|
|
1200
1202
|
this.collapseButton.onclick = function () { _this.toggleLayout(); };
|
|
1201
1203
|
this.collapseButton.onkeydown = function (e) {
|
|
1202
|
-
if (e.key ===
|
|
1204
|
+
if (e.key === 'Enter') {
|
|
1203
1205
|
_this.toggleLayout();
|
|
1204
1206
|
}
|
|
1205
1207
|
};
|
|
@@ -1445,13 +1447,13 @@ var Ribbon = /** @class */ (function (_super) {
|
|
|
1445
1447
|
var launcherIcon = this_3.createElement('div', {
|
|
1446
1448
|
className: constants.RIBBON_LAUNCHER_ICON_ELE + ' ' + (this_3.launcherIconCss ? this_3.launcherIconCss : constants.RIBBON_LAUNCHER_ICON),
|
|
1447
1449
|
id: group.id + constants.LAUNCHER_ID,
|
|
1448
|
-
attrs: { 'tabindex': '0', 'type': 'button', 'aria-label': 'Launcher Icon' }
|
|
1450
|
+
attrs: { 'tabindex': '0', 'type': 'button', 'aria-label': 'Launcher Icon', 'role': 'button' }
|
|
1449
1451
|
});
|
|
1450
1452
|
groupContainer.appendChild(launcherIcon);
|
|
1451
1453
|
groupContainer.classList.add(constants.RIBBON_LAUNCHER);
|
|
1452
1454
|
EventHandler.add(launcherIcon, 'click', this_3.launcherIconClicked.bind(this_3, group.id), this_3);
|
|
1453
1455
|
EventHandler.add(launcherIcon, 'keydown', function (e) {
|
|
1454
|
-
if (e.key ===
|
|
1456
|
+
if (e.key === 'Enter') {
|
|
1455
1457
|
_this.launcherIconClicked(group.id);
|
|
1456
1458
|
}
|
|
1457
1459
|
}, this_3);
|
|
@@ -1479,7 +1481,9 @@ var Ribbon = /** @class */ (function (_super) {
|
|
|
1479
1481
|
for (var j = 0; j < items.length; j++) {
|
|
1480
1482
|
var ribbonitem = items[parseInt(j.toString(), 10)];
|
|
1481
1483
|
if (!ribbonitem.allowedSizes || (ribbonitem.allowedSizes === 0)) {
|
|
1482
|
-
ribbonitem.setProperties({
|
|
1484
|
+
ribbonitem.setProperties({
|
|
1485
|
+
allowedSizes: (RibbonItemSize.Small | RibbonItemSize.Medium | RibbonItemSize.Large)
|
|
1486
|
+
}, true);
|
|
1483
1487
|
}
|
|
1484
1488
|
if ((ribbonitem.type === 'ColorPicker') && (ribbonitem.allowedSizes !== RibbonItemSize.Small)) {
|
|
1485
1489
|
ribbonitem.setProperties({ allowedSizes: RibbonItemSize.Small }, true);
|
|
@@ -2293,6 +2297,7 @@ var Ribbon = /** @class */ (function (_super) {
|
|
|
2293
2297
|
break;
|
|
2294
2298
|
case 'isMinimized':
|
|
2295
2299
|
this.element.classList.toggle(constants.RIBBON_MINIMIZE, this.isMinimized);
|
|
2300
|
+
this.tabObj.element.querySelector('.e-content').style.display = this.isMinimized ? 'none' : 'block';
|
|
2296
2301
|
break;
|
|
2297
2302
|
case 'locale':
|
|
2298
2303
|
this.updateCommonProperty({ locale: this.locale });
|
|
@@ -2303,6 +2308,9 @@ var Ribbon = /** @class */ (function (_super) {
|
|
|
2303
2308
|
case 'enableRtl':
|
|
2304
2309
|
this.element.classList.toggle(constants.RTL_CSS, this.enableRtl);
|
|
2305
2310
|
this.updateCommonProperty({ enableRtl: newProp.enableRtl });
|
|
2311
|
+
if (this.scrollModule) {
|
|
2312
|
+
this.scrollModule.setProperties({ enableRtl: newProp.enableRtl });
|
|
2313
|
+
}
|
|
2306
2314
|
break;
|
|
2307
2315
|
case 'launcherIconCss':
|
|
2308
2316
|
for (var i = 0; i < this.tabs.length; i++) {
|
|
@@ -8,6 +8,7 @@ import { Ribbon } from './ribbon';
|
|
|
8
8
|
* @param {Array} arr - Gets the array to find index.
|
|
9
9
|
* @param {boolean} condition - Defines whether index matches with the value.
|
|
10
10
|
* @returns {number} - Gets the index value.
|
|
11
|
+
* @hidden
|
|
11
12
|
*/
|
|
12
13
|
export declare function getIndex<T>(arr: Array<T>, condition: (value: T, index: number) => boolean): number;
|
|
13
14
|
/**
|
|
@@ -15,6 +16,7 @@ export declare function getIndex<T>(arr: Array<T>, condition: (value: T, index:
|
|
|
15
16
|
*
|
|
16
17
|
* @param {string | HTMLElement} template - Template property value.
|
|
17
18
|
* @returns {Function} - Return template function.
|
|
19
|
+
* @hidden
|
|
18
20
|
*/
|
|
19
21
|
export declare function getTemplateFunction(template: string | HTMLElement): Function;
|
|
20
22
|
/**
|
|
@@ -23,6 +25,7 @@ export declare function getTemplateFunction(template: string | HTMLElement): Fun
|
|
|
23
25
|
* @param {RibbonTabModel} tabs - Gets the ribbon tab model.
|
|
24
26
|
* @param {string} id - Gets the ID of the tab.
|
|
25
27
|
* @returns {itemProps} - Gets the ribbon item.
|
|
28
|
+
* @hidden
|
|
26
29
|
*/
|
|
27
30
|
export declare function getItem(tabs: RibbonTabModel[], id: string): itemProps;
|
|
28
31
|
/**
|
|
@@ -31,6 +34,7 @@ export declare function getItem(tabs: RibbonTabModel[], id: string): itemProps;
|
|
|
31
34
|
* @param {RibbonTabModel} tabs - Gets the ribbon tab model.
|
|
32
35
|
* @param {string} id - Gets the ID of the tab.
|
|
33
36
|
* @returns {itemProps} - Gets the ribbon collection.
|
|
37
|
+
* @hidden
|
|
34
38
|
*/
|
|
35
39
|
export declare function getCollection(tabs: RibbonTabModel[], id: string): itemProps;
|
|
36
40
|
/**
|
|
@@ -39,12 +43,14 @@ export declare function getCollection(tabs: RibbonTabModel[], id: string): itemP
|
|
|
39
43
|
* @param {RibbonTabModel} tabs - Gets the ribbon tab model.
|
|
40
44
|
* @param {string} id - Gets the ID of the tab.
|
|
41
45
|
* @returns {itemProps} - Gets the ribbon group.
|
|
46
|
+
* @hidden
|
|
42
47
|
*/
|
|
43
48
|
export declare function getGroup(tabs: RibbonTabModel[], id: string): itemProps;
|
|
44
49
|
/**
|
|
45
50
|
* @param {HTMLElement} element - Gets the element to be destroyed.
|
|
46
51
|
* @param {string} moduleName - Gets the module name.
|
|
47
52
|
* @returns {void}
|
|
53
|
+
* @hidden
|
|
48
54
|
*/
|
|
49
55
|
export declare function destroyControl(element: HTMLElement, moduleName: string): void;
|
|
50
56
|
/**
|
|
@@ -54,6 +60,7 @@ export declare function destroyControl(element: HTMLElement, moduleName: string)
|
|
|
54
60
|
* @param {string} moduleName - Gets the module name.
|
|
55
61
|
* @param {commonProperties} commonProp - Gets the common properties to be updated.
|
|
56
62
|
* @returns {void}
|
|
63
|
+
* @hidden
|
|
57
64
|
*/
|
|
58
65
|
export declare function updateCommonProperty(element: HTMLElement, moduleName: string, commonProp: commonProperties): void;
|
|
59
66
|
/**
|
|
@@ -63,20 +70,23 @@ export declare function updateCommonProperty(element: HTMLElement, moduleName: s
|
|
|
63
70
|
* @param {string} moduleName - Gets the module name.
|
|
64
71
|
* @param {boolean} disable - Defines whether the control to be disabled or not.
|
|
65
72
|
* @returns {void}
|
|
73
|
+
* @hidden
|
|
66
74
|
*/
|
|
67
75
|
export declare function updateControlDisabled(element: HTMLElement, moduleName: string, disable: boolean): void;
|
|
68
76
|
/**
|
|
69
77
|
* Gets the ribbon item element.
|
|
70
78
|
*
|
|
71
79
|
* @param {Ribbon} parent - Gets the parent element.
|
|
72
|
-
* @param {itemProps} itemProp - Gets the ribbon item.
|
|
73
80
|
* @param {string} id - Gets the ID of the item.
|
|
81
|
+
* @param {itemProps} itemProp - Gets the ribbon item.
|
|
74
82
|
* @returns {HTMLElement} - Gets the ribbon item element.
|
|
83
|
+
* @hidden
|
|
75
84
|
*/
|
|
76
85
|
export declare function getItemElement(parent: Ribbon, id: string, itemProp?: itemProps): HTMLElement;
|
|
77
86
|
/**
|
|
78
87
|
* @param {RibbonTooltipModel} tooltip - Gets the property of tooltip.
|
|
79
88
|
* @returns {boolean} - Gets whether the tooltip is present or not.
|
|
89
|
+
* @hidden
|
|
80
90
|
*/
|
|
81
91
|
export declare function isTooltipPresent(tooltip: RibbonTooltipModel): boolean;
|
|
82
92
|
/**
|
|
@@ -86,6 +96,7 @@ export declare function isTooltipPresent(tooltip: RibbonTooltipModel): boolean;
|
|
|
86
96
|
* @param {Tooltip} tooltip - Gets the tooltip to set the content.
|
|
87
97
|
* @param {ribbonTooltipData} tooltipData - Gets the tooltip data.
|
|
88
98
|
* @returns {void}
|
|
99
|
+
* @hidden
|
|
89
100
|
*/
|
|
90
101
|
export declare function setToolTipContent(args: TooltipEventArgs, tooltip: Tooltip, tooltipData: ribbonTooltipData[]): void;
|
|
91
102
|
/**
|
|
@@ -94,6 +105,7 @@ export declare function setToolTipContent(args: TooltipEventArgs, tooltip: Toolt
|
|
|
94
105
|
* @param {HTMLElement} element - Gets the element to add tooltip.
|
|
95
106
|
* @param {Ribbon} ribbon - Gets the ribbon.
|
|
96
107
|
* @returns {void}
|
|
108
|
+
* @hidden
|
|
97
109
|
*/
|
|
98
110
|
export declare function createTooltip(element: HTMLElement, ribbon: Ribbon): void;
|
|
99
111
|
/**
|
|
@@ -101,6 +113,7 @@ export declare function createTooltip(element: HTMLElement, ribbon: Ribbon): voi
|
|
|
101
113
|
*
|
|
102
114
|
* @param {HTMLElement} element - Gets the element in which the tooltip needs to be destroyed.
|
|
103
115
|
* @returns {void}
|
|
116
|
+
* @hidden
|
|
104
117
|
*/
|
|
105
118
|
export declare function destroyTooltip(element: HTMLElement): void;
|
|
106
119
|
/**
|
|
@@ -109,5 +122,6 @@ export declare function destroyTooltip(element: HTMLElement): void;
|
|
|
109
122
|
* @param {HTMLElement} element - Gets the element in which the tooltip needs to be Updated.
|
|
110
123
|
* @param {commonProperties} prop - Gets the property to be updated.
|
|
111
124
|
* @returns {void}
|
|
125
|
+
* @hidden
|
|
112
126
|
*/
|
|
113
127
|
export declare function updateTooltipProp(element: HTMLElement, prop: commonProperties): void;
|
package/src/ribbon/base/utils.js
CHANGED
|
@@ -9,6 +9,7 @@ import { DropDownButton } from '@syncfusion/ej2-splitbuttons';
|
|
|
9
9
|
* @param {Array} arr - Gets the array to find index.
|
|
10
10
|
* @param {boolean} condition - Defines whether index matches with the value.
|
|
11
11
|
* @returns {number} - Gets the index value.
|
|
12
|
+
* @hidden
|
|
12
13
|
*/
|
|
13
14
|
export function getIndex(arr, condition) {
|
|
14
15
|
for (var i = 0; i < arr.length; i++) {
|
|
@@ -23,6 +24,7 @@ export function getIndex(arr, condition) {
|
|
|
23
24
|
*
|
|
24
25
|
* @param {string | HTMLElement} template - Template property value.
|
|
25
26
|
* @returns {Function} - Return template function.
|
|
27
|
+
* @hidden
|
|
26
28
|
*/
|
|
27
29
|
export function getTemplateFunction(template) {
|
|
28
30
|
if (typeof template === 'string') {
|
|
@@ -53,6 +55,7 @@ export function getTemplateFunction(template) {
|
|
|
53
55
|
* @param {RibbonTabModel} tabs - Gets the ribbon tab model.
|
|
54
56
|
* @param {string} id - Gets the ID of the tab.
|
|
55
57
|
* @returns {itemProps} - Gets the ribbon item.
|
|
58
|
+
* @hidden
|
|
56
59
|
*/
|
|
57
60
|
export function getItem(tabs, id) {
|
|
58
61
|
for (var i = 0; i < tabs.length; i++) {
|
|
@@ -81,6 +84,7 @@ export function getItem(tabs, id) {
|
|
|
81
84
|
* @param {RibbonTabModel} tabs - Gets the ribbon tab model.
|
|
82
85
|
* @param {string} id - Gets the ID of the tab.
|
|
83
86
|
* @returns {itemProps} - Gets the ribbon collection.
|
|
87
|
+
* @hidden
|
|
84
88
|
*/
|
|
85
89
|
export function getCollection(tabs, id) {
|
|
86
90
|
for (var i = 0; i < tabs.length; i++) {
|
|
@@ -106,6 +110,7 @@ export function getCollection(tabs, id) {
|
|
|
106
110
|
* @param {RibbonTabModel} tabs - Gets the ribbon tab model.
|
|
107
111
|
* @param {string} id - Gets the ID of the tab.
|
|
108
112
|
* @returns {itemProps} - Gets the ribbon group.
|
|
113
|
+
* @hidden
|
|
109
114
|
*/
|
|
110
115
|
export function getGroup(tabs, id) {
|
|
111
116
|
for (var i = 0; i < tabs.length; i++) {
|
|
@@ -125,6 +130,7 @@ export function getGroup(tabs, id) {
|
|
|
125
130
|
* @param {HTMLElement} element - Gets the element to be destroyed.
|
|
126
131
|
* @param {string} moduleName - Gets the module name.
|
|
127
132
|
* @returns {void}
|
|
133
|
+
* @hidden
|
|
128
134
|
*/
|
|
129
135
|
export function destroyControl(element, moduleName) {
|
|
130
136
|
var control = getComponent(element, moduleName);
|
|
@@ -137,6 +143,7 @@ export function destroyControl(element, moduleName) {
|
|
|
137
143
|
* @param {string} moduleName - Gets the module name.
|
|
138
144
|
* @param {commonProperties} commonProp - Gets the common properties to be updated.
|
|
139
145
|
* @returns {void}
|
|
146
|
+
* @hidden
|
|
140
147
|
*/
|
|
141
148
|
export function updateCommonProperty(element, moduleName, commonProp) {
|
|
142
149
|
var control = getComponent(element, moduleName);
|
|
@@ -149,6 +156,7 @@ export function updateCommonProperty(element, moduleName, commonProp) {
|
|
|
149
156
|
* @param {string} moduleName - Gets the module name.
|
|
150
157
|
* @param {boolean} disable - Defines whether the control to be disabled or not.
|
|
151
158
|
* @returns {void}
|
|
159
|
+
* @hidden
|
|
152
160
|
*/
|
|
153
161
|
export function updateControlDisabled(element, moduleName, disable) {
|
|
154
162
|
var control = getComponent(element, moduleName);
|
|
@@ -158,9 +166,10 @@ export function updateControlDisabled(element, moduleName, disable) {
|
|
|
158
166
|
* Gets the ribbon item element.
|
|
159
167
|
*
|
|
160
168
|
* @param {Ribbon} parent - Gets the parent element.
|
|
161
|
-
* @param {itemProps} itemProp - Gets the ribbon item.
|
|
162
169
|
* @param {string} id - Gets the ID of the item.
|
|
170
|
+
* @param {itemProps} itemProp - Gets the ribbon item.
|
|
163
171
|
* @returns {HTMLElement} - Gets the ribbon item element.
|
|
172
|
+
* @hidden
|
|
164
173
|
*/
|
|
165
174
|
export function getItemElement(parent, id, itemProp) {
|
|
166
175
|
if (!itemProp) {
|
|
@@ -195,6 +204,7 @@ export function getItemElement(parent, id, itemProp) {
|
|
|
195
204
|
/**
|
|
196
205
|
* @param {RibbonTooltipModel} tooltip - Gets the property of tooltip.
|
|
197
206
|
* @returns {boolean} - Gets whether the tooltip is present or not.
|
|
207
|
+
* @hidden
|
|
198
208
|
*/
|
|
199
209
|
export function isTooltipPresent(tooltip) {
|
|
200
210
|
return (tooltip.content || tooltip.iconCss || tooltip.title || tooltip.id || tooltip.cssClass) ? true : false;
|
|
@@ -206,6 +216,7 @@ export function isTooltipPresent(tooltip) {
|
|
|
206
216
|
* @param {Tooltip} tooltip - Gets the tooltip to set the content.
|
|
207
217
|
* @param {ribbonTooltipData} tooltipData - Gets the tooltip data.
|
|
208
218
|
* @returns {void}
|
|
219
|
+
* @hidden
|
|
209
220
|
*/
|
|
210
221
|
export function setToolTipContent(args, tooltip, tooltipData) {
|
|
211
222
|
var targetId = args.target.getAttribute('id');
|
|
@@ -249,6 +260,7 @@ export function setToolTipContent(args, tooltip, tooltipData) {
|
|
|
249
260
|
* @param {HTMLElement} element - Gets the element to add tooltip.
|
|
250
261
|
* @param {Ribbon} ribbon - Gets the ribbon.
|
|
251
262
|
* @returns {void}
|
|
263
|
+
* @hidden
|
|
252
264
|
*/
|
|
253
265
|
export function createTooltip(element, ribbon) {
|
|
254
266
|
var ribbonTooltip = new Tooltip({
|
|
@@ -260,6 +272,7 @@ export function createTooltip(element, ribbon) {
|
|
|
260
272
|
/**
|
|
261
273
|
* @param {TooltipEventArgs} args - Gets the tooltip argument.
|
|
262
274
|
* @returns {void}
|
|
275
|
+
* @hidden
|
|
263
276
|
*/
|
|
264
277
|
function beforeTooltipRender(args) {
|
|
265
278
|
setToolTipContent(args, ribbonTooltip, ribbon.tooltipData);
|
|
@@ -270,6 +283,7 @@ export function createTooltip(element, ribbon) {
|
|
|
270
283
|
*
|
|
271
284
|
* @param {HTMLElement} element - Gets the element in which the tooltip needs to be destroyed.
|
|
272
285
|
* @returns {void}
|
|
286
|
+
* @hidden
|
|
273
287
|
*/
|
|
274
288
|
export function destroyTooltip(element) {
|
|
275
289
|
var control = getComponent(element, Tooltip);
|
|
@@ -281,6 +295,7 @@ export function destroyTooltip(element) {
|
|
|
281
295
|
* @param {HTMLElement} element - Gets the element in which the tooltip needs to be Updated.
|
|
282
296
|
* @param {commonProperties} prop - Gets the property to be updated.
|
|
283
297
|
* @returns {void}
|
|
298
|
+
* @hidden
|
|
284
299
|
*/
|
|
285
300
|
export function updateTooltipProp(element, prop) {
|
|
286
301
|
var control = getComponent(element, Tooltip);
|
|
@@ -33,7 +33,6 @@ export declare class RibbonButton {
|
|
|
33
33
|
*
|
|
34
34
|
* @param {RibbonItemModel} item - Gets the ribbon item model.
|
|
35
35
|
* @param {HTMLElement} itemEle - Gets the ribbon item element.
|
|
36
|
-
* @param {DropDownButton} overflowButton - Gets the overflow button.
|
|
37
36
|
* @returns {void}
|
|
38
37
|
* @hidden
|
|
39
38
|
*/
|
|
@@ -48,6 +48,7 @@ var RibbonButton = /** @class */ (function () {
|
|
|
48
48
|
btnSettings.clicked.call(_this, e);
|
|
49
49
|
}
|
|
50
50
|
};
|
|
51
|
+
buttonEle.setAttribute('aria-label', btnSettings.content);
|
|
51
52
|
};
|
|
52
53
|
/**
|
|
53
54
|
* Adds the additional event handlers as the item moved into overflow popup.
|
|
@@ -75,7 +76,6 @@ var RibbonButton = /** @class */ (function () {
|
|
|
75
76
|
*
|
|
76
77
|
* @param {RibbonItemModel} item - Gets the ribbon item model.
|
|
77
78
|
* @param {HTMLElement} itemEle - Gets the ribbon item element.
|
|
78
|
-
* @param {DropDownButton} overflowButton - Gets the overflow button.
|
|
79
79
|
* @returns {void}
|
|
80
80
|
* @hidden
|
|
81
81
|
*/
|
|
@@ -129,6 +129,7 @@ var RibbonButton = /** @class */ (function () {
|
|
|
129
129
|
}
|
|
130
130
|
if (prop.content) {
|
|
131
131
|
prop.content = itemProp.item.activeSize === RibbonItemSize.Small ? '' : prop.content;
|
|
132
|
+
buttonEle.setAttribute('aria-label', prop.content);
|
|
132
133
|
}
|
|
133
134
|
delete prop.clicked;
|
|
134
135
|
buttonObj.setProperties(prop);
|
|
@@ -33,7 +33,6 @@ export declare class RibbonCheckBox {
|
|
|
33
33
|
*
|
|
34
34
|
* @param {RibbonItemModel} item - Gets the ribbon item model.
|
|
35
35
|
* @param {HTMLElement} itemEle - Gets the ribbon item element.
|
|
36
|
-
* @param {DropDownButton} overflowButton - Gets the overflow button.
|
|
37
36
|
* @returns {void}
|
|
38
37
|
* @hidden
|
|
39
38
|
*/
|
|
@@ -73,7 +73,6 @@ var RibbonCheckBox = /** @class */ (function () {
|
|
|
73
73
|
*
|
|
74
74
|
* @param {RibbonItemModel} item - Gets the ribbon item model.
|
|
75
75
|
* @param {HTMLElement} itemEle - Gets the ribbon item element.
|
|
76
|
-
* @param {DropDownButton} overflowButton - Gets the overflow button.
|
|
77
76
|
* @returns {void}
|
|
78
77
|
* @hidden
|
|
79
78
|
*/
|
|
@@ -33,7 +33,6 @@ export declare class RibbonColorPicker {
|
|
|
33
33
|
*
|
|
34
34
|
* @param {RibbonItemModel} item - Gets the ribbon item model.
|
|
35
35
|
* @param {HTMLElement} itemEle - Gets the ribbon item element.
|
|
36
|
-
* @param {DropDownButton} overflowButton - Gets the overflow button.
|
|
37
36
|
* @returns {void}
|
|
38
37
|
* @hidden
|
|
39
38
|
*/
|
|
@@ -90,7 +90,6 @@ var RibbonColorPicker = /** @class */ (function () {
|
|
|
90
90
|
*
|
|
91
91
|
* @param {RibbonItemModel} item - Gets the ribbon item model.
|
|
92
92
|
* @param {HTMLElement} itemEle - Gets the ribbon item element.
|
|
93
|
-
* @param {DropDownButton} overflowButton - Gets the overflow button.
|
|
94
93
|
* @returns {void}
|
|
95
94
|
* @hidden
|
|
96
95
|
*/
|
|
@@ -35,7 +35,6 @@ export declare class RibbonComboBox {
|
|
|
35
35
|
*
|
|
36
36
|
* @param {RibbonItemModel} item - Gets the ribbon item model.
|
|
37
37
|
* @param {HTMLElement} itemEle - Gets the ribbon item element.
|
|
38
|
-
* @param {DropDownButton} overflowButton - Gets the overflow button.
|
|
39
38
|
* @returns {void}
|
|
40
39
|
* @hidden
|
|
41
40
|
*/
|
|
@@ -97,7 +97,6 @@ var RibbonComboBox = /** @class */ (function () {
|
|
|
97
97
|
*
|
|
98
98
|
* @param {RibbonItemModel} item - Gets the ribbon item model.
|
|
99
99
|
* @param {HTMLElement} itemEle - Gets the ribbon item element.
|
|
100
|
-
* @param {DropDownButton} overflowButton - Gets the overflow button.
|
|
101
100
|
* @returns {void}
|
|
102
101
|
* @hidden
|
|
103
102
|
*/
|
|
@@ -33,7 +33,6 @@ export declare class RibbonDropDown {
|
|
|
33
33
|
*
|
|
34
34
|
* @param {RibbonItemModel} item - Gets the ribbon item model.
|
|
35
35
|
* @param {HTMLElement} itemEle - Gets the ribbon item element.
|
|
36
|
-
* @param {DropDownButton} overflowButton - Gets the overflow button.
|
|
37
36
|
* @returns {void}
|
|
38
37
|
* @hidden
|
|
39
38
|
*/
|
|
@@ -85,7 +85,6 @@ var RibbonDropDown = /** @class */ (function () {
|
|
|
85
85
|
*
|
|
86
86
|
* @param {RibbonItemModel} item - Gets the ribbon item model.
|
|
87
87
|
* @param {HTMLElement} itemEle - Gets the ribbon item element.
|
|
88
|
-
* @param {DropDownButton} overflowButton - Gets the overflow button.
|
|
89
88
|
* @returns {void}
|
|
90
89
|
* @hidden
|
|
91
90
|
*/
|
|
@@ -33,7 +33,6 @@ export declare class RibbonSplitButton {
|
|
|
33
33
|
*
|
|
34
34
|
* @param {RibbonItemModel} item - Gets the ribbon item model.
|
|
35
35
|
* @param {HTMLElement} itemEle - Gets the ribbon item element.
|
|
36
|
-
* @param {DropDownButton} overflowButton - Gets the overflow button.
|
|
37
36
|
* @returns {void}
|
|
38
37
|
* @hidden
|
|
39
38
|
*/
|
|
@@ -105,7 +105,6 @@ var RibbonSplitButton = /** @class */ (function () {
|
|
|
105
105
|
*
|
|
106
106
|
* @param {RibbonItemModel} item - Gets the ribbon item model.
|
|
107
107
|
* @param {HTMLElement} itemEle - Gets the ribbon item element.
|
|
108
|
-
* @param {DropDownButton} overflowButton - Gets the overflow button.
|
|
109
108
|
* @returns {void}
|
|
110
109
|
* @hidden
|
|
111
110
|
*/
|
|
@@ -32,7 +32,7 @@ var RibbonFileMenu = /** @class */ (function () {
|
|
|
32
32
|
return;
|
|
33
33
|
}
|
|
34
34
|
this.ddbElement = this.parent.createElement('button', {
|
|
35
|
-
id: this.parent.element.id + constants.RIBBON_FILE_MENU_ID
|
|
35
|
+
id: this.parent.element.id + constants.RIBBON_FILE_MENU_ID
|
|
36
36
|
});
|
|
37
37
|
var tabEle = this.parent.tabObj.element;
|
|
38
38
|
var toolbarEle = tabEle.querySelector('.e-toolbar');
|
|
@@ -124,7 +124,7 @@ var RibbonFileMenu = /** @class */ (function () {
|
|
|
124
124
|
select: this.menuSelect.bind(this)
|
|
125
125
|
}, ulElem);
|
|
126
126
|
EventHandler.add(ulElem, 'keydown', function (e) {
|
|
127
|
-
if (e.key ===
|
|
127
|
+
if (e.key === 'Tab') {
|
|
128
128
|
_this.fileMenuDDB.toggle();
|
|
129
129
|
}
|
|
130
130
|
}, this);
|
|
@@ -133,8 +133,10 @@ var RibbonFileMenu = /** @class */ (function () {
|
|
|
133
133
|
var event = isOpen ? this.parent.fileMenu.beforeOpen :
|
|
134
134
|
this.parent.fileMenu.beforeClose;
|
|
135
135
|
if (event) {
|
|
136
|
-
var eventArgs = {
|
|
137
|
-
|
|
136
|
+
var eventArgs = {
|
|
137
|
+
cancel: args.cancel, element: args.element, event: args.event,
|
|
138
|
+
items: args.items, parentItem: args.parentItem
|
|
139
|
+
};
|
|
138
140
|
event.call(this, eventArgs);
|
|
139
141
|
args.cancel = eventArgs.cancel;
|
|
140
142
|
}
|
|
@@ -216,6 +216,9 @@
|
|
|
216
216
|
height: auto;
|
|
217
217
|
min-height: auto;
|
|
218
218
|
}
|
|
219
|
+
.e-ribbon.e-rbn .e-ribbon-tab .e-hscroll.e-scroll-device .e-scroll-nav.e-scroll-right-nav {
|
|
220
|
+
box-shadow: none;
|
|
221
|
+
}
|
|
219
222
|
.e-ribbon.e-rbn .e-ribbon-tab .e-hscroll {
|
|
220
223
|
padding: 0;
|
|
221
224
|
}
|
|
@@ -225,6 +228,7 @@
|
|
|
225
228
|
min-width: auto;
|
|
226
229
|
width: auto;
|
|
227
230
|
border-style: solid;
|
|
231
|
+
transform: none;
|
|
228
232
|
border-width: 1px;
|
|
229
233
|
border-radius: 2px;
|
|
230
234
|
z-index: 3;
|
|
@@ -235,6 +239,7 @@
|
|
|
235
239
|
.e-ribbon.e-rbn .e-ribbon-tab .e-hscroll .e-scroll-nav .e-nav-arrow {
|
|
236
240
|
font-size: 16px;
|
|
237
241
|
height: auto;
|
|
242
|
+
transform: none;
|
|
238
243
|
line-height: 16px;
|
|
239
244
|
padding: 0 4px;
|
|
240
245
|
width: auto;
|
|
@@ -352,6 +357,9 @@
|
|
|
352
357
|
.e-ribbon.e-rbn:not(.e-rtl) .e-tab-header {
|
|
353
358
|
left: var(--fileMenuWidth);
|
|
354
359
|
}
|
|
360
|
+
.e-ribbon.e-rbn:not(.e-rtl) .e-ribbon-tab .e-hscroll.e-scroll-device {
|
|
361
|
+
padding-right: 30px;
|
|
362
|
+
}
|
|
355
363
|
.e-ribbon.e-rbn.e-rtl .e-ribbon-collapse-btn,
|
|
356
364
|
.e-ribbon.e-rbn.e-rtl .e-ribbon-help-template,
|
|
357
365
|
.e-ribbon.e-rbn.e-rtl .e-ribbon-group::after {
|
|
@@ -363,6 +371,9 @@
|
|
|
363
371
|
.e-ribbon.e-rbn.e-rtl .e-tab-header {
|
|
364
372
|
right: var(--fileMenuWidth);
|
|
365
373
|
}
|
|
374
|
+
.e-ribbon.e-rbn.e-rtl .e-ribbon-tab .e-hscroll.e-scroll-device {
|
|
375
|
+
padding-left: 30px;
|
|
376
|
+
}
|
|
366
377
|
|
|
367
378
|
.e-ribbon.e-rbn,
|
|
368
379
|
.e-ribbon-group-overflow-ddb {
|
package/styles/bootstrap.css
CHANGED
|
@@ -221,6 +221,9 @@
|
|
|
221
221
|
height: auto;
|
|
222
222
|
min-height: auto;
|
|
223
223
|
}
|
|
224
|
+
.e-ribbon.e-rbn .e-ribbon-tab .e-hscroll.e-scroll-device .e-scroll-nav.e-scroll-right-nav {
|
|
225
|
+
box-shadow: none;
|
|
226
|
+
}
|
|
224
227
|
.e-ribbon.e-rbn .e-ribbon-tab .e-hscroll {
|
|
225
228
|
padding: 0;
|
|
226
229
|
}
|
|
@@ -230,6 +233,7 @@
|
|
|
230
233
|
min-width: auto;
|
|
231
234
|
width: auto;
|
|
232
235
|
border-style: solid;
|
|
236
|
+
transform: none;
|
|
233
237
|
border-width: 1px;
|
|
234
238
|
border-radius: 2px;
|
|
235
239
|
z-index: 3;
|
|
@@ -240,6 +244,7 @@
|
|
|
240
244
|
.e-ribbon.e-rbn .e-ribbon-tab .e-hscroll .e-scroll-nav .e-nav-arrow {
|
|
241
245
|
font-size: 16px;
|
|
242
246
|
height: auto;
|
|
247
|
+
transform: none;
|
|
243
248
|
line-height: 16px;
|
|
244
249
|
padding: 0 4px;
|
|
245
250
|
width: auto;
|
|
@@ -357,6 +362,9 @@
|
|
|
357
362
|
.e-ribbon.e-rbn:not(.e-rtl) .e-tab-header {
|
|
358
363
|
left: var(--fileMenuWidth);
|
|
359
364
|
}
|
|
365
|
+
.e-ribbon.e-rbn:not(.e-rtl) .e-ribbon-tab .e-hscroll.e-scroll-device {
|
|
366
|
+
padding-right: 30px;
|
|
367
|
+
}
|
|
360
368
|
.e-ribbon.e-rbn.e-rtl .e-ribbon-collapse-btn,
|
|
361
369
|
.e-ribbon.e-rbn.e-rtl .e-ribbon-help-template,
|
|
362
370
|
.e-ribbon.e-rbn.e-rtl .e-ribbon-group::after {
|
|
@@ -368,6 +376,9 @@
|
|
|
368
376
|
.e-ribbon.e-rbn.e-rtl .e-tab-header {
|
|
369
377
|
right: var(--fileMenuWidth);
|
|
370
378
|
}
|
|
379
|
+
.e-ribbon.e-rbn.e-rtl .e-ribbon-tab .e-hscroll.e-scroll-device {
|
|
380
|
+
padding-left: 30px;
|
|
381
|
+
}
|
|
371
382
|
|
|
372
383
|
.e-ribbon.e-rbn,
|
|
373
384
|
.e-ribbon-group-overflow-ddb {
|