@syncfusion/ej2-navigations 31.2.5 → 31.2.16
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 +38 -11
- package/dist/es6/ej2-navigations.es2015.js.map +1 -1
- package/dist/es6/ej2-navigations.es5.js +39 -11
- 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 +7 -7
- package/src/common/menu-base.d.ts +1 -0
- package/src/common/menu-base.js +2 -1
- package/src/context-menu/context-menu.js +2 -0
- package/src/toolbar/toolbar.d.ts +1 -0
- package/src/toolbar/toolbar.js +8 -0
- package/src/treeview/treeview.d.ts +2 -0
- package/src/treeview/treeview.js +27 -10
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.16
|
|
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.16",
|
|
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.
|
|
15
|
-
"@syncfusion/ej2-lists": "~31.2.
|
|
16
|
-
"@syncfusion/ej2-popups": "~31.2.
|
|
11
|
+
"@syncfusion/ej2-base": "~31.2.12",
|
|
12
|
+
"@syncfusion/ej2-buttons": "~31.2.16",
|
|
13
|
+
"@syncfusion/ej2-data": "~31.2.16",
|
|
14
|
+
"@syncfusion/ej2-inputs": "~31.2.15",
|
|
15
|
+
"@syncfusion/ej2-lists": "~31.2.12",
|
|
16
|
+
"@syncfusion/ej2-popups": "~31.2.12"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {},
|
|
19
19
|
"keywords": [
|
|
@@ -189,6 +189,7 @@ export declare abstract class MenuBase extends Component<HTMLUListElement> imple
|
|
|
189
189
|
private timer;
|
|
190
190
|
private currentTarget;
|
|
191
191
|
private isCmenuHover;
|
|
192
|
+
protected isOpenCalled: boolean;
|
|
192
193
|
private isAnimationNone;
|
|
193
194
|
private isKBDAction;
|
|
194
195
|
private touchStartFn;
|
package/src/common/menu-base.js
CHANGED
|
@@ -155,6 +155,7 @@ var MenuBase = /** @class */ (function (_super) {
|
|
|
155
155
|
_this.isTapHold = false;
|
|
156
156
|
_this.tempItem = [];
|
|
157
157
|
_this.showSubMenuOn = 'Auto';
|
|
158
|
+
_this.isOpenCalled = false;
|
|
158
159
|
_this.isAnimationNone = false;
|
|
159
160
|
_this.isKBDAction = false;
|
|
160
161
|
return _this;
|
|
@@ -1292,7 +1293,7 @@ var MenuBase = /** @class */ (function (_super) {
|
|
|
1292
1293
|
}
|
|
1293
1294
|
}
|
|
1294
1295
|
this.toggleVisiblity(ul, false);
|
|
1295
|
-
if (this.isCMenu && this.enableScrolling && ul) {
|
|
1296
|
+
if ((this.isCMenu || this.isOpenCalled) && this.enableScrolling && ul) {
|
|
1296
1297
|
ul.style.height = '';
|
|
1297
1298
|
ul.style.top = '';
|
|
1298
1299
|
ul.style.left = '';
|
|
@@ -75,7 +75,9 @@ var ContextMenu = /** @class */ (function (_super) {
|
|
|
75
75
|
* @returns {void}
|
|
76
76
|
*/
|
|
77
77
|
ContextMenu.prototype.open = function (top, left, target) {
|
|
78
|
+
this.isOpenCalled = true;
|
|
78
79
|
_super.prototype.openMenu.call(this, null, null, top, left, null, target);
|
|
80
|
+
this.isOpenCalled = false;
|
|
79
81
|
};
|
|
80
82
|
/**
|
|
81
83
|
* Closes the ContextMenu if it is opened.
|
package/src/toolbar/toolbar.d.ts
CHANGED
|
@@ -265,6 +265,7 @@ export declare class Toolbar extends Component<HTMLElement> implements INotifyPr
|
|
|
265
265
|
private isVertical;
|
|
266
266
|
private tempId;
|
|
267
267
|
private isExtendedOpen;
|
|
268
|
+
private popupTriggeredByToolbar;
|
|
268
269
|
private clickEvent;
|
|
269
270
|
private scrollEvent;
|
|
270
271
|
private resizeContext;
|
package/src/toolbar/toolbar.js
CHANGED
|
@@ -306,6 +306,10 @@ var Toolbar = /** @class */ (function (_super) {
|
|
|
306
306
|
};
|
|
307
307
|
Toolbar.prototype.docEvent = function (e) {
|
|
308
308
|
var popEle = closest(e.target, '.e-popup');
|
|
309
|
+
if (this.popupTriggeredByToolbar) {
|
|
310
|
+
this.popupTriggeredByToolbar = false;
|
|
311
|
+
return;
|
|
312
|
+
}
|
|
309
313
|
if (this.popObj && isVisible(this.popObj.element) && !popEle && this.overflowMode === 'Popup') {
|
|
310
314
|
this.popObj.hide({ name: 'FadeOut', duration: 100 });
|
|
311
315
|
}
|
|
@@ -682,6 +686,10 @@ var Toolbar = /** @class */ (function (_super) {
|
|
|
682
686
|
var isPopupElement = !isNOU(closest(trgt, '.' + CLS_POPUPCLASS));
|
|
683
687
|
var clsList = trgt.classList;
|
|
684
688
|
var popupNav = closest(trgt, ('.' + CLS_TBARNAV));
|
|
689
|
+
var popupDownIcon = closest(trgt, ('.' + CLS_POPUPDOWN));
|
|
690
|
+
if (popupDownIcon || popupNav) {
|
|
691
|
+
this.popupTriggeredByToolbar = true;
|
|
692
|
+
}
|
|
685
693
|
if (!popupNav) {
|
|
686
694
|
popupNav = trgt;
|
|
687
695
|
}
|
|
@@ -551,6 +551,7 @@ export declare class TreeView extends Component<HTMLElement> implements INotifyP
|
|
|
551
551
|
private DDTTreeData;
|
|
552
552
|
private OldCheckedData;
|
|
553
553
|
private isHiddenItem;
|
|
554
|
+
private nodeIndex;
|
|
554
555
|
/**
|
|
555
556
|
* Indicates whether the TreeView allows drag and drop of nodes. To drag and drop a node in
|
|
556
557
|
* desktop, hold the mouse on the node, drag it to the target node and drop the node by releasing
|
|
@@ -1075,6 +1076,7 @@ export declare class TreeView extends Component<HTMLElement> implements INotifyP
|
|
|
1075
1076
|
private ensureIndeterminate;
|
|
1076
1077
|
private ensureParentCheckState;
|
|
1077
1078
|
private getSelectedChildNodeDetails;
|
|
1079
|
+
private buildNodeIndex;
|
|
1078
1080
|
private getAllChildNodes;
|
|
1079
1081
|
private ensureChildCheckState;
|
|
1080
1082
|
private doCheckBoxAction;
|
package/src/treeview/treeview.js
CHANGED
|
@@ -1081,25 +1081,23 @@ var TreeView = /** @class */ (function (_super) {
|
|
|
1081
1081
|
var childKey = typeof this.fields.child === 'string' ? this.fields.child : null;
|
|
1082
1082
|
var dataId = this.fields.id;
|
|
1083
1083
|
var parentKey = this.fields.parentID;
|
|
1084
|
+
if (!this.nodeIndex) {
|
|
1085
|
+
this.nodeIndex = new Map();
|
|
1086
|
+
this.buildNodeIndex(this.treeData);
|
|
1087
|
+
}
|
|
1084
1088
|
var matchesDataUid = function (childNode) {
|
|
1085
1089
|
if (!isNOU(childKey) && childKey in childNode && Array.isArray(childNode[childKey])) {
|
|
1086
1090
|
var matchNode = childNode[dataId];
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
}
|
|
1091
|
+
return !isNOU(matchNode) &&
|
|
1092
|
+
matchNode.toString() === dataUid;
|
|
1090
1093
|
}
|
|
1091
1094
|
else {
|
|
1092
1095
|
var childNodePid = childNode[parentKey];
|
|
1093
|
-
|
|
1094
|
-
return childNodePid.toString() === dataUid;
|
|
1095
|
-
}
|
|
1096
|
+
return !isNOU(childNodePid) && childNodePid.toString() === dataUid;
|
|
1096
1097
|
}
|
|
1097
|
-
return false;
|
|
1098
1098
|
};
|
|
1099
1099
|
return this.checkedNodes
|
|
1100
|
-
.map(function (
|
|
1101
|
-
return _this.getNodeObject(checkedNodeId);
|
|
1102
|
-
})
|
|
1100
|
+
.map(function (id) { return _this.nodeIndex.get(id); })
|
|
1103
1101
|
.filter(function (childNode) {
|
|
1104
1102
|
if (childNode && typeof childNode === 'object' && (childKey in childNode)) {
|
|
1105
1103
|
return matchesDataUid(childNode);
|
|
@@ -1110,6 +1108,25 @@ var TreeView = /** @class */ (function (_super) {
|
|
|
1110
1108
|
return false;
|
|
1111
1109
|
});
|
|
1112
1110
|
};
|
|
1111
|
+
TreeView.prototype.buildNodeIndex = function (nodes) {
|
|
1112
|
+
var _this = this;
|
|
1113
|
+
var childKey = typeof this.fields.child === 'string' ? this.fields.child : null;
|
|
1114
|
+
nodes.forEach(function (node) {
|
|
1115
|
+
var idVal = getValue(_this.fields.id, node);
|
|
1116
|
+
if (idVal != null) {
|
|
1117
|
+
if (!_this.nodeIndex) {
|
|
1118
|
+
_this.nodeIndex = new Map();
|
|
1119
|
+
}
|
|
1120
|
+
_this.nodeIndex.set(idVal.toString(), node);
|
|
1121
|
+
}
|
|
1122
|
+
if (childKey) {
|
|
1123
|
+
var children = getValue(childKey, node);
|
|
1124
|
+
if (Array.isArray(children)) {
|
|
1125
|
+
_this.buildNodeIndex(children);
|
|
1126
|
+
}
|
|
1127
|
+
}
|
|
1128
|
+
});
|
|
1129
|
+
};
|
|
1113
1130
|
TreeView.prototype.getAllChildNodes = function (data, parentId) {
|
|
1114
1131
|
if (isNOU(data) || isNOU(parentId)) {
|
|
1115
1132
|
return [];
|