@syncfusion/ej2-navigations 21.2.3 → 21.2.5

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.5
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.4",
4
4
  "_inBundle": false,
5
- "_integrity": "sha512-LXURD1NblzCtfWkgSdsnFYKt3LcHcRlWBxoI5dBdb4uio2Ju8Y80X0+taSCjULEMietJhe1xO2D0xbmqgi/txg==",
5
+ "_integrity": "sha512-tNqo7fwXnp6YNAF+gVKLJwXJK2dL+l1taEvIzEwjIvBLxKDnPcIXQkPD/mA5L+/Dm2dVRrLm8B0EB4n43UyPiQ==",
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.4.tgz",
43
+ "_shasum": "f4bd273deb7fef77a35df8828162db349c176394",
41
44
  "_spec": "@syncfusion/ej2-navigations@*",
42
45
  "_where": "/jenkins/workspace/elease-automation_release_21.1.1/packages/included",
43
46
  "author": {
@@ -49,11 +52,11 @@
49
52
  "bundleDependencies": false,
50
53
  "dependencies": {
51
54
  "@syncfusion/ej2-base": "~21.2.3",
52
- "@syncfusion/ej2-buttons": "~21.2.3",
53
- "@syncfusion/ej2-data": "~21.2.3",
54
- "@syncfusion/ej2-inputs": "~21.2.3",
55
+ "@syncfusion/ej2-buttons": "~21.2.5",
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.5",
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
@@ -357,15 +357,6 @@ var Tab = /** @class */ (function (_super) {
357
357
  this.setContentHeight(true);
358
358
  this.select(this.selectedItem);
359
359
  }
360
- this.tbItem = selectAll('.' + CLS_TB_ITEM, this.hdrEle);
361
- if (!isNOU(this.tbItem)) {
362
- for (var i = 0; i < this.items.length; i++) {
363
- if (this.tbItem[i]) {
364
- var tabID = this.items[i].id;
365
- this.tbItem[i].setAttribute('data-id', tabID);
366
- }
367
- }
368
- }
369
360
  this.setRTL(this.enableRtl);
370
361
  }
371
362
  };
@@ -385,12 +376,9 @@ var Tab = /** @class */ (function (_super) {
385
376
  var count = this.hdrEle.children.length;
386
377
  var hdrItems = [];
387
378
  for (var i = 0; i < count; i++) {
388
- hdrItems.push(this.hdrEle.children.item(i).innerHTML);
379
+ hdrItems.push(this.hdrEle.children.item(i));
389
380
  }
390
381
  if (count > 0) {
391
- while (this.hdrEle.firstElementChild) {
392
- detach(this.hdrEle.firstElementChild);
393
- }
394
382
  var tabItems_1 = this.createElement('div', { className: CLS_ITEMS });
395
383
  this.hdrEle.appendChild(tabItems_1);
396
384
  hdrItems.forEach(function (item, index) {
@@ -399,7 +387,7 @@ var Tab = /** @class */ (function (_super) {
399
387
  className: CLS_ITEM, id: CLS_ITEM + _this.tabId + '_' + index
400
388
  };
401
389
  var txt = _this.createElement('span', {
402
- className: CLS_TEXT, innerHTML: item, attrs: { 'role': 'presentation' }
390
+ className: CLS_TEXT, attrs: { 'role': 'presentation' }
403
391
  }).outerHTML;
404
392
  var cont = _this.createElement('div', {
405
393
  className: CLS_TEXT_WRAP, innerHTML: txt + _this.btnCls.outerHTML
@@ -408,6 +396,7 @@ var Tab = /** @class */ (function (_super) {
408
396
  className: CLS_WRAP, innerHTML: cont,
409
397
  attrs: { role: 'tab', tabIndex: '-1', 'aria-selected': 'false', 'aria-controls': CLS_CONTENT + _this.tabId + '_' + index, 'aria-disabled': 'false' }
410
398
  });
399
+ wrap.querySelector('.' + CLS_TEXT).appendChild(item);
411
400
  tabItems_1.appendChild(_this.createElement('div', attr));
412
401
  selectAll('.' + CLS_ITEM, tabItems_1)[index].appendChild(wrap);
413
402
  });
@@ -547,7 +536,7 @@ var Tab = /** @class */ (function (_super) {
547
536
  _this.itemIndexArray.splice((index + i), 0, CLS_ITEM + _this.tabId + '_' + _this.lastIndex);
548
537
  }
549
538
  var attrObj = {
550
- id: CLS_ITEM + _this.tabId + '_' + _this.lastIndex
539
+ id: CLS_ITEM + _this.tabId + '_' + _this.lastIndex, 'data-id': item.id
551
540
  };
552
541
  var tItem = { htmlAttributes: attrObj, template: wrap };
553
542
  tItem.cssClass = ((item.cssClass !== undefined) ? item.cssClass : ' ') + ' ' + disabled + ' ' + hidden + ' '
@@ -1631,6 +1620,10 @@ var Tab = /** @class */ (function (_super) {
1631
1620
  };
1632
1621
  this.trigger('onDragStart', dragArgs, function (tabitemDragArgs) {
1633
1622
  if (tabitemDragArgs.cancel) {
1623
+ var dragObj = e.element.ej2_instances[0];
1624
+ if (!isNullOrUndefined(dragObj)) {
1625
+ dragObj.intDestroy(e.event);
1626
+ }
1634
1627
  detach(_this.cloneElement);
1635
1628
  }
1636
1629
  else {
@@ -2965,6 +2965,8 @@ var TreeView = /** @class */ (function (_super) {
2965
2965
  enableTailMode: true, enableAutoScroll: true,
2966
2966
  dragArea: this.dragArea,
2967
2967
  dragTarget: '.' + TEXTWRAP,
2968
+ enableTapHold: true,
2969
+ tapHoldThreshold: 100,
2968
2970
  helper: function (e) {
2969
2971
  _this.dragTarget = e.sender.target;
2970
2972
  var dragRoot = closest(_this.dragTarget, '.' + ROOT);
@@ -3395,7 +3397,10 @@ var TreeView = /** @class */ (function (_super) {
3395
3397
  dropUl.style.display = 'none';
3396
3398
  }
3397
3399
  if (isNOU(dropUl)) {
3398
- this.trigger('nodeExpanding', this.getExpandEvent(dropLi, null));
3400
+ var args = this.expandArgs;
3401
+ if (isNOU(args) || args.name != 'nodeExpanding') {
3402
+ this.trigger('nodeExpanding', this.getExpandEvent(dropLi, null));
3403
+ }
3399
3404
  if (isNOU(dropIcon)) {
3400
3405
  ListBase.generateIcon(this.createElement, dropLi, COLLAPSIBLE, this.listBaseOption);
3401
3406
  }
@@ -3745,6 +3750,7 @@ var TreeView = /** @class */ (function (_super) {
3745
3750
  }
3746
3751
  refNode = dropUl.childNodes[index];
3747
3752
  if (!this.isFirstRender || this.dataType === 1) {
3753
+ var args = this.expandArgs;
3748
3754
  if (refNode || this.sortOrder === 'None') {
3749
3755
  for (var i = 0; i < li.length; i++) {
3750
3756
  dropUl.insertBefore(li[i], refNode);
@@ -3752,7 +3758,7 @@ var TreeView = /** @class */ (function (_super) {
3752
3758
  if (this.dataType === 1 && !isNullOrUndefined(dropLi) && !isNOU(this.element.offsetParent) && !this.element.offsetParent.parentElement.classList.contains('e-filemanager')) {
3753
3759
  this.preventExpand = false;
3754
3760
  var dropIcon = select('div.' + ICON, dropLi);
3755
- if (dropIcon && dropIcon.classList.contains(EXPANDABLE)) {
3761
+ if (dropIcon && dropIcon.classList.contains(EXPANDABLE) && (isNOU(args) || args.name != 'nodeExpanding')) {
3756
3762
  this.expandAction(dropLi, dropIcon, null);
3757
3763
  }
3758
3764
  }
@@ -3765,7 +3771,7 @@ var TreeView = /** @class */ (function (_super) {
3765
3771
  if (this.dataType === 1 && !isNullOrUndefined(dropLi) && !isNOU(this.element.offsetParent) && !this.element.offsetParent.parentElement.classList.contains('e-filemanager')) {
3766
3772
  this.preventExpand = false;
3767
3773
  var dropIcon = select('div.' + ICON, dropLi);
3768
- if (dropIcon && dropIcon.classList.contains(EXPANDABLE)) {
3774
+ if (dropIcon && dropIcon.classList.contains(EXPANDABLE) && (isNOU(args) || args.name != 'nodeExpanding')) {
3769
3775
  this.expandAction(dropLi, dropIcon, null);
3770
3776
  }
3771
3777
  }
@@ -8149,10 +8149,10 @@
8149
8149
  color: rgba(0, 0, 0, 0.54);
8150
8150
  }
8151
8151
  .e-treeview .e-list-item.e-active > .e-text-content {
8152
- color: #cc1351;
8152
+ color: #e3165b;
8153
8153
  }
8154
8154
  .e-treeview .e-list-item.e-active > .e-text-content .e-list-text {
8155
- color: #cc1351;
8155
+ color: #e3165b;
8156
8156
  }
8157
8157
  .e-treeview .e-list-item.e-active > .e-text-content .e-icon-collapsible,
8158
8158
  .e-treeview .e-list-item.e-active > .e-text-content .e-icon-expandable {
@@ -12,7 +12,7 @@ $treeview-text-color: rgba($grey-light-font, .87) !default;
12
12
  $treeview-item-border-color: transparent !default;
13
13
  $treeview-item-active-bg: $grey-200 !default;
14
14
  $treeview-icon-active-color: rgba($grey-light-font, .54) !default;
15
- $treeview-text-active-color: $tree-node-text-color !default;
15
+ $treeview-text-active-color: $accent !default;
16
16
  $treeview-item-active-border-color: $grey-200 !default;
17
17
  $treeview-item-hover-bg: $grey-100 !default;
18
18
  $treeview-icon-hover-color: rgba($grey-light-font, .54) !default;
@@ -619,10 +619,10 @@
619
619
  color: rgba(0, 0, 0, 0.54);
620
620
  }
621
621
  .e-treeview .e-list-item.e-active > .e-text-content {
622
- color: #cc1351;
622
+ color: #e3165b;
623
623
  }
624
624
  .e-treeview .e-list-item.e-active > .e-text-content .e-list-text {
625
- color: #cc1351;
625
+ color: #e3165b;
626
626
  }
627
627
  .e-treeview .e-list-item.e-active > .e-text-content .e-icon-collapsible,
628
628
  .e-treeview .e-list-item.e-active > .e-text-content .e-icon-expandable {