@ai-matrx/design-system 0.86.366 → 0.86.368

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
@@ -8213,7 +8213,11 @@ var MULTI = "multi";
8213
8213
  function cellTextIsMultiline(cell) {
8214
8214
  const lineHeight = Number.parseFloat(getComputedStyle(cell).lineHeight);
8215
8215
  const minStep = Number.isFinite(lineHeight) ? lineHeight * 0.75 : 10;
8216
- const walker = cell.ownerDocument.createTreeWalker(cell, NodeFilter.SHOW_TEXT);
8216
+ const walker = cell.ownerDocument.createTreeWalker(
8217
+ cell,
8218
+ 4
8219
+ /* NodeFilter.SHOW_TEXT: the global is gone once a test env tears down */
8220
+ );
8217
8221
  const range = cell.ownerDocument.createRange();
8218
8222
  if (typeof range.getClientRects !== "function") return false;
8219
8223
  let firstTop = null;
@@ -11601,9 +11605,14 @@ function MatrxDataTableCore(coreProps) {
11601
11605
  };
11602
11606
  const selectionNoun = selection?.noun ?? "row";
11603
11607
  const selectionCount = allMatching && selectionMatchingTotal !== void 0 ? selectionMatchingTotal : selectedIdSet.size;
11604
- const offerSelectAllMatching = Boolean(selection) && !allMatching && allOnPageSelected && selectionMatchingTotal !== void 0 && selectionMatchingTotal > selectedIdSet.size;
11608
+ const offerSelectAllMatching = Boolean(selection) && selection?.selectAllMatching !== false && !allMatching && allOnPageSelected && selectionMatchingTotal !== void 0 && selectionMatchingTotal > selectedIdSet.size;
11605
11609
  const selectAllMatching = () => {
11606
11610
  if (!selection || selectionMatchingTotal === void 0) return;
11611
+ if (typeof selection.selectAllMatching === "function") {
11612
+ lastToggledIndex.current = null;
11613
+ selection.selectAllMatching();
11614
+ return;
11615
+ }
11607
11616
  lastToggledIndex.current = null;
11608
11617
  if (selectionMatchingTotal <= orderedRows.length) {
11609
11618
  const next = new Set(selectedIdSet);