@syncfusion/ej2-ribbon 21.1.35 → 21.2.3

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.
Files changed (62) hide show
  1. package/CHANGELOG.md +3 -1
  2. package/README.md +61 -1
  3. package/dist/ej2-ribbon.umd.min.js +2 -2
  4. package/dist/ej2-ribbon.umd.min.js.map +1 -1
  5. package/dist/es6/ej2-ribbon.es2015.js +137 -36
  6. package/dist/es6/ej2-ribbon.es2015.js.map +1 -1
  7. package/dist/es6/ej2-ribbon.es5.js +139 -36
  8. package/dist/es6/ej2-ribbon.es5.js.map +1 -1
  9. package/dist/global/ej2-ribbon.min.js +2 -2
  10. package/dist/global/ej2-ribbon.min.js.map +1 -1
  11. package/dist/global/index.d.ts +1 -1
  12. package/package.json +13 -16
  13. package/src/ribbon/base/constant.d.ts +2 -0
  14. package/src/ribbon/base/constant.js +2 -0
  15. package/src/ribbon/base/ribbon-model.d.ts +1 -1
  16. package/src/ribbon/base/ribbon.js +26 -16
  17. package/src/ribbon/base/utils.d.ts +15 -1
  18. package/src/ribbon/base/utils.js +16 -1
  19. package/src/ribbon/items/ribbon-button.d.ts +0 -1
  20. package/src/ribbon/items/ribbon-button.js +2 -1
  21. package/src/ribbon/items/ribbon-checkbox.d.ts +0 -1
  22. package/src/ribbon/items/ribbon-checkbox.js +0 -1
  23. package/src/ribbon/items/ribbon-colorpicker.d.ts +7 -1
  24. package/src/ribbon/items/ribbon-colorpicker.js +40 -4
  25. package/src/ribbon/items/ribbon-combobox.d.ts +0 -1
  26. package/src/ribbon/items/ribbon-combobox.js +4 -2
  27. package/src/ribbon/items/ribbon-dropdown.d.ts +0 -1
  28. package/src/ribbon/items/ribbon-dropdown.js +21 -3
  29. package/src/ribbon/items/ribbon-splitbutton.d.ts +0 -1
  30. package/src/ribbon/items/ribbon-splitbutton.js +21 -3
  31. package/src/ribbon/modules/ribbon-filemenu.js +6 -4
  32. package/styles/bootstrap-dark.css +47 -12
  33. package/styles/bootstrap.css +47 -12
  34. package/styles/bootstrap4.css +47 -12
  35. package/styles/bootstrap5-dark.css +47 -12
  36. package/styles/bootstrap5.css +47 -12
  37. package/styles/fabric-dark.css +47 -12
  38. package/styles/fabric.css +47 -12
  39. package/styles/fluent-dark.css +47 -12
  40. package/styles/fluent.css +47 -12
  41. package/styles/highcontrast-light.css +47 -12
  42. package/styles/highcontrast.css +47 -12
  43. package/styles/material-dark.css +47 -12
  44. package/styles/material.css +47 -12
  45. package/styles/ribbon/_layout.scss +77 -18
  46. package/styles/ribbon/bootstrap-dark.css +47 -12
  47. package/styles/ribbon/bootstrap.css +47 -12
  48. package/styles/ribbon/bootstrap4.css +47 -12
  49. package/styles/ribbon/bootstrap5-dark.css +47 -12
  50. package/styles/ribbon/bootstrap5.css +47 -12
  51. package/styles/ribbon/fabric-dark.css +47 -12
  52. package/styles/ribbon/fabric.css +47 -12
  53. package/styles/ribbon/fluent-dark.css +47 -12
  54. package/styles/ribbon/fluent.css +47 -12
  55. package/styles/ribbon/highcontrast-light.css +47 -12
  56. package/styles/ribbon/highcontrast.css +47 -12
  57. package/styles/ribbon/material-dark.css +47 -12
  58. package/styles/ribbon/material.css +47 -12
  59. package/styles/ribbon/tailwind-dark.css +47 -12
  60. package/styles/ribbon/tailwind.css +47 -12
  61. package/styles/tailwind-dark.css +47 -12
  62. package/styles/tailwind.css +47 -12
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * filename: index.d.ts
3
- * version : 21.1.35
3
+ * version : 21.2.3
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@0.25.0",
3
+ "_id": "@syncfusion/ej2-ribbon@21.1.37",
4
4
  "_inBundle": false,
5
- "_integrity": "sha512-Jvszp1M5UlmZ6eU3vdHZNnbMV6Cz58hLLsV9H3bOo/x6ZDnMXwStNO3uoiYpxPdSHBsUYJmTkmbx11w7PwhzWw==",
5
+ "_integrity": "sha512-gWwlbD+kTmoNDnyq+liFGtG0dXmxD7B5M/OMAWv8wXSJZWlzmdrVUIa8fSL80eQSFzyzU/fU8z0pjyXVu8VSXA==",
6
6
  "_location": "/@syncfusion/ej2-ribbon",
7
7
  "_phantomChildren": {},
8
8
  "_requested": {
@@ -18,13 +18,10 @@
18
18
  },
19
19
  "_requiredBy": [
20
20
  "/",
21
- "/@syncfusion/ej2",
22
- "/@syncfusion/ej2-angular-ribbon",
23
- "/@syncfusion/ej2-react-ribbon",
24
- "/@syncfusion/ej2-vue-ribbon"
21
+ "/@syncfusion/ej2"
25
22
  ],
26
- "_resolved": "https://nexus.syncfusion.com/repository/ej2-release/@syncfusion/ej2-ribbon/-/ej2-ribbon-0.25.0.tgz",
27
- "_shasum": "6cc9e0a4bb1042e4132ea627aa8e38ba6db0f5ce",
23
+ "_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-ribbon/-/ej2-ribbon-21.1.37.tgz",
24
+ "_shasum": "724d27c29aa2886be6969a2149fc3c97645677e2",
28
25
  "_spec": "@syncfusion/ej2-ribbon@*",
29
26
  "_where": "/jenkins/workspace/elease-automation_release_21.1.1/packages/included",
30
27
  "author": {
@@ -35,13 +32,13 @@
35
32
  },
36
33
  "bundleDependencies": false,
37
34
  "dependencies": {
38
- "@syncfusion/ej2-base": "~21.1.35",
39
- "@syncfusion/ej2-buttons": "~21.1.35",
40
- "@syncfusion/ej2-dropdowns": "~21.1.35",
41
- "@syncfusion/ej2-lists": "~21.1.35",
42
- "@syncfusion/ej2-navigations": "~21.1.35",
43
- "@syncfusion/ej2-popups": "~21.1.35",
44
- "@syncfusion/ej2-splitbuttons": "~21.1.35"
35
+ "@syncfusion/ej2-base": "~21.2.3",
36
+ "@syncfusion/ej2-buttons": "~21.2.3",
37
+ "@syncfusion/ej2-dropdowns": "~21.2.3",
38
+ "@syncfusion/ej2-lists": "~21.2.3",
39
+ "@syncfusion/ej2-navigations": "~21.2.3",
40
+ "@syncfusion/ej2-popups": "~21.2.3",
41
+ "@syncfusion/ej2-splitbuttons": "~21.2.3"
45
42
  },
46
43
  "deprecated": false,
47
44
  "description": "Essential JS 2 Component",
@@ -62,6 +59,6 @@
62
59
  "url": "git+https://github.com/syncfusion/ej2-ribbon-component.git"
63
60
  },
64
61
  "typings": "index.d.ts",
65
- "version": "21.1.35",
62
+ "version": "21.2.3",
66
63
  "sideEffects": false
67
64
  }
@@ -96,6 +96,8 @@ export declare const DROPDOWNBUTTON: string;
96
96
  /** @hidden */
97
97
  export declare const DROPDOWNBUTTON_HIDE: string;
98
98
  /** @hidden */
99
+ export declare const RIBBON_TEMPLATE: string;
100
+ /** @hidden */
99
101
  export declare const RIBBON_HELP_TEMPLATE: string;
100
102
  /** @hidden */
101
103
  export declare const RIBBON_TOOLTIP: string;
@@ -96,6 +96,8 @@ export var DROPDOWNBUTTON = 'e-dropdown-btn';
96
96
  /** @hidden */
97
97
  export var DROPDOWNBUTTON_HIDE = 'e-caret-hide';
98
98
  /** @hidden */
99
+ export var RIBBON_TEMPLATE = 'e-ribbon-template';
100
+ /** @hidden */
99
101
  export var RIBBON_HELP_TEMPLATE = 'e-ribbon-help-template';
100
102
  /** @hidden */
101
103
  export var RIBBON_TOOLTIP = 'e-ribbon-tooltip';
@@ -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, EJ2Control, 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';
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
  /**
@@ -177,7 +177,7 @@ var Ribbon = /** @class */ (function (_super) {
177
177
  selectedIndex = selectedIndex === -1 ? this.selectedTab : selectedIndex;
178
178
  var eventArgs = { previousIndex: this.selectedTab, selectedIndex: selectedIndex };
179
179
  this.setProperties({ selectedTab: selectedIndex }, true);
180
- this.checkOverflow(selectedIndex, e.selectedContent);
180
+ this.checkOverflow(selectedIndex, e.selectedContent.firstChild);
181
181
  if (this.activeLayout === 'Simplified' && this.overflowDDB) {
182
182
  var overflowTarget = this.overflowDDB.target;
183
183
  var ofTabContainer = overflowTarget.querySelector('.' + constants.RIBBON_TAB_ACTIVE);
@@ -196,9 +196,6 @@ var Ribbon = /** @class */ (function (_super) {
196
196
  this.trigger('tabSelected', eventArgs);
197
197
  };
198
198
  Ribbon.prototype.checkOverflow = function (tabIndex, activeContent) {
199
- if (!activeContent) {
200
- activeContent = this.tabObj.element.querySelector('#' + this.tabs[parseInt(tabIndex.toString(), 10)].id + constants.CONTENT_ID);
201
- }
202
199
  var tabContent = activeContent.closest('.' + constants.TAB_CONTENT);
203
200
  var isOverFlow = tabContent.offsetWidth < activeContent.offsetWidth;
204
201
  if (isOverFlow && !this.scrollModule) {
@@ -221,7 +218,9 @@ var Ribbon = /** @class */ (function (_super) {
221
218
  }
222
219
  //Adds Scroll if the tabwidth is less the content width even after adding overflow dropdown.
223
220
  if ((tabContent.offsetWidth < activeContent.offsetWidth) && (!this.scrollModule)) {
224
- this.scrollModule = new HScroll({}, this.tabObj.element.querySelector('.' + constants.TAB_CONTENT));
221
+ this.scrollModule = new HScroll({
222
+ enableRtl: this.enableRtl
223
+ }, this.tabObj.element.querySelector('.' + constants.TAB_CONTENT));
225
224
  }
226
225
  }
227
226
  else if (!isOverFlow) {
@@ -302,8 +301,8 @@ var Ribbon = /** @class */ (function (_super) {
302
301
  var group = orderedGroups[parseInt(i.toString(), 10)];
303
302
  var groupEle = tabContent.querySelector('#' + group.id);
304
303
  var groupContainer = groupEle.querySelector('#' + group.id + constants.CONTAINER_ID);
305
- for (var j = 0; ((j < group.collections.length) && (tabContent.offsetWidth < activeContent.offsetWidth)); j++) {
306
- var collection = group.collections[parseInt(j.toString(), 10)];
304
+ for (var j = group.collections.length; ((j >= 1) && (tabContent.offsetWidth < activeContent.offsetWidth)); j--) {
305
+ var collection = group.collections[parseInt((j - 1).toString(), 10)];
307
306
  var collectionEle = groupEle.querySelector('#' + collection.id);
308
307
  for (var k = collection.items.length; ((k >= 1) && (tabContent.offsetWidth < activeContent.offsetWidth)); k--) {
309
308
  var item = collection.items[k - 1];
@@ -370,8 +369,8 @@ var Ribbon = /** @class */ (function (_super) {
370
369
  overflowDDB = this.overflowDDB;
371
370
  overflowtarget = this.overflowDDB ? this.overflowDDB.target : null;
372
371
  }
373
- for (var j = (group.collections.length); ((j >= 1) && flag); j--) {
374
- var collection = group.collections[parseInt((j - 1).toString(), 10)];
372
+ for (var j = 0; ((j < group.collections.length) && flag); j++) {
373
+ var collection = group.collections[parseInt(j.toString(), 10)];
375
374
  // eslint-disable-next-line max-len
376
375
  for (var k = 0; ((k < collection.items.length) && flag && !isClear && (tabContent.offsetWidth > activeContent.offsetWidth)); k++) {
377
376
  var item = collection.items[parseInt(k.toString(), 10)];
@@ -1195,11 +1194,11 @@ var Ribbon = /** @class */ (function (_super) {
1195
1194
  this.collapseButton = this.createElement('span', {
1196
1195
  className: constants.RIBBON_COLLAPSE_BUTTON + constants.SPACE + constants.EXPAND_COLLAPSE_ICON,
1197
1196
  id: this.tabObj.element.id + constants.COLLAPSE_BUTTON_ID,
1198
- attrs: { 'tabindex': '0', 'type': 'button', 'aria-label': 'Layout Switcher' }
1197
+ attrs: { 'tabindex': '0', 'type': 'button', 'aria-label': 'Layout Switcher', 'role': 'button' }
1199
1198
  });
1200
1199
  this.collapseButton.onclick = function () { _this.toggleLayout(); };
1201
1200
  this.collapseButton.onkeydown = function (e) {
1202
- if (e.key === "Enter") {
1201
+ if (e.key === 'Enter') {
1203
1202
  _this.toggleLayout();
1204
1203
  }
1205
1204
  };
@@ -1445,13 +1444,13 @@ var Ribbon = /** @class */ (function (_super) {
1445
1444
  var launcherIcon = this_3.createElement('div', {
1446
1445
  className: constants.RIBBON_LAUNCHER_ICON_ELE + ' ' + (this_3.launcherIconCss ? this_3.launcherIconCss : constants.RIBBON_LAUNCHER_ICON),
1447
1446
  id: group.id + constants.LAUNCHER_ID,
1448
- attrs: { 'tabindex': '0', 'type': 'button', 'aria-label': 'Launcher Icon' }
1447
+ attrs: { 'tabindex': '0', 'type': 'button', 'aria-label': 'Launcher Icon', 'role': 'button' }
1449
1448
  });
1450
1449
  groupContainer.appendChild(launcherIcon);
1451
1450
  groupContainer.classList.add(constants.RIBBON_LAUNCHER);
1452
1451
  EventHandler.add(launcherIcon, 'click', this_3.launcherIconClicked.bind(this_3, group.id), this_3);
1453
1452
  EventHandler.add(launcherIcon, 'keydown', function (e) {
1454
- if (e.key === "Enter") {
1453
+ if (e.key === 'Enter') {
1455
1454
  _this.launcherIconClicked(group.id);
1456
1455
  }
1457
1456
  }, this_3);
@@ -1479,7 +1478,9 @@ var Ribbon = /** @class */ (function (_super) {
1479
1478
  for (var j = 0; j < items.length; j++) {
1480
1479
  var ribbonitem = items[parseInt(j.toString(), 10)];
1481
1480
  if (!ribbonitem.allowedSizes || (ribbonitem.allowedSizes === 0)) {
1482
- ribbonitem.setProperties({ allowedSizes: (RibbonItemSize.Small | RibbonItemSize.Medium | RibbonItemSize.Large) }, true);
1481
+ ribbonitem.setProperties({
1482
+ allowedSizes: (RibbonItemSize.Small | RibbonItemSize.Medium | RibbonItemSize.Large)
1483
+ }, true);
1483
1484
  }
1484
1485
  if ((ribbonitem.type === 'ColorPicker') && (ribbonitem.allowedSizes !== RibbonItemSize.Small)) {
1485
1486
  ribbonitem.setProperties({ allowedSizes: RibbonItemSize.Small }, true);
@@ -1623,10 +1624,11 @@ var Ribbon = /** @class */ (function (_super) {
1623
1624
  };
1624
1625
  Ribbon.prototype.createTemplateContent = function (item, itemElement) {
1625
1626
  var itemEle = this.createElement('div', {
1626
- className: item.disabled ? constants.DISABLED_CSS + constants.SPACE + item.cssClass : item.cssClass,
1627
+ className: item.cssClass ? (constants.RIBBON_TEMPLATE + constants.SPACE + item.cssClass) : constants.RIBBON_TEMPLATE,
1627
1628
  id: item.id
1628
1629
  });
1629
1630
  if (item.disabled) {
1631
+ itemEle.classList.add(constants.DISABLED_CSS);
1630
1632
  itemEle.setAttribute('disabled', '');
1631
1633
  }
1632
1634
  itemElement.appendChild(itemEle);
@@ -1788,7 +1790,10 @@ var Ribbon = /** @class */ (function (_super) {
1788
1790
  };
1789
1791
  Ribbon.prototype.destroyFunction = function (item, ele) {
1790
1792
  var moduleName = this.getItemModuleName(item);
1791
- if (moduleName !== 'template') {
1793
+ if (moduleName === 'colorpicker') {
1794
+ this.ribbonColorPickerModule.unwireColorPickerEvents(ele);
1795
+ }
1796
+ else if (moduleName !== 'template') {
1792
1797
  destroyControl(ele, moduleName);
1793
1798
  }
1794
1799
  if (item.ribbonTooltipSettings) {
@@ -2293,6 +2298,7 @@ var Ribbon = /** @class */ (function (_super) {
2293
2298
  break;
2294
2299
  case 'isMinimized':
2295
2300
  this.element.classList.toggle(constants.RIBBON_MINIMIZE, this.isMinimized);
2301
+ this.tabObj.element.querySelector('.e-content').style.display = this.isMinimized ? 'none' : 'block';
2296
2302
  break;
2297
2303
  case 'locale':
2298
2304
  this.updateCommonProperty({ locale: this.locale });
@@ -2303,6 +2309,9 @@ var Ribbon = /** @class */ (function (_super) {
2303
2309
  case 'enableRtl':
2304
2310
  this.element.classList.toggle(constants.RTL_CSS, this.enableRtl);
2305
2311
  this.updateCommonProperty({ enableRtl: newProp.enableRtl });
2312
+ if (this.scrollModule) {
2313
+ this.scrollModule.setProperties({ enableRtl: newProp.enableRtl });
2314
+ }
2306
2315
  break;
2307
2316
  case 'launcherIconCss':
2308
2317
  for (var i = 0; i < this.tabs.length; i++) {
@@ -2339,6 +2348,7 @@ var Ribbon = /** @class */ (function (_super) {
2339
2348
  break;
2340
2349
  case 'width':
2341
2350
  this.element.style.width = formatUnit(newProp.width);
2351
+ this.refreshLayout();
2342
2352
  break;
2343
2353
  case 'fileMenu':
2344
2354
  if (this.ribbonFileMenuModule) {
@@ -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;
@@ -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
  */
@@ -18,6 +18,7 @@ export declare class RibbonColorPicker {
18
18
  * @hidden
19
19
  */
20
20
  createColorPicker(item: RibbonItemModel, itemEle: HTMLElement): void;
21
+ private toggleWrapperHover;
21
22
  /**
22
23
  * Adds the additional event handlers as the item moved into overflow popup.
23
24
  *
@@ -33,7 +34,6 @@ export declare class RibbonColorPicker {
33
34
  *
34
35
  * @param {RibbonItemModel} item - Gets the ribbon item model.
35
36
  * @param {HTMLElement} itemEle - Gets the ribbon item element.
36
- * @param {DropDownButton} overflowButton - Gets the overflow button.
37
37
  * @returns {void}
38
38
  * @hidden
39
39
  */
@@ -63,4 +63,10 @@ export declare class RibbonColorPicker {
63
63
  * @returns {void}
64
64
  */
65
65
  updateColorPicker(prop: RibbonColorPickerSettingsModel, id: string): void;
66
+ /**
67
+ * @param {HTMLElement} element - Gets the colorpicker element to be destroyed.
68
+ * @returns {void}
69
+ * @hidden
70
+ */
71
+ unwireColorPickerEvents(element: HTMLElement): void;
66
72
  }
@@ -63,8 +63,16 @@ var RibbonColorPicker = /** @class */ (function () {
63
63
  select: colorPickerSettings.select
64
64
  }, inputEle);
65
65
  var wrapper = colorPicker.element.parentElement;
66
- EventHandler.add(wrapper, 'mouseenter', function () { wrapper.classList.add(RIBBON_HOVER); }, this);
67
- EventHandler.add(wrapper, 'mouseleave', function () { wrapper.classList.remove(RIBBON_HOVER); }, this);
66
+ EventHandler.add(wrapper, 'mouseenter', this.toggleWrapperHover.bind(this, wrapper, true), this);
67
+ EventHandler.add(wrapper, 'mouseleave', this.toggleWrapperHover.bind(this, wrapper, false), this);
68
+ };
69
+ RibbonColorPicker.prototype.toggleWrapperHover = function (wrapper, isAdd) {
70
+ if (isAdd) {
71
+ wrapper.classList.add(RIBBON_HOVER);
72
+ }
73
+ else {
74
+ wrapper.classList.remove(RIBBON_HOVER);
75
+ }
68
76
  };
69
77
  /**
70
78
  * Adds the additional event handlers as the item moved into overflow popup.
@@ -76,13 +84,24 @@ var RibbonColorPicker = /** @class */ (function () {
76
84
  * @hidden
77
85
  */
78
86
  RibbonColorPicker.prototype.addOverFlowEvents = function (item, itemEle, overflowButton) {
87
+ var _this = this;
79
88
  var colorPickerEle = itemEle.querySelector('#' + item.id);
80
89
  var colorPickerObj = getComponent(colorPickerEle, ColorPicker);
81
90
  colorPickerObj.setProperties({ cssClass: colorPickerObj.cssClass + SPACE + RIBBON_POPUP_CONTROL });
82
91
  //Accessing the private property 'splitBtn' of ColorPicker component to get the colorpicker instance as there is no close event in colorpicker.
83
92
  var splitBtn = colorPickerObj['splitBtn'];
93
+ var target;
94
+ colorPickerObj.beforeClose = function (e) {
95
+ target = e.event ? e.event.target : null;
96
+ colorPickerObj.element.parentElement.classList.remove(RIBBON_POPUP_OPEN);
97
+ if (item.colorPickerSettings.beforeClose) {
98
+ item.colorPickerSettings.beforeClose.call(_this);
99
+ }
100
+ };
84
101
  splitBtn.close = function () {
85
- overflowButton.toggle();
102
+ if (target && !target.closest('.e-ribbon-group-overflow-ddb')) {
103
+ overflowButton.toggle();
104
+ }
86
105
  };
87
106
  };
88
107
  /**
@@ -90,11 +109,11 @@ var RibbonColorPicker = /** @class */ (function () {
90
109
  *
91
110
  * @param {RibbonItemModel} item - Gets the ribbon item model.
92
111
  * @param {HTMLElement} itemEle - Gets the ribbon item element.
93
- * @param {DropDownButton} overflowButton - Gets the overflow button.
94
112
  * @returns {void}
95
113
  * @hidden
96
114
  */
97
115
  RibbonColorPicker.prototype.removeOverFlowEvents = function (item, itemEle) {
116
+ var _this = this;
98
117
  var colorPickerEle = itemEle.querySelector('#' + item.id);
99
118
  var colorPickerObj = getComponent(colorPickerEle, ColorPicker);
100
119
  var cssClass = colorPickerObj.cssClass.split(SPACE);
@@ -103,6 +122,12 @@ var RibbonColorPicker = /** @class */ (function () {
103
122
  var splitBtn = colorPickerObj['splitBtn'];
104
123
  //Accessing the private property 'splitBtn' of ColorPicker component to get the colorpicker instance as there is no close event in colorpicker.
105
124
  splitBtn.close = null;
125
+ colorPickerObj.beforeClose = function (e) {
126
+ colorPickerObj.element.parentElement.classList.remove(RIBBON_POPUP_OPEN);
127
+ if (item.colorPickerSettings.beforeClose) {
128
+ item.colorPickerSettings.beforeClose.call(_this);
129
+ }
130
+ };
106
131
  };
107
132
  RibbonColorPicker.prototype.getColorPickerObj = function (controlId) {
108
133
  var inputEle = getItemElement(this.parent, controlId);
@@ -158,6 +183,17 @@ var RibbonColorPicker = /** @class */ (function () {
158
183
  var colorPickerObj = getComponent(inputEle, ColorPicker);
159
184
  colorPickerObj.setProperties(prop);
160
185
  };
186
+ /**
187
+ * @param {HTMLElement} element - Gets the colorpicker element to be destroyed.
188
+ * @returns {void}
189
+ * @hidden
190
+ */
191
+ RibbonColorPicker.prototype.unwireColorPickerEvents = function (element) {
192
+ var colorPickerObj = getComponent(element, ColorPicker);
193
+ var wrapper = colorPickerObj.element.parentElement;
194
+ EventHandler.remove(wrapper, 'mouseenter', this.toggleWrapperHover);
195
+ EventHandler.remove(wrapper, 'mouseleave', this.toggleWrapperHover);
196
+ };
161
197
  return RibbonColorPicker;
162
198
  }());
163
199
  export { RibbonColorPicker };
@@ -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
  */