@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
package/dist/global/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* filename: index.d.ts
|
|
3
|
-
* version : 35.1.
|
|
3
|
+
* version : 35.1.43
|
|
4
4
|
* Copyright Syncfusion Inc. 2001 - 2025. All rights reserved.
|
|
5
5
|
* Use of this code is subject to the terms of our license.
|
|
6
6
|
* A copy of the current license can be obtained at any time by e-mailing
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@syncfusion/ej2-navigations",
|
|
3
|
-
"version": "35.1.
|
|
3
|
+
"version": "35.1.43",
|
|
4
4
|
"description": "A package of Essential JS 2 navigation components such as Tree-view, Tab, Toolbar, Context-menu, and Accordion which is used to navigate from one page to another",
|
|
5
5
|
"author": "Syncfusion Inc.",
|
|
6
6
|
"license": "SEE LICENSE IN license",
|
|
@@ -9,12 +9,12 @@
|
|
|
9
9
|
"es2015": "./dist/es6/ej2-navigations.es5.js",
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"@syncfusion/ej2-base": "~35.1.37",
|
|
12
|
-
"@syncfusion/ej2-buttons": "~35.1.
|
|
12
|
+
"@syncfusion/ej2-buttons": "~35.1.41",
|
|
13
13
|
"@syncfusion/ej2-data": "~35.1.37",
|
|
14
|
-
"@syncfusion/ej2-inputs": "~35.1.
|
|
15
|
-
"@syncfusion/ej2-lists": "~35.1.
|
|
14
|
+
"@syncfusion/ej2-inputs": "~35.1.43",
|
|
15
|
+
"@syncfusion/ej2-lists": "~35.1.43",
|
|
16
16
|
"@syncfusion/ej2-notifications": "~35.1.37",
|
|
17
|
-
"@syncfusion/ej2-popups": "~35.1.
|
|
17
|
+
"@syncfusion/ej2-popups": "~35.1.42"
|
|
18
18
|
},
|
|
19
19
|
"devDependencies": {},
|
|
20
20
|
"keywords": [
|
package/src/common/menu-base.js
CHANGED
|
@@ -603,7 +603,7 @@ var MenuBase = /** @class */ (function (_super) {
|
|
|
603
603
|
var popups_1 = [];
|
|
604
604
|
var allPopup = selectAll('.' + POPUP);
|
|
605
605
|
allPopup.forEach(function (elem) {
|
|
606
|
-
if (_this.element.id === elem.id.split('-')[2] ||
|
|
606
|
+
if (_this.element.id === elem.id.split('-')[2] || (_this.element.id.includes('-') && elem.id.includes(_this.element.id))) {
|
|
607
607
|
popups_1.push(elem);
|
|
608
608
|
}
|
|
609
609
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Component, EventHandler, Property, Event, EmitType, BaseEventArgs } from '@syncfusion/ej2-base';import { addClass, removeClass, isVisible, closest, attributes, detach, classList, KeyboardEvents } from '@syncfusion/ej2-base';import { selectAll, setStyleAttribute as setStyle, KeyboardEventArgs, select } from '@syncfusion/ej2-base';import { isNullOrUndefined as isNOU, getUniqueID, formatUnit, Collection, compile as templateCompiler } from '@syncfusion/ej2-base';import { INotifyPropertyChanged, NotifyPropertyChanges, ChildProperty, Browser, SanitizeHtmlHelper } from '@syncfusion/ej2-base';import { Popup } from '@syncfusion/ej2-popups';import { calculatePosition } from '@syncfusion/ej2-popups';import { Button, IconPosition } from '@syncfusion/ej2-buttons';import { HScroll } from '../common/h-scroll';import { VScroll } from '../common/v-scroll';
|
|
1
|
+
import { Component, EventHandler, Property, Event, EmitType, BaseEventArgs, L10n } from '@syncfusion/ej2-base';import { addClass, removeClass, isVisible, closest, attributes, detach, classList, KeyboardEvents } from '@syncfusion/ej2-base';import { selectAll, setStyleAttribute as setStyle, KeyboardEventArgs, select } from '@syncfusion/ej2-base';import { isNullOrUndefined as isNOU, getUniqueID, formatUnit, Collection, compile as templateCompiler } from '@syncfusion/ej2-base';import { INotifyPropertyChanged, NotifyPropertyChanges, ChildProperty, Browser, SanitizeHtmlHelper } from '@syncfusion/ej2-base';import { Popup } from '@syncfusion/ej2-popups';import { calculatePosition } from '@syncfusion/ej2-popups';import { Button, IconPosition } from '@syncfusion/ej2-buttons';import { HScroll } from '../common/h-scroll';import { VScroll } from '../common/v-scroll';
|
|
2
2
|
import {OverflowOption,ItemType,DisplayMode,ItemAlign,ClickEventArgs,OverflowMode,BeforeCreateArgs,KeyDownEventArgs} from "./toolbar";
|
|
3
3
|
import {ComponentModel} from '@syncfusion/ej2-base';
|
|
4
4
|
|
package/src/toolbar/toolbar.d.ts
CHANGED
|
@@ -266,6 +266,7 @@ export declare class Toolbar extends Component<HTMLElement> implements INotifyPr
|
|
|
266
266
|
private tempId;
|
|
267
267
|
private isExtendedOpen;
|
|
268
268
|
private popupTriggeredByToolbar;
|
|
269
|
+
private l10n;
|
|
269
270
|
private clickEvent;
|
|
270
271
|
private scrollEvent;
|
|
271
272
|
private resizeContext;
|
|
@@ -507,6 +508,7 @@ export declare class Toolbar extends Component<HTMLElement> implements INotifyPr
|
|
|
507
508
|
private buttonRendering;
|
|
508
509
|
private renderSubComponent;
|
|
509
510
|
private getDataTabindex;
|
|
511
|
+
private isDropDownList;
|
|
510
512
|
private itemClick;
|
|
511
513
|
private activeEleSwitch;
|
|
512
514
|
private activeEleRemove;
|
package/src/toolbar/toolbar.js
CHANGED
|
@@ -18,7 +18,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
18
18
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
19
19
|
};
|
|
20
20
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
21
|
-
import { Component, EventHandler, Property, Event } from '@syncfusion/ej2-base';
|
|
21
|
+
import { Component, EventHandler, Property, Event, L10n } from '@syncfusion/ej2-base';
|
|
22
22
|
import { addClass, removeClass, isVisible, closest, attributes, detach, classList, KeyboardEvents } from '@syncfusion/ej2-base';
|
|
23
23
|
import { selectAll, setStyleAttribute as setStyle, select } from '@syncfusion/ej2-base';
|
|
24
24
|
import { isNullOrUndefined as isNOU, getUniqueID, formatUnit, Collection, compile as templateCompiler } from '@syncfusion/ej2-base';
|
|
@@ -252,6 +252,8 @@ var Toolbar = /** @class */ (function (_super) {
|
|
|
252
252
|
this.isVertical = this.element.classList.contains(CLS_VERTICAL) ? true : false;
|
|
253
253
|
this.isExtendedOpen = false;
|
|
254
254
|
this.popupPriCount = 0;
|
|
255
|
+
var localeText = { overflow: 'overflow' };
|
|
256
|
+
this.l10n = new L10n(this.getModuleName(), localeText, this.locale);
|
|
255
257
|
if (this.enableRtl) {
|
|
256
258
|
this.add(this.element, CLS_RTL);
|
|
257
259
|
}
|
|
@@ -446,10 +448,15 @@ var Toolbar = /** @class */ (function (_super) {
|
|
|
446
448
|
return;
|
|
447
449
|
}
|
|
448
450
|
if (rootEle === trgt) {
|
|
449
|
-
this.
|
|
451
|
+
if (this.isDropDownList(clst.firstElementChild)) {
|
|
452
|
+
this.eleFocus(clst, 'next', true);
|
|
453
|
+
}
|
|
454
|
+
else {
|
|
455
|
+
this.elementFocus(clst);
|
|
456
|
+
}
|
|
450
457
|
}
|
|
451
458
|
else if (!navChk) {
|
|
452
|
-
this.eleFocus(clst, 'next');
|
|
459
|
+
this.eleFocus(clst, 'next', true);
|
|
453
460
|
}
|
|
454
461
|
break;
|
|
455
462
|
case 'moveLeft':
|
|
@@ -457,7 +464,7 @@ var Toolbar = /** @class */ (function (_super) {
|
|
|
457
464
|
return;
|
|
458
465
|
}
|
|
459
466
|
if (!navChk) {
|
|
460
|
-
this.eleFocus(clst, 'previous');
|
|
467
|
+
this.eleFocus(clst, 'previous', true);
|
|
461
468
|
}
|
|
462
469
|
break;
|
|
463
470
|
case 'home':
|
|
@@ -648,12 +655,14 @@ var Toolbar = /** @class */ (function (_super) {
|
|
|
648
655
|
}
|
|
649
656
|
return element;
|
|
650
657
|
};
|
|
651
|
-
Toolbar.prototype.eleFocus = function (closest, pos) {
|
|
658
|
+
Toolbar.prototype.eleFocus = function (closest, pos, skipDropDownList) {
|
|
659
|
+
if (skipDropDownList === void 0) { skipDropDownList = false; }
|
|
652
660
|
var sib = Object(closest)[pos + 'ElementSibling'];
|
|
653
661
|
if (sib) {
|
|
654
|
-
var skipEle = this.eleContains(sib)
|
|
662
|
+
var skipEle = this.eleContains(sib) ||
|
|
663
|
+
(skipDropDownList && this.isDropDownList(sib.firstElementChild));
|
|
655
664
|
if (skipEle) {
|
|
656
|
-
this.eleFocus(sib, pos);
|
|
665
|
+
this.eleFocus(sib, pos, skipDropDownList);
|
|
657
666
|
return;
|
|
658
667
|
}
|
|
659
668
|
this.elementFocus(sib);
|
|
@@ -666,8 +675,8 @@ var Toolbar = /** @class */ (function (_super) {
|
|
|
666
675
|
if (!isNOU(elem) && elem.children.length > 0) {
|
|
667
676
|
if (pos === 'next') {
|
|
668
677
|
var el = elem.querySelector('.' + CLS_ITEM);
|
|
669
|
-
if (this.eleContains(el)) {
|
|
670
|
-
this.eleFocus(el, pos);
|
|
678
|
+
if (this.eleContains(el) || (skipDropDownList && this.isDropDownList(el.firstElementChild))) {
|
|
679
|
+
this.eleFocus(el, pos, skipDropDownList);
|
|
671
680
|
}
|
|
672
681
|
else {
|
|
673
682
|
el.firstElementChild.focus();
|
|
@@ -676,8 +685,8 @@ var Toolbar = /** @class */ (function (_super) {
|
|
|
676
685
|
}
|
|
677
686
|
else {
|
|
678
687
|
var el = elem.lastElementChild;
|
|
679
|
-
if (this.eleContains(el)) {
|
|
680
|
-
this.eleFocus(el, pos);
|
|
688
|
+
if (this.eleContains(el) || (skipDropDownList && this.isDropDownList(el.firstElementChild))) {
|
|
689
|
+
this.eleFocus(el, pos, skipDropDownList);
|
|
681
690
|
}
|
|
682
691
|
else {
|
|
683
692
|
this.elementFocus(el);
|
|
@@ -688,10 +697,24 @@ var Toolbar = /** @class */ (function (_super) {
|
|
|
688
697
|
else if (!isNOU(closest)) {
|
|
689
698
|
var tbrItems = this.element.querySelectorAll('.' + CLS_ITEMS + ' .' + CLS_ITEM + ':not(.' + CLS_SEPARATOR + ')' + ':not(.' + CLS_DISABLE + ')' + ':not(.' + CLS_HIDDEN + ')');
|
|
690
699
|
if (pos === 'next' && tbrItems) {
|
|
691
|
-
|
|
700
|
+
var index = 0;
|
|
701
|
+
while (skipDropDownList && index < tbrItems.length &&
|
|
702
|
+
this.isDropDownList(tbrItems[index].firstElementChild)) {
|
|
703
|
+
index++;
|
|
704
|
+
}
|
|
705
|
+
if (index < tbrItems.length) {
|
|
706
|
+
this.elementFocus(tbrItems[index]);
|
|
707
|
+
}
|
|
692
708
|
}
|
|
693
709
|
else if (pos === 'previous' && tbrItems) {
|
|
694
|
-
|
|
710
|
+
var index = tbrItems.length - 1;
|
|
711
|
+
while (skipDropDownList && index >= 0 &&
|
|
712
|
+
this.isDropDownList(tbrItems[index].firstElementChild)) {
|
|
713
|
+
index--;
|
|
714
|
+
}
|
|
715
|
+
if (index >= 0) {
|
|
716
|
+
this.elementFocus(tbrItems[index]);
|
|
717
|
+
}
|
|
695
718
|
}
|
|
696
719
|
}
|
|
697
720
|
};
|
|
@@ -1028,7 +1051,7 @@ var Toolbar = /** @class */ (function (_super) {
|
|
|
1028
1051
|
this.createPopupEle(ele, [].slice.call(selectAll('.' + CLS_ITEMS + ' .' + CLS_ITEM, ele)));
|
|
1029
1052
|
var ariaAttr = {
|
|
1030
1053
|
'tabindex': '0', 'role': 'button', 'aria-haspopup': 'true',
|
|
1031
|
-
'aria-label': 'overflow'
|
|
1054
|
+
'aria-label': this.l10n.getConstant('overflow')
|
|
1032
1055
|
};
|
|
1033
1056
|
attributes(this.element.querySelector('.' + CLS_TBARNAV), ariaAttr);
|
|
1034
1057
|
};
|
|
@@ -2038,7 +2061,9 @@ var Toolbar = /** @class */ (function (_super) {
|
|
|
2038
2061
|
this.add(innerEle, CLS_TEMPLATE);
|
|
2039
2062
|
var firstChild = innerEle.firstElementChild;
|
|
2040
2063
|
if (!isNOU(firstChild)) {
|
|
2041
|
-
|
|
2064
|
+
if (!this.isDropDownList(firstChild)) {
|
|
2065
|
+
firstChild.setAttribute('tabindex', isNOU(firstChild.getAttribute('tabIndex')) ? '-1' : this.getDataTabindex(firstChild));
|
|
2066
|
+
}
|
|
2042
2067
|
firstChild.setAttribute('data-tabindex', isNOU(firstChild.getAttribute('tabIndex')) ? '-1' : this.getDataTabindex(firstChild));
|
|
2043
2068
|
}
|
|
2044
2069
|
this.tbarEle.push(innerEle);
|
|
@@ -2156,6 +2181,17 @@ var Toolbar = /** @class */ (function (_super) {
|
|
|
2156
2181
|
Toolbar.prototype.getDataTabindex = function (ele) {
|
|
2157
2182
|
return isNOU(ele.getAttribute('data-tabindex')) ? '-1' : ele.getAttribute('data-tabindex');
|
|
2158
2183
|
};
|
|
2184
|
+
Toolbar.prototype.isDropDownList = function (ele) {
|
|
2185
|
+
if (isNOU(ele)) {
|
|
2186
|
+
return false;
|
|
2187
|
+
}
|
|
2188
|
+
var input = ele.querySelector('input.e-control');
|
|
2189
|
+
if (isNOU(input) || isNOU(input.ej2_instances) || isNOU(input.ej2_instances[0])) {
|
|
2190
|
+
return false;
|
|
2191
|
+
}
|
|
2192
|
+
var instance = input.ej2_instances[0];
|
|
2193
|
+
return instance.getModuleName() === 'dropdownlist';
|
|
2194
|
+
};
|
|
2159
2195
|
Toolbar.prototype.itemClick = function (e) {
|
|
2160
2196
|
this.activeEleSwitch(e.currentTarget);
|
|
2161
2197
|
};
|