@syncfusion/ej2-navigations 29.2.4 → 29.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 : 29.2.4
3
+ * version : 29.2.5
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.41",
3
+ "_id": "@syncfusion/ej2-navigations@29.2.4",
4
4
  "_inBundle": false,
5
- "_integrity": "sha512-AhUk37FtwjI9b7McSLA2ADfa6SJI87RAI7cGhgceEKTREbe0IWgGd/i23r3PEd3MGvFEbUIv6XsysbHoOgk7Og==",
5
+ "_integrity": "sha512-imYNz0vrZSUIKlzJTHj+DMHkBWJ/Ze3FW6WNMmX1i43qCgABxXM/hsOWQK3+g217Sw0nF0GKWY0d8N6CVJDC7Q==",
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.41.tgz",
44
- "_shasum": "5f392e671498718d63cbcc0d90b4891d9e81a711",
43
+ "_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-hotfix-new/@syncfusion/ej2-navigations/-/ej2-navigations-29.2.4.tgz",
44
+ "_shasum": "637997deedf0d6e1670061ec8612e26648b589d1",
45
45
  "_spec": "@syncfusion/ej2-navigations@*",
46
46
  "_where": "/jenkins/workspace/elease-automation_release_29.1.1/packages/included",
47
47
  "author": {
@@ -53,9 +53,9 @@
53
53
  "bundleDependencies": false,
54
54
  "dependencies": {
55
55
  "@syncfusion/ej2-base": "~29.2.4",
56
- "@syncfusion/ej2-buttons": "~29.2.4",
56
+ "@syncfusion/ej2-buttons": "~29.2.5",
57
57
  "@syncfusion/ej2-data": "~29.2.4",
58
- "@syncfusion/ej2-inputs": "~29.2.4",
58
+ "@syncfusion/ej2-inputs": "~29.2.5",
59
59
  "@syncfusion/ej2-lists": "~29.2.4",
60
60
  "@syncfusion/ej2-popups": "~29.2.4"
61
61
  },
@@ -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.2.4",
165
+ "version": "29.2.5",
166
166
  "sideEffects": false
167
167
  }
@@ -1399,7 +1399,7 @@ var MenuBase = /** @class */ (function (_super) {
1399
1399
  args.item.setAttribute('aria-expanded', 'false');
1400
1400
  args.item.classList.add('e-menu-caret-icon');
1401
1401
  }
1402
- if (_this.isMenu && _this.template) {
1402
+ if (_this.template) {
1403
1403
  args.item.setAttribute('id', args.curData[args.fields.id].toString());
1404
1404
  args.item.removeAttribute('data-uid');
1405
1405
  if (args.item.classList.contains('e-level-1')) {
@@ -457,6 +457,13 @@ export interface TreeViewModel extends ComponentModel{
457
457
  */
458
458
  showCheckBox?: boolean;
459
459
 
460
+ /**
461
+ * Specifies whether the item should be checked or unchecked when the node is clicked.
462
+ *
463
+ * @default false
464
+ */
465
+ checkOnClick?: boolean;
466
+
460
467
  /**
461
468
  * Allow us to specify the parent and child nodes to get auto check while we check or uncheck a node.
462
469
  *
@@ -828,6 +828,12 @@ export declare class TreeView extends Component<HTMLElement> implements INotifyP
828
828
  * @default false
829
829
  */
830
830
  showCheckBox: boolean;
831
+ /**
832
+ * Specifies whether the item should be checked or unchecked when the node is clicked.
833
+ *
834
+ * @default false
835
+ */
836
+ checkOnClick: boolean;
831
837
  /**
832
838
  * Allow us to specify the parent and child nodes to get auto check while we check or uncheck a node.
833
839
  *
@@ -1172,6 +1178,7 @@ export declare class TreeView extends Component<HTMLElement> implements INotifyP
1172
1178
  private checkNode;
1173
1179
  private validateCheckNode;
1174
1180
  private nodeCheckingAction;
1181
+ private updateActiveClass;
1175
1182
  /**
1176
1183
  * Update checkedNodes when UI interaction happens before the child node renders in DOM
1177
1184
  *
@@ -1700,8 +1700,9 @@ var TreeView = /** @class */ (function (_super) {
1700
1700
  var rippleIcons = select('.' + ICON, li);
1701
1701
  this.removeHover();
1702
1702
  this.setFocusElement(li);
1703
- if (this.showCheckBox && !li.classList.contains('e-disable')) {
1704
- var checkWrapper = closest(target, '.' + CHECKBOXWRAP);
1703
+ var isExpandCollapseIcon = classList.contains(EXPANDABLE) || classList.contains(COLLAPSIBLE);
1704
+ if (this.showCheckBox && !li.classList.contains('e-disable') && !isExpandCollapseIcon) {
1705
+ var checkWrapper = this.checkOnClick ? select('.' + CHECKBOXWRAP, li) : closest(target, '.' + CHECKBOXWRAP);
1705
1706
  if (!isNOU(checkWrapper)) {
1706
1707
  var checkElement = select('.' + CHECKBOXFRAME, checkWrapper);
1707
1708
  this.validateCheckNode(checkWrapper, checkElement.classList.contains(CHECK), li, event.originalEvent);
@@ -2263,6 +2264,15 @@ var TreeView = /** @class */ (function (_super) {
2263
2264
  TreeView.prototype.selectNode = function (li, e, multiSelect) {
2264
2265
  var _this = this;
2265
2266
  if (isNOU(li) || (!this.allowMultiSelection && this.isActive(li) && !isNOU(e))) {
2267
+ if (this.checkOnClick) {
2268
+ var checkboxElement = select(' .' + CHECKBOXFRAME, li);
2269
+ if (!isNOU(checkboxElement) && checkboxElement.classList.contains(CHECK)) {
2270
+ addClass([li], ACTIVE);
2271
+ }
2272
+ else {
2273
+ removeClass([li], ACTIVE);
2274
+ }
2275
+ }
2266
2276
  this.setFocusElement(li);
2267
2277
  return;
2268
2278
  }
@@ -2636,6 +2646,7 @@ var TreeView = /** @class */ (function (_super) {
2636
2646
  }
2637
2647
  }
2638
2648
  this.changeState(checkWrap, isCheck ? 'uncheck' : 'check', e, true);
2649
+ this.updateActiveClass(li, isCheck);
2639
2650
  if (this.autoCheck) {
2640
2651
  this.ensureChildCheckState(li);
2641
2652
  this.updateOldCheckedData([this.getNodeData(li)]);
@@ -2651,6 +2662,17 @@ var TreeView = /** @class */ (function (_super) {
2651
2662
  }
2652
2663
  this.nodeCheckedEvent(checkWrap, isCheck, e);
2653
2664
  };
2665
+ TreeView.prototype.updateActiveClass = function (liElement, checkStatus) {
2666
+ if (this.showCheckBox && this.checkOnClick) {
2667
+ if (checkStatus === 'check' || checkStatus === false) {
2668
+ this.removeSelectAll();
2669
+ addClass([liElement], ACTIVE);
2670
+ }
2671
+ else if (checkStatus === 'uncheck' || checkStatus === 'indeterminate' || checkStatus === true) {
2672
+ removeClass([liElement], ACTIVE);
2673
+ }
2674
+ }
2675
+ };
2654
2676
  /**
2655
2677
  * Update checkedNodes when UI interaction happens before the child node renders in DOM
2656
2678
  *
@@ -5715,6 +5737,9 @@ var TreeView = /** @class */ (function (_super) {
5715
5737
  __decorate([
5716
5738
  Property(false)
5717
5739
  ], TreeView.prototype, "showCheckBox", void 0);
5740
+ __decorate([
5741
+ Property(false)
5742
+ ], TreeView.prototype, "checkOnClick", void 0);
5718
5743
  __decorate([
5719
5744
  Property(true)
5720
5745
  ], TreeView.prototype, "autoCheck", void 0);