@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
|
@@ -3307,6 +3307,8 @@ var MenuBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
3307
3307
|
idx = navIdx.pop();
|
|
3308
3308
|
iitems = this.getItems(navIdx);
|
|
3309
3309
|
menuitem = new MenuItem(iitems[0], 'items', items[i], true);
|
|
3310
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
3311
|
+
menuitem.parentObj = iitems[0].parentObj;
|
|
3310
3312
|
iitems.splice(isAfter ? idx + 1 : idx, 0, menuitem);
|
|
3311
3313
|
var uls = this.isMenu ? [this.getWrapper()].concat(this.getPopups()) : [].slice.call(this.getWrapper().children);
|
|
3312
3314
|
if (!isNullOrUndefined(idx) && navIdx.length < uls.length) {
|
|
@@ -11086,20 +11088,27 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
11086
11088
|
var checkBoxEle = element.getElementsByClassName(CHECKBOXWRAP)[0];
|
|
11087
11089
|
var count = nodes.length;
|
|
11088
11090
|
var checkedCount = checkedNodes.length;
|
|
11089
|
-
var
|
|
11091
|
+
var dataUid_1 = element.getAttribute('data-uid');
|
|
11090
11092
|
if (this.element.classList.contains('e-filtering')) {
|
|
11091
|
-
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));
|
|
11092
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
|
+
}
|
|
11093
11099
|
var childItems = [];
|
|
11094
11100
|
if (this.dataType === 1) {
|
|
11095
|
-
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));
|
|
11096
11102
|
}
|
|
11097
11103
|
else {
|
|
11098
|
-
childItems = this.getChildNodes(this.DDTTreeData,
|
|
11104
|
+
childItems = this.getChildNodes(this.DDTTreeData, dataUid_1);
|
|
11099
11105
|
}
|
|
11100
11106
|
count = childItems.length;
|
|
11101
11107
|
}
|
|
11102
|
-
if (count === checkedCount) {
|
|
11108
|
+
if (count === 0 && checkedCount === 0) {
|
|
11109
|
+
return;
|
|
11110
|
+
}
|
|
11111
|
+
else if (count === checkedCount) {
|
|
11103
11112
|
this.changeState(checkBoxEle, 'check', null, true, true);
|
|
11104
11113
|
}
|
|
11105
11114
|
else if (checkedCount > 0 || indeterminateNodes.length > 0) {
|
|
@@ -12914,7 +12923,7 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
12914
12923
|
var nextNode = isTowards ? this.getNextNode(li) : this.getPrevNode(li);
|
|
12915
12924
|
this.setFocus(li, nextNode);
|
|
12916
12925
|
this.navigateToFocus(!isTowards);
|
|
12917
|
-
if (nextNode.classList.contains('e-disable')
|
|
12926
|
+
if (nextNode.classList.contains('e-disable')) {
|
|
12918
12927
|
var lastChild = nextNode.lastChild;
|
|
12919
12928
|
if (nextNode.previousSibling == null && nextNode.classList.contains('e-level-1')) {
|
|
12920
12929
|
this.focusNextNode(nextNode, true);
|
|
@@ -12975,7 +12984,7 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
12975
12984
|
TreeView.prototype.setFocus = function (preNode, nextNode) {
|
|
12976
12985
|
removeClass([preNode], FOCUS);
|
|
12977
12986
|
preNode.setAttribute('tabindex', '-1');
|
|
12978
|
-
if (!nextNode.classList.contains('e-disable')
|
|
12987
|
+
if (!nextNode.classList.contains('e-disable')) {
|
|
12979
12988
|
addClass([nextNode], FOCUS);
|
|
12980
12989
|
nextNode.setAttribute('tabindex', '0');
|
|
12981
12990
|
nextNode.focus();
|
|
@@ -12994,7 +13003,7 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
12994
13003
|
TreeView.prototype.focusIn = function () {
|
|
12995
13004
|
if (!this.mouseDownStatus) {
|
|
12996
13005
|
var focusedElement = this.getFocusedNode();
|
|
12997
|
-
if (focusedElement.classList.contains('e-disable')
|
|
13006
|
+
if (focusedElement.classList.contains('e-disable')) {
|
|
12998
13007
|
focusedElement.setAttribute('tabindex', '-1');
|
|
12999
13008
|
this.navigateNode(true);
|
|
13000
13009
|
}
|
|
@@ -14006,16 +14015,17 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
14006
14015
|
}
|
|
14007
14016
|
}
|
|
14008
14017
|
};
|
|
14009
|
-
TreeView.prototype.collapseByLevel = function (element, level, excludeHiddenNodes) {
|
|
14018
|
+
TreeView.prototype.collapseByLevel = function (element, level, excludeHiddenNodes, currentLevel) {
|
|
14019
|
+
currentLevel = isNullOrUndefined(currentLevel) ? 1 : currentLevel;
|
|
14010
14020
|
if (level > 0 && !isNullOrUndefined(element)) {
|
|
14011
14021
|
var cNodes = this.getVisibleNodes(excludeHiddenNodes, element.childNodes);
|
|
14012
14022
|
for (var i = 0, len = cNodes.length; i < len; i++) {
|
|
14013
14023
|
var liEle = cNodes[parseInt(i.toString(), 10)];
|
|
14014
14024
|
var icon = select('.' + COLLAPSIBLE, select('.' + TEXTWRAP, liEle));
|
|
14015
|
-
if (!isNullOrUndefined(icon)) {
|
|
14025
|
+
if (currentLevel >= level && !isNullOrUndefined(icon)) {
|
|
14016
14026
|
this.collapseNode(liEle, icon, null);
|
|
14017
14027
|
}
|
|
14018
|
-
this.collapseByLevel(select('.' + PARENTITEM, liEle), level
|
|
14028
|
+
this.collapseByLevel(select('.' + PARENTITEM, liEle), level, excludeHiddenNodes, currentLevel + 1);
|
|
14019
14029
|
}
|
|
14020
14030
|
}
|
|
14021
14031
|
};
|
|
@@ -19341,6 +19351,8 @@ var Stepper = /** @__PURE__ @class */ (function (_super) {
|
|
|
19341
19351
|
}
|
|
19342
19352
|
var stepSpan = this.createElement('span', { className: 'e-step' });
|
|
19343
19353
|
var item = this.steps[parseInt(index.toString(), 10)];
|
|
19354
|
+
var isItemLabel = item.label ? true : false;
|
|
19355
|
+
var isItemText = item.text ? true : false;
|
|
19344
19356
|
if (this.renderDefault(index) && (isNullOrUndefined(this.template) || this.template === '')) {
|
|
19345
19357
|
var isIndicator = (!this.element.classList.contains('e-step-type-default') && this.stepType.toLowerCase() === 'indicator') ? true : false;
|
|
19346
19358
|
if (isIndicator) {
|
|
@@ -19354,7 +19366,7 @@ var Stepper = /** @__PURE__ @class */ (function (_super) {
|
|
|
19354
19366
|
}
|
|
19355
19367
|
else if (isNullOrUndefined(this.template) || this.template === '') {
|
|
19356
19368
|
var isRender = true;
|
|
19357
|
-
if ((item.iconCss || (!item.iconCss &&
|
|
19369
|
+
if ((item.iconCss || (!item.iconCss && isItemText && isItemLabel)) && (((!isItemText && !isItemLabel) ||
|
|
19358
19370
|
!this.element.classList.contains(LABELINDICATOR)))) {
|
|
19359
19371
|
if (item.iconCss) {
|
|
19360
19372
|
var itemIcon = item.iconCss.trim().split(' ');
|
|
@@ -19364,14 +19376,14 @@ var Stepper = /** @__PURE__ @class */ (function (_super) {
|
|
|
19364
19376
|
}
|
|
19365
19377
|
this.stepperItemContainer.classList.add(STEPICON);
|
|
19366
19378
|
}
|
|
19367
|
-
else if (!item.iconCss &&
|
|
19379
|
+
else if (!item.iconCss && isItemText && isItemLabel) {
|
|
19368
19380
|
stepSpan.classList.add(ICONCSS);
|
|
19369
19381
|
stepSpan.innerHTML = item.text;
|
|
19370
19382
|
this.stepperItemContainer.classList.add(STEPICON);
|
|
19371
19383
|
}
|
|
19372
19384
|
this.stepperItemContainer.appendChild(stepSpan);
|
|
19373
|
-
if ((this.element.classList.contains(HORIZSTEP) && (this.labelPosition.toLowerCase() === 'start' || this.labelPosition.toLowerCase() === 'end') &&
|
|
19374
|
-
(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)) {
|
|
19375
19387
|
this.element.classList.add('e-label-' + this.labelPosition.toLowerCase());
|
|
19376
19388
|
var textSpan = this.createElement('span', { className: TEXTCSS + ' ' + TEXT });
|
|
19377
19389
|
textSpan.innerText = item.label;
|
|
@@ -19380,49 +19392,43 @@ var Stepper = /** @__PURE__ @class */ (function (_super) {
|
|
|
19380
19392
|
isRender = false;
|
|
19381
19393
|
}
|
|
19382
19394
|
}
|
|
19383
|
-
if (
|
|
19384
|
-
!(item.iconCss &&
|
|
19395
|
+
if (isItemText && (!item.iconCss || !this.element.classList.contains(STEPINDICATOR)) && isRender &&
|
|
19396
|
+
!(item.iconCss && isItemLabel)) {
|
|
19385
19397
|
if ((!item.iconCss && this.element.classList.contains(STEPINDICATOR)) ||
|
|
19386
|
-
((!item.iconCss || this.element.classList.contains(LABELINDICATOR)) && !
|
|
19387
|
-
if (!item.iconCss && !
|
|
19398
|
+
((!item.iconCss || this.element.classList.contains(LABELINDICATOR)) && !isItemLabel)) {
|
|
19399
|
+
if (!item.iconCss && !isItemLabel) {
|
|
19388
19400
|
this.element.classList.add('e-step-type-indicator');
|
|
19389
19401
|
}
|
|
19390
19402
|
this.checkValidState(item, stepSpan);
|
|
19391
|
-
|
|
19392
|
-
this.isProtectedOnChange = true;
|
|
19393
|
-
item.label = null;
|
|
19394
|
-
this.isProtectedOnChange = prevOnChange;
|
|
19403
|
+
isItemLabel = null;
|
|
19395
19404
|
}
|
|
19396
19405
|
else {
|
|
19397
19406
|
var textSpan = this.createElement('span', { className: TEXT });
|
|
19398
|
-
if (!
|
|
19407
|
+
if (!isItemLabel) {
|
|
19399
19408
|
textSpan.innerText = item.text;
|
|
19400
19409
|
textSpan.classList.add(TEXTCSS);
|
|
19401
19410
|
this.stepperItemContainer.appendChild(textSpan);
|
|
19402
19411
|
this.stepperItemContainer.classList.add(STEPTEXT);
|
|
19403
19412
|
}
|
|
19404
|
-
if (
|
|
19413
|
+
if (isItemLabel && this.element.classList.contains(LABELINDICATOR)) {
|
|
19405
19414
|
textSpan.innerText = item.label;
|
|
19406
19415
|
}
|
|
19407
|
-
|
|
19408
|
-
this.isProtectedOnChange = true;
|
|
19409
|
-
item.text = item.label ? null : item.text;
|
|
19410
|
-
this.isProtectedOnChange = prevOnChange;
|
|
19416
|
+
isItemText = item.label ? false : true;
|
|
19411
19417
|
}
|
|
19412
19418
|
}
|
|
19413
|
-
if (
|
|
19414
|
-
if (!item.iconCss && !
|
|
19419
|
+
if (isItemLabel && (!item.iconCss || !this.element.classList.contains(STEPINDICATOR)) && isRender) {
|
|
19420
|
+
if (!item.iconCss && !isItemText && this.element.classList.contains(STEPINDICATOR)) {
|
|
19415
19421
|
this.checkValidState(item, stepSpan, true);
|
|
19416
19422
|
}
|
|
19417
|
-
else if ((!((this.element.classList.contains(LABELINDICATOR)) &&
|
|
19418
|
-
(this.element.classList.contains(LABELINDICATOR) &&
|
|
19423
|
+
else if ((!((this.element.classList.contains(LABELINDICATOR)) && isItemText)) ||
|
|
19424
|
+
(this.element.classList.contains(LABELINDICATOR) && isItemLabel)) {
|
|
19419
19425
|
this.labelContainer = this.createElement('span', { className: STEPLABEL });
|
|
19420
19426
|
var labelSpan = this.createElement('span', { className: LABEL });
|
|
19421
19427
|
labelSpan.innerText = item.label;
|
|
19422
19428
|
this.labelContainer.appendChild(labelSpan);
|
|
19423
19429
|
this.stepperItemContainer.classList.add(STEPSLABEL);
|
|
19424
19430
|
this.updateLabelPosition();
|
|
19425
|
-
if ((!item.iconCss && !
|
|
19431
|
+
if ((!item.iconCss && !isItemText && !this.stepperItemContainer.classList.contains(STEPICON)) ||
|
|
19426
19432
|
this.element.classList.contains(LABELINDICATOR)) {
|
|
19427
19433
|
this.stepperItemContainer.classList.add('e-step-label-only');
|
|
19428
19434
|
if (item.isValid !== null) {
|
|
@@ -19438,7 +19444,7 @@ var Stepper = /** @__PURE__ @class */ (function (_super) {
|
|
|
19438
19444
|
this.l10n.setLocale(this.locale);
|
|
19439
19445
|
var optionalContent = this.l10n.getConstant('optional');
|
|
19440
19446
|
optionalSpan.innerText = optionalContent;
|
|
19441
|
-
if (
|
|
19447
|
+
if (isItemLabel && (this.labelContainer && ((this.element.classList.contains(LABELAFTER) && !this.stepperItemContainer.classList.contains('e-step-label-only'))
|
|
19442
19448
|
|| (this.element.classList.contains(HORIZSTEP) && this.element.classList.contains(LABELBEFORE) && !this.stepperItemContainer.classList.contains('e-step-label-only'))))
|
|
19443
19449
|
|| (this.element.classList.contains(VERTICALSTEP) && this.element.classList.contains(LABELBEFORE))) {
|
|
19444
19450
|
this.labelContainer.appendChild(optionalSpan);
|