@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
|
@@ -11088,20 +11088,27 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
11088
11088
|
var checkBoxEle = element.getElementsByClassName(CHECKBOXWRAP)[0];
|
|
11089
11089
|
var count = nodes.length;
|
|
11090
11090
|
var checkedCount = checkedNodes.length;
|
|
11091
|
-
var
|
|
11091
|
+
var dataUid_1 = element.getAttribute('data-uid');
|
|
11092
11092
|
if (this.element.classList.contains('e-filtering')) {
|
|
11093
|
-
var oldCheckedNodes = new DataManager(this.OldCheckedData).executeLocal(new Query().where('parentID', 'equal',
|
|
11093
|
+
var oldCheckedNodes = new DataManager(this.OldCheckedData).executeLocal(new Query().where('parentID', 'equal', dataUid_1, true));
|
|
11094
11094
|
checkedCount = oldCheckedNodes.length;
|
|
11095
|
+
var parentNode = new DataManager(this.OldCheckedData).executeLocal(new Query().where('hasChildren', 'equal', true, true));
|
|
11096
|
+
if ((parentNode.length > 0) && (this.OldCheckedData.some(function (oldNode) { return oldNode.id === dataUid_1; }))) {
|
|
11097
|
+
checkedCount = parentNode.length;
|
|
11098
|
+
}
|
|
11095
11099
|
var childItems = [];
|
|
11096
11100
|
if (this.dataType === 1) {
|
|
11097
|
-
childItems = new DataManager(this.DDTTreeData).executeLocal(new Query().where(this.fields.parentID, 'equal',
|
|
11101
|
+
childItems = new DataManager(this.DDTTreeData).executeLocal(new Query().where(this.fields.parentID, 'equal', dataUid_1, true));
|
|
11098
11102
|
}
|
|
11099
11103
|
else {
|
|
11100
|
-
childItems = this.getChildNodes(this.DDTTreeData,
|
|
11104
|
+
childItems = this.getChildNodes(this.DDTTreeData, dataUid_1);
|
|
11101
11105
|
}
|
|
11102
11106
|
count = childItems.length;
|
|
11103
11107
|
}
|
|
11104
|
-
if (count === checkedCount) {
|
|
11108
|
+
if (count === 0 && checkedCount === 0) {
|
|
11109
|
+
return;
|
|
11110
|
+
}
|
|
11111
|
+
else if (count === checkedCount) {
|
|
11105
11112
|
this.changeState(checkBoxEle, 'check', null, true, true);
|
|
11106
11113
|
}
|
|
11107
11114
|
else if (checkedCount > 0 || indeterminateNodes.length > 0) {
|
|
@@ -14008,16 +14015,17 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
14008
14015
|
}
|
|
14009
14016
|
}
|
|
14010
14017
|
};
|
|
14011
|
-
TreeView.prototype.collapseByLevel = function (element, level, excludeHiddenNodes) {
|
|
14018
|
+
TreeView.prototype.collapseByLevel = function (element, level, excludeHiddenNodes, currentLevel) {
|
|
14019
|
+
currentLevel = isNullOrUndefined(currentLevel) ? 1 : currentLevel;
|
|
14012
14020
|
if (level > 0 && !isNullOrUndefined(element)) {
|
|
14013
14021
|
var cNodes = this.getVisibleNodes(excludeHiddenNodes, element.childNodes);
|
|
14014
14022
|
for (var i = 0, len = cNodes.length; i < len; i++) {
|
|
14015
14023
|
var liEle = cNodes[parseInt(i.toString(), 10)];
|
|
14016
14024
|
var icon = select('.' + COLLAPSIBLE, select('.' + TEXTWRAP, liEle));
|
|
14017
|
-
if (!isNullOrUndefined(icon)) {
|
|
14025
|
+
if (currentLevel >= level && !isNullOrUndefined(icon)) {
|
|
14018
14026
|
this.collapseNode(liEle, icon, null);
|
|
14019
14027
|
}
|
|
14020
|
-
this.collapseByLevel(select('.' + PARENTITEM, liEle), level
|
|
14028
|
+
this.collapseByLevel(select('.' + PARENTITEM, liEle), level, excludeHiddenNodes, currentLevel + 1);
|
|
14021
14029
|
}
|
|
14022
14030
|
}
|
|
14023
14031
|
};
|
|
@@ -19343,6 +19351,8 @@ var Stepper = /** @__PURE__ @class */ (function (_super) {
|
|
|
19343
19351
|
}
|
|
19344
19352
|
var stepSpan = this.createElement('span', { className: 'e-step' });
|
|
19345
19353
|
var item = this.steps[parseInt(index.toString(), 10)];
|
|
19354
|
+
var isItemLabel = item.label ? true : false;
|
|
19355
|
+
var isItemText = item.text ? true : false;
|
|
19346
19356
|
if (this.renderDefault(index) && (isNullOrUndefined(this.template) || this.template === '')) {
|
|
19347
19357
|
var isIndicator = (!this.element.classList.contains('e-step-type-default') && this.stepType.toLowerCase() === 'indicator') ? true : false;
|
|
19348
19358
|
if (isIndicator) {
|
|
@@ -19356,7 +19366,7 @@ var Stepper = /** @__PURE__ @class */ (function (_super) {
|
|
|
19356
19366
|
}
|
|
19357
19367
|
else if (isNullOrUndefined(this.template) || this.template === '') {
|
|
19358
19368
|
var isRender = true;
|
|
19359
|
-
if ((item.iconCss || (!item.iconCss &&
|
|
19369
|
+
if ((item.iconCss || (!item.iconCss && isItemText && isItemLabel)) && (((!isItemText && !isItemLabel) ||
|
|
19360
19370
|
!this.element.classList.contains(LABELINDICATOR)))) {
|
|
19361
19371
|
if (item.iconCss) {
|
|
19362
19372
|
var itemIcon = item.iconCss.trim().split(' ');
|
|
@@ -19366,14 +19376,14 @@ var Stepper = /** @__PURE__ @class */ (function (_super) {
|
|
|
19366
19376
|
}
|
|
19367
19377
|
this.stepperItemContainer.classList.add(STEPICON);
|
|
19368
19378
|
}
|
|
19369
|
-
else if (!item.iconCss &&
|
|
19379
|
+
else if (!item.iconCss && isItemText && isItemLabel) {
|
|
19370
19380
|
stepSpan.classList.add(ICONCSS);
|
|
19371
19381
|
stepSpan.innerHTML = item.text;
|
|
19372
19382
|
this.stepperItemContainer.classList.add(STEPICON);
|
|
19373
19383
|
}
|
|
19374
19384
|
this.stepperItemContainer.appendChild(stepSpan);
|
|
19375
|
-
if ((this.element.classList.contains(HORIZSTEP) && (this.labelPosition.toLowerCase() === 'start' || this.labelPosition.toLowerCase() === 'end') &&
|
|
19376
|
-
(this.element.classList.contains(VERTICALSTEP) && (this.labelPosition.toLowerCase() === 'top' || this.labelPosition.toLowerCase() === 'bottom') &&
|
|
19385
|
+
if ((this.element.classList.contains(HORIZSTEP) && (this.labelPosition.toLowerCase() === 'start' || this.labelPosition.toLowerCase() === 'end') && isItemLabel) ||
|
|
19386
|
+
(this.element.classList.contains(VERTICALSTEP) && (this.labelPosition.toLowerCase() === 'top' || this.labelPosition.toLowerCase() === 'bottom') && isItemLabel)) {
|
|
19377
19387
|
this.element.classList.add('e-label-' + this.labelPosition.toLowerCase());
|
|
19378
19388
|
var textSpan = this.createElement('span', { className: TEXTCSS + ' ' + TEXT });
|
|
19379
19389
|
textSpan.innerText = item.label;
|
|
@@ -19382,49 +19392,43 @@ var Stepper = /** @__PURE__ @class */ (function (_super) {
|
|
|
19382
19392
|
isRender = false;
|
|
19383
19393
|
}
|
|
19384
19394
|
}
|
|
19385
|
-
if (
|
|
19386
|
-
!(item.iconCss &&
|
|
19395
|
+
if (isItemText && (!item.iconCss || !this.element.classList.contains(STEPINDICATOR)) && isRender &&
|
|
19396
|
+
!(item.iconCss && isItemLabel)) {
|
|
19387
19397
|
if ((!item.iconCss && this.element.classList.contains(STEPINDICATOR)) ||
|
|
19388
|
-
((!item.iconCss || this.element.classList.contains(LABELINDICATOR)) && !
|
|
19389
|
-
if (!item.iconCss && !
|
|
19398
|
+
((!item.iconCss || this.element.classList.contains(LABELINDICATOR)) && !isItemLabel)) {
|
|
19399
|
+
if (!item.iconCss && !isItemLabel) {
|
|
19390
19400
|
this.element.classList.add('e-step-type-indicator');
|
|
19391
19401
|
}
|
|
19392
19402
|
this.checkValidState(item, stepSpan);
|
|
19393
|
-
|
|
19394
|
-
this.isProtectedOnChange = true;
|
|
19395
|
-
item.label = null;
|
|
19396
|
-
this.isProtectedOnChange = prevOnChange;
|
|
19403
|
+
isItemLabel = null;
|
|
19397
19404
|
}
|
|
19398
19405
|
else {
|
|
19399
19406
|
var textSpan = this.createElement('span', { className: TEXT });
|
|
19400
|
-
if (!
|
|
19407
|
+
if (!isItemLabel) {
|
|
19401
19408
|
textSpan.innerText = item.text;
|
|
19402
19409
|
textSpan.classList.add(TEXTCSS);
|
|
19403
19410
|
this.stepperItemContainer.appendChild(textSpan);
|
|
19404
19411
|
this.stepperItemContainer.classList.add(STEPTEXT);
|
|
19405
19412
|
}
|
|
19406
|
-
if (
|
|
19413
|
+
if (isItemLabel && this.element.classList.contains(LABELINDICATOR)) {
|
|
19407
19414
|
textSpan.innerText = item.label;
|
|
19408
19415
|
}
|
|
19409
|
-
|
|
19410
|
-
this.isProtectedOnChange = true;
|
|
19411
|
-
item.text = item.label ? null : item.text;
|
|
19412
|
-
this.isProtectedOnChange = prevOnChange;
|
|
19416
|
+
isItemText = item.label ? false : true;
|
|
19413
19417
|
}
|
|
19414
19418
|
}
|
|
19415
|
-
if (
|
|
19416
|
-
if (!item.iconCss && !
|
|
19419
|
+
if (isItemLabel && (!item.iconCss || !this.element.classList.contains(STEPINDICATOR)) && isRender) {
|
|
19420
|
+
if (!item.iconCss && !isItemText && this.element.classList.contains(STEPINDICATOR)) {
|
|
19417
19421
|
this.checkValidState(item, stepSpan, true);
|
|
19418
19422
|
}
|
|
19419
|
-
else if ((!((this.element.classList.contains(LABELINDICATOR)) &&
|
|
19420
|
-
(this.element.classList.contains(LABELINDICATOR) &&
|
|
19423
|
+
else if ((!((this.element.classList.contains(LABELINDICATOR)) && isItemText)) ||
|
|
19424
|
+
(this.element.classList.contains(LABELINDICATOR) && isItemLabel)) {
|
|
19421
19425
|
this.labelContainer = this.createElement('span', { className: STEPLABEL });
|
|
19422
19426
|
var labelSpan = this.createElement('span', { className: LABEL });
|
|
19423
19427
|
labelSpan.innerText = item.label;
|
|
19424
19428
|
this.labelContainer.appendChild(labelSpan);
|
|
19425
19429
|
this.stepperItemContainer.classList.add(STEPSLABEL);
|
|
19426
19430
|
this.updateLabelPosition();
|
|
19427
|
-
if ((!item.iconCss && !
|
|
19431
|
+
if ((!item.iconCss && !isItemText && !this.stepperItemContainer.classList.contains(STEPICON)) ||
|
|
19428
19432
|
this.element.classList.contains(LABELINDICATOR)) {
|
|
19429
19433
|
this.stepperItemContainer.classList.add('e-step-label-only');
|
|
19430
19434
|
if (item.isValid !== null) {
|
|
@@ -19440,7 +19444,7 @@ var Stepper = /** @__PURE__ @class */ (function (_super) {
|
|
|
19440
19444
|
this.l10n.setLocale(this.locale);
|
|
19441
19445
|
var optionalContent = this.l10n.getConstant('optional');
|
|
19442
19446
|
optionalSpan.innerText = optionalContent;
|
|
19443
|
-
if (
|
|
19447
|
+
if (isItemLabel && (this.labelContainer && ((this.element.classList.contains(LABELAFTER) && !this.stepperItemContainer.classList.contains('e-step-label-only'))
|
|
19444
19448
|
|| (this.element.classList.contains(HORIZSTEP) && this.element.classList.contains(LABELBEFORE) && !this.stepperItemContainer.classList.contains('e-step-label-only'))))
|
|
19445
19449
|
|| (this.element.classList.contains(VERTICALSTEP) && this.element.classList.contains(LABELBEFORE))) {
|
|
19446
19450
|
this.labelContainer.appendChild(optionalSpan);
|