@syncfusion/ej2-navigations 19.3.44 → 19.3.54

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 (49) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/README.md +7 -7
  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 +89 -78
  6. package/dist/es6/ej2-navigations.es2015.js.map +1 -1
  7. package/dist/es6/ej2-navigations.es5.js +89 -78
  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 +23 -12
  13. package/src/breadcrumb/breadcrumb.js +19 -10
  14. package/src/common/menu-base.js +2 -2
  15. package/src/tab/tab.js +68 -66
  16. package/styles/bootstrap-dark.css +15 -2
  17. package/styles/bootstrap.css +15 -2
  18. package/styles/bootstrap4.css +15 -2
  19. package/styles/bootstrap5-dark.css +18 -2
  20. package/styles/bootstrap5.css +18 -2
  21. package/styles/breadcrumb/_layout.scss +13 -0
  22. package/styles/breadcrumb/_theme.scss +1 -1
  23. package/styles/breadcrumb/bootstrap-dark.css +13 -0
  24. package/styles/breadcrumb/bootstrap.css +13 -0
  25. package/styles/breadcrumb/bootstrap4.css +13 -0
  26. package/styles/breadcrumb/bootstrap5-dark.css +16 -0
  27. package/styles/breadcrumb/bootstrap5.css +16 -0
  28. package/styles/breadcrumb/fabric-dark.css +16 -0
  29. package/styles/breadcrumb/fabric.css +16 -0
  30. package/styles/breadcrumb/highcontrast-light.css +17 -1
  31. package/styles/breadcrumb/highcontrast.css +17 -1
  32. package/styles/breadcrumb/material-dark.css +16 -0
  33. package/styles/breadcrumb/material.css +16 -0
  34. package/styles/breadcrumb/tailwind-dark.css +16 -0
  35. package/styles/breadcrumb/tailwind.css +16 -0
  36. package/styles/fabric-dark.css +16 -0
  37. package/styles/fabric.css +16 -0
  38. package/styles/highcontrast-light.css +17 -1
  39. package/styles/highcontrast.css +17 -1
  40. package/styles/material-dark.css +16 -0
  41. package/styles/material.css +16 -0
  42. package/styles/tab/_layout.scss +1 -1
  43. package/styles/tab/bootstrap-dark.css +2 -2
  44. package/styles/tab/bootstrap.css +2 -2
  45. package/styles/tab/bootstrap4.css +2 -2
  46. package/styles/tab/bootstrap5-dark.css +2 -2
  47. package/styles/tab/bootstrap5.css +2 -2
  48. package/styles/tailwind-dark.css +16 -0
  49. package/styles/tailwind.css +16 -0
@@ -1926,8 +1926,8 @@ let MenuBase = class MenuBase extends Component {
1926
1926
  this.setBlankIconStyle(this.popupWrapper);
1927
1927
  this.wireKeyboardEvent(this.popupWrapper);
1928
1928
  rippleEffect(this.popupWrapper, { selector: '.' + ITEM });
1929
- this.popupWrapper.style.left = this.left + 'px';
1930
- this.popupWrapper.style.top = this.top + 'px';
1929
+ this.popupWrapper.style.left = this.left + pageXOffset + 'px';
1930
+ this.popupWrapper.style.top = this.top + pageYOffset + 'px';
1931
1931
  const animationOptions = this.animationSettings.effect !== 'None' ? {
1932
1932
  name: this.animationSettings.effect, duration: this.animationSettings.duration,
1933
1933
  timingFunction: this.animationSettings.easing
@@ -7453,7 +7453,7 @@ let Tab = class Tab extends Component {
7453
7453
  }
7454
7454
  }
7455
7455
  parseObject(items, index) {
7456
- const tbCount = selectAll('.' + CLS_TB_ITEM, this.element).length;
7456
+ const tbCount = selectAll('.e-tab-header .' + CLS_TB_ITEM, this.element).length;
7457
7457
  const tItems = [];
7458
7458
  let txtWrapEle;
7459
7459
  const spliceArray = [];
@@ -8349,79 +8349,81 @@ let Tab = class Tab extends Component {
8349
8349
  const changedProp = Object.keys(newProp.items);
8350
8350
  for (let i = 0; i < changedProp.length; i++) {
8351
8351
  const index = parseInt(Object.keys(newProp.items)[i], 10);
8352
- const property = Object.keys(newProp.items[index])[0];
8353
- const oldVal = Object(oldProp.items[index])[property];
8354
- const newVal = Object(newProp.items[index])[property];
8355
- const hdr = this.element.querySelectorAll('.' + CLS_TB_ITEM)[index];
8356
- let itemIndex;
8357
- if (hdr && !isNullOrUndefined(hdr.id) && hdr.id !== '') {
8358
- const num = (hdr.id.indexOf('_'));
8359
- itemIndex = parseInt(hdr.id.substring(num + 1), 10);
8360
- }
8361
- else {
8362
- itemIndex = index;
8363
- }
8364
- const hdrItem = select('.' + CLS_TB_ITEMS + ' #' + CLS_ITEM$2 + this.tabId + '_' + itemIndex, this.element);
8365
- const cntItem = select('.' + CLS_CONTENT$1 + ' #' + CLS_CONTENT$1 + this.tabId + '_' + itemIndex, this.element);
8366
- if (property === 'header' || property === 'headerTemplate') {
8367
- const icon = (isNullOrUndefined(this.items[index].header) ||
8368
- isNullOrUndefined(this.items[index].header.iconCss)) ? '' : this.items[index].header.iconCss;
8369
- const textVal = this.items[index].headerTemplate || this.items[index].header.text;
8370
- if ((textVal === '') && (icon === '')) {
8371
- this.removeTab(index);
8352
+ const properties = Object.keys(newProp.items[index]);
8353
+ for (let j = 0; j < properties.length; j++) {
8354
+ const oldVal = Object(oldProp.items[index])[properties[j]];
8355
+ const newVal = Object(newProp.items[index])[properties[j]];
8356
+ const hdr = this.element.querySelectorAll('.' + CLS_TB_ITEM)[index];
8357
+ let itemIndex;
8358
+ if (hdr && !isNullOrUndefined(hdr.id) && hdr.id !== '') {
8359
+ const num = (hdr.id.lastIndexOf('_'));
8360
+ itemIndex = parseInt(hdr.id.substring(num + 1), 10);
8372
8361
  }
8373
8362
  else {
8374
- this.tbId = hdr.id;
8375
- const arr = [];
8376
- arr.push(this.items[index]);
8377
- this.items.splice(index, 1);
8378
- this.itemIndexArray.splice(index, 1);
8379
- this.tbObj.items.splice(index, 1);
8380
- const isHiddenEle = hdrItem.classList.contains(CLS_HIDDEN$1);
8381
- detach(hdrItem);
8382
- this.isReplace = true;
8383
- this.addTab(arr, index);
8384
- if (isHiddenEle) {
8385
- this.hideTab(index);
8363
+ itemIndex = index;
8364
+ }
8365
+ const hdrItem = select('.' + CLS_TB_ITEMS + ' #' + CLS_ITEM$2 + this.tabId + '_' + itemIndex, this.element);
8366
+ const cntItem = select('.' + CLS_CONTENT$1 + ' #' + CLS_CONTENT$1 + this.tabId + '_' + itemIndex, this.element);
8367
+ if (properties[j] === 'header' || properties[j] === 'headerTemplate') {
8368
+ const icon = (isNullOrUndefined(this.items[index].header) ||
8369
+ isNullOrUndefined(this.items[index].header.iconCss)) ? '' : this.items[index].header.iconCss;
8370
+ const textVal = this.items[index].headerTemplate || this.items[index].header.text;
8371
+ if ((textVal === '') && (icon === '')) {
8372
+ this.removeTab(index);
8373
+ }
8374
+ else {
8375
+ this.tbId = hdr.id;
8376
+ const arr = [];
8377
+ arr.push(this.items[index]);
8378
+ this.items.splice(index, 1);
8379
+ this.itemIndexArray.splice(index, 1);
8380
+ this.tbObj.items.splice(index, 1);
8381
+ const isHiddenEle = hdrItem.classList.contains(CLS_HIDDEN$1);
8382
+ detach(hdrItem);
8383
+ this.isReplace = true;
8384
+ this.addTab(arr, index);
8385
+ if (isHiddenEle) {
8386
+ this.hideTab(index);
8387
+ }
8388
+ this.isReplace = false;
8386
8389
  }
8387
- this.isReplace = false;
8388
- }
8389
- }
8390
- if (property === 'content' && !isNullOrUndefined(cntItem)) {
8391
- const strVal = typeof newVal === 'string' || isNullOrUndefined(newVal.innerHTML);
8392
- if (strVal && (newVal[0] === '.' || newVal[0] === '#') && newVal.length) {
8393
- const eleVal = document.querySelector(newVal);
8394
- cntItem.appendChild(eleVal);
8395
- eleVal.style.display = '';
8396
- }
8397
- else if (newVal === '' && oldVal[0] === '#') {
8398
- document.body.appendChild(this.element.querySelector(oldVal)).style.display = 'none';
8399
- cntItem.innerHTML = newVal;
8400
8390
  }
8401
- else if (this.isReact && typeof newVal === 'object') {
8402
- cntItem.innerHTML = '';
8403
- this.templateCompile(cntItem, newVal, index);
8391
+ if (properties[j] === 'content' && !isNullOrUndefined(cntItem)) {
8392
+ const strVal = typeof newVal === 'string' || isNullOrUndefined(newVal.innerHTML);
8393
+ if (strVal && (newVal[0] === '.' || newVal[0] === '#') && newVal.length) {
8394
+ const eleVal = document.querySelector(newVal);
8395
+ cntItem.appendChild(eleVal);
8396
+ eleVal.style.display = '';
8397
+ }
8398
+ else if (newVal === '' && oldVal[0] === '#') {
8399
+ document.body.appendChild(this.element.querySelector(oldVal)).style.display = 'none';
8400
+ cntItem.innerHTML = newVal;
8401
+ }
8402
+ else if (this.isReact) {
8403
+ cntItem.innerHTML = '';
8404
+ this.templateCompile(cntItem, newVal, index);
8405
+ }
8406
+ else if (typeof newVal !== 'function') {
8407
+ cntItem.innerHTML = newVal;
8408
+ }
8404
8409
  }
8405
- else if (typeof newVal !== 'function') {
8406
- cntItem.innerHTML = newVal;
8410
+ if (properties[j] === 'cssClass') {
8411
+ if (!isNullOrUndefined(hdrItem)) {
8412
+ hdrItem.classList.remove(oldVal);
8413
+ hdrItem.classList.add(newVal);
8414
+ }
8415
+ if (!isNullOrUndefined(cntItem)) {
8416
+ cntItem.classList.remove(oldVal);
8417
+ cntItem.classList.add(newVal);
8418
+ }
8407
8419
  }
8408
- }
8409
- if (property === 'cssClass') {
8410
- if (!isNullOrUndefined(hdrItem)) {
8411
- hdrItem.classList.remove(oldVal);
8412
- hdrItem.classList.add(newVal);
8420
+ if (properties[j] === 'disabled') {
8421
+ this.enableTab(index, ((newVal === true) ? false : true));
8413
8422
  }
8414
- if (!isNullOrUndefined(cntItem)) {
8415
- cntItem.classList.remove(oldVal);
8416
- cntItem.classList.add(newVal);
8423
+ if (properties[j] === 'visible') {
8424
+ this.hideTab(index, ((newVal === true) ? false : true));
8417
8425
  }
8418
8426
  }
8419
- if (property === 'disabled') {
8420
- this.enableTab(index, ((newVal === true) ? false : true));
8421
- }
8422
- if (property === 'visible') {
8423
- this.hideTab(index, ((newVal === true) ? false : true));
8424
- }
8425
8427
  }
8426
8428
  }
8427
8429
  else {
@@ -8713,7 +8715,7 @@ let Tab = class Tab extends Component {
8713
8715
  this.reRenderItems();
8714
8716
  }
8715
8717
  else {
8716
- const itemsCount = selectAll('.' + CLS_TB_ITEM, this.element).length;
8718
+ const itemsCount = selectAll('.e-tab-header .' + CLS_TB_ITEM, this.element).length;
8717
8719
  if (itemsCount !== 0) {
8718
8720
  lastEleIndex = this.lastIndex + 1;
8719
8721
  }
@@ -14946,6 +14948,9 @@ let Breadcrumb = class Breadcrumb extends Component {
14946
14948
  if (this.cssClass) {
14947
14949
  addClass([this.element], this.cssClass.split(' '));
14948
14950
  }
14951
+ if (this.enableRtl) {
14952
+ this.element.classList.add('e-rtl');
14953
+ }
14949
14954
  this.setWidth();
14950
14955
  this.initItems();
14951
14956
  this.initPvtProps();
@@ -14977,8 +14982,10 @@ let Breadcrumb = class Breadcrumb extends Component {
14977
14982
  }
14978
14983
  items.push({ iconCss: 'e-icons e-home', url: baseUri });
14979
14984
  for (let i = 0; i < uri.length; i++) {
14980
- items.push({ text: uri[i], url: baseUri + uri[i] });
14981
- baseUri += uri[i] + '/';
14985
+ if (uri[i]) {
14986
+ items.push({ text: uri[i], url: baseUri + uri[i] });
14987
+ baseUri += uri[i] + '/';
14988
+ }
14982
14989
  }
14983
14990
  this.setProperties({ items: items }, true);
14984
14991
  }
@@ -15004,13 +15011,6 @@ let Breadcrumb = class Breadcrumb extends Component {
15004
15011
  itemNavigable: true,
15005
15012
  itemCreated: (args) => {
15006
15013
  const isLastItem = args.curData.isLastItem;
15007
- if (args.curData.isEmptyUrl) {
15008
- args.item.children[0].removeAttribute('href');
15009
- if (!isLastItem || (isLastItem && this.enableActiveItemNavigation)) {
15010
- args.item.children[0].setAttribute('tabindex', '0');
15011
- EventHandler.add(args.item.children[0], 'keydown', this.keyDownHandler, this);
15012
- }
15013
- }
15014
15014
  if (isLastItem && args.item.children.length && !this.itemTemplate) {
15015
15015
  delete args.curData.isLastItem;
15016
15016
  args.item.innerHTML = this.createElement('span', { className: ITEMTEXTCLASS, innerHTML: args.item.children[0].innerHTML }).outerHTML;
@@ -15034,13 +15034,21 @@ let Breadcrumb = class Breadcrumb extends Component {
15034
15034
  args.curData.properties : args.curData), element: args.item
15035
15035
  };
15036
15036
  this.trigger('beforeItemRender', eventArgs);
15037
+ const isItemDisabled = isDisabled || eventArgs.element.classList.contains('e-disabled');
15037
15038
  const containsRightIcon = (isIconRight || eventArgs.element.classList.contains(ICONRIGHT));
15038
15039
  if (containsRightIcon && args.curData.iconCss && !this.itemTemplate) {
15039
15040
  args.item.querySelector('.e-anchor-wrap').append(args.item.querySelector('.' + ICONCLASS));
15040
15041
  }
15041
- if (isDisabled || eventArgs.element.classList.contains('e-disabled')) {
15042
+ if (isItemDisabled) {
15042
15043
  args.item.setAttribute('aria-disabled', 'true');
15043
15044
  }
15045
+ if (args.curData.isEmptyUrl) {
15046
+ args.item.children[0].removeAttribute('href');
15047
+ if ((!isLastItem || (isLastItem && this.enableActiveItemNavigation)) && !isItemDisabled) {
15048
+ args.item.children[0].setAttribute('tabindex', '0');
15049
+ EventHandler.add(args.item.children[0], 'keydown', this.keyDownHandler, this);
15050
+ }
15051
+ }
15044
15052
  if (!this.itemTemplate) {
15045
15053
  this.beforeItemRenderChanges(args.curData, eventArgs.item, args.item, containsRightIcon);
15046
15054
  }
@@ -15260,6 +15268,9 @@ let Breadcrumb = class Breadcrumb extends Component {
15260
15268
  this.reRenderItems();
15261
15269
  }
15262
15270
  break;
15271
+ case 'enableRtl':
15272
+ this.element.classList.toggle('e-rtl');
15273
+ break;
15263
15274
  }
15264
15275
  }
15265
15276
  }