@syncfusion/ej2-ribbon 23.1.43 → 23.2.4
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 +12 -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 +160 -70
- package/dist/es6/ej2-ribbon.es2015.js.map +1 -1
- package/dist/es6/ej2-ribbon.es5.js +160 -70
- 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.d.ts +3 -0
- package/src/ribbon/base/ribbon.js +160 -70
package/dist/global/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* filename: index.d.ts
|
|
3
|
-
* version : 23.
|
|
3
|
+
* version : 23.2.4
|
|
4
4
|
* Copyright Syncfusion Inc. 2001 - 2023. 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@23.1.
|
|
3
|
+
"_id": "@syncfusion/ej2-ribbon@23.1.44",
|
|
4
4
|
"_inBundle": false,
|
|
5
|
-
"_integrity": "sha512-
|
|
5
|
+
"_integrity": "sha512-xT6KW19AWenecFnlvwMfgBJ0UPFa9L7EMy7QCj6X6AVb5+r01bwmcAZ+/2pgb8IEyfpRcfJvfy1jsWqk7pkgSQ==",
|
|
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-hotfix-new/@syncfusion/ej2-ribbon/-/ej2-ribbon-23.1.
|
|
27
|
-
"_shasum": "
|
|
26
|
+
"_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-ribbon/-/ej2-ribbon-23.1.44.tgz",
|
|
27
|
+
"_shasum": "77c3d9e46f87b29534cde8f8d6417a66289bc5a7",
|
|
28
28
|
"_spec": "@syncfusion/ej2-ribbon@*",
|
|
29
29
|
"_where": "/jenkins/workspace/elease-automation_release_23.1.1/packages/included",
|
|
30
30
|
"author": {
|
|
@@ -35,13 +35,13 @@
|
|
|
35
35
|
},
|
|
36
36
|
"bundleDependencies": false,
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@syncfusion/ej2-base": "~23.
|
|
39
|
-
"@syncfusion/ej2-buttons": "~23.
|
|
40
|
-
"@syncfusion/ej2-dropdowns": "~23.
|
|
41
|
-
"@syncfusion/ej2-lists": "~23.
|
|
42
|
-
"@syncfusion/ej2-navigations": "~23.
|
|
43
|
-
"@syncfusion/ej2-popups": "~23.
|
|
44
|
-
"@syncfusion/ej2-splitbuttons": "~23.
|
|
38
|
+
"@syncfusion/ej2-base": "~23.2.4",
|
|
39
|
+
"@syncfusion/ej2-buttons": "~23.2.4",
|
|
40
|
+
"@syncfusion/ej2-dropdowns": "~23.2.4",
|
|
41
|
+
"@syncfusion/ej2-lists": "~23.2.4",
|
|
42
|
+
"@syncfusion/ej2-navigations": "~23.2.4",
|
|
43
|
+
"@syncfusion/ej2-popups": "~23.2.4",
|
|
44
|
+
"@syncfusion/ej2-splitbuttons": "~23.2.4"
|
|
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": "23.
|
|
65
|
+
"version": "23.2.4",
|
|
66
66
|
"sideEffects": false
|
|
67
67
|
}
|
|
@@ -181,6 +181,7 @@ export declare class Ribbon extends Component<HTMLElement> implements INotifyPro
|
|
|
181
181
|
private currentControlIndex;
|
|
182
182
|
private keyboardModuleRibbon;
|
|
183
183
|
private keyConfigs;
|
|
184
|
+
private initialPropsData;
|
|
184
185
|
/** @hidden */
|
|
185
186
|
overflowDDB: DropDownButton;
|
|
186
187
|
/** @hidden */
|
|
@@ -277,6 +278,7 @@ export declare class Ribbon extends Component<HTMLElement> implements INotifyPro
|
|
|
277
278
|
private createLauncherIcon;
|
|
278
279
|
private launcherIconClicked;
|
|
279
280
|
private createGroups;
|
|
281
|
+
private updateGroupProps;
|
|
280
282
|
private validateItemSize;
|
|
281
283
|
private createCollection;
|
|
282
284
|
private createRibbonItem;
|
|
@@ -446,6 +448,7 @@ export declare class Ribbon extends Component<HTMLElement> implements INotifyPro
|
|
|
446
448
|
*/
|
|
447
449
|
showItem(itemId: string): void;
|
|
448
450
|
private showHideItem;
|
|
451
|
+
private updateInitialProps;
|
|
449
452
|
/**
|
|
450
453
|
* tab - Gets the ribbon tab to be updated. The id of the tab is a required property. Other properties are optional.
|
|
451
454
|
*
|
|
@@ -58,6 +58,7 @@ var Ribbon = /** @class */ (function (_super) {
|
|
|
58
58
|
Ribbon.prototype.preRender = function () {
|
|
59
59
|
this.idIndex = 0;
|
|
60
60
|
this.tooltipData = [];
|
|
61
|
+
this.initialPropsData = {};
|
|
61
62
|
this.isAddRemove = false;
|
|
62
63
|
this.keyConfigs = {
|
|
63
64
|
leftarrow: 'leftarrow',
|
|
@@ -573,21 +574,23 @@ var Ribbon = /** @class */ (function (_super) {
|
|
|
573
574
|
// The position is reversed if RTL is enabled.
|
|
574
575
|
// isRight = ((isGroupOF && isMenu) && !this.enableRtl ) || (!(isGroupOF && isMenu) && this.enableRtl) ==> (isGroupOF && isMenu) !== this.enableRtl
|
|
575
576
|
var isLeft = (isGroupOF && isMenu) === this.enableRtl;
|
|
576
|
-
dropDownPopup
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
577
|
+
if (dropDownPopup) {
|
|
578
|
+
dropDownPopup.setProperties({ position: { X: isLeft ? 'left' : 'right', Y: isMenu ? 'top' : 'bottom' } }, true);
|
|
579
|
+
if (isMenu) {
|
|
580
|
+
dropdown.beforeOpen = function () {
|
|
581
|
+
if (isLeft) {
|
|
582
|
+
dropDownPopup.element.style.setProperty('visibility', 'hidden');
|
|
583
|
+
dropDownPopup.element.style.setProperty('display', 'block');
|
|
584
|
+
dropDownPopup.setProperties({ offsetX: -1 * dropDownPopup.element.offsetWidth });
|
|
585
|
+
dropDownPopup.element.style.removeProperty('display');
|
|
586
|
+
dropDownPopup.element.style.removeProperty('visibility');
|
|
587
|
+
}
|
|
588
|
+
};
|
|
589
|
+
}
|
|
590
|
+
else {
|
|
591
|
+
dropDownPopup.setProperties({ offsetX: 0 }, true);
|
|
592
|
+
dropdown.beforeOpen = null;
|
|
593
|
+
}
|
|
591
594
|
}
|
|
592
595
|
};
|
|
593
596
|
Ribbon.prototype.removeSimplfiedOverflow = function (tabContent, activeContent, tabIndex, isClear) {
|
|
@@ -673,7 +676,7 @@ var Ribbon = /** @class */ (function (_super) {
|
|
|
673
676
|
Ribbon.prototype.createOverflowPopup = function (item, tabIndex, isGroupOF, groupId, groupHeader, itemEle, groupContainer, isResize) {
|
|
674
677
|
var overflowButton;
|
|
675
678
|
var contentEle = this.tabObj.items[parseInt(tabIndex.toString(), 10)].content;
|
|
676
|
-
var
|
|
679
|
+
var groupEle = contentEle.querySelector('#' + groupId);
|
|
677
680
|
if (isGroupOF) {
|
|
678
681
|
var overflowDDB = groupContainer.querySelector('#' + groupId + constants.GROUPOF_BUTTON_ID);
|
|
679
682
|
if (!overflowDDB) {
|
|
@@ -685,9 +688,12 @@ var Ribbon = /** @class */ (function (_super) {
|
|
|
685
688
|
overflowButton = getInstance(overflowDDB, DropDownButton);
|
|
686
689
|
}
|
|
687
690
|
var overflowBtnTarget = overflowButton.target;
|
|
688
|
-
if (
|
|
691
|
+
if (groupEle && groupEle.classList.contains('e-disabled')) {
|
|
689
692
|
overflowBtnTarget.classList.add('e-disabled');
|
|
690
693
|
}
|
|
694
|
+
if (groupEle && groupEle.classList.contains('e-hidden')) {
|
|
695
|
+
overflowBtnTarget.classList.add('e-hidden');
|
|
696
|
+
}
|
|
691
697
|
isResize ? overflowBtnTarget.insertBefore(itemEle, overflowBtnTarget.querySelector('.' + constants.RIBBON_ITEM))
|
|
692
698
|
: overflowBtnTarget.append(itemEle);
|
|
693
699
|
}
|
|
@@ -706,7 +712,7 @@ var Ribbon = /** @class */ (function (_super) {
|
|
|
706
712
|
var ofGroupContainer = overflowEle.querySelector('#' + groupId + constants.CONTAINER_ID);
|
|
707
713
|
if (!ofGroupContainer) {
|
|
708
714
|
ofGroupContainer = this.createGroupContainer(groupId, groupHeader);
|
|
709
|
-
if (
|
|
715
|
+
if (groupEle && groupEle.classList.contains('e-disabled')) {
|
|
710
716
|
ofGroupContainer.classList.add('e-disabled');
|
|
711
717
|
}
|
|
712
718
|
ofTabContainer.append(ofGroupContainer);
|
|
@@ -763,6 +769,15 @@ var Ribbon = /** @class */ (function (_super) {
|
|
|
763
769
|
if (tabIndex === this.selectedTab) {
|
|
764
770
|
ofTabContainer.classList.add(constants.RIBBON_TAB_ACTIVE);
|
|
765
771
|
}
|
|
772
|
+
var groupEle = document.querySelector('#' + groupId);
|
|
773
|
+
if (groupEle) {
|
|
774
|
+
if (groupEle.classList.contains('e-disabled')) {
|
|
775
|
+
ofGroupContainer.classList.add('e-disabled');
|
|
776
|
+
}
|
|
777
|
+
if (groupEle.classList.contains('e-hidden')) {
|
|
778
|
+
ofGroupContainer.classList.add('e-hidden');
|
|
779
|
+
}
|
|
780
|
+
}
|
|
766
781
|
};
|
|
767
782
|
Ribbon.prototype.checkGroupShrinking = function (tabIndex, tabContent, activeContent, isLarge) {
|
|
768
783
|
var isOverFlow = true;
|
|
@@ -1359,30 +1374,32 @@ var Ribbon = /** @class */ (function (_super) {
|
|
|
1359
1374
|
(isRemoveOverflow ? (itemContainer.classList.add(constants.RIBBON_CONTENT_HEIGHT)) : (itemContainer.classList.remove(constants.RIBBON_CONTENT_HEIGHT)));
|
|
1360
1375
|
};
|
|
1361
1376
|
Ribbon.prototype.setItemSize = function (itemEle, item) {
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1377
|
+
if (itemEle) {
|
|
1378
|
+
var itemContainer = itemEle.closest('.' + constants.RIBBON_ITEM);
|
|
1379
|
+
if (item.type === RibbonItemType.Button) {
|
|
1380
|
+
this.ribbonButtonModule.updateButtonSize(itemEle, item);
|
|
1381
|
+
}
|
|
1382
|
+
else if (item.type === RibbonItemType.DropDown) {
|
|
1383
|
+
this.ribbonDropDownModule.updateDropDownSize(itemEle, item);
|
|
1384
|
+
}
|
|
1385
|
+
else if (item.type === RibbonItemType.SplitButton) {
|
|
1386
|
+
this.ribbonSplitButtonModule.updateSplitButtonSize(itemEle, item);
|
|
1387
|
+
}
|
|
1388
|
+
else if (item.type === RibbonItemType.Template) {
|
|
1389
|
+
remove(itemEle);
|
|
1390
|
+
this.createTemplateContent(item, itemContainer);
|
|
1391
|
+
}
|
|
1392
|
+
else if (item.type === RibbonItemType.GroupButton) {
|
|
1393
|
+
this.ribbonGroupButtonModule.updateGroupButtonSize(itemEle, item);
|
|
1394
|
+
}
|
|
1395
|
+
itemContainer.classList.remove(constants.RIBBON_CONTENT_HEIGHT, constants.RIBBON_LARGE_ITEM, constants.RIBBON_MEDIUM_ITEM, constants.RIBBON_SMALL_ITEM);
|
|
1396
|
+
if (item.activeSize === RibbonItemSize.Large) {
|
|
1397
|
+
itemContainer.classList.add(constants.RIBBON_LARGE_ITEM, constants.RIBBON_CONTENT_HEIGHT);
|
|
1398
|
+
}
|
|
1399
|
+
else {
|
|
1400
|
+
itemContainer.classList.add((item.activeSize === RibbonItemSize.Medium) ?
|
|
1401
|
+
constants.RIBBON_MEDIUM_ITEM : constants.RIBBON_SMALL_ITEM);
|
|
1402
|
+
}
|
|
1386
1403
|
}
|
|
1387
1404
|
};
|
|
1388
1405
|
Ribbon.prototype.createOverflowDropdown = function (tabIndex, tabContent, activeContent) {
|
|
@@ -1714,28 +1731,30 @@ var Ribbon = /** @class */ (function (_super) {
|
|
|
1714
1731
|
}
|
|
1715
1732
|
};
|
|
1716
1733
|
Ribbon.prototype.removeOverflowEvent = function (item, itemEle) {
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1734
|
+
if (itemEle) {
|
|
1735
|
+
switch (item.type) {
|
|
1736
|
+
case 'Button':
|
|
1737
|
+
this.ribbonButtonModule.removeOverFlowEvents(item, itemEle);
|
|
1738
|
+
break;
|
|
1739
|
+
case 'DropDown':
|
|
1740
|
+
this.ribbonDropDownModule.removeOverFlowEvents(item, itemEle);
|
|
1741
|
+
break;
|
|
1742
|
+
case 'SplitButton':
|
|
1743
|
+
this.ribbonSplitButtonModule.removeOverFlowEvents(item, itemEle);
|
|
1744
|
+
break;
|
|
1745
|
+
case 'CheckBox':
|
|
1746
|
+
this.ribbonCheckBoxModule.removeOverFlowEvents(item, itemEle);
|
|
1747
|
+
break;
|
|
1748
|
+
case 'ColorPicker':
|
|
1749
|
+
this.ribbonColorPickerModule.removeOverFlowEvents(item, itemEle);
|
|
1750
|
+
break;
|
|
1751
|
+
case 'ComboBox':
|
|
1752
|
+
this.ribbonComboBoxModule.removeOverFlowEvents(item, itemEle);
|
|
1753
|
+
break;
|
|
1754
|
+
case 'GroupButton':
|
|
1755
|
+
this.ribbonGroupButtonModule.removeOverFlowEvents(item, itemEle);
|
|
1756
|
+
break;
|
|
1757
|
+
}
|
|
1739
1758
|
}
|
|
1740
1759
|
};
|
|
1741
1760
|
Ribbon.prototype.createGroupContainer = function (groupId, groupHeader) {
|
|
@@ -1940,8 +1959,10 @@ var Ribbon = /** @class */ (function (_super) {
|
|
|
1940
1959
|
this.ribbonGroupButtonModule.switchGroupButton(item, itemEle);
|
|
1941
1960
|
}
|
|
1942
1961
|
item.setProperties({ activeSize: size }, true);
|
|
1943
|
-
|
|
1944
|
-
|
|
1962
|
+
if (itemEle) {
|
|
1963
|
+
var ele = itemEle.querySelector('#' + item.id);
|
|
1964
|
+
this.setItemSize(ele, item);
|
|
1965
|
+
}
|
|
1945
1966
|
}
|
|
1946
1967
|
}
|
|
1947
1968
|
}
|
|
@@ -2024,7 +2045,7 @@ var Ribbon = /** @class */ (function (_super) {
|
|
|
2024
2045
|
}
|
|
2025
2046
|
else {
|
|
2026
2047
|
var itemEle = groupContainer.querySelector('#' + item.id + constants.CONTAINER_ID);
|
|
2027
|
-
if (!itemEle) {
|
|
2048
|
+
if (!itemEle && overflowtarget) {
|
|
2028
2049
|
itemEle = overflowtarget.querySelector('#' + item.id + constants.CONTAINER_ID);
|
|
2029
2050
|
if ((item.type === RibbonItemType.DropDown) || (item.type === RibbonItemType.SplitButton) || (item.type === RibbonItemType.GroupButton)) {
|
|
2030
2051
|
this.updatePopupItems(item, itemEle, group.enableGroupOverflow, false);
|
|
@@ -2034,7 +2055,9 @@ var Ribbon = /** @class */ (function (_super) {
|
|
|
2034
2055
|
if (item.type === RibbonItemType.GroupButton) {
|
|
2035
2056
|
this.ribbonGroupButtonModule.switchGroupButton(item, itemEle);
|
|
2036
2057
|
}
|
|
2037
|
-
|
|
2058
|
+
if (itemEle) {
|
|
2059
|
+
groupCollection.append(itemEle);
|
|
2060
|
+
}
|
|
2038
2061
|
}
|
|
2039
2062
|
var ele = groupContainer.querySelector('#' + item.id);
|
|
2040
2063
|
if (item.type === RibbonItemType.GroupButton) {
|
|
@@ -2122,9 +2145,28 @@ var Ribbon = /** @class */ (function (_super) {
|
|
|
2122
2145
|
if ((this.activeLayout === 'Simplified') && !(group.enableGroupOverflow || groupEle.querySelector('.' + constants.RIBBON_ITEM))) {
|
|
2123
2146
|
groupEle.classList.add('e-ribbon-emptyCollection');
|
|
2124
2147
|
}
|
|
2148
|
+
var initialProps = this.initialPropsData[parseInt(tabIndex.toString(), 10)];
|
|
2149
|
+
if (initialProps) {
|
|
2150
|
+
if (initialProps.hiddenGroups && initialProps.hiddenGroups.length) {
|
|
2151
|
+
this.updateGroupProps('hiddenGroups', initialProps, groupEle);
|
|
2152
|
+
}
|
|
2153
|
+
if (initialProps.disabledGroups && initialProps.disabledGroups.length) {
|
|
2154
|
+
this.updateGroupProps('disabledGroups', initialProps, groupEle);
|
|
2155
|
+
}
|
|
2156
|
+
}
|
|
2157
|
+
}
|
|
2158
|
+
if (this.initialPropsData[parseInt(tabIndex.toString(), 10)]) {
|
|
2159
|
+
delete this.initialPropsData[parseInt(tabIndex.toString(), 10)];
|
|
2125
2160
|
}
|
|
2126
2161
|
return groupElements;
|
|
2127
2162
|
};
|
|
2163
|
+
Ribbon.prototype.updateGroupProps = function (key, initialProps, groupEle) {
|
|
2164
|
+
// eslint-disable-next-line
|
|
2165
|
+
var groupIndex = initialProps[key].indexOf(groupEle.id);
|
|
2166
|
+
if (groupIndex !== -1) {
|
|
2167
|
+
key === 'hiddenGroups' ? groupEle.classList.add('e-hidden') : groupEle.classList.add('e-disabled');
|
|
2168
|
+
}
|
|
2169
|
+
};
|
|
2128
2170
|
Ribbon.prototype.validateItemSize = function () {
|
|
2129
2171
|
for (var k = 0; k < this.tabs.length; k++) {
|
|
2130
2172
|
var groupList = this.tabs[parseInt(k.toString(), 10)].groups;
|
|
@@ -2254,6 +2296,13 @@ var Ribbon = /** @class */ (function (_super) {
|
|
|
2254
2296
|
else {
|
|
2255
2297
|
itemEle.classList.add((size & RibbonItemSize.Medium) ? constants.RIBBON_MEDIUM_ITEM : constants.RIBBON_SMALL_ITEM);
|
|
2256
2298
|
}
|
|
2299
|
+
var initialProps = this.initialPropsData[parseInt(tabIndex.toString(), 10)];
|
|
2300
|
+
if (initialProps && initialProps.hiddenItems && initialProps.hiddenItems.length) {
|
|
2301
|
+
var itemIndex = initialProps.hiddenItems.indexOf(item.id);
|
|
2302
|
+
if (itemIndex !== -1) {
|
|
2303
|
+
itemEle.classList.add('e-hidden');
|
|
2304
|
+
}
|
|
2305
|
+
}
|
|
2257
2306
|
this.createRibbonItem(item, itemEle);
|
|
2258
2307
|
if ((this.activeLayout === 'Simplified') && ((item.displayOptions === DisplayMode.Overflow) || (item.displayOptions === (DisplayMode.Classic | DisplayMode.Overflow)))) {
|
|
2259
2308
|
this.createOverflowPopup(item, tabIndex, isGroupOF, groupId, groupHeader, itemEle, groupContainer);
|
|
@@ -2821,7 +2870,12 @@ var Ribbon = /** @class */ (function (_super) {
|
|
|
2821
2870
|
}
|
|
2822
2871
|
var contentEle = this.tabObj.items[itemProp.tabIndex].content;
|
|
2823
2872
|
var groupEle = contentEle.querySelector('#' + groupID);
|
|
2824
|
-
|
|
2873
|
+
if (groupEle) {
|
|
2874
|
+
isHidden ? groupEle.classList.add('e-hidden') : groupEle.classList.remove('e-hidden');
|
|
2875
|
+
}
|
|
2876
|
+
else {
|
|
2877
|
+
this.updateInitialProps(itemProp.tabIndex, groupID, 'hiddenGroups', isHidden);
|
|
2878
|
+
}
|
|
2825
2879
|
if (this.overflowDDB) {
|
|
2826
2880
|
var overflowEle = this.overflowDDB.target;
|
|
2827
2881
|
var ofTabContainer = overflowEle.querySelector('#' + this.tabs[parseInt(itemProp.tabIndex.toString(), 10)].id + constants.OVERFLOW_ID);
|
|
@@ -2871,7 +2925,12 @@ var Ribbon = /** @class */ (function (_super) {
|
|
|
2871
2925
|
}
|
|
2872
2926
|
var contentEle = this.tabObj.items[itemProp.tabIndex].content;
|
|
2873
2927
|
var groupEle = contentEle.querySelector('#' + groupID);
|
|
2874
|
-
|
|
2928
|
+
if (groupEle) {
|
|
2929
|
+
isDisabled ? groupEle.classList.add('e-disabled') : groupEle.classList.remove('e-disabled');
|
|
2930
|
+
}
|
|
2931
|
+
else {
|
|
2932
|
+
this.updateInitialProps(itemProp.tabIndex, groupID, 'disabledGroups', isDisabled);
|
|
2933
|
+
}
|
|
2875
2934
|
if (this.overflowDDB) {
|
|
2876
2935
|
var overflowEle = this.overflowDDB.target;
|
|
2877
2936
|
var ofTabContainer = overflowEle.querySelector('#' + this.tabs[parseInt(itemProp.tabIndex.toString(), 10)].id + constants.OVERFLOW_ID);
|
|
@@ -3099,6 +3158,36 @@ var Ribbon = /** @class */ (function (_super) {
|
|
|
3099
3158
|
if (ele) {
|
|
3100
3159
|
var itemEle = closest(ele, '.e-ribbon-item');
|
|
3101
3160
|
isHidden ? itemEle.classList.add('e-hidden') : itemEle.classList.remove('e-hidden');
|
|
3161
|
+
this.refreshLayout();
|
|
3162
|
+
}
|
|
3163
|
+
else {
|
|
3164
|
+
this.updateInitialProps(itemProp.tabIndex, itemId, 'hiddenItems', isHidden);
|
|
3165
|
+
}
|
|
3166
|
+
};
|
|
3167
|
+
Ribbon.prototype.updateInitialProps = function (tabIndex, id, key, isInsert) {
|
|
3168
|
+
var initialProps = this.initialPropsData[parseInt(tabIndex.toString(), 10)];
|
|
3169
|
+
if (!initialProps) {
|
|
3170
|
+
this.initialPropsData[parseInt(tabIndex.toString(), 10)] = {};
|
|
3171
|
+
initialProps = this.initialPropsData[parseInt(tabIndex.toString(), 10)];
|
|
3172
|
+
}
|
|
3173
|
+
if (initialProps) {
|
|
3174
|
+
/* eslint-disable */
|
|
3175
|
+
if (!initialProps[key])
|
|
3176
|
+
initialProps[key] = [];
|
|
3177
|
+
var itemIndex = initialProps[key].indexOf(id);
|
|
3178
|
+
if (isInsert) {
|
|
3179
|
+
if (itemIndex === -1)
|
|
3180
|
+
initialProps[key].push(id);
|
|
3181
|
+
}
|
|
3182
|
+
else {
|
|
3183
|
+
if (itemIndex !== -1)
|
|
3184
|
+
initialProps[key].splice(itemIndex, 1);
|
|
3185
|
+
initialProps[key].length === 0 && delete initialProps[key];
|
|
3186
|
+
/* eslint-enable */
|
|
3187
|
+
if (Object.keys(initialProps).length === 0) {
|
|
3188
|
+
delete this.initialPropsData[parseInt(tabIndex.toString(), 10)];
|
|
3189
|
+
}
|
|
3190
|
+
}
|
|
3102
3191
|
}
|
|
3103
3192
|
};
|
|
3104
3193
|
/**
|
|
@@ -3581,6 +3670,7 @@ var Ribbon = /** @class */ (function (_super) {
|
|
|
3581
3670
|
_super.prototype.destroy.call(this);
|
|
3582
3671
|
this.tabObj.destroy();
|
|
3583
3672
|
this.tabObj = undefined;
|
|
3673
|
+
this.initialPropsData = {};
|
|
3584
3674
|
remove(this.element.querySelector('#' + this.element.id + constants.TAB_ID));
|
|
3585
3675
|
this.element.style.removeProperty(constants.RIBBON_FILE_MENU_WIDTH);
|
|
3586
3676
|
this.element.style.removeProperty(constants.RIBBON_HELP_PANE_TEMPLATE_WIDTH);
|