@syncfusion/ej2-navigations 19.3.57 → 19.4.47
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/.github/PULL_REQUEST_TEMPLATE/Bug.md +63 -0
- package/.github/PULL_REQUEST_TEMPLATE/feature.md +39 -0
- package/CHANGELOG.md +57 -0
- 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 +517 -142
- package/dist/es6/ej2-navigations.es2015.js.map +1 -1
- package/dist/es6/ej2-navigations.es5.js +524 -143
- package/dist/es6/ej2-navigations.es5.js.map +1 -1
- package/dist/global/ej2-navigations.min.js +2 -2
- package/dist/global/ej2-navigations.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/package.json +11 -11
- package/src/accordion/accordion-model.d.ts +5 -5
- package/src/accordion/accordion.d.ts +5 -5
- package/src/accordion/accordion.js +2 -19
- package/src/breadcrumb/breadcrumb-model.d.ts +23 -11
- package/src/breadcrumb/breadcrumb.d.ts +33 -10
- package/src/breadcrumb/breadcrumb.js +320 -78
- package/src/common/menu-base.js +8 -2
- package/src/common/v-scroll.js +1 -1
- package/src/tab/tab-model.d.ts +14 -6
- package/src/tab/tab.d.ts +33 -16
- package/src/tab/tab.js +66 -31
- package/src/toolbar/toolbar-model.d.ts +7 -7
- package/src/toolbar/toolbar.d.ts +6 -6
- package/src/toolbar/toolbar.js +81 -13
- package/src/treeview/treeview-model.d.ts +10 -0
- package/src/treeview/treeview.d.ts +13 -0
- package/src/treeview/treeview.js +48 -0
- package/styles/accordion/_bootstrap-dark-definition.scss +4 -0
- package/styles/accordion/_bootstrap-definition.scss +4 -0
- package/styles/accordion/_bootstrap4-definition.scss +4 -0
- package/styles/accordion/_bootstrap5-definition.scss +39 -35
- package/styles/accordion/_fabric-dark-definition.scss +4 -0
- package/styles/accordion/_fabric-definition.scss +4 -0
- package/styles/accordion/_fluent-definition.scss +85 -0
- package/styles/accordion/_highcontrast-definition.scss +5 -1
- package/styles/accordion/_highcontrast-light-definition.scss +4 -0
- package/styles/accordion/_layout.scss +6 -14
- package/styles/accordion/_material-dark-definition.scss +4 -0
- package/styles/accordion/_material-definition.scss +4 -0
- package/styles/accordion/_tailwind-definition.scss +83 -79
- package/styles/accordion/_theme.scss +12 -11
- package/styles/accordion/bootstrap4.css +1 -2
- package/styles/accordion/bootstrap5-dark.css +11 -2
- package/styles/accordion/bootstrap5.css +11 -2
- package/styles/accordion/highcontrast-light.css +0 -4
- package/styles/accordion/highcontrast.css +1 -5
- package/styles/accordion/icons/_fluent.scss +17 -0
- package/styles/accordion/icons/_tailwind.scss +17 -17
- package/styles/bootstrap-dark.css +319 -85
- package/styles/bootstrap.css +318 -84
- package/styles/bootstrap4.css +319 -77
- package/styles/bootstrap5-dark.css +341 -76
- package/styles/bootstrap5.css +343 -78
- package/styles/breadcrumb/_bootstrap-dark-definition.scss +14 -0
- package/styles/breadcrumb/_bootstrap-definition.scss +13 -0
- package/styles/breadcrumb/_bootstrap4-definition.scss +13 -0
- package/styles/breadcrumb/_bootstrap5-definition.scss +15 -2
- package/styles/breadcrumb/_fabric-dark-definition.scss +13 -0
- package/styles/breadcrumb/_fabric-definition.scss +13 -0
- package/styles/breadcrumb/_fluent-definition.scss +59 -0
- package/styles/breadcrumb/_highcontrast-definition.scss +13 -0
- package/styles/breadcrumb/_highcontrast-light-definition.scss +13 -0
- package/styles/breadcrumb/_layout.scss +171 -22
- package/styles/breadcrumb/_material-dark-definition.scss +13 -0
- package/styles/breadcrumb/_material-definition.scss +13 -0
- package/styles/breadcrumb/_tailwind-dark-definition.scss +13 -0
- package/styles/breadcrumb/_tailwind-definition.scss +13 -0
- package/styles/breadcrumb/_theme.scss +27 -8
- package/styles/breadcrumb/bootstrap-dark.css +194 -17
- package/styles/breadcrumb/bootstrap.css +194 -17
- package/styles/breadcrumb/bootstrap4.css +194 -17
- package/styles/breadcrumb/bootstrap5-dark.css +198 -24
- package/styles/breadcrumb/bootstrap5.css +198 -24
- package/styles/breadcrumb/fabric-dark.css +197 -20
- package/styles/breadcrumb/fabric.css +197 -20
- package/styles/breadcrumb/highcontrast-light.css +200 -22
- package/styles/breadcrumb/highcontrast.css +200 -22
- package/styles/breadcrumb/icons/_bootstrap-dark.scss +2 -1
- package/styles/breadcrumb/icons/_bootstrap.scss +2 -1
- package/styles/breadcrumb/icons/_bootstrap4.scss +2 -1
- package/styles/breadcrumb/icons/_bootstrap5.scss +2 -1
- package/styles/breadcrumb/icons/_fabric-dark.scss +2 -1
- package/styles/breadcrumb/icons/_fabric.scss +2 -1
- package/styles/breadcrumb/icons/_fluent.scss +25 -0
- package/styles/breadcrumb/icons/_highcontrast-light.scss +2 -1
- package/styles/breadcrumb/icons/_highcontrast.scss +2 -1
- package/styles/breadcrumb/icons/_material-dark.scss +2 -1
- package/styles/breadcrumb/icons/_material.scss +2 -1
- package/styles/breadcrumb/icons/_tailwind-dark.scss +2 -1
- package/styles/breadcrumb/icons/_tailwind.scss +2 -1
- package/styles/breadcrumb/material-dark.css +186 -13
- package/styles/breadcrumb/material.css +186 -13
- package/styles/breadcrumb/tailwind-dark.css +195 -22
- package/styles/breadcrumb/tailwind.css +195 -22
- package/styles/context-menu/_bootstrap-dark-definition.scss +1 -1
- package/styles/context-menu/_bootstrap-definition.scss +1 -1
- package/styles/context-menu/_bootstrap4-definition.scss +1 -1
- package/styles/context-menu/_bootstrap5-definition.scss +5 -5
- package/styles/context-menu/_fluent-definition.scss +52 -0
- package/styles/context-menu/_material-dark-definition.scss +1 -1
- package/styles/context-menu/_material-definition.scss +1 -1
- package/styles/context-menu/_tailwind-definition.scss +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 +1 -1
- package/styles/context-menu/bootstrap5-dark.css +5 -5
- package/styles/context-menu/bootstrap5.css +6 -6
- package/styles/context-menu/icons/_fluent.scss +32 -0
- package/styles/context-menu/material-dark.css +1 -1
- package/styles/context-menu/material.css +1 -1
- package/styles/context-menu/tailwind-dark.css +1 -1
- package/styles/context-menu/tailwind.css +1 -1
- package/styles/fabric-dark.css +307 -42
- package/styles/fabric.css +310 -45
- package/styles/h-scroll/_fluent-definition.scss +78 -0
- package/styles/h-scroll/_tailwind-definition.scss +78 -78
- package/styles/h-scroll/_theme.scss +1 -1
- package/styles/h-scroll/bootstrap-dark.css +1 -1
- package/styles/h-scroll/bootstrap.css +1 -1
- package/styles/h-scroll/bootstrap4.css +1 -1
- package/styles/h-scroll/bootstrap5-dark.css +1 -1
- package/styles/h-scroll/bootstrap5.css +1 -1
- package/styles/h-scroll/fabric-dark.css +1 -1
- package/styles/h-scroll/fabric.css +1 -1
- package/styles/h-scroll/highcontrast-light.css +1 -1
- package/styles/h-scroll/highcontrast.css +1 -1
- package/styles/h-scroll/icons/_fluent.scss +49 -0
- package/styles/h-scroll/icons/_tailwind.scss +49 -49
- package/styles/h-scroll/material-dark.css +1 -1
- package/styles/h-scroll/material.css +1 -1
- package/styles/h-scroll/tailwind-dark.css +1 -1
- package/styles/h-scroll/tailwind.css +1 -1
- package/styles/highcontrast-light.css +319 -48
- package/styles/highcontrast.css +324 -53
- package/styles/material-dark.css +297 -33
- package/styles/material.css +298 -34
- package/styles/menu/_fluent-definition.scss +68 -0
- package/styles/menu/_layout.scss +3 -2
- package/styles/menu/_theme.scss +9 -0
- package/styles/menu/bootstrap-dark.css +3 -2
- package/styles/menu/bootstrap.css +3 -2
- package/styles/menu/bootstrap4.css +3 -2
- package/styles/menu/bootstrap5-dark.css +6 -5
- package/styles/menu/bootstrap5.css +7 -6
- package/styles/menu/fabric-dark.css +2 -1
- package/styles/menu/fabric.css +2 -1
- package/styles/menu/highcontrast-light.css +2 -1
- package/styles/menu/highcontrast.css +2 -1
- package/styles/menu/icons/_fluent.scss +133 -0
- package/styles/menu/material-dark.css +3 -2
- package/styles/menu/material.css +3 -2
- package/styles/menu/tailwind-dark.css +3 -2
- package/styles/menu/tailwind.css +3 -2
- package/styles/sidebar/_bootstrap5-definition.scss +5 -5
- package/styles/sidebar/_fluent-definition.scss +5 -0
- package/styles/sidebar/_theme.scss +4 -2
- package/styles/sidebar/bootstrap5-dark.css +0 -1
- package/styles/sidebar/bootstrap5.css +0 -1
- package/styles/sidebar/tailwind-dark.css +0 -1
- package/styles/sidebar/tailwind.css +0 -1
- package/styles/tab/_bootstrap-dark-definition.scss +10 -1
- package/styles/tab/_bootstrap-definition.scss +10 -1
- package/styles/tab/_bootstrap4-definition.scss +9 -1
- package/styles/tab/_bootstrap5-definition.scss +401 -401
- package/styles/tab/_fabric-dark-definition.scss +10 -0
- package/styles/tab/_fabric-definition.scss +10 -0
- package/styles/tab/_fluent-definition.scss +409 -0
- package/styles/tab/_highcontrast-definition.scss +10 -0
- package/styles/tab/_highcontrast-light-definition.scss +10 -0
- package/styles/tab/_layout.scss +145 -0
- package/styles/tab/_material-dark-definition.scss +10 -0
- package/styles/tab/_material-definition.scss +10 -0
- package/styles/tab/_tailwind-definition.scss +431 -420
- package/styles/tab/_theme.scss +188 -113
- package/styles/tab/bootstrap-dark.css +43 -18
- package/styles/tab/bootstrap.css +42 -17
- package/styles/tab/bootstrap4.css +47 -28
- package/styles/tab/bootstrap5-dark.css +53 -30
- package/styles/tab/bootstrap5.css +53 -30
- package/styles/tab/fabric-dark.css +43 -20
- package/styles/tab/fabric.css +46 -23
- package/styles/tab/highcontrast-light.css +52 -19
- package/styles/tab/highcontrast.css +56 -23
- package/styles/tab/icons/_bootstrap-dark.scss +2 -2
- package/styles/tab/icons/_fabric-dark.scss +2 -2
- package/styles/tab/icons/_fluent.scss +140 -0
- package/styles/tab/icons/_tailwind.scss +140 -140
- package/styles/tab/material-dark.css +42 -15
- package/styles/tab/material.css +42 -15
- package/styles/tab/tailwind-dark.css +42 -17
- package/styles/tab/tailwind.css +42 -17
- package/styles/tailwind-dark.css +315 -51
- package/styles/tailwind.css +315 -51
- package/styles/toolbar/_bootstrap-dark-definition.scss +7 -1
- package/styles/toolbar/_bootstrap-definition.scss +7 -1
- package/styles/toolbar/_bootstrap4-definition.scss +8 -2
- package/styles/toolbar/_bootstrap5-definition.scss +104 -86
- package/styles/toolbar/_fabric-dark-definition.scss +7 -0
- package/styles/toolbar/_fabric-definition.scss +7 -0
- package/styles/toolbar/_fluent-definition.scss +149 -0
- package/styles/toolbar/_highcontrast-definition.scss +7 -0
- package/styles/toolbar/_highcontrast-light-definition.scss +7 -0
- package/styles/toolbar/_layout.scss +27 -72
- package/styles/toolbar/_material-dark-definition.scss +7 -1
- package/styles/toolbar/_material-definition.scss +7 -1
- package/styles/toolbar/_tailwind-definition.scss +149 -143
- package/styles/toolbar/_theme.scss +12 -15
- package/styles/toolbar/bootstrap-dark.css +17 -46
- package/styles/toolbar/bootstrap.css +17 -46
- package/styles/toolbar/bootstrap4.css +12 -26
- package/styles/toolbar/bootstrap5-dark.css +6 -7
- package/styles/toolbar/bootstrap5.css +6 -7
- package/styles/toolbar/fabric-dark.css +4 -0
- package/styles/toolbar/fabric.css +4 -0
- package/styles/toolbar/highcontrast-light.css +4 -1
- package/styles/toolbar/highcontrast.css +4 -1
- package/styles/toolbar/icons/_fluent.scss +16 -0
- package/styles/toolbar/icons/_tailwind.scss +16 -16
- package/styles/toolbar/material-dark.css +4 -1
- package/styles/toolbar/material.css +5 -2
- package/styles/toolbar/tailwind-dark.css +8 -6
- package/styles/toolbar/tailwind.css +8 -6
- package/styles/treeview/_bootstrap-dark-definition.scss +11 -0
- package/styles/treeview/_bootstrap-definition.scss +11 -0
- package/styles/treeview/_bootstrap4-definition.scss +11 -0
- package/styles/treeview/_bootstrap5-definition.scss +120 -109
- package/styles/treeview/_fabric-dark-definition.scss +11 -0
- package/styles/treeview/_fabric-definition.scss +11 -0
- package/styles/treeview/_fluent-definition.scss +120 -0
- package/styles/treeview/_highcontrast-definition.scss +11 -0
- package/styles/treeview/_highcontrast-light-definition.scss +11 -0
- package/styles/treeview/_layout.scss +116 -20
- package/styles/treeview/_material-dark-definition.scss +13 -0
- package/styles/treeview/_material-definition.scss +11 -0
- package/styles/treeview/_tailwind-definition.scss +12 -0
- package/styles/treeview/_theme.scss +5 -5
- package/styles/treeview/bootstrap-dark.css +60 -0
- package/styles/treeview/bootstrap.css +60 -0
- package/styles/treeview/bootstrap4.css +60 -0
- package/styles/treeview/bootstrap5-dark.css +61 -1
- package/styles/treeview/bootstrap5.css +61 -1
- package/styles/treeview/fabric-dark.css +60 -0
- package/styles/treeview/fabric.css +60 -0
- package/styles/treeview/highcontrast-light.css +60 -0
- package/styles/treeview/highcontrast.css +60 -0
- package/styles/treeview/icons/_bootstrap5.scss +43 -43
- package/styles/treeview/icons/_fluent.scss +43 -0
- package/styles/treeview/icons/_tailwind-dark.scss +43 -43
- package/styles/treeview/material-dark.css +60 -0
- package/styles/treeview/material.css +60 -0
- package/styles/treeview/tailwind-dark.css +65 -1
- package/styles/treeview/tailwind.css +65 -1
- package/styles/v-scroll/_fluent-definition.scss +49 -0
- package/styles/v-scroll/_tailwind-definition.scss +49 -49
- package/styles/v-scroll/icons/_fluent.scss +26 -0
- package/styles/v-scroll/icons/_tailwind.scss +26 -26
|
@@ -579,7 +579,7 @@ let VScroll = class VScroll extends Component {
|
|
|
579
579
|
}
|
|
580
580
|
scrollBar.appendChild(scrollCnt);
|
|
581
581
|
ele.appendChild(scrollBar);
|
|
582
|
-
scrollBar.style.
|
|
582
|
+
scrollBar.style.overflow = 'hidden';
|
|
583
583
|
this.scrollEle = scrollBar;
|
|
584
584
|
this.scrollItems = scrollCnt;
|
|
585
585
|
}
|
|
@@ -1926,8 +1926,14 @@ let MenuBase = class MenuBase extends Component {
|
|
|
1926
1926
|
this.setBlankIconStyle(this.popupWrapper);
|
|
1927
1927
|
this.wireKeyboardEvent(this.popupWrapper);
|
|
1928
1928
|
rippleEffect(this.popupWrapper, { selector: '.' + ITEM });
|
|
1929
|
-
this.popupWrapper.style.
|
|
1930
|
-
|
|
1929
|
+
if (this.popupWrapper.style.position === 'fixed' && this.top > 0) {
|
|
1930
|
+
this.popupWrapper.style.left = this.left + 'px';
|
|
1931
|
+
this.popupWrapper.style.top = this.top + scrollY + 'px';
|
|
1932
|
+
}
|
|
1933
|
+
else {
|
|
1934
|
+
this.popupWrapper.style.left = this.left + 'px';
|
|
1935
|
+
this.popupWrapper.style.top = this.top + 'px';
|
|
1936
|
+
}
|
|
1931
1937
|
const animationOptions = this.animationSettings.effect !== 'None' ? {
|
|
1932
1938
|
name: this.animationSettings.effect, duration: this.animationSettings.duration,
|
|
1933
1939
|
timingFunction: this.animationSettings.easing
|
|
@@ -3156,6 +3162,7 @@ var __decorate$3 = (undefined && undefined.__decorate) || function (decorators,
|
|
|
3156
3162
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
3157
3163
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
3158
3164
|
};
|
|
3165
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
3159
3166
|
const CLS_VERTICAL = 'e-vertical';
|
|
3160
3167
|
const CLS_ITEMS = 'e-toolbar-items';
|
|
3161
3168
|
const CLS_ITEM = 'e-toolbar-item';
|
|
@@ -4131,9 +4138,15 @@ let Toolbar = class Toolbar extends Component {
|
|
|
4131
4138
|
}
|
|
4132
4139
|
tbarPopupHandler(isOpen) {
|
|
4133
4140
|
if (this.overflowMode === 'Extended') {
|
|
4134
|
-
|
|
4141
|
+
if (isOpen) {
|
|
4142
|
+
this.add(this.element, CLS_EXTENDEDPOPOPEN);
|
|
4143
|
+
}
|
|
4144
|
+
else {
|
|
4145
|
+
this.remove(this.element, CLS_EXTENDEDPOPOPEN);
|
|
4146
|
+
}
|
|
4135
4147
|
}
|
|
4136
4148
|
}
|
|
4149
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
4137
4150
|
popupOpen(e) {
|
|
4138
4151
|
const popObj = this.popObj;
|
|
4139
4152
|
if (!this.isVertical) {
|
|
@@ -4179,6 +4192,7 @@ let Toolbar = class Toolbar extends Component {
|
|
|
4179
4192
|
popObj.refreshPosition();
|
|
4180
4193
|
}
|
|
4181
4194
|
}
|
|
4195
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
4182
4196
|
popupClose(e) {
|
|
4183
4197
|
const element = this.element;
|
|
4184
4198
|
const popupNav = element.querySelector('.' + CLS_TBARNAV);
|
|
@@ -4535,10 +4549,20 @@ let Toolbar = class Toolbar extends Component {
|
|
|
4535
4549
|
const popWid = (this.isVertical ? popupNav.offsetHeight : popupNav.offsetWidth) + 'px';
|
|
4536
4550
|
innerItem[2].removeAttribute('style');
|
|
4537
4551
|
if (this.isVertical) {
|
|
4538
|
-
this.enableRtl
|
|
4552
|
+
if (this.enableRtl) {
|
|
4553
|
+
innerItem[2].style.top = popWid;
|
|
4554
|
+
}
|
|
4555
|
+
else {
|
|
4556
|
+
innerItem[2].style.bottom = popWid;
|
|
4557
|
+
}
|
|
4539
4558
|
}
|
|
4540
4559
|
else {
|
|
4541
|
-
this.enableRtl
|
|
4560
|
+
if (this.enableRtl) {
|
|
4561
|
+
innerItem[2].style.left = popWid;
|
|
4562
|
+
}
|
|
4563
|
+
else {
|
|
4564
|
+
innerItem[2].style.right = popWid;
|
|
4565
|
+
}
|
|
4542
4566
|
}
|
|
4543
4567
|
}
|
|
4544
4568
|
if (tbarWid <= margin) {
|
|
@@ -4548,10 +4572,20 @@ let Toolbar = class Toolbar extends Component {
|
|
|
4548
4572
|
innerItem[1].removeAttribute('style');
|
|
4549
4573
|
const mrgn = ((!this.isVertical ? innerItem[0].offsetWidth : innerItem[0].offsetHeight) + value) + 'px';
|
|
4550
4574
|
if (this.isVertical) {
|
|
4551
|
-
this.enableRtl
|
|
4575
|
+
if (this.enableRtl) {
|
|
4576
|
+
innerItem[1].style.marginBottom = mrgn;
|
|
4577
|
+
}
|
|
4578
|
+
else {
|
|
4579
|
+
innerItem[1].style.marginTop = mrgn;
|
|
4580
|
+
}
|
|
4552
4581
|
}
|
|
4553
4582
|
else {
|
|
4554
|
-
this.enableRtl
|
|
4583
|
+
if (this.enableRtl) {
|
|
4584
|
+
innerItem[1].style.marginRight = mrgn;
|
|
4585
|
+
}
|
|
4586
|
+
else {
|
|
4587
|
+
innerItem[1].style.marginLeft = mrgn;
|
|
4588
|
+
}
|
|
4555
4589
|
}
|
|
4556
4590
|
}
|
|
4557
4591
|
tbarItemAlign(item, itemEle, pos) {
|
|
@@ -4619,7 +4653,12 @@ let Toolbar = class Toolbar extends Component {
|
|
|
4619
4653
|
let keyVal;
|
|
4620
4654
|
for (let i = 0; i < key.length; i++) {
|
|
4621
4655
|
keyVal = key[i];
|
|
4622
|
-
keyVal === 'class'
|
|
4656
|
+
if (keyVal === 'class') {
|
|
4657
|
+
this.add(element, attr[keyVal]);
|
|
4658
|
+
}
|
|
4659
|
+
else {
|
|
4660
|
+
element.setAttribute(keyVal, attr[keyVal]);
|
|
4661
|
+
}
|
|
4623
4662
|
}
|
|
4624
4663
|
}
|
|
4625
4664
|
/**
|
|
@@ -4664,7 +4703,12 @@ let Toolbar = class Toolbar extends Component {
|
|
|
4664
4703
|
}
|
|
4665
4704
|
enable(isEnable, ele);
|
|
4666
4705
|
}
|
|
4667
|
-
|
|
4706
|
+
if (isEnable) {
|
|
4707
|
+
removeClass(elements, CLS_DISABLE$2);
|
|
4708
|
+
}
|
|
4709
|
+
else {
|
|
4710
|
+
addClass(elements, CLS_DISABLE$2);
|
|
4711
|
+
}
|
|
4668
4712
|
}
|
|
4669
4713
|
else {
|
|
4670
4714
|
if (typeof (elements) === 'number') {
|
|
@@ -4850,7 +4894,12 @@ let Toolbar = class Toolbar extends Component {
|
|
|
4850
4894
|
}
|
|
4851
4895
|
else if (itemType === 'Input') {
|
|
4852
4896
|
const ele = this.createElement('input');
|
|
4853
|
-
|
|
4897
|
+
if (item.id) {
|
|
4898
|
+
ele.id = item.id;
|
|
4899
|
+
}
|
|
4900
|
+
else {
|
|
4901
|
+
ele.id = getUniqueID('tbr-ipt');
|
|
4902
|
+
}
|
|
4854
4903
|
innerEle.appendChild(ele);
|
|
4855
4904
|
eleObj.appendTo(ele);
|
|
4856
4905
|
}
|
|
@@ -4863,7 +4912,12 @@ let Toolbar = class Toolbar extends Component {
|
|
|
4863
4912
|
const textStr = item.text;
|
|
4864
4913
|
let iconCss;
|
|
4865
4914
|
let iconPos;
|
|
4866
|
-
|
|
4915
|
+
if (item.id) {
|
|
4916
|
+
dom.id = item.id;
|
|
4917
|
+
}
|
|
4918
|
+
else {
|
|
4919
|
+
dom.id = getUniqueID('e-tbr-btn');
|
|
4920
|
+
}
|
|
4867
4921
|
const btnTxt = this.createElement('span', { className: 'e-tbar-btn-text' });
|
|
4868
4922
|
if (textStr) {
|
|
4869
4923
|
btnTxt.innerHTML = this.enableHtmlSanitizer ? SanitizeHtmlHelper.sanitize(textStr) : textStr;
|
|
@@ -5130,12 +5184,27 @@ let Toolbar = class Toolbar extends Component {
|
|
|
5130
5184
|
this.refreshOverflow();
|
|
5131
5185
|
break;
|
|
5132
5186
|
case 'enableRtl':
|
|
5133
|
-
newProp.enableRtl
|
|
5187
|
+
if (newProp.enableRtl) {
|
|
5188
|
+
this.add(tEle, CLS_RTL$2);
|
|
5189
|
+
}
|
|
5190
|
+
else {
|
|
5191
|
+
this.remove(tEle, CLS_RTL$2);
|
|
5192
|
+
}
|
|
5134
5193
|
if (!isNullOrUndefined(this.scrollModule)) {
|
|
5135
|
-
newProp.enableRtl
|
|
5194
|
+
if (newProp.enableRtl) {
|
|
5195
|
+
this.add(this.scrollModule.element, CLS_RTL$2);
|
|
5196
|
+
}
|
|
5197
|
+
else {
|
|
5198
|
+
this.remove(this.scrollModule.element, CLS_RTL$2);
|
|
5199
|
+
}
|
|
5136
5200
|
}
|
|
5137
5201
|
if (!isNullOrUndefined(this.popObj)) {
|
|
5138
|
-
newProp.enableRtl
|
|
5202
|
+
if (newProp.enableRtl) {
|
|
5203
|
+
this.add(this.popObj.element, CLS_RTL$2);
|
|
5204
|
+
}
|
|
5205
|
+
else {
|
|
5206
|
+
this.remove(this.popObj.element, CLS_RTL$2);
|
|
5207
|
+
}
|
|
5139
5208
|
}
|
|
5140
5209
|
if (this.tbarAlign) {
|
|
5141
5210
|
this.itemPositioning();
|
|
@@ -5189,7 +5258,12 @@ let Toolbar = class Toolbar extends Component {
|
|
|
5189
5258
|
ele = innerItems[eleIndex];
|
|
5190
5259
|
}
|
|
5191
5260
|
if (ele) {
|
|
5192
|
-
|
|
5261
|
+
if (value) {
|
|
5262
|
+
ele.classList.add(CLS_HIDDEN);
|
|
5263
|
+
}
|
|
5264
|
+
else {
|
|
5265
|
+
ele.classList.remove(CLS_HIDDEN);
|
|
5266
|
+
}
|
|
5193
5267
|
if (value && isNullOrUndefined(this.element.getAttribute('tabindex')) && !ele.classList.contains(CLS_SEPARATOR)) {
|
|
5194
5268
|
if (isNullOrUndefined(ele.firstElementChild.getAttribute('tabindex'))) {
|
|
5195
5269
|
ele.firstElementChild.setAttribute('tabindex', '-1');
|
|
@@ -5293,6 +5367,7 @@ var __decorate$4 = (undefined && undefined.__decorate) || function (decorators,
|
|
|
5293
5367
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5294
5368
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
5295
5369
|
};
|
|
5370
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
5296
5371
|
const CLS_ACRDN_ROOT = 'e-acrdn-root';
|
|
5297
5372
|
const CLS_ROOT$2 = 'e-accordion';
|
|
5298
5373
|
const CLS_ITEM$1 = 'e-acrdn-item';
|
|
@@ -5547,11 +5622,9 @@ let Accordion = class Accordion extends Component {
|
|
|
5547
5622
|
this.itemTemplateFn = this.templateParser(this.itemTemplate);
|
|
5548
5623
|
}
|
|
5549
5624
|
}
|
|
5550
|
-
/* eslint-disable */
|
|
5551
5625
|
getHeaderTemplate() {
|
|
5552
5626
|
return this.headerTemplateFn;
|
|
5553
5627
|
}
|
|
5554
|
-
/* eslint-disable */
|
|
5555
5628
|
getItemTemplate() {
|
|
5556
5629
|
return this.itemTemplateFn;
|
|
5557
5630
|
}
|
|
@@ -5572,7 +5645,6 @@ let Accordion = class Accordion extends Component {
|
|
|
5572
5645
|
innerEles = this.element.children;
|
|
5573
5646
|
}
|
|
5574
5647
|
const items = [];
|
|
5575
|
-
/* eslint-disable */
|
|
5576
5648
|
[].slice.call(innerEles).forEach((el) => {
|
|
5577
5649
|
items.push({
|
|
5578
5650
|
header: (el.childElementCount > 0 && el.children[0]) ? (el.children[0]) : '',
|
|
@@ -5580,7 +5652,6 @@ let Accordion = class Accordion extends Component {
|
|
|
5580
5652
|
});
|
|
5581
5653
|
el.parentNode.removeChild(el);
|
|
5582
5654
|
});
|
|
5583
|
-
/* eslint-enable */
|
|
5584
5655
|
if (rootEle) {
|
|
5585
5656
|
this.element.removeChild(rootEle);
|
|
5586
5657
|
}
|
|
@@ -5605,7 +5676,6 @@ let Accordion = class Accordion extends Component {
|
|
|
5605
5676
|
this.expandItem(true, this.initExpand[i]);
|
|
5606
5677
|
}
|
|
5607
5678
|
}
|
|
5608
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
5609
5679
|
if (this.isReact) {
|
|
5610
5680
|
this.renderReactTemplates();
|
|
5611
5681
|
}
|
|
@@ -5640,7 +5710,6 @@ let Accordion = class Accordion extends Component {
|
|
|
5640
5710
|
});
|
|
5641
5711
|
}
|
|
5642
5712
|
}
|
|
5643
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
5644
5713
|
if (this.isReact) {
|
|
5645
5714
|
this.renderReactTemplates();
|
|
5646
5715
|
}
|
|
@@ -5686,7 +5755,6 @@ let Accordion = class Accordion extends Component {
|
|
|
5686
5755
|
else {
|
|
5687
5756
|
this.afterContentRender(trgt, eventArgs, acrdnItem, acrdnHdr, acrdnCtn, acrdnCtnItem);
|
|
5688
5757
|
}
|
|
5689
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
5690
5758
|
if (this.isReact) {
|
|
5691
5759
|
this.renderReactTemplates();
|
|
5692
5760
|
}
|
|
@@ -5892,7 +5960,6 @@ let Accordion = class Accordion extends Component {
|
|
|
5892
5960
|
}
|
|
5893
5961
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
5894
5962
|
fetchElement(ele, value, index, isHeader) {
|
|
5895
|
-
/* eslint-disable */
|
|
5896
5963
|
let templateFn;
|
|
5897
5964
|
let temString;
|
|
5898
5965
|
try {
|
|
@@ -5906,12 +5973,10 @@ let Accordion = class Accordion extends Component {
|
|
|
5906
5973
|
catch (e) {
|
|
5907
5974
|
if (typeof (value) === 'string') {
|
|
5908
5975
|
ele.innerHTML = SanitizeHtmlHelper.sanitize(value);
|
|
5909
|
-
/* eslint-disable */
|
|
5910
5976
|
}
|
|
5911
5977
|
else if (!isNullOrUndefined(this.trgtEle) && (value instanceof (HTMLElement))) {
|
|
5912
5978
|
ele.appendChild(value);
|
|
5913
5979
|
ele.firstElementChild.style.display = '';
|
|
5914
|
-
/* eslint-enable */
|
|
5915
5980
|
}
|
|
5916
5981
|
else {
|
|
5917
5982
|
templateFn = compile(value);
|
|
@@ -5919,7 +5984,6 @@ let Accordion = class Accordion extends Component {
|
|
|
5919
5984
|
}
|
|
5920
5985
|
let tempArray;
|
|
5921
5986
|
if (!isNullOrUndefined(templateFn)) {
|
|
5922
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
5923
5987
|
if (this.isReact) {
|
|
5924
5988
|
this.renderReactTemplates();
|
|
5925
5989
|
}
|
|
@@ -5965,7 +6029,6 @@ let Accordion = class Accordion extends Component {
|
|
|
5965
6029
|
attributes(itemcnt, { 'aria-hidden': 'true' });
|
|
5966
6030
|
const ctn = this.createElement('div', { className: CLS_CTENT });
|
|
5967
6031
|
if (this.dataSource.length > 0) {
|
|
5968
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
5969
6032
|
if (this.isReact) {
|
|
5970
6033
|
this.renderReactTemplates();
|
|
5971
6034
|
}
|
|
@@ -6112,7 +6175,7 @@ let Accordion = class Accordion extends Component {
|
|
|
6112
6175
|
this.trigger('expanding', eventArgs, (expandArgs) => {
|
|
6113
6176
|
if (!expandArgs.cancel) {
|
|
6114
6177
|
this.expandedItemsPop(trgtItemEle);
|
|
6115
|
-
trgtItemEle.classList.
|
|
6178
|
+
trgtItemEle.classList.remove(CLS_EXPANDSTATE);
|
|
6116
6179
|
icon.classList.add(CLS_TOGANIMATE);
|
|
6117
6180
|
if ((animation.name === 'None')) {
|
|
6118
6181
|
this.collapseProgress('begin', icon, trgt, trgtItemEle, expandArgs);
|
|
@@ -6240,7 +6303,6 @@ let Accordion = class Accordion extends Component {
|
|
|
6240
6303
|
}
|
|
6241
6304
|
});
|
|
6242
6305
|
}
|
|
6243
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
6244
6306
|
if (this.isReact) {
|
|
6245
6307
|
this.renderReactTemplates();
|
|
6246
6308
|
}
|
|
@@ -6261,7 +6323,6 @@ let Accordion = class Accordion extends Component {
|
|
|
6261
6323
|
* @returns {void}.
|
|
6262
6324
|
*/
|
|
6263
6325
|
removeItem(index) {
|
|
6264
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
6265
6326
|
if (this.isReact) {
|
|
6266
6327
|
this.clearTemplate(['headerTemplate', 'itemTemplate'], index);
|
|
6267
6328
|
}
|
|
@@ -6408,14 +6469,12 @@ let Accordion = class Accordion extends Component {
|
|
|
6408
6469
|
this.collapse(ctn);
|
|
6409
6470
|
}
|
|
6410
6471
|
}
|
|
6411
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
6412
6472
|
if (this.isReact) {
|
|
6413
6473
|
this.renderReactTemplates();
|
|
6414
6474
|
}
|
|
6415
6475
|
}
|
|
6416
6476
|
destroyItems() {
|
|
6417
6477
|
this.restoreContent(null);
|
|
6418
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
6419
6478
|
if (this.isReact) {
|
|
6420
6479
|
this.clearTemplate();
|
|
6421
6480
|
}
|
|
@@ -6450,12 +6509,10 @@ let Accordion = class Accordion extends Component {
|
|
|
6450
6509
|
setTemplate(template, toElement, index) {
|
|
6451
6510
|
toElement.innerHTML = '';
|
|
6452
6511
|
this.templateCompile(toElement, template, index);
|
|
6453
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
6454
6512
|
if (this.isReact) {
|
|
6455
6513
|
this.renderReactTemplates();
|
|
6456
6514
|
}
|
|
6457
6515
|
}
|
|
6458
|
-
// eslint-disable-next-line
|
|
6459
6516
|
templateCompile(ele, cnt, index) {
|
|
6460
6517
|
const tempEle = this.createElement('div');
|
|
6461
6518
|
this.fetchElement(tempEle, cnt, index, false);
|
|
@@ -7067,6 +7124,7 @@ const CLS_VRIGHT = 'e-vertical-right';
|
|
|
7067
7124
|
const CLS_HBOTTOM = 'e-horizontal-bottom';
|
|
7068
7125
|
const CLS_FILL = 'e-fill-mode';
|
|
7069
7126
|
const TABITEMPREFIX = 'tabitem_';
|
|
7127
|
+
const CLS_REORDER_ACTIVE_ITEM = 'e-reorder-active-item';
|
|
7070
7128
|
/**
|
|
7071
7129
|
* Objects used for configuring the Tab selecting item action properties.
|
|
7072
7130
|
*/
|
|
@@ -7156,11 +7214,12 @@ let Tab = class Tab extends Component {
|
|
|
7156
7214
|
this.hide = {};
|
|
7157
7215
|
this.maxHeight = 0;
|
|
7158
7216
|
this.title = 'Close';
|
|
7217
|
+
this.isInteracted = false;
|
|
7159
7218
|
this.lastIndex = 0;
|
|
7160
7219
|
this.isAdd = false;
|
|
7161
7220
|
this.isIconAlone = false;
|
|
7162
7221
|
this.draggableItems = [];
|
|
7163
|
-
this.resizeContext = this.
|
|
7222
|
+
this.resizeContext = this.refreshActiveTabBorder.bind(this);
|
|
7164
7223
|
/**
|
|
7165
7224
|
* Contains the keyboard configuration of the Tab.
|
|
7166
7225
|
*/
|
|
@@ -7609,7 +7668,7 @@ let Tab = class Tab extends Component {
|
|
|
7609
7668
|
trg.classList.remove(CLS_CLOSE_SHOW);
|
|
7610
7669
|
}
|
|
7611
7670
|
this.tbObj.refreshOverflow();
|
|
7612
|
-
this.
|
|
7671
|
+
this.refreshActiveTabBorder();
|
|
7613
7672
|
}
|
|
7614
7673
|
prevCtnAnimation(prev, current) {
|
|
7615
7674
|
let animation;
|
|
@@ -7734,7 +7793,7 @@ let Tab = class Tab extends Component {
|
|
|
7734
7793
|
}
|
|
7735
7794
|
else {
|
|
7736
7795
|
if (!isNullOrUndefined(trgParent) && trgParent.classList.contains(CLS_ACTIVE$1) === false) {
|
|
7737
|
-
this.
|
|
7796
|
+
this.selectTab(trgIndex, null, true);
|
|
7738
7797
|
if (!isNullOrUndefined(this.popEle)) {
|
|
7739
7798
|
this.popObj.hide(this.hide);
|
|
7740
7799
|
}
|
|
@@ -8006,9 +8065,20 @@ let Tab = class Tab extends Component {
|
|
|
8006
8065
|
setActiveBorder() {
|
|
8007
8066
|
const trgHdrEle = this.getTabHeader();
|
|
8008
8067
|
const trg = select('.' + CLS_TB_ITEM + '.' + CLS_ACTIVE$1, trgHdrEle);
|
|
8009
|
-
if (trg
|
|
8068
|
+
if (isNullOrUndefined(trg)) {
|
|
8010
8069
|
return;
|
|
8011
8070
|
}
|
|
8071
|
+
if (!this.reorderActiveTab) {
|
|
8072
|
+
if (trg.classList.contains(CLS_TB_POPUP) && !this.bdrLine.classList.contains(CLS_HIDDEN$1)) {
|
|
8073
|
+
this.bdrLine.classList.add(CLS_HIDDEN$1);
|
|
8074
|
+
}
|
|
8075
|
+
if (trgHdrEle && !trgHdrEle.classList.contains(CLS_REORDER_ACTIVE_ITEM)) {
|
|
8076
|
+
trgHdrEle.classList.add(CLS_REORDER_ACTIVE_ITEM);
|
|
8077
|
+
}
|
|
8078
|
+
}
|
|
8079
|
+
else if (trgHdrEle) {
|
|
8080
|
+
trgHdrEle.classList.remove(CLS_REORDER_ACTIVE_ITEM);
|
|
8081
|
+
}
|
|
8012
8082
|
const root = closest(trg, '.' + CLS_TAB);
|
|
8013
8083
|
if (this.element !== root) {
|
|
8014
8084
|
return;
|
|
@@ -8042,11 +8112,11 @@ let Tab = class Tab extends Component {
|
|
|
8042
8112
|
setStyleAttribute(bar, { 'left': 'auto', 'right': 'auto' });
|
|
8043
8113
|
}
|
|
8044
8114
|
}
|
|
8045
|
-
if (!isNullOrUndefined(this.bdrLine)) {
|
|
8115
|
+
if (!isNullOrUndefined(this.bdrLine) && !trg.classList.contains(CLS_TB_POPUP)) {
|
|
8046
8116
|
this.bdrLine.classList.remove(CLS_HIDDEN$1);
|
|
8047
8117
|
}
|
|
8048
8118
|
}
|
|
8049
|
-
setActive(value, skipDataBind = false) {
|
|
8119
|
+
setActive(value, skipDataBind = false, isInteracted = false) {
|
|
8050
8120
|
this.tbItem = selectAll('.' + CLS_TB_ITEM, this.getTabHeader());
|
|
8051
8121
|
const trg = this.tbItem[value];
|
|
8052
8122
|
if (value < 0 || isNaN(value) || this.tbItem.length === 0) {
|
|
@@ -8117,7 +8187,8 @@ let Tab = class Tab extends Component {
|
|
|
8117
8187
|
selectedItem: trg,
|
|
8118
8188
|
selectedIndex: value,
|
|
8119
8189
|
selectedContent: select('#' + CLS_CONTENT$1 + this.tabId + '_' + this.selectingID, this.content),
|
|
8120
|
-
isSwiped: this.isSwipeed
|
|
8190
|
+
isSwiped: this.isSwipeed,
|
|
8191
|
+
isInteracted: isInteracted
|
|
8121
8192
|
};
|
|
8122
8193
|
this.trigger('selected', eventArg);
|
|
8123
8194
|
}
|
|
@@ -8208,7 +8279,7 @@ let Tab = class Tab extends Component {
|
|
|
8208
8279
|
else {
|
|
8209
8280
|
this.isPopup = false;
|
|
8210
8281
|
if (!isNullOrUndefined(trgParent) && (trgIndex !== this.selectedItem || trgIndex !== this.prevIndex)) {
|
|
8211
|
-
this.
|
|
8282
|
+
this.selectTab(trgIndex, args.originalEvent, true);
|
|
8212
8283
|
}
|
|
8213
8284
|
}
|
|
8214
8285
|
}
|
|
@@ -8223,7 +8294,7 @@ let Tab = class Tab extends Component {
|
|
|
8223
8294
|
if (e.swipeDirection === 'Right' && this.selectedItem !== 0) {
|
|
8224
8295
|
for (let k = this.selectedItem - 1; k >= 0; k--) {
|
|
8225
8296
|
if (!this.tbItem[k].classList.contains(CLS_HIDDEN$1)) {
|
|
8226
|
-
this.
|
|
8297
|
+
this.selectTab(k, null, true);
|
|
8227
8298
|
break;
|
|
8228
8299
|
}
|
|
8229
8300
|
}
|
|
@@ -8231,7 +8302,7 @@ let Tab = class Tab extends Component {
|
|
|
8231
8302
|
else if (e.swipeDirection === 'Left' && (this.selectedItem !== selectAll('.' + CLS_TB_ITEM, this.element).length - 1)) {
|
|
8232
8303
|
for (let i = this.selectedItem + 1; i < this.tbItem.length; i++) {
|
|
8233
8304
|
if (!this.tbItem[i].classList.contains(CLS_HIDDEN$1)) {
|
|
8234
|
-
this.
|
|
8305
|
+
this.selectTab(i, null, true);
|
|
8235
8306
|
break;
|
|
8236
8307
|
}
|
|
8237
8308
|
}
|
|
@@ -8307,9 +8378,15 @@ let Tab = class Tab extends Component {
|
|
|
8307
8378
|
break;
|
|
8308
8379
|
}
|
|
8309
8380
|
}
|
|
8310
|
-
|
|
8381
|
+
/**
|
|
8382
|
+
* Refresh the active tab border
|
|
8383
|
+
*
|
|
8384
|
+
* @returns {void}
|
|
8385
|
+
* @private
|
|
8386
|
+
*/
|
|
8387
|
+
refreshActiveTabBorder() {
|
|
8311
8388
|
const activeEle = select('.' + CLS_TB_ITEM + '.' + CLS_TB_POPUP + '.' + CLS_ACTIVE$1, this.element);
|
|
8312
|
-
if (!isNullOrUndefined(activeEle)) {
|
|
8389
|
+
if (!isNullOrUndefined(activeEle) && this.reorderActiveTab) {
|
|
8313
8390
|
this.select(this.getEleIndex(activeEle));
|
|
8314
8391
|
}
|
|
8315
8392
|
this.refreshActiveBorder();
|
|
@@ -8649,7 +8726,7 @@ let Tab = class Tab extends Component {
|
|
|
8649
8726
|
else {
|
|
8650
8727
|
this.dragItem.querySelector('.' + CLS_WRAP).style.visibility = '';
|
|
8651
8728
|
removeClass([this.tbItems.querySelector('.' + CLS_INDICATOR)], CLS_HIDDEN$1);
|
|
8652
|
-
this.
|
|
8729
|
+
this.selectTab(this.droppedIndex, null, true);
|
|
8653
8730
|
}
|
|
8654
8731
|
}
|
|
8655
8732
|
});
|
|
@@ -8657,8 +8734,8 @@ let Tab = class Tab extends Component {
|
|
|
8657
8734
|
/**
|
|
8658
8735
|
* Enables or disables the specified Tab item. On passing value as `false`, the item will be disabled.
|
|
8659
8736
|
*
|
|
8660
|
-
* @param
|
|
8661
|
-
* @param
|
|
8737
|
+
* @param {number} index - Index value of target Tab item.
|
|
8738
|
+
* @param {boolean} value - Boolean value that determines whether the command should be enabled or disabled.
|
|
8662
8739
|
* By default, isEnable is true.
|
|
8663
8740
|
* @returns {void}.
|
|
8664
8741
|
*/
|
|
@@ -8687,8 +8764,8 @@ let Tab = class Tab extends Component {
|
|
|
8687
8764
|
/**
|
|
8688
8765
|
* Adds new items to the Tab that accepts an array as Tab items.
|
|
8689
8766
|
*
|
|
8690
|
-
* @param
|
|
8691
|
-
* @param
|
|
8767
|
+
* @param {TabItemModel[]} items - An array of item that is added to the Tab.
|
|
8768
|
+
* @param {number} index - Number value that determines where the items to be added. By default, index is 0.
|
|
8692
8769
|
* @returns {void}.
|
|
8693
8770
|
*/
|
|
8694
8771
|
addTab(items, index) {
|
|
@@ -8771,7 +8848,7 @@ let Tab = class Tab extends Component {
|
|
|
8771
8848
|
/**
|
|
8772
8849
|
* Removes the items in the Tab from the specified index.
|
|
8773
8850
|
*
|
|
8774
|
-
* @param
|
|
8851
|
+
* @param {number} index - Index of target item that is going to be removed.
|
|
8775
8852
|
* @returns {void}.
|
|
8776
8853
|
*/
|
|
8777
8854
|
removeTab(index) {
|
|
@@ -8810,8 +8887,8 @@ let Tab = class Tab extends Component {
|
|
|
8810
8887
|
/**
|
|
8811
8888
|
* Shows or hides the Tab that is in the specified index.
|
|
8812
8889
|
*
|
|
8813
|
-
* @param
|
|
8814
|
-
* @param
|
|
8890
|
+
* @param {number} index - Index value of target item.
|
|
8891
|
+
* @param {boolean} value - Based on this Boolean value, item will be hide (false) or show (true). By default, value is true.
|
|
8815
8892
|
* @returns {void}.
|
|
8816
8893
|
*/
|
|
8817
8894
|
hideTab(index, value) {
|
|
@@ -8871,12 +8948,16 @@ let Tab = class Tab extends Component {
|
|
|
8871
8948
|
this.tbObj.refreshOverflow();
|
|
8872
8949
|
}
|
|
8873
8950
|
}
|
|
8951
|
+
selectTab(args, event = null, isInteracted = false) {
|
|
8952
|
+
this.isInteracted = isInteracted;
|
|
8953
|
+
this.select(args, event);
|
|
8954
|
+
}
|
|
8874
8955
|
/**
|
|
8875
8956
|
* Specifies the index or HTMLElement to select an item from the Tab.
|
|
8876
8957
|
*
|
|
8877
|
-
* @param
|
|
8958
|
+
* @param {number | HTMLElement} args - Index or DOM element is used for selecting an item from the Tab.
|
|
8878
8959
|
* @param {Event} event - An event which takes place in DOM.
|
|
8879
|
-
* @returns {void}
|
|
8960
|
+
* @returns {void}
|
|
8880
8961
|
*/
|
|
8881
8962
|
select(args, event) {
|
|
8882
8963
|
const tabHeader = this.getTabHeader();
|
|
@@ -8913,20 +8994,22 @@ let Tab = class Tab extends Component {
|
|
|
8913
8994
|
selectingContent: !isNullOrUndefined(this.content) ?
|
|
8914
8995
|
select('#' + CLS_CONTENT$1 + this.tabId + '_' + this.selectingID, this.content) : null,
|
|
8915
8996
|
isSwiped: this.isSwipeed,
|
|
8997
|
+
isInteracted: this.isInteracted,
|
|
8916
8998
|
cancel: false
|
|
8917
8999
|
};
|
|
8918
9000
|
if (!this.initRender) {
|
|
8919
9001
|
this.trigger('selecting', eventArg, (selectArgs) => {
|
|
8920
9002
|
if (!selectArgs.cancel) {
|
|
8921
|
-
this.selectingContent(args);
|
|
9003
|
+
this.selectingContent(args, this.isInteracted);
|
|
8922
9004
|
}
|
|
8923
9005
|
});
|
|
8924
9006
|
}
|
|
8925
9007
|
else {
|
|
8926
|
-
this.selectingContent(args);
|
|
9008
|
+
this.selectingContent(args, this.isInteracted);
|
|
8927
9009
|
}
|
|
9010
|
+
this.isInteracted = false;
|
|
8928
9011
|
}
|
|
8929
|
-
selectingContent(args) {
|
|
9012
|
+
selectingContent(args, isInteracted) {
|
|
8930
9013
|
if (typeof args === 'number') {
|
|
8931
9014
|
if (!isNullOrUndefined(this.tbItem[args]) && (this.tbItem[args].classList.contains(CLS_DISABLE$4) ||
|
|
8932
9015
|
this.tbItem[args].classList.contains(CLS_HIDDEN$1))) {
|
|
@@ -8942,8 +9025,8 @@ let Tab = class Tab extends Component {
|
|
|
8942
9025
|
}
|
|
8943
9026
|
if (this.tbItem.length > args && args >= 0 && !isNaN(args)) {
|
|
8944
9027
|
this.prevIndex = this.selectedItem;
|
|
8945
|
-
if (this.tbItem[args].classList.contains(CLS_TB_POPUP)) {
|
|
8946
|
-
this.setActive(this.popupHandler(this.tbItem[args]));
|
|
9028
|
+
if (this.tbItem[args].classList.contains(CLS_TB_POPUP) && this.reorderActiveTab) {
|
|
9029
|
+
this.setActive(this.popupHandler(this.tbItem[args]), null, isInteracted);
|
|
8947
9030
|
if ((!isNullOrUndefined(this.items) && this.items.length > 0) && this.allowDragAndDrop) {
|
|
8948
9031
|
this.tbItem = selectAll('.' + CLS_TB_ITEMS + ' .' + CLS_TB_ITEM, this.hdrEle);
|
|
8949
9032
|
let item = this.items[args];
|
|
@@ -8952,15 +9035,15 @@ let Tab = class Tab extends Component {
|
|
|
8952
9035
|
}
|
|
8953
9036
|
}
|
|
8954
9037
|
else {
|
|
8955
|
-
this.setActive(args);
|
|
9038
|
+
this.setActive(args, null, isInteracted);
|
|
8956
9039
|
}
|
|
8957
9040
|
}
|
|
8958
9041
|
else {
|
|
8959
|
-
this.setActive(0);
|
|
9042
|
+
this.setActive(0, null, isInteracted);
|
|
8960
9043
|
}
|
|
8961
9044
|
}
|
|
8962
9045
|
else if (args instanceof (HTMLElement)) {
|
|
8963
|
-
this.setActive(this.getEleIndex(args));
|
|
9046
|
+
this.setActive(this.getEleIndex(args), null, isInteracted);
|
|
8964
9047
|
}
|
|
8965
9048
|
}
|
|
8966
9049
|
/**
|
|
@@ -9041,6 +9124,9 @@ let Tab = class Tab extends Component {
|
|
|
9041
9124
|
case 'showCloseButton':
|
|
9042
9125
|
this.setCloseButton(newProp.showCloseButton);
|
|
9043
9126
|
break;
|
|
9127
|
+
case 'reorderActiveTab':
|
|
9128
|
+
this.refreshActiveTabBorder();
|
|
9129
|
+
break;
|
|
9044
9130
|
case 'selectedItem':
|
|
9045
9131
|
this.selectedItem = oldProp.selectedItem;
|
|
9046
9132
|
this.select(newProp.selectedItem);
|
|
@@ -9054,7 +9140,7 @@ let Tab = class Tab extends Component {
|
|
|
9054
9140
|
case 'overflowMode':
|
|
9055
9141
|
this.tbObj.overflowMode = newProp.overflowMode;
|
|
9056
9142
|
this.tbObj.dataBind();
|
|
9057
|
-
this.
|
|
9143
|
+
this.refreshActiveTabBorder();
|
|
9058
9144
|
break;
|
|
9059
9145
|
case 'heightAdjustMode':
|
|
9060
9146
|
this.setContentHeight(false);
|
|
@@ -9234,6 +9320,9 @@ __decorate$7([
|
|
|
9234
9320
|
__decorate$7([
|
|
9235
9321
|
Property(false)
|
|
9236
9322
|
], Tab.prototype, "showCloseButton", void 0);
|
|
9323
|
+
__decorate$7([
|
|
9324
|
+
Property(true)
|
|
9325
|
+
], Tab.prototype, "reorderActiveTab", void 0);
|
|
9237
9326
|
__decorate$7([
|
|
9238
9327
|
Property()
|
|
9239
9328
|
], Tab.prototype, "scrollStep", void 0);
|
|
@@ -9300,6 +9389,8 @@ const COLLAPSIBLE = 'e-icon-collapsible';
|
|
|
9300
9389
|
const EXPANDABLE = 'e-icon-expandable';
|
|
9301
9390
|
const LISTITEM = 'e-list-item';
|
|
9302
9391
|
const LISTTEXT = 'e-list-text';
|
|
9392
|
+
const LISTWRAP = 'e-text-wrap';
|
|
9393
|
+
const IELISTWRAP = 'e-ie-wrap';
|
|
9303
9394
|
const PARENTITEM = 'e-list-parent';
|
|
9304
9395
|
const HOVER = 'e-hover';
|
|
9305
9396
|
const ACTIVE = 'e-active';
|
|
@@ -9452,6 +9543,7 @@ let TreeView = TreeView_1 = class TreeView extends Component {
|
|
|
9452
9543
|
this.isFieldChange = false;
|
|
9453
9544
|
this.changeDataSource = false;
|
|
9454
9545
|
this.hasTemplate = false;
|
|
9546
|
+
this.isFirstRender = false;
|
|
9455
9547
|
this.mouseDownStatus = false;
|
|
9456
9548
|
}
|
|
9457
9549
|
/**
|
|
@@ -9574,6 +9666,7 @@ let TreeView = TreeView_1 = class TreeView extends Component {
|
|
|
9574
9666
|
this.setCssClass(null, this.cssClass);
|
|
9575
9667
|
this.setEnableRtl();
|
|
9576
9668
|
this.setFullRow(this.fullRowSelect);
|
|
9669
|
+
this.setTextWrap();
|
|
9577
9670
|
this.nodeTemplateFn = this.templateComplier(this.nodeTemplate);
|
|
9578
9671
|
}
|
|
9579
9672
|
setDisabledMode() {
|
|
@@ -10558,11 +10651,36 @@ let TreeView = TreeView_1 = class TreeView extends Component {
|
|
|
10558
10651
|
addClass([firstNode], FOCUS);
|
|
10559
10652
|
this.updateIdAttr(null, firstNode);
|
|
10560
10653
|
}
|
|
10654
|
+
if (this.allowTextWrap) {
|
|
10655
|
+
this.updateWrap();
|
|
10656
|
+
}
|
|
10561
10657
|
this.renderReactTemplates();
|
|
10562
10658
|
this.hasPid = this.rootData[0] ? this.rootData[0].hasOwnProperty(this.fields.parentID) : false;
|
|
10563
10659
|
this.doExpandAction();
|
|
10564
10660
|
}
|
|
10565
10661
|
}
|
|
10662
|
+
setTextWrap() {
|
|
10663
|
+
(this.allowTextWrap ? addClass : removeClass)([this.element], LISTWRAP);
|
|
10664
|
+
if (Browser.isIE) {
|
|
10665
|
+
(this.allowTextWrap ? addClass : removeClass)([this.element], IELISTWRAP);
|
|
10666
|
+
}
|
|
10667
|
+
}
|
|
10668
|
+
updateWrap(ulEle) {
|
|
10669
|
+
if (!this.fullRowSelect) {
|
|
10670
|
+
return;
|
|
10671
|
+
}
|
|
10672
|
+
const liEle = ulEle ? selectAll('.' + LISTITEM, ulEle) : this.liList;
|
|
10673
|
+
const length = liEle.length;
|
|
10674
|
+
for (let i = 0; i < length; i++) {
|
|
10675
|
+
this.calculateWrap(liEle[i]);
|
|
10676
|
+
}
|
|
10677
|
+
}
|
|
10678
|
+
calculateWrap(liEle) {
|
|
10679
|
+
const element = select('.' + FULLROW, liEle);
|
|
10680
|
+
if (element && element.nextElementSibling) {
|
|
10681
|
+
element.style.height = this.allowTextWrap ? element.nextElementSibling.offsetHeight + 'px' : '';
|
|
10682
|
+
}
|
|
10683
|
+
}
|
|
10566
10684
|
doExpandAction() {
|
|
10567
10685
|
let eUids = this.expandedNodes;
|
|
10568
10686
|
if (this.isInitalExpand && eUids.length > 0) {
|
|
@@ -10798,6 +10916,10 @@ let TreeView = TreeView_1 = class TreeView extends Component {
|
|
|
10798
10916
|
currLi.style.height = '';
|
|
10799
10917
|
removeClass([icon], PROCESS);
|
|
10800
10918
|
this.addExpand(currLi);
|
|
10919
|
+
if (this.allowTextWrap && this.isLoaded && this.isFirstRender) {
|
|
10920
|
+
this.updateWrap(currLi);
|
|
10921
|
+
this.isFirstRender = false;
|
|
10922
|
+
}
|
|
10801
10923
|
if (this.isLoaded && this.expandArgs && !this.isRefreshed) {
|
|
10802
10924
|
this.expandArgs = this.getExpandEvent(currLi, null);
|
|
10803
10925
|
this.trigger('nodeExpanded', this.expandArgs);
|
|
@@ -11298,6 +11420,7 @@ let TreeView = TreeView_1 = class TreeView extends Component {
|
|
|
11298
11420
|
this.expandNode(currLi, icon);
|
|
11299
11421
|
}
|
|
11300
11422
|
else {
|
|
11423
|
+
this.isFirstRender = true;
|
|
11301
11424
|
this.renderChildNodes(currLi, expandChild, callback);
|
|
11302
11425
|
let liEles = selectAll('.' + LISTITEM, currLi);
|
|
11303
11426
|
for (let i = 0; i < liEles.length; i++) {
|
|
@@ -11990,6 +12113,9 @@ let TreeView = TreeView_1 = class TreeView extends Component {
|
|
|
11990
12113
|
removeClass([liEle], EDITING);
|
|
11991
12114
|
txtEle.focus();
|
|
11992
12115
|
}
|
|
12116
|
+
if (this.allowTextWrap) {
|
|
12117
|
+
this.calculateWrap(liEle);
|
|
12118
|
+
}
|
|
11993
12119
|
}
|
|
11994
12120
|
getElement(ele) {
|
|
11995
12121
|
if (isNullOrUndefined(ele)) {
|
|
@@ -13576,6 +13702,10 @@ let TreeView = TreeView_1 = class TreeView extends Component {
|
|
|
13576
13702
|
this.setMultiSelect(this.allowMultiSelection);
|
|
13577
13703
|
this.addMultiSelect(this.allowMultiSelection);
|
|
13578
13704
|
break;
|
|
13705
|
+
case 'allowTextWrap':
|
|
13706
|
+
this.setTextWrap();
|
|
13707
|
+
this.updateWrap();
|
|
13708
|
+
break;
|
|
13579
13709
|
case 'checkedNodes':
|
|
13580
13710
|
if (this.showCheckBox) {
|
|
13581
13711
|
this.checkedNodes = oldProp.checkedNodes;
|
|
@@ -13627,6 +13757,10 @@ let TreeView = TreeView_1 = class TreeView extends Component {
|
|
|
13627
13757
|
case 'fullRowSelect':
|
|
13628
13758
|
this.setFullRow(this.fullRowSelect);
|
|
13629
13759
|
this.addFullRow(this.fullRowSelect);
|
|
13760
|
+
if (this.allowTextWrap) {
|
|
13761
|
+
this.setTextWrap();
|
|
13762
|
+
this.updateWrap();
|
|
13763
|
+
}
|
|
13630
13764
|
break;
|
|
13631
13765
|
case 'loadOnDemand':
|
|
13632
13766
|
if (this.loadOnDemand === false && !this.onLoaded) {
|
|
@@ -14065,6 +14199,9 @@ __decorate$8([
|
|
|
14065
14199
|
__decorate$8([
|
|
14066
14200
|
Property(false)
|
|
14067
14201
|
], TreeView.prototype, "allowMultiSelection", void 0);
|
|
14202
|
+
__decorate$8([
|
|
14203
|
+
Property(false)
|
|
14204
|
+
], TreeView.prototype, "allowTextWrap", void 0);
|
|
14068
14205
|
__decorate$8([
|
|
14069
14206
|
Complex({}, NodeAnimationSettings)
|
|
14070
14207
|
], TreeView.prototype, "animation", void 0);
|
|
@@ -14904,6 +15041,15 @@ var __decorate$10 = (undefined && undefined.__decorate) || function (decorators,
|
|
|
14904
15041
|
const ICONRIGHT = 'e-icon-right';
|
|
14905
15042
|
const ITEMTEXTCLASS = 'e-breadcrumb-text';
|
|
14906
15043
|
const ICONCLASS = 'e-breadcrumb-icon';
|
|
15044
|
+
const MENUCLASS = 'e-breadcrumb-menu';
|
|
15045
|
+
const ITEMCLASS = 'e-breadcrumb-item';
|
|
15046
|
+
const POPUPCLASS = 'e-breadcrumb-popup';
|
|
15047
|
+
const WRAPMODECLASS = 'e-breadcrumb-wrap-mode';
|
|
15048
|
+
const SCROLLMODECLASS = 'e-breadcrumb-scroll-mode';
|
|
15049
|
+
const TABINDEX = 'tabindex';
|
|
15050
|
+
const DISABLEDCLASS = 'e-disabled';
|
|
15051
|
+
const ARIADISABLED = 'aria-disabled';
|
|
15052
|
+
const DOT = '.';
|
|
14907
15053
|
class BreadcrumbItem extends ChildProperty {
|
|
14908
15054
|
}
|
|
14909
15055
|
__decorate$10([
|
|
@@ -14915,6 +15061,9 @@ __decorate$10([
|
|
|
14915
15061
|
__decorate$10([
|
|
14916
15062
|
Property(null)
|
|
14917
15063
|
], BreadcrumbItem.prototype, "iconCss", void 0);
|
|
15064
|
+
__decorate$10([
|
|
15065
|
+
Property(false)
|
|
15066
|
+
], BreadcrumbItem.prototype, "disabled", void 0);
|
|
14918
15067
|
/**
|
|
14919
15068
|
* Breadcrumb is a graphical user interface that helps to identify or highlight the current location within a hierarchical structure of websites.
|
|
14920
15069
|
* The aim is to make the user aware of their current position in a hierarchy of website links.
|
|
@@ -14966,20 +15115,48 @@ let Breadcrumb = class Breadcrumb extends Component {
|
|
|
14966
15115
|
if (this.enableRtl) {
|
|
14967
15116
|
this.element.classList.add('e-rtl');
|
|
14968
15117
|
}
|
|
14969
|
-
this.
|
|
15118
|
+
if (this.disabled) {
|
|
15119
|
+
this.element.classList.add(DISABLEDCLASS);
|
|
15120
|
+
this.element.setAttribute(ARIADISABLED, 'true');
|
|
15121
|
+
}
|
|
15122
|
+
if (this.overflowMode === 'Wrap') {
|
|
15123
|
+
this.element.classList.add(WRAPMODECLASS);
|
|
15124
|
+
}
|
|
15125
|
+
else if (this.overflowMode === 'Scroll') {
|
|
15126
|
+
this.element.classList.add(SCROLLMODECLASS);
|
|
15127
|
+
}
|
|
14970
15128
|
this.initItems();
|
|
14971
15129
|
this.initPvtProps();
|
|
14972
15130
|
}
|
|
14973
15131
|
initPvtProps() {
|
|
14974
|
-
if (this.overflowMode === '
|
|
14975
|
-
this.
|
|
14976
|
-
this.
|
|
15132
|
+
if (this.overflowMode === 'Hidden' && this._maxItems > 0) {
|
|
15133
|
+
this.endIndex = this.getEndIndex();
|
|
15134
|
+
this.startIndex = this.endIndex + 1 - (this._maxItems - 1);
|
|
15135
|
+
}
|
|
15136
|
+
if (this.overflowMode === 'Menu') {
|
|
15137
|
+
if (this._maxItems >= 0) {
|
|
15138
|
+
this.startIndex = this._maxItems > 1 ? 1 : 0;
|
|
15139
|
+
this.endIndex = this.getEndIndex();
|
|
15140
|
+
this.popupUl = this.createElement('ul', { attrs: { TABINDEX: '0', 'role': 'menu' } });
|
|
15141
|
+
}
|
|
15142
|
+
else {
|
|
15143
|
+
this.startIndex = this.endIndex = null;
|
|
15144
|
+
}
|
|
14977
15145
|
}
|
|
14978
15146
|
}
|
|
14979
|
-
|
|
14980
|
-
|
|
14981
|
-
|
|
15147
|
+
getEndIndex() {
|
|
15148
|
+
let endIndex;
|
|
15149
|
+
if (this.activeItem) {
|
|
15150
|
+
this.items.forEach((item, idx) => {
|
|
15151
|
+
if (item.url === this.activeItem || item.text === this.activeItem) {
|
|
15152
|
+
endIndex = idx;
|
|
15153
|
+
}
|
|
15154
|
+
});
|
|
14982
15155
|
}
|
|
15156
|
+
else {
|
|
15157
|
+
endIndex = this.items.length - 1;
|
|
15158
|
+
}
|
|
15159
|
+
return endIndex;
|
|
14983
15160
|
}
|
|
14984
15161
|
initItems() {
|
|
14985
15162
|
if (!this.items.length) {
|
|
@@ -14987,7 +15164,7 @@ let Breadcrumb = class Breadcrumb extends Component {
|
|
|
14987
15164
|
let uri;
|
|
14988
15165
|
const items = [];
|
|
14989
15166
|
if (this.url) {
|
|
14990
|
-
const url = new URL(this.url);
|
|
15167
|
+
const url = new URL(this.url, window.location.origin);
|
|
14991
15168
|
baseUri = url.origin + '/';
|
|
14992
15169
|
uri = url.href.split(baseUri)[1].split('/');
|
|
14993
15170
|
}
|
|
@@ -15013,13 +15190,19 @@ let Breadcrumb = class Breadcrumb extends Component {
|
|
|
15013
15190
|
if (itemsLength) {
|
|
15014
15191
|
let isActiveItem;
|
|
15015
15192
|
let isLastItem;
|
|
15193
|
+
let isLastItemInPopup;
|
|
15016
15194
|
let j = 0;
|
|
15195
|
+
let wrapDiv;
|
|
15017
15196
|
const len = (itemsLength * 2) - 1;
|
|
15018
|
-
|
|
15197
|
+
let isItemCancelled = false;
|
|
15198
|
+
const ol = this.createElement('ol', { className: this.overflowMode === 'Wrap' ? 'e-breadcrumb-wrapped-ol' : '' });
|
|
15199
|
+
const firstOl = this.createElement('ol', { className: this.overflowMode === 'Wrap' ? 'e-breadcrumb-first-ol' : '' });
|
|
15019
15200
|
const showIcon = this.hasField(items, 'iconCss');
|
|
15020
|
-
const
|
|
15021
|
-
const
|
|
15022
|
-
|
|
15201
|
+
const isCollasped = (this.overflowMode === 'Collapsed' && this._maxItems > 0 && itemsLength > this._maxItems && !this.isExpanded);
|
|
15202
|
+
const isDefaultOverflowMode = (this.overflowMode === 'Hidden' && this._maxItems > 0);
|
|
15203
|
+
if (this.overflowMode === 'Menu' && this.popupUl) {
|
|
15204
|
+
this.popupUl.innerHTML = '';
|
|
15205
|
+
}
|
|
15023
15206
|
const listBaseOptions = {
|
|
15024
15207
|
moduleName: this.getModuleName(),
|
|
15025
15208
|
showIcon: showIcon,
|
|
@@ -15028,7 +15211,9 @@ let Breadcrumb = class Breadcrumb extends Component {
|
|
|
15028
15211
|
const isLastItem = args.curData.isLastItem;
|
|
15029
15212
|
if (isLastItem && args.item.children.length && !this.itemTemplate) {
|
|
15030
15213
|
delete args.curData.isLastItem;
|
|
15031
|
-
|
|
15214
|
+
if (!isLastItemInPopup && !this.enableActiveItemNavigation) {
|
|
15215
|
+
args.item.innerHTML = this.createElement('span', { className: ITEMTEXTCLASS, innerHTML: args.item.children[0].innerHTML }).outerHTML;
|
|
15216
|
+
}
|
|
15032
15217
|
}
|
|
15033
15218
|
if (args.curData.iconCss && !args.curData.text && !this.itemTemplate) {
|
|
15034
15219
|
args.item.classList.add('e-icon-item');
|
|
@@ -15036,41 +15221,40 @@ let Breadcrumb = class Breadcrumb extends Component {
|
|
|
15036
15221
|
if (isDefaultOverflowMode) {
|
|
15037
15222
|
args.item.setAttribute('item-index', j.toString());
|
|
15038
15223
|
}
|
|
15039
|
-
if (args.item.querySelector('.' + ITEMTEXTCLASS)) {
|
|
15040
|
-
EventHandler.add(args.item.querySelector('.' + ITEMTEXTCLASS), 'focus', () => {
|
|
15041
|
-
args.item.classList.add('e-focus');
|
|
15042
|
-
}, this);
|
|
15043
|
-
EventHandler.add(args.item.querySelector('.' + ITEMTEXTCLASS), 'focusout', () => {
|
|
15044
|
-
args.item.classList.remove('e-focus');
|
|
15045
|
-
}, this);
|
|
15046
|
-
}
|
|
15047
15224
|
const eventArgs = {
|
|
15048
15225
|
item: extend({}, args.curData.properties ?
|
|
15049
|
-
args.curData.properties : args.curData), element: args.item
|
|
15226
|
+
args.curData.properties : args.curData), element: args.item, cancel: false
|
|
15050
15227
|
};
|
|
15051
15228
|
this.trigger('beforeItemRender', eventArgs);
|
|
15052
|
-
|
|
15229
|
+
isItemCancelled = eventArgs.cancel;
|
|
15053
15230
|
const containsRightIcon = (isIconRight || eventArgs.element.classList.contains(ICONRIGHT));
|
|
15054
15231
|
if (containsRightIcon && args.curData.iconCss && !this.itemTemplate) {
|
|
15055
|
-
args.item.querySelector('.e-anchor-wrap').
|
|
15232
|
+
args.item.querySelector('.e-anchor-wrap').appendChild(args.item.querySelector(DOT + ICONCLASS));
|
|
15233
|
+
}
|
|
15234
|
+
if (eventArgs.item.disabled) {
|
|
15235
|
+
args.item.setAttribute(ARIADISABLED, 'true');
|
|
15236
|
+
args.item.classList.add(DISABLEDCLASS);
|
|
15056
15237
|
}
|
|
15057
|
-
if (
|
|
15058
|
-
args.item.setAttribute(
|
|
15238
|
+
if ((eventArgs.item.disabled || this.disabled) && args.item.children.length && !this.itemTemplate) {
|
|
15239
|
+
args.item.children[0].setAttribute(TABINDEX, '-1');
|
|
15059
15240
|
}
|
|
15060
15241
|
if (args.curData.isEmptyUrl) {
|
|
15061
15242
|
args.item.children[0].removeAttribute('href');
|
|
15062
|
-
if ((!isLastItem || (isLastItem && this.enableActiveItemNavigation)) && !
|
|
15063
|
-
args.item.children[0].setAttribute(
|
|
15243
|
+
if ((!isLastItem || (isLastItem && this.enableActiveItemNavigation)) && !(eventArgs.item.disabled || this.disabled)) {
|
|
15244
|
+
args.item.children[0].setAttribute(TABINDEX, '0');
|
|
15064
15245
|
EventHandler.add(args.item.children[0], 'keydown', this.keyDownHandler, this);
|
|
15065
15246
|
}
|
|
15066
15247
|
}
|
|
15248
|
+
if (isLastItem) {
|
|
15249
|
+
args.item.setAttribute('data-active-item', '');
|
|
15250
|
+
}
|
|
15067
15251
|
if (!this.itemTemplate) {
|
|
15068
15252
|
this.beforeItemRenderChanges(args.curData, eventArgs.item, args.item, containsRightIcon);
|
|
15069
15253
|
}
|
|
15070
15254
|
}
|
|
15071
15255
|
};
|
|
15072
15256
|
for (let i = 0; i < len; i % 2 && j++, i++) {
|
|
15073
|
-
isActiveItem = (this.activeItem && this.activeItem === items[j].url);
|
|
15257
|
+
isActiveItem = (this.activeItem && (this.activeItem === items[j].url || this.activeItem === items[j].text));
|
|
15074
15258
|
if (isCollasped && i > 1 && i < len - 2) {
|
|
15075
15259
|
continue;
|
|
15076
15260
|
}
|
|
@@ -15080,10 +15264,11 @@ let Breadcrumb = class Breadcrumb extends Component {
|
|
|
15080
15264
|
}
|
|
15081
15265
|
if (i % 2) {
|
|
15082
15266
|
// separator item
|
|
15267
|
+
wrapDiv = this.createElement('div', { className: 'e-breadcrumb-item-wrapper' });
|
|
15083
15268
|
listBaseOptions.template = this.separatorTemplate ? this.separatorTemplate : '/';
|
|
15084
15269
|
listBaseOptions.itemClass = 'e-breadcrumb-separator';
|
|
15085
15270
|
isSingleLevel = false;
|
|
15086
|
-
item = [{ previousItem:
|
|
15271
|
+
item = [{ previousItem: items[j], nextItem: items[j + 1] }];
|
|
15087
15272
|
}
|
|
15088
15273
|
else {
|
|
15089
15274
|
// list item
|
|
@@ -15100,47 +15285,129 @@ let Breadcrumb = class Breadcrumb extends Component {
|
|
|
15100
15285
|
if (!item[0].url && !this.itemTemplate) {
|
|
15101
15286
|
item = [extend({}, item[0], { isEmptyUrl: true, url: '#' })];
|
|
15102
15287
|
}
|
|
15103
|
-
isLastItem = isDefaultOverflowMode && (j === this.endIndex);
|
|
15104
|
-
if (((
|
|
15288
|
+
isLastItem = (isDefaultOverflowMode || this.overflowMode === 'Menu') && (j === this.endIndex);
|
|
15289
|
+
if (((i === len - 1 || isLastItem) && !this.itemTemplate) || isActiveItem) {
|
|
15105
15290
|
item[0].isLastItem = true;
|
|
15106
15291
|
}
|
|
15107
15292
|
}
|
|
15108
|
-
|
|
15109
|
-
|
|
15293
|
+
let parent = ol;
|
|
15294
|
+
const lastPopupItemIdx = this.startIndex + this.endIndex - this._maxItems;
|
|
15295
|
+
if (this.overflowMode === 'Menu' && ((j >= this.startIndex && (j <= lastPopupItemIdx && (i % 2 ? !(j === lastPopupItemIdx) : true)) && this.endIndex >= this._maxItems && this._maxItems > 0) || this._maxItems === 0)) {
|
|
15296
|
+
if (i % 2) {
|
|
15297
|
+
continue;
|
|
15298
|
+
}
|
|
15299
|
+
else {
|
|
15300
|
+
parent = this.popupUl;
|
|
15301
|
+
if (isLastItem) {
|
|
15302
|
+
isLastItemInPopup = true;
|
|
15303
|
+
}
|
|
15304
|
+
}
|
|
15305
|
+
}
|
|
15306
|
+
else if (this.overflowMode === 'Wrap') {
|
|
15307
|
+
if (i === 0) {
|
|
15308
|
+
parent = firstOl;
|
|
15309
|
+
}
|
|
15310
|
+
else {
|
|
15311
|
+
parent = wrapDiv;
|
|
15312
|
+
}
|
|
15313
|
+
}
|
|
15314
|
+
const li = ListBase.createList(this.createElement, item, listBaseOptions, isSingleLevel, this).childNodes;
|
|
15315
|
+
if (!isItemCancelled) {
|
|
15316
|
+
append(li, parent);
|
|
15317
|
+
}
|
|
15318
|
+
else if (isDefaultOverflowMode || isCollasped || this.overflowMode === 'Menu' || this.overflowMode === 'Wrap') {
|
|
15319
|
+
items.splice(j, 1);
|
|
15320
|
+
this.initPvtProps();
|
|
15321
|
+
return this.reRenderItems();
|
|
15322
|
+
}
|
|
15323
|
+
else if ((i === len - 1 || isLastItem)) {
|
|
15324
|
+
remove(parent.lastElementChild);
|
|
15325
|
+
}
|
|
15326
|
+
if (this.overflowMode === 'Wrap' && i !== 0 && i % 2 === 0) {
|
|
15327
|
+
ol.appendChild(wrapDiv);
|
|
15328
|
+
}
|
|
15110
15329
|
if (isCollasped && i === 1) {
|
|
15111
|
-
const li = this.createElement('li', { className: 'e-icons e-breadcrumb-collapsed', attrs: {
|
|
15330
|
+
const li = this.createElement('li', { className: 'e-icons e-breadcrumb-collapsed', attrs: { TABINDEX: '0' } });
|
|
15112
15331
|
EventHandler.add(li, 'keyup', this.expandHandler, this);
|
|
15113
|
-
ol.
|
|
15332
|
+
ol.appendChild(li);
|
|
15333
|
+
}
|
|
15334
|
+
if (this.overflowMode === 'Menu' && this.startIndex === i && this.endIndex >= this._maxItems && this._maxItems >= 0) {
|
|
15335
|
+
const menu = this.getMenuElement();
|
|
15336
|
+
EventHandler.add(menu, 'keyup', this.keyDownHandler, this);
|
|
15337
|
+
ol.appendChild(menu);
|
|
15114
15338
|
}
|
|
15115
15339
|
if (isActiveItem || isLastItem) {
|
|
15116
15340
|
break;
|
|
15117
15341
|
}
|
|
15342
|
+
if (isItemCancelled) {
|
|
15343
|
+
i++;
|
|
15344
|
+
}
|
|
15118
15345
|
}
|
|
15119
15346
|
if (this.isReact) {
|
|
15120
15347
|
this.renderReactTemplates();
|
|
15121
15348
|
}
|
|
15122
|
-
this.
|
|
15349
|
+
if (this.overflowMode === 'Wrap') {
|
|
15350
|
+
this.element.appendChild(firstOl);
|
|
15351
|
+
}
|
|
15352
|
+
this.element.appendChild(ol);
|
|
15123
15353
|
this.calculateMaxItems();
|
|
15124
15354
|
}
|
|
15125
15355
|
}
|
|
15126
15356
|
calculateMaxItems() {
|
|
15127
|
-
if (
|
|
15128
|
-
|
|
15129
|
-
|
|
15130
|
-
|
|
15131
|
-
|
|
15132
|
-
|
|
15133
|
-
|
|
15134
|
-
|
|
15357
|
+
if (this.overflowMode === 'Hidden' || this.overflowMode === 'Collapsed' || this.overflowMode === 'Menu') {
|
|
15358
|
+
let maxItems;
|
|
15359
|
+
const width = this.element.offsetWidth;
|
|
15360
|
+
const liElems = [].slice.call(this.element.children[0].children).reverse();
|
|
15361
|
+
let liWidth = this.overflowMode === 'Menu' ? 0 : liElems[liElems.length - 1].offsetWidth + (liElems[liElems.length - 2] ? liElems[liElems.length - 2].offsetWidth : 0);
|
|
15362
|
+
if (this.overflowMode === 'Menu') {
|
|
15363
|
+
const menuEle = this.getMenuElement();
|
|
15364
|
+
this.element.appendChild(menuEle);
|
|
15365
|
+
liWidth += menuEle.offsetWidth;
|
|
15366
|
+
remove(menuEle);
|
|
15367
|
+
}
|
|
15368
|
+
for (let i = 0; i < liElems.length - 2; i++) {
|
|
15369
|
+
if (liWidth > width) {
|
|
15370
|
+
maxItems = Math.ceil((i - 1) / 2) + ((this.overflowMode === 'Menu' && i <= 2) ? 0 : 1);
|
|
15371
|
+
if (((this.maxItems > maxItems && !(this.maxItems > -1 && maxItems == -1)) || this.maxItems == -1) && this._maxItems != maxItems) {
|
|
15372
|
+
this._maxItems = maxItems;
|
|
15135
15373
|
this.initPvtProps();
|
|
15136
15374
|
return this.reRenderItems();
|
|
15137
15375
|
}
|
|
15138
15376
|
else {
|
|
15377
|
+
break;
|
|
15378
|
+
}
|
|
15379
|
+
}
|
|
15380
|
+
else {
|
|
15381
|
+
if (this.overflowMode === 'Menu' && i === 2) {
|
|
15382
|
+
liWidth += liElems[liElems.length - 1].offsetWidth + liElems[liElems.length - 2].offsetWidth;
|
|
15383
|
+
if (liWidth > width) {
|
|
15384
|
+
this._maxItems = 1;
|
|
15385
|
+
this.initPvtProps();
|
|
15386
|
+
return this.reRenderItems();
|
|
15387
|
+
}
|
|
15388
|
+
}
|
|
15389
|
+
if (!(this.overflowMode === 'Menu' && liElems[i].classList.contains(MENUCLASS))) {
|
|
15139
15390
|
liWidth += liElems[i].offsetWidth;
|
|
15140
15391
|
}
|
|
15141
15392
|
}
|
|
15142
15393
|
}
|
|
15143
15394
|
}
|
|
15395
|
+
else if ((this.overflowMode === 'Wrap' || this.overflowMode === 'Scroll') && this._maxItems > 0) {
|
|
15396
|
+
let width = 0;
|
|
15397
|
+
const liElems = this.element.querySelectorAll(DOT + ITEMCLASS);
|
|
15398
|
+
if (liElems.length > this._maxItems + this._maxItems - 1) {
|
|
15399
|
+
for (let i = this.overflowMode === 'Wrap' ? 1 : 0; i < this._maxItems + this._maxItems - 1; i++) {
|
|
15400
|
+
width += liElems[i].offsetWidth;
|
|
15401
|
+
}
|
|
15402
|
+
width = width + 5 + (parseInt(getComputedStyle(this.element.children[0]).paddingLeft, 10) * 2);
|
|
15403
|
+
if (this.overflowMode === 'Wrap') {
|
|
15404
|
+
this.element.querySelector('.e-breadcrumb-wrapped-ol').style.width = width + 'px';
|
|
15405
|
+
}
|
|
15406
|
+
else {
|
|
15407
|
+
this.element.style.width = width + 'px';
|
|
15408
|
+
}
|
|
15409
|
+
}
|
|
15410
|
+
}
|
|
15144
15411
|
}
|
|
15145
15412
|
hasField(items, field) {
|
|
15146
15413
|
for (let i = 0, len = items.length; i < len; i++) {
|
|
@@ -15150,6 +15417,9 @@ let Breadcrumb = class Breadcrumb extends Component {
|
|
|
15150
15417
|
}
|
|
15151
15418
|
return false;
|
|
15152
15419
|
}
|
|
15420
|
+
getMenuElement() {
|
|
15421
|
+
return this.createElement('li', { className: 'e-icons e-breadcrumb-menu', attrs: { TABINDEX: '0' } });
|
|
15422
|
+
}
|
|
15153
15423
|
beforeItemRenderChanges(prevItem, currItem, elem, isRightIcon) {
|
|
15154
15424
|
const wrapElem = elem.querySelector('.e-anchor-wrap');
|
|
15155
15425
|
if (currItem.text !== prevItem.text) {
|
|
@@ -15159,15 +15429,15 @@ let Breadcrumb = class Breadcrumb extends Component {
|
|
|
15159
15429
|
}
|
|
15160
15430
|
});
|
|
15161
15431
|
}
|
|
15162
|
-
if (currItem.iconCss !== prevItem.iconCss) {
|
|
15163
|
-
const iconElem = elem.querySelector(
|
|
15432
|
+
if (currItem.iconCss !== prevItem.iconCss && wrapElem) { // wrapElem - for checking it is item not a separator
|
|
15433
|
+
const iconElem = elem.querySelector(DOT + ICONCLASS);
|
|
15164
15434
|
if (iconElem) {
|
|
15165
15435
|
if (currItem.iconCss) {
|
|
15166
15436
|
removeClass([iconElem], prevItem.iconCss.split(' '));
|
|
15167
15437
|
addClass([iconElem], currItem.iconCss.split(' '));
|
|
15168
15438
|
}
|
|
15169
15439
|
else {
|
|
15170
|
-
|
|
15440
|
+
remove(iconElem);
|
|
15171
15441
|
}
|
|
15172
15442
|
}
|
|
15173
15443
|
else if (currItem.iconCss) {
|
|
@@ -15197,31 +15467,85 @@ let Breadcrumb = class Breadcrumb extends Component {
|
|
|
15197
15467
|
this.renderItems(this.items);
|
|
15198
15468
|
}
|
|
15199
15469
|
clickHandler(e) {
|
|
15200
|
-
const li = closest(e.target, '.e-breadcrumb-
|
|
15201
|
-
if (
|
|
15202
|
-
|
|
15203
|
-
|
|
15204
|
-
|
|
15470
|
+
const li = closest(e.target, DOT + ITEMCLASS + ':not(.e-breadcrumb-separator)');
|
|
15471
|
+
if (!this.enableNavigation) {
|
|
15472
|
+
e.preventDefault();
|
|
15473
|
+
}
|
|
15474
|
+
if (li && (closest(e.target, DOT + ITEMTEXTCLASS) || this.itemTemplate)) {
|
|
15475
|
+
let idx;
|
|
15476
|
+
if (this.overflowMode === 'Wrap') {
|
|
15477
|
+
idx = [].slice.call(this.element.querySelectorAll(DOT + ITEMCLASS)).indexOf(li);
|
|
15478
|
+
}
|
|
15479
|
+
else {
|
|
15480
|
+
idx = [].slice.call(li.parentElement.children).indexOf(li);
|
|
15481
|
+
}
|
|
15482
|
+
if (this.overflowMode === 'Menu') {
|
|
15483
|
+
if (closest(e.target, DOT + POPUPCLASS)) {
|
|
15484
|
+
idx += this.startIndex;
|
|
15485
|
+
this.endIndex = idx;
|
|
15486
|
+
if (e.type === 'keydown') {
|
|
15487
|
+
this.documentClickHandler(e);
|
|
15488
|
+
}
|
|
15489
|
+
}
|
|
15490
|
+
else if (this.element.querySelector(DOT + MENUCLASS)) {
|
|
15491
|
+
if (idx > [].slice.call(this.element.children[0].children).indexOf(this.element.querySelector(DOT + MENUCLASS))) {
|
|
15492
|
+
idx += (this.popupUl.childElementCount * 2) - 2;
|
|
15493
|
+
idx = Math.floor(idx / 2);
|
|
15494
|
+
this.endIndex = idx;
|
|
15495
|
+
}
|
|
15496
|
+
else {
|
|
15497
|
+
this.startIndex = this.endIndex = idx;
|
|
15498
|
+
}
|
|
15499
|
+
}
|
|
15500
|
+
else {
|
|
15501
|
+
idx = Math.floor(idx / 2);
|
|
15502
|
+
this.startIndex = this.endIndex = idx;
|
|
15503
|
+
}
|
|
15504
|
+
}
|
|
15505
|
+
else {
|
|
15506
|
+
idx = Math.floor(idx / 2);
|
|
15507
|
+
}
|
|
15508
|
+
if (this.overflowMode === 'Hidden' && this._maxItems > 0 && this.endIndex !== 0) {
|
|
15205
15509
|
idx = parseInt(li.getAttribute('item-index'), 10);
|
|
15206
15510
|
if (this.startIndex > 1) {
|
|
15207
15511
|
this.startIndex -= (this.endIndex - idx);
|
|
15208
15512
|
}
|
|
15209
15513
|
this.endIndex = idx;
|
|
15210
|
-
this.reRenderItems();
|
|
15211
15514
|
}
|
|
15212
15515
|
this.trigger('itemClick', { element: li, item: this.items[idx], event: e });
|
|
15213
|
-
|
|
15214
|
-
|
|
15215
|
-
this.dataBind();
|
|
15216
|
-
}
|
|
15217
|
-
}
|
|
15218
|
-
if (!this.enableNavigation) {
|
|
15219
|
-
e.preventDefault();
|
|
15516
|
+
this.activeItem = this.items[idx].url || this.items[idx].text;
|
|
15517
|
+
this.dataBind();
|
|
15220
15518
|
}
|
|
15221
15519
|
if (e.target.classList.contains('e-breadcrumb-collapsed')) {
|
|
15222
15520
|
this.isExpanded = true;
|
|
15223
15521
|
this.reRenderItems();
|
|
15224
15522
|
}
|
|
15523
|
+
if (e.target.classList.contains(MENUCLASS)) {
|
|
15524
|
+
this.renderPopup();
|
|
15525
|
+
}
|
|
15526
|
+
}
|
|
15527
|
+
renderPopup() {
|
|
15528
|
+
const wrapper = this.createElement('div', { className: POPUPCLASS + ' ' + this.cssClass + (this.enableRtl ? ' e-rtl' : '') });
|
|
15529
|
+
document.body.appendChild(wrapper);
|
|
15530
|
+
this.popupObj = new Popup(wrapper, {
|
|
15531
|
+
content: this.popupUl,
|
|
15532
|
+
relateTo: this.element.querySelector(DOT + MENUCLASS),
|
|
15533
|
+
enableRtl: this.enableRtl,
|
|
15534
|
+
position: { X: 'left', Y: 'bottom' },
|
|
15535
|
+
collision: { X: 'fit', Y: 'flip' },
|
|
15536
|
+
open: () => {
|
|
15537
|
+
this.popupUl.focus();
|
|
15538
|
+
}
|
|
15539
|
+
});
|
|
15540
|
+
this.popupWireEvents();
|
|
15541
|
+
this.popupObj.show();
|
|
15542
|
+
}
|
|
15543
|
+
documentClickHandler(e) {
|
|
15544
|
+
if (this.overflowMode === 'Menu' && this.popupObj && this.popupObj.element.classList.contains('e-popup-open') && !closest(e.target, DOT + MENUCLASS)) {
|
|
15545
|
+
this.popupObj.hide();
|
|
15546
|
+
this.popupObj.destroy();
|
|
15547
|
+
detach(this.popupObj.element);
|
|
15548
|
+
}
|
|
15225
15549
|
}
|
|
15226
15550
|
resize() {
|
|
15227
15551
|
this._maxItems = this.maxItems;
|
|
@@ -15239,6 +15563,11 @@ let Breadcrumb = class Breadcrumb extends Component {
|
|
|
15239
15563
|
this.clickHandler(e);
|
|
15240
15564
|
}
|
|
15241
15565
|
}
|
|
15566
|
+
popupKeyDownHandler(e) {
|
|
15567
|
+
if (e.key === 'Escape') {
|
|
15568
|
+
this.documentClickHandler(e);
|
|
15569
|
+
}
|
|
15570
|
+
}
|
|
15242
15571
|
/**
|
|
15243
15572
|
* Called internally if any of the property value changed.
|
|
15244
15573
|
*
|
|
@@ -15250,26 +15579,37 @@ let Breadcrumb = class Breadcrumb extends Component {
|
|
|
15250
15579
|
onPropertyChanged(newProp, oldProp) {
|
|
15251
15580
|
for (const prop of Object.keys(newProp)) {
|
|
15252
15581
|
switch (prop) {
|
|
15253
|
-
case 'activeItem':
|
|
15254
15582
|
case 'items':
|
|
15255
15583
|
case 'enableActiveItemNavigation':
|
|
15256
15584
|
this.reRenderItems();
|
|
15257
15585
|
break;
|
|
15586
|
+
case 'activeItem':
|
|
15587
|
+
this._maxItems = this.maxItems;
|
|
15588
|
+
this.initPvtProps();
|
|
15589
|
+
this.reRenderItems();
|
|
15590
|
+
break;
|
|
15258
15591
|
case 'overflowMode':
|
|
15259
15592
|
case 'maxItems':
|
|
15593
|
+
this._maxItems = this.maxItems;
|
|
15260
15594
|
this.initPvtProps();
|
|
15261
15595
|
this.reRenderItems();
|
|
15596
|
+
if (oldProp.overflowMode === 'Wrap') {
|
|
15597
|
+
this.element.classList.remove(WRAPMODECLASS);
|
|
15598
|
+
}
|
|
15599
|
+
else if (newProp.overflowMode === 'Wrap') {
|
|
15600
|
+
this.element.classList.add(WRAPMODECLASS);
|
|
15601
|
+
}
|
|
15602
|
+
if (oldProp.overflowMode === 'Scroll') {
|
|
15603
|
+
this.element.classList.remove(SCROLLMODECLASS);
|
|
15604
|
+
}
|
|
15605
|
+
else if (newProp.overflowMode === 'Scroll') {
|
|
15606
|
+
this.element.classList.add(SCROLLMODECLASS);
|
|
15607
|
+
}
|
|
15262
15608
|
break;
|
|
15263
15609
|
case 'url':
|
|
15264
15610
|
this.initItems();
|
|
15265
15611
|
this.reRenderItems();
|
|
15266
15612
|
break;
|
|
15267
|
-
case 'width':
|
|
15268
|
-
this.setWidth();
|
|
15269
|
-
this._maxItems = this.maxItems;
|
|
15270
|
-
this.initPvtProps();
|
|
15271
|
-
this.reRenderItems();
|
|
15272
|
-
break;
|
|
15273
15613
|
case 'cssClass':
|
|
15274
15614
|
if (oldProp.cssClass) {
|
|
15275
15615
|
removeClass([this.element], oldProp.cssClass.split(' '));
|
|
@@ -15286,16 +15626,31 @@ let Breadcrumb = class Breadcrumb extends Component {
|
|
|
15286
15626
|
case 'enableRtl':
|
|
15287
15627
|
this.element.classList.toggle('e-rtl');
|
|
15288
15628
|
break;
|
|
15629
|
+
case 'disabled':
|
|
15630
|
+
this.element.classList.toggle(DISABLEDCLASS);
|
|
15631
|
+
this.element.setAttribute(ARIADISABLED, newProp.disabled + '');
|
|
15632
|
+
break;
|
|
15289
15633
|
}
|
|
15290
15634
|
}
|
|
15291
15635
|
}
|
|
15292
15636
|
wireEvents() {
|
|
15637
|
+
this.delegateClickHanlder = this.documentClickHandler.bind(this);
|
|
15638
|
+
EventHandler.add(document, 'click', this.delegateClickHanlder, this);
|
|
15293
15639
|
EventHandler.add(this.element, 'click', this.clickHandler, this);
|
|
15294
15640
|
window.addEventListener('resize', this.resize.bind(this));
|
|
15295
15641
|
}
|
|
15642
|
+
popupWireEvents() {
|
|
15643
|
+
EventHandler.add(this.popupObj.element, 'click', this.clickHandler, this);
|
|
15644
|
+
EventHandler.add(this.popupObj.element, 'keydown', this.popupKeyDownHandler, this);
|
|
15645
|
+
}
|
|
15296
15646
|
unWireEvents() {
|
|
15647
|
+
EventHandler.remove(document, 'click', this.delegateClickHanlder);
|
|
15297
15648
|
EventHandler.remove(this.element, 'click', this.clickHandler);
|
|
15298
15649
|
window.removeEventListener('resize', this.resize.bind(this));
|
|
15650
|
+
if (this.popupObj) {
|
|
15651
|
+
EventHandler.remove(this.popupObj.element, 'click', this.clickHandler);
|
|
15652
|
+
EventHandler.remove(this.popupObj.element, 'keydown', this.popupKeyDownHandler);
|
|
15653
|
+
}
|
|
15299
15654
|
}
|
|
15300
15655
|
/**
|
|
15301
15656
|
* Get the properties to be maintained in the persisted state.
|
|
@@ -15320,11 +15675,31 @@ let Breadcrumb = class Breadcrumb extends Component {
|
|
|
15320
15675
|
* @returns {void}
|
|
15321
15676
|
*/
|
|
15322
15677
|
destroy() {
|
|
15323
|
-
|
|
15324
|
-
|
|
15678
|
+
let classes = [];
|
|
15679
|
+
let attributes$$1 = ['aria-label'];
|
|
15325
15680
|
if (this.cssClass) {
|
|
15326
|
-
|
|
15681
|
+
classes.concat(this.cssClass.split(' '));
|
|
15682
|
+
}
|
|
15683
|
+
if (this.enableRtl) {
|
|
15684
|
+
classes.push('e-rtl');
|
|
15327
15685
|
}
|
|
15686
|
+
if (this.disabled) {
|
|
15687
|
+
classes.push(DISABLEDCLASS);
|
|
15688
|
+
attributes$$1.push(ARIADISABLED);
|
|
15689
|
+
}
|
|
15690
|
+
if (this.overflowMode === 'Wrap') {
|
|
15691
|
+
classes.push(WRAPMODECLASS);
|
|
15692
|
+
}
|
|
15693
|
+
else if (this.overflowMode === 'Scroll') {
|
|
15694
|
+
classes.push(SCROLLMODECLASS);
|
|
15695
|
+
}
|
|
15696
|
+
this.unWireEvents();
|
|
15697
|
+
this.element.innerHTML = '';
|
|
15698
|
+
removeClass([this.element], classes);
|
|
15699
|
+
attributes$$1.forEach((attribute) => {
|
|
15700
|
+
this.element.removeAttribute(attribute);
|
|
15701
|
+
});
|
|
15702
|
+
super.destroy();
|
|
15328
15703
|
}
|
|
15329
15704
|
};
|
|
15330
15705
|
__decorate$10([
|
|
@@ -15337,17 +15712,14 @@ __decorate$10([
|
|
|
15337
15712
|
Property('')
|
|
15338
15713
|
], Breadcrumb.prototype, "activeItem", void 0);
|
|
15339
15714
|
__decorate$10([
|
|
15340
|
-
Property(
|
|
15715
|
+
Property(-1)
|
|
15341
15716
|
], Breadcrumb.prototype, "maxItems", void 0);
|
|
15342
15717
|
__decorate$10([
|
|
15343
|
-
Property('
|
|
15718
|
+
Property('Menu')
|
|
15344
15719
|
], Breadcrumb.prototype, "overflowMode", void 0);
|
|
15345
15720
|
__decorate$10([
|
|
15346
15721
|
Property('')
|
|
15347
15722
|
], Breadcrumb.prototype, "cssClass", void 0);
|
|
15348
|
-
__decorate$10([
|
|
15349
|
-
Property('')
|
|
15350
|
-
], Breadcrumb.prototype, "width", void 0);
|
|
15351
15723
|
__decorate$10([
|
|
15352
15724
|
Property(null)
|
|
15353
15725
|
], Breadcrumb.prototype, "itemTemplate", void 0);
|
|
@@ -15360,6 +15732,9 @@ __decorate$10([
|
|
|
15360
15732
|
__decorate$10([
|
|
15361
15733
|
Property(false)
|
|
15362
15734
|
], Breadcrumb.prototype, "enableActiveItemNavigation", void 0);
|
|
15735
|
+
__decorate$10([
|
|
15736
|
+
Property(false)
|
|
15737
|
+
], Breadcrumb.prototype, "disabled", void 0);
|
|
15363
15738
|
__decorate$10([
|
|
15364
15739
|
Property('')
|
|
15365
15740
|
], Breadcrumb.prototype, "locale", void 0);
|