@syncfusion/ej2-navigations 20.4.51 → 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.
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * filename: index.d.ts
3
- * version : 20.4.51
3
+ * version : 20.4.52
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-navigations@*",
3
- "_id": "@syncfusion/ej2-navigations@20.4.49",
3
+ "_id": "@syncfusion/ej2-navigations@20.4.51",
4
4
  "_inBundle": false,
5
- "_integrity": "sha512-rX8KgboFWrQ9npRnVSG+EDY7IbrsEI2NrKmq/EogWx5hsQrTbix1pxivr+eHxaz7YdpFZx4izzAL7dmBENJXZg==",
5
+ "_integrity": "sha512-Q8VMoyJrQ0tCiJxta0IDxJQ24N7zIDVLNct8uCnBwIkv62ew/RJ5/9/E2yADfBJamQ+nTlcwqWVpp5OmDAIuog==",
6
6
  "_location": "/@syncfusion/ej2-navigations",
7
7
  "_phantomChildren": {},
8
8
  "_requested": {
@@ -38,8 +38,8 @@
38
38
  "/@syncfusion/ej2-spreadsheet",
39
39
  "/@syncfusion/ej2-vue-navigations"
40
40
  ],
41
- "_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-navigations/-/ej2-navigations-20.4.49.tgz",
42
- "_shasum": "37c8a37b4c1c6c112ae6e12f2ccf4ee129538dbf",
41
+ "_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-navigations/-/ej2-navigations-20.4.51.tgz",
42
+ "_shasum": "d49a33648a6e91d4683c4da0c4043d5ad6e2fc64",
43
43
  "_spec": "@syncfusion/ej2-navigations@*",
44
44
  "_where": "/jenkins/workspace/ease-automation_release_19.1.0.1/packages/included",
45
45
  "author": {
@@ -53,9 +53,9 @@
53
53
  "@syncfusion/ej2-base": "~20.4.51",
54
54
  "@syncfusion/ej2-buttons": "~20.4.50",
55
55
  "@syncfusion/ej2-data": "~20.4.48",
56
- "@syncfusion/ej2-inputs": "~20.4.51",
56
+ "@syncfusion/ej2-inputs": "~20.4.52",
57
57
  "@syncfusion/ej2-lists": "~20.4.50",
58
- "@syncfusion/ej2-popups": "~20.4.51"
58
+ "@syncfusion/ej2-popups": "~20.4.52"
59
59
  },
60
60
  "deprecated": false,
61
61
  "description": "A package of Essential JS 2 navigation components such as Tree-view, Tab, Toolbar, Context-menu, and Accordion which is used to navigate from one page to another",
@@ -160,6 +160,6 @@
160
160
  "url": "git+https://github.com/syncfusion/ej2-javascript-ui-controls.git"
161
161
  },
162
162
  "typings": "index.d.ts",
163
- "version": "20.4.51",
163
+ "version": "20.4.52",
164
164
  "sideEffects": false
165
165
  }
@@ -85,6 +85,7 @@ export declare class Breadcrumb extends Component<HTMLElement> implements INotif
85
85
  private popupObj;
86
86
  private popupUl;
87
87
  private delegateClickHanlder;
88
+ private isPopupCreated;
88
89
  /**
89
90
  * Defines the Url based on which the Breadcrumb items are generated.
90
91
  *
@@ -75,7 +75,9 @@ var Breadcrumb = /** @class */ (function (_super) {
75
75
  * @param {string | HTMLElement} element - Specifies the element.
76
76
  */
77
77
  function Breadcrumb(options, element) {
78
- return _super.call(this, options, element) || this;
78
+ var _this = _super.call(this, options, element) || this;
79
+ _this.isPopupCreated = false;
80
+ return _this;
79
81
  }
80
82
  /**
81
83
  * @private
@@ -516,7 +518,7 @@ var Breadcrumb = /** @class */ (function (_super) {
516
518
  this.isExpanded = true;
517
519
  this.reRenderItems();
518
520
  }
519
- if (e.target.classList.contains(MENUCLASS)) {
521
+ if (e.target.classList.contains(MENUCLASS) && !this.isPopupCreated) {
520
522
  this.renderPopup();
521
523
  }
522
524
  };
@@ -524,6 +526,7 @@ var Breadcrumb = /** @class */ (function (_super) {
524
526
  var _this = this;
525
527
  var wrapper = this.createElement('div', { className: POPUPCLASS + ' ' + this.cssClass + (this.enableRtl ? ' e-rtl' : '') });
526
528
  document.body.appendChild(wrapper);
529
+ this.isPopupCreated = true;
527
530
  this.popupObj = new Popup(wrapper, {
528
531
  content: this.popupUl,
529
532
  relateTo: this.element.querySelector(DOT + MENUCLASS),
@@ -541,6 +544,7 @@ var Breadcrumb = /** @class */ (function (_super) {
541
544
  if (this.overflowMode === 'Menu' && this.popupObj && this.popupObj.element.classList.contains('e-popup-open') && !closest(e.target, DOT + MENUCLASS)) {
542
545
  this.popupObj.hide();
543
546
  this.popupObj.destroy();
547
+ this.isPopupCreated = false;
544
548
  detach(this.popupObj.element);
545
549
  }
546
550
  };
@@ -1049,6 +1049,9 @@ var MenuBase = /** @class */ (function (_super) {
1049
1049
  return;
1050
1050
  }
1051
1051
  var iconLi = menu.querySelector('.e-menu-item:not(.e-blankicon):not(.e-separator)');
1052
+ if (!iconLi) {
1053
+ return;
1054
+ }
1052
1055
  var icon = iconLi.querySelector('.e-menu-icon');
1053
1056
  if (!icon) {
1054
1057
  return;
@@ -536,6 +536,7 @@ export declare class TreeView extends Component<HTMLElement> implements INotifyP
536
536
  private isNodeDropped;
537
537
  private isInteracted;
538
538
  private isRightClick;
539
+ private mouseDownStatus;
539
540
  /**
540
541
  * Indicates whether the TreeView allows drag and drop of nodes. To drag and drop a node in
541
542
  * desktop, hold the mouse on the node, drag it to the target node and drop the node by releasing
@@ -1196,7 +1197,6 @@ export declare class TreeView extends Component<HTMLElement> implements INotifyP
1196
1197
  private wireEditingEvents;
1197
1198
  private wireClickEvent;
1198
1199
  private wireExpandOnEvent;
1199
- private mouseDownStatus;
1200
1200
  private mouseDownHandler;
1201
1201
  private preventContextMenu;
1202
1202
  private wireEvents;
@@ -340,7 +340,6 @@ var TreeView = /** @class */ (function (_super) {
340
340
  };
341
341
  TreeView.prototype.initialize = function () {
342
342
  this.element.setAttribute('role', 'tree');
343
- this.element.setAttribute('tabindex', '0');
344
343
  this.element.setAttribute('aria-activedescendant', this.element.id + '_active');
345
344
  this.setCssClass(null, this.cssClass);
346
345
  this.setEnableRtl();
@@ -781,6 +780,8 @@ var TreeView = /** @class */ (function (_super) {
781
780
  var fields = e.fields;
782
781
  this.addActionClass(e, fields.selected, SELECTED);
783
782
  this.addActionClass(e, fields.expanded, EXPANDED);
783
+ e.item.setAttribute("tabindex", "-1");
784
+ EventHandler.add(e.item, 'focus', this.focusIn, this);
784
785
  if (!isNOU(this.nodeTemplateFn)) {
785
786
  var textEle = e.item.querySelector('.' + LISTTEXT);
786
787
  var dataId = e.item.getAttribute('data-uid');
@@ -1342,7 +1343,7 @@ var TreeView = /** @class */ (function (_super) {
1342
1343
  this.setMultiSelect(this.allowMultiSelection);
1343
1344
  var firstNode = select('.' + LISTITEM, this.element);
1344
1345
  if (firstNode) {
1345
- addClass([firstNode], FOCUS);
1346
+ firstNode.setAttribute('tabindex', '0');
1346
1347
  this.updateIdAttr(null, firstNode);
1347
1348
  }
1348
1349
  if (this.allowTextWrap) {
@@ -2003,7 +2004,6 @@ var TreeView = /** @class */ (function (_super) {
2003
2004
  this.startNode = li;
2004
2005
  this.addSelect(li);
2005
2006
  }
2006
- this.setFocusElement(li);
2007
2007
  if (this.isLoaded) {
2008
2008
  eventArgs.nodeData = this.getNodeData(li);
2009
2009
  this.trigger('nodeSelected', eventArgs);
@@ -2038,8 +2038,11 @@ var TreeView = /** @class */ (function (_super) {
2038
2038
  var focusedNode = this.getFocusedNode();
2039
2039
  if (focusedNode) {
2040
2040
  removeClass([focusedNode], FOCUS);
2041
+ focusedNode.setAttribute("tabindex", "-1");
2041
2042
  }
2042
2043
  addClass([li], FOCUS);
2044
+ li.setAttribute('tabindex', '0');
2045
+ EventHandler.add(li, 'blur', this.focusOut, this);
2043
2046
  this.updateIdAttr(focusedNode, li);
2044
2047
  }
2045
2048
  };
@@ -2164,14 +2167,10 @@ var TreeView = /** @class */ (function (_super) {
2164
2167
  var inpEle = target;
2165
2168
  if (e.action === 'enter') {
2166
2169
  inpEle.blur();
2167
- this.element.focus();
2168
- addClass([focusedNode], HOVER);
2169
2170
  }
2170
2171
  else if (e.action === 'escape') {
2171
2172
  inpEle.value = this.oldText;
2172
2173
  inpEle.blur();
2173
- this.element.focus();
2174
- addClass([focusedNode], HOVER);
2175
2174
  }
2176
2175
  return;
2177
2176
  }
@@ -2555,7 +2554,7 @@ var TreeView = /** @class */ (function (_super) {
2555
2554
  };
2556
2555
  TreeView.prototype.getFocusedNode = function () {
2557
2556
  var selectedItem;
2558
- var fNode = select('.' + LISTITEM + '.' + FOCUS, this.element);
2557
+ var fNode = select('.' + LISTITEM + '[tabindex="0"]', this.element);
2559
2558
  if (isNOU(fNode)) {
2560
2559
  selectedItem = select('.' + LISTITEM, this.element);
2561
2560
  }
@@ -2625,8 +2624,12 @@ var TreeView = /** @class */ (function (_super) {
2625
2624
  };
2626
2625
  TreeView.prototype.setFocus = function (preNode, nextNode) {
2627
2626
  removeClass([preNode], [HOVER, FOCUS]);
2627
+ preNode.setAttribute("tabindex", "-1");
2628
2628
  if (!nextNode.classList.contains('e-disable') && !nextNode.classList.contains(PREVENTSELECT)) {
2629
2629
  addClass([nextNode], [HOVER, FOCUS]);
2630
+ nextNode.setAttribute('tabindex', '0');
2631
+ nextNode.focus();
2632
+ EventHandler.add(nextNode, 'blur', this.focusOut, this);
2630
2633
  this.updateIdAttr(preNode, nextNode);
2631
2634
  }
2632
2635
  };
@@ -2640,12 +2643,19 @@ var TreeView = /** @class */ (function (_super) {
2640
2643
  };
2641
2644
  TreeView.prototype.focusIn = function () {
2642
2645
  if (!this.mouseDownStatus) {
2643
- addClass([this.getFocusedNode()], HOVER);
2646
+ var focusedElement = this.getFocusedNode();
2647
+ focusedElement.setAttribute("tanindex", "0");
2648
+ addClass([focusedElement], [HOVER, FOCUS]);
2649
+ EventHandler.add(focusedElement, 'blur', this.focusOut, this);
2644
2650
  }
2645
2651
  this.mouseDownStatus = false;
2646
2652
  };
2647
- TreeView.prototype.focusOut = function () {
2648
- removeClass([this.getFocusedNode()], HOVER);
2653
+ TreeView.prototype.focusOut = function (event) {
2654
+ var focusedElement = this.getFocusedNode();
2655
+ if (event.target == focusedElement) {
2656
+ removeClass([focusedElement], [HOVER, FOCUS]);
2657
+ EventHandler.remove(focusedElement, 'blur', this.focusOut);
2658
+ }
2649
2659
  };
2650
2660
  TreeView.prototype.onMouseOver = function (e) {
2651
2661
  var target = e.target;
@@ -2853,7 +2863,9 @@ var TreeView = /** @class */ (function (_super) {
2853
2863
  }
2854
2864
  if (isInput) {
2855
2865
  removeClass([liEle], EDITING);
2856
- txtEle.focus();
2866
+ liEle.focus();
2867
+ EventHandler.add(liEle, 'blur', this.focusOut, this);
2868
+ addClass([liEle], HOVER);
2857
2869
  }
2858
2870
  if (this.allowTextWrap) {
2859
2871
  this.calculateWrap(liEle);
@@ -4124,8 +4136,6 @@ var TreeView = /** @class */ (function (_super) {
4124
4136
  if (this.expandOnType !== 'None') {
4125
4137
  this.wireExpandOnEvent(true);
4126
4138
  }
4127
- EventHandler.add(this.element, 'focus', this.focusIn, this);
4128
- EventHandler.add(this.element, 'blur', this.focusOut, this);
4129
4139
  EventHandler.add(this.element, 'mouseover', this.onMouseOver, this);
4130
4140
  EventHandler.add(this.element, 'mouseout', this.onMouseLeave, this);
4131
4141
  this.keyboardModule = new KeyboardEvents(this.element, {
@@ -4138,8 +4148,6 @@ var TreeView = /** @class */ (function (_super) {
4138
4148
  EventHandler.remove(this.element, 'mousedown', this.mouseDownHandler);
4139
4149
  this.wireClickEvent(false);
4140
4150
  this.wireExpandOnEvent(false);
4141
- EventHandler.remove(this.element, 'focus', this.focusIn);
4142
- EventHandler.remove(this.element, 'blur', this.focusOut);
4143
4151
  EventHandler.remove(this.element, 'mouseover', this.onMouseOver);
4144
4152
  EventHandler.remove(this.element, 'mouseout', this.onMouseLeave);
4145
4153
  if (!this.disabled) {
@@ -4629,7 +4637,6 @@ var TreeView = /** @class */ (function (_super) {
4629
4637
  TreeView.prototype.destroy = function () {
4630
4638
  this.clearTemplate();
4631
4639
  this.element.removeAttribute('aria-activedescendant');
4632
- this.element.removeAttribute('tabindex');
4633
4640
  this.unWireEvents();
4634
4641
  this.wireEditingEvents(false);
4635
4642
  if (!this.disabled) {