@syncfusion/ej2-navigations 20.4.49 → 20.4.52
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 +23 -0
- package/GitLeaksReport.json +1 -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 +34 -18
- package/dist/es6/ej2-navigations.es2015.js.map +1 -1
- package/dist/es6/ej2-navigations.es5.js +36 -19
- 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/gitleaks-ci/gitleaks +0 -0
- package/gitleaks-ci.tar.gz +0 -0
- package/package.json +10 -10
- package/src/breadcrumb/breadcrumb.d.ts +1 -0
- package/src/breadcrumb/breadcrumb.js +6 -2
- package/src/common/h-scroll.js +3 -0
- package/src/common/menu-base.js +3 -0
- package/src/treeview/treeview.d.ts +1 -1
- package/src/treeview/treeview.js +24 -17
- package/styles/bootstrap4.css +1 -1
- package/styles/context-menu/_fluent-definition.scss +1 -1
- package/styles/context-menu/fluent-dark.css +2 -2
- package/styles/context-menu/fluent.css +2 -2
- package/styles/fluent-dark.css +7 -7
- package/styles/fluent.css +7 -7
- package/styles/menu/fluent-dark.css +5 -5
- package/styles/menu/fluent.css +5 -5
- package/styles/treeview/_bootstrap4-definition.scss +1 -1
- package/styles/treeview/bootstrap4.css +1 -1
|
@@ -334,6 +334,9 @@ let HScroll = class HScroll extends Component {
|
|
|
334
334
|
else {
|
|
335
335
|
this.scrollEle.scrollLeft -= scrollVal;
|
|
336
336
|
}
|
|
337
|
+
if (this.enableRtl && this.scrollEle.scrollLeft > 0) {
|
|
338
|
+
this.scrollEle.scrollLeft = 0;
|
|
339
|
+
}
|
|
337
340
|
}
|
|
338
341
|
frameScrollRequest(scrollVal, action, isContinuous) {
|
|
339
342
|
const step = 10;
|
|
@@ -2013,6 +2016,9 @@ let MenuBase = class MenuBase extends Component {
|
|
|
2013
2016
|
return;
|
|
2014
2017
|
}
|
|
2015
2018
|
const iconLi = menu.querySelector('.e-menu-item:not(.e-blankicon):not(.e-separator)');
|
|
2019
|
+
if (!iconLi) {
|
|
2020
|
+
return;
|
|
2021
|
+
}
|
|
2016
2022
|
const icon = iconLi.querySelector('.e-menu-icon');
|
|
2017
2023
|
if (!icon) {
|
|
2018
2024
|
return;
|
|
@@ -9809,7 +9815,6 @@ let TreeView = TreeView_1 = class TreeView extends Component {
|
|
|
9809
9815
|
}
|
|
9810
9816
|
initialize() {
|
|
9811
9817
|
this.element.setAttribute('role', 'tree');
|
|
9812
|
-
this.element.setAttribute('tabindex', '0');
|
|
9813
9818
|
this.element.setAttribute('aria-activedescendant', this.element.id + '_active');
|
|
9814
9819
|
this.setCssClass(null, this.cssClass);
|
|
9815
9820
|
this.setEnableRtl();
|
|
@@ -10246,6 +10251,8 @@ let TreeView = TreeView_1 = class TreeView extends Component {
|
|
|
10246
10251
|
let fields = e.fields;
|
|
10247
10252
|
this.addActionClass(e, fields.selected, SELECTED$1);
|
|
10248
10253
|
this.addActionClass(e, fields.expanded, EXPANDED);
|
|
10254
|
+
e.item.setAttribute("tabindex", "-1");
|
|
10255
|
+
EventHandler.add(e.item, 'focus', this.focusIn, this);
|
|
10249
10256
|
if (!isNullOrUndefined(this.nodeTemplateFn)) {
|
|
10250
10257
|
let textEle = e.item.querySelector('.' + LISTTEXT);
|
|
10251
10258
|
let dataId = e.item.getAttribute('data-uid');
|
|
@@ -10806,7 +10813,7 @@ let TreeView = TreeView_1 = class TreeView extends Component {
|
|
|
10806
10813
|
this.setMultiSelect(this.allowMultiSelection);
|
|
10807
10814
|
let firstNode = select('.' + LISTITEM, this.element);
|
|
10808
10815
|
if (firstNode) {
|
|
10809
|
-
|
|
10816
|
+
firstNode.setAttribute('tabindex', '0');
|
|
10810
10817
|
this.updateIdAttr(null, firstNode);
|
|
10811
10818
|
}
|
|
10812
10819
|
if (this.allowTextWrap) {
|
|
@@ -11459,7 +11466,6 @@ let TreeView = TreeView_1 = class TreeView extends Component {
|
|
|
11459
11466
|
this.startNode = li;
|
|
11460
11467
|
this.addSelect(li);
|
|
11461
11468
|
}
|
|
11462
|
-
this.setFocusElement(li);
|
|
11463
11469
|
if (this.isLoaded) {
|
|
11464
11470
|
eventArgs.nodeData = this.getNodeData(li);
|
|
11465
11471
|
this.trigger('nodeSelected', eventArgs);
|
|
@@ -11493,8 +11499,11 @@ let TreeView = TreeView_1 = class TreeView extends Component {
|
|
|
11493
11499
|
let focusedNode = this.getFocusedNode();
|
|
11494
11500
|
if (focusedNode) {
|
|
11495
11501
|
removeClass([focusedNode], FOCUS);
|
|
11502
|
+
focusedNode.setAttribute("tabindex", "-1");
|
|
11496
11503
|
}
|
|
11497
11504
|
addClass([li], FOCUS);
|
|
11505
|
+
li.setAttribute('tabindex', '0');
|
|
11506
|
+
EventHandler.add(li, 'blur', this.focusOut, this);
|
|
11498
11507
|
this.updateIdAttr(focusedNode, li);
|
|
11499
11508
|
}
|
|
11500
11509
|
}
|
|
@@ -11616,14 +11625,10 @@ let TreeView = TreeView_1 = class TreeView extends Component {
|
|
|
11616
11625
|
let inpEle = target;
|
|
11617
11626
|
if (e.action === 'enter') {
|
|
11618
11627
|
inpEle.blur();
|
|
11619
|
-
this.element.focus();
|
|
11620
|
-
addClass([focusedNode], HOVER);
|
|
11621
11628
|
}
|
|
11622
11629
|
else if (e.action === 'escape') {
|
|
11623
11630
|
inpEle.value = this.oldText;
|
|
11624
11631
|
inpEle.blur();
|
|
11625
|
-
this.element.focus();
|
|
11626
|
-
addClass([focusedNode], HOVER);
|
|
11627
11632
|
}
|
|
11628
11633
|
return;
|
|
11629
11634
|
}
|
|
@@ -12006,7 +12011,7 @@ let TreeView = TreeView_1 = class TreeView extends Component {
|
|
|
12006
12011
|
}
|
|
12007
12012
|
getFocusedNode() {
|
|
12008
12013
|
let selectedItem;
|
|
12009
|
-
let fNode = select('.' + LISTITEM + '
|
|
12014
|
+
let fNode = select('.' + LISTITEM + '[tabindex="0"]', this.element);
|
|
12010
12015
|
if (isNullOrUndefined(fNode)) {
|
|
12011
12016
|
selectedItem = select('.' + LISTITEM, this.element);
|
|
12012
12017
|
}
|
|
@@ -12076,8 +12081,12 @@ let TreeView = TreeView_1 = class TreeView extends Component {
|
|
|
12076
12081
|
}
|
|
12077
12082
|
setFocus(preNode, nextNode) {
|
|
12078
12083
|
removeClass([preNode], [HOVER, FOCUS]);
|
|
12084
|
+
preNode.setAttribute("tabindex", "-1");
|
|
12079
12085
|
if (!nextNode.classList.contains('e-disable') && !nextNode.classList.contains(PREVENTSELECT)) {
|
|
12080
12086
|
addClass([nextNode], [HOVER, FOCUS]);
|
|
12087
|
+
nextNode.setAttribute('tabindex', '0');
|
|
12088
|
+
nextNode.focus();
|
|
12089
|
+
EventHandler.add(nextNode, 'blur', this.focusOut, this);
|
|
12081
12090
|
this.updateIdAttr(preNode, nextNode);
|
|
12082
12091
|
}
|
|
12083
12092
|
}
|
|
@@ -12091,12 +12100,19 @@ let TreeView = TreeView_1 = class TreeView extends Component {
|
|
|
12091
12100
|
}
|
|
12092
12101
|
focusIn() {
|
|
12093
12102
|
if (!this.mouseDownStatus) {
|
|
12094
|
-
|
|
12103
|
+
let focusedElement = this.getFocusedNode();
|
|
12104
|
+
focusedElement.setAttribute("tanindex", "0");
|
|
12105
|
+
addClass([focusedElement], [HOVER, FOCUS]);
|
|
12106
|
+
EventHandler.add(focusedElement, 'blur', this.focusOut, this);
|
|
12095
12107
|
}
|
|
12096
12108
|
this.mouseDownStatus = false;
|
|
12097
12109
|
}
|
|
12098
|
-
focusOut() {
|
|
12099
|
-
|
|
12110
|
+
focusOut(event) {
|
|
12111
|
+
let focusedElement = this.getFocusedNode();
|
|
12112
|
+
if (event.target == focusedElement) {
|
|
12113
|
+
removeClass([focusedElement], [HOVER, FOCUS]);
|
|
12114
|
+
EventHandler.remove(focusedElement, 'blur', this.focusOut);
|
|
12115
|
+
}
|
|
12100
12116
|
}
|
|
12101
12117
|
onMouseOver(e) {
|
|
12102
12118
|
let target = e.target;
|
|
@@ -12302,7 +12318,9 @@ let TreeView = TreeView_1 = class TreeView extends Component {
|
|
|
12302
12318
|
}
|
|
12303
12319
|
if (isInput) {
|
|
12304
12320
|
removeClass([liEle], EDITING);
|
|
12305
|
-
|
|
12321
|
+
liEle.focus();
|
|
12322
|
+
EventHandler.add(liEle, 'blur', this.focusOut, this);
|
|
12323
|
+
addClass([liEle], HOVER);
|
|
12306
12324
|
}
|
|
12307
12325
|
if (this.allowTextWrap) {
|
|
12308
12326
|
this.calculateWrap(liEle);
|
|
@@ -13565,8 +13583,6 @@ let TreeView = TreeView_1 = class TreeView extends Component {
|
|
|
13565
13583
|
if (this.expandOnType !== 'None') {
|
|
13566
13584
|
this.wireExpandOnEvent(true);
|
|
13567
13585
|
}
|
|
13568
|
-
EventHandler.add(this.element, 'focus', this.focusIn, this);
|
|
13569
|
-
EventHandler.add(this.element, 'blur', this.focusOut, this);
|
|
13570
13586
|
EventHandler.add(this.element, 'mouseover', this.onMouseOver, this);
|
|
13571
13587
|
EventHandler.add(this.element, 'mouseout', this.onMouseLeave, this);
|
|
13572
13588
|
this.keyboardModule = new KeyboardEvents(this.element, {
|
|
@@ -13579,8 +13595,6 @@ let TreeView = TreeView_1 = class TreeView extends Component {
|
|
|
13579
13595
|
EventHandler.remove(this.element, 'mousedown', this.mouseDownHandler);
|
|
13580
13596
|
this.wireClickEvent(false);
|
|
13581
13597
|
this.wireExpandOnEvent(false);
|
|
13582
|
-
EventHandler.remove(this.element, 'focus', this.focusIn);
|
|
13583
|
-
EventHandler.remove(this.element, 'blur', this.focusOut);
|
|
13584
13598
|
EventHandler.remove(this.element, 'mouseover', this.onMouseOver);
|
|
13585
13599
|
EventHandler.remove(this.element, 'mouseout', this.onMouseLeave);
|
|
13586
13600
|
if (!this.disabled) {
|
|
@@ -14067,7 +14081,6 @@ let TreeView = TreeView_1 = class TreeView extends Component {
|
|
|
14067
14081
|
destroy() {
|
|
14068
14082
|
this.clearTemplate();
|
|
14069
14083
|
this.element.removeAttribute('aria-activedescendant');
|
|
14070
|
-
this.element.removeAttribute('tabindex');
|
|
14071
14084
|
this.unWireEvents();
|
|
14072
14085
|
this.wireEditingEvents(false);
|
|
14073
14086
|
if (!this.disabled) {
|
|
@@ -15371,6 +15384,7 @@ let Breadcrumb = class Breadcrumb extends Component {
|
|
|
15371
15384
|
*/
|
|
15372
15385
|
constructor(options, element) {
|
|
15373
15386
|
super(options, element);
|
|
15387
|
+
this.isPopupCreated = false;
|
|
15374
15388
|
}
|
|
15375
15389
|
/**
|
|
15376
15390
|
* @private
|
|
@@ -15809,13 +15823,14 @@ let Breadcrumb = class Breadcrumb extends Component {
|
|
|
15809
15823
|
this.isExpanded = true;
|
|
15810
15824
|
this.reRenderItems();
|
|
15811
15825
|
}
|
|
15812
|
-
if (e.target.classList.contains(MENUCLASS)) {
|
|
15826
|
+
if (e.target.classList.contains(MENUCLASS) && !this.isPopupCreated) {
|
|
15813
15827
|
this.renderPopup();
|
|
15814
15828
|
}
|
|
15815
15829
|
}
|
|
15816
15830
|
renderPopup() {
|
|
15817
15831
|
const wrapper = this.createElement('div', { className: POPUPCLASS + ' ' + this.cssClass + (this.enableRtl ? ' e-rtl' : '') });
|
|
15818
15832
|
document.body.appendChild(wrapper);
|
|
15833
|
+
this.isPopupCreated = true;
|
|
15819
15834
|
this.popupObj = new Popup(wrapper, {
|
|
15820
15835
|
content: this.popupUl,
|
|
15821
15836
|
relateTo: this.element.querySelector(DOT + MENUCLASS),
|
|
@@ -15833,6 +15848,7 @@ let Breadcrumb = class Breadcrumb extends Component {
|
|
|
15833
15848
|
if (this.overflowMode === 'Menu' && this.popupObj && this.popupObj.element.classList.contains('e-popup-open') && !closest(e.target, DOT + MENUCLASS)) {
|
|
15834
15849
|
this.popupObj.hide();
|
|
15835
15850
|
this.popupObj.destroy();
|
|
15851
|
+
this.isPopupCreated = false;
|
|
15836
15852
|
detach(this.popupObj.element);
|
|
15837
15853
|
}
|
|
15838
15854
|
}
|