@syncfusion/ej2-navigations 35.1.42 → 35.1.46
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 +54 -14
- package/dist/es6/ej2-navigations.es2015.js.map +1 -1
- package/dist/es6/ej2-navigations.es5.js +55 -14
- 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 +3 -3
- package/src/common/menu-base.d.ts +1 -0
- package/src/common/menu-base.js +8 -1
- package/src/toolbar/toolbar.d.ts +1 -0
- package/src/toolbar/toolbar.js +47 -13
|
@@ -1222,6 +1222,7 @@ var MenuBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
1222
1222
|
_this.navIdx = [];
|
|
1223
1223
|
_this.animation = new Animation({});
|
|
1224
1224
|
_this.isTapHold = false;
|
|
1225
|
+
_this.isGeneratedElement = false;
|
|
1225
1226
|
_this.tempItem = [];
|
|
1226
1227
|
_this.showSubMenuOn = 'Auto';
|
|
1227
1228
|
_this.isOpenCalled = false;
|
|
@@ -1268,6 +1269,7 @@ var MenuBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
1268
1269
|
var ele = this.element;
|
|
1269
1270
|
var ejInstance = getValue('ej2_instances', ele);
|
|
1270
1271
|
var ul = this.createElement('ul');
|
|
1272
|
+
this.isGeneratedElement = true;
|
|
1271
1273
|
var wrapper = this.createElement('EJS-MENU', { className: 'e-' + this.getModuleName() + '-wrapper' });
|
|
1272
1274
|
for (var idx = 0, len = ele.attributes.length; idx < len; idx++) {
|
|
1273
1275
|
ul.setAttribute(ele.attributes[idx].nodeName, ele.attributes[idx].nodeValue);
|
|
@@ -3723,7 +3725,9 @@ var MenuBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
3723
3725
|
this.element.innerHTML = '';
|
|
3724
3726
|
}
|
|
3725
3727
|
this.removeAttributes();
|
|
3726
|
-
wrapper.parentNode
|
|
3728
|
+
if (wrapper && wrapper.parentNode && !this.isGeneratedElement) {
|
|
3729
|
+
wrapper.parentNode.insertBefore(this.element, wrapper);
|
|
3730
|
+
}
|
|
3727
3731
|
this.clonedElement = null;
|
|
3728
3732
|
}
|
|
3729
3733
|
if (this.popupObj) {
|
|
@@ -3755,6 +3759,9 @@ var MenuBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
3755
3759
|
if (this.template) {
|
|
3756
3760
|
this.clearTemplate(['template']);
|
|
3757
3761
|
}
|
|
3762
|
+
if (this.element && !this.element.classList.length) {
|
|
3763
|
+
this.element.removeAttribute('class');
|
|
3764
|
+
}
|
|
3758
3765
|
}
|
|
3759
3766
|
this.rippleFn = null;
|
|
3760
3767
|
};
|
|
@@ -4256,10 +4263,15 @@ var Toolbar = /** @__PURE__ @class */ (function (_super) {
|
|
|
4256
4263
|
return;
|
|
4257
4264
|
}
|
|
4258
4265
|
if (rootEle === trgt) {
|
|
4259
|
-
this.
|
|
4266
|
+
if (this.isDropDownList(clst.firstElementChild)) {
|
|
4267
|
+
this.eleFocus(clst, 'next', true);
|
|
4268
|
+
}
|
|
4269
|
+
else {
|
|
4270
|
+
this.elementFocus(clst);
|
|
4271
|
+
}
|
|
4260
4272
|
}
|
|
4261
4273
|
else if (!navChk) {
|
|
4262
|
-
this.eleFocus(clst, 'next');
|
|
4274
|
+
this.eleFocus(clst, 'next', true);
|
|
4263
4275
|
}
|
|
4264
4276
|
break;
|
|
4265
4277
|
case 'moveLeft':
|
|
@@ -4267,7 +4279,7 @@ var Toolbar = /** @__PURE__ @class */ (function (_super) {
|
|
|
4267
4279
|
return;
|
|
4268
4280
|
}
|
|
4269
4281
|
if (!navChk) {
|
|
4270
|
-
this.eleFocus(clst, 'previous');
|
|
4282
|
+
this.eleFocus(clst, 'previous', true);
|
|
4271
4283
|
}
|
|
4272
4284
|
break;
|
|
4273
4285
|
case 'home':
|
|
@@ -4458,12 +4470,14 @@ var Toolbar = /** @__PURE__ @class */ (function (_super) {
|
|
|
4458
4470
|
}
|
|
4459
4471
|
return element;
|
|
4460
4472
|
};
|
|
4461
|
-
Toolbar.prototype.eleFocus = function (closest, pos) {
|
|
4473
|
+
Toolbar.prototype.eleFocus = function (closest, pos, skipDropDownList) {
|
|
4474
|
+
if (skipDropDownList === void 0) { skipDropDownList = false; }
|
|
4462
4475
|
var sib = Object(closest)[pos + 'ElementSibling'];
|
|
4463
4476
|
if (sib) {
|
|
4464
|
-
var skipEle = this.eleContains(sib)
|
|
4477
|
+
var skipEle = this.eleContains(sib) ||
|
|
4478
|
+
(skipDropDownList && this.isDropDownList(sib.firstElementChild));
|
|
4465
4479
|
if (skipEle) {
|
|
4466
|
-
this.eleFocus(sib, pos);
|
|
4480
|
+
this.eleFocus(sib, pos, skipDropDownList);
|
|
4467
4481
|
return;
|
|
4468
4482
|
}
|
|
4469
4483
|
this.elementFocus(sib);
|
|
@@ -4476,8 +4490,8 @@ var Toolbar = /** @__PURE__ @class */ (function (_super) {
|
|
|
4476
4490
|
if (!isNullOrUndefined(elem) && elem.children.length > 0) {
|
|
4477
4491
|
if (pos === 'next') {
|
|
4478
4492
|
var el = elem.querySelector('.' + CLS_ITEM);
|
|
4479
|
-
if (this.eleContains(el)) {
|
|
4480
|
-
this.eleFocus(el, pos);
|
|
4493
|
+
if (this.eleContains(el) || (skipDropDownList && this.isDropDownList(el.firstElementChild))) {
|
|
4494
|
+
this.eleFocus(el, pos, skipDropDownList);
|
|
4481
4495
|
}
|
|
4482
4496
|
else {
|
|
4483
4497
|
el.firstElementChild.focus();
|
|
@@ -4486,8 +4500,8 @@ var Toolbar = /** @__PURE__ @class */ (function (_super) {
|
|
|
4486
4500
|
}
|
|
4487
4501
|
else {
|
|
4488
4502
|
var el = elem.lastElementChild;
|
|
4489
|
-
if (this.eleContains(el)) {
|
|
4490
|
-
this.eleFocus(el, pos);
|
|
4503
|
+
if (this.eleContains(el) || (skipDropDownList && this.isDropDownList(el.firstElementChild))) {
|
|
4504
|
+
this.eleFocus(el, pos, skipDropDownList);
|
|
4491
4505
|
}
|
|
4492
4506
|
else {
|
|
4493
4507
|
this.elementFocus(el);
|
|
@@ -4498,10 +4512,24 @@ var Toolbar = /** @__PURE__ @class */ (function (_super) {
|
|
|
4498
4512
|
else if (!isNullOrUndefined(closest)) {
|
|
4499
4513
|
var tbrItems = this.element.querySelectorAll('.' + CLS_ITEMS + ' .' + CLS_ITEM + ':not(.' + CLS_SEPARATOR + ')' + ':not(.' + CLS_DISABLE$2 + ')' + ':not(.' + CLS_HIDDEN + ')');
|
|
4500
4514
|
if (pos === 'next' && tbrItems) {
|
|
4501
|
-
|
|
4515
|
+
var index = 0;
|
|
4516
|
+
while (skipDropDownList && index < tbrItems.length &&
|
|
4517
|
+
this.isDropDownList(tbrItems[index].firstElementChild)) {
|
|
4518
|
+
index++;
|
|
4519
|
+
}
|
|
4520
|
+
if (index < tbrItems.length) {
|
|
4521
|
+
this.elementFocus(tbrItems[index]);
|
|
4522
|
+
}
|
|
4502
4523
|
}
|
|
4503
4524
|
else if (pos === 'previous' && tbrItems) {
|
|
4504
|
-
|
|
4525
|
+
var index = tbrItems.length - 1;
|
|
4526
|
+
while (skipDropDownList && index >= 0 &&
|
|
4527
|
+
this.isDropDownList(tbrItems[index].firstElementChild)) {
|
|
4528
|
+
index--;
|
|
4529
|
+
}
|
|
4530
|
+
if (index >= 0) {
|
|
4531
|
+
this.elementFocus(tbrItems[index]);
|
|
4532
|
+
}
|
|
4505
4533
|
}
|
|
4506
4534
|
}
|
|
4507
4535
|
};
|
|
@@ -5848,7 +5876,9 @@ var Toolbar = /** @__PURE__ @class */ (function (_super) {
|
|
|
5848
5876
|
this.add(innerEle, CLS_TEMPLATE);
|
|
5849
5877
|
var firstChild = innerEle.firstElementChild;
|
|
5850
5878
|
if (!isNullOrUndefined(firstChild)) {
|
|
5851
|
-
|
|
5879
|
+
if (!this.isDropDownList(firstChild)) {
|
|
5880
|
+
firstChild.setAttribute('tabindex', isNullOrUndefined(firstChild.getAttribute('tabIndex')) ? '-1' : this.getDataTabindex(firstChild));
|
|
5881
|
+
}
|
|
5852
5882
|
firstChild.setAttribute('data-tabindex', isNullOrUndefined(firstChild.getAttribute('tabIndex')) ? '-1' : this.getDataTabindex(firstChild));
|
|
5853
5883
|
}
|
|
5854
5884
|
this.tbarEle.push(innerEle);
|
|
@@ -5966,6 +5996,17 @@ var Toolbar = /** @__PURE__ @class */ (function (_super) {
|
|
|
5966
5996
|
Toolbar.prototype.getDataTabindex = function (ele) {
|
|
5967
5997
|
return isNullOrUndefined(ele.getAttribute('data-tabindex')) ? '-1' : ele.getAttribute('data-tabindex');
|
|
5968
5998
|
};
|
|
5999
|
+
Toolbar.prototype.isDropDownList = function (ele) {
|
|
6000
|
+
if (isNullOrUndefined(ele)) {
|
|
6001
|
+
return false;
|
|
6002
|
+
}
|
|
6003
|
+
var input = ele.querySelector('input.e-control');
|
|
6004
|
+
if (isNullOrUndefined(input) || isNullOrUndefined(input.ej2_instances) || isNullOrUndefined(input.ej2_instances[0])) {
|
|
6005
|
+
return false;
|
|
6006
|
+
}
|
|
6007
|
+
var instance = input.ej2_instances[0];
|
|
6008
|
+
return instance.getModuleName() === 'dropdownlist';
|
|
6009
|
+
};
|
|
5969
6010
|
Toolbar.prototype.itemClick = function (e) {
|
|
5970
6011
|
this.activeEleSwitch(e.currentTarget);
|
|
5971
6012
|
};
|