@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
|
@@ -4722,7 +4722,10 @@ var Toolbar = /** @__PURE__ @class */ (function (_super) {
|
|
|
4722
4722
|
++nodeIndex;
|
|
4723
4723
|
}
|
|
4724
4724
|
else {
|
|
4725
|
-
ele.
|
|
4725
|
+
var children = Array.prototype.slice.call(ele.children);
|
|
4726
|
+
var insertionNode = children.slice(index)
|
|
4727
|
+
.find(function (child) { return !child.classList.contains(CLS_POPPRI); });
|
|
4728
|
+
ele.insertBefore(el, insertionNode || null);
|
|
4726
4729
|
}
|
|
4727
4730
|
if (el.classList.contains(CLS_SEPARATOR)) {
|
|
4728
4731
|
setStyleAttribute(el, { display: '', height: sepHeight + 'px' });
|
|
@@ -11244,7 +11247,7 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
11244
11247
|
}
|
|
11245
11248
|
this.changeState(node, 'check', null, true, true);
|
|
11246
11249
|
}
|
|
11247
|
-
else if (count === 0 && this.checkedNodes.length === 0) {
|
|
11250
|
+
else if (count === 0 && this.checkedNodes.length === 0 && indeterminate.length === 0) {
|
|
11248
11251
|
this.changeState(node, 'uncheck', null, true, true);
|
|
11249
11252
|
}
|
|
11250
11253
|
}
|
|
@@ -11514,6 +11517,7 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
11514
11517
|
}
|
|
11515
11518
|
};
|
|
11516
11519
|
TreeView.prototype.ensureParentCheckState = function (element) {
|
|
11520
|
+
var _this = this;
|
|
11517
11521
|
if (!isNullOrUndefined(element)) {
|
|
11518
11522
|
if (element.classList.contains(ROOT)) {
|
|
11519
11523
|
return;
|
|
@@ -11533,6 +11537,8 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
11533
11537
|
var dataUid_1 = element.getAttribute('data-uid');
|
|
11534
11538
|
var rootNodeChecked_1 = true;
|
|
11535
11539
|
var childNodeChecked_1 = false;
|
|
11540
|
+
var ChildNodeData = this.getAllChildNodes(this.DDTTreeData, dataUid_1);
|
|
11541
|
+
var selectedChildren_1 = 0;
|
|
11536
11542
|
nodes.forEach(function (childNode) {
|
|
11537
11543
|
if (childNode instanceof HTMLElement) {
|
|
11538
11544
|
var ariaChecked = childNode.getAttribute('aria-checked');
|
|
@@ -11562,6 +11568,13 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
11562
11568
|
childItems = this.getChildNodes(this.DDTTreeData, dataUid_1);
|
|
11563
11569
|
}
|
|
11564
11570
|
count = childItems.length;
|
|
11571
|
+
ChildNodeData.forEach(function (child) {
|
|
11572
|
+
var childKey = String(child[_this.fields.id]);
|
|
11573
|
+
if (_this.checkedNodes.indexOf(childKey) !== -1 ||
|
|
11574
|
+
_this.OldCheckedData.some(function (oldNode) { return oldNode['parentID'] === childKey; })) {
|
|
11575
|
+
selectedChildren_1++;
|
|
11576
|
+
}
|
|
11577
|
+
});
|
|
11565
11578
|
}
|
|
11566
11579
|
if (this.autoCheck && this.showCheckBox && !(this.fields.dataSource instanceof DataManager)) {
|
|
11567
11580
|
var selectedChildNodeDetails = this.getSelectedChildNodeDetails(dataUid_1);
|
|
@@ -11581,7 +11594,7 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
11581
11594
|
else if ((checkedCount > 0 && !parentNodeChecked && (this.autoCheck && this.showCheckBox))) {
|
|
11582
11595
|
this.changeState(checkBoxEle, 'indeterminate', null, true, true);
|
|
11583
11596
|
}
|
|
11584
|
-
else if (checkedCount > 0 || indeterminateNodes.length > 0) {
|
|
11597
|
+
else if (checkedCount > 0 || indeterminateNodes.length > 0 || selectedChildren_1 > 0) {
|
|
11585
11598
|
this.changeState(checkBoxEle, 'indeterminate', null, true, true);
|
|
11586
11599
|
}
|
|
11587
11600
|
else if (checkedCount === 0) {
|
|
@@ -11628,6 +11641,34 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
11628
11641
|
return false;
|
|
11629
11642
|
});
|
|
11630
11643
|
};
|
|
11644
|
+
TreeView.prototype.getAllChildNodes = function (data, parentId) {
|
|
11645
|
+
if (isNullOrUndefined(data) || isNullOrUndefined(parentId)) {
|
|
11646
|
+
return [];
|
|
11647
|
+
}
|
|
11648
|
+
if (this.dataType === 1) {
|
|
11649
|
+
var pidField_1 = this.fields.parentID;
|
|
11650
|
+
var target_1 = parentId.toString();
|
|
11651
|
+
return data.filter(function (item) {
|
|
11652
|
+
var pidVal = getValue(pidField_1, item);
|
|
11653
|
+
return !isNullOrUndefined(pidVal) && pidVal.toString() === target_1;
|
|
11654
|
+
});
|
|
11655
|
+
}
|
|
11656
|
+
if (this.dataType === 2) {
|
|
11657
|
+
var parentFieldId_1 = this.fields.id;
|
|
11658
|
+
var childField = this.fields.child.toString();
|
|
11659
|
+
var target_2 = parentId.toString();
|
|
11660
|
+
var node = data.find(function (n) {
|
|
11661
|
+
var idVal = getValue(parentFieldId_1, n);
|
|
11662
|
+
return !isNullOrUndefined(idVal) && idVal.toString() === target_2;
|
|
11663
|
+
});
|
|
11664
|
+
if (!node) {
|
|
11665
|
+
return [];
|
|
11666
|
+
}
|
|
11667
|
+
var children = getValue(childField, node);
|
|
11668
|
+
return Array.isArray(children) ? children : [];
|
|
11669
|
+
}
|
|
11670
|
+
return [];
|
|
11671
|
+
};
|
|
11631
11672
|
TreeView.prototype.ensureChildCheckState = function (element, e, isFromExpandAll) {
|
|
11632
11673
|
var _this = this;
|
|
11633
11674
|
if (!isNullOrUndefined(element)) {
|
|
@@ -17407,6 +17448,10 @@ var Breadcrumb = /** @__PURE__ @class */ (function (_super) {
|
|
|
17407
17448
|
args.item.removeAttribute('role');
|
|
17408
17449
|
if (isLastItem) {
|
|
17409
17450
|
args.item.setAttribute('data-active-item', '');
|
|
17451
|
+
args.item.setAttribute('aria-current', 'page');
|
|
17452
|
+
}
|
|
17453
|
+
else {
|
|
17454
|
+
args.item.removeAttribute('aria-current');
|
|
17410
17455
|
}
|
|
17411
17456
|
if (!_this.itemTemplate) {
|
|
17412
17457
|
_this.beforeItemRenderChanges(args.curData, eventArgs.item, args.item, containsRightIcon);
|
|
@@ -17598,9 +17643,6 @@ var Breadcrumb = /** @__PURE__ @class */ (function (_super) {
|
|
|
17598
17643
|
};
|
|
17599
17644
|
Breadcrumb.prototype.beforeItemRenderChanges = function (prevItem, currItem, elem, isRightIcon) {
|
|
17600
17645
|
var wrapElem = elem.querySelector('.e-anchor-wrap');
|
|
17601
|
-
if (wrapElem) {
|
|
17602
|
-
wrapElem.parentElement.setAttribute('aria-label', 'home');
|
|
17603
|
-
}
|
|
17604
17646
|
if (currItem.text !== prevItem.text && wrapElem) {
|
|
17605
17647
|
wrapElem.childNodes.forEach(function (child) {
|
|
17606
17648
|
if (child.nodeType === Node.TEXT_NODE) {
|