@syncfusion/ej2-navigations 20.4.42 → 20.4.43
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 +14 -1
- package/dist/ej2-navigations.min.js +2 -2
- 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 +28 -39
- package/dist/es6/ej2-navigations.es2015.js.map +1 -1
- package/dist/es6/ej2-navigations.es5.js +28 -40
- 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 +6 -6
- package/src/common/menu-base.js +8 -9
- package/src/tab/tab.d.ts +0 -1
- package/src/tab/tab.js +19 -30
- package/src/treeview/treeview.js +1 -1
|
@@ -1415,14 +1415,6 @@ let MenuBase = class MenuBase extends Component {
|
|
|
1415
1415
|
if (fliIdx === (e.action === DOWNARROW ? cul.childElementCount : -1)) {
|
|
1416
1416
|
fliIdx = defaultIdx;
|
|
1417
1417
|
}
|
|
1418
|
-
if (cul.children[fliIdx].classList.contains(HIDE)) {
|
|
1419
|
-
if (e.action === DOWNARROW && fliIdx === cul.childElementCount - 1) {
|
|
1420
|
-
fliIdx = defaultIdx;
|
|
1421
|
-
}
|
|
1422
|
-
else if (e.action === UPARROW && fliIdx === 0) {
|
|
1423
|
-
fliIdx = defaultIdx;
|
|
1424
|
-
}
|
|
1425
|
-
}
|
|
1426
1418
|
}
|
|
1427
1419
|
}
|
|
1428
1420
|
const cli = cul.children[fliIdx];
|
|
@@ -1432,8 +1424,15 @@ let MenuBase = class MenuBase extends Component {
|
|
|
1432
1424
|
}
|
|
1433
1425
|
isValidLI(cli, index, action) {
|
|
1434
1426
|
const cul = this.getUlByNavIdx();
|
|
1427
|
+
const defaultIdx = (action === DOWNARROW || action === HOME || action === TAB) ? 0 : cul.childElementCount - 1;
|
|
1435
1428
|
if (cli.classList.contains(SEPARATOR) || cli.classList.contains(DISABLED) || cli.classList.contains(HIDE)) {
|
|
1436
|
-
if (
|
|
1429
|
+
if (action === DOWNARROW && index === cul.childElementCount - 1) {
|
|
1430
|
+
index = defaultIdx;
|
|
1431
|
+
}
|
|
1432
|
+
else if (action === UPARROW && index === 0) {
|
|
1433
|
+
index = defaultIdx;
|
|
1434
|
+
}
|
|
1435
|
+
else if ((action === DOWNARROW) || (action === RIGHTARROW)) {
|
|
1437
1436
|
index++;
|
|
1438
1437
|
}
|
|
1439
1438
|
else {
|
|
@@ -7332,9 +7331,7 @@ let Tab = class Tab extends Component {
|
|
|
7332
7331
|
this.tbObj = null;
|
|
7333
7332
|
}
|
|
7334
7333
|
this.unWireEvents();
|
|
7335
|
-
|
|
7336
|
-
this.element.removeAttribute(val);
|
|
7337
|
-
});
|
|
7334
|
+
this.element.removeAttribute('aria-disabled');
|
|
7338
7335
|
this.expTemplateContent();
|
|
7339
7336
|
if (!this.isTemplate) {
|
|
7340
7337
|
while (this.element.firstElementChild) {
|
|
@@ -7413,7 +7410,7 @@ let Tab = class Tab extends Component {
|
|
|
7413
7410
|
const css = (name === 'msie') ? 'e-ie' : (name === 'edge') ? 'e-edge' : (name === 'safari') ? 'e-safari' : '';
|
|
7414
7411
|
setStyleAttribute(this.element, { 'width': formatUnit(this.width), 'height': formatUnit(this.height) });
|
|
7415
7412
|
this.setCssClass(this.element, this.cssClass, true);
|
|
7416
|
-
attributes(this.element, {
|
|
7413
|
+
attributes(this.element, { 'aria-disabled': 'false' });
|
|
7417
7414
|
this.setCssClass(this.element, css, true);
|
|
7418
7415
|
this.updatePopAnimationConfig();
|
|
7419
7416
|
}
|
|
@@ -7508,8 +7505,7 @@ let Tab = class Tab extends Component {
|
|
|
7508
7505
|
hdrItems.forEach((item, index) => {
|
|
7509
7506
|
this.lastIndex = index;
|
|
7510
7507
|
const attr = {
|
|
7511
|
-
className: CLS_ITEM$2, id: CLS_ITEM$2 + this.tabId + '_' + index
|
|
7512
|
-
attrs: { role: 'tab', 'aria-controls': CLS_CONTENT$1 + this.tabId + '_' + index, 'aria-selected': 'false' }
|
|
7508
|
+
className: CLS_ITEM$2, id: CLS_ITEM$2 + this.tabId + '_' + index
|
|
7513
7509
|
};
|
|
7514
7510
|
const txt = this.createElement('span', {
|
|
7515
7511
|
className: CLS_TEXT, innerHTML: item, attrs: { 'role': 'presentation' }
|
|
@@ -7517,7 +7513,10 @@ let Tab = class Tab extends Component {
|
|
|
7517
7513
|
const cont = this.createElement('div', {
|
|
7518
7514
|
className: CLS_TEXT_WRAP, innerHTML: txt + this.btnCls.outerHTML
|
|
7519
7515
|
}).outerHTML;
|
|
7520
|
-
const wrap = this.createElement('div', {
|
|
7516
|
+
const wrap = this.createElement('div', {
|
|
7517
|
+
className: CLS_WRAP, innerHTML: cont,
|
|
7518
|
+
attrs: { role: 'tab', tabIndex: '-1', 'aria-selected': 'false', 'aria-controls': CLS_CONTENT$1 + this.tabId + '_' + index }
|
|
7519
|
+
});
|
|
7521
7520
|
tabItems.appendChild(this.createElement('div', attr));
|
|
7522
7521
|
selectAll('.' + CLS_ITEM$2, tabItems)[index].appendChild(wrap);
|
|
7523
7522
|
});
|
|
@@ -7536,15 +7535,13 @@ let Tab = class Tab extends Component {
|
|
|
7536
7535
|
this.tbObj.isStringTemplate = true;
|
|
7537
7536
|
this.tbObj.createElement = this.createElement;
|
|
7538
7537
|
this.tbObj.appendTo(this.hdrEle);
|
|
7539
|
-
attributes(this.hdrEle, {
|
|
7540
|
-
this.updateOrientationAttribute();
|
|
7538
|
+
attributes(this.hdrEle, { role: 'tablist' });
|
|
7541
7539
|
this.setCloseButton(this.showCloseButton);
|
|
7542
7540
|
const toolbarHeader = this.tbObj.element.querySelector('.' + CLS_TB_ITEMS);
|
|
7543
7541
|
if (!isNullOrUndefined(toolbarHeader)) {
|
|
7544
7542
|
if (isNullOrUndefined(toolbarHeader.id) || toolbarHeader.id === '') {
|
|
7545
7543
|
toolbarHeader.id = this.element.id + '_' + 'tab_header_items';
|
|
7546
7544
|
}
|
|
7547
|
-
this.element.setAttribute('aria-owns', toolbarHeader.id);
|
|
7548
7545
|
}
|
|
7549
7546
|
}
|
|
7550
7547
|
renderContent() {
|
|
@@ -7638,7 +7635,7 @@ let Tab = class Tab extends Component {
|
|
|
7638
7635
|
}
|
|
7639
7636
|
}
|
|
7640
7637
|
const tabIndex = isNullOrUndefined(item.tabIndex) ? '-1' : item.tabIndex.toString();
|
|
7641
|
-
const wrapAttrs = (item.disabled) ? {} : { tabIndex: tabIndex, 'data-tabindex': tabIndex };
|
|
7638
|
+
const wrapAttrs = (item.disabled) ? {} : { tabIndex: tabIndex, 'data-tabindex': tabIndex, role: 'tab', 'aria-selected': 'false' };
|
|
7642
7639
|
tCont.appendChild(this.btnCls.cloneNode(true));
|
|
7643
7640
|
const wrap = this.createElement('div', { className: CLS_WRAP, attrs: wrapAttrs });
|
|
7644
7641
|
wrap.appendChild(tCont);
|
|
@@ -7649,7 +7646,7 @@ let Tab = class Tab extends Component {
|
|
|
7649
7646
|
this.itemIndexArray.splice((index + i), 0, CLS_ITEM$2 + this.tabId + '_' + this.lastIndex);
|
|
7650
7647
|
}
|
|
7651
7648
|
const attrObj = {
|
|
7652
|
-
id: CLS_ITEM$2 + this.tabId + '_' + this.lastIndex
|
|
7649
|
+
id: CLS_ITEM$2 + this.tabId + '_' + this.lastIndex
|
|
7653
7650
|
};
|
|
7654
7651
|
const tItem = { htmlAttributes: attrObj, template: wrap };
|
|
7655
7652
|
tItem.cssClass = ((item.cssClass !== undefined) ? item.cssClass : ' ') + ' ' + disabled + ' ' + hidden + ' '
|
|
@@ -7678,6 +7675,7 @@ let Tab = class Tab extends Component {
|
|
|
7678
7675
|
if (tabHeader) {
|
|
7679
7676
|
const tabItems = selectAll('.' + CLS_TB_ITEM + '.' + CLS_ACTIVE$1, tabHeader);
|
|
7680
7677
|
[].slice.call(tabItems).forEach((node) => node.classList.remove(CLS_ACTIVE$1));
|
|
7678
|
+
[].slice.call(tabItems).forEach((node) => node.firstElementChild.setAttribute('aria-selected', 'false'));
|
|
7681
7679
|
}
|
|
7682
7680
|
}
|
|
7683
7681
|
checkPopupOverflow(ele) {
|
|
@@ -7720,9 +7718,6 @@ let Tab = class Tab extends Component {
|
|
|
7720
7718
|
}
|
|
7721
7719
|
return selectAll('.' + CLS_TB_ITEM, this.tbItems).length - 1;
|
|
7722
7720
|
}
|
|
7723
|
-
updateOrientationAttribute() {
|
|
7724
|
-
attributes(this.element, { 'aria-orientation': (this.isVertical() ? 'vertical' : 'horizontal') });
|
|
7725
|
-
}
|
|
7726
7721
|
setCloseButton(val) {
|
|
7727
7722
|
const trg = select('.' + CLS_HEADER$1, this.element);
|
|
7728
7723
|
if (val === true) {
|
|
@@ -8026,7 +8021,6 @@ let Tab = class Tab extends Component {
|
|
|
8026
8021
|
}
|
|
8027
8022
|
}
|
|
8028
8023
|
this.addVerticalClass();
|
|
8029
|
-
this.updateOrientationAttribute();
|
|
8030
8024
|
this.setActiveBorder();
|
|
8031
8025
|
this.focusItem();
|
|
8032
8026
|
}
|
|
@@ -8210,20 +8204,18 @@ let Tab = class Tab extends Component {
|
|
|
8210
8204
|
if (!this.isTemplate) {
|
|
8211
8205
|
const prev = this.tbItem[this.prevIndex];
|
|
8212
8206
|
if (!isNullOrUndefined(prev)) {
|
|
8213
|
-
prev.removeAttribute('aria-controls');
|
|
8207
|
+
prev.firstElementChild.removeAttribute('aria-controls');
|
|
8214
8208
|
}
|
|
8215
|
-
attributes(trg, { 'aria-controls': CLS_CONTENT$1 + this.tabId + '_' + value });
|
|
8209
|
+
attributes(trg.firstElementChild, { 'aria-controls': CLS_CONTENT$1 + this.tabId + '_' + value });
|
|
8216
8210
|
}
|
|
8217
8211
|
const id = trg.id;
|
|
8218
8212
|
this.removeActiveClass();
|
|
8219
8213
|
trg.classList.add(CLS_ACTIVE$1);
|
|
8220
|
-
|
|
8221
|
-
trg.setAttribute('aria-selected', 'true');
|
|
8214
|
+
trg.firstElementChild.setAttribute('aria-selected', 'true');
|
|
8222
8215
|
const no = Number(this.extIndex(id));
|
|
8223
8216
|
if (isNullOrUndefined(this.prevActiveEle)) {
|
|
8224
8217
|
this.prevActiveEle = CLS_CONTENT$1 + this.tabId + '_' + no;
|
|
8225
8218
|
}
|
|
8226
|
-
attributes(this.element, { 'aria-activedescendant': id });
|
|
8227
8219
|
if (this.isTemplate) {
|
|
8228
8220
|
if (select('.' + CLS_CONTENT$1, this.element).children.length > 0) {
|
|
8229
8221
|
const trg = this.findEle(select('.' + CLS_CONTENT$1, this.element).children, CLS_CONTENT$1 + this.tabId + '_' + no);
|
|
@@ -8892,7 +8884,7 @@ let Tab = class Tab extends Component {
|
|
|
8892
8884
|
(textValue.length === 0) && !isNullOrUndefined(item.header) && isNullOrUndefined(item.header.iconCss))) {
|
|
8893
8885
|
if (tabItems[place]) {
|
|
8894
8886
|
if (isNullOrUndefined(item.id)) {
|
|
8895
|
-
item.id = TABITEMPREFIX + (lastEleIndex + place).toString();
|
|
8887
|
+
item.id = CLS_ITEM$2 + this.tabId + '_' + TABITEMPREFIX + (lastEleIndex + place).toString();
|
|
8896
8888
|
}
|
|
8897
8889
|
tabItems[place].htmlAttributes['data-id'] = item.id;
|
|
8898
8890
|
}
|
|
@@ -9319,7 +9311,7 @@ let Tab = class Tab extends Component {
|
|
|
9319
9311
|
}
|
|
9320
9312
|
}
|
|
9321
9313
|
const tabIndex = isNullOrUndefined(item.tabIndex) ? '-1' : item.tabIndex.toString();
|
|
9322
|
-
const wrapAtt = (item.disabled) ? {} : { tabIndex: tabIndex, 'data-tabindex': tabIndex };
|
|
9314
|
+
const wrapAtt = (item.disabled) ? {} : { tabIndex: tabIndex, 'data-tabindex': tabIndex, role: 'tab', 'aria-selected': 'true' };
|
|
9323
9315
|
tConts.appendChild(this.btnCls.cloneNode(true));
|
|
9324
9316
|
const wraper = this.createElement('div', { className: CLS_WRAP, attrs: wrapAtt });
|
|
9325
9317
|
wraper.appendChild(tConts);
|
|
@@ -9370,11 +9362,7 @@ let Tab = class Tab extends Component {
|
|
|
9370
9362
|
detach(element);
|
|
9371
9363
|
detach(detachContent);
|
|
9372
9364
|
const attr = {
|
|
9373
|
-
className: CLS_TB_ITEM + ' ' + CLS_TEMPLATE$1 + ' ' + CLS_ACTIVE$1, id: CLS_ITEM$2 + this.tabId + '_' + index
|
|
9374
|
-
attrs: {
|
|
9375
|
-
role: 'tab', 'aria-controls': CLS_CONTENT$1 + this.tabId + '_' + index,
|
|
9376
|
-
'aria-disabled': 'false', 'aria-selected': 'true'
|
|
9377
|
-
}
|
|
9365
|
+
className: CLS_TB_ITEM + ' ' + CLS_TEMPLATE$1 + ' ' + CLS_ACTIVE$1, id: CLS_ITEM$2 + this.tabId + '_' + index
|
|
9378
9366
|
};
|
|
9379
9367
|
const txtString = this.createElement('span', {
|
|
9380
9368
|
className: CLS_TEXT, innerHTML: header, attrs: { 'role': 'presentation' }
|
|
@@ -9384,7 +9372,8 @@ let Tab = class Tab extends Component {
|
|
|
9384
9372
|
}).outerHTML;
|
|
9385
9373
|
const tabIndex = element.firstElementChild.getAttribute('data-tabindex');
|
|
9386
9374
|
const wrap = this.createElement('div', {
|
|
9387
|
-
className: CLS_WRAP, innerHTML: conte,
|
|
9375
|
+
className: CLS_WRAP, innerHTML: conte,
|
|
9376
|
+
attrs: { tabIndex: tabIndex, 'data-tabindex': tabIndex, role: 'tab', 'aria-controls': CLS_CONTENT$1 + this.tabId + '_' + index, 'aria-selected': 'true' }
|
|
9388
9377
|
});
|
|
9389
9378
|
tabItems.insertBefore(this.createElement('div', attr), tabItems.children[index + 1]);
|
|
9390
9379
|
this.element.querySelector('.' + CLS_TB_ITEM + '.' + CLS_ACTIVE$1).appendChild(wrap);
|
|
@@ -10928,7 +10917,7 @@ let TreeView = TreeView_1 = class TreeView extends Component {
|
|
|
10928
10917
|
}
|
|
10929
10918
|
}
|
|
10930
10919
|
clickHandler(event) {
|
|
10931
|
-
let target = event.originalEvent.target;
|
|
10920
|
+
let target = Browser.isDevice ? document.elementFromPoint(event.originalEvent.changedTouches[0].clientX, event.originalEvent.changedTouches[0].clientY) : event.originalEvent.target;
|
|
10932
10921
|
EventHandler.remove(this.element, 'contextmenu', this.preventContextMenu);
|
|
10933
10922
|
if (!target || this.dragStartAction) {
|
|
10934
10923
|
return;
|