@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.
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * filename: index.d.ts
3
- * version : 20.4.51
3
+ * version : 20.4.53
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.52",
4
4
  "_inBundle": false,
5
- "_integrity": "sha512-rX8KgboFWrQ9npRnVSG+EDY7IbrsEI2NrKmq/EogWx5hsQrTbix1pxivr+eHxaz7YdpFZx4izzAL7dmBENJXZg==",
5
+ "_integrity": "sha512-VSeYC7Nk6oBvvTGB4FVtt37OASfO07aqnLNPE05P6D+6cz/67BRIrkn4CNTZ5OTX0HQduHzzWd9FONQ1Nkp/HA==",
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.52.tgz",
42
+ "_shasum": "1eba02ebec2a726b68d1a78846802f797e73eacf",
43
43
  "_spec": "@syncfusion/ej2-navigations@*",
44
44
  "_where": "/jenkins/workspace/ease-automation_release_19.1.0.1/packages/included",
45
45
  "author": {
@@ -51,11 +51,11 @@
51
51
  "bundleDependencies": false,
52
52
  "dependencies": {
53
53
  "@syncfusion/ej2-base": "~20.4.51",
54
- "@syncfusion/ej2-buttons": "~20.4.50",
54
+ "@syncfusion/ej2-buttons": "~20.4.53",
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.53"
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.53",
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;
package/src/tab/tab.js CHANGED
@@ -1849,6 +1849,21 @@ var Tab = /** @class */ (function (_super) {
1849
1849
  _this.refreshActiveBorder();
1850
1850
  var cntTrg = select('#' + CLS_CONTENT + _this.tabId + '_' + _this.extIndex(trg.id), select('.' + CLS_CONTENT, _this.element));
1851
1851
  if (!isNOU(cntTrg)) {
1852
+ var registeredTemplate = _this.registeredTemplate;
1853
+ if (registeredTemplate && registeredTemplate.content) {
1854
+ var templateToClear = [];
1855
+ for (var i = 0; i < registeredTemplate.content.length; i++) {
1856
+ var registeredItem = registeredTemplate.content[i].rootNodes[0];
1857
+ var closestItem = closest(registeredItem, '.' + CLS_ITEM);
1858
+ if (!isNullOrUndefined(registeredItem) && closestItem === cntTrg) {
1859
+ templateToClear.push(registeredTemplate.content[i]);
1860
+ break;
1861
+ }
1862
+ }
1863
+ if (templateToClear.length > 0) {
1864
+ _this.clearTemplate(['content'], templateToClear);
1865
+ }
1866
+ }
1852
1867
  detach(cntTrg);
1853
1868
  }
1854
1869
  _this.trigger('removed', tabRemovingArgs);
@@ -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("tabindex", "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);
@@ -3046,7 +3058,7 @@ var TreeView = /** @class */ (function (_super) {
3046
3058
  });
3047
3059
  this.dropObj = new Droppable(this.element, {
3048
3060
  out: function (e) {
3049
- if (!isNOU(e) && !e.target.classList.contains(SIBLING)) {
3061
+ if (!isNOU(e) && !e.target.classList.contains(SIBLING) && (_this.dropObj.dragData.default && _this.dropObj.dragData.default.helper.classList.contains(ROOT))) {
3050
3062
  document.body.style.cursor = 'not-allowed';
3051
3063
  }
3052
3064
  },
@@ -3745,15 +3757,29 @@ var TreeView = /** @class */ (function (_super) {
3745
3757
  }
3746
3758
  }
3747
3759
  if (!refNode && ((this.sortOrder === 'Ascending') || (this.sortOrder === 'Descending'))) {
3748
- var cNodes = dropUl.childNodes;
3749
- for (var i = 0; i < li.length; i++) {
3750
- for (var j = 0; j < cNodes.length; j++) {
3751
- var returnValue = (this.sortOrder === 'Ascending') ? cNodes[j].textContent.toUpperCase() > li[i].innerText.toUpperCase() : cNodes[j].textContent.toUpperCase() < li[i].innerText.toUpperCase();
3752
- if (returnValue) {
3753
- dropUl.insertBefore(li[i], cNodes[j]);
3754
- break;
3760
+ if (dropUl.childNodes.length === 0) {
3761
+ for (var i = 0; i < li.length; i++) {
3762
+ dropUl.insertBefore(li[i], refNode);
3763
+ }
3764
+ if (this.dataType === 1 && !isNullOrUndefined(dropLi) && !isNOU(this.element.offsetParent) && !this.element.offsetParent.parentElement.classList.contains('e-filemanager')) {
3765
+ this.preventExpand = false;
3766
+ var dropIcon = select('div.' + ICON, dropLi);
3767
+ if (dropIcon && dropIcon.classList.contains(EXPANDABLE)) {
3768
+ this.expandAction(dropLi, dropIcon, null);
3769
+ }
3770
+ }
3771
+ }
3772
+ else {
3773
+ var cNodes = dropUl.childNodes;
3774
+ for (var i = 0; i < li.length; i++) {
3775
+ for (var j = 0; j < cNodes.length; j++) {
3776
+ var returnValue = (this.sortOrder === 'Ascending') ? cNodes[j].textContent.toUpperCase() > li[i].innerText.toUpperCase() : cNodes[j].textContent.toUpperCase() < li[i].innerText.toUpperCase();
3777
+ if (returnValue) {
3778
+ dropUl.insertBefore(li[i], cNodes[j]);
3779
+ break;
3780
+ }
3781
+ dropUl.insertBefore(li[i], cNodes[cNodes.length]);
3755
3782
  }
3756
- dropUl.insertBefore(li[i], cNodes[cNodes.length]);
3757
3783
  }
3758
3784
  }
3759
3785
  }
@@ -4124,8 +4150,6 @@ var TreeView = /** @class */ (function (_super) {
4124
4150
  if (this.expandOnType !== 'None') {
4125
4151
  this.wireExpandOnEvent(true);
4126
4152
  }
4127
- EventHandler.add(this.element, 'focus', this.focusIn, this);
4128
- EventHandler.add(this.element, 'blur', this.focusOut, this);
4129
4153
  EventHandler.add(this.element, 'mouseover', this.onMouseOver, this);
4130
4154
  EventHandler.add(this.element, 'mouseout', this.onMouseLeave, this);
4131
4155
  this.keyboardModule = new KeyboardEvents(this.element, {
@@ -4138,8 +4162,6 @@ var TreeView = /** @class */ (function (_super) {
4138
4162
  EventHandler.remove(this.element, 'mousedown', this.mouseDownHandler);
4139
4163
  this.wireClickEvent(false);
4140
4164
  this.wireExpandOnEvent(false);
4141
- EventHandler.remove(this.element, 'focus', this.focusIn);
4142
- EventHandler.remove(this.element, 'blur', this.focusOut);
4143
4165
  EventHandler.remove(this.element, 'mouseover', this.onMouseOver);
4144
4166
  EventHandler.remove(this.element, 'mouseout', this.onMouseLeave);
4145
4167
  if (!this.disabled) {
@@ -4629,7 +4651,6 @@ var TreeView = /** @class */ (function (_super) {
4629
4651
  TreeView.prototype.destroy = function () {
4630
4652
  this.clearTemplate();
4631
4653
  this.element.removeAttribute('aria-activedescendant');
4632
- this.element.removeAttribute('tabindex');
4633
4654
  this.unWireEvents();
4634
4655
  this.wireEditingEvents(false);
4635
4656
  if (!this.disabled) {
@@ -137,7 +137,7 @@ $pager-container-border-radius: 4px !default;
137
137
  $pager-bigger-tripledot-font-size: $pager-tripledot-font-size !default;
138
138
  $pager-active-border: 2px !default;
139
139
  $pager-active-size: solid !default;
140
- $pager-active-color: $primary;
140
+ $pager-active-color: $primary !default;
141
141
  $pager-numeric-icon-padding-with-margin: 7px 10px 7px 10px !default;
142
142
  $pager-focus-bg-color: $table-bg-color-hover !default;
143
143
  $pager-focus-tripledot-padding: $pager-tripledot-padding !default;
@@ -137,7 +137,7 @@ $pager-container-border-radius: 4px !default;
137
137
  $pager-bigger-tripledot-font-size: $pager-tripledot-font-size !default;
138
138
  $pager-active-border: 2px !default;
139
139
  $pager-active-size: solid !default;
140
- $pager-active-color: $primary;
140
+ $pager-active-color: $primary !default;
141
141
  $pager-numeric-icon-padding-with-margin: 7px 10px 7px 10px !default;
142
142
  $pager-focus-bg-color: $table-bg-color-hover !default;
143
143
  $pager-focus-tripledot-padding: $pager-tripledot-padding !default;
@@ -137,7 +137,7 @@ $pager-container-border-radius: 4px !default;
137
137
  $pager-bigger-tripledot-font-size: $pager-tripledot-font-size !default;
138
138
  $pager-active-border: 2px !default;
139
139
  $pager-active-size: solid !default;
140
- $pager-active-color: $primary;
140
+ $pager-active-color: $primary !default;
141
141
  $pager-numeric-icon-padding-with-margin: 7px 10px 7px 10px !default;
142
142
  $pager-focus-bg-color: $table-bg-color-hover !default;
143
143
  $pager-focus-tripledot-padding: $pager-tripledot-padding !default;
@@ -1 +0,0 @@
1
- []
Binary file
Binary file