@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 { Browser, getUniqueID, Touch, EventHandler, isNullOrUndefined, selectAll, detach, classList, Property, NotifyPropertyChanges, Component, createElement, removeClass, select, ChildProperty, Collection, Animation, getValue, setValue, append, closest, addClass, isBlazor, rippleEffect, KeyboardEvents, getInstance, isVisible, SanitizeHtmlHelper, Event, Complex, formatUnit, setStyleAttribute, attributes, compile, isRippleEnabled, animationMode, remove, getRandomId,
|
|
1
|
+
import { Browser, getUniqueID, Touch, EventHandler, isNullOrUndefined, selectAll, detach, classList, Property, NotifyPropertyChanges, Component, createElement, removeClass, select, ChildProperty, Collection, Animation, getValue, setValue, append, closest, addClass, isBlazor, rippleEffect, KeyboardEvents, getInstance, isVisible, SanitizeHtmlHelper, Event, Complex, 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';
|
|
@@ -1672,7 +1672,7 @@ var MenuBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
1672
1672
|
var popups_1 = [];
|
|
1673
1673
|
var allPopup = selectAll('.' + POPUP);
|
|
1674
1674
|
allPopup.forEach(function (elem) {
|
|
1675
|
-
if (_this.element.id === elem.id.split('-')[2] ||
|
|
1675
|
+
if (_this.element.id === elem.id.split('-')[2] || (_this.element.id.includes('-') && elem.id.includes(_this.element.id))) {
|
|
1676
1676
|
popups_1.push(elem);
|
|
1677
1677
|
}
|
|
1678
1678
|
});
|
|
@@ -4060,6 +4060,8 @@ var Toolbar = /** @__PURE__ @class */ (function (_super) {
|
|
|
4060
4060
|
this.isVertical = this.element.classList.contains(CLS_VERTICAL) ? true : false;
|
|
4061
4061
|
this.isExtendedOpen = false;
|
|
4062
4062
|
this.popupPriCount = 0;
|
|
4063
|
+
var localeText = { overflow: 'overflow' };
|
|
4064
|
+
this.l10n = new L10n(this.getModuleName(), localeText, this.locale);
|
|
4063
4065
|
if (this.enableRtl) {
|
|
4064
4066
|
this.add(this.element, CLS_RTL$2);
|
|
4065
4067
|
}
|
|
@@ -4254,10 +4256,15 @@ var Toolbar = /** @__PURE__ @class */ (function (_super) {
|
|
|
4254
4256
|
return;
|
|
4255
4257
|
}
|
|
4256
4258
|
if (rootEle === trgt) {
|
|
4257
|
-
this.
|
|
4259
|
+
if (this.isDropDownList(clst.firstElementChild)) {
|
|
4260
|
+
this.eleFocus(clst, 'next', true);
|
|
4261
|
+
}
|
|
4262
|
+
else {
|
|
4263
|
+
this.elementFocus(clst);
|
|
4264
|
+
}
|
|
4258
4265
|
}
|
|
4259
4266
|
else if (!navChk) {
|
|
4260
|
-
this.eleFocus(clst, 'next');
|
|
4267
|
+
this.eleFocus(clst, 'next', true);
|
|
4261
4268
|
}
|
|
4262
4269
|
break;
|
|
4263
4270
|
case 'moveLeft':
|
|
@@ -4265,7 +4272,7 @@ var Toolbar = /** @__PURE__ @class */ (function (_super) {
|
|
|
4265
4272
|
return;
|
|
4266
4273
|
}
|
|
4267
4274
|
if (!navChk) {
|
|
4268
|
-
this.eleFocus(clst, 'previous');
|
|
4275
|
+
this.eleFocus(clst, 'previous', true);
|
|
4269
4276
|
}
|
|
4270
4277
|
break;
|
|
4271
4278
|
case 'home':
|
|
@@ -4456,12 +4463,14 @@ var Toolbar = /** @__PURE__ @class */ (function (_super) {
|
|
|
4456
4463
|
}
|
|
4457
4464
|
return element;
|
|
4458
4465
|
};
|
|
4459
|
-
Toolbar.prototype.eleFocus = function (closest, pos) {
|
|
4466
|
+
Toolbar.prototype.eleFocus = function (closest, pos, skipDropDownList) {
|
|
4467
|
+
if (skipDropDownList === void 0) { skipDropDownList = false; }
|
|
4460
4468
|
var sib = Object(closest)[pos + 'ElementSibling'];
|
|
4461
4469
|
if (sib) {
|
|
4462
|
-
var skipEle = this.eleContains(sib)
|
|
4470
|
+
var skipEle = this.eleContains(sib) ||
|
|
4471
|
+
(skipDropDownList && this.isDropDownList(sib.firstElementChild));
|
|
4463
4472
|
if (skipEle) {
|
|
4464
|
-
this.eleFocus(sib, pos);
|
|
4473
|
+
this.eleFocus(sib, pos, skipDropDownList);
|
|
4465
4474
|
return;
|
|
4466
4475
|
}
|
|
4467
4476
|
this.elementFocus(sib);
|
|
@@ -4474,8 +4483,8 @@ var Toolbar = /** @__PURE__ @class */ (function (_super) {
|
|
|
4474
4483
|
if (!isNullOrUndefined(elem) && elem.children.length > 0) {
|
|
4475
4484
|
if (pos === 'next') {
|
|
4476
4485
|
var el = elem.querySelector('.' + CLS_ITEM);
|
|
4477
|
-
if (this.eleContains(el)) {
|
|
4478
|
-
this.eleFocus(el, pos);
|
|
4486
|
+
if (this.eleContains(el) || (skipDropDownList && this.isDropDownList(el.firstElementChild))) {
|
|
4487
|
+
this.eleFocus(el, pos, skipDropDownList);
|
|
4479
4488
|
}
|
|
4480
4489
|
else {
|
|
4481
4490
|
el.firstElementChild.focus();
|
|
@@ -4484,8 +4493,8 @@ var Toolbar = /** @__PURE__ @class */ (function (_super) {
|
|
|
4484
4493
|
}
|
|
4485
4494
|
else {
|
|
4486
4495
|
var el = elem.lastElementChild;
|
|
4487
|
-
if (this.eleContains(el)) {
|
|
4488
|
-
this.eleFocus(el, pos);
|
|
4496
|
+
if (this.eleContains(el) || (skipDropDownList && this.isDropDownList(el.firstElementChild))) {
|
|
4497
|
+
this.eleFocus(el, pos, skipDropDownList);
|
|
4489
4498
|
}
|
|
4490
4499
|
else {
|
|
4491
4500
|
this.elementFocus(el);
|
|
@@ -4496,10 +4505,24 @@ var Toolbar = /** @__PURE__ @class */ (function (_super) {
|
|
|
4496
4505
|
else if (!isNullOrUndefined(closest)) {
|
|
4497
4506
|
var tbrItems = this.element.querySelectorAll('.' + CLS_ITEMS + ' .' + CLS_ITEM + ':not(.' + CLS_SEPARATOR + ')' + ':not(.' + CLS_DISABLE$2 + ')' + ':not(.' + CLS_HIDDEN + ')');
|
|
4498
4507
|
if (pos === 'next' && tbrItems) {
|
|
4499
|
-
|
|
4508
|
+
var index = 0;
|
|
4509
|
+
while (skipDropDownList && index < tbrItems.length &&
|
|
4510
|
+
this.isDropDownList(tbrItems[index].firstElementChild)) {
|
|
4511
|
+
index++;
|
|
4512
|
+
}
|
|
4513
|
+
if (index < tbrItems.length) {
|
|
4514
|
+
this.elementFocus(tbrItems[index]);
|
|
4515
|
+
}
|
|
4500
4516
|
}
|
|
4501
4517
|
else if (pos === 'previous' && tbrItems) {
|
|
4502
|
-
|
|
4518
|
+
var index = tbrItems.length - 1;
|
|
4519
|
+
while (skipDropDownList && index >= 0 &&
|
|
4520
|
+
this.isDropDownList(tbrItems[index].firstElementChild)) {
|
|
4521
|
+
index--;
|
|
4522
|
+
}
|
|
4523
|
+
if (index >= 0) {
|
|
4524
|
+
this.elementFocus(tbrItems[index]);
|
|
4525
|
+
}
|
|
4503
4526
|
}
|
|
4504
4527
|
}
|
|
4505
4528
|
};
|
|
@@ -4836,7 +4859,7 @@ var Toolbar = /** @__PURE__ @class */ (function (_super) {
|
|
|
4836
4859
|
this.createPopupEle(ele, [].slice.call(selectAll('.' + CLS_ITEMS + ' .' + CLS_ITEM, ele)));
|
|
4837
4860
|
var ariaAttr = {
|
|
4838
4861
|
'tabindex': '0', 'role': 'button', 'aria-haspopup': 'true',
|
|
4839
|
-
'aria-label': 'overflow'
|
|
4862
|
+
'aria-label': this.l10n.getConstant('overflow')
|
|
4840
4863
|
};
|
|
4841
4864
|
attributes(this.element.querySelector('.' + CLS_TBARNAV), ariaAttr);
|
|
4842
4865
|
};
|
|
@@ -5846,7 +5869,9 @@ var Toolbar = /** @__PURE__ @class */ (function (_super) {
|
|
|
5846
5869
|
this.add(innerEle, CLS_TEMPLATE);
|
|
5847
5870
|
var firstChild = innerEle.firstElementChild;
|
|
5848
5871
|
if (!isNullOrUndefined(firstChild)) {
|
|
5849
|
-
|
|
5872
|
+
if (!this.isDropDownList(firstChild)) {
|
|
5873
|
+
firstChild.setAttribute('tabindex', isNullOrUndefined(firstChild.getAttribute('tabIndex')) ? '-1' : this.getDataTabindex(firstChild));
|
|
5874
|
+
}
|
|
5850
5875
|
firstChild.setAttribute('data-tabindex', isNullOrUndefined(firstChild.getAttribute('tabIndex')) ? '-1' : this.getDataTabindex(firstChild));
|
|
5851
5876
|
}
|
|
5852
5877
|
this.tbarEle.push(innerEle);
|
|
@@ -5964,6 +5989,17 @@ var Toolbar = /** @__PURE__ @class */ (function (_super) {
|
|
|
5964
5989
|
Toolbar.prototype.getDataTabindex = function (ele) {
|
|
5965
5990
|
return isNullOrUndefined(ele.getAttribute('data-tabindex')) ? '-1' : ele.getAttribute('data-tabindex');
|
|
5966
5991
|
};
|
|
5992
|
+
Toolbar.prototype.isDropDownList = function (ele) {
|
|
5993
|
+
if (isNullOrUndefined(ele)) {
|
|
5994
|
+
return false;
|
|
5995
|
+
}
|
|
5996
|
+
var input = ele.querySelector('input.e-control');
|
|
5997
|
+
if (isNullOrUndefined(input) || isNullOrUndefined(input.ej2_instances) || isNullOrUndefined(input.ej2_instances[0])) {
|
|
5998
|
+
return false;
|
|
5999
|
+
}
|
|
6000
|
+
var instance = input.ej2_instances[0];
|
|
6001
|
+
return instance.getModuleName() === 'dropdownlist';
|
|
6002
|
+
};
|
|
5967
6003
|
Toolbar.prototype.itemClick = function (e) {
|
|
5968
6004
|
this.activeEleSwitch(e.currentTarget);
|
|
5969
6005
|
};
|