@upbound/monarch-blocks 0.4.0 → 0.5.0
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/dist/cel-filter-bar.d.ts +2 -2
- package/dist/cel-filter-bar.js +20 -12
- package/dist/cel-filter-bar.js.map +1 -1
- package/dist/chart.d.ts +9 -10
- package/dist/chat-interface.d.ts +5 -6
- package/dist/code-block.d.ts +6 -7
- package/dist/data-table.d.ts +47 -23
- package/dist/data-table.js +395 -293
- package/dist/data-table.js.map +1 -1
- package/dist/filter-bar.d.ts +6 -3
- package/dist/filter-bar.js +90 -51
- package/dist/filter-bar.js.map +1 -1
- package/dist/floating-widget.d.ts +2 -3
- package/dist/index.d.ts +1 -2
- package/dist/index.js +456 -354
- package/dist/index.js.map +1 -1
- package/dist/page-header.d.ts +9 -9
- package/dist/relative-time.d.ts +3 -4
- package/dist/section-header.d.ts +8 -8
- package/dist/section-nav.d.ts +7 -8
- package/dist/timeline.d.ts +2 -3
- package/package.json +9 -9
package/dist/chart.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
1
|
import * as React from 'react';
|
|
3
2
|
import * as RechartsPrimitive from 'recharts';
|
|
4
3
|
import { TooltipValueType } from 'recharts';
|
|
@@ -25,11 +24,11 @@ declare function ChartContainer({ id, className, children, config, initialDimens
|
|
|
25
24
|
width: number;
|
|
26
25
|
height: number;
|
|
27
26
|
};
|
|
28
|
-
}):
|
|
27
|
+
}): React.JSX.Element;
|
|
29
28
|
declare const ChartStyle: ({ id, config }: {
|
|
30
29
|
id: string;
|
|
31
30
|
config: ChartConfig;
|
|
32
|
-
}) =>
|
|
31
|
+
}) => React.JSX.Element | null;
|
|
33
32
|
declare const ChartTooltip: typeof RechartsPrimitive.Tooltip;
|
|
34
33
|
declare function ChartTooltipContent({ active, payload, className, indicator, hideLabel, hideIndicator, label, labelFormatter, labelClassName, formatter, color, nameKey, labelKey, }: React.ComponentProps<typeof RechartsPrimitive.Tooltip> & React.ComponentProps<'div'> & {
|
|
35
34
|
hideLabel?: boolean;
|
|
@@ -37,16 +36,16 @@ declare function ChartTooltipContent({ active, payload, className, indicator, hi
|
|
|
37
36
|
indicator?: 'line' | 'dot' | 'dashed';
|
|
38
37
|
nameKey?: string;
|
|
39
38
|
labelKey?: string;
|
|
40
|
-
} & Omit<RechartsPrimitive.DefaultTooltipContentProps<TooltipValueType, TooltipNameType>, 'accessibilityLayer'>):
|
|
39
|
+
} & Omit<RechartsPrimitive.DefaultTooltipContentProps<TooltipValueType, TooltipNameType>, 'accessibilityLayer'>): React.JSX.Element | null;
|
|
41
40
|
declare const ChartLegend: React.MemoExoticComponent<(outsideProps: RechartsPrimitive.LegendProps) => React.ReactPortal | null>;
|
|
42
41
|
declare function ChartLegendContent({ className, hideIcon, payload, verticalAlign, nameKey, }: React.ComponentProps<'div'> & {
|
|
43
42
|
hideIcon?: boolean;
|
|
44
43
|
nameKey?: string;
|
|
45
|
-
} & RechartsPrimitive.DefaultLegendContentProps):
|
|
46
|
-
declare function ChartHeader({ className, ...props }: React.ComponentProps<'div'>):
|
|
47
|
-
declare function ChartTitle({ className, ...props }: React.ComponentProps<'div'>):
|
|
48
|
-
declare function ChartDescription({ className, ...props }: React.ComponentProps<'div'>):
|
|
49
|
-
declare function ChartAction({ className, ...props }: React.ComponentProps<'div'>):
|
|
50
|
-
declare function ChartFooter({ className, ...props }: React.ComponentProps<'div'>):
|
|
44
|
+
} & RechartsPrimitive.DefaultLegendContentProps): React.JSX.Element | null;
|
|
45
|
+
declare function ChartHeader({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
|
|
46
|
+
declare function ChartTitle({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
|
|
47
|
+
declare function ChartDescription({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
|
|
48
|
+
declare function ChartAction({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
|
|
49
|
+
declare function ChartFooter({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
|
|
51
50
|
|
|
52
51
|
export { ChartAction, type ChartConfig, ChartContainer, ChartDescription, ChartFooter, ChartHeader, ChartLegend, ChartLegendContent, ChartStyle, ChartTitle, ChartTooltip, ChartTooltipContent };
|
package/dist/chat-interface.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
1
|
import * as React from 'react';
|
|
3
2
|
|
|
4
3
|
interface ChatMessage {
|
|
@@ -34,7 +33,7 @@ interface ChatSessionListProps {
|
|
|
34
33
|
onSelectSession: (id: string) => void;
|
|
35
34
|
className?: string;
|
|
36
35
|
}
|
|
37
|
-
declare function ChatSessionList({ sessions, activeSessionId, onSelectSession, className }: ChatSessionListProps):
|
|
36
|
+
declare function ChatSessionList({ sessions, activeSessionId, onSelectSession, className }: ChatSessionListProps): React.JSX.Element;
|
|
38
37
|
declare function ChatMessageBubble({ message, userName: _userName, assistantName, }: {
|
|
39
38
|
message: ChatMessage;
|
|
40
39
|
/**
|
|
@@ -50,7 +49,7 @@ declare function ChatMessageBubble({ message, userName: _userName, assistantName
|
|
|
50
49
|
* multi-agent scenarios (e.g. named provider agents in a group chat).
|
|
51
50
|
*/
|
|
52
51
|
assistantName?: string;
|
|
53
|
-
}):
|
|
52
|
+
}): React.JSX.Element;
|
|
54
53
|
interface ChatRoutine {
|
|
55
54
|
id: string;
|
|
56
55
|
name: string;
|
|
@@ -87,7 +86,7 @@ interface ChatInputProps {
|
|
|
87
86
|
onAttach?: () => void;
|
|
88
87
|
className?: string;
|
|
89
88
|
}
|
|
90
|
-
declare function ChatInput({ onSend, placeholder, routines, onSelectRoutine, onManageRoutines, usePageAsContext, onUsePageAsContext, onAttach, className, }: ChatInputProps):
|
|
89
|
+
declare function ChatInput({ onSend, placeholder, routines, onSelectRoutine, onManageRoutines, usePageAsContext, onUsePageAsContext, onAttach, className, }: ChatInputProps): React.JSX.Element;
|
|
91
90
|
interface ChatThreadProps {
|
|
92
91
|
messages: ChatMessage[];
|
|
93
92
|
onSend?: (message: string) => void;
|
|
@@ -126,7 +125,7 @@ interface ChatThreadProps {
|
|
|
126
125
|
*/
|
|
127
126
|
isThinking?: boolean;
|
|
128
127
|
}
|
|
129
|
-
declare function ChatThread({ messages, onSend, title, subtitle, placeholder, suggestions, assistantName, userName, routines, onSelectRoutine, onManageRoutines, usePageAsContext, onUsePageAsContext, onAttach, callout, headerActions, className, isThinking, }: ChatThreadProps):
|
|
128
|
+
declare function ChatThread({ messages, onSend, title, subtitle, placeholder, suggestions, assistantName, userName, routines, onSelectRoutine, onManageRoutines, usePageAsContext, onUsePageAsContext, onAttach, callout, headerActions, className, isThinking, }: ChatThreadProps): React.JSX.Element;
|
|
130
129
|
interface ChatNavRailProps {
|
|
131
130
|
onNewSession?: () => void;
|
|
132
131
|
onOpenRoutines?: () => void;
|
|
@@ -138,6 +137,6 @@ interface ChatInterfaceProps extends ChatThreadProps, ChatNavRailProps {
|
|
|
138
137
|
activeSessionId?: string;
|
|
139
138
|
onSelectSession?: (id: string) => void;
|
|
140
139
|
}
|
|
141
|
-
declare function ChatInterface({ sessions, activeSessionId, onSelectSession, onNewSession, onOpenRoutines, onOpenConnectors, onOpenCustomize, className, ...threadProps }: ChatInterfaceProps):
|
|
140
|
+
declare function ChatInterface({ sessions, activeSessionId, onSelectSession, onNewSession, onOpenRoutines, onOpenConnectors, onOpenCustomize, className, ...threadProps }: ChatInterfaceProps): React.JSX.Element;
|
|
142
141
|
|
|
143
142
|
export { ChatInput, type ChatInputProps, ChatInterface, type ChatInterfaceProps, type ChatMessage, ChatMessageBubble, type ChatRoutine, type ChatSession, ChatSessionList, type ChatSessionListProps, ChatThread, type ChatThreadProps, type ChatToolCall };
|
package/dist/code-block.d.ts
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
1
|
import * as React from 'react';
|
|
3
2
|
|
|
4
3
|
declare function CodeBlock({ className, variant, size, ...props }: React.ComponentProps<'div'> & {
|
|
5
4
|
variant?: 'default' | 'terminal';
|
|
6
5
|
size?: 'default' | 'sm';
|
|
7
|
-
}):
|
|
8
|
-
declare function CodeBlockHeader({ className, ...props }: React.ComponentProps<'div'>):
|
|
6
|
+
}): React.JSX.Element;
|
|
7
|
+
declare function CodeBlockHeader({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
|
|
9
8
|
declare function CodeBlockBody({ className, code, html, lineNumbers, maxHeight, copyButton, downloadButton, ...props }: React.ComponentProps<'div'> & {
|
|
10
9
|
code: string;
|
|
11
10
|
html?: string;
|
|
@@ -13,15 +12,15 @@ declare function CodeBlockBody({ className, code, html, lineNumbers, maxHeight,
|
|
|
13
12
|
maxHeight?: string;
|
|
14
13
|
copyButton?: React.ReactNode;
|
|
15
14
|
downloadButton?: React.ReactNode;
|
|
16
|
-
}):
|
|
17
|
-
declare function CodeBlockFooter({ className, ...props }: React.ComponentProps<'div'>):
|
|
15
|
+
}): React.JSX.Element;
|
|
16
|
+
declare function CodeBlockFooter({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
|
|
18
17
|
declare function CodeBlockCopyButton({ code, className, ...props }: Omit<React.ComponentProps<'button'>, 'children'> & {
|
|
19
18
|
code: string;
|
|
20
|
-
}):
|
|
19
|
+
}): React.JSX.Element;
|
|
21
20
|
declare function CodeBlockDownloadButton({ code, fileName, mimeType, className, ...props }: Omit<React.ComponentProps<'button'>, 'children'> & {
|
|
22
21
|
code: string;
|
|
23
22
|
fileName: string;
|
|
24
23
|
mimeType?: string;
|
|
25
|
-
}):
|
|
24
|
+
}): React.JSX.Element;
|
|
26
25
|
|
|
27
26
|
export { CodeBlock, CodeBlockBody, CodeBlockCopyButton, CodeBlockDownloadButton, CodeBlockFooter, CodeBlockHeader };
|
package/dist/data-table.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { RowData, ColumnFilter, Cell, Column, ColumnOrderState, Row, ColumnDef, CellContext, HeaderGroup, TableOptions, TableState, InitialTableState, SortingFn, FilterFn, ExpandedState, ColumnFiltersState, PaginationState, SortingState, VisibilityState, ColumnPinningState, GroupingState, OnChangeFn, ColumnSizingState } from '@tanstack/react-table';
|
|
3
1
|
import * as React$1 from 'react';
|
|
4
2
|
import { ReactNode, Dispatch, SetStateAction, ComponentType } from 'react';
|
|
3
|
+
import { RowData, ColumnFilter, Cell, Column, ColumnOrderState, Row, ColumnDef, CellContext, HeaderGroup, TableOptions, TableState, InitialTableState, SortingFn, FilterFn, ExpandedState, ColumnFiltersState, PaginationState, SortingState, VisibilityState, ColumnPinningState, GroupingState, OnChangeFn, ColumnSizingState } from '@tanstack/react-table';
|
|
5
4
|
import { DropdownMenuItem, IconName } from '@upbound/monarch-core';
|
|
6
5
|
import { f as CelFilterSchema, g as CelFilterTree, k as CompileResult, i as CelRestrictedOptionSelectPayload } from './types-BULiU2qC.js';
|
|
7
6
|
|
|
@@ -28,7 +27,7 @@ type CellContextualFilterProps<TData extends RowData, TValue> = {
|
|
|
28
27
|
* `contextualMenuActions`. Renders only the `ContextMenuContent` — the
|
|
29
28
|
* `ContextMenu`/`ContextMenuTrigger` wrapping the cell lives in the caller.
|
|
30
29
|
*/
|
|
31
|
-
declare function CellContextualFilter<TData extends RowData, TValue>({ filter, globalSearch, cell, onContextCell, onContextSearch, contextualMenuActions, }: CellContextualFilterProps<TData, TValue>):
|
|
30
|
+
declare function CellContextualFilter<TData extends RowData, TValue>({ filter, globalSearch, cell, onContextCell, onContextSearch, contextualMenuActions, }: CellContextualFilterProps<TData, TValue>): React$1.JSX.Element;
|
|
32
31
|
|
|
33
32
|
type ColumnOptionsProps<TData extends RowData> = {
|
|
34
33
|
columns: Column<TData, unknown>[];
|
|
@@ -44,25 +43,25 @@ type ColumnOptionsProps<TData extends RowData> = {
|
|
|
44
43
|
* touches the unpinned slots (`mergeUnpinnedColumnOrder`), so pinned columns
|
|
45
44
|
* never jump position.
|
|
46
45
|
*/
|
|
47
|
-
declare function ColumnOptions<TData extends RowData>({ columns: rawColumns, columnOrdering, onColumnOrderingChange, disableColumnOrdering, }: ColumnOptionsProps<TData>):
|
|
46
|
+
declare function ColumnOptions<TData extends RowData>({ columns: rawColumns, columnOrdering, onColumnOrderingChange, disableColumnOrdering, }: ColumnOptionsProps<TData>): React$1.JSX.Element;
|
|
48
47
|
|
|
49
48
|
declare function RowActions({ align, children, contentClassName, }: {
|
|
50
49
|
align?: 'start' | 'end';
|
|
51
50
|
children: React$1.ReactNode;
|
|
52
51
|
contentClassName?: string;
|
|
53
|
-
}):
|
|
52
|
+
}): React$1.JSX.Element;
|
|
54
53
|
declare function RowActionItem({ disabled, className, tooltip, children, onClick, }: {
|
|
55
54
|
disabled?: boolean;
|
|
56
55
|
className?: string;
|
|
57
56
|
tooltip?: string;
|
|
58
57
|
children: React$1.ReactNode;
|
|
59
58
|
onClick?: React$1.ComponentProps<typeof DropdownMenuItem>['onClick'];
|
|
60
|
-
}):
|
|
59
|
+
}): React$1.JSX.Element;
|
|
61
60
|
/** A ready-made right-pinned, non-sortable/filterable/hideable "Actions" column. */
|
|
62
61
|
declare function getActionsColumnDefinition<TData extends RowData, TValue = unknown>({ cell, }: Pick<ColumnDef<TData, TValue>, 'cell'>): ColumnDef<TData, TValue>;
|
|
63
62
|
declare function ExpandButton<TData extends RowData>({ row }: {
|
|
64
63
|
row: Row<TData>;
|
|
65
|
-
}):
|
|
64
|
+
}): React$1.JSX.Element | null;
|
|
66
65
|
/** A ready-made right-pinned, fixed-width (28px) "Expand" column. Defaults to an `ExpandButton` cell. */
|
|
67
66
|
declare function getExpandColumnDefinition<TData extends RowData, TValue = unknown>(options?: {
|
|
68
67
|
cell?: (context: CellContext<TData, TValue>) => React$1.ReactNode;
|
|
@@ -78,15 +77,14 @@ type DataTableValueCellProps = {
|
|
|
78
77
|
/**
|
|
79
78
|
* A generic cell renderer: a link (when `href` is set), a dashed-underline
|
|
80
79
|
* value with a hover tooltip (when `title` is set), or plain content — with
|
|
81
|
-
* an em-dash placeholder when `content` is empty.
|
|
82
|
-
*
|
|
83
|
-
* branch renders a plain `<a>`.
|
|
80
|
+
* an em-dash placeholder when `content` is empty. Consumers who need router
|
|
81
|
+
* navigation wrap their own router link with `Link asChild` at the call site.
|
|
84
82
|
*/
|
|
85
|
-
declare function DataTableValueCell({ content, title, className, href, onClick }: DataTableValueCellProps):
|
|
83
|
+
declare function DataTableValueCell({ content, title, className, href, onClick }: DataTableValueCellProps): React$1.JSX.Element;
|
|
86
84
|
/** A timestamp cell — relative time in the cell, absolute time on hover (via Monarch's `RelativeTime`); an em-dash when absent. */
|
|
87
85
|
declare function TimestampCell({ timestamp }: {
|
|
88
86
|
timestamp?: Date | string | number;
|
|
89
|
-
}):
|
|
87
|
+
}): React$1.JSX.Element;
|
|
90
88
|
|
|
91
89
|
/**
|
|
92
90
|
* Non-CEL column filter definitions — the `meta.filter` vocabulary consumed by
|
|
@@ -260,7 +258,7 @@ declare function DataTableEmptyView({ emptyView, tableState, filterCount, resetF
|
|
|
260
258
|
filterCount: number;
|
|
261
259
|
resetFilters: () => void;
|
|
262
260
|
className?: string;
|
|
263
|
-
}):
|
|
261
|
+
}): React$1.JSX.Element;
|
|
264
262
|
|
|
265
263
|
type RowCountRelation = 'eq' | 'gt';
|
|
266
264
|
/** Pass `true` for defaults, `false` to disable the footer entirely (handled by the caller, not this component), or an object to toggle individual parts. */
|
|
@@ -292,7 +290,7 @@ type DataTablePaginationProps = {
|
|
|
292
290
|
onPageChange: (page: number) => void;
|
|
293
291
|
onPageSizeChange: (pageSize: number) => void;
|
|
294
292
|
};
|
|
295
|
-
declare function DataTablePagination({ pageIndex, pageSize, rowCount, rowCountRelation, paginationConfig, onPageChange, onPageSizeChange, }: DataTablePaginationProps):
|
|
293
|
+
declare function DataTablePagination({ pageIndex, pageSize, rowCount, rowCountRelation, paginationConfig, onPageChange, onPageSizeChange, }: DataTablePaginationProps): React$1.JSX.Element;
|
|
296
294
|
|
|
297
295
|
declare function DataTableHeader<TData extends RowData>({ headerGroups, onAutosizeAll, onAutosizeColumn, onResetColumnSize, stickyHeader, layout, }: {
|
|
298
296
|
headerGroups: HeaderGroup<TData>[];
|
|
@@ -302,7 +300,7 @@ declare function DataTableHeader<TData extends RowData>({ headerGroups, onAutosi
|
|
|
302
300
|
onResetColumnSize: (columnId: string) => void;
|
|
303
301
|
stickyHeader?: StickyHeaderConfig;
|
|
304
302
|
layout?: TableLayout;
|
|
305
|
-
}):
|
|
303
|
+
}): React$1.JSX.Element;
|
|
306
304
|
type DataTableRowProps = React$1.HTMLAttributes<HTMLElement> & {
|
|
307
305
|
hoverable?: boolean;
|
|
308
306
|
disabled?: boolean;
|
|
@@ -321,12 +319,12 @@ declare function DataTableCell<TData extends RowData, TValue>({ cell, className,
|
|
|
321
319
|
onContextSearch?: (searchTerm: string, cell: Cell<TData, TValue>) => void;
|
|
322
320
|
contextualMenuActions?: ContextualMenuAction<TData, TValue>[];
|
|
323
321
|
layout?: TableLayout;
|
|
324
|
-
}):
|
|
322
|
+
}): React$1.JSX.Element;
|
|
325
323
|
declare function DataTableGroupRow({ groupLabel, colSpan, layout, }: {
|
|
326
324
|
groupLabel: string;
|
|
327
325
|
colSpan: number;
|
|
328
326
|
layout?: TableLayout;
|
|
329
|
-
}):
|
|
327
|
+
}): React$1.JSX.Element;
|
|
330
328
|
type SkeletonColumn = {
|
|
331
329
|
id: string;
|
|
332
330
|
size?: number;
|
|
@@ -338,13 +336,13 @@ declare function DataTableSkeletonBody({ rowCount, columns, renderCell, layout,
|
|
|
338
336
|
columns: SkeletonColumn[];
|
|
339
337
|
renderCell?: (columnId: string) => React$1.ReactNode | undefined;
|
|
340
338
|
layout?: TableLayout;
|
|
341
|
-
}):
|
|
339
|
+
}): React$1.JSX.Element;
|
|
342
340
|
declare function DataTableExpandedRow({ colSpan, show, children, layout, }: {
|
|
343
341
|
colSpan: number;
|
|
344
342
|
show?: boolean;
|
|
345
343
|
children: React$1.ReactNode;
|
|
346
344
|
layout?: TableLayout;
|
|
347
|
-
}):
|
|
345
|
+
}): React$1.JSX.Element | null;
|
|
348
346
|
declare function DataTableBody<TData extends RowData>({ tableRows, tableState, columns, skeletonRowCount, renderSkeletonCell, onRowRender, renderExpandedRow, showContextualFilter, onContextCell, onContextSearch, contextualMenuActions, layout, }: {
|
|
349
347
|
tableRows: Row<TData>[];
|
|
350
348
|
tableState: TableDataState;
|
|
@@ -358,7 +356,7 @@ declare function DataTableBody<TData extends RowData>({ tableRows, tableState, c
|
|
|
358
356
|
onContextSearch?: (searchTerm: string, cell: Cell<TData, unknown>) => void;
|
|
359
357
|
contextualMenuActions?: ContextualMenuAction<TData, unknown>[];
|
|
360
358
|
layout?: TableLayout;
|
|
361
|
-
}):
|
|
359
|
+
}): React$1.JSX.Element;
|
|
362
360
|
|
|
363
361
|
/**
|
|
364
362
|
* Table rendering mode. `'auto'` uses a native `<table>`. `'grid'` renders
|
|
@@ -386,6 +384,16 @@ interface TableHookOptions<TData extends RowData> extends Omit<TableOptions<TDat
|
|
|
386
384
|
enablePagination?: boolean;
|
|
387
385
|
rowCountRelation?: RowCountRelation;
|
|
388
386
|
}
|
|
387
|
+
/**
|
|
388
|
+
* Configures the "Filter" toolbar toggle that shows/hides the filter row
|
|
389
|
+
*/
|
|
390
|
+
type DataTableFilterVisibilityConfig = {
|
|
391
|
+
/** Controlled visibility. Omit for an uncontrolled toggle (DataTable owns the state). */
|
|
392
|
+
visible?: boolean;
|
|
393
|
+
onVisibleChange?: (visible: boolean) => void;
|
|
394
|
+
/** Initial visibility when uncontrolled. @default false */
|
|
395
|
+
defaultVisible?: boolean;
|
|
396
|
+
};
|
|
389
397
|
/** Wires the CEL filter builder into the filter row in place of plain column filters. */
|
|
390
398
|
type DataTableCelFilterConfig<TData extends RowData> = {
|
|
391
399
|
schema: CelFilterSchema;
|
|
@@ -480,6 +488,22 @@ interface DataTableProps<TData extends RowData> {
|
|
|
480
488
|
stickyHeader?: StickyHeaderConfig;
|
|
481
489
|
/** When set, renders the CEL filter builder in the filter row instead of column filters. */
|
|
482
490
|
celFilterConfig?: DataTableCelFilterConfig<TData>;
|
|
491
|
+
/**
|
|
492
|
+
* Controls the "Filter" toggle button in the toolbar, immediately to the left of
|
|
493
|
+
* `ActionsComponent`, that shows/hides the filter row (CEL filter bar or plain
|
|
494
|
+
* `ViewFilter`) without touching filter state — only the row's presence changes.
|
|
495
|
+
* The toggle renders by default (whether this prop is omitted or set to `true`),
|
|
496
|
+
* with the filter row starting hidden. Pass an object for a controlled toggle
|
|
497
|
+
* (e.g. to persist the preference in the consumer) or to change the uncontrolled
|
|
498
|
+
* initial state via `defaultVisible`. Pass `false` to disable the toggle entirely
|
|
499
|
+
* and always show the filter row whenever filtering is enabled — the pre-toggle
|
|
500
|
+
* behavior.
|
|
501
|
+
*
|
|
502
|
+
* The button never renders if there's nothing to filter — no column has a
|
|
503
|
+
* `meta.filter` and no `celFilterConfig` is set — or if `disableFilters` is
|
|
504
|
+
* `true`, regardless of this prop's value.
|
|
505
|
+
*/
|
|
506
|
+
filterVisibility?: boolean | DataTableFilterVisibilityConfig;
|
|
483
507
|
}
|
|
484
508
|
|
|
485
509
|
/**
|
|
@@ -489,7 +513,7 @@ interface DataTableProps<TData extends RowData> {
|
|
|
489
513
|
* difference is that columns, headers, rows, cells, and menus render through
|
|
490
514
|
* Monarch's own primitives instead of legacy's hand-rolled ones.
|
|
491
515
|
*/
|
|
492
|
-
declare function DataTable<TData extends RowData>({ id, config, title, description, emptyView, showError, className, fitContent, loading, renderSkeletonCell, serverSidePagination, ActionsComponent: Actions, onRowRender, renderExpandedRow, expanded: parentExpanded, onExpandedChange: parentOnExpandedChange, disableSearch, disableFilters, disableSorting, paginationConfig, disableColumnReordering, disableColumnVisibility, disableColumnResizing, disableColumnPinning, searchTerm: parentGlobalFilter, onSearchTermChange: parentSetGlobalFilter, filters: parentColumnFilters, onFiltersChange: parentSetColumnFilters, pagination: parentPagination, onPaginationChange: parentSetPagination, sorting: parentSorting, onSortingChange: parentSetSorting, columnOrdering: parentColumnOrdering, onColumnOrderingChange: parentSetColumnOrdering, columnVisibility: parentColumnVisibility, onColumnVisibilityChange: parentSetColumnVisibility, columnPinning: parentColumnPinning, onColumnPinningChange: parentSetColumnPinning, grouping: parentGrouping, onGroupingChange: parentSetGrouping, celFilterClassName, showContextualFilter, onContextCell, contextualMenuActions, layout, initialColumnSizing, onColumnSizingPersist, stickyHeader, celFilterConfig, }: DataTableProps<TData>):
|
|
516
|
+
declare function DataTable<TData extends RowData>({ id, config, title, description, emptyView, showError, className, fitContent, loading, renderSkeletonCell, serverSidePagination, ActionsComponent: Actions, onRowRender, renderExpandedRow, expanded: parentExpanded, onExpandedChange: parentOnExpandedChange, disableSearch, disableFilters, disableSorting, paginationConfig, disableColumnReordering, disableColumnVisibility, disableColumnResizing, disableColumnPinning, searchTerm: parentGlobalFilter, onSearchTermChange: parentSetGlobalFilter, filters: parentColumnFilters, onFiltersChange: parentSetColumnFilters, pagination: parentPagination, onPaginationChange: parentSetPagination, sorting: parentSorting, onSortingChange: parentSetSorting, columnOrdering: parentColumnOrdering, onColumnOrderingChange: parentSetColumnOrdering, columnVisibility: parentColumnVisibility, onColumnVisibilityChange: parentSetColumnVisibility, columnPinning: parentColumnPinning, onColumnPinningChange: parentSetColumnPinning, grouping: parentGrouping, onGroupingChange: parentSetGrouping, celFilterClassName, showContextualFilter, onContextCell, contextualMenuActions, layout, initialColumnSizing, onColumnSizingPersist, stickyHeader, celFilterConfig, filterVisibility, }: DataTableProps<TData>): React$1.JSX.Element;
|
|
493
517
|
|
|
494
518
|
type ViewFilterProps<TData extends RowData> = {
|
|
495
519
|
columns: Column<TData, unknown>[];
|
|
@@ -507,6 +531,6 @@ type ViewFilterProps<TData extends RowData> = {
|
|
|
507
531
|
* false`). CEL-based filtering (`celFilterConfig`) is the richer,
|
|
508
532
|
* operator-driven tier this is not meant to replace.
|
|
509
533
|
*/
|
|
510
|
-
declare function ViewFilter<TData extends RowData>({ columns, columnFilters, onColumnFiltersChange, className, }: ViewFilterProps<TData>):
|
|
534
|
+
declare function ViewFilter<TData extends RowData>({ columns, columnFilters, onColumnFiltersChange, className, }: ViewFilterProps<TData>): React$1.JSX.Element;
|
|
511
535
|
|
|
512
|
-
export { CellContextualFilter, type CellContextualFilterProps, ColumnOptions, type ColumnOptionsProps, type ContextualMenuAction, DataTable, DataTableBody, type DataTableCelFilterConfig, DataTableCell, type DataTableEmptyConfig, DataTableEmptyView, DataTableExpandedRow, DataTableGroupRow, DataTableHeader, DataTablePagination, type DataTablePaginationConfig, type DataTablePaginationProps, type DataTableProps, DataTableRow, type DataTableRowProps, DataTableSkeletonBody, DataTableValueCell, type DataTableValueCellProps, ExpandButton, RowActionItem, RowActions, type RowCountRelation, type StickyHeaderConfig, type TableHookOptions, type TableLayout, TimestampCell, ViewFilter, type ViewFilterProps, defaultEmptyConfig, defaultErrorConfig, defaultNoFilterFoundConfig, getActionsColumnDefinition, getExpandColumnDefinition, normalizePageSizeOptions };
|
|
536
|
+
export { CellContextualFilter, type CellContextualFilterProps, ColumnOptions, type ColumnOptionsProps, type ContextualMenuAction, DataTable, DataTableBody, type DataTableCelFilterConfig, DataTableCell, type DataTableEmptyConfig, DataTableEmptyView, DataTableExpandedRow, type DataTableFilterVisibilityConfig, DataTableGroupRow, DataTableHeader, DataTablePagination, type DataTablePaginationConfig, type DataTablePaginationProps, type DataTableProps, DataTableRow, type DataTableRowProps, DataTableSkeletonBody, DataTableValueCell, type DataTableValueCellProps, ExpandButton, RowActionItem, RowActions, type RowCountRelation, type StickyHeaderConfig, type TableHookOptions, type TableLayout, TimestampCell, ViewFilter, type ViewFilterProps, defaultEmptyConfig, defaultErrorConfig, defaultNoFilterFoundConfig, getActionsColumnDefinition, getExpandColumnDefinition, normalizePageSizeOptions };
|