@ai-matrx/design-system 0.60.8 → 0.60.9
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 +23 -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 +357 -334
- 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 +357 -334
- 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/index.cjs +365 -233
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +19 -2
- package/dist/index.d.ts +19 -2
- package/dist/index.js +365 -233
- package/dist/index.js.map +1 -1
- package/dist/{layered-filters-BsnawJgC.d.ts → layered-filters-B0q8G3QR.d.ts} +21 -0
- package/dist/{layered-filters-C9MwGVTc.d.cts → layered-filters-CisXX8K5.d.cts} +21 -0
- package/package.json +1 -1
|
@@ -34247,7 +34247,7 @@ function ScopeFilter({ filter, id }) {
|
|
|
34247
34247
|
value: filter.value,
|
|
34248
34248
|
disabled: filter.disabled,
|
|
34249
34249
|
onChange: (event) => filter.onChange?.(event.target.value),
|
|
34250
|
-
className: "h-[var(--matrx-table-control-size,2rem)] min-w-0 max-w-full rounded-md border border-input bg-background px-2 text-
|
|
34250
|
+
className: "h-[var(--matrx-table-control-size,2rem)] min-w-0 max-w-full rounded-md border border-input bg-background px-2 text-sm text-foreground disabled:opacity-50",
|
|
34251
34251
|
children: filter.options?.map((option) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("option", { value: option.value, disabled: option.disabled, children: option.label }, option.value))
|
|
34252
34252
|
}
|
|
34253
34253
|
)
|
|
@@ -34263,7 +34263,7 @@ function TableScopeBar({ lanes, value, onChange, dimension, organization }) {
|
|
|
34263
34263
|
"aria-label": "Record scope",
|
|
34264
34264
|
value,
|
|
34265
34265
|
onChange: (event) => onChange(event.target.value),
|
|
34266
|
-
className: "h-[var(--matrx-table-control-size,2rem)] w-full rounded-md border border-input bg-background px-2 text-
|
|
34266
|
+
className: "h-[var(--matrx-table-control-size,2rem)] w-full rounded-md border border-input bg-background px-2 text-sm sm:hidden",
|
|
34267
34267
|
children: lanes.map((lane) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("option", { value: lane.value, disabled: lane.disabled, children: [
|
|
34268
34268
|
lane.label,
|
|
34269
34269
|
lane.count == null ? "" : ` (${lane.count.toLocaleString()})`
|
|
@@ -34279,10 +34279,10 @@ function TableScopeBar({ lanes, value, onChange, dimension, organization }) {
|
|
|
34279
34279
|
"aria-label": lane.count == null ? lane.label : `${lane.label}, ${lane.count.toLocaleString()} records`,
|
|
34280
34280
|
disabled: lane.disabled,
|
|
34281
34281
|
onClick: () => onChange(lane.value),
|
|
34282
|
-
className: `h-[var(--matrx-table-control-size,2rem)] shrink-0 whitespace-nowrap border-b-2 px-2 text-
|
|
34282
|
+
className: `h-[var(--matrx-table-control-size,2rem)] shrink-0 whitespace-nowrap border-b-2 px-2 text-sm font-medium disabled:opacity-50 ${value === lane.value ? "border-primary font-semibold text-foreground" : "border-transparent text-muted-foreground"}`,
|
|
34283
34283
|
children: [
|
|
34284
34284
|
lane.label,
|
|
34285
|
-
lane.count == null ? null : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "ml-1 text-
|
|
34285
|
+
lane.count == null ? null : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "ml-1 text-xs tabular-nums", children: lane.count.toLocaleString() })
|
|
34286
34286
|
]
|
|
34287
34287
|
},
|
|
34288
34288
|
lane.value
|
|
@@ -52921,6 +52921,8 @@ function MatrxDataTableCore(coreProps) {
|
|
|
52921
52921
|
stickyHeader = true,
|
|
52922
52922
|
className,
|
|
52923
52923
|
tableClassName,
|
|
52924
|
+
frameHeight = "fill",
|
|
52925
|
+
emptyHeader = "show",
|
|
52924
52926
|
mobileCards,
|
|
52925
52927
|
mobileCardsBreakpoint = "sm",
|
|
52926
52928
|
getRowHref,
|
|
@@ -53861,6 +53863,10 @@ function MatrxDataTableCore(coreProps) {
|
|
|
53861
53863
|
]);
|
|
53862
53864
|
const totalItems = appendQuery ? appendQuery.pagination.totalItems ?? processed.length : remoteQuery?.mode === "controlled" ? Math.max(0, remoteQuery.totalItems) : processed.length;
|
|
53863
53865
|
const sourceTotal = sourceProcessing?.sourceTotal;
|
|
53866
|
+
const sortSourceTotal = appendQuery ? appendQuery.pagination.sourceRecords ? appendQuery.pagination.sourceRecords.total : appendQuery.pagination.totalItems : remoteQuery?.mode === "controlled" ? remoteQuery.totalItems : sourceTotal;
|
|
53867
|
+
const sortSourceLoaded = appendQuery?.pagination.sourceRecords?.loaded ?? data.length;
|
|
53868
|
+
const sortSourceIsPartial = sortSourceTotal === void 0 ? Boolean(appendQuery?.pagination.hasNextPage || appendQuery?.pagination.error) : sortSourceLoaded < sortSourceTotal;
|
|
53869
|
+
const localSortNotice = sort !== null && !sourceOwnsSort && (appendQuery !== null || remoteQuery?.mode === "controlled") && sortSourceIsPartial ? appendQuery ? "Sorted within loaded rows; unloaded rows have not been included." : "Sorted within this source page; other pages keep the server order." : null;
|
|
53864
53870
|
const allRowsAreLoaded = !remoteQuery && (sourceTotal === void 0 || sourceTotal <= data.length);
|
|
53865
53871
|
const effectivePageSize = remoteQuery ? Math.max(pageSize, 1) : pageSize === 0 ? Math.max(totalItems, 1) : Math.max(pageSize, 1);
|
|
53866
53872
|
const pageCount = Math.max(1, Math.ceil(totalItems / effectivePageSize));
|
|
@@ -55562,6 +55568,9 @@ function MatrxDataTableCore(coreProps) {
|
|
|
55562
55568
|
// horizontally. The translucent zebra/hover tints remain
|
|
55563
55569
|
// desktop-only so densely layered mobile content stays crisp.
|
|
55564
55570
|
"group/matrx-row border-b border-border/60 bg-card transition-colors",
|
|
55571
|
+
// A row a host's keyboard cursor focuses (tabIndex -1, e.g. the list shell's row
|
|
55572
|
+
// keys) shows where it is — owned here, never by a host's `[&_[data-row-id]]` reach.
|
|
55573
|
+
"focus-visible:bg-accent focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-primary",
|
|
55565
55574
|
(detailEnabled || Boolean(onRowOpen) || canExpandRow(row)) && "cursor-pointer",
|
|
55566
55575
|
rowClassName?.(row, index),
|
|
55567
55576
|
draggedRowId === id && "opacity-40",
|
|
@@ -55993,7 +56002,6 @@ function MatrxDataTableCore(coreProps) {
|
|
|
55993
56002
|
notice,
|
|
55994
56003
|
savedViewError ? /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(ErrorBox, { className: "shrink-0 text-xs text-destructive", message: savedViewError, operation: "Save or apply a saved view", origin: "design-system/MatrxDataTable" }) : null,
|
|
55995
56004
|
toolbarActionError ? /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(ErrorBox, { className: "shrink-0 text-xs text-destructive", message: toolbarActionError, operation: "Run a table toolbar action", origin: "design-system/MatrxDataTable" }) : null,
|
|
55996
|
-
scopeBar ? /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(TableScopeBar, { ...scopeBar }) : null,
|
|
55997
56005
|
summaryMetrics.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
55998
56006
|
"section",
|
|
55999
56007
|
{
|
|
@@ -56002,7 +56010,7 @@ function MatrxDataTableCore(coreProps) {
|
|
|
56002
56010
|
"aria-label": `Table summary: ${summaryCaption}`,
|
|
56003
56011
|
className: "flex w-full min-w-0 shrink-0 flex-nowrap items-stretch gap-2 overflow-x-auto overscroll-x-contain",
|
|
56004
56012
|
children: summaryMetrics.map((metric) => /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("div", { className: "min-w-24 shrink-0 whitespace-nowrap rounded-md border border-border bg-card px-3 py-2 shadow-xs", children: [
|
|
56005
|
-
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { className: "text-
|
|
56013
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { className: "text-sm font-medium text-muted-foreground", children: metric.label }),
|
|
56006
56014
|
/* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("div", { className: "mt-0.5 text-sm font-semibold tabular-nums text-foreground", children: [
|
|
56007
56015
|
metric.value,
|
|
56008
56016
|
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
|
|
@@ -56010,359 +56018,372 @@ function MatrxDataTableCore(coreProps) {
|
|
|
56010
56018
|
] }, metric.id))
|
|
56011
56019
|
}
|
|
56012
56020
|
) : null,
|
|
56013
|
-
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
56014
|
-
|
|
56015
|
-
{
|
|
56016
|
-
|
|
56017
|
-
|
|
56018
|
-
|
|
56019
|
-
|
|
56020
|
-
|
|
56021
|
-
|
|
56022
|
-
|
|
56023
|
-
|
|
56024
|
-
|
|
56025
|
-
defaultSnapshot: declaredDefaultViewSnapshot,
|
|
56026
|
-
onApply: applyLatestSavedView
|
|
56027
|
-
}
|
|
56028
|
-
) }) : void 0,
|
|
56029
|
-
search: (toolbarSearch.node = toolbar?.customSearch ?? (showSearch ? intelligentSearchEnabled ? /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
56030
|
-
TableSearch,
|
|
56031
|
-
{
|
|
56032
|
-
value: searchValue,
|
|
56033
|
-
onChange: setSearchValue,
|
|
56034
|
-
scope: searchScope,
|
|
56035
|
-
onScopeChange: setSearchScope,
|
|
56036
|
-
scopes: intelligentSearchScopes,
|
|
56037
|
-
...toolbar?.searchPlaceholder === void 0 ? {} : { placeholder: toolbar.searchPlaceholder }
|
|
56038
|
-
}
|
|
56039
|
-
) : /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(
|
|
56040
|
-
"div",
|
|
56021
|
+
scopeBar ? /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(TableScopeBar, { ...scopeBar }) : null,
|
|
56022
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(MatrxTableChrome, { part: "toolbar", epoch: toolbarEpoch, render: () => {
|
|
56023
|
+
const tabsNode = viewTabs && viewTabsStore ? /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(TableViewWorkspace, { snapshot: currentViewSnapshot, onApply: applyLatestSavedView, related: relatedTableActions, ...viewTabsStore ? { store: viewTabsStore } : {} }, savedViewsId ?? "table") : viewTabs && savedViewsId && SavedViews ? /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(SavedViews, { tableId: savedViewsId, snapshot: currentViewSnapshot, defaultSnapshot: declaredDefaultViewSnapshot, onApply: applyLatestSavedView, presentation: "tabs", related: relatedTableActions }) : void 0;
|
|
56024
|
+
const tabsPlaced = Boolean(toolbar && "tabsPortalInto" in toolbar);
|
|
56025
|
+
const tabsTarget = toolbar && "tabsPortalInto" in toolbar ? toolbar.tabsPortalInto : null;
|
|
56026
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(import_jsx_runtime60.Fragment, { children: [
|
|
56027
|
+
tabsPlaced && tabsTarget && tabsNode && !hideToolbar ? (0, import_react_dom4.createPortal)(
|
|
56028
|
+
/* @__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 }),
|
|
56029
|
+
tabsTarget
|
|
56030
|
+
) : null,
|
|
56031
|
+
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)(
|
|
56032
|
+
TableTitleRow,
|
|
56041
56033
|
{
|
|
56042
|
-
|
|
56043
|
-
|
|
56044
|
-
|
|
56045
|
-
|
|
56046
|
-
),
|
|
56034
|
+
...toolbar?.singleRow ? { singleRow: true } : {},
|
|
56035
|
+
tabs: tabsPlaced ? void 0 : tabsNode,
|
|
56036
|
+
...toolbar?.title === void 0 ? {} : { title: toolbar.title },
|
|
56037
|
+
...toolbar?.titleCount === void 0 ? {} : { count: toolbar.titleCount },
|
|
56038
|
+
context: savedViewsId && SavedViews && !viewTabs ? /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("span", { "data-matrx-table-view-control": true, children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
56039
|
+
SavedViews,
|
|
56040
|
+
{
|
|
56041
|
+
tableId: savedViewsId,
|
|
56042
|
+
snapshot: currentViewSnapshot,
|
|
56043
|
+
defaultSnapshot: declaredDefaultViewSnapshot,
|
|
56044
|
+
onApply: applyLatestSavedView
|
|
56045
|
+
}
|
|
56046
|
+
) }) : void 0,
|
|
56047
|
+
search: (toolbarSearch.node = toolbar?.customSearch ?? (showSearch ? intelligentSearchEnabled ? /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
56048
|
+
TableSearch,
|
|
56049
|
+
{
|
|
56050
|
+
value: searchValue,
|
|
56051
|
+
onChange: setSearchValue,
|
|
56052
|
+
scope: searchScope,
|
|
56053
|
+
onScopeChange: setSearchScope,
|
|
56054
|
+
scopes: intelligentSearchScopes,
|
|
56055
|
+
...toolbar?.searchPlaceholder === void 0 ? {} : { placeholder: toolbar.searchPlaceholder }
|
|
56056
|
+
}
|
|
56057
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(
|
|
56058
|
+
"div",
|
|
56059
|
+
{
|
|
56060
|
+
"data-matrx-table-search": true,
|
|
56061
|
+
className: cn(
|
|
56062
|
+
"flex min-w-0 flex-1 sm:w-full sm:flex-none",
|
|
56063
|
+
toolbar?.searchMatch ? "sm:max-w-md" : "sm:max-w-xs"
|
|
56064
|
+
),
|
|
56065
|
+
children: [
|
|
56066
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("div", { className: "relative min-w-0 flex-1", children: [
|
|
56067
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(Search, { className: "absolute left-2 top-1/2 h-5 w-5 -translate-y-1/2 text-muted-foreground" }),
|
|
56068
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
56069
|
+
Input,
|
|
56070
|
+
{
|
|
56071
|
+
value: searchValue,
|
|
56072
|
+
onChange: (e) => setSearchValue(e.target.value),
|
|
56073
|
+
placeholder: toolbar?.searchPlaceholder ?? "Search\u2026",
|
|
56074
|
+
className: cn(
|
|
56075
|
+
"h-8 pl-7 pr-7 text-sm",
|
|
56076
|
+
toolbar?.searchMatch && "rounded-r-none"
|
|
56077
|
+
),
|
|
56078
|
+
style: { fontSize: "16px" }
|
|
56079
|
+
}
|
|
56080
|
+
),
|
|
56081
|
+
searchValue ? /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(Tooltip, { children: [
|
|
56082
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
56083
|
+
"button",
|
|
56084
|
+
{
|
|
56085
|
+
type: "button",
|
|
56086
|
+
"aria-label": "Clear search",
|
|
56087
|
+
className: "absolute right-1.5 top-1/2 -translate-y-1/2 rounded p-0.5 text-muted-foreground hover:text-foreground",
|
|
56088
|
+
onClick: () => setSearchValue(""),
|
|
56089
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(X, { className: "h-5 w-5" })
|
|
56090
|
+
}
|
|
56091
|
+
) }),
|
|
56092
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(TooltipContent, { children: "Clear search" })
|
|
56093
|
+
] }) : null
|
|
56094
|
+
] }),
|
|
56095
|
+
toolbar?.searchMatch ? /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(Tooltip, { children: [
|
|
56096
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(
|
|
56097
|
+
Button,
|
|
56098
|
+
{
|
|
56099
|
+
type: "button",
|
|
56100
|
+
variant: searchMatchMode === "whole_words" ? "secondary" : "outline",
|
|
56101
|
+
size: "sm",
|
|
56102
|
+
className: "h-8 shrink-0 gap-1 rounded-l-none border-l-0 px-2 text-xs",
|
|
56103
|
+
"aria-pressed": searchMatchMode === "whole_words",
|
|
56104
|
+
"aria-label": `Search match: ${searchMatchMode === "whole_words" ? "whole words" : "contains text"}`,
|
|
56105
|
+
onClick: () => setSearchMatchMode(
|
|
56106
|
+
searchMatchMode === "whole_words" ? "contains" : "whole_words"
|
|
56107
|
+
),
|
|
56108
|
+
children: [
|
|
56109
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(WholeWord, { className: "h-5 w-5" }),
|
|
56110
|
+
searchMatchMode === "whole_words" ? "Whole words" : "Contains"
|
|
56111
|
+
]
|
|
56112
|
+
}
|
|
56113
|
+
) }),
|
|
56114
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(TooltipContent, { children: searchMatchMode === "whole_words" ? "Whole words \u2014 click to match text anywhere" : "Contains text \u2014 click to require whole words" })
|
|
56115
|
+
] }) : null
|
|
56116
|
+
]
|
|
56117
|
+
}
|
|
56118
|
+
) : null), pinnedFolded && pinnedRowActive ? void 0 : toolbarSearch.node),
|
|
56047
56119
|
children: [
|
|
56048
|
-
/* @__PURE__ */ (0, import_jsx_runtime60.
|
|
56120
|
+
toolbar?.layeredFilters ? /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
56121
|
+
LayeredFilterBuilder,
|
|
56122
|
+
{
|
|
56123
|
+
fields: toolbar.layeredFilters.fields,
|
|
56124
|
+
rules: layeredFilters,
|
|
56125
|
+
onChange: setLayeredFilters,
|
|
56126
|
+
maxRules: toolbar.layeredFilters.maxRules,
|
|
56127
|
+
label: toolbar.layeredFilters.label
|
|
56128
|
+
}
|
|
56129
|
+
) : null,
|
|
56130
|
+
toolbar?.anyOf ? /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("div", { className: "relative w-full max-w-xs", children: [
|
|
56049
56131
|
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(Search, { className: "absolute left-2 top-1/2 h-5 w-5 -translate-y-1/2 text-muted-foreground" }),
|
|
56050
56132
|
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
56051
56133
|
Input,
|
|
56052
56134
|
{
|
|
56053
|
-
value:
|
|
56054
|
-
onChange: (e) =>
|
|
56055
|
-
placeholder: toolbar
|
|
56056
|
-
className:
|
|
56057
|
-
"h-8 pl-7 pr-7 text-sm",
|
|
56058
|
-
toolbar?.searchMatch && "rounded-r-none"
|
|
56059
|
-
),
|
|
56135
|
+
value: anyOfValue,
|
|
56136
|
+
onChange: (e) => setAnyOfValue(e.target.value),
|
|
56137
|
+
placeholder: toolbar.anyOf.placeholder ?? "Match any of\u2026",
|
|
56138
|
+
className: "h-8 pl-7 pr-7 text-sm",
|
|
56060
56139
|
style: { fontSize: "16px" }
|
|
56061
56140
|
}
|
|
56062
56141
|
),
|
|
56063
|
-
|
|
56142
|
+
anyOfValue ? /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(Tooltip, { children: [
|
|
56064
56143
|
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
56065
56144
|
"button",
|
|
56066
56145
|
{
|
|
56067
56146
|
type: "button",
|
|
56068
|
-
"aria-label": "Clear search",
|
|
56147
|
+
"aria-label": "Clear match-any search",
|
|
56069
56148
|
className: "absolute right-1.5 top-1/2 -translate-y-1/2 rounded p-0.5 text-muted-foreground hover:text-foreground",
|
|
56070
|
-
onClick: () =>
|
|
56149
|
+
onClick: () => setAnyOfValue(""),
|
|
56071
56150
|
children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(X, { className: "h-5 w-5" })
|
|
56072
56151
|
}
|
|
56073
56152
|
) }),
|
|
56074
|
-
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(TooltipContent, { children: "Clear search" })
|
|
56153
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(TooltipContent, { children: "Clear match-any search" })
|
|
56075
56154
|
] }) : null
|
|
56076
|
-
] }),
|
|
56077
|
-
|
|
56078
|
-
|
|
56079
|
-
|
|
56080
|
-
{
|
|
56081
|
-
type: "button",
|
|
56082
|
-
variant: searchMatchMode === "whole_words" ? "secondary" : "outline",
|
|
56083
|
-
size: "sm",
|
|
56084
|
-
className: "h-8 shrink-0 gap-1 rounded-l-none border-l-0 px-2 text-xs",
|
|
56085
|
-
"aria-pressed": searchMatchMode === "whole_words",
|
|
56086
|
-
"aria-label": `Search match: ${searchMatchMode === "whole_words" ? "whole words" : "contains text"}`,
|
|
56087
|
-
onClick: () => setSearchMatchMode(
|
|
56088
|
-
searchMatchMode === "whole_words" ? "contains" : "whole_words"
|
|
56089
|
-
),
|
|
56090
|
-
children: [
|
|
56091
|
-
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(WholeWord, { className: "h-5 w-5" }),
|
|
56092
|
-
searchMatchMode === "whole_words" ? "Whole words" : "Contains"
|
|
56093
|
-
]
|
|
56094
|
-
}
|
|
56095
|
-
) }),
|
|
56096
|
-
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(TooltipContent, { children: searchMatchMode === "whole_words" ? "Whole words \u2014 click to match text anywhere" : "Contains text \u2014 click to require whole words" })
|
|
56097
|
-
] }) : null
|
|
56098
|
-
]
|
|
56099
|
-
}
|
|
56100
|
-
) : null), pinnedFolded && pinnedRowActive ? void 0 : toolbarSearch.node),
|
|
56101
|
-
children: [
|
|
56102
|
-
toolbar?.layeredFilters ? /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
56103
|
-
LayeredFilterBuilder,
|
|
56104
|
-
{
|
|
56105
|
-
fields: toolbar.layeredFilters.fields,
|
|
56106
|
-
rules: layeredFilters,
|
|
56107
|
-
onChange: setLayeredFilters,
|
|
56108
|
-
maxRules: toolbar.layeredFilters.maxRules,
|
|
56109
|
-
label: toolbar.layeredFilters.label
|
|
56110
|
-
}
|
|
56111
|
-
) : null,
|
|
56112
|
-
toolbar?.anyOf ? /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("div", { className: "relative w-full max-w-xs", children: [
|
|
56113
|
-
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(Search, { className: "absolute left-2 top-1/2 h-5 w-5 -translate-y-1/2 text-muted-foreground" }),
|
|
56114
|
-
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
56115
|
-
Input,
|
|
56116
|
-
{
|
|
56117
|
-
value: anyOfValue,
|
|
56118
|
-
onChange: (e) => setAnyOfValue(e.target.value),
|
|
56119
|
-
placeholder: toolbar.anyOf.placeholder ?? "Match any of\u2026",
|
|
56120
|
-
className: "h-8 pl-7 pr-7 text-sm",
|
|
56121
|
-
style: { fontSize: "16px" }
|
|
56122
|
-
}
|
|
56123
|
-
),
|
|
56124
|
-
anyOfValue ? /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(Tooltip, { children: [
|
|
56125
|
-
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
56126
|
-
"button",
|
|
56155
|
+
] }) : null,
|
|
56156
|
+
renderedFacets ? /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(ToolbarFacets, { facets: renderedFacets }) : null,
|
|
56157
|
+
toolbar?.leading ? /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
56158
|
+
"div",
|
|
56127
56159
|
{
|
|
56128
|
-
|
|
56129
|
-
|
|
56130
|
-
|
|
56131
|
-
onClick: () => setAnyOfValue(""),
|
|
56132
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(X, { className: "h-5 w-5" })
|
|
56160
|
+
"data-matrx-table-toolbar-extras": true,
|
|
56161
|
+
className: "order-last flex w-full min-w-0 flex-wrap items-center gap-2",
|
|
56162
|
+
children: toolbar.leading
|
|
56133
56163
|
}
|
|
56134
|
-
)
|
|
56135
|
-
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
56136
|
-
|
|
56137
|
-
|
|
56138
|
-
|
|
56139
|
-
|
|
56140
|
-
|
|
56141
|
-
|
|
56142
|
-
|
|
56143
|
-
|
|
56144
|
-
|
|
56145
|
-
|
|
56146
|
-
|
|
56147
|
-
|
|
56148
|
-
|
|
56149
|
-
|
|
56150
|
-
|
|
56151
|
-
|
|
56152
|
-
|
|
56153
|
-
|
|
56154
|
-
|
|
56155
|
-
|
|
56156
|
-
|
|
56157
|
-
|
|
56158
|
-
|
|
56159
|
-
|
|
56160
|
-
|
|
56161
|
-
|
|
56162
|
-
|
|
56163
|
-
|
|
56164
|
-
|
|
56165
|
-
|
|
56166
|
-
|
|
56167
|
-
|
|
56168
|
-
|
|
56169
|
-
|
|
56170
|
-
|
|
56171
|
-
|
|
56172
|
-
|
|
56173
|
-
|
|
56174
|
-
|
|
56175
|
-
|
|
56176
|
-
|
|
56177
|
-
|
|
56178
|
-
|
|
56179
|
-
|
|
56180
|
-
|
|
56181
|
-
|
|
56182
|
-
|
|
56183
|
-
|
|
56184
|
-
|
|
56185
|
-
|
|
56186
|
-
|
|
56187
|
-
|
|
56188
|
-
|
|
56189
|
-
|
|
56190
|
-
|
|
56191
|
-
|
|
56192
|
-
|
|
56193
|
-
|
|
56194
|
-
|
|
56195
|
-
|
|
56196
|
-
|
|
56197
|
-
|
|
56198
|
-
|
|
56199
|
-
|
|
56200
|
-
|
|
56201
|
-
|
|
56202
|
-
|
|
56203
|
-
onQuestionChange: drill.onQuestionChange,
|
|
56204
|
-
dimensionLabel: drill.dimensions.find((d) => d.key === drill.windowDimension)?.label ?? drill.windowDimension
|
|
56205
|
-
}
|
|
56206
|
-
) : null,
|
|
56207
|
-
drillGrouped ? /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
56208
|
-
MatrxDrillMeasurePicker,
|
|
56209
|
-
{
|
|
56210
|
-
measures: drill.measures,
|
|
56211
|
-
question: drill.question,
|
|
56212
|
-
onQuestionChange: drill.onQuestionChange
|
|
56213
|
-
}
|
|
56214
|
-
) : null,
|
|
56215
|
-
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
56216
|
-
MatrxDrillGroupByMenu,
|
|
56217
|
-
{
|
|
56218
|
-
dimensions: drill.dimensions,
|
|
56219
|
-
question: drill.question,
|
|
56220
|
-
onQuestionChange: drill.onQuestionChange
|
|
56221
|
-
}
|
|
56222
|
-
)
|
|
56223
|
-
] }) : grouping?.onColumnIdChange ? /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(
|
|
56224
|
-
Select,
|
|
56225
|
-
{
|
|
56226
|
-
value: groupingColumnId ?? NO_GROUPING_VALUE,
|
|
56227
|
-
onValueChange: (value) => grouping.onColumnIdChange?.(value === NO_GROUPING_VALUE ? null : value),
|
|
56228
|
-
children: [
|
|
56164
|
+
) : null,
|
|
56165
|
+
drill && drill.question.where.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
56166
|
+
MatrxDrillTrail,
|
|
56167
|
+
{
|
|
56168
|
+
dimensions: drill.dimensions,
|
|
56169
|
+
question: drill.question,
|
|
56170
|
+
onQuestionChange: drill.onQuestionChange,
|
|
56171
|
+
rootLabel: drill.rootLabel ?? "All records",
|
|
56172
|
+
emptyLabel: drill.emptyLabel,
|
|
56173
|
+
className: "max-w-full"
|
|
56174
|
+
}
|
|
56175
|
+
) : null,
|
|
56176
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(
|
|
56177
|
+
"div",
|
|
56178
|
+
{
|
|
56179
|
+
"data-matrx-table-actions": true,
|
|
56180
|
+
className: cn(
|
|
56181
|
+
"ml-auto flex min-w-0 items-center gap-0",
|
|
56182
|
+
toolbar?.singleRow ? "shrink-0 flex-nowrap" : "flex-wrap"
|
|
56183
|
+
),
|
|
56184
|
+
children: [
|
|
56185
|
+
toolbar?.singleRow && coverageResult && coverageResult.notice ? /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(Tooltip, { children: [
|
|
56186
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(
|
|
56187
|
+
"span",
|
|
56188
|
+
{
|
|
56189
|
+
"data-matrx-table-coverage": true,
|
|
56190
|
+
"data-matrx-table-coverage-scope": coverageResult.scope,
|
|
56191
|
+
role: "status",
|
|
56192
|
+
tabIndex: 0,
|
|
56193
|
+
className: "mr-1 inline-flex shrink-0 items-center whitespace-nowrap rounded-md border border-amber-300/70 bg-amber-50 px-2 py-0.5 text-[11px] font-semibold text-amber-900 dark:border-amber-500/40 dark:bg-amber-950/40 dark:text-amber-200",
|
|
56194
|
+
children: [
|
|
56195
|
+
coverageResult.badge,
|
|
56196
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("span", { className: "sr-only", children: [
|
|
56197
|
+
": ",
|
|
56198
|
+
coverageResult.notice
|
|
56199
|
+
] })
|
|
56200
|
+
]
|
|
56201
|
+
}
|
|
56202
|
+
) }),
|
|
56203
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(TooltipContent, { className: "max-w-xs", children: coverageResult.notice })
|
|
56204
|
+
] }) : null,
|
|
56205
|
+
renderToolbarControls(/* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(import_jsx_runtime60.Fragment, { children: [
|
|
56206
|
+
hasActiveFilters ? /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
56207
|
+
TableToolbarAction,
|
|
56208
|
+
{
|
|
56209
|
+
HostAction: host.ToolbarAction,
|
|
56210
|
+
ariaLabel: "Clear all filters",
|
|
56211
|
+
tooltip: "Clear search and filters; keep columns and sort",
|
|
56212
|
+
onClick: clearAllFilters,
|
|
56213
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(Eraser, {})
|
|
56214
|
+
}
|
|
56215
|
+
) : null,
|
|
56216
|
+
drill ? /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(import_jsx_runtime60.Fragment, { children: [
|
|
56217
|
+
drill.windowDimension ? /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
56218
|
+
MatrxDrillWindowMenu,
|
|
56219
|
+
{
|
|
56220
|
+
question: drill.question,
|
|
56221
|
+
onQuestionChange: drill.onQuestionChange,
|
|
56222
|
+
dimensionLabel: drill.dimensions.find((d) => d.key === drill.windowDimension)?.label ?? drill.windowDimension
|
|
56223
|
+
}
|
|
56224
|
+
) : null,
|
|
56225
|
+
drillGrouped ? /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
56226
|
+
MatrxDrillMeasurePicker,
|
|
56227
|
+
{
|
|
56228
|
+
measures: drill.measures,
|
|
56229
|
+
question: drill.question,
|
|
56230
|
+
onQuestionChange: drill.onQuestionChange
|
|
56231
|
+
}
|
|
56232
|
+
) : null,
|
|
56229
56233
|
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
56230
|
-
|
|
56234
|
+
MatrxDrillGroupByMenu,
|
|
56231
56235
|
{
|
|
56232
|
-
|
|
56233
|
-
|
|
56234
|
-
|
|
56235
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(SelectValue, { placeholder: "No groups" })
|
|
56236
|
+
dimensions: drill.dimensions,
|
|
56237
|
+
question: drill.question,
|
|
56238
|
+
onQuestionChange: drill.onQuestionChange
|
|
56236
56239
|
}
|
|
56237
|
-
)
|
|
56238
|
-
|
|
56239
|
-
|
|
56240
|
-
|
|
56241
|
-
|
|
56242
|
-
|
|
56243
|
-
|
|
56244
|
-
|
|
56245
|
-
|
|
56246
|
-
|
|
56247
|
-
|
|
56248
|
-
|
|
56249
|
-
|
|
56250
|
-
|
|
56251
|
-
|
|
56252
|
-
|
|
56253
|
-
|
|
56254
|
-
|
|
56255
|
-
|
|
56256
|
-
|
|
56257
|
-
|
|
56258
|
-
|
|
56259
|
-
|
|
56260
|
-
|
|
56261
|
-
|
|
56262
|
-
|
|
56263
|
-
|
|
56264
|
-
|
|
56265
|
-
|
|
56266
|
-
|
|
56267
|
-
|
|
56268
|
-
|
|
56269
|
-
|
|
56270
|
-
|
|
56271
|
-
|
|
56272
|
-
|
|
56273
|
-
|
|
56274
|
-
|
|
56275
|
-
|
|
56276
|
-
|
|
56277
|
-
|
|
56278
|
-
|
|
56279
|
-
|
|
56280
|
-
|
|
56281
|
-
|
|
56282
|
-
|
|
56283
|
-
|
|
56284
|
-
|
|
56285
|
-
|
|
56286
|
-
|
|
56287
|
-
|
|
56288
|
-
|
|
56289
|
-
|
|
56290
|
-
|
|
56291
|
-
|
|
56292
|
-
|
|
56293
|
-
|
|
56294
|
-
|
|
56295
|
-
|
|
56296
|
-
|
|
56297
|
-
|
|
56298
|
-
|
|
56299
|
-
|
|
56300
|
-
|
|
56301
|
-
|
|
56302
|
-
|
|
56303
|
-
|
|
56304
|
-
|
|
56305
|
-
|
|
56306
|
-
|
|
56307
|
-
|
|
56308
|
-
|
|
56309
|
-
|
|
56310
|
-
|
|
56311
|
-
|
|
56312
|
-
|
|
56313
|
-
|
|
56314
|
-
|
|
56315
|
-
|
|
56316
|
-
|
|
56317
|
-
|
|
56318
|
-
|
|
56319
|
-
|
|
56320
|
-
|
|
56321
|
-
|
|
56240
|
+
)
|
|
56241
|
+
] }) : grouping?.onColumnIdChange ? /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(
|
|
56242
|
+
Select,
|
|
56243
|
+
{
|
|
56244
|
+
value: groupingColumnId ?? NO_GROUPING_VALUE,
|
|
56245
|
+
onValueChange: (value) => grouping.onColumnIdChange?.(value === NO_GROUPING_VALUE ? null : value),
|
|
56246
|
+
children: [
|
|
56247
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
56248
|
+
SelectTrigger,
|
|
56249
|
+
{
|
|
56250
|
+
"data-matrx-table-group-by": true,
|
|
56251
|
+
"aria-label": "Group rows by a column",
|
|
56252
|
+
className: "h-8 w-auto min-w-[9rem] gap-1 text-xs",
|
|
56253
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(SelectValue, { placeholder: "No groups" })
|
|
56254
|
+
}
|
|
56255
|
+
),
|
|
56256
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(SelectContent, { children: [
|
|
56257
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(SelectItem, { value: NO_GROUPING_VALUE, children: "No groups" }),
|
|
56258
|
+
groupableColumns.map((col) => /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(SelectItem, { value: columnId(col), children: `Group by ${col.label ?? (typeof col.header === "string" ? col.header : columnId(col))}` }, columnId(col)))
|
|
56259
|
+
] })
|
|
56260
|
+
]
|
|
56261
|
+
}
|
|
56262
|
+
) : null,
|
|
56263
|
+
columns.length > 0 && toolbar?.columns !== false ? /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
56264
|
+
TableToolbarAction,
|
|
56265
|
+
{
|
|
56266
|
+
HostAction: host.ToolbarAction,
|
|
56267
|
+
ariaLabel: "Columns",
|
|
56268
|
+
tooltip: "Show, hide, or reorder columns",
|
|
56269
|
+
onClick: () => setColumnManagerOpen(true),
|
|
56270
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(SlidersHorizontal, {})
|
|
56271
|
+
}
|
|
56272
|
+
) : null,
|
|
56273
|
+
toolbar?.refresh ? /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
56274
|
+
TableToolbarAction,
|
|
56275
|
+
{
|
|
56276
|
+
HostAction: host.ToolbarAction,
|
|
56277
|
+
ariaLabel: toolbar.refresh.label ?? "Refresh",
|
|
56278
|
+
tooltip: isFetching ? "Refreshing table data" : toolbar.refresh.label ?? "Refresh",
|
|
56279
|
+
disabled: isFetching || toolbarActionPending.refresh,
|
|
56280
|
+
busy: isFetching || toolbarActionPending.refresh,
|
|
56281
|
+
onClick: () => {
|
|
56282
|
+
if (toolbarActionPendingRef.current.refresh) return;
|
|
56283
|
+
toolbarActionPendingRef.current.refresh = true;
|
|
56284
|
+
setToolbarActionPending((current) => ({ ...current, refresh: true }));
|
|
56285
|
+
setToolbarActionError(null);
|
|
56286
|
+
void Promise.resolve().then(() => toolbar.refresh?.onRefresh()).catch((cause) => {
|
|
56287
|
+
const message = cause instanceof Error ? cause.message : String(cause);
|
|
56288
|
+
setToolbarActionError(`Refresh failed: ${message}`);
|
|
56289
|
+
toast.error(`Refresh failed: ${message}`);
|
|
56290
|
+
}).finally(() => {
|
|
56291
|
+
toolbarActionPendingRef.current.refresh = false;
|
|
56292
|
+
setToolbarActionPending((current) => ({ ...current, refresh: false }));
|
|
56293
|
+
});
|
|
56294
|
+
},
|
|
56295
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(RefreshControlIcon, { spinning: isFetching || toolbarActionPending.refresh })
|
|
56296
|
+
}
|
|
56297
|
+
) : null,
|
|
56298
|
+
toolbar?.add ? /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
56299
|
+
TableToolbarAction,
|
|
56300
|
+
{
|
|
56301
|
+
HostAction: host.ToolbarAction,
|
|
56302
|
+
ariaLabel: "Add",
|
|
56303
|
+
tooltip: toolbar.add.disabled ? toolbar.add.disabledReason ?? "Add unavailable" : "Add",
|
|
56304
|
+
disabled: toolbar.add.disabled || toolbarActionPending.add,
|
|
56305
|
+
busy: toolbarActionPending.add,
|
|
56306
|
+
onClick: () => {
|
|
56307
|
+
if (toolbarActionPendingRef.current.add) return;
|
|
56308
|
+
toolbarActionPendingRef.current.add = true;
|
|
56309
|
+
setToolbarActionPending((current) => ({ ...current, add: true }));
|
|
56310
|
+
setToolbarActionError(null);
|
|
56311
|
+
void Promise.resolve().then(() => toolbar.add?.onAdd()).catch((cause) => {
|
|
56312
|
+
const message = cause instanceof Error ? cause.message : String(cause);
|
|
56313
|
+
setToolbarActionError(`Add failed: ${message}`);
|
|
56314
|
+
toast.error(`Add failed: ${message}`);
|
|
56315
|
+
}).finally(() => {
|
|
56316
|
+
toolbarActionPendingRef.current.add = false;
|
|
56317
|
+
setToolbarActionPending((current) => ({ ...current, add: false }));
|
|
56318
|
+
});
|
|
56319
|
+
},
|
|
56320
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(Plus, {})
|
|
56321
|
+
}
|
|
56322
|
+
) : null,
|
|
56323
|
+
toolbar?.actions
|
|
56324
|
+
] }), showToolbarCopy && effectiveCopy ? /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(ToolbarListedLabel, { label: "Copy or export", children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
56325
|
+
CopyButtons,
|
|
56326
|
+
{
|
|
56327
|
+
size: "toolbar",
|
|
56328
|
+
sourceId: `${tableCopySourceNamespace}:view`,
|
|
56329
|
+
label: effectiveCopy.listLabel ?? `${effectiveCopy.label} view`,
|
|
56330
|
+
...effectiveCopy.references ? { references: effectiveCopy.references(processed, data) } : {},
|
|
56331
|
+
...effectiveCopy.triggerVariant ? { triggerVariant: effectiveCopy.triggerVariant } : {},
|
|
56332
|
+
...copy === void 0 ? {} : {
|
|
56333
|
+
human: () => {
|
|
56334
|
+
const { processed: processed2, data: data2 } = chromeLatest.current;
|
|
56335
|
+
return effectiveCopy.listHuman?.(processed2, data2) ?? buildViewHuman(effectiveCopy, processed2, effectiveCopyColumns);
|
|
56336
|
+
},
|
|
56337
|
+
json: () => {
|
|
56338
|
+
const { processed: processed2, data: data2 } = chromeLatest.current;
|
|
56339
|
+
return effectiveCopy.listJson?.(processed2, data2) ?? processed2.map((r) => effectiveCopy.agentRow ? effectiveCopy.agentRow(r) : r);
|
|
56340
|
+
}
|
|
56341
|
+
},
|
|
56342
|
+
agent: () => {
|
|
56343
|
+
const { processed: processed2, data: data2 } = chromeLatest.current;
|
|
56344
|
+
return copy !== void 0 && effectiveCopy.listAgent ? effectiveCopy.listAgent(processed2, data2) : copy === void 0 ? buildDefaultTableViewAgentInput(effectiveCopy, processed2, data2, declaredVisibleCopyColumns, {
|
|
56345
|
+
search: searchValue,
|
|
56346
|
+
searchMatchMode,
|
|
56347
|
+
anyOf: anyOfValue,
|
|
56348
|
+
filterCount: activeFilterCount + completeLayeredFilterRules(layeredFilters).length,
|
|
56349
|
+
sort: sort ? `${sort.id}:${sort.direction}` : null
|
|
56350
|
+
}) : buildViewAgentInput(effectiveCopy, processed2, data2, {
|
|
56351
|
+
search: searchValue,
|
|
56352
|
+
searchMatchMode,
|
|
56353
|
+
anyOf: anyOfValue,
|
|
56354
|
+
filterCount: activeFilterCount + completeLayeredFilterRules(layeredFilters).length,
|
|
56355
|
+
sort: sort ? `${sort.id}:${sort.direction}` : null
|
|
56356
|
+
});
|
|
56357
|
+
},
|
|
56358
|
+
aiVariants: [
|
|
56359
|
+
...effectiveCopy.aiVariants?.(processed, data) ?? [],
|
|
56360
|
+
...copySubsetVariantFor(() => chromeLatest.current.processed, "view")
|
|
56361
|
+
],
|
|
56362
|
+
...effectiveCopy.aiCustom ? { aiCustom: effectiveCopy.aiCustom(processed, data) } : {},
|
|
56363
|
+
export: {
|
|
56364
|
+
items: [],
|
|
56365
|
+
sheetRows: () => chromeLatest.current.processed.map(
|
|
56366
|
+
(row) => projectDefaultTableCopyRow(row, declaredVisibleCopyColumns)
|
|
56367
|
+
),
|
|
56368
|
+
sheetColumns: () => declaredVisibleCopyColumns.map((column) => ({
|
|
56369
|
+
id: columnId(column),
|
|
56370
|
+
label: column.label ?? (typeof column.header === "string" ? column.header : columnId(column))
|
|
56371
|
+
})),
|
|
56372
|
+
...effectiveCopy.export?.(processed, data)
|
|
56373
|
+
}
|
|
56322
56374
|
}
|
|
56323
|
-
}
|
|
56324
|
-
|
|
56325
|
-
|
|
56326
|
-
|
|
56327
|
-
|
|
56328
|
-
|
|
56329
|
-
|
|
56330
|
-
|
|
56331
|
-
|
|
56332
|
-
|
|
56333
|
-
search: searchValue,
|
|
56334
|
-
searchMatchMode,
|
|
56335
|
-
anyOf: anyOfValue,
|
|
56336
|
-
filterCount: activeFilterCount + completeLayeredFilterRules(layeredFilters).length,
|
|
56337
|
-
sort: sort ? `${sort.id}:${sort.direction}` : null
|
|
56338
|
-
});
|
|
56339
|
-
},
|
|
56340
|
-
aiVariants: [
|
|
56341
|
-
...effectiveCopy.aiVariants?.(processed, data) ?? [],
|
|
56342
|
-
...copySubsetVariantFor(() => chromeLatest.current.processed, "view")
|
|
56343
|
-
],
|
|
56344
|
-
...effectiveCopy.aiCustom ? { aiCustom: effectiveCopy.aiCustom(processed, data) } : {},
|
|
56345
|
-
export: {
|
|
56346
|
-
items: [],
|
|
56347
|
-
sheetRows: () => chromeLatest.current.processed.map(
|
|
56348
|
-
(row) => projectDefaultTableCopyRow(row, declaredVisibleCopyColumns)
|
|
56349
|
-
),
|
|
56350
|
-
sheetColumns: () => declaredVisibleCopyColumns.map((column) => ({
|
|
56351
|
-
id: columnId(column),
|
|
56352
|
-
label: column.label ?? (typeof column.header === "string" ? column.header : columnId(column))
|
|
56353
|
-
})),
|
|
56354
|
-
...effectiveCopy.export?.(processed, data)
|
|
56355
|
-
}
|
|
56356
|
-
}
|
|
56357
|
-
) }) : null)
|
|
56358
|
-
]
|
|
56359
|
-
}
|
|
56360
|
-
),
|
|
56361
|
-
toolbarEnd.node
|
|
56362
|
-
]
|
|
56363
|
-
}
|
|
56364
|
-
)) }),
|
|
56375
|
+
) }) : null)
|
|
56376
|
+
]
|
|
56377
|
+
}
|
|
56378
|
+
),
|
|
56379
|
+
toolbarEnd.node
|
|
56380
|
+
]
|
|
56381
|
+
}
|
|
56382
|
+
))
|
|
56383
|
+
] });
|
|
56384
|
+
} }),
|
|
56365
56385
|
/* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("div", { "data-matrx-table-body-region": true, className: "flex min-h-0 flex-1 flex-col gap-2", children: [
|
|
56386
|
+
localSortNotice && !isLoading && !readView.failure ? /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("p", { "data-matrx-table-local-sort-scope": true, role: "status", className: "shrink-0 text-xs text-muted-foreground", children: localSortNotice }) : null,
|
|
56366
56387
|
coverageResult && coverageResult.notice && !toolbar?.singleRow ? /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(
|
|
56367
56388
|
"div",
|
|
56368
56389
|
{
|
|
@@ -56522,6 +56543,7 @@ function MatrxDataTableCore(coreProps) {
|
|
|
56522
56543
|
"relative h-full w-full overflow-auto rounded-md border border-border bg-card",
|
|
56523
56544
|
// Embedded: the host (the card) is the frame; the rows sit on its surface.
|
|
56524
56545
|
embedded && "h-auto rounded-none border-0 bg-transparent",
|
|
56546
|
+
frameHeight === "content" && "h-auto max-h-full",
|
|
56525
56547
|
mobileCards && tableWithCardsClass,
|
|
56526
56548
|
tableClassName
|
|
56527
56549
|
),
|
|
@@ -56590,6 +56612,7 @@ function MatrxDataTableCore(coreProps) {
|
|
|
56590
56612
|
{
|
|
56591
56613
|
ref: tableHeaderRef,
|
|
56592
56614
|
"data-matrx-table-sticky-header": stickyHeader ? "true" : void 0,
|
|
56615
|
+
hidden: emptyHeader === "hide" && !isLoading && data.length === 0 && activeFilterCount === 0,
|
|
56593
56616
|
className: cn(
|
|
56594
56617
|
// 🚨 ABOVE THE FROZEN COLUMN, NOT UNDER IT. A frozen body
|
|
56595
56618
|
// cell is `sm:z-20` so it can slide under the columns to
|