@agorapulse/ui-components 20.3.46 → 20.3.48
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/agorapulse-ui-components-20.3.48.tgz +0 -0
- package/fesm2022/agorapulse-ui-components-nav-selector.mjs +9 -9
- package/fesm2022/agorapulse-ui-components-nav-selector.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-selection-dropdown.mjs +12 -3
- package/fesm2022/agorapulse-ui-components-selection-dropdown.mjs.map +1 -1
- package/package.json +5 -5
- package/selection-dropdown/index.d.ts +3 -0
- package/agorapulse-ui-components-20.3.46.tgz +0 -0
|
Binary file
|
|
@@ -1036,9 +1036,9 @@ class NavSelectorBuilder {
|
|
|
1036
1036
|
}
|
|
1037
1037
|
const displayTokenInvalid = children.some(({ displayTokenInvalid }) => displayTokenInvalid);
|
|
1038
1038
|
const selectedChildrenCount = children.filter(({ selected }) => selected).length;
|
|
1039
|
-
// A group is selected if
|
|
1039
|
+
// A group is selected if at least one child is selected AND all selectable children are selected
|
|
1040
1040
|
// (disabled children must still be selected to count)
|
|
1041
|
-
const selected = children.every(c => c.selected || !c.selectable);
|
|
1041
|
+
const selected = children.some(c => c.selected) && children.every(c => c.selected || !c.selectable);
|
|
1042
1042
|
return {
|
|
1043
1043
|
uid: node.uid,
|
|
1044
1044
|
alias: node.alias,
|
|
@@ -1159,9 +1159,9 @@ class NavSelectorBuilder {
|
|
|
1159
1159
|
}
|
|
1160
1160
|
else if (isInternalNavSelectorEntryAGroup(entry)) {
|
|
1161
1161
|
const children = this.setInitialSelection(entry.children, selectedEntryUids);
|
|
1162
|
-
// A group is selected if
|
|
1162
|
+
// A group is selected if at least one child is selected AND all selectable children are selected
|
|
1163
1163
|
// (disabled children must still be selected to count)
|
|
1164
|
-
const selected = children.every(c => c.selected || !c.selectable);
|
|
1164
|
+
const selected = children.some(c => c.selected) && children.every(c => c.selected || !c.selectable);
|
|
1165
1165
|
const undeterminedSelection = !selected && children.some(c => c.selected);
|
|
1166
1166
|
return {
|
|
1167
1167
|
...entry,
|
|
@@ -1503,7 +1503,7 @@ class NavSelectorMultiSelect {
|
|
|
1503
1503
|
}
|
|
1504
1504
|
else if (isInternalNavSelectorEntryAGroup(entry)) {
|
|
1505
1505
|
const children = entry.children.flatMap(child => this.selectOnlyALeafInMultipleMode([child], entryUid));
|
|
1506
|
-
const selected = children.every(child => child.selected || (isInternalNavSelectorEntryALeaf(child) && !child.selectable));
|
|
1506
|
+
const selected = children.some(child => child.selected) && children.every(child => child.selected || (isInternalNavSelectorEntryALeaf(child) && !child.selectable));
|
|
1507
1507
|
return {
|
|
1508
1508
|
...entry,
|
|
1509
1509
|
children,
|
|
@@ -1578,14 +1578,14 @@ class NavSelectorMultiSelect {
|
|
|
1578
1578
|
// because disabled items may have retained their selected state.
|
|
1579
1579
|
// A group is selected if all children are either selected or not selectable
|
|
1580
1580
|
// (disabled children must still be selected to count)
|
|
1581
|
-
selected = children.every(child => child.selected || (isInternalNavSelectorEntryALeaf(child) && !child.selectable));
|
|
1581
|
+
selected = children.some(child => child.selected) && children.every(child => child.selected || (isInternalNavSelectorEntryALeaf(child) && !child.selectable));
|
|
1582
1582
|
undeterminedSelection = !selected && children.some(child => child.selected);
|
|
1583
1583
|
}
|
|
1584
1584
|
else {
|
|
1585
1585
|
children = entry.children.map(child => this.toggleSelectLeaf(child, entryUid));
|
|
1586
1586
|
// A group is selected if all children are either selected or not selectable
|
|
1587
1587
|
// (disabled children must still be selected to count)
|
|
1588
|
-
selected = children.every(child => child.selected || (isInternalNavSelectorEntryALeaf(child) && !child.selectable));
|
|
1588
|
+
selected = children.some(child => child.selected) && children.every(child => child.selected || (isInternalNavSelectorEntryALeaf(child) && !child.selectable));
|
|
1589
1589
|
undeterminedSelection = !selected && children.some(child => child.selected);
|
|
1590
1590
|
}
|
|
1591
1591
|
return {
|
|
@@ -1638,7 +1638,7 @@ class NavSelectorMultiSelect {
|
|
|
1638
1638
|
// Recalculate group state based on children
|
|
1639
1639
|
// A group is selected if all children are either selected or not selectable
|
|
1640
1640
|
// (disabled children must still be selected to count)
|
|
1641
|
-
const selected = children.every(c => c.selected || (isInternalNavSelectorEntryALeaf(c) && !c.selectable));
|
|
1641
|
+
const selected = children.some(c => c.selected) && children.every(c => c.selected || (isInternalNavSelectorEntryALeaf(c) && !c.selectable));
|
|
1642
1642
|
const undeterminedSelection = !selected && children.some(c => c.selected);
|
|
1643
1643
|
return {
|
|
1644
1644
|
...child,
|
|
@@ -1670,7 +1670,7 @@ class NavSelectorMultiSelect {
|
|
|
1670
1670
|
// Recalculate group state based on children
|
|
1671
1671
|
// A group is selected if all children are either selected or not selectable
|
|
1672
1672
|
// (disabled children must still be selected to count)
|
|
1673
|
-
const selected = children.every(c => c.selected || (isInternalNavSelectorEntryALeaf(c) && !c.selectable));
|
|
1673
|
+
const selected = children.some(c => c.selected) && children.every(c => c.selected || (isInternalNavSelectorEntryALeaf(c) && !c.selectable));
|
|
1674
1674
|
const undeterminedSelection = !selected && children.some(c => c.selected);
|
|
1675
1675
|
return {
|
|
1676
1676
|
...child,
|