@syncfusion/ej2-navigations 27.1.56 → 27.1.58
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 +91 -6
- package/dist/es6/ej2-navigations.es2015.js.map +1 -1
- package/dist/es6/ej2-navigations.es5.js +94 -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 +8 -8
- package/src/carousel/carousel.js +2 -1
- package/src/common/menu-base.js +8 -2
- package/src/sidebar/sidebar.js +3 -0
- package/src/tab/tab.js +9 -0
- package/src/treeview/treeview.d.ts +11 -1
- package/src/treeview/treeview.js +72 -3
package/dist/global/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* filename: index.d.ts
|
|
3
|
-
* version : 27.1.
|
|
3
|
+
* version : 27.1.58
|
|
4
4
|
* Copyright Syncfusion Inc. 2001 - 2023. 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,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"_from": "@syncfusion/ej2-navigations@*",
|
|
3
|
-
"_id": "@syncfusion/ej2-navigations@27.1.
|
|
3
|
+
"_id": "@syncfusion/ej2-navigations@27.1.57",
|
|
4
4
|
"_inBundle": false,
|
|
5
|
-
"_integrity": "sha512-
|
|
5
|
+
"_integrity": "sha512-iWr02p5pCroT7/QZ41mPYfkGqcOuisWKOJ5fZRlWpivB6Z4NV0ngDMZ9bbL5Xi6ByFyrP+RfTNW5WNJmOFsB5A==",
|
|
6
6
|
"_location": "/@syncfusion/ej2-navigations",
|
|
7
7
|
"_phantomChildren": {},
|
|
8
8
|
"_requested": {
|
|
@@ -40,8 +40,8 @@
|
|
|
40
40
|
"/@syncfusion/ej2-spreadsheet",
|
|
41
41
|
"/@syncfusion/ej2-vue-navigations"
|
|
42
42
|
],
|
|
43
|
-
"_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-hotfix-new/@syncfusion/ej2-navigations/-/ej2-navigations-27.1.
|
|
44
|
-
"_shasum": "
|
|
43
|
+
"_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-hotfix-new/@syncfusion/ej2-navigations/-/ej2-navigations-27.1.57.tgz",
|
|
44
|
+
"_shasum": "bba1a68ef4d89d698ab0758933307a5443488974",
|
|
45
45
|
"_spec": "@syncfusion/ej2-navigations@*",
|
|
46
46
|
"_where": "/jenkins/workspace/elease-automation_release_27.1.1/packages/included",
|
|
47
47
|
"author": {
|
|
@@ -53,11 +53,11 @@
|
|
|
53
53
|
"bundleDependencies": false,
|
|
54
54
|
"dependencies": {
|
|
55
55
|
"@syncfusion/ej2-base": "~27.1.55",
|
|
56
|
-
"@syncfusion/ej2-buttons": "~27.1.
|
|
56
|
+
"@syncfusion/ej2-buttons": "~27.1.58",
|
|
57
57
|
"@syncfusion/ej2-data": "~27.1.52",
|
|
58
|
-
"@syncfusion/ej2-inputs": "~27.1.
|
|
58
|
+
"@syncfusion/ej2-inputs": "~27.1.58",
|
|
59
59
|
"@syncfusion/ej2-lists": "~27.1.50",
|
|
60
|
-
"@syncfusion/ej2-popups": "~27.1.
|
|
60
|
+
"@syncfusion/ej2-popups": "~27.1.58"
|
|
61
61
|
},
|
|
62
62
|
"deprecated": false,
|
|
63
63
|
"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",
|
|
@@ -162,6 +162,6 @@
|
|
|
162
162
|
"url": "git+https://github.com/syncfusion/ej2-javascript-ui-controls.git"
|
|
163
163
|
},
|
|
164
164
|
"typings": "index.d.ts",
|
|
165
|
-
"version": "27.1.
|
|
165
|
+
"version": "27.1.58",
|
|
166
166
|
"sideEffects": false
|
|
167
167
|
}
|
package/src/carousel/carousel.js
CHANGED
|
@@ -587,7 +587,8 @@ var Carousel = /** @class */ (function (_super) {
|
|
|
587
587
|
this.applySlideInterval();
|
|
588
588
|
};
|
|
589
589
|
Carousel.prototype.autoSlideChange = function () {
|
|
590
|
-
var activeSlide = this.element.querySelector("." + CLS_ACTIVE)
|
|
590
|
+
var activeSlide = this.element.querySelector("." + CLS_ITEM + "." + CLS_ACTIVE)
|
|
591
|
+
|| this.element.querySelector("." + CLS_INDICATORS + " ." + CLS_ACTIVE);
|
|
591
592
|
if (isNullOrUndefined(activeSlide)) {
|
|
592
593
|
return;
|
|
593
594
|
}
|
package/src/common/menu-base.js
CHANGED
|
@@ -319,6 +319,9 @@ var MenuBase = /** @class */ (function (_super) {
|
|
|
319
319
|
this.delegateMouseDownHandler = this.mouseDownHandler.bind(this);
|
|
320
320
|
EventHandler.add(this.isMenu ? document : wrapper, 'mouseover', this.delegateMoverHandler, this);
|
|
321
321
|
EventHandler.add(document, 'mousedown', this.delegateMouseDownHandler, this);
|
|
322
|
+
if (!this.isMenu && !this.target) {
|
|
323
|
+
EventHandler.add(document, 'scroll', this.scrollHandler, this);
|
|
324
|
+
}
|
|
322
325
|
}
|
|
323
326
|
this.delegateClickHandler = this.clickHandler.bind(this);
|
|
324
327
|
EventHandler.add(document, 'click', this.delegateClickHandler, this);
|
|
@@ -684,7 +687,7 @@ var MenuBase = /** @class */ (function (_super) {
|
|
|
684
687
|
_this.afterCloseMenu(e);
|
|
685
688
|
}
|
|
686
689
|
else if (isOpen && !_this.hamburgerMode && closedLi && !trgtLi && _this.keyType !== 'left' && (_this.navIdx.length || !_this.isMenu && _this.navIdx.length === 0)) {
|
|
687
|
-
var ele = (e && (e.target.classList.contains('e-vscroll') || e.target.classList.contains('e-scroll-nav')))
|
|
690
|
+
var ele = (e && e.target.classList && (e.target.classList.contains('e-vscroll') || e.target.classList.contains('e-scroll-nav')))
|
|
688
691
|
? closest(e.target, '.e-menu-wrapper') : null;
|
|
689
692
|
if (ele) {
|
|
690
693
|
ele = ele.querySelector('.e-menu-item');
|
|
@@ -693,7 +696,7 @@ var MenuBase = /** @class */ (function (_super) {
|
|
|
693
696
|
}
|
|
694
697
|
}
|
|
695
698
|
else {
|
|
696
|
-
if (!(e && e.target.classList.contains('e-nav-arrow'))) {
|
|
699
|
+
if (!(e && e.target.classList && e.target.classList.contains('e-nav-arrow'))) {
|
|
697
700
|
_this.closeMenu(_this.navIdx[_this.navIdx.length - 1], e);
|
|
698
701
|
}
|
|
699
702
|
}
|
|
@@ -1906,6 +1909,9 @@ var MenuBase = /** @class */ (function (_super) {
|
|
|
1906
1909
|
if (!Browser.isDevice) {
|
|
1907
1910
|
EventHandler.remove(this.isMenu ? document : wrapper, 'mouseover', this.delegateMoverHandler);
|
|
1908
1911
|
EventHandler.remove(document, 'mousedown', this.delegateMouseDownHandler);
|
|
1912
|
+
if (!this.isMenu && !this.target) {
|
|
1913
|
+
EventHandler.remove(document, 'scroll', this.scrollHandler);
|
|
1914
|
+
}
|
|
1909
1915
|
}
|
|
1910
1916
|
EventHandler.remove(document, 'click', this.delegateClickHandler);
|
|
1911
1917
|
this.unWireKeyboardEvent(wrapper);
|
package/src/sidebar/sidebar.js
CHANGED
|
@@ -400,6 +400,9 @@ var Sidebar = /** @class */ (function (_super) {
|
|
|
400
400
|
}
|
|
401
401
|
};
|
|
402
402
|
Sidebar.prototype.resize = function () {
|
|
403
|
+
if (!isNullOrUndefined(this.width) && this.width !== 'auto' && typeof this.width === 'string' && !this.width.includes('px')) {
|
|
404
|
+
this.setType(this.type);
|
|
405
|
+
}
|
|
403
406
|
if (this.type === 'Auto') {
|
|
404
407
|
if (Browser.isDevice) {
|
|
405
408
|
addClass([this.element], OVER);
|
package/src/tab/tab.js
CHANGED
|
@@ -1784,6 +1784,11 @@ var Tab = /** @class */ (function (_super) {
|
|
|
1784
1784
|
var _this = this;
|
|
1785
1785
|
var addArgs = { addedItems: items, cancel: false };
|
|
1786
1786
|
if (!this.isReplace) {
|
|
1787
|
+
for (var _i = 0, items_1 = items; _i < items_1.length; _i++) {
|
|
1788
|
+
var item = items_1[_i];
|
|
1789
|
+
item.disabled = item.disabled || false;
|
|
1790
|
+
item.visible = item.visible || true;
|
|
1791
|
+
}
|
|
1787
1792
|
this.trigger('adding', addArgs, function (tabAddingArgs) {
|
|
1788
1793
|
if (!tabAddingArgs.cancel) {
|
|
1789
1794
|
_this.addingTabContent(items, index);
|
|
@@ -1989,6 +1994,10 @@ var Tab = /** @class */ (function (_super) {
|
|
|
1989
1994
|
}
|
|
1990
1995
|
}
|
|
1991
1996
|
this.setActiveBorder();
|
|
1997
|
+
if (!isNOU(this.items[index])) {
|
|
1998
|
+
this.items[index].visible = !value;
|
|
1999
|
+
this.dataBind();
|
|
2000
|
+
}
|
|
1992
2001
|
if (!isNullOrUndefined(item.firstElementChild)) {
|
|
1993
2002
|
item.firstElementChild.setAttribute('aria-hidden', '' + value);
|
|
1994
2003
|
}
|
|
@@ -1064,6 +1064,7 @@ export declare class TreeView extends Component<HTMLElement> implements INotifyP
|
|
|
1064
1064
|
private updateCheckedProp;
|
|
1065
1065
|
private ensureIndeterminate;
|
|
1066
1066
|
private ensureParentCheckState;
|
|
1067
|
+
private getSelectedChildNodeDetails;
|
|
1067
1068
|
private ensureChildCheckState;
|
|
1068
1069
|
private doCheckBoxAction;
|
|
1069
1070
|
private updateFieldChecked;
|
|
@@ -1464,6 +1465,15 @@ export declare class TreeView extends Component<HTMLElement> implements INotifyP
|
|
|
1464
1465
|
* @param {string | Element} target - Specifies the ID of TreeView node or TreeView node as target element.
|
|
1465
1466
|
* @param {Object[]} newData - Specifies the new data of TreeView node.
|
|
1466
1467
|
* @returns {void}
|
|
1468
|
+
* ```typescript
|
|
1469
|
+
* var treeObj = document.getElementById("treeview").ej2_instances[0];
|
|
1470
|
+
* var data = treeObj.getTreeData("01");
|
|
1471
|
+
* var newData = {
|
|
1472
|
+
* id: data[0].id,
|
|
1473
|
+
* name: "new Text",
|
|
1474
|
+
* };
|
|
1475
|
+
* treeObj.refreshNode("01", [newData]);
|
|
1476
|
+
* ```
|
|
1467
1477
|
*/
|
|
1468
1478
|
refreshNode(target: string | Element, newData: {
|
|
1469
1479
|
[key: string]: Object;
|
|
@@ -1476,7 +1486,7 @@ export declare class TreeView extends Component<HTMLElement> implements INotifyP
|
|
|
1476
1486
|
*/
|
|
1477
1487
|
removeNodes(nodes: string[] | Element[]): void;
|
|
1478
1488
|
/**
|
|
1479
|
-
* Replaces the text of the TreeView node with the given text.
|
|
1489
|
+
* Replaces the text of the TreeView node with the given text only when the `allowEditing` property is enabled.
|
|
1480
1490
|
*
|
|
1481
1491
|
* @param {string | Element} target - Specifies ID of TreeView node/TreeView node as target element.
|
|
1482
1492
|
* @param {string} newText - Specifies the new text of TreeView node.
|
package/src/treeview/treeview.js
CHANGED
|
@@ -998,13 +998,31 @@ var TreeView = /** @class */ (function (_super) {
|
|
|
998
998
|
var checkBoxEle = element.getElementsByClassName(CHECKBOXWRAP)[0];
|
|
999
999
|
var count = nodes.length;
|
|
1000
1000
|
var checkedCount = checkedNodes.length;
|
|
1001
|
+
var matchedChildNodes = [];
|
|
1002
|
+
var oldChildCount = [];
|
|
1001
1003
|
var dataUid_1 = element.getAttribute('data-uid');
|
|
1004
|
+
var rootNodeChecked_1 = true;
|
|
1005
|
+
var childNodeChecked_1 = false;
|
|
1006
|
+
nodes.forEach(function (childNode) {
|
|
1007
|
+
if (childNode instanceof HTMLElement) {
|
|
1008
|
+
var ariaChecked = childNode.getAttribute('aria-checked');
|
|
1009
|
+
if (ariaChecked === 'true') {
|
|
1010
|
+
childNodeChecked_1 = true;
|
|
1011
|
+
}
|
|
1012
|
+
else {
|
|
1013
|
+
rootNodeChecked_1 = false;
|
|
1014
|
+
}
|
|
1015
|
+
}
|
|
1016
|
+
});
|
|
1017
|
+
var parentNodeChecked = false;
|
|
1002
1018
|
if (this.element.classList.contains('e-filtering')) {
|
|
1003
1019
|
var oldCheckedNodes = new DataManager(this.OldCheckedData).executeLocal(new Query().where('parentID', 'equal', dataUid_1, true));
|
|
1004
1020
|
checkedCount = oldCheckedNodes.length;
|
|
1005
1021
|
var parentNode = new DataManager(this.OldCheckedData).executeLocal(new Query().where('hasChildren', 'equal', true, true));
|
|
1006
|
-
if (
|
|
1022
|
+
if (parentNode.length > 0
|
|
1023
|
+
&& (this.OldCheckedData.some(function (oldNode) { return oldNode.id === dataUid_1; }) && childNodeChecked_1)) {
|
|
1007
1024
|
checkedCount = parentNode.length;
|
|
1025
|
+
parentNodeChecked = true;
|
|
1008
1026
|
}
|
|
1009
1027
|
var childItems = [];
|
|
1010
1028
|
if (this.dataType === 1) {
|
|
@@ -1015,12 +1033,23 @@ var TreeView = /** @class */ (function (_super) {
|
|
|
1015
1033
|
}
|
|
1016
1034
|
count = childItems.length;
|
|
1017
1035
|
}
|
|
1036
|
+
if (this.autoCheck && this.showCheckBox) {
|
|
1037
|
+
var selectedChildNodeDetails = this.getSelectedChildNodeDetails(dataUid_1);
|
|
1038
|
+
matchedChildNodes = selectedChildNodeDetails;
|
|
1039
|
+
oldChildCount = new DataManager(this.checkActionNodes)
|
|
1040
|
+
.executeLocal(new Query().where('parentID', 'equal', dataUid_1, true));
|
|
1041
|
+
}
|
|
1018
1042
|
if (count === 0 && checkedCount === 0) {
|
|
1019
1043
|
return;
|
|
1020
1044
|
}
|
|
1021
|
-
else if (count === checkedCount)
|
|
1045
|
+
else if (count === checkedCount || ((parentNodeChecked && count > 0) && (oldChildCount.length === matchedChildNodes.length)
|
|
1046
|
+
&& (oldChildCount.length !== 0 && matchedChildNodes.length !== 0) && rootNodeChecked_1
|
|
1047
|
+
&& (this.autoCheck && this.showCheckBox))) {
|
|
1022
1048
|
this.changeState(checkBoxEle, 'check', null, true, true);
|
|
1023
1049
|
}
|
|
1050
|
+
else if ((checkedCount > 0 && !parentNodeChecked && (this.autoCheck && this.showCheckBox))) {
|
|
1051
|
+
this.changeState(checkBoxEle, 'indeterminate', null, true, true);
|
|
1052
|
+
}
|
|
1024
1053
|
else if (checkedCount > 0 || indeterminateNodes.length > 0) {
|
|
1025
1054
|
this.changeState(checkBoxEle, 'indeterminate', null, true, true);
|
|
1026
1055
|
}
|
|
@@ -1034,6 +1063,21 @@ var TreeView = /** @class */ (function (_super) {
|
|
|
1034
1063
|
}
|
|
1035
1064
|
}
|
|
1036
1065
|
};
|
|
1066
|
+
TreeView.prototype.getSelectedChildNodeDetails = function (dataUid) {
|
|
1067
|
+
var _this = this;
|
|
1068
|
+
return this.checkedNodes
|
|
1069
|
+
.map(function (checkedNodeId) {
|
|
1070
|
+
return new DataManager(_this.DDTTreeData)
|
|
1071
|
+
.executeLocal(new Query().where('id', 'equal', checkedNodeId, true))[0];
|
|
1072
|
+
})
|
|
1073
|
+
.filter(function (childNode) {
|
|
1074
|
+
if (childNode && typeof childNode === 'object' && 'pid' in childNode) {
|
|
1075
|
+
var childNodePid = childNode.pid;
|
|
1076
|
+
return childNodePid.toString() === dataUid;
|
|
1077
|
+
}
|
|
1078
|
+
return false;
|
|
1079
|
+
});
|
|
1080
|
+
};
|
|
1037
1081
|
TreeView.prototype.ensureChildCheckState = function (element, e, isFromExpandAll) {
|
|
1038
1082
|
if (!isNOU(element)) {
|
|
1039
1083
|
var childElement = select('.' + PARENTITEM, element);
|
|
@@ -1665,6 +1709,7 @@ var TreeView = /** @class */ (function (_super) {
|
|
|
1665
1709
|
this.trigger('nodeChecked', eventArgs);
|
|
1666
1710
|
};
|
|
1667
1711
|
TreeView.prototype.updateOldCheckedData = function (data) {
|
|
1712
|
+
var _this = this;
|
|
1668
1713
|
var dataManager = new DataManager(data);
|
|
1669
1714
|
var childItems = dataManager.executeLocal(new Query().where('isChecked', 'equal', 'true', true));
|
|
1670
1715
|
var uncheckedItems = dataManager.executeLocal(new Query().where('isChecked', 'equal', 'false', true));
|
|
@@ -1672,6 +1717,15 @@ var TreeView = /** @class */ (function (_super) {
|
|
|
1672
1717
|
var index = this.OldCheckedData.findIndex(function (e) { return e['id'] === uncheckedItems[0]['id']; });
|
|
1673
1718
|
if (index !== -1) {
|
|
1674
1719
|
this.OldCheckedData.splice(index, 1);
|
|
1720
|
+
var childNodes = this.OldCheckedData.filter(function (e) { return e['parentID'] === uncheckedItems[0]['id']; });
|
|
1721
|
+
if (childNodes.length > 0) {
|
|
1722
|
+
childNodes.forEach(function (child) {
|
|
1723
|
+
var childIndex = _this.OldCheckedData.findIndex(function (e) { return e['id'] === child.id; });
|
|
1724
|
+
if (childIndex !== -1) {
|
|
1725
|
+
_this.OldCheckedData.splice(childIndex, 1);
|
|
1726
|
+
}
|
|
1727
|
+
});
|
|
1728
|
+
}
|
|
1675
1729
|
return;
|
|
1676
1730
|
}
|
|
1677
1731
|
}
|
|
@@ -5094,6 +5148,12 @@ var TreeView = /** @class */ (function (_super) {
|
|
|
5094
5148
|
for (var i = 0; i < nodes.length; i++) {
|
|
5095
5149
|
var pid = getValue(this.fields.parentID, nodes[parseInt(i.toString(), 10)]);
|
|
5096
5150
|
dropLi = pid ? this.getElement(pid.toString()) : pid;
|
|
5151
|
+
if (!isNullOrUndefined(pid) && isNullOrUndefined(dropLi)) {
|
|
5152
|
+
this.preventExpand = false;
|
|
5153
|
+
this.ensureVisible(pid);
|
|
5154
|
+
this.preventExpand = preventTargetExpand;
|
|
5155
|
+
dropLi = this.getElement(pid.toString());
|
|
5156
|
+
}
|
|
5097
5157
|
this.addGivenNodes([nodes[parseInt(i.toString(), 10)]], dropLi, index);
|
|
5098
5158
|
}
|
|
5099
5159
|
}
|
|
@@ -5325,6 +5385,15 @@ var TreeView = /** @class */ (function (_super) {
|
|
|
5325
5385
|
* @param {string | Element} target - Specifies the ID of TreeView node or TreeView node as target element.
|
|
5326
5386
|
* @param {Object[]} newData - Specifies the new data of TreeView node.
|
|
5327
5387
|
* @returns {void}
|
|
5388
|
+
* ```typescript
|
|
5389
|
+
* var treeObj = document.getElementById("treeview").ej2_instances[0];
|
|
5390
|
+
* var data = treeObj.getTreeData("01");
|
|
5391
|
+
* var newData = {
|
|
5392
|
+
* id: data[0].id,
|
|
5393
|
+
* name: "new Text",
|
|
5394
|
+
* };
|
|
5395
|
+
* treeObj.refreshNode("01", [newData]);
|
|
5396
|
+
* ```
|
|
5328
5397
|
*/
|
|
5329
5398
|
TreeView.prototype.refreshNode = function (target, newData) {
|
|
5330
5399
|
if (isNOU(target) || isNOU(newData)) {
|
|
@@ -5440,7 +5509,7 @@ var TreeView = /** @class */ (function (_super) {
|
|
|
5440
5509
|
}
|
|
5441
5510
|
};
|
|
5442
5511
|
/**
|
|
5443
|
-
* Replaces the text of the TreeView node with the given text.
|
|
5512
|
+
* Replaces the text of the TreeView node with the given text only when the `allowEditing` property is enabled.
|
|
5444
5513
|
*
|
|
5445
5514
|
* @param {string | Element} target - Specifies ID of TreeView node/TreeView node as target element.
|
|
5446
5515
|
* @param {string} newText - Specifies the new text of TreeView node.
|