@ai-matrx/design-system 0.49.26 → 0.49.28

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/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.49.28
4
+
5
+ Automatic changed-only republish (docs/metadata drift since the last tag — see
6
+ `git diff npm/design-system/v0.49.27..npm/design-system/v0.49.28 -- apps/shared/design-system`).
7
+ No source changes intended and no consumer action required.
8
+
9
+ ## 0.49.27
10
+
11
+ Automatic changed-only republish (docs/metadata drift since the last tag — see
12
+ `git diff npm/design-system/v0.49.26..npm/design-system/v0.49.27 -- apps/shared/design-system`).
13
+ No source changes intended and no consumer action required.
14
+
3
15
  ## 0.49.26
4
16
 
5
17
  Automatic changed-only republish (docs/metadata drift since the last tag — see
@@ -1,5 +1,5 @@
1
1
  import { AgentPayloadInput } from './copy-types.cjs';
2
- import { g as MatrxDataTableCopyConfig, M as MatrxColumnDef } from '../layered-filters-frtWJUl5.cjs';
2
+ import { g as MatrxDataTableCopyConfig, M as MatrxColumnDef } from '../layered-filters-8S8wob5N.cjs';
3
3
  import '../content-transfer.cjs';
4
4
  import 'react';
5
5
  import '@ai-matrx/kit/content-transfer';
@@ -1,5 +1,5 @@
1
1
  import { AgentPayloadInput } from './copy-types.js';
2
- import { g as MatrxDataTableCopyConfig, M as MatrxColumnDef } from '../layered-filters-CKS15cIc.js';
2
+ import { g as MatrxDataTableCopyConfig, M as MatrxColumnDef } from '../layered-filters-CsbrucEC.js';
3
3
  import '../content-transfer.js';
4
4
  import 'react';
5
5
  import '@ai-matrx/kit/content-transfer';
@@ -1,4 +1,4 @@
1
- import { M as MatrxColumnDef, C as ColumnFiltersState, S as SortState, L as LayeredFilterRule, T as TableSearchMatchMode, a as ColumnFilterValue } from '../layered-filters-frtWJUl5.cjs';
1
+ import { M as MatrxColumnDef, C as ColumnFiltersState, S as SortState, L as LayeredFilterRule, T as TableSearchMatchMode, a as ColumnFilterValue } from '../layered-filters-8S8wob5N.cjs';
2
2
  import '../content-transfer.cjs';
3
3
  import 'react';
4
4
  import '@ai-matrx/kit/content-transfer';
@@ -1,4 +1,4 @@
1
- import { M as MatrxColumnDef, C as ColumnFiltersState, S as SortState, L as LayeredFilterRule, T as TableSearchMatchMode, a as ColumnFilterValue } from '../layered-filters-CKS15cIc.js';
1
+ import { M as MatrxColumnDef, C as ColumnFiltersState, S as SortState, L as LayeredFilterRule, T as TableSearchMatchMode, a as ColumnFilterValue } from '../layered-filters-CsbrucEC.js';
2
2
  import '../content-transfer.js';
3
3
  import 'react';
4
4
  import '@ai-matrx/kit/content-transfer';
@@ -2,7 +2,7 @@ import * as React from 'react';
2
2
  import { ComponentType, ReactNode, MouseEventHandler } from 'react';
3
3
  import { CopyControlProps } from './copy-types.cjs';
4
4
  export { AgentPayloadInput, AiCustomSource, AiVariant, CopyExportConfig } from './copy-types.cjs';
5
- import { b as TableSavedViewsProps, c as MatrxDataTableDensity, d as MatrxDataTableRecordControls } from '../layered-filters-frtWJUl5.cjs';
5
+ import { b as TableSavedViewsProps, c as MatrxDataTableDensity, d as MatrxDataTableRecordControls } from '../layered-filters-8S8wob5N.cjs';
6
6
  import { MatrxTableMenuTarget, MatrxTableMenuPayload, MatrxTableMenuSectionsResolver, MatrxTableMenuIconName } from './menu-targets.cjs';
7
7
  export { MatrxTableMenuItem, MatrxTableMenuSection } from './menu-targets.cjs';
8
8
  import '../content-transfer.cjs';
@@ -2,7 +2,7 @@ import * as React from 'react';
2
2
  import { ComponentType, ReactNode, MouseEventHandler } from 'react';
3
3
  import { CopyControlProps } from './copy-types.js';
4
4
  export { AgentPayloadInput, AiCustomSource, AiVariant, CopyExportConfig } from './copy-types.js';
5
- import { b as TableSavedViewsProps, c as MatrxDataTableDensity, d as MatrxDataTableRecordControls } from '../layered-filters-CKS15cIc.js';
5
+ import { b as TableSavedViewsProps, c as MatrxDataTableDensity, d as MatrxDataTableRecordControls } from '../layered-filters-CsbrucEC.js';
6
6
  import { MatrxTableMenuTarget, MatrxTableMenuPayload, MatrxTableMenuSectionsResolver, MatrxTableMenuIconName } from './menu-targets.js';
7
7
  export { MatrxTableMenuItem, MatrxTableMenuSection } from './menu-targets.js';
8
8
  import '../content-transfer.js';
@@ -43495,7 +43495,7 @@ function NumberFilterBody({
43495
43495
  onChange({ kind: "number", op: "between", min: low, max: high });
43496
43496
  return;
43497
43497
  }
43498
- if (low === void 0) return onChange(void 0);
43498
+ if (low === void 0) return onChange({ kind: "number", op: nextOp });
43499
43499
  if (nextOp === "eq") onChange({ kind: "number", op: "eq", min: low, max: low });
43500
43500
  else if (nextOp === "ne") onChange({ kind: "number", op: "ne", min: low, max: low });
43501
43501
  else if (nextOp === "lt") onChange({ kind: "number", op: "lt", max: low });
@@ -49088,8 +49088,28 @@ function isStringArray(value) {
49088
49088
  }
49089
49089
  var activeUrlTableIds = /* @__PURE__ */ new Set();
49090
49090
  function MatrxDataTable(props) {
49091
- if (!props.urlState) return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(MatrxDataTableCore, { ...props });
49092
- return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(MatrxDataTableWithUrlState, { ...props, urlState: props.urlState });
49091
+ const sourceRows = props.query?.mode === "controlled-append" ? props.query.pagination.rows : props.data;
49092
+ const availableRows = sourceRows ?? EMPTY_TABLE_ROWS;
49093
+ const [defaultSelectionState, setDefaultSelectionState] = (0, import_react22.useState)({
49094
+ sourceRows: availableRows,
49095
+ selectedIds: []
49096
+ });
49097
+ if (props.selection === void 0 && defaultSelectionState.sourceRows !== availableRows) {
49098
+ const available = new Set(availableRows.map(props.getRowId));
49099
+ setDefaultSelectionState({
49100
+ sourceRows: availableRows,
49101
+ selectedIds: defaultSelectionState.selectedIds.filter((id) => available.has(id))
49102
+ });
49103
+ }
49104
+ const selection = props.selection === false || props.selection === void 0 && props.copy === false ? void 0 : props.selection ?? {
49105
+ selectedIds: defaultSelectionState.selectedIds,
49106
+ onSelectedIdsChange: (selectedIds) => {
49107
+ setDefaultSelectionState({ sourceRows: availableRows, selectedIds });
49108
+ }
49109
+ };
49110
+ const tableProps = { ...props, selection: selection ?? false };
49111
+ if (!props.urlState) return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(MatrxDataTableCore, { ...tableProps });
49112
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(MatrxDataTableWithUrlState, { ...tableProps, urlState: props.urlState });
49093
49113
  }
49094
49114
  function MatrxDataTableWithUrlState({
49095
49115
  urlState,
@@ -49141,7 +49161,7 @@ function MatrxDataTableWithUrlState({
49141
49161
  selectedIds: urlSelection,
49142
49162
  onSelectedIdsChange: (ids) => {
49143
49163
  setUrlSelection(ids, { history: urlState.history });
49144
- props.selection?.onSelectedIdsChange(ids);
49164
+ if (props.selection !== false) props.selection?.onSelectedIdsChange(ids);
49145
49165
  }
49146
49166
  } : props.selection;
49147
49167
  return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
@@ -49324,7 +49344,7 @@ function MatrxDataTableCore(coreProps) {
49324
49344
  onSelectedIdChange,
49325
49345
  windowRowId: controlledWindowRowId,
49326
49346
  onWindowRowIdChange,
49327
- selection: selectionConfig,
49347
+ selection: suppliedSelectionConfig,
49328
49348
  rowActions,
49329
49349
  footerRows = [],
49330
49350
  summary,
@@ -49358,6 +49378,7 @@ function MatrxDataTableCore(coreProps) {
49358
49378
  fitToWidth = false,
49359
49379
  rowActionsHeader
49360
49380
  } = coreProps;
49381
+ const selectionConfig = suppliedSelectionConfig === false ? void 0 : suppliedSelectionConfig;
49361
49382
  const appendQuery = query?.mode === "controlled-append" ? query : null;
49362
49383
  const appendQueryKey = appendQuery?.pagination.queryKey ?? null;
49363
49384
  const committedAppendQueryKey = (0, import_react22.useRef)(appendQueryKey);