@syncfusion/ej2-navigations 27.1.57 → 27.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ej2-navigations.min.js +2 -2
- package/dist/ej2-navigations.umd.min.js +2 -2
- package/dist/ej2-navigations.umd.min.js.map +1 -1
- package/dist/es6/ej2-navigations.es2015.js +50 -18
- package/dist/es6/ej2-navigations.es2015.js.map +1 -1
- package/dist/es6/ej2-navigations.es5.js +51 -18
- package/dist/es6/ej2-navigations.es5.js.map +1 -1
- package/dist/global/ej2-navigations.min.js +2 -2
- package/dist/global/ej2-navigations.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/package.json +11 -11
- package/src/common/menu-base.js +8 -2
- package/src/tab/tab.d.ts +10 -0
- package/src/tab/tab.js +27 -6
- package/src/toolbar/toolbar.js +3 -3
- package/src/treeview/treeview.js +13 -7
- package/styles/fluent2-lite.css +1 -2
- package/styles/fluent2.css +1 -2
- package/styles/sidebar/fluent2.css +1 -2
|
@@ -1300,6 +1300,9 @@ let MenuBase = class MenuBase extends Component {
|
|
|
1300
1300
|
this.delegateMouseDownHandler = this.mouseDownHandler.bind(this);
|
|
1301
1301
|
EventHandler.add(this.isMenu ? document : wrapper, 'mouseover', this.delegateMoverHandler, this);
|
|
1302
1302
|
EventHandler.add(document, 'mousedown', this.delegateMouseDownHandler, this);
|
|
1303
|
+
if (!this.isMenu && !this.target) {
|
|
1304
|
+
EventHandler.add(document, 'scroll', this.scrollHandler, this);
|
|
1305
|
+
}
|
|
1303
1306
|
}
|
|
1304
1307
|
this.delegateClickHandler = this.clickHandler.bind(this);
|
|
1305
1308
|
EventHandler.add(document, 'click', this.delegateClickHandler, this);
|
|
@@ -1660,7 +1663,7 @@ let MenuBase = class MenuBase extends Component {
|
|
|
1660
1663
|
this.afterCloseMenu(e);
|
|
1661
1664
|
}
|
|
1662
1665
|
else if (isOpen && !this.hamburgerMode && closedLi && !trgtLi && this.keyType !== 'left' && (this.navIdx.length || !this.isMenu && this.navIdx.length === 0)) {
|
|
1663
|
-
let ele = (e && (e.target.classList.contains('e-vscroll') || e.target.classList.contains('e-scroll-nav')))
|
|
1666
|
+
let ele = (e && e.target.classList && (e.target.classList.contains('e-vscroll') || e.target.classList.contains('e-scroll-nav')))
|
|
1664
1667
|
? closest(e.target, '.e-menu-wrapper') : null;
|
|
1665
1668
|
if (ele) {
|
|
1666
1669
|
ele = ele.querySelector('.e-menu-item');
|
|
@@ -1669,7 +1672,7 @@ let MenuBase = class MenuBase extends Component {
|
|
|
1669
1672
|
}
|
|
1670
1673
|
}
|
|
1671
1674
|
else {
|
|
1672
|
-
if (!(e && e.target.classList.contains('e-nav-arrow'))) {
|
|
1675
|
+
if (!(e && e.target.classList && e.target.classList.contains('e-nav-arrow'))) {
|
|
1673
1676
|
this.closeMenu(this.navIdx[this.navIdx.length - 1], e);
|
|
1674
1677
|
}
|
|
1675
1678
|
}
|
|
@@ -2857,6 +2860,9 @@ let MenuBase = class MenuBase extends Component {
|
|
|
2857
2860
|
if (!Browser.isDevice) {
|
|
2858
2861
|
EventHandler.remove(this.isMenu ? document : wrapper, 'mouseover', this.delegateMoverHandler);
|
|
2859
2862
|
EventHandler.remove(document, 'mousedown', this.delegateMouseDownHandler);
|
|
2863
|
+
if (!this.isMenu && !this.target) {
|
|
2864
|
+
EventHandler.remove(document, 'scroll', this.scrollHandler);
|
|
2865
|
+
}
|
|
2860
2866
|
}
|
|
2861
2867
|
EventHandler.remove(document, 'click', this.delegateClickHandler);
|
|
2862
2868
|
this.unWireKeyboardEvent(wrapper);
|
|
@@ -4882,9 +4888,9 @@ let Toolbar = class Toolbar extends Component {
|
|
|
4882
4888
|
return;
|
|
4883
4889
|
}
|
|
4884
4890
|
const alignDiv = [];
|
|
4885
|
-
alignDiv.push(this.createElement('div', { className: CLS_TBARLEFT }));
|
|
4886
|
-
alignDiv.push(this.createElement('div', { className: CLS_TBARCENTER }));
|
|
4887
|
-
alignDiv.push(this.createElement('div', { className: CLS_TBARRIGHT }));
|
|
4891
|
+
alignDiv.push(this.createElement('div', { className: CLS_TBARLEFT, attrs: { role: 'group' } }));
|
|
4892
|
+
alignDiv.push(this.createElement('div', { className: CLS_TBARCENTER, attrs: { role: 'group' } }));
|
|
4893
|
+
alignDiv.push(this.createElement('div', { className: CLS_TBARRIGHT, attrs: { role: 'group' } }));
|
|
4888
4894
|
if (pos === 0 && item.align !== 'Left') {
|
|
4889
4895
|
alignDiv.forEach((ele) => {
|
|
4890
4896
|
itemEle.appendChild(ele);
|
|
@@ -7649,6 +7655,20 @@ let Tab = class Tab extends Component {
|
|
|
7649
7655
|
this.renderReactTemplates();
|
|
7650
7656
|
}
|
|
7651
7657
|
}
|
|
7658
|
+
/**
|
|
7659
|
+
* Reorganizes and adjusts the Tab headers to fit the available width without re-rendering the entire Tab component.
|
|
7660
|
+
*
|
|
7661
|
+
* This method is useful for optimizing the layout when:
|
|
7662
|
+
* - A hidden tab item becomes visible.
|
|
7663
|
+
* - The number of tab items changes dynamically.
|
|
7664
|
+
*
|
|
7665
|
+
* @returns {void} This method does not return a value.
|
|
7666
|
+
*/
|
|
7667
|
+
refreshOverflow() {
|
|
7668
|
+
if (!isNullOrUndefined(this.tbObj)) {
|
|
7669
|
+
this.tbObj.refreshOverflow();
|
|
7670
|
+
}
|
|
7671
|
+
}
|
|
7652
7672
|
/**
|
|
7653
7673
|
* Initialize component
|
|
7654
7674
|
*
|
|
@@ -7693,9 +7713,7 @@ let Tab = class Tab extends Component {
|
|
|
7693
7713
|
this.initRender = false;
|
|
7694
7714
|
if (this.isReact && this.portals && this.portals.length > 0) {
|
|
7695
7715
|
this.renderReactTemplates(() => {
|
|
7696
|
-
|
|
7697
|
-
this.tbObj.refreshOverflow();
|
|
7698
|
-
}
|
|
7716
|
+
this.refreshOverflow();
|
|
7699
7717
|
this.refreshActiveBorder();
|
|
7700
7718
|
});
|
|
7701
7719
|
}
|
|
@@ -7989,7 +8007,7 @@ let Tab = class Tab extends Component {
|
|
|
7989
8007
|
else {
|
|
7990
8008
|
trg.classList.remove(CLS_CLOSE_SHOW);
|
|
7991
8009
|
}
|
|
7992
|
-
this.
|
|
8010
|
+
this.refreshOverflow();
|
|
7993
8011
|
this.refreshActiveTabBorder();
|
|
7994
8012
|
}
|
|
7995
8013
|
prevCtnAnimation(prev, current) {
|
|
@@ -9143,6 +9161,10 @@ let Tab = class Tab extends Component {
|
|
|
9143
9161
|
addTab(items, index) {
|
|
9144
9162
|
const addArgs = { addedItems: items, cancel: false };
|
|
9145
9163
|
if (!this.isReplace) {
|
|
9164
|
+
for (const item of items) {
|
|
9165
|
+
item.disabled = item.disabled || false;
|
|
9166
|
+
item.visible = item.visible || true;
|
|
9167
|
+
}
|
|
9146
9168
|
this.trigger('adding', addArgs, (tabAddingArgs) => {
|
|
9147
9169
|
if (!tabAddingArgs.cancel) {
|
|
9148
9170
|
this.addingTabContent(items, index);
|
|
@@ -9346,11 +9368,15 @@ let Tab = class Tab extends Component {
|
|
|
9346
9368
|
}
|
|
9347
9369
|
}
|
|
9348
9370
|
this.setActiveBorder();
|
|
9371
|
+
if (!isNullOrUndefined(this.items[index])) {
|
|
9372
|
+
this.items[index].visible = !value;
|
|
9373
|
+
this.dataBind();
|
|
9374
|
+
}
|
|
9349
9375
|
if (!isNullOrUndefined(item.firstElementChild)) {
|
|
9350
9376
|
item.firstElementChild.setAttribute('aria-hidden', '' + value);
|
|
9351
9377
|
}
|
|
9352
|
-
if (this.overflowMode === 'Popup'
|
|
9353
|
-
this.
|
|
9378
|
+
if (this.overflowMode === 'Popup') {
|
|
9379
|
+
this.refreshOverflow();
|
|
9354
9380
|
}
|
|
9355
9381
|
}
|
|
9356
9382
|
selectTab(args, event = null, isInteracted = false) {
|
|
@@ -10568,7 +10594,7 @@ let TreeView = TreeView_1 = class TreeView extends Component {
|
|
|
10568
10594
|
if (this.showCheckBox) {
|
|
10569
10595
|
const checkboxEle = createCheckBox(this.createElement, true, { cssClass: this.touchClass });
|
|
10570
10596
|
checkboxEle.classList.add(CHECKBOXWRAP);
|
|
10571
|
-
const icon = select('div.' +
|
|
10597
|
+
const icon = select('div.' + EXPANDABLE + ', div.' + COLLAPSIBLE, e.item);
|
|
10572
10598
|
const id = e.item.getAttribute('data-uid');
|
|
10573
10599
|
e.item.childNodes[0].insertBefore(checkboxEle, e.item.childNodes[0].childNodes[isNullOrUndefined(icon) ? 0 : 1]);
|
|
10574
10600
|
const checkValue = getValue(e.fields.isChecked, e.curData);
|
|
@@ -10799,7 +10825,7 @@ let TreeView = TreeView_1 = class TreeView extends Component {
|
|
|
10799
10825
|
}
|
|
10800
10826
|
count = childItems.length;
|
|
10801
10827
|
}
|
|
10802
|
-
if (this.autoCheck && this.showCheckBox) {
|
|
10828
|
+
if (this.autoCheck && this.showCheckBox && !(this.fields.dataSource instanceof DataManager)) {
|
|
10803
10829
|
const selectedChildNodeDetails = this.getSelectedChildNodeDetails(dataUid);
|
|
10804
10830
|
matchedChildNodes = selectedChildNodeDetails;
|
|
10805
10831
|
oldChildCount = new DataManager(this.checkActionNodes)
|
|
@@ -13507,7 +13533,7 @@ let TreeView = TreeView_1 = class TreeView extends Component {
|
|
|
13507
13533
|
if (isNullOrUndefined(dropIcon)) {
|
|
13508
13534
|
ListBase.generateIcon(this.createElement, dropLi, EXPANDABLE, this.listBaseOption);
|
|
13509
13535
|
}
|
|
13510
|
-
const icon = select('div.' +
|
|
13536
|
+
const icon = select('div.' + EXPANDABLE + ', div.' + COLLAPSIBLE, dropLi);
|
|
13511
13537
|
if (icon) {
|
|
13512
13538
|
icon.classList.add('e-icon-expandable');
|
|
13513
13539
|
}
|
|
@@ -13530,7 +13556,7 @@ let TreeView = TreeView_1 = class TreeView extends Component {
|
|
|
13530
13556
|
if (isNullOrUndefined(dropIcon)) {
|
|
13531
13557
|
ListBase.generateIcon(this.createElement, dropLi, COLLAPSIBLE, this.listBaseOption);
|
|
13532
13558
|
}
|
|
13533
|
-
let icon = select('div.' +
|
|
13559
|
+
let icon = select('div.' + EXPANDABLE + ', div.' + COLLAPSIBLE, dropLi);
|
|
13534
13560
|
if (icon) {
|
|
13535
13561
|
removeClass([icon], EXPANDABLE);
|
|
13536
13562
|
}
|
|
@@ -13544,6 +13570,12 @@ let TreeView = TreeView_1 = class TreeView extends Component {
|
|
|
13544
13570
|
this.addExpand(dropLi);
|
|
13545
13571
|
this.trigger('nodeExpanded', this.getExpandEvent(dropLi, null));
|
|
13546
13572
|
}
|
|
13573
|
+
const collapseIcon = select('div.' + COLLAPSIBLE, dropLi);
|
|
13574
|
+
if (!isNullOrUndefined(dropUl) && collapseIcon && this.preventExpand) {
|
|
13575
|
+
removeClass([collapseIcon], COLLAPSIBLE);
|
|
13576
|
+
dropLi.setAttribute('aria-expanded', 'false');
|
|
13577
|
+
addClass([collapseIcon], EXPANDABLE);
|
|
13578
|
+
}
|
|
13547
13579
|
return dropUl;
|
|
13548
13580
|
}
|
|
13549
13581
|
updateElement(dragParentUl, dragParentLi) {
|
|
@@ -13866,7 +13898,7 @@ let TreeView = TreeView_1 = class TreeView extends Component {
|
|
|
13866
13898
|
if (!isNullOrUndefined(dropLi)) {
|
|
13867
13899
|
dropIcon1 = select('div.' + ICON, dropLi);
|
|
13868
13900
|
}
|
|
13869
|
-
if (this.dataType === 1 && dropIcon1 && dropIcon1.classList.contains(EXPANDABLE) && !isNullOrUndefined(this.element.offsetParent) && !this.element.offsetParent.parentElement.classList.contains('e-filemanager')) {
|
|
13901
|
+
if (this.dataType === 1 && dropIcon1 && dropIcon1.classList.contains(EXPANDABLE) && this.preventExpand && !isNullOrUndefined(this.element.offsetParent) && !this.element.offsetParent.parentElement.classList.contains('e-filemanager')) {
|
|
13870
13902
|
this.preventExpand = true;
|
|
13871
13903
|
}
|
|
13872
13904
|
if (this.dataType !== 1) {
|
|
@@ -13887,7 +13919,7 @@ let TreeView = TreeView_1 = class TreeView extends Component {
|
|
|
13887
13919
|
for (let i = 0; i < li.length; i++) {
|
|
13888
13920
|
dropUl.insertBefore(li[parseInt(i.toString(), 10)], refNode);
|
|
13889
13921
|
}
|
|
13890
|
-
if (this.dataType === 1 && !isNullOrUndefined(dropLi) && !isNullOrUndefined(this.element.offsetParent) && !this.element.offsetParent.parentElement.classList.contains('e-filemanager')) {
|
|
13922
|
+
if (this.dataType === 1 && !isNullOrUndefined(dropLi) && !this.preventExpand && !isNullOrUndefined(this.element.offsetParent) && !this.element.offsetParent.parentElement.classList.contains('e-filemanager')) {
|
|
13891
13923
|
this.preventExpand = false;
|
|
13892
13924
|
const dropIcon = select('div.' + ICON, dropLi);
|
|
13893
13925
|
if (dropIcon && dropIcon.classList.contains(EXPANDABLE) && (isNullOrUndefined(args) || args.name !== 'nodeExpanding')) {
|
|
@@ -13900,7 +13932,7 @@ let TreeView = TreeView_1 = class TreeView extends Component {
|
|
|
13900
13932
|
for (let i = 0; i < li.length; i++) {
|
|
13901
13933
|
dropUl.insertBefore(li[parseInt(i.toString(), 10)], refNode);
|
|
13902
13934
|
}
|
|
13903
|
-
if (this.dataType === 1 && !isNullOrUndefined(dropLi) && !isNullOrUndefined(this.element.offsetParent) && !this.element.offsetParent.parentElement.classList.contains('e-filemanager')) {
|
|
13935
|
+
if (this.dataType === 1 && !isNullOrUndefined(dropLi) && !this.preventExpand && !isNullOrUndefined(this.element.offsetParent) && !this.element.offsetParent.parentElement.classList.contains('e-filemanager')) {
|
|
13904
13936
|
this.preventExpand = false;
|
|
13905
13937
|
const dropIcon = select('div.' + ICON, dropLi);
|
|
13906
13938
|
if (dropIcon && dropIcon.classList.contains(EXPANDABLE) && (isNullOrUndefined(args) || args.name !== 'nodeExpanding')) {
|