@syncfusion/ej2-navigations 35.1.40 → 35.1.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/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 +51 -16
- package/dist/es6/ej2-navigations.es2015.js.map +1 -1
- package/dist/es6/ej2-navigations.es5.js +52 -16
- 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 +5 -5
- package/src/common/menu-base.js +1 -1
- package/src/toolbar/toolbar-model.d.ts +1 -1
- package/src/toolbar/toolbar.d.ts +2 -0
- package/src/toolbar/toolbar.js +51 -15
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Component, Browser, getUniqueID, Touch, EventHandler, isNullOrUndefined, selectAll, detach, classList, Property, NotifyPropertyChanges, createElement, removeClass, select, ChildProperty, Collection, Event, Complex, Animation, getValue, setValue, append, closest, addClass, isBlazor, rippleEffect, KeyboardEvents, getInstance, isVisible, SanitizeHtmlHelper, formatUnit, setStyleAttribute, attributes, compile, isRippleEnabled, animationMode, remove, getRandomId,
|
|
1
|
+
import { Component, Browser, getUniqueID, Touch, EventHandler, isNullOrUndefined, selectAll, detach, classList, Property, NotifyPropertyChanges, createElement, removeClass, select, ChildProperty, Collection, Event, Complex, Animation, getValue, setValue, append, closest, addClass, isBlazor, rippleEffect, KeyboardEvents, getInstance, isVisible, SanitizeHtmlHelper, L10n, formatUnit, setStyleAttribute, attributes, compile, isRippleEnabled, animationMode, remove, getRandomId, Draggable, isUndefined, getElement, Droppable, matches, extend, merge, initializeCSPTemplate } from '@syncfusion/ej2-base';
|
|
2
2
|
import { ListBase } from '@syncfusion/ej2-lists';
|
|
3
3
|
import { getScrollableParent, Popup, getZindexPartial, fit, isCollide, calculatePosition, createSpinner, showSpinner, hideSpinner, Tooltip } from '@syncfusion/ej2-popups';
|
|
4
4
|
import { Button, createCheckBox, rippleMouseHandler } from '@syncfusion/ej2-buttons';
|
|
@@ -1594,7 +1594,7 @@ let MenuBase = class MenuBase extends Component {
|
|
|
1594
1594
|
const popups = [];
|
|
1595
1595
|
const allPopup = selectAll('.' + POPUP);
|
|
1596
1596
|
allPopup.forEach((elem) => {
|
|
1597
|
-
if (this.element.id === elem.id.split('-')[2] ||
|
|
1597
|
+
if (this.element.id === elem.id.split('-')[2] || (this.element.id.includes('-') && elem.id.includes(this.element.id))) {
|
|
1598
1598
|
popups.push(elem);
|
|
1599
1599
|
}
|
|
1600
1600
|
});
|
|
@@ -3920,6 +3920,8 @@ let Toolbar = class Toolbar extends Component {
|
|
|
3920
3920
|
this.isVertical = this.element.classList.contains(CLS_VERTICAL) ? true : false;
|
|
3921
3921
|
this.isExtendedOpen = false;
|
|
3922
3922
|
this.popupPriCount = 0;
|
|
3923
|
+
const localeText = { overflow: 'overflow' };
|
|
3924
|
+
this.l10n = new L10n(this.getModuleName(), localeText, this.locale);
|
|
3923
3925
|
if (this.enableRtl) {
|
|
3924
3926
|
this.add(this.element, CLS_RTL$2);
|
|
3925
3927
|
}
|
|
@@ -4113,10 +4115,15 @@ let Toolbar = class Toolbar extends Component {
|
|
|
4113
4115
|
return;
|
|
4114
4116
|
}
|
|
4115
4117
|
if (rootEle === trgt) {
|
|
4116
|
-
this.
|
|
4118
|
+
if (this.isDropDownList(clst.firstElementChild)) {
|
|
4119
|
+
this.eleFocus(clst, 'next', true);
|
|
4120
|
+
}
|
|
4121
|
+
else {
|
|
4122
|
+
this.elementFocus(clst);
|
|
4123
|
+
}
|
|
4117
4124
|
}
|
|
4118
4125
|
else if (!navChk) {
|
|
4119
|
-
this.eleFocus(clst, 'next');
|
|
4126
|
+
this.eleFocus(clst, 'next', true);
|
|
4120
4127
|
}
|
|
4121
4128
|
break;
|
|
4122
4129
|
case 'moveLeft':
|
|
@@ -4124,7 +4131,7 @@ let Toolbar = class Toolbar extends Component {
|
|
|
4124
4131
|
return;
|
|
4125
4132
|
}
|
|
4126
4133
|
if (!navChk) {
|
|
4127
|
-
this.eleFocus(clst, 'previous');
|
|
4134
|
+
this.eleFocus(clst, 'previous', true);
|
|
4128
4135
|
}
|
|
4129
4136
|
break;
|
|
4130
4137
|
case 'home':
|
|
@@ -4314,12 +4321,13 @@ let Toolbar = class Toolbar extends Component {
|
|
|
4314
4321
|
}
|
|
4315
4322
|
return element;
|
|
4316
4323
|
}
|
|
4317
|
-
eleFocus(closest, pos) {
|
|
4324
|
+
eleFocus(closest, pos, skipDropDownList = false) {
|
|
4318
4325
|
const sib = Object(closest)[pos + 'ElementSibling'];
|
|
4319
4326
|
if (sib) {
|
|
4320
|
-
const skipEle = this.eleContains(sib)
|
|
4327
|
+
const skipEle = this.eleContains(sib) ||
|
|
4328
|
+
(skipDropDownList && this.isDropDownList(sib.firstElementChild));
|
|
4321
4329
|
if (skipEle) {
|
|
4322
|
-
this.eleFocus(sib, pos);
|
|
4330
|
+
this.eleFocus(sib, pos, skipDropDownList);
|
|
4323
4331
|
return;
|
|
4324
4332
|
}
|
|
4325
4333
|
this.elementFocus(sib);
|
|
@@ -4332,8 +4340,8 @@ let Toolbar = class Toolbar extends Component {
|
|
|
4332
4340
|
if (!isNullOrUndefined(elem) && elem.children.length > 0) {
|
|
4333
4341
|
if (pos === 'next') {
|
|
4334
4342
|
const el = elem.querySelector('.' + CLS_ITEM);
|
|
4335
|
-
if (this.eleContains(el)) {
|
|
4336
|
-
this.eleFocus(el, pos);
|
|
4343
|
+
if (this.eleContains(el) || (skipDropDownList && this.isDropDownList(el.firstElementChild))) {
|
|
4344
|
+
this.eleFocus(el, pos, skipDropDownList);
|
|
4337
4345
|
}
|
|
4338
4346
|
else {
|
|
4339
4347
|
el.firstElementChild.focus();
|
|
@@ -4342,8 +4350,8 @@ let Toolbar = class Toolbar extends Component {
|
|
|
4342
4350
|
}
|
|
4343
4351
|
else {
|
|
4344
4352
|
const el = elem.lastElementChild;
|
|
4345
|
-
if (this.eleContains(el)) {
|
|
4346
|
-
this.eleFocus(el, pos);
|
|
4353
|
+
if (this.eleContains(el) || (skipDropDownList && this.isDropDownList(el.firstElementChild))) {
|
|
4354
|
+
this.eleFocus(el, pos, skipDropDownList);
|
|
4347
4355
|
}
|
|
4348
4356
|
else {
|
|
4349
4357
|
this.elementFocus(el);
|
|
@@ -4354,10 +4362,24 @@ let Toolbar = class Toolbar extends Component {
|
|
|
4354
4362
|
else if (!isNullOrUndefined(closest)) {
|
|
4355
4363
|
const tbrItems = this.element.querySelectorAll('.' + CLS_ITEMS + ' .' + CLS_ITEM + ':not(.' + CLS_SEPARATOR + ')' + ':not(.' + CLS_DISABLE$2 + ')' + ':not(.' + CLS_HIDDEN + ')');
|
|
4356
4364
|
if (pos === 'next' && tbrItems) {
|
|
4357
|
-
|
|
4365
|
+
let index = 0;
|
|
4366
|
+
while (skipDropDownList && index < tbrItems.length &&
|
|
4367
|
+
this.isDropDownList(tbrItems[index].firstElementChild)) {
|
|
4368
|
+
index++;
|
|
4369
|
+
}
|
|
4370
|
+
if (index < tbrItems.length) {
|
|
4371
|
+
this.elementFocus(tbrItems[index]);
|
|
4372
|
+
}
|
|
4358
4373
|
}
|
|
4359
4374
|
else if (pos === 'previous' && tbrItems) {
|
|
4360
|
-
|
|
4375
|
+
let index = tbrItems.length - 1;
|
|
4376
|
+
while (skipDropDownList && index >= 0 &&
|
|
4377
|
+
this.isDropDownList(tbrItems[index].firstElementChild)) {
|
|
4378
|
+
index--;
|
|
4379
|
+
}
|
|
4380
|
+
if (index >= 0) {
|
|
4381
|
+
this.elementFocus(tbrItems[index]);
|
|
4382
|
+
}
|
|
4361
4383
|
}
|
|
4362
4384
|
}
|
|
4363
4385
|
}
|
|
@@ -4691,7 +4713,7 @@ let Toolbar = class Toolbar extends Component {
|
|
|
4691
4713
|
this.createPopupEle(ele, [].slice.call(selectAll('.' + CLS_ITEMS + ' .' + CLS_ITEM, ele)));
|
|
4692
4714
|
const ariaAttr = {
|
|
4693
4715
|
'tabindex': '0', 'role': 'button', 'aria-haspopup': 'true',
|
|
4694
|
-
'aria-label': 'overflow'
|
|
4716
|
+
'aria-label': this.l10n.getConstant('overflow')
|
|
4695
4717
|
};
|
|
4696
4718
|
attributes(this.element.querySelector('.' + CLS_TBARNAV), ariaAttr);
|
|
4697
4719
|
}
|
|
@@ -5688,7 +5710,9 @@ let Toolbar = class Toolbar extends Component {
|
|
|
5688
5710
|
this.add(innerEle, CLS_TEMPLATE);
|
|
5689
5711
|
const firstChild = innerEle.firstElementChild;
|
|
5690
5712
|
if (!isNullOrUndefined(firstChild)) {
|
|
5691
|
-
|
|
5713
|
+
if (!this.isDropDownList(firstChild)) {
|
|
5714
|
+
firstChild.setAttribute('tabindex', isNullOrUndefined(firstChild.getAttribute('tabIndex')) ? '-1' : this.getDataTabindex(firstChild));
|
|
5715
|
+
}
|
|
5692
5716
|
firstChild.setAttribute('data-tabindex', isNullOrUndefined(firstChild.getAttribute('tabIndex')) ? '-1' : this.getDataTabindex(firstChild));
|
|
5693
5717
|
}
|
|
5694
5718
|
this.tbarEle.push(innerEle);
|
|
@@ -5806,6 +5830,17 @@ let Toolbar = class Toolbar extends Component {
|
|
|
5806
5830
|
getDataTabindex(ele) {
|
|
5807
5831
|
return isNullOrUndefined(ele.getAttribute('data-tabindex')) ? '-1' : ele.getAttribute('data-tabindex');
|
|
5808
5832
|
}
|
|
5833
|
+
isDropDownList(ele) {
|
|
5834
|
+
if (isNullOrUndefined(ele)) {
|
|
5835
|
+
return false;
|
|
5836
|
+
}
|
|
5837
|
+
const input = ele.querySelector('input.e-control');
|
|
5838
|
+
if (isNullOrUndefined(input) || isNullOrUndefined(input.ej2_instances) || isNullOrUndefined(input.ej2_instances[0])) {
|
|
5839
|
+
return false;
|
|
5840
|
+
}
|
|
5841
|
+
const instance = input.ej2_instances[0];
|
|
5842
|
+
return instance.getModuleName() === 'dropdownlist';
|
|
5843
|
+
}
|
|
5809
5844
|
itemClick(e) {
|
|
5810
5845
|
this.activeEleSwitch(e.currentTarget);
|
|
5811
5846
|
}
|