@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.
- package/dist/ej2-navigations.min.js +2 -2
- package/dist/ej2-navigations.umd.min.js +2 -2
- package/dist/ej2-navigations.umd.min.js.map +1 -1
- package/dist/es6/ej2-navigations.es2015.js +28 -3
- package/dist/es6/ej2-navigations.es2015.js.map +1 -1
- package/dist/es6/ej2-navigations.es5.js +28 -3
- package/dist/es6/ej2-navigations.es5.js.map +1 -1
- package/dist/global/ej2-navigations.min.js +2 -2
- package/dist/global/ej2-navigations.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/package.json +7 -7
- package/src/common/menu-base.js +1 -1
- package/src/treeview/treeview-model.d.ts +7 -0
- package/src/treeview/treeview.d.ts +7 -0
- package/src/treeview/treeview.js +27 -2
|
@@ -2456,7 +2456,7 @@ var MenuBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
2456
2456
|
args.item.setAttribute('aria-expanded', 'false');
|
|
2457
2457
|
args.item.classList.add('e-menu-caret-icon');
|
|
2458
2458
|
}
|
|
2459
|
-
if (_this.
|
|
2459
|
+
if (_this.template) {
|
|
2460
2460
|
args.item.setAttribute('id', args.curData[args.fields.id].toString());
|
|
2461
2461
|
args.item.removeAttribute('data-uid');
|
|
2462
2462
|
if (args.item.classList.contains('e-level-1')) {
|
|
@@ -12127,8 +12127,9 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
12127
12127
|
var rippleIcons = select('.' + ICON, li);
|
|
12128
12128
|
this.removeHover();
|
|
12129
12129
|
this.setFocusElement(li);
|
|
12130
|
-
|
|
12131
|
-
|
|
12130
|
+
var isExpandCollapseIcon = classList.contains(EXPANDABLE) || classList.contains(COLLAPSIBLE);
|
|
12131
|
+
if (this.showCheckBox && !li.classList.contains('e-disable') && !isExpandCollapseIcon) {
|
|
12132
|
+
var checkWrapper = this.checkOnClick ? select('.' + CHECKBOXWRAP, li) : closest(target, '.' + CHECKBOXWRAP);
|
|
12132
12133
|
if (!isNullOrUndefined(checkWrapper)) {
|
|
12133
12134
|
var checkElement = select('.' + CHECKBOXFRAME, checkWrapper);
|
|
12134
12135
|
this.validateCheckNode(checkWrapper, checkElement.classList.contains(CHECK), li, event.originalEvent);
|
|
@@ -12690,6 +12691,15 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
12690
12691
|
TreeView.prototype.selectNode = function (li, e, multiSelect) {
|
|
12691
12692
|
var _this = this;
|
|
12692
12693
|
if (isNullOrUndefined(li) || (!this.allowMultiSelection && this.isActive(li) && !isNullOrUndefined(e))) {
|
|
12694
|
+
if (this.checkOnClick) {
|
|
12695
|
+
var checkboxElement = select(' .' + CHECKBOXFRAME, li);
|
|
12696
|
+
if (!isNullOrUndefined(checkboxElement) && checkboxElement.classList.contains(CHECK)) {
|
|
12697
|
+
addClass([li], ACTIVE);
|
|
12698
|
+
}
|
|
12699
|
+
else {
|
|
12700
|
+
removeClass([li], ACTIVE);
|
|
12701
|
+
}
|
|
12702
|
+
}
|
|
12693
12703
|
this.setFocusElement(li);
|
|
12694
12704
|
return;
|
|
12695
12705
|
}
|
|
@@ -13063,6 +13073,7 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
13063
13073
|
}
|
|
13064
13074
|
}
|
|
13065
13075
|
this.changeState(checkWrap, isCheck ? 'uncheck' : 'check', e, true);
|
|
13076
|
+
this.updateActiveClass(li, isCheck);
|
|
13066
13077
|
if (this.autoCheck) {
|
|
13067
13078
|
this.ensureChildCheckState(li);
|
|
13068
13079
|
this.updateOldCheckedData([this.getNodeData(li)]);
|
|
@@ -13078,6 +13089,17 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
13078
13089
|
}
|
|
13079
13090
|
this.nodeCheckedEvent(checkWrap, isCheck, e);
|
|
13080
13091
|
};
|
|
13092
|
+
TreeView.prototype.updateActiveClass = function (liElement, checkStatus) {
|
|
13093
|
+
if (this.showCheckBox && this.checkOnClick) {
|
|
13094
|
+
if (checkStatus === 'check' || checkStatus === false) {
|
|
13095
|
+
this.removeSelectAll();
|
|
13096
|
+
addClass([liElement], ACTIVE);
|
|
13097
|
+
}
|
|
13098
|
+
else if (checkStatus === 'uncheck' || checkStatus === 'indeterminate' || checkStatus === true) {
|
|
13099
|
+
removeClass([liElement], ACTIVE);
|
|
13100
|
+
}
|
|
13101
|
+
}
|
|
13102
|
+
};
|
|
13081
13103
|
/**
|
|
13082
13104
|
* Update checkedNodes when UI interaction happens before the child node renders in DOM
|
|
13083
13105
|
*
|
|
@@ -16139,6 +16161,9 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
16139
16161
|
__decorate$8([
|
|
16140
16162
|
Property(false)
|
|
16141
16163
|
], TreeView.prototype, "showCheckBox", void 0);
|
|
16164
|
+
__decorate$8([
|
|
16165
|
+
Property(false)
|
|
16166
|
+
], TreeView.prototype, "checkOnClick", void 0);
|
|
16142
16167
|
__decorate$8([
|
|
16143
16168
|
Property(true)
|
|
16144
16169
|
], TreeView.prototype, "autoCheck", void 0);
|