@syncfusion/ej2-navigations 27.1.51 → 27.1.53
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/dist/ej2-navigations.min.js +2 -2
- package/dist/ej2-navigations.umd.min.js +2 -2
- package/dist/ej2-navigations.umd.min.js.map +1 -1
- package/dist/es6/ej2-navigations.es2015.js +37 -31
- package/dist/es6/ej2-navigations.es2015.js.map +1 -1
- package/dist/es6/ej2-navigations.es5.js +41 -35
- 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 +9 -9
- package/src/common/menu-base.js +2 -0
- package/src/stepper/stepper.js +20 -24
- package/src/treeview/treeview.js +19 -11
- package/styles/bootstrap5.3-lite.css +3 -3
- package/styles/bootstrap5.3.css +3 -3
- package/styles/treeview/_bootstrap5.3-definition.scss +2 -2
- package/styles/treeview/bootstrap5.3.css +3 -3
|
@@ -3193,6 +3193,8 @@ let MenuBase = class MenuBase extends Component {
|
|
|
3193
3193
|
idx = navIdx.pop();
|
|
3194
3194
|
iitems = this.getItems(navIdx);
|
|
3195
3195
|
menuitem = new MenuItem(iitems[0], 'items', items[i], true);
|
|
3196
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
3197
|
+
menuitem.parentObj = iitems[0].parentObj;
|
|
3196
3198
|
iitems.splice(isAfter ? idx + 1 : idx, 0, menuitem);
|
|
3197
3199
|
const uls = this.isMenu ? [this.getWrapper()].concat(this.getPopups()) : [].slice.call(this.getWrapper().children);
|
|
3198
3200
|
if (!isNullOrUndefined(idx) && navIdx.length < uls.length) {
|
|
@@ -10759,6 +10761,10 @@ let TreeView = TreeView_1 = class TreeView extends Component {
|
|
|
10759
10761
|
if (this.element.classList.contains('e-filtering')) {
|
|
10760
10762
|
const oldCheckedNodes = new DataManager(this.OldCheckedData).executeLocal(new Query().where('parentID', 'equal', dataUid, true));
|
|
10761
10763
|
checkedCount = oldCheckedNodes.length;
|
|
10764
|
+
const parentNode = new DataManager(this.OldCheckedData).executeLocal(new Query().where('hasChildren', 'equal', true, true));
|
|
10765
|
+
if ((parentNode.length > 0) && (this.OldCheckedData.some((oldNode) => oldNode.id === dataUid))) {
|
|
10766
|
+
checkedCount = parentNode.length;
|
|
10767
|
+
}
|
|
10762
10768
|
let childItems = [];
|
|
10763
10769
|
if (this.dataType === 1) {
|
|
10764
10770
|
childItems = new DataManager(this.DDTTreeData).executeLocal(new Query().where(this.fields.parentID, 'equal', dataUid, true));
|
|
@@ -10768,7 +10774,10 @@ let TreeView = TreeView_1 = class TreeView extends Component {
|
|
|
10768
10774
|
}
|
|
10769
10775
|
count = childItems.length;
|
|
10770
10776
|
}
|
|
10771
|
-
if (count === checkedCount) {
|
|
10777
|
+
if (count === 0 && checkedCount === 0) {
|
|
10778
|
+
return;
|
|
10779
|
+
}
|
|
10780
|
+
else if (count === checkedCount) {
|
|
10772
10781
|
this.changeState(checkBoxEle, 'check', null, true, true);
|
|
10773
10782
|
}
|
|
10774
10783
|
else if (checkedCount > 0 || indeterminateNodes.length > 0) {
|
|
@@ -12563,7 +12572,7 @@ let TreeView = TreeView_1 = class TreeView extends Component {
|
|
|
12563
12572
|
const nextNode = isTowards ? this.getNextNode(li) : this.getPrevNode(li);
|
|
12564
12573
|
this.setFocus(li, nextNode);
|
|
12565
12574
|
this.navigateToFocus(!isTowards);
|
|
12566
|
-
if (nextNode.classList.contains('e-disable')
|
|
12575
|
+
if (nextNode.classList.contains('e-disable')) {
|
|
12567
12576
|
const lastChild = nextNode.lastChild;
|
|
12568
12577
|
if (nextNode.previousSibling == null && nextNode.classList.contains('e-level-1')) {
|
|
12569
12578
|
this.focusNextNode(nextNode, true);
|
|
@@ -12624,7 +12633,7 @@ let TreeView = TreeView_1 = class TreeView extends Component {
|
|
|
12624
12633
|
setFocus(preNode, nextNode) {
|
|
12625
12634
|
removeClass([preNode], FOCUS);
|
|
12626
12635
|
preNode.setAttribute('tabindex', '-1');
|
|
12627
|
-
if (!nextNode.classList.contains('e-disable')
|
|
12636
|
+
if (!nextNode.classList.contains('e-disable')) {
|
|
12628
12637
|
addClass([nextNode], FOCUS);
|
|
12629
12638
|
nextNode.setAttribute('tabindex', '0');
|
|
12630
12639
|
nextNode.focus();
|
|
@@ -12643,7 +12652,7 @@ let TreeView = TreeView_1 = class TreeView extends Component {
|
|
|
12643
12652
|
focusIn() {
|
|
12644
12653
|
if (!this.mouseDownStatus) {
|
|
12645
12654
|
const focusedElement = this.getFocusedNode();
|
|
12646
|
-
if (focusedElement.classList.contains('e-disable')
|
|
12655
|
+
if (focusedElement.classList.contains('e-disable')) {
|
|
12647
12656
|
focusedElement.setAttribute('tabindex', '-1');
|
|
12648
12657
|
this.navigateNode(true);
|
|
12649
12658
|
}
|
|
@@ -13650,16 +13659,17 @@ let TreeView = TreeView_1 = class TreeView extends Component {
|
|
|
13650
13659
|
}
|
|
13651
13660
|
}
|
|
13652
13661
|
}
|
|
13653
|
-
collapseByLevel(element, level, excludeHiddenNodes) {
|
|
13662
|
+
collapseByLevel(element, level, excludeHiddenNodes, currentLevel) {
|
|
13663
|
+
currentLevel = isNullOrUndefined(currentLevel) ? 1 : currentLevel;
|
|
13654
13664
|
if (level > 0 && !isNullOrUndefined(element)) {
|
|
13655
13665
|
const cNodes = this.getVisibleNodes(excludeHiddenNodes, element.childNodes);
|
|
13656
13666
|
for (let i = 0, len = cNodes.length; i < len; i++) {
|
|
13657
13667
|
const liEle = cNodes[parseInt(i.toString(), 10)];
|
|
13658
13668
|
const icon = select('.' + COLLAPSIBLE, select('.' + TEXTWRAP, liEle));
|
|
13659
|
-
if (!isNullOrUndefined(icon)) {
|
|
13669
|
+
if (currentLevel >= level && !isNullOrUndefined(icon)) {
|
|
13660
13670
|
this.collapseNode(liEle, icon, null);
|
|
13661
13671
|
}
|
|
13662
|
-
this.collapseByLevel(select('.' + PARENTITEM, liEle), level
|
|
13672
|
+
this.collapseByLevel(select('.' + PARENTITEM, liEle), level, excludeHiddenNodes, currentLevel + 1);
|
|
13663
13673
|
}
|
|
13664
13674
|
}
|
|
13665
13675
|
}
|
|
@@ -18828,6 +18838,8 @@ let Stepper = class Stepper extends StepperBase {
|
|
|
18828
18838
|
}
|
|
18829
18839
|
const stepSpan = this.createElement('span', { className: 'e-step' });
|
|
18830
18840
|
const item = this.steps[parseInt(index.toString(), 10)];
|
|
18841
|
+
let isItemLabel = item.label ? true : false;
|
|
18842
|
+
let isItemText = item.text ? true : false;
|
|
18831
18843
|
if (this.renderDefault(index) && (isNullOrUndefined(this.template) || this.template === '')) {
|
|
18832
18844
|
const isIndicator = (!this.element.classList.contains('e-step-type-default') && this.stepType.toLowerCase() === 'indicator') ? true : false;
|
|
18833
18845
|
if (isIndicator) {
|
|
@@ -18841,7 +18853,7 @@ let Stepper = class Stepper extends StepperBase {
|
|
|
18841
18853
|
}
|
|
18842
18854
|
else if (isNullOrUndefined(this.template) || this.template === '') {
|
|
18843
18855
|
let isRender = true;
|
|
18844
|
-
if ((item.iconCss || (!item.iconCss &&
|
|
18856
|
+
if ((item.iconCss || (!item.iconCss && isItemText && isItemLabel)) && (((!isItemText && !isItemLabel) ||
|
|
18845
18857
|
!this.element.classList.contains(LABELINDICATOR)))) {
|
|
18846
18858
|
if (item.iconCss) {
|
|
18847
18859
|
const itemIcon = item.iconCss.trim().split(' ');
|
|
@@ -18851,14 +18863,14 @@ let Stepper = class Stepper extends StepperBase {
|
|
|
18851
18863
|
}
|
|
18852
18864
|
this.stepperItemContainer.classList.add(STEPICON);
|
|
18853
18865
|
}
|
|
18854
|
-
else if (!item.iconCss &&
|
|
18866
|
+
else if (!item.iconCss && isItemText && isItemLabel) {
|
|
18855
18867
|
stepSpan.classList.add(ICONCSS);
|
|
18856
18868
|
stepSpan.innerHTML = item.text;
|
|
18857
18869
|
this.stepperItemContainer.classList.add(STEPICON);
|
|
18858
18870
|
}
|
|
18859
18871
|
this.stepperItemContainer.appendChild(stepSpan);
|
|
18860
|
-
if ((this.element.classList.contains(HORIZSTEP) && (this.labelPosition.toLowerCase() === 'start' || this.labelPosition.toLowerCase() === 'end') &&
|
|
18861
|
-
(this.element.classList.contains(VERTICALSTEP) && (this.labelPosition.toLowerCase() === 'top' || this.labelPosition.toLowerCase() === 'bottom') &&
|
|
18872
|
+
if ((this.element.classList.contains(HORIZSTEP) && (this.labelPosition.toLowerCase() === 'start' || this.labelPosition.toLowerCase() === 'end') && isItemLabel) ||
|
|
18873
|
+
(this.element.classList.contains(VERTICALSTEP) && (this.labelPosition.toLowerCase() === 'top' || this.labelPosition.toLowerCase() === 'bottom') && isItemLabel)) {
|
|
18862
18874
|
this.element.classList.add('e-label-' + this.labelPosition.toLowerCase());
|
|
18863
18875
|
const textSpan = this.createElement('span', { className: TEXTCSS + ' ' + TEXT });
|
|
18864
18876
|
textSpan.innerText = item.label;
|
|
@@ -18867,49 +18879,43 @@ let Stepper = class Stepper extends StepperBase {
|
|
|
18867
18879
|
isRender = false;
|
|
18868
18880
|
}
|
|
18869
18881
|
}
|
|
18870
|
-
if (
|
|
18871
|
-
!(item.iconCss &&
|
|
18882
|
+
if (isItemText && (!item.iconCss || !this.element.classList.contains(STEPINDICATOR)) && isRender &&
|
|
18883
|
+
!(item.iconCss && isItemLabel)) {
|
|
18872
18884
|
if ((!item.iconCss && this.element.classList.contains(STEPINDICATOR)) ||
|
|
18873
|
-
((!item.iconCss || this.element.classList.contains(LABELINDICATOR)) && !
|
|
18874
|
-
if (!item.iconCss && !
|
|
18885
|
+
((!item.iconCss || this.element.classList.contains(LABELINDICATOR)) && !isItemLabel)) {
|
|
18886
|
+
if (!item.iconCss && !isItemLabel) {
|
|
18875
18887
|
this.element.classList.add('e-step-type-indicator');
|
|
18876
18888
|
}
|
|
18877
18889
|
this.checkValidState(item, stepSpan);
|
|
18878
|
-
|
|
18879
|
-
this.isProtectedOnChange = true;
|
|
18880
|
-
item.label = null;
|
|
18881
|
-
this.isProtectedOnChange = prevOnChange;
|
|
18890
|
+
isItemLabel = null;
|
|
18882
18891
|
}
|
|
18883
18892
|
else {
|
|
18884
18893
|
const textSpan = this.createElement('span', { className: TEXT });
|
|
18885
|
-
if (!
|
|
18894
|
+
if (!isItemLabel) {
|
|
18886
18895
|
textSpan.innerText = item.text;
|
|
18887
18896
|
textSpan.classList.add(TEXTCSS);
|
|
18888
18897
|
this.stepperItemContainer.appendChild(textSpan);
|
|
18889
18898
|
this.stepperItemContainer.classList.add(STEPTEXT);
|
|
18890
18899
|
}
|
|
18891
|
-
if (
|
|
18900
|
+
if (isItemLabel && this.element.classList.contains(LABELINDICATOR)) {
|
|
18892
18901
|
textSpan.innerText = item.label;
|
|
18893
18902
|
}
|
|
18894
|
-
|
|
18895
|
-
this.isProtectedOnChange = true;
|
|
18896
|
-
item.text = item.label ? null : item.text;
|
|
18897
|
-
this.isProtectedOnChange = prevOnChange;
|
|
18903
|
+
isItemText = item.label ? false : true;
|
|
18898
18904
|
}
|
|
18899
18905
|
}
|
|
18900
|
-
if (
|
|
18901
|
-
if (!item.iconCss && !
|
|
18906
|
+
if (isItemLabel && (!item.iconCss || !this.element.classList.contains(STEPINDICATOR)) && isRender) {
|
|
18907
|
+
if (!item.iconCss && !isItemText && this.element.classList.contains(STEPINDICATOR)) {
|
|
18902
18908
|
this.checkValidState(item, stepSpan, true);
|
|
18903
18909
|
}
|
|
18904
|
-
else if ((!((this.element.classList.contains(LABELINDICATOR)) &&
|
|
18905
|
-
(this.element.classList.contains(LABELINDICATOR) &&
|
|
18910
|
+
else if ((!((this.element.classList.contains(LABELINDICATOR)) && isItemText)) ||
|
|
18911
|
+
(this.element.classList.contains(LABELINDICATOR) && isItemLabel)) {
|
|
18906
18912
|
this.labelContainer = this.createElement('span', { className: STEPLABEL });
|
|
18907
18913
|
const labelSpan = this.createElement('span', { className: LABEL });
|
|
18908
18914
|
labelSpan.innerText = item.label;
|
|
18909
18915
|
this.labelContainer.appendChild(labelSpan);
|
|
18910
18916
|
this.stepperItemContainer.classList.add(STEPSLABEL);
|
|
18911
18917
|
this.updateLabelPosition();
|
|
18912
|
-
if ((!item.iconCss && !
|
|
18918
|
+
if ((!item.iconCss && !isItemText && !this.stepperItemContainer.classList.contains(STEPICON)) ||
|
|
18913
18919
|
this.element.classList.contains(LABELINDICATOR)) {
|
|
18914
18920
|
this.stepperItemContainer.classList.add('e-step-label-only');
|
|
18915
18921
|
if (item.isValid !== null) {
|
|
@@ -18925,7 +18931,7 @@ let Stepper = class Stepper extends StepperBase {
|
|
|
18925
18931
|
this.l10n.setLocale(this.locale);
|
|
18926
18932
|
const optionalContent = this.l10n.getConstant('optional');
|
|
18927
18933
|
optionalSpan.innerText = optionalContent;
|
|
18928
|
-
if (
|
|
18934
|
+
if (isItemLabel && (this.labelContainer && ((this.element.classList.contains(LABELAFTER) && !this.stepperItemContainer.classList.contains('e-step-label-only'))
|
|
18929
18935
|
|| (this.element.classList.contains(HORIZSTEP) && this.element.classList.contains(LABELBEFORE) && !this.stepperItemContainer.classList.contains('e-step-label-only'))))
|
|
18930
18936
|
|| (this.element.classList.contains(VERTICALSTEP) && this.element.classList.contains(LABELBEFORE))) {
|
|
18931
18937
|
this.labelContainer.appendChild(optionalSpan);
|