@syncfusion/ej2-navigations 19.3.45 → 19.3.56

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.
Files changed (44) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/README.md +1 -1
  3. package/dist/ej2-navigations.umd.min.js +2 -2
  4. package/dist/ej2-navigations.umd.min.js.map +1 -1
  5. package/dist/es6/ej2-navigations.es2015.js +100 -75
  6. package/dist/es6/ej2-navigations.es2015.js.map +1 -1
  7. package/dist/es6/ej2-navigations.es5.js +100 -75
  8. package/dist/es6/ej2-navigations.es5.js.map +1 -1
  9. package/dist/global/ej2-navigations.min.js +2 -2
  10. package/dist/global/ej2-navigations.min.js.map +1 -1
  11. package/dist/global/index.d.ts +1 -1
  12. package/package.json +11 -11
  13. package/src/breadcrumb/breadcrumb.js +10 -2
  14. package/src/common/menu-base.js +2 -2
  15. package/src/tab/tab.js +68 -66
  16. package/src/treeview/treeview.js +20 -5
  17. package/styles/bootstrap-dark.css +12 -0
  18. package/styles/bootstrap.css +12 -0
  19. package/styles/bootstrap4.css +12 -0
  20. package/styles/bootstrap5-dark.css +12 -0
  21. package/styles/bootstrap5.css +12 -0
  22. package/styles/breadcrumb/_layout.scss +11 -0
  23. package/styles/breadcrumb/_theme.scss +1 -1
  24. package/styles/breadcrumb/bootstrap-dark.css +12 -0
  25. package/styles/breadcrumb/bootstrap.css +12 -0
  26. package/styles/breadcrumb/bootstrap4.css +12 -0
  27. package/styles/breadcrumb/bootstrap5-dark.css +12 -0
  28. package/styles/breadcrumb/bootstrap5.css +12 -0
  29. package/styles/breadcrumb/fabric-dark.css +12 -0
  30. package/styles/breadcrumb/fabric.css +12 -0
  31. package/styles/breadcrumb/highcontrast-light.css +13 -1
  32. package/styles/breadcrumb/highcontrast.css +13 -1
  33. package/styles/breadcrumb/material-dark.css +12 -0
  34. package/styles/breadcrumb/material.css +12 -0
  35. package/styles/breadcrumb/tailwind-dark.css +12 -0
  36. package/styles/breadcrumb/tailwind.css +12 -0
  37. package/styles/fabric-dark.css +12 -0
  38. package/styles/fabric.css +12 -0
  39. package/styles/highcontrast-light.css +13 -1
  40. package/styles/highcontrast.css +13 -1
  41. package/styles/material-dark.css +12 -0
  42. package/styles/material.css +12 -0
  43. package/styles/tailwind-dark.css +12 -0
  44. package/styles/tailwind.css +12 -0
@@ -2015,8 +2015,8 @@ var MenuBase = /** @__PURE__ @class */ (function (_super) {
2015
2015
  _this.setBlankIconStyle(_this.popupWrapper);
2016
2016
  _this.wireKeyboardEvent(_this.popupWrapper);
2017
2017
  rippleEffect(_this.popupWrapper, { selector: '.' + ITEM });
2018
- _this.popupWrapper.style.left = _this.left + pageXOffset + 'px';
2019
- _this.popupWrapper.style.top = _this.top + pageYOffset + 'px';
2018
+ _this.popupWrapper.style.left = _this.left + 'px';
2019
+ _this.popupWrapper.style.top = _this.top + 'px';
2020
2020
  var animationOptions = _this.animationSettings.effect !== 'None' ? {
2021
2021
  name: _this.animationSettings.effect, duration: _this.animationSettings.duration,
2022
2022
  timingFunction: _this.animationSettings.easing
@@ -7723,7 +7723,7 @@ var Tab = /** @__PURE__ @class */ (function (_super) {
7723
7723
  };
7724
7724
  Tab.prototype.parseObject = function (items, index) {
7725
7725
  var _this = this;
7726
- var tbCount = selectAll('.' + CLS_TB_ITEM, this.element).length;
7726
+ var tbCount = selectAll('.e-tab-header .' + CLS_TB_ITEM, this.element).length;
7727
7727
  var tItems = [];
7728
7728
  var txtWrapEle;
7729
7729
  var spliceArray = [];
@@ -8624,79 +8624,81 @@ var Tab = /** @__PURE__ @class */ (function (_super) {
8624
8624
  var changedProp = Object.keys(newProp.items);
8625
8625
  for (var i = 0; i < changedProp.length; i++) {
8626
8626
  var index = parseInt(Object.keys(newProp.items)[i], 10);
8627
- var property = Object.keys(newProp.items[index])[0];
8628
- var oldVal = Object(oldProp.items[index])[property];
8629
- var newVal = Object(newProp.items[index])[property];
8630
- var hdr = this.element.querySelectorAll('.' + CLS_TB_ITEM)[index];
8631
- var itemIndex = void 0;
8632
- if (hdr && !isNullOrUndefined(hdr.id) && hdr.id !== '') {
8633
- var num = (hdr.id.indexOf('_'));
8634
- itemIndex = parseInt(hdr.id.substring(num + 1), 10);
8635
- }
8636
- else {
8637
- itemIndex = index;
8638
- }
8639
- var hdrItem = select('.' + CLS_TB_ITEMS + ' #' + CLS_ITEM$2 + this.tabId + '_' + itemIndex, this.element);
8640
- var cntItem = select('.' + CLS_CONTENT$1 + ' #' + CLS_CONTENT$1 + this.tabId + '_' + itemIndex, this.element);
8641
- if (property === 'header' || property === 'headerTemplate') {
8642
- var icon = (isNullOrUndefined(this.items[index].header) ||
8643
- isNullOrUndefined(this.items[index].header.iconCss)) ? '' : this.items[index].header.iconCss;
8644
- var textVal = this.items[index].headerTemplate || this.items[index].header.text;
8645
- if ((textVal === '') && (icon === '')) {
8646
- this.removeTab(index);
8627
+ var properties = Object.keys(newProp.items[index]);
8628
+ for (var j = 0; j < properties.length; j++) {
8629
+ var oldVal = Object(oldProp.items[index])[properties[j]];
8630
+ var newVal = Object(newProp.items[index])[properties[j]];
8631
+ var hdr = this.element.querySelectorAll('.' + CLS_TB_ITEM)[index];
8632
+ var itemIndex = void 0;
8633
+ if (hdr && !isNullOrUndefined(hdr.id) && hdr.id !== '') {
8634
+ var num = (hdr.id.lastIndexOf('_'));
8635
+ itemIndex = parseInt(hdr.id.substring(num + 1), 10);
8647
8636
  }
8648
8637
  else {
8649
- this.tbId = hdr.id;
8650
- var arr = [];
8651
- arr.push(this.items[index]);
8652
- this.items.splice(index, 1);
8653
- this.itemIndexArray.splice(index, 1);
8654
- this.tbObj.items.splice(index, 1);
8655
- var isHiddenEle = hdrItem.classList.contains(CLS_HIDDEN$1);
8656
- detach(hdrItem);
8657
- this.isReplace = true;
8658
- this.addTab(arr, index);
8659
- if (isHiddenEle) {
8660
- this.hideTab(index);
8638
+ itemIndex = index;
8639
+ }
8640
+ var hdrItem = select('.' + CLS_TB_ITEMS + ' #' + CLS_ITEM$2 + this.tabId + '_' + itemIndex, this.element);
8641
+ var cntItem = select('.' + CLS_CONTENT$1 + ' #' + CLS_CONTENT$1 + this.tabId + '_' + itemIndex, this.element);
8642
+ if (properties[j] === 'header' || properties[j] === 'headerTemplate') {
8643
+ var icon = (isNullOrUndefined(this.items[index].header) ||
8644
+ isNullOrUndefined(this.items[index].header.iconCss)) ? '' : this.items[index].header.iconCss;
8645
+ var textVal = this.items[index].headerTemplate || this.items[index].header.text;
8646
+ if ((textVal === '') && (icon === '')) {
8647
+ this.removeTab(index);
8648
+ }
8649
+ else {
8650
+ this.tbId = hdr.id;
8651
+ var arr = [];
8652
+ arr.push(this.items[index]);
8653
+ this.items.splice(index, 1);
8654
+ this.itemIndexArray.splice(index, 1);
8655
+ this.tbObj.items.splice(index, 1);
8656
+ var isHiddenEle = hdrItem.classList.contains(CLS_HIDDEN$1);
8657
+ detach(hdrItem);
8658
+ this.isReplace = true;
8659
+ this.addTab(arr, index);
8660
+ if (isHiddenEle) {
8661
+ this.hideTab(index);
8662
+ }
8663
+ this.isReplace = false;
8661
8664
  }
8662
- this.isReplace = false;
8663
- }
8664
- }
8665
- if (property === 'content' && !isNullOrUndefined(cntItem)) {
8666
- var strVal = typeof newVal === 'string' || isNullOrUndefined(newVal.innerHTML);
8667
- if (strVal && (newVal[0] === '.' || newVal[0] === '#') && newVal.length) {
8668
- var eleVal = document.querySelector(newVal);
8669
- cntItem.appendChild(eleVal);
8670
- eleVal.style.display = '';
8671
- }
8672
- else if (newVal === '' && oldVal[0] === '#') {
8673
- document.body.appendChild(this.element.querySelector(oldVal)).style.display = 'none';
8674
- cntItem.innerHTML = newVal;
8675
8665
  }
8676
- else if (this.isReact && typeof newVal === 'object') {
8677
- cntItem.innerHTML = '';
8678
- this.templateCompile(cntItem, newVal, index);
8666
+ if (properties[j] === 'content' && !isNullOrUndefined(cntItem)) {
8667
+ var strVal = typeof newVal === 'string' || isNullOrUndefined(newVal.innerHTML);
8668
+ if (strVal && (newVal[0] === '.' || newVal[0] === '#') && newVal.length) {
8669
+ var eleVal = document.querySelector(newVal);
8670
+ cntItem.appendChild(eleVal);
8671
+ eleVal.style.display = '';
8672
+ }
8673
+ else if (newVal === '' && oldVal[0] === '#') {
8674
+ document.body.appendChild(this.element.querySelector(oldVal)).style.display = 'none';
8675
+ cntItem.innerHTML = newVal;
8676
+ }
8677
+ else if (this.isReact) {
8678
+ cntItem.innerHTML = '';
8679
+ this.templateCompile(cntItem, newVal, index);
8680
+ }
8681
+ else if (typeof newVal !== 'function') {
8682
+ cntItem.innerHTML = newVal;
8683
+ }
8679
8684
  }
8680
- else if (typeof newVal !== 'function') {
8681
- cntItem.innerHTML = newVal;
8685
+ if (properties[j] === 'cssClass') {
8686
+ if (!isNullOrUndefined(hdrItem)) {
8687
+ hdrItem.classList.remove(oldVal);
8688
+ hdrItem.classList.add(newVal);
8689
+ }
8690
+ if (!isNullOrUndefined(cntItem)) {
8691
+ cntItem.classList.remove(oldVal);
8692
+ cntItem.classList.add(newVal);
8693
+ }
8682
8694
  }
8683
- }
8684
- if (property === 'cssClass') {
8685
- if (!isNullOrUndefined(hdrItem)) {
8686
- hdrItem.classList.remove(oldVal);
8687
- hdrItem.classList.add(newVal);
8695
+ if (properties[j] === 'disabled') {
8696
+ this.enableTab(index, ((newVal === true) ? false : true));
8688
8697
  }
8689
- if (!isNullOrUndefined(cntItem)) {
8690
- cntItem.classList.remove(oldVal);
8691
- cntItem.classList.add(newVal);
8698
+ if (properties[j] === 'visible') {
8699
+ this.hideTab(index, ((newVal === true) ? false : true));
8692
8700
  }
8693
8701
  }
8694
- if (property === 'disabled') {
8695
- this.enableTab(index, ((newVal === true) ? false : true));
8696
- }
8697
- if (property === 'visible') {
8698
- this.hideTab(index, ((newVal === true) ? false : true));
8699
- }
8700
8702
  }
8701
8703
  }
8702
8704
  else {
@@ -8993,7 +8995,7 @@ var Tab = /** @__PURE__ @class */ (function (_super) {
8993
8995
  this.reRenderItems();
8994
8996
  }
8995
8997
  else {
8996
- var itemsCount = selectAll('.' + CLS_TB_ITEM, this.element).length;
8998
+ var itemsCount = selectAll('.e-tab-header .' + CLS_TB_ITEM, this.element).length;
8997
8999
  if (itemsCount !== 0) {
8998
9000
  lastEleIndex = this.lastIndex + 1;
8999
9001
  }
@@ -10555,6 +10557,10 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
10555
10557
  var id = childItems[i][this.fields.id] ? childItems[i][this.fields.id].toString() : null;
10556
10558
  if (this.checkedNodes.indexOf(id) !== -1) {
10557
10559
  this.checkedNodes.splice(this.checkedNodes.indexOf(id), 1);
10560
+ var ele = this.element.querySelector('[data-uid="' + id + '"]');
10561
+ if (ele) {
10562
+ this.changeState(ele, 'uncheck', null);
10563
+ }
10558
10564
  }
10559
10565
  }
10560
10566
  if (this.parentNodeCheck.indexOf(node) !== -1) {
@@ -10786,6 +10792,9 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
10786
10792
  var _this = this;
10787
10793
  var eventArgs;
10788
10794
  var currLi = closest(wrapper, '.' + LISTITEM);
10795
+ if (wrapper === currLi) {
10796
+ wrapper = select('.' + CHECKBOXWRAP, currLi);
10797
+ }
10789
10798
  if (!isPrevent) {
10790
10799
  this.checkActionNodes = [];
10791
10800
  eventArgs = this.getCheckEvent(currLi, state, e);
@@ -11790,8 +11799,10 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
11790
11799
  TreeView.prototype.nodeCheckingAction = function (checkWrap, isCheck, li, eventArgs, e) {
11791
11800
  if (this.checkedElement.indexOf(li.getAttribute('data-uid')) === -1) {
11792
11801
  this.checkedElement.push(li.getAttribute('data-uid'));
11793
- var child = this.getChildNodes(this.treeData, li.getAttribute('data-uid'));
11794
- (child !== null) ? this.allCheckNode(child, this.checkedElement, null, null, false) : child = null;
11802
+ if (this.autoCheck) {
11803
+ var child = this.getChildNodes(this.treeData, li.getAttribute('data-uid'));
11804
+ (child !== null) ? this.allCheckNode(child, this.checkedElement, null, null, false) : child = null;
11805
+ }
11795
11806
  }
11796
11807
  this.changeState(checkWrap, isCheck ? 'uncheck' : 'check', e, true);
11797
11808
  if (this.autoCheck) {
@@ -11957,11 +11968,17 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
11957
11968
  if (newCheck.indexOf(childId.toString()) === -1 && isNullOrUndefined(checked)) {
11958
11969
  newCheck.push(childId.toString());
11959
11970
  }
11971
+ var hierChildId = getValue(this.fields.child.toString(), child[length_1]);
11960
11972
  //Gets if any next level children are available for child nodes
11961
- if (getValue(this.fields.hasChildren, child[length_1]) === true ||
11962
- getValue(this.fields.child.toString(), child[length_1])) {
11973
+ if (getValue(this.fields.hasChildren, child[length_1]) === true || hierChildId) {
11963
11974
  var id = getValue(this.fields.id, child[length_1]);
11964
- var childId_1 = this.getChildNodes(this.treeData, id.toString());
11975
+ var childId_1 = void 0;
11976
+ if (this.dataType === 1) {
11977
+ childId_1 = this.getChildNodes(this.treeData, id.toString());
11978
+ }
11979
+ else {
11980
+ childId_1 = hierChildId;
11981
+ }
11965
11982
  if (childId_1) {
11966
11983
  (isNullOrUndefined(validateCheck)) ? this.allCheckNode(childId_1, newCheck, checked, childCheck) :
11967
11984
  this.allCheckNode(childId_1, newCheck, checked, childCheck, validateCheck);
@@ -15327,6 +15344,9 @@ var Breadcrumb = /** @__PURE__ @class */ (function (_super) {
15327
15344
  if (this.cssClass) {
15328
15345
  addClass([this.element], this.cssClass.split(' '));
15329
15346
  }
15347
+ if (this.enableRtl) {
15348
+ this.element.classList.add('e-rtl');
15349
+ }
15330
15350
  this.setWidth();
15331
15351
  this.initItems();
15332
15352
  this.initPvtProps();
@@ -15358,8 +15378,10 @@ var Breadcrumb = /** @__PURE__ @class */ (function (_super) {
15358
15378
  }
15359
15379
  items.push({ iconCss: 'e-icons e-home', url: baseUri });
15360
15380
  for (var i = 0; i < uri.length; i++) {
15361
- items.push({ text: uri[i], url: baseUri + uri[i] });
15362
- baseUri += uri[i] + '/';
15381
+ if (uri[i]) {
15382
+ items.push({ text: uri[i], url: baseUri + uri[i] });
15383
+ baseUri += uri[i] + '/';
15384
+ }
15363
15385
  }
15364
15386
  this.setProperties({ items: items }, true);
15365
15387
  }
@@ -15644,6 +15666,9 @@ var Breadcrumb = /** @__PURE__ @class */ (function (_super) {
15644
15666
  this.reRenderItems();
15645
15667
  }
15646
15668
  break;
15669
+ case 'enableRtl':
15670
+ this.element.classList.toggle('e-rtl');
15671
+ break;
15647
15672
  }
15648
15673
  }
15649
15674
  };