@ai-matrx/design-system 0.39.3 → 0.39.4
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 +6 -0
- package/dist/data-table/copy-helpers.d.cts +1 -1
- package/dist/data-table/copy-helpers.d.ts +1 -1
- package/dist/data-table/filter-engine.d.cts +1 -1
- package/dist/data-table/filter-engine.d.ts +1 -1
- package/dist/data-table/host.d.cts +1 -1
- package/dist/data-table/host.d.ts +1 -1
- package/dist/data-table/index.cjs +39 -19
- package/dist/data-table/index.cjs.map +1 -1
- package/dist/data-table/index.d.cts +2 -2
- package/dist/data-table/index.d.ts +2 -2
- package/dist/data-table/index.js +39 -19
- package/dist/data-table/index.js.map +1 -1
- package/dist/data-table/infer-filter.d.cts +1 -1
- package/dist/data-table/infer-filter.d.ts +1 -1
- package/dist/data-table/layered-filters.d.cts +1 -1
- package/dist/data-table/layered-filters.d.ts +1 -1
- package/dist/data-table/query-control.d.cts +1 -1
- package/dist/data-table/query-control.d.ts +1 -1
- package/dist/data-table/types.cjs.map +1 -1
- package/dist/data-table/types.d.cts +1 -1
- package/dist/data-table/types.d.ts +1 -1
- package/dist/data-table/url-state.d.cts +1 -1
- package/dist/data-table/url-state.d.ts +1 -1
- package/dist/data-table/xlsx.d.cts +1 -1
- package/dist/data-table/xlsx.d.ts +1 -1
- package/dist/{types-Bq-K6JWF.d.cts → types-D7O3uOIs.d.cts} +19 -2
- package/dist/{types-CM9oqzia.d.ts → types-p13OrDj-.d.ts} +19 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.39.4
|
|
4
|
+
|
|
5
|
+
Automatic changed-only republish (docs/metadata drift since the last tag — see
|
|
6
|
+
`git diff npm/design-system/v0.39.3..npm/design-system/v0.39.4 -- apps/shared/design-system`).
|
|
7
|
+
No source changes intended and no consumer action required.
|
|
8
|
+
|
|
3
9
|
## 0.39.3
|
|
4
10
|
|
|
5
11
|
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 '../types-
|
|
2
|
+
import { g as MatrxDataTableCopyConfig, M as MatrxColumnDef } from '../types-D7O3uOIs.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 '../types-
|
|
2
|
+
import { g as MatrxDataTableCopyConfig, M as MatrxColumnDef } from '../types-p13OrDj-.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 '../types-
|
|
1
|
+
import { M as MatrxColumnDef, C as ColumnFiltersState, S as SortState, L as LayeredFilterRule, T as TableSearchMatchMode, a as ColumnFilterValue } from '../types-D7O3uOIs.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 '../types-
|
|
1
|
+
import { M as MatrxColumnDef, C as ColumnFiltersState, S as SortState, L as LayeredFilterRule, T as TableSearchMatchMode, a as ColumnFilterValue } from '../types-p13OrDj-.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 '../types-
|
|
5
|
+
import { b as TableSavedViewsProps, c as MatrxDataTableDensity, d as MatrxDataTableRecordControls } from '../types-D7O3uOIs.cjs';
|
|
6
6
|
import { MatrxTableMenuTarget, MatrxTableMenuPayload } from './menu-targets.cjs';
|
|
7
7
|
import '../content-transfer.cjs';
|
|
8
8
|
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.js';
|
|
4
4
|
export { AgentPayloadInput, AiCustomSource, AiVariant, CopyExportConfig } from './copy-types.js';
|
|
5
|
-
import { b as TableSavedViewsProps, c as MatrxDataTableDensity, d as MatrxDataTableRecordControls } from '../types-
|
|
5
|
+
import { b as TableSavedViewsProps, c as MatrxDataTableDensity, d as MatrxDataTableRecordControls } from '../types-p13OrDj-.js';
|
|
6
6
|
import { MatrxTableMenuTarget, MatrxTableMenuPayload } from './menu-targets.js';
|
|
7
7
|
import '../content-transfer.js';
|
|
8
8
|
import '@ai-matrx/kit/content-transfer';
|
|
@@ -12340,7 +12340,9 @@ function MatrxDataTableCore({
|
|
|
12340
12340
|
const remoteQuery = query?.mode === "controlled" || query?.mode === "controlled-append" ? query : null;
|
|
12341
12341
|
const sourceProcessing = query?.mode === "controlled" || query?.mode === "controlled-local" ? query.sourceProcessing : appendQuery?.sourceProcessing;
|
|
12342
12342
|
const appendUsesLocalProcessing = appendQuery !== null && sourceProcessing !== void 0;
|
|
12343
|
-
const
|
|
12343
|
+
const appendDefaultsToSourceProcessing = appendQuery !== null && sourceProcessing === void 0;
|
|
12344
|
+
const sourceColumnFilterOwnership = sourceProcessing?.columnFilters;
|
|
12345
|
+
const sourceOwnsColumnFilters = appendDefaultsToSourceProcessing ? true : sourceColumnFilterOwnership === "source" || typeof sourceColumnFilterOwnership === "object" && sourceColumnFilterOwnership.source.length > 0;
|
|
12344
12346
|
const sourceOwnsSort = appendQuery !== null && sourceProcessing === void 0 ? true : sourceProcessing?.sort === "source";
|
|
12345
12347
|
const sourceOwnsIntelligentSearch = sourceProcessing?.intelligentSearch === "source";
|
|
12346
12348
|
const sourceOwnsSearch = remoteQuery?.mode === "controlled" || appendQuery !== null && sourceProcessing === void 0 || sourceProcessing?.search === "source" || sourceOwnsIntelligentSearch;
|
|
@@ -12413,6 +12415,17 @@ function MatrxDataTableCore({
|
|
|
12413
12415
|
};
|
|
12414
12416
|
const [internalColumnFilters, setInternalColumnFilters] = (0, import_react21.useState)({});
|
|
12415
12417
|
const columnFilters = controlledQuery ? controlledQuery.state.columnFilters : internalColumnFilters;
|
|
12418
|
+
const localColumnFilters = (0, import_react21.useMemo)(() => {
|
|
12419
|
+
if (appendDefaultsToSourceProcessing) return {};
|
|
12420
|
+
if (sourceColumnFilterOwnership === "source") return {};
|
|
12421
|
+
if (sourceColumnFilterOwnership === void 0 || sourceColumnFilterOwnership === "local") {
|
|
12422
|
+
return columnFilters;
|
|
12423
|
+
}
|
|
12424
|
+
const sourceColumnIds = new Set(sourceColumnFilterOwnership.source);
|
|
12425
|
+
return Object.fromEntries(
|
|
12426
|
+
Object.entries(columnFilters).filter(([columnId2]) => !sourceColumnIds.has(columnId2))
|
|
12427
|
+
);
|
|
12428
|
+
}, [appendDefaultsToSourceProcessing, columnFilters, sourceColumnFilterOwnership]);
|
|
12416
12429
|
const setColumnFilter = (id, next) => {
|
|
12417
12430
|
const nextFilters = { ...columnFilters, [id]: next };
|
|
12418
12431
|
if (controlledQuery) {
|
|
@@ -13008,14 +13021,14 @@ function MatrxDataTableCore({
|
|
|
13008
13021
|
...intelligentSearchEnabled ? { searchScope } : {},
|
|
13009
13022
|
anyOf: anyOfValue,
|
|
13010
13023
|
layeredFilters,
|
|
13011
|
-
columnFilters,
|
|
13024
|
+
columnFilters: localColumnFilters,
|
|
13012
13025
|
sort
|
|
13013
13026
|
});
|
|
13014
13027
|
}
|
|
13015
13028
|
const locallyFiltered = filterAndSortRows(
|
|
13016
13029
|
data,
|
|
13017
13030
|
intelligentSearchEnabled ? columns : visibleColumns,
|
|
13018
|
-
|
|
13031
|
+
localColumnFilters,
|
|
13019
13032
|
sourceOwnsSort ? null : sort,
|
|
13020
13033
|
"",
|
|
13021
13034
|
// Global matching and identity ranking run once across all loaded fields below.
|
|
@@ -13040,7 +13053,7 @@ function MatrxDataTableCore({
|
|
|
13040
13053
|
}, [
|
|
13041
13054
|
data,
|
|
13042
13055
|
visibleColumns,
|
|
13043
|
-
|
|
13056
|
+
localColumnFilters,
|
|
13044
13057
|
sort,
|
|
13045
13058
|
searchValue,
|
|
13046
13059
|
toolbar,
|
|
@@ -13996,6 +14009,7 @@ function MatrxDataTableCore({
|
|
|
13996
14009
|
);
|
|
13997
14010
|
}, [host.rowContextRegistry, tableContextMenuInstanceId]);
|
|
13998
14011
|
const showActionsCol = windowEnabled || Boolean(rowActions) || showInlineRowCopy;
|
|
14012
|
+
const getSelectionId = selection?.getSelectionId ?? getRowId;
|
|
13999
14013
|
const selectedIdSet = (0, import_react21.useMemo)(
|
|
14000
14014
|
() => new Set(selection?.selectedIds ?? []),
|
|
14001
14015
|
[selection?.selectedIds]
|
|
@@ -14004,14 +14018,19 @@ function MatrxDataTableCore({
|
|
|
14004
14018
|
(row) => selection?.isRowSelectable?.(row) ?? true
|
|
14005
14019
|
);
|
|
14006
14020
|
const selectedOnPage = selectableRows.filter(
|
|
14007
|
-
(row) => selectedIdSet.has(
|
|
14021
|
+
(row) => selectedIdSet.has(getSelectionId(row))
|
|
14008
14022
|
);
|
|
14009
14023
|
const allOnPageSelected = selectableRows.length > 0 && selectedOnPage.length === selectableRows.length;
|
|
14010
14024
|
const someOnPageSelected = selectedOnPage.length > 0 && !allOnPageSelected;
|
|
14011
|
-
const selectedRows = (0, import_react21.useMemo)(
|
|
14012
|
-
|
|
14013
|
-
|
|
14014
|
-
|
|
14025
|
+
const selectedRows = (0, import_react21.useMemo)(() => {
|
|
14026
|
+
const resolved = /* @__PURE__ */ new Set();
|
|
14027
|
+
return data.filter((row) => {
|
|
14028
|
+
const id = getSelectionId(row);
|
|
14029
|
+
if (!selectedIdSet.has(id) || resolved.has(id)) return false;
|
|
14030
|
+
resolved.add(id);
|
|
14031
|
+
return true;
|
|
14032
|
+
});
|
|
14033
|
+
}, [data, getSelectionId, selectedIdSet]);
|
|
14015
14034
|
const lastToggledIndex = (0, import_react21.useRef)(null);
|
|
14016
14035
|
const setSelectedIds = (next) => selection?.onSelectedIdsChange([...next]);
|
|
14017
14036
|
const toggleRowSelected = (index, shiftKey) => {
|
|
@@ -14019,7 +14038,7 @@ function MatrxDataTableCore({
|
|
|
14019
14038
|
if (!paginated[index]) return;
|
|
14020
14039
|
const { next, anchor } = toggleSelection({
|
|
14021
14040
|
order: paginated,
|
|
14022
|
-
idOf:
|
|
14041
|
+
idOf: getSelectionId,
|
|
14023
14042
|
selected: selectedIdSet,
|
|
14024
14043
|
index,
|
|
14025
14044
|
anchor: lastToggledIndex.current,
|
|
@@ -14033,7 +14052,7 @@ function MatrxDataTableCore({
|
|
|
14033
14052
|
if (!selection) return;
|
|
14034
14053
|
const next = new Set(selectedIdSet);
|
|
14035
14054
|
for (const row of selectableRows) {
|
|
14036
|
-
const id =
|
|
14055
|
+
const id = getSelectionId(row);
|
|
14037
14056
|
if (allOnPageSelected) next.delete(id);
|
|
14038
14057
|
else next.add(id);
|
|
14039
14058
|
}
|
|
@@ -14041,7 +14060,7 @@ function MatrxDataTableCore({
|
|
|
14041
14060
|
setSelectedIds(next);
|
|
14042
14061
|
};
|
|
14043
14062
|
const selectionNoun = selection?.noun ?? "row";
|
|
14044
|
-
const selectionCount =
|
|
14063
|
+
const selectionCount = selectedIdSet.size;
|
|
14045
14064
|
const leadingCols = selection ? 1 : 0;
|
|
14046
14065
|
const renderedColSpan = renderedColumns.length + leadingCols + (showActionsCol ? 1 : 0) + (columnSpacers ? (columnSpacers.start > 0 ? 1 : 0) + (columnSpacers.end > 0 ? 1 : 0) : 0);
|
|
14047
14066
|
const renderedFacets = controlledQuery ? toolbar?.facets?.map(
|
|
@@ -14643,15 +14662,16 @@ function MatrxDataTableCore({
|
|
|
14643
14662
|
const column = columns.find((candidate) => columnId(candidate) === columnKey);
|
|
14644
14663
|
return column ? renderRecordCell(row, column, index) : null;
|
|
14645
14664
|
},
|
|
14646
|
-
selected: selectedIdSet.has(
|
|
14665
|
+
selected: selectedIdSet.has(getSelectionId(row)),
|
|
14647
14666
|
selectable,
|
|
14648
14667
|
onSelectedChange: (nextSelected) => {
|
|
14649
|
-
if (!selection || !selectable || nextSelected === selectedIdSet.has(
|
|
14668
|
+
if (!selection || !selectable || nextSelected === selectedIdSet.has(getSelectionId(row))) {
|
|
14650
14669
|
return;
|
|
14651
14670
|
}
|
|
14652
14671
|
const next = new Set(selectedIdSet);
|
|
14653
|
-
|
|
14654
|
-
|
|
14672
|
+
const selectionId = getSelectionId(row);
|
|
14673
|
+
if (nextSelected) next.add(selectionId);
|
|
14674
|
+
else next.delete(selectionId);
|
|
14655
14675
|
setSelectedIds(next);
|
|
14656
14676
|
},
|
|
14657
14677
|
actions: showInlineRowCopy || rowActions ? /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
|
|
@@ -15055,7 +15075,7 @@ function MatrxDataTableCore({
|
|
|
15055
15075
|
const rowEdits = edits[id];
|
|
15056
15076
|
const displayRow = applyRowEdits(row, rowEdits);
|
|
15057
15077
|
const controls = buildRecordControls(displayRow);
|
|
15058
|
-
const isChecked = selectedIdSet.has(
|
|
15078
|
+
const isChecked = selectedIdSet.has(getSelectionId(row));
|
|
15059
15079
|
const background = rowBackground({
|
|
15060
15080
|
tint: rowTintColor(row, id),
|
|
15061
15081
|
highlighted: highlightedIndex === index,
|
|
@@ -15525,7 +15545,7 @@ function MatrxDataTableCore({
|
|
|
15525
15545
|
new Date(appendQuery.pagination.sourceUntil).toLocaleString(),
|
|
15526
15546
|
"."
|
|
15527
15547
|
] }) : null,
|
|
15528
|
-
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("p", { children: !isLoading && !isFetching && !appendQuery.pagination.loadAll?.isLoading && !scrollPagination.error && !appendQuery.pagination.hasNextPage && appendQuery.pagination.totalItems !== void 0 && data.length === appendQuery.pagination.totalItems ? "All source rows are loaded." : appendUsesLocalProcessing ? "Local search and filters cover loaded rows." : "Source paging is active." })
|
|
15548
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("p", { children: !isLoading && !isFetching && !appendQuery.pagination.loadAll?.isLoading && !scrollPagination.error && !appendQuery.pagination.hasNextPage && appendQuery.pagination.totalItems !== void 0 && data.length === appendQuery.pagination.totalItems ? "All source rows are loaded." : appendUsesLocalProcessing ? sourceOwnsColumnFilters ? "Local processing covers loaded rows; source-owned column filters are applied by the source." : "Local search and filters cover loaded rows." : "Source paging is active." })
|
|
15529
15549
|
] })
|
|
15530
15550
|
] }) : null,
|
|
15531
15551
|
scrollPagination.error ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("p", { role: "alert", className: "text-destructive", children: scrollPagination.error.message }) : null,
|
|
@@ -15687,7 +15707,7 @@ function MatrxDataTableCore({
|
|
|
15687
15707
|
}
|
|
15688
15708
|
}
|
|
15689
15709
|
) : null,
|
|
15690
|
-
selection.actions?.(selectedRows,
|
|
15710
|
+
selection.actions?.(selectedRows, [...selectedIdSet])
|
|
15691
15711
|
] })
|
|
15692
15712
|
]
|
|
15693
15713
|
}
|