@syncfusion/ej2-navigations 19.4.47 → 19.4.48

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 : 19.4.47
3
+ * version : 19.4.48
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@19.4.41",
3
+ "_id": "@syncfusion/ej2-navigations@19.4.47",
4
4
  "_inBundle": false,
5
- "_integrity": "sha512-Z/c9LceqvB6SGuaEdoxz5GYZcHaNxej27OctGjWuVSw/EJe8bTXsQ6Z9QVjyQiOSKkTAwkEnog25t7IM0EitRA==",
5
+ "_integrity": "sha512-LTb63PZzuaEf6SFPuJC4EaXtq5M1pd2K+apxx0jBX1WMQ2ILIV1pAK+//tSJHgolnN7sWzNpOwBn9YvJawa/Fg==",
6
6
  "_location": "/@syncfusion/ej2-navigations",
7
7
  "_phantomChildren": {},
8
8
  "_requested": {
@@ -37,8 +37,8 @@
37
37
  "/@syncfusion/ej2-spreadsheet",
38
38
  "/@syncfusion/ej2-vue-navigations"
39
39
  ],
40
- "_resolved": "http://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-navigations/-/ej2-navigations-19.4.41.tgz",
41
- "_shasum": "2ede11720d2b9ff0a5dacbc580b8abb5db1e0227",
40
+ "_resolved": "http://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-navigations/-/ej2-navigations-19.4.47.tgz",
41
+ "_shasum": "087e17810c50b07a1ac943b32420daa41c8c8e9e",
42
42
  "_spec": "@syncfusion/ej2-navigations@*",
43
43
  "_where": "/jenkins/workspace/automation_release_19.1.0.1-ZPMUBNQ6AUYH6YGEFBPVYMEQLRRW2SLD4XCZ6GATNZJFYJ3RIAOA/packages/included",
44
44
  "author": {
@@ -49,12 +49,12 @@
49
49
  },
50
50
  "bundleDependencies": false,
51
51
  "dependencies": {
52
- "@syncfusion/ej2-base": "~19.4.42",
53
- "@syncfusion/ej2-buttons": "~19.4.42",
54
- "@syncfusion/ej2-data": "~19.4.47",
55
- "@syncfusion/ej2-inputs": "~19.4.47",
56
- "@syncfusion/ej2-lists": "~19.4.38",
57
- "@syncfusion/ej2-popups": "~19.4.47"
52
+ "@syncfusion/ej2-base": "~19.4.48",
53
+ "@syncfusion/ej2-buttons": "~19.4.48",
54
+ "@syncfusion/ej2-data": "~19.4.48",
55
+ "@syncfusion/ej2-inputs": "~19.4.48",
56
+ "@syncfusion/ej2-lists": "~19.4.48",
57
+ "@syncfusion/ej2-popups": "~19.4.48"
58
58
  },
59
59
  "deprecated": false,
60
60
  "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",
@@ -159,6 +159,6 @@
159
159
  "url": "git+https://github.com/syncfusion/ej2-javascript-ui-controls.git"
160
160
  },
161
161
  "typings": "index.d.ts",
162
- "version": "19.4.47",
162
+ "version": "19.4.48",
163
163
  "sideEffects": false
164
164
  }
@@ -160,7 +160,7 @@ var Accordion = /** @class */ (function (_super) {
160
160
  */
161
161
  Accordion.prototype.destroy = function () {
162
162
  var _this = this;
163
- if (this.isReact) {
163
+ if (this.isReact || this.isAngular || this.isVue) {
164
164
  this.clearTemplate();
165
165
  }
166
166
  var ele = this.element;
@@ -172,9 +172,11 @@ var Accordion = /** @class */ (function (_super) {
172
172
  ele.removeChild(el);
173
173
  });
174
174
  if (this.trgtEle) {
175
+ this.trgtEle = null;
175
176
  while (this.ctrlTem.firstElementChild) {
176
177
  ele.appendChild(this.ctrlTem.firstElementChild);
177
178
  }
179
+ this.ctrlTem = null;
178
180
  }
179
181
  ele.classList.remove(CLS_ACRDN_ROOT);
180
182
  ele.removeAttribute('style');
@@ -535,11 +537,13 @@ var Accordion = /** @class */ (function (_super) {
535
537
  else {
536
538
  trgt.click();
537
539
  }
540
+ e.preventDefault();
538
541
  break;
539
542
  case 'home':
540
543
  case 'end':
541
544
  clst = e.action === 'home' ? root.firstElementChild.children[0] : root.lastElementChild.children[0];
542
545
  clst.focus();
546
+ e.preventDefault();
543
547
  break;
544
548
  }
545
549
  };
@@ -554,12 +558,10 @@ var Accordion = /** @class */ (function (_super) {
554
558
  return header;
555
559
  };
556
560
  Accordion.prototype.renderInnerItem = function (item, index) {
557
- var innerEle = this.createElement('div', { className: CLS_ITEM });
558
- innerEle.id = getUniqueID('acrdn_item');
559
- if (isNOU(item.id)) {
560
- item.id = innerEle.id;
561
- }
562
- attributes(innerEle, { 'aria-expanded': 'false', 'role': 'row' });
561
+ var innerEle = this.createElement('div', {
562
+ className: CLS_ITEM, id: item.id || getUniqueID('acrdn_item'),
563
+ attrs: { 'aria-expanded': 'false', 'role': 'row' }
564
+ });
563
565
  if (this.headerTemplate) {
564
566
  var ctnEle = this.headerEleGenerate();
565
567
  var hdrEle = this.createElement('div', { className: CLS_HEADERCTN });
@@ -1163,7 +1165,7 @@ var Accordion = /** @class */ (function (_super) {
1163
1165
  };
1164
1166
  Accordion.prototype.destroyItems = function () {
1165
1167
  this.restoreContent(null);
1166
- if (this.isReact) {
1168
+ if (this.isReact || this.isAngular || this.isVue) {
1167
1169
  this.clearTemplate();
1168
1170
  }
1169
1171
  [].slice.call(this.element.querySelectorAll('.' + CLS_ITEM)).forEach(function (el) {
@@ -379,7 +379,7 @@ export declare abstract class MenuBase extends Component<HTMLUListElement> imple
379
379
  * This method is used to set the menu item in the Menu based on the argument.
380
380
  *
381
381
  * @param {MenuItem} item - item need to be updated.
382
- * @param {string} id - id to be passed to update the item.
382
+ * @param {string} id - id / text to be passed to update the item.
383
383
  * @param {boolean} isUniqueId - Set `true` if it is a unique id.
384
384
  * @returns {void}
385
385
  */
@@ -1494,21 +1494,26 @@ var MenuBase = /** @class */ (function (_super) {
1494
1494
  * This method is used to set the menu item in the Menu based on the argument.
1495
1495
  *
1496
1496
  * @param {MenuItem} item - item need to be updated.
1497
- * @param {string} id - id to be passed to update the item.
1497
+ * @param {string} id - id / text to be passed to update the item.
1498
1498
  * @param {boolean} isUniqueId - Set `true` if it is a unique id.
1499
1499
  * @returns {void}
1500
1500
  */
1501
1501
  MenuBase.prototype.setItem = function (item, id, isUniqueId) {
1502
- var idx = id ? id : item.id;
1503
- var isText = (isUniqueId === false) ? false : true;
1504
- var navIdx = this.getIndex(idx, isText);
1502
+ var idx;
1503
+ if (isUniqueId) {
1504
+ idx = id ? id : item.id;
1505
+ }
1506
+ else {
1507
+ idx = id ? id : item.text;
1508
+ }
1509
+ var navIdx = this.getIndex(idx, isUniqueId);
1505
1510
  var newItem = this.getItem(navIdx);
1506
- newItem.iconCss = item.iconCss;
1507
- newItem.id = item.id;
1508
- newItem.text = item.text;
1509
- newItem.url = item.url;
1510
- newItem.separator = item.separator;
1511
- newItem.items = item.items;
1511
+ newItem.id = item.id || newItem.id;
1512
+ newItem.iconCss = item.iconCss || newItem.iconCss;
1513
+ newItem.text = item.text || newItem.text;
1514
+ newItem.url = item.url || newItem.url;
1515
+ newItem.separator = item.separator || newItem.separator;
1516
+ newItem.items = item.items || newItem.items;
1512
1517
  };
1513
1518
  MenuBase.prototype.getItem = function (navIdx) {
1514
1519
  navIdx = navIdx.slice();
package/src/tab/tab.js CHANGED
@@ -838,6 +838,7 @@ var Tab = /** @class */ (function (_super) {
838
838
  };
839
839
  Tab.prototype.getContent = function (ele, cnt, callType, index) {
840
840
  var eleStr;
841
+ cnt = isNOU(cnt) ? "" : cnt;
841
842
  if (typeof cnt === 'string' || isNOU(cnt.innerHTML)) {
842
843
  if (typeof cnt === 'string' && this.enableHtmlSanitizer) {
843
844
  cnt = SanitizeHtmlHelper.sanitize(cnt);
@@ -174,7 +174,7 @@ var Toolbar = /** @class */ (function (_super) {
174
174
  */
175
175
  Toolbar.prototype.destroy = function () {
176
176
  var _this = this;
177
- if (this.isReact) {
177
+ if (this.isReact || this.isAngular) {
178
178
  this.clearTemplate();
179
179
  }
180
180
  var btnItems = this.element.querySelectorAll('.e-control.e-btn');
@@ -183,20 +183,28 @@ var Toolbar = /** @class */ (function (_super) {
183
183
  el.ej2_instances[0].destroy();
184
184
  }
185
185
  });
186
- _super.prototype.destroy.call(this);
187
186
  this.unwireEvents();
188
187
  this.tempId.forEach(function (ele) {
189
188
  if (!isNOU(_this.element.querySelector(ele))) {
190
189
  document.body.appendChild(_this.element.querySelector(ele)).style.display = 'none';
191
190
  }
192
191
  });
192
+ this.destroyItems();
193
193
  while (this.element.lastElementChild) {
194
194
  this.element.removeChild(this.element.lastElementChild);
195
195
  }
196
196
  if (this.trgtEle) {
197
197
  this.element.appendChild(this.ctrlTem);
198
+ this.trgtEle = null;
199
+ this.ctrlTem = null;
200
+ }
201
+ if (this.popObj) {
202
+ this.popObj.destroy();
203
+ detach(this.popObj.element);
204
+ }
205
+ if (this.activeEle) {
206
+ this.activeEle = null;
198
207
  }
199
- this.clearProperty();
200
208
  this.popObj = null;
201
209
  this.tbarAlign = null;
202
210
  this.remove(this.element, 'e-toolpop');
@@ -207,6 +215,7 @@ var Toolbar = /** @class */ (function (_super) {
207
215
  ['aria-disabled', 'aria-orientation', 'aria-haspopup', 'role'].forEach(function (attrb) {
208
216
  return _this.element.removeAttribute(attrb);
209
217
  });
218
+ _super.prototype.destroy.call(this);
210
219
  };
211
220
  /**
212
221
  * Initialize the event handler
@@ -296,8 +305,8 @@ var Toolbar = /** @class */ (function (_super) {
296
305
  if (this.element) {
297
306
  [].slice.call(this.element.querySelectorAll('.' + CLS_ITEM)).forEach(function (el) { detach(el); });
298
307
  }
299
- var tbarItems = this.element.querySelector('.' + CLS_ITEMS);
300
308
  if (this.tbarAlign) {
309
+ var tbarItems = this.element.querySelector('.' + CLS_ITEMS);
301
310
  [].slice.call(tbarItems.children).forEach(function (el) {
302
311
  detach(el);
303
312
  });
@@ -381,6 +390,10 @@ var Toolbar = /** @class */ (function (_super) {
381
390
  case 'end':
382
391
  if (clst) {
383
392
  var popupCheck = closest(clst, '.e-popup');
393
+ var extendedPopup = this.element.querySelector('.' + CLS_EXTENDABLECLASS);
394
+ if (this.overflowMode === 'Extended' && extendedPopup && extendedPopup.classList.contains('e-popup-open')) {
395
+ popupCheck = e.action === 'end' ? extendedPopup : null;
396
+ }
384
397
  if (popupCheck) {
385
398
  if (isVisible(this.popObj.element)) {
386
399
  nodes = [].slice.call(popupCheck.children);
@@ -393,7 +406,7 @@ var Toolbar = /** @class */ (function (_super) {
393
406
  }
394
407
  }
395
408
  else {
396
- nodes = this.element.querySelectorAll('.' + CLS_ITEMS + ' .' + CLS_ITEM);
409
+ nodes = this.element.querySelectorAll('.' + CLS_ITEMS + ' .' + CLS_ITEM + ':not(.' + CLS_SEPARATOR + ')');
397
410
  if (e.action === 'home') {
398
411
  ele = nodes[0];
399
412
  }
@@ -1937,7 +1950,7 @@ var Toolbar = /** @class */ (function (_super) {
1937
1950
  };
1938
1951
  Toolbar.prototype.itemsRerender = function (newProp) {
1939
1952
  this.items = this.tbarItemsCol;
1940
- if (this.isReact) {
1953
+ if (this.isReact || this.isAngular) {
1941
1954
  this.clearTemplate();
1942
1955
  }
1943
1956
  this.destroyMode();