@syncfusion/ej2-navigations 19.3.43 → 19.3.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.
- package/CHANGELOG.md +18 -0
- package/README.md +7 -7
- 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 +87 -76
- package/dist/es6/ej2-navigations.es2015.js.map +1 -1
- package/dist/es6/ej2-navigations.es5.js +87 -76
- 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 +23 -12
- package/src/breadcrumb/breadcrumb.js +19 -10
- package/src/common/menu-base.js +2 -2
- package/src/tab/tab.js +66 -64
- package/styles/bootstrap-dark.css +15 -2
- package/styles/bootstrap.css +15 -2
- package/styles/bootstrap4.css +15 -2
- package/styles/bootstrap5-dark.css +19 -3
- package/styles/bootstrap5.css +19 -3
- package/styles/breadcrumb/_layout.scss +13 -0
- package/styles/breadcrumb/_theme.scss +1 -1
- package/styles/breadcrumb/bootstrap-dark.css +13 -0
- package/styles/breadcrumb/bootstrap.css +13 -0
- package/styles/breadcrumb/bootstrap4.css +13 -0
- package/styles/breadcrumb/bootstrap5-dark.css +16 -0
- package/styles/breadcrumb/bootstrap5.css +16 -0
- package/styles/breadcrumb/fabric-dark.css +16 -0
- package/styles/breadcrumb/fabric.css +16 -0
- package/styles/breadcrumb/highcontrast-light.css +17 -1
- package/styles/breadcrumb/highcontrast.css +17 -1
- package/styles/breadcrumb/material-dark.css +16 -0
- package/styles/breadcrumb/material.css +16 -0
- package/styles/breadcrumb/tailwind-dark.css +16 -0
- package/styles/breadcrumb/tailwind.css +16 -0
- package/styles/fabric-dark.css +16 -0
- package/styles/fabric.css +16 -0
- package/styles/highcontrast-light.css +17 -1
- package/styles/highcontrast.css +17 -1
- package/styles/material-dark.css +16 -0
- package/styles/material.css +16 -0
- package/styles/tab/_bootstrap5-definition.scss +1 -1
- package/styles/tab/_layout.scss +1 -1
- package/styles/tab/bootstrap-dark.css +2 -2
- package/styles/tab/bootstrap.css +2 -2
- package/styles/tab/bootstrap4.css +2 -2
- package/styles/tab/bootstrap5-dark.css +3 -3
- package/styles/tab/bootstrap5.css +3 -3
- package/styles/tailwind-dark.css +16 -0
- 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
|
|
@@ -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
|
|
8353
|
-
|
|
8354
|
-
|
|
8355
|
-
|
|
8356
|
-
|
|
8357
|
-
|
|
8358
|
-
|
|
8359
|
-
|
|
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.indexOf('_'));
|
|
8360
|
+
itemIndex = parseInt(hdr.id.substring(num + 1), 10);
|
|
8372
8361
|
}
|
|
8373
8362
|
else {
|
|
8374
|
-
|
|
8375
|
-
|
|
8376
|
-
|
|
8377
|
-
|
|
8378
|
-
|
|
8379
|
-
this.
|
|
8380
|
-
|
|
8381
|
-
|
|
8382
|
-
|
|
8383
|
-
|
|
8384
|
-
|
|
8385
|
-
|
|
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
|
-
|
|
8402
|
-
|
|
8403
|
-
|
|
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
|
-
|
|
8406
|
-
|
|
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
|
-
|
|
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 (
|
|
8415
|
-
|
|
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 {
|
|
@@ -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
|
-
|
|
14981
|
-
|
|
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 (
|
|
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
|
}
|