@syncfusion/ej2-navigations 21.2.3 → 21.2.4

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 : 21.2.3
3
+ * version : 21.2.4
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@21.1.39",
3
+ "_id": "@syncfusion/ej2-navigations@21.2.3",
4
4
  "_inBundle": false,
5
- "_integrity": "sha512-LXURD1NblzCtfWkgSdsnFYKt3LcHcRlWBxoI5dBdb4uio2Ju8Y80X0+taSCjULEMietJhe1xO2D0xbmqgi/txg==",
5
+ "_integrity": "sha512-wkXN1stY02EuXHBfwv7RtsJsFvnKxYNoT74/VZu+Dqe2dMMx1JH8zDLVbjIVflAo3BiDRTKs6erEjJB4ErtUUQ==",
6
6
  "_location": "/@syncfusion/ej2-navigations",
7
7
  "_phantomChildren": {},
8
8
  "_requested": {
@@ -19,6 +19,7 @@
19
19
  "_requiredBy": [
20
20
  "/",
21
21
  "/@syncfusion/ej2",
22
+ "/@syncfusion/ej2-angular-navigations",
22
23
  "/@syncfusion/ej2-charts",
23
24
  "/@syncfusion/ej2-diagrams",
24
25
  "/@syncfusion/ej2-documenteditor",
@@ -31,13 +32,15 @@
31
32
  "/@syncfusion/ej2-kanban",
32
33
  "/@syncfusion/ej2-pdfviewer",
33
34
  "/@syncfusion/ej2-pivotview",
35
+ "/@syncfusion/ej2-react-navigations",
34
36
  "/@syncfusion/ej2-ribbon",
35
37
  "/@syncfusion/ej2-richtexteditor",
36
38
  "/@syncfusion/ej2-schedule",
37
- "/@syncfusion/ej2-spreadsheet"
39
+ "/@syncfusion/ej2-spreadsheet",
40
+ "/@syncfusion/ej2-vue-navigations"
38
41
  ],
39
- "_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-navigations/-/ej2-navigations-21.1.39.tgz",
40
- "_shasum": "c78f848138fe60bf60ae30dde184c1f92cdf8e20",
42
+ "_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-navigations/-/ej2-navigations-21.2.3.tgz",
43
+ "_shasum": "e53c4fd12005ea2d5c63cd9b9b7d97deb07ba785",
41
44
  "_spec": "@syncfusion/ej2-navigations@*",
42
45
  "_where": "/jenkins/workspace/elease-automation_release_21.1.1/packages/included",
43
46
  "author": {
@@ -50,10 +53,10 @@
50
53
  "dependencies": {
51
54
  "@syncfusion/ej2-base": "~21.2.3",
52
55
  "@syncfusion/ej2-buttons": "~21.2.3",
53
- "@syncfusion/ej2-data": "~21.2.3",
54
- "@syncfusion/ej2-inputs": "~21.2.3",
56
+ "@syncfusion/ej2-data": "~21.2.4",
57
+ "@syncfusion/ej2-inputs": "~21.2.4",
55
58
  "@syncfusion/ej2-lists": "~21.2.3",
56
- "@syncfusion/ej2-popups": "~21.2.3"
59
+ "@syncfusion/ej2-popups": "~21.2.4"
57
60
  },
58
61
  "deprecated": false,
59
62
  "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",
@@ -158,6 +161,6 @@
158
161
  "url": "git+https://github.com/syncfusion/ej2-javascript-ui-controls.git"
159
162
  },
160
163
  "typings": "index.d.ts",
161
- "version": "21.2.3",
164
+ "version": "21.2.4",
162
165
  "sideEffects": false
163
166
  }
@@ -356,6 +356,7 @@ export declare abstract class MenuBase extends Component<HTMLUListElement> imple
356
356
  protected openMenu(li: Element, item: MenuItemModel | {
357
357
  [key: string]: Object;
358
358
  }, top?: number, left?: number, e?: MouseEvent | KeyboardEvent, target?: HTMLElement): void;
359
+ private copyObject;
359
360
  private calculateIndentSize;
360
361
  private generatePopup;
361
362
  protected createHeaderContainer(wrapper?: Element): void;
@@ -839,9 +839,29 @@ var MenuBase = /** @class */ (function (_super) {
839
839
  else {
840
840
  this.uList = this.element;
841
841
  this.uList.style.zIndex = getZindexPartial(target ? target : this.element).toString();
842
- this.triggerBeforeOpen(li, this.uList, item, e, top, left, 'none');
842
+ if (isNullOrUndefined(e)) {
843
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
844
+ var ev = document.createEvent('MouseEvents');
845
+ ev.initEvent("click", true, false);
846
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
847
+ var targetEvent = this.copyObject(ev, {});
848
+ targetEvent.target = targetEvent.srcElement = target;
849
+ targetEvent.currentTarget = target;
850
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
851
+ this.triggerBeforeOpen(li, this.uList, item, targetEvent, top, left, 'none');
852
+ }
853
+ else {
854
+ this.triggerBeforeOpen(li, this.uList, item, e, top, left, 'none');
855
+ }
843
856
  }
844
857
  };
858
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
859
+ MenuBase.prototype.copyObject = function (source, destination) {
860
+ for (var prop in source) {
861
+ destination["" + prop] = source["" + prop];
862
+ }
863
+ return destination;
864
+ };
845
865
  MenuBase.prototype.calculateIndentSize = function (ul, li) {
846
866
  var liStyle = getComputedStyle(li);
847
867
  var liIndent = parseInt(liStyle.textIndent, 10);
@@ -2008,7 +2028,7 @@ var MenuBase = /** @class */ (function (_super) {
2008
2028
  }
2009
2029
  idx = navIdx.pop();
2010
2030
  ul = this.getUlByNavIdx(navIdx.length);
2011
- if (ul) {
2031
+ if (ul && !isNullOrUndefined(idx)) {
2012
2032
  if (enable) {
2013
2033
  if (this.isMenu) {
2014
2034
  ul.children[idx].classList.remove(disabled);
package/src/tab/tab.js CHANGED
@@ -385,12 +385,9 @@ var Tab = /** @class */ (function (_super) {
385
385
  var count = this.hdrEle.children.length;
386
386
  var hdrItems = [];
387
387
  for (var i = 0; i < count; i++) {
388
- hdrItems.push(this.hdrEle.children.item(i).innerHTML);
388
+ hdrItems.push(this.hdrEle.children.item(i));
389
389
  }
390
390
  if (count > 0) {
391
- while (this.hdrEle.firstElementChild) {
392
- detach(this.hdrEle.firstElementChild);
393
- }
394
391
  var tabItems_1 = this.createElement('div', { className: CLS_ITEMS });
395
392
  this.hdrEle.appendChild(tabItems_1);
396
393
  hdrItems.forEach(function (item, index) {
@@ -399,7 +396,7 @@ var Tab = /** @class */ (function (_super) {
399
396
  className: CLS_ITEM, id: CLS_ITEM + _this.tabId + '_' + index
400
397
  };
401
398
  var txt = _this.createElement('span', {
402
- className: CLS_TEXT, innerHTML: item, attrs: { 'role': 'presentation' }
399
+ className: CLS_TEXT, attrs: { 'role': 'presentation' }
403
400
  }).outerHTML;
404
401
  var cont = _this.createElement('div', {
405
402
  className: CLS_TEXT_WRAP, innerHTML: txt + _this.btnCls.outerHTML
@@ -408,6 +405,7 @@ var Tab = /** @class */ (function (_super) {
408
405
  className: CLS_WRAP, innerHTML: cont,
409
406
  attrs: { role: 'tab', tabIndex: '-1', 'aria-selected': 'false', 'aria-controls': CLS_CONTENT + _this.tabId + '_' + index, 'aria-disabled': 'false' }
410
407
  });
408
+ wrap.querySelector('.' + CLS_TEXT).appendChild(item);
411
409
  tabItems_1.appendChild(_this.createElement('div', attr));
412
410
  selectAll('.' + CLS_ITEM, tabItems_1)[index].appendChild(wrap);
413
411
  });