@syncfusion/ej2-navigations 31.2.2 → 31.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/README.md +11 -2
- 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 +44 -6
- package/dist/es6/ej2-navigations.es2015.js.map +1 -1
- package/dist/es6/ej2-navigations.es5.js +45 -6
- 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 +6 -6
- package/src/breadcrumb/breadcrumb.js +4 -3
- package/src/treeview/treeview.d.ts +1 -0
- package/src/treeview/treeview.js +41 -3
- package/styles/bds-lite.css +0 -1
- package/styles/bds.css +0 -1
- package/styles/bootstrap-dark-lite.css +0 -1
- package/styles/bootstrap-dark.css +0 -1
- package/styles/bootstrap-lite.css +0 -1
- package/styles/bootstrap.css +0 -1
- package/styles/bootstrap4-lite.css +0 -1
- package/styles/bootstrap4.css +0 -1
- package/styles/bootstrap5-dark-lite.css +0 -1
- package/styles/bootstrap5-dark.css +0 -1
- package/styles/bootstrap5-lite.css +0 -1
- package/styles/bootstrap5.3-lite.css +0 -1
- package/styles/bootstrap5.3.css +0 -1
- package/styles/bootstrap5.css +0 -1
- package/styles/fabric-dark-lite.css +0 -1
- package/styles/fabric-dark.css +0 -1
- package/styles/fabric-lite.css +0 -1
- package/styles/fabric.css +0 -1
- package/styles/fluent-dark-lite.css +0 -1
- package/styles/fluent-dark.css +0 -1
- package/styles/fluent-lite.css +0 -1
- package/styles/fluent.css +0 -1
- package/styles/fluent2-lite.css +0 -1
- package/styles/fluent2.css +0 -1
- package/styles/highcontrast-light-lite.css +0 -1
- package/styles/highcontrast-light.css +0 -1
- package/styles/highcontrast-lite.css +0 -1
- package/styles/highcontrast.css +0 -1
- package/styles/material-dark-lite.css +0 -1
- package/styles/material-dark.css +0 -1
- package/styles/material-lite.css +0 -1
- package/styles/material.css +0 -1
- package/styles/tailwind-dark-lite.css +0 -1
- package/styles/tailwind-dark.css +0 -1
- package/styles/tailwind-lite.css +0 -1
- package/styles/tailwind.css +0 -1
- package/styles/treeview/_layout.scss +0 -3
- package/styles/treeview/bds.css +0 -1
- package/styles/treeview/bootstrap-dark.css +0 -1
- package/styles/treeview/bootstrap.css +0 -1
- package/styles/treeview/bootstrap4.css +0 -1
- package/styles/treeview/bootstrap5-dark.css +0 -1
- package/styles/treeview/bootstrap5.3.css +0 -1
- package/styles/treeview/bootstrap5.css +0 -1
- package/styles/treeview/fabric-dark.css +0 -1
- package/styles/treeview/fabric.css +0 -1
- package/styles/treeview/fluent-dark.css +0 -1
- package/styles/treeview/fluent.css +0 -1
- package/styles/treeview/fluent2.css +0 -1
- package/styles/treeview/highcontrast-light.css +0 -1
- package/styles/treeview/highcontrast.css +0 -1
- package/styles/treeview/material-dark.css +0 -1
- package/styles/treeview/material.css +0 -1
- package/styles/treeview/tailwind-dark.css +0 -1
- package/styles/treeview/tailwind.css +0 -1
package/dist/global/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* filename: index.d.ts
|
|
3
|
-
* version : 31.2.
|
|
3
|
+
* version : 31.2.5
|
|
4
4
|
* Copyright Syncfusion Inc. 2001 - 2025. 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,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@syncfusion/ej2-navigations",
|
|
3
|
-
"version": "31.2.
|
|
3
|
+
"version": "31.2.5",
|
|
4
4
|
"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",
|
|
5
5
|
"author": "Syncfusion Inc.",
|
|
6
6
|
"license": "SEE LICENSE IN license",
|
|
@@ -8,12 +8,12 @@
|
|
|
8
8
|
"module": "./index.js",
|
|
9
9
|
"es2015": "./dist/es6/ej2-navigations.es5.js",
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@syncfusion/ej2-base": "~31.2.
|
|
12
|
-
"@syncfusion/ej2-buttons": "~31.2.
|
|
13
|
-
"@syncfusion/ej2-data": "~31.2.
|
|
14
|
-
"@syncfusion/ej2-inputs": "~31.2.
|
|
11
|
+
"@syncfusion/ej2-base": "~31.2.5",
|
|
12
|
+
"@syncfusion/ej2-buttons": "~31.2.3",
|
|
13
|
+
"@syncfusion/ej2-data": "~31.2.5",
|
|
14
|
+
"@syncfusion/ej2-inputs": "~31.2.5",
|
|
15
15
|
"@syncfusion/ej2-lists": "~31.2.2",
|
|
16
|
-
"@syncfusion/ej2-popups": "~31.2.
|
|
16
|
+
"@syncfusion/ej2-popups": "~31.2.5"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {},
|
|
19
19
|
"keywords": [
|
|
@@ -282,6 +282,10 @@ var Breadcrumb = /** @class */ (function (_super) {
|
|
|
282
282
|
args.item.removeAttribute('role');
|
|
283
283
|
if (isLastItem) {
|
|
284
284
|
args.item.setAttribute('data-active-item', '');
|
|
285
|
+
args.item.setAttribute('aria-current', 'page');
|
|
286
|
+
}
|
|
287
|
+
else {
|
|
288
|
+
args.item.removeAttribute('aria-current');
|
|
285
289
|
}
|
|
286
290
|
if (!_this.itemTemplate) {
|
|
287
291
|
_this.beforeItemRenderChanges(args.curData, eventArgs.item, args.item, containsRightIcon);
|
|
@@ -473,9 +477,6 @@ var Breadcrumb = /** @class */ (function (_super) {
|
|
|
473
477
|
};
|
|
474
478
|
Breadcrumb.prototype.beforeItemRenderChanges = function (prevItem, currItem, elem, isRightIcon) {
|
|
475
479
|
var wrapElem = elem.querySelector('.e-anchor-wrap');
|
|
476
|
-
if (wrapElem) {
|
|
477
|
-
wrapElem.parentElement.setAttribute('aria-label', 'home');
|
|
478
|
-
}
|
|
479
480
|
if (currItem.text !== prevItem.text && wrapElem) {
|
|
480
481
|
wrapElem.childNodes.forEach(function (child) {
|
|
481
482
|
if (child.nodeType === Node.TEXT_NODE) {
|
|
@@ -1075,6 +1075,7 @@ export declare class TreeView extends Component<HTMLElement> implements INotifyP
|
|
|
1075
1075
|
private ensureIndeterminate;
|
|
1076
1076
|
private ensureParentCheckState;
|
|
1077
1077
|
private getSelectedChildNodeDetails;
|
|
1078
|
+
private getAllChildNodes;
|
|
1078
1079
|
private ensureChildCheckState;
|
|
1079
1080
|
private doCheckBoxAction;
|
|
1080
1081
|
private updateFieldChecked;
|
package/src/treeview/treeview.js
CHANGED
|
@@ -716,7 +716,7 @@ var TreeView = /** @class */ (function (_super) {
|
|
|
716
716
|
}
|
|
717
717
|
this.changeState(node, 'check', null, true, true);
|
|
718
718
|
}
|
|
719
|
-
else if (count === 0 && this.checkedNodes.length === 0) {
|
|
719
|
+
else if (count === 0 && this.checkedNodes.length === 0 && indeterminate.length === 0) {
|
|
720
720
|
this.changeState(node, 'uncheck', null, true, true);
|
|
721
721
|
}
|
|
722
722
|
}
|
|
@@ -986,6 +986,7 @@ var TreeView = /** @class */ (function (_super) {
|
|
|
986
986
|
}
|
|
987
987
|
};
|
|
988
988
|
TreeView.prototype.ensureParentCheckState = function (element) {
|
|
989
|
+
var _this = this;
|
|
989
990
|
if (!isNOU(element)) {
|
|
990
991
|
if (element.classList.contains(ROOT)) {
|
|
991
992
|
return;
|
|
@@ -1005,6 +1006,8 @@ var TreeView = /** @class */ (function (_super) {
|
|
|
1005
1006
|
var dataUid_1 = element.getAttribute('data-uid');
|
|
1006
1007
|
var rootNodeChecked_1 = true;
|
|
1007
1008
|
var childNodeChecked_1 = false;
|
|
1009
|
+
var ChildNodeData = this.getAllChildNodes(this.DDTTreeData, dataUid_1);
|
|
1010
|
+
var selectedChildren_1 = 0;
|
|
1008
1011
|
nodes.forEach(function (childNode) {
|
|
1009
1012
|
if (childNode instanceof HTMLElement) {
|
|
1010
1013
|
var ariaChecked = childNode.getAttribute('aria-checked');
|
|
@@ -1034,6 +1037,13 @@ var TreeView = /** @class */ (function (_super) {
|
|
|
1034
1037
|
childItems = this.getChildNodes(this.DDTTreeData, dataUid_1);
|
|
1035
1038
|
}
|
|
1036
1039
|
count = childItems.length;
|
|
1040
|
+
ChildNodeData.forEach(function (child) {
|
|
1041
|
+
var childKey = String(child[_this.fields.id]);
|
|
1042
|
+
if (_this.checkedNodes.indexOf(childKey) !== -1 ||
|
|
1043
|
+
_this.OldCheckedData.some(function (oldNode) { return oldNode['parentID'] === childKey; })) {
|
|
1044
|
+
selectedChildren_1++;
|
|
1045
|
+
}
|
|
1046
|
+
});
|
|
1037
1047
|
}
|
|
1038
1048
|
if (this.autoCheck && this.showCheckBox && !(this.fields.dataSource instanceof DataManager)) {
|
|
1039
1049
|
var selectedChildNodeDetails = this.getSelectedChildNodeDetails(dataUid_1);
|
|
@@ -1053,7 +1063,7 @@ var TreeView = /** @class */ (function (_super) {
|
|
|
1053
1063
|
else if ((checkedCount > 0 && !parentNodeChecked && (this.autoCheck && this.showCheckBox))) {
|
|
1054
1064
|
this.changeState(checkBoxEle, 'indeterminate', null, true, true);
|
|
1055
1065
|
}
|
|
1056
|
-
else if (checkedCount > 0 || indeterminateNodes.length > 0) {
|
|
1066
|
+
else if (checkedCount > 0 || indeterminateNodes.length > 0 || selectedChildren_1 > 0) {
|
|
1057
1067
|
this.changeState(checkBoxEle, 'indeterminate', null, true, true);
|
|
1058
1068
|
}
|
|
1059
1069
|
else if (checkedCount === 0) {
|
|
@@ -1100,6 +1110,34 @@ var TreeView = /** @class */ (function (_super) {
|
|
|
1100
1110
|
return false;
|
|
1101
1111
|
});
|
|
1102
1112
|
};
|
|
1113
|
+
TreeView.prototype.getAllChildNodes = function (data, parentId) {
|
|
1114
|
+
if (isNOU(data) || isNOU(parentId)) {
|
|
1115
|
+
return [];
|
|
1116
|
+
}
|
|
1117
|
+
if (this.dataType === 1) {
|
|
1118
|
+
var pidField_1 = this.fields.parentID;
|
|
1119
|
+
var target_1 = parentId.toString();
|
|
1120
|
+
return data.filter(function (item) {
|
|
1121
|
+
var pidVal = getValue(pidField_1, item);
|
|
1122
|
+
return !isNOU(pidVal) && pidVal.toString() === target_1;
|
|
1123
|
+
});
|
|
1124
|
+
}
|
|
1125
|
+
if (this.dataType === 2) {
|
|
1126
|
+
var parentFieldId_1 = this.fields.id;
|
|
1127
|
+
var childField = this.fields.child.toString();
|
|
1128
|
+
var target_2 = parentId.toString();
|
|
1129
|
+
var node = data.find(function (n) {
|
|
1130
|
+
var idVal = getValue(parentFieldId_1, n);
|
|
1131
|
+
return !isNOU(idVal) && idVal.toString() === target_2;
|
|
1132
|
+
});
|
|
1133
|
+
if (!node) {
|
|
1134
|
+
return [];
|
|
1135
|
+
}
|
|
1136
|
+
var children = getValue(childField, node);
|
|
1137
|
+
return Array.isArray(children) ? children : [];
|
|
1138
|
+
}
|
|
1139
|
+
return [];
|
|
1140
|
+
};
|
|
1103
1141
|
TreeView.prototype.ensureChildCheckState = function (element, e, isFromExpandAll) {
|
|
1104
1142
|
var _this = this;
|
|
1105
1143
|
if (!isNOU(element)) {
|
|
@@ -5314,7 +5352,7 @@ var TreeView = /** @class */ (function (_super) {
|
|
|
5314
5352
|
this.setNodeFocusable();
|
|
5315
5353
|
}
|
|
5316
5354
|
this.updateCheckedStateFromDS();
|
|
5317
|
-
if (this.showCheckBox && dropLi) {
|
|
5355
|
+
if (this.showCheckBox && dropLi && this.autoCheck) {
|
|
5318
5356
|
this.ensureParentCheckState(dropLi);
|
|
5319
5357
|
}
|
|
5320
5358
|
if ((this.fields.dataSource instanceof DataManager === false)) {
|
package/styles/bds-lite.css
CHANGED
package/styles/bds.css
CHANGED
package/styles/bootstrap.css
CHANGED
package/styles/bootstrap4.css
CHANGED
package/styles/bootstrap5.3.css
CHANGED
package/styles/bootstrap5.css
CHANGED
package/styles/fabric-dark.css
CHANGED
package/styles/fabric-lite.css
CHANGED
package/styles/fabric.css
CHANGED
package/styles/fluent-dark.css
CHANGED
package/styles/fluent-lite.css
CHANGED
package/styles/fluent.css
CHANGED
package/styles/fluent2-lite.css
CHANGED
package/styles/fluent2.css
CHANGED
package/styles/highcontrast.css
CHANGED
package/styles/material-dark.css
CHANGED
package/styles/material-lite.css
CHANGED
package/styles/material.css
CHANGED
package/styles/tailwind-dark.css
CHANGED
package/styles/tailwind-lite.css
CHANGED
package/styles/tailwind.css
CHANGED
package/styles/treeview/bds.css
CHANGED