@syncfusion/ej2-navigations 34.2.2 → 34.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/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 +121 -32
- package/dist/es6/ej2-navigations.es2015.js.map +1 -1
- package/dist/es6/ej2-navigations.es5.js +121 -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 +2 -2
- package/src/common/menu-base.js +14 -6
- package/src/treeview/treeview-model.d.ts +1 -0
- package/src/treeview/treeview.d.ts +14 -1
- package/src/treeview/treeview.js +107 -26
- package/styles/bds-lite.css +3 -0
- package/styles/bds.css +3 -0
- package/styles/bootstrap-dark-lite.css +3 -0
- package/styles/bootstrap-dark.css +3 -0
- package/styles/bootstrap-lite.css +3 -0
- package/styles/bootstrap.css +3 -0
- package/styles/bootstrap4-lite.css +3 -0
- package/styles/bootstrap4.css +3 -0
- package/styles/bootstrap5-dark-lite.css +3 -0
- package/styles/bootstrap5-dark.css +3 -0
- package/styles/bootstrap5-lite.css +3 -0
- package/styles/bootstrap5.3-lite.css +3 -0
- package/styles/bootstrap5.3.css +3 -0
- package/styles/bootstrap5.css +3 -0
- package/styles/fabric-dark-lite.css +3 -0
- package/styles/fabric-dark.css +3 -0
- package/styles/fabric-lite.css +3 -0
- package/styles/fabric.css +3 -0
- package/styles/fluent-dark-lite.css +3 -0
- package/styles/fluent-dark.css +3 -0
- package/styles/fluent-lite.css +3 -0
- package/styles/fluent.css +3 -0
- package/styles/fluent2-lite.css +3 -0
- package/styles/fluent2.css +3 -0
- package/styles/highcontrast-light-lite.css +3 -0
- package/styles/highcontrast-light.css +3 -0
- package/styles/highcontrast-lite.css +3 -0
- package/styles/highcontrast.css +3 -0
- package/styles/material-dark-lite.css +3 -0
- package/styles/material-dark.css +3 -0
- package/styles/material-lite.css +3 -0
- package/styles/material.css +3 -0
- package/styles/material3-dark-lite.css +3 -0
- package/styles/material3-dark.css +3 -0
- package/styles/material3-lite.css +3 -0
- package/styles/material3.css +3 -0
- package/styles/tailwind-dark-lite.css +3 -0
- package/styles/tailwind-dark.css +3 -0
- package/styles/tailwind-lite.css +3 -0
- package/styles/tailwind.css +3 -0
- package/styles/tailwind3-lite.css +3 -0
- package/styles/tailwind3.css +3 -0
- package/styles/toolbar/_layout.scss +4 -0
- package/styles/toolbar/bds.css +3 -0
- package/styles/toolbar/bootstrap-dark.css +3 -0
- package/styles/toolbar/bootstrap.css +3 -0
- package/styles/toolbar/bootstrap4.css +3 -0
- package/styles/toolbar/bootstrap5-dark.css +3 -0
- package/styles/toolbar/bootstrap5.3.css +3 -0
- package/styles/toolbar/bootstrap5.css +3 -0
- package/styles/toolbar/fabric-dark.css +3 -0
- package/styles/toolbar/fabric.css +3 -0
- package/styles/toolbar/fluent-dark.css +3 -0
- package/styles/toolbar/fluent.css +3 -0
- package/styles/toolbar/fluent2.css +3 -0
- package/styles/toolbar/highcontrast-light.css +3 -0
- package/styles/toolbar/highcontrast.css +3 -0
- package/styles/toolbar/material-dark.css +3 -0
- package/styles/toolbar/material.css +3 -0
- package/styles/toolbar/material3-dark.css +3 -0
- package/styles/toolbar/material3.css +3 -0
- package/styles/toolbar/tailwind-dark.css +3 -0
- package/styles/toolbar/tailwind.css +3 -0
- package/styles/toolbar/tailwind3.css +3 -0
package/dist/global/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* filename: index.d.ts
|
|
3
|
-
* version : 34.2.
|
|
3
|
+
* version : 34.2.3
|
|
4
4
|
* Copyright Syncfusion Inc. 2001 - 2025. All rights reserved.
|
|
5
5
|
* Use of this code is subject to the terms of our license.
|
|
6
6
|
* A copy of the current license can be obtained at any time by e-mailing
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@syncfusion/ej2-navigations",
|
|
3
|
-
"version": "34.2.
|
|
3
|
+
"version": "34.2.3",
|
|
4
4
|
"description": "A package of Essential JS 2 navigation components such as Tree-view, Tab, Toolbar, Context-menu, and Accordion which is used to navigate from one page to another",
|
|
5
5
|
"author": "Syncfusion Inc.",
|
|
6
6
|
"license": "SEE LICENSE IN license",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"@syncfusion/ej2-inputs": "~34.2.2",
|
|
15
15
|
"@syncfusion/ej2-lists": "~34.2.2",
|
|
16
16
|
"@syncfusion/ej2-notifications": "~34.2.2",
|
|
17
|
-
"@syncfusion/ej2-popups": "~34.2.
|
|
17
|
+
"@syncfusion/ej2-popups": "~34.2.3"
|
|
18
18
|
},
|
|
19
19
|
"devDependencies": {},
|
|
20
20
|
"keywords": [
|
package/src/common/menu-base.js
CHANGED
|
@@ -437,8 +437,10 @@ var MenuBase = /** @class */ (function (_super) {
|
|
|
437
437
|
if (!active) {
|
|
438
438
|
return;
|
|
439
439
|
}
|
|
440
|
+
var isInputElement = active.tagName === 'INPUT' || active.tagName === 'TEXTAREA' ||
|
|
441
|
+
active.contentEditable === 'true';
|
|
440
442
|
var expanded = active.getAttribute('aria-expanded') === 'true';
|
|
441
|
-
if (!expanded) {
|
|
443
|
+
if (!expanded || isInputElement) {
|
|
442
444
|
return;
|
|
443
445
|
}
|
|
444
446
|
var ul = this.element;
|
|
@@ -552,13 +554,19 @@ var MenuBase = /** @class */ (function (_super) {
|
|
|
552
554
|
var cli = cul.children[fliIdx];
|
|
553
555
|
fliIdx = this.isValidLI(cli, fliIdx, e.action);
|
|
554
556
|
cul.children[fliIdx].classList.add(FOCUSED);
|
|
555
|
-
cul.children[fliIdx]
|
|
557
|
+
var liToFocus = cul.children[fliIdx];
|
|
556
558
|
if (closest(this.element, '.e-popup')) {
|
|
557
|
-
var
|
|
558
|
-
var
|
|
559
|
-
if (!
|
|
560
|
-
|
|
559
|
+
var focusableChild = liToFocus.querySelector('[tabindex], span[tabindex], a, button, [tabindex]:not([tabindex="-1"])');
|
|
560
|
+
var isSpreadsheet = this.element.id.includes('_cf_menu') && this.element.parentElement.classList.contains('e-cf-menu');
|
|
561
|
+
if (focusableChild && !isSpreadsheet) {
|
|
562
|
+
focusableChild.focus();
|
|
561
563
|
}
|
|
564
|
+
else {
|
|
565
|
+
liToFocus.focus();
|
|
566
|
+
}
|
|
567
|
+
}
|
|
568
|
+
else {
|
|
569
|
+
liToFocus.focus();
|
|
562
570
|
}
|
|
563
571
|
};
|
|
564
572
|
MenuBase.prototype.isValidLI = function (cli, index, action) {
|
|
@@ -662,6 +662,7 @@ export declare class TreeView extends Component<HTMLElement> implements INotifyP
|
|
|
662
662
|
* This value is used to calculate the virtual viewport and the total scrollable height.
|
|
663
663
|
*
|
|
664
664
|
* @default undefined
|
|
665
|
+
* @aspType string
|
|
665
666
|
*/
|
|
666
667
|
height: string | number;
|
|
667
668
|
/**
|
|
@@ -1622,13 +1623,25 @@ export declare class TreeView extends Component<HTMLElement> implements INotifyP
|
|
|
1622
1623
|
* @private
|
|
1623
1624
|
*/
|
|
1624
1625
|
private ensureVirtualNodeVisible;
|
|
1626
|
+
/**
|
|
1627
|
+
* Recursively walks the treeData (and any nested `childFieldName` arrays) to
|
|
1628
|
+
* find the node whose `idFieldName` matches the given `id` (compared as
|
|
1629
|
+
* strings). Used by the virtual-mode expand/collapse handlers so they can
|
|
1630
|
+
* locate nodes at any depth — not just the root level — before writing the
|
|
1631
|
+
* `expanded` flag back to the datasource.
|
|
1632
|
+
*
|
|
1633
|
+
* @param {string} id - The id (as a string) of the node to locate.
|
|
1634
|
+
* @returns {Object | null} The matching raw datasource node, or null if not found.
|
|
1635
|
+
* @private
|
|
1636
|
+
*/
|
|
1637
|
+
private findNodeInTreeData;
|
|
1625
1638
|
private handleVirtualExpand;
|
|
1626
1639
|
private handleVirtualCollapse;
|
|
1627
1640
|
/**
|
|
1628
1641
|
* Updates the selected state of a node in `virtualFlatNodes` and re-renders the window.
|
|
1629
1642
|
*
|
|
1630
1643
|
* @param {string} id - The `data-uid` of the target node.
|
|
1631
|
-
* @param {boolean}
|
|
1644
|
+
* @param {boolean} selected - Whether the node is now selected.
|
|
1632
1645
|
* @returns {void}
|
|
1633
1646
|
* @private
|
|
1634
1647
|
*/
|
package/src/treeview/treeview.js
CHANGED
|
@@ -1707,7 +1707,9 @@ var TreeView = /** @class */ (function (_super) {
|
|
|
1707
1707
|
this.virtualIndeterminateNodesSet.delete(id);
|
|
1708
1708
|
this.virtualCheckedNodesSet.delete(id);
|
|
1709
1709
|
this.virtualFlatNodes[parseInt(actualIndex.toString(), 10)].isChecked = false;
|
|
1710
|
-
this.treeData
|
|
1710
|
+
if (this.treeData && this.fields && this.fields.isChecked) {
|
|
1711
|
+
setValue(this.fields.isChecked, false, this.treeData[parseInt(id.toString(), 10) - 1]);
|
|
1712
|
+
}
|
|
1711
1713
|
if (this.autoCheck && this.virtualFlatNodes[parseInt(actualIndex.toString(), 10)].hasChildren) {
|
|
1712
1714
|
this.setVirtualChildCheckState(id, false);
|
|
1713
1715
|
}
|
|
@@ -2656,6 +2658,13 @@ var TreeView = /** @class */ (function (_super) {
|
|
|
2656
2658
|
if (!isNOU(id) && this.selectedNodes.indexOf(id) === -1) {
|
|
2657
2659
|
this.selectedNodes.push(id);
|
|
2658
2660
|
}
|
|
2661
|
+
if (this.enableVirtualization && !isNOU(this.height)) {
|
|
2662
|
+
this.virtualSelectedNodesSet.add(id);
|
|
2663
|
+
var actualIndex = this.virtualNodeMap.get(id);
|
|
2664
|
+
if (actualIndex && actualIndex > -1) {
|
|
2665
|
+
this.virtualFlatNodes[parseInt(actualIndex.toString(), 10)].selected = true;
|
|
2666
|
+
}
|
|
2667
|
+
}
|
|
2659
2668
|
};
|
|
2660
2669
|
TreeView.prototype.removeSelect = function (liEle) {
|
|
2661
2670
|
if (this.allowMultiSelection) {
|
|
@@ -2669,6 +2678,14 @@ var TreeView = /** @class */ (function (_super) {
|
|
|
2669
2678
|
if (index > -1) {
|
|
2670
2679
|
this.selectedNodes.splice(index, 1);
|
|
2671
2680
|
}
|
|
2681
|
+
if (this.enableVirtualization && !isNOU(this.height)) {
|
|
2682
|
+
var id = liEle.getAttribute('data-uid');
|
|
2683
|
+
this.virtualSelectedNodesSet.delete(id);
|
|
2684
|
+
var actualIndex = this.virtualNodeMap.get(id);
|
|
2685
|
+
if (actualIndex && actualIndex > -1) {
|
|
2686
|
+
this.virtualFlatNodes[parseInt(actualIndex.toString(), 10)].selected = false;
|
|
2687
|
+
}
|
|
2688
|
+
}
|
|
2672
2689
|
};
|
|
2673
2690
|
TreeView.prototype.removeSelectAll = function () {
|
|
2674
2691
|
var selectedLI = this.element.querySelectorAll('.' + ACTIVE);
|
|
@@ -2683,6 +2700,15 @@ var TreeView = /** @class */ (function (_super) {
|
|
|
2683
2700
|
}
|
|
2684
2701
|
removeClass(selectedLI, ACTIVE);
|
|
2685
2702
|
this.setProperties({ selectedNodes: [] }, true);
|
|
2703
|
+
if (this.enableVirtualization && !isNOU(this.height)) {
|
|
2704
|
+
this.virtualSelectedNodesSet.clear();
|
|
2705
|
+
for (var i = 0; i < this.virtualFlatNodes.length; i++) {
|
|
2706
|
+
var node = this.virtualFlatNodes[parseInt(i.toString(), 10)];
|
|
2707
|
+
if (node.selected) {
|
|
2708
|
+
node.selected = false;
|
|
2709
|
+
}
|
|
2710
|
+
}
|
|
2711
|
+
}
|
|
2686
2712
|
};
|
|
2687
2713
|
TreeView.prototype.getSelectEvent = function (currLi, action, e) {
|
|
2688
2714
|
var nodeData = this.getNodeData(currLi);
|
|
@@ -5668,6 +5694,7 @@ var TreeView = /** @class */ (function (_super) {
|
|
|
5668
5694
|
var imageUrlFieldName = this.fields.imageUrl;
|
|
5669
5695
|
var idFieldName = this.fields.id;
|
|
5670
5696
|
var textFieldName = this.fields.text;
|
|
5697
|
+
var selectedFieldName = this.fields.selected;
|
|
5671
5698
|
var needsSorting = this.sortOrder !== 'None';
|
|
5672
5699
|
var isDataTypeFlat = this.dataType === 1;
|
|
5673
5700
|
var enableVirtualization = this.enableVirtualization;
|
|
@@ -5678,7 +5705,7 @@ var TreeView = /** @class */ (function (_super) {
|
|
|
5678
5705
|
// Use expandedNodes as the single source of truth.
|
|
5679
5706
|
var inExpandedNodes = this.virtualExpandedNodesSet.has(id);
|
|
5680
5707
|
var rawExpanded = !inExpandedNodes && getValue(expandedFieldName, raw) === true;
|
|
5681
|
-
var
|
|
5708
|
+
var expanded = inExpandedNodes || rawExpanded;
|
|
5682
5709
|
if (rawExpanded && id) {
|
|
5683
5710
|
this.expandedNodes.push(id);
|
|
5684
5711
|
this.virtualExpandedNodesSet.add(id);
|
|
@@ -5705,24 +5732,32 @@ var TreeView = /** @class */ (function (_super) {
|
|
|
5705
5732
|
}
|
|
5706
5733
|
}
|
|
5707
5734
|
}
|
|
5735
|
+
if (this.initialRender && enableVirtualization && id && selectedFieldName && !this.virtualSelectedNodesSet.has(id)) {
|
|
5736
|
+
var rawSelected = getValue(selectedFieldName, raw);
|
|
5737
|
+
if (!isNullOrUndefined(rawSelected) && rawSelected.toString() === 'true') {
|
|
5738
|
+
this.virtualSelectedNodesSet.add(id);
|
|
5739
|
+
if (this.selectedNodes && this.selectedNodes.indexOf(id) === -1) {
|
|
5740
|
+
this.selectedNodes.push(id);
|
|
5741
|
+
}
|
|
5742
|
+
}
|
|
5743
|
+
}
|
|
5708
5744
|
// Use cached Sets for O(1) lookup
|
|
5709
|
-
var
|
|
5745
|
+
var selected = this.virtualSelectedNodesSet.has(id);
|
|
5710
5746
|
// Resolve checkbox state: indeterminate takes precedence over the checked set,
|
|
5711
5747
|
// because a node can be in the indeterminate state without being in checkedNodes.
|
|
5712
5748
|
var isChecked = (enableVirtualization && this.virtualIndeterminateNodesSet.has(id))
|
|
5713
5749
|
? 'indeterminate'
|
|
5714
5750
|
: this.virtualCheckedNodesSet.has(id);
|
|
5715
|
-
var isDisabled = false; // TODO: Check if any per-node disabled field exists
|
|
5716
5751
|
var iconCssVal = raw[iconCssFieldName];
|
|
5717
5752
|
var iconCss = isNOU(iconCssVal) ? '' : iconCssVal.toString();
|
|
5718
5753
|
var imageUrlVal = raw[imageUrlFieldName];
|
|
5719
5754
|
var imageUrl = isNOU(imageUrlVal) ? '' : imageUrlVal.toString();
|
|
5720
5755
|
var node = {
|
|
5721
|
-
id: id, text: text, level: level, parentId: parentId, hasChildren: hasChildren,
|
|
5722
|
-
|
|
5756
|
+
id: id, text: text, level: level, parentId: parentId, hasChildren: hasChildren, expanded: expanded,
|
|
5757
|
+
selected: selected, isChecked: isChecked, iconCss: iconCss, imageUrl: imageUrl
|
|
5723
5758
|
};
|
|
5724
5759
|
result.push(node);
|
|
5725
|
-
if (
|
|
5760
|
+
if (expanded && hasChildren) {
|
|
5726
5761
|
// Determine children list
|
|
5727
5762
|
var children = [];
|
|
5728
5763
|
if (isDataTypeFlat) {
|
|
@@ -5932,7 +5967,7 @@ var TreeView = /** @class */ (function (_super) {
|
|
|
5932
5967
|
targetUl.appendChild(li);
|
|
5933
5968
|
liListBuf.push(li);
|
|
5934
5969
|
// Register this node so its children in the same window can nest under it
|
|
5935
|
-
if (node.
|
|
5970
|
+
if (node.expanded && node.hasChildren) {
|
|
5936
5971
|
renderedParentMap.set(node.id, { li: li, childUl: null });
|
|
5937
5972
|
}
|
|
5938
5973
|
}
|
|
@@ -6027,7 +6062,7 @@ var TreeView = /** @class */ (function (_super) {
|
|
|
6027
6062
|
// Expand/collapse icon
|
|
6028
6063
|
if (node.hasChildren) {
|
|
6029
6064
|
var iconSpan = this.createElement('div', {
|
|
6030
|
-
className: ICON + ' ' + (node.
|
|
6065
|
+
className: ICON + ' ' + (node.expanded ? COLLAPSIBLE : EXPANDABLE)
|
|
6031
6066
|
});
|
|
6032
6067
|
textWrap.appendChild(iconSpan);
|
|
6033
6068
|
}
|
|
@@ -6066,8 +6101,16 @@ var TreeView = /** @class */ (function (_super) {
|
|
|
6066
6101
|
});
|
|
6067
6102
|
textWrap.appendChild(anchor);
|
|
6068
6103
|
li.appendChild(textWrap);
|
|
6104
|
+
// nodeTemplate
|
|
6105
|
+
if (!isNOU(this.nodeTemplateFn)) {
|
|
6106
|
+
var rawData = this.findNodeInTreeData(node.id);
|
|
6107
|
+
if (!isNOU(rawData)) {
|
|
6108
|
+
anchor.innerHTML = '';
|
|
6109
|
+
this.renderNodeTemplate(rawData, anchor, node.id);
|
|
6110
|
+
}
|
|
6111
|
+
}
|
|
6069
6112
|
// State classes
|
|
6070
|
-
if (node.
|
|
6113
|
+
if (node.expanded) {
|
|
6071
6114
|
li.classList.add(EXPANDED);
|
|
6072
6115
|
li.setAttribute('aria-expanded', 'true');
|
|
6073
6116
|
}
|
|
@@ -6075,14 +6118,10 @@ var TreeView = /** @class */ (function (_super) {
|
|
|
6075
6118
|
li.classList.add(NODECOLLAPSED);
|
|
6076
6119
|
li.setAttribute('aria-expanded', 'false');
|
|
6077
6120
|
}
|
|
6078
|
-
if (node.
|
|
6121
|
+
if (node.selected) {
|
|
6079
6122
|
li.classList.add(ACTIVE);
|
|
6080
6123
|
li.setAttribute('aria-selected', 'true');
|
|
6081
6124
|
}
|
|
6082
|
-
if (node.isDisabled) {
|
|
6083
|
-
li.classList.add(DISABLED);
|
|
6084
|
-
li.setAttribute('aria-disabled', 'true');
|
|
6085
|
-
}
|
|
6086
6125
|
if (node.hasChildren) {
|
|
6087
6126
|
li.classList.add(CHILD);
|
|
6088
6127
|
}
|
|
@@ -6385,6 +6424,44 @@ var TreeView = /** @class */ (function (_super) {
|
|
|
6385
6424
|
this.virtualEndIndex = win.endIndex;
|
|
6386
6425
|
this.renderVirtualItems();
|
|
6387
6426
|
};
|
|
6427
|
+
/**
|
|
6428
|
+
* Recursively walks the treeData (and any nested `childFieldName` arrays) to
|
|
6429
|
+
* find the node whose `idFieldName` matches the given `id` (compared as
|
|
6430
|
+
* strings). Used by the virtual-mode expand/collapse handlers so they can
|
|
6431
|
+
* locate nodes at any depth — not just the root level — before writing the
|
|
6432
|
+
* `expanded` flag back to the datasource.
|
|
6433
|
+
*
|
|
6434
|
+
* @param {string} id - The id (as a string) of the node to locate.
|
|
6435
|
+
* @returns {Object | null} The matching raw datasource node, or null if not found.
|
|
6436
|
+
* @private
|
|
6437
|
+
*/
|
|
6438
|
+
TreeView.prototype.findNodeInTreeData = function (id) {
|
|
6439
|
+
if (!this.treeData) {
|
|
6440
|
+
return null;
|
|
6441
|
+
}
|
|
6442
|
+
var idFieldName = this.fields.id.toString();
|
|
6443
|
+
var childFieldName = this.fields.child.toString();
|
|
6444
|
+
var findRecursive = function (nodes) {
|
|
6445
|
+
if (!nodes || nodes.length === 0) {
|
|
6446
|
+
return null;
|
|
6447
|
+
}
|
|
6448
|
+
for (var i = 0; i < nodes.length; i++) {
|
|
6449
|
+
var node = nodes[i];
|
|
6450
|
+
if (node[idFieldName] && node[idFieldName].toString() === id) {
|
|
6451
|
+
return node;
|
|
6452
|
+
}
|
|
6453
|
+
var children = getValue(childFieldName, node);
|
|
6454
|
+
if (children && Array.isArray(children)) {
|
|
6455
|
+
var found = findRecursive(children);
|
|
6456
|
+
if (found) {
|
|
6457
|
+
return found;
|
|
6458
|
+
}
|
|
6459
|
+
}
|
|
6460
|
+
}
|
|
6461
|
+
return null;
|
|
6462
|
+
};
|
|
6463
|
+
return findRecursive(this.treeData);
|
|
6464
|
+
};
|
|
6388
6465
|
TreeView.prototype.handleVirtualExpand = function (id, isKeyboardNav) {
|
|
6389
6466
|
// ── Cancel any pending scroll RAF ─────────────────────────────────────────
|
|
6390
6467
|
// A scroll RAF queued before the expand click would run asynchronously after
|
|
@@ -6402,9 +6479,11 @@ var TreeView = /** @class */ (function (_super) {
|
|
|
6402
6479
|
if (this.virtualExpandedNodesSet) {
|
|
6403
6480
|
this.virtualExpandedNodesSet.add(id);
|
|
6404
6481
|
}
|
|
6405
|
-
if (this.
|
|
6406
|
-
var acutalRootData = this.
|
|
6407
|
-
acutalRootData.
|
|
6482
|
+
if (this.treeData) {
|
|
6483
|
+
var acutalRootData = this.findNodeInTreeData(id);
|
|
6484
|
+
if (acutalRootData && this.fields && this.fields.expanded) {
|
|
6485
|
+
setValue(this.fields.expanded, true, acutalRootData);
|
|
6486
|
+
}
|
|
6408
6487
|
}
|
|
6409
6488
|
// ── Fix: Pin focused ID to the expanding node for keyboard navigation ──
|
|
6410
6489
|
// When keyboard-triggered, the expanded node IS definitively the focused node
|
|
@@ -6483,9 +6562,11 @@ var TreeView = /** @class */ (function (_super) {
|
|
|
6483
6562
|
if (this.virtualExpandedNodesSet) {
|
|
6484
6563
|
this.virtualExpandedNodesSet.delete(id);
|
|
6485
6564
|
}
|
|
6486
|
-
if (this.
|
|
6487
|
-
var acutalRootData = this.
|
|
6488
|
-
acutalRootData.
|
|
6565
|
+
if (this.treeData) {
|
|
6566
|
+
var acutalRootData = this.findNodeInTreeData(id);
|
|
6567
|
+
if (acutalRootData && this.fields && this.fields.expanded) {
|
|
6568
|
+
setValue(this.fields.expanded, false, acutalRootData);
|
|
6569
|
+
}
|
|
6489
6570
|
}
|
|
6490
6571
|
// ── Fix: Pin focused ID to the collapsing node for keyboard navigation ──
|
|
6491
6572
|
// Same reasoning as handleVirtualExpand: when keyboard-triggered, `id` is
|
|
@@ -6539,14 +6620,14 @@ var TreeView = /** @class */ (function (_super) {
|
|
|
6539
6620
|
* Updates the selected state of a node in `virtualFlatNodes` and re-renders the window.
|
|
6540
6621
|
*
|
|
6541
6622
|
* @param {string} id - The `data-uid` of the target node.
|
|
6542
|
-
* @param {boolean}
|
|
6623
|
+
* @param {boolean} selected - Whether the node is now selected.
|
|
6543
6624
|
* @returns {void}
|
|
6544
6625
|
* @private
|
|
6545
6626
|
*/
|
|
6546
|
-
TreeView.prototype.updateVirtualNodeSelection = function (id,
|
|
6627
|
+
TreeView.prototype.updateVirtualNodeSelection = function (id, selected) {
|
|
6547
6628
|
var idx = this.virtualNodeMap.get(id);
|
|
6548
6629
|
if (!isNOU(idx)) {
|
|
6549
|
-
this.virtualFlatNodes[parseInt(idx.toString(), 10)].
|
|
6630
|
+
this.virtualFlatNodes[parseInt(idx.toString(), 10)].selected = selected;
|
|
6550
6631
|
this.renderVirtualItems();
|
|
6551
6632
|
}
|
|
6552
6633
|
};
|
|
@@ -6914,7 +6995,7 @@ var TreeView = /** @class */ (function (_super) {
|
|
|
6914
6995
|
}
|
|
6915
6996
|
for (var i = 0; i < nodes.length; i++) {
|
|
6916
6997
|
var node = nodes[parseInt(i.toString(), 10)];
|
|
6917
|
-
node['
|
|
6998
|
+
node['expanded'] = false;
|
|
6918
6999
|
var children = getValue(_this.fields.child.toString(), node);
|
|
6919
7000
|
if (children && Array.isArray(children)) {
|
|
6920
7001
|
setAllCollapsed_1(children);
|
|
@@ -7014,7 +7095,7 @@ var TreeView = /** @class */ (function (_super) {
|
|
|
7014
7095
|
var nodeId = getValue(idFieldName_1, node);
|
|
7015
7096
|
if (node.hasChild) {
|
|
7016
7097
|
allParentIds_1.push(nodeId);
|
|
7017
|
-
node.
|
|
7098
|
+
node.expanded = true;
|
|
7018
7099
|
}
|
|
7019
7100
|
}
|
|
7020
7101
|
};
|
package/styles/bds-lite.css
CHANGED
package/styles/bds.css
CHANGED
package/styles/bootstrap.css
CHANGED
package/styles/bootstrap4.css
CHANGED
package/styles/bootstrap5.3.css
CHANGED
package/styles/bootstrap5.css
CHANGED
package/styles/fabric-dark.css
CHANGED
package/styles/fabric-lite.css
CHANGED
package/styles/fabric.css
CHANGED
package/styles/fluent-dark.css
CHANGED
package/styles/fluent-lite.css
CHANGED
package/styles/fluent.css
CHANGED
package/styles/fluent2-lite.css
CHANGED
package/styles/fluent2.css
CHANGED