@ai-matrx/design-system 0.61.3 → 0.61.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 +17 -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 +48 -28
- 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 +48 -28
- 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/{layered-filters-CkkbZfmk.d.ts → layered-filters-CCWzLsOC.d.ts} +4 -0
- package/dist/{layered-filters-dlFZjEqc.d.cts → layered-filters-DL5BU8Mf.d.cts} +4 -0
- package/dist/tap-target.css +6 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.61.4
|
|
4
|
+
### one actions column per table
|
|
5
|
+
|
|
6
|
+
- A `customActions` column headed "Actions" (or id `actions` / `custom-actions` / `row-actions`) IS
|
|
7
|
+
the row's actions column: the built-in controls — `rowActions` icons and open-in-window / side
|
|
8
|
+
panel — are drawn inside it, and the built-in "Actions" column is not drawn beside it (two
|
|
9
|
+
"ACTIONS" columns on /education/overview's "Recently created"). A differently named custom
|
|
10
|
+
column ("Workflow") stays its own column beside the built-in one, as before.
|
|
11
|
+
- A table that still renders two columns headed "Actions" logs one `[matrx-table]` console error.
|
|
12
|
+
- The saved-view strip drawn through `toolbar.tabsPortalInto` shrinks and scrolls inside its slot
|
|
13
|
+
(two tabs and their "+" ran over the page's search).
|
|
14
|
+
- 0.60.9 also drew a focused row's own ring (`focus-visible`), replacing a host
|
|
15
|
+
`[&_[data-row-id]:focus-visible]` reach.
|
|
16
|
+
|
|
17
|
+
Consumer action: none for a single declared "Actions" column. A host that declared its own
|
|
18
|
+
"Actions" column AND relied on the built-in column beside it now gets one column.
|
|
19
|
+
|
|
3
20
|
## 0.61.3 — the controls cover the sample pages
|
|
4
21
|
|
|
5
22
|
- `SplitButton` (controls): two Buttons joined — the act and its menu — carrying one half-gap.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AgentPayloadInput } from './copy-types.cjs';
|
|
2
|
-
import { g as MatrxDataTableCopyConfig, M as MatrxColumnDef } from '../layered-filters-
|
|
2
|
+
import { g as MatrxDataTableCopyConfig, M as MatrxColumnDef } from '../layered-filters-DL5BU8Mf.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-
|
|
2
|
+
import { g as MatrxDataTableCopyConfig, M as MatrxColumnDef } from '../layered-filters-CCWzLsOC.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-
|
|
1
|
+
import { M as MatrxColumnDef, C as ColumnFiltersState, S as SortState, L as LayeredFilterRule, T as TableSearchMatchMode, a as ColumnFilterValue } from '../layered-filters-DL5BU8Mf.cjs';
|
|
2
2
|
import 'react';
|
|
3
3
|
import '../content-transfer.cjs';
|
|
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-
|
|
1
|
+
import { M as MatrxColumnDef, C as ColumnFiltersState, S as SortState, L as LayeredFilterRule, T as TableSearchMatchMode, a as ColumnFilterValue } from '../layered-filters-CCWzLsOC.js';
|
|
2
2
|
import 'react';
|
|
3
3
|
import '../content-transfer.js';
|
|
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 { M as MatrxColumnDef, b as TableSavedViewsProps, c as MatrxDataTableDensity, d as MatrxDataTableRecordControls } from '../layered-filters-
|
|
5
|
+
import { M as MatrxColumnDef, b as TableSavedViewsProps, c as MatrxDataTableDensity, d as MatrxDataTableRecordControls } from '../layered-filters-DL5BU8Mf.cjs';
|
|
6
6
|
import { MatrxTableMenuItem, MatrxTableMenuTarget, MatrxTableMenuPayload, MatrxTableMenuSectionsResolver, MatrxTableMenuIconName } from './menu-targets.cjs';
|
|
7
7
|
export { 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 { M as MatrxColumnDef, b as TableSavedViewsProps, c as MatrxDataTableDensity, d as MatrxDataTableRecordControls } from '../layered-filters-
|
|
5
|
+
import { M as MatrxColumnDef, b as TableSavedViewsProps, c as MatrxDataTableDensity, d as MatrxDataTableRecordControls } from '../layered-filters-CCWzLsOC.js';
|
|
6
6
|
import { MatrxTableMenuItem, MatrxTableMenuTarget, MatrxTableMenuPayload, MatrxTableMenuSectionsResolver, MatrxTableMenuIconName } from './menu-targets.js';
|
|
7
7
|
export { MatrxTableMenuSection } from './menu-targets.js';
|
|
8
8
|
import '../content-transfer.js';
|
|
@@ -54415,6 +54415,9 @@ function MatrxDataTableCore(coreProps) {
|
|
|
54415
54415
|
const menuActionsColumn = visibleColumns.find((column) => column.customActions);
|
|
54416
54416
|
const rowCopyInMenu = rowCopyPlacement === "menu" && menuActionsColumn !== void 0;
|
|
54417
54417
|
const rowCopyInCustomColumn = showRowCopy && !rowCopyInMenu && menuActionsColumn !== void 0;
|
|
54418
|
+
const declaredActionsColumn = visibleColumns.find(
|
|
54419
|
+
(column) => column.customActions && (typeof column.header === "string" && column.header.trim().toLowerCase() === "actions" || ["actions", "custom-actions", "row-actions"].includes(columnId(column)))
|
|
54420
|
+
);
|
|
54418
54421
|
const showInlineRowCopy = showRowCopy && !rowCopyInMenu && !rowCopyInCustomColumn;
|
|
54419
54422
|
const showToolbarCopy = effectiveCopy !== void 0 && effectiveCopy.showToolbar !== false && copyControls?.table !== false;
|
|
54420
54423
|
const placeToolbar = (node) => {
|
|
@@ -54556,6 +54559,7 @@ function MatrxDataTableCore(coreProps) {
|
|
|
54556
54559
|
const summaryMetrics = summary?.metrics.map((metric) => ({
|
|
54557
54560
|
id: metric.id,
|
|
54558
54561
|
label: metric.label,
|
|
54562
|
+
description: metric.description,
|
|
54559
54563
|
...resolveSummaryValue(summary.source?.metrics?.[metric.id], metric.value)
|
|
54560
54564
|
})) ?? [];
|
|
54561
54565
|
const summaryTotals = Object.entries(summary?.totals ?? {}).map(([id, value]) => ({
|
|
@@ -55110,7 +55114,35 @@ function MatrxDataTableCore(coreProps) {
|
|
|
55110
55114
|
(target) => resolveMenuLevelRef.current(target)
|
|
55111
55115
|
);
|
|
55112
55116
|
}, [host.rowContextRegistry, tableContextMenuInstanceId]);
|
|
55113
|
-
const showActionsCol = windowEnabled || Boolean(rowActions) || showInlineRowCopy;
|
|
55117
|
+
const showActionsCol = declaredActionsColumn === void 0 && (windowEnabled || Boolean(rowActions) || showInlineRowCopy);
|
|
55118
|
+
const actionsHeaderCount = visibleColumns.filter((column) => typeof column.header === "string" && column.header.trim().toLowerCase() === "actions").length + (showActionsCol ? 1 : 0);
|
|
55119
|
+
(0, import_react31.useEffect)(() => {
|
|
55120
|
+
if (actionsHeaderCount > 1) {
|
|
55121
|
+
console.error(
|
|
55122
|
+
`[matrx-table] ${actionsHeaderCount} "Actions" columns in one table \u2014 a table has ONE actions column. Declare one customActions column headed "Actions"; the table folds copy, row actions and open-in-window into it.`
|
|
55123
|
+
);
|
|
55124
|
+
}
|
|
55125
|
+
}, [actionsHeaderCount]);
|
|
55126
|
+
const renderWindowOpen = (row) => windowEnabled ? /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(Tooltip, { children: [
|
|
55127
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
55128
|
+
Button,
|
|
55129
|
+
{
|
|
55130
|
+
type: "button",
|
|
55131
|
+
variant: "ghost",
|
|
55132
|
+
size: "icon",
|
|
55133
|
+
"data-matrx-table-icon-action": true,
|
|
55134
|
+
className: "h-11 w-11 text-muted-foreground hover:text-foreground [&_svg]:size-5",
|
|
55135
|
+
"aria-label": windowConfig?.openOnRowClick === true ? "Open in side panel" : "Open in window",
|
|
55136
|
+
onClick: (e) => {
|
|
55137
|
+
e.stopPropagation();
|
|
55138
|
+
if (windowConfig?.openOnRowClick === true) rowLatest.current.openDetail(row);
|
|
55139
|
+
else rowLatest.current.openWindow(row);
|
|
55140
|
+
},
|
|
55141
|
+
children: opensWindowOnRowClick ? /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(PanelRightOpen, { className: "h-5 w-5" }) : /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(PanelRight, { className: "h-5 w-5" })
|
|
55142
|
+
}
|
|
55143
|
+
) }),
|
|
55144
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(TooltipContent, { children: windowConfig?.openOnRowClick === true ? "Open in side panel" : "Open in window" })
|
|
55145
|
+
] }) : null;
|
|
55114
55146
|
const lastVisibleColumn = visibleColumns[visibleColumns.length - 1];
|
|
55115
55147
|
const pinnedActionsColumnId = !showActionsCol && lastVisibleColumn?.customActions ? columnId(lastVisibleColumn) : void 0;
|
|
55116
55148
|
const getSelectionId = selection?.getSelectionId ?? getRowId;
|
|
@@ -55205,7 +55237,11 @@ function MatrxDataTableCore(coreProps) {
|
|
|
55205
55237
|
controls,
|
|
55206
55238
|
children: content
|
|
55207
55239
|
}
|
|
55208
|
-
) : content
|
|
55240
|
+
) : content,
|
|
55241
|
+
declaredActionsColumn !== void 0 && columnId(col) === columnId(declaredActionsColumn) ? /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(import_jsx_runtime60.Fragment, { children: [
|
|
55242
|
+
renderRowActions(displayRow, controls),
|
|
55243
|
+
renderWindowOpen(row)
|
|
55244
|
+
] }) : null
|
|
55209
55245
|
] });
|
|
55210
55246
|
}
|
|
55211
55247
|
const display = renderCell(displayRow, col, index);
|
|
@@ -55901,26 +55937,7 @@ function MatrxDataTableCore(coreProps) {
|
|
|
55901
55937
|
}
|
|
55902
55938
|
) : null,
|
|
55903
55939
|
renderRowActions(displayRow, controls),
|
|
55904
|
-
|
|
55905
|
-
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
55906
|
-
Button,
|
|
55907
|
-
{
|
|
55908
|
-
type: "button",
|
|
55909
|
-
variant: "ghost",
|
|
55910
|
-
size: "icon",
|
|
55911
|
-
"data-matrx-table-icon-action": true,
|
|
55912
|
-
className: "h-11 w-11 text-muted-foreground hover:text-foreground [&_svg]:size-5",
|
|
55913
|
-
"aria-label": windowConfig?.openOnRowClick === true ? "Open in side panel" : "Open in window",
|
|
55914
|
-
onClick: (e) => {
|
|
55915
|
-
e.stopPropagation();
|
|
55916
|
-
if (windowConfig?.openOnRowClick === true) rowLatest.current.openDetail(row);
|
|
55917
|
-
else rowLatest.current.openWindow(row);
|
|
55918
|
-
},
|
|
55919
|
-
children: opensWindowOnRowClick ? /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(PanelRightOpen, { className: "h-5 w-5" }) : /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(PanelRight, { className: "h-5 w-5" })
|
|
55920
|
-
}
|
|
55921
|
-
) }),
|
|
55922
|
-
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(TooltipContent, { children: windowConfig?.openOnRowClick === true ? "Open in side panel" : "Open in window" })
|
|
55923
|
-
] }) : null
|
|
55940
|
+
renderWindowOpen(row)
|
|
55924
55941
|
]
|
|
55925
55942
|
}
|
|
55926
55943
|
)
|
|
@@ -56067,6 +56084,7 @@ function MatrxDataTableCore(coreProps) {
|
|
|
56067
56084
|
"data-matrx-table-density": resolvedDensity,
|
|
56068
56085
|
"data-url-state-table": urlState?.id,
|
|
56069
56086
|
"data-matrx-table-appearance": appearance,
|
|
56087
|
+
"data-matrx-table-embedded": embedded || void 0,
|
|
56070
56088
|
className: cn(
|
|
56071
56089
|
"flex h-full min-h-0 flex-col gap-2 px-0 pt-2 pb-0",
|
|
56072
56090
|
embedded && "h-auto gap-0 pt-0",
|
|
@@ -56080,15 +56098,17 @@ function MatrxDataTableCore(coreProps) {
|
|
|
56080
56098
|
"section",
|
|
56081
56099
|
{
|
|
56082
56100
|
"data-matrx-table-summary": true,
|
|
56101
|
+
"data-matrx-table-summary-variant": summary?.variant ?? "compact",
|
|
56083
56102
|
"data-matrx-table-summary-scope": summaryUsesSource ? "source" : summaryCoverage,
|
|
56084
56103
|
"aria-label": `Table summary: ${summaryCaption}`,
|
|
56085
|
-
className: "flex w-full min-w-0 shrink-0 flex-nowrap items-stretch gap-
|
|
56086
|
-
children: summaryMetrics.map((metric) => /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("div", { className: "
|
|
56087
|
-
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { className: "text-sm font-medium text-muted-foreground", children: metric.label }),
|
|
56088
|
-
/* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("div", { className: "
|
|
56104
|
+
className: "flex w-full min-w-0 shrink-0 flex-nowrap items-stretch gap-3 overflow-x-auto overscroll-x-contain",
|
|
56105
|
+
children: summaryMetrics.map((metric) => /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("div", { "data-matrx-table-summary-card": true, className: cn("shrink-0 whitespace-nowrap rounded-md border border-border bg-card shadow-xs", summary?.variant === "large" ? "w-56 min-w-56 px-4 py-4" : "min-w-24 px-3.5 py-2.5"), children: [
|
|
56106
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { className: "truncate text-sm font-medium text-muted-foreground", title: metric.label, children: metric.label }),
|
|
56107
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("div", { className: cn("font-semibold tabular-nums text-foreground", summary?.variant === "large" ? "mt-1 text-xl" : "mt-0.5 text-sm"), children: [
|
|
56089
56108
|
metric.value,
|
|
56090
56109
|
metric.unavailable ? /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(ErrorBox, { as: "span", className: "sr-only", message: `${metric.label} is unavailable`, operation: "Summarize this table", origin: "design-system/MatrxDataTable" }) : null
|
|
56091
|
-
] })
|
|
56110
|
+
] }),
|
|
56111
|
+
summary?.variant === "large" ? /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { "data-matrx-table-summary-description": true, className: "mt-2 min-h-5 truncate text-sm font-normal text-muted-foreground", title: metric.description, children: metric.description }) : null
|
|
56092
56112
|
] }, metric.id))
|
|
56093
56113
|
}
|
|
56094
56114
|
) : null,
|
|
@@ -56099,7 +56119,7 @@ function MatrxDataTableCore(coreProps) {
|
|
|
56099
56119
|
const tabsTarget = toolbar && "tabsPortalInto" in toolbar ? toolbar.tabsPortalInto : null;
|
|
56100
56120
|
return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(import_jsx_runtime60.Fragment, { children: [
|
|
56101
56121
|
tabsPlaced && tabsTarget && tabsNode && !hideToolbar ? (0, import_react_dom4.createPortal)(
|
|
56102
|
-
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { "data-matrx-table-toolbar-tabs": "", "data-matrx-table-tabs-placed": "", className: "flex min-w-0 max-w-full [&_[data-matrx-table-tabs]]:border-b-0", children: tabsNode }),
|
|
56122
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { "data-matrx-table-toolbar-tabs": "", "data-matrx-table-tabs-placed": "", className: "flex min-w-0 max-w-full [&_[data-matrx-table-tabs]]:min-w-0 [&_[data-matrx-table-tabs]]:shrink [&_[data-matrx-table-tabs]]:border-b-0", children: tabsNode }),
|
|
56103
56123
|
tabsTarget
|
|
56104
56124
|
) : null,
|
|
56105
56125
|
placeToolbar(!hideToolbar && (showViewTabs || toolbar?.title || toolbar?.titleCount || showSearch || toolbar?.customSearch || toolbar?.anyOf || toolbar?.layeredFilters || toolbar?.facets && toolbar.facets.length > 0 || toolbar?.leading || toolbar?.actions || toolbar?.refresh || toolbar?.add || savedViewsId && SavedViews || hasActiveFilters || showToolbarCopy || columns.length > 0) && /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(
|