@syncfusion/ej2-navigations 19.4.41 → 19.4.52
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 +42 -0
- package/README.md +1 -1
- 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 +52 -27
- package/dist/es6/ej2-navigations.es2015.js.map +1 -1
- package/dist/es6/ej2-navigations.es5.js +51 -26
- 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 +11 -11
- package/src/accordion/accordion.js +10 -8
- package/src/common/menu-base.d.ts +1 -1
- package/src/common/menu-base.js +21 -12
- package/src/tab/tab.js +1 -0
- package/src/toolbar/toolbar.js +19 -6
- package/styles/bootstrap-dark.css +8 -4
- package/styles/bootstrap.css +8 -4
- package/styles/bootstrap4.css +8 -4
- package/styles/bootstrap5-dark.css +8 -4
- package/styles/bootstrap5.css +8 -4
- package/styles/breadcrumb/_layout.scss +1 -1
- package/styles/breadcrumb/bootstrap-dark.css +1 -1
- package/styles/breadcrumb/bootstrap.css +1 -1
- package/styles/breadcrumb/bootstrap4.css +1 -1
- package/styles/breadcrumb/bootstrap5-dark.css +1 -1
- package/styles/breadcrumb/bootstrap5.css +1 -1
- package/styles/breadcrumb/fabric-dark.css +1 -1
- package/styles/breadcrumb/fabric.css +1 -1
- package/styles/breadcrumb/highcontrast-light.css +1 -1
- package/styles/breadcrumb/highcontrast.css +1 -1
- package/styles/breadcrumb/material-dark.css +1 -1
- package/styles/breadcrumb/material.css +1 -1
- package/styles/breadcrumb/tailwind-dark.css +1 -1
- package/styles/breadcrumb/tailwind.css +1 -1
- package/styles/fabric-dark.css +8 -4
- package/styles/fabric.css +8 -4
- package/styles/highcontrast-light.css +8 -4
- package/styles/highcontrast.css +8 -4
- package/styles/material-dark.css +8 -4
- package/styles/material.css +8 -4
- package/styles/menu/_layout.scss +2 -1
- package/styles/menu/bootstrap-dark.css +2 -1
- package/styles/menu/bootstrap.css +2 -1
- package/styles/menu/bootstrap4.css +2 -1
- package/styles/menu/bootstrap5-dark.css +2 -1
- package/styles/menu/bootstrap5.css +2 -1
- package/styles/menu/fabric-dark.css +2 -1
- package/styles/menu/fabric.css +2 -1
- package/styles/menu/highcontrast-light.css +2 -1
- package/styles/menu/highcontrast.css +2 -1
- package/styles/menu/material-dark.css +2 -1
- package/styles/menu/material.css +2 -1
- package/styles/menu/tailwind-dark.css +2 -1
- package/styles/menu/tailwind.css +2 -1
- package/styles/tailwind-dark.css +8 -4
- package/styles/tailwind.css +8 -4
- package/styles/toolbar/_layout.scss +4 -2
- package/styles/toolbar/bootstrap-dark.css +5 -2
- package/styles/toolbar/bootstrap.css +5 -2
- package/styles/toolbar/bootstrap4.css +5 -2
- package/styles/toolbar/bootstrap5-dark.css +5 -2
- package/styles/toolbar/bootstrap5.css +5 -2
- package/styles/toolbar/fabric-dark.css +5 -2
- package/styles/toolbar/fabric.css +5 -2
- package/styles/toolbar/highcontrast-light.css +5 -2
- package/styles/toolbar/highcontrast.css +5 -2
- package/styles/toolbar/material-dark.css +5 -2
- package/styles/toolbar/material.css +5 -2
- package/styles/toolbar/tailwind-dark.css +5 -2
- package/styles/toolbar/tailwind.css +5 -2
|
@@ -1926,8 +1926,14 @@ 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.
|
|
1930
|
-
|
|
1929
|
+
if (this.popupWrapper.style.position === 'fixed' && this.top > 0) {
|
|
1930
|
+
this.popupWrapper.style.left = this.left + 'px';
|
|
1931
|
+
this.popupWrapper.style.top = this.top + scrollY + 'px';
|
|
1932
|
+
}
|
|
1933
|
+
else {
|
|
1934
|
+
this.popupWrapper.style.left = this.left + 'px';
|
|
1935
|
+
this.popupWrapper.style.top = this.top + 'px';
|
|
1936
|
+
}
|
|
1931
1937
|
const animationOptions = this.animationSettings.effect !== 'None' ? {
|
|
1932
1938
|
name: this.animationSettings.effect, duration: this.animationSettings.duration,
|
|
1933
1939
|
timingFunction: this.animationSettings.easing
|
|
@@ -2443,21 +2449,24 @@ let MenuBase = class MenuBase extends Component {
|
|
|
2443
2449
|
* This method is used to set the menu item in the Menu based on the argument.
|
|
2444
2450
|
*
|
|
2445
2451
|
* @param {MenuItem} item - item need to be updated.
|
|
2446
|
-
* @param {string} id - id to be passed to update the item.
|
|
2452
|
+
* @param {string} id - id / text to be passed to update the item.
|
|
2447
2453
|
* @param {boolean} isUniqueId - Set `true` if it is a unique id.
|
|
2448
2454
|
* @returns {void}
|
|
2449
2455
|
*/
|
|
2450
2456
|
setItem(item, id, isUniqueId) {
|
|
2451
|
-
|
|
2452
|
-
|
|
2453
|
-
|
|
2457
|
+
let idx;
|
|
2458
|
+
if (isUniqueId) {
|
|
2459
|
+
idx = id ? id : item.id;
|
|
2460
|
+
}
|
|
2461
|
+
else {
|
|
2462
|
+
idx = id ? id : item.text;
|
|
2463
|
+
}
|
|
2464
|
+
const navIdx = this.getIndex(idx, isUniqueId);
|
|
2454
2465
|
const newItem = this.getItem(navIdx);
|
|
2455
|
-
newItem.iconCss = item.iconCss;
|
|
2456
|
-
newItem.
|
|
2457
|
-
newItem.
|
|
2458
|
-
newItem.
|
|
2459
|
-
newItem.separator = item.separator;
|
|
2460
|
-
newItem.items = item.items;
|
|
2466
|
+
newItem.iconCss = item.iconCss || newItem.iconCss;
|
|
2467
|
+
newItem.text = item.text || newItem.text;
|
|
2468
|
+
newItem.url = item.url || newItem.url;
|
|
2469
|
+
newItem.separator = item.separator || newItem.separator;
|
|
2461
2470
|
}
|
|
2462
2471
|
getItem(navIdx) {
|
|
2463
2472
|
navIdx = navIdx.slice();
|
|
@@ -3294,7 +3303,7 @@ let Toolbar = class Toolbar extends Component {
|
|
|
3294
3303
|
* @returns {void}.
|
|
3295
3304
|
*/
|
|
3296
3305
|
destroy() {
|
|
3297
|
-
if (this.isReact) {
|
|
3306
|
+
if (this.isReact || this.isAngular) {
|
|
3298
3307
|
this.clearTemplate();
|
|
3299
3308
|
}
|
|
3300
3309
|
const btnItems = this.element.querySelectorAll('.e-control.e-btn');
|
|
@@ -3303,20 +3312,28 @@ let Toolbar = class Toolbar extends Component {
|
|
|
3303
3312
|
el.ej2_instances[0].destroy();
|
|
3304
3313
|
}
|
|
3305
3314
|
});
|
|
3306
|
-
super.destroy();
|
|
3307
3315
|
this.unwireEvents();
|
|
3308
3316
|
this.tempId.forEach((ele) => {
|
|
3309
3317
|
if (!isNullOrUndefined(this.element.querySelector(ele))) {
|
|
3310
3318
|
document.body.appendChild(this.element.querySelector(ele)).style.display = 'none';
|
|
3311
3319
|
}
|
|
3312
3320
|
});
|
|
3321
|
+
this.destroyItems();
|
|
3313
3322
|
while (this.element.lastElementChild) {
|
|
3314
3323
|
this.element.removeChild(this.element.lastElementChild);
|
|
3315
3324
|
}
|
|
3316
3325
|
if (this.trgtEle) {
|
|
3317
3326
|
this.element.appendChild(this.ctrlTem);
|
|
3327
|
+
this.trgtEle = null;
|
|
3328
|
+
this.ctrlTem = null;
|
|
3329
|
+
}
|
|
3330
|
+
if (this.popObj) {
|
|
3331
|
+
this.popObj.destroy();
|
|
3332
|
+
detach(this.popObj.element);
|
|
3333
|
+
}
|
|
3334
|
+
if (this.activeEle) {
|
|
3335
|
+
this.activeEle = null;
|
|
3318
3336
|
}
|
|
3319
|
-
this.clearProperty();
|
|
3320
3337
|
this.popObj = null;
|
|
3321
3338
|
this.tbarAlign = null;
|
|
3322
3339
|
this.remove(this.element, 'e-toolpop');
|
|
@@ -3325,6 +3342,7 @@ let Toolbar = class Toolbar extends Component {
|
|
|
3325
3342
|
}
|
|
3326
3343
|
this.element.removeAttribute('style');
|
|
3327
3344
|
['aria-disabled', 'aria-orientation', 'aria-haspopup', 'role'].forEach((attrb) => this.element.removeAttribute(attrb));
|
|
3345
|
+
super.destroy();
|
|
3328
3346
|
}
|
|
3329
3347
|
/**
|
|
3330
3348
|
* Initialize the event handler
|
|
@@ -3414,8 +3432,8 @@ let Toolbar = class Toolbar extends Component {
|
|
|
3414
3432
|
if (this.element) {
|
|
3415
3433
|
[].slice.call(this.element.querySelectorAll('.' + CLS_ITEM)).forEach((el) => { detach(el); });
|
|
3416
3434
|
}
|
|
3417
|
-
const tbarItems = this.element.querySelector('.' + CLS_ITEMS);
|
|
3418
3435
|
if (this.tbarAlign) {
|
|
3436
|
+
const tbarItems = this.element.querySelector('.' + CLS_ITEMS);
|
|
3419
3437
|
[].slice.call(tbarItems.children).forEach((el) => {
|
|
3420
3438
|
detach(el);
|
|
3421
3439
|
});
|
|
@@ -3498,7 +3516,11 @@ let Toolbar = class Toolbar extends Component {
|
|
|
3498
3516
|
case 'home':
|
|
3499
3517
|
case 'end':
|
|
3500
3518
|
if (clst) {
|
|
3501
|
-
|
|
3519
|
+
let popupCheck = closest(clst, '.e-popup');
|
|
3520
|
+
const extendedPopup = this.element.querySelector('.' + CLS_EXTENDABLECLASS);
|
|
3521
|
+
if (this.overflowMode === 'Extended' && extendedPopup && extendedPopup.classList.contains('e-popup-open')) {
|
|
3522
|
+
popupCheck = e.action === 'end' ? extendedPopup : null;
|
|
3523
|
+
}
|
|
3502
3524
|
if (popupCheck) {
|
|
3503
3525
|
if (isVisible(this.popObj.element)) {
|
|
3504
3526
|
nodes = [].slice.call(popupCheck.children);
|
|
@@ -3511,7 +3533,7 @@ let Toolbar = class Toolbar extends Component {
|
|
|
3511
3533
|
}
|
|
3512
3534
|
}
|
|
3513
3535
|
else {
|
|
3514
|
-
nodes = this.element.querySelectorAll('.' + CLS_ITEMS + ' .' + CLS_ITEM);
|
|
3536
|
+
nodes = this.element.querySelectorAll('.' + CLS_ITEMS + ' .' + CLS_ITEM + ':not(.' + CLS_SEPARATOR + ')');
|
|
3515
3537
|
if (e.action === 'home') {
|
|
3516
3538
|
ele = nodes[0];
|
|
3517
3539
|
}
|
|
@@ -5041,7 +5063,7 @@ let Toolbar = class Toolbar extends Component {
|
|
|
5041
5063
|
}
|
|
5042
5064
|
itemsRerender(newProp) {
|
|
5043
5065
|
this.items = this.tbarItemsCol;
|
|
5044
|
-
if (this.isReact) {
|
|
5066
|
+
if (this.isReact || this.isAngular) {
|
|
5045
5067
|
this.clearTemplate();
|
|
5046
5068
|
}
|
|
5047
5069
|
this.destroyMode();
|
|
@@ -5477,7 +5499,7 @@ let Accordion = class Accordion extends Component {
|
|
|
5477
5499
|
* @returns {void}
|
|
5478
5500
|
*/
|
|
5479
5501
|
destroy() {
|
|
5480
|
-
if (this.isReact) {
|
|
5502
|
+
if (this.isReact || this.isAngular || this.isVue) {
|
|
5481
5503
|
this.clearTemplate();
|
|
5482
5504
|
}
|
|
5483
5505
|
const ele = this.element;
|
|
@@ -5489,9 +5511,11 @@ let Accordion = class Accordion extends Component {
|
|
|
5489
5511
|
ele.removeChild(el);
|
|
5490
5512
|
});
|
|
5491
5513
|
if (this.trgtEle) {
|
|
5514
|
+
this.trgtEle = null;
|
|
5492
5515
|
while (this.ctrlTem.firstElementChild) {
|
|
5493
5516
|
ele.appendChild(this.ctrlTem.firstElementChild);
|
|
5494
5517
|
}
|
|
5518
|
+
this.ctrlTem = null;
|
|
5495
5519
|
}
|
|
5496
5520
|
ele.classList.remove(CLS_ACRDN_ROOT);
|
|
5497
5521
|
ele.removeAttribute('style');
|
|
@@ -5848,11 +5872,13 @@ let Accordion = class Accordion extends Component {
|
|
|
5848
5872
|
else {
|
|
5849
5873
|
trgt.click();
|
|
5850
5874
|
}
|
|
5875
|
+
e.preventDefault();
|
|
5851
5876
|
break;
|
|
5852
5877
|
case 'home':
|
|
5853
5878
|
case 'end':
|
|
5854
5879
|
clst = e.action === 'home' ? root.firstElementChild.children[0] : root.lastElementChild.children[0];
|
|
5855
5880
|
clst.focus();
|
|
5881
|
+
e.preventDefault();
|
|
5856
5882
|
break;
|
|
5857
5883
|
}
|
|
5858
5884
|
}
|
|
@@ -5867,12 +5893,10 @@ let Accordion = class Accordion extends Component {
|
|
|
5867
5893
|
return header;
|
|
5868
5894
|
}
|
|
5869
5895
|
renderInnerItem(item, index) {
|
|
5870
|
-
const innerEle = this.createElement('div', {
|
|
5871
|
-
|
|
5872
|
-
|
|
5873
|
-
|
|
5874
|
-
}
|
|
5875
|
-
attributes(innerEle, { 'aria-expanded': 'false', 'role': 'row' });
|
|
5896
|
+
const innerEle = this.createElement('div', {
|
|
5897
|
+
className: CLS_ITEM$1, id: item.id || getUniqueID('acrdn_item'),
|
|
5898
|
+
attrs: { 'aria-expanded': 'false', 'role': 'row' }
|
|
5899
|
+
});
|
|
5876
5900
|
if (this.headerTemplate) {
|
|
5877
5901
|
const ctnEle = this.headerEleGenerate();
|
|
5878
5902
|
const hdrEle = this.createElement('div', { className: CLS_HEADERCTN });
|
|
@@ -6469,7 +6493,7 @@ let Accordion = class Accordion extends Component {
|
|
|
6469
6493
|
}
|
|
6470
6494
|
destroyItems() {
|
|
6471
6495
|
this.restoreContent(null);
|
|
6472
|
-
if (this.isReact) {
|
|
6496
|
+
if (this.isReact || this.isAngular || this.isVue) {
|
|
6473
6497
|
this.clearTemplate();
|
|
6474
6498
|
}
|
|
6475
6499
|
[].slice.call(this.element.querySelectorAll('.' + CLS_ITEM$1)).forEach((el) => {
|
|
@@ -7857,6 +7881,7 @@ let Tab = class Tab extends Component {
|
|
|
7857
7881
|
}
|
|
7858
7882
|
getContent(ele, cnt, callType, index) {
|
|
7859
7883
|
let eleStr;
|
|
7884
|
+
cnt = isNullOrUndefined(cnt) ? "" : cnt;
|
|
7860
7885
|
if (typeof cnt === 'string' || isNullOrUndefined(cnt.innerHTML)) {
|
|
7861
7886
|
if (typeof cnt === 'string' && this.enableHtmlSanitizer) {
|
|
7862
7887
|
cnt = SanitizeHtmlHelper.sanitize(cnt);
|