@syncfusion/ej2-navigations 29.1.40 → 29.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 : 29.1.40
3
+ * version : 29.2.4
4
4
  * Copyright Syncfusion Inc. 2001 - 2024. 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@29.1.38",
3
+ "_id": "@syncfusion/ej2-navigations@29.1.41",
4
4
  "_inBundle": false,
5
- "_integrity": "sha512-/OPUPqbnwIXo36+W0w/F8pH6cNjrJsgEEaZpZP7uklGeqIpyFLrPo4f4uDFKdbgrX+K3Bs01loThHmaB1447ig==",
5
+ "_integrity": "sha512-AhUk37FtwjI9b7McSLA2ADfa6SJI87RAI7cGhgceEKTREbe0IWgGd/i23r3PEd3MGvFEbUIv6XsysbHoOgk7Og==",
6
6
  "_location": "/@syncfusion/ej2-navigations",
7
7
  "_phantomChildren": {},
8
8
  "_requested": {
@@ -40,8 +40,8 @@
40
40
  "/@syncfusion/ej2-spreadsheet",
41
41
  "/@syncfusion/ej2-vue-navigations"
42
42
  ],
43
- "_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-hotfix-new/@syncfusion/ej2-navigations/-/ej2-navigations-29.1.38.tgz",
44
- "_shasum": "f3d612527b73d8271adacdf1811bfdec8e76b0f5",
43
+ "_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-hotfix-new/@syncfusion/ej2-navigations/-/ej2-navigations-29.1.41.tgz",
44
+ "_shasum": "5f392e671498718d63cbcc0d90b4891d9e81a711",
45
45
  "_spec": "@syncfusion/ej2-navigations@*",
46
46
  "_where": "/jenkins/workspace/elease-automation_release_29.1.1/packages/included",
47
47
  "author": {
@@ -52,12 +52,12 @@
52
52
  },
53
53
  "bundleDependencies": false,
54
54
  "dependencies": {
55
- "@syncfusion/ej2-base": "~29.1.36",
56
- "@syncfusion/ej2-buttons": "~29.1.34",
57
- "@syncfusion/ej2-data": "~29.1.33",
58
- "@syncfusion/ej2-inputs": "~29.1.39",
59
- "@syncfusion/ej2-lists": "~29.1.40",
60
- "@syncfusion/ej2-popups": "~29.1.37"
55
+ "@syncfusion/ej2-base": "~29.2.4",
56
+ "@syncfusion/ej2-buttons": "~29.2.4",
57
+ "@syncfusion/ej2-data": "~29.2.4",
58
+ "@syncfusion/ej2-inputs": "~29.2.4",
59
+ "@syncfusion/ej2-lists": "~29.2.4",
60
+ "@syncfusion/ej2-popups": "~29.2.4"
61
61
  },
62
62
  "deprecated": false,
63
63
  "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",
@@ -162,6 +162,6 @@
162
162
  "url": "git+https://github.com/syncfusion/ej2-javascript-ui-controls.git"
163
163
  },
164
164
  "typings": "index.d.ts",
165
- "version": "29.1.40",
165
+ "version": "29.2.4",
166
166
  "sideEffects": false
167
167
  }
@@ -385,7 +385,7 @@ export declare abstract class MenuBase extends Component<HTMLUListElement> imple
385
385
  protected setBlankIconStyle(menu: HTMLElement): void;
386
386
  private checkScrollOffset;
387
387
  private setPosition;
388
- getMenuWidth(cmenu: Element, width: number, isRtl: boolean): number;
388
+ getMenuWidth(menuElement: Element, width: number, isRtl: boolean): number;
389
389
  private toggleVisiblity;
390
390
  private createItems;
391
391
  private moverHandler;
@@ -1318,8 +1318,8 @@ var MenuBase = /** @class */ (function (_super) {
1318
1318
  ul.style.left = left + px;
1319
1319
  }
1320
1320
  };
1321
- MenuBase.prototype.getMenuWidth = function (cmenu, width, isRtl) {
1322
- var caretIcon = cmenu.getElementsByClassName(CARET)[0];
1321
+ MenuBase.prototype.getMenuWidth = function (menuElement, width, isRtl) {
1322
+ var caretIcon = menuElement.getElementsByClassName(CARET)[0];
1323
1323
  if (caretIcon) {
1324
1324
  width += parseInt(getComputedStyle(caretIcon)[isRtl ? 'marginRight' : 'marginLeft'], 10);
1325
1325
  }
@@ -1407,7 +1407,10 @@ var Toolbar = /** @class */ (function (_super) {
1407
1407
  };
1408
1408
  Toolbar.prototype.popupEleWidth = function (el) {
1409
1409
  el.style.position = 'absolute';
1410
- var elWidth = this.isVertical ? el.offsetHeight : el.offsetWidth;
1410
+ var style = window.getComputedStyle(el);
1411
+ var elWidth = this.isVertical
1412
+ ? el.offsetHeight
1413
+ : el.offsetWidth + parseFloat(style.marginLeft) + parseFloat(style.marginRight);
1411
1414
  var btnText = el.querySelector('.' + CLS_TBARBTNTEXT);
1412
1415
  if (el.classList.contains('e-tbtn-align') || el.classList.contains(CLS_TBARTEXT)) {
1413
1416
  var btn = el.children[0];
@@ -2045,6 +2048,10 @@ var Toolbar = /** @class */ (function (_super) {
2045
2048
  return isNOU(ele.getAttribute('data-tabindex')) ? '-1' : ele.getAttribute('data-tabindex');
2046
2049
  };
2047
2050
  Toolbar.prototype.itemClick = function (e) {
2051
+ var itemClosest = !isNOU(closest(e.currentTarget, '.' + CLS_TEMPLATE));
2052
+ if (itemClosest) {
2053
+ return;
2054
+ }
2048
2055
  this.activeEleSwitch(e.currentTarget);
2049
2056
  };
2050
2057
  Toolbar.prototype.activeEleSwitch = function (ele) {
@@ -2450,6 +2450,9 @@ var TreeView = /** @class */ (function (_super) {
2450
2450
  else {
2451
2451
  this.isFirstRender = true;
2452
2452
  this.renderChildNodes(currLi, expandChild, callback, null, isFromExpandAll);
2453
+ if (isNullOrUndefined(this.expandChildren) || this.expandChildren.length === 0) {
2454
+ return;
2455
+ }
2453
2456
  var liEles = selectAll('.' + LISTITEM, currLi);
2454
2457
  for (var i = 0; i < liEles.length; i++) {
2455
2458
  var id = this.getId(liEles[parseInt(i.toString(), 10)]);
@@ -3080,11 +3083,11 @@ var TreeView = /** @class */ (function (_super) {
3080
3083
  removeClass(hoveredNode, HOVER);
3081
3084
  }
3082
3085
  };
3083
- TreeView.prototype.getNodeData = function (currLi, fromDS) {
3086
+ TreeView.prototype.getNodeData = function (currLi, fromDS, dragData) {
3084
3087
  if (!isNOU(currLi) && currLi.classList.contains(LISTITEM) &&
3085
3088
  !isNOU(closest(currLi, '.' + CONTROL)) && closest(currLi, '.' + CONTROL).classList.contains(ROOT)) {
3086
3089
  var id = currLi.getAttribute('data-uid');
3087
- var text = this.getText(currLi, fromDS);
3090
+ var text = this.getText(currLi, fromDS, dragData);
3088
3091
  var pNode = closest(currLi.parentNode, '.' + LISTITEM);
3089
3092
  var pid = pNode ? pNode.getAttribute('data-uid') : null;
3090
3093
  var selected = currLi.classList.contains(ACTIVE);
@@ -3103,12 +3106,12 @@ var TreeView = /** @class */ (function (_super) {
3103
3106
  }
3104
3107
  return { id: '', text: '', parentID: '', selected: false, expanded: false, isChecked: '', hasChildren: false };
3105
3108
  };
3106
- TreeView.prototype.getText = function (currLi, fromDS) {
3109
+ TreeView.prototype.getText = function (currLi, fromDS, dragData) {
3107
3110
  if (fromDS) {
3108
- var nodeData = this.getNodeObject(currLi.getAttribute('data-uid'));
3111
+ var nodeData = !isNullOrUndefined(dragData) ? dragData : this.getNodeObject(currLi.getAttribute('data-uid'));
3109
3112
  var level = parseFloat(currLi.getAttribute('aria-level'));
3110
3113
  var nodeFields = this.getFields(this.fields, level, 1);
3111
- return getValue(nodeFields.text, nodeData);
3114
+ return !isNullOrUndefined(dragData) ? dragData.text : getValue(nodeFields.text, nodeData);
3112
3115
  }
3113
3116
  return select('.' + LISTTEXT, currLi).textContent;
3114
3117
  };
@@ -3667,8 +3670,9 @@ var TreeView = /** @class */ (function (_super) {
3667
3670
  if (this.fields.dataSource instanceof DataManager === false) {
3668
3671
  this.preventExpand = false;
3669
3672
  }
3673
+ var dragData = isNullOrUndefined(dragObj) ? null : dragObj.dragData;
3670
3674
  for (var i = 0; i < liArray.length; i++) {
3671
- nodeData.push(this.getNode(liArray[parseInt(i.toString(), 10)]));
3675
+ nodeData.push(this.getNodeData(this.getElement(liArray[parseInt(i.toString(), 10)]), true, dragData));
3672
3676
  }
3673
3677
  this.trigger('nodeDropped', this.getDragEvent(e.event, dragObj, dropTarget, e.target, e.dragData.draggedElement, null, level, drop));
3674
3678
  if (dragObj.element.id !== this.element.id) {
@@ -3783,7 +3787,7 @@ var TreeView = /** @class */ (function (_super) {
3783
3787
  var id = this.getId(dragLi);
3784
3788
  var removedData = dragObj.updateChildField(dragObj.treeData, dragObj.fields, id, null, null, true);
3785
3789
  var refId = this.getId(dropLi);
3786
- var index = this.getDataPos(this.treeData, this.fields, refId);
3790
+ var index = refId ? this.getDataPos(this.treeData, this.fields, refId) : null;
3787
3791
  var parentId = this.getId(dropParentLi);
3788
3792
  if (this.dataType === 1) {
3789
3793
  this.updateField(this.treeData, this.fields, parentId, 'hasChildren', true);