@syncfusion/ej2-navigations 26.1.40 → 26.1.41
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 +105 -13
- package/dist/es6/ej2-navigations.es2015.js.map +1 -1
- package/dist/es6/ej2-navigations.es5.js +113 -17
- 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/stepper/stepper.d.ts +27 -0
- package/src/stepper/stepper.js +42 -5
- package/src/toolbar/toolbar.d.ts +2 -0
- package/src/toolbar/toolbar.js +8 -4
- package/src/treeview/treeview.d.ts +3 -0
- package/src/treeview/treeview.js +63 -8
|
@@ -3727,8 +3727,10 @@ var Toolbar = /** @__PURE__ @class */ (function (_super) {
|
|
|
3727
3727
|
this.unwireKeyboardEvent();
|
|
3728
3728
|
window.removeEventListener('resize', this.resizeContext);
|
|
3729
3729
|
window.removeEventListener('orientationchange', this.orientationChangeContext);
|
|
3730
|
-
|
|
3731
|
-
|
|
3730
|
+
document.removeEventListener('scroll', this.clickEvent);
|
|
3731
|
+
document.removeEventListener('click', this.scrollEvent);
|
|
3732
|
+
this.scrollEvent = null;
|
|
3733
|
+
this.clickEvent = null;
|
|
3732
3734
|
};
|
|
3733
3735
|
Toolbar.prototype.clearProperty = function () {
|
|
3734
3736
|
this.tbarEle = [];
|
|
@@ -4127,6 +4129,8 @@ var Toolbar = /** @__PURE__ @class */ (function (_super) {
|
|
|
4127
4129
|
this.initialize();
|
|
4128
4130
|
this.renderControl();
|
|
4129
4131
|
this.wireEvents();
|
|
4132
|
+
this.clickEvent = this.docEvent.bind(this);
|
|
4133
|
+
this.scrollEvent = this.docEvent.bind(this);
|
|
4130
4134
|
this.renderComplete();
|
|
4131
4135
|
if (this.isReact && this.portals && this.portals.length > 0) {
|
|
4132
4136
|
this.renderReactTemplates(function () {
|
|
@@ -4512,8 +4516,8 @@ var Toolbar = /** @__PURE__ @class */ (function (_super) {
|
|
|
4512
4516
|
popup.offsetX = 0;
|
|
4513
4517
|
}
|
|
4514
4518
|
popup.appendTo(ele);
|
|
4515
|
-
|
|
4516
|
-
|
|
4519
|
+
document.addEventListener('scroll', this.clickEvent);
|
|
4520
|
+
document.addEventListener('click', this.scrollEvent);
|
|
4517
4521
|
if (this.overflowMode !== 'Extended') {
|
|
4518
4522
|
popup.element.style.maxHeight = popup.element.offsetHeight + 'px';
|
|
4519
4523
|
}
|
|
@@ -10286,6 +10290,7 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
10286
10290
|
_this.isRightClick = false;
|
|
10287
10291
|
_this.mouseDownStatus = false;
|
|
10288
10292
|
_this.isDropIn = false;
|
|
10293
|
+
_this.OldCheckedData = [];
|
|
10289
10294
|
return _this;
|
|
10290
10295
|
}
|
|
10291
10296
|
TreeView_1 = TreeView;
|
|
@@ -10359,6 +10364,7 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
10359
10364
|
this.expandChildren = [];
|
|
10360
10365
|
this.index = 0;
|
|
10361
10366
|
this.setTouchClass();
|
|
10367
|
+
this.DDTTreeData = JSON.parse(JSON.stringify(this.fields.dataSource));
|
|
10362
10368
|
if (isNullOrUndefined(this.selectedNodes)) {
|
|
10363
10369
|
this.setProperties({ selectedNodes: [] }, true);
|
|
10364
10370
|
}
|
|
@@ -10737,23 +10743,38 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
10737
10743
|
TreeView.prototype.updateParentCheckState = function () {
|
|
10738
10744
|
var indeterminate = selectAll('.' + INDETERMINATE, this.element);
|
|
10739
10745
|
var childCheckedElement;
|
|
10746
|
+
var data = this.treeData;
|
|
10747
|
+
if (this.element.classList.contains('e-filtering')) {
|
|
10748
|
+
data = this.DDTTreeData;
|
|
10749
|
+
}
|
|
10740
10750
|
for (var i = 0; i < indeterminate.length; i++) {
|
|
10741
10751
|
var node = closest(indeterminate[parseInt(i.toString(), 10)], '.' + LISTITEM);
|
|
10742
10752
|
var nodeId = node.getAttribute('data-uid').toString();
|
|
10753
|
+
var OldCheckedNodes = void 0;
|
|
10754
|
+
if (this.element.classList.contains('e-filtering')) {
|
|
10755
|
+
OldCheckedNodes = new DataManager(this.OldCheckedData).executeLocal(new Query().where('parentID', 'equal', nodeId, true));
|
|
10756
|
+
}
|
|
10743
10757
|
if (this.dataType === 1) {
|
|
10744
|
-
childCheckedElement = new DataManager(
|
|
10758
|
+
childCheckedElement = new DataManager(data).
|
|
10745
10759
|
executeLocal(new Query().where(this.fields.parentID, 'equal', nodeId, true));
|
|
10746
10760
|
}
|
|
10747
10761
|
else {
|
|
10748
|
-
childCheckedElement = this.getChildNodes(
|
|
10762
|
+
childCheckedElement = this.getChildNodes(data, nodeId);
|
|
10749
10763
|
}
|
|
10750
10764
|
var count = 0;
|
|
10751
10765
|
if (childCheckedElement) {
|
|
10752
|
-
|
|
10753
|
-
var childId = childCheckedElement[parseInt(j.toString(), 10)][
|
|
10754
|
-
if (
|
|
10766
|
+
var _loop_1 = function (j) {
|
|
10767
|
+
var childId = childCheckedElement[parseInt(j.toString(), 10)][this_1.fields.id].toString();
|
|
10768
|
+
if (this_1.checkedNodes.indexOf(childId) !== -1) {
|
|
10755
10769
|
count++;
|
|
10756
10770
|
}
|
|
10771
|
+
else if (this_1.element.classList.contains('e-filtering') && OldCheckedNodes.findIndex(function (e) { return e['id'] === childId; }) !== -1) {
|
|
10772
|
+
count++;
|
|
10773
|
+
}
|
|
10774
|
+
};
|
|
10775
|
+
var this_1 = this;
|
|
10776
|
+
for (var j = 0; j < childCheckedElement.length; j++) {
|
|
10777
|
+
_loop_1(j);
|
|
10757
10778
|
}
|
|
10758
10779
|
if (count === childCheckedElement.length) {
|
|
10759
10780
|
var nodeCheck = node.getAttribute('data-uid');
|
|
@@ -11033,13 +11054,28 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
11033
11054
|
var indeterminateNodes = selectAll('.' + INDETERMINATE, ulElement);
|
|
11034
11055
|
var nodes = selectAll('.' + LISTITEM, ulElement);
|
|
11035
11056
|
var checkBoxEle = element.getElementsByClassName(CHECKBOXWRAP)[0];
|
|
11036
|
-
|
|
11057
|
+
var count = nodes.length;
|
|
11058
|
+
var checkedCount = checkedNodes.length;
|
|
11059
|
+
var dataUid = element.getAttribute('data-uid');
|
|
11060
|
+
if (this.element.classList.contains('e-filtering')) {
|
|
11061
|
+
var oldCheckedNodes = new DataManager(this.OldCheckedData).executeLocal(new Query().where('parentID', 'equal', dataUid, true));
|
|
11062
|
+
checkedCount = oldCheckedNodes.length;
|
|
11063
|
+
var childItems = [];
|
|
11064
|
+
if (this.dataType === 1) {
|
|
11065
|
+
childItems = new DataManager(this.DDTTreeData).executeLocal(new Query().where(this.fields.parentID, 'equal', dataUid, true));
|
|
11066
|
+
}
|
|
11067
|
+
else {
|
|
11068
|
+
childItems = this.getChildNodes(this.DDTTreeData, dataUid);
|
|
11069
|
+
}
|
|
11070
|
+
count = childItems.length;
|
|
11071
|
+
}
|
|
11072
|
+
if (count === checkedCount) {
|
|
11037
11073
|
this.changeState(checkBoxEle, 'check', null, true, true);
|
|
11038
11074
|
}
|
|
11039
|
-
else if (
|
|
11075
|
+
else if (checkedCount > 0 || indeterminateNodes.length > 0) {
|
|
11040
11076
|
this.changeState(checkBoxEle, 'indeterminate', null, true, true);
|
|
11041
11077
|
}
|
|
11042
|
-
else if (
|
|
11078
|
+
else if (checkedCount === 0) {
|
|
11043
11079
|
this.changeState(checkBoxEle, 'uncheck', null, true, true);
|
|
11044
11080
|
}
|
|
11045
11081
|
var parentUL = closest(element, '.' + PARENTITEM);
|
|
@@ -11675,6 +11711,25 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
11675
11711
|
eventArgs.data = eventArgs.data.splice(0, eventArgs.data.length - 1);
|
|
11676
11712
|
this.trigger('nodeChecked', eventArgs);
|
|
11677
11713
|
};
|
|
11714
|
+
TreeView.prototype.updateOldCheckedData = function (data) {
|
|
11715
|
+
var dataManager = new DataManager(data);
|
|
11716
|
+
var childItems = dataManager.executeLocal(new Query().where('isChecked', 'equal', 'true', true));
|
|
11717
|
+
var uncheckedItems = dataManager.executeLocal(new Query().where('isChecked', 'equal', 'false', true));
|
|
11718
|
+
if (uncheckedItems.length > 0) {
|
|
11719
|
+
var index = this.OldCheckedData.findIndex(function (e) { return e['id'] === uncheckedItems[0]['id']; });
|
|
11720
|
+
if (index !== -1) {
|
|
11721
|
+
this.OldCheckedData.splice(index, 1);
|
|
11722
|
+
return;
|
|
11723
|
+
}
|
|
11724
|
+
}
|
|
11725
|
+
if (childItems.length > 0) {
|
|
11726
|
+
var index = this.OldCheckedData.findIndex(function (e) { return e['id'] === childItems[0]['id']; });
|
|
11727
|
+
if (index === -1) {
|
|
11728
|
+
this.OldCheckedData.push(childItems[0]);
|
|
11729
|
+
return;
|
|
11730
|
+
}
|
|
11731
|
+
}
|
|
11732
|
+
};
|
|
11678
11733
|
TreeView.prototype.triggerClickEvent = function (e, li) {
|
|
11679
11734
|
var eventArgs = {
|
|
11680
11735
|
event: e,
|
|
@@ -12528,6 +12583,7 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
12528
12583
|
this.changeState(checkWrap, isCheck ? 'uncheck' : 'check', e, true);
|
|
12529
12584
|
if (this.autoCheck) {
|
|
12530
12585
|
this.ensureChildCheckState(li);
|
|
12586
|
+
this.updateOldCheckedData([this.getNodeData(li)]);
|
|
12531
12587
|
this.ensureParentCheckState(closest(closest(li, '.' + PARENTITEM), '.' + LISTITEM));
|
|
12532
12588
|
var doCheck = void 0;
|
|
12533
12589
|
if (eventArgs.action === 'check') {
|
|
@@ -14900,6 +14956,9 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
14900
14956
|
this.initialRender = true;
|
|
14901
14957
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
14902
14958
|
if (!this.isReact || this.isReact && !(this.fields.dataSource instanceof DataManager)) {
|
|
14959
|
+
if (!this.element.classList.contains('e-filtering')) {
|
|
14960
|
+
this.DDTTreeData = JSON.parse(JSON.stringify(this.fields.dataSource));
|
|
14961
|
+
}
|
|
14903
14962
|
this.reRenderNodes();
|
|
14904
14963
|
}
|
|
14905
14964
|
this.initialRender = false;
|
|
@@ -19102,9 +19161,19 @@ var Stepper = /** @__PURE__ @class */ (function (_super) {
|
|
|
19102
19161
|
if (_this.stepperItemList && _this.progressbar && _this.element.classList.contains(HORIZSTEP)) {
|
|
19103
19162
|
_this.setProgressPosition(_this.element, true);
|
|
19104
19163
|
}
|
|
19164
|
+
_this.navigateToStep(_this.activeStep, null, null, false);
|
|
19105
19165
|
}, this);
|
|
19106
19166
|
EventHandler.add(window, 'click', function () { _this.updateStepFocus(); }, this);
|
|
19107
19167
|
};
|
|
19168
|
+
Stepper.prototype.unWireEvents = function () {
|
|
19169
|
+
var _this = this;
|
|
19170
|
+
EventHandler.remove(window, 'resize', function () {
|
|
19171
|
+
if (_this.stepperItemList && _this.progressbar && _this.element.classList.contains(HORIZSTEP)) {
|
|
19172
|
+
_this.setProgressPosition(_this.element, true);
|
|
19173
|
+
}
|
|
19174
|
+
});
|
|
19175
|
+
EventHandler.remove(window, 'click', function () { _this.updateStepFocus(); });
|
|
19176
|
+
};
|
|
19108
19177
|
Stepper.prototype.updateStepFocus = function () {
|
|
19109
19178
|
if (this.isKeyNavFocus) {
|
|
19110
19179
|
this.isKeyNavFocus = false;
|
|
@@ -19768,16 +19837,31 @@ var Stepper = /** @__PURE__ @class */ (function (_super) {
|
|
|
19768
19837
|
}
|
|
19769
19838
|
this.stepperItemElements = [];
|
|
19770
19839
|
};
|
|
19840
|
+
/**
|
|
19841
|
+
* Move to next step from current step in Stepper.
|
|
19842
|
+
*
|
|
19843
|
+
* @returns {void}
|
|
19844
|
+
*/
|
|
19771
19845
|
Stepper.prototype.nextStep = function () {
|
|
19772
19846
|
if (this.activeStep !== this.steps.length - 1) {
|
|
19773
19847
|
this.navigateToStep(this.activeStep + 1, null, null, false);
|
|
19774
19848
|
}
|
|
19775
19849
|
};
|
|
19850
|
+
/**
|
|
19851
|
+
* Move to previous step from current step in Stepper.
|
|
19852
|
+
*
|
|
19853
|
+
* @returns {void}
|
|
19854
|
+
*/
|
|
19776
19855
|
Stepper.prototype.previousStep = function () {
|
|
19777
19856
|
if (this.activeStep > 0) {
|
|
19778
19857
|
this.navigateToStep(this.activeStep - 1, null, null, false);
|
|
19779
19858
|
}
|
|
19780
19859
|
};
|
|
19860
|
+
/**
|
|
19861
|
+
* Reset the state of the Stepper and move to the first step.
|
|
19862
|
+
*
|
|
19863
|
+
* @returns {void}
|
|
19864
|
+
*/
|
|
19781
19865
|
Stepper.prototype.reset = function () {
|
|
19782
19866
|
if (this.activeStep === 0) {
|
|
19783
19867
|
this.updateStepInteractions();
|
|
@@ -19787,18 +19871,30 @@ var Stepper = /** @__PURE__ @class */ (function (_super) {
|
|
|
19787
19871
|
this.navigateToStep(isDisabled ? -1 : 0, null, null, false);
|
|
19788
19872
|
}
|
|
19789
19873
|
};
|
|
19874
|
+
/**
|
|
19875
|
+
* Refreshes the position of the progress bar programmatically when the dimensions of the parent container are changed.
|
|
19876
|
+
*
|
|
19877
|
+
* @returns {void}
|
|
19878
|
+
*/
|
|
19879
|
+
Stepper.prototype.refreshProgressbar = function () {
|
|
19880
|
+
if (this.stepperItemList && this.progressbar) {
|
|
19881
|
+
this.setProgressPosition(this.element);
|
|
19882
|
+
}
|
|
19883
|
+
this.navigateToStep(this.activeStep, null, null, false);
|
|
19884
|
+
};
|
|
19790
19885
|
Stepper.prototype.updateElementClassArray = function () {
|
|
19791
19886
|
var classArray = [RTL$3, READONLY, 'e-steps-focus', LABELAFTER, LABELBEFORE, 'e-label-top',
|
|
19792
19887
|
'e-label-bottom', 'e-label-start', 'e-label-end', STEPINDICATOR, LABELINDICATOR, VERTICALSTEP, HORIZSTEP, LINEARSTEP];
|
|
19793
19888
|
removeClass([this.element], classArray);
|
|
19794
19889
|
};
|
|
19890
|
+
/**
|
|
19891
|
+
* Destroy the stepper control.
|
|
19892
|
+
*
|
|
19893
|
+
* @returns {void}
|
|
19894
|
+
*/
|
|
19795
19895
|
Stepper.prototype.destroy = function () {
|
|
19796
|
-
var _this = this;
|
|
19797
19896
|
_super.prototype.destroy.call(this);
|
|
19798
|
-
|
|
19799
|
-
_this.setProgressPosition(_this.element, true);
|
|
19800
|
-
} });
|
|
19801
|
-
EventHandler.remove(window, 'click', function () { _this.updateStepFocus(); });
|
|
19897
|
+
this.unWireEvents();
|
|
19802
19898
|
// unwires the events and detach the li elements
|
|
19803
19899
|
this.removeItemElements();
|
|
19804
19900
|
this.clearTemplate();
|