@tailor-platform/app-shell 1.16.0 → 1.18.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/app-shell-core.css +1 -1
- package/dist/app-shell.d.ts +762 -51
- package/dist/app-shell.js +7642 -5636
- package/dist/{appshell-B0wh5Lq0.js → appshell-Y1AYCuVJ.js} +323 -304
- package/dist/semantic-contrast.test.ts +227 -0
- package/dist/style-entry.d.ts +61 -26
- package/dist/testing.d.ts +66 -29
- package/dist/testing.js +1 -1
- package/dist/theme-bridge.test.ts +124 -1
- package/dist/theme.bridge.css +178 -0
- package/dist/theme.css +8 -2
- package/dist/themes/_template.css +8 -3
- package/dist/themes/bloom.css +0 -8
- package/dist/themes/cream.css +0 -8
- package/dist/themes/default.css +458 -103
- package/dist/vite-plugin.d.ts +61 -26
- package/package.json +2 -2
- package/skills/app-shell-patterns/SKILL.md +48 -37
- package/skills/app-shell-patterns/references/api/define-i18n-labels.md +123 -91
- package/skills/app-shell-patterns/references/api/define-module.md +4 -6
- package/skills/app-shell-patterns/references/api/define-resource.md +2 -2
- package/skills/app-shell-patterns/references/api/use-app-shell-config.md +53 -47
- package/skills/app-shell-patterns/references/api/use-app-shell-data.md +30 -26
- package/skills/app-shell-patterns/references/api/use-app-shell.md +37 -30
- package/skills/app-shell-patterns/references/api/use-toast.md +28 -31
- package/skills/app-shell-patterns/references/components/app-shell.md +4 -4
- package/skills/app-shell-patterns/references/components/card.md +79 -7
- package/skills/app-shell-patterns/references/components/data-table.md +599 -77
- package/skills/app-shell-patterns/references/components/date-picker.md +32 -21
- package/skills/app-shell-patterns/references/components/filter-rail.md +165 -0
- package/skills/app-shell-patterns/references/components/sidebar-group.md +12 -6
- package/skills/app-shell-patterns/references/components/sidebar-section.md +114 -0
- package/skills/app-shell-patterns/references/components/text.md +198 -0
- package/skills/app-shell-patterns/references/concepts/custom-components.md +1 -1
- package/skills/app-shell-patterns/references/concepts/file-based-routing.md +7 -1
- package/skills/app-shell-patterns/references/concepts/graphql.md +20 -14
- package/skills/app-shell-patterns/references/concepts/routing-navigation.md +41 -3
- package/skills/app-shell-patterns/references/concepts/sidebar-navigation.md +32 -0
- package/skills/app-shell-patterns/references/concepts/styling-theming.md +278 -65
- package/skills/app-shell-patterns/references/migrations.md +43 -1
- package/skills/app-shell-patterns/references/pages/document-detail.md +6 -6
- package/skills/app-shell-patterns/references/patterns/form-modal.md +26 -20
- package/skills/app-shell-patterns/references/patterns/i18n-labels.md +139 -0
- package/skills/app-shell-patterns/references/patterns/interaction-multi-select.md +129 -118
- package/skills/app-shell-patterns/references/patterns/list-dense-scan.md +5 -4
package/dist/app-shell.d.ts
CHANGED
|
@@ -456,9 +456,11 @@ export declare type AppShellPageProps = {
|
|
|
456
456
|
icon?: ReactNode;
|
|
457
457
|
/**
|
|
458
458
|
* Custom breadcrumb segment title for this page.
|
|
459
|
-
* Can be a static string or a
|
|
459
|
+
* Can be a static string or a `labels.t("key")` translation function.
|
|
460
|
+
* Other callbacks receive the URL segment and may return a LocalizedString
|
|
461
|
+
* (e.g. `(segment) => labels.t("order", { id: segment })`), resolved using the current locale.
|
|
460
462
|
*/
|
|
461
|
-
breadcrumbTitle?: string | ((segment: string) =>
|
|
463
|
+
breadcrumbTitle?: string | ((segment: string) => LocalizedString);
|
|
462
464
|
};
|
|
463
465
|
/**
|
|
464
466
|
* Guards to control access to this page.
|
|
@@ -1010,6 +1012,20 @@ export declare const avatarVariants: (props?: ({
|
|
|
1010
1012
|
|
|
1011
1013
|
export declare function Badge({ className, variant, children, ...props }: BadgeProps): JSX.Element;
|
|
1012
1014
|
|
|
1015
|
+
/**
|
|
1016
|
+
* `edit` config for `type: "badge"` columns: a dropdown whose choices render as
|
|
1017
|
+
* the same badges the cell shows. Picking one notifies its `value`; a "None"
|
|
1018
|
+
* choice notifies `null`. Single-value columns only.
|
|
1019
|
+
*/
|
|
1020
|
+
export declare interface BadgeCellEditOptions<TRow extends Record<string, unknown>> extends CellEditBase<TRow, string> {
|
|
1021
|
+
/**
|
|
1022
|
+
* The choices. Default: the entries of `typeOptions.badgeLabelMap`, else the
|
|
1023
|
+
* column's enum `filter` options. A badge column with neither can't be
|
|
1024
|
+
* edited.
|
|
1025
|
+
*/
|
|
1026
|
+
options?: readonly SelectOption[];
|
|
1027
|
+
}
|
|
1028
|
+
|
|
1013
1029
|
/** Options for `type: "badge"` cells. */
|
|
1014
1030
|
declare interface BadgeCellOptions extends BadgeOptions {
|
|
1015
1031
|
/** Maximum number of badges to display before showing a "+N" overflow indicator */
|
|
@@ -1058,6 +1074,18 @@ declare namespace Body_2 {
|
|
|
1058
1074
|
var displayName: string;
|
|
1059
1075
|
}
|
|
1060
1076
|
|
|
1077
|
+
/** True / false with a third "no constraint" state. */
|
|
1078
|
+
declare type BooleanSection<TField extends string = string> = FieldSectionBase<TField> & {
|
|
1079
|
+
control: "boolean";
|
|
1080
|
+
operator?: "eq" | "ne";
|
|
1081
|
+
/** Default "Yes". */
|
|
1082
|
+
trueLabel?: ReactNode;
|
|
1083
|
+
/** Default "No". */
|
|
1084
|
+
falseLabel?: ReactNode;
|
|
1085
|
+
/** Default "Any"; `null` removes it. */
|
|
1086
|
+
anyLabel?: ReactNode | null;
|
|
1087
|
+
};
|
|
1088
|
+
|
|
1061
1089
|
/**
|
|
1062
1090
|
* Responsive breakpoints, aligned with Tailwind's default breakpoints.
|
|
1063
1091
|
* `initial` is the base (mobile-first) value applied below the `sm` breakpoint.
|
|
@@ -1176,6 +1204,35 @@ declare namespace Cell {
|
|
|
1176
1204
|
|
|
1177
1205
|
declare type CellAlign = "left" | "center" | "right";
|
|
1178
1206
|
|
|
1207
|
+
declare interface CellEditBase<TRow extends Record<string, unknown>, TValue, TDraft = TValue | null> {
|
|
1208
|
+
/**
|
|
1209
|
+
* Decides, per row, whether the cell can be edited. Receives the row and
|
|
1210
|
+
* whether it is selected, so "editable once selected" is
|
|
1211
|
+
* `(_, { selected }) => selected`. Default: every row with an `id`.
|
|
1212
|
+
*/
|
|
1213
|
+
canEdit?: (row: TRow, state: CellEditState) => boolean;
|
|
1214
|
+
/**
|
|
1215
|
+
* Observes editor drafts, including incomplete input and restored drafts on
|
|
1216
|
+
* cancellation. Direct inputs emit raw strings; choices emit selected values,
|
|
1217
|
+
* not search text or highlights. Updating `data` here is outside the supported
|
|
1218
|
+
* coordination contract. The return value is ignored.
|
|
1219
|
+
*/
|
|
1220
|
+
onValueChange?: (row: TRow, draft: TDraft) => void;
|
|
1221
|
+
/**
|
|
1222
|
+
* Notifies a changed, confirmed editor output, compared with current `data`.
|
|
1223
|
+
* Empty cells confirm `null`. Confirmation does not imply business validation,
|
|
1224
|
+
* adoption, or persistence; update `data` here to adopt it. Return values are
|
|
1225
|
+
* ignored. Output types follow the editor, not the row field's runtime type.
|
|
1226
|
+
*/
|
|
1227
|
+
onValueCommitted: (row: TRow, value: TValue | null) => void;
|
|
1228
|
+
}
|
|
1229
|
+
|
|
1230
|
+
/** Row state passed to `edit.canEdit` alongside the row. */
|
|
1231
|
+
export declare interface CellEditState {
|
|
1232
|
+
/** Whether the row is selected. Always `false` when row selection is off. */
|
|
1233
|
+
selected: boolean;
|
|
1234
|
+
}
|
|
1235
|
+
|
|
1179
1236
|
declare type CellProps = React_2.ComponentProps<"td"> & {
|
|
1180
1237
|
align?: CellAlign;
|
|
1181
1238
|
};
|
|
@@ -1338,6 +1395,40 @@ export declare type CheckboxProps = Omit<React_2.ComponentProps<typeof Checkbox_
|
|
|
1338
1395
|
label?: React_2.ReactNode;
|
|
1339
1396
|
};
|
|
1340
1397
|
|
|
1398
|
+
/** Multi-select — the `in` (any of) or `nin` (none of) operator. */
|
|
1399
|
+
declare type CheckboxSection<TField extends string = string> = FieldSectionBase<TField> & {
|
|
1400
|
+
control: "checkbox";
|
|
1401
|
+
operator?: "in" | "nin";
|
|
1402
|
+
options: readonly FacetOption[];
|
|
1403
|
+
sort?: OptionSort;
|
|
1404
|
+
/**
|
|
1405
|
+
* Options shown before "Show N more". Default 8, `false` shows everything.
|
|
1406
|
+
* A selected option is never truncated away.
|
|
1407
|
+
*/
|
|
1408
|
+
truncate?: number | false;
|
|
1409
|
+
/** Option values held at the top, in this order. */
|
|
1410
|
+
pinned?: readonly string[];
|
|
1411
|
+
/**
|
|
1412
|
+
* Above this many options, show a search box. Defaults to `truncate` (so any
|
|
1413
|
+
* list long enough to need "Show more" is searchable), or 12 when nothing is
|
|
1414
|
+
* truncated. `false` never shows it.
|
|
1415
|
+
*/
|
|
1416
|
+
searchThreshold?: number | false;
|
|
1417
|
+
};
|
|
1418
|
+
|
|
1419
|
+
/** Clears only the rail's own fields. Renders nothing while none are active. */
|
|
1420
|
+
declare function ClearAll({ children, className }: ClearAllProps): JSX.Element | null;
|
|
1421
|
+
|
|
1422
|
+
declare namespace ClearAll {
|
|
1423
|
+
var displayName: string;
|
|
1424
|
+
}
|
|
1425
|
+
|
|
1426
|
+
declare type ClearAllProps = {
|
|
1427
|
+
/** Default "Clear all". */
|
|
1428
|
+
children?: ReactNode;
|
|
1429
|
+
className?: string;
|
|
1430
|
+
};
|
|
1431
|
+
|
|
1341
1432
|
/** A button that closes the dialog. */
|
|
1342
1433
|
declare function Close({ ...props }: React_2.ComponentProps<typeof Dialog_2.Close>): JSX.Element;
|
|
1343
1434
|
|
|
@@ -1758,6 +1849,12 @@ declare type Columns = 3 | 4;
|
|
|
1758
1849
|
* and `undefined` are always allowed: every built-in renderer maps them to the
|
|
1759
1850
|
* `—` placeholder.
|
|
1760
1851
|
*
|
|
1852
|
+
* `edit` makes the cells editable in place and also narrows per branch, so
|
|
1853
|
+
* `onValueCommitted` receives the editor's output type, not necessarily the
|
|
1854
|
+
* original row field's runtime type. Text / link / badge output strings or null.
|
|
1855
|
+
* Every typed column
|
|
1856
|
+
* supports it; untyped (`render`-only) columns don't.
|
|
1857
|
+
*
|
|
1761
1858
|
* Prefer `Column<TRow>` in most cases; this is exported so consumers can
|
|
1762
1859
|
* compose more specific column types.
|
|
1763
1860
|
*/
|
|
@@ -1765,30 +1862,37 @@ declare type ColumnTypeBranch<TRow extends Record<string, unknown>> = {
|
|
|
1765
1862
|
type?: undefined;
|
|
1766
1863
|
typeOptions?: never;
|
|
1767
1864
|
accessor?: (row: TRow) => unknown;
|
|
1865
|
+
edit?: never;
|
|
1768
1866
|
} | {
|
|
1769
1867
|
type: "text";
|
|
1770
1868
|
typeOptions?: never;
|
|
1771
1869
|
accessor?: (row: TRow) => string | number | boolean | bigint | null | undefined;
|
|
1870
|
+
edit?: TextCellEditOptions<TRow>;
|
|
1772
1871
|
} | {
|
|
1773
1872
|
type: "number";
|
|
1774
1873
|
typeOptions?: NumberCellOptions;
|
|
1775
1874
|
accessor?: (row: TRow) => number | null | undefined;
|
|
1875
|
+
edit?: NumberCellEditOptions<TRow>;
|
|
1776
1876
|
} | {
|
|
1777
1877
|
type: "money";
|
|
1778
1878
|
typeOptions?: MoneyCellOptions<TRow>;
|
|
1779
1879
|
accessor?: (row: TRow) => number | null | undefined;
|
|
1880
|
+
edit?: NumberCellEditOptions<TRow>;
|
|
1780
1881
|
} | {
|
|
1781
1882
|
type: "date";
|
|
1782
1883
|
typeOptions?: DateCellOptions;
|
|
1783
1884
|
accessor?: (row: TRow) => Date | string | number | null | undefined;
|
|
1885
|
+
edit?: DateCellEditOptions<TRow>;
|
|
1784
1886
|
} | {
|
|
1785
1887
|
type: "badge";
|
|
1786
1888
|
typeOptions?: BadgeCellOptions;
|
|
1787
1889
|
accessor?: (row: TRow) => string | string[] | number | boolean | null | undefined;
|
|
1890
|
+
edit?: BadgeCellEditOptions<TRow>;
|
|
1788
1891
|
} | {
|
|
1789
1892
|
type: "link";
|
|
1790
1893
|
typeOptions: LinkCellOptions<TRow>;
|
|
1791
1894
|
accessor?: (row: TRow) => string | number | boolean | null | undefined;
|
|
1895
|
+
edit?: TextCellEditOptions<TRow>;
|
|
1792
1896
|
};
|
|
1793
1897
|
|
|
1794
1898
|
export declare const Combobox: ComboboxComponent;
|
|
@@ -2135,7 +2239,7 @@ declare type CommonPageResource = {
|
|
|
2135
2239
|
meta: {
|
|
2136
2240
|
title: LocalizedString;
|
|
2137
2241
|
icon?: ReactNode;
|
|
2138
|
-
breadcrumbTitle?: string | ((segment: string) =>
|
|
2242
|
+
breadcrumbTitle?: string | ((segment: string) => LocalizedString);
|
|
2139
2243
|
};
|
|
2140
2244
|
};
|
|
2141
2245
|
|
|
@@ -2194,7 +2298,7 @@ declare namespace Content {
|
|
|
2194
2298
|
var displayName: string;
|
|
2195
2299
|
}
|
|
2196
2300
|
|
|
2197
|
-
declare function Content_2({ className, ...props }:
|
|
2301
|
+
declare function Content_2({ className, padding, ...props }: ContentProps): JSX.Element;
|
|
2198
2302
|
|
|
2199
2303
|
declare namespace Content_2 {
|
|
2200
2304
|
var displayName: string;
|
|
@@ -2237,6 +2341,15 @@ export declare type ContentContainerProps = {
|
|
|
2237
2341
|
children?: React.ReactNode;
|
|
2238
2342
|
};
|
|
2239
2343
|
|
|
2344
|
+
declare type ContentProps = React_2.ComponentProps<"div"> & {
|
|
2345
|
+
/**
|
|
2346
|
+
* `"none"` renders the content edge-to-edge, for a `Table`, `DataTable` or
|
|
2347
|
+
* divided list that should meet the card's border.
|
|
2348
|
+
* @default "default"
|
|
2349
|
+
*/
|
|
2350
|
+
padding?: "default" | "none";
|
|
2351
|
+
};
|
|
2352
|
+
|
|
2240
2353
|
/**
|
|
2241
2354
|
* Context data type inferred from AppShellRegister.
|
|
2242
2355
|
* Falls back to Record<string, unknown> if not augmented.
|
|
@@ -2529,6 +2642,26 @@ export declare type CsvSchema = {
|
|
|
2529
2642
|
columns: readonly CsvColumn[];
|
|
2530
2643
|
};
|
|
2531
2644
|
|
|
2645
|
+
/**
|
|
2646
|
+
* Anything the built-in controls do not cover. Declares the `fields` it writes
|
|
2647
|
+
* so Clear all, Clear and the settings panel still treat it as rail-owned.
|
|
2648
|
+
*/
|
|
2649
|
+
declare type CustomSection<TField extends string = string> = SectionBase & {
|
|
2650
|
+
control: "custom";
|
|
2651
|
+
fields: readonly TField[];
|
|
2652
|
+
clearable?: boolean;
|
|
2653
|
+
render: (context: CustomSectionContext<TField>) => ReactNode;
|
|
2654
|
+
};
|
|
2655
|
+
|
|
2656
|
+
/** What a custom section's `render` receives. */
|
|
2657
|
+
declare type CustomSectionContext<TField extends string = string> = {
|
|
2658
|
+
control: CollectionControl<TField>;
|
|
2659
|
+
/** The current filter on `field`, if any. */
|
|
2660
|
+
getFilter: (field: TField) => Filter<TField> | undefined;
|
|
2661
|
+
/** Replace (or with `null`, remove) the filter on `field`. */
|
|
2662
|
+
setFilter: (field: TField, next: Omit<Filter<TField>, "field"> | null) => void;
|
|
2663
|
+
};
|
|
2664
|
+
|
|
2532
2665
|
export declare const DataTable: {
|
|
2533
2666
|
/**
|
|
2534
2667
|
* Context/provider root. Wraps all other `DataTable.*` components and
|
|
@@ -2558,6 +2691,11 @@ export declare const DataTable: {
|
|
|
2558
2691
|
/**
|
|
2559
2692
|
* Footer container for pagination and other footer content.
|
|
2560
2693
|
* Place inside `DataTable.Root`, after `DataTable.Table`.
|
|
2694
|
+
*
|
|
2695
|
+
* When `useDataTable()` is given `rowSelection.actions`, the footer becomes the
|
|
2696
|
+
* bulk-action bar while rows are selected — the selection count, the
|
|
2697
|
+
* actions, and a Clear button — with its own children (usually
|
|
2698
|
+
* `DataTable.Pagination`) kept alongside.
|
|
2561
2699
|
*/
|
|
2562
2700
|
readonly Footer: typeof DataTableFooter;
|
|
2563
2701
|
/**
|
|
@@ -2573,6 +2711,14 @@ export declare const DataTable: {
|
|
|
2573
2711
|
readonly Pagination: typeof DataTablePagination;
|
|
2574
2712
|
};
|
|
2575
2713
|
|
|
2714
|
+
/** Presentation shared by row actions and selection actions. */
|
|
2715
|
+
export declare interface DataTableAction {
|
|
2716
|
+
id: string;
|
|
2717
|
+
label: string;
|
|
2718
|
+
icon?: ReactNode;
|
|
2719
|
+
variant?: "default" | "destructive";
|
|
2720
|
+
}
|
|
2721
|
+
|
|
2576
2722
|
declare type DataTableBooleanFilterOperator = OperatorForFilterType["boolean"];
|
|
2577
2723
|
|
|
2578
2724
|
/**
|
|
@@ -2642,15 +2788,29 @@ export declare interface DataTableContextValue<TRow extends Record<string, unkno
|
|
|
2642
2788
|
setPin: (key: string, side: "left" | "right" | "none" | null) => void;
|
|
2643
2789
|
onClickRow?: (row: TRow) => void;
|
|
2644
2790
|
rowActions?: RowAction<TRow>[];
|
|
2791
|
+
/** Selection config, including bulk actions shown by `DataTable.Footer`. */
|
|
2792
|
+
rowSelection?: RowSelectionOptions;
|
|
2645
2793
|
selectedIds: string[];
|
|
2646
2794
|
isRowSelected: (row: TRow) => boolean;
|
|
2647
2795
|
toggleRowSelection?: (row: TRow) => void;
|
|
2648
2796
|
/**
|
|
2649
|
-
*
|
|
2650
|
-
*
|
|
2797
|
+
* Adds every row on the **current page** to the selection; rows selected on
|
|
2798
|
+
* other pages are kept.
|
|
2651
2799
|
*/
|
|
2652
2800
|
selectAllRows?: () => void;
|
|
2801
|
+
/**
|
|
2802
|
+
* Removes the **current page's** rows from the selection; rows selected on
|
|
2803
|
+
* other pages stay selected.
|
|
2804
|
+
*/
|
|
2805
|
+
deselectAllRows?: () => void;
|
|
2806
|
+
/** Empties the selection across all pages. */
|
|
2653
2807
|
clearSelection?: () => void;
|
|
2808
|
+
/** Id of the selection action whose request is in flight, or `null`. */
|
|
2809
|
+
pendingActionId?: string | null;
|
|
2810
|
+
/** See `UseDataTableReturn.runSelectionAction`. */
|
|
2811
|
+
runSelectionAction?: (action: {
|
|
2812
|
+
id: string;
|
|
2813
|
+
}, request: PromiseLike<unknown>) => void;
|
|
2654
2814
|
isAllSelected: boolean;
|
|
2655
2815
|
isIndeterminate: boolean;
|
|
2656
2816
|
/** Ids of the currently expanded rows. */
|
|
@@ -2688,6 +2848,10 @@ export declare type DataTableFilterConfig = (Extract<FilterConfig, {
|
|
|
2688
2848
|
type: "number";
|
|
2689
2849
|
}> & {
|
|
2690
2850
|
operators?: NonEmptyReadonlyArray<DataTableNumericTemporalFilterOperator>;
|
|
2851
|
+
}) | (Extract<FilterConfig, {
|
|
2852
|
+
type: "decimal";
|
|
2853
|
+
}> & {
|
|
2854
|
+
operators?: NonEmptyReadonlyArray<DataTableNumericTemporalFilterOperator>;
|
|
2691
2855
|
}) | (Extract<FilterConfig, {
|
|
2692
2856
|
type: "datetime";
|
|
2693
2857
|
}> & {
|
|
@@ -2740,7 +2904,7 @@ declare namespace DataTableFilters {
|
|
|
2740
2904
|
|
|
2741
2905
|
/** Use `DataTable.Footer` instead of calling this directly. */
|
|
2742
2906
|
declare function DataTableFooter({ children, className }: {
|
|
2743
|
-
children
|
|
2907
|
+
children?: ReactNode;
|
|
2744
2908
|
className?: string;
|
|
2745
2909
|
}): JSX.Element;
|
|
2746
2910
|
|
|
@@ -2809,6 +2973,7 @@ declare namespace DataTableToolbar {
|
|
|
2809
2973
|
declare type DataTableUiFilterOperatorByType = {
|
|
2810
2974
|
string: DataTableStringFilterOperator;
|
|
2811
2975
|
number: DataTableNumericTemporalFilterOperator;
|
|
2976
|
+
decimal: DataTableNumericTemporalFilterOperator;
|
|
2812
2977
|
datetime: DataTableNumericTemporalFilterOperator;
|
|
2813
2978
|
date: DataTableDateFilterOperator;
|
|
2814
2979
|
time: DataTableNumericTemporalFilterOperator;
|
|
@@ -2819,6 +2984,16 @@ declare type DataTableUiFilterOperatorByType = {
|
|
|
2819
2984
|
|
|
2820
2985
|
declare type DataTableUuidFilterOperator = Extract<OperatorForFilterType["uuid"], "eq">;
|
|
2821
2986
|
|
|
2987
|
+
/**
|
|
2988
|
+
* `edit` config for `type: "date"` columns: a calendar that opens from the
|
|
2989
|
+
* cell. Picking a day commits `"YYYY-MM-DD"`. With `dateFormat: "datetime"`
|
|
2990
|
+
* the calendar emits complete `DateTimeDraft` snapshots and Done confirms an
|
|
2991
|
+
* ISO 8601 timestamp in the AppShell timezone only with a valid day and time.
|
|
2992
|
+
* Outside closing / Esc cancels; Clear explicitly confirms `null`.
|
|
2993
|
+
* Date-only drafts are `"YYYY-MM-DD" | null`.
|
|
2994
|
+
*/
|
|
2995
|
+
export declare type DateCellEditOptions<TRow extends Record<string, unknown>> = CellEditBase<TRow, string, string | DateTimeDraft | null>;
|
|
2996
|
+
|
|
2822
2997
|
/** Options for `type: "date"` cells. */
|
|
2823
2998
|
declare interface DateCellOptions {
|
|
2824
2999
|
/**
|
|
@@ -2852,6 +3027,7 @@ declare interface DateControlProps<T extends DateValue> {
|
|
|
2852
3027
|
isRequired?: boolean;
|
|
2853
3028
|
isInvalid?: boolean;
|
|
2854
3029
|
autoFocus?: boolean;
|
|
3030
|
+
/** 12- or 24-hour time; defaults to the locale. */
|
|
2855
3031
|
hourCycle?: HourCycle;
|
|
2856
3032
|
placeholderValue?: DateValue;
|
|
2857
3033
|
firstDayOfWeek?: FirstDayOfWeek;
|
|
@@ -2866,6 +3042,8 @@ declare interface DateControlProps<T extends DateValue> {
|
|
|
2866
3042
|
"aria-describedby"?: string;
|
|
2867
3043
|
/** BCP-47 locale override; defaults to the AppShell formatting locale. */
|
|
2868
3044
|
locale?: string;
|
|
3045
|
+
/** Show the locale's short day of the week next to the date (e.g. `(金)`, `Fri,`). */
|
|
3046
|
+
showDayOfWeek?: boolean;
|
|
2869
3047
|
}
|
|
2870
3048
|
|
|
2871
3049
|
/**
|
|
@@ -2951,6 +3129,7 @@ export declare type DateRangePickerProps<T extends DateValue = DateValue> = {
|
|
|
2951
3129
|
isRequired?: boolean;
|
|
2952
3130
|
isInvalid?: boolean;
|
|
2953
3131
|
autoFocus?: boolean;
|
|
3132
|
+
/** 12- or 24-hour time; defaults to the locale. */
|
|
2954
3133
|
hourCycle?: HourCycle;
|
|
2955
3134
|
placeholderValue?: DateValue;
|
|
2956
3135
|
firstDayOfWeek?: FirstDayOfWeek;
|
|
@@ -2976,8 +3155,39 @@ export declare type DateRangePickerProps<T extends DateValue = DateValue> = {
|
|
|
2976
3155
|
locale?: string;
|
|
2977
3156
|
/** IANA timezone; defaults to the AppShell `timeZone`. */
|
|
2978
3157
|
timeZone?: string;
|
|
3158
|
+
/** Show the locale's short day of the week next to each date. */
|
|
3159
|
+
showDayOfWeek?: boolean;
|
|
3160
|
+
};
|
|
3161
|
+
|
|
3162
|
+
/** A from/to date pair, committed as `between` `{ min, max }`. */
|
|
3163
|
+
declare type DateRangeSection<TField extends string = string> = FieldSectionBase<TField> & {
|
|
3164
|
+
control: "dateRange";
|
|
3165
|
+
min?: string;
|
|
3166
|
+
max?: string;
|
|
3167
|
+
/** Named spans offered above the picker ("Last 30 days"). Click again to clear. */
|
|
3168
|
+
presets?: readonly {
|
|
3169
|
+
label: string;
|
|
3170
|
+
from: string;
|
|
3171
|
+
to: string;
|
|
3172
|
+
}[];
|
|
2979
3173
|
};
|
|
2980
3174
|
|
|
3175
|
+
/** A single `YYYY-MM-DD` date with one fixed operator. */
|
|
3176
|
+
declare type DateSection<TField extends string = string> = FieldSectionBase<TField> & {
|
|
3177
|
+
control: "date";
|
|
3178
|
+
operator: "eq" | "gte" | "lte";
|
|
3179
|
+
/** `YYYY-MM-DD` */
|
|
3180
|
+
min?: string;
|
|
3181
|
+
/** `YYYY-MM-DD` */
|
|
3182
|
+
max?: string;
|
|
3183
|
+
};
|
|
3184
|
+
|
|
3185
|
+
/** Incomplete date-time editor state, interpreted in the AppShell timezone. */
|
|
3186
|
+
export declare interface DateTimeDraft {
|
|
3187
|
+
day: string | null;
|
|
3188
|
+
time: string | null;
|
|
3189
|
+
}
|
|
3190
|
+
|
|
2981
3191
|
export { DateValue }
|
|
2982
3192
|
|
|
2983
3193
|
/**
|
|
@@ -3166,7 +3376,7 @@ export declare const defineI18nLabels: <const L extends Exclude<string, "en">, c
|
|
|
3166
3376
|
};
|
|
3167
3377
|
/**
|
|
3168
3378
|
* A function to get the translater for a specific label key.
|
|
3169
|
-
*
|
|
3379
|
+
* Use directly in `meta.title` or `meta.breadcrumbTitle` in module/resource definitions.
|
|
3170
3380
|
*
|
|
3171
3381
|
* Note: When using dynamic labels with props in meta.title, the props are
|
|
3172
3382
|
* bound at definition time (when calling labels.t), not at render time.
|
|
@@ -3639,6 +3849,25 @@ declare type ExtractBasePath<T extends string> = T extends `${infer Base}?${stri
|
|
|
3639
3849
|
/** Extracts the item type from a possibly-grouped items array element. */
|
|
3640
3850
|
declare type ExtractItem<I> = I extends ItemGroup<infer T> ? T : I;
|
|
3641
3851
|
|
|
3852
|
+
/**
|
|
3853
|
+
* One choice in a checkbox or radio section.
|
|
3854
|
+
*
|
|
3855
|
+
* Widens `SelectOption` (`{ value, label }`) and stays assignable **from** it,
|
|
3856
|
+
* so an existing `column.filter.options` array passes straight in.
|
|
3857
|
+
*
|
|
3858
|
+
* `value` is a string on purpose: `useURLCollectionVariables` stringifies array
|
|
3859
|
+
* members when it writes the URL, so a numeric `in` filter would come back as
|
|
3860
|
+
* `["1","2"]` and match nothing after a reload.
|
|
3861
|
+
*/
|
|
3862
|
+
declare type FacetOption = SelectOption & {
|
|
3863
|
+
/** Leading adornment — a colour swatch, a status dot. */
|
|
3864
|
+
icon?: ReactNode;
|
|
3865
|
+
/** Rendered but not selectable, with this as the reason (shown as a tooltip). */
|
|
3866
|
+
disabledReason?: string;
|
|
3867
|
+
/** A data-quality note shown as a tooltip, e.g. "Legacy spelling". */
|
|
3868
|
+
note?: string;
|
|
3869
|
+
};
|
|
3870
|
+
|
|
3642
3871
|
/** Shown when there is no image or the image failed to load. */
|
|
3643
3872
|
declare function Fallback({ className, ...props }: React_2.ComponentProps<typeof Avatar_2.Fallback>): JSX.Element;
|
|
3644
3873
|
|
|
@@ -3762,6 +3991,12 @@ declare type FieldRootProps = Pick<React_2.ComponentProps<typeof Field_2.Root>,
|
|
|
3762
3991
|
};
|
|
3763
3992
|
};
|
|
3764
3993
|
|
|
3994
|
+
declare type FieldSectionBase<TField extends string> = SectionBase & {
|
|
3995
|
+
field: TField;
|
|
3996
|
+
/** Show the per-section Clear. Default `true`. */
|
|
3997
|
+
clearable?: boolean;
|
|
3998
|
+
};
|
|
3999
|
+
|
|
3765
4000
|
export declare const Fieldset: {
|
|
3766
4001
|
Root: typeof Root_9;
|
|
3767
4002
|
Legend: typeof Legend;
|
|
@@ -3792,7 +4027,7 @@ declare type FieldsetRootProps = Pick<React_2.ComponentProps<typeof Fieldset_2.R
|
|
|
3792
4027
|
/**
|
|
3793
4028
|
* Field type mapping for Data View.
|
|
3794
4029
|
*/
|
|
3795
|
-
export declare type FieldType = "string" | "number" | "boolean" | "uuid" | "datetime" | "date" | "time" | "enum" | "array" | "nested" | "file";
|
|
4030
|
+
export declare type FieldType = "string" | "number" | "decimal" | "boolean" | "uuid" | "datetime" | "date" | "time" | "enum" | "array" | "nested" | "file";
|
|
3796
4031
|
|
|
3797
4032
|
/**
|
|
3798
4033
|
* Supported field types for DescriptionCard
|
|
@@ -3811,6 +4046,7 @@ export declare function fieldTypeToFilterConfig(field: string, type: FieldType,
|
|
|
3811
4046
|
declare type FieldTypeToFilterConfigType = {
|
|
3812
4047
|
string: "string";
|
|
3813
4048
|
number: "number";
|
|
4049
|
+
decimal: "decimal";
|
|
3814
4050
|
boolean: "boolean";
|
|
3815
4051
|
uuid: "uuid";
|
|
3816
4052
|
datetime: "datetime";
|
|
@@ -3831,6 +4067,7 @@ export declare function fieldTypeToSortConfig(field: string, type: FieldType): S
|
|
|
3831
4067
|
declare type FieldTypeToTSType = {
|
|
3832
4068
|
string: string;
|
|
3833
4069
|
number: number;
|
|
4070
|
+
decimal: string;
|
|
3834
4071
|
boolean: boolean;
|
|
3835
4072
|
uuid: string;
|
|
3836
4073
|
datetime: string;
|
|
@@ -3862,6 +4099,9 @@ export declare type FilterConfig = {
|
|
|
3862
4099
|
} | {
|
|
3863
4100
|
field: string;
|
|
3864
4101
|
type: "number";
|
|
4102
|
+
} | {
|
|
4103
|
+
field: string;
|
|
4104
|
+
type: "decimal";
|
|
3865
4105
|
} | {
|
|
3866
4106
|
field: string;
|
|
3867
4107
|
type: "datetime";
|
|
@@ -3892,6 +4132,75 @@ declare type FilterInputForFieldType<TFilterConfigType extends FilterConfig["typ
|
|
|
3892
4132
|
*/
|
|
3893
4133
|
export declare type FilterOperator = OperatorForFilterType[FilterConfig["type"]];
|
|
3894
4134
|
|
|
4135
|
+
/**
|
|
4136
|
+
* An always-visible faceted filter rail. Sections are config (`sections`), so
|
|
4137
|
+
* any mix of checkbox, radio, boolean, text, date, range and custom sections
|
|
4138
|
+
* works; every other feature is an optional part you include or leave out.
|
|
4139
|
+
*
|
|
4140
|
+
* It writes the same `CollectionControl` a `DataTable` reads, so it can sit in
|
|
4141
|
+
* a separate `Layout.Column` beside the table. Below `lg` it turns itself into
|
|
4142
|
+
* a left sheet behind a "Filters" button, like the Sidebar does.
|
|
4143
|
+
*
|
|
4144
|
+
* @example
|
|
4145
|
+
* ```tsx
|
|
4146
|
+
* <FilterRail.Root control={control} sections={sections} layout={layout}>
|
|
4147
|
+
* <FilterRail.Header>
|
|
4148
|
+
* <FilterRail.ClearAll />
|
|
4149
|
+
* <FilterRail.Settings />
|
|
4150
|
+
* </FilterRail.Header>
|
|
4151
|
+
* <FilterRail.Sections />
|
|
4152
|
+
* </FilterRail.Root>
|
|
4153
|
+
* ```
|
|
4154
|
+
*/
|
|
4155
|
+
export declare const FilterRail: {
|
|
4156
|
+
Provider: typeof Provider_2;
|
|
4157
|
+
Root: typeof Root_14;
|
|
4158
|
+
Header: typeof Header_7;
|
|
4159
|
+
ClearAll: typeof ClearAll;
|
|
4160
|
+
Sections: typeof Sections;
|
|
4161
|
+
Settings: typeof Settings;
|
|
4162
|
+
Trigger: typeof Trigger_5;
|
|
4163
|
+
};
|
|
4164
|
+
|
|
4165
|
+
/** Everything the rail filters with. Given to `Provider`, or to `Root` directly. */
|
|
4166
|
+
/**
|
|
4167
|
+
* `TField` is the control's field type; `TSectionField` the sections' — it must
|
|
4168
|
+
* fit inside `TField`, and defaults to it. With an untyped control
|
|
4169
|
+
* (`CollectionControl<string>`), type the sections with the row's keys to catch
|
|
4170
|
+
* a `field` that is not on the table:
|
|
4171
|
+
*
|
|
4172
|
+
* ```ts
|
|
4173
|
+
* const sections: FilterRailSection<keyof Row & string>[] = [...];
|
|
4174
|
+
* ```
|
|
4175
|
+
*/
|
|
4176
|
+
declare type FilterRailConfig<TField extends string = string, TSectionField extends TField = TField> = {
|
|
4177
|
+
/**
|
|
4178
|
+
* The same `control` passed to `useDataTable`. A prop rather than context:
|
|
4179
|
+
* the rail sits in a different `Layout.Column`, outside `DataTable.Root`.
|
|
4180
|
+
*/
|
|
4181
|
+
control: CollectionControl<TField>;
|
|
4182
|
+
/** Top to bottom. Any mix of section types. */
|
|
4183
|
+
sections: readonly FilterRailSection<TSectionField>[];
|
|
4184
|
+
/** User layout (order / hidden / sort). Required for `FilterRail.Settings`. */
|
|
4185
|
+
layout?: RailLayoutBinding;
|
|
4186
|
+
/** 32px rows (default) or 40px. */
|
|
4187
|
+
density?: "compact" | "comfortable";
|
|
4188
|
+
/** Fires after the rail applies a change. */
|
|
4189
|
+
onFilterChange?: (next: Filter<TField>[], changed: readonly TSectionField[]) => void;
|
|
4190
|
+
};
|
|
4191
|
+
|
|
4192
|
+
declare type FilterRailProviderProps<TField extends string = string, TSectionField extends TField = TField> = FilterRailConfig<TField, TSectionField> & {
|
|
4193
|
+
children: ReactNode;
|
|
4194
|
+
};
|
|
4195
|
+
|
|
4196
|
+
/**
|
|
4197
|
+
* Standalone, `Root` takes the config itself. Inside `FilterRail.Provider` —
|
|
4198
|
+
* needed only when a `FilterRail.Trigger` sits outside the rail — it takes none.
|
|
4199
|
+
*/
|
|
4200
|
+
export declare type FilterRailRootProps<TField extends string = string, TSectionField extends TField = TField> = RootOwnProps & (FilterRailConfig<TField, TSectionField> | NoConfig);
|
|
4201
|
+
|
|
4202
|
+
export declare type FilterRailSection<TField extends string = string> = TextSection<TField> | RadioSection<TField> | CheckboxSection<TField> | DateSection<TField> | DateRangeSection<TField> | NumberRangeSection<TField> | BooleanSection<TField> | CustomSection<TField>;
|
|
4203
|
+
|
|
3895
4204
|
/**
|
|
3896
4205
|
* Week-start override for the `weekStart`/`weekEnd` shortcuts (and the calendar
|
|
3897
4206
|
* grid). Defined here — with the resolver that consumes it — so the field and
|
|
@@ -4383,11 +4692,25 @@ declare namespace Header_6 {
|
|
|
4383
4692
|
var displayName: string;
|
|
4384
4693
|
}
|
|
4385
4694
|
|
|
4695
|
+
declare function Header_7({ title, children, className }: HeaderProps_2): JSX.Element;
|
|
4696
|
+
|
|
4697
|
+
declare namespace Header_7 {
|
|
4698
|
+
var displayName: string;
|
|
4699
|
+
}
|
|
4700
|
+
|
|
4386
4701
|
declare type HeaderProps = Omit<React_2.ComponentProps<"div">, "title"> & {
|
|
4387
4702
|
title?: React_2.ReactNode;
|
|
4388
4703
|
description?: React_2.ReactNode;
|
|
4389
4704
|
};
|
|
4390
4705
|
|
|
4706
|
+
declare type HeaderProps_2 = {
|
|
4707
|
+
/** Default "Filters". */
|
|
4708
|
+
title?: ReactNode;
|
|
4709
|
+
/** Actions on the right — `FilterRail.ClearAll`, `FilterRail.Settings`, or your own. */
|
|
4710
|
+
children?: ReactNode;
|
|
4711
|
+
className?: string;
|
|
4712
|
+
};
|
|
4713
|
+
|
|
4391
4714
|
/**
|
|
4392
4715
|
* Context passed to custom `header` renderers.
|
|
4393
4716
|
*/
|
|
@@ -4887,6 +5210,10 @@ export { NavLink }
|
|
|
4887
5210
|
|
|
4888
5211
|
export { NavLinkProps }
|
|
4889
5212
|
|
|
5213
|
+
declare type NoConfig = {
|
|
5214
|
+
[K in keyof FilterRailConfig]?: never;
|
|
5215
|
+
};
|
|
5216
|
+
|
|
4890
5217
|
/**
|
|
4891
5218
|
* Extract the node type from a cursor connection result.
|
|
4892
5219
|
*/
|
|
@@ -4906,6 +5233,16 @@ declare interface NonSortableHeaderRenderContext {
|
|
|
4906
5233
|
sortable: false;
|
|
4907
5234
|
}
|
|
4908
5235
|
|
|
5236
|
+
/**
|
|
5237
|
+
* `edit` config for `type: "number"` and `type: "money"` columns. Drafts are raw
|
|
5238
|
+
* strings (including incomplete input); confirmation emits a JavaScript number
|
|
5239
|
+
* or `null`, not an arbitrary-precision Decimal. Editing uses `.` as the decimal
|
|
5240
|
+
* separator, independently of display locale. Full-width digits and valid comma
|
|
5241
|
+
* grouping are normalized on confirmation. Display precision does not constrain
|
|
5242
|
+
* input; business rules belong to the consumer.
|
|
5243
|
+
*/
|
|
5244
|
+
export declare type NumberCellEditOptions<TRow extends Record<string, unknown>> = CellEditBase<TRow, number, string>;
|
|
5245
|
+
|
|
4909
5246
|
/** Options for `type: "number"` cells. */
|
|
4910
5247
|
declare interface NumberCellOptions {
|
|
4911
5248
|
/** Minimum decimal places. Default: `0`. */
|
|
@@ -4916,6 +5253,17 @@ declare interface NumberCellOptions {
|
|
|
4916
5253
|
locale?: string;
|
|
4917
5254
|
}
|
|
4918
5255
|
|
|
5256
|
+
/** A numeric from/to pair: `between` `{ min, max }`, or `gte` / `lte` when half-open. */
|
|
5257
|
+
declare type NumberRangeSection<TField extends string = string> = FieldSectionBase<TField> & {
|
|
5258
|
+
control: "numberRange";
|
|
5259
|
+
/** Input bounds and placeholders. One end typed alone commits `gte` / `lte`. */
|
|
5260
|
+
min?: number;
|
|
5261
|
+
max?: number;
|
|
5262
|
+
step?: number;
|
|
5263
|
+
/** Rendered after the inputs — "units", "$". */
|
|
5264
|
+
unit?: ReactNode;
|
|
5265
|
+
};
|
|
5266
|
+
|
|
4919
5267
|
export declare type OpenCommandPaletteOptions = {
|
|
4920
5268
|
/** Optional initial text to prefill into the palette input. */
|
|
4921
5269
|
search?: string;
|
|
@@ -4947,6 +5295,7 @@ declare type OperatorForFilterType = {
|
|
|
4947
5295
|
export declare const OPERATORS_BY_FILTER_TYPE: {
|
|
4948
5296
|
readonly string: readonly ["eq", "ne", "contains", "notContains", "hasPrefix", "hasSuffix", "notHasPrefix", "notHasSuffix", "in", "nin", "regex"];
|
|
4949
5297
|
readonly number: readonly ["eq", "ne", "gt", "gte", "lt", "lte", "between", "in", "nin"];
|
|
5298
|
+
readonly decimal: readonly ["eq", "ne", "gt", "gte", "lt", "lte", "between", "in", "nin"];
|
|
4950
5299
|
readonly datetime: readonly ["eq", "ne", "gt", "gte", "lt", "lte", "between", "in", "nin"];
|
|
4951
5300
|
readonly date: readonly ["eq", "ne", "gt", "gte", "lt", "lte", "between", "in", "nin"];
|
|
4952
5301
|
readonly time: readonly ["eq", "ne", "gt", "gte", "lt", "lte", "between", "in", "nin"];
|
|
@@ -4960,7 +5309,16 @@ declare type OperatorValueType<TOp extends string, TValue> = TOp extends "in" |
|
|
|
4960
5309
|
max: TValue;
|
|
4961
5310
|
} : TValue;
|
|
4962
5311
|
|
|
4963
|
-
|
|
5312
|
+
/**
|
|
5313
|
+
* How a checkbox section's options are ordered.
|
|
5314
|
+
*
|
|
5315
|
+
* `"given"` (default) keeps the authored order — a curated vocabulary
|
|
5316
|
+
* (XS · S · M · L) must never be reordered. `"label"` sorts A–Z. A comparator
|
|
5317
|
+
* gives any other fixed order.
|
|
5318
|
+
*/
|
|
5319
|
+
declare type OptionSort = "given" | "label" | ((a: FacetOption, b: FacetOption) => number);
|
|
5320
|
+
|
|
5321
|
+
declare type OrderableFieldType = "string" | "number" | "decimal" | "boolean" | "datetime" | "date" | "time" | "enum";
|
|
4964
5322
|
|
|
4965
5323
|
/**
|
|
4966
5324
|
* A React component that can be used as a page in file-based routing.
|
|
@@ -5076,6 +5434,17 @@ declare namespace Provider {
|
|
|
5076
5434
|
var displayName: string;
|
|
5077
5435
|
}
|
|
5078
5436
|
|
|
5437
|
+
/**
|
|
5438
|
+
* Holds the rail's state for every part beneath it. Only needed when a
|
|
5439
|
+
* `FilterRail.Trigger` sits outside `FilterRail.Root` (in a table toolbar, say);
|
|
5440
|
+
* otherwise give `Root` the config directly.
|
|
5441
|
+
*/
|
|
5442
|
+
declare function Provider_2<TField extends string = string, TSectionField extends TField = TField>({ control, sections, layout, density, onFilterChange, children, }: FilterRailProviderProps<TField, TSectionField>): JSX.Element;
|
|
5443
|
+
|
|
5444
|
+
declare namespace Provider_2 {
|
|
5445
|
+
var displayName: string;
|
|
5446
|
+
}
|
|
5447
|
+
|
|
5079
5448
|
declare type ProviderProps = Pick<React_2.ComponentProps<typeof Tooltip_2.Provider>, "delay" | "closeDelay" | "timeout"> & {
|
|
5080
5449
|
children: React_2.ReactNode;
|
|
5081
5450
|
};
|
|
@@ -5101,6 +5470,36 @@ declare namespace RadioItemIndicator {
|
|
|
5101
5470
|
var displayName: string;
|
|
5102
5471
|
}
|
|
5103
5472
|
|
|
5473
|
+
/** Mutually exclusive choices — one filter, or none. */
|
|
5474
|
+
declare type RadioSection<TField extends string = string> = FieldSectionBase<TField> & {
|
|
5475
|
+
control: "radio";
|
|
5476
|
+
operator?: "eq" | "ne";
|
|
5477
|
+
options: readonly FacetOption[];
|
|
5478
|
+
/** The "no constraint" row. Default "Any"; `null` removes it. */
|
|
5479
|
+
anyLabel?: ReactNode | null;
|
|
5480
|
+
};
|
|
5481
|
+
|
|
5482
|
+
/**
|
|
5483
|
+
* The user's override of the authored section order, visibility and option
|
|
5484
|
+
* sort. Kept separate from `sections` so a new authored section needs no
|
|
5485
|
+
* migration of anyone's saved layout.
|
|
5486
|
+
*/
|
|
5487
|
+
declare type RailLayout = {
|
|
5488
|
+
/** Section ids, top to bottom. Unlisted ids follow in authored order. */
|
|
5489
|
+
order: readonly string[];
|
|
5490
|
+
/** Section ids the user has switched off. */
|
|
5491
|
+
hidden: readonly string[];
|
|
5492
|
+
/** Per-section override of the authored `sort`. Checkbox sections only. */
|
|
5493
|
+
sort: Readonly<Record<string, UserOptionSort>>;
|
|
5494
|
+
};
|
|
5495
|
+
|
|
5496
|
+
declare type RailLayoutBinding = {
|
|
5497
|
+
value: RailLayout;
|
|
5498
|
+
onChange: (next: RailLayout) => void;
|
|
5499
|
+
/** Back to the authored defaults. Omit and no Reset is offered. */
|
|
5500
|
+
onReset?: () => void;
|
|
5501
|
+
};
|
|
5502
|
+
|
|
5104
5503
|
/**
|
|
5105
5504
|
* A standalone inline range calendar. The first click sets one end of the
|
|
5106
5505
|
* range, the highlight follows the pointer (or arrow keys), and the second
|
|
@@ -5234,9 +5633,11 @@ declare type ResourceMeta = {
|
|
|
5234
5633
|
title?: LocalizedString;
|
|
5235
5634
|
icon?: ReactNode;
|
|
5236
5635
|
/**
|
|
5237
|
-
* Custom breadcrumb segment title
|
|
5636
|
+
* Custom breadcrumb segment title. Pass `labels.t("key")` directly for localization.
|
|
5637
|
+
* Other callbacks receive the URL segment and may return a LocalizedString
|
|
5638
|
+
* (e.g. `(segment) => labels.t("order", { id: segment })`), resolved using the current locale.
|
|
5238
5639
|
*/
|
|
5239
|
-
breadcrumbTitle?: string | ((segment: string) =>
|
|
5640
|
+
breadcrumbTitle?: string | ((segment: string) => LocalizedString);
|
|
5240
5641
|
};
|
|
5241
5642
|
|
|
5242
5643
|
/**
|
|
@@ -5362,6 +5763,17 @@ declare namespace Root_13 {
|
|
|
5362
5763
|
var displayName: string;
|
|
5363
5764
|
}
|
|
5364
5765
|
|
|
5766
|
+
/**
|
|
5767
|
+
* The rail. Give it the config directly, or render it inside
|
|
5768
|
+
* `FilterRail.Provider` with no config when a `FilterRail.Trigger` lives
|
|
5769
|
+
* elsewhere on the page.
|
|
5770
|
+
*/
|
|
5771
|
+
declare function Root_14<TField extends string = string, TSectionField extends TField = TField>(props: FilterRailRootProps<TField, TSectionField>): JSX.Element;
|
|
5772
|
+
|
|
5773
|
+
declare namespace Root_14 {
|
|
5774
|
+
var displayName: string;
|
|
5775
|
+
}
|
|
5776
|
+
|
|
5365
5777
|
/**
|
|
5366
5778
|
* Provides the shared time range used by all timeline primitives.
|
|
5367
5779
|
*
|
|
@@ -5376,9 +5788,9 @@ declare namespace Root_13 {
|
|
|
5376
5788
|
* </Timeline.Root>
|
|
5377
5789
|
* ```
|
|
5378
5790
|
*/
|
|
5379
|
-
declare function
|
|
5791
|
+
declare function Root_15({ start, end, children, className, style }: TimelineRootProps): JSX.Element;
|
|
5380
5792
|
|
|
5381
|
-
declare namespace
|
|
5793
|
+
declare namespace Root_15 {
|
|
5382
5794
|
var displayName: string;
|
|
5383
5795
|
}
|
|
5384
5796
|
|
|
@@ -5547,6 +5959,13 @@ declare type RootConfiguration = {
|
|
|
5547
5959
|
timeZone?: string;
|
|
5548
5960
|
};
|
|
5549
5961
|
|
|
5962
|
+
declare type RootOwnProps = {
|
|
5963
|
+
/** Accessible name of the rail landmark. Default "Filters". */
|
|
5964
|
+
"aria-label"?: string;
|
|
5965
|
+
className?: string;
|
|
5966
|
+
children: ReactNode;
|
|
5967
|
+
};
|
|
5968
|
+
|
|
5550
5969
|
declare type RootProps = React_2.ComponentProps<"div"> & VariantProps<typeof alertVariants> & {
|
|
5551
5970
|
/** Action element rendered below the description */
|
|
5552
5971
|
action?: React_2.ReactNode;
|
|
@@ -5620,11 +6039,16 @@ declare namespace Row_3 {
|
|
|
5620
6039
|
/**
|
|
5621
6040
|
* A single row action definition for the actions column.
|
|
5622
6041
|
*/
|
|
5623
|
-
export declare interface RowAction<TRow extends Record<string, unknown>> {
|
|
5624
|
-
|
|
5625
|
-
|
|
5626
|
-
|
|
5627
|
-
|
|
6042
|
+
export declare interface RowAction<TRow extends Record<string, unknown>> extends DataTableAction {
|
|
6043
|
+
/** Whether the action can act on this row. Return `false` to disable it. */
|
|
6044
|
+
canApply?: (row: TRow) => boolean;
|
|
6045
|
+
/**
|
|
6046
|
+
* Return `true` to disable the action for a given row.
|
|
6047
|
+
*
|
|
6048
|
+
* @deprecated Use `canApply`, which reads the other way round:
|
|
6049
|
+
* `isDisabled: (row) => x` is `canApply: (row) => !x`. If both are set, the
|
|
6050
|
+
* action is disabled when either one says so.
|
|
6051
|
+
*/
|
|
5628
6052
|
isDisabled?: (row: TRow) => boolean;
|
|
5629
6053
|
onClick: (row: TRow) => void;
|
|
5630
6054
|
}
|
|
@@ -5677,6 +6101,32 @@ declare type RowExpansionOptions<TRow extends Record<string, unknown>> = {
|
|
|
5677
6101
|
onChange?: (ids: string[]) => void;
|
|
5678
6102
|
});
|
|
5679
6103
|
|
|
6104
|
+
/** Controlled or uncontrolled row-selection configuration. Keep the mode stable while mounted. */
|
|
6105
|
+
export declare type RowSelectionOptions = {
|
|
6106
|
+
/**
|
|
6107
|
+
* Bulk actions for the selected IDs, shown in `DataTable.Footer` while at
|
|
6108
|
+
* least one row is selected. The bar includes the selection count, these
|
|
6109
|
+
* actions, and Clear, with pagination kept alongside. The first three actions
|
|
6110
|
+
* render as buttons; the rest collapse into a "More actions" menu.
|
|
6111
|
+
* Omit or pass an empty array to enable selection without an action bar.
|
|
6112
|
+
*/
|
|
6113
|
+
actions?: SelectionAction[];
|
|
6114
|
+
} & ({
|
|
6115
|
+
/**
|
|
6116
|
+
* Controlled selected ids. Update this array from `onChange`.
|
|
6117
|
+
* Commands issued before the owner commits each derive from this value.
|
|
6118
|
+
*/
|
|
6119
|
+
selectedIds: string[];
|
|
6120
|
+
onChange: (ids: string[]) => void;
|
|
6121
|
+
defaultSelectedIds?: never;
|
|
6122
|
+
} | {
|
|
6123
|
+
selectedIds?: never;
|
|
6124
|
+
/** Initial selected ids in uncontrolled mode; subsequent changes are ignored. */
|
|
6125
|
+
defaultSelectedIds?: string[];
|
|
6126
|
+
/** Notification of user-driven selection changes, including under StrictMode. */
|
|
6127
|
+
onChange?: (ids: string[]) => void;
|
|
6128
|
+
});
|
|
6129
|
+
|
|
5680
6130
|
/**
|
|
5681
6131
|
* Setter shape compatible with `useSearchParams()`.
|
|
5682
6132
|
*/
|
|
@@ -5707,6 +6157,32 @@ export declare type SearchSource = {
|
|
|
5707
6157
|
}) => Promise<CommandPaletteSearchResult[]>;
|
|
5708
6158
|
};
|
|
5709
6159
|
|
|
6160
|
+
declare type SectionBase = {
|
|
6161
|
+
/** Stable and unique within the rail. Keys the layout and a11y ids. */
|
|
6162
|
+
id: string;
|
|
6163
|
+
/** The section heading — the word the business uses, not the field name. */
|
|
6164
|
+
label: ReactNode;
|
|
6165
|
+
/** One muted line under the heading. */
|
|
6166
|
+
hint?: ReactNode;
|
|
6167
|
+
/**
|
|
6168
|
+
* Start collapsed. Users expand or collapse any section from the chevron by
|
|
6169
|
+
* its title; while collapsed, the header still shows how many values are
|
|
6170
|
+
* selected. Default `false`.
|
|
6171
|
+
*/
|
|
6172
|
+
defaultCollapsed?: boolean;
|
|
6173
|
+
};
|
|
6174
|
+
|
|
6175
|
+
/** Every section, in the user's layout. Scrolls; the header stays put. */
|
|
6176
|
+
declare function Sections({ className }: SectionsProps): JSX.Element;
|
|
6177
|
+
|
|
6178
|
+
declare namespace Sections {
|
|
6179
|
+
var displayName: string;
|
|
6180
|
+
}
|
|
6181
|
+
|
|
6182
|
+
declare type SectionsProps = {
|
|
6183
|
+
className?: string;
|
|
6184
|
+
};
|
|
6185
|
+
|
|
5710
6186
|
export declare const Select: SelectComponent;
|
|
5711
6187
|
|
|
5712
6188
|
/**
|
|
@@ -5807,6 +6283,38 @@ declare namespace SelectGroupLabel {
|
|
|
5807
6283
|
var displayName: string;
|
|
5808
6284
|
}
|
|
5809
6285
|
|
|
6286
|
+
/**
|
|
6287
|
+
* An ID-based bulk action shown in `DataTable.Footer` while a selection is open.
|
|
6288
|
+
* Configure through `UseDataTableOptions.rowSelection.actions`.
|
|
6289
|
+
*/
|
|
6290
|
+
export declare interface SelectionAction extends DataTableAction {
|
|
6291
|
+
/**
|
|
6292
|
+
* Called with a click-time copy of all selected IDs, including unloaded rows.
|
|
6293
|
+
* Consumers own eligibility checks, fetching, confirmation, and execution.
|
|
6294
|
+
* Selection is never automatically cleared: update controlled selection based
|
|
6295
|
+
* on the actual result, preserving ineligible IDs and any new selections.
|
|
6296
|
+
*
|
|
6297
|
+
* Return a promise to disable the bar and show a spinner while it is pending.
|
|
6298
|
+
* For work started later by a confirmation dialog, pass the request to
|
|
6299
|
+
* `helpers.run` instead. Neither success nor failure changes selection.
|
|
6300
|
+
*/
|
|
6301
|
+
onClick: (ids: string[], helpers: SelectionActionHelpers) => void | Promise<unknown>;
|
|
6302
|
+
}
|
|
6303
|
+
|
|
6304
|
+
/** The second argument to `SelectionAction.onClick`. */
|
|
6305
|
+
export declare interface SelectionActionHelpers {
|
|
6306
|
+
/** Empty the selection across all pages. */
|
|
6307
|
+
clearSelection: () => void;
|
|
6308
|
+
/**
|
|
6309
|
+
* Hand the bar a request it should track — for one that starts after
|
|
6310
|
+
* `onClick` has returned, typically from a confirm dialog's confirm button.
|
|
6311
|
+
* The bar then behaves as if `onClick` had returned it: actions (and Clear)
|
|
6312
|
+
* are disabled while it is pending. It never changes selection. Returns the
|
|
6313
|
+
* request, so it can be awaited too.
|
|
6314
|
+
*/
|
|
6315
|
+
run: <T>(request: PromiseLike<T>) => PromiseLike<T>;
|
|
6316
|
+
}
|
|
6317
|
+
|
|
5810
6318
|
declare function SelectItem({ className, children, ...props }: React_2.ComponentProps<typeof Select_2.Item>): JSX.Element;
|
|
5811
6319
|
|
|
5812
6320
|
declare namespace SelectItem {
|
|
@@ -5961,6 +6469,23 @@ declare namespace Separator {
|
|
|
5961
6469
|
var displayName: string;
|
|
5962
6470
|
}
|
|
5963
6471
|
|
|
6472
|
+
/**
|
|
6473
|
+
* Show / hide, reorder and sort the sections. Renders nothing unless
|
|
6474
|
+
* `FilterRail.Root` has a `layout` binding.
|
|
6475
|
+
*
|
|
6476
|
+
* Hiding a section that carries a filter also clears that filter — hiding must
|
|
6477
|
+
* never strand an active filter somewhere the user cannot see it.
|
|
6478
|
+
*/
|
|
6479
|
+
declare function Settings({ className }: SettingsProps): JSX.Element | null;
|
|
6480
|
+
|
|
6481
|
+
declare namespace Settings {
|
|
6482
|
+
var displayName: string;
|
|
6483
|
+
}
|
|
6484
|
+
|
|
6485
|
+
declare type SettingsProps = {
|
|
6486
|
+
className?: string;
|
|
6487
|
+
};
|
|
6488
|
+
|
|
5964
6489
|
/**
|
|
5965
6490
|
* Shared props between `AppShellProps` and the internal `WithPages` wrapper.
|
|
5966
6491
|
*
|
|
@@ -6492,9 +7017,45 @@ declare const sidebarMenuButtonVariants: (props?: ({
|
|
|
6492
7017
|
|
|
6493
7018
|
export declare function SidebarMenuItem({ className, ...props }: React_2.ComponentProps<"li">): JSX.Element;
|
|
6494
7019
|
|
|
7020
|
+
/**
|
|
7021
|
+
* A static heading for a run of flat sidebar navigation items.
|
|
7022
|
+
*
|
|
7023
|
+
* Unlike `SidebarGroup`, a section is neither collapsible nor navigable, and its
|
|
7024
|
+
* items keep the same styling and indentation as top-level items. In the icon
|
|
7025
|
+
* rail the heading is hidden so the compact layout is unaffected. Add dividers
|
|
7026
|
+
* between sections with `SidebarSeparator`.
|
|
7027
|
+
*
|
|
7028
|
+
* @example
|
|
7029
|
+
* ```tsx
|
|
7030
|
+
* <DefaultSidebar>
|
|
7031
|
+
* <SidebarItem to="/overview" />
|
|
7032
|
+
* <SidebarSeparator />
|
|
7033
|
+
* <SidebarSection title={labels.t("services")}>
|
|
7034
|
+
* <SidebarItem to="/ai-gateways" />
|
|
7035
|
+
* <SidebarItem to="/applications" />
|
|
7036
|
+
* </SidebarSection>
|
|
7037
|
+
* </DefaultSidebar>
|
|
7038
|
+
* ```
|
|
7039
|
+
*/
|
|
7040
|
+
export declare const SidebarSection: (props: SidebarSectionProps) => JSX.Element;
|
|
7041
|
+
|
|
7042
|
+
export declare type SidebarSectionProps = {
|
|
7043
|
+
/**
|
|
7044
|
+
* Section heading (i18n supported).
|
|
7045
|
+
*/
|
|
7046
|
+
title: LocalizedString;
|
|
7047
|
+
/**
|
|
7048
|
+
* Child items (SidebarItem, SidebarGroup, etc.)
|
|
7049
|
+
*/
|
|
7050
|
+
children: ReactNode;
|
|
7051
|
+
};
|
|
7052
|
+
|
|
6495
7053
|
/**
|
|
6496
7054
|
* A visual divider for sidebar navigation.
|
|
6497
7055
|
*
|
|
7056
|
+
* Adds 4px above and 8px below the line (on top of the menu's own gap) so the
|
|
7057
|
+
* items that follow read as a new section.
|
|
7058
|
+
*
|
|
6498
7059
|
* @example
|
|
6499
7060
|
* ```tsx
|
|
6500
7061
|
* <DefaultSidebar>
|
|
@@ -6714,6 +7275,22 @@ declare type TabsSize = "xs" | "sm" | "default" | "lg";
|
|
|
6714
7275
|
|
|
6715
7276
|
declare type TabsVariant = "default" | "line" | "capsule";
|
|
6716
7277
|
|
|
7278
|
+
/**
|
|
7279
|
+
* Text with a typography role. The role sets the size, line height, weight,
|
|
7280
|
+
* and letter spacing. It does not set the color or choose the heading level.
|
|
7281
|
+
*
|
|
7282
|
+
* @example
|
|
7283
|
+
* ```tsx
|
|
7284
|
+
* import { Text } from "@tailor-platform/app-shell";
|
|
7285
|
+
*
|
|
7286
|
+
* <Text variant="heading-md" render={<h3 />}>Line items</Text>
|
|
7287
|
+
* <Text variant="body-md" className="text-muted-foreground">Orders sent this month.</Text>
|
|
7288
|
+
* <Text variant="label-md" className="tabular-nums">1,240</Text>
|
|
7289
|
+
* ```
|
|
7290
|
+
*/
|
|
7291
|
+
declare function Text_2({ className, variant, render, children, ref, ...props }: TextProps): React_2.ReactElement<unknown, string | React_2.JSXElementConstructor<any>>;
|
|
7292
|
+
export { Text_2 as Text }
|
|
7293
|
+
|
|
6717
7294
|
/**
|
|
6718
7295
|
* A styled multi-line text input.
|
|
6719
7296
|
*
|
|
@@ -6775,6 +7352,44 @@ export declare type TextareaProps = Omit<React_2.ComponentProps<typeof Field_2.C
|
|
|
6775
7352
|
className?: string;
|
|
6776
7353
|
};
|
|
6777
7354
|
|
|
7355
|
+
/**
|
|
7356
|
+
* `edit` config for `type: "text"` and `type: "link"` columns. Without
|
|
7357
|
+
* `options` the cell is typed into: the value is the text as typed, and an
|
|
7358
|
+
* emptied cell commits `null`. A `link` column shows its label as plain text
|
|
7359
|
+
* while the cell can be edited.
|
|
7360
|
+
*/
|
|
7361
|
+
export declare interface TextCellEditOptions<TRow extends Record<string, unknown>> extends CellEditBase<TRow, string, string | null> {
|
|
7362
|
+
/**
|
|
7363
|
+
* Turns the cell into a dropdown of these choices (a supplier, a warehouse,
|
|
7364
|
+
* a unit of measure). The column's value is an option's `value`, and every
|
|
7365
|
+
* cell in the column — editable or not — shows the matching `label`.
|
|
7366
|
+
* Picking a choice notifies its value; a "None" choice notifies `null`.
|
|
7367
|
+
*/
|
|
7368
|
+
options?: readonly SelectOption[];
|
|
7369
|
+
}
|
|
7370
|
+
|
|
7371
|
+
export declare type TextProps = React_2.HTMLAttributes<HTMLElement> & VariantProps<typeof textVariants> & {
|
|
7372
|
+
/** Ref to the rendered element. */
|
|
7373
|
+
ref?: React_2.Ref<HTMLElement>;
|
|
7374
|
+
/** Custom element to render as (Base UI render prop). Use it to set the heading level, for example `render={<h3 />}`. */
|
|
7375
|
+
render?: React_2.ReactElement;
|
|
7376
|
+
};
|
|
7377
|
+
|
|
7378
|
+
/** Free text with one fixed operator. */
|
|
7379
|
+
declare type TextSection<TField extends string = string> = FieldSectionBase<TField> & {
|
|
7380
|
+
control: "text";
|
|
7381
|
+
operator: "contains" | "hasPrefix" | "eq";
|
|
7382
|
+
placeholder?: string;
|
|
7383
|
+
/** Default 250 ms. Every commit resets pagination. */
|
|
7384
|
+
debounceMs?: number;
|
|
7385
|
+
/** Below this length the filter is removed instead of applied. Default 1. */
|
|
7386
|
+
minLength?: number;
|
|
7387
|
+
};
|
|
7388
|
+
|
|
7389
|
+
declare const textVariants: (props?: ({
|
|
7390
|
+
variant?: "heading-lg" | "heading-md" | "heading-sm" | "body-md" | "body-sm" | "label-md" | "label-sm" | "code-sm" | "body-md-relaxed" | "body-sm-relaxed" | null | undefined;
|
|
7391
|
+
} & ClassProp) | undefined) => string;
|
|
7392
|
+
|
|
6778
7393
|
export { Time }
|
|
6779
7394
|
|
|
6780
7395
|
/**
|
|
@@ -6793,7 +7408,7 @@ export { Time }
|
|
|
6793
7408
|
* ```
|
|
6794
7409
|
*/
|
|
6795
7410
|
export declare const Timeline: {
|
|
6796
|
-
Root: typeof
|
|
7411
|
+
Root: typeof Root_15;
|
|
6797
7412
|
Viewport: typeof Viewport;
|
|
6798
7413
|
Row: typeof Row_3;
|
|
6799
7414
|
Interval: typeof Interval;
|
|
@@ -7276,6 +7891,23 @@ declare namespace Trigger_4 {
|
|
|
7276
7891
|
var displayName: string;
|
|
7277
7892
|
}
|
|
7278
7893
|
|
|
7894
|
+
/**
|
|
7895
|
+
* Opens the rail on narrow screens, carrying the active filter count. Place it
|
|
7896
|
+
* anywhere inside `FilterRail.Provider` — a table toolbar, a page header. It
|
|
7897
|
+
* renders nothing on wide screens, where the rail is already visible, and while
|
|
7898
|
+
* it is mounted `FilterRail.Root` skips its own fallback button.
|
|
7899
|
+
*/
|
|
7900
|
+
declare function Trigger_5({ children, className }: TriggerProps_2): JSX.Element | null;
|
|
7901
|
+
|
|
7902
|
+
declare namespace Trigger_5 {
|
|
7903
|
+
var displayName: string;
|
|
7904
|
+
}
|
|
7905
|
+
|
|
7906
|
+
declare type TriggerButtonProps = {
|
|
7907
|
+
children?: ReactNode;
|
|
7908
|
+
className?: string;
|
|
7909
|
+
};
|
|
7910
|
+
|
|
7279
7911
|
declare type TriggerProps = {
|
|
7280
7912
|
/** Extra classes for the trigger button. */
|
|
7281
7913
|
className?: string;
|
|
@@ -7286,6 +7918,8 @@ declare type TriggerProps = {
|
|
|
7286
7918
|
onClick?: React.MouseEventHandler<HTMLButtonElement>;
|
|
7287
7919
|
};
|
|
7288
7920
|
|
|
7921
|
+
declare type TriggerProps_2 = TriggerButtonProps;
|
|
7922
|
+
|
|
7289
7923
|
/**
|
|
7290
7924
|
* Metadata-aware collection variables that remain assignable to the broad
|
|
7291
7925
|
* `CollectionVariables` shape expected by GraphQL clients.
|
|
@@ -7746,6 +8380,8 @@ export declare interface UseCollectionReturn<TFieldName extends string = string,
|
|
|
7746
8380
|
/**
|
|
7747
8381
|
* Hook for managing collection query parameters (filters, sort, pagination)
|
|
7748
8382
|
* with metadata-based field name typing and automatic `fieldType` detection.
|
|
8383
|
+
* Datetime filters are normalized to RFC 3339 using the AppShell timezone
|
|
8384
|
+
* before initialization or updates. Invalid datetime values throw a TypeError.
|
|
7749
8385
|
*
|
|
7750
8386
|
* Returns `variables` with `query`, `order`, and `pagination` sub-properties
|
|
7751
8387
|
* that can be mapped to GraphQL query variables.
|
|
@@ -8032,16 +8668,27 @@ export declare type UseDataTableOptions<TRow extends Record<string, unknown>, TF
|
|
|
8032
8668
|
* The column is omitted when this array is empty or not provided.
|
|
8033
8669
|
*/
|
|
8034
8670
|
rowActions?: RowAction<TRow>[];
|
|
8671
|
+
/**
|
|
8672
|
+
* Controlled or uncontrolled row selection. Providing this option enables
|
|
8673
|
+
* checkboxes. Uses string-normalized `row.id`; rows without an id are excluded.
|
|
8674
|
+
* The header checkbox adds/removes only the current page, preserving other ids.
|
|
8675
|
+
*/
|
|
8676
|
+
rowSelection?: RowSelectionOptions;
|
|
8035
8677
|
/**
|
|
8036
8678
|
* Called with the current array of selected row IDs whenever the selection
|
|
8037
|
-
* changes. Providing this prop enables the checkbox
|
|
8038
|
-
* Selection is ID-based (`row.id`) and persists
|
|
8679
|
+
* changes. Providing this prop or `rowSelection` enables the checkbox
|
|
8680
|
+
* selection column. Selection is ID-based (`row.id`) and persists
|
|
8681
|
+
* across page changes. Remains supported; `rowSelection.onChange` takes
|
|
8682
|
+
* precedence when both callbacks are supplied.
|
|
8039
8683
|
*
|
|
8040
8684
|
* **Requirement:** Each row must have a string or number `id` field.
|
|
8041
8685
|
* Rows without `id` are excluded from selection.
|
|
8042
8686
|
*
|
|
8043
|
-
* **Note:**
|
|
8044
|
-
* the rows
|
|
8687
|
+
* **Note:** The header checkbox acts on the **current page**: checking it adds
|
|
8688
|
+
* the page's rows to the selection and unchecking it removes them. Rows
|
|
8689
|
+
* selected on other pages are kept.
|
|
8690
|
+
*
|
|
8691
|
+
* @deprecated Use `rowSelection.onChange` instead.
|
|
8045
8692
|
*/
|
|
8046
8693
|
onSelectionChange?: (ids: string[]) => void;
|
|
8047
8694
|
/**
|
|
@@ -8137,11 +8784,27 @@ export declare interface UseDataTableReturn<TRow extends Record<string, unknown>
|
|
|
8137
8784
|
control: CollectionControl | undefined;
|
|
8138
8785
|
onClickRow?: (row: TRow) => void;
|
|
8139
8786
|
rowActions?: RowAction<TRow>[];
|
|
8787
|
+
/** Selection config (passthrough for `DataTable.Root`). */
|
|
8788
|
+
rowSelection?: RowSelectionOptions;
|
|
8140
8789
|
selectedIds: string[];
|
|
8141
8790
|
isRowSelected: (row: TRow) => boolean;
|
|
8142
8791
|
toggleRowSelection?: (row: TRow) => void;
|
|
8792
|
+
/** Adds every row on the current page to the selection. */
|
|
8143
8793
|
selectAllRows?: () => void;
|
|
8794
|
+
/** Removes the current page's rows from the selection; other pages' rows stay selected. */
|
|
8795
|
+
deselectAllRows?: () => void;
|
|
8796
|
+
/** Empties the selection across all pages. */
|
|
8144
8797
|
clearSelection?: () => void;
|
|
8798
|
+
/** Id of the selection action whose request is in flight, or `null`. */
|
|
8799
|
+
pendingActionId?: string | null;
|
|
8800
|
+
/**
|
|
8801
|
+
* Tracks a selection action's request: disables the bar while it is pending
|
|
8802
|
+
* without changing selection. This is what `SelectionActionHelpers.run` calls.
|
|
8803
|
+
* Undefined when selection is off.
|
|
8804
|
+
*/
|
|
8805
|
+
runSelectionAction?: (action: {
|
|
8806
|
+
id: string;
|
|
8807
|
+
}, request: PromiseLike<unknown>) => void;
|
|
8145
8808
|
isAllSelected: boolean;
|
|
8146
8809
|
isIndeterminate: boolean;
|
|
8147
8810
|
/** Ids of the currently expanded rows. */
|
|
@@ -8198,6 +8861,16 @@ declare function useFilter(options?: ComboboxFilterOptions): ComboboxFilter;
|
|
|
8198
8861
|
*/
|
|
8199
8862
|
declare function useFilter_2(options?: AutocompleteFilterOptions): AutocompleteFilter;
|
|
8200
8863
|
|
|
8864
|
+
/**
|
|
8865
|
+
* The user's section order, visibility and option sort, persisted to
|
|
8866
|
+
* localStorage under `storageKey`. Pass the result to `FilterRail.Root`'s
|
|
8867
|
+
* `layout` prop to enable `FilterRail.Settings`.
|
|
8868
|
+
*
|
|
8869
|
+
* For a team-shared layout, build a `{ value, onChange, onReset }` binding over
|
|
8870
|
+
* your own store instead — the rail does not care where it lives.
|
|
8871
|
+
*/
|
|
8872
|
+
export declare function useFilterRailLayout(storageKey: string): RailLayoutBinding;
|
|
8873
|
+
|
|
8201
8874
|
export { useLocation }
|
|
8202
8875
|
|
|
8203
8876
|
export { useMatch }
|
|
@@ -8300,6 +8973,9 @@ export declare const useResolvedLocale: () => {
|
|
|
8300
8973
|
|
|
8301
8974
|
export { useResolvedPath }
|
|
8302
8975
|
|
|
8976
|
+
/** The option sorts a user may pick in `FilterRail.Settings`. */
|
|
8977
|
+
declare type UserOptionSort = "given" | "label";
|
|
8978
|
+
|
|
8303
8979
|
export { useRouteError }
|
|
8304
8980
|
|
|
8305
8981
|
export { useSearchParams }
|
|
@@ -8408,7 +9084,7 @@ export declare function useURLCollectionVariables(options: UseCollectionOptions
|
|
|
8408
9084
|
* <Field.Validity>
|
|
8409
9085
|
* {(state) =>
|
|
8410
9086
|
* state.validity.valid === false && (
|
|
8411
|
-
* <p className="text-
|
|
9087
|
+
* <p className="text-danger-text text-sm">
|
|
8412
9088
|
* {state.validity.typeMismatch
|
|
8413
9089
|
* ? "Please enter a valid URL (e.g. https://example.com)"
|
|
8414
9090
|
* : "This field is required."}
|
|
@@ -8561,12 +9237,12 @@ declare namespace Root {
|
|
|
8561
9237
|
}
|
|
8562
9238
|
|
|
8563
9239
|
|
|
8564
|
-
declare namespace
|
|
9240
|
+
declare namespace Image {
|
|
8565
9241
|
var displayName: string;
|
|
8566
9242
|
}
|
|
8567
9243
|
|
|
8568
9244
|
|
|
8569
|
-
declare namespace
|
|
9245
|
+
declare namespace Fallback {
|
|
8570
9246
|
var displayName: string;
|
|
8571
9247
|
}
|
|
8572
9248
|
|
|
@@ -8576,17 +9252,17 @@ declare namespace Root {
|
|
|
8576
9252
|
}
|
|
8577
9253
|
|
|
8578
9254
|
|
|
8579
|
-
declare namespace
|
|
9255
|
+
declare namespace Title {
|
|
8580
9256
|
var displayName: string;
|
|
8581
9257
|
}
|
|
8582
9258
|
|
|
8583
9259
|
|
|
8584
|
-
declare namespace
|
|
9260
|
+
declare namespace Description {
|
|
8585
9261
|
var displayName: string;
|
|
8586
9262
|
}
|
|
8587
9263
|
|
|
8588
9264
|
|
|
8589
|
-
declare namespace
|
|
9265
|
+
declare namespace Provider {
|
|
8590
9266
|
var displayName: string;
|
|
8591
9267
|
}
|
|
8592
9268
|
|
|
@@ -8596,12 +9272,27 @@ declare namespace Root {
|
|
|
8596
9272
|
}
|
|
8597
9273
|
|
|
8598
9274
|
|
|
8599
|
-
declare namespace
|
|
9275
|
+
declare namespace Header {
|
|
8600
9276
|
var displayName: string;
|
|
8601
9277
|
}
|
|
8602
9278
|
|
|
8603
9279
|
|
|
8604
|
-
declare namespace
|
|
9280
|
+
declare namespace ClearAll {
|
|
9281
|
+
var displayName: string;
|
|
9282
|
+
}
|
|
9283
|
+
|
|
9284
|
+
|
|
9285
|
+
declare namespace Sections {
|
|
9286
|
+
var displayName: string;
|
|
9287
|
+
}
|
|
9288
|
+
|
|
9289
|
+
|
|
9290
|
+
declare namespace Trigger {
|
|
9291
|
+
var displayName: string;
|
|
9292
|
+
}
|
|
9293
|
+
|
|
9294
|
+
|
|
9295
|
+
declare namespace Settings {
|
|
8605
9296
|
var displayName: string;
|
|
8606
9297
|
}
|
|
8607
9298
|
|
|
@@ -8616,47 +9307,47 @@ declare namespace Header {
|
|
|
8616
9307
|
}
|
|
8617
9308
|
|
|
8618
9309
|
|
|
8619
|
-
declare namespace
|
|
9310
|
+
declare namespace Content {
|
|
8620
9311
|
var displayName: string;
|
|
8621
9312
|
}
|
|
8622
9313
|
|
|
8623
9314
|
|
|
8624
|
-
declare namespace
|
|
9315
|
+
declare namespace Root {
|
|
8625
9316
|
var displayName: string;
|
|
8626
9317
|
}
|
|
8627
9318
|
|
|
8628
9319
|
|
|
8629
|
-
declare namespace
|
|
9320
|
+
declare namespace Header {
|
|
8630
9321
|
var displayName: string;
|
|
8631
9322
|
}
|
|
8632
9323
|
|
|
8633
9324
|
|
|
8634
|
-
declare namespace
|
|
9325
|
+
declare namespace Body {
|
|
8635
9326
|
var displayName: string;
|
|
8636
9327
|
}
|
|
8637
9328
|
|
|
8638
9329
|
|
|
8639
|
-
declare namespace
|
|
9330
|
+
declare namespace Footer {
|
|
8640
9331
|
var displayName: string;
|
|
8641
9332
|
}
|
|
8642
9333
|
|
|
8643
9334
|
|
|
8644
|
-
declare namespace
|
|
9335
|
+
declare namespace Row {
|
|
8645
9336
|
var displayName: string;
|
|
8646
9337
|
}
|
|
8647
9338
|
|
|
8648
9339
|
|
|
8649
|
-
declare namespace
|
|
9340
|
+
declare namespace Head {
|
|
8650
9341
|
var displayName: string;
|
|
8651
9342
|
}
|
|
8652
9343
|
|
|
8653
9344
|
|
|
8654
|
-
declare namespace
|
|
9345
|
+
declare namespace Cell {
|
|
8655
9346
|
var displayName: string;
|
|
8656
9347
|
}
|
|
8657
9348
|
|
|
8658
9349
|
|
|
8659
|
-
declare namespace
|
|
9350
|
+
declare namespace Caption {
|
|
8660
9351
|
var displayName: string;
|
|
8661
9352
|
}
|
|
8662
9353
|
|
|
@@ -8861,6 +9552,26 @@ declare namespace Root {
|
|
|
8861
9552
|
}
|
|
8862
9553
|
|
|
8863
9554
|
|
|
9555
|
+
declare namespace List {
|
|
9556
|
+
var displayName: string;
|
|
9557
|
+
}
|
|
9558
|
+
|
|
9559
|
+
|
|
9560
|
+
declare namespace Tab {
|
|
9561
|
+
var displayName: string;
|
|
9562
|
+
}
|
|
9563
|
+
|
|
9564
|
+
|
|
9565
|
+
declare namespace Panel {
|
|
9566
|
+
var displayName: string;
|
|
9567
|
+
}
|
|
9568
|
+
|
|
9569
|
+
|
|
9570
|
+
declare namespace Root {
|
|
9571
|
+
var displayName: string;
|
|
9572
|
+
}
|
|
9573
|
+
|
|
9574
|
+
|
|
8864
9575
|
declare namespace Row {
|
|
8865
9576
|
var displayName: string;
|
|
8866
9577
|
}
|
|
@@ -9021,16 +9732,6 @@ declare namespace ComboboxCollection {
|
|
|
9021
9732
|
}
|
|
9022
9733
|
|
|
9023
9734
|
|
|
9024
|
-
declare namespace AutocompleteStandalone {
|
|
9025
|
-
var displayName: string;
|
|
9026
|
-
}
|
|
9027
|
-
|
|
9028
|
-
|
|
9029
|
-
declare namespace AutocompleteAsyncStandalone {
|
|
9030
|
-
var displayName: string;
|
|
9031
|
-
}
|
|
9032
|
-
|
|
9033
|
-
|
|
9034
9735
|
declare namespace AutocompleteRoot {
|
|
9035
9736
|
var displayName: string;
|
|
9036
9737
|
}
|
|
@@ -9101,6 +9802,16 @@ declare namespace AutocompleteStatus {
|
|
|
9101
9802
|
}
|
|
9102
9803
|
|
|
9103
9804
|
|
|
9805
|
+
declare namespace AutocompleteStandalone {
|
|
9806
|
+
var displayName: string;
|
|
9807
|
+
}
|
|
9808
|
+
|
|
9809
|
+
|
|
9810
|
+
declare namespace AutocompleteAsyncStandalone {
|
|
9811
|
+
var displayName: string;
|
|
9812
|
+
}
|
|
9813
|
+
|
|
9814
|
+
|
|
9104
9815
|
declare namespace DataTableRoot {
|
|
9105
9816
|
var displayName: string;
|
|
9106
9817
|
}
|