@ai-matrx/design-system 0.35.0 → 0.37.1
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 +48 -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 +63 -7
- 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 +63 -7
- 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/spreadsheet.cjs +18 -0
- package/dist/data-table/spreadsheet.cjs.map +1 -1
- package/dist/data-table/spreadsheet.d.cts +5 -0
- package/dist/data-table/spreadsheet.d.ts +5 -0
- package/dist/data-table/spreadsheet.js +18 -0
- package/dist/data-table/spreadsheet.js.map +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-Cxm5XK0L.d.ts → types-B8vwElPz.d.ts} +25 -1
- package/dist/{types-kiV-CAuZ.d.cts → types-BuMHbFjs.d.cts} +25 -1
- package/package.json +7 -7
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
|
-
import { h as MatrxDataTableProps, i as TableViewSnapshot, d as MatrxDataTableRecordControls, j as ColumnMarker, M as MatrxColumnDef } from '../types-
|
|
4
|
-
export { A as AnyOfColumnSearch, B as BOOLEAN_TRUE_COLOR, k as CELL_TINT_CLASS, l as COLOR_RULE_OPS, m as COLOR_RULE_OP_LABELS, n as CellEditType, o as CellEditsMap, p as ChoiceColorLookup, q as ColorBy, r as ColorRule, s as ColorRuleOp, f as ColumnFilterKind, a as ColumnFilterValue, C as ColumnFiltersState, E as EMPTY_TABLE_STYLE, t as MatrxDataTableContextMenuConfig, g as MatrxDataTableCopyConfig, u as MatrxDataTableCoverageConfig, c as MatrxDataTableDensity, v as MatrxDataTableDetailConfig, w as MatrxDataTableEditConfig, x as MatrxDataTableEmptyState, y as MatrxDataTableExpandedDetailConfig, z as MatrxDataTableFacetsConfig, D as MatrxDataTableFilterUi, F as MatrxDataTableGroupingConfig, G as MatrxDataTableHierarchyConfig, H as MatrxDataTableHierarchyMove, I as MatrxDataTableMobileCardControls, J as MatrxDataTableMultiExpandedDetailConfig, K as MatrxDataTableQueryControl, e as MatrxDataTableQueryState, N as MatrxDataTableSelectionConfig, O as MatrxDataTableSingleExpandedDetailConfig, P as MatrxDataTableSourceProcessing, Q as MatrxDataTableSpreadsheetConfig, R as MatrxDataTableStyleConfig, U as MatrxDataTableToolbar, V as MatrxDataTableUrlStateConfig, W as MatrxDataTableVirtualizeConfig, X as MatrxDataTableWindowConfig, Y as MatrxTablePagination, Z as OPS_WITH_VALUE, _ as ROW_TINT_CLASS, $ as STYLE_COLORS, a0 as STYLE_COLOR_LABELS, a1 as SWATCH_CLASS, a2 as SortDirection, S as SortState, a3 as StyleColor, a4 as StylePath, a5 as StyleTarget, a6 as TABLE_STYLE_METADATA_KEY, a7 as TABLE_STYLE_VERSION, a8 as TableRankedSearchOptions, b as TableSavedViewsProps, T as TableSearchMatchMode, a9 as TableSearchRole, aa as TableSearchScope, ab as TableStyle, ac as TableViewQuery, ad as TextFilterMode, ae as ToolbarFacet, af as applyStylePath, ag as colorForChoice, ah as evaluateRule, ai as inferTableSearchRole, aj as isStyleColor, ak as parseTableStyle, al as rankTableSearchRows, am as resolveCellColor, an as resolveRowColor, ao as resolveTableSearchScopes, ap as stylePath, aq as tableStyleFromMetadata, ar as tableStyleIsEmpty } from '../types-
|
|
3
|
+
import { h as MatrxDataTableProps, i as TableViewSnapshot, d as MatrxDataTableRecordControls, j as ColumnMarker, M as MatrxColumnDef } from '../types-BuMHbFjs.cjs';
|
|
4
|
+
export { A as AnyOfColumnSearch, B as BOOLEAN_TRUE_COLOR, k as CELL_TINT_CLASS, l as COLOR_RULE_OPS, m as COLOR_RULE_OP_LABELS, n as CellEditType, o as CellEditsMap, p as ChoiceColorLookup, q as ColorBy, r as ColorRule, s as ColorRuleOp, f as ColumnFilterKind, a as ColumnFilterValue, C as ColumnFiltersState, E as EMPTY_TABLE_STYLE, t as MatrxDataTableContextMenuConfig, g as MatrxDataTableCopyConfig, u as MatrxDataTableCoverageConfig, c as MatrxDataTableDensity, v as MatrxDataTableDetailConfig, w as MatrxDataTableEditConfig, x as MatrxDataTableEmptyState, y as MatrxDataTableExpandedDetailConfig, z as MatrxDataTableFacetsConfig, D as MatrxDataTableFilterUi, F as MatrxDataTableGroupingConfig, G as MatrxDataTableHierarchyConfig, H as MatrxDataTableHierarchyMove, I as MatrxDataTableMobileCardControls, J as MatrxDataTableMultiExpandedDetailConfig, K as MatrxDataTableQueryControl, e as MatrxDataTableQueryState, N as MatrxDataTableSelectionConfig, O as MatrxDataTableSingleExpandedDetailConfig, P as MatrxDataTableSourceProcessing, Q as MatrxDataTableSpreadsheetConfig, R as MatrxDataTableStyleConfig, U as MatrxDataTableToolbar, V as MatrxDataTableUrlStateConfig, W as MatrxDataTableVirtualizeConfig, X as MatrxDataTableWindowConfig, Y as MatrxTablePagination, Z as OPS_WITH_VALUE, _ as ROW_TINT_CLASS, $ as STYLE_COLORS, a0 as STYLE_COLOR_LABELS, a1 as SWATCH_CLASS, a2 as SortDirection, S as SortState, a3 as StyleColor, a4 as StylePath, a5 as StyleTarget, a6 as TABLE_STYLE_METADATA_KEY, a7 as TABLE_STYLE_VERSION, a8 as TableRankedSearchOptions, b as TableSavedViewsProps, T as TableSearchMatchMode, a9 as TableSearchRole, aa as TableSearchScope, ab as TableStyle, ac as TableViewQuery, ad as TextFilterMode, ae as ToolbarFacet, af as applyStylePath, ag as colorForChoice, ah as evaluateRule, ai as inferTableSearchRole, aj as isStyleColor, ak as parseTableStyle, al as rankTableSearchRows, am as resolveCellColor, an as resolveRowColor, ao as resolveTableSearchScopes, ap as stylePath, aq as tableStyleFromMetadata, ar as tableStyleIsEmpty } from '../types-BuMHbFjs.cjs';
|
|
5
5
|
export { MatrxDataTableHost, MatrxDataTableProvider, MatrxTableRowAlchemy, TableDoors, TableEntityRefProps, TableLinkProps, TablePeekProps, TableSidePanelProps, TableToolbarActionProps, TableWindowPanelProps, useMatrxDataTableHost, useMatrxTableRowAlchemy } from './host.cjs';
|
|
6
6
|
import { CopyControlProps } from './copy-types.cjs';
|
|
7
7
|
export { AgentPayloadInput } from './copy-types.cjs';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
|
-
import { h as MatrxDataTableProps, i as TableViewSnapshot, d as MatrxDataTableRecordControls, j as ColumnMarker, M as MatrxColumnDef } from '../types-
|
|
4
|
-
export { A as AnyOfColumnSearch, B as BOOLEAN_TRUE_COLOR, k as CELL_TINT_CLASS, l as COLOR_RULE_OPS, m as COLOR_RULE_OP_LABELS, n as CellEditType, o as CellEditsMap, p as ChoiceColorLookup, q as ColorBy, r as ColorRule, s as ColorRuleOp, f as ColumnFilterKind, a as ColumnFilterValue, C as ColumnFiltersState, E as EMPTY_TABLE_STYLE, t as MatrxDataTableContextMenuConfig, g as MatrxDataTableCopyConfig, u as MatrxDataTableCoverageConfig, c as MatrxDataTableDensity, v as MatrxDataTableDetailConfig, w as MatrxDataTableEditConfig, x as MatrxDataTableEmptyState, y as MatrxDataTableExpandedDetailConfig, z as MatrxDataTableFacetsConfig, D as MatrxDataTableFilterUi, F as MatrxDataTableGroupingConfig, G as MatrxDataTableHierarchyConfig, H as MatrxDataTableHierarchyMove, I as MatrxDataTableMobileCardControls, J as MatrxDataTableMultiExpandedDetailConfig, K as MatrxDataTableQueryControl, e as MatrxDataTableQueryState, N as MatrxDataTableSelectionConfig, O as MatrxDataTableSingleExpandedDetailConfig, P as MatrxDataTableSourceProcessing, Q as MatrxDataTableSpreadsheetConfig, R as MatrxDataTableStyleConfig, U as MatrxDataTableToolbar, V as MatrxDataTableUrlStateConfig, W as MatrxDataTableVirtualizeConfig, X as MatrxDataTableWindowConfig, Y as MatrxTablePagination, Z as OPS_WITH_VALUE, _ as ROW_TINT_CLASS, $ as STYLE_COLORS, a0 as STYLE_COLOR_LABELS, a1 as SWATCH_CLASS, a2 as SortDirection, S as SortState, a3 as StyleColor, a4 as StylePath, a5 as StyleTarget, a6 as TABLE_STYLE_METADATA_KEY, a7 as TABLE_STYLE_VERSION, a8 as TableRankedSearchOptions, b as TableSavedViewsProps, T as TableSearchMatchMode, a9 as TableSearchRole, aa as TableSearchScope, ab as TableStyle, ac as TableViewQuery, ad as TextFilterMode, ae as ToolbarFacet, af as applyStylePath, ag as colorForChoice, ah as evaluateRule, ai as inferTableSearchRole, aj as isStyleColor, ak as parseTableStyle, al as rankTableSearchRows, am as resolveCellColor, an as resolveRowColor, ao as resolveTableSearchScopes, ap as stylePath, aq as tableStyleFromMetadata, ar as tableStyleIsEmpty } from '../types-
|
|
3
|
+
import { h as MatrxDataTableProps, i as TableViewSnapshot, d as MatrxDataTableRecordControls, j as ColumnMarker, M as MatrxColumnDef } from '../types-B8vwElPz.js';
|
|
4
|
+
export { A as AnyOfColumnSearch, B as BOOLEAN_TRUE_COLOR, k as CELL_TINT_CLASS, l as COLOR_RULE_OPS, m as COLOR_RULE_OP_LABELS, n as CellEditType, o as CellEditsMap, p as ChoiceColorLookup, q as ColorBy, r as ColorRule, s as ColorRuleOp, f as ColumnFilterKind, a as ColumnFilterValue, C as ColumnFiltersState, E as EMPTY_TABLE_STYLE, t as MatrxDataTableContextMenuConfig, g as MatrxDataTableCopyConfig, u as MatrxDataTableCoverageConfig, c as MatrxDataTableDensity, v as MatrxDataTableDetailConfig, w as MatrxDataTableEditConfig, x as MatrxDataTableEmptyState, y as MatrxDataTableExpandedDetailConfig, z as MatrxDataTableFacetsConfig, D as MatrxDataTableFilterUi, F as MatrxDataTableGroupingConfig, G as MatrxDataTableHierarchyConfig, H as MatrxDataTableHierarchyMove, I as MatrxDataTableMobileCardControls, J as MatrxDataTableMultiExpandedDetailConfig, K as MatrxDataTableQueryControl, e as MatrxDataTableQueryState, N as MatrxDataTableSelectionConfig, O as MatrxDataTableSingleExpandedDetailConfig, P as MatrxDataTableSourceProcessing, Q as MatrxDataTableSpreadsheetConfig, R as MatrxDataTableStyleConfig, U as MatrxDataTableToolbar, V as MatrxDataTableUrlStateConfig, W as MatrxDataTableVirtualizeConfig, X as MatrxDataTableWindowConfig, Y as MatrxTablePagination, Z as OPS_WITH_VALUE, _ as ROW_TINT_CLASS, $ as STYLE_COLORS, a0 as STYLE_COLOR_LABELS, a1 as SWATCH_CLASS, a2 as SortDirection, S as SortState, a3 as StyleColor, a4 as StylePath, a5 as StyleTarget, a6 as TABLE_STYLE_METADATA_KEY, a7 as TABLE_STYLE_VERSION, a8 as TableRankedSearchOptions, b as TableSavedViewsProps, T as TableSearchMatchMode, a9 as TableSearchRole, aa as TableSearchScope, ab as TableStyle, ac as TableViewQuery, ad as TextFilterMode, ae as ToolbarFacet, af as applyStylePath, ag as colorForChoice, ah as evaluateRule, ai as inferTableSearchRole, aj as isStyleColor, ak as parseTableStyle, al as rankTableSearchRows, am as resolveCellColor, an as resolveRowColor, ao as resolveTableSearchScopes, ap as stylePath, aq as tableStyleFromMetadata, ar as tableStyleIsEmpty } from '../types-B8vwElPz.js';
|
|
5
5
|
export { MatrxDataTableHost, MatrxDataTableProvider, MatrxTableRowAlchemy, TableDoors, TableEntityRefProps, TableLinkProps, TablePeekProps, TableSidePanelProps, TableToolbarActionProps, TableWindowPanelProps, useMatrxDataTableHost, useMatrxTableRowAlchemy } from './host.js';
|
|
6
6
|
import { CopyControlProps } from './copy-types.js';
|
|
7
7
|
export { AgentPayloadInput } from './copy-types.js';
|
package/dist/data-table/index.js
CHANGED
|
@@ -8366,6 +8366,19 @@ function targetsAnEditor(target) {
|
|
|
8366
8366
|
if (!element) return false;
|
|
8367
8367
|
return element.closest("input, textarea, select, [contenteditable='true']") !== null;
|
|
8368
8368
|
}
|
|
8369
|
+
function camePastAPortal(target, host) {
|
|
8370
|
+
if (typeof Element === "undefined") return false;
|
|
8371
|
+
const element = target instanceof Element ? target : null;
|
|
8372
|
+
const owner = host instanceof Element ? host : null;
|
|
8373
|
+
if (!element || !owner) return false;
|
|
8374
|
+
return !owner.contains(element);
|
|
8375
|
+
}
|
|
8376
|
+
function camePastAPortalIntoTheContainer(target) {
|
|
8377
|
+
if (typeof Element === "undefined") return false;
|
|
8378
|
+
const element = target instanceof Element ? target : null;
|
|
8379
|
+
if (!element) return false;
|
|
8380
|
+
return element.closest('[data-matrx-table-spreadsheet="true"]') === null;
|
|
8381
|
+
}
|
|
8369
8382
|
function useSpreadsheetGrid(options) {
|
|
8370
8383
|
const [range, setRange] = useState16(null);
|
|
8371
8384
|
const [fillTarget, setFillTarget] = useState16(null);
|
|
@@ -8537,6 +8550,7 @@ function useSpreadsheetGrid(options) {
|
|
|
8537
8550
|
const current = optionsRef.current;
|
|
8538
8551
|
if (!current) return;
|
|
8539
8552
|
if (targetsAnEditor(event.target)) return;
|
|
8553
|
+
if (camePastAPortalIntoTheContainer(event.target)) return;
|
|
8540
8554
|
const accel = event.metaKey || event.ctrlKey;
|
|
8541
8555
|
if (accel && (event.key === "z" || event.key === "Z")) {
|
|
8542
8556
|
event.preventDefault();
|
|
@@ -8623,6 +8637,7 @@ function useSpreadsheetGrid(options) {
|
|
|
8623
8637
|
const onCopy = useCallback7(
|
|
8624
8638
|
(event) => {
|
|
8625
8639
|
if (!optionsRef.current || !range || targetsAnEditor(event.target)) return;
|
|
8640
|
+
if (camePastAPortalIntoTheContainer(event.target)) return;
|
|
8626
8641
|
const text = selectionAsTsv();
|
|
8627
8642
|
if (!text) return;
|
|
8628
8643
|
event.preventDefault();
|
|
@@ -8633,6 +8648,7 @@ function useSpreadsheetGrid(options) {
|
|
|
8633
8648
|
const onCut = useCallback7(
|
|
8634
8649
|
(event) => {
|
|
8635
8650
|
if (!optionsRef.current || !range || targetsAnEditor(event.target)) return;
|
|
8651
|
+
if (camePastAPortalIntoTheContainer(event.target)) return;
|
|
8636
8652
|
const text = selectionAsTsv();
|
|
8637
8653
|
if (!text) return;
|
|
8638
8654
|
event.preventDefault();
|
|
@@ -8645,6 +8661,7 @@ function useSpreadsheetGrid(options) {
|
|
|
8645
8661
|
(event) => {
|
|
8646
8662
|
const current = optionsRef.current;
|
|
8647
8663
|
if (!current || current.paste === false || !range || targetsAnEditor(event.target)) return;
|
|
8664
|
+
if (camePastAPortalIntoTheContainer(event.target)) return;
|
|
8648
8665
|
const text = event.clipboardData?.getData("text/plain") ?? "";
|
|
8649
8666
|
if (!text) return;
|
|
8650
8667
|
event.preventDefault();
|
|
@@ -8728,6 +8745,7 @@ function useSpreadsheetGrid(options) {
|
|
|
8728
8745
|
...inFillPreview ? { "data-matrx-cell-fill-preview": "true" } : {},
|
|
8729
8746
|
onMouseDown: (event) => {
|
|
8730
8747
|
if (event.button !== 0) return;
|
|
8748
|
+
if (camePastAPortal(event.target ?? null, event.currentTarget)) return;
|
|
8731
8749
|
event.preventDefault();
|
|
8732
8750
|
const origin = event.currentTarget;
|
|
8733
8751
|
if (typeof HTMLElement !== "undefined" && origin instanceof HTMLElement) {
|
|
@@ -12061,6 +12079,7 @@ function MatrxDataTableCore({
|
|
|
12061
12079
|
toolbar,
|
|
12062
12080
|
hideToolbar = false,
|
|
12063
12081
|
hidePagination = false,
|
|
12082
|
+
paginationLabelFormat,
|
|
12064
12083
|
filterUi,
|
|
12065
12084
|
detail,
|
|
12066
12085
|
expandedDetail,
|
|
@@ -13097,7 +13116,7 @@ function MatrxDataTableCore({
|
|
|
13097
13116
|
const coverageResult = useMemo8(() => {
|
|
13098
13117
|
if (!coverage) return null;
|
|
13099
13118
|
return describeCoverage({
|
|
13100
|
-
loaded: data.length,
|
|
13119
|
+
loaded: coverage.loaded ?? data.length,
|
|
13101
13120
|
...coverage.matched === void 0 ? {} : { matched: coverage.matched },
|
|
13102
13121
|
...coverage.total === void 0 ? {} : { total: coverage.total },
|
|
13103
13122
|
...coverage.cap === void 0 ? {} : { cap: coverage.cap },
|
|
@@ -14100,11 +14119,12 @@ function MatrxDataTableCore({
|
|
|
14100
14119
|
notice,
|
|
14101
14120
|
savedViewError ? /* @__PURE__ */ jsx42("p", { role: "alert", className: "shrink-0 text-xs text-destructive", children: savedViewError }) : null,
|
|
14102
14121
|
toolbarActionError ? /* @__PURE__ */ jsx42("p", { role: "alert", className: "shrink-0 text-xs text-destructive", children: toolbarActionError }) : null,
|
|
14103
|
-
!hideToolbar && (viewTabs || toolbar?.title || showSearch || toolbar?.anyOf || toolbar?.layeredFilters || toolbar?.facets && toolbar.facets.length > 0 || toolbar?.leading || toolbar?.actions || toolbar?.refresh || toolbar?.add || tableId && SavedViews || hasActiveFilters || showToolbarCopy || columns.length > 0) && /* @__PURE__ */ jsxs32(
|
|
14122
|
+
!hideToolbar && (viewTabs || 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 || tableId && SavedViews || hasActiveFilters || showToolbarCopy || columns.length > 0) && /* @__PURE__ */ jsxs32(
|
|
14104
14123
|
TableTitleRow,
|
|
14105
14124
|
{
|
|
14106
14125
|
tabs: viewTabs ? /* @__PURE__ */ jsx42(TableViewWorkspace, { snapshot: currentViewSnapshot, onApply: applySavedView, related: relatedTableActions }, tableId ?? "table") : void 0,
|
|
14107
14126
|
...toolbar?.title === void 0 ? {} : { title: toolbar.title },
|
|
14127
|
+
...toolbar?.titleCount === void 0 ? {} : { count: toolbar.titleCount },
|
|
14108
14128
|
context: tableId && SavedViews ? /* @__PURE__ */ jsx42("span", { "data-matrx-table-view-control": true, children: /* @__PURE__ */ jsx42(
|
|
14109
14129
|
SavedViews,
|
|
14110
14130
|
{
|
|
@@ -14114,7 +14134,7 @@ function MatrxDataTableCore({
|
|
|
14114
14134
|
onApply: applySavedView
|
|
14115
14135
|
}
|
|
14116
14136
|
) }) : void 0,
|
|
14117
|
-
search: showSearch ? intelligentSearchEnabled ? /* @__PURE__ */ jsx42(
|
|
14137
|
+
search: toolbar?.customSearch ?? (showSearch ? intelligentSearchEnabled ? /* @__PURE__ */ jsx42(
|
|
14118
14138
|
TableSearch,
|
|
14119
14139
|
{
|
|
14120
14140
|
value: searchValue,
|
|
@@ -14185,7 +14205,7 @@ function MatrxDataTableCore({
|
|
|
14185
14205
|
] }) : null
|
|
14186
14206
|
]
|
|
14187
14207
|
}
|
|
14188
|
-
) : null,
|
|
14208
|
+
) : null),
|
|
14189
14209
|
children: [
|
|
14190
14210
|
toolbar?.layeredFilters ? /* @__PURE__ */ jsx42(
|
|
14191
14211
|
LayeredFilterBuilder,
|
|
@@ -14839,6 +14859,7 @@ function MatrxDataTableCore({
|
|
|
14839
14859
|
leadingCols,
|
|
14840
14860
|
showActionsCol,
|
|
14841
14861
|
rowNoun: grouping?.rowNoun ?? "row",
|
|
14862
|
+
...grouping?.renderLabel ? { renderLabel: grouping.renderLabel } : {},
|
|
14842
14863
|
onToggle: () => setCollapsedGroups(toggleGroupCollapsed(collapsedGroups, entry.group.key))
|
|
14843
14864
|
},
|
|
14844
14865
|
`matrx-group-${entry.group.key}`
|
|
@@ -15012,7 +15033,7 @@ function MatrxDataTableCore({
|
|
|
15012
15033
|
"div",
|
|
15013
15034
|
{
|
|
15014
15035
|
className: cn(
|
|
15015
|
-
colIdx === 0 && hierarchy && "flex min-w-0 items-center"
|
|
15036
|
+
colIdx === 0 && (hierarchy || canExpandRow(row)) && "flex min-w-0 items-center"
|
|
15016
15037
|
),
|
|
15017
15038
|
children: [
|
|
15018
15039
|
colIdx === 0 && hierarchy ? /* @__PURE__ */ jsx42(
|
|
@@ -15023,6 +15044,40 @@ function MatrxDataTableCore({
|
|
|
15023
15044
|
disabled: !(hierarchy.canReparent?.(row) ?? true)
|
|
15024
15045
|
}
|
|
15025
15046
|
) : null,
|
|
15047
|
+
colIdx === 0 && canExpandRow(row) ? /* @__PURE__ */ jsxs32(Tooltip, { children: [
|
|
15048
|
+
/* @__PURE__ */ jsx42(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx42(
|
|
15049
|
+
Button,
|
|
15050
|
+
{
|
|
15051
|
+
type: "button",
|
|
15052
|
+
variant: "ghost",
|
|
15053
|
+
size: "icon",
|
|
15054
|
+
"data-matrx-table-expand-toggle": true,
|
|
15055
|
+
className: "mr-1 h-7 w-7 shrink-0 text-muted-foreground hover:text-foreground [&_svg]:size-4",
|
|
15056
|
+
"aria-label": isRowExpanded(row) ? "Collapse row details" : "Expand row details",
|
|
15057
|
+
"aria-expanded": isRowExpanded(row),
|
|
15058
|
+
onClick: (event) => {
|
|
15059
|
+
event.stopPropagation();
|
|
15060
|
+
toggleExpanded(row);
|
|
15061
|
+
},
|
|
15062
|
+
onKeyDown: (event) => {
|
|
15063
|
+
if (event.key !== "Enter" && event.key !== " ") return;
|
|
15064
|
+
event.preventDefault();
|
|
15065
|
+
event.stopPropagation();
|
|
15066
|
+
toggleExpanded(row);
|
|
15067
|
+
},
|
|
15068
|
+
children: /* @__PURE__ */ jsx42(
|
|
15069
|
+
ChevronRight,
|
|
15070
|
+
{
|
|
15071
|
+
className: cn(
|
|
15072
|
+
"transition-transform",
|
|
15073
|
+
isRowExpanded(row) && "rotate-90"
|
|
15074
|
+
)
|
|
15075
|
+
}
|
|
15076
|
+
)
|
|
15077
|
+
}
|
|
15078
|
+
) }),
|
|
15079
|
+
/* @__PURE__ */ jsx42(TooltipContent, { children: isRowExpanded(row) ? "Collapse details" : "Expand details" })
|
|
15080
|
+
] }) : null,
|
|
15026
15081
|
/* @__PURE__ */ jsx42(
|
|
15027
15082
|
"div",
|
|
15028
15083
|
{
|
|
@@ -15365,7 +15420,7 @@ function MatrxDataTableCore({
|
|
|
15365
15420
|
GenericTablePagination,
|
|
15366
15421
|
{
|
|
15367
15422
|
totalItems,
|
|
15368
|
-
...sourceTotal === void 0 ? {} : { labelFormat: (start, end, total) => `${formatCount3(start)}\u2013${formatCount3(end)} of ${formatCount3(total)} matching \xB7 ${formatCount3(data.length)} / ${formatCount3(sourceTotal)} loaded` },
|
|
15423
|
+
...paginationLabelFormat ? { labelFormat: paginationLabelFormat } : sourceTotal === void 0 ? {} : { labelFormat: (start, end, total) => `${formatCount3(start)}\u2013${formatCount3(end)} of ${formatCount3(total)} matching \xB7 ${formatCount3(data.length)} / ${formatCount3(sourceTotal)} loaded` },
|
|
15369
15424
|
...localProgressiveEnabled ? { progressive: {
|
|
15370
15425
|
shownCount: progressiveRows.shownCount,
|
|
15371
15426
|
loadedCount: data.length,
|
|
@@ -15883,6 +15938,7 @@ function TableGroupHeaderRow({
|
|
|
15883
15938
|
leadingCols,
|
|
15884
15939
|
showActionsCol,
|
|
15885
15940
|
rowNoun,
|
|
15941
|
+
renderLabel,
|
|
15886
15942
|
onToggle
|
|
15887
15943
|
}) {
|
|
15888
15944
|
const count = group.rows.length;
|
|
@@ -15913,7 +15969,7 @@ function TableGroupHeaderRow({
|
|
|
15913
15969
|
children: collapsed ? /* @__PURE__ */ jsx42(ChevronRight, { className: "h-4 w-4" }) : /* @__PURE__ */ jsx42(ChevronDown, { className: "h-4 w-4" })
|
|
15914
15970
|
}
|
|
15915
15971
|
),
|
|
15916
|
-
/* @__PURE__ */ jsx42("span", { className: "truncate text-sm font-semibold text-foreground", children: group.label }),
|
|
15972
|
+
renderLabel ? renderLabel(group) : /* @__PURE__ */ jsx42("span", { className: "truncate text-sm font-semibold text-foreground", children: group.label }),
|
|
15917
15973
|
/* @__PURE__ */ jsx42("span", { className: "whitespace-nowrap text-xs text-muted-foreground", children: summary })
|
|
15918
15974
|
] }) }, id);
|
|
15919
15975
|
}
|