@syncfusion/ej2-navigations 20.3.60 → 20.4.38
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/.eslintrc.json +16 -1
- package/CHANGELOG.md +17 -0
- 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 +253 -205
- package/dist/es6/ej2-navigations.es2015.js.map +1 -1
- package/dist/es6/ej2-navigations.es5.js +250 -202
- 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 +11 -11
- package/src/accordion/accordion.js +20 -19
- package/src/appbar/appbar-model.d.ts +15 -15
- package/src/appbar/appbar.d.ts +15 -15
- package/src/appbar/appbar.js +3 -3
- package/src/breadcrumb/breadcrumb-model.d.ts +1 -1
- package/src/breadcrumb/breadcrumb.js +10 -5
- package/src/carousel/carousel.js +10 -10
- package/src/common/menu-base.js +9 -5
- package/src/menu/menu.js +2 -2
- package/src/sidebar/sidebar.d.ts +1 -0
- package/src/sidebar/sidebar.js +6 -2
- package/src/tab/tab-model.d.ts +9 -0
- package/src/tab/tab.d.ts +9 -0
- package/src/tab/tab.js +28 -18
- package/src/toolbar/toolbar-model.d.ts +9 -0
- package/src/toolbar/toolbar.d.ts +11 -0
- package/src/toolbar/toolbar.js +132 -123
- package/src/treeview/treeview-model.d.ts +133 -45
- package/src/treeview/treeview.d.ts +135 -48
- package/src/treeview/treeview.js +30 -14
- package/styles/accordion/_bootstrap-dark-definition.scss +100 -0
- package/styles/accordion/_bootstrap-definition.scss +100 -0
- package/styles/accordion/_bootstrap4-definition.scss +95 -1
- package/styles/accordion/_bootstrap5-definition.scss +99 -3
- package/styles/accordion/_fabric-dark-definition.scss +100 -0
- package/styles/accordion/_fabric-definition.scss +100 -0
- package/styles/accordion/_fluent-definition.scss +98 -2
- package/styles/accordion/_fusionnew-definition.scss +99 -3
- package/styles/accordion/_highcontrast-definition.scss +98 -3
- package/styles/accordion/_highcontrast-light-definition.scss +98 -3
- package/styles/accordion/_layout.scss +25 -91
- package/styles/accordion/_material-dark-definition.scss +100 -0
- package/styles/accordion/_material-definition.scss +100 -0
- package/styles/accordion/_material3-definition.scss +99 -3
- package/styles/accordion/_tailwind-definition.scss +99 -2
- package/styles/accordion/_theme.scss +184 -345
- package/styles/accordion/bootstrap-dark.css +202 -16
- package/styles/accordion/bootstrap.css +202 -16
- package/styles/accordion/bootstrap4.css +171 -17
- package/styles/accordion/bootstrap5-dark.css +202 -13
- package/styles/accordion/bootstrap5.css +202 -13
- package/styles/accordion/fabric-dark.css +209 -11
- package/styles/accordion/fabric.css +209 -11
- package/styles/accordion/fluent-dark.css +217 -5
- package/styles/accordion/fluent.css +217 -5
- package/styles/accordion/highcontrast-light.css +186 -52
- package/styles/accordion/highcontrast.css +186 -52
- package/styles/accordion/material-dark.css +210 -16
- package/styles/accordion/material.css +209 -15
- package/styles/accordion/tailwind-dark.css +199 -8
- package/styles/accordion/tailwind.css +199 -8
- package/styles/bootstrap-dark.css +999 -145
- package/styles/bootstrap.css +986 -132
- package/styles/bootstrap4.css +888 -167
- package/styles/bootstrap5-dark.css +949 -179
- package/styles/bootstrap5.css +949 -179
- package/styles/context-menu/_layout.scss +0 -3
- package/styles/context-menu/bootstrap5-dark.css +0 -1
- package/styles/context-menu/bootstrap5.css +0 -1
- package/styles/context-menu/fluent-dark.css +0 -1
- package/styles/context-menu/fluent.css +0 -1
- package/styles/context-menu/tailwind-dark.css +0 -1
- package/styles/context-menu/tailwind.css +0 -1
- package/styles/fabric-dark.css +1068 -232
- package/styles/fabric.css +1067 -231
- package/styles/fluent-dark.css +1014 -123
- package/styles/fluent.css +1012 -121
- package/styles/h-scroll/_bootstrap-dark-definition.scss +8 -0
- package/styles/h-scroll/_bootstrap-definition.scss +8 -0
- package/styles/h-scroll/_bootstrap4-definition.scss +8 -0
- package/styles/h-scroll/_bootstrap5-definition.scss +8 -0
- package/styles/h-scroll/_fabric-dark-definition.scss +8 -0
- package/styles/h-scroll/_fabric-definition.scss +8 -0
- package/styles/h-scroll/_fluent-definition.scss +8 -0
- package/styles/h-scroll/_fusionnew-definition.scss +8 -0
- package/styles/h-scroll/_highcontrast-definition.scss +6 -1
- package/styles/h-scroll/_highcontrast-light-definition.scss +6 -1
- package/styles/h-scroll/_layout.scss +1 -4
- package/styles/h-scroll/_material-dark-definition.scss +8 -0
- package/styles/h-scroll/_material-definition.scss +8 -0
- package/styles/h-scroll/_material3-definition.scss +8 -0
- package/styles/h-scroll/_tailwind-definition.scss +8 -0
- package/styles/h-scroll/_theme.scss +12 -40
- package/styles/h-scroll/bootstrap-dark.css +13 -0
- package/styles/h-scroll/bootstrap.css +13 -0
- package/styles/h-scroll/bootstrap4.css +7 -0
- package/styles/h-scroll/bootstrap5-dark.css +12 -0
- package/styles/h-scroll/bootstrap5.css +12 -0
- package/styles/h-scroll/fabric-dark.css +15 -2
- package/styles/h-scroll/fabric.css +15 -2
- package/styles/h-scroll/fluent-dark.css +13 -0
- package/styles/h-scroll/fluent.css +13 -0
- package/styles/h-scroll/highcontrast-light.css +8 -7
- package/styles/h-scroll/highcontrast.css +10 -9
- package/styles/h-scroll/icons/_fabric-dark.scss +2 -2
- package/styles/h-scroll/icons/_fabric.scss +2 -2
- package/styles/h-scroll/icons/_highcontrast.scss +2 -2
- package/styles/h-scroll/material-dark.css +13 -2
- package/styles/h-scroll/material.css +13 -2
- package/styles/h-scroll/tailwind-dark.css +12 -0
- package/styles/h-scroll/tailwind.css +12 -0
- package/styles/highcontrast-light.css +918 -369
- package/styles/highcontrast.css +925 -370
- package/styles/material-dark.css +1184 -114
- package/styles/material.css +1162 -92
- package/styles/menu/_theme.scss +1 -1
- package/styles/menu/fluent-dark.css +1 -1
- package/styles/menu/fluent.css +1 -1
- package/styles/tab/_bootstrap-dark-definition.scss +271 -15
- package/styles/tab/_bootstrap-definition.scss +266 -9
- package/styles/tab/_bootstrap4-definition.scss +266 -9
- package/styles/tab/_bootstrap5-definition.scss +270 -13
- package/styles/tab/_fabric-dark-definition.scss +270 -13
- package/styles/tab/_fabric-definition.scss +270 -13
- package/styles/tab/_fluent-definition.scss +269 -12
- package/styles/tab/_fusionnew-definition.scss +268 -11
- package/styles/tab/_highcontrast-definition.scss +271 -14
- package/styles/tab/_highcontrast-light-definition.scss +271 -14
- package/styles/tab/_layout.scss +295 -988
- package/styles/tab/_material-dark-definition.scss +266 -9
- package/styles/tab/_material-definition.scss +266 -9
- package/styles/tab/_material3-definition.scss +268 -11
- package/styles/tab/_tailwind-definition.scss +267 -10
- package/styles/tab/_theme.scss +305 -843
- package/styles/tab/bootstrap-dark.css +587 -109
- package/styles/tab/bootstrap.css +574 -96
- package/styles/tab/bootstrap4.css +546 -114
- package/styles/tab/bootstrap5-dark.css +523 -134
- package/styles/tab/bootstrap5.css +523 -134
- package/styles/tab/fabric-dark.css +614 -199
- package/styles/tab/fabric.css +612 -197
- package/styles/tab/fluent-dark.css +546 -102
- package/styles/tab/fluent.css +546 -102
- package/styles/tab/highcontrast-light.css +520 -250
- package/styles/tab/highcontrast.css +520 -244
- package/styles/tab/icons/_bootstrap-dark.scss +0 -33
- package/styles/tab/icons/_bootstrap.scss +0 -33
- package/styles/tab/icons/_bootstrap4.scss +0 -26
- package/styles/tab/icons/_bootstrap5.scss +0 -37
- package/styles/tab/icons/_fabric-dark.scss +0 -33
- package/styles/tab/icons/_fabric.scss +0 -33
- package/styles/tab/icons/_fluent.scss +0 -33
- package/styles/tab/icons/_fusionnew.scss +0 -37
- package/styles/tab/icons/_highcontrast-light.scss +0 -37
- package/styles/tab/icons/_highcontrast.scss +0 -26
- package/styles/tab/icons/_material-dark.scss +0 -37
- package/styles/tab/icons/_material.scss +0 -37
- package/styles/tab/icons/_material3.scss +0 -37
- package/styles/tab/icons/_tailwind.scss +0 -37
- package/styles/tab/material-dark.css +705 -54
- package/styles/tab/material.css +705 -54
- package/styles/tab/tailwind-dark.css +706 -71
- package/styles/tab/tailwind.css +706 -71
- package/styles/tailwind-dark.css +1145 -99
- package/styles/tailwind.css +1144 -98
- package/styles/toolbar/_bootstrap-dark-definition.scss +93 -0
- package/styles/toolbar/_bootstrap-definition.scss +93 -0
- package/styles/toolbar/_bootstrap4-definition.scss +94 -1
- package/styles/toolbar/_bootstrap5-definition.scss +94 -8
- package/styles/toolbar/_fabric-dark-definition.scss +92 -3
- package/styles/toolbar/_fabric-definition.scss +92 -3
- package/styles/toolbar/_fluent-definition.scss +96 -8
- package/styles/toolbar/_fusionnew-definition.scss +94 -8
- package/styles/toolbar/_highcontrast-definition.scss +93 -4
- package/styles/toolbar/_highcontrast-light-definition.scss +93 -4
- package/styles/toolbar/_layout.scss +48 -177
- package/styles/toolbar/_material-dark-definition.scss +93 -0
- package/styles/toolbar/_material-definition.scss +93 -0
- package/styles/toolbar/_material3-definition.scss +94 -8
- package/styles/toolbar/_tailwind-definition.scss +94 -6
- package/styles/toolbar/_theme.scss +169 -278
- package/styles/toolbar/bootstrap-dark.css +196 -19
- package/styles/toolbar/bootstrap.css +196 -19
- package/styles/toolbar/bootstrap4.css +164 -36
- package/styles/toolbar/bootstrap5-dark.css +210 -29
- package/styles/toolbar/bootstrap5.css +210 -29
- package/styles/toolbar/fabric-dark.css +219 -9
- package/styles/toolbar/fabric.css +220 -10
- package/styles/toolbar/fluent-dark.css +233 -10
- package/styles/toolbar/fluent.css +233 -10
- package/styles/toolbar/highcontrast-light.css +199 -43
- package/styles/toolbar/highcontrast.css +200 -44
- package/styles/toolbar/material-dark.css +233 -19
- package/styles/toolbar/material.css +233 -19
- package/styles/toolbar/tailwind-dark.css +224 -15
- package/styles/toolbar/tailwind.css +223 -14
- package/styles/treeview/_material-definition.scss +1 -1
- package/styles/treeview/_theme.scss +11 -1
- package/styles/treeview/fluent-dark.css +2 -2
- package/styles/treeview/material.css +2 -2
- package/styles/treeview/tailwind.css +2 -2
- package/styles/v-scroll/_highcontrast-definition.scss +0 -1
- package/styles/v-scroll/_highcontrast-light-definition.scss +0 -1
- package/styles/v-scroll/_theme.scss +0 -26
- package/styles/v-scroll/bootstrap5-dark.css +2 -2
- package/styles/v-scroll/bootstrap5.css +2 -2
- package/styles/v-scroll/fabric-dark.css +2 -2
- package/styles/v-scroll/fabric.css +2 -2
- package/styles/v-scroll/fluent-dark.css +2 -2
- package/styles/v-scroll/fluent.css +2 -2
- package/styles/v-scroll/highcontrast-light.css +2 -14
- package/styles/v-scroll/highcontrast.css +2 -14
- package/styles/v-scroll/icons/_bootstrap5.scss +2 -2
- package/styles/v-scroll/icons/_fabric-dark.scss +2 -2
- package/styles/v-scroll/icons/_fabric.scss +2 -2
- package/styles/v-scroll/icons/_fluent.scss +2 -2
- package/styles/v-scroll/icons/_fusionnew.scss +2 -2
- package/styles/v-scroll/icons/_highcontrast-light.scss +2 -2
- package/styles/v-scroll/icons/_highcontrast.scss +2 -2
- package/styles/v-scroll/icons/_material3.scss +2 -2
- package/styles/v-scroll/icons/_tailwind.scss +2 -2
- package/styles/v-scroll/tailwind-dark.css +2 -2
- package/styles/v-scroll/tailwind.css +2 -2
|
@@ -1198,6 +1198,7 @@ let MenuBase = class MenuBase extends Component {
|
|
|
1198
1198
|
this.wireEvents();
|
|
1199
1199
|
this.renderComplete();
|
|
1200
1200
|
const wrapper = this.getWrapper();
|
|
1201
|
+
// eslint-disable-next-line
|
|
1201
1202
|
if (this.template && this.enableScrolling && (this.isReact || this.isAngular)) {
|
|
1202
1203
|
requestAnimationFrame(() => {
|
|
1203
1204
|
addScrolling(this.createElement, wrapper, this.element, 'hscroll', this.enableRtl);
|
|
@@ -1579,6 +1580,7 @@ let MenuBase = class MenuBase extends Component {
|
|
|
1579
1580
|
this.isCMenu = false;
|
|
1580
1581
|
}
|
|
1581
1582
|
if (this.isMenu && trgtpopUp && popupId.length) {
|
|
1583
|
+
// eslint-disable-next-line
|
|
1582
1584
|
trgtliId = new RegExp('(.*)-ej2menu-' + this.element.id + '-popup').exec(popupId)[1];
|
|
1583
1585
|
closedLi = trgtpopUp.querySelector('[id="' + trgtliId + '"]');
|
|
1584
1586
|
trgtLi = (liElem && trgtpopUp.querySelector('[id="' + liElem.id + '"]'));
|
|
@@ -1587,7 +1589,7 @@ let MenuBase = class MenuBase extends Component {
|
|
|
1587
1589
|
if (isOpen && this.hamburgerMode && ulIndex && !(submenus.length)) {
|
|
1588
1590
|
this.afterCloseMenu(e);
|
|
1589
1591
|
}
|
|
1590
|
-
else if (isOpen && !this.hamburgerMode && this.navIdx.length && closedLi && !trgtLi && this.keyType !==
|
|
1592
|
+
else if (isOpen && !this.hamburgerMode && this.navIdx.length && closedLi && !trgtLi && this.keyType !== 'left') {
|
|
1591
1593
|
let ele = (e && e.target.classList.contains('e-vscroll'))
|
|
1592
1594
|
? closest(e.target, '.e-menu-wrapper') : null;
|
|
1593
1595
|
if (ele) {
|
|
@@ -1628,7 +1630,7 @@ let MenuBase = class MenuBase extends Component {
|
|
|
1628
1630
|
if (sli) {
|
|
1629
1631
|
sli.setAttribute('aria-expanded', 'false');
|
|
1630
1632
|
sli.classList.remove(SELECTED);
|
|
1631
|
-
if (observedCloseArgs.isFocused && liElem || this.keyType ===
|
|
1633
|
+
if (observedCloseArgs.isFocused && liElem || this.keyType === 'left') {
|
|
1632
1634
|
sli.classList.add(FOCUSED);
|
|
1633
1635
|
sli.focus();
|
|
1634
1636
|
}
|
|
@@ -1892,6 +1894,7 @@ let MenuBase = class MenuBase extends Component {
|
|
|
1892
1894
|
this.isNestedOrVertical ? this.left - this.popupWrapper.offsetWidth - this.lItem.parentElement.offsetWidth + 2
|
|
1893
1895
|
: this.left - this.popupWrapper.offsetWidth + this.lItem.offsetWidth;
|
|
1894
1896
|
}
|
|
1897
|
+
// eslint-disable-next-line
|
|
1895
1898
|
if (this.template && (this.isReact || this.isAngular)) {
|
|
1896
1899
|
requestAnimationFrame(() => {
|
|
1897
1900
|
this.collision();
|
|
@@ -2147,6 +2150,7 @@ let MenuBase = class MenuBase extends Component {
|
|
|
2147
2150
|
if (args.item.classList.contains('e-has-child')) {
|
|
2148
2151
|
args.item.classList.remove('e-has-child');
|
|
2149
2152
|
}
|
|
2153
|
+
args.item.removeAttribute('aria-level');
|
|
2150
2154
|
}
|
|
2151
2155
|
const eventArgs = { item: args.curData, element: args.item };
|
|
2152
2156
|
this.trigger('beforeItemRender', eventArgs);
|
|
@@ -2242,7 +2246,7 @@ let MenuBase = class MenuBase extends Component {
|
|
|
2242
2246
|
}
|
|
2243
2247
|
}
|
|
2244
2248
|
getField(propName, level = 0) {
|
|
2245
|
-
const fieldName = this.fields[propName];
|
|
2249
|
+
const fieldName = this.fields[`${propName}`];
|
|
2246
2250
|
return typeof fieldName === 'string' ? fieldName :
|
|
2247
2251
|
(!fieldName[level] ? fieldName[fieldName.length - 1].toString()
|
|
2248
2252
|
: fieldName[level].toString());
|
|
@@ -2259,7 +2263,7 @@ let MenuBase = class MenuBase extends Component {
|
|
|
2259
2263
|
}
|
|
2260
2264
|
hasField(items, field) {
|
|
2261
2265
|
for (let i = 0, len = items.length; i < len; i++) {
|
|
2262
|
-
if (items[i][field]) {
|
|
2266
|
+
if (items[i][`${field}`]) {
|
|
2263
2267
|
return true;
|
|
2264
2268
|
}
|
|
2265
2269
|
}
|
|
@@ -2636,7 +2640,7 @@ let MenuBase = class MenuBase extends Component {
|
|
|
2636
2640
|
else {
|
|
2637
2641
|
if (this.enableScrolling) {
|
|
2638
2642
|
const wrapper1 = this.getWrapper();
|
|
2639
|
-
|
|
2643
|
+
const ul1 = wrapper1.children[0];
|
|
2640
2644
|
if (this.element.classList.contains('e-vertical')) {
|
|
2641
2645
|
destroyScroll(getInstance(ul1, VScroll), ul1);
|
|
2642
2646
|
}
|
|
@@ -2789,7 +2793,7 @@ let MenuBase = class MenuBase extends Component {
|
|
|
2789
2793
|
else {
|
|
2790
2794
|
const ele = this.getWrapper().children[this.getIdx(this.getWrapper(), ul) - 1];
|
|
2791
2795
|
if (this.currentTarget) {
|
|
2792
|
-
if (!(this.currentTarget.classList.contains(
|
|
2796
|
+
if (!(this.currentTarget.classList.contains('e-numerictextbox') || this.currentTarget.classList.contains('e-textbox') || this.currentTarget.tagName === 'INPUT')) {
|
|
2793
2797
|
if (ele) {
|
|
2794
2798
|
ele.querySelector('.' + SELECTED).focus();
|
|
2795
2799
|
}
|
|
@@ -3302,6 +3306,9 @@ __decorate$3([
|
|
|
3302
3306
|
__decorate$3([
|
|
3303
3307
|
Event()
|
|
3304
3308
|
], Item.prototype, "click", void 0);
|
|
3309
|
+
__decorate$3([
|
|
3310
|
+
Property(-1)
|
|
3311
|
+
], Item.prototype, "tabIndex", void 0);
|
|
3305
3312
|
/**
|
|
3306
3313
|
* The Toolbar control contains a group of commands that are aligned horizontally.
|
|
3307
3314
|
* ```html
|
|
@@ -3382,7 +3389,7 @@ let Toolbar = class Toolbar extends Component {
|
|
|
3382
3389
|
removeClass([this.element], this.cssClass.split(' '));
|
|
3383
3390
|
}
|
|
3384
3391
|
this.element.removeAttribute('style');
|
|
3385
|
-
['aria-disabled', 'aria-orientation', '
|
|
3392
|
+
['aria-disabled', 'aria-orientation', 'role'].forEach((attrb) => this.element.removeAttribute(attrb));
|
|
3386
3393
|
super.destroy();
|
|
3387
3394
|
}
|
|
3388
3395
|
/**
|
|
@@ -3420,7 +3427,16 @@ let Toolbar = class Toolbar extends Component {
|
|
|
3420
3427
|
keyConfigs: this.keyConfigs
|
|
3421
3428
|
});
|
|
3422
3429
|
EventHandler.add(this.element, 'keydown', this.docKeyDown, this);
|
|
3423
|
-
this.
|
|
3430
|
+
this.updateTabIndex('0');
|
|
3431
|
+
}
|
|
3432
|
+
updateTabIndex(tabIndex) {
|
|
3433
|
+
const ele = this.element.querySelector('.' + CLS_ITEM + ':not(.' + CLS_DISABLE$2 + ' ):not(.' + CLS_SEPARATOR + ' ):not(.' + CLS_HIDDEN + ' )');
|
|
3434
|
+
if (!isNullOrUndefined(ele) && !isNullOrUndefined(ele.firstElementChild)) {
|
|
3435
|
+
const dataTabIndex = ele.firstElementChild.getAttribute('data-tabindex');
|
|
3436
|
+
if (dataTabIndex && dataTabIndex === '-1' && ele.firstElementChild.tagName !== 'INPUT') {
|
|
3437
|
+
ele.firstElementChild.setAttribute('tabindex', tabIndex);
|
|
3438
|
+
}
|
|
3439
|
+
}
|
|
3424
3440
|
}
|
|
3425
3441
|
unwireKeyboardEvent() {
|
|
3426
3442
|
if (this.keyModule) {
|
|
@@ -3624,7 +3640,6 @@ let Toolbar = class Toolbar extends Component {
|
|
|
3624
3640
|
this.activeEleRemove(ele);
|
|
3625
3641
|
ele.focus();
|
|
3626
3642
|
}
|
|
3627
|
-
this.element.removeAttribute('tabindex');
|
|
3628
3643
|
}
|
|
3629
3644
|
}
|
|
3630
3645
|
break;
|
|
@@ -3675,9 +3690,8 @@ let Toolbar = class Toolbar extends Component {
|
|
|
3675
3690
|
else {
|
|
3676
3691
|
rootEle.classList.remove(CLS_DISABLE$2);
|
|
3677
3692
|
}
|
|
3678
|
-
rootEle.setAttribute('tabindex', !value ? '0' : '-1');
|
|
3679
3693
|
if (this.activeEle) {
|
|
3680
|
-
this.activeEle.setAttribute('tabindex',
|
|
3694
|
+
this.activeEle.setAttribute('tabindex', this.activeEle.getAttribute('data-tabindex'));
|
|
3681
3695
|
}
|
|
3682
3696
|
if (this.scrollModule) {
|
|
3683
3697
|
this.scrollModule.disable(value);
|
|
@@ -3813,7 +3827,7 @@ let Toolbar = class Toolbar extends Component {
|
|
|
3813
3827
|
}
|
|
3814
3828
|
setStyleAttribute(this.element, { 'width': width });
|
|
3815
3829
|
const ariaAttr = {
|
|
3816
|
-
'role': 'toolbar', 'aria-disabled': 'false',
|
|
3830
|
+
'role': 'toolbar', 'aria-disabled': 'false',
|
|
3817
3831
|
'aria-orientation': !this.isVertical ? 'horizontal' : 'vertical'
|
|
3818
3832
|
};
|
|
3819
3833
|
attributes(this.element, ariaAttr);
|
|
@@ -3845,17 +3859,17 @@ let Toolbar = class Toolbar extends Component {
|
|
|
3845
3859
|
this.tbarEle = [];
|
|
3846
3860
|
}
|
|
3847
3861
|
for (let i = 0; i < items.length; i++) {
|
|
3848
|
-
innerItem = this.renderSubComponent(items[i], i);
|
|
3862
|
+
innerItem = this.renderSubComponent(items[parseInt(i.toString(), 10)], i);
|
|
3849
3863
|
if (this.tbarEle.indexOf(innerItem) === -1) {
|
|
3850
3864
|
this.tbarEle.push(innerItem);
|
|
3851
3865
|
}
|
|
3852
3866
|
if (!this.tbarAlign) {
|
|
3853
|
-
this.tbarItemAlign(items[i], itemEleDom, i);
|
|
3867
|
+
this.tbarItemAlign(items[parseInt(i.toString(), 10)], itemEleDom, i);
|
|
3854
3868
|
}
|
|
3855
|
-
innerPos = itemEleDom.querySelector('.e-toolbar-' + items[i].align.toLowerCase());
|
|
3869
|
+
innerPos = itemEleDom.querySelector('.e-toolbar-' + items[parseInt(i.toString(), 10)].align.toLowerCase());
|
|
3856
3870
|
if (innerPos) {
|
|
3857
|
-
if (!(items[i].showAlwaysInPopup && items[i].overflow !== 'Show')) {
|
|
3858
|
-
this.tbarAlgEle[(items[i].align + 's').toLowerCase()].push(innerItem);
|
|
3871
|
+
if (!(items[parseInt(i.toString(), 10)].showAlwaysInPopup && items[parseInt(i.toString(), 10)].overflow !== 'Show')) {
|
|
3872
|
+
this.tbarAlgEle[(items[parseInt(i.toString(), 10)].align + 's').toLowerCase()].push(innerItem);
|
|
3859
3873
|
}
|
|
3860
3874
|
innerPos.appendChild(innerItem);
|
|
3861
3875
|
}
|
|
@@ -3865,7 +3879,7 @@ let Toolbar = class Toolbar extends Component {
|
|
|
3865
3879
|
}
|
|
3866
3880
|
if (this.isReact) {
|
|
3867
3881
|
const portals = 'portals';
|
|
3868
|
-
this.notify('render-react-toolbar-template', this[portals]);
|
|
3882
|
+
this.notify('render-react-toolbar-template', this[`${portals}`]);
|
|
3869
3883
|
this.renderReactTemplates();
|
|
3870
3884
|
}
|
|
3871
3885
|
}
|
|
@@ -4021,8 +4035,11 @@ let Toolbar = class Toolbar extends Component {
|
|
|
4021
4035
|
}
|
|
4022
4036
|
setOverflowAttributes(ele) {
|
|
4023
4037
|
this.createPopupEle(ele, [].slice.call(selectAll('.' + CLS_ITEMS + ' .' + CLS_ITEM, ele)));
|
|
4024
|
-
|
|
4025
|
-
|
|
4038
|
+
const ariaAttr = {
|
|
4039
|
+
'tabindex': '0', 'role': 'button', 'aria-haspopup': 'true',
|
|
4040
|
+
'aria-label': 'overflow'
|
|
4041
|
+
};
|
|
4042
|
+
attributes(this.element.querySelector('.' + CLS_TBARNAV), ariaAttr);
|
|
4026
4043
|
}
|
|
4027
4044
|
separator() {
|
|
4028
4045
|
const element = this.element;
|
|
@@ -4039,12 +4056,12 @@ let Toolbar = class Toolbar extends Component {
|
|
|
4039
4056
|
}
|
|
4040
4057
|
}
|
|
4041
4058
|
for (let i = 0; i <= eleItem.length - 1; i++) {
|
|
4042
|
-
if (eleItem[i].offsetLeft < 30 && eleItem[i].offsetLeft !== 0) {
|
|
4059
|
+
if (eleItem[parseInt(i.toString(), 10)].offsetLeft < 30 && eleItem[parseInt(i.toString(), 10)].offsetLeft !== 0) {
|
|
4043
4060
|
if (this.overflowMode === 'MultiRow') {
|
|
4044
|
-
eleItem[i].classList.add(CLS_MULTIROW_SEPARATOR);
|
|
4061
|
+
eleItem[parseInt(i.toString(), 10)].classList.add(CLS_MULTIROW_SEPARATOR);
|
|
4045
4062
|
}
|
|
4046
4063
|
else if (this.overflowMode === 'Extended') {
|
|
4047
|
-
eleItem[i].classList.add(CLS_EXTENDABLE_SEPARATOR);
|
|
4064
|
+
eleItem[parseInt(i.toString(), 10)].classList.add(CLS_EXTENDABLE_SEPARATOR);
|
|
4048
4065
|
}
|
|
4049
4066
|
}
|
|
4050
4067
|
}
|
|
@@ -4077,7 +4094,7 @@ let Toolbar = class Toolbar extends Component {
|
|
|
4077
4094
|
nodes = selectAll('.' + CLS_TBAROVERFLOW, ele);
|
|
4078
4095
|
if (el.classList.contains(CLS_TBAROVERFLOW) && nodes.length > 0) {
|
|
4079
4096
|
if (tbarObj.tbResize && nodes.length > index) {
|
|
4080
|
-
ele.insertBefore(el, nodes[index]);
|
|
4097
|
+
ele.insertBefore(el, nodes[parseInt(index.toString(), 10)]);
|
|
4081
4098
|
++nodePri;
|
|
4082
4099
|
}
|
|
4083
4100
|
else {
|
|
@@ -4115,7 +4132,7 @@ let Toolbar = class Toolbar extends Component {
|
|
|
4115
4132
|
});
|
|
4116
4133
|
const tbarEle = selectAll('.' + CLS_ITEM, element.querySelector('.' + CLS_ITEMS));
|
|
4117
4134
|
for (let i = tbarEle.length - 1; i >= 0; i--) {
|
|
4118
|
-
const tbarElement = tbarEle[i];
|
|
4135
|
+
const tbarElement = tbarEle[parseInt(i.toString(), 10)];
|
|
4119
4136
|
if (tbarElement.classList.contains(CLS_SEPARATOR) && this.overflowMode !== 'Extended') {
|
|
4120
4137
|
setStyleAttribute(tbarElement, { display: 'none' });
|
|
4121
4138
|
}
|
|
@@ -4170,11 +4187,11 @@ let Toolbar = class Toolbar extends Component {
|
|
|
4170
4187
|
collision: { Y: this.enableCollision ? 'flip' : 'none' },
|
|
4171
4188
|
position: this.enableRtl ? { X: 'left', Y: 'top' } : { X: 'right', Y: 'top' }
|
|
4172
4189
|
});
|
|
4173
|
-
popup.appendTo(ele);
|
|
4174
4190
|
if (this.overflowMode === 'Extended') {
|
|
4175
4191
|
popup.width = parseFloat(eleStyles.width) + ((parseFloat(eleStyles.borderRightWidth)) * 2);
|
|
4176
4192
|
popup.offsetX = 0;
|
|
4177
4193
|
}
|
|
4194
|
+
popup.appendTo(ele);
|
|
4178
4195
|
EventHandler.add(document, 'scroll', this.docEvent.bind(this));
|
|
4179
4196
|
EventHandler.add(document, 'click ', this.docEvent.bind(this));
|
|
4180
4197
|
popup.element.style.maxHeight = popup.element.offsetHeight + 'px';
|
|
@@ -4191,7 +4208,6 @@ let Toolbar = class Toolbar extends Component {
|
|
|
4191
4208
|
popup.hide();
|
|
4192
4209
|
}
|
|
4193
4210
|
this.popObj = popup;
|
|
4194
|
-
this.element.setAttribute('aria-haspopup', 'true');
|
|
4195
4211
|
}
|
|
4196
4212
|
else {
|
|
4197
4213
|
const popupEle = this.popObj.element;
|
|
@@ -4219,6 +4235,7 @@ let Toolbar = class Toolbar extends Component {
|
|
|
4219
4235
|
const popupEle = this.popObj.element;
|
|
4220
4236
|
const toolEle = this.popObj.element.parentElement;
|
|
4221
4237
|
const popupNav = toolEle.querySelector('.' + CLS_TBARNAV);
|
|
4238
|
+
popupNav.setAttribute('aria-expanded', 'true');
|
|
4222
4239
|
setStyleAttribute(popObj.element, { height: 'auto', maxHeight: '' });
|
|
4223
4240
|
popObj.element.style.maxHeight = popObj.element.offsetHeight + 'px';
|
|
4224
4241
|
if (this.overflowMode === 'Extended') {
|
|
@@ -4234,7 +4251,7 @@ let Toolbar = class Toolbar extends Component {
|
|
|
4234
4251
|
let overflowHeight = (popupEle.offsetHeight - ((popupElePos - window.innerHeight - scrollVal) + 5));
|
|
4235
4252
|
popObj.height = overflowHeight + 'px';
|
|
4236
4253
|
for (let i = 0; i <= popupEle.childElementCount; i++) {
|
|
4237
|
-
const ele = popupEle.children[i];
|
|
4254
|
+
const ele = popupEle.children[parseInt(i.toString(), 10)];
|
|
4238
4255
|
if (ele.offsetTop + ele.offsetHeight > overflowHeight) {
|
|
4239
4256
|
overflowHeight = ele.offsetTop;
|
|
4240
4257
|
break;
|
|
@@ -4259,6 +4276,7 @@ let Toolbar = class Toolbar extends Component {
|
|
|
4259
4276
|
popupClose(e) {
|
|
4260
4277
|
const element = this.element;
|
|
4261
4278
|
const popupNav = element.querySelector('.' + CLS_TBARNAV);
|
|
4279
|
+
popupNav.setAttribute('aria-expanded', 'false');
|
|
4262
4280
|
const popIcon = popupNav.firstElementChild;
|
|
4263
4281
|
popupNav.classList.remove(CLS_TBARNAVACT);
|
|
4264
4282
|
classList(popIcon, [CLS_POPUPDOWN], [CLS_POPUPICON]);
|
|
@@ -4284,7 +4302,7 @@ let Toolbar = class Toolbar extends Component {
|
|
|
4284
4302
|
};
|
|
4285
4303
|
for (let i = len - 1; i >= 0; i--) {
|
|
4286
4304
|
let mrgn;
|
|
4287
|
-
const compuStyle = window.getComputedStyle(inEle[i]);
|
|
4305
|
+
const compuStyle = window.getComputedStyle(inEle[parseInt(i.toString(), 10)]);
|
|
4288
4306
|
if (this.isVertical) {
|
|
4289
4307
|
mrgn = parseFloat((compuStyle).marginTop);
|
|
4290
4308
|
mrgn += parseFloat((compuStyle).marginBottom);
|
|
@@ -4293,35 +4311,37 @@ let Toolbar = class Toolbar extends Component {
|
|
|
4293
4311
|
mrgn = parseFloat((compuStyle).marginRight);
|
|
4294
4312
|
mrgn += parseFloat((compuStyle).marginLeft);
|
|
4295
4313
|
}
|
|
4296
|
-
const fstEleCheck = inEle[i] === this.tbarEle[0];
|
|
4314
|
+
const fstEleCheck = inEle[parseInt(i.toString(), 10)] === this.tbarEle[0];
|
|
4297
4315
|
if (fstEleCheck) {
|
|
4298
4316
|
this.tbarEleMrgn = mrgn;
|
|
4299
4317
|
}
|
|
4300
|
-
eleOffset = this.isVertical ? inEle[i].offsetHeight : inEle[i].offsetWidth;
|
|
4318
|
+
eleOffset = this.isVertical ? inEle[parseInt(i.toString(), 10)].offsetHeight : inEle[parseInt(i.toString(), 10)].offsetWidth;
|
|
4301
4319
|
const eleWid = fstEleCheck ? (eleOffset + mrgn) : eleOffset;
|
|
4302
|
-
if (checkClass(inEle[i], [CLS_POPPRI]) && popPriority) {
|
|
4303
|
-
inEle[i].classList.add(CLS_POPUP);
|
|
4320
|
+
if (checkClass(inEle[parseInt(i.toString(), 10)], [CLS_POPPRI]) && popPriority) {
|
|
4321
|
+
inEle[parseInt(i.toString(), 10)].classList.add(CLS_POPUP);
|
|
4304
4322
|
if (this.isVertical) {
|
|
4305
|
-
setStyleAttribute(inEle[i], { display: 'none', minHeight: eleWid + 'px' });
|
|
4323
|
+
setStyleAttribute(inEle[parseInt(i.toString(), 10)], { display: 'none', minHeight: eleWid + 'px' });
|
|
4306
4324
|
}
|
|
4307
4325
|
else {
|
|
4308
|
-
setStyleAttribute(inEle[i], { display: 'none', minWidth: eleWid + 'px' });
|
|
4326
|
+
setStyleAttribute(inEle[parseInt(i.toString(), 10)], { display: 'none', minWidth: eleWid + 'px' });
|
|
4309
4327
|
}
|
|
4310
4328
|
itemPopCount++;
|
|
4311
4329
|
}
|
|
4312
4330
|
if (this.isVertical) {
|
|
4313
|
-
checkoffset =
|
|
4331
|
+
checkoffset =
|
|
4332
|
+
(inEle[parseInt(i.toString(), 10)].offsetTop + inEle[parseInt(i.toString(), 10)].offsetHeight + mrgn) > eleWidth;
|
|
4314
4333
|
}
|
|
4315
4334
|
else {
|
|
4316
|
-
checkoffset =
|
|
4335
|
+
checkoffset =
|
|
4336
|
+
(inEle[parseInt(i.toString(), 10)].offsetLeft + inEle[parseInt(i.toString(), 10)].offsetWidth + mrgn) > eleWidth;
|
|
4317
4337
|
}
|
|
4318
4338
|
if (checkoffset) {
|
|
4319
|
-
if (inEle[i].classList.contains(CLS_SEPARATOR)) {
|
|
4339
|
+
if (inEle[parseInt(i.toString(), 10)].classList.contains(CLS_SEPARATOR)) {
|
|
4320
4340
|
if (this.overflowMode === 'Extended') {
|
|
4321
4341
|
if (itemCount === itemPopCount) {
|
|
4322
|
-
const sepEle = inEle[i];
|
|
4342
|
+
const sepEle = inEle[parseInt(i.toString(), 10)];
|
|
4323
4343
|
if (checkClass(sepEle, [CLS_SEPARATOR, CLS_TBARIGNORE])) {
|
|
4324
|
-
inEle[i].classList.add(CLS_POPUP);
|
|
4344
|
+
inEle[parseInt(i.toString(), 10)].classList.add(CLS_POPUP);
|
|
4325
4345
|
itemPopCount++;
|
|
4326
4346
|
}
|
|
4327
4347
|
}
|
|
@@ -4342,21 +4362,23 @@ let Toolbar = class Toolbar extends Component {
|
|
|
4342
4362
|
else {
|
|
4343
4363
|
itemCount++;
|
|
4344
4364
|
}
|
|
4345
|
-
if (inEle[i].classList.contains(CLS_TBAROVERFLOW) && pre) {
|
|
4346
|
-
eleWidth -= ((this.isVertical ? inEle[i].offsetHeight :
|
|
4365
|
+
if (inEle[parseInt(i.toString(), 10)].classList.contains(CLS_TBAROVERFLOW) && pre) {
|
|
4366
|
+
eleWidth -= ((this.isVertical ? inEle[parseInt(i.toString(), 10)].offsetHeight :
|
|
4367
|
+
inEle[parseInt(i.toString(), 10)].offsetWidth) + (mrgn));
|
|
4347
4368
|
}
|
|
4348
|
-
else if (!checkClass(inEle[i], [CLS_SEPARATOR, CLS_TBARIGNORE])) {
|
|
4349
|
-
inEle[i].classList.add(CLS_POPUP);
|
|
4369
|
+
else if (!checkClass(inEle[parseInt(i.toString(), 10)], [CLS_SEPARATOR, CLS_TBARIGNORE])) {
|
|
4370
|
+
inEle[parseInt(i.toString(), 10)].classList.add(CLS_POPUP);
|
|
4350
4371
|
if (this.isVertical) {
|
|
4351
|
-
setStyleAttribute(inEle[i], { display: 'none', minHeight: eleWid + 'px' });
|
|
4372
|
+
setStyleAttribute(inEle[parseInt(i.toString(), 10)], { display: 'none', minHeight: eleWid + 'px' });
|
|
4352
4373
|
}
|
|
4353
4374
|
else {
|
|
4354
|
-
setStyleAttribute(inEle[i], { display: 'none', minWidth: eleWid + 'px' });
|
|
4375
|
+
setStyleAttribute(inEle[parseInt(i.toString(), 10)], { display: 'none', minWidth: eleWid + 'px' });
|
|
4355
4376
|
}
|
|
4356
4377
|
itemPopCount++;
|
|
4357
4378
|
}
|
|
4358
4379
|
else {
|
|
4359
|
-
eleWidth -= ((this.isVertical ? inEle[i].offsetHeight :
|
|
4380
|
+
eleWidth -= ((this.isVertical ? inEle[parseInt(i.toString(), 10)].offsetHeight :
|
|
4381
|
+
inEle[parseInt(i.toString(), 10)].offsetWidth) + (mrgn));
|
|
4360
4382
|
}
|
|
4361
4383
|
}
|
|
4362
4384
|
}
|
|
@@ -4376,7 +4398,7 @@ let Toolbar = class Toolbar extends Component {
|
|
|
4376
4398
|
const navItem = this.createElement('div', { className: CLS_POPUPDOWN + ' e-icons' });
|
|
4377
4399
|
nav.appendChild(navItem);
|
|
4378
4400
|
nav.setAttribute('tabindex', '0');
|
|
4379
|
-
nav.setAttribute('role', '
|
|
4401
|
+
nav.setAttribute('role', 'button');
|
|
4380
4402
|
element.appendChild(nav);
|
|
4381
4403
|
}
|
|
4382
4404
|
tbarPriRef(inEle, indx, sepPri, el, des, elWid, wid, ig) {
|
|
@@ -4449,7 +4471,6 @@ let Toolbar = class Toolbar extends Component {
|
|
|
4449
4471
|
this.popObj.destroy();
|
|
4450
4472
|
detach(this.popObj.element);
|
|
4451
4473
|
this.popObj = null;
|
|
4452
|
-
ele.setAttribute('aria-haspopup', 'false');
|
|
4453
4474
|
}
|
|
4454
4475
|
}
|
|
4455
4476
|
ignoreEleFetch(index, innerEle) {
|
|
@@ -4528,7 +4549,7 @@ let Toolbar = class Toolbar extends Component {
|
|
|
4528
4549
|
}
|
|
4529
4550
|
index = this.tbarEle.indexOf(el);
|
|
4530
4551
|
if (this.tbarAlign) {
|
|
4531
|
-
const pos = this.items[index].align;
|
|
4552
|
+
const pos = this.items[parseInt(index.toString(), 10)].align;
|
|
4532
4553
|
index = this.tbarAlgEle[(pos + 's').toLowerCase()].indexOf(el);
|
|
4533
4554
|
eleSplice = this.tbarAlgEle[(pos + 's').toLowerCase()];
|
|
4534
4555
|
innerEle = this.element.querySelector('.' + CLS_ITEMS + ' .' + 'e-toolbar-' + pos.toLowerCase());
|
|
@@ -4715,12 +4736,12 @@ let Toolbar = class Toolbar extends Component {
|
|
|
4715
4736
|
const key = Object.keys(attr);
|
|
4716
4737
|
let keyVal;
|
|
4717
4738
|
for (let i = 0; i < key.length; i++) {
|
|
4718
|
-
keyVal = key[i];
|
|
4739
|
+
keyVal = key[parseInt(i.toString(), 10)];
|
|
4719
4740
|
if (keyVal === 'class') {
|
|
4720
|
-
this.add(element, attr[keyVal]);
|
|
4741
|
+
this.add(element, attr[`${keyVal}`]);
|
|
4721
4742
|
}
|
|
4722
4743
|
else {
|
|
4723
|
-
element.setAttribute(keyVal, attr[keyVal]);
|
|
4744
|
+
element.setAttribute(keyVal, attr[`${keyVal}`]);
|
|
4724
4745
|
}
|
|
4725
4746
|
}
|
|
4726
4747
|
}
|
|
@@ -4751,14 +4772,14 @@ let Toolbar = class Toolbar extends Component {
|
|
|
4751
4772
|
};
|
|
4752
4773
|
if (!isNullOrUndefined(len) && len >= 1) {
|
|
4753
4774
|
for (let a = 0, element = [].slice.call(elements); a < len; a++) {
|
|
4754
|
-
const itemElement = element[a];
|
|
4775
|
+
const itemElement = element[parseInt(a.toString(), 10)];
|
|
4755
4776
|
if (typeof (itemElement) === 'number') {
|
|
4756
4777
|
ele = this.getElementByIndex(itemElement);
|
|
4757
4778
|
if (isNullOrUndefined(ele)) {
|
|
4758
4779
|
return;
|
|
4759
4780
|
}
|
|
4760
4781
|
else {
|
|
4761
|
-
elements[a] = ele;
|
|
4782
|
+
elements[parseInt(a.toString(), 10)] = ele;
|
|
4762
4783
|
}
|
|
4763
4784
|
}
|
|
4764
4785
|
else {
|
|
@@ -4787,8 +4808,8 @@ let Toolbar = class Toolbar extends Component {
|
|
|
4787
4808
|
}
|
|
4788
4809
|
}
|
|
4789
4810
|
getElementByIndex(index) {
|
|
4790
|
-
if (this.tbarEle[index]) {
|
|
4791
|
-
return this.tbarEle[index];
|
|
4811
|
+
if (this.tbarEle[parseInt(index.toString(), 10)]) {
|
|
4812
|
+
return this.tbarEle[parseInt(index.toString(), 10)];
|
|
4792
4813
|
}
|
|
4793
4814
|
return null;
|
|
4794
4815
|
}
|
|
@@ -4833,14 +4854,14 @@ let Toolbar = class Toolbar extends Component {
|
|
|
4833
4854
|
if (!this.tbarAlign && itemAgn !== 'Left') {
|
|
4834
4855
|
this.tbarItemAlign(item, itemsDiv, 1);
|
|
4835
4856
|
this.tbarAlign = true;
|
|
4836
|
-
ele = closest(innerItems[0], '.' + CLS_ITEMS).children[algIndex];
|
|
4857
|
+
ele = closest(innerItems[0], '.' + CLS_ITEMS).children[parseInt(algIndex.toString(), 10)];
|
|
4837
4858
|
ele.appendChild(innerEle);
|
|
4838
4859
|
this.tbarAlgEle[(item.align + 's').toLowerCase()].push(innerEle);
|
|
4839
4860
|
this.refreshPositioning();
|
|
4840
4861
|
}
|
|
4841
4862
|
else if (this.tbarAlign) {
|
|
4842
|
-
ele = closest(innerItems[0], '.' + CLS_ITEMS).children[algIndex];
|
|
4843
|
-
ele.insertBefore(innerEle, ele.children[index]);
|
|
4863
|
+
ele = closest(innerItems[0], '.' + CLS_ITEMS).children[parseInt(algIndex.toString(), 10)];
|
|
4864
|
+
ele.insertBefore(innerEle, ele.children[parseInt(index.toString(), 10)]);
|
|
4844
4865
|
this.tbarAlgEle[(item.align + 's').toLowerCase()].splice(index, 0, innerEle);
|
|
4845
4866
|
this.refreshPositioning();
|
|
4846
4867
|
}
|
|
@@ -4849,7 +4870,7 @@ let Toolbar = class Toolbar extends Component {
|
|
|
4849
4870
|
innerItems[0].appendChild(innerEle);
|
|
4850
4871
|
}
|
|
4851
4872
|
else {
|
|
4852
|
-
innerItems[0].parentNode.insertBefore(innerEle, innerItems[index]);
|
|
4873
|
+
innerItems[0].parentNode.insertBefore(innerEle, innerItems[parseInt(index.toString(), 10)]);
|
|
4853
4874
|
}
|
|
4854
4875
|
this.items.splice(index, 0, item);
|
|
4855
4876
|
if (item.template) {
|
|
@@ -4898,20 +4919,20 @@ let Toolbar = class Toolbar extends Component {
|
|
|
4898
4919
|
this.resize();
|
|
4899
4920
|
}
|
|
4900
4921
|
removeItemByIndex(index, innerItems) {
|
|
4901
|
-
if (this.tbarEle[index] && innerItems[index]) {
|
|
4902
|
-
const eleIdx = this.tbarEle.indexOf(innerItems[index]);
|
|
4922
|
+
if (this.tbarEle[parseInt(index.toString(), 10)] && innerItems[parseInt(index.toString(), 10)]) {
|
|
4923
|
+
const eleIdx = this.tbarEle.indexOf(innerItems[parseInt(index.toString(), 10)]);
|
|
4903
4924
|
if (this.tbarAlign) {
|
|
4904
|
-
const indexAgn = this.tbarAlgEle[(this.items[eleIdx].align + 's').toLowerCase()].indexOf(this.tbarEle[eleIdx]);
|
|
4905
|
-
this.tbarAlgEle[(this.items[eleIdx].align + 's').toLowerCase()].splice(indexAgn, 1);
|
|
4925
|
+
const indexAgn = this.tbarAlgEle[(this.items[parseInt(eleIdx.toString(), 10)].align + 's').toLowerCase()].indexOf(this.tbarEle[parseInt(eleIdx.toString(), 10)]);
|
|
4926
|
+
this.tbarAlgEle[(this.items[parseInt(eleIdx.toString(), 10)].align + 's').toLowerCase()].splice(parseInt(indexAgn.toString(), 10), 1);
|
|
4906
4927
|
}
|
|
4907
4928
|
if (this.isReact) {
|
|
4908
4929
|
this.clearTemplate();
|
|
4909
4930
|
}
|
|
4910
|
-
const btnItem = innerItems[index].querySelector('.e-control.e-btn');
|
|
4931
|
+
const btnItem = innerItems[parseInt(index.toString(), 10)].querySelector('.e-control.e-btn');
|
|
4911
4932
|
if (!isNullOrUndefined(btnItem) && !isNullOrUndefined(btnItem.ej2_instances[0]) && !(btnItem.ej2_instances[0].isDestroyed)) {
|
|
4912
4933
|
btnItem.ej2_instances[0].destroy();
|
|
4913
4934
|
}
|
|
4914
|
-
detach(innerItems[index]);
|
|
4935
|
+
detach(innerItems[parseInt(index.toString(), 10)]);
|
|
4915
4936
|
this.items.splice(eleIdx, 1);
|
|
4916
4937
|
this.tbarEle.splice(eleIdx, 1);
|
|
4917
4938
|
}
|
|
@@ -5044,7 +5065,8 @@ let Toolbar = class Toolbar extends Component {
|
|
|
5044
5065
|
switch (item.type) {
|
|
5045
5066
|
case 'Button':
|
|
5046
5067
|
dom = this.buttonRendering(item, innerEle);
|
|
5047
|
-
dom.setAttribute('tabindex', '-1');
|
|
5068
|
+
dom.setAttribute('tabindex', isNullOrUndefined(item.tabIndex) ? '-1' : item.tabIndex.toString());
|
|
5069
|
+
dom.setAttribute('data-tabindex', isNullOrUndefined(item.tabIndex) ? '-1' : item.tabIndex.toString());
|
|
5048
5070
|
dom.setAttribute('aria-label', (item.text || item.tooltipText));
|
|
5049
5071
|
innerEle.appendChild(dom);
|
|
5050
5072
|
innerEle.addEventListener('click', this.itemClick.bind(this));
|
|
@@ -5087,6 +5109,9 @@ let Toolbar = class Toolbar extends Component {
|
|
|
5087
5109
|
}
|
|
5088
5110
|
return innerEle;
|
|
5089
5111
|
}
|
|
5112
|
+
getDataTabindex(ele) {
|
|
5113
|
+
return isNullOrUndefined(ele.getAttribute('data-tabindex')) ? '-1' : ele.getAttribute('data-tabindex');
|
|
5114
|
+
}
|
|
5090
5115
|
itemClick(e) {
|
|
5091
5116
|
this.activeEleSwitch(e.currentTarget);
|
|
5092
5117
|
}
|
|
@@ -5096,14 +5121,17 @@ let Toolbar = class Toolbar extends Component {
|
|
|
5096
5121
|
}
|
|
5097
5122
|
activeEleRemove(curEle) {
|
|
5098
5123
|
if (!isNullOrUndefined(this.activeEle)) {
|
|
5099
|
-
this.activeEle.setAttribute('tabindex',
|
|
5124
|
+
this.activeEle.setAttribute('tabindex', this.getDataTabindex(this.activeEle));
|
|
5100
5125
|
}
|
|
5101
5126
|
this.activeEle = curEle;
|
|
5102
|
-
if (
|
|
5103
|
-
curEle.
|
|
5104
|
-
|
|
5105
|
-
|
|
5106
|
-
|
|
5127
|
+
if (this.getDataTabindex(this.activeEle) === '-1') {
|
|
5128
|
+
if (isNullOrUndefined(this.trgtEle) && !curEle.parentElement.classList.contains(CLS_TEMPLATE)) {
|
|
5129
|
+
this.updateTabIndex('-1');
|
|
5130
|
+
curEle.removeAttribute('tabindex');
|
|
5131
|
+
}
|
|
5132
|
+
else {
|
|
5133
|
+
this.activeEle.setAttribute('tabindex', this.getDataTabindex(this.activeEle));
|
|
5134
|
+
}
|
|
5107
5135
|
}
|
|
5108
5136
|
}
|
|
5109
5137
|
getPersistData() {
|
|
@@ -5185,6 +5213,26 @@ let Toolbar = class Toolbar extends Component {
|
|
|
5185
5213
|
this.isExtendedOpen = sib.classList.contains(CLS_POPUPOPEN);
|
|
5186
5214
|
}
|
|
5187
5215
|
}
|
|
5216
|
+
updateHideEleTabIndex(ele, isHidden, isElement, eleIndex, innerItems) {
|
|
5217
|
+
if (isElement) {
|
|
5218
|
+
eleIndex = innerItems.indexOf(ele);
|
|
5219
|
+
}
|
|
5220
|
+
let nextEle = innerItems[++eleIndex];
|
|
5221
|
+
while (nextEle) {
|
|
5222
|
+
const skipEle = this.eleContains(nextEle);
|
|
5223
|
+
if (!skipEle) {
|
|
5224
|
+
const dataTabIndex = nextEle.firstElementChild.getAttribute('data-tabindex');
|
|
5225
|
+
if (isHidden && dataTabIndex === '-1') {
|
|
5226
|
+
nextEle.firstElementChild.setAttribute('tabindex', '0');
|
|
5227
|
+
}
|
|
5228
|
+
else if (dataTabIndex !== nextEle.firstElementChild.getAttribute('tabindex')) {
|
|
5229
|
+
nextEle.firstElementChild.setAttribute('tabindex', dataTabIndex);
|
|
5230
|
+
}
|
|
5231
|
+
break;
|
|
5232
|
+
}
|
|
5233
|
+
nextEle = innerItems[++eleIndex];
|
|
5234
|
+
}
|
|
5235
|
+
}
|
|
5188
5236
|
/**
|
|
5189
5237
|
* Gets called when the model property changes.The data that describes the old and new values of the property that changed.
|
|
5190
5238
|
*
|
|
@@ -5203,9 +5251,9 @@ let Toolbar = class Toolbar extends Component {
|
|
|
5203
5251
|
if (!(newProp.items instanceof Array && oldProp.items instanceof Array)) {
|
|
5204
5252
|
const changedProb = Object.keys(newProp.items);
|
|
5205
5253
|
for (let i = 0; i < changedProb.length; i++) {
|
|
5206
|
-
const index = parseInt(Object.keys(newProp.items)[i], 10);
|
|
5207
|
-
const property = Object.keys(newProp.items[index])[0];
|
|
5208
|
-
const newProperty = Object(newProp.items[index])[property];
|
|
5254
|
+
const index = parseInt(Object.keys(newProp.items)[parseInt(i.toString(), 10)], 10);
|
|
5255
|
+
const property = Object.keys(newProp.items[parseInt(index.toString(), 10)])[0];
|
|
5256
|
+
const newProperty = Object(newProp.items[parseInt(index.toString(), 10)])[`${property}`];
|
|
5209
5257
|
if (typeof newProperty !== 'function') {
|
|
5210
5258
|
if (this.tbarAlign || property === 'align') {
|
|
5211
5259
|
this.refresh();
|
|
@@ -5214,7 +5262,7 @@ let Toolbar = class Toolbar extends Component {
|
|
|
5214
5262
|
}
|
|
5215
5263
|
const popupPriCheck = property === 'showAlwaysInPopup' && !newProperty;
|
|
5216
5264
|
const booleanCheck = property === 'overflow' && this.popupPriCount !== 0;
|
|
5217
|
-
if ((popupPriCheck) || (this.items[index].showAlwaysInPopup) && booleanCheck) {
|
|
5265
|
+
if ((popupPriCheck) || (this.items[parseInt(index.toString(), 10)].showAlwaysInPopup) && booleanCheck) {
|
|
5218
5266
|
--this.popupPriCount;
|
|
5219
5267
|
}
|
|
5220
5268
|
if (isNullOrUndefined(this.scrollModule)) {
|
|
@@ -5224,11 +5272,11 @@ let Toolbar = class Toolbar extends Component {
|
|
|
5224
5272
|
if (this.isReact) {
|
|
5225
5273
|
this.clearTemplate();
|
|
5226
5274
|
}
|
|
5227
|
-
detach(itemCol[index]);
|
|
5275
|
+
detach(itemCol[parseInt(index.toString(), 10)]);
|
|
5228
5276
|
this.tbarEle.splice(index, 1);
|
|
5229
|
-
this.addItems([this.items[index]], index);
|
|
5277
|
+
this.addItems([this.items[parseInt(index.toString(), 10)]], index);
|
|
5230
5278
|
this.items.splice(index, 1);
|
|
5231
|
-
if (this.items[index].template) {
|
|
5279
|
+
if (this.items[parseInt(index.toString(), 10)].template) {
|
|
5232
5280
|
this.tbarEle.splice(this.items.length, 1);
|
|
5233
5281
|
}
|
|
5234
5282
|
}
|
|
@@ -5320,67 +5368,32 @@ let Toolbar = class Toolbar extends Component {
|
|
|
5320
5368
|
hideItem(index, value) {
|
|
5321
5369
|
const isElement = (typeof (index) === 'object') ? true : false;
|
|
5322
5370
|
let eleIndex = index;
|
|
5323
|
-
let initIndex;
|
|
5324
5371
|
let ele;
|
|
5372
|
+
if (!isElement && isNullOrUndefined(eleIndex)) {
|
|
5373
|
+
return;
|
|
5374
|
+
}
|
|
5325
5375
|
const innerItems = [].slice.call(selectAll('.' + CLS_ITEM, this.element));
|
|
5326
5376
|
if (isElement) {
|
|
5327
5377
|
ele = index;
|
|
5328
5378
|
}
|
|
5329
|
-
else if (this.tbarEle[eleIndex]) {
|
|
5379
|
+
else if (this.tbarEle[parseInt(eleIndex.toString(), 10)]) {
|
|
5330
5380
|
const innerItems = [].slice.call(selectAll('.' + CLS_ITEM, this.element));
|
|
5331
|
-
ele = innerItems[eleIndex];
|
|
5381
|
+
ele = innerItems[parseInt(eleIndex.toString(), 10)];
|
|
5332
5382
|
}
|
|
5333
5383
|
if (ele) {
|
|
5334
5384
|
if (value) {
|
|
5335
5385
|
ele.classList.add(CLS_HIDDEN);
|
|
5336
|
-
|
|
5337
|
-
|
|
5338
|
-
|
|
5339
|
-
|
|
5340
|
-
if (value && isNullOrUndefined(this.element.getAttribute('tabindex')) && !ele.classList.contains(CLS_SEPARATOR)) {
|
|
5341
|
-
if (isNullOrUndefined(ele.firstElementChild.getAttribute('tabindex'))) {
|
|
5342
|
-
ele.firstElementChild.setAttribute('tabindex', '-1');
|
|
5343
|
-
const innerItems = [].slice.call(selectAll('.' + CLS_ITEM, this.element));
|
|
5344
|
-
if (isElement) {
|
|
5345
|
-
eleIndex = innerItems.indexOf(ele);
|
|
5346
|
-
}
|
|
5347
|
-
let nextEle = innerItems[++eleIndex];
|
|
5348
|
-
while (nextEle) {
|
|
5349
|
-
const skipEle = this.eleContains(nextEle);
|
|
5350
|
-
if (!skipEle) {
|
|
5351
|
-
nextEle.firstElementChild.removeAttribute('tabindex');
|
|
5352
|
-
break;
|
|
5353
|
-
}
|
|
5354
|
-
nextEle = innerItems[++eleIndex];
|
|
5386
|
+
if (!ele.classList.contains(CLS_SEPARATOR)) {
|
|
5387
|
+
if (isNullOrUndefined(ele.firstElementChild.getAttribute('tabindex')) ||
|
|
5388
|
+
ele.firstElementChild.getAttribute('tabindex') !== '-1') {
|
|
5389
|
+
this.updateHideEleTabIndex(ele, value, isElement, eleIndex, innerItems);
|
|
5355
5390
|
}
|
|
5356
5391
|
}
|
|
5357
5392
|
}
|
|
5358
|
-
else
|
|
5359
|
-
|
|
5360
|
-
|
|
5361
|
-
|
|
5362
|
-
let initELe = innerItems[initIndex];
|
|
5363
|
-
while (initELe) {
|
|
5364
|
-
if (!initELe.classList.contains(CLS_SEPARATOR)) {
|
|
5365
|
-
if (isNullOrUndefined(initELe.firstElementChild.getAttribute('tabindex'))) {
|
|
5366
|
-
initELe.firstElementChild.setAttribute('tabindex', '-1');
|
|
5367
|
-
setFlag = true;
|
|
5368
|
-
}
|
|
5369
|
-
else {
|
|
5370
|
-
if (setFlag && removeFlag) {
|
|
5371
|
-
break;
|
|
5372
|
-
}
|
|
5373
|
-
const skipEle = this.eleContains(initELe);
|
|
5374
|
-
if (!skipEle) {
|
|
5375
|
-
initELe.firstElementChild.removeAttribute('tabindex');
|
|
5376
|
-
removeFlag = true;
|
|
5377
|
-
}
|
|
5378
|
-
initELe = innerItems[++initIndex];
|
|
5379
|
-
}
|
|
5380
|
-
}
|
|
5381
|
-
else {
|
|
5382
|
-
initELe = innerItems[++initIndex];
|
|
5383
|
-
}
|
|
5393
|
+
else {
|
|
5394
|
+
ele.classList.remove(CLS_HIDDEN);
|
|
5395
|
+
if (!ele.classList.contains(CLS_SEPARATOR)) {
|
|
5396
|
+
this.updateHideEleTabIndex(ele, value, isElement, eleIndex, innerItems);
|
|
5384
5397
|
}
|
|
5385
5398
|
}
|
|
5386
5399
|
this.refreshOverflow();
|
|
@@ -5744,7 +5757,7 @@ let Accordion = class Accordion extends Component {
|
|
|
5744
5757
|
}
|
|
5745
5758
|
else {
|
|
5746
5759
|
for (let i = 0; i < len; i++) {
|
|
5747
|
-
this.expandItem(true, this.initExpand[i]);
|
|
5760
|
+
this.expandItem(true, this.initExpand[parseInt(i.toString(), 10)]);
|
|
5748
5761
|
}
|
|
5749
5762
|
}
|
|
5750
5763
|
if (this.isReact) {
|
|
@@ -6103,14 +6116,15 @@ let Accordion = class Accordion extends Component {
|
|
|
6103
6116
|
if (this.isReact) {
|
|
6104
6117
|
this.renderReactTemplates();
|
|
6105
6118
|
}
|
|
6106
|
-
append(this.getItemTemplate()(this.dataSource[index], this, 'itemTemplate', this.element.id + '_itemTemplate', false), ctn);
|
|
6119
|
+
append(this.getItemTemplate()(this.dataSource[parseInt(index.toString(), 10)], this, 'itemTemplate', this.element.id + '_itemTemplate', false), ctn);
|
|
6107
6120
|
itemcnt.appendChild(ctn);
|
|
6108
6121
|
}
|
|
6109
6122
|
else {
|
|
6110
|
-
if (this.enableHtmlSanitizer && typeof (this.items[index].content)) {
|
|
6111
|
-
this.items[index].content =
|
|
6123
|
+
if (this.enableHtmlSanitizer && typeof (this.items[parseInt(index.toString(), 10)].content)) {
|
|
6124
|
+
this.items[parseInt(index.toString(), 10)].content =
|
|
6125
|
+
SanitizeHtmlHelper.sanitize(this.items[parseInt(index.toString(), 10)].content);
|
|
6112
6126
|
}
|
|
6113
|
-
itemcnt.appendChild(this.fetchElement(ctn, this.items[index].content, index, false));
|
|
6127
|
+
itemcnt.appendChild(this.fetchElement(ctn, this.items[parseInt(index.toString(), 10)].content, index, false));
|
|
6114
6128
|
}
|
|
6115
6129
|
return itemcnt;
|
|
6116
6130
|
}
|
|
@@ -6352,7 +6366,7 @@ let Accordion = class Accordion extends Component {
|
|
|
6352
6366
|
ele.appendChild(innerItemEle);
|
|
6353
6367
|
}
|
|
6354
6368
|
else {
|
|
6355
|
-
ele.insertBefore(innerItemEle, itemEle[itemIndex]);
|
|
6369
|
+
ele.insertBefore(innerItemEle, itemEle[parseInt(itemIndex.toString(), 10)]);
|
|
6356
6370
|
}
|
|
6357
6371
|
EventHandler.add(innerItemEle.querySelector('.' + CLS_HEADER), 'focus', this.focusIn, this);
|
|
6358
6372
|
EventHandler.add(innerItemEle.querySelector('.' + CLS_HEADER), 'blur', this.focusOut, this);
|
|
@@ -6387,7 +6401,7 @@ let Accordion = class Accordion extends Component {
|
|
|
6387
6401
|
this.clearTemplate(['headerTemplate', 'itemTemplate'], index);
|
|
6388
6402
|
}
|
|
6389
6403
|
const itemEle = this.getItemElements();
|
|
6390
|
-
const ele = itemEle[index];
|
|
6404
|
+
const ele = itemEle[parseInt(index.toString(), 10)];
|
|
6391
6405
|
const items = this.getItems();
|
|
6392
6406
|
if (isNullOrUndefined(ele)) {
|
|
6393
6407
|
return;
|
|
@@ -6406,7 +6420,7 @@ let Accordion = class Accordion extends Component {
|
|
|
6406
6420
|
*/
|
|
6407
6421
|
select(index) {
|
|
6408
6422
|
const itemEle = this.getItemElements();
|
|
6409
|
-
const ele = itemEle[index];
|
|
6423
|
+
const ele = itemEle[parseInt(index.toString(), 10)];
|
|
6410
6424
|
if (isNullOrUndefined(ele) || isNullOrUndefined(select('.' + CLS_HEADER, ele))) {
|
|
6411
6425
|
return;
|
|
6412
6426
|
}
|
|
@@ -6422,7 +6436,7 @@ let Accordion = class Accordion extends Component {
|
|
|
6422
6436
|
*/
|
|
6423
6437
|
hideItem(index, isHidden) {
|
|
6424
6438
|
const itemEle = this.getItemElements();
|
|
6425
|
-
const ele = itemEle[index];
|
|
6439
|
+
const ele = itemEle[parseInt(index.toString(), 10)];
|
|
6426
6440
|
if (isNullOrUndefined(ele)) {
|
|
6427
6441
|
return;
|
|
6428
6442
|
}
|
|
@@ -6446,7 +6460,7 @@ let Accordion = class Accordion extends Component {
|
|
|
6446
6460
|
*/
|
|
6447
6461
|
enableItem(index, isEnable) {
|
|
6448
6462
|
const itemEle = this.getItemElements();
|
|
6449
|
-
const ele = itemEle[index];
|
|
6463
|
+
const ele = itemEle[parseInt(index.toString(), 10)];
|
|
6450
6464
|
if (isNullOrUndefined(ele)) {
|
|
6451
6465
|
return;
|
|
6452
6466
|
}
|
|
@@ -6497,7 +6511,7 @@ let Accordion = class Accordion extends Component {
|
|
|
6497
6511
|
}
|
|
6498
6512
|
}
|
|
6499
6513
|
else {
|
|
6500
|
-
const ele = itemEle[index];
|
|
6514
|
+
const ele = itemEle[parseInt(index.toString(), 10)];
|
|
6501
6515
|
if (isNullOrUndefined(ele) || !ele.classList.contains(CLS_SLCT) || (ele.classList.contains(CLS_ACTIVE) && isExpand)) {
|
|
6502
6516
|
return;
|
|
6503
6517
|
}
|
|
@@ -6547,7 +6561,7 @@ let Accordion = class Accordion extends Component {
|
|
|
6547
6561
|
ctnElePos = this.element;
|
|
6548
6562
|
}
|
|
6549
6563
|
else {
|
|
6550
|
-
ctnElePos = this.element.querySelectorAll('.' + CLS_ITEM$1)[index];
|
|
6564
|
+
ctnElePos = this.element.querySelectorAll('.' + CLS_ITEM$1)[parseInt(index.toString(), 10)];
|
|
6551
6565
|
}
|
|
6552
6566
|
this.templateEle.forEach((eleStr) => {
|
|
6553
6567
|
if (!isNullOrUndefined(ctnElePos.querySelector(eleStr))) {
|
|
@@ -6558,7 +6572,7 @@ let Accordion = class Accordion extends Component {
|
|
|
6558
6572
|
updateItem(item, index) {
|
|
6559
6573
|
if (!isNullOrUndefined(item)) {
|
|
6560
6574
|
const items = this.getItems();
|
|
6561
|
-
const itemObj = items[index];
|
|
6575
|
+
const itemObj = items[parseInt(index.toString(), 10)];
|
|
6562
6576
|
items.splice(index, 1);
|
|
6563
6577
|
this.restoreContent(index);
|
|
6564
6578
|
detach(item);
|
|
@@ -6602,11 +6616,11 @@ let Accordion = class Accordion extends Component {
|
|
|
6602
6616
|
if (!(newProp.items instanceof Array && oldProp.items instanceof Array)) {
|
|
6603
6617
|
const changedProp = Object.keys(newProp.items);
|
|
6604
6618
|
for (let j = 0; j < changedProp.length; j++) {
|
|
6605
|
-
const index = parseInt(Object.keys(newProp.items)[j], 10);
|
|
6606
|
-
const property = Object.keys(newProp.items[index])[0];
|
|
6607
|
-
const item = selectAll('.' + CLS_ITEM$1, this.element)[index];
|
|
6608
|
-
const oldVal = Object(oldProp.items[index])[property];
|
|
6609
|
-
const newVal = Object(newProp.items[index])[property];
|
|
6619
|
+
const index = parseInt(Object.keys(newProp.items)[parseInt(j.toString(), 10)], 10);
|
|
6620
|
+
const property = Object.keys(newProp.items[parseInt(index.toString(), 10)])[0];
|
|
6621
|
+
const item = selectAll('.' + CLS_ITEM$1, this.element)[parseInt(index.toString(), 10)];
|
|
6622
|
+
const oldVal = Object(oldProp.items[parseInt(index.toString(), 10)])[`${property}`];
|
|
6623
|
+
const newVal = Object(newProp.items[parseInt(index.toString(), 10)])[`${property}`];
|
|
6610
6624
|
const temp = property;
|
|
6611
6625
|
if (temp === 'header' || temp === 'iconCss' || temp === 'expanded' || ((temp === 'content') && (oldVal === ''))) {
|
|
6612
6626
|
this.updateItem(item, index);
|
|
@@ -6620,7 +6634,7 @@ let Accordion = class Accordion extends Component {
|
|
|
6620
6634
|
}
|
|
6621
6635
|
}
|
|
6622
6636
|
if (property === 'visible' && !isNullOrUndefined(item)) {
|
|
6623
|
-
if (Object(newProp.items[index])[property] === false) {
|
|
6637
|
+
if (Object(newProp.items[parseInt(index.toString(), 10)])[`${property}`] === false) {
|
|
6624
6638
|
item.classList.add(CLS_ITEMHIDE);
|
|
6625
6639
|
}
|
|
6626
6640
|
else {
|
|
@@ -7068,8 +7082,8 @@ let Menu = class Menu extends MenuBase {
|
|
|
7068
7082
|
let i;
|
|
7069
7083
|
let items = this.items;
|
|
7070
7084
|
const pIdField = this.getField('parentId');
|
|
7071
|
-
if (item[pIdField]) {
|
|
7072
|
-
idx = this.getIndex(item[pIdField].toString(), true);
|
|
7085
|
+
if (item[`${pIdField}`]) {
|
|
7086
|
+
idx = this.getIndex(item[`${pIdField}`].toString(), true);
|
|
7073
7087
|
for (i = 0; i < idx.length; i++) {
|
|
7074
7088
|
if (!items[idx[i]].items) {
|
|
7075
7089
|
items[idx[i]].items = [];
|
|
@@ -7247,6 +7261,9 @@ __decorate$7([
|
|
|
7247
7261
|
__decorate$7([
|
|
7248
7262
|
Property()
|
|
7249
7263
|
], TabItem.prototype, "id", void 0);
|
|
7264
|
+
__decorate$7([
|
|
7265
|
+
Property(-1)
|
|
7266
|
+
], TabItem.prototype, "tabIndex", void 0);
|
|
7250
7267
|
/**
|
|
7251
7268
|
* Tab is a content panel to show multiple contents in a single space, one at a time.
|
|
7252
7269
|
* Each Tab item has an associated content, that will be displayed based on the active Tab header item.
|
|
@@ -7445,9 +7462,10 @@ let Tab = class Tab extends Component {
|
|
|
7445
7462
|
this.setContentHeight(true);
|
|
7446
7463
|
this.select(this.selectedItem);
|
|
7447
7464
|
}
|
|
7465
|
+
this.tbItem = selectAll('.' + CLS_TB_ITEM, this.hdrEle);
|
|
7448
7466
|
if (!isNullOrUndefined(this.tbItem)) {
|
|
7449
7467
|
for (let i = 0; i < this.items.length; i++) {
|
|
7450
|
-
if (this.
|
|
7468
|
+
if (this.tbItem[i]) {
|
|
7451
7469
|
const tabID = this.items[i].id;
|
|
7452
7470
|
this.tbItem[i].setAttribute('data-id', tabID);
|
|
7453
7471
|
}
|
|
@@ -7548,7 +7566,7 @@ let Tab = class Tab extends Component {
|
|
|
7548
7566
|
if (!this.isReplace && tbItems.length > 0) {
|
|
7549
7567
|
const idList = [];
|
|
7550
7568
|
tbItems.forEach((item) => {
|
|
7551
|
-
idList.push(
|
|
7569
|
+
idList.push(this.getIndexFromEle(item.id));
|
|
7552
7570
|
});
|
|
7553
7571
|
maxId = Math.max(...idList);
|
|
7554
7572
|
}
|
|
@@ -7569,8 +7587,7 @@ let Tab = class Tab extends Component {
|
|
|
7569
7587
|
}
|
|
7570
7588
|
let itemIndex;
|
|
7571
7589
|
if (this.isReplace && !isNullOrUndefined(this.tbId) && this.tbId !== '') {
|
|
7572
|
-
|
|
7573
|
-
itemIndex = parseInt(this.tbId.substring(num + 1), 10);
|
|
7590
|
+
itemIndex = parseInt(this.tbId.substring(this.tbId.lastIndexOf('_') + 1), 10);
|
|
7574
7591
|
this.tbId = '';
|
|
7575
7592
|
}
|
|
7576
7593
|
else {
|
|
@@ -7612,7 +7629,8 @@ let Tab = class Tab extends Component {
|
|
|
7612
7629
|
this.isIconAlone = true;
|
|
7613
7630
|
}
|
|
7614
7631
|
}
|
|
7615
|
-
const
|
|
7632
|
+
const tabIndex = isNullOrUndefined(item.tabIndex) ? '-1' : item.tabIndex.toString();
|
|
7633
|
+
const wrapAttrs = (item.disabled) ? {} : { tabIndex: tabIndex, 'data-tabindex': tabIndex };
|
|
7616
7634
|
tCont.appendChild(this.btnCls.cloneNode(true));
|
|
7617
7635
|
const wrap = this.createElement('div', { className: CLS_WRAP, attrs: wrapAttrs });
|
|
7618
7636
|
wrap.appendChild(tCont);
|
|
@@ -8054,14 +8072,14 @@ let Tab = class Tab extends Component {
|
|
|
8054
8072
|
}
|
|
8055
8073
|
else {
|
|
8056
8074
|
if (!this.isVertical()) {
|
|
8057
|
-
setStyleAttribute(this.cntEle, { 'height': (this.element.
|
|
8075
|
+
setStyleAttribute(this.cntEle, { 'height': (this.element.clientHeight - hdrEle.offsetHeight) + 'px' });
|
|
8058
8076
|
}
|
|
8059
8077
|
}
|
|
8060
8078
|
}
|
|
8061
8079
|
else if (this.heightAdjustMode === 'Fill') {
|
|
8062
8080
|
addClass([this.element], [CLS_FILL]);
|
|
8063
8081
|
setStyleAttribute(this.element, { 'height': '100%' });
|
|
8064
|
-
|
|
8082
|
+
this.cntEle.style.height = 'calc(100% - ' + this.hdrEle.offsetHeight + 'px)';
|
|
8065
8083
|
}
|
|
8066
8084
|
else if (this.heightAdjustMode === 'Auto') {
|
|
8067
8085
|
if (this.isTemplate === true) {
|
|
@@ -8398,12 +8416,14 @@ let Tab = class Tab extends Component {
|
|
|
8398
8416
|
case 'shiftTab':
|
|
8399
8417
|
if (trg.classList.contains(CLS_WRAP)
|
|
8400
8418
|
&& closest(trg, '.' + CLS_TB_ITEM).classList.contains(CLS_ACTIVE$1) === false) {
|
|
8401
|
-
trg.setAttribute('tabindex', '-
|
|
8419
|
+
trg.setAttribute('tabindex', trg.getAttribute('data-tabindex'));
|
|
8402
8420
|
}
|
|
8403
8421
|
if (this.popObj && isVisible(this.popObj.element)) {
|
|
8404
8422
|
this.popObj.hide(this.hide);
|
|
8405
8423
|
}
|
|
8406
|
-
actEle.children.item(0).
|
|
8424
|
+
if (!isNullOrUndefined(actEle) && actEle.children.item(0).getAttribute('tabindex') === '-1') {
|
|
8425
|
+
actEle.children.item(0).setAttribute('tabindex', '0');
|
|
8426
|
+
}
|
|
8407
8427
|
break;
|
|
8408
8428
|
case 'moveLeft':
|
|
8409
8429
|
case 'moveRight':
|
|
@@ -8453,6 +8473,9 @@ let Tab = class Tab extends Component {
|
|
|
8453
8473
|
return;
|
|
8454
8474
|
}
|
|
8455
8475
|
}
|
|
8476
|
+
getIndexFromEle(id) {
|
|
8477
|
+
return parseInt(id.substring(id.lastIndexOf('_') + 1), 10);
|
|
8478
|
+
}
|
|
8456
8479
|
hoverHandler(e) {
|
|
8457
8480
|
const trg = e.target;
|
|
8458
8481
|
if (!isNullOrUndefined(trg.classList) && trg.classList.contains(CLS_ICON_CLOSE)) {
|
|
@@ -8471,8 +8494,7 @@ let Tab = class Tab extends Component {
|
|
|
8471
8494
|
const hdr = this.element.querySelectorAll('.' + CLS_TB_ITEM)[index];
|
|
8472
8495
|
let itemIndex;
|
|
8473
8496
|
if (hdr && !isNullOrUndefined(hdr.id) && hdr.id !== '') {
|
|
8474
|
-
|
|
8475
|
-
itemIndex = parseInt(hdr.id.substring(num + 1), 10);
|
|
8497
|
+
itemIndex = this.getIndexFromEle(hdr.id);
|
|
8476
8498
|
}
|
|
8477
8499
|
else {
|
|
8478
8500
|
itemIndex = index;
|
|
@@ -8787,7 +8809,7 @@ let Tab = class Tab extends Component {
|
|
|
8787
8809
|
}
|
|
8788
8810
|
if (value === true) {
|
|
8789
8811
|
tbItems.classList.remove(CLS_DISABLE$4, CLS_OVERLAY$2);
|
|
8790
|
-
tbItems.firstElementChild.setAttribute('tabindex', '-
|
|
8812
|
+
tbItems.firstElementChild.setAttribute('tabindex', tbItems.firstElementChild.getAttribute('data-tabindex'));
|
|
8791
8813
|
}
|
|
8792
8814
|
else {
|
|
8793
8815
|
tbItems.classList.add(CLS_DISABLE$4, CLS_OVERLAY$2);
|
|
@@ -9042,7 +9064,7 @@ let Tab = class Tab extends Component {
|
|
|
9042
9064
|
this.selectingID = this.extIndex(trg.id);
|
|
9043
9065
|
}
|
|
9044
9066
|
if (!isNullOrUndefined(this.prevItem) && !this.prevItem.classList.contains(CLS_DISABLE$4)) {
|
|
9045
|
-
this.prevItem.children.item(0).setAttribute('tabindex', '
|
|
9067
|
+
this.prevItem.children.item(0).setAttribute('tabindex', this.prevItem.firstElementChild.getAttribute('tabindex'));
|
|
9046
9068
|
}
|
|
9047
9069
|
const eventArg = {
|
|
9048
9070
|
event: event,
|
|
@@ -9288,7 +9310,8 @@ let Tab = class Tab extends Component {
|
|
|
9288
9310
|
this.isIconAlone = true;
|
|
9289
9311
|
}
|
|
9290
9312
|
}
|
|
9291
|
-
const
|
|
9313
|
+
const tabIndex = isNullOrUndefined(item.tabIndex) ? '-1' : item.tabIndex.toString();
|
|
9314
|
+
const wrapAtt = (item.disabled) ? {} : { tabIndex: tabIndex, 'data-tabindex': tabIndex };
|
|
9292
9315
|
tConts.appendChild(this.btnCls.cloneNode(true));
|
|
9293
9316
|
const wraper = this.createElement('div', { className: CLS_WRAP, attrs: wrapAtt });
|
|
9294
9317
|
wraper.appendChild(tConts);
|
|
@@ -9332,9 +9355,7 @@ let Tab = class Tab extends Component {
|
|
|
9332
9355
|
else {
|
|
9333
9356
|
const tabItems = this.element.querySelector('.' + CLS_TB_ITEMS);
|
|
9334
9357
|
const element = this.element.querySelector('.' + CLS_TB_ITEM + '.' + CLS_ACTIVE$1);
|
|
9335
|
-
const
|
|
9336
|
-
const num = (id.indexOf('_'));
|
|
9337
|
-
const index = parseInt(id.substring(num + 1), 10);
|
|
9358
|
+
const index = this.getIndexFromEle(element.id);
|
|
9338
9359
|
const header = element.innerText;
|
|
9339
9360
|
const detachContent = this.element.querySelector('.' + CLS_CONTENT$1).querySelector('.' + CLS_ACTIVE$1).children[0];
|
|
9340
9361
|
const mainContents = detachContent.innerHTML;
|
|
@@ -9353,7 +9374,10 @@ let Tab = class Tab extends Component {
|
|
|
9353
9374
|
const conte = this.createElement('div', {
|
|
9354
9375
|
className: CLS_TEXT_WRAP, innerHTML: txtString + this.btnCls.outerHTML
|
|
9355
9376
|
}).outerHTML;
|
|
9356
|
-
const
|
|
9377
|
+
const tabIndex = element.firstElementChild.getAttribute('data-tabindex');
|
|
9378
|
+
const wrap = this.createElement('div', {
|
|
9379
|
+
className: CLS_WRAP, innerHTML: conte, attrs: { tabIndex: tabIndex, 'data-tabindex': tabIndex }
|
|
9380
|
+
});
|
|
9357
9381
|
tabItems.insertBefore(this.createElement('div', attr), tabItems.children[index + 1]);
|
|
9358
9382
|
this.element.querySelector('.' + CLS_TB_ITEM + '.' + CLS_ACTIVE$1).appendChild(wrap);
|
|
9359
9383
|
const crElem = this.createElement('div', { innerHTML: mainContents });
|
|
@@ -9525,6 +9549,7 @@ const SMALL = 'e-small';
|
|
|
9525
9549
|
const CHILD = 'e-has-child';
|
|
9526
9550
|
const ITEM_ANIMATION_ACTIVE = 'e-animation-active';
|
|
9527
9551
|
const DISABLED$1 = 'e-disabled';
|
|
9552
|
+
const PREVENTSELECT = 'e-prevent';
|
|
9528
9553
|
const treeAriaAttr = {
|
|
9529
9554
|
treeRole: 'group',
|
|
9530
9555
|
itemRole: 'treeitem',
|
|
@@ -9570,6 +9595,9 @@ __decorate$8([
|
|
|
9570
9595
|
__decorate$8([
|
|
9571
9596
|
Property(null)
|
|
9572
9597
|
], FieldsSettings.prototype, "query", void 0);
|
|
9598
|
+
__decorate$8([
|
|
9599
|
+
Property('selectable')
|
|
9600
|
+
], FieldsSettings.prototype, "selectable", void 0);
|
|
9573
9601
|
__decorate$8([
|
|
9574
9602
|
Property('selected')
|
|
9575
9603
|
], FieldsSettings.prototype, "selected", void 0);
|
|
@@ -9614,11 +9642,11 @@ __decorate$8([
|
|
|
9614
9642
|
* The TreeView component is used to represent hierarchical data in a tree like structure with advanced
|
|
9615
9643
|
* functions to perform edit, drag and drop, selection with check-box, and more.
|
|
9616
9644
|
* ```html
|
|
9617
|
-
*
|
|
9645
|
+
* <div id="tree"></div>
|
|
9618
9646
|
* ```
|
|
9619
9647
|
* ```typescript
|
|
9620
|
-
*
|
|
9621
|
-
*
|
|
9648
|
+
* let treeObj: TreeView = new TreeView();
|
|
9649
|
+
* treeObj.appendTo('#tree');
|
|
9622
9650
|
* ```
|
|
9623
9651
|
*/
|
|
9624
9652
|
let TreeView = TreeView_1 = class TreeView extends Component {
|
|
@@ -9636,7 +9664,7 @@ let TreeView = TreeView_1 = class TreeView extends Component {
|
|
|
9636
9664
|
this.changeDataSource = false;
|
|
9637
9665
|
this.hasTemplate = false;
|
|
9638
9666
|
this.isFirstRender = false;
|
|
9639
|
-
// Specifies whether the node is dropped or not
|
|
9667
|
+
// Specifies whether the node is dropped or not
|
|
9640
9668
|
this.isNodeDropped = false;
|
|
9641
9669
|
this.mouseDownStatus = false;
|
|
9642
9670
|
}
|
|
@@ -9685,7 +9713,9 @@ let TreeView = TreeView_1 = class TreeView extends Component {
|
|
|
9685
9713
|
csEnter: 'ctrl+shift+enter',
|
|
9686
9714
|
csHome: 'ctrl+shift+home',
|
|
9687
9715
|
csEnd: 'ctrl+shift+end',
|
|
9688
|
-
space: 'space'
|
|
9716
|
+
space: 'space',
|
|
9717
|
+
shiftSpace: 'shift+space',
|
|
9718
|
+
ctrlSpace: 'ctrl+space'
|
|
9689
9719
|
};
|
|
9690
9720
|
this.listBaseOption = {
|
|
9691
9721
|
expandCollapse: true,
|
|
@@ -10205,6 +10235,10 @@ let TreeView = TreeView_1 = class TreeView extends Component {
|
|
|
10205
10235
|
};
|
|
10206
10236
|
if (!this.isRefreshed) {
|
|
10207
10237
|
this.trigger('drawNode', eventArgs);
|
|
10238
|
+
if (e.curData[this.fields.selectable] === false && !this.showCheckBox) {
|
|
10239
|
+
e.item.classList.add(PREVENTSELECT);
|
|
10240
|
+
e.item.firstElementChild.setAttribute('style', 'cursor: not-allowed');
|
|
10241
|
+
}
|
|
10208
10242
|
}
|
|
10209
10243
|
}
|
|
10210
10244
|
frameMouseHandler(e) {
|
|
@@ -10893,7 +10927,7 @@ let TreeView = TreeView_1 = class TreeView extends Component {
|
|
|
10893
10927
|
else {
|
|
10894
10928
|
let classList$$1 = target.classList;
|
|
10895
10929
|
let li = closest(target, '.' + LISTITEM);
|
|
10896
|
-
if (!li) {
|
|
10930
|
+
if (!li || (li.classList.contains(PREVENTSELECT) && !(classList$$1.contains(EXPANDABLE) || classList$$1.contains(COLLAPSIBLE)))) {
|
|
10897
10931
|
return;
|
|
10898
10932
|
}
|
|
10899
10933
|
else if (event.originalEvent.which !== 3) {
|
|
@@ -11360,7 +11394,7 @@ let TreeView = TreeView_1 = class TreeView extends Component {
|
|
|
11360
11394
|
if (this.isLoaded) {
|
|
11361
11395
|
eventArgs = this.getSelectEvent(li, 'select', e);
|
|
11362
11396
|
this.trigger('nodeSelecting', eventArgs, (observedArgs) => {
|
|
11363
|
-
if (!observedArgs.cancel) {
|
|
11397
|
+
if (!observedArgs.cancel && !observedArgs.node.classList.contains(PREVENTSELECT)) {
|
|
11364
11398
|
this.nodeSelectAction(li, e, observedArgs, multiSelect);
|
|
11365
11399
|
}
|
|
11366
11400
|
});
|
|
@@ -11574,6 +11608,9 @@ let TreeView = TreeView_1 = class TreeView extends Component {
|
|
|
11574
11608
|
if (this.showCheckBox) {
|
|
11575
11609
|
this.checkNode(e);
|
|
11576
11610
|
}
|
|
11611
|
+
else {
|
|
11612
|
+
this.toggleSelect(focusedNode, e);
|
|
11613
|
+
}
|
|
11577
11614
|
break;
|
|
11578
11615
|
case 'moveRight':
|
|
11579
11616
|
this.openNode(this.enableRtl ? false : true, e);
|
|
@@ -11613,6 +11650,8 @@ let TreeView = TreeView_1 = class TreeView extends Component {
|
|
|
11613
11650
|
case 'ctrlEnter':
|
|
11614
11651
|
case 'shiftEnter':
|
|
11615
11652
|
case 'csEnter':
|
|
11653
|
+
case 'shiftSpace':
|
|
11654
|
+
case 'ctrlSpace':
|
|
11616
11655
|
this.toggleSelect(focusedNode, e);
|
|
11617
11656
|
break;
|
|
11618
11657
|
case 'f2':
|
|
@@ -12005,7 +12044,7 @@ let TreeView = TreeView_1 = class TreeView extends Component {
|
|
|
12005
12044
|
}
|
|
12006
12045
|
setFocus(preNode, nextNode) {
|
|
12007
12046
|
removeClass([preNode], [HOVER, FOCUS]);
|
|
12008
|
-
if (!nextNode.classList.contains('e-disable')) {
|
|
12047
|
+
if (!nextNode.classList.contains('e-disable') && !nextNode.classList.contains(PREVENTSELECT)) {
|
|
12009
12048
|
addClass([nextNode], [HOVER, FOCUS]);
|
|
12010
12049
|
this.updateIdAttr(preNode, nextNode);
|
|
12011
12050
|
}
|
|
@@ -12042,7 +12081,7 @@ let TreeView = TreeView_1 = class TreeView extends Component {
|
|
|
12042
12081
|
}
|
|
12043
12082
|
}
|
|
12044
12083
|
setHover(li) {
|
|
12045
|
-
if (!li.classList.contains(HOVER)) {
|
|
12084
|
+
if (!li.classList.contains(HOVER) && !li.classList.contains(PREVENTSELECT)) {
|
|
12046
12085
|
this.removeHover();
|
|
12047
12086
|
addClass([li], HOVER);
|
|
12048
12087
|
}
|
|
@@ -12066,6 +12105,7 @@ let TreeView = TreeView_1 = class TreeView extends Component {
|
|
|
12066
12105
|
let pNode = closest(currLi.parentNode, '.' + LISTITEM);
|
|
12067
12106
|
let pid = pNode ? pNode.getAttribute('data-uid') : null;
|
|
12068
12107
|
let selected = currLi.classList.contains(ACTIVE);
|
|
12108
|
+
let selectable = currLi.classList.contains(PREVENTSELECT) ? false : true;
|
|
12069
12109
|
let expanded = (currLi.getAttribute('aria-expanded') === 'true') ? true : false;
|
|
12070
12110
|
let hasChildren = currLi.getAttribute('aria-expanded') !== null ? true : (select('.' + EXPANDABLE, currLi) || select('.' + COLLAPSIBLE, currLi)) != null ? true : false;
|
|
12071
12111
|
let checked = null;
|
|
@@ -12074,7 +12114,7 @@ let TreeView = TreeView_1 = class TreeView extends Component {
|
|
|
12074
12114
|
checked = checkboxElement.getAttribute('aria-checked');
|
|
12075
12115
|
}
|
|
12076
12116
|
return {
|
|
12077
|
-
id: id, text: text, parentID: pid, selected: selected, expanded: expanded,
|
|
12117
|
+
id: id, text: text, parentID: pid, selected: selected, selectable: selectable, expanded: expanded,
|
|
12078
12118
|
isChecked: checked, hasChildren: hasChildren
|
|
12079
12119
|
};
|
|
12080
12120
|
}
|
|
@@ -13097,7 +13137,7 @@ let TreeView = TreeView_1 = class TreeView extends Component {
|
|
|
13097
13137
|
dropUl = dropEle;
|
|
13098
13138
|
}
|
|
13099
13139
|
refNode = dropUl.childNodes[index];
|
|
13100
|
-
if (!this.isFirstRender ||
|
|
13140
|
+
if (!this.isFirstRender || this.dataType === 1) {
|
|
13101
13141
|
if (refNode || this.sortOrder === 'None') {
|
|
13102
13142
|
for (let i = 0; i < li.length; i++) {
|
|
13103
13143
|
dropUl.insertBefore(li[i], refNode);
|
|
@@ -14024,8 +14064,8 @@ let TreeView = TreeView_1 = class TreeView extends Component {
|
|
|
14024
14064
|
}
|
|
14025
14065
|
}
|
|
14026
14066
|
/**
|
|
14027
|
-
*
|
|
14028
|
-
*
|
|
14067
|
+
* Editing can also be enabled by using the `beginEdit` property, instead of clicking on the
|
|
14068
|
+
* TreeView node. On passing the node ID or element through this property, the edit textBox
|
|
14029
14069
|
* will be created for the particular node thus allowing us to edit it.
|
|
14030
14070
|
* @param {string | Element} node - Specifies ID of TreeView node/TreeView node.
|
|
14031
14071
|
*/
|
|
@@ -14136,7 +14176,7 @@ let TreeView = TreeView_1 = class TreeView extends Component {
|
|
|
14136
14176
|
return disabledNodes;
|
|
14137
14177
|
}
|
|
14138
14178
|
/**
|
|
14139
|
-
*
|
|
14179
|
+
* Gets the node's data such as id, text, parentID, selected, isChecked, and expanded by passing the node element or it's ID.
|
|
14140
14180
|
* @param {string | Element} node - Specifies ID of TreeView node/TreeView node.
|
|
14141
14181
|
*/
|
|
14142
14182
|
getNode(node) {
|
|
@@ -14500,7 +14540,6 @@ const CLOSE = 'e-close';
|
|
|
14500
14540
|
const OPEN = 'e-open';
|
|
14501
14541
|
const TRASITION = 'e-transition';
|
|
14502
14542
|
const DEFAULTBACKDROP = 'e-sidebar-overlay';
|
|
14503
|
-
const CONTEXTBACKDROP = 'e-backdrop';
|
|
14504
14543
|
const RTL$2 = 'e-rtl';
|
|
14505
14544
|
const RIGHT = 'e-right';
|
|
14506
14545
|
const LEFT = 'e-left';
|
|
@@ -14671,7 +14710,7 @@ let Sidebar = class Sidebar extends Component {
|
|
|
14671
14710
|
destroyBackDrop() {
|
|
14672
14711
|
const sibling = document.querySelector('.e-main-content') || this.targetEle;
|
|
14673
14712
|
if (this.target && this.showBackdrop && sibling) {
|
|
14674
|
-
removeClass([
|
|
14713
|
+
removeClass([this.defaultBackdropDiv], DEFAULTBACKDROP);
|
|
14675
14714
|
}
|
|
14676
14715
|
else if (this.showBackdrop && this.modal) {
|
|
14677
14716
|
this.modal.style.display = 'none';
|
|
@@ -14807,8 +14846,12 @@ let Sidebar = class Sidebar extends Component {
|
|
|
14807
14846
|
}
|
|
14808
14847
|
createBackDrop() {
|
|
14809
14848
|
if (this.target && this.showBackdrop && this.getState()) {
|
|
14849
|
+
const targetString = this.target;
|
|
14810
14850
|
const sibling = document.querySelector('.e-main-content') || this.targetEle;
|
|
14811
|
-
|
|
14851
|
+
this.defaultBackdropDiv = this.createElement('div');
|
|
14852
|
+
addClass([this.defaultBackdropDiv], DEFAULTBACKDROP);
|
|
14853
|
+
setStyleAttribute(this.defaultBackdropDiv, { height: targetString.style.height });
|
|
14854
|
+
sibling.appendChild(this.defaultBackdropDiv);
|
|
14812
14855
|
}
|
|
14813
14856
|
else if (this.showBackdrop && !this.modal && this.getState()) {
|
|
14814
14857
|
this.modal = this.createElement('div');
|
|
@@ -15398,11 +15441,13 @@ let Breadcrumb = class Breadcrumb extends Component {
|
|
|
15398
15441
|
}
|
|
15399
15442
|
if (args.curData.isEmptyUrl) {
|
|
15400
15443
|
args.item.children[0].removeAttribute('href');
|
|
15401
|
-
if ((!isLastItem || (isLastItem && this.enableActiveItemNavigation)) && !(eventArgs.item.disabled
|
|
15444
|
+
if ((!isLastItem || (isLastItem && this.enableActiveItemNavigation)) && !(eventArgs.item.disabled
|
|
15445
|
+
|| this.disabled)) {
|
|
15402
15446
|
args.item.children[0].setAttribute(TABINDEX, '0');
|
|
15403
15447
|
EventHandler.add(args.item.children[0], 'keydown', this.keyDownHandler, this);
|
|
15404
15448
|
}
|
|
15405
15449
|
}
|
|
15450
|
+
args.item.removeAttribute('role');
|
|
15406
15451
|
if (isLastItem) {
|
|
15407
15452
|
args.item.setAttribute('data-active-item', '');
|
|
15408
15453
|
}
|
|
@@ -15412,7 +15457,8 @@ let Breadcrumb = class Breadcrumb extends Component {
|
|
|
15412
15457
|
}
|
|
15413
15458
|
};
|
|
15414
15459
|
for (let i = 0; i < len; i % 2 && j++, i++) {
|
|
15415
|
-
isActiveItem = (this.activeItem && (this.activeItem === items[j].url ||
|
|
15460
|
+
isActiveItem = (this.activeItem && (this.activeItem === items[j].url ||
|
|
15461
|
+
this.activeItem === items[j].text));
|
|
15416
15462
|
if (isCollasped && i > 1 && i < len - 2) {
|
|
15417
15463
|
continue;
|
|
15418
15464
|
}
|
|
@@ -15438,7 +15484,8 @@ let Breadcrumb = class Breadcrumb extends Component {
|
|
|
15438
15484
|
else {
|
|
15439
15485
|
isSingleLevel = true;
|
|
15440
15486
|
}
|
|
15441
|
-
item = [extend({}, items[j].properties ?
|
|
15487
|
+
item = [extend({}, items[j].properties ?
|
|
15488
|
+
items[j].properties
|
|
15442
15489
|
: items[j])];
|
|
15443
15490
|
if (!item[0].url && !this.itemTemplate) {
|
|
15444
15491
|
item = [extend({}, item[0], { isEmptyUrl: true, url: '#' })];
|
|
@@ -15526,7 +15573,8 @@ let Breadcrumb = class Breadcrumb extends Component {
|
|
|
15526
15573
|
for (let i = 0; i < liElems.length - 2; i++) {
|
|
15527
15574
|
if (liWidth > width) {
|
|
15528
15575
|
maxItems = Math.ceil((i - 1) / 2) + ((this.overflowMode === 'Menu' && i <= 2) ? 0 : 1);
|
|
15529
|
-
if (((this.maxItems > maxItems && !(this.maxItems > -1 && maxItems
|
|
15576
|
+
if (((this.maxItems > maxItems && !(this.maxItems > -1 && maxItems === -1)) ||
|
|
15577
|
+
this.maxItems === -1) && this._maxItems !== maxItems) {
|
|
15530
15578
|
this._maxItems = maxItems;
|
|
15531
15579
|
this.initPvtProps();
|
|
15532
15580
|
return this.reRenderItems();
|
|
@@ -15569,7 +15617,7 @@ let Breadcrumb = class Breadcrumb extends Component {
|
|
|
15569
15617
|
}
|
|
15570
15618
|
hasField(items, field) {
|
|
15571
15619
|
for (let i = 0, len = items.length; i < len; i++) {
|
|
15572
|
-
if (items[i][field]) {
|
|
15620
|
+
if (items[i][`${field}`]) {
|
|
15573
15621
|
return true;
|
|
15574
15622
|
}
|
|
15575
15623
|
}
|
|
@@ -15833,8 +15881,8 @@ let Breadcrumb = class Breadcrumb extends Component {
|
|
|
15833
15881
|
* @returns {void}
|
|
15834
15882
|
*/
|
|
15835
15883
|
destroy() {
|
|
15836
|
-
|
|
15837
|
-
|
|
15884
|
+
const classes = [];
|
|
15885
|
+
const attributes$$1 = ['aria-label'];
|
|
15838
15886
|
if (this.cssClass) {
|
|
15839
15887
|
classes.concat(this.cssClass.split(' '));
|
|
15840
15888
|
}
|
|
@@ -16441,15 +16489,15 @@ let Carousel = class Carousel extends Component {
|
|
|
16441
16489
|
if (isNullOrUndefined(activeSlide) && this.showIndicators) {
|
|
16442
16490
|
const activeIndicator = this.element.querySelector(`.${CLS_INDICATOR_BAR}.${CLS_ACTIVE$2}`);
|
|
16443
16491
|
const activeIndex = parseInt(activeIndicator.dataset.index, 10);
|
|
16444
|
-
addClass([allSlides[activeIndex]], CLS_ACTIVE$2);
|
|
16492
|
+
addClass([allSlides[parseInt(activeIndex.toString(), 10)]], CLS_ACTIVE$2);
|
|
16445
16493
|
return;
|
|
16446
16494
|
}
|
|
16447
16495
|
else if (isNullOrUndefined(activeSlide)) {
|
|
16448
|
-
addClass([allSlides[currentIndex]], CLS_ACTIVE$2);
|
|
16496
|
+
addClass([allSlides[parseInt(currentIndex.toString(), 10)]], CLS_ACTIVE$2);
|
|
16449
16497
|
return;
|
|
16450
16498
|
}
|
|
16451
16499
|
const activeIndex = parseInt(activeSlide.dataset.index, 10);
|
|
16452
|
-
const currentSlide = allSlides[currentIndex];
|
|
16500
|
+
const currentSlide = allSlides[parseInt(currentIndex.toString(), 10)];
|
|
16453
16501
|
const eventArgs = {
|
|
16454
16502
|
currentIndex: activeIndex,
|
|
16455
16503
|
nextIndex: currentIndex,
|
|
@@ -16468,10 +16516,10 @@ let Carousel = class Carousel extends Component {
|
|
|
16468
16516
|
attributes(args.nextSlide, { 'aria-hidden': 'false' });
|
|
16469
16517
|
const slideIndicators = [].slice.call(this.element.querySelectorAll(`.${CLS_INDICATOR_BAR}`));
|
|
16470
16518
|
if (slideIndicators.length > 0) {
|
|
16471
|
-
attributes(slideIndicators[activeIndex], { 'aria-current': 'false' });
|
|
16472
|
-
attributes(slideIndicators[currentIndex], { 'aria-current': 'true' });
|
|
16519
|
+
attributes(slideIndicators[parseInt(activeIndex.toString(), 10)], { 'aria-current': 'false' });
|
|
16520
|
+
attributes(slideIndicators[parseInt(currentIndex.toString(), 10)], { 'aria-current': 'true' });
|
|
16473
16521
|
removeClass(slideIndicators, CLS_ACTIVE$2);
|
|
16474
|
-
addClass([slideIndicators[currentIndex]], CLS_ACTIVE$2);
|
|
16522
|
+
addClass([slideIndicators[parseInt(currentIndex.toString(), 10)]], CLS_ACTIVE$2);
|
|
16475
16523
|
}
|
|
16476
16524
|
this.slideChangedEventArgs = {
|
|
16477
16525
|
currentIndex: args.nextIndex,
|
|
@@ -16483,7 +16531,7 @@ let Carousel = class Carousel extends Component {
|
|
|
16483
16531
|
};
|
|
16484
16532
|
if (this.partialVisible) {
|
|
16485
16533
|
const container = this.element.querySelector('.' + CLS_ITEMS$2);
|
|
16486
|
-
const slideWidth = allSlides[currentIndex].clientWidth;
|
|
16534
|
+
const slideWidth = allSlides[parseInt(currentIndex.toString(), 10)].clientWidth;
|
|
16487
16535
|
container.style.transitionProperty = 'transform';
|
|
16488
16536
|
if (this.loop) {
|
|
16489
16537
|
if (this.slideChangedEventArgs.currentIndex === 0 && this.slideChangedEventArgs.slideDirection === 'Next') {
|
|
@@ -16555,10 +16603,10 @@ let Carousel = class Carousel extends Component {
|
|
|
16555
16603
|
const keys = Object.keys(attribute);
|
|
16556
16604
|
for (const key of keys) {
|
|
16557
16605
|
if (key === 'class') {
|
|
16558
|
-
addClass([element], attribute[key]);
|
|
16606
|
+
addClass([element], attribute[`${key}`]);
|
|
16559
16607
|
}
|
|
16560
16608
|
else {
|
|
16561
|
-
element.setAttribute(key, attribute[key]);
|
|
16609
|
+
element.setAttribute(key, attribute[`${key}`]);
|
|
16562
16610
|
}
|
|
16563
16611
|
}
|
|
16564
16612
|
}
|
|
@@ -16672,7 +16720,7 @@ let Carousel = class Carousel extends Component {
|
|
|
16672
16720
|
}
|
|
16673
16721
|
}
|
|
16674
16722
|
swipeHandler(e) {
|
|
16675
|
-
if (this.element.classList.contains(CLS_HOVER)) {
|
|
16723
|
+
if (this.element.classList.contains(CLS_HOVER) || isNullOrUndefined(this.slideItems) || this.slideItems.length <= 1) {
|
|
16676
16724
|
return;
|
|
16677
16725
|
}
|
|
16678
16726
|
const direction = (e.swipeDirection === 'Right') ? 'Previous' : 'Next';
|
|
@@ -17076,7 +17124,7 @@ let AppBar = class AppBar extends Component {
|
|
|
17076
17124
|
const keys = Object.keys(oldProp.htmlAttributes);
|
|
17077
17125
|
for (const key of keys) {
|
|
17078
17126
|
if (key === 'class') {
|
|
17079
|
-
removeClass([this.element], oldProp.htmlAttributes[key]);
|
|
17127
|
+
removeClass([this.element], oldProp.htmlAttributes[`${key}`]);
|
|
17080
17128
|
}
|
|
17081
17129
|
else {
|
|
17082
17130
|
this.element.removeAttribute(key);
|
|
@@ -17105,10 +17153,10 @@ let AppBar = class AppBar extends Component {
|
|
|
17105
17153
|
const keys = Object.keys(attribute);
|
|
17106
17154
|
for (const key of keys) {
|
|
17107
17155
|
if (key === 'class') {
|
|
17108
|
-
addClass([element], attribute[key]);
|
|
17156
|
+
addClass([element], attribute[`${key}`]);
|
|
17109
17157
|
}
|
|
17110
17158
|
else {
|
|
17111
|
-
element.setAttribute(key, attribute[key]);
|
|
17159
|
+
element.setAttribute(key, attribute[`${key}`]);
|
|
17112
17160
|
}
|
|
17113
17161
|
}
|
|
17114
17162
|
}
|