@homebound/beam 4.45.1 → 4.45.2
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/index.cjs +11 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +11 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -5888,6 +5888,8 @@ declare class RowState<R extends Kinded> {
|
|
|
5888
5888
|
get isSelected(): boolean;
|
|
5889
5889
|
/** This row's share of `TableState.selectedLeafRowCount`, see `GridDataRow.childrenCount`. */
|
|
5890
5890
|
get selectedLeafRowCount(): number;
|
|
5891
|
+
/** Whether a checked ancestor's `childrenCount` already includes this row. */
|
|
5892
|
+
private get isCountedByParent();
|
|
5891
5893
|
/** The UI state for checked/unchecked + "partially checked" for parents. */
|
|
5892
5894
|
get selectedState(): SelectedState;
|
|
5893
5895
|
/**
|
|
@@ -6035,7 +6037,7 @@ type GridDataRow<R extends Kinded> = {
|
|
|
6035
6037
|
selectable?: false;
|
|
6036
6038
|
/** Whether this row should infer its selected state based on its children's selected state */
|
|
6037
6039
|
inferSelectedState?: false;
|
|
6038
|
-
/** Total children, e.g. when they load lazily; a
|
|
6040
|
+
/** Total children, e.g. when they load lazily; a checked row counts as this many in `getSelectedLeafRowCount`. */
|
|
6039
6041
|
childrenCount?: number;
|
|
6040
6042
|
/** Whether this row is draggable, usually to allow drag & drop reordering of rows */
|
|
6041
6043
|
draggable?: boolean;
|
package/dist/index.d.ts
CHANGED
|
@@ -5888,6 +5888,8 @@ declare class RowState<R extends Kinded> {
|
|
|
5888
5888
|
get isSelected(): boolean;
|
|
5889
5889
|
/** This row's share of `TableState.selectedLeafRowCount`, see `GridDataRow.childrenCount`. */
|
|
5890
5890
|
get selectedLeafRowCount(): number;
|
|
5891
|
+
/** Whether a checked ancestor's `childrenCount` already includes this row. */
|
|
5892
|
+
private get isCountedByParent();
|
|
5891
5893
|
/** The UI state for checked/unchecked + "partially checked" for parents. */
|
|
5892
5894
|
get selectedState(): SelectedState;
|
|
5893
5895
|
/**
|
|
@@ -6035,7 +6037,7 @@ type GridDataRow<R extends Kinded> = {
|
|
|
6035
6037
|
selectable?: false;
|
|
6036
6038
|
/** Whether this row should infer its selected state based on its children's selected state */
|
|
6037
6039
|
inferSelectedState?: false;
|
|
6038
|
-
/** Total children, e.g. when they load lazily; a
|
|
6040
|
+
/** Total children, e.g. when they load lazily; a checked row counts as this many in `getSelectedLeafRowCount`. */
|
|
6039
6041
|
childrenCount?: number;
|
|
6040
6042
|
/** Whether this row is draggable, usually to allow drag & drop reordering of rows */
|
|
6041
6043
|
draggable?: boolean;
|
package/dist/index.js
CHANGED
|
@@ -8035,9 +8035,18 @@ var RowState = class {
|
|
|
8035
8035
|
}
|
|
8036
8036
|
/** This row's share of `TableState.selectedLeafRowCount`, see `GridDataRow.childrenCount`. */
|
|
8037
8037
|
get selectedLeafRowCount() {
|
|
8038
|
-
if (this.isReservedKind
|
|
8038
|
+
if (this.isReservedKind) return 0;
|
|
8039
|
+
const { childrenCount } = this.row;
|
|
8040
|
+
if (childrenCount !== void 0 && this.isSelected) return this.isCountedByParent ? 0 : childrenCount;
|
|
8041
|
+
if (!this.selected) return 0;
|
|
8039
8042
|
if (this.children?.some((c) => c.row.selectable !== false)) return 0;
|
|
8040
|
-
return this.
|
|
8043
|
+
return this.isCountedByParent ? 0 : 1;
|
|
8044
|
+
}
|
|
8045
|
+
/** Whether a checked ancestor's `childrenCount` already includes this row. */
|
|
8046
|
+
get isCountedByParent() {
|
|
8047
|
+
const { parent } = this;
|
|
8048
|
+
if (!parent || this.removed) return false;
|
|
8049
|
+
return parent.row.childrenCount !== void 0 && parent.isSelected || parent.isCountedByParent;
|
|
8041
8050
|
}
|
|
8042
8051
|
/** The UI state for checked/unchecked + "partially checked" for parents. */
|
|
8043
8052
|
get selectedState() {
|