@syncfusion/ej2-navigations 27.1.51 → 27.1.53

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.
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * filename: index.d.ts
3
- * version : 27.1.51
3
+ * version : 27.1.53
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.50",
3
+ "_id": "@syncfusion/ej2-navigations@27.1.52",
4
4
  "_inBundle": false,
5
- "_integrity": "sha512-RU939KWXIlWV+VrU/vROorLnguKamVY3SSjBP/lOqa/oGBFhIQebcGmSo2JSkQ870R+jyK1Ec67MVaI/crYoRw==",
5
+ "_integrity": "sha512-Q/2QcUfOC2QfxaSgmXZj3sJPVR+knDWemSOtDag9Z0k6u/l54A4rLoYeq9rae3z8sHJkuG4vc2h4dzZPi3bOWw==",
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.50.tgz",
44
- "_shasum": "190f937bf1b2d76dc94cc68e77a90b124625589e",
43
+ "_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-hotfix-new/@syncfusion/ej2-navigations/-/ej2-navigations-27.1.52.tgz",
44
+ "_shasum": "d97e103b3ed19c71dc76ebf134da2a895f23b8bf",
45
45
  "_spec": "@syncfusion/ej2-navigations@*",
46
46
  "_where": "/jenkins/workspace/elease-automation_release_27.1.1/packages/included",
47
47
  "author": {
@@ -52,12 +52,12 @@
52
52
  },
53
53
  "bundleDependencies": false,
54
54
  "dependencies": {
55
- "@syncfusion/ej2-base": "~27.1.50",
56
- "@syncfusion/ej2-buttons": "~27.1.51",
57
- "@syncfusion/ej2-data": "~27.1.51",
55
+ "@syncfusion/ej2-base": "~27.1.53",
56
+ "@syncfusion/ej2-buttons": "~27.1.53",
57
+ "@syncfusion/ej2-data": "~27.1.52",
58
58
  "@syncfusion/ej2-inputs": "~27.1.50",
59
59
  "@syncfusion/ej2-lists": "~27.1.50",
60
- "@syncfusion/ej2-popups": "~27.1.50"
60
+ "@syncfusion/ej2-popups": "~27.1.53"
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.51",
165
+ "version": "27.1.53",
166
166
  "sideEffects": false
167
167
  }
@@ -2250,6 +2250,8 @@ var MenuBase = /** @class */ (function (_super) {
2250
2250
  idx = navIdx.pop();
2251
2251
  iitems = this.getItems(navIdx);
2252
2252
  menuitem = new MenuItem(iitems[0], 'items', items[i], true);
2253
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
2254
+ menuitem.parentObj = iitems[0].parentObj;
2253
2255
  iitems.splice(isAfter ? idx + 1 : idx, 0, menuitem);
2254
2256
  var uls = this.isMenu ? [this.getWrapper()].concat(this.getPopups()) : [].slice.call(this.getWrapper().children);
2255
2257
  if (!isNullOrUndefined(idx) && navIdx.length < uls.length) {
@@ -330,6 +330,8 @@ var Stepper = /** @class */ (function (_super) {
330
330
  }
331
331
  var stepSpan = this.createElement('span', { className: 'e-step' });
332
332
  var item = this.steps[parseInt(index.toString(), 10)];
333
+ var isItemLabel = item.label ? true : false;
334
+ var isItemText = item.text ? true : false;
333
335
  if (this.renderDefault(index) && (isNullOrUndefined(this.template) || this.template === '')) {
334
336
  var isIndicator = (!this.element.classList.contains('e-step-type-default') && this.stepType.toLowerCase() === 'indicator') ? true : false;
335
337
  if (isIndicator) {
@@ -343,7 +345,7 @@ var Stepper = /** @class */ (function (_super) {
343
345
  }
344
346
  else if (isNullOrUndefined(this.template) || this.template === '') {
345
347
  var isRender = true;
346
- if ((item.iconCss || (!item.iconCss && item.text && item.label)) && (((!item.text && !item.label) ||
348
+ if ((item.iconCss || (!item.iconCss && isItemText && isItemLabel)) && (((!isItemText && !isItemLabel) ||
347
349
  !this.element.classList.contains(LABELINDICATOR)))) {
348
350
  if (item.iconCss) {
349
351
  var itemIcon = item.iconCss.trim().split(' ');
@@ -353,14 +355,14 @@ var Stepper = /** @class */ (function (_super) {
353
355
  }
354
356
  this.stepperItemContainer.classList.add(STEPICON);
355
357
  }
356
- else if (!item.iconCss && item.text && item.label) {
358
+ else if (!item.iconCss && isItemText && isItemLabel) {
357
359
  stepSpan.classList.add(ICONCSS);
358
360
  stepSpan.innerHTML = item.text;
359
361
  this.stepperItemContainer.classList.add(STEPICON);
360
362
  }
361
363
  this.stepperItemContainer.appendChild(stepSpan);
362
- if ((this.element.classList.contains(HORIZSTEP) && (this.labelPosition.toLowerCase() === 'start' || this.labelPosition.toLowerCase() === 'end') && item.label) ||
363
- (this.element.classList.contains(VERTICALSTEP) && (this.labelPosition.toLowerCase() === 'top' || this.labelPosition.toLowerCase() === 'bottom') && item.label)) {
364
+ if ((this.element.classList.contains(HORIZSTEP) && (this.labelPosition.toLowerCase() === 'start' || this.labelPosition.toLowerCase() === 'end') && isItemLabel) ||
365
+ (this.element.classList.contains(VERTICALSTEP) && (this.labelPosition.toLowerCase() === 'top' || this.labelPosition.toLowerCase() === 'bottom') && isItemLabel)) {
364
366
  this.element.classList.add('e-label-' + this.labelPosition.toLowerCase());
365
367
  var textSpan = this.createElement('span', { className: TEXTCSS + ' ' + TEXT });
366
368
  textSpan.innerText = item.label;
@@ -369,49 +371,43 @@ var Stepper = /** @class */ (function (_super) {
369
371
  isRender = false;
370
372
  }
371
373
  }
372
- if (item.text && (!item.iconCss || !this.element.classList.contains(STEPINDICATOR)) && isRender &&
373
- !(item.iconCss && item.label)) {
374
+ if (isItemText && (!item.iconCss || !this.element.classList.contains(STEPINDICATOR)) && isRender &&
375
+ !(item.iconCss && isItemLabel)) {
374
376
  if ((!item.iconCss && this.element.classList.contains(STEPINDICATOR)) ||
375
- ((!item.iconCss || this.element.classList.contains(LABELINDICATOR)) && !item.label)) {
376
- if (!item.iconCss && !item.label) {
377
+ ((!item.iconCss || this.element.classList.contains(LABELINDICATOR)) && !isItemLabel)) {
378
+ if (!item.iconCss && !isItemLabel) {
377
379
  this.element.classList.add('e-step-type-indicator');
378
380
  }
379
381
  this.checkValidState(item, stepSpan);
380
- var prevOnChange = this.isProtectedOnChange;
381
- this.isProtectedOnChange = true;
382
- item.label = null;
383
- this.isProtectedOnChange = prevOnChange;
382
+ isItemLabel = null;
384
383
  }
385
384
  else {
386
385
  var textSpan = this.createElement('span', { className: TEXT });
387
- if (!item.label) {
386
+ if (!isItemLabel) {
388
387
  textSpan.innerText = item.text;
389
388
  textSpan.classList.add(TEXTCSS);
390
389
  this.stepperItemContainer.appendChild(textSpan);
391
390
  this.stepperItemContainer.classList.add(STEPTEXT);
392
391
  }
393
- if (item.label && this.element.classList.contains(LABELINDICATOR)) {
392
+ if (isItemLabel && this.element.classList.contains(LABELINDICATOR)) {
394
393
  textSpan.innerText = item.label;
395
394
  }
396
- var prevOnChange = this.isProtectedOnChange;
397
- this.isProtectedOnChange = true;
398
- item.text = item.label ? null : item.text;
399
- this.isProtectedOnChange = prevOnChange;
395
+ isItemText = item.label ? false : true;
400
396
  }
401
397
  }
402
- if (item.label && (!item.iconCss || !this.element.classList.contains(STEPINDICATOR)) && isRender) {
403
- if (!item.iconCss && !item.text && this.element.classList.contains(STEPINDICATOR)) {
398
+ if (isItemLabel && (!item.iconCss || !this.element.classList.contains(STEPINDICATOR)) && isRender) {
399
+ if (!item.iconCss && !isItemText && this.element.classList.contains(STEPINDICATOR)) {
404
400
  this.checkValidState(item, stepSpan, true);
405
401
  }
406
- else if ((!((this.element.classList.contains(LABELINDICATOR)) && item.text)) ||
407
- (this.element.classList.contains(LABELINDICATOR) && item.label)) {
402
+ else if ((!((this.element.classList.contains(LABELINDICATOR)) && isItemText)) ||
403
+ (this.element.classList.contains(LABELINDICATOR) && isItemLabel)) {
408
404
  this.labelContainer = this.createElement('span', { className: STEPLABEL });
409
405
  var labelSpan = this.createElement('span', { className: LABEL });
410
406
  labelSpan.innerText = item.label;
411
407
  this.labelContainer.appendChild(labelSpan);
412
408
  this.stepperItemContainer.classList.add(STEPSLABEL);
413
409
  this.updateLabelPosition();
414
- if ((!item.iconCss && !item.text && !this.stepperItemContainer.classList.contains(STEPICON)) ||
410
+ if ((!item.iconCss && !isItemText && !this.stepperItemContainer.classList.contains(STEPICON)) ||
415
411
  this.element.classList.contains(LABELINDICATOR)) {
416
412
  this.stepperItemContainer.classList.add('e-step-label-only');
417
413
  if (item.isValid !== null) {
@@ -427,7 +423,7 @@ var Stepper = /** @class */ (function (_super) {
427
423
  this.l10n.setLocale(this.locale);
428
424
  var optionalContent = this.l10n.getConstant('optional');
429
425
  optionalSpan.innerText = optionalContent;
430
- if (item.label && (this.labelContainer && ((this.element.classList.contains(LABELAFTER) && !this.stepperItemContainer.classList.contains('e-step-label-only'))
426
+ if (isItemLabel && (this.labelContainer && ((this.element.classList.contains(LABELAFTER) && !this.stepperItemContainer.classList.contains('e-step-label-only'))
431
427
  || (this.element.classList.contains(HORIZSTEP) && this.element.classList.contains(LABELBEFORE) && !this.stepperItemContainer.classList.contains('e-step-label-only'))))
432
428
  || (this.element.classList.contains(VERTICALSTEP) && this.element.classList.contains(LABELBEFORE))) {
433
429
  this.labelContainer.appendChild(optionalSpan);
@@ -998,20 +998,27 @@ 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 dataUid = element.getAttribute('data-uid');
1001
+ var dataUid_1 = element.getAttribute('data-uid');
1002
1002
  if (this.element.classList.contains('e-filtering')) {
1003
- var oldCheckedNodes = new DataManager(this.OldCheckedData).executeLocal(new Query().where('parentID', 'equal', dataUid, true));
1003
+ var oldCheckedNodes = new DataManager(this.OldCheckedData).executeLocal(new Query().where('parentID', 'equal', dataUid_1, true));
1004
1004
  checkedCount = oldCheckedNodes.length;
1005
+ var parentNode = new DataManager(this.OldCheckedData).executeLocal(new Query().where('hasChildren', 'equal', true, true));
1006
+ if ((parentNode.length > 0) && (this.OldCheckedData.some(function (oldNode) { return oldNode.id === dataUid_1; }))) {
1007
+ checkedCount = parentNode.length;
1008
+ }
1005
1009
  var childItems = [];
1006
1010
  if (this.dataType === 1) {
1007
- childItems = new DataManager(this.DDTTreeData).executeLocal(new Query().where(this.fields.parentID, 'equal', dataUid, true));
1011
+ childItems = new DataManager(this.DDTTreeData).executeLocal(new Query().where(this.fields.parentID, 'equal', dataUid_1, true));
1008
1012
  }
1009
1013
  else {
1010
- childItems = this.getChildNodes(this.DDTTreeData, dataUid);
1014
+ childItems = this.getChildNodes(this.DDTTreeData, dataUid_1);
1011
1015
  }
1012
1016
  count = childItems.length;
1013
1017
  }
1014
- if (count === checkedCount) {
1018
+ if (count === 0 && checkedCount === 0) {
1019
+ return;
1020
+ }
1021
+ else if (count === checkedCount) {
1015
1022
  this.changeState(checkBoxEle, 'check', null, true, true);
1016
1023
  }
1017
1024
  else if (checkedCount > 0 || indeterminateNodes.length > 0) {
@@ -2826,7 +2833,7 @@ var TreeView = /** @class */ (function (_super) {
2826
2833
  var nextNode = isTowards ? this.getNextNode(li) : this.getPrevNode(li);
2827
2834
  this.setFocus(li, nextNode);
2828
2835
  this.navigateToFocus(!isTowards);
2829
- if (nextNode.classList.contains('e-disable') || nextNode.classList.contains('e-prevent')) {
2836
+ if (nextNode.classList.contains('e-disable')) {
2830
2837
  var lastChild = nextNode.lastChild;
2831
2838
  if (nextNode.previousSibling == null && nextNode.classList.contains('e-level-1')) {
2832
2839
  this.focusNextNode(nextNode, true);
@@ -2887,7 +2894,7 @@ var TreeView = /** @class */ (function (_super) {
2887
2894
  TreeView.prototype.setFocus = function (preNode, nextNode) {
2888
2895
  removeClass([preNode], FOCUS);
2889
2896
  preNode.setAttribute('tabindex', '-1');
2890
- if (!nextNode.classList.contains('e-disable') && !nextNode.classList.contains(PREVENTSELECT)) {
2897
+ if (!nextNode.classList.contains('e-disable')) {
2891
2898
  addClass([nextNode], FOCUS);
2892
2899
  nextNode.setAttribute('tabindex', '0');
2893
2900
  nextNode.focus();
@@ -2906,7 +2913,7 @@ var TreeView = /** @class */ (function (_super) {
2906
2913
  TreeView.prototype.focusIn = function () {
2907
2914
  if (!this.mouseDownStatus) {
2908
2915
  var focusedElement = this.getFocusedNode();
2909
- if (focusedElement.classList.contains('e-disable') || focusedElement.classList.contains('e-prevent')) {
2916
+ if (focusedElement.classList.contains('e-disable')) {
2910
2917
  focusedElement.setAttribute('tabindex', '-1');
2911
2918
  this.navigateNode(true);
2912
2919
  }
@@ -3921,16 +3928,17 @@ var TreeView = /** @class */ (function (_super) {
3921
3928
  }
3922
3929
  }
3923
3930
  };
3924
- TreeView.prototype.collapseByLevel = function (element, level, excludeHiddenNodes) {
3931
+ TreeView.prototype.collapseByLevel = function (element, level, excludeHiddenNodes, currentLevel) {
3932
+ currentLevel = isNOU(currentLevel) ? 1 : currentLevel;
3925
3933
  if (level > 0 && !isNOU(element)) {
3926
3934
  var cNodes = this.getVisibleNodes(excludeHiddenNodes, element.childNodes);
3927
3935
  for (var i = 0, len = cNodes.length; i < len; i++) {
3928
3936
  var liEle = cNodes[parseInt(i.toString(), 10)];
3929
3937
  var icon = select('.' + COLLAPSIBLE, select('.' + TEXTWRAP, liEle));
3930
- if (!isNOU(icon)) {
3938
+ if (currentLevel >= level && !isNOU(icon)) {
3931
3939
  this.collapseNode(liEle, icon, null);
3932
3940
  }
3933
- this.collapseByLevel(select('.' + PARENTITEM, liEle), level - 1, excludeHiddenNodes);
3941
+ this.collapseByLevel(select('.' + PARENTITEM, liEle), level, excludeHiddenNodes, currentLevel + 1);
3934
3942
  }
3935
3943
  }
3936
3944
  };
@@ -6263,10 +6263,10 @@
6263
6263
  .e-treeview .e-list-icon,
6264
6264
  .e-treeview .e-list-img {
6265
6265
  display: inline-block;
6266
- height: 16px;
6266
+ height: 18px;
6267
6267
  margin: 0 0 0 8px;
6268
6268
  vertical-align: middle;
6269
- width: 16px;
6269
+ width: 18px;
6270
6270
  }
6271
6271
  .e-treeview .e-list-icon + .e-list-icon, .e-treeview .e-list-icon + .e-list-img,
6272
6272
  .e-treeview .e-list-img + .e-list-icon,
@@ -6275,7 +6275,7 @@
6275
6275
  }
6276
6276
  .e-treeview .e-list-icon + .e-list-text,
6277
6277
  .e-treeview .e-list-img + .e-list-text {
6278
- padding: 0 8px;
6278
+ padding: 0 12px;
6279
6279
  }
6280
6280
  .e-treeview .e-icon-collapsible,
6281
6281
  .e-treeview .e-icon-expandable {
@@ -8144,10 +8144,10 @@
8144
8144
  .e-treeview .e-list-icon,
8145
8145
  .e-treeview .e-list-img {
8146
8146
  display: inline-block;
8147
- height: 16px;
8147
+ height: 18px;
8148
8148
  margin: 0 0 0 8px;
8149
8149
  vertical-align: middle;
8150
- width: 16px;
8150
+ width: 18px;
8151
8151
  }
8152
8152
  .e-treeview .e-list-icon + .e-list-icon, .e-treeview .e-list-icon + .e-list-img,
8153
8153
  .e-treeview .e-list-img + .e-list-icon,
@@ -8156,7 +8156,7 @@
8156
8156
  }
8157
8157
  .e-treeview .e-list-icon + .e-list-text,
8158
8158
  .e-treeview .e-list-img + .e-list-text {
8159
- padding: 0 8px;
8159
+ padding: 0 12px;
8160
8160
  }
8161
8161
  .e-treeview .e-icon-collapsible,
8162
8162
  .e-treeview .e-icon-expandable {
@@ -18,7 +18,7 @@ $treeview-rtl-icon-margin: 0 -20px 0 0 !default;
18
18
  $treeview-icon-padding: 0px !default;
19
19
  $treeview-text-padding: 0 8px !default;
20
20
  $treeview-text-margin: 0 !default;
21
- $treeview-image-size: 16px !default;
21
+ $treeview-image-size: 18px !default;
22
22
  $treeview-image-margin: 0 0 0 8px !default;
23
23
  $treeview-navigable-icon-image-anchor-margin-bigger: 0 12px 0 8px !default;
24
24
  $treeview-navigable-icon-image-anchor-margin-reverse-bigger: 0 6px 0 10px !default;
@@ -26,7 +26,7 @@ $treeview-navigable-icon-image-anchor-margin: 0 8px 0 0 !default;
26
26
  $treeview-navigable-icon-image-anchor-margin-reverse: 0 0 0 8px !default;
27
27
  $treeview-navigable-rtl-margin-reverse: 0 12px 0 0 !default;
28
28
  $treeview-rtl-image-margin: 0 8px 0 0 !default;
29
- $treeview-image-text-padding: 0 8px !default;
29
+ $treeview-image-text-padding: 0 12px !default;
30
30
  $treeview-icon-image-margin: 0 0 0 8px !default;
31
31
  $treeview-rtl-icon-image-margin: 0 8px 0 0 !default;
32
32
  $treeview-check-margin: 0 0 0 8px !default;
@@ -213,10 +213,10 @@
213
213
  .e-treeview .e-list-icon,
214
214
  .e-treeview .e-list-img {
215
215
  display: inline-block;
216
- height: 16px;
216
+ height: 18px;
217
217
  margin: 0 0 0 8px;
218
218
  vertical-align: middle;
219
- width: 16px;
219
+ width: 18px;
220
220
  }
221
221
  .e-treeview .e-list-icon + .e-list-icon, .e-treeview .e-list-icon + .e-list-img,
222
222
  .e-treeview .e-list-img + .e-list-icon,
@@ -225,7 +225,7 @@
225
225
  }
226
226
  .e-treeview .e-list-icon + .e-list-text,
227
227
  .e-treeview .e-list-img + .e-list-text {
228
- padding: 0 8px;
228
+ padding: 0 12px;
229
229
  }
230
230
  .e-treeview .e-icon-collapsible,
231
231
  .e-treeview .e-icon-expandable {