@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
|
@@ -3588,8 +3588,10 @@ let Toolbar = class Toolbar extends Component {
|
|
|
3588
3588
|
this.unwireKeyboardEvent();
|
|
3589
3589
|
window.removeEventListener('resize', this.resizeContext);
|
|
3590
3590
|
window.removeEventListener('orientationchange', this.orientationChangeContext);
|
|
3591
|
-
|
|
3592
|
-
|
|
3591
|
+
document.removeEventListener('scroll', this.clickEvent);
|
|
3592
|
+
document.removeEventListener('click', this.scrollEvent);
|
|
3593
|
+
this.scrollEvent = null;
|
|
3594
|
+
this.clickEvent = null;
|
|
3593
3595
|
}
|
|
3594
3596
|
clearProperty() {
|
|
3595
3597
|
this.tbarEle = [];
|
|
@@ -3986,6 +3988,8 @@ let Toolbar = class Toolbar extends Component {
|
|
|
3986
3988
|
this.initialize();
|
|
3987
3989
|
this.renderControl();
|
|
3988
3990
|
this.wireEvents();
|
|
3991
|
+
this.clickEvent = this.docEvent.bind(this);
|
|
3992
|
+
this.scrollEvent = this.docEvent.bind(this);
|
|
3989
3993
|
this.renderComplete();
|
|
3990
3994
|
if (this.isReact && this.portals && this.portals.length > 0) {
|
|
3991
3995
|
this.renderReactTemplates(() => {
|
|
@@ -4370,8 +4374,8 @@ let Toolbar = class Toolbar extends Component {
|
|
|
4370
4374
|
popup.offsetX = 0;
|
|
4371
4375
|
}
|
|
4372
4376
|
popup.appendTo(ele);
|
|
4373
|
-
|
|
4374
|
-
|
|
4377
|
+
document.addEventListener('scroll', this.clickEvent);
|
|
4378
|
+
document.addEventListener('click', this.scrollEvent);
|
|
4375
4379
|
if (this.overflowMode !== 'Extended') {
|
|
4376
4380
|
popup.element.style.maxHeight = popup.element.offsetHeight + 'px';
|
|
4377
4381
|
}
|
|
@@ -9967,6 +9971,7 @@ let TreeView = TreeView_1 = class TreeView extends Component {
|
|
|
9967
9971
|
this.isRightClick = false;
|
|
9968
9972
|
this.mouseDownStatus = false;
|
|
9969
9973
|
this.isDropIn = false;
|
|
9974
|
+
this.OldCheckedData = [];
|
|
9970
9975
|
}
|
|
9971
9976
|
/**
|
|
9972
9977
|
* Get component name.
|
|
@@ -10037,6 +10042,7 @@ let TreeView = TreeView_1 = class TreeView extends Component {
|
|
|
10037
10042
|
this.expandChildren = [];
|
|
10038
10043
|
this.index = 0;
|
|
10039
10044
|
this.setTouchClass();
|
|
10045
|
+
this.DDTTreeData = JSON.parse(JSON.stringify(this.fields.dataSource));
|
|
10040
10046
|
if (isNullOrUndefined(this.selectedNodes)) {
|
|
10041
10047
|
this.setProperties({ selectedNodes: [] }, true);
|
|
10042
10048
|
}
|
|
@@ -10412,15 +10418,23 @@ let TreeView = TreeView_1 = class TreeView extends Component {
|
|
|
10412
10418
|
updateParentCheckState() {
|
|
10413
10419
|
const indeterminate = selectAll('.' + INDETERMINATE, this.element);
|
|
10414
10420
|
let childCheckedElement;
|
|
10421
|
+
let data = this.treeData;
|
|
10422
|
+
if (this.element.classList.contains('e-filtering')) {
|
|
10423
|
+
data = this.DDTTreeData;
|
|
10424
|
+
}
|
|
10415
10425
|
for (let i = 0; i < indeterminate.length; i++) {
|
|
10416
10426
|
const node = closest(indeterminate[parseInt(i.toString(), 10)], '.' + LISTITEM);
|
|
10417
10427
|
const nodeId = node.getAttribute('data-uid').toString();
|
|
10428
|
+
let OldCheckedNodes;
|
|
10429
|
+
if (this.element.classList.contains('e-filtering')) {
|
|
10430
|
+
OldCheckedNodes = new DataManager(this.OldCheckedData).executeLocal(new Query().where('parentID', 'equal', nodeId, true));
|
|
10431
|
+
}
|
|
10418
10432
|
if (this.dataType === 1) {
|
|
10419
|
-
childCheckedElement = new DataManager(
|
|
10433
|
+
childCheckedElement = new DataManager(data).
|
|
10420
10434
|
executeLocal(new Query().where(this.fields.parentID, 'equal', nodeId, true));
|
|
10421
10435
|
}
|
|
10422
10436
|
else {
|
|
10423
|
-
childCheckedElement = this.getChildNodes(
|
|
10437
|
+
childCheckedElement = this.getChildNodes(data, nodeId);
|
|
10424
10438
|
}
|
|
10425
10439
|
let count = 0;
|
|
10426
10440
|
if (childCheckedElement) {
|
|
@@ -10429,6 +10443,9 @@ let TreeView = TreeView_1 = class TreeView extends Component {
|
|
|
10429
10443
|
if (this.checkedNodes.indexOf(childId) !== -1) {
|
|
10430
10444
|
count++;
|
|
10431
10445
|
}
|
|
10446
|
+
else if (this.element.classList.contains('e-filtering') && OldCheckedNodes.findIndex((e) => e['id'] === childId) !== -1) {
|
|
10447
|
+
count++;
|
|
10448
|
+
}
|
|
10432
10449
|
}
|
|
10433
10450
|
if (count === childCheckedElement.length) {
|
|
10434
10451
|
const nodeCheck = node.getAttribute('data-uid');
|
|
@@ -10707,13 +10724,28 @@ let TreeView = TreeView_1 = class TreeView extends Component {
|
|
|
10707
10724
|
const indeterminateNodes = selectAll('.' + INDETERMINATE, ulElement);
|
|
10708
10725
|
const nodes = selectAll('.' + LISTITEM, ulElement);
|
|
10709
10726
|
const checkBoxEle = element.getElementsByClassName(CHECKBOXWRAP)[0];
|
|
10710
|
-
|
|
10727
|
+
let count = nodes.length;
|
|
10728
|
+
let checkedCount = checkedNodes.length;
|
|
10729
|
+
const dataUid = element.getAttribute('data-uid');
|
|
10730
|
+
if (this.element.classList.contains('e-filtering')) {
|
|
10731
|
+
const oldCheckedNodes = new DataManager(this.OldCheckedData).executeLocal(new Query().where('parentID', 'equal', dataUid, true));
|
|
10732
|
+
checkedCount = oldCheckedNodes.length;
|
|
10733
|
+
let childItems = [];
|
|
10734
|
+
if (this.dataType === 1) {
|
|
10735
|
+
childItems = new DataManager(this.DDTTreeData).executeLocal(new Query().where(this.fields.parentID, 'equal', dataUid, true));
|
|
10736
|
+
}
|
|
10737
|
+
else {
|
|
10738
|
+
childItems = this.getChildNodes(this.DDTTreeData, dataUid);
|
|
10739
|
+
}
|
|
10740
|
+
count = childItems.length;
|
|
10741
|
+
}
|
|
10742
|
+
if (count === checkedCount) {
|
|
10711
10743
|
this.changeState(checkBoxEle, 'check', null, true, true);
|
|
10712
10744
|
}
|
|
10713
|
-
else if (
|
|
10745
|
+
else if (checkedCount > 0 || indeterminateNodes.length > 0) {
|
|
10714
10746
|
this.changeState(checkBoxEle, 'indeterminate', null, true, true);
|
|
10715
10747
|
}
|
|
10716
|
-
else if (
|
|
10748
|
+
else if (checkedCount === 0) {
|
|
10717
10749
|
this.changeState(checkBoxEle, 'uncheck', null, true, true);
|
|
10718
10750
|
}
|
|
10719
10751
|
const parentUL = closest(element, '.' + PARENTITEM);
|
|
@@ -11346,6 +11378,25 @@ let TreeView = TreeView_1 = class TreeView extends Component {
|
|
|
11346
11378
|
eventArgs.data = eventArgs.data.splice(0, eventArgs.data.length - 1);
|
|
11347
11379
|
this.trigger('nodeChecked', eventArgs);
|
|
11348
11380
|
}
|
|
11381
|
+
updateOldCheckedData(data) {
|
|
11382
|
+
const dataManager = new DataManager(data);
|
|
11383
|
+
const childItems = dataManager.executeLocal(new Query().where('isChecked', 'equal', 'true', true));
|
|
11384
|
+
const uncheckedItems = dataManager.executeLocal(new Query().where('isChecked', 'equal', 'false', true));
|
|
11385
|
+
if (uncheckedItems.length > 0) {
|
|
11386
|
+
const index = this.OldCheckedData.findIndex((e) => e['id'] === uncheckedItems[0]['id']);
|
|
11387
|
+
if (index !== -1) {
|
|
11388
|
+
this.OldCheckedData.splice(index, 1);
|
|
11389
|
+
return;
|
|
11390
|
+
}
|
|
11391
|
+
}
|
|
11392
|
+
if (childItems.length > 0) {
|
|
11393
|
+
const index = this.OldCheckedData.findIndex((e) => e['id'] === childItems[0]['id']);
|
|
11394
|
+
if (index === -1) {
|
|
11395
|
+
this.OldCheckedData.push(childItems[0]);
|
|
11396
|
+
return;
|
|
11397
|
+
}
|
|
11398
|
+
}
|
|
11399
|
+
}
|
|
11349
11400
|
triggerClickEvent(e, li) {
|
|
11350
11401
|
const eventArgs = {
|
|
11351
11402
|
event: e,
|
|
@@ -12179,6 +12230,7 @@ let TreeView = TreeView_1 = class TreeView extends Component {
|
|
|
12179
12230
|
this.changeState(checkWrap, isCheck ? 'uncheck' : 'check', e, true);
|
|
12180
12231
|
if (this.autoCheck) {
|
|
12181
12232
|
this.ensureChildCheckState(li);
|
|
12233
|
+
this.updateOldCheckedData([this.getNodeData(li)]);
|
|
12182
12234
|
this.ensureParentCheckState(closest(closest(li, '.' + PARENTITEM), '.' + LISTITEM));
|
|
12183
12235
|
let doCheck;
|
|
12184
12236
|
if (eventArgs.action === 'check') {
|
|
@@ -14534,6 +14586,9 @@ let TreeView = TreeView_1 = class TreeView extends Component {
|
|
|
14534
14586
|
this.initialRender = true;
|
|
14535
14587
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
14536
14588
|
if (!this.isReact || this.isReact && !(this.fields.dataSource instanceof DataManager)) {
|
|
14589
|
+
if (!this.element.classList.contains('e-filtering')) {
|
|
14590
|
+
this.DDTTreeData = JSON.parse(JSON.stringify(this.fields.dataSource));
|
|
14591
|
+
}
|
|
14537
14592
|
this.reRenderNodes();
|
|
14538
14593
|
}
|
|
14539
14594
|
this.initialRender = false;
|
|
@@ -18593,9 +18648,18 @@ let Stepper = class Stepper extends StepperBase {
|
|
|
18593
18648
|
if (this.stepperItemList && this.progressbar && this.element.classList.contains(HORIZSTEP)) {
|
|
18594
18649
|
this.setProgressPosition(this.element, true);
|
|
18595
18650
|
}
|
|
18651
|
+
this.navigateToStep(this.activeStep, null, null, false);
|
|
18596
18652
|
}, this);
|
|
18597
18653
|
EventHandler.add(window, 'click', () => { this.updateStepFocus(); }, this);
|
|
18598
18654
|
}
|
|
18655
|
+
unWireEvents() {
|
|
18656
|
+
EventHandler.remove(window, 'resize', () => {
|
|
18657
|
+
if (this.stepperItemList && this.progressbar && this.element.classList.contains(HORIZSTEP)) {
|
|
18658
|
+
this.setProgressPosition(this.element, true);
|
|
18659
|
+
}
|
|
18660
|
+
});
|
|
18661
|
+
EventHandler.remove(window, 'click', () => { this.updateStepFocus(); });
|
|
18662
|
+
}
|
|
18599
18663
|
updateStepFocus() {
|
|
18600
18664
|
if (this.isKeyNavFocus) {
|
|
18601
18665
|
this.isKeyNavFocus = false;
|
|
@@ -19255,16 +19319,31 @@ let Stepper = class Stepper extends StepperBase {
|
|
|
19255
19319
|
}
|
|
19256
19320
|
this.stepperItemElements = [];
|
|
19257
19321
|
}
|
|
19322
|
+
/**
|
|
19323
|
+
* Move to next step from current step in Stepper.
|
|
19324
|
+
*
|
|
19325
|
+
* @returns {void}
|
|
19326
|
+
*/
|
|
19258
19327
|
nextStep() {
|
|
19259
19328
|
if (this.activeStep !== this.steps.length - 1) {
|
|
19260
19329
|
this.navigateToStep(this.activeStep + 1, null, null, false);
|
|
19261
19330
|
}
|
|
19262
19331
|
}
|
|
19332
|
+
/**
|
|
19333
|
+
* Move to previous step from current step in Stepper.
|
|
19334
|
+
*
|
|
19335
|
+
* @returns {void}
|
|
19336
|
+
*/
|
|
19263
19337
|
previousStep() {
|
|
19264
19338
|
if (this.activeStep > 0) {
|
|
19265
19339
|
this.navigateToStep(this.activeStep - 1, null, null, false);
|
|
19266
19340
|
}
|
|
19267
19341
|
}
|
|
19342
|
+
/**
|
|
19343
|
+
* Reset the state of the Stepper and move to the first step.
|
|
19344
|
+
*
|
|
19345
|
+
* @returns {void}
|
|
19346
|
+
*/
|
|
19268
19347
|
reset() {
|
|
19269
19348
|
if (this.activeStep === 0) {
|
|
19270
19349
|
this.updateStepInteractions();
|
|
@@ -19274,17 +19353,30 @@ let Stepper = class Stepper extends StepperBase {
|
|
|
19274
19353
|
this.navigateToStep(isDisabled ? -1 : 0, null, null, false);
|
|
19275
19354
|
}
|
|
19276
19355
|
}
|
|
19356
|
+
/**
|
|
19357
|
+
* Refreshes the position of the progress bar programmatically when the dimensions of the parent container are changed.
|
|
19358
|
+
*
|
|
19359
|
+
* @returns {void}
|
|
19360
|
+
*/
|
|
19361
|
+
refreshProgressbar() {
|
|
19362
|
+
if (this.stepperItemList && this.progressbar) {
|
|
19363
|
+
this.setProgressPosition(this.element);
|
|
19364
|
+
}
|
|
19365
|
+
this.navigateToStep(this.activeStep, null, null, false);
|
|
19366
|
+
}
|
|
19277
19367
|
updateElementClassArray() {
|
|
19278
19368
|
const classArray = [RTL$3, READONLY, 'e-steps-focus', LABELAFTER, LABELBEFORE, 'e-label-top',
|
|
19279
19369
|
'e-label-bottom', 'e-label-start', 'e-label-end', STEPINDICATOR, LABELINDICATOR, VERTICALSTEP, HORIZSTEP, LINEARSTEP];
|
|
19280
19370
|
removeClass([this.element], classArray);
|
|
19281
19371
|
}
|
|
19372
|
+
/**
|
|
19373
|
+
* Destroy the stepper control.
|
|
19374
|
+
*
|
|
19375
|
+
* @returns {void}
|
|
19376
|
+
*/
|
|
19282
19377
|
destroy() {
|
|
19283
19378
|
super.destroy();
|
|
19284
|
-
|
|
19285
|
-
this.setProgressPosition(this.element, true);
|
|
19286
|
-
} });
|
|
19287
|
-
EventHandler.remove(window, 'click', () => { this.updateStepFocus(); });
|
|
19379
|
+
this.unWireEvents();
|
|
19288
19380
|
// unwires the events and detach the li elements
|
|
19289
19381
|
this.removeItemElements();
|
|
19290
19382
|
this.clearTemplate();
|