@syncfusion/ej2-navigations 24.1.41 → 24.2.3
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/CHANGELOG.md +34 -0
- package/README.md +1 -1
- 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 +102 -15
- package/dist/es6/ej2-navigations.es2015.js.map +1 -1
- package/dist/es6/ej2-navigations.es5.js +111 -24
- 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/common/menu-base.js +21 -0
- package/src/stepper/stepper.js +26 -12
- package/src/tab/tab.js +1 -1
- package/src/treeview/treeview.d.ts +1 -0
- package/src/treeview/treeview.js +63 -11
- package/styles/bootstrap-dark.css +5 -4
- package/styles/bootstrap.css +5 -4
- package/styles/bootstrap4.css +5 -4
- package/styles/bootstrap5-dark.css +14 -11
- package/styles/bootstrap5.css +14 -11
- package/styles/fabric-dark.css +5 -4
- package/styles/fabric.css +5 -4
- package/styles/fluent-dark.css +9 -8
- package/styles/fluent.css +9 -8
- package/styles/highcontrast-light.css +5 -4
- package/styles/highcontrast.css +5 -4
- package/styles/material-dark.css +5 -4
- package/styles/material.css +5 -4
- package/styles/material3-dark.css +5 -4
- package/styles/material3.css +5 -4
- package/styles/menu/_layout.scss +0 -1
- package/styles/menu/bootstrap-dark.css +0 -1
- package/styles/menu/bootstrap.css +0 -1
- package/styles/menu/bootstrap4.css +0 -1
- package/styles/menu/bootstrap5-dark.css +0 -1
- package/styles/menu/bootstrap5.css +0 -1
- package/styles/menu/fabric-dark.css +0 -1
- package/styles/menu/fabric.css +0 -1
- package/styles/menu/fluent-dark.css +0 -1
- package/styles/menu/fluent.css +0 -1
- package/styles/menu/highcontrast-light.css +0 -1
- package/styles/menu/highcontrast.css +0 -1
- package/styles/menu/material-dark.css +0 -1
- package/styles/menu/material.css +0 -1
- package/styles/menu/material3-dark.css +0 -1
- package/styles/menu/material3.css +0 -1
- package/styles/menu/tailwind-dark.css +0 -1
- package/styles/menu/tailwind.css +0 -1
- package/styles/stepper/_bootstrap-dark-definition.scss +1 -0
- package/styles/stepper/_bootstrap-definition.scss +1 -0
- package/styles/stepper/_bootstrap4-definition.scss +1 -0
- package/styles/stepper/_bootstrap5-definition.scss +1 -0
- package/styles/stepper/_fabric-dark-definition.scss +1 -0
- package/styles/stepper/_fabric-definition.scss +1 -0
- package/styles/stepper/_fluent-definition.scss +1 -0
- package/styles/stepper/_fusionnew-definition.scss +1 -0
- package/styles/stepper/_highcontrast-definition.scss +1 -0
- package/styles/stepper/_highcontrast-light-definition.scss +1 -0
- package/styles/stepper/_material-dark-definition.scss +1 -0
- package/styles/stepper/_material-definition.scss +1 -0
- package/styles/stepper/_material3-definition.scss +1 -0
- package/styles/stepper/_tailwind-definition.scss +1 -0
- package/styles/stepper/_theme.scss +9 -3
- package/styles/stepper/bootstrap-dark.css +5 -3
- package/styles/stepper/bootstrap.css +5 -3
- package/styles/stepper/bootstrap4.css +5 -3
- package/styles/stepper/bootstrap5-dark.css +5 -3
- package/styles/stepper/bootstrap5.css +5 -3
- package/styles/stepper/fabric-dark.css +5 -3
- package/styles/stepper/fabric.css +5 -3
- package/styles/stepper/fluent-dark.css +5 -3
- package/styles/stepper/fluent.css +5 -3
- package/styles/stepper/highcontrast-light.css +5 -3
- package/styles/stepper/highcontrast.css +5 -3
- package/styles/stepper/material-dark.css +5 -3
- package/styles/stepper/material.css +5 -3
- package/styles/stepper/material3-dark.css +5 -3
- package/styles/stepper/material3.css +5 -3
- package/styles/stepper/tailwind-dark.css +5 -3
- package/styles/stepper/tailwind.css +5 -3
- package/styles/tailwind-dark.css +9 -8
- package/styles/tailwind.css +9 -8
- package/styles/toolbar/_bootstrap5-definition.scss +5 -5
- package/styles/toolbar/_fluent-definition.scss +2 -2
- package/styles/toolbar/_tailwind-definition.scss +2 -2
- package/styles/toolbar/_theme.scss +8 -0
- package/styles/toolbar/bootstrap5-dark.css +9 -7
- package/styles/toolbar/bootstrap5.css +9 -7
- package/styles/toolbar/fluent-dark.css +4 -4
- package/styles/toolbar/fluent.css +4 -4
- package/styles/toolbar/tailwind-dark.css +4 -4
- package/styles/toolbar/tailwind.css +4 -4
|
@@ -1502,7 +1502,25 @@ let MenuBase = class MenuBase extends Component {
|
|
|
1502
1502
|
fli.classList.add(SELECTED);
|
|
1503
1503
|
eventArgs = { element: fli, item: item, event: e };
|
|
1504
1504
|
this.trigger('select', eventArgs);
|
|
1505
|
+
const aEle = fli.querySelector('.e-menu-url');
|
|
1506
|
+
if (item.url && aEle) {
|
|
1507
|
+
switch (aEle.getAttribute('target')) {
|
|
1508
|
+
case '_blank':
|
|
1509
|
+
window.open(item.url, '_blank');
|
|
1510
|
+
break;
|
|
1511
|
+
case '_parent':
|
|
1512
|
+
window.parent.location.href = item.url;
|
|
1513
|
+
break;
|
|
1514
|
+
default:
|
|
1515
|
+
window.location.href = item.url;
|
|
1516
|
+
}
|
|
1517
|
+
}
|
|
1505
1518
|
this.closeMenu(null, e);
|
|
1519
|
+
const sli = this.getLIByClass(this.getUlByNavIdx(), SELECTED);
|
|
1520
|
+
if (sli) {
|
|
1521
|
+
sli.classList.add(FOCUSED);
|
|
1522
|
+
sli.focus();
|
|
1523
|
+
}
|
|
1506
1524
|
}
|
|
1507
1525
|
}
|
|
1508
1526
|
}
|
|
@@ -1597,6 +1615,9 @@ let MenuBase = class MenuBase extends Component {
|
|
|
1597
1615
|
closeArgs = { element: ul, parentItem: item, items: items };
|
|
1598
1616
|
this.trigger('onClose', closeArgs);
|
|
1599
1617
|
this.navIdx.pop();
|
|
1618
|
+
if (this.navIdx.length === 0 && e && e.type === 'keyup') {
|
|
1619
|
+
this.showSubMenu = false;
|
|
1620
|
+
}
|
|
1600
1621
|
if (!this.isMenu) {
|
|
1601
1622
|
EventHandler.remove(ul, 'keydown', this.keyHandler);
|
|
1602
1623
|
if (this.keyType === 'right') {
|
|
@@ -8389,7 +8410,7 @@ let Tab = class Tab extends Component {
|
|
|
8389
8410
|
setActive(value, skipDataBind = false, isInteracted = false) {
|
|
8390
8411
|
this.tbItem = selectAll('.' + CLS_TB_ITEM, this.getTabHeader());
|
|
8391
8412
|
const trg = this.tbItem[value];
|
|
8392
|
-
if (value < 0 || isNaN(value) || this.tbItem.length === 0) {
|
|
8413
|
+
if (value < 0 || isNaN(value) || this.tbItem.length === 0 || !isNullOrUndefined(trg) && trg.classList.contains(CLS_DISABLE$4)) {
|
|
8393
8414
|
return;
|
|
8394
8415
|
}
|
|
8395
8416
|
if (value >= 0 && !skipDataBind) {
|
|
@@ -10200,6 +10221,14 @@ let TreeView = TreeView_1 = class TreeView extends Component {
|
|
|
10200
10221
|
this.rootData = this.treeData;
|
|
10201
10222
|
}
|
|
10202
10223
|
}
|
|
10224
|
+
isChildObject() {
|
|
10225
|
+
if (typeof this.fields.child === 'object') {
|
|
10226
|
+
return true;
|
|
10227
|
+
}
|
|
10228
|
+
else {
|
|
10229
|
+
return false;
|
|
10230
|
+
}
|
|
10231
|
+
}
|
|
10203
10232
|
renderItems(isSorted) {
|
|
10204
10233
|
/* eslint-disable */
|
|
10205
10234
|
this.listBaseOption.ariaAttributes.level = 1;
|
|
@@ -10519,6 +10548,9 @@ let TreeView = TreeView_1 = class TreeView extends Component {
|
|
|
10519
10548
|
if ((typeof mapper.child === 'string') && !isNullOrUndefined(getValue(mapper.child, ds[i]))) {
|
|
10520
10549
|
return 2;
|
|
10521
10550
|
}
|
|
10551
|
+
if (this.isChildObject()) {
|
|
10552
|
+
return 2;
|
|
10553
|
+
}
|
|
10522
10554
|
if (!isNullOrUndefined(getValue(mapper.parentID, ds[i])) || !isNullOrUndefined(getValue(mapper.hasChildren, ds[i]))) {
|
|
10523
10555
|
return 1;
|
|
10524
10556
|
}
|
|
@@ -11459,7 +11491,7 @@ let TreeView = TreeView_1 = class TreeView extends Component {
|
|
|
11459
11491
|
}
|
|
11460
11492
|
}
|
|
11461
11493
|
else {
|
|
11462
|
-
childItems = this.getChildNodes(this.treeData, parentLi.getAttribute('data-uid'));
|
|
11494
|
+
childItems = this.getChildNodes(this.treeData, parentLi.getAttribute('data-uid'), false, parseFloat(parentLi.getAttribute('aria-level')) + 1);
|
|
11463
11495
|
this.currentLoadData = this.getSortedData(childItems);
|
|
11464
11496
|
if (isNullOrUndefined(childItems) || childItems.length === 0) {
|
|
11465
11497
|
detach(eicon);
|
|
@@ -11561,7 +11593,7 @@ let TreeView = TreeView_1 = class TreeView extends Component {
|
|
|
11561
11593
|
getChildMapper(mapper) {
|
|
11562
11594
|
return (typeof mapper.child === 'string' || isNullOrUndefined(mapper.child)) ? mapper : mapper.child;
|
|
11563
11595
|
}
|
|
11564
|
-
getChildNodes(obj, parentId, isRoot = false) {
|
|
11596
|
+
getChildNodes(obj, parentId, isRoot = false, level) {
|
|
11565
11597
|
let childNodes;
|
|
11566
11598
|
if (isNullOrUndefined(obj)) {
|
|
11567
11599
|
return childNodes;
|
|
@@ -11591,6 +11623,39 @@ let TreeView = TreeView_1 = class TreeView extends Component {
|
|
|
11591
11623
|
}
|
|
11592
11624
|
}
|
|
11593
11625
|
}
|
|
11626
|
+
else if (this.isChildObject()) {
|
|
11627
|
+
let tempField = !isNullOrUndefined(level) ? this.fields : this.fields.child;
|
|
11628
|
+
let i = 1;
|
|
11629
|
+
while (i < level) {
|
|
11630
|
+
if (!isNullOrUndefined(tempField.child)) {
|
|
11631
|
+
tempField = tempField.child;
|
|
11632
|
+
}
|
|
11633
|
+
else {
|
|
11634
|
+
break;
|
|
11635
|
+
}
|
|
11636
|
+
i++;
|
|
11637
|
+
}
|
|
11638
|
+
this.updateListProp(tempField);
|
|
11639
|
+
let index = obj.findIndex((data) => getValue(this.fields.id, data) && getValue(this.fields.id, data).toString() === parentId);
|
|
11640
|
+
if (index !== -1) {
|
|
11641
|
+
return getValue('child', obj[index]);
|
|
11642
|
+
}
|
|
11643
|
+
if (index === -1) {
|
|
11644
|
+
for (let i = 0, objlen = obj.length; i < objlen; i++) {
|
|
11645
|
+
let tempArray = getValue('child', obj[i]);
|
|
11646
|
+
let childIndex = !isNullOrUndefined(tempArray) ? tempArray.findIndex((data) => getValue(this.fields.child.id, data) && getValue(this.fields.child.id, data).toString() === parentId) : -1;
|
|
11647
|
+
if (childIndex !== -1) {
|
|
11648
|
+
return getValue('child', tempArray[childIndex]);
|
|
11649
|
+
}
|
|
11650
|
+
else if (!isNullOrUndefined(tempArray)) {
|
|
11651
|
+
childNodes = this.getChildNodes(tempArray, parentId, false, level);
|
|
11652
|
+
if (childNodes !== undefined) {
|
|
11653
|
+
break;
|
|
11654
|
+
}
|
|
11655
|
+
}
|
|
11656
|
+
}
|
|
11657
|
+
}
|
|
11658
|
+
}
|
|
11594
11659
|
}
|
|
11595
11660
|
return childNodes;
|
|
11596
11661
|
}
|
|
@@ -12622,6 +12687,14 @@ let TreeView = TreeView_1 = class TreeView extends Component {
|
|
|
12622
12687
|
break;
|
|
12623
12688
|
}
|
|
12624
12689
|
}
|
|
12690
|
+
else if (this.isChildObject()) {
|
|
12691
|
+
let children = 'child';
|
|
12692
|
+
let childData = getValue(children, obj[i]);
|
|
12693
|
+
newList = this.getChildNodeObject(childData, this.getChildMapper(mapper), id);
|
|
12694
|
+
if (newList !== undefined) {
|
|
12695
|
+
break;
|
|
12696
|
+
}
|
|
12697
|
+
}
|
|
12625
12698
|
}
|
|
12626
12699
|
return newList;
|
|
12627
12700
|
}
|
|
@@ -18186,6 +18259,7 @@ let Stepper = class Stepper extends StepperBase {
|
|
|
18186
18259
|
home: 'home',
|
|
18187
18260
|
end: 'end',
|
|
18188
18261
|
tab: 'tab',
|
|
18262
|
+
shiftTab: 'shift+tab',
|
|
18189
18263
|
escape: 'escape'
|
|
18190
18264
|
};
|
|
18191
18265
|
this.tooltipOpen = false;
|
|
@@ -18778,7 +18852,7 @@ let Stepper = class Stepper extends StepperBase {
|
|
|
18778
18852
|
const itemElement = this.stepperItemElements[parseInt(i.toString(), 10)];
|
|
18779
18853
|
const item = this.steps[parseInt(i.toString(), 10)];
|
|
18780
18854
|
itemElement.classList.remove(SELECTED$2, INPROGRESS, COMPLETED, NOTSTARTED);
|
|
18781
|
-
if (i === this.activeStep
|
|
18855
|
+
if (i === this.activeStep) {
|
|
18782
18856
|
itemElement.classList.add(SELECTED$2);
|
|
18783
18857
|
}
|
|
18784
18858
|
if (this.activeStep >= 0 && this.progressbar) {
|
|
@@ -18840,7 +18914,7 @@ let Stepper = class Stepper extends StepperBase {
|
|
|
18840
18914
|
}
|
|
18841
18915
|
const prevOnChange = this.isProtectedOnChange;
|
|
18842
18916
|
this.isProtectedOnChange = true;
|
|
18843
|
-
if (isUpdated
|
|
18917
|
+
if (isUpdated !== false) {
|
|
18844
18918
|
if (i < this.activeStep || (this.steps.length - 1 === this.activeStep && item.status.toLowerCase() === "completed")) {
|
|
18845
18919
|
item.status = StepStatus.Completed;
|
|
18846
18920
|
}
|
|
@@ -18949,17 +19023,12 @@ let Stepper = class Stepper extends StepperBase {
|
|
|
18949
19023
|
switch (e.action) {
|
|
18950
19024
|
case 'uparrow':
|
|
18951
19025
|
case 'downarrow':
|
|
18952
|
-
if (this.element.classList.contains(VERTICALSTEP)) {
|
|
18953
|
-
this.handleNavigation(e.action === 'uparrow' ? false : true, e);
|
|
18954
|
-
}
|
|
18955
|
-
break;
|
|
18956
19026
|
case 'leftarrow':
|
|
18957
19027
|
case 'rightarrow':
|
|
18958
|
-
if (this.element.classList.contains(HORIZSTEP)) {
|
|
18959
|
-
this.handleNavigation(this.enableRtl ? e.action === 'leftarrow' : e.action === 'rightarrow', e);
|
|
18960
|
-
}
|
|
18961
|
-
break;
|
|
18962
19028
|
case 'tab':
|
|
19029
|
+
case 'shiftTab':
|
|
19030
|
+
this.handleNavigation(this.enableRtl && this.element.classList.contains(HORIZSTEP) ? (e.action === 'leftarrow' || e.action === 'shiftTab' || e.action === 'uparrow') : (e.action === 'rightarrow' || e.action === 'tab' || e.action === 'downarrow'), e);
|
|
19031
|
+
break;
|
|
18963
19032
|
case 'space':
|
|
18964
19033
|
case 'enter':
|
|
18965
19034
|
case 'escape':
|
|
@@ -18980,11 +19049,22 @@ let Stepper = class Stepper extends StepperBase {
|
|
|
18980
19049
|
}
|
|
18981
19050
|
const stepItems = Array.prototype.slice.call(this.stepperItemList.children);
|
|
18982
19051
|
let index = stepItems.indexOf(focusedEle);
|
|
18983
|
-
if (e.action === 'tab' || e.action === '
|
|
19052
|
+
if (e.action === 'tab' || e.action === 'shiftTab' || e.action === 'downarrow' || e.action === 'uparrow' || e.action === 'space' || e.action === 'home' || e.action === 'end') {
|
|
19053
|
+
if ((e.action === 'tab' && index === stepItems.length - 1) || (e.action === 'shiftTab' && index === 0)) {
|
|
19054
|
+
if (focusedEle.classList.contains(FOCUS$1)) {
|
|
19055
|
+
this.updateStepFocus();
|
|
19056
|
+
return;
|
|
19057
|
+
}
|
|
19058
|
+
}
|
|
19059
|
+
else {
|
|
19060
|
+
e.preventDefault();
|
|
19061
|
+
}
|
|
19062
|
+
}
|
|
19063
|
+
if (e.action === 'escape') {
|
|
18984
19064
|
stepItems[parseInt(index.toString(), 10)].classList.remove(FOCUS$1);
|
|
18985
19065
|
this.element.classList.remove('e-steps-focus');
|
|
18986
19066
|
}
|
|
18987
|
-
if (!(e.action === 'space' || e.action === 'enter'
|
|
19067
|
+
if (!(e.action === 'space' || e.action === 'enter')) {
|
|
18988
19068
|
const prevIndex = index;
|
|
18989
19069
|
index = isNextStep ? index + 1 : index - 1;
|
|
18990
19070
|
while ((index >= 0 && index < stepItems.length) && stepItems[parseInt(index.toString(), 10)].classList.contains(DISABLED$2)) {
|
|
@@ -19007,14 +19087,21 @@ let Stepper = class Stepper extends StepperBase {
|
|
|
19007
19087
|
}
|
|
19008
19088
|
}
|
|
19009
19089
|
else if ((e.action === 'space' || e.action === 'enter')) {
|
|
19090
|
+
let isupdateFocus = false;
|
|
19010
19091
|
if (this.linear) {
|
|
19011
19092
|
const linearModeValue = this.activeStep - index;
|
|
19012
19093
|
if (Math.abs(linearModeValue) === 1) {
|
|
19013
19094
|
this.navigateToStep(index, null, null, true);
|
|
19095
|
+
isupdateFocus = true;
|
|
19014
19096
|
}
|
|
19015
19097
|
}
|
|
19016
19098
|
else {
|
|
19017
19099
|
this.navigateToStep(index, null, null, true);
|
|
19100
|
+
isupdateFocus = true;
|
|
19101
|
+
}
|
|
19102
|
+
if (isupdateFocus) {
|
|
19103
|
+
this.updateStepFocus();
|
|
19104
|
+
this.stepperItemElements[index].focus();
|
|
19018
19105
|
}
|
|
19019
19106
|
}
|
|
19020
19107
|
}
|