@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
|
@@ -10913,7 +10913,7 @@ let TreeView = TreeView_1 = class TreeView extends Component {
|
|
|
10913
10913
|
}
|
|
10914
10914
|
this.changeState(node, 'check', null, true, true);
|
|
10915
10915
|
}
|
|
10916
|
-
else if (count === 0 && this.checkedNodes.length === 0) {
|
|
10916
|
+
else if (count === 0 && this.checkedNodes.length === 0 && indeterminate.length === 0) {
|
|
10917
10917
|
this.changeState(node, 'uncheck', null, true, true);
|
|
10918
10918
|
}
|
|
10919
10919
|
}
|
|
@@ -11201,6 +11201,8 @@ let TreeView = TreeView_1 = class TreeView extends Component {
|
|
|
11201
11201
|
const dataUid = element.getAttribute('data-uid');
|
|
11202
11202
|
let rootNodeChecked = true;
|
|
11203
11203
|
let childNodeChecked = false;
|
|
11204
|
+
const ChildNodeData = this.getAllChildNodes(this.DDTTreeData, dataUid);
|
|
11205
|
+
let selectedChildren = 0;
|
|
11204
11206
|
nodes.forEach((childNode) => {
|
|
11205
11207
|
if (childNode instanceof HTMLElement) {
|
|
11206
11208
|
const ariaChecked = childNode.getAttribute('aria-checked');
|
|
@@ -11230,6 +11232,13 @@ let TreeView = TreeView_1 = class TreeView extends Component {
|
|
|
11230
11232
|
childItems = this.getChildNodes(this.DDTTreeData, dataUid);
|
|
11231
11233
|
}
|
|
11232
11234
|
count = childItems.length;
|
|
11235
|
+
ChildNodeData.forEach((child) => {
|
|
11236
|
+
const childKey = String(child[this.fields.id]);
|
|
11237
|
+
if (this.checkedNodes.indexOf(childKey) !== -1 ||
|
|
11238
|
+
this.OldCheckedData.some((oldNode) => oldNode['parentID'] === childKey)) {
|
|
11239
|
+
selectedChildren++;
|
|
11240
|
+
}
|
|
11241
|
+
});
|
|
11233
11242
|
}
|
|
11234
11243
|
if (this.autoCheck && this.showCheckBox && !(this.fields.dataSource instanceof DataManager)) {
|
|
11235
11244
|
const selectedChildNodeDetails = this.getSelectedChildNodeDetails(dataUid);
|
|
@@ -11249,7 +11258,7 @@ let TreeView = TreeView_1 = class TreeView extends Component {
|
|
|
11249
11258
|
else if ((checkedCount > 0 && !parentNodeChecked && (this.autoCheck && this.showCheckBox))) {
|
|
11250
11259
|
this.changeState(checkBoxEle, 'indeterminate', null, true, true);
|
|
11251
11260
|
}
|
|
11252
|
-
else if (checkedCount > 0 || indeterminateNodes.length > 0) {
|
|
11261
|
+
else if (checkedCount > 0 || indeterminateNodes.length > 0 || selectedChildren > 0) {
|
|
11253
11262
|
this.changeState(checkBoxEle, 'indeterminate', null, true, true);
|
|
11254
11263
|
}
|
|
11255
11264
|
else if (checkedCount === 0) {
|
|
@@ -11295,6 +11304,34 @@ let TreeView = TreeView_1 = class TreeView extends Component {
|
|
|
11295
11304
|
return false;
|
|
11296
11305
|
});
|
|
11297
11306
|
}
|
|
11307
|
+
getAllChildNodes(data, parentId) {
|
|
11308
|
+
if (isNullOrUndefined(data) || isNullOrUndefined(parentId)) {
|
|
11309
|
+
return [];
|
|
11310
|
+
}
|
|
11311
|
+
if (this.dataType === 1) {
|
|
11312
|
+
const pidField = this.fields.parentID;
|
|
11313
|
+
const target = parentId.toString();
|
|
11314
|
+
return data.filter((item) => {
|
|
11315
|
+
const pidVal = getValue(pidField, item);
|
|
11316
|
+
return !isNullOrUndefined(pidVal) && pidVal.toString() === target;
|
|
11317
|
+
});
|
|
11318
|
+
}
|
|
11319
|
+
if (this.dataType === 2) {
|
|
11320
|
+
const parentFieldId = this.fields.id;
|
|
11321
|
+
const childField = this.fields.child.toString();
|
|
11322
|
+
const target = parentId.toString();
|
|
11323
|
+
const node = data.find((n) => {
|
|
11324
|
+
const idVal = getValue(parentFieldId, n);
|
|
11325
|
+
return !isNullOrUndefined(idVal) && idVal.toString() === target;
|
|
11326
|
+
});
|
|
11327
|
+
if (!node) {
|
|
11328
|
+
return [];
|
|
11329
|
+
}
|
|
11330
|
+
const children = getValue(childField, node);
|
|
11331
|
+
return Array.isArray(children) ? children : [];
|
|
11332
|
+
}
|
|
11333
|
+
return [];
|
|
11334
|
+
}
|
|
11298
11335
|
ensureChildCheckState(element, e, isFromExpandAll) {
|
|
11299
11336
|
if (!isNullOrUndefined(element)) {
|
|
11300
11337
|
const childElement = select('.' + PARENTITEM, element);
|
|
@@ -15462,7 +15499,7 @@ let TreeView = TreeView_1 = class TreeView extends Component {
|
|
|
15462
15499
|
this.setNodeFocusable();
|
|
15463
15500
|
}
|
|
15464
15501
|
this.updateCheckedStateFromDS();
|
|
15465
|
-
if (this.showCheckBox && dropLi) {
|
|
15502
|
+
if (this.showCheckBox && dropLi && this.autoCheck) {
|
|
15466
15503
|
this.ensureParentCheckState(dropLi);
|
|
15467
15504
|
}
|
|
15468
15505
|
if ((this.fields.dataSource instanceof DataManager === false)) {
|
|
@@ -16986,6 +17023,10 @@ let Breadcrumb = class Breadcrumb extends Component {
|
|
|
16986
17023
|
args.item.removeAttribute('role');
|
|
16987
17024
|
if (isLastItem) {
|
|
16988
17025
|
args.item.setAttribute('data-active-item', '');
|
|
17026
|
+
args.item.setAttribute('aria-current', 'page');
|
|
17027
|
+
}
|
|
17028
|
+
else {
|
|
17029
|
+
args.item.removeAttribute('aria-current');
|
|
16989
17030
|
}
|
|
16990
17031
|
if (!this.itemTemplate) {
|
|
16991
17032
|
this.beforeItemRenderChanges(args.curData, eventArgs.item, args.item, containsRightIcon);
|
|
@@ -17177,9 +17218,6 @@ let Breadcrumb = class Breadcrumb extends Component {
|
|
|
17177
17218
|
}
|
|
17178
17219
|
beforeItemRenderChanges(prevItem, currItem, elem, isRightIcon) {
|
|
17179
17220
|
const wrapElem = elem.querySelector('.e-anchor-wrap');
|
|
17180
|
-
if (wrapElem) {
|
|
17181
|
-
wrapElem.parentElement.setAttribute('aria-label', 'home');
|
|
17182
|
-
}
|
|
17183
17221
|
if (currItem.text !== prevItem.text && wrapElem) {
|
|
17184
17222
|
wrapElem.childNodes.forEach((child) => {
|
|
17185
17223
|
if (child.nodeType === Node.TEXT_NODE) {
|