@syncfusion/ej2-navigations 20.4.51 → 20.4.53
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 +29 -0
- 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 +69 -27
- package/dist/es6/ej2-navigations.es2015.js.map +1 -1
- package/dist/es6/ej2-navigations.es5.js +71 -28
- 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 +8 -8
- package/src/breadcrumb/breadcrumb.d.ts +1 -0
- package/src/breadcrumb/breadcrumb.js +6 -2
- package/src/common/menu-base.js +3 -0
- package/src/tab/tab.js +15 -0
- package/src/treeview/treeview.d.ts +1 -1
- package/src/treeview/treeview.js +47 -26
- package/styles/pager/_bootstrap5-definition.scss +1 -1
- package/styles/pager/_fusionnew-definition.scss +1 -1
- package/styles/pager/_material3-definition.scss +1 -1
- package/GitLeaksReport.json +0 -1
- package/gitleaks-ci/gitleaks +0 -0
- package/gitleaks-ci.tar.gz +0 -0
|
@@ -2105,6 +2105,9 @@ var MenuBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
2105
2105
|
return;
|
|
2106
2106
|
}
|
|
2107
2107
|
var iconLi = menu.querySelector('.e-menu-item:not(.e-blankicon):not(.e-separator)');
|
|
2108
|
+
if (!iconLi) {
|
|
2109
|
+
return;
|
|
2110
|
+
}
|
|
2108
2111
|
var icon = iconLi.querySelector('.e-menu-icon');
|
|
2109
2112
|
if (!icon) {
|
|
2110
2113
|
return;
|
|
@@ -9248,6 +9251,21 @@ var Tab = /** @__PURE__ @class */ (function (_super) {
|
|
|
9248
9251
|
_this.refreshActiveBorder();
|
|
9249
9252
|
var cntTrg = select('#' + CLS_CONTENT$1 + _this.tabId + '_' + _this.extIndex(trg.id), select('.' + CLS_CONTENT$1, _this.element));
|
|
9250
9253
|
if (!isNullOrUndefined(cntTrg)) {
|
|
9254
|
+
var registeredTemplate = _this.registeredTemplate;
|
|
9255
|
+
if (registeredTemplate && registeredTemplate.content) {
|
|
9256
|
+
var templateToClear = [];
|
|
9257
|
+
for (var i = 0; i < registeredTemplate.content.length; i++) {
|
|
9258
|
+
var registeredItem = registeredTemplate.content[i].rootNodes[0];
|
|
9259
|
+
var closestItem = closest(registeredItem, '.' + CLS_ITEM$2);
|
|
9260
|
+
if (!isNullOrUndefined(registeredItem) && closestItem === cntTrg) {
|
|
9261
|
+
templateToClear.push(registeredTemplate.content[i]);
|
|
9262
|
+
break;
|
|
9263
|
+
}
|
|
9264
|
+
}
|
|
9265
|
+
if (templateToClear.length > 0) {
|
|
9266
|
+
_this.clearTemplate(['content'], templateToClear);
|
|
9267
|
+
}
|
|
9268
|
+
}
|
|
9251
9269
|
detach(cntTrg);
|
|
9252
9270
|
}
|
|
9253
9271
|
_this.trigger('removed', tabRemovingArgs);
|
|
@@ -10129,7 +10147,6 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
10129
10147
|
};
|
|
10130
10148
|
TreeView.prototype.initialize = function () {
|
|
10131
10149
|
this.element.setAttribute('role', 'tree');
|
|
10132
|
-
this.element.setAttribute('tabindex', '0');
|
|
10133
10150
|
this.element.setAttribute('aria-activedescendant', this.element.id + '_active');
|
|
10134
10151
|
this.setCssClass(null, this.cssClass);
|
|
10135
10152
|
this.setEnableRtl();
|
|
@@ -10569,6 +10586,8 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
10569
10586
|
var fields = e.fields;
|
|
10570
10587
|
this.addActionClass(e, fields.selected, SELECTED$1);
|
|
10571
10588
|
this.addActionClass(e, fields.expanded, EXPANDED);
|
|
10589
|
+
e.item.setAttribute("tabindex", "-1");
|
|
10590
|
+
EventHandler.add(e.item, 'focus', this.focusIn, this);
|
|
10572
10591
|
if (!isNullOrUndefined(this.nodeTemplateFn)) {
|
|
10573
10592
|
var textEle = e.item.querySelector('.' + LISTTEXT);
|
|
10574
10593
|
var dataId = e.item.getAttribute('data-uid');
|
|
@@ -11130,7 +11149,7 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
11130
11149
|
this.setMultiSelect(this.allowMultiSelection);
|
|
11131
11150
|
var firstNode = select('.' + LISTITEM, this.element);
|
|
11132
11151
|
if (firstNode) {
|
|
11133
|
-
|
|
11152
|
+
firstNode.setAttribute('tabindex', '0');
|
|
11134
11153
|
this.updateIdAttr(null, firstNode);
|
|
11135
11154
|
}
|
|
11136
11155
|
if (this.allowTextWrap) {
|
|
@@ -11790,7 +11809,6 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
11790
11809
|
this.startNode = li;
|
|
11791
11810
|
this.addSelect(li);
|
|
11792
11811
|
}
|
|
11793
|
-
this.setFocusElement(li);
|
|
11794
11812
|
if (this.isLoaded) {
|
|
11795
11813
|
eventArgs.nodeData = this.getNodeData(li);
|
|
11796
11814
|
this.trigger('nodeSelected', eventArgs);
|
|
@@ -11825,8 +11843,11 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
11825
11843
|
var focusedNode = this.getFocusedNode();
|
|
11826
11844
|
if (focusedNode) {
|
|
11827
11845
|
removeClass([focusedNode], FOCUS);
|
|
11846
|
+
focusedNode.setAttribute("tabindex", "-1");
|
|
11828
11847
|
}
|
|
11829
11848
|
addClass([li], FOCUS);
|
|
11849
|
+
li.setAttribute('tabindex', '0');
|
|
11850
|
+
EventHandler.add(li, 'blur', this.focusOut, this);
|
|
11830
11851
|
this.updateIdAttr(focusedNode, li);
|
|
11831
11852
|
}
|
|
11832
11853
|
};
|
|
@@ -11951,14 +11972,10 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
11951
11972
|
var inpEle = target;
|
|
11952
11973
|
if (e.action === 'enter') {
|
|
11953
11974
|
inpEle.blur();
|
|
11954
|
-
this.element.focus();
|
|
11955
|
-
addClass([focusedNode], HOVER);
|
|
11956
11975
|
}
|
|
11957
11976
|
else if (e.action === 'escape') {
|
|
11958
11977
|
inpEle.value = this.oldText;
|
|
11959
11978
|
inpEle.blur();
|
|
11960
|
-
this.element.focus();
|
|
11961
|
-
addClass([focusedNode], HOVER);
|
|
11962
11979
|
}
|
|
11963
11980
|
return;
|
|
11964
11981
|
}
|
|
@@ -12342,7 +12359,7 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
12342
12359
|
};
|
|
12343
12360
|
TreeView.prototype.getFocusedNode = function () {
|
|
12344
12361
|
var selectedItem;
|
|
12345
|
-
var fNode = select('.' + LISTITEM + '
|
|
12362
|
+
var fNode = select('.' + LISTITEM + '[tabindex="0"]', this.element);
|
|
12346
12363
|
if (isNullOrUndefined(fNode)) {
|
|
12347
12364
|
selectedItem = select('.' + LISTITEM, this.element);
|
|
12348
12365
|
}
|
|
@@ -12412,8 +12429,12 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
12412
12429
|
};
|
|
12413
12430
|
TreeView.prototype.setFocus = function (preNode, nextNode) {
|
|
12414
12431
|
removeClass([preNode], [HOVER, FOCUS]);
|
|
12432
|
+
preNode.setAttribute("tabindex", "-1");
|
|
12415
12433
|
if (!nextNode.classList.contains('e-disable') && !nextNode.classList.contains(PREVENTSELECT)) {
|
|
12416
12434
|
addClass([nextNode], [HOVER, FOCUS]);
|
|
12435
|
+
nextNode.setAttribute('tabindex', '0');
|
|
12436
|
+
nextNode.focus();
|
|
12437
|
+
EventHandler.add(nextNode, 'blur', this.focusOut, this);
|
|
12417
12438
|
this.updateIdAttr(preNode, nextNode);
|
|
12418
12439
|
}
|
|
12419
12440
|
};
|
|
@@ -12427,12 +12448,19 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
12427
12448
|
};
|
|
12428
12449
|
TreeView.prototype.focusIn = function () {
|
|
12429
12450
|
if (!this.mouseDownStatus) {
|
|
12430
|
-
|
|
12451
|
+
var focusedElement = this.getFocusedNode();
|
|
12452
|
+
focusedElement.setAttribute("tabindex", "0");
|
|
12453
|
+
addClass([focusedElement], [HOVER, FOCUS]);
|
|
12454
|
+
EventHandler.add(focusedElement, 'blur', this.focusOut, this);
|
|
12431
12455
|
}
|
|
12432
12456
|
this.mouseDownStatus = false;
|
|
12433
12457
|
};
|
|
12434
|
-
TreeView.prototype.focusOut = function () {
|
|
12435
|
-
|
|
12458
|
+
TreeView.prototype.focusOut = function (event) {
|
|
12459
|
+
var focusedElement = this.getFocusedNode();
|
|
12460
|
+
if (event.target == focusedElement) {
|
|
12461
|
+
removeClass([focusedElement], [HOVER, FOCUS]);
|
|
12462
|
+
EventHandler.remove(focusedElement, 'blur', this.focusOut);
|
|
12463
|
+
}
|
|
12436
12464
|
};
|
|
12437
12465
|
TreeView.prototype.onMouseOver = function (e) {
|
|
12438
12466
|
var target = e.target;
|
|
@@ -12640,7 +12668,9 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
12640
12668
|
}
|
|
12641
12669
|
if (isInput) {
|
|
12642
12670
|
removeClass([liEle], EDITING);
|
|
12643
|
-
|
|
12671
|
+
liEle.focus();
|
|
12672
|
+
EventHandler.add(liEle, 'blur', this.focusOut, this);
|
|
12673
|
+
addClass([liEle], HOVER);
|
|
12644
12674
|
}
|
|
12645
12675
|
if (this.allowTextWrap) {
|
|
12646
12676
|
this.calculateWrap(liEle);
|
|
@@ -12832,7 +12862,7 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
12832
12862
|
});
|
|
12833
12863
|
this.dropObj = new Droppable(this.element, {
|
|
12834
12864
|
out: function (e) {
|
|
12835
|
-
if (!isNullOrUndefined(e) && !e.target.classList.contains(SIBLING)) {
|
|
12865
|
+
if (!isNullOrUndefined(e) && !e.target.classList.contains(SIBLING) && (_this.dropObj.dragData.default && _this.dropObj.dragData.default.helper.classList.contains(ROOT))) {
|
|
12836
12866
|
document.body.style.cursor = 'not-allowed';
|
|
12837
12867
|
}
|
|
12838
12868
|
},
|
|
@@ -13531,15 +13561,29 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
13531
13561
|
}
|
|
13532
13562
|
}
|
|
13533
13563
|
if (!refNode && ((this.sortOrder === 'Ascending') || (this.sortOrder === 'Descending'))) {
|
|
13534
|
-
|
|
13535
|
-
|
|
13536
|
-
|
|
13537
|
-
|
|
13538
|
-
|
|
13539
|
-
|
|
13540
|
-
|
|
13564
|
+
if (dropUl.childNodes.length === 0) {
|
|
13565
|
+
for (var i = 0; i < li.length; i++) {
|
|
13566
|
+
dropUl.insertBefore(li[i], refNode);
|
|
13567
|
+
}
|
|
13568
|
+
if (this.dataType === 1 && !isNullOrUndefined(dropLi) && !isNullOrUndefined(this.element.offsetParent) && !this.element.offsetParent.parentElement.classList.contains('e-filemanager')) {
|
|
13569
|
+
this.preventExpand = false;
|
|
13570
|
+
var dropIcon = select('div.' + ICON, dropLi);
|
|
13571
|
+
if (dropIcon && dropIcon.classList.contains(EXPANDABLE)) {
|
|
13572
|
+
this.expandAction(dropLi, dropIcon, null);
|
|
13573
|
+
}
|
|
13574
|
+
}
|
|
13575
|
+
}
|
|
13576
|
+
else {
|
|
13577
|
+
var cNodes = dropUl.childNodes;
|
|
13578
|
+
for (var i = 0; i < li.length; i++) {
|
|
13579
|
+
for (var j = 0; j < cNodes.length; j++) {
|
|
13580
|
+
var returnValue = (this.sortOrder === 'Ascending') ? cNodes[j].textContent.toUpperCase() > li[i].innerText.toUpperCase() : cNodes[j].textContent.toUpperCase() < li[i].innerText.toUpperCase();
|
|
13581
|
+
if (returnValue) {
|
|
13582
|
+
dropUl.insertBefore(li[i], cNodes[j]);
|
|
13583
|
+
break;
|
|
13584
|
+
}
|
|
13585
|
+
dropUl.insertBefore(li[i], cNodes[cNodes.length]);
|
|
13541
13586
|
}
|
|
13542
|
-
dropUl.insertBefore(li[i], cNodes[cNodes.length]);
|
|
13543
13587
|
}
|
|
13544
13588
|
}
|
|
13545
13589
|
}
|
|
@@ -13909,8 +13953,6 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
13909
13953
|
if (this.expandOnType !== 'None') {
|
|
13910
13954
|
this.wireExpandOnEvent(true);
|
|
13911
13955
|
}
|
|
13912
|
-
EventHandler.add(this.element, 'focus', this.focusIn, this);
|
|
13913
|
-
EventHandler.add(this.element, 'blur', this.focusOut, this);
|
|
13914
13956
|
EventHandler.add(this.element, 'mouseover', this.onMouseOver, this);
|
|
13915
13957
|
EventHandler.add(this.element, 'mouseout', this.onMouseLeave, this);
|
|
13916
13958
|
this.keyboardModule = new KeyboardEvents(this.element, {
|
|
@@ -13923,8 +13965,6 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
13923
13965
|
EventHandler.remove(this.element, 'mousedown', this.mouseDownHandler);
|
|
13924
13966
|
this.wireClickEvent(false);
|
|
13925
13967
|
this.wireExpandOnEvent(false);
|
|
13926
|
-
EventHandler.remove(this.element, 'focus', this.focusIn);
|
|
13927
|
-
EventHandler.remove(this.element, 'blur', this.focusOut);
|
|
13928
13968
|
EventHandler.remove(this.element, 'mouseover', this.onMouseOver);
|
|
13929
13969
|
EventHandler.remove(this.element, 'mouseout', this.onMouseLeave);
|
|
13930
13970
|
if (!this.disabled) {
|
|
@@ -14414,7 +14454,6 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
14414
14454
|
TreeView.prototype.destroy = function () {
|
|
14415
14455
|
this.clearTemplate();
|
|
14416
14456
|
this.element.removeAttribute('aria-activedescendant');
|
|
14417
|
-
this.element.removeAttribute('tabindex');
|
|
14418
14457
|
this.unWireEvents();
|
|
14419
14458
|
this.wireEditingEvents(false);
|
|
14420
14459
|
if (!this.disabled) {
|
|
@@ -15757,7 +15796,9 @@ var Breadcrumb = /** @__PURE__ @class */ (function (_super) {
|
|
|
15757
15796
|
* @param {string | HTMLElement} element - Specifies the element.
|
|
15758
15797
|
*/
|
|
15759
15798
|
function Breadcrumb(options, element) {
|
|
15760
|
-
|
|
15799
|
+
var _this = _super.call(this, options, element) || this;
|
|
15800
|
+
_this.isPopupCreated = false;
|
|
15801
|
+
return _this;
|
|
15761
15802
|
}
|
|
15762
15803
|
/**
|
|
15763
15804
|
* @private
|
|
@@ -16198,7 +16239,7 @@ var Breadcrumb = /** @__PURE__ @class */ (function (_super) {
|
|
|
16198
16239
|
this.isExpanded = true;
|
|
16199
16240
|
this.reRenderItems();
|
|
16200
16241
|
}
|
|
16201
|
-
if (e.target.classList.contains(MENUCLASS)) {
|
|
16242
|
+
if (e.target.classList.contains(MENUCLASS) && !this.isPopupCreated) {
|
|
16202
16243
|
this.renderPopup();
|
|
16203
16244
|
}
|
|
16204
16245
|
};
|
|
@@ -16206,6 +16247,7 @@ var Breadcrumb = /** @__PURE__ @class */ (function (_super) {
|
|
|
16206
16247
|
var _this = this;
|
|
16207
16248
|
var wrapper = this.createElement('div', { className: POPUPCLASS + ' ' + this.cssClass + (this.enableRtl ? ' e-rtl' : '') });
|
|
16208
16249
|
document.body.appendChild(wrapper);
|
|
16250
|
+
this.isPopupCreated = true;
|
|
16209
16251
|
this.popupObj = new Popup(wrapper, {
|
|
16210
16252
|
content: this.popupUl,
|
|
16211
16253
|
relateTo: this.element.querySelector(DOT + MENUCLASS),
|
|
@@ -16223,6 +16265,7 @@ var Breadcrumb = /** @__PURE__ @class */ (function (_super) {
|
|
|
16223
16265
|
if (this.overflowMode === 'Menu' && this.popupObj && this.popupObj.element.classList.contains('e-popup-open') && !closest(e.target, DOT + MENUCLASS)) {
|
|
16224
16266
|
this.popupObj.hide();
|
|
16225
16267
|
this.popupObj.destroy();
|
|
16268
|
+
this.isPopupCreated = false;
|
|
16226
16269
|
detach(this.popupObj.element);
|
|
16227
16270
|
}
|
|
16228
16271
|
};
|