@syncfusion/ej2-navigations 20.3.60 → 20.4.40
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 +26 -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 +263 -212
- package/dist/es6/ej2-navigations.es2015.js.map +1 -1
- package/dist/es6/ej2-navigations.es5.js +260 -209
- 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 +12 -12
- 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 +19 -12
- 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);
|
|
@@ -1414,6 +1415,14 @@ let MenuBase = class MenuBase extends Component {
|
|
|
1414
1415
|
if (fliIdx === (e.action === DOWNARROW ? cul.childElementCount : -1)) {
|
|
1415
1416
|
fliIdx = defaultIdx;
|
|
1416
1417
|
}
|
|
1418
|
+
if (cul.children[fliIdx].classList.contains(HIDE)) {
|
|
1419
|
+
if (e.action === DOWNARROW && fliIdx === cul.childElementCount - 1) {
|
|
1420
|
+
fliIdx = defaultIdx;
|
|
1421
|
+
}
|
|
1422
|
+
else if (e.action === UPARROW && fliIdx === 0) {
|
|
1423
|
+
fliIdx = defaultIdx;
|
|
1424
|
+
}
|
|
1425
|
+
}
|
|
1417
1426
|
}
|
|
1418
1427
|
}
|
|
1419
1428
|
const cli = cul.children[fliIdx];
|
|
@@ -1579,6 +1588,7 @@ let MenuBase = class MenuBase extends Component {
|
|
|
1579
1588
|
this.isCMenu = false;
|
|
1580
1589
|
}
|
|
1581
1590
|
if (this.isMenu && trgtpopUp && popupId.length) {
|
|
1591
|
+
// eslint-disable-next-line
|
|
1582
1592
|
trgtliId = new RegExp('(.*)-ej2menu-' + this.element.id + '-popup').exec(popupId)[1];
|
|
1583
1593
|
closedLi = trgtpopUp.querySelector('[id="' + trgtliId + '"]');
|
|
1584
1594
|
trgtLi = (liElem && trgtpopUp.querySelector('[id="' + liElem.id + '"]'));
|
|
@@ -1587,7 +1597,7 @@ let MenuBase = class MenuBase extends Component {
|
|
|
1587
1597
|
if (isOpen && this.hamburgerMode && ulIndex && !(submenus.length)) {
|
|
1588
1598
|
this.afterCloseMenu(e);
|
|
1589
1599
|
}
|
|
1590
|
-
else if (isOpen && !this.hamburgerMode && this.navIdx.length && closedLi && !trgtLi && this.keyType !==
|
|
1600
|
+
else if (isOpen && !this.hamburgerMode && this.navIdx.length && closedLi && !trgtLi && this.keyType !== 'left') {
|
|
1591
1601
|
let ele = (e && e.target.classList.contains('e-vscroll'))
|
|
1592
1602
|
? closest(e.target, '.e-menu-wrapper') : null;
|
|
1593
1603
|
if (ele) {
|
|
@@ -1628,7 +1638,7 @@ let MenuBase = class MenuBase extends Component {
|
|
|
1628
1638
|
if (sli) {
|
|
1629
1639
|
sli.setAttribute('aria-expanded', 'false');
|
|
1630
1640
|
sli.classList.remove(SELECTED);
|
|
1631
|
-
if (observedCloseArgs.isFocused && liElem || this.keyType ===
|
|
1641
|
+
if (observedCloseArgs.isFocused && liElem || this.keyType === 'left') {
|
|
1632
1642
|
sli.classList.add(FOCUSED);
|
|
1633
1643
|
sli.focus();
|
|
1634
1644
|
}
|
|
@@ -1892,6 +1902,7 @@ let MenuBase = class MenuBase extends Component {
|
|
|
1892
1902
|
this.isNestedOrVertical ? this.left - this.popupWrapper.offsetWidth - this.lItem.parentElement.offsetWidth + 2
|
|
1893
1903
|
: this.left - this.popupWrapper.offsetWidth + this.lItem.offsetWidth;
|
|
1894
1904
|
}
|
|
1905
|
+
// eslint-disable-next-line
|
|
1895
1906
|
if (this.template && (this.isReact || this.isAngular)) {
|
|
1896
1907
|
requestAnimationFrame(() => {
|
|
1897
1908
|
this.collision();
|
|
@@ -2121,7 +2132,7 @@ let MenuBase = class MenuBase extends Component {
|
|
|
2121
2132
|
itemCreated: (args) => {
|
|
2122
2133
|
if (args.curData[this.getField('separator', level)]) {
|
|
2123
2134
|
args.item.classList.add(SEPARATOR);
|
|
2124
|
-
args.item.
|
|
2135
|
+
args.item.setAttribute('role', 'separator');
|
|
2125
2136
|
}
|
|
2126
2137
|
if (showIcon && !args.curData[args.fields.iconCss]
|
|
2127
2138
|
&& !args.curData[this.getField('separator', level)]) {
|
|
@@ -2133,9 +2144,6 @@ let MenuBase = class MenuBase extends Component {
|
|
|
2133
2144
|
args.item.appendChild(span);
|
|
2134
2145
|
args.item.setAttribute('aria-haspopup', 'true');
|
|
2135
2146
|
args.item.setAttribute('aria-expanded', 'false');
|
|
2136
|
-
if (!this.isMenu) {
|
|
2137
|
-
args.item.removeAttribute('role');
|
|
2138
|
-
}
|
|
2139
2147
|
args.item.classList.add('e-menu-caret-icon');
|
|
2140
2148
|
}
|
|
2141
2149
|
if (this.isMenu && this.template) {
|
|
@@ -2147,6 +2155,7 @@ let MenuBase = class MenuBase extends Component {
|
|
|
2147
2155
|
if (args.item.classList.contains('e-has-child')) {
|
|
2148
2156
|
args.item.classList.remove('e-has-child');
|
|
2149
2157
|
}
|
|
2158
|
+
args.item.removeAttribute('aria-level');
|
|
2150
2159
|
}
|
|
2151
2160
|
const eventArgs = { item: args.curData, element: args.item };
|
|
2152
2161
|
this.trigger('beforeItemRender', eventArgs);
|
|
@@ -2158,9 +2167,7 @@ let MenuBase = class MenuBase extends Component {
|
|
|
2158
2167
|
}
|
|
2159
2168
|
const ul = ListBase.createList(this.createElement, items, listBaseOptions, !this.template, this);
|
|
2160
2169
|
ul.setAttribute('tabindex', '0');
|
|
2161
|
-
|
|
2162
|
-
ul.setAttribute('role', 'menu');
|
|
2163
|
-
}
|
|
2170
|
+
this.isMenu ? ul.setAttribute('role', 'menu') : ul.setAttribute('role', 'menubar');
|
|
2164
2171
|
return ul;
|
|
2165
2172
|
}
|
|
2166
2173
|
moverHandler(e) {
|
|
@@ -2242,7 +2249,7 @@ let MenuBase = class MenuBase extends Component {
|
|
|
2242
2249
|
}
|
|
2243
2250
|
}
|
|
2244
2251
|
getField(propName, level = 0) {
|
|
2245
|
-
const fieldName = this.fields[propName];
|
|
2252
|
+
const fieldName = this.fields[`${propName}`];
|
|
2246
2253
|
return typeof fieldName === 'string' ? fieldName :
|
|
2247
2254
|
(!fieldName[level] ? fieldName[fieldName.length - 1].toString()
|
|
2248
2255
|
: fieldName[level].toString());
|
|
@@ -2259,7 +2266,7 @@ let MenuBase = class MenuBase extends Component {
|
|
|
2259
2266
|
}
|
|
2260
2267
|
hasField(items, field) {
|
|
2261
2268
|
for (let i = 0, len = items.length; i < len; i++) {
|
|
2262
|
-
if (items[i][field]) {
|
|
2269
|
+
if (items[i][`${field}`]) {
|
|
2263
2270
|
return true;
|
|
2264
2271
|
}
|
|
2265
2272
|
}
|
|
@@ -2636,7 +2643,7 @@ let MenuBase = class MenuBase extends Component {
|
|
|
2636
2643
|
else {
|
|
2637
2644
|
if (this.enableScrolling) {
|
|
2638
2645
|
const wrapper1 = this.getWrapper();
|
|
2639
|
-
|
|
2646
|
+
const ul1 = wrapper1.children[0];
|
|
2640
2647
|
if (this.element.classList.contains('e-vertical')) {
|
|
2641
2648
|
destroyScroll(getInstance(ul1, VScroll), ul1);
|
|
2642
2649
|
}
|
|
@@ -2789,7 +2796,7 @@ let MenuBase = class MenuBase extends Component {
|
|
|
2789
2796
|
else {
|
|
2790
2797
|
const ele = this.getWrapper().children[this.getIdx(this.getWrapper(), ul) - 1];
|
|
2791
2798
|
if (this.currentTarget) {
|
|
2792
|
-
if (!(this.currentTarget.classList.contains(
|
|
2799
|
+
if (!(this.currentTarget.classList.contains('e-numerictextbox') || this.currentTarget.classList.contains('e-textbox') || this.currentTarget.tagName === 'INPUT')) {
|
|
2793
2800
|
if (ele) {
|
|
2794
2801
|
ele.querySelector('.' + SELECTED).focus();
|
|
2795
2802
|
}
|
|
@@ -3302,6 +3309,9 @@ __decorate$3([
|
|
|
3302
3309
|
__decorate$3([
|
|
3303
3310
|
Event()
|
|
3304
3311
|
], Item.prototype, "click", void 0);
|
|
3312
|
+
__decorate$3([
|
|
3313
|
+
Property(-1)
|
|
3314
|
+
], Item.prototype, "tabIndex", void 0);
|
|
3305
3315
|
/**
|
|
3306
3316
|
* The Toolbar control contains a group of commands that are aligned horizontally.
|
|
3307
3317
|
* ```html
|
|
@@ -3382,7 +3392,7 @@ let Toolbar = class Toolbar extends Component {
|
|
|
3382
3392
|
removeClass([this.element], this.cssClass.split(' '));
|
|
3383
3393
|
}
|
|
3384
3394
|
this.element.removeAttribute('style');
|
|
3385
|
-
['aria-disabled', 'aria-orientation', '
|
|
3395
|
+
['aria-disabled', 'aria-orientation', 'role'].forEach((attrb) => this.element.removeAttribute(attrb));
|
|
3386
3396
|
super.destroy();
|
|
3387
3397
|
}
|
|
3388
3398
|
/**
|
|
@@ -3420,7 +3430,16 @@ let Toolbar = class Toolbar extends Component {
|
|
|
3420
3430
|
keyConfigs: this.keyConfigs
|
|
3421
3431
|
});
|
|
3422
3432
|
EventHandler.add(this.element, 'keydown', this.docKeyDown, this);
|
|
3423
|
-
this.
|
|
3433
|
+
this.updateTabIndex('0');
|
|
3434
|
+
}
|
|
3435
|
+
updateTabIndex(tabIndex) {
|
|
3436
|
+
const ele = this.element.querySelector('.' + CLS_ITEM + ':not(.' + CLS_DISABLE$2 + ' ):not(.' + CLS_SEPARATOR + ' ):not(.' + CLS_HIDDEN + ' )');
|
|
3437
|
+
if (!isNullOrUndefined(ele) && !isNullOrUndefined(ele.firstElementChild)) {
|
|
3438
|
+
const dataTabIndex = ele.firstElementChild.getAttribute('data-tabindex');
|
|
3439
|
+
if (dataTabIndex && dataTabIndex === '-1' && ele.firstElementChild.tagName !== 'INPUT') {
|
|
3440
|
+
ele.firstElementChild.setAttribute('tabindex', tabIndex);
|
|
3441
|
+
}
|
|
3442
|
+
}
|
|
3424
3443
|
}
|
|
3425
3444
|
unwireKeyboardEvent() {
|
|
3426
3445
|
if (this.keyModule) {
|
|
@@ -3624,7 +3643,6 @@ let Toolbar = class Toolbar extends Component {
|
|
|
3624
3643
|
this.activeEleRemove(ele);
|
|
3625
3644
|
ele.focus();
|
|
3626
3645
|
}
|
|
3627
|
-
this.element.removeAttribute('tabindex');
|
|
3628
3646
|
}
|
|
3629
3647
|
}
|
|
3630
3648
|
break;
|
|
@@ -3675,9 +3693,8 @@ let Toolbar = class Toolbar extends Component {
|
|
|
3675
3693
|
else {
|
|
3676
3694
|
rootEle.classList.remove(CLS_DISABLE$2);
|
|
3677
3695
|
}
|
|
3678
|
-
rootEle.setAttribute('tabindex', !value ? '0' : '-1');
|
|
3679
3696
|
if (this.activeEle) {
|
|
3680
|
-
this.activeEle.setAttribute('tabindex',
|
|
3697
|
+
this.activeEle.setAttribute('tabindex', this.activeEle.getAttribute('data-tabindex'));
|
|
3681
3698
|
}
|
|
3682
3699
|
if (this.scrollModule) {
|
|
3683
3700
|
this.scrollModule.disable(value);
|
|
@@ -3813,7 +3830,7 @@ let Toolbar = class Toolbar extends Component {
|
|
|
3813
3830
|
}
|
|
3814
3831
|
setStyleAttribute(this.element, { 'width': width });
|
|
3815
3832
|
const ariaAttr = {
|
|
3816
|
-
'role': 'toolbar', 'aria-disabled': 'false',
|
|
3833
|
+
'role': 'toolbar', 'aria-disabled': 'false',
|
|
3817
3834
|
'aria-orientation': !this.isVertical ? 'horizontal' : 'vertical'
|
|
3818
3835
|
};
|
|
3819
3836
|
attributes(this.element, ariaAttr);
|
|
@@ -3845,17 +3862,17 @@ let Toolbar = class Toolbar extends Component {
|
|
|
3845
3862
|
this.tbarEle = [];
|
|
3846
3863
|
}
|
|
3847
3864
|
for (let i = 0; i < items.length; i++) {
|
|
3848
|
-
innerItem = this.renderSubComponent(items[i], i);
|
|
3865
|
+
innerItem = this.renderSubComponent(items[parseInt(i.toString(), 10)], i);
|
|
3849
3866
|
if (this.tbarEle.indexOf(innerItem) === -1) {
|
|
3850
3867
|
this.tbarEle.push(innerItem);
|
|
3851
3868
|
}
|
|
3852
3869
|
if (!this.tbarAlign) {
|
|
3853
|
-
this.tbarItemAlign(items[i], itemEleDom, i);
|
|
3870
|
+
this.tbarItemAlign(items[parseInt(i.toString(), 10)], itemEleDom, i);
|
|
3854
3871
|
}
|
|
3855
|
-
innerPos = itemEleDom.querySelector('.e-toolbar-' + items[i].align.toLowerCase());
|
|
3872
|
+
innerPos = itemEleDom.querySelector('.e-toolbar-' + items[parseInt(i.toString(), 10)].align.toLowerCase());
|
|
3856
3873
|
if (innerPos) {
|
|
3857
|
-
if (!(items[i].showAlwaysInPopup && items[i].overflow !== 'Show')) {
|
|
3858
|
-
this.tbarAlgEle[(items[i].align + 's').toLowerCase()].push(innerItem);
|
|
3874
|
+
if (!(items[parseInt(i.toString(), 10)].showAlwaysInPopup && items[parseInt(i.toString(), 10)].overflow !== 'Show')) {
|
|
3875
|
+
this.tbarAlgEle[(items[parseInt(i.toString(), 10)].align + 's').toLowerCase()].push(innerItem);
|
|
3859
3876
|
}
|
|
3860
3877
|
innerPos.appendChild(innerItem);
|
|
3861
3878
|
}
|
|
@@ -3865,7 +3882,7 @@ let Toolbar = class Toolbar extends Component {
|
|
|
3865
3882
|
}
|
|
3866
3883
|
if (this.isReact) {
|
|
3867
3884
|
const portals = 'portals';
|
|
3868
|
-
this.notify('render-react-toolbar-template', this[portals]);
|
|
3885
|
+
this.notify('render-react-toolbar-template', this[`${portals}`]);
|
|
3869
3886
|
this.renderReactTemplates();
|
|
3870
3887
|
}
|
|
3871
3888
|
}
|
|
@@ -4021,8 +4038,11 @@ let Toolbar = class Toolbar extends Component {
|
|
|
4021
4038
|
}
|
|
4022
4039
|
setOverflowAttributes(ele) {
|
|
4023
4040
|
this.createPopupEle(ele, [].slice.call(selectAll('.' + CLS_ITEMS + ' .' + CLS_ITEM, ele)));
|
|
4024
|
-
|
|
4025
|
-
|
|
4041
|
+
const ariaAttr = {
|
|
4042
|
+
'tabindex': '0', 'role': 'button', 'aria-haspopup': 'true',
|
|
4043
|
+
'aria-label': 'overflow'
|
|
4044
|
+
};
|
|
4045
|
+
attributes(this.element.querySelector('.' + CLS_TBARNAV), ariaAttr);
|
|
4026
4046
|
}
|
|
4027
4047
|
separator() {
|
|
4028
4048
|
const element = this.element;
|
|
@@ -4039,12 +4059,12 @@ let Toolbar = class Toolbar extends Component {
|
|
|
4039
4059
|
}
|
|
4040
4060
|
}
|
|
4041
4061
|
for (let i = 0; i <= eleItem.length - 1; i++) {
|
|
4042
|
-
if (eleItem[i].offsetLeft < 30 && eleItem[i].offsetLeft !== 0) {
|
|
4062
|
+
if (eleItem[parseInt(i.toString(), 10)].offsetLeft < 30 && eleItem[parseInt(i.toString(), 10)].offsetLeft !== 0) {
|
|
4043
4063
|
if (this.overflowMode === 'MultiRow') {
|
|
4044
|
-
eleItem[i].classList.add(CLS_MULTIROW_SEPARATOR);
|
|
4064
|
+
eleItem[parseInt(i.toString(), 10)].classList.add(CLS_MULTIROW_SEPARATOR);
|
|
4045
4065
|
}
|
|
4046
4066
|
else if (this.overflowMode === 'Extended') {
|
|
4047
|
-
eleItem[i].classList.add(CLS_EXTENDABLE_SEPARATOR);
|
|
4067
|
+
eleItem[parseInt(i.toString(), 10)].classList.add(CLS_EXTENDABLE_SEPARATOR);
|
|
4048
4068
|
}
|
|
4049
4069
|
}
|
|
4050
4070
|
}
|
|
@@ -4077,7 +4097,7 @@ let Toolbar = class Toolbar extends Component {
|
|
|
4077
4097
|
nodes = selectAll('.' + CLS_TBAROVERFLOW, ele);
|
|
4078
4098
|
if (el.classList.contains(CLS_TBAROVERFLOW) && nodes.length > 0) {
|
|
4079
4099
|
if (tbarObj.tbResize && nodes.length > index) {
|
|
4080
|
-
ele.insertBefore(el, nodes[index]);
|
|
4100
|
+
ele.insertBefore(el, nodes[parseInt(index.toString(), 10)]);
|
|
4081
4101
|
++nodePri;
|
|
4082
4102
|
}
|
|
4083
4103
|
else {
|
|
@@ -4115,7 +4135,7 @@ let Toolbar = class Toolbar extends Component {
|
|
|
4115
4135
|
});
|
|
4116
4136
|
const tbarEle = selectAll('.' + CLS_ITEM, element.querySelector('.' + CLS_ITEMS));
|
|
4117
4137
|
for (let i = tbarEle.length - 1; i >= 0; i--) {
|
|
4118
|
-
const tbarElement = tbarEle[i];
|
|
4138
|
+
const tbarElement = tbarEle[parseInt(i.toString(), 10)];
|
|
4119
4139
|
if (tbarElement.classList.contains(CLS_SEPARATOR) && this.overflowMode !== 'Extended') {
|
|
4120
4140
|
setStyleAttribute(tbarElement, { display: 'none' });
|
|
4121
4141
|
}
|
|
@@ -4170,11 +4190,11 @@ let Toolbar = class Toolbar extends Component {
|
|
|
4170
4190
|
collision: { Y: this.enableCollision ? 'flip' : 'none' },
|
|
4171
4191
|
position: this.enableRtl ? { X: 'left', Y: 'top' } : { X: 'right', Y: 'top' }
|
|
4172
4192
|
});
|
|
4173
|
-
popup.appendTo(ele);
|
|
4174
4193
|
if (this.overflowMode === 'Extended') {
|
|
4175
4194
|
popup.width = parseFloat(eleStyles.width) + ((parseFloat(eleStyles.borderRightWidth)) * 2);
|
|
4176
4195
|
popup.offsetX = 0;
|
|
4177
4196
|
}
|
|
4197
|
+
popup.appendTo(ele);
|
|
4178
4198
|
EventHandler.add(document, 'scroll', this.docEvent.bind(this));
|
|
4179
4199
|
EventHandler.add(document, 'click ', this.docEvent.bind(this));
|
|
4180
4200
|
popup.element.style.maxHeight = popup.element.offsetHeight + 'px';
|
|
@@ -4191,7 +4211,6 @@ let Toolbar = class Toolbar extends Component {
|
|
|
4191
4211
|
popup.hide();
|
|
4192
4212
|
}
|
|
4193
4213
|
this.popObj = popup;
|
|
4194
|
-
this.element.setAttribute('aria-haspopup', 'true');
|
|
4195
4214
|
}
|
|
4196
4215
|
else {
|
|
4197
4216
|
const popupEle = this.popObj.element;
|
|
@@ -4219,6 +4238,7 @@ let Toolbar = class Toolbar extends Component {
|
|
|
4219
4238
|
const popupEle = this.popObj.element;
|
|
4220
4239
|
const toolEle = this.popObj.element.parentElement;
|
|
4221
4240
|
const popupNav = toolEle.querySelector('.' + CLS_TBARNAV);
|
|
4241
|
+
popupNav.setAttribute('aria-expanded', 'true');
|
|
4222
4242
|
setStyleAttribute(popObj.element, { height: 'auto', maxHeight: '' });
|
|
4223
4243
|
popObj.element.style.maxHeight = popObj.element.offsetHeight + 'px';
|
|
4224
4244
|
if (this.overflowMode === 'Extended') {
|
|
@@ -4234,7 +4254,7 @@ let Toolbar = class Toolbar extends Component {
|
|
|
4234
4254
|
let overflowHeight = (popupEle.offsetHeight - ((popupElePos - window.innerHeight - scrollVal) + 5));
|
|
4235
4255
|
popObj.height = overflowHeight + 'px';
|
|
4236
4256
|
for (let i = 0; i <= popupEle.childElementCount; i++) {
|
|
4237
|
-
const ele = popupEle.children[i];
|
|
4257
|
+
const ele = popupEle.children[parseInt(i.toString(), 10)];
|
|
4238
4258
|
if (ele.offsetTop + ele.offsetHeight > overflowHeight) {
|
|
4239
4259
|
overflowHeight = ele.offsetTop;
|
|
4240
4260
|
break;
|
|
@@ -4259,6 +4279,7 @@ let Toolbar = class Toolbar extends Component {
|
|
|
4259
4279
|
popupClose(e) {
|
|
4260
4280
|
const element = this.element;
|
|
4261
4281
|
const popupNav = element.querySelector('.' + CLS_TBARNAV);
|
|
4282
|
+
popupNav.setAttribute('aria-expanded', 'false');
|
|
4262
4283
|
const popIcon = popupNav.firstElementChild;
|
|
4263
4284
|
popupNav.classList.remove(CLS_TBARNAVACT);
|
|
4264
4285
|
classList(popIcon, [CLS_POPUPDOWN], [CLS_POPUPICON]);
|
|
@@ -4284,7 +4305,7 @@ let Toolbar = class Toolbar extends Component {
|
|
|
4284
4305
|
};
|
|
4285
4306
|
for (let i = len - 1; i >= 0; i--) {
|
|
4286
4307
|
let mrgn;
|
|
4287
|
-
const compuStyle = window.getComputedStyle(inEle[i]);
|
|
4308
|
+
const compuStyle = window.getComputedStyle(inEle[parseInt(i.toString(), 10)]);
|
|
4288
4309
|
if (this.isVertical) {
|
|
4289
4310
|
mrgn = parseFloat((compuStyle).marginTop);
|
|
4290
4311
|
mrgn += parseFloat((compuStyle).marginBottom);
|
|
@@ -4293,35 +4314,37 @@ let Toolbar = class Toolbar extends Component {
|
|
|
4293
4314
|
mrgn = parseFloat((compuStyle).marginRight);
|
|
4294
4315
|
mrgn += parseFloat((compuStyle).marginLeft);
|
|
4295
4316
|
}
|
|
4296
|
-
const fstEleCheck = inEle[i] === this.tbarEle[0];
|
|
4317
|
+
const fstEleCheck = inEle[parseInt(i.toString(), 10)] === this.tbarEle[0];
|
|
4297
4318
|
if (fstEleCheck) {
|
|
4298
4319
|
this.tbarEleMrgn = mrgn;
|
|
4299
4320
|
}
|
|
4300
|
-
eleOffset = this.isVertical ? inEle[i].offsetHeight : inEle[i].offsetWidth;
|
|
4321
|
+
eleOffset = this.isVertical ? inEle[parseInt(i.toString(), 10)].offsetHeight : inEle[parseInt(i.toString(), 10)].offsetWidth;
|
|
4301
4322
|
const eleWid = fstEleCheck ? (eleOffset + mrgn) : eleOffset;
|
|
4302
|
-
if (checkClass(inEle[i], [CLS_POPPRI]) && popPriority) {
|
|
4303
|
-
inEle[i].classList.add(CLS_POPUP);
|
|
4323
|
+
if (checkClass(inEle[parseInt(i.toString(), 10)], [CLS_POPPRI]) && popPriority) {
|
|
4324
|
+
inEle[parseInt(i.toString(), 10)].classList.add(CLS_POPUP);
|
|
4304
4325
|
if (this.isVertical) {
|
|
4305
|
-
setStyleAttribute(inEle[i], { display: 'none', minHeight: eleWid + 'px' });
|
|
4326
|
+
setStyleAttribute(inEle[parseInt(i.toString(), 10)], { display: 'none', minHeight: eleWid + 'px' });
|
|
4306
4327
|
}
|
|
4307
4328
|
else {
|
|
4308
|
-
setStyleAttribute(inEle[i], { display: 'none', minWidth: eleWid + 'px' });
|
|
4329
|
+
setStyleAttribute(inEle[parseInt(i.toString(), 10)], { display: 'none', minWidth: eleWid + 'px' });
|
|
4309
4330
|
}
|
|
4310
4331
|
itemPopCount++;
|
|
4311
4332
|
}
|
|
4312
4333
|
if (this.isVertical) {
|
|
4313
|
-
checkoffset =
|
|
4334
|
+
checkoffset =
|
|
4335
|
+
(inEle[parseInt(i.toString(), 10)].offsetTop + inEle[parseInt(i.toString(), 10)].offsetHeight + mrgn) > eleWidth;
|
|
4314
4336
|
}
|
|
4315
4337
|
else {
|
|
4316
|
-
checkoffset =
|
|
4338
|
+
checkoffset =
|
|
4339
|
+
(inEle[parseInt(i.toString(), 10)].offsetLeft + inEle[parseInt(i.toString(), 10)].offsetWidth + mrgn) > eleWidth;
|
|
4317
4340
|
}
|
|
4318
4341
|
if (checkoffset) {
|
|
4319
|
-
if (inEle[i].classList.contains(CLS_SEPARATOR)) {
|
|
4342
|
+
if (inEle[parseInt(i.toString(), 10)].classList.contains(CLS_SEPARATOR)) {
|
|
4320
4343
|
if (this.overflowMode === 'Extended') {
|
|
4321
4344
|
if (itemCount === itemPopCount) {
|
|
4322
|
-
const sepEle = inEle[i];
|
|
4345
|
+
const sepEle = inEle[parseInt(i.toString(), 10)];
|
|
4323
4346
|
if (checkClass(sepEle, [CLS_SEPARATOR, CLS_TBARIGNORE])) {
|
|
4324
|
-
inEle[i].classList.add(CLS_POPUP);
|
|
4347
|
+
inEle[parseInt(i.toString(), 10)].classList.add(CLS_POPUP);
|
|
4325
4348
|
itemPopCount++;
|
|
4326
4349
|
}
|
|
4327
4350
|
}
|
|
@@ -4342,21 +4365,23 @@ let Toolbar = class Toolbar extends Component {
|
|
|
4342
4365
|
else {
|
|
4343
4366
|
itemCount++;
|
|
4344
4367
|
}
|
|
4345
|
-
if (inEle[i].classList.contains(CLS_TBAROVERFLOW) && pre) {
|
|
4346
|
-
eleWidth -= ((this.isVertical ? inEle[i].offsetHeight :
|
|
4368
|
+
if (inEle[parseInt(i.toString(), 10)].classList.contains(CLS_TBAROVERFLOW) && pre) {
|
|
4369
|
+
eleWidth -= ((this.isVertical ? inEle[parseInt(i.toString(), 10)].offsetHeight :
|
|
4370
|
+
inEle[parseInt(i.toString(), 10)].offsetWidth) + (mrgn));
|
|
4347
4371
|
}
|
|
4348
|
-
else if (!checkClass(inEle[i], [CLS_SEPARATOR, CLS_TBARIGNORE])) {
|
|
4349
|
-
inEle[i].classList.add(CLS_POPUP);
|
|
4372
|
+
else if (!checkClass(inEle[parseInt(i.toString(), 10)], [CLS_SEPARATOR, CLS_TBARIGNORE])) {
|
|
4373
|
+
inEle[parseInt(i.toString(), 10)].classList.add(CLS_POPUP);
|
|
4350
4374
|
if (this.isVertical) {
|
|
4351
|
-
setStyleAttribute(inEle[i], { display: 'none', minHeight: eleWid + 'px' });
|
|
4375
|
+
setStyleAttribute(inEle[parseInt(i.toString(), 10)], { display: 'none', minHeight: eleWid + 'px' });
|
|
4352
4376
|
}
|
|
4353
4377
|
else {
|
|
4354
|
-
setStyleAttribute(inEle[i], { display: 'none', minWidth: eleWid + 'px' });
|
|
4378
|
+
setStyleAttribute(inEle[parseInt(i.toString(), 10)], { display: 'none', minWidth: eleWid + 'px' });
|
|
4355
4379
|
}
|
|
4356
4380
|
itemPopCount++;
|
|
4357
4381
|
}
|
|
4358
4382
|
else {
|
|
4359
|
-
eleWidth -= ((this.isVertical ? inEle[i].offsetHeight :
|
|
4383
|
+
eleWidth -= ((this.isVertical ? inEle[parseInt(i.toString(), 10)].offsetHeight :
|
|
4384
|
+
inEle[parseInt(i.toString(), 10)].offsetWidth) + (mrgn));
|
|
4360
4385
|
}
|
|
4361
4386
|
}
|
|
4362
4387
|
}
|
|
@@ -4376,7 +4401,7 @@ let Toolbar = class Toolbar extends Component {
|
|
|
4376
4401
|
const navItem = this.createElement('div', { className: CLS_POPUPDOWN + ' e-icons' });
|
|
4377
4402
|
nav.appendChild(navItem);
|
|
4378
4403
|
nav.setAttribute('tabindex', '0');
|
|
4379
|
-
nav.setAttribute('role', '
|
|
4404
|
+
nav.setAttribute('role', 'button');
|
|
4380
4405
|
element.appendChild(nav);
|
|
4381
4406
|
}
|
|
4382
4407
|
tbarPriRef(inEle, indx, sepPri, el, des, elWid, wid, ig) {
|
|
@@ -4449,7 +4474,6 @@ let Toolbar = class Toolbar extends Component {
|
|
|
4449
4474
|
this.popObj.destroy();
|
|
4450
4475
|
detach(this.popObj.element);
|
|
4451
4476
|
this.popObj = null;
|
|
4452
|
-
ele.setAttribute('aria-haspopup', 'false');
|
|
4453
4477
|
}
|
|
4454
4478
|
}
|
|
4455
4479
|
ignoreEleFetch(index, innerEle) {
|
|
@@ -4528,7 +4552,7 @@ let Toolbar = class Toolbar extends Component {
|
|
|
4528
4552
|
}
|
|
4529
4553
|
index = this.tbarEle.indexOf(el);
|
|
4530
4554
|
if (this.tbarAlign) {
|
|
4531
|
-
const pos = this.items[index].align;
|
|
4555
|
+
const pos = this.items[parseInt(index.toString(), 10)].align;
|
|
4532
4556
|
index = this.tbarAlgEle[(pos + 's').toLowerCase()].indexOf(el);
|
|
4533
4557
|
eleSplice = this.tbarAlgEle[(pos + 's').toLowerCase()];
|
|
4534
4558
|
innerEle = this.element.querySelector('.' + CLS_ITEMS + ' .' + 'e-toolbar-' + pos.toLowerCase());
|
|
@@ -4715,12 +4739,12 @@ let Toolbar = class Toolbar extends Component {
|
|
|
4715
4739
|
const key = Object.keys(attr);
|
|
4716
4740
|
let keyVal;
|
|
4717
4741
|
for (let i = 0; i < key.length; i++) {
|
|
4718
|
-
keyVal = key[i];
|
|
4742
|
+
keyVal = key[parseInt(i.toString(), 10)];
|
|
4719
4743
|
if (keyVal === 'class') {
|
|
4720
|
-
this.add(element, attr[keyVal]);
|
|
4744
|
+
this.add(element, attr[`${keyVal}`]);
|
|
4721
4745
|
}
|
|
4722
4746
|
else {
|
|
4723
|
-
element.setAttribute(keyVal, attr[keyVal]);
|
|
4747
|
+
element.setAttribute(keyVal, attr[`${keyVal}`]);
|
|
4724
4748
|
}
|
|
4725
4749
|
}
|
|
4726
4750
|
}
|
|
@@ -4751,14 +4775,14 @@ let Toolbar = class Toolbar extends Component {
|
|
|
4751
4775
|
};
|
|
4752
4776
|
if (!isNullOrUndefined(len) && len >= 1) {
|
|
4753
4777
|
for (let a = 0, element = [].slice.call(elements); a < len; a++) {
|
|
4754
|
-
const itemElement = element[a];
|
|
4778
|
+
const itemElement = element[parseInt(a.toString(), 10)];
|
|
4755
4779
|
if (typeof (itemElement) === 'number') {
|
|
4756
4780
|
ele = this.getElementByIndex(itemElement);
|
|
4757
4781
|
if (isNullOrUndefined(ele)) {
|
|
4758
4782
|
return;
|
|
4759
4783
|
}
|
|
4760
4784
|
else {
|
|
4761
|
-
elements[a] = ele;
|
|
4785
|
+
elements[parseInt(a.toString(), 10)] = ele;
|
|
4762
4786
|
}
|
|
4763
4787
|
}
|
|
4764
4788
|
else {
|
|
@@ -4787,8 +4811,8 @@ let Toolbar = class Toolbar extends Component {
|
|
|
4787
4811
|
}
|
|
4788
4812
|
}
|
|
4789
4813
|
getElementByIndex(index) {
|
|
4790
|
-
if (this.tbarEle[index]) {
|
|
4791
|
-
return this.tbarEle[index];
|
|
4814
|
+
if (this.tbarEle[parseInt(index.toString(), 10)]) {
|
|
4815
|
+
return this.tbarEle[parseInt(index.toString(), 10)];
|
|
4792
4816
|
}
|
|
4793
4817
|
return null;
|
|
4794
4818
|
}
|
|
@@ -4833,14 +4857,14 @@ let Toolbar = class Toolbar extends Component {
|
|
|
4833
4857
|
if (!this.tbarAlign && itemAgn !== 'Left') {
|
|
4834
4858
|
this.tbarItemAlign(item, itemsDiv, 1);
|
|
4835
4859
|
this.tbarAlign = true;
|
|
4836
|
-
ele = closest(innerItems[0], '.' + CLS_ITEMS).children[algIndex];
|
|
4860
|
+
ele = closest(innerItems[0], '.' + CLS_ITEMS).children[parseInt(algIndex.toString(), 10)];
|
|
4837
4861
|
ele.appendChild(innerEle);
|
|
4838
4862
|
this.tbarAlgEle[(item.align + 's').toLowerCase()].push(innerEle);
|
|
4839
4863
|
this.refreshPositioning();
|
|
4840
4864
|
}
|
|
4841
4865
|
else if (this.tbarAlign) {
|
|
4842
|
-
ele = closest(innerItems[0], '.' + CLS_ITEMS).children[algIndex];
|
|
4843
|
-
ele.insertBefore(innerEle, ele.children[index]);
|
|
4866
|
+
ele = closest(innerItems[0], '.' + CLS_ITEMS).children[parseInt(algIndex.toString(), 10)];
|
|
4867
|
+
ele.insertBefore(innerEle, ele.children[parseInt(index.toString(), 10)]);
|
|
4844
4868
|
this.tbarAlgEle[(item.align + 's').toLowerCase()].splice(index, 0, innerEle);
|
|
4845
4869
|
this.refreshPositioning();
|
|
4846
4870
|
}
|
|
@@ -4849,7 +4873,7 @@ let Toolbar = class Toolbar extends Component {
|
|
|
4849
4873
|
innerItems[0].appendChild(innerEle);
|
|
4850
4874
|
}
|
|
4851
4875
|
else {
|
|
4852
|
-
innerItems[0].parentNode.insertBefore(innerEle, innerItems[index]);
|
|
4876
|
+
innerItems[0].parentNode.insertBefore(innerEle, innerItems[parseInt(index.toString(), 10)]);
|
|
4853
4877
|
}
|
|
4854
4878
|
this.items.splice(index, 0, item);
|
|
4855
4879
|
if (item.template) {
|
|
@@ -4898,20 +4922,20 @@ let Toolbar = class Toolbar extends Component {
|
|
|
4898
4922
|
this.resize();
|
|
4899
4923
|
}
|
|
4900
4924
|
removeItemByIndex(index, innerItems) {
|
|
4901
|
-
if (this.tbarEle[index] && innerItems[index]) {
|
|
4902
|
-
const eleIdx = this.tbarEle.indexOf(innerItems[index]);
|
|
4925
|
+
if (this.tbarEle[parseInt(index.toString(), 10)] && innerItems[parseInt(index.toString(), 10)]) {
|
|
4926
|
+
const eleIdx = this.tbarEle.indexOf(innerItems[parseInt(index.toString(), 10)]);
|
|
4903
4927
|
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);
|
|
4928
|
+
const indexAgn = this.tbarAlgEle[(this.items[parseInt(eleIdx.toString(), 10)].align + 's').toLowerCase()].indexOf(this.tbarEle[parseInt(eleIdx.toString(), 10)]);
|
|
4929
|
+
this.tbarAlgEle[(this.items[parseInt(eleIdx.toString(), 10)].align + 's').toLowerCase()].splice(parseInt(indexAgn.toString(), 10), 1);
|
|
4906
4930
|
}
|
|
4907
4931
|
if (this.isReact) {
|
|
4908
4932
|
this.clearTemplate();
|
|
4909
4933
|
}
|
|
4910
|
-
const btnItem = innerItems[index].querySelector('.e-control.e-btn');
|
|
4934
|
+
const btnItem = innerItems[parseInt(index.toString(), 10)].querySelector('.e-control.e-btn');
|
|
4911
4935
|
if (!isNullOrUndefined(btnItem) && !isNullOrUndefined(btnItem.ej2_instances[0]) && !(btnItem.ej2_instances[0].isDestroyed)) {
|
|
4912
4936
|
btnItem.ej2_instances[0].destroy();
|
|
4913
4937
|
}
|
|
4914
|
-
detach(innerItems[index]);
|
|
4938
|
+
detach(innerItems[parseInt(index.toString(), 10)]);
|
|
4915
4939
|
this.items.splice(eleIdx, 1);
|
|
4916
4940
|
this.tbarEle.splice(eleIdx, 1);
|
|
4917
4941
|
}
|
|
@@ -5044,7 +5068,8 @@ let Toolbar = class Toolbar extends Component {
|
|
|
5044
5068
|
switch (item.type) {
|
|
5045
5069
|
case 'Button':
|
|
5046
5070
|
dom = this.buttonRendering(item, innerEle);
|
|
5047
|
-
dom.setAttribute('tabindex', '-1');
|
|
5071
|
+
dom.setAttribute('tabindex', isNullOrUndefined(item.tabIndex) ? '-1' : item.tabIndex.toString());
|
|
5072
|
+
dom.setAttribute('data-tabindex', isNullOrUndefined(item.tabIndex) ? '-1' : item.tabIndex.toString());
|
|
5048
5073
|
dom.setAttribute('aria-label', (item.text || item.tooltipText));
|
|
5049
5074
|
innerEle.appendChild(dom);
|
|
5050
5075
|
innerEle.addEventListener('click', this.itemClick.bind(this));
|
|
@@ -5087,6 +5112,9 @@ let Toolbar = class Toolbar extends Component {
|
|
|
5087
5112
|
}
|
|
5088
5113
|
return innerEle;
|
|
5089
5114
|
}
|
|
5115
|
+
getDataTabindex(ele) {
|
|
5116
|
+
return isNullOrUndefined(ele.getAttribute('data-tabindex')) ? '-1' : ele.getAttribute('data-tabindex');
|
|
5117
|
+
}
|
|
5090
5118
|
itemClick(e) {
|
|
5091
5119
|
this.activeEleSwitch(e.currentTarget);
|
|
5092
5120
|
}
|
|
@@ -5096,14 +5124,17 @@ let Toolbar = class Toolbar extends Component {
|
|
|
5096
5124
|
}
|
|
5097
5125
|
activeEleRemove(curEle) {
|
|
5098
5126
|
if (!isNullOrUndefined(this.activeEle)) {
|
|
5099
|
-
this.activeEle.setAttribute('tabindex',
|
|
5127
|
+
this.activeEle.setAttribute('tabindex', this.getDataTabindex(this.activeEle));
|
|
5100
5128
|
}
|
|
5101
5129
|
this.activeEle = curEle;
|
|
5102
|
-
if (
|
|
5103
|
-
curEle.
|
|
5104
|
-
|
|
5105
|
-
|
|
5106
|
-
|
|
5130
|
+
if (this.getDataTabindex(this.activeEle) === '-1') {
|
|
5131
|
+
if (isNullOrUndefined(this.trgtEle) && !curEle.parentElement.classList.contains(CLS_TEMPLATE)) {
|
|
5132
|
+
this.updateTabIndex('-1');
|
|
5133
|
+
curEle.removeAttribute('tabindex');
|
|
5134
|
+
}
|
|
5135
|
+
else {
|
|
5136
|
+
this.activeEle.setAttribute('tabindex', this.getDataTabindex(this.activeEle));
|
|
5137
|
+
}
|
|
5107
5138
|
}
|
|
5108
5139
|
}
|
|
5109
5140
|
getPersistData() {
|
|
@@ -5185,6 +5216,26 @@ let Toolbar = class Toolbar extends Component {
|
|
|
5185
5216
|
this.isExtendedOpen = sib.classList.contains(CLS_POPUPOPEN);
|
|
5186
5217
|
}
|
|
5187
5218
|
}
|
|
5219
|
+
updateHideEleTabIndex(ele, isHidden, isElement, eleIndex, innerItems) {
|
|
5220
|
+
if (isElement) {
|
|
5221
|
+
eleIndex = innerItems.indexOf(ele);
|
|
5222
|
+
}
|
|
5223
|
+
let nextEle = innerItems[++eleIndex];
|
|
5224
|
+
while (nextEle) {
|
|
5225
|
+
const skipEle = this.eleContains(nextEle);
|
|
5226
|
+
if (!skipEle) {
|
|
5227
|
+
const dataTabIndex = nextEle.firstElementChild.getAttribute('data-tabindex');
|
|
5228
|
+
if (isHidden && dataTabIndex === '-1') {
|
|
5229
|
+
nextEle.firstElementChild.setAttribute('tabindex', '0');
|
|
5230
|
+
}
|
|
5231
|
+
else if (dataTabIndex !== nextEle.firstElementChild.getAttribute('tabindex')) {
|
|
5232
|
+
nextEle.firstElementChild.setAttribute('tabindex', dataTabIndex);
|
|
5233
|
+
}
|
|
5234
|
+
break;
|
|
5235
|
+
}
|
|
5236
|
+
nextEle = innerItems[++eleIndex];
|
|
5237
|
+
}
|
|
5238
|
+
}
|
|
5188
5239
|
/**
|
|
5189
5240
|
* Gets called when the model property changes.The data that describes the old and new values of the property that changed.
|
|
5190
5241
|
*
|
|
@@ -5203,9 +5254,9 @@ let Toolbar = class Toolbar extends Component {
|
|
|
5203
5254
|
if (!(newProp.items instanceof Array && oldProp.items instanceof Array)) {
|
|
5204
5255
|
const changedProb = Object.keys(newProp.items);
|
|
5205
5256
|
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];
|
|
5257
|
+
const index = parseInt(Object.keys(newProp.items)[parseInt(i.toString(), 10)], 10);
|
|
5258
|
+
const property = Object.keys(newProp.items[parseInt(index.toString(), 10)])[0];
|
|
5259
|
+
const newProperty = Object(newProp.items[parseInt(index.toString(), 10)])[`${property}`];
|
|
5209
5260
|
if (typeof newProperty !== 'function') {
|
|
5210
5261
|
if (this.tbarAlign || property === 'align') {
|
|
5211
5262
|
this.refresh();
|
|
@@ -5214,7 +5265,7 @@ let Toolbar = class Toolbar extends Component {
|
|
|
5214
5265
|
}
|
|
5215
5266
|
const popupPriCheck = property === 'showAlwaysInPopup' && !newProperty;
|
|
5216
5267
|
const booleanCheck = property === 'overflow' && this.popupPriCount !== 0;
|
|
5217
|
-
if ((popupPriCheck) || (this.items[index].showAlwaysInPopup) && booleanCheck) {
|
|
5268
|
+
if ((popupPriCheck) || (this.items[parseInt(index.toString(), 10)].showAlwaysInPopup) && booleanCheck) {
|
|
5218
5269
|
--this.popupPriCount;
|
|
5219
5270
|
}
|
|
5220
5271
|
if (isNullOrUndefined(this.scrollModule)) {
|
|
@@ -5224,11 +5275,11 @@ let Toolbar = class Toolbar extends Component {
|
|
|
5224
5275
|
if (this.isReact) {
|
|
5225
5276
|
this.clearTemplate();
|
|
5226
5277
|
}
|
|
5227
|
-
detach(itemCol[index]);
|
|
5278
|
+
detach(itemCol[parseInt(index.toString(), 10)]);
|
|
5228
5279
|
this.tbarEle.splice(index, 1);
|
|
5229
|
-
this.addItems([this.items[index]], index);
|
|
5280
|
+
this.addItems([this.items[parseInt(index.toString(), 10)]], index);
|
|
5230
5281
|
this.items.splice(index, 1);
|
|
5231
|
-
if (this.items[index].template) {
|
|
5282
|
+
if (this.items[parseInt(index.toString(), 10)].template) {
|
|
5232
5283
|
this.tbarEle.splice(this.items.length, 1);
|
|
5233
5284
|
}
|
|
5234
5285
|
}
|
|
@@ -5320,67 +5371,32 @@ let Toolbar = class Toolbar extends Component {
|
|
|
5320
5371
|
hideItem(index, value) {
|
|
5321
5372
|
const isElement = (typeof (index) === 'object') ? true : false;
|
|
5322
5373
|
let eleIndex = index;
|
|
5323
|
-
let initIndex;
|
|
5324
5374
|
let ele;
|
|
5375
|
+
if (!isElement && isNullOrUndefined(eleIndex)) {
|
|
5376
|
+
return;
|
|
5377
|
+
}
|
|
5325
5378
|
const innerItems = [].slice.call(selectAll('.' + CLS_ITEM, this.element));
|
|
5326
5379
|
if (isElement) {
|
|
5327
5380
|
ele = index;
|
|
5328
5381
|
}
|
|
5329
|
-
else if (this.tbarEle[eleIndex]) {
|
|
5382
|
+
else if (this.tbarEle[parseInt(eleIndex.toString(), 10)]) {
|
|
5330
5383
|
const innerItems = [].slice.call(selectAll('.' + CLS_ITEM, this.element));
|
|
5331
|
-
ele = innerItems[eleIndex];
|
|
5384
|
+
ele = innerItems[parseInt(eleIndex.toString(), 10)];
|
|
5332
5385
|
}
|
|
5333
5386
|
if (ele) {
|
|
5334
5387
|
if (value) {
|
|
5335
5388
|
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];
|
|
5389
|
+
if (!ele.classList.contains(CLS_SEPARATOR)) {
|
|
5390
|
+
if (isNullOrUndefined(ele.firstElementChild.getAttribute('tabindex')) ||
|
|
5391
|
+
ele.firstElementChild.getAttribute('tabindex') !== '-1') {
|
|
5392
|
+
this.updateHideEleTabIndex(ele, value, isElement, eleIndex, innerItems);
|
|
5355
5393
|
}
|
|
5356
5394
|
}
|
|
5357
5395
|
}
|
|
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
|
-
}
|
|
5396
|
+
else {
|
|
5397
|
+
ele.classList.remove(CLS_HIDDEN);
|
|
5398
|
+
if (!ele.classList.contains(CLS_SEPARATOR)) {
|
|
5399
|
+
this.updateHideEleTabIndex(ele, value, isElement, eleIndex, innerItems);
|
|
5384
5400
|
}
|
|
5385
5401
|
}
|
|
5386
5402
|
this.refreshOverflow();
|
|
@@ -5744,7 +5760,7 @@ let Accordion = class Accordion extends Component {
|
|
|
5744
5760
|
}
|
|
5745
5761
|
else {
|
|
5746
5762
|
for (let i = 0; i < len; i++) {
|
|
5747
|
-
this.expandItem(true, this.initExpand[i]);
|
|
5763
|
+
this.expandItem(true, this.initExpand[parseInt(i.toString(), 10)]);
|
|
5748
5764
|
}
|
|
5749
5765
|
}
|
|
5750
5766
|
if (this.isReact) {
|
|
@@ -6103,14 +6119,15 @@ let Accordion = class Accordion extends Component {
|
|
|
6103
6119
|
if (this.isReact) {
|
|
6104
6120
|
this.renderReactTemplates();
|
|
6105
6121
|
}
|
|
6106
|
-
append(this.getItemTemplate()(this.dataSource[index], this, 'itemTemplate', this.element.id + '_itemTemplate', false), ctn);
|
|
6122
|
+
append(this.getItemTemplate()(this.dataSource[parseInt(index.toString(), 10)], this, 'itemTemplate', this.element.id + '_itemTemplate', false), ctn);
|
|
6107
6123
|
itemcnt.appendChild(ctn);
|
|
6108
6124
|
}
|
|
6109
6125
|
else {
|
|
6110
|
-
if (this.enableHtmlSanitizer && typeof (this.items[index].content)) {
|
|
6111
|
-
this.items[index].content =
|
|
6126
|
+
if (this.enableHtmlSanitizer && typeof (this.items[parseInt(index.toString(), 10)].content)) {
|
|
6127
|
+
this.items[parseInt(index.toString(), 10)].content =
|
|
6128
|
+
SanitizeHtmlHelper.sanitize(this.items[parseInt(index.toString(), 10)].content);
|
|
6112
6129
|
}
|
|
6113
|
-
itemcnt.appendChild(this.fetchElement(ctn, this.items[index].content, index, false));
|
|
6130
|
+
itemcnt.appendChild(this.fetchElement(ctn, this.items[parseInt(index.toString(), 10)].content, index, false));
|
|
6114
6131
|
}
|
|
6115
6132
|
return itemcnt;
|
|
6116
6133
|
}
|
|
@@ -6352,7 +6369,7 @@ let Accordion = class Accordion extends Component {
|
|
|
6352
6369
|
ele.appendChild(innerItemEle);
|
|
6353
6370
|
}
|
|
6354
6371
|
else {
|
|
6355
|
-
ele.insertBefore(innerItemEle, itemEle[itemIndex]);
|
|
6372
|
+
ele.insertBefore(innerItemEle, itemEle[parseInt(itemIndex.toString(), 10)]);
|
|
6356
6373
|
}
|
|
6357
6374
|
EventHandler.add(innerItemEle.querySelector('.' + CLS_HEADER), 'focus', this.focusIn, this);
|
|
6358
6375
|
EventHandler.add(innerItemEle.querySelector('.' + CLS_HEADER), 'blur', this.focusOut, this);
|
|
@@ -6387,7 +6404,7 @@ let Accordion = class Accordion extends Component {
|
|
|
6387
6404
|
this.clearTemplate(['headerTemplate', 'itemTemplate'], index);
|
|
6388
6405
|
}
|
|
6389
6406
|
const itemEle = this.getItemElements();
|
|
6390
|
-
const ele = itemEle[index];
|
|
6407
|
+
const ele = itemEle[parseInt(index.toString(), 10)];
|
|
6391
6408
|
const items = this.getItems();
|
|
6392
6409
|
if (isNullOrUndefined(ele)) {
|
|
6393
6410
|
return;
|
|
@@ -6406,7 +6423,7 @@ let Accordion = class Accordion extends Component {
|
|
|
6406
6423
|
*/
|
|
6407
6424
|
select(index) {
|
|
6408
6425
|
const itemEle = this.getItemElements();
|
|
6409
|
-
const ele = itemEle[index];
|
|
6426
|
+
const ele = itemEle[parseInt(index.toString(), 10)];
|
|
6410
6427
|
if (isNullOrUndefined(ele) || isNullOrUndefined(select('.' + CLS_HEADER, ele))) {
|
|
6411
6428
|
return;
|
|
6412
6429
|
}
|
|
@@ -6422,7 +6439,7 @@ let Accordion = class Accordion extends Component {
|
|
|
6422
6439
|
*/
|
|
6423
6440
|
hideItem(index, isHidden) {
|
|
6424
6441
|
const itemEle = this.getItemElements();
|
|
6425
|
-
const ele = itemEle[index];
|
|
6442
|
+
const ele = itemEle[parseInt(index.toString(), 10)];
|
|
6426
6443
|
if (isNullOrUndefined(ele)) {
|
|
6427
6444
|
return;
|
|
6428
6445
|
}
|
|
@@ -6446,7 +6463,7 @@ let Accordion = class Accordion extends Component {
|
|
|
6446
6463
|
*/
|
|
6447
6464
|
enableItem(index, isEnable) {
|
|
6448
6465
|
const itemEle = this.getItemElements();
|
|
6449
|
-
const ele = itemEle[index];
|
|
6466
|
+
const ele = itemEle[parseInt(index.toString(), 10)];
|
|
6450
6467
|
if (isNullOrUndefined(ele)) {
|
|
6451
6468
|
return;
|
|
6452
6469
|
}
|
|
@@ -6497,7 +6514,7 @@ let Accordion = class Accordion extends Component {
|
|
|
6497
6514
|
}
|
|
6498
6515
|
}
|
|
6499
6516
|
else {
|
|
6500
|
-
const ele = itemEle[index];
|
|
6517
|
+
const ele = itemEle[parseInt(index.toString(), 10)];
|
|
6501
6518
|
if (isNullOrUndefined(ele) || !ele.classList.contains(CLS_SLCT) || (ele.classList.contains(CLS_ACTIVE) && isExpand)) {
|
|
6502
6519
|
return;
|
|
6503
6520
|
}
|
|
@@ -6547,7 +6564,7 @@ let Accordion = class Accordion extends Component {
|
|
|
6547
6564
|
ctnElePos = this.element;
|
|
6548
6565
|
}
|
|
6549
6566
|
else {
|
|
6550
|
-
ctnElePos = this.element.querySelectorAll('.' + CLS_ITEM$1)[index];
|
|
6567
|
+
ctnElePos = this.element.querySelectorAll('.' + CLS_ITEM$1)[parseInt(index.toString(), 10)];
|
|
6551
6568
|
}
|
|
6552
6569
|
this.templateEle.forEach((eleStr) => {
|
|
6553
6570
|
if (!isNullOrUndefined(ctnElePos.querySelector(eleStr))) {
|
|
@@ -6558,7 +6575,7 @@ let Accordion = class Accordion extends Component {
|
|
|
6558
6575
|
updateItem(item, index) {
|
|
6559
6576
|
if (!isNullOrUndefined(item)) {
|
|
6560
6577
|
const items = this.getItems();
|
|
6561
|
-
const itemObj = items[index];
|
|
6578
|
+
const itemObj = items[parseInt(index.toString(), 10)];
|
|
6562
6579
|
items.splice(index, 1);
|
|
6563
6580
|
this.restoreContent(index);
|
|
6564
6581
|
detach(item);
|
|
@@ -6602,11 +6619,11 @@ let Accordion = class Accordion extends Component {
|
|
|
6602
6619
|
if (!(newProp.items instanceof Array && oldProp.items instanceof Array)) {
|
|
6603
6620
|
const changedProp = Object.keys(newProp.items);
|
|
6604
6621
|
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];
|
|
6622
|
+
const index = parseInt(Object.keys(newProp.items)[parseInt(j.toString(), 10)], 10);
|
|
6623
|
+
const property = Object.keys(newProp.items[parseInt(index.toString(), 10)])[0];
|
|
6624
|
+
const item = selectAll('.' + CLS_ITEM$1, this.element)[parseInt(index.toString(), 10)];
|
|
6625
|
+
const oldVal = Object(oldProp.items[parseInt(index.toString(), 10)])[`${property}`];
|
|
6626
|
+
const newVal = Object(newProp.items[parseInt(index.toString(), 10)])[`${property}`];
|
|
6610
6627
|
const temp = property;
|
|
6611
6628
|
if (temp === 'header' || temp === 'iconCss' || temp === 'expanded' || ((temp === 'content') && (oldVal === ''))) {
|
|
6612
6629
|
this.updateItem(item, index);
|
|
@@ -6620,7 +6637,7 @@ let Accordion = class Accordion extends Component {
|
|
|
6620
6637
|
}
|
|
6621
6638
|
}
|
|
6622
6639
|
if (property === 'visible' && !isNullOrUndefined(item)) {
|
|
6623
|
-
if (Object(newProp.items[index])[property] === false) {
|
|
6640
|
+
if (Object(newProp.items[parseInt(index.toString(), 10)])[`${property}`] === false) {
|
|
6624
6641
|
item.classList.add(CLS_ITEMHIDE);
|
|
6625
6642
|
}
|
|
6626
6643
|
else {
|
|
@@ -7068,8 +7085,8 @@ let Menu = class Menu extends MenuBase {
|
|
|
7068
7085
|
let i;
|
|
7069
7086
|
let items = this.items;
|
|
7070
7087
|
const pIdField = this.getField('parentId');
|
|
7071
|
-
if (item[pIdField]) {
|
|
7072
|
-
idx = this.getIndex(item[pIdField].toString(), true);
|
|
7088
|
+
if (item[`${pIdField}`]) {
|
|
7089
|
+
idx = this.getIndex(item[`${pIdField}`].toString(), true);
|
|
7073
7090
|
for (i = 0; i < idx.length; i++) {
|
|
7074
7091
|
if (!items[idx[i]].items) {
|
|
7075
7092
|
items[idx[i]].items = [];
|
|
@@ -7247,6 +7264,9 @@ __decorate$7([
|
|
|
7247
7264
|
__decorate$7([
|
|
7248
7265
|
Property()
|
|
7249
7266
|
], TabItem.prototype, "id", void 0);
|
|
7267
|
+
__decorate$7([
|
|
7268
|
+
Property(-1)
|
|
7269
|
+
], TabItem.prototype, "tabIndex", void 0);
|
|
7250
7270
|
/**
|
|
7251
7271
|
* Tab is a content panel to show multiple contents in a single space, one at a time.
|
|
7252
7272
|
* Each Tab item has an associated content, that will be displayed based on the active Tab header item.
|
|
@@ -7445,9 +7465,10 @@ let Tab = class Tab extends Component {
|
|
|
7445
7465
|
this.setContentHeight(true);
|
|
7446
7466
|
this.select(this.selectedItem);
|
|
7447
7467
|
}
|
|
7468
|
+
this.tbItem = selectAll('.' + CLS_TB_ITEM, this.hdrEle);
|
|
7448
7469
|
if (!isNullOrUndefined(this.tbItem)) {
|
|
7449
7470
|
for (let i = 0; i < this.items.length; i++) {
|
|
7450
|
-
if (this.
|
|
7471
|
+
if (this.tbItem[i]) {
|
|
7451
7472
|
const tabID = this.items[i].id;
|
|
7452
7473
|
this.tbItem[i].setAttribute('data-id', tabID);
|
|
7453
7474
|
}
|
|
@@ -7548,7 +7569,7 @@ let Tab = class Tab extends Component {
|
|
|
7548
7569
|
if (!this.isReplace && tbItems.length > 0) {
|
|
7549
7570
|
const idList = [];
|
|
7550
7571
|
tbItems.forEach((item) => {
|
|
7551
|
-
idList.push(
|
|
7572
|
+
idList.push(this.getIndexFromEle(item.id));
|
|
7552
7573
|
});
|
|
7553
7574
|
maxId = Math.max(...idList);
|
|
7554
7575
|
}
|
|
@@ -7569,8 +7590,7 @@ let Tab = class Tab extends Component {
|
|
|
7569
7590
|
}
|
|
7570
7591
|
let itemIndex;
|
|
7571
7592
|
if (this.isReplace && !isNullOrUndefined(this.tbId) && this.tbId !== '') {
|
|
7572
|
-
|
|
7573
|
-
itemIndex = parseInt(this.tbId.substring(num + 1), 10);
|
|
7593
|
+
itemIndex = parseInt(this.tbId.substring(this.tbId.lastIndexOf('_') + 1), 10);
|
|
7574
7594
|
this.tbId = '';
|
|
7575
7595
|
}
|
|
7576
7596
|
else {
|
|
@@ -7612,7 +7632,8 @@ let Tab = class Tab extends Component {
|
|
|
7612
7632
|
this.isIconAlone = true;
|
|
7613
7633
|
}
|
|
7614
7634
|
}
|
|
7615
|
-
const
|
|
7635
|
+
const tabIndex = isNullOrUndefined(item.tabIndex) ? '-1' : item.tabIndex.toString();
|
|
7636
|
+
const wrapAttrs = (item.disabled) ? {} : { tabIndex: tabIndex, 'data-tabindex': tabIndex };
|
|
7616
7637
|
tCont.appendChild(this.btnCls.cloneNode(true));
|
|
7617
7638
|
const wrap = this.createElement('div', { className: CLS_WRAP, attrs: wrapAttrs });
|
|
7618
7639
|
wrap.appendChild(tCont);
|
|
@@ -8054,14 +8075,14 @@ let Tab = class Tab extends Component {
|
|
|
8054
8075
|
}
|
|
8055
8076
|
else {
|
|
8056
8077
|
if (!this.isVertical()) {
|
|
8057
|
-
setStyleAttribute(this.cntEle, { 'height': (this.element.
|
|
8078
|
+
setStyleAttribute(this.cntEle, { 'height': (this.element.clientHeight - hdrEle.offsetHeight) + 'px' });
|
|
8058
8079
|
}
|
|
8059
8080
|
}
|
|
8060
8081
|
}
|
|
8061
8082
|
else if (this.heightAdjustMode === 'Fill') {
|
|
8062
8083
|
addClass([this.element], [CLS_FILL]);
|
|
8063
8084
|
setStyleAttribute(this.element, { 'height': '100%' });
|
|
8064
|
-
|
|
8085
|
+
this.cntEle.style.height = 'calc(100% - ' + this.hdrEle.offsetHeight + 'px)';
|
|
8065
8086
|
}
|
|
8066
8087
|
else if (this.heightAdjustMode === 'Auto') {
|
|
8067
8088
|
if (this.isTemplate === true) {
|
|
@@ -8398,12 +8419,14 @@ let Tab = class Tab extends Component {
|
|
|
8398
8419
|
case 'shiftTab':
|
|
8399
8420
|
if (trg.classList.contains(CLS_WRAP)
|
|
8400
8421
|
&& closest(trg, '.' + CLS_TB_ITEM).classList.contains(CLS_ACTIVE$1) === false) {
|
|
8401
|
-
trg.setAttribute('tabindex', '-
|
|
8422
|
+
trg.setAttribute('tabindex', trg.getAttribute('data-tabindex'));
|
|
8402
8423
|
}
|
|
8403
8424
|
if (this.popObj && isVisible(this.popObj.element)) {
|
|
8404
8425
|
this.popObj.hide(this.hide);
|
|
8405
8426
|
}
|
|
8406
|
-
actEle.children.item(0).
|
|
8427
|
+
if (!isNullOrUndefined(actEle) && actEle.children.item(0).getAttribute('tabindex') === '-1') {
|
|
8428
|
+
actEle.children.item(0).setAttribute('tabindex', '0');
|
|
8429
|
+
}
|
|
8407
8430
|
break;
|
|
8408
8431
|
case 'moveLeft':
|
|
8409
8432
|
case 'moveRight':
|
|
@@ -8453,6 +8476,9 @@ let Tab = class Tab extends Component {
|
|
|
8453
8476
|
return;
|
|
8454
8477
|
}
|
|
8455
8478
|
}
|
|
8479
|
+
getIndexFromEle(id) {
|
|
8480
|
+
return parseInt(id.substring(id.lastIndexOf('_') + 1), 10);
|
|
8481
|
+
}
|
|
8456
8482
|
hoverHandler(e) {
|
|
8457
8483
|
const trg = e.target;
|
|
8458
8484
|
if (!isNullOrUndefined(trg.classList) && trg.classList.contains(CLS_ICON_CLOSE)) {
|
|
@@ -8471,8 +8497,7 @@ let Tab = class Tab extends Component {
|
|
|
8471
8497
|
const hdr = this.element.querySelectorAll('.' + CLS_TB_ITEM)[index];
|
|
8472
8498
|
let itemIndex;
|
|
8473
8499
|
if (hdr && !isNullOrUndefined(hdr.id) && hdr.id !== '') {
|
|
8474
|
-
|
|
8475
|
-
itemIndex = parseInt(hdr.id.substring(num + 1), 10);
|
|
8500
|
+
itemIndex = this.getIndexFromEle(hdr.id);
|
|
8476
8501
|
}
|
|
8477
8502
|
else {
|
|
8478
8503
|
itemIndex = index;
|
|
@@ -8787,7 +8812,7 @@ let Tab = class Tab extends Component {
|
|
|
8787
8812
|
}
|
|
8788
8813
|
if (value === true) {
|
|
8789
8814
|
tbItems.classList.remove(CLS_DISABLE$4, CLS_OVERLAY$2);
|
|
8790
|
-
tbItems.firstElementChild.setAttribute('tabindex', '-
|
|
8815
|
+
tbItems.firstElementChild.setAttribute('tabindex', tbItems.firstElementChild.getAttribute('data-tabindex'));
|
|
8791
8816
|
}
|
|
8792
8817
|
else {
|
|
8793
8818
|
tbItems.classList.add(CLS_DISABLE$4, CLS_OVERLAY$2);
|
|
@@ -9042,7 +9067,7 @@ let Tab = class Tab extends Component {
|
|
|
9042
9067
|
this.selectingID = this.extIndex(trg.id);
|
|
9043
9068
|
}
|
|
9044
9069
|
if (!isNullOrUndefined(this.prevItem) && !this.prevItem.classList.contains(CLS_DISABLE$4)) {
|
|
9045
|
-
this.prevItem.children.item(0).setAttribute('tabindex', '
|
|
9070
|
+
this.prevItem.children.item(0).setAttribute('tabindex', this.prevItem.firstElementChild.getAttribute('tabindex'));
|
|
9046
9071
|
}
|
|
9047
9072
|
const eventArg = {
|
|
9048
9073
|
event: event,
|
|
@@ -9288,7 +9313,8 @@ let Tab = class Tab extends Component {
|
|
|
9288
9313
|
this.isIconAlone = true;
|
|
9289
9314
|
}
|
|
9290
9315
|
}
|
|
9291
|
-
const
|
|
9316
|
+
const tabIndex = isNullOrUndefined(item.tabIndex) ? '-1' : item.tabIndex.toString();
|
|
9317
|
+
const wrapAtt = (item.disabled) ? {} : { tabIndex: tabIndex, 'data-tabindex': tabIndex };
|
|
9292
9318
|
tConts.appendChild(this.btnCls.cloneNode(true));
|
|
9293
9319
|
const wraper = this.createElement('div', { className: CLS_WRAP, attrs: wrapAtt });
|
|
9294
9320
|
wraper.appendChild(tConts);
|
|
@@ -9332,9 +9358,7 @@ let Tab = class Tab extends Component {
|
|
|
9332
9358
|
else {
|
|
9333
9359
|
const tabItems = this.element.querySelector('.' + CLS_TB_ITEMS);
|
|
9334
9360
|
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);
|
|
9361
|
+
const index = this.getIndexFromEle(element.id);
|
|
9338
9362
|
const header = element.innerText;
|
|
9339
9363
|
const detachContent = this.element.querySelector('.' + CLS_CONTENT$1).querySelector('.' + CLS_ACTIVE$1).children[0];
|
|
9340
9364
|
const mainContents = detachContent.innerHTML;
|
|
@@ -9353,7 +9377,10 @@ let Tab = class Tab extends Component {
|
|
|
9353
9377
|
const conte = this.createElement('div', {
|
|
9354
9378
|
className: CLS_TEXT_WRAP, innerHTML: txtString + this.btnCls.outerHTML
|
|
9355
9379
|
}).outerHTML;
|
|
9356
|
-
const
|
|
9380
|
+
const tabIndex = element.firstElementChild.getAttribute('data-tabindex');
|
|
9381
|
+
const wrap = this.createElement('div', {
|
|
9382
|
+
className: CLS_WRAP, innerHTML: conte, attrs: { tabIndex: tabIndex, 'data-tabindex': tabIndex }
|
|
9383
|
+
});
|
|
9357
9384
|
tabItems.insertBefore(this.createElement('div', attr), tabItems.children[index + 1]);
|
|
9358
9385
|
this.element.querySelector('.' + CLS_TB_ITEM + '.' + CLS_ACTIVE$1).appendChild(wrap);
|
|
9359
9386
|
const crElem = this.createElement('div', { innerHTML: mainContents });
|
|
@@ -9525,6 +9552,7 @@ const SMALL = 'e-small';
|
|
|
9525
9552
|
const CHILD = 'e-has-child';
|
|
9526
9553
|
const ITEM_ANIMATION_ACTIVE = 'e-animation-active';
|
|
9527
9554
|
const DISABLED$1 = 'e-disabled';
|
|
9555
|
+
const PREVENTSELECT = 'e-prevent';
|
|
9528
9556
|
const treeAriaAttr = {
|
|
9529
9557
|
treeRole: 'group',
|
|
9530
9558
|
itemRole: 'treeitem',
|
|
@@ -9570,6 +9598,9 @@ __decorate$8([
|
|
|
9570
9598
|
__decorate$8([
|
|
9571
9599
|
Property(null)
|
|
9572
9600
|
], FieldsSettings.prototype, "query", void 0);
|
|
9601
|
+
__decorate$8([
|
|
9602
|
+
Property('selectable')
|
|
9603
|
+
], FieldsSettings.prototype, "selectable", void 0);
|
|
9573
9604
|
__decorate$8([
|
|
9574
9605
|
Property('selected')
|
|
9575
9606
|
], FieldsSettings.prototype, "selected", void 0);
|
|
@@ -9614,11 +9645,11 @@ __decorate$8([
|
|
|
9614
9645
|
* The TreeView component is used to represent hierarchical data in a tree like structure with advanced
|
|
9615
9646
|
* functions to perform edit, drag and drop, selection with check-box, and more.
|
|
9616
9647
|
* ```html
|
|
9617
|
-
*
|
|
9648
|
+
* <div id="tree"></div>
|
|
9618
9649
|
* ```
|
|
9619
9650
|
* ```typescript
|
|
9620
|
-
*
|
|
9621
|
-
*
|
|
9651
|
+
* let treeObj: TreeView = new TreeView();
|
|
9652
|
+
* treeObj.appendTo('#tree');
|
|
9622
9653
|
* ```
|
|
9623
9654
|
*/
|
|
9624
9655
|
let TreeView = TreeView_1 = class TreeView extends Component {
|
|
@@ -9636,7 +9667,7 @@ let TreeView = TreeView_1 = class TreeView extends Component {
|
|
|
9636
9667
|
this.changeDataSource = false;
|
|
9637
9668
|
this.hasTemplate = false;
|
|
9638
9669
|
this.isFirstRender = false;
|
|
9639
|
-
// Specifies whether the node is dropped or not
|
|
9670
|
+
// Specifies whether the node is dropped or not
|
|
9640
9671
|
this.isNodeDropped = false;
|
|
9641
9672
|
this.mouseDownStatus = false;
|
|
9642
9673
|
}
|
|
@@ -9685,7 +9716,9 @@ let TreeView = TreeView_1 = class TreeView extends Component {
|
|
|
9685
9716
|
csEnter: 'ctrl+shift+enter',
|
|
9686
9717
|
csHome: 'ctrl+shift+home',
|
|
9687
9718
|
csEnd: 'ctrl+shift+end',
|
|
9688
|
-
space: 'space'
|
|
9719
|
+
space: 'space',
|
|
9720
|
+
shiftSpace: 'shift+space',
|
|
9721
|
+
ctrlSpace: 'ctrl+space'
|
|
9689
9722
|
};
|
|
9690
9723
|
this.listBaseOption = {
|
|
9691
9724
|
expandCollapse: true,
|
|
@@ -10205,6 +10238,10 @@ let TreeView = TreeView_1 = class TreeView extends Component {
|
|
|
10205
10238
|
};
|
|
10206
10239
|
if (!this.isRefreshed) {
|
|
10207
10240
|
this.trigger('drawNode', eventArgs);
|
|
10241
|
+
if (e.curData[this.fields.selectable] === false && !this.showCheckBox) {
|
|
10242
|
+
e.item.classList.add(PREVENTSELECT);
|
|
10243
|
+
e.item.firstElementChild.setAttribute('style', 'cursor: not-allowed');
|
|
10244
|
+
}
|
|
10208
10245
|
}
|
|
10209
10246
|
}
|
|
10210
10247
|
frameMouseHandler(e) {
|
|
@@ -10893,7 +10930,7 @@ let TreeView = TreeView_1 = class TreeView extends Component {
|
|
|
10893
10930
|
else {
|
|
10894
10931
|
let classList$$1 = target.classList;
|
|
10895
10932
|
let li = closest(target, '.' + LISTITEM);
|
|
10896
|
-
if (!li) {
|
|
10933
|
+
if (!li || (li.classList.contains(PREVENTSELECT) && !(classList$$1.contains(EXPANDABLE) || classList$$1.contains(COLLAPSIBLE)))) {
|
|
10897
10934
|
return;
|
|
10898
10935
|
}
|
|
10899
10936
|
else if (event.originalEvent.which !== 3) {
|
|
@@ -11360,7 +11397,7 @@ let TreeView = TreeView_1 = class TreeView extends Component {
|
|
|
11360
11397
|
if (this.isLoaded) {
|
|
11361
11398
|
eventArgs = this.getSelectEvent(li, 'select', e);
|
|
11362
11399
|
this.trigger('nodeSelecting', eventArgs, (observedArgs) => {
|
|
11363
|
-
if (!observedArgs.cancel) {
|
|
11400
|
+
if (!observedArgs.cancel && !observedArgs.node.classList.contains(PREVENTSELECT)) {
|
|
11364
11401
|
this.nodeSelectAction(li, e, observedArgs, multiSelect);
|
|
11365
11402
|
}
|
|
11366
11403
|
});
|
|
@@ -11574,6 +11611,9 @@ let TreeView = TreeView_1 = class TreeView extends Component {
|
|
|
11574
11611
|
if (this.showCheckBox) {
|
|
11575
11612
|
this.checkNode(e);
|
|
11576
11613
|
}
|
|
11614
|
+
else {
|
|
11615
|
+
this.toggleSelect(focusedNode, e);
|
|
11616
|
+
}
|
|
11577
11617
|
break;
|
|
11578
11618
|
case 'moveRight':
|
|
11579
11619
|
this.openNode(this.enableRtl ? false : true, e);
|
|
@@ -11613,6 +11653,8 @@ let TreeView = TreeView_1 = class TreeView extends Component {
|
|
|
11613
11653
|
case 'ctrlEnter':
|
|
11614
11654
|
case 'shiftEnter':
|
|
11615
11655
|
case 'csEnter':
|
|
11656
|
+
case 'shiftSpace':
|
|
11657
|
+
case 'ctrlSpace':
|
|
11616
11658
|
this.toggleSelect(focusedNode, e);
|
|
11617
11659
|
break;
|
|
11618
11660
|
case 'f2':
|
|
@@ -12005,7 +12047,7 @@ let TreeView = TreeView_1 = class TreeView extends Component {
|
|
|
12005
12047
|
}
|
|
12006
12048
|
setFocus(preNode, nextNode) {
|
|
12007
12049
|
removeClass([preNode], [HOVER, FOCUS]);
|
|
12008
|
-
if (!nextNode.classList.contains('e-disable')) {
|
|
12050
|
+
if (!nextNode.classList.contains('e-disable') && !nextNode.classList.contains(PREVENTSELECT)) {
|
|
12009
12051
|
addClass([nextNode], [HOVER, FOCUS]);
|
|
12010
12052
|
this.updateIdAttr(preNode, nextNode);
|
|
12011
12053
|
}
|
|
@@ -12042,7 +12084,7 @@ let TreeView = TreeView_1 = class TreeView extends Component {
|
|
|
12042
12084
|
}
|
|
12043
12085
|
}
|
|
12044
12086
|
setHover(li) {
|
|
12045
|
-
if (!li.classList.contains(HOVER)) {
|
|
12087
|
+
if (!li.classList.contains(HOVER) && !li.classList.contains(PREVENTSELECT)) {
|
|
12046
12088
|
this.removeHover();
|
|
12047
12089
|
addClass([li], HOVER);
|
|
12048
12090
|
}
|
|
@@ -12066,6 +12108,7 @@ let TreeView = TreeView_1 = class TreeView extends Component {
|
|
|
12066
12108
|
let pNode = closest(currLi.parentNode, '.' + LISTITEM);
|
|
12067
12109
|
let pid = pNode ? pNode.getAttribute('data-uid') : null;
|
|
12068
12110
|
let selected = currLi.classList.contains(ACTIVE);
|
|
12111
|
+
let selectable = currLi.classList.contains(PREVENTSELECT) ? false : true;
|
|
12069
12112
|
let expanded = (currLi.getAttribute('aria-expanded') === 'true') ? true : false;
|
|
12070
12113
|
let hasChildren = currLi.getAttribute('aria-expanded') !== null ? true : (select('.' + EXPANDABLE, currLi) || select('.' + COLLAPSIBLE, currLi)) != null ? true : false;
|
|
12071
12114
|
let checked = null;
|
|
@@ -12074,7 +12117,7 @@ let TreeView = TreeView_1 = class TreeView extends Component {
|
|
|
12074
12117
|
checked = checkboxElement.getAttribute('aria-checked');
|
|
12075
12118
|
}
|
|
12076
12119
|
return {
|
|
12077
|
-
id: id, text: text, parentID: pid, selected: selected, expanded: expanded,
|
|
12120
|
+
id: id, text: text, parentID: pid, selected: selected, selectable: selectable, expanded: expanded,
|
|
12078
12121
|
isChecked: checked, hasChildren: hasChildren
|
|
12079
12122
|
};
|
|
12080
12123
|
}
|
|
@@ -13097,7 +13140,7 @@ let TreeView = TreeView_1 = class TreeView extends Component {
|
|
|
13097
13140
|
dropUl = dropEle;
|
|
13098
13141
|
}
|
|
13099
13142
|
refNode = dropUl.childNodes[index];
|
|
13100
|
-
if (!this.isFirstRender ||
|
|
13143
|
+
if (!this.isFirstRender || this.dataType === 1) {
|
|
13101
13144
|
if (refNode || this.sortOrder === 'None') {
|
|
13102
13145
|
for (let i = 0; i < li.length; i++) {
|
|
13103
13146
|
dropUl.insertBefore(li[i], refNode);
|
|
@@ -14024,8 +14067,8 @@ let TreeView = TreeView_1 = class TreeView extends Component {
|
|
|
14024
14067
|
}
|
|
14025
14068
|
}
|
|
14026
14069
|
/**
|
|
14027
|
-
*
|
|
14028
|
-
*
|
|
14070
|
+
* Editing can also be enabled by using the `beginEdit` property, instead of clicking on the
|
|
14071
|
+
* TreeView node. On passing the node ID or element through this property, the edit textBox
|
|
14029
14072
|
* will be created for the particular node thus allowing us to edit it.
|
|
14030
14073
|
* @param {string | Element} node - Specifies ID of TreeView node/TreeView node.
|
|
14031
14074
|
*/
|
|
@@ -14136,7 +14179,7 @@ let TreeView = TreeView_1 = class TreeView extends Component {
|
|
|
14136
14179
|
return disabledNodes;
|
|
14137
14180
|
}
|
|
14138
14181
|
/**
|
|
14139
|
-
*
|
|
14182
|
+
* Gets the node's data such as id, text, parentID, selected, isChecked, and expanded by passing the node element or it's ID.
|
|
14140
14183
|
* @param {string | Element} node - Specifies ID of TreeView node/TreeView node.
|
|
14141
14184
|
*/
|
|
14142
14185
|
getNode(node) {
|
|
@@ -14500,7 +14543,6 @@ const CLOSE = 'e-close';
|
|
|
14500
14543
|
const OPEN = 'e-open';
|
|
14501
14544
|
const TRASITION = 'e-transition';
|
|
14502
14545
|
const DEFAULTBACKDROP = 'e-sidebar-overlay';
|
|
14503
|
-
const CONTEXTBACKDROP = 'e-backdrop';
|
|
14504
14546
|
const RTL$2 = 'e-rtl';
|
|
14505
14547
|
const RIGHT = 'e-right';
|
|
14506
14548
|
const LEFT = 'e-left';
|
|
@@ -14671,7 +14713,7 @@ let Sidebar = class Sidebar extends Component {
|
|
|
14671
14713
|
destroyBackDrop() {
|
|
14672
14714
|
const sibling = document.querySelector('.e-main-content') || this.targetEle;
|
|
14673
14715
|
if (this.target && this.showBackdrop && sibling) {
|
|
14674
|
-
removeClass([
|
|
14716
|
+
removeClass([this.defaultBackdropDiv], DEFAULTBACKDROP);
|
|
14675
14717
|
}
|
|
14676
14718
|
else if (this.showBackdrop && this.modal) {
|
|
14677
14719
|
this.modal.style.display = 'none';
|
|
@@ -14807,8 +14849,12 @@ let Sidebar = class Sidebar extends Component {
|
|
|
14807
14849
|
}
|
|
14808
14850
|
createBackDrop() {
|
|
14809
14851
|
if (this.target && this.showBackdrop && this.getState()) {
|
|
14852
|
+
const targetString = this.target;
|
|
14810
14853
|
const sibling = document.querySelector('.e-main-content') || this.targetEle;
|
|
14811
|
-
|
|
14854
|
+
this.defaultBackdropDiv = this.createElement('div');
|
|
14855
|
+
addClass([this.defaultBackdropDiv], DEFAULTBACKDROP);
|
|
14856
|
+
setStyleAttribute(this.defaultBackdropDiv, { height: targetString.style.height });
|
|
14857
|
+
sibling.appendChild(this.defaultBackdropDiv);
|
|
14812
14858
|
}
|
|
14813
14859
|
else if (this.showBackdrop && !this.modal && this.getState()) {
|
|
14814
14860
|
this.modal = this.createElement('div');
|
|
@@ -15398,11 +15444,13 @@ let Breadcrumb = class Breadcrumb extends Component {
|
|
|
15398
15444
|
}
|
|
15399
15445
|
if (args.curData.isEmptyUrl) {
|
|
15400
15446
|
args.item.children[0].removeAttribute('href');
|
|
15401
|
-
if ((!isLastItem || (isLastItem && this.enableActiveItemNavigation)) && !(eventArgs.item.disabled
|
|
15447
|
+
if ((!isLastItem || (isLastItem && this.enableActiveItemNavigation)) && !(eventArgs.item.disabled
|
|
15448
|
+
|| this.disabled)) {
|
|
15402
15449
|
args.item.children[0].setAttribute(TABINDEX, '0');
|
|
15403
15450
|
EventHandler.add(args.item.children[0], 'keydown', this.keyDownHandler, this);
|
|
15404
15451
|
}
|
|
15405
15452
|
}
|
|
15453
|
+
args.item.removeAttribute('role');
|
|
15406
15454
|
if (isLastItem) {
|
|
15407
15455
|
args.item.setAttribute('data-active-item', '');
|
|
15408
15456
|
}
|
|
@@ -15412,7 +15460,8 @@ let Breadcrumb = class Breadcrumb extends Component {
|
|
|
15412
15460
|
}
|
|
15413
15461
|
};
|
|
15414
15462
|
for (let i = 0; i < len; i % 2 && j++, i++) {
|
|
15415
|
-
isActiveItem = (this.activeItem && (this.activeItem === items[j].url ||
|
|
15463
|
+
isActiveItem = (this.activeItem && (this.activeItem === items[j].url ||
|
|
15464
|
+
this.activeItem === items[j].text));
|
|
15416
15465
|
if (isCollasped && i > 1 && i < len - 2) {
|
|
15417
15466
|
continue;
|
|
15418
15467
|
}
|
|
@@ -15438,7 +15487,8 @@ let Breadcrumb = class Breadcrumb extends Component {
|
|
|
15438
15487
|
else {
|
|
15439
15488
|
isSingleLevel = true;
|
|
15440
15489
|
}
|
|
15441
|
-
item = [extend({}, items[j].properties ?
|
|
15490
|
+
item = [extend({}, items[j].properties ?
|
|
15491
|
+
items[j].properties
|
|
15442
15492
|
: items[j])];
|
|
15443
15493
|
if (!item[0].url && !this.itemTemplate) {
|
|
15444
15494
|
item = [extend({}, item[0], { isEmptyUrl: true, url: '#' })];
|
|
@@ -15526,7 +15576,8 @@ let Breadcrumb = class Breadcrumb extends Component {
|
|
|
15526
15576
|
for (let i = 0; i < liElems.length - 2; i++) {
|
|
15527
15577
|
if (liWidth > width) {
|
|
15528
15578
|
maxItems = Math.ceil((i - 1) / 2) + ((this.overflowMode === 'Menu' && i <= 2) ? 0 : 1);
|
|
15529
|
-
if (((this.maxItems > maxItems && !(this.maxItems > -1 && maxItems
|
|
15579
|
+
if (((this.maxItems > maxItems && !(this.maxItems > -1 && maxItems === -1)) ||
|
|
15580
|
+
this.maxItems === -1) && this._maxItems !== maxItems) {
|
|
15530
15581
|
this._maxItems = maxItems;
|
|
15531
15582
|
this.initPvtProps();
|
|
15532
15583
|
return this.reRenderItems();
|
|
@@ -15569,7 +15620,7 @@ let Breadcrumb = class Breadcrumb extends Component {
|
|
|
15569
15620
|
}
|
|
15570
15621
|
hasField(items, field) {
|
|
15571
15622
|
for (let i = 0, len = items.length; i < len; i++) {
|
|
15572
|
-
if (items[i][field]) {
|
|
15623
|
+
if (items[i][`${field}`]) {
|
|
15573
15624
|
return true;
|
|
15574
15625
|
}
|
|
15575
15626
|
}
|
|
@@ -15833,8 +15884,8 @@ let Breadcrumb = class Breadcrumb extends Component {
|
|
|
15833
15884
|
* @returns {void}
|
|
15834
15885
|
*/
|
|
15835
15886
|
destroy() {
|
|
15836
|
-
|
|
15837
|
-
|
|
15887
|
+
const classes = [];
|
|
15888
|
+
const attributes$$1 = ['aria-label'];
|
|
15838
15889
|
if (this.cssClass) {
|
|
15839
15890
|
classes.concat(this.cssClass.split(' '));
|
|
15840
15891
|
}
|
|
@@ -16441,15 +16492,15 @@ let Carousel = class Carousel extends Component {
|
|
|
16441
16492
|
if (isNullOrUndefined(activeSlide) && this.showIndicators) {
|
|
16442
16493
|
const activeIndicator = this.element.querySelector(`.${CLS_INDICATOR_BAR}.${CLS_ACTIVE$2}`);
|
|
16443
16494
|
const activeIndex = parseInt(activeIndicator.dataset.index, 10);
|
|
16444
|
-
addClass([allSlides[activeIndex]], CLS_ACTIVE$2);
|
|
16495
|
+
addClass([allSlides[parseInt(activeIndex.toString(), 10)]], CLS_ACTIVE$2);
|
|
16445
16496
|
return;
|
|
16446
16497
|
}
|
|
16447
16498
|
else if (isNullOrUndefined(activeSlide)) {
|
|
16448
|
-
addClass([allSlides[currentIndex]], CLS_ACTIVE$2);
|
|
16499
|
+
addClass([allSlides[parseInt(currentIndex.toString(), 10)]], CLS_ACTIVE$2);
|
|
16449
16500
|
return;
|
|
16450
16501
|
}
|
|
16451
16502
|
const activeIndex = parseInt(activeSlide.dataset.index, 10);
|
|
16452
|
-
const currentSlide = allSlides[currentIndex];
|
|
16503
|
+
const currentSlide = allSlides[parseInt(currentIndex.toString(), 10)];
|
|
16453
16504
|
const eventArgs = {
|
|
16454
16505
|
currentIndex: activeIndex,
|
|
16455
16506
|
nextIndex: currentIndex,
|
|
@@ -16468,10 +16519,10 @@ let Carousel = class Carousel extends Component {
|
|
|
16468
16519
|
attributes(args.nextSlide, { 'aria-hidden': 'false' });
|
|
16469
16520
|
const slideIndicators = [].slice.call(this.element.querySelectorAll(`.${CLS_INDICATOR_BAR}`));
|
|
16470
16521
|
if (slideIndicators.length > 0) {
|
|
16471
|
-
attributes(slideIndicators[activeIndex], { 'aria-current': 'false' });
|
|
16472
|
-
attributes(slideIndicators[currentIndex], { 'aria-current': 'true' });
|
|
16522
|
+
attributes(slideIndicators[parseInt(activeIndex.toString(), 10)], { 'aria-current': 'false' });
|
|
16523
|
+
attributes(slideIndicators[parseInt(currentIndex.toString(), 10)], { 'aria-current': 'true' });
|
|
16473
16524
|
removeClass(slideIndicators, CLS_ACTIVE$2);
|
|
16474
|
-
addClass([slideIndicators[currentIndex]], CLS_ACTIVE$2);
|
|
16525
|
+
addClass([slideIndicators[parseInt(currentIndex.toString(), 10)]], CLS_ACTIVE$2);
|
|
16475
16526
|
}
|
|
16476
16527
|
this.slideChangedEventArgs = {
|
|
16477
16528
|
currentIndex: args.nextIndex,
|
|
@@ -16483,7 +16534,7 @@ let Carousel = class Carousel extends Component {
|
|
|
16483
16534
|
};
|
|
16484
16535
|
if (this.partialVisible) {
|
|
16485
16536
|
const container = this.element.querySelector('.' + CLS_ITEMS$2);
|
|
16486
|
-
const slideWidth = allSlides[currentIndex].clientWidth;
|
|
16537
|
+
const slideWidth = allSlides[parseInt(currentIndex.toString(), 10)].clientWidth;
|
|
16487
16538
|
container.style.transitionProperty = 'transform';
|
|
16488
16539
|
if (this.loop) {
|
|
16489
16540
|
if (this.slideChangedEventArgs.currentIndex === 0 && this.slideChangedEventArgs.slideDirection === 'Next') {
|
|
@@ -16555,10 +16606,10 @@ let Carousel = class Carousel extends Component {
|
|
|
16555
16606
|
const keys = Object.keys(attribute);
|
|
16556
16607
|
for (const key of keys) {
|
|
16557
16608
|
if (key === 'class') {
|
|
16558
|
-
addClass([element], attribute[key]);
|
|
16609
|
+
addClass([element], attribute[`${key}`]);
|
|
16559
16610
|
}
|
|
16560
16611
|
else {
|
|
16561
|
-
element.setAttribute(key, attribute[key]);
|
|
16612
|
+
element.setAttribute(key, attribute[`${key}`]);
|
|
16562
16613
|
}
|
|
16563
16614
|
}
|
|
16564
16615
|
}
|
|
@@ -16672,7 +16723,7 @@ let Carousel = class Carousel extends Component {
|
|
|
16672
16723
|
}
|
|
16673
16724
|
}
|
|
16674
16725
|
swipeHandler(e) {
|
|
16675
|
-
if (this.element.classList.contains(CLS_HOVER)) {
|
|
16726
|
+
if (this.element.classList.contains(CLS_HOVER) || isNullOrUndefined(this.slideItems) || this.slideItems.length <= 1) {
|
|
16676
16727
|
return;
|
|
16677
16728
|
}
|
|
16678
16729
|
const direction = (e.swipeDirection === 'Right') ? 'Previous' : 'Next';
|
|
@@ -17076,7 +17127,7 @@ let AppBar = class AppBar extends Component {
|
|
|
17076
17127
|
const keys = Object.keys(oldProp.htmlAttributes);
|
|
17077
17128
|
for (const key of keys) {
|
|
17078
17129
|
if (key === 'class') {
|
|
17079
|
-
removeClass([this.element], oldProp.htmlAttributes[key]);
|
|
17130
|
+
removeClass([this.element], oldProp.htmlAttributes[`${key}`]);
|
|
17080
17131
|
}
|
|
17081
17132
|
else {
|
|
17082
17133
|
this.element.removeAttribute(key);
|
|
@@ -17105,10 +17156,10 @@ let AppBar = class AppBar extends Component {
|
|
|
17105
17156
|
const keys = Object.keys(attribute);
|
|
17106
17157
|
for (const key of keys) {
|
|
17107
17158
|
if (key === 'class') {
|
|
17108
|
-
addClass([element], attribute[key]);
|
|
17159
|
+
addClass([element], attribute[`${key}`]);
|
|
17109
17160
|
}
|
|
17110
17161
|
else {
|
|
17111
|
-
element.setAttribute(key, attribute[key]);
|
|
17162
|
+
element.setAttribute(key, attribute[`${key}`]);
|
|
17112
17163
|
}
|
|
17113
17164
|
}
|
|
17114
17165
|
}
|