@syncfusion/ej2-navigations 31.1.20 → 31.2.3
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 +3 -3
- package/dist/ej2-navigations.umd.min.js +3 -3
- package/dist/ej2-navigations.umd.min.js.map +1 -1
- package/dist/es6/ej2-navigations.es2015.js +47 -6
- package/dist/es6/ej2-navigations.es2015.js.map +1 -1
- package/dist/es6/ej2-navigations.es5.js +48 -6
- package/dist/es6/ej2-navigations.es5.js.map +1 -1
- package/dist/global/ej2-navigations.min.js +3 -3
- package/dist/global/ej2-navigations.min.js.map +1 -1
- package/dist/global/index.d.ts +2 -2
- package/package.json +7 -7
- package/src/breadcrumb/breadcrumb.js +4 -3
- package/src/toolbar/toolbar.js +4 -1
- package/src/treeview/treeview.d.ts +1 -0
- package/src/treeview/treeview.js +40 -2
- 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 +2 -3
- package/styles/bootstrap4.css +3 -4
- package/styles/bootstrap5-dark-lite.css +12 -10
- package/styles/bootstrap5-dark.css +12 -10
- package/styles/bootstrap5-lite.css +12 -10
- package/styles/bootstrap5.3-lite.css +2 -3
- package/styles/bootstrap5.3.css +2 -3
- package/styles/bootstrap5.css +12 -10
- 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 +3 -4
- package/styles/fluent-dark.css +5 -7
- package/styles/fluent-lite.css +3 -4
- package/styles/fluent.css +5 -7
- package/styles/fluent2-lite.css +1 -2
- package/styles/fluent2.css +1 -2
- package/styles/highcontrast-light-lite.css +0 -1
- package/styles/highcontrast-light.css +0 -1
- package/styles/highcontrast-lite.css +2 -3
- package/styles/highcontrast.css +3 -5
- package/styles/material-dark-lite.css +2 -3
- package/styles/material-dark.css +2 -3
- package/styles/material-lite.css +2 -3
- package/styles/material.css +2 -3
- package/styles/material3-dark-lite.css +0 -1
- package/styles/material3-dark.css +0 -1
- package/styles/material3-lite.css +0 -1
- package/styles/material3.css +0 -1
- package/styles/menu/_bootstrap-dark-definition.scss +0 -1
- package/styles/menu/_bootstrap-definition.scss +0 -1
- package/styles/menu/_fluent-definition.scss +1 -1
- package/styles/menu/_fluent2-definition.scss +1 -1
- package/styles/menu/_layout.scss +1 -7
- package/styles/menu/bds.css +0 -1
- package/styles/menu/bootstrap-dark.css +0 -1
- package/styles/menu/bootstrap.css +0 -1
- package/styles/menu/bootstrap4.css +0 -1
- package/styles/menu/bootstrap5-dark.css +0 -1
- package/styles/menu/bootstrap5.3.css +0 -1
- package/styles/menu/bootstrap5.css +0 -1
- package/styles/menu/fabric-dark.css +0 -1
- package/styles/menu/fabric.css +0 -1
- package/styles/menu/fluent-dark.css +1 -2
- package/styles/menu/fluent.css +1 -2
- package/styles/menu/fluent2.css +1 -2
- package/styles/menu/highcontrast-light.css +0 -1
- package/styles/menu/highcontrast.css +0 -1
- package/styles/menu/material-dark.css +0 -1
- package/styles/menu/material.css +0 -1
- package/styles/menu/material3-dark.css +0 -1
- package/styles/menu/material3.css +0 -1
- package/styles/menu/tailwind-dark.css +0 -1
- package/styles/menu/tailwind.css +0 -1
- package/styles/menu/tailwind3.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/tailwind3-lite.css +0 -1
- package/styles/tailwind3.css +0 -1
- package/styles/treeview/_bigger.scss +2 -4
- package/styles/treeview/_bootstrap4-definition.scss +2 -2
- package/styles/treeview/_bootstrap5-definition.scss +4 -4
- package/styles/treeview/_bootstrap5.3-definition.scss +1 -1
- package/styles/treeview/_fluent-definition.scss +3 -3
- package/styles/treeview/_highcontrast-definition.scss +4 -2
- package/styles/treeview/_layout.scss +4 -4
- package/styles/treeview/_material-dark-definition.scss +1 -1
- package/styles/treeview/_material-definition.scss +1 -1
- package/styles/treeview/bootstrap4.css +3 -3
- package/styles/treeview/bootstrap5-dark.css +12 -9
- package/styles/treeview/bootstrap5.3.css +2 -2
- package/styles/treeview/bootstrap5.css +12 -9
- package/styles/treeview/fluent-dark.css +4 -5
- package/styles/treeview/fluent.css +4 -5
- package/styles/treeview/highcontrast.css +3 -4
- package/styles/treeview/material-dark.css +2 -2
- package/styles/treeview/material.css +2 -2
|
@@ -4578,7 +4578,10 @@ let Toolbar = class Toolbar extends Component {
|
|
|
4578
4578
|
++nodeIndex;
|
|
4579
4579
|
}
|
|
4580
4580
|
else {
|
|
4581
|
-
ele.
|
|
4581
|
+
const children = Array.prototype.slice.call(ele.children);
|
|
4582
|
+
const insertionNode = children.slice(index)
|
|
4583
|
+
.find((child) => !child.classList.contains(CLS_POPPRI));
|
|
4584
|
+
ele.insertBefore(el, insertionNode || null);
|
|
4582
4585
|
}
|
|
4583
4586
|
if (el.classList.contains(CLS_SEPARATOR)) {
|
|
4584
4587
|
setStyleAttribute(el, { display: '', height: sepHeight + 'px' });
|
|
@@ -10910,7 +10913,7 @@ let TreeView = TreeView_1 = class TreeView extends Component {
|
|
|
10910
10913
|
}
|
|
10911
10914
|
this.changeState(node, 'check', null, true, true);
|
|
10912
10915
|
}
|
|
10913
|
-
else if (count === 0 && this.checkedNodes.length === 0) {
|
|
10916
|
+
else if (count === 0 && this.checkedNodes.length === 0 && indeterminate.length === 0) {
|
|
10914
10917
|
this.changeState(node, 'uncheck', null, true, true);
|
|
10915
10918
|
}
|
|
10916
10919
|
}
|
|
@@ -11198,6 +11201,8 @@ let TreeView = TreeView_1 = class TreeView extends Component {
|
|
|
11198
11201
|
const dataUid = element.getAttribute('data-uid');
|
|
11199
11202
|
let rootNodeChecked = true;
|
|
11200
11203
|
let childNodeChecked = false;
|
|
11204
|
+
const ChildNodeData = this.getAllChildNodes(this.DDTTreeData, dataUid);
|
|
11205
|
+
let selectedChildren = 0;
|
|
11201
11206
|
nodes.forEach((childNode) => {
|
|
11202
11207
|
if (childNode instanceof HTMLElement) {
|
|
11203
11208
|
const ariaChecked = childNode.getAttribute('aria-checked');
|
|
@@ -11227,6 +11232,13 @@ let TreeView = TreeView_1 = class TreeView extends Component {
|
|
|
11227
11232
|
childItems = this.getChildNodes(this.DDTTreeData, dataUid);
|
|
11228
11233
|
}
|
|
11229
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
|
+
});
|
|
11230
11242
|
}
|
|
11231
11243
|
if (this.autoCheck && this.showCheckBox && !(this.fields.dataSource instanceof DataManager)) {
|
|
11232
11244
|
const selectedChildNodeDetails = this.getSelectedChildNodeDetails(dataUid);
|
|
@@ -11246,7 +11258,7 @@ let TreeView = TreeView_1 = class TreeView extends Component {
|
|
|
11246
11258
|
else if ((checkedCount > 0 && !parentNodeChecked && (this.autoCheck && this.showCheckBox))) {
|
|
11247
11259
|
this.changeState(checkBoxEle, 'indeterminate', null, true, true);
|
|
11248
11260
|
}
|
|
11249
|
-
else if (checkedCount > 0 || indeterminateNodes.length > 0) {
|
|
11261
|
+
else if (checkedCount > 0 || indeterminateNodes.length > 0 || selectedChildren > 0) {
|
|
11250
11262
|
this.changeState(checkBoxEle, 'indeterminate', null, true, true);
|
|
11251
11263
|
}
|
|
11252
11264
|
else if (checkedCount === 0) {
|
|
@@ -11292,6 +11304,34 @@ let TreeView = TreeView_1 = class TreeView extends Component {
|
|
|
11292
11304
|
return false;
|
|
11293
11305
|
});
|
|
11294
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
|
+
}
|
|
11295
11335
|
ensureChildCheckState(element, e, isFromExpandAll) {
|
|
11296
11336
|
if (!isNullOrUndefined(element)) {
|
|
11297
11337
|
const childElement = select('.' + PARENTITEM, element);
|
|
@@ -16983,6 +17023,10 @@ let Breadcrumb = class Breadcrumb extends Component {
|
|
|
16983
17023
|
args.item.removeAttribute('role');
|
|
16984
17024
|
if (isLastItem) {
|
|
16985
17025
|
args.item.setAttribute('data-active-item', '');
|
|
17026
|
+
args.item.setAttribute('aria-current', 'page');
|
|
17027
|
+
}
|
|
17028
|
+
else {
|
|
17029
|
+
args.item.removeAttribute('aria-current');
|
|
16986
17030
|
}
|
|
16987
17031
|
if (!this.itemTemplate) {
|
|
16988
17032
|
this.beforeItemRenderChanges(args.curData, eventArgs.item, args.item, containsRightIcon);
|
|
@@ -17174,9 +17218,6 @@ let Breadcrumb = class Breadcrumb extends Component {
|
|
|
17174
17218
|
}
|
|
17175
17219
|
beforeItemRenderChanges(prevItem, currItem, elem, isRightIcon) {
|
|
17176
17220
|
const wrapElem = elem.querySelector('.e-anchor-wrap');
|
|
17177
|
-
if (wrapElem) {
|
|
17178
|
-
wrapElem.parentElement.setAttribute('aria-label', 'home');
|
|
17179
|
-
}
|
|
17180
17221
|
if (currItem.text !== prevItem.text && wrapElem) {
|
|
17181
17222
|
wrapElem.childNodes.forEach((child) => {
|
|
17182
17223
|
if (child.nodeType === Node.TEXT_NODE) {
|