@syncfusion/ej2-navigations 19.4.38 → 19.4.48
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 +50 -0
- 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 +65 -32
- package/dist/es6/ej2-navigations.es2015.js.map +1 -1
- package/dist/es6/ej2-navigations.es5.js +64 -31
- 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 +23 -12
- package/src/tab/tab.d.ts +7 -1
- package/src/tab/tab.js +12 -5
- package/src/toolbar/toolbar.js +19 -6
- package/styles/bootstrap-dark.css +3 -2
- package/styles/bootstrap.css +3 -2
- package/styles/bootstrap4.css +3 -2
- package/styles/bootstrap5-dark.css +3 -2
- package/styles/bootstrap5.css +3 -2
- 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 +3 -2
- package/styles/fabric.css +3 -2
- package/styles/highcontrast-light.css +3 -2
- package/styles/highcontrast.css +3 -2
- package/styles/material-dark.css +3 -2
- package/styles/material.css +3 -2
- 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 +3 -2
- package/styles/tailwind.css +3 -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,26 @@ 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.
|
|
2456
|
-
newItem.
|
|
2457
|
-
newItem.text = item.text;
|
|
2458
|
-
newItem.url = item.url;
|
|
2459
|
-
newItem.separator = item.separator;
|
|
2460
|
-
newItem.items = item.items;
|
|
2466
|
+
newItem.id = item.id || newItem.id;
|
|
2467
|
+
newItem.iconCss = item.iconCss || newItem.iconCss;
|
|
2468
|
+
newItem.text = item.text || newItem.text;
|
|
2469
|
+
newItem.url = item.url || newItem.url;
|
|
2470
|
+
newItem.separator = item.separator || newItem.separator;
|
|
2471
|
+
newItem.items = item.items || newItem.items;
|
|
2461
2472
|
}
|
|
2462
2473
|
getItem(navIdx) {
|
|
2463
2474
|
navIdx = navIdx.slice();
|
|
@@ -3294,7 +3305,7 @@ let Toolbar = class Toolbar extends Component {
|
|
|
3294
3305
|
* @returns {void}.
|
|
3295
3306
|
*/
|
|
3296
3307
|
destroy() {
|
|
3297
|
-
if (this.isReact) {
|
|
3308
|
+
if (this.isReact || this.isAngular) {
|
|
3298
3309
|
this.clearTemplate();
|
|
3299
3310
|
}
|
|
3300
3311
|
const btnItems = this.element.querySelectorAll('.e-control.e-btn');
|
|
@@ -3303,20 +3314,28 @@ let Toolbar = class Toolbar extends Component {
|
|
|
3303
3314
|
el.ej2_instances[0].destroy();
|
|
3304
3315
|
}
|
|
3305
3316
|
});
|
|
3306
|
-
super.destroy();
|
|
3307
3317
|
this.unwireEvents();
|
|
3308
3318
|
this.tempId.forEach((ele) => {
|
|
3309
3319
|
if (!isNullOrUndefined(this.element.querySelector(ele))) {
|
|
3310
3320
|
document.body.appendChild(this.element.querySelector(ele)).style.display = 'none';
|
|
3311
3321
|
}
|
|
3312
3322
|
});
|
|
3323
|
+
this.destroyItems();
|
|
3313
3324
|
while (this.element.lastElementChild) {
|
|
3314
3325
|
this.element.removeChild(this.element.lastElementChild);
|
|
3315
3326
|
}
|
|
3316
3327
|
if (this.trgtEle) {
|
|
3317
3328
|
this.element.appendChild(this.ctrlTem);
|
|
3329
|
+
this.trgtEle = null;
|
|
3330
|
+
this.ctrlTem = null;
|
|
3331
|
+
}
|
|
3332
|
+
if (this.popObj) {
|
|
3333
|
+
this.popObj.destroy();
|
|
3334
|
+
detach(this.popObj.element);
|
|
3335
|
+
}
|
|
3336
|
+
if (this.activeEle) {
|
|
3337
|
+
this.activeEle = null;
|
|
3318
3338
|
}
|
|
3319
|
-
this.clearProperty();
|
|
3320
3339
|
this.popObj = null;
|
|
3321
3340
|
this.tbarAlign = null;
|
|
3322
3341
|
this.remove(this.element, 'e-toolpop');
|
|
@@ -3325,6 +3344,7 @@ let Toolbar = class Toolbar extends Component {
|
|
|
3325
3344
|
}
|
|
3326
3345
|
this.element.removeAttribute('style');
|
|
3327
3346
|
['aria-disabled', 'aria-orientation', 'aria-haspopup', 'role'].forEach((attrb) => this.element.removeAttribute(attrb));
|
|
3347
|
+
super.destroy();
|
|
3328
3348
|
}
|
|
3329
3349
|
/**
|
|
3330
3350
|
* Initialize the event handler
|
|
@@ -3414,8 +3434,8 @@ let Toolbar = class Toolbar extends Component {
|
|
|
3414
3434
|
if (this.element) {
|
|
3415
3435
|
[].slice.call(this.element.querySelectorAll('.' + CLS_ITEM)).forEach((el) => { detach(el); });
|
|
3416
3436
|
}
|
|
3417
|
-
const tbarItems = this.element.querySelector('.' + CLS_ITEMS);
|
|
3418
3437
|
if (this.tbarAlign) {
|
|
3438
|
+
const tbarItems = this.element.querySelector('.' + CLS_ITEMS);
|
|
3419
3439
|
[].slice.call(tbarItems.children).forEach((el) => {
|
|
3420
3440
|
detach(el);
|
|
3421
3441
|
});
|
|
@@ -3498,7 +3518,11 @@ let Toolbar = class Toolbar extends Component {
|
|
|
3498
3518
|
case 'home':
|
|
3499
3519
|
case 'end':
|
|
3500
3520
|
if (clst) {
|
|
3501
|
-
|
|
3521
|
+
let popupCheck = closest(clst, '.e-popup');
|
|
3522
|
+
const extendedPopup = this.element.querySelector('.' + CLS_EXTENDABLECLASS);
|
|
3523
|
+
if (this.overflowMode === 'Extended' && extendedPopup && extendedPopup.classList.contains('e-popup-open')) {
|
|
3524
|
+
popupCheck = e.action === 'end' ? extendedPopup : null;
|
|
3525
|
+
}
|
|
3502
3526
|
if (popupCheck) {
|
|
3503
3527
|
if (isVisible(this.popObj.element)) {
|
|
3504
3528
|
nodes = [].slice.call(popupCheck.children);
|
|
@@ -3511,7 +3535,7 @@ let Toolbar = class Toolbar extends Component {
|
|
|
3511
3535
|
}
|
|
3512
3536
|
}
|
|
3513
3537
|
else {
|
|
3514
|
-
nodes = this.element.querySelectorAll('.' + CLS_ITEMS + ' .' + CLS_ITEM);
|
|
3538
|
+
nodes = this.element.querySelectorAll('.' + CLS_ITEMS + ' .' + CLS_ITEM + ':not(.' + CLS_SEPARATOR + ')');
|
|
3515
3539
|
if (e.action === 'home') {
|
|
3516
3540
|
ele = nodes[0];
|
|
3517
3541
|
}
|
|
@@ -5041,7 +5065,7 @@ let Toolbar = class Toolbar extends Component {
|
|
|
5041
5065
|
}
|
|
5042
5066
|
itemsRerender(newProp) {
|
|
5043
5067
|
this.items = this.tbarItemsCol;
|
|
5044
|
-
if (this.isReact) {
|
|
5068
|
+
if (this.isReact || this.isAngular) {
|
|
5045
5069
|
this.clearTemplate();
|
|
5046
5070
|
}
|
|
5047
5071
|
this.destroyMode();
|
|
@@ -5477,7 +5501,7 @@ let Accordion = class Accordion extends Component {
|
|
|
5477
5501
|
* @returns {void}
|
|
5478
5502
|
*/
|
|
5479
5503
|
destroy() {
|
|
5480
|
-
if (this.isReact) {
|
|
5504
|
+
if (this.isReact || this.isAngular || this.isVue) {
|
|
5481
5505
|
this.clearTemplate();
|
|
5482
5506
|
}
|
|
5483
5507
|
const ele = this.element;
|
|
@@ -5489,9 +5513,11 @@ let Accordion = class Accordion extends Component {
|
|
|
5489
5513
|
ele.removeChild(el);
|
|
5490
5514
|
});
|
|
5491
5515
|
if (this.trgtEle) {
|
|
5516
|
+
this.trgtEle = null;
|
|
5492
5517
|
while (this.ctrlTem.firstElementChild) {
|
|
5493
5518
|
ele.appendChild(this.ctrlTem.firstElementChild);
|
|
5494
5519
|
}
|
|
5520
|
+
this.ctrlTem = null;
|
|
5495
5521
|
}
|
|
5496
5522
|
ele.classList.remove(CLS_ACRDN_ROOT);
|
|
5497
5523
|
ele.removeAttribute('style');
|
|
@@ -5848,11 +5874,13 @@ let Accordion = class Accordion extends Component {
|
|
|
5848
5874
|
else {
|
|
5849
5875
|
trgt.click();
|
|
5850
5876
|
}
|
|
5877
|
+
e.preventDefault();
|
|
5851
5878
|
break;
|
|
5852
5879
|
case 'home':
|
|
5853
5880
|
case 'end':
|
|
5854
5881
|
clst = e.action === 'home' ? root.firstElementChild.children[0] : root.lastElementChild.children[0];
|
|
5855
5882
|
clst.focus();
|
|
5883
|
+
e.preventDefault();
|
|
5856
5884
|
break;
|
|
5857
5885
|
}
|
|
5858
5886
|
}
|
|
@@ -5867,12 +5895,10 @@ let Accordion = class Accordion extends Component {
|
|
|
5867
5895
|
return header;
|
|
5868
5896
|
}
|
|
5869
5897
|
renderInnerItem(item, index) {
|
|
5870
|
-
const innerEle = this.createElement('div', {
|
|
5871
|
-
|
|
5872
|
-
|
|
5873
|
-
|
|
5874
|
-
}
|
|
5875
|
-
attributes(innerEle, { 'aria-expanded': 'false', 'role': 'row' });
|
|
5898
|
+
const innerEle = this.createElement('div', {
|
|
5899
|
+
className: CLS_ITEM$1, id: item.id || getUniqueID('acrdn_item'),
|
|
5900
|
+
attrs: { 'aria-expanded': 'false', 'role': 'row' }
|
|
5901
|
+
});
|
|
5876
5902
|
if (this.headerTemplate) {
|
|
5877
5903
|
const ctnEle = this.headerEleGenerate();
|
|
5878
5904
|
const hdrEle = this.createElement('div', { className: CLS_HEADERCTN });
|
|
@@ -6469,7 +6495,7 @@ let Accordion = class Accordion extends Component {
|
|
|
6469
6495
|
}
|
|
6470
6496
|
destroyItems() {
|
|
6471
6497
|
this.restoreContent(null);
|
|
6472
|
-
if (this.isReact) {
|
|
6498
|
+
if (this.isReact || this.isAngular || this.isVue) {
|
|
6473
6499
|
this.clearTemplate();
|
|
6474
6500
|
}
|
|
6475
6501
|
[].slice.call(this.element.querySelectorAll('.' + CLS_ITEM$1)).forEach((el) => {
|
|
@@ -7213,7 +7239,7 @@ let Tab = class Tab extends Component {
|
|
|
7213
7239
|
this.isAdd = false;
|
|
7214
7240
|
this.isIconAlone = false;
|
|
7215
7241
|
this.draggableItems = [];
|
|
7216
|
-
this.resizeContext = this.
|
|
7242
|
+
this.resizeContext = this.refreshActiveTabBorder.bind(this);
|
|
7217
7243
|
/**
|
|
7218
7244
|
* Contains the keyboard configuration of the Tab.
|
|
7219
7245
|
*/
|
|
@@ -7662,7 +7688,7 @@ let Tab = class Tab extends Component {
|
|
|
7662
7688
|
trg.classList.remove(CLS_CLOSE_SHOW);
|
|
7663
7689
|
}
|
|
7664
7690
|
this.tbObj.refreshOverflow();
|
|
7665
|
-
this.
|
|
7691
|
+
this.refreshActiveTabBorder();
|
|
7666
7692
|
}
|
|
7667
7693
|
prevCtnAnimation(prev, current) {
|
|
7668
7694
|
let animation;
|
|
@@ -7857,6 +7883,7 @@ let Tab = class Tab extends Component {
|
|
|
7857
7883
|
}
|
|
7858
7884
|
getContent(ele, cnt, callType, index) {
|
|
7859
7885
|
let eleStr;
|
|
7886
|
+
cnt = isNullOrUndefined(cnt) ? "" : cnt;
|
|
7860
7887
|
if (typeof cnt === 'string' || isNullOrUndefined(cnt.innerHTML)) {
|
|
7861
7888
|
if (typeof cnt === 'string' && this.enableHtmlSanitizer) {
|
|
7862
7889
|
cnt = SanitizeHtmlHelper.sanitize(cnt);
|
|
@@ -8372,7 +8399,13 @@ let Tab = class Tab extends Component {
|
|
|
8372
8399
|
break;
|
|
8373
8400
|
}
|
|
8374
8401
|
}
|
|
8375
|
-
|
|
8402
|
+
/**
|
|
8403
|
+
* Refresh the active tab border
|
|
8404
|
+
*
|
|
8405
|
+
* @returns {void}
|
|
8406
|
+
* @private
|
|
8407
|
+
*/
|
|
8408
|
+
refreshActiveTabBorder() {
|
|
8376
8409
|
const activeEle = select('.' + CLS_TB_ITEM + '.' + CLS_TB_POPUP + '.' + CLS_ACTIVE$1, this.element);
|
|
8377
8410
|
if (!isNullOrUndefined(activeEle) && this.reorderActiveTab) {
|
|
8378
8411
|
this.select(this.getEleIndex(activeEle));
|
|
@@ -9113,7 +9146,7 @@ let Tab = class Tab extends Component {
|
|
|
9113
9146
|
this.setCloseButton(newProp.showCloseButton);
|
|
9114
9147
|
break;
|
|
9115
9148
|
case 'reorderActiveTab':
|
|
9116
|
-
this.
|
|
9149
|
+
this.refreshActiveTabBorder();
|
|
9117
9150
|
break;
|
|
9118
9151
|
case 'selectedItem':
|
|
9119
9152
|
this.selectedItem = oldProp.selectedItem;
|
|
@@ -9128,7 +9161,7 @@ let Tab = class Tab extends Component {
|
|
|
9128
9161
|
case 'overflowMode':
|
|
9129
9162
|
this.tbObj.overflowMode = newProp.overflowMode;
|
|
9130
9163
|
this.tbObj.dataBind();
|
|
9131
|
-
this.
|
|
9164
|
+
this.refreshActiveTabBorder();
|
|
9132
9165
|
break;
|
|
9133
9166
|
case 'heightAdjustMode':
|
|
9134
9167
|
this.setContentHeight(false);
|