@syncfusion/ej2-navigations 19.3.56 → 19.4.41
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 +513 -144
- package/dist/es6/ej2-navigations.es2015.js.map +1 -1
- package/dist/es6/ej2-navigations.es5.js +520 -145
- 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/v-scroll.js +1 -1
- package/src/sidebar/sidebar.js +4 -4
- 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 +317 -84
- package/styles/bootstrap.css +316 -83
- package/styles/bootstrap4.css +317 -76
- package/styles/bootstrap5-dark.css +339 -75
- package/styles/bootstrap5.css +341 -77
- 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 +305 -41
- package/styles/fabric.css +308 -44
- 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 +317 -47
- package/styles/highcontrast.css +322 -52
- package/styles/material-dark.css +295 -32
- package/styles/material.css +296 -33
- package/styles/menu/_fluent-definition.scss +68 -0
- package/styles/menu/_layout.scss +1 -1
- package/styles/menu/_theme.scss +9 -0
- package/styles/menu/bootstrap-dark.css +1 -1
- package/styles/menu/bootstrap.css +1 -1
- package/styles/menu/bootstrap4.css +1 -1
- package/styles/menu/bootstrap5-dark.css +4 -4
- package/styles/menu/bootstrap5.css +5 -5
- package/styles/menu/icons/_fluent.scss +133 -0
- package/styles/menu/material-dark.css +1 -1
- package/styles/menu/material.css +1 -1
- package/styles/menu/tailwind-dark.css +1 -1
- package/styles/menu/tailwind.css +1 -1
- 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 +313 -50
- package/styles/tailwind.css +313 -50
- 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
|
}
|
|
@@ -3156,6 +3156,7 @@ var __decorate$3 = (undefined && undefined.__decorate) || function (decorators,
|
|
|
3156
3156
|
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
3157
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
3158
3158
|
};
|
|
3159
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
3159
3160
|
const CLS_VERTICAL = 'e-vertical';
|
|
3160
3161
|
const CLS_ITEMS = 'e-toolbar-items';
|
|
3161
3162
|
const CLS_ITEM = 'e-toolbar-item';
|
|
@@ -4131,9 +4132,15 @@ let Toolbar = class Toolbar extends Component {
|
|
|
4131
4132
|
}
|
|
4132
4133
|
tbarPopupHandler(isOpen) {
|
|
4133
4134
|
if (this.overflowMode === 'Extended') {
|
|
4134
|
-
|
|
4135
|
+
if (isOpen) {
|
|
4136
|
+
this.add(this.element, CLS_EXTENDEDPOPOPEN);
|
|
4137
|
+
}
|
|
4138
|
+
else {
|
|
4139
|
+
this.remove(this.element, CLS_EXTENDEDPOPOPEN);
|
|
4140
|
+
}
|
|
4135
4141
|
}
|
|
4136
4142
|
}
|
|
4143
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
4137
4144
|
popupOpen(e) {
|
|
4138
4145
|
const popObj = this.popObj;
|
|
4139
4146
|
if (!this.isVertical) {
|
|
@@ -4179,6 +4186,7 @@ let Toolbar = class Toolbar extends Component {
|
|
|
4179
4186
|
popObj.refreshPosition();
|
|
4180
4187
|
}
|
|
4181
4188
|
}
|
|
4189
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
4182
4190
|
popupClose(e) {
|
|
4183
4191
|
const element = this.element;
|
|
4184
4192
|
const popupNav = element.querySelector('.' + CLS_TBARNAV);
|
|
@@ -4535,10 +4543,20 @@ let Toolbar = class Toolbar extends Component {
|
|
|
4535
4543
|
const popWid = (this.isVertical ? popupNav.offsetHeight : popupNav.offsetWidth) + 'px';
|
|
4536
4544
|
innerItem[2].removeAttribute('style');
|
|
4537
4545
|
if (this.isVertical) {
|
|
4538
|
-
this.enableRtl
|
|
4546
|
+
if (this.enableRtl) {
|
|
4547
|
+
innerItem[2].style.top = popWid;
|
|
4548
|
+
}
|
|
4549
|
+
else {
|
|
4550
|
+
innerItem[2].style.bottom = popWid;
|
|
4551
|
+
}
|
|
4539
4552
|
}
|
|
4540
4553
|
else {
|
|
4541
|
-
this.enableRtl
|
|
4554
|
+
if (this.enableRtl) {
|
|
4555
|
+
innerItem[2].style.left = popWid;
|
|
4556
|
+
}
|
|
4557
|
+
else {
|
|
4558
|
+
innerItem[2].style.right = popWid;
|
|
4559
|
+
}
|
|
4542
4560
|
}
|
|
4543
4561
|
}
|
|
4544
4562
|
if (tbarWid <= margin) {
|
|
@@ -4548,10 +4566,20 @@ let Toolbar = class Toolbar extends Component {
|
|
|
4548
4566
|
innerItem[1].removeAttribute('style');
|
|
4549
4567
|
const mrgn = ((!this.isVertical ? innerItem[0].offsetWidth : innerItem[0].offsetHeight) + value) + 'px';
|
|
4550
4568
|
if (this.isVertical) {
|
|
4551
|
-
this.enableRtl
|
|
4569
|
+
if (this.enableRtl) {
|
|
4570
|
+
innerItem[1].style.marginBottom = mrgn;
|
|
4571
|
+
}
|
|
4572
|
+
else {
|
|
4573
|
+
innerItem[1].style.marginTop = mrgn;
|
|
4574
|
+
}
|
|
4552
4575
|
}
|
|
4553
4576
|
else {
|
|
4554
|
-
this.enableRtl
|
|
4577
|
+
if (this.enableRtl) {
|
|
4578
|
+
innerItem[1].style.marginRight = mrgn;
|
|
4579
|
+
}
|
|
4580
|
+
else {
|
|
4581
|
+
innerItem[1].style.marginLeft = mrgn;
|
|
4582
|
+
}
|
|
4555
4583
|
}
|
|
4556
4584
|
}
|
|
4557
4585
|
tbarItemAlign(item, itemEle, pos) {
|
|
@@ -4619,7 +4647,12 @@ let Toolbar = class Toolbar extends Component {
|
|
|
4619
4647
|
let keyVal;
|
|
4620
4648
|
for (let i = 0; i < key.length; i++) {
|
|
4621
4649
|
keyVal = key[i];
|
|
4622
|
-
keyVal === 'class'
|
|
4650
|
+
if (keyVal === 'class') {
|
|
4651
|
+
this.add(element, attr[keyVal]);
|
|
4652
|
+
}
|
|
4653
|
+
else {
|
|
4654
|
+
element.setAttribute(keyVal, attr[keyVal]);
|
|
4655
|
+
}
|
|
4623
4656
|
}
|
|
4624
4657
|
}
|
|
4625
4658
|
/**
|
|
@@ -4664,7 +4697,12 @@ let Toolbar = class Toolbar extends Component {
|
|
|
4664
4697
|
}
|
|
4665
4698
|
enable(isEnable, ele);
|
|
4666
4699
|
}
|
|
4667
|
-
|
|
4700
|
+
if (isEnable) {
|
|
4701
|
+
removeClass(elements, CLS_DISABLE$2);
|
|
4702
|
+
}
|
|
4703
|
+
else {
|
|
4704
|
+
addClass(elements, CLS_DISABLE$2);
|
|
4705
|
+
}
|
|
4668
4706
|
}
|
|
4669
4707
|
else {
|
|
4670
4708
|
if (typeof (elements) === 'number') {
|
|
@@ -4850,7 +4888,12 @@ let Toolbar = class Toolbar extends Component {
|
|
|
4850
4888
|
}
|
|
4851
4889
|
else if (itemType === 'Input') {
|
|
4852
4890
|
const ele = this.createElement('input');
|
|
4853
|
-
|
|
4891
|
+
if (item.id) {
|
|
4892
|
+
ele.id = item.id;
|
|
4893
|
+
}
|
|
4894
|
+
else {
|
|
4895
|
+
ele.id = getUniqueID('tbr-ipt');
|
|
4896
|
+
}
|
|
4854
4897
|
innerEle.appendChild(ele);
|
|
4855
4898
|
eleObj.appendTo(ele);
|
|
4856
4899
|
}
|
|
@@ -4863,7 +4906,12 @@ let Toolbar = class Toolbar extends Component {
|
|
|
4863
4906
|
const textStr = item.text;
|
|
4864
4907
|
let iconCss;
|
|
4865
4908
|
let iconPos;
|
|
4866
|
-
|
|
4909
|
+
if (item.id) {
|
|
4910
|
+
dom.id = item.id;
|
|
4911
|
+
}
|
|
4912
|
+
else {
|
|
4913
|
+
dom.id = getUniqueID('e-tbr-btn');
|
|
4914
|
+
}
|
|
4867
4915
|
const btnTxt = this.createElement('span', { className: 'e-tbar-btn-text' });
|
|
4868
4916
|
if (textStr) {
|
|
4869
4917
|
btnTxt.innerHTML = this.enableHtmlSanitizer ? SanitizeHtmlHelper.sanitize(textStr) : textStr;
|
|
@@ -5130,12 +5178,27 @@ let Toolbar = class Toolbar extends Component {
|
|
|
5130
5178
|
this.refreshOverflow();
|
|
5131
5179
|
break;
|
|
5132
5180
|
case 'enableRtl':
|
|
5133
|
-
newProp.enableRtl
|
|
5181
|
+
if (newProp.enableRtl) {
|
|
5182
|
+
this.add(tEle, CLS_RTL$2);
|
|
5183
|
+
}
|
|
5184
|
+
else {
|
|
5185
|
+
this.remove(tEle, CLS_RTL$2);
|
|
5186
|
+
}
|
|
5134
5187
|
if (!isNullOrUndefined(this.scrollModule)) {
|
|
5135
|
-
newProp.enableRtl
|
|
5188
|
+
if (newProp.enableRtl) {
|
|
5189
|
+
this.add(this.scrollModule.element, CLS_RTL$2);
|
|
5190
|
+
}
|
|
5191
|
+
else {
|
|
5192
|
+
this.remove(this.scrollModule.element, CLS_RTL$2);
|
|
5193
|
+
}
|
|
5136
5194
|
}
|
|
5137
5195
|
if (!isNullOrUndefined(this.popObj)) {
|
|
5138
|
-
newProp.enableRtl
|
|
5196
|
+
if (newProp.enableRtl) {
|
|
5197
|
+
this.add(this.popObj.element, CLS_RTL$2);
|
|
5198
|
+
}
|
|
5199
|
+
else {
|
|
5200
|
+
this.remove(this.popObj.element, CLS_RTL$2);
|
|
5201
|
+
}
|
|
5139
5202
|
}
|
|
5140
5203
|
if (this.tbarAlign) {
|
|
5141
5204
|
this.itemPositioning();
|
|
@@ -5189,7 +5252,12 @@ let Toolbar = class Toolbar extends Component {
|
|
|
5189
5252
|
ele = innerItems[eleIndex];
|
|
5190
5253
|
}
|
|
5191
5254
|
if (ele) {
|
|
5192
|
-
|
|
5255
|
+
if (value) {
|
|
5256
|
+
ele.classList.add(CLS_HIDDEN);
|
|
5257
|
+
}
|
|
5258
|
+
else {
|
|
5259
|
+
ele.classList.remove(CLS_HIDDEN);
|
|
5260
|
+
}
|
|
5193
5261
|
if (value && isNullOrUndefined(this.element.getAttribute('tabindex')) && !ele.classList.contains(CLS_SEPARATOR)) {
|
|
5194
5262
|
if (isNullOrUndefined(ele.firstElementChild.getAttribute('tabindex'))) {
|
|
5195
5263
|
ele.firstElementChild.setAttribute('tabindex', '-1');
|
|
@@ -5293,6 +5361,7 @@ var __decorate$4 = (undefined && undefined.__decorate) || function (decorators,
|
|
|
5293
5361
|
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
5362
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
5295
5363
|
};
|
|
5364
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
5296
5365
|
const CLS_ACRDN_ROOT = 'e-acrdn-root';
|
|
5297
5366
|
const CLS_ROOT$2 = 'e-accordion';
|
|
5298
5367
|
const CLS_ITEM$1 = 'e-acrdn-item';
|
|
@@ -5547,11 +5616,9 @@ let Accordion = class Accordion extends Component {
|
|
|
5547
5616
|
this.itemTemplateFn = this.templateParser(this.itemTemplate);
|
|
5548
5617
|
}
|
|
5549
5618
|
}
|
|
5550
|
-
/* eslint-disable */
|
|
5551
5619
|
getHeaderTemplate() {
|
|
5552
5620
|
return this.headerTemplateFn;
|
|
5553
5621
|
}
|
|
5554
|
-
/* eslint-disable */
|
|
5555
5622
|
getItemTemplate() {
|
|
5556
5623
|
return this.itemTemplateFn;
|
|
5557
5624
|
}
|
|
@@ -5572,7 +5639,6 @@ let Accordion = class Accordion extends Component {
|
|
|
5572
5639
|
innerEles = this.element.children;
|
|
5573
5640
|
}
|
|
5574
5641
|
const items = [];
|
|
5575
|
-
/* eslint-disable */
|
|
5576
5642
|
[].slice.call(innerEles).forEach((el) => {
|
|
5577
5643
|
items.push({
|
|
5578
5644
|
header: (el.childElementCount > 0 && el.children[0]) ? (el.children[0]) : '',
|
|
@@ -5580,7 +5646,6 @@ let Accordion = class Accordion extends Component {
|
|
|
5580
5646
|
});
|
|
5581
5647
|
el.parentNode.removeChild(el);
|
|
5582
5648
|
});
|
|
5583
|
-
/* eslint-enable */
|
|
5584
5649
|
if (rootEle) {
|
|
5585
5650
|
this.element.removeChild(rootEle);
|
|
5586
5651
|
}
|
|
@@ -5605,7 +5670,6 @@ let Accordion = class Accordion extends Component {
|
|
|
5605
5670
|
this.expandItem(true, this.initExpand[i]);
|
|
5606
5671
|
}
|
|
5607
5672
|
}
|
|
5608
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
5609
5673
|
if (this.isReact) {
|
|
5610
5674
|
this.renderReactTemplates();
|
|
5611
5675
|
}
|
|
@@ -5640,7 +5704,6 @@ let Accordion = class Accordion extends Component {
|
|
|
5640
5704
|
});
|
|
5641
5705
|
}
|
|
5642
5706
|
}
|
|
5643
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
5644
5707
|
if (this.isReact) {
|
|
5645
5708
|
this.renderReactTemplates();
|
|
5646
5709
|
}
|
|
@@ -5686,7 +5749,6 @@ let Accordion = class Accordion extends Component {
|
|
|
5686
5749
|
else {
|
|
5687
5750
|
this.afterContentRender(trgt, eventArgs, acrdnItem, acrdnHdr, acrdnCtn, acrdnCtnItem);
|
|
5688
5751
|
}
|
|
5689
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
5690
5752
|
if (this.isReact) {
|
|
5691
5753
|
this.renderReactTemplates();
|
|
5692
5754
|
}
|
|
@@ -5892,7 +5954,6 @@ let Accordion = class Accordion extends Component {
|
|
|
5892
5954
|
}
|
|
5893
5955
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
5894
5956
|
fetchElement(ele, value, index, isHeader) {
|
|
5895
|
-
/* eslint-disable */
|
|
5896
5957
|
let templateFn;
|
|
5897
5958
|
let temString;
|
|
5898
5959
|
try {
|
|
@@ -5906,12 +5967,10 @@ let Accordion = class Accordion extends Component {
|
|
|
5906
5967
|
catch (e) {
|
|
5907
5968
|
if (typeof (value) === 'string') {
|
|
5908
5969
|
ele.innerHTML = SanitizeHtmlHelper.sanitize(value);
|
|
5909
|
-
/* eslint-disable */
|
|
5910
5970
|
}
|
|
5911
5971
|
else if (!isNullOrUndefined(this.trgtEle) && (value instanceof (HTMLElement))) {
|
|
5912
5972
|
ele.appendChild(value);
|
|
5913
5973
|
ele.firstElementChild.style.display = '';
|
|
5914
|
-
/* eslint-enable */
|
|
5915
5974
|
}
|
|
5916
5975
|
else {
|
|
5917
5976
|
templateFn = compile(value);
|
|
@@ -5919,7 +5978,6 @@ let Accordion = class Accordion extends Component {
|
|
|
5919
5978
|
}
|
|
5920
5979
|
let tempArray;
|
|
5921
5980
|
if (!isNullOrUndefined(templateFn)) {
|
|
5922
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
5923
5981
|
if (this.isReact) {
|
|
5924
5982
|
this.renderReactTemplates();
|
|
5925
5983
|
}
|
|
@@ -5965,7 +6023,6 @@ let Accordion = class Accordion extends Component {
|
|
|
5965
6023
|
attributes(itemcnt, { 'aria-hidden': 'true' });
|
|
5966
6024
|
const ctn = this.createElement('div', { className: CLS_CTENT });
|
|
5967
6025
|
if (this.dataSource.length > 0) {
|
|
5968
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
5969
6026
|
if (this.isReact) {
|
|
5970
6027
|
this.renderReactTemplates();
|
|
5971
6028
|
}
|
|
@@ -6112,7 +6169,7 @@ let Accordion = class Accordion extends Component {
|
|
|
6112
6169
|
this.trigger('expanding', eventArgs, (expandArgs) => {
|
|
6113
6170
|
if (!expandArgs.cancel) {
|
|
6114
6171
|
this.expandedItemsPop(trgtItemEle);
|
|
6115
|
-
trgtItemEle.classList.
|
|
6172
|
+
trgtItemEle.classList.remove(CLS_EXPANDSTATE);
|
|
6116
6173
|
icon.classList.add(CLS_TOGANIMATE);
|
|
6117
6174
|
if ((animation.name === 'None')) {
|
|
6118
6175
|
this.collapseProgress('begin', icon, trgt, trgtItemEle, expandArgs);
|
|
@@ -6240,7 +6297,6 @@ let Accordion = class Accordion extends Component {
|
|
|
6240
6297
|
}
|
|
6241
6298
|
});
|
|
6242
6299
|
}
|
|
6243
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
6244
6300
|
if (this.isReact) {
|
|
6245
6301
|
this.renderReactTemplates();
|
|
6246
6302
|
}
|
|
@@ -6261,7 +6317,6 @@ let Accordion = class Accordion extends Component {
|
|
|
6261
6317
|
* @returns {void}.
|
|
6262
6318
|
*/
|
|
6263
6319
|
removeItem(index) {
|
|
6264
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
6265
6320
|
if (this.isReact) {
|
|
6266
6321
|
this.clearTemplate(['headerTemplate', 'itemTemplate'], index);
|
|
6267
6322
|
}
|
|
@@ -6408,14 +6463,12 @@ let Accordion = class Accordion extends Component {
|
|
|
6408
6463
|
this.collapse(ctn);
|
|
6409
6464
|
}
|
|
6410
6465
|
}
|
|
6411
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
6412
6466
|
if (this.isReact) {
|
|
6413
6467
|
this.renderReactTemplates();
|
|
6414
6468
|
}
|
|
6415
6469
|
}
|
|
6416
6470
|
destroyItems() {
|
|
6417
6471
|
this.restoreContent(null);
|
|
6418
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
6419
6472
|
if (this.isReact) {
|
|
6420
6473
|
this.clearTemplate();
|
|
6421
6474
|
}
|
|
@@ -6450,12 +6503,10 @@ let Accordion = class Accordion extends Component {
|
|
|
6450
6503
|
setTemplate(template, toElement, index) {
|
|
6451
6504
|
toElement.innerHTML = '';
|
|
6452
6505
|
this.templateCompile(toElement, template, index);
|
|
6453
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
6454
6506
|
if (this.isReact) {
|
|
6455
6507
|
this.renderReactTemplates();
|
|
6456
6508
|
}
|
|
6457
6509
|
}
|
|
6458
|
-
// eslint-disable-next-line
|
|
6459
6510
|
templateCompile(ele, cnt, index) {
|
|
6460
6511
|
const tempEle = this.createElement('div');
|
|
6461
6512
|
this.fetchElement(tempEle, cnt, index, false);
|
|
@@ -7067,6 +7118,7 @@ const CLS_VRIGHT = 'e-vertical-right';
|
|
|
7067
7118
|
const CLS_HBOTTOM = 'e-horizontal-bottom';
|
|
7068
7119
|
const CLS_FILL = 'e-fill-mode';
|
|
7069
7120
|
const TABITEMPREFIX = 'tabitem_';
|
|
7121
|
+
const CLS_REORDER_ACTIVE_ITEM = 'e-reorder-active-item';
|
|
7070
7122
|
/**
|
|
7071
7123
|
* Objects used for configuring the Tab selecting item action properties.
|
|
7072
7124
|
*/
|
|
@@ -7156,11 +7208,12 @@ let Tab = class Tab extends Component {
|
|
|
7156
7208
|
this.hide = {};
|
|
7157
7209
|
this.maxHeight = 0;
|
|
7158
7210
|
this.title = 'Close';
|
|
7211
|
+
this.isInteracted = false;
|
|
7159
7212
|
this.lastIndex = 0;
|
|
7160
7213
|
this.isAdd = false;
|
|
7161
7214
|
this.isIconAlone = false;
|
|
7162
7215
|
this.draggableItems = [];
|
|
7163
|
-
this.resizeContext = this.
|
|
7216
|
+
this.resizeContext = this.refreshActiveTabBorder.bind(this);
|
|
7164
7217
|
/**
|
|
7165
7218
|
* Contains the keyboard configuration of the Tab.
|
|
7166
7219
|
*/
|
|
@@ -7609,7 +7662,7 @@ let Tab = class Tab extends Component {
|
|
|
7609
7662
|
trg.classList.remove(CLS_CLOSE_SHOW);
|
|
7610
7663
|
}
|
|
7611
7664
|
this.tbObj.refreshOverflow();
|
|
7612
|
-
this.
|
|
7665
|
+
this.refreshActiveTabBorder();
|
|
7613
7666
|
}
|
|
7614
7667
|
prevCtnAnimation(prev, current) {
|
|
7615
7668
|
let animation;
|
|
@@ -7734,7 +7787,7 @@ let Tab = class Tab extends Component {
|
|
|
7734
7787
|
}
|
|
7735
7788
|
else {
|
|
7736
7789
|
if (!isNullOrUndefined(trgParent) && trgParent.classList.contains(CLS_ACTIVE$1) === false) {
|
|
7737
|
-
this.
|
|
7790
|
+
this.selectTab(trgIndex, null, true);
|
|
7738
7791
|
if (!isNullOrUndefined(this.popEle)) {
|
|
7739
7792
|
this.popObj.hide(this.hide);
|
|
7740
7793
|
}
|
|
@@ -8006,9 +8059,20 @@ let Tab = class Tab extends Component {
|
|
|
8006
8059
|
setActiveBorder() {
|
|
8007
8060
|
const trgHdrEle = this.getTabHeader();
|
|
8008
8061
|
const trg = select('.' + CLS_TB_ITEM + '.' + CLS_ACTIVE$1, trgHdrEle);
|
|
8009
|
-
if (trg
|
|
8062
|
+
if (isNullOrUndefined(trg)) {
|
|
8010
8063
|
return;
|
|
8011
8064
|
}
|
|
8065
|
+
if (!this.reorderActiveTab) {
|
|
8066
|
+
if (trg.classList.contains(CLS_TB_POPUP) && !this.bdrLine.classList.contains(CLS_HIDDEN$1)) {
|
|
8067
|
+
this.bdrLine.classList.add(CLS_HIDDEN$1);
|
|
8068
|
+
}
|
|
8069
|
+
if (trgHdrEle && !trgHdrEle.classList.contains(CLS_REORDER_ACTIVE_ITEM)) {
|
|
8070
|
+
trgHdrEle.classList.add(CLS_REORDER_ACTIVE_ITEM);
|
|
8071
|
+
}
|
|
8072
|
+
}
|
|
8073
|
+
else if (trgHdrEle) {
|
|
8074
|
+
trgHdrEle.classList.remove(CLS_REORDER_ACTIVE_ITEM);
|
|
8075
|
+
}
|
|
8012
8076
|
const root = closest(trg, '.' + CLS_TAB);
|
|
8013
8077
|
if (this.element !== root) {
|
|
8014
8078
|
return;
|
|
@@ -8042,11 +8106,11 @@ let Tab = class Tab extends Component {
|
|
|
8042
8106
|
setStyleAttribute(bar, { 'left': 'auto', 'right': 'auto' });
|
|
8043
8107
|
}
|
|
8044
8108
|
}
|
|
8045
|
-
if (!isNullOrUndefined(this.bdrLine)) {
|
|
8109
|
+
if (!isNullOrUndefined(this.bdrLine) && !trg.classList.contains(CLS_TB_POPUP)) {
|
|
8046
8110
|
this.bdrLine.classList.remove(CLS_HIDDEN$1);
|
|
8047
8111
|
}
|
|
8048
8112
|
}
|
|
8049
|
-
setActive(value, skipDataBind = false) {
|
|
8113
|
+
setActive(value, skipDataBind = false, isInteracted = false) {
|
|
8050
8114
|
this.tbItem = selectAll('.' + CLS_TB_ITEM, this.getTabHeader());
|
|
8051
8115
|
const trg = this.tbItem[value];
|
|
8052
8116
|
if (value < 0 || isNaN(value) || this.tbItem.length === 0) {
|
|
@@ -8117,7 +8181,8 @@ let Tab = class Tab extends Component {
|
|
|
8117
8181
|
selectedItem: trg,
|
|
8118
8182
|
selectedIndex: value,
|
|
8119
8183
|
selectedContent: select('#' + CLS_CONTENT$1 + this.tabId + '_' + this.selectingID, this.content),
|
|
8120
|
-
isSwiped: this.isSwipeed
|
|
8184
|
+
isSwiped: this.isSwipeed,
|
|
8185
|
+
isInteracted: isInteracted
|
|
8121
8186
|
};
|
|
8122
8187
|
this.trigger('selected', eventArg);
|
|
8123
8188
|
}
|
|
@@ -8208,7 +8273,7 @@ let Tab = class Tab extends Component {
|
|
|
8208
8273
|
else {
|
|
8209
8274
|
this.isPopup = false;
|
|
8210
8275
|
if (!isNullOrUndefined(trgParent) && (trgIndex !== this.selectedItem || trgIndex !== this.prevIndex)) {
|
|
8211
|
-
this.
|
|
8276
|
+
this.selectTab(trgIndex, args.originalEvent, true);
|
|
8212
8277
|
}
|
|
8213
8278
|
}
|
|
8214
8279
|
}
|
|
@@ -8223,7 +8288,7 @@ let Tab = class Tab extends Component {
|
|
|
8223
8288
|
if (e.swipeDirection === 'Right' && this.selectedItem !== 0) {
|
|
8224
8289
|
for (let k = this.selectedItem - 1; k >= 0; k--) {
|
|
8225
8290
|
if (!this.tbItem[k].classList.contains(CLS_HIDDEN$1)) {
|
|
8226
|
-
this.
|
|
8291
|
+
this.selectTab(k, null, true);
|
|
8227
8292
|
break;
|
|
8228
8293
|
}
|
|
8229
8294
|
}
|
|
@@ -8231,7 +8296,7 @@ let Tab = class Tab extends Component {
|
|
|
8231
8296
|
else if (e.swipeDirection === 'Left' && (this.selectedItem !== selectAll('.' + CLS_TB_ITEM, this.element).length - 1)) {
|
|
8232
8297
|
for (let i = this.selectedItem + 1; i < this.tbItem.length; i++) {
|
|
8233
8298
|
if (!this.tbItem[i].classList.contains(CLS_HIDDEN$1)) {
|
|
8234
|
-
this.
|
|
8299
|
+
this.selectTab(i, null, true);
|
|
8235
8300
|
break;
|
|
8236
8301
|
}
|
|
8237
8302
|
}
|
|
@@ -8307,9 +8372,15 @@ let Tab = class Tab extends Component {
|
|
|
8307
8372
|
break;
|
|
8308
8373
|
}
|
|
8309
8374
|
}
|
|
8310
|
-
|
|
8375
|
+
/**
|
|
8376
|
+
* Refresh the active tab border
|
|
8377
|
+
*
|
|
8378
|
+
* @returns {void}
|
|
8379
|
+
* @private
|
|
8380
|
+
*/
|
|
8381
|
+
refreshActiveTabBorder() {
|
|
8311
8382
|
const activeEle = select('.' + CLS_TB_ITEM + '.' + CLS_TB_POPUP + '.' + CLS_ACTIVE$1, this.element);
|
|
8312
|
-
if (!isNullOrUndefined(activeEle)) {
|
|
8383
|
+
if (!isNullOrUndefined(activeEle) && this.reorderActiveTab) {
|
|
8313
8384
|
this.select(this.getEleIndex(activeEle));
|
|
8314
8385
|
}
|
|
8315
8386
|
this.refreshActiveBorder();
|
|
@@ -8649,7 +8720,7 @@ let Tab = class Tab extends Component {
|
|
|
8649
8720
|
else {
|
|
8650
8721
|
this.dragItem.querySelector('.' + CLS_WRAP).style.visibility = '';
|
|
8651
8722
|
removeClass([this.tbItems.querySelector('.' + CLS_INDICATOR)], CLS_HIDDEN$1);
|
|
8652
|
-
this.
|
|
8723
|
+
this.selectTab(this.droppedIndex, null, true);
|
|
8653
8724
|
}
|
|
8654
8725
|
}
|
|
8655
8726
|
});
|
|
@@ -8657,8 +8728,8 @@ let Tab = class Tab extends Component {
|
|
|
8657
8728
|
/**
|
|
8658
8729
|
* Enables or disables the specified Tab item. On passing value as `false`, the item will be disabled.
|
|
8659
8730
|
*
|
|
8660
|
-
* @param
|
|
8661
|
-
* @param
|
|
8731
|
+
* @param {number} index - Index value of target Tab item.
|
|
8732
|
+
* @param {boolean} value - Boolean value that determines whether the command should be enabled or disabled.
|
|
8662
8733
|
* By default, isEnable is true.
|
|
8663
8734
|
* @returns {void}.
|
|
8664
8735
|
*/
|
|
@@ -8687,8 +8758,8 @@ let Tab = class Tab extends Component {
|
|
|
8687
8758
|
/**
|
|
8688
8759
|
* Adds new items to the Tab that accepts an array as Tab items.
|
|
8689
8760
|
*
|
|
8690
|
-
* @param
|
|
8691
|
-
* @param
|
|
8761
|
+
* @param {TabItemModel[]} items - An array of item that is added to the Tab.
|
|
8762
|
+
* @param {number} index - Number value that determines where the items to be added. By default, index is 0.
|
|
8692
8763
|
* @returns {void}.
|
|
8693
8764
|
*/
|
|
8694
8765
|
addTab(items, index) {
|
|
@@ -8771,7 +8842,7 @@ let Tab = class Tab extends Component {
|
|
|
8771
8842
|
/**
|
|
8772
8843
|
* Removes the items in the Tab from the specified index.
|
|
8773
8844
|
*
|
|
8774
|
-
* @param
|
|
8845
|
+
* @param {number} index - Index of target item that is going to be removed.
|
|
8775
8846
|
* @returns {void}.
|
|
8776
8847
|
*/
|
|
8777
8848
|
removeTab(index) {
|
|
@@ -8810,8 +8881,8 @@ let Tab = class Tab extends Component {
|
|
|
8810
8881
|
/**
|
|
8811
8882
|
* Shows or hides the Tab that is in the specified index.
|
|
8812
8883
|
*
|
|
8813
|
-
* @param
|
|
8814
|
-
* @param
|
|
8884
|
+
* @param {number} index - Index value of target item.
|
|
8885
|
+
* @param {boolean} value - Based on this Boolean value, item will be hide (false) or show (true). By default, value is true.
|
|
8815
8886
|
* @returns {void}.
|
|
8816
8887
|
*/
|
|
8817
8888
|
hideTab(index, value) {
|
|
@@ -8871,12 +8942,16 @@ let Tab = class Tab extends Component {
|
|
|
8871
8942
|
this.tbObj.refreshOverflow();
|
|
8872
8943
|
}
|
|
8873
8944
|
}
|
|
8945
|
+
selectTab(args, event = null, isInteracted = false) {
|
|
8946
|
+
this.isInteracted = isInteracted;
|
|
8947
|
+
this.select(args, event);
|
|
8948
|
+
}
|
|
8874
8949
|
/**
|
|
8875
8950
|
* Specifies the index or HTMLElement to select an item from the Tab.
|
|
8876
8951
|
*
|
|
8877
|
-
* @param
|
|
8952
|
+
* @param {number | HTMLElement} args - Index or DOM element is used for selecting an item from the Tab.
|
|
8878
8953
|
* @param {Event} event - An event which takes place in DOM.
|
|
8879
|
-
* @returns {void}
|
|
8954
|
+
* @returns {void}
|
|
8880
8955
|
*/
|
|
8881
8956
|
select(args, event) {
|
|
8882
8957
|
const tabHeader = this.getTabHeader();
|
|
@@ -8913,20 +8988,22 @@ let Tab = class Tab extends Component {
|
|
|
8913
8988
|
selectingContent: !isNullOrUndefined(this.content) ?
|
|
8914
8989
|
select('#' + CLS_CONTENT$1 + this.tabId + '_' + this.selectingID, this.content) : null,
|
|
8915
8990
|
isSwiped: this.isSwipeed,
|
|
8991
|
+
isInteracted: this.isInteracted,
|
|
8916
8992
|
cancel: false
|
|
8917
8993
|
};
|
|
8918
8994
|
if (!this.initRender) {
|
|
8919
8995
|
this.trigger('selecting', eventArg, (selectArgs) => {
|
|
8920
8996
|
if (!selectArgs.cancel) {
|
|
8921
|
-
this.selectingContent(args);
|
|
8997
|
+
this.selectingContent(args, this.isInteracted);
|
|
8922
8998
|
}
|
|
8923
8999
|
});
|
|
8924
9000
|
}
|
|
8925
9001
|
else {
|
|
8926
|
-
this.selectingContent(args);
|
|
9002
|
+
this.selectingContent(args, this.isInteracted);
|
|
8927
9003
|
}
|
|
9004
|
+
this.isInteracted = false;
|
|
8928
9005
|
}
|
|
8929
|
-
selectingContent(args) {
|
|
9006
|
+
selectingContent(args, isInteracted) {
|
|
8930
9007
|
if (typeof args === 'number') {
|
|
8931
9008
|
if (!isNullOrUndefined(this.tbItem[args]) && (this.tbItem[args].classList.contains(CLS_DISABLE$4) ||
|
|
8932
9009
|
this.tbItem[args].classList.contains(CLS_HIDDEN$1))) {
|
|
@@ -8942,8 +9019,8 @@ let Tab = class Tab extends Component {
|
|
|
8942
9019
|
}
|
|
8943
9020
|
if (this.tbItem.length > args && args >= 0 && !isNaN(args)) {
|
|
8944
9021
|
this.prevIndex = this.selectedItem;
|
|
8945
|
-
if (this.tbItem[args].classList.contains(CLS_TB_POPUP)) {
|
|
8946
|
-
this.setActive(this.popupHandler(this.tbItem[args]));
|
|
9022
|
+
if (this.tbItem[args].classList.contains(CLS_TB_POPUP) && this.reorderActiveTab) {
|
|
9023
|
+
this.setActive(this.popupHandler(this.tbItem[args]), null, isInteracted);
|
|
8947
9024
|
if ((!isNullOrUndefined(this.items) && this.items.length > 0) && this.allowDragAndDrop) {
|
|
8948
9025
|
this.tbItem = selectAll('.' + CLS_TB_ITEMS + ' .' + CLS_TB_ITEM, this.hdrEle);
|
|
8949
9026
|
let item = this.items[args];
|
|
@@ -8952,15 +9029,15 @@ let Tab = class Tab extends Component {
|
|
|
8952
9029
|
}
|
|
8953
9030
|
}
|
|
8954
9031
|
else {
|
|
8955
|
-
this.setActive(args);
|
|
9032
|
+
this.setActive(args, null, isInteracted);
|
|
8956
9033
|
}
|
|
8957
9034
|
}
|
|
8958
9035
|
else {
|
|
8959
|
-
this.setActive(0);
|
|
9036
|
+
this.setActive(0, null, isInteracted);
|
|
8960
9037
|
}
|
|
8961
9038
|
}
|
|
8962
9039
|
else if (args instanceof (HTMLElement)) {
|
|
8963
|
-
this.setActive(this.getEleIndex(args));
|
|
9040
|
+
this.setActive(this.getEleIndex(args), null, isInteracted);
|
|
8964
9041
|
}
|
|
8965
9042
|
}
|
|
8966
9043
|
/**
|
|
@@ -9041,6 +9118,9 @@ let Tab = class Tab extends Component {
|
|
|
9041
9118
|
case 'showCloseButton':
|
|
9042
9119
|
this.setCloseButton(newProp.showCloseButton);
|
|
9043
9120
|
break;
|
|
9121
|
+
case 'reorderActiveTab':
|
|
9122
|
+
this.refreshActiveTabBorder();
|
|
9123
|
+
break;
|
|
9044
9124
|
case 'selectedItem':
|
|
9045
9125
|
this.selectedItem = oldProp.selectedItem;
|
|
9046
9126
|
this.select(newProp.selectedItem);
|
|
@@ -9054,7 +9134,7 @@ let Tab = class Tab extends Component {
|
|
|
9054
9134
|
case 'overflowMode':
|
|
9055
9135
|
this.tbObj.overflowMode = newProp.overflowMode;
|
|
9056
9136
|
this.tbObj.dataBind();
|
|
9057
|
-
this.
|
|
9137
|
+
this.refreshActiveTabBorder();
|
|
9058
9138
|
break;
|
|
9059
9139
|
case 'heightAdjustMode':
|
|
9060
9140
|
this.setContentHeight(false);
|
|
@@ -9234,6 +9314,9 @@ __decorate$7([
|
|
|
9234
9314
|
__decorate$7([
|
|
9235
9315
|
Property(false)
|
|
9236
9316
|
], Tab.prototype, "showCloseButton", void 0);
|
|
9317
|
+
__decorate$7([
|
|
9318
|
+
Property(true)
|
|
9319
|
+
], Tab.prototype, "reorderActiveTab", void 0);
|
|
9237
9320
|
__decorate$7([
|
|
9238
9321
|
Property()
|
|
9239
9322
|
], Tab.prototype, "scrollStep", void 0);
|
|
@@ -9300,6 +9383,8 @@ const COLLAPSIBLE = 'e-icon-collapsible';
|
|
|
9300
9383
|
const EXPANDABLE = 'e-icon-expandable';
|
|
9301
9384
|
const LISTITEM = 'e-list-item';
|
|
9302
9385
|
const LISTTEXT = 'e-list-text';
|
|
9386
|
+
const LISTWRAP = 'e-text-wrap';
|
|
9387
|
+
const IELISTWRAP = 'e-ie-wrap';
|
|
9303
9388
|
const PARENTITEM = 'e-list-parent';
|
|
9304
9389
|
const HOVER = 'e-hover';
|
|
9305
9390
|
const ACTIVE = 'e-active';
|
|
@@ -9452,6 +9537,7 @@ let TreeView = TreeView_1 = class TreeView extends Component {
|
|
|
9452
9537
|
this.isFieldChange = false;
|
|
9453
9538
|
this.changeDataSource = false;
|
|
9454
9539
|
this.hasTemplate = false;
|
|
9540
|
+
this.isFirstRender = false;
|
|
9455
9541
|
this.mouseDownStatus = false;
|
|
9456
9542
|
}
|
|
9457
9543
|
/**
|
|
@@ -9574,6 +9660,7 @@ let TreeView = TreeView_1 = class TreeView extends Component {
|
|
|
9574
9660
|
this.setCssClass(null, this.cssClass);
|
|
9575
9661
|
this.setEnableRtl();
|
|
9576
9662
|
this.setFullRow(this.fullRowSelect);
|
|
9663
|
+
this.setTextWrap();
|
|
9577
9664
|
this.nodeTemplateFn = this.templateComplier(this.nodeTemplate);
|
|
9578
9665
|
}
|
|
9579
9666
|
setDisabledMode() {
|
|
@@ -10558,11 +10645,36 @@ let TreeView = TreeView_1 = class TreeView extends Component {
|
|
|
10558
10645
|
addClass([firstNode], FOCUS);
|
|
10559
10646
|
this.updateIdAttr(null, firstNode);
|
|
10560
10647
|
}
|
|
10648
|
+
if (this.allowTextWrap) {
|
|
10649
|
+
this.updateWrap();
|
|
10650
|
+
}
|
|
10561
10651
|
this.renderReactTemplates();
|
|
10562
10652
|
this.hasPid = this.rootData[0] ? this.rootData[0].hasOwnProperty(this.fields.parentID) : false;
|
|
10563
10653
|
this.doExpandAction();
|
|
10564
10654
|
}
|
|
10565
10655
|
}
|
|
10656
|
+
setTextWrap() {
|
|
10657
|
+
(this.allowTextWrap ? addClass : removeClass)([this.element], LISTWRAP);
|
|
10658
|
+
if (Browser.isIE) {
|
|
10659
|
+
(this.allowTextWrap ? addClass : removeClass)([this.element], IELISTWRAP);
|
|
10660
|
+
}
|
|
10661
|
+
}
|
|
10662
|
+
updateWrap(ulEle) {
|
|
10663
|
+
if (!this.fullRowSelect) {
|
|
10664
|
+
return;
|
|
10665
|
+
}
|
|
10666
|
+
const liEle = ulEle ? selectAll('.' + LISTITEM, ulEle) : this.liList;
|
|
10667
|
+
const length = liEle.length;
|
|
10668
|
+
for (let i = 0; i < length; i++) {
|
|
10669
|
+
this.calculateWrap(liEle[i]);
|
|
10670
|
+
}
|
|
10671
|
+
}
|
|
10672
|
+
calculateWrap(liEle) {
|
|
10673
|
+
const element = select('.' + FULLROW, liEle);
|
|
10674
|
+
if (element && element.nextElementSibling) {
|
|
10675
|
+
element.style.height = this.allowTextWrap ? element.nextElementSibling.offsetHeight + 'px' : '';
|
|
10676
|
+
}
|
|
10677
|
+
}
|
|
10566
10678
|
doExpandAction() {
|
|
10567
10679
|
let eUids = this.expandedNodes;
|
|
10568
10680
|
if (this.isInitalExpand && eUids.length > 0) {
|
|
@@ -10798,6 +10910,10 @@ let TreeView = TreeView_1 = class TreeView extends Component {
|
|
|
10798
10910
|
currLi.style.height = '';
|
|
10799
10911
|
removeClass([icon], PROCESS);
|
|
10800
10912
|
this.addExpand(currLi);
|
|
10913
|
+
if (this.allowTextWrap && this.isLoaded && this.isFirstRender) {
|
|
10914
|
+
this.updateWrap(currLi);
|
|
10915
|
+
this.isFirstRender = false;
|
|
10916
|
+
}
|
|
10801
10917
|
if (this.isLoaded && this.expandArgs && !this.isRefreshed) {
|
|
10802
10918
|
this.expandArgs = this.getExpandEvent(currLi, null);
|
|
10803
10919
|
this.trigger('nodeExpanded', this.expandArgs);
|
|
@@ -11298,6 +11414,7 @@ let TreeView = TreeView_1 = class TreeView extends Component {
|
|
|
11298
11414
|
this.expandNode(currLi, icon);
|
|
11299
11415
|
}
|
|
11300
11416
|
else {
|
|
11417
|
+
this.isFirstRender = true;
|
|
11301
11418
|
this.renderChildNodes(currLi, expandChild, callback);
|
|
11302
11419
|
let liEles = selectAll('.' + LISTITEM, currLi);
|
|
11303
11420
|
for (let i = 0; i < liEles.length; i++) {
|
|
@@ -11990,6 +12107,9 @@ let TreeView = TreeView_1 = class TreeView extends Component {
|
|
|
11990
12107
|
removeClass([liEle], EDITING);
|
|
11991
12108
|
txtEle.focus();
|
|
11992
12109
|
}
|
|
12110
|
+
if (this.allowTextWrap) {
|
|
12111
|
+
this.calculateWrap(liEle);
|
|
12112
|
+
}
|
|
11993
12113
|
}
|
|
11994
12114
|
getElement(ele) {
|
|
11995
12115
|
if (isNullOrUndefined(ele)) {
|
|
@@ -13576,6 +13696,10 @@ let TreeView = TreeView_1 = class TreeView extends Component {
|
|
|
13576
13696
|
this.setMultiSelect(this.allowMultiSelection);
|
|
13577
13697
|
this.addMultiSelect(this.allowMultiSelection);
|
|
13578
13698
|
break;
|
|
13699
|
+
case 'allowTextWrap':
|
|
13700
|
+
this.setTextWrap();
|
|
13701
|
+
this.updateWrap();
|
|
13702
|
+
break;
|
|
13579
13703
|
case 'checkedNodes':
|
|
13580
13704
|
if (this.showCheckBox) {
|
|
13581
13705
|
this.checkedNodes = oldProp.checkedNodes;
|
|
@@ -13627,6 +13751,10 @@ let TreeView = TreeView_1 = class TreeView extends Component {
|
|
|
13627
13751
|
case 'fullRowSelect':
|
|
13628
13752
|
this.setFullRow(this.fullRowSelect);
|
|
13629
13753
|
this.addFullRow(this.fullRowSelect);
|
|
13754
|
+
if (this.allowTextWrap) {
|
|
13755
|
+
this.setTextWrap();
|
|
13756
|
+
this.updateWrap();
|
|
13757
|
+
}
|
|
13630
13758
|
break;
|
|
13631
13759
|
case 'loadOnDemand':
|
|
13632
13760
|
if (this.loadOnDemand === false && !this.onLoaded) {
|
|
@@ -14065,6 +14193,9 @@ __decorate$8([
|
|
|
14065
14193
|
__decorate$8([
|
|
14066
14194
|
Property(false)
|
|
14067
14195
|
], TreeView.prototype, "allowMultiSelection", void 0);
|
|
14196
|
+
__decorate$8([
|
|
14197
|
+
Property(false)
|
|
14198
|
+
], TreeView.prototype, "allowTextWrap", void 0);
|
|
14068
14199
|
__decorate$8([
|
|
14069
14200
|
Complex({}, NodeAnimationSettings)
|
|
14070
14201
|
], TreeView.prototype, "animation", void 0);
|
|
@@ -14432,7 +14563,7 @@ let Sidebar = class Sidebar extends Component {
|
|
|
14432
14563
|
setTimeOut() {
|
|
14433
14564
|
const sibling = document.querySelector('.e-main-content') || this.targetEle;
|
|
14434
14565
|
const elementWidth = this.element.getBoundingClientRect().width;
|
|
14435
|
-
if (this.element.classList.contains(OPEN) && sibling) {
|
|
14566
|
+
if (this.element.classList.contains(OPEN) && sibling && !(this.type === 'Over' && this.enableDock)) {
|
|
14436
14567
|
if (this.position === 'Left') {
|
|
14437
14568
|
sibling.style.marginLeft = this.setDimension(this.width === 'auto' ? elementWidth : this.width);
|
|
14438
14569
|
}
|
|
@@ -14739,7 +14870,7 @@ let Sidebar = class Sidebar extends Component {
|
|
|
14739
14870
|
const sibling = document.querySelector('.e-main-content') || this.targetEle;
|
|
14740
14871
|
if (sibling) {
|
|
14741
14872
|
sibling.style.transform = 'translateX(' + 0 + 'px)';
|
|
14742
|
-
if (!Browser.isDevice && this.type !== 'Auto') {
|
|
14873
|
+
if (!Browser.isDevice && this.type !== 'Auto' && !(this.type === 'Over' && this.enableDock)) {
|
|
14743
14874
|
sibling.style[this.position === 'Left' ? 'marginLeft' : 'marginRight'] = '0px';
|
|
14744
14875
|
}
|
|
14745
14876
|
}
|
|
@@ -14761,9 +14892,9 @@ let Sidebar = class Sidebar extends Component {
|
|
|
14761
14892
|
break;
|
|
14762
14893
|
case 'Over':
|
|
14763
14894
|
addClass([this.element], [OVER]);
|
|
14764
|
-
if (this.enableDock && this.element.classList.contains(CLOSE)) {
|
|
14895
|
+
if (this.enableDock && (this.element.classList.contains(CLOSE) || this.isOpen)) {
|
|
14765
14896
|
if (sibling) {
|
|
14766
|
-
sibling.style[this.position === 'Left' ? 'marginLeft' : 'marginRight'] =
|
|
14897
|
+
sibling.style[this.position === 'Left' ? 'marginLeft' : 'marginRight'] = this.setDimension(this.dockSize);
|
|
14767
14898
|
}
|
|
14768
14899
|
}
|
|
14769
14900
|
break;
|
|
@@ -14904,6 +15035,15 @@ var __decorate$10 = (undefined && undefined.__decorate) || function (decorators,
|
|
|
14904
15035
|
const ICONRIGHT = 'e-icon-right';
|
|
14905
15036
|
const ITEMTEXTCLASS = 'e-breadcrumb-text';
|
|
14906
15037
|
const ICONCLASS = 'e-breadcrumb-icon';
|
|
15038
|
+
const MENUCLASS = 'e-breadcrumb-menu';
|
|
15039
|
+
const ITEMCLASS = 'e-breadcrumb-item';
|
|
15040
|
+
const POPUPCLASS = 'e-breadcrumb-popup';
|
|
15041
|
+
const WRAPMODECLASS = 'e-breadcrumb-wrap-mode';
|
|
15042
|
+
const SCROLLMODECLASS = 'e-breadcrumb-scroll-mode';
|
|
15043
|
+
const TABINDEX = 'tabindex';
|
|
15044
|
+
const DISABLEDCLASS = 'e-disabled';
|
|
15045
|
+
const ARIADISABLED = 'aria-disabled';
|
|
15046
|
+
const DOT = '.';
|
|
14907
15047
|
class BreadcrumbItem extends ChildProperty {
|
|
14908
15048
|
}
|
|
14909
15049
|
__decorate$10([
|
|
@@ -14915,6 +15055,9 @@ __decorate$10([
|
|
|
14915
15055
|
__decorate$10([
|
|
14916
15056
|
Property(null)
|
|
14917
15057
|
], BreadcrumbItem.prototype, "iconCss", void 0);
|
|
15058
|
+
__decorate$10([
|
|
15059
|
+
Property(false)
|
|
15060
|
+
], BreadcrumbItem.prototype, "disabled", void 0);
|
|
14918
15061
|
/**
|
|
14919
15062
|
* Breadcrumb is a graphical user interface that helps to identify or highlight the current location within a hierarchical structure of websites.
|
|
14920
15063
|
* The aim is to make the user aware of their current position in a hierarchy of website links.
|
|
@@ -14966,20 +15109,48 @@ let Breadcrumb = class Breadcrumb extends Component {
|
|
|
14966
15109
|
if (this.enableRtl) {
|
|
14967
15110
|
this.element.classList.add('e-rtl');
|
|
14968
15111
|
}
|
|
14969
|
-
this.
|
|
15112
|
+
if (this.disabled) {
|
|
15113
|
+
this.element.classList.add(DISABLEDCLASS);
|
|
15114
|
+
this.element.setAttribute(ARIADISABLED, 'true');
|
|
15115
|
+
}
|
|
15116
|
+
if (this.overflowMode === 'Wrap') {
|
|
15117
|
+
this.element.classList.add(WRAPMODECLASS);
|
|
15118
|
+
}
|
|
15119
|
+
else if (this.overflowMode === 'Scroll') {
|
|
15120
|
+
this.element.classList.add(SCROLLMODECLASS);
|
|
15121
|
+
}
|
|
14970
15122
|
this.initItems();
|
|
14971
15123
|
this.initPvtProps();
|
|
14972
15124
|
}
|
|
14973
15125
|
initPvtProps() {
|
|
14974
|
-
if (this.overflowMode === '
|
|
14975
|
-
this.
|
|
14976
|
-
this.
|
|
15126
|
+
if (this.overflowMode === 'Hidden' && this._maxItems > 0) {
|
|
15127
|
+
this.endIndex = this.getEndIndex();
|
|
15128
|
+
this.startIndex = this.endIndex + 1 - (this._maxItems - 1);
|
|
15129
|
+
}
|
|
15130
|
+
if (this.overflowMode === 'Menu') {
|
|
15131
|
+
if (this._maxItems >= 0) {
|
|
15132
|
+
this.startIndex = this._maxItems > 1 ? 1 : 0;
|
|
15133
|
+
this.endIndex = this.getEndIndex();
|
|
15134
|
+
this.popupUl = this.createElement('ul', { attrs: { TABINDEX: '0', 'role': 'menu' } });
|
|
15135
|
+
}
|
|
15136
|
+
else {
|
|
15137
|
+
this.startIndex = this.endIndex = null;
|
|
15138
|
+
}
|
|
14977
15139
|
}
|
|
14978
15140
|
}
|
|
14979
|
-
|
|
14980
|
-
|
|
14981
|
-
|
|
15141
|
+
getEndIndex() {
|
|
15142
|
+
let endIndex;
|
|
15143
|
+
if (this.activeItem) {
|
|
15144
|
+
this.items.forEach((item, idx) => {
|
|
15145
|
+
if (item.url === this.activeItem || item.text === this.activeItem) {
|
|
15146
|
+
endIndex = idx;
|
|
15147
|
+
}
|
|
15148
|
+
});
|
|
15149
|
+
}
|
|
15150
|
+
else {
|
|
15151
|
+
endIndex = this.items.length - 1;
|
|
14982
15152
|
}
|
|
15153
|
+
return endIndex;
|
|
14983
15154
|
}
|
|
14984
15155
|
initItems() {
|
|
14985
15156
|
if (!this.items.length) {
|
|
@@ -14987,7 +15158,7 @@ let Breadcrumb = class Breadcrumb extends Component {
|
|
|
14987
15158
|
let uri;
|
|
14988
15159
|
const items = [];
|
|
14989
15160
|
if (this.url) {
|
|
14990
|
-
const url = new URL(this.url);
|
|
15161
|
+
const url = new URL(this.url, window.location.origin);
|
|
14991
15162
|
baseUri = url.origin + '/';
|
|
14992
15163
|
uri = url.href.split(baseUri)[1].split('/');
|
|
14993
15164
|
}
|
|
@@ -15013,13 +15184,19 @@ let Breadcrumb = class Breadcrumb extends Component {
|
|
|
15013
15184
|
if (itemsLength) {
|
|
15014
15185
|
let isActiveItem;
|
|
15015
15186
|
let isLastItem;
|
|
15187
|
+
let isLastItemInPopup;
|
|
15016
15188
|
let j = 0;
|
|
15189
|
+
let wrapDiv;
|
|
15017
15190
|
const len = (itemsLength * 2) - 1;
|
|
15018
|
-
|
|
15191
|
+
let isItemCancelled = false;
|
|
15192
|
+
const ol = this.createElement('ol', { className: this.overflowMode === 'Wrap' ? 'e-breadcrumb-wrapped-ol' : '' });
|
|
15193
|
+
const firstOl = this.createElement('ol', { className: this.overflowMode === 'Wrap' ? 'e-breadcrumb-first-ol' : '' });
|
|
15019
15194
|
const showIcon = this.hasField(items, 'iconCss');
|
|
15020
|
-
const
|
|
15021
|
-
const
|
|
15022
|
-
|
|
15195
|
+
const isCollasped = (this.overflowMode === 'Collapsed' && this._maxItems > 0 && itemsLength > this._maxItems && !this.isExpanded);
|
|
15196
|
+
const isDefaultOverflowMode = (this.overflowMode === 'Hidden' && this._maxItems > 0);
|
|
15197
|
+
if (this.overflowMode === 'Menu' && this.popupUl) {
|
|
15198
|
+
this.popupUl.innerHTML = '';
|
|
15199
|
+
}
|
|
15023
15200
|
const listBaseOptions = {
|
|
15024
15201
|
moduleName: this.getModuleName(),
|
|
15025
15202
|
showIcon: showIcon,
|
|
@@ -15028,7 +15205,9 @@ let Breadcrumb = class Breadcrumb extends Component {
|
|
|
15028
15205
|
const isLastItem = args.curData.isLastItem;
|
|
15029
15206
|
if (isLastItem && args.item.children.length && !this.itemTemplate) {
|
|
15030
15207
|
delete args.curData.isLastItem;
|
|
15031
|
-
|
|
15208
|
+
if (!isLastItemInPopup && !this.enableActiveItemNavigation) {
|
|
15209
|
+
args.item.innerHTML = this.createElement('span', { className: ITEMTEXTCLASS, innerHTML: args.item.children[0].innerHTML }).outerHTML;
|
|
15210
|
+
}
|
|
15032
15211
|
}
|
|
15033
15212
|
if (args.curData.iconCss && !args.curData.text && !this.itemTemplate) {
|
|
15034
15213
|
args.item.classList.add('e-icon-item');
|
|
@@ -15036,41 +15215,40 @@ let Breadcrumb = class Breadcrumb extends Component {
|
|
|
15036
15215
|
if (isDefaultOverflowMode) {
|
|
15037
15216
|
args.item.setAttribute('item-index', j.toString());
|
|
15038
15217
|
}
|
|
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
15218
|
const eventArgs = {
|
|
15048
15219
|
item: extend({}, args.curData.properties ?
|
|
15049
|
-
args.curData.properties : args.curData), element: args.item
|
|
15220
|
+
args.curData.properties : args.curData), element: args.item, cancel: false
|
|
15050
15221
|
};
|
|
15051
15222
|
this.trigger('beforeItemRender', eventArgs);
|
|
15052
|
-
|
|
15223
|
+
isItemCancelled = eventArgs.cancel;
|
|
15053
15224
|
const containsRightIcon = (isIconRight || eventArgs.element.classList.contains(ICONRIGHT));
|
|
15054
15225
|
if (containsRightIcon && args.curData.iconCss && !this.itemTemplate) {
|
|
15055
|
-
args.item.querySelector('.e-anchor-wrap').
|
|
15226
|
+
args.item.querySelector('.e-anchor-wrap').appendChild(args.item.querySelector(DOT + ICONCLASS));
|
|
15227
|
+
}
|
|
15228
|
+
if (eventArgs.item.disabled) {
|
|
15229
|
+
args.item.setAttribute(ARIADISABLED, 'true');
|
|
15230
|
+
args.item.classList.add(DISABLEDCLASS);
|
|
15056
15231
|
}
|
|
15057
|
-
if (
|
|
15058
|
-
args.item.setAttribute(
|
|
15232
|
+
if ((eventArgs.item.disabled || this.disabled) && args.item.children.length && !this.itemTemplate) {
|
|
15233
|
+
args.item.children[0].setAttribute(TABINDEX, '-1');
|
|
15059
15234
|
}
|
|
15060
15235
|
if (args.curData.isEmptyUrl) {
|
|
15061
15236
|
args.item.children[0].removeAttribute('href');
|
|
15062
|
-
if ((!isLastItem || (isLastItem && this.enableActiveItemNavigation)) && !
|
|
15063
|
-
args.item.children[0].setAttribute(
|
|
15237
|
+
if ((!isLastItem || (isLastItem && this.enableActiveItemNavigation)) && !(eventArgs.item.disabled || this.disabled)) {
|
|
15238
|
+
args.item.children[0].setAttribute(TABINDEX, '0');
|
|
15064
15239
|
EventHandler.add(args.item.children[0], 'keydown', this.keyDownHandler, this);
|
|
15065
15240
|
}
|
|
15066
15241
|
}
|
|
15242
|
+
if (isLastItem) {
|
|
15243
|
+
args.item.setAttribute('data-active-item', '');
|
|
15244
|
+
}
|
|
15067
15245
|
if (!this.itemTemplate) {
|
|
15068
15246
|
this.beforeItemRenderChanges(args.curData, eventArgs.item, args.item, containsRightIcon);
|
|
15069
15247
|
}
|
|
15070
15248
|
}
|
|
15071
15249
|
};
|
|
15072
15250
|
for (let i = 0; i < len; i % 2 && j++, i++) {
|
|
15073
|
-
isActiveItem = (this.activeItem && this.activeItem === items[j].url);
|
|
15251
|
+
isActiveItem = (this.activeItem && (this.activeItem === items[j].url || this.activeItem === items[j].text));
|
|
15074
15252
|
if (isCollasped && i > 1 && i < len - 2) {
|
|
15075
15253
|
continue;
|
|
15076
15254
|
}
|
|
@@ -15080,10 +15258,11 @@ let Breadcrumb = class Breadcrumb extends Component {
|
|
|
15080
15258
|
}
|
|
15081
15259
|
if (i % 2) {
|
|
15082
15260
|
// separator item
|
|
15261
|
+
wrapDiv = this.createElement('div', { className: 'e-breadcrumb-item-wrapper' });
|
|
15083
15262
|
listBaseOptions.template = this.separatorTemplate ? this.separatorTemplate : '/';
|
|
15084
15263
|
listBaseOptions.itemClass = 'e-breadcrumb-separator';
|
|
15085
15264
|
isSingleLevel = false;
|
|
15086
|
-
item = [{ previousItem:
|
|
15265
|
+
item = [{ previousItem: items[j], nextItem: items[j + 1] }];
|
|
15087
15266
|
}
|
|
15088
15267
|
else {
|
|
15089
15268
|
// list item
|
|
@@ -15100,47 +15279,129 @@ let Breadcrumb = class Breadcrumb extends Component {
|
|
|
15100
15279
|
if (!item[0].url && !this.itemTemplate) {
|
|
15101
15280
|
item = [extend({}, item[0], { isEmptyUrl: true, url: '#' })];
|
|
15102
15281
|
}
|
|
15103
|
-
isLastItem = isDefaultOverflowMode && (j === this.endIndex);
|
|
15104
|
-
if (((
|
|
15282
|
+
isLastItem = (isDefaultOverflowMode || this.overflowMode === 'Menu') && (j === this.endIndex);
|
|
15283
|
+
if (((i === len - 1 || isLastItem) && !this.itemTemplate) || isActiveItem) {
|
|
15105
15284
|
item[0].isLastItem = true;
|
|
15106
15285
|
}
|
|
15107
15286
|
}
|
|
15108
|
-
|
|
15109
|
-
|
|
15287
|
+
let parent = ol;
|
|
15288
|
+
const lastPopupItemIdx = this.startIndex + this.endIndex - this._maxItems;
|
|
15289
|
+
if (this.overflowMode === 'Menu' && ((j >= this.startIndex && (j <= lastPopupItemIdx && (i % 2 ? !(j === lastPopupItemIdx) : true)) && this.endIndex >= this._maxItems && this._maxItems > 0) || this._maxItems === 0)) {
|
|
15290
|
+
if (i % 2) {
|
|
15291
|
+
continue;
|
|
15292
|
+
}
|
|
15293
|
+
else {
|
|
15294
|
+
parent = this.popupUl;
|
|
15295
|
+
if (isLastItem) {
|
|
15296
|
+
isLastItemInPopup = true;
|
|
15297
|
+
}
|
|
15298
|
+
}
|
|
15299
|
+
}
|
|
15300
|
+
else if (this.overflowMode === 'Wrap') {
|
|
15301
|
+
if (i === 0) {
|
|
15302
|
+
parent = firstOl;
|
|
15303
|
+
}
|
|
15304
|
+
else {
|
|
15305
|
+
parent = wrapDiv;
|
|
15306
|
+
}
|
|
15307
|
+
}
|
|
15308
|
+
const li = ListBase.createList(this.createElement, item, listBaseOptions, isSingleLevel, this).childNodes;
|
|
15309
|
+
if (!isItemCancelled) {
|
|
15310
|
+
append(li, parent);
|
|
15311
|
+
}
|
|
15312
|
+
else if (isDefaultOverflowMode || isCollasped || this.overflowMode === 'Menu' || this.overflowMode === 'Wrap') {
|
|
15313
|
+
items.splice(j, 1);
|
|
15314
|
+
this.initPvtProps();
|
|
15315
|
+
return this.reRenderItems();
|
|
15316
|
+
}
|
|
15317
|
+
else if ((i === len - 1 || isLastItem)) {
|
|
15318
|
+
remove(parent.lastElementChild);
|
|
15319
|
+
}
|
|
15320
|
+
if (this.overflowMode === 'Wrap' && i !== 0 && i % 2 === 0) {
|
|
15321
|
+
ol.appendChild(wrapDiv);
|
|
15322
|
+
}
|
|
15110
15323
|
if (isCollasped && i === 1) {
|
|
15111
|
-
const li = this.createElement('li', { className: 'e-icons e-breadcrumb-collapsed', attrs: {
|
|
15324
|
+
const li = this.createElement('li', { className: 'e-icons e-breadcrumb-collapsed', attrs: { TABINDEX: '0' } });
|
|
15112
15325
|
EventHandler.add(li, 'keyup', this.expandHandler, this);
|
|
15113
|
-
ol.
|
|
15326
|
+
ol.appendChild(li);
|
|
15327
|
+
}
|
|
15328
|
+
if (this.overflowMode === 'Menu' && this.startIndex === i && this.endIndex >= this._maxItems && this._maxItems >= 0) {
|
|
15329
|
+
const menu = this.getMenuElement();
|
|
15330
|
+
EventHandler.add(menu, 'keyup', this.keyDownHandler, this);
|
|
15331
|
+
ol.appendChild(menu);
|
|
15114
15332
|
}
|
|
15115
15333
|
if (isActiveItem || isLastItem) {
|
|
15116
15334
|
break;
|
|
15117
15335
|
}
|
|
15336
|
+
if (isItemCancelled) {
|
|
15337
|
+
i++;
|
|
15338
|
+
}
|
|
15118
15339
|
}
|
|
15119
15340
|
if (this.isReact) {
|
|
15120
15341
|
this.renderReactTemplates();
|
|
15121
15342
|
}
|
|
15122
|
-
this.
|
|
15343
|
+
if (this.overflowMode === 'Wrap') {
|
|
15344
|
+
this.element.appendChild(firstOl);
|
|
15345
|
+
}
|
|
15346
|
+
this.element.appendChild(ol);
|
|
15123
15347
|
this.calculateMaxItems();
|
|
15124
15348
|
}
|
|
15125
15349
|
}
|
|
15126
15350
|
calculateMaxItems() {
|
|
15127
|
-
if (
|
|
15128
|
-
|
|
15129
|
-
|
|
15130
|
-
|
|
15131
|
-
|
|
15132
|
-
|
|
15133
|
-
|
|
15134
|
-
|
|
15351
|
+
if (this.overflowMode === 'Hidden' || this.overflowMode === 'Collapsed' || this.overflowMode === 'Menu') {
|
|
15352
|
+
let maxItems;
|
|
15353
|
+
const width = this.element.offsetWidth;
|
|
15354
|
+
const liElems = [].slice.call(this.element.children[0].children).reverse();
|
|
15355
|
+
let liWidth = this.overflowMode === 'Menu' ? 0 : liElems[liElems.length - 1].offsetWidth + (liElems[liElems.length - 2] ? liElems[liElems.length - 2].offsetWidth : 0);
|
|
15356
|
+
if (this.overflowMode === 'Menu') {
|
|
15357
|
+
const menuEle = this.getMenuElement();
|
|
15358
|
+
this.element.appendChild(menuEle);
|
|
15359
|
+
liWidth += menuEle.offsetWidth;
|
|
15360
|
+
remove(menuEle);
|
|
15361
|
+
}
|
|
15362
|
+
for (let i = 0; i < liElems.length - 2; i++) {
|
|
15363
|
+
if (liWidth > width) {
|
|
15364
|
+
maxItems = Math.ceil((i - 1) / 2) + ((this.overflowMode === 'Menu' && i <= 2) ? 0 : 1);
|
|
15365
|
+
if (((this.maxItems > maxItems && !(this.maxItems > -1 && maxItems == -1)) || this.maxItems == -1) && this._maxItems != maxItems) {
|
|
15366
|
+
this._maxItems = maxItems;
|
|
15135
15367
|
this.initPvtProps();
|
|
15136
15368
|
return this.reRenderItems();
|
|
15137
15369
|
}
|
|
15138
15370
|
else {
|
|
15371
|
+
break;
|
|
15372
|
+
}
|
|
15373
|
+
}
|
|
15374
|
+
else {
|
|
15375
|
+
if (this.overflowMode === 'Menu' && i === 2) {
|
|
15376
|
+
liWidth += liElems[liElems.length - 1].offsetWidth + liElems[liElems.length - 2].offsetWidth;
|
|
15377
|
+
if (liWidth > width) {
|
|
15378
|
+
this._maxItems = 1;
|
|
15379
|
+
this.initPvtProps();
|
|
15380
|
+
return this.reRenderItems();
|
|
15381
|
+
}
|
|
15382
|
+
}
|
|
15383
|
+
if (!(this.overflowMode === 'Menu' && liElems[i].classList.contains(MENUCLASS))) {
|
|
15139
15384
|
liWidth += liElems[i].offsetWidth;
|
|
15140
15385
|
}
|
|
15141
15386
|
}
|
|
15142
15387
|
}
|
|
15143
15388
|
}
|
|
15389
|
+
else if ((this.overflowMode === 'Wrap' || this.overflowMode === 'Scroll') && this._maxItems > 0) {
|
|
15390
|
+
let width = 0;
|
|
15391
|
+
const liElems = this.element.querySelectorAll(DOT + ITEMCLASS);
|
|
15392
|
+
if (liElems.length > this._maxItems + this._maxItems - 1) {
|
|
15393
|
+
for (let i = this.overflowMode === 'Wrap' ? 1 : 0; i < this._maxItems + this._maxItems - 1; i++) {
|
|
15394
|
+
width += liElems[i].offsetWidth;
|
|
15395
|
+
}
|
|
15396
|
+
width = width + 5 + (parseInt(getComputedStyle(this.element.children[0]).paddingLeft, 10) * 2);
|
|
15397
|
+
if (this.overflowMode === 'Wrap') {
|
|
15398
|
+
this.element.querySelector('.e-breadcrumb-wrapped-ol').style.width = width + 'px';
|
|
15399
|
+
}
|
|
15400
|
+
else {
|
|
15401
|
+
this.element.style.width = width + 'px';
|
|
15402
|
+
}
|
|
15403
|
+
}
|
|
15404
|
+
}
|
|
15144
15405
|
}
|
|
15145
15406
|
hasField(items, field) {
|
|
15146
15407
|
for (let i = 0, len = items.length; i < len; i++) {
|
|
@@ -15150,6 +15411,9 @@ let Breadcrumb = class Breadcrumb extends Component {
|
|
|
15150
15411
|
}
|
|
15151
15412
|
return false;
|
|
15152
15413
|
}
|
|
15414
|
+
getMenuElement() {
|
|
15415
|
+
return this.createElement('li', { className: 'e-icons e-breadcrumb-menu', attrs: { TABINDEX: '0' } });
|
|
15416
|
+
}
|
|
15153
15417
|
beforeItemRenderChanges(prevItem, currItem, elem, isRightIcon) {
|
|
15154
15418
|
const wrapElem = elem.querySelector('.e-anchor-wrap');
|
|
15155
15419
|
if (currItem.text !== prevItem.text) {
|
|
@@ -15159,15 +15423,15 @@ let Breadcrumb = class Breadcrumb extends Component {
|
|
|
15159
15423
|
}
|
|
15160
15424
|
});
|
|
15161
15425
|
}
|
|
15162
|
-
if (currItem.iconCss !== prevItem.iconCss) {
|
|
15163
|
-
const iconElem = elem.querySelector(
|
|
15426
|
+
if (currItem.iconCss !== prevItem.iconCss && wrapElem) { // wrapElem - for checking it is item not a separator
|
|
15427
|
+
const iconElem = elem.querySelector(DOT + ICONCLASS);
|
|
15164
15428
|
if (iconElem) {
|
|
15165
15429
|
if (currItem.iconCss) {
|
|
15166
15430
|
removeClass([iconElem], prevItem.iconCss.split(' '));
|
|
15167
15431
|
addClass([iconElem], currItem.iconCss.split(' '));
|
|
15168
15432
|
}
|
|
15169
15433
|
else {
|
|
15170
|
-
|
|
15434
|
+
remove(iconElem);
|
|
15171
15435
|
}
|
|
15172
15436
|
}
|
|
15173
15437
|
else if (currItem.iconCss) {
|
|
@@ -15197,31 +15461,85 @@ let Breadcrumb = class Breadcrumb extends Component {
|
|
|
15197
15461
|
this.renderItems(this.items);
|
|
15198
15462
|
}
|
|
15199
15463
|
clickHandler(e) {
|
|
15200
|
-
const li = closest(e.target, '.e-breadcrumb-
|
|
15201
|
-
if (
|
|
15202
|
-
|
|
15203
|
-
|
|
15204
|
-
|
|
15464
|
+
const li = closest(e.target, DOT + ITEMCLASS + ':not(.e-breadcrumb-separator)');
|
|
15465
|
+
if (!this.enableNavigation) {
|
|
15466
|
+
e.preventDefault();
|
|
15467
|
+
}
|
|
15468
|
+
if (li && (closest(e.target, DOT + ITEMTEXTCLASS) || this.itemTemplate)) {
|
|
15469
|
+
let idx;
|
|
15470
|
+
if (this.overflowMode === 'Wrap') {
|
|
15471
|
+
idx = [].slice.call(this.element.querySelectorAll(DOT + ITEMCLASS)).indexOf(li);
|
|
15472
|
+
}
|
|
15473
|
+
else {
|
|
15474
|
+
idx = [].slice.call(li.parentElement.children).indexOf(li);
|
|
15475
|
+
}
|
|
15476
|
+
if (this.overflowMode === 'Menu') {
|
|
15477
|
+
if (closest(e.target, DOT + POPUPCLASS)) {
|
|
15478
|
+
idx += this.startIndex;
|
|
15479
|
+
this.endIndex = idx;
|
|
15480
|
+
if (e.type === 'keydown') {
|
|
15481
|
+
this.documentClickHandler(e);
|
|
15482
|
+
}
|
|
15483
|
+
}
|
|
15484
|
+
else if (this.element.querySelector(DOT + MENUCLASS)) {
|
|
15485
|
+
if (idx > [].slice.call(this.element.children[0].children).indexOf(this.element.querySelector(DOT + MENUCLASS))) {
|
|
15486
|
+
idx += (this.popupUl.childElementCount * 2) - 2;
|
|
15487
|
+
idx = Math.floor(idx / 2);
|
|
15488
|
+
this.endIndex = idx;
|
|
15489
|
+
}
|
|
15490
|
+
else {
|
|
15491
|
+
this.startIndex = this.endIndex = idx;
|
|
15492
|
+
}
|
|
15493
|
+
}
|
|
15494
|
+
else {
|
|
15495
|
+
idx = Math.floor(idx / 2);
|
|
15496
|
+
this.startIndex = this.endIndex = idx;
|
|
15497
|
+
}
|
|
15498
|
+
}
|
|
15499
|
+
else {
|
|
15500
|
+
idx = Math.floor(idx / 2);
|
|
15501
|
+
}
|
|
15502
|
+
if (this.overflowMode === 'Hidden' && this._maxItems > 0 && this.endIndex !== 0) {
|
|
15205
15503
|
idx = parseInt(li.getAttribute('item-index'), 10);
|
|
15206
15504
|
if (this.startIndex > 1) {
|
|
15207
15505
|
this.startIndex -= (this.endIndex - idx);
|
|
15208
15506
|
}
|
|
15209
15507
|
this.endIndex = idx;
|
|
15210
|
-
this.reRenderItems();
|
|
15211
15508
|
}
|
|
15212
15509
|
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();
|
|
15510
|
+
this.activeItem = this.items[idx].url || this.items[idx].text;
|
|
15511
|
+
this.dataBind();
|
|
15220
15512
|
}
|
|
15221
15513
|
if (e.target.classList.contains('e-breadcrumb-collapsed')) {
|
|
15222
15514
|
this.isExpanded = true;
|
|
15223
15515
|
this.reRenderItems();
|
|
15224
15516
|
}
|
|
15517
|
+
if (e.target.classList.contains(MENUCLASS)) {
|
|
15518
|
+
this.renderPopup();
|
|
15519
|
+
}
|
|
15520
|
+
}
|
|
15521
|
+
renderPopup() {
|
|
15522
|
+
const wrapper = this.createElement('div', { className: POPUPCLASS + ' ' + this.cssClass + (this.enableRtl ? ' e-rtl' : '') });
|
|
15523
|
+
document.body.appendChild(wrapper);
|
|
15524
|
+
this.popupObj = new Popup(wrapper, {
|
|
15525
|
+
content: this.popupUl,
|
|
15526
|
+
relateTo: this.element.querySelector(DOT + MENUCLASS),
|
|
15527
|
+
enableRtl: this.enableRtl,
|
|
15528
|
+
position: { X: 'left', Y: 'bottom' },
|
|
15529
|
+
collision: { X: 'fit', Y: 'flip' },
|
|
15530
|
+
open: () => {
|
|
15531
|
+
this.popupUl.focus();
|
|
15532
|
+
}
|
|
15533
|
+
});
|
|
15534
|
+
this.popupWireEvents();
|
|
15535
|
+
this.popupObj.show();
|
|
15536
|
+
}
|
|
15537
|
+
documentClickHandler(e) {
|
|
15538
|
+
if (this.overflowMode === 'Menu' && this.popupObj && this.popupObj.element.classList.contains('e-popup-open') && !closest(e.target, DOT + MENUCLASS)) {
|
|
15539
|
+
this.popupObj.hide();
|
|
15540
|
+
this.popupObj.destroy();
|
|
15541
|
+
detach(this.popupObj.element);
|
|
15542
|
+
}
|
|
15225
15543
|
}
|
|
15226
15544
|
resize() {
|
|
15227
15545
|
this._maxItems = this.maxItems;
|
|
@@ -15239,6 +15557,11 @@ let Breadcrumb = class Breadcrumb extends Component {
|
|
|
15239
15557
|
this.clickHandler(e);
|
|
15240
15558
|
}
|
|
15241
15559
|
}
|
|
15560
|
+
popupKeyDownHandler(e) {
|
|
15561
|
+
if (e.key === 'Escape') {
|
|
15562
|
+
this.documentClickHandler(e);
|
|
15563
|
+
}
|
|
15564
|
+
}
|
|
15242
15565
|
/**
|
|
15243
15566
|
* Called internally if any of the property value changed.
|
|
15244
15567
|
*
|
|
@@ -15250,26 +15573,37 @@ let Breadcrumb = class Breadcrumb extends Component {
|
|
|
15250
15573
|
onPropertyChanged(newProp, oldProp) {
|
|
15251
15574
|
for (const prop of Object.keys(newProp)) {
|
|
15252
15575
|
switch (prop) {
|
|
15253
|
-
case 'activeItem':
|
|
15254
15576
|
case 'items':
|
|
15255
15577
|
case 'enableActiveItemNavigation':
|
|
15256
15578
|
this.reRenderItems();
|
|
15257
15579
|
break;
|
|
15580
|
+
case 'activeItem':
|
|
15581
|
+
this._maxItems = this.maxItems;
|
|
15582
|
+
this.initPvtProps();
|
|
15583
|
+
this.reRenderItems();
|
|
15584
|
+
break;
|
|
15258
15585
|
case 'overflowMode':
|
|
15259
15586
|
case 'maxItems':
|
|
15587
|
+
this._maxItems = this.maxItems;
|
|
15260
15588
|
this.initPvtProps();
|
|
15261
15589
|
this.reRenderItems();
|
|
15590
|
+
if (oldProp.overflowMode === 'Wrap') {
|
|
15591
|
+
this.element.classList.remove(WRAPMODECLASS);
|
|
15592
|
+
}
|
|
15593
|
+
else if (newProp.overflowMode === 'Wrap') {
|
|
15594
|
+
this.element.classList.add(WRAPMODECLASS);
|
|
15595
|
+
}
|
|
15596
|
+
if (oldProp.overflowMode === 'Scroll') {
|
|
15597
|
+
this.element.classList.remove(SCROLLMODECLASS);
|
|
15598
|
+
}
|
|
15599
|
+
else if (newProp.overflowMode === 'Scroll') {
|
|
15600
|
+
this.element.classList.add(SCROLLMODECLASS);
|
|
15601
|
+
}
|
|
15262
15602
|
break;
|
|
15263
15603
|
case 'url':
|
|
15264
15604
|
this.initItems();
|
|
15265
15605
|
this.reRenderItems();
|
|
15266
15606
|
break;
|
|
15267
|
-
case 'width':
|
|
15268
|
-
this.setWidth();
|
|
15269
|
-
this._maxItems = this.maxItems;
|
|
15270
|
-
this.initPvtProps();
|
|
15271
|
-
this.reRenderItems();
|
|
15272
|
-
break;
|
|
15273
15607
|
case 'cssClass':
|
|
15274
15608
|
if (oldProp.cssClass) {
|
|
15275
15609
|
removeClass([this.element], oldProp.cssClass.split(' '));
|
|
@@ -15286,16 +15620,31 @@ let Breadcrumb = class Breadcrumb extends Component {
|
|
|
15286
15620
|
case 'enableRtl':
|
|
15287
15621
|
this.element.classList.toggle('e-rtl');
|
|
15288
15622
|
break;
|
|
15623
|
+
case 'disabled':
|
|
15624
|
+
this.element.classList.toggle(DISABLEDCLASS);
|
|
15625
|
+
this.element.setAttribute(ARIADISABLED, newProp.disabled + '');
|
|
15626
|
+
break;
|
|
15289
15627
|
}
|
|
15290
15628
|
}
|
|
15291
15629
|
}
|
|
15292
15630
|
wireEvents() {
|
|
15631
|
+
this.delegateClickHanlder = this.documentClickHandler.bind(this);
|
|
15632
|
+
EventHandler.add(document, 'click', this.delegateClickHanlder, this);
|
|
15293
15633
|
EventHandler.add(this.element, 'click', this.clickHandler, this);
|
|
15294
15634
|
window.addEventListener('resize', this.resize.bind(this));
|
|
15295
15635
|
}
|
|
15636
|
+
popupWireEvents() {
|
|
15637
|
+
EventHandler.add(this.popupObj.element, 'click', this.clickHandler, this);
|
|
15638
|
+
EventHandler.add(this.popupObj.element, 'keydown', this.popupKeyDownHandler, this);
|
|
15639
|
+
}
|
|
15296
15640
|
unWireEvents() {
|
|
15641
|
+
EventHandler.remove(document, 'click', this.delegateClickHanlder);
|
|
15297
15642
|
EventHandler.remove(this.element, 'click', this.clickHandler);
|
|
15298
15643
|
window.removeEventListener('resize', this.resize.bind(this));
|
|
15644
|
+
if (this.popupObj) {
|
|
15645
|
+
EventHandler.remove(this.popupObj.element, 'click', this.clickHandler);
|
|
15646
|
+
EventHandler.remove(this.popupObj.element, 'keydown', this.popupKeyDownHandler);
|
|
15647
|
+
}
|
|
15299
15648
|
}
|
|
15300
15649
|
/**
|
|
15301
15650
|
* Get the properties to be maintained in the persisted state.
|
|
@@ -15320,11 +15669,31 @@ let Breadcrumb = class Breadcrumb extends Component {
|
|
|
15320
15669
|
* @returns {void}
|
|
15321
15670
|
*/
|
|
15322
15671
|
destroy() {
|
|
15323
|
-
|
|
15324
|
-
|
|
15672
|
+
let classes = [];
|
|
15673
|
+
let attributes$$1 = ['aria-label'];
|
|
15325
15674
|
if (this.cssClass) {
|
|
15326
|
-
|
|
15675
|
+
classes.concat(this.cssClass.split(' '));
|
|
15327
15676
|
}
|
|
15677
|
+
if (this.enableRtl) {
|
|
15678
|
+
classes.push('e-rtl');
|
|
15679
|
+
}
|
|
15680
|
+
if (this.disabled) {
|
|
15681
|
+
classes.push(DISABLEDCLASS);
|
|
15682
|
+
attributes$$1.push(ARIADISABLED);
|
|
15683
|
+
}
|
|
15684
|
+
if (this.overflowMode === 'Wrap') {
|
|
15685
|
+
classes.push(WRAPMODECLASS);
|
|
15686
|
+
}
|
|
15687
|
+
else if (this.overflowMode === 'Scroll') {
|
|
15688
|
+
classes.push(SCROLLMODECLASS);
|
|
15689
|
+
}
|
|
15690
|
+
this.unWireEvents();
|
|
15691
|
+
this.element.innerHTML = '';
|
|
15692
|
+
removeClass([this.element], classes);
|
|
15693
|
+
attributes$$1.forEach((attribute) => {
|
|
15694
|
+
this.element.removeAttribute(attribute);
|
|
15695
|
+
});
|
|
15696
|
+
super.destroy();
|
|
15328
15697
|
}
|
|
15329
15698
|
};
|
|
15330
15699
|
__decorate$10([
|
|
@@ -15337,17 +15706,14 @@ __decorate$10([
|
|
|
15337
15706
|
Property('')
|
|
15338
15707
|
], Breadcrumb.prototype, "activeItem", void 0);
|
|
15339
15708
|
__decorate$10([
|
|
15340
|
-
Property(
|
|
15709
|
+
Property(-1)
|
|
15341
15710
|
], Breadcrumb.prototype, "maxItems", void 0);
|
|
15342
15711
|
__decorate$10([
|
|
15343
|
-
Property('
|
|
15712
|
+
Property('Menu')
|
|
15344
15713
|
], Breadcrumb.prototype, "overflowMode", void 0);
|
|
15345
15714
|
__decorate$10([
|
|
15346
15715
|
Property('')
|
|
15347
15716
|
], Breadcrumb.prototype, "cssClass", void 0);
|
|
15348
|
-
__decorate$10([
|
|
15349
|
-
Property('')
|
|
15350
|
-
], Breadcrumb.prototype, "width", void 0);
|
|
15351
15717
|
__decorate$10([
|
|
15352
15718
|
Property(null)
|
|
15353
15719
|
], Breadcrumb.prototype, "itemTemplate", void 0);
|
|
@@ -15360,6 +15726,9 @@ __decorate$10([
|
|
|
15360
15726
|
__decorate$10([
|
|
15361
15727
|
Property(false)
|
|
15362
15728
|
], Breadcrumb.prototype, "enableActiveItemNavigation", void 0);
|
|
15729
|
+
__decorate$10([
|
|
15730
|
+
Property(false)
|
|
15731
|
+
], Breadcrumb.prototype, "disabled", void 0);
|
|
15363
15732
|
__decorate$10([
|
|
15364
15733
|
Property('')
|
|
15365
15734
|
], Breadcrumb.prototype, "locale", void 0);
|