@ai-matrx/design-system 0.86.366 → 0.86.367

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.
@@ -4003,6 +4003,13 @@ interface MatrxDataTableSelectionConfig<T> {
4003
4003
  allMatching?: boolean;
4004
4004
  /** Told whenever "all matching" turns on or off. */
4005
4005
  onAllMatchingChange?: (allMatching: boolean) => void;
4006
+ /**
4007
+ * WHO ANSWERS "Select all N" (a host that owns bulk selection, like the entity-list shell, has ONE
4008
+ * answer; its banner and this bar must never disagree). Omit: the table offers and runs its own.
4009
+ * `false`: the host cannot serve "everything matching" — the bar does not offer it. A function:
4010
+ * the host's resolver — the bar offers it and a click runs the host's, not the table's own.
4011
+ */
4012
+ selectAllMatching?: false | (() => void);
4006
4013
  /**
4007
4014
  * Rows that cannot be acted on in bulk render NO checkbox at all — the cell
4008
4015
  * stays for alignment, the control is absent from the DOM. A grayed control
@@ -4003,6 +4003,13 @@ interface MatrxDataTableSelectionConfig<T> {
4003
4003
  allMatching?: boolean;
4004
4004
  /** Told whenever "all matching" turns on or off. */
4005
4005
  onAllMatchingChange?: (allMatching: boolean) => void;
4006
+ /**
4007
+ * WHO ANSWERS "Select all N" (a host that owns bulk selection, like the entity-list shell, has ONE
4008
+ * answer; its banner and this bar must never disagree). Omit: the table offers and runs its own.
4009
+ * `false`: the host cannot serve "everything matching" — the bar does not offer it. A function:
4010
+ * the host's resolver — the bar offers it and a click runs the host's, not the table's own.
4011
+ */
4012
+ selectAllMatching?: false | (() => void);
4006
4013
  /**
4007
4014
  * Rows that cannot be acted on in bulk render NO checkbox at all — the cell
4008
4015
  * stays for alignment, the control is absent from the DOM. A grayed control
@@ -11601,9 +11601,14 @@ function MatrxDataTableCore(coreProps) {
11601
11601
  };
11602
11602
  const selectionNoun = selection?.noun ?? "row";
11603
11603
  const selectionCount = allMatching && selectionMatchingTotal !== void 0 ? selectionMatchingTotal : selectedIdSet.size;
11604
- const offerSelectAllMatching = Boolean(selection) && !allMatching && allOnPageSelected && selectionMatchingTotal !== void 0 && selectionMatchingTotal > selectedIdSet.size;
11604
+ const offerSelectAllMatching = Boolean(selection) && selection?.selectAllMatching !== false && !allMatching && allOnPageSelected && selectionMatchingTotal !== void 0 && selectionMatchingTotal > selectedIdSet.size;
11605
11605
  const selectAllMatching = () => {
11606
11606
  if (!selection || selectionMatchingTotal === void 0) return;
11607
+ if (typeof selection.selectAllMatching === "function") {
11608
+ lastToggledIndex.current = null;
11609
+ selection.selectAllMatching();
11610
+ return;
11611
+ }
11607
11612
  lastToggledIndex.current = null;
11608
11613
  if (selectionMatchingTotal <= orderedRows.length) {
11609
11614
  const next = new Set(selectedIdSet);