@syncfusion/ej2-navigations 28.2.12 → 29.1.34
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/README.md +1 -1
- 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 +96 -18
- package/dist/es6/ej2-navigations.es2015.js.map +1 -1
- package/dist/es6/ej2-navigations.es5.js +96 -18
- 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 +19 -26
- package/src/common/menu-base.d.ts +5 -0
- package/src/common/menu-base.js +60 -6
- package/src/sidebar/sidebar.d.ts +1 -0
- package/src/sidebar/sidebar.js +8 -1
- package/src/tab/tab-model.d.ts +1 -1
- package/src/tab/tab.d.ts +3 -3
- package/src/tab/tab.js +20 -4
- package/src/treeview/treeview.js +7 -6
- package/styles/accordion/_bootstrap-dark-definition.scss +4 -2
- package/styles/accordion/_bootstrap4-definition.scss +7 -5
- package/styles/accordion/bootstrap-dark.css +12 -12
- package/styles/accordion/bootstrap4.css +4 -4
- package/styles/accordion/bootstrap5-dark.css +37 -37
- package/styles/accordion/bootstrap5.css +16 -16
- package/styles/accordion/fabric.css +11 -11
- package/styles/accordion/tailwind-dark.css +2 -2
- package/styles/bds-lite.css +11 -1
- package/styles/bds.css +11 -1
- package/styles/bootstrap-dark-lite.css +60 -50
- package/styles/bootstrap-dark.css +60 -50
- package/styles/bootstrap-lite.css +11 -1
- package/styles/bootstrap.css +11 -1
- package/styles/bootstrap4-lite.css +88 -78
- package/styles/bootstrap4.css +89 -79
- package/styles/bootstrap5-dark-lite.css +223 -213
- package/styles/bootstrap5-dark.css +223 -213
- package/styles/bootstrap5-lite.css +84 -74
- package/styles/bootstrap5.3-lite.css +12 -8
- package/styles/bootstrap5.3.css +18 -8
- package/styles/bootstrap5.css +84 -74
- package/styles/breadcrumb/_bigger.scss +3 -1
- package/styles/breadcrumb/_bootstrap4-definition.scss +6 -4
- package/styles/breadcrumb/_bootstrap5-definition.scss +5 -3
- package/styles/breadcrumb/_fusionnew-definition.scss +9 -3
- package/styles/breadcrumb/_layout.scss +3 -1
- package/styles/breadcrumb/bootstrap-dark.css +2 -2
- package/styles/breadcrumb/bootstrap4.css +4 -4
- package/styles/breadcrumb/bootstrap5-dark.css +12 -12
- package/styles/breadcrumb/bootstrap5.css +3 -3
- package/styles/breadcrumb/fabric-dark.css +3 -3
- package/styles/context-menu/_bootstrap4-definition.scss +3 -1
- package/styles/context-menu/_fusionnew-definition.scss +1 -0
- package/styles/context-menu/_theme.scss +9 -1
- package/styles/context-menu/bds.css +1 -1
- package/styles/context-menu/bootstrap-dark.css +1 -1
- package/styles/context-menu/bootstrap.css +1 -1
- package/styles/context-menu/bootstrap4.css +2 -2
- package/styles/context-menu/bootstrap5-dark.css +8 -8
- package/styles/context-menu/bootstrap5.3.css +1 -1
- package/styles/context-menu/bootstrap5.css +1 -1
- package/styles/context-menu/fabric-dark.css +1 -1
- package/styles/context-menu/fabric.css +1 -1
- package/styles/context-menu/fluent-dark.css +1 -1
- package/styles/context-menu/fluent.css +1 -1
- package/styles/context-menu/fluent2.css +1 -1
- package/styles/context-menu/highcontrast-light.css +1 -1
- package/styles/context-menu/highcontrast.css +1 -1
- package/styles/context-menu/material-dark.css +2 -1
- package/styles/context-menu/material.css +1 -1
- package/styles/context-menu/material3-dark.css +2 -1
- package/styles/context-menu/material3.css +2 -1
- package/styles/context-menu/tailwind-dark.css +1 -1
- package/styles/context-menu/tailwind.css +1 -1
- package/styles/context-menu/tailwind3.css +1 -1
- package/styles/fabric-dark-lite.css +17 -7
- package/styles/fabric-dark.css +17 -7
- package/styles/fabric-lite.css +48 -38
- package/styles/fabric.css +48 -38
- package/styles/fluent-dark-lite.css +21 -11
- package/styles/fluent-dark.css +21 -11
- package/styles/fluent-lite.css +21 -11
- package/styles/fluent.css +21 -11
- package/styles/fluent2-lite.css +11 -1
- package/styles/fluent2.css +11 -1
- package/styles/h-scroll/_bootstrap4-definition.scss +4 -2
- package/styles/h-scroll/bootstrap4.css +5 -5
- package/styles/h-scroll/bootstrap5-dark.css +6 -6
- package/styles/h-scroll/fabric.css +1 -1
- package/styles/highcontrast-light-lite.css +11 -1
- package/styles/highcontrast-light.css +11 -1
- package/styles/highcontrast-lite.css +11 -1
- package/styles/highcontrast.css +11 -1
- package/styles/material-dark-lite.css +14 -3
- package/styles/material-dark.css +14 -3
- package/styles/material-lite.css +19 -9
- package/styles/material.css +19 -9
- package/styles/material3-dark-lite.css +12 -1
- package/styles/material3-dark.css +19 -2
- package/styles/material3-lite.css +12 -1
- package/styles/material3.css +19 -2
- package/styles/menu/_bootstrap4-definition.scss +4 -2
- package/styles/menu/_theme.scss +7 -6
- package/styles/menu/bootstrap4.css +13 -13
- package/styles/menu/bootstrap5-dark.css +14 -14
- package/styles/pager/_bigger.scss +3 -1
- package/styles/pager/_bootstrap-dark-definition.scss +3 -2
- package/styles/pager/_bootstrap4-definition.scss +2 -1
- package/styles/pager/bootstrap-dark.css +4 -4
- package/styles/pager/bootstrap4.css +1 -1
- package/styles/pager/bootstrap5-dark.css +13 -13
- package/styles/pager/bootstrap5.css +4 -4
- package/styles/pager/fabric.css +2 -2
- package/styles/pager/material3-dark.css +7 -1
- package/styles/pager/material3.css +7 -1
- package/styles/sidebar/bootstrap5-dark.css +1 -1
- package/styles/stepper/_bootstrap4-definition.scss +4 -2
- package/styles/stepper/_material-dark-definition.scss +4 -2
- package/styles/stepper/_material-definition.scss +7 -5
- package/styles/stepper/bootstrap-dark.css +2 -2
- package/styles/stepper/bootstrap4.css +2 -2
- package/styles/stepper/bootstrap5-dark.css +20 -20
- package/styles/stepper/bootstrap5.css +2 -2
- package/styles/stepper/fabric-dark.css +2 -2
- package/styles/stepper/fabric.css +2 -2
- package/styles/stepper/fluent-dark.css +1 -1
- package/styles/stepper/fluent.css +1 -1
- package/styles/stepper/material-dark.css +2 -2
- package/styles/stepper/material.css +8 -8
- package/styles/tab/_bootstrap-dark-definition.scss +8 -6
- package/styles/tab/_bootstrap4-definition.scss +13 -11
- package/styles/tab/_bootstrap5-definition.scss +3 -1
- package/styles/tab/_bootstrap5.3-definition.scss +3 -1
- package/styles/tab/_fluent-definition.scss +4 -2
- package/styles/tab/_layout.scss +4 -0
- package/styles/tab/bds.css +5 -0
- package/styles/tab/bootstrap-dark.css +34 -29
- package/styles/tab/bootstrap.css +5 -0
- package/styles/tab/bootstrap4.css +32 -27
- package/styles/tab/bootstrap5-dark.css +48 -43
- package/styles/tab/bootstrap5.3.css +5 -0
- package/styles/tab/bootstrap5.css +27 -22
- package/styles/tab/fabric-dark.css +5 -0
- package/styles/tab/fabric.css +9 -4
- package/styles/tab/fluent-dark.css +12 -7
- package/styles/tab/fluent.css +12 -7
- package/styles/tab/fluent2.css +5 -0
- package/styles/tab/highcontrast-light.css +5 -0
- package/styles/tab/highcontrast.css +5 -0
- package/styles/tab/material-dark.css +5 -0
- package/styles/tab/material.css +5 -0
- package/styles/tab/material3-dark.css +5 -0
- package/styles/tab/material3.css +5 -0
- package/styles/tab/tailwind-dark.css +5 -0
- package/styles/tab/tailwind.css +5 -0
- package/styles/tab/tailwind3.css +5 -0
- package/styles/tailwind-dark-lite.css +15 -5
- package/styles/tailwind-dark.css +15 -5
- package/styles/tailwind-lite.css +13 -3
- package/styles/tailwind.css +13 -3
- package/styles/tailwind3-lite.css +12 -2
- package/styles/tailwind3.css +13 -2
- package/styles/toolbar/_bootstrap4-definition.scss +8 -6
- package/styles/toolbar/_material-dark-definition.scss +3 -1
- package/styles/toolbar/_material-definition.scss +3 -1
- package/styles/toolbar/bootstrap4.css +12 -12
- package/styles/toolbar/bootstrap5-dark.css +47 -47
- package/styles/toolbar/bootstrap5.css +23 -23
- package/styles/toolbar/fabric.css +9 -9
- package/styles/treeview/_bigger.scss +5 -1
- package/styles/treeview/_bootstrap4-definition.scss +6 -4
- package/styles/treeview/_bootstrap5-definition.scss +4 -2
- package/styles/treeview/_bootstrap5.3-definition.scss +1 -1
- package/styles/treeview/_fluent-definition.scss +3 -1
- package/styles/treeview/_layout.scss +6 -2
- package/styles/treeview/_tailwind-definition.scss +3 -1
- package/styles/treeview/_theme.scss +3 -1
- package/styles/treeview/bds.css +5 -0
- package/styles/treeview/bootstrap-dark.css +5 -0
- package/styles/treeview/bootstrap.css +5 -0
- package/styles/treeview/bootstrap4.css +14 -9
- package/styles/treeview/bootstrap5-dark.css +17 -12
- package/styles/treeview/bootstrap5.3.css +12 -7
- package/styles/treeview/bootstrap5.css +8 -3
- package/styles/treeview/fabric-dark.css +5 -0
- package/styles/treeview/fabric.css +12 -7
- package/styles/treeview/fluent-dark.css +7 -2
- package/styles/treeview/fluent.css +7 -2
- package/styles/treeview/fluent2.css +5 -0
- package/styles/treeview/highcontrast-light.css +5 -0
- package/styles/treeview/highcontrast.css +5 -0
- package/styles/treeview/material-dark.css +5 -0
- package/styles/treeview/material.css +5 -0
- package/styles/treeview/material3-dark.css +5 -0
- package/styles/treeview/material3.css +5 -0
- package/styles/treeview/tailwind-dark.css +7 -2
- package/styles/treeview/tailwind.css +7 -2
- package/styles/treeview/tailwind3.css +7 -1
- package/styles/v-scroll/fabric-dark.css +1 -1
- package/styles/v-scroll/fabric.css +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Component, Browser, getUniqueID, Touch, EventHandler, isNullOrUndefined, selectAll, detach, classList, Property, NotifyPropertyChanges, createElement, removeClass, select, ChildProperty, Collection, Event, Complex, Animation, getValue, setValue, append, addClass, isBlazor, rippleEffect, KeyboardEvents,
|
|
1
|
+
import { Component, Browser, getUniqueID, Touch, EventHandler, isNullOrUndefined, selectAll, detach, classList, Property, NotifyPropertyChanges, createElement, removeClass, select, ChildProperty, Collection, Event, Complex, Animation, getValue, setValue, append, closest, addClass, isBlazor, rippleEffect, KeyboardEvents, getInstance, isVisible, SanitizeHtmlHelper, formatUnit, setStyleAttribute, attributes, compile, isRippleEnabled, animationMode, remove, getRandomId, L10n, Draggable, isUndefined, getElement, Droppable, matches, extend, merge, initializeCSPTemplate } from '@syncfusion/ej2-base';
|
|
2
2
|
import { ListBase } from '@syncfusion/ej2-lists';
|
|
3
3
|
import { getScrollableParent, Popup, getZindexPartial, fit, isCollide, calculatePosition, createSpinner, showSpinner, hideSpinner, Tooltip } from '@syncfusion/ej2-popups';
|
|
4
4
|
import { Button, createCheckBox, rippleMouseHandler } from '@syncfusion/ej2-buttons';
|
|
@@ -1140,6 +1140,7 @@ let MenuBase = class MenuBase extends Component {
|
|
|
1140
1140
|
this.tempItem = [];
|
|
1141
1141
|
this.showSubMenuOn = 'Auto';
|
|
1142
1142
|
this.isAnimationNone = false;
|
|
1143
|
+
this.isKBDAction = false;
|
|
1143
1144
|
}
|
|
1144
1145
|
/**
|
|
1145
1146
|
* Initialized third party configuration settings.
|
|
@@ -1213,6 +1214,30 @@ let MenuBase = class MenuBase extends Component {
|
|
|
1213
1214
|
});
|
|
1214
1215
|
}
|
|
1215
1216
|
}
|
|
1217
|
+
enableTouchScroll(scrollList) {
|
|
1218
|
+
let touchStartY = 0;
|
|
1219
|
+
this.touchStartFn = (e) => {
|
|
1220
|
+
touchStartY = e.touches[0].clientY;
|
|
1221
|
+
};
|
|
1222
|
+
this.touchMoveFn = (e) => {
|
|
1223
|
+
const touchEndY = e.touches[0].clientY;
|
|
1224
|
+
const touchDiff = touchStartY - touchEndY;
|
|
1225
|
+
const atTop = scrollList.scrollTop === 0;
|
|
1226
|
+
const atBottom = scrollList.scrollTop + scrollList.clientHeight === scrollList.scrollHeight;
|
|
1227
|
+
if ((atTop && touchDiff < 0) || (atBottom && touchDiff > 0)) {
|
|
1228
|
+
e.preventDefault();
|
|
1229
|
+
}
|
|
1230
|
+
touchStartY = touchEndY;
|
|
1231
|
+
};
|
|
1232
|
+
scrollList.addEventListener('touchstart', this.touchStartFn, { passive: false });
|
|
1233
|
+
scrollList.addEventListener('touchmove', this.touchMoveFn, { passive: false });
|
|
1234
|
+
}
|
|
1235
|
+
touchOutsideHandler(e) {
|
|
1236
|
+
const target = e.target;
|
|
1237
|
+
if (!closest(target, '.e-' + this.getModuleName() + '-wrapper')) {
|
|
1238
|
+
this.closeMenu();
|
|
1239
|
+
}
|
|
1240
|
+
}
|
|
1216
1241
|
initialize() {
|
|
1217
1242
|
let wrapper = this.getWrapper();
|
|
1218
1243
|
if (!wrapper) {
|
|
@@ -1312,6 +1337,10 @@ let MenuBase = class MenuBase extends Component {
|
|
|
1312
1337
|
EventHandler.add(document, 'click', this.delegateClickHandler, this);
|
|
1313
1338
|
this.wireKeyboardEvent(wrapper);
|
|
1314
1339
|
this.rippleFn = rippleEffect(wrapper, { selector: '.' + ITEM });
|
|
1340
|
+
if (!this.isMenu && this.enableScrolling) {
|
|
1341
|
+
this.enableTouchScroll(wrapper);
|
|
1342
|
+
document.addEventListener('touchstart', this.touchOutsideHandler.bind(this), { passive: true });
|
|
1343
|
+
}
|
|
1315
1344
|
}
|
|
1316
1345
|
wireKeyboardEvent(element) {
|
|
1317
1346
|
const keyConfigs = {
|
|
@@ -1363,6 +1392,7 @@ let MenuBase = class MenuBase extends Component {
|
|
|
1363
1392
|
if (this.enableScrolling && e.keyCode === 13 && trgt.classList.contains('e-scroll-nav')) {
|
|
1364
1393
|
this.removeLIStateByClass([FOCUSED, SELECTED], [closest(trgt, '.e-' + this.getModuleName() + '-wrapper')]);
|
|
1365
1394
|
}
|
|
1395
|
+
this.isKBDAction = true;
|
|
1366
1396
|
if (actionNeeded) {
|
|
1367
1397
|
switch (e.action) {
|
|
1368
1398
|
case RIGHTARROW:
|
|
@@ -1420,6 +1450,9 @@ let MenuBase = class MenuBase extends Component {
|
|
|
1420
1450
|
}
|
|
1421
1451
|
break;
|
|
1422
1452
|
}
|
|
1453
|
+
if (this.isAnimationNone) {
|
|
1454
|
+
this.isKBDAction = false;
|
|
1455
|
+
}
|
|
1423
1456
|
if (actionNeeded) {
|
|
1424
1457
|
e.action = actionName;
|
|
1425
1458
|
}
|
|
@@ -2194,8 +2227,15 @@ let MenuBase = class MenuBase extends Component {
|
|
|
2194
2227
|
}
|
|
2195
2228
|
else {
|
|
2196
2229
|
if (Browser.isDevice) {
|
|
2197
|
-
|
|
2198
|
-
|
|
2230
|
+
if (!this.isMenu && this.enableScrolling) {
|
|
2231
|
+
const menuScrollElement = document.querySelector('.e-menu-vscroll');
|
|
2232
|
+
top = Number(menuScrollElement.style.top.replace('px', ''));
|
|
2233
|
+
left = Number(menuScrollElement.style.left.replace('px', ''));
|
|
2234
|
+
}
|
|
2235
|
+
else {
|
|
2236
|
+
top = Number(this.element.style.top.replace(px, ''));
|
|
2237
|
+
left = Number(this.element.style.left.replace(px, ''));
|
|
2238
|
+
}
|
|
2199
2239
|
}
|
|
2200
2240
|
else {
|
|
2201
2241
|
const x = this.enableRtl ? 'left' : 'right';
|
|
@@ -2211,7 +2251,7 @@ let MenuBase = class MenuBase extends Component {
|
|
|
2211
2251
|
if (this.enableRtl || xCollision) {
|
|
2212
2252
|
left = (this.enableRtl && xCollision) ? left : left - ul.offsetWidth;
|
|
2213
2253
|
}
|
|
2214
|
-
if (collide.indexOf('bottom') > -1) {
|
|
2254
|
+
if (collide.indexOf('bottom') > -1 && (this.isMenu || !this.enableScrolling)) {
|
|
2215
2255
|
offset = this.callFit(ul, false, true, top, left);
|
|
2216
2256
|
top = offset.top;
|
|
2217
2257
|
}
|
|
@@ -2506,6 +2546,10 @@ let MenuBase = class MenuBase extends Component {
|
|
|
2506
2546
|
if (sli) {
|
|
2507
2547
|
sli.classList.remove(SELECTED);
|
|
2508
2548
|
}
|
|
2549
|
+
const scrollMenu = this.enableScrolling && !this.isMenu ? closest(cli.parentElement, '.e-menu-vscroll') : null;
|
|
2550
|
+
if (scrollMenu) {
|
|
2551
|
+
destroyScroll(getInstance(scrollMenu, VScroll), scrollMenu);
|
|
2552
|
+
}
|
|
2509
2553
|
detach(cli.parentNode);
|
|
2510
2554
|
this.navIdx.pop();
|
|
2511
2555
|
}
|
|
@@ -2948,6 +2992,11 @@ let MenuBase = class MenuBase extends Component {
|
|
|
2948
2992
|
EventHandler.remove(document, 'click', this.delegateClickHandler);
|
|
2949
2993
|
this.unWireKeyboardEvent(wrapper);
|
|
2950
2994
|
this.rippleFn();
|
|
2995
|
+
if (!this.isMenu && this.enableScrolling) {
|
|
2996
|
+
wrapper.removeEventListener('touchstart', this.touchStartFn);
|
|
2997
|
+
wrapper.removeEventListener('touchmove', this.touchMoveFn);
|
|
2998
|
+
document.removeEventListener('touchstart', this.touchOutsideHandler);
|
|
2999
|
+
}
|
|
2951
3000
|
}
|
|
2952
3001
|
unWireKeyboardEvent(element) {
|
|
2953
3002
|
const keyboardModule = getInstance(element, KeyboardEvents);
|
|
@@ -3008,6 +3057,7 @@ let MenuBase = class MenuBase extends Component {
|
|
|
3008
3057
|
else {
|
|
3009
3058
|
this.end(options.element, isMenuOpen);
|
|
3010
3059
|
}
|
|
3060
|
+
this.isKBDAction = false;
|
|
3011
3061
|
}
|
|
3012
3062
|
});
|
|
3013
3063
|
}
|
|
@@ -3033,14 +3083,14 @@ let MenuBase = class MenuBase extends Component {
|
|
|
3033
3083
|
scrollMenu.style.display = 'block';
|
|
3034
3084
|
}
|
|
3035
3085
|
this.triggerOpen(ul);
|
|
3036
|
-
if (ul.querySelector('.' + FOCUSED)) {
|
|
3086
|
+
if (ul.querySelector('.' + FOCUSED) && this.isKBDAction) {
|
|
3037
3087
|
ul.querySelector('.' + FOCUSED).focus();
|
|
3038
3088
|
}
|
|
3039
3089
|
else {
|
|
3040
3090
|
const ele = this.getWrapper().children[this.getIdx(this.getWrapper(), ul) - 1];
|
|
3041
3091
|
if (this.currentTarget) {
|
|
3042
3092
|
if (!(this.currentTarget.classList.contains('e-numerictextbox') || this.currentTarget.classList.contains('e-textbox') || this.currentTarget.tagName === 'INPUT')) {
|
|
3043
|
-
if (ele) {
|
|
3093
|
+
if (ele && this.isKBDAction) {
|
|
3044
3094
|
ele.querySelector('.' + SELECTED).focus();
|
|
3045
3095
|
}
|
|
3046
3096
|
else {
|
|
@@ -3049,7 +3099,7 @@ let MenuBase = class MenuBase extends Component {
|
|
|
3049
3099
|
}
|
|
3050
3100
|
}
|
|
3051
3101
|
else {
|
|
3052
|
-
if (ele) {
|
|
3102
|
+
if (ele && this.isKBDAction) {
|
|
3053
3103
|
ele.querySelector('.' + SELECTED).focus();
|
|
3054
3104
|
}
|
|
3055
3105
|
else {
|
|
@@ -3178,6 +3228,10 @@ let MenuBase = class MenuBase extends Component {
|
|
|
3178
3228
|
if (Browser.isDevice && !ul.classList.contains('e-contextmenu')) {
|
|
3179
3229
|
ul.children[idx + 1].classList.remove(disabled);
|
|
3180
3230
|
}
|
|
3231
|
+
else if (this.enableScrolling && !ul.classList.contains('e-menu-parent')) {
|
|
3232
|
+
const mainUl = ul.querySelector('.e-menu-parent');
|
|
3233
|
+
mainUl.children[idx].classList.remove(disabled);
|
|
3234
|
+
}
|
|
3181
3235
|
else {
|
|
3182
3236
|
ul.children[idx].classList.remove(disabled);
|
|
3183
3237
|
}
|
|
@@ -7983,7 +8037,7 @@ let Tab = class Tab extends Component {
|
|
|
7983
8037
|
attrs: { 'role': 'tabpanel', 'aria-labelledby': CLS_ITEM$2 + this.tabId + '_' + index }
|
|
7984
8038
|
});
|
|
7985
8039
|
if (['Dynamic', 'Demand'].indexOf(this.loadOn) !== -1 ||
|
|
7986
|
-
(this.loadOn === 'Init' && index ===
|
|
8040
|
+
(this.loadOn === 'Init' && index === this.selectedItem)) {
|
|
7987
8041
|
addClass([contentElement], CLS_ACTIVE$1);
|
|
7988
8042
|
}
|
|
7989
8043
|
return contentElement;
|
|
@@ -8565,7 +8619,8 @@ let Tab = class Tab extends Component {
|
|
|
8565
8619
|
if (this.isTemplate === true) {
|
|
8566
8620
|
const cnt = selectAll('.' + CLS_CONTENT$1 + ' > .' + CLS_ITEM$2, this.element);
|
|
8567
8621
|
for (let i = 0; i < cnt.length; i++) {
|
|
8568
|
-
cnt[i].
|
|
8622
|
+
cnt[i].style.display = 'block';
|
|
8623
|
+
cnt[i].style.visibility = 'visible';
|
|
8569
8624
|
this.maxHeight = Math.max(this.maxHeight, this.getHeight(cnt[i]));
|
|
8570
8625
|
cnt[i].style.removeProperty('display');
|
|
8571
8626
|
cnt[i].style.removeProperty('visibility');
|
|
@@ -9369,6 +9424,9 @@ let Tab = class Tab extends Component {
|
|
|
9369
9424
|
item.disabled = item.disabled || false;
|
|
9370
9425
|
item.visible = item.visible || true;
|
|
9371
9426
|
}
|
|
9427
|
+
if (items && items.length !== 0 && this.element && this.element.classList.contains(CLS_HIDDEN$1)) {
|
|
9428
|
+
this.element.classList.remove(CLS_HIDDEN$1);
|
|
9429
|
+
}
|
|
9372
9430
|
this.trigger('adding', addArgs, (tabAddingArgs) => {
|
|
9373
9431
|
if (!tabAddingArgs.cancel) {
|
|
9374
9432
|
this.addingTabContent(items, index);
|
|
@@ -9495,6 +9553,16 @@ let Tab = class Tab extends Component {
|
|
|
9495
9553
|
this.tbItem = selectAll('.' + CLS_TB_ITEM, this.getTabHeader());
|
|
9496
9554
|
index = this.getSelectingTabIndex(index);
|
|
9497
9555
|
index = !isNaN(index) && index >= 0 && this.tbItem.length > index ? index : 0;
|
|
9556
|
+
const tabItem = this.tbItem[index];
|
|
9557
|
+
if (tabItem) {
|
|
9558
|
+
if (tabItem.classList.contains(CLS_HIDDEN$1)) {
|
|
9559
|
+
tabItem.classList.remove(CLS_HIDDEN$1);
|
|
9560
|
+
}
|
|
9561
|
+
const firstChild = tabItem.firstElementChild;
|
|
9562
|
+
if (firstChild && firstChild.hasAttribute('aria-hidden')) {
|
|
9563
|
+
firstChild.removeAttribute('aria-hidden');
|
|
9564
|
+
}
|
|
9565
|
+
}
|
|
9498
9566
|
this.selectedItem = index;
|
|
9499
9567
|
this.select(index);
|
|
9500
9568
|
}
|
|
@@ -9507,7 +9575,9 @@ let Tab = class Tab extends Component {
|
|
|
9507
9575
|
this.tbItem = selectAll('.' + CLS_TB_ITEM, this.getTabHeader());
|
|
9508
9576
|
}
|
|
9509
9577
|
if (selectAll('.' + CLS_TB_ITEM, this.element).length === 0) {
|
|
9510
|
-
|
|
9578
|
+
const cnt = select('.' + CLS_CONTENT$1, this.element);
|
|
9579
|
+
detach(this.hdrEle);
|
|
9580
|
+
detach(cnt);
|
|
9511
9581
|
}
|
|
9512
9582
|
this.enableAnimation = true;
|
|
9513
9583
|
}
|
|
@@ -9517,7 +9587,7 @@ let Tab = class Tab extends Component {
|
|
|
9517
9587
|
* Shows or hides the Tab that is in the specified index.
|
|
9518
9588
|
*
|
|
9519
9589
|
* @param {number} index - Index value of target item.
|
|
9520
|
-
* @param {boolean} value - Based on this Boolean value, item will be hide (
|
|
9590
|
+
* @param {boolean} value - Based on this Boolean value, item will be hide (true) or show (false). By default, value is true.
|
|
9521
9591
|
* @returns {void}.
|
|
9522
9592
|
*/
|
|
9523
9593
|
hideTab(index, value) {
|
|
@@ -10858,7 +10928,8 @@ let TreeView = TreeView_1 = class TreeView extends Component {
|
|
|
10858
10928
|
this.trigger('drawNode', eventArgs);
|
|
10859
10929
|
if (e.curData[this.fields.selectable] === false && !this.showCheckBox) {
|
|
10860
10930
|
e.item.classList.add(PREVENTSELECT);
|
|
10861
|
-
e.item.firstElementChild
|
|
10931
|
+
const firstChild = e.item.firstElementChild;
|
|
10932
|
+
firstChild.style.cursor = 'not-allowed';
|
|
10862
10933
|
}
|
|
10863
10934
|
}
|
|
10864
10935
|
}
|
|
@@ -13164,7 +13235,7 @@ let TreeView = TreeView_1 = class TreeView extends Component {
|
|
|
13164
13235
|
this.trigger('nodeEditing', eventArgs, (observedArgs) => {
|
|
13165
13236
|
if (!observedArgs.cancel) {
|
|
13166
13237
|
const inpWidth = textEle.offsetWidth + 5;
|
|
13167
|
-
const
|
|
13238
|
+
const widthSize = inpWidth + 'px';
|
|
13168
13239
|
addClass([liEle], EDITING);
|
|
13169
13240
|
if (!isNullOrUndefined(this.nodeTemplateFn)) {
|
|
13170
13241
|
this.destroyTemplate(liEle);
|
|
@@ -13172,16 +13243,16 @@ let TreeView = TreeView_1 = class TreeView extends Component {
|
|
|
13172
13243
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
13173
13244
|
if (this.isReact) {
|
|
13174
13245
|
setTimeout(() => {
|
|
13175
|
-
this.renderTextBox(eventArgs, textEle,
|
|
13246
|
+
this.renderTextBox(eventArgs, textEle, widthSize);
|
|
13176
13247
|
}, 5);
|
|
13177
13248
|
}
|
|
13178
13249
|
else {
|
|
13179
|
-
this.renderTextBox(eventArgs, textEle,
|
|
13250
|
+
this.renderTextBox(eventArgs, textEle, widthSize);
|
|
13180
13251
|
}
|
|
13181
13252
|
}
|
|
13182
13253
|
});
|
|
13183
13254
|
}
|
|
13184
|
-
renderTextBox(eventArgs, textEle,
|
|
13255
|
+
renderTextBox(eventArgs, textEle, widthSize) {
|
|
13185
13256
|
textEle.innerHTML = eventArgs.innerHtml;
|
|
13186
13257
|
const inpEle = select('.' + TREEINPUT, textEle);
|
|
13187
13258
|
this.inputObj = Input.createInput({
|
|
@@ -13190,7 +13261,7 @@ let TreeView = TreeView_1 = class TreeView extends Component {
|
|
|
13190
13261
|
enableRtl: this.enableRtl
|
|
13191
13262
|
}
|
|
13192
13263
|
}, this.createElement);
|
|
13193
|
-
this.inputObj.container.
|
|
13264
|
+
this.inputObj.container.style.width = widthSize;
|
|
13194
13265
|
inpEle.focus();
|
|
13195
13266
|
const inputEle = inpEle;
|
|
13196
13267
|
inputEle.setSelectionRange(0, inputEle.value.length);
|
|
@@ -15910,7 +15981,7 @@ let Sidebar = class Sidebar extends Component {
|
|
|
15910
15981
|
if (!isNullOrUndefined(this.tabIndex)) {
|
|
15911
15982
|
this.element.setAttribute('tabindex', this.tabIndex);
|
|
15912
15983
|
}
|
|
15913
|
-
if (this.type === 'Auto' && !Browser.isDevice) {
|
|
15984
|
+
if (this.type === 'Auto' && !Browser.isDevice && this.checkMediaQuery()) {
|
|
15914
15985
|
this.show();
|
|
15915
15986
|
}
|
|
15916
15987
|
else if (!this.isOpen) {
|
|
@@ -16134,6 +16205,13 @@ let Sidebar = class Sidebar extends Component {
|
|
|
16134
16205
|
}
|
|
16135
16206
|
}
|
|
16136
16207
|
}
|
|
16208
|
+
checkMediaQuery() {
|
|
16209
|
+
if (isNullOrUndefined(this.mediaQuery)) {
|
|
16210
|
+
return true;
|
|
16211
|
+
}
|
|
16212
|
+
return (typeof (this.mediaQuery) === 'string') ?
|
|
16213
|
+
window.matchMedia(this.mediaQuery).matches : (this.mediaQuery).matches;
|
|
16214
|
+
}
|
|
16137
16215
|
resize() {
|
|
16138
16216
|
if (!isNullOrUndefined(this.width) && this.width !== 'auto' && typeof this.width === 'string' && !this.width.includes('px')) {
|
|
16139
16217
|
this.setType(this.type);
|