@syncfusion/ej2-navigations 27.1.52 → 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 +32 -28
- package/dist/es6/ej2-navigations.es2015.js.map +1 -1
- package/dist/es6/ej2-navigations.es5.js +36 -32
- 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 +8 -8
- package/src/stepper/stepper.js +20 -24
- package/src/treeview/treeview.js +16 -8
|
@@ -10761,6 +10761,10 @@ let TreeView = TreeView_1 = class TreeView extends Component {
|
|
|
10761
10761
|
if (this.element.classList.contains('e-filtering')) {
|
|
10762
10762
|
const oldCheckedNodes = new DataManager(this.OldCheckedData).executeLocal(new Query().where('parentID', 'equal', dataUid, true));
|
|
10763
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
|
+
}
|
|
10764
10768
|
let childItems = [];
|
|
10765
10769
|
if (this.dataType === 1) {
|
|
10766
10770
|
childItems = new DataManager(this.DDTTreeData).executeLocal(new Query().where(this.fields.parentID, 'equal', dataUid, true));
|
|
@@ -10770,7 +10774,10 @@ let TreeView = TreeView_1 = class TreeView extends Component {
|
|
|
10770
10774
|
}
|
|
10771
10775
|
count = childItems.length;
|
|
10772
10776
|
}
|
|
10773
|
-
if (count === checkedCount) {
|
|
10777
|
+
if (count === 0 && checkedCount === 0) {
|
|
10778
|
+
return;
|
|
10779
|
+
}
|
|
10780
|
+
else if (count === checkedCount) {
|
|
10774
10781
|
this.changeState(checkBoxEle, 'check', null, true, true);
|
|
10775
10782
|
}
|
|
10776
10783
|
else if (checkedCount > 0 || indeterminateNodes.length > 0) {
|
|
@@ -13652,16 +13659,17 @@ let TreeView = TreeView_1 = class TreeView extends Component {
|
|
|
13652
13659
|
}
|
|
13653
13660
|
}
|
|
13654
13661
|
}
|
|
13655
|
-
collapseByLevel(element, level, excludeHiddenNodes) {
|
|
13662
|
+
collapseByLevel(element, level, excludeHiddenNodes, currentLevel) {
|
|
13663
|
+
currentLevel = isNullOrUndefined(currentLevel) ? 1 : currentLevel;
|
|
13656
13664
|
if (level > 0 && !isNullOrUndefined(element)) {
|
|
13657
13665
|
const cNodes = this.getVisibleNodes(excludeHiddenNodes, element.childNodes);
|
|
13658
13666
|
for (let i = 0, len = cNodes.length; i < len; i++) {
|
|
13659
13667
|
const liEle = cNodes[parseInt(i.toString(), 10)];
|
|
13660
13668
|
const icon = select('.' + COLLAPSIBLE, select('.' + TEXTWRAP, liEle));
|
|
13661
|
-
if (!isNullOrUndefined(icon)) {
|
|
13669
|
+
if (currentLevel >= level && !isNullOrUndefined(icon)) {
|
|
13662
13670
|
this.collapseNode(liEle, icon, null);
|
|
13663
13671
|
}
|
|
13664
|
-
this.collapseByLevel(select('.' + PARENTITEM, liEle), level
|
|
13672
|
+
this.collapseByLevel(select('.' + PARENTITEM, liEle), level, excludeHiddenNodes, currentLevel + 1);
|
|
13665
13673
|
}
|
|
13666
13674
|
}
|
|
13667
13675
|
}
|
|
@@ -18830,6 +18838,8 @@ let Stepper = class Stepper extends StepperBase {
|
|
|
18830
18838
|
}
|
|
18831
18839
|
const stepSpan = this.createElement('span', { className: 'e-step' });
|
|
18832
18840
|
const item = this.steps[parseInt(index.toString(), 10)];
|
|
18841
|
+
let isItemLabel = item.label ? true : false;
|
|
18842
|
+
let isItemText = item.text ? true : false;
|
|
18833
18843
|
if (this.renderDefault(index) && (isNullOrUndefined(this.template) || this.template === '')) {
|
|
18834
18844
|
const isIndicator = (!this.element.classList.contains('e-step-type-default') && this.stepType.toLowerCase() === 'indicator') ? true : false;
|
|
18835
18845
|
if (isIndicator) {
|
|
@@ -18843,7 +18853,7 @@ let Stepper = class Stepper extends StepperBase {
|
|
|
18843
18853
|
}
|
|
18844
18854
|
else if (isNullOrUndefined(this.template) || this.template === '') {
|
|
18845
18855
|
let isRender = true;
|
|
18846
|
-
if ((item.iconCss || (!item.iconCss &&
|
|
18856
|
+
if ((item.iconCss || (!item.iconCss && isItemText && isItemLabel)) && (((!isItemText && !isItemLabel) ||
|
|
18847
18857
|
!this.element.classList.contains(LABELINDICATOR)))) {
|
|
18848
18858
|
if (item.iconCss) {
|
|
18849
18859
|
const itemIcon = item.iconCss.trim().split(' ');
|
|
@@ -18853,14 +18863,14 @@ let Stepper = class Stepper extends StepperBase {
|
|
|
18853
18863
|
}
|
|
18854
18864
|
this.stepperItemContainer.classList.add(STEPICON);
|
|
18855
18865
|
}
|
|
18856
|
-
else if (!item.iconCss &&
|
|
18866
|
+
else if (!item.iconCss && isItemText && isItemLabel) {
|
|
18857
18867
|
stepSpan.classList.add(ICONCSS);
|
|
18858
18868
|
stepSpan.innerHTML = item.text;
|
|
18859
18869
|
this.stepperItemContainer.classList.add(STEPICON);
|
|
18860
18870
|
}
|
|
18861
18871
|
this.stepperItemContainer.appendChild(stepSpan);
|
|
18862
|
-
if ((this.element.classList.contains(HORIZSTEP) && (this.labelPosition.toLowerCase() === 'start' || this.labelPosition.toLowerCase() === 'end') &&
|
|
18863
|
-
(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)) {
|
|
18864
18874
|
this.element.classList.add('e-label-' + this.labelPosition.toLowerCase());
|
|
18865
18875
|
const textSpan = this.createElement('span', { className: TEXTCSS + ' ' + TEXT });
|
|
18866
18876
|
textSpan.innerText = item.label;
|
|
@@ -18869,49 +18879,43 @@ let Stepper = class Stepper extends StepperBase {
|
|
|
18869
18879
|
isRender = false;
|
|
18870
18880
|
}
|
|
18871
18881
|
}
|
|
18872
|
-
if (
|
|
18873
|
-
!(item.iconCss &&
|
|
18882
|
+
if (isItemText && (!item.iconCss || !this.element.classList.contains(STEPINDICATOR)) && isRender &&
|
|
18883
|
+
!(item.iconCss && isItemLabel)) {
|
|
18874
18884
|
if ((!item.iconCss && this.element.classList.contains(STEPINDICATOR)) ||
|
|
18875
|
-
((!item.iconCss || this.element.classList.contains(LABELINDICATOR)) && !
|
|
18876
|
-
if (!item.iconCss && !
|
|
18885
|
+
((!item.iconCss || this.element.classList.contains(LABELINDICATOR)) && !isItemLabel)) {
|
|
18886
|
+
if (!item.iconCss && !isItemLabel) {
|
|
18877
18887
|
this.element.classList.add('e-step-type-indicator');
|
|
18878
18888
|
}
|
|
18879
18889
|
this.checkValidState(item, stepSpan);
|
|
18880
|
-
|
|
18881
|
-
this.isProtectedOnChange = true;
|
|
18882
|
-
item.label = null;
|
|
18883
|
-
this.isProtectedOnChange = prevOnChange;
|
|
18890
|
+
isItemLabel = null;
|
|
18884
18891
|
}
|
|
18885
18892
|
else {
|
|
18886
18893
|
const textSpan = this.createElement('span', { className: TEXT });
|
|
18887
|
-
if (!
|
|
18894
|
+
if (!isItemLabel) {
|
|
18888
18895
|
textSpan.innerText = item.text;
|
|
18889
18896
|
textSpan.classList.add(TEXTCSS);
|
|
18890
18897
|
this.stepperItemContainer.appendChild(textSpan);
|
|
18891
18898
|
this.stepperItemContainer.classList.add(STEPTEXT);
|
|
18892
18899
|
}
|
|
18893
|
-
if (
|
|
18900
|
+
if (isItemLabel && this.element.classList.contains(LABELINDICATOR)) {
|
|
18894
18901
|
textSpan.innerText = item.label;
|
|
18895
18902
|
}
|
|
18896
|
-
|
|
18897
|
-
this.isProtectedOnChange = true;
|
|
18898
|
-
item.text = item.label ? null : item.text;
|
|
18899
|
-
this.isProtectedOnChange = prevOnChange;
|
|
18903
|
+
isItemText = item.label ? false : true;
|
|
18900
18904
|
}
|
|
18901
18905
|
}
|
|
18902
|
-
if (
|
|
18903
|
-
if (!item.iconCss && !
|
|
18906
|
+
if (isItemLabel && (!item.iconCss || !this.element.classList.contains(STEPINDICATOR)) && isRender) {
|
|
18907
|
+
if (!item.iconCss && !isItemText && this.element.classList.contains(STEPINDICATOR)) {
|
|
18904
18908
|
this.checkValidState(item, stepSpan, true);
|
|
18905
18909
|
}
|
|
18906
|
-
else if ((!((this.element.classList.contains(LABELINDICATOR)) &&
|
|
18907
|
-
(this.element.classList.contains(LABELINDICATOR) &&
|
|
18910
|
+
else if ((!((this.element.classList.contains(LABELINDICATOR)) && isItemText)) ||
|
|
18911
|
+
(this.element.classList.contains(LABELINDICATOR) && isItemLabel)) {
|
|
18908
18912
|
this.labelContainer = this.createElement('span', { className: STEPLABEL });
|
|
18909
18913
|
const labelSpan = this.createElement('span', { className: LABEL });
|
|
18910
18914
|
labelSpan.innerText = item.label;
|
|
18911
18915
|
this.labelContainer.appendChild(labelSpan);
|
|
18912
18916
|
this.stepperItemContainer.classList.add(STEPSLABEL);
|
|
18913
18917
|
this.updateLabelPosition();
|
|
18914
|
-
if ((!item.iconCss && !
|
|
18918
|
+
if ((!item.iconCss && !isItemText && !this.stepperItemContainer.classList.contains(STEPICON)) ||
|
|
18915
18919
|
this.element.classList.contains(LABELINDICATOR)) {
|
|
18916
18920
|
this.stepperItemContainer.classList.add('e-step-label-only');
|
|
18917
18921
|
if (item.isValid !== null) {
|
|
@@ -18927,7 +18931,7 @@ let Stepper = class Stepper extends StepperBase {
|
|
|
18927
18931
|
this.l10n.setLocale(this.locale);
|
|
18928
18932
|
const optionalContent = this.l10n.getConstant('optional');
|
|
18929
18933
|
optionalSpan.innerText = optionalContent;
|
|
18930
|
-
if (
|
|
18934
|
+
if (isItemLabel && (this.labelContainer && ((this.element.classList.contains(LABELAFTER) && !this.stepperItemContainer.classList.contains('e-step-label-only'))
|
|
18931
18935
|
|| (this.element.classList.contains(HORIZSTEP) && this.element.classList.contains(LABELBEFORE) && !this.stepperItemContainer.classList.contains('e-step-label-only'))))
|
|
18932
18936
|
|| (this.element.classList.contains(VERTICALSTEP) && this.element.classList.contains(LABELBEFORE))) {
|
|
18933
18937
|
this.labelContainer.appendChild(optionalSpan);
|