@jielga/tmdatagrid 2.3.0 → 2.4.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.
Files changed (38) hide show
  1. package/dist/index.d.ts +262 -8
  2. package/dist/index.js +1340 -1218
  3. package/dist/index.js.map +1 -1
  4. package/docs/columns.md +7 -0
  5. package/docs/filtering.md +2 -1
  6. package/docs/grouping.md +1 -1
  7. package/docs/localization.md +3 -3
  8. package/docs/persistence.md +88 -0
  9. package/docs/typed-deep-links.md +169 -0
  10. package/package.json +1 -1
  11. package/skills/appearance/SKILL.md +1 -1
  12. package/skills/appearance/references/labels.md +3 -3
  13. package/skills/cell-selection/SKILL.md +1 -1
  14. package/skills/columns/SKILL.md +4 -1
  15. package/skills/data/SKILL.md +1 -1
  16. package/skills/editing/SKILL.md +1 -1
  17. package/skills/filtering/SKILL.md +3 -2
  18. package/skills/getting-started/SKILL.md +2 -2
  19. package/skills/grouping/SKILL.md +2 -2
  20. package/skills/migrating-to-2/SKILL.md +1 -1
  21. package/skills/options/SKILL.md +30 -6
  22. package/skills/options/references/typed-links.md +134 -0
  23. package/skills/rows/SKILL.md +1 -1
  24. package/skills/server-side/SKILL.md +1 -1
  25. package/skills/testing/SKILL.md +1 -1
  26. package/skills/testing-components/SKILL.md +1 -1
  27. package/skills/testing-editing/SKILL.md +1 -1
  28. package/src/components/TMDataGridFilterPills.tsx +15 -1
  29. package/src/components/TMDataGridGroupColumn.tsx +19 -4
  30. package/src/components/TMDataGridHeaderFilterRow.tsx +7 -1
  31. package/src/core/filterOperators.ts +41 -18
  32. package/src/core/grouping.ts +11 -3
  33. package/src/core/labels.ts +4 -3
  34. package/src/core/persistence.ts +9 -1
  35. package/src/core/urlState.ts +439 -0
  36. package/src/core/valueText.ts +46 -0
  37. package/src/index.ts +13 -0
  38. package/src/useTMDataGrid.tsx +50 -7
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { BoxProps, MantineSize, MenuProps } from "@mantine/core";
2
2
  import { CSSProperties, ComponentType, MouseEvent, MutableRefObject, ReactNode } from "react";
3
- import { AccessorFn, AccessorFnColumnDef, AccessorKeyColumnDef, Cell, Column, ColumnFiltersState, ColumnHelper, ColumnPinningState, DeepKeys, DeepValue, DisplayColumnDef, ExpandedState, FilterMeta, GroupColumnDef, Header, IdentifiedColumnDef, Row, RowData, RowSelectionState, Table, TableFeatures, TableOptions, TableState, aggregationFns } from "@tanstack/react-table";
3
+ import { AccessorFn, AccessorFnColumnDef, AccessorKeyColumnDef, Cell, Column, ColumnDef, ColumnFiltersState, ColumnHelper, ColumnPinningState, DeepKeys, DeepValue, DisplayColumnDef, ExpandedState, FilterMeta, GroupColumnDef, Header, IdentifiedColumnDef, Row, RowData, RowSelectionState, Table, TableFeatures, TableOptions, TableState, aggregationFns } from "@tanstack/react-table";
4
4
  import { Store } from "@tanstack/store";
5
5
  import { AnyFieldApi, AnyFormApi, StandardSchemaV1 } from "@tanstack/react-form";
6
6
  import { RankingInfo } from "@tanstack/match-sorter-utils";
@@ -815,7 +815,7 @@ type TMDataGridLabels = {
815
815
  filterTo: string;
816
816
  /** `DgTriStateFilter`'s no-filter segment. */
817
817
  filterAll: string;
818
- /** What a boolean column's `true` reads as - its filter choice and cell text. */
818
+ /** What a boolean `true` reads as - its filter choice, filter pill and group row. */
819
819
  booleanTrue: string;
820
820
  booleanFalse: string;
821
821
  addFilter: string;
@@ -1465,6 +1465,209 @@ type ResolveRangeBoundsArgs = {
1465
1465
  */
1466
1466
  declare function resolveRangeBounds({ range, rowIndexOf, columnIndexOf }: ResolveRangeBoundsArgs): TMDataGridRangeBounds | null;
1467
1467
  //#endregion
1468
+ //#region .types-tmp/core/urlState.d.ts
1469
+ /**
1470
+ * Typed deep links.
1471
+ *
1472
+ * `createTMDataGridColumnHelper` returns columns that carry, in their type
1473
+ * only, what a link needs to know about them: the id, the `meta.type`, the
1474
+ * value type, the offered operators, and whether the column can be filtered,
1475
+ * sorted and put in the URL. `createTMDataGridUrlState` reads that from the
1476
+ * grid's own columns, so a link can name only what the grid can show: a
1477
+ * filter on a column the grid lacks, an operator its type does not offer or a
1478
+ * value of the wrong type is a compile error, not a link that silently opens
1479
+ * unfiltered.
1480
+ *
1481
+ * Nothing here is visible at runtime except the definition object. The
1482
+ * column brand is a type, never a property.
1483
+ */
1484
+ /**
1485
+ * What a column built with `createTMDataGridColumnHelper` tells a typed link
1486
+ * about itself. Read from literal values in the column definition: a value
1487
+ * that is not a literal (`enableSorting: isAdmin`) reads as "not allowed".
1488
+ */
1489
+ type TMDataGridColumnInfo = {
1490
+ /** The column id, by TanStack's rule: `id`, else the accessor key with `.` replaced by `_`. */
1491
+ id: string;
1492
+ /** `meta.type`, `"string"` when unset. */
1493
+ type: TMDataGridColumnType;
1494
+ /** The value type the accessor returns. */
1495
+ value: unknown;
1496
+ /** `meta.filter.operators`, every operator when unset. */
1497
+ operators: TMDataGridFilterOperator;
1498
+ /** `enableColumnFilter` is not `false`. */
1499
+ filterable: boolean;
1500
+ /** `enableSorting` is not `false`. */
1501
+ sortable: boolean;
1502
+ /** `meta.filter.url` is not `false`. */
1503
+ url: boolean;
1504
+ };
1505
+ declare const columnInfo: unique symbol;
1506
+ /**
1507
+ * The type-only brand a column helper column carries. Never present at
1508
+ * runtime, so spreading, cloning or serializing a column is unaffected.
1509
+ */
1510
+ type TMDataGridTypedColumn<TInfo extends TMDataGridColumnInfo> = {
1511
+ readonly [columnInfo]: TInfo;
1512
+ };
1513
+ /** The info of every leaf column in `TColumn`, a group's children included. */
1514
+ type TMDataGridColumnInfoOf<TColumn> = TColumn extends TMDataGridTypedColumn<infer TInfo> ? TInfo : never;
1515
+ /** `"address.city"` becomes `"address_city"`, as TanStack derives the id. */
1516
+ type DotsToUnderscores<S extends string> = S extends `${infer Head}.${infer Tail}` ? `${Head}_${DotsToUnderscores<Tail>}` : S;
1517
+ /**
1518
+ * The column id the helper's `accessor` call produces: the explicit `id`,
1519
+ * else the accessor key. An accessor function without an `id` gets `never`,
1520
+ * which no link can name.
1521
+ */
1522
+ type TMDataGridAccessorColumnId<TAccessor, TId extends string> = [TId] extends [never] ? TAccessor extends string ? DotsToUnderscores<TAccessor> : never : TId;
1523
+ /**
1524
+ * The column options whose literal values a typed link reads. Intersected into
1525
+ * the column helper's parameter so each one is inferred as a literal.
1526
+ *
1527
+ * @internal
1528
+ */
1529
+ type TMDataGridColumnInfoHints<TId extends string, TType extends TMDataGridColumnType, TOperator extends TMDataGridFilterOperator, TFilterable extends boolean, TSortable extends boolean, TUrl extends boolean> = {
1530
+ id?: TId;
1531
+ enableColumnFilter?: TFilterable;
1532
+ enableSorting?: TSortable;
1533
+ meta?: {
1534
+ type?: TType;
1535
+ filter?: {
1536
+ operators?: ReadonlyArray<TOperator>;
1537
+ url?: TUrl;
1538
+ };
1539
+ };
1540
+ };
1541
+ /** A `Date`, or an ISO `YYYY-MM-DD` string. */
1542
+ type TMDataGridDateInput = Date | string;
1543
+ /** One choice of a select column: the value, or an element of an array value. */
1544
+ type OptionOf<TValue> = NonNullable<TValue> extends ReadonlyArray<infer TElement> ? TElement : NonNullable<TValue>;
1545
+ type ScalarInput = {
1546
+ string: string;
1547
+ number: number;
1548
+ date: TMDataGridDateInput;
1549
+ boolean: boolean;
1550
+ select: string;
1551
+ multiSelect: string;
1552
+ };
1553
+ type RangeEnd<TType extends TMDataGridColumnType> = TType extends "date" ? TMDataGridDateInput : TType extends "number" ? number : string;
1554
+ /** One filter on one column: an operator, and the value that operator takes. */
1555
+ type FilterInputFor<TType extends TMDataGridColumnType, TValue, TOperator extends TMDataGridFilterOperator> = TOperator extends "isEmpty" | "isNotEmpty" ? {
1556
+ operator: TOperator;
1557
+ } : TOperator extends "isAnyOf" | "isNoneOf" ? {
1558
+ operator: TOperator;
1559
+ value: ReadonlyArray<OptionOf<TValue>>;
1560
+ } : TOperator extends "between" ? {
1561
+ operator: TOperator;
1562
+ /** `null` leaves that end open. */
1563
+ value: readonly [from: RangeEnd<TType> | null, to: RangeEnd<TType> | null];
1564
+ } : {
1565
+ operator: TOperator;
1566
+ value: ScalarInput[TType];
1567
+ };
1568
+ /** Columns a link may filter: filterable, and not kept out of the URL. */
1569
+ type LinkFilterable<TInfo extends TMDataGridColumnInfo> = Extract<TInfo, {
1570
+ filterable: true;
1571
+ url: true;
1572
+ }>;
1573
+ /**
1574
+ * The `filters` a link accepts: one optional entry per filterable column.
1575
+ * With no filterable column it accepts no entry at all - an empty object type
1576
+ * would let any key through, since TypeScript skips the unknown-key check
1577
+ * against `{}`.
1578
+ */
1579
+ type TMDataGridUrlFiltersInput<TInfo extends TMDataGridColumnInfo> = [LinkFilterable<TInfo>] extends [never] ? Record<string, never> : { [TColumn in LinkFilterable<TInfo> as TColumn["id"]]?: FilterInputFor<TColumn["type"], TColumn["value"], Extract<OperatorsByColumnType[TColumn["type"]], TColumn["operators"]>>; };
1580
+ /** The ids a link may sort by. */
1581
+ type TMDataGridUrlSortableId<TInfo extends TMDataGridColumnInfo> = Extract<TInfo, {
1582
+ sortable: true;
1583
+ }>["id"];
1584
+ type Carries<TSlices extends ReadonlyArray<TMDataGridDataSlice>, TSlice extends TMDataGridDataSlice> = TSlice extends TSlices[number] ? true : false;
1585
+ /** What a link may set: only the slices the definition carries, only the grid's columns. */
1586
+ type TMDataGridUrlInput<TInfo extends TMDataGridColumnInfo, TSlices extends ReadonlyArray<TMDataGridDataSlice>> = (Carries<TSlices, "columnFilters"> extends true ? {
1587
+ filters?: TMDataGridUrlFiltersInput<TInfo>;
1588
+ } : unknown) & (Carries<TSlices, "globalFilter"> extends true ? {
1589
+ globalFilter?: string;
1590
+ } : unknown) & (Carries<TSlices, "sorting"> extends true ? {
1591
+ sorting?: ReadonlyArray<{
1592
+ id: TMDataGridUrlSortableId<TInfo>;
1593
+ /** Defaults to `false`. */
1594
+ desc?: boolean;
1595
+ }>;
1596
+ } : unknown) & (Carries<TSlices, "pagination"> extends true ? {
1597
+ pagination?: {
1598
+ pageIndex: number;
1599
+ pageSize: number;
1600
+ };
1601
+ } : unknown);
1602
+ /** What the grid keeps in its URL param: the data slices, in the grid's own state shape. */
1603
+ type TMDataGridUrlPayload = {
1604
+ columnFilters?: Array<TMDataGridColumnFilter>;
1605
+ /** `null` is a search the user cleared, as opposed to one the link does not set. */
1606
+ globalFilter?: string | null;
1607
+ sorting?: Array<{
1608
+ id: string;
1609
+ desc: boolean;
1610
+ }>;
1611
+ pagination?: {
1612
+ pageIndex: number;
1613
+ pageSize: number;
1614
+ };
1615
+ expanded?: true | Record<string, boolean>;
1616
+ };
1617
+ /**
1618
+ * A router's search, read and written as values rather than strings, for
1619
+ * routers that keep objects in their search params and encode them
1620
+ * themselves, such as TanStack Router.
1621
+ */
1622
+ type TMDataGridUrlSearchStorage = {
1623
+ /** The param's current value in the router's search, or `undefined`. */
1624
+ get(name: string): unknown;
1625
+ /** Sets the param to `value`, or removes it on `undefined`. */
1626
+ set(name: string, value: TMDataGridUrlPayload | undefined): void;
1627
+ };
1628
+ type TMDataGridUrlState<TKey extends string, TSlices extends ReadonlyArray<TMDataGridDataSlice>, TInfo extends TMDataGridColumnInfo> = {
1629
+ /** The URL search param. */
1630
+ readonly key: TKey;
1631
+ /** The data slices the param carries. */
1632
+ readonly slices: TSlices;
1633
+ /** For `persist.urlKey`. */
1634
+ readonly urlKey: TMDataGridPersistKey<TMDataGridDataSlice>;
1635
+ /** The param's value for a link, or `undefined` when the input sets nothing. */
1636
+ payload(input: TMDataGridUrlInput<TInfo, TSlices>): TMDataGridUrlPayload | undefined;
1637
+ /** The search object for a router link, `{ [key]: payload }`. */
1638
+ search(input: TMDataGridUrlInput<TInfo, TSlices>): { [K in TKey]: TMDataGridUrlPayload | undefined; };
1639
+ /**
1640
+ * The search params for a plain link, encoded the way the grid's default
1641
+ * `serialize` encodes them. Pass the `serialize` you gave `persist`, if any.
1642
+ */
1643
+ searchParams(input: TMDataGridUrlInput<TInfo, TSlices>, options?: {
1644
+ serialize?: (payload: TMDataGridUrlPayload) => string;
1645
+ }): URLSearchParams;
1646
+ /**
1647
+ * A route search validator: keeps the param when it is an object and drops
1648
+ * anything else. The grid checks every slice itself when it reads the param.
1649
+ */
1650
+ validateSearch(search: Record<string, unknown>): { [K in TKey]?: TMDataGridUrlPayload; };
1651
+ /**
1652
+ * `urlKey`, plus a `urlStorage` over `storage` when one is given. Without
1653
+ * one, the grid reads and writes the browser's URL itself.
1654
+ */
1655
+ persist(storage?: TMDataGridUrlSearchStorage): Pick<TMDataGridPersistence, "urlKey" | "urlStorage">;
1656
+ };
1657
+ /**
1658
+ * Defines a grid's deep links from its columns. `columns` is the array the
1659
+ * grid renders, built with `createTMDataGridColumnHelper`; it decides which
1660
+ * filters, operators, values and sorts a link may name.
1661
+ */
1662
+ declare function createTMDataGridUrlState<const TKey extends string, TColumns extends ReadonlyArray<unknown>, const TSlices extends ReadonlyArray<TMDataGridDataSlice> = typeof DATA_STATE_SLICES>(options: {
1663
+ /** The URL search param. */
1664
+ key: TKey;
1665
+ /** The grid's columns. */
1666
+ columns: TColumns;
1667
+ /** The data slices the param carries. Defaults to every data slice. */
1668
+ slices?: TSlices;
1669
+ }): TMDataGridUrlState<TKey, TSlices, TMDataGridColumnInfoOf<TColumns[number]>>;
1670
+ //#endregion
1468
1671
  //#region .types-tmp/core/export.d.ts
1469
1672
  type ErasedRow = Row<TMDataGridFeatures, TMDataGridRowData>;
1470
1673
  type ErasedColumn = Column<TMDataGridFeatures, TMDataGridRowData, unknown>;
@@ -1955,12 +2158,30 @@ type WithRowTypedMeta<TDef, TData extends RowData> = TDef extends unknown ? Omit
1955
2158
  * TanStack's column helper with `meta` typed against `TData`, so the
1956
2159
  * `meta.options` and `meta.edit.enabled` callbacks receive
1957
2160
  * `Row<TMDataGridFeatures, TData>`.
2161
+ *
2162
+ * Every column it returns also carries `TMDataGridColumnInfo` in its type,
2163
+ * read from the literal values of `id`, `meta.type`,
2164
+ * `meta.filter.operators`, `meta.filter.url`, `enableColumnFilter` and
2165
+ * `enableSorting`. `createTMDataGridUrlState` reads it to type the links into
2166
+ * the grid. TanStack's own return type keeps none of this: it types
2167
+ * `accessorKey` as a plain string.
1958
2168
  */
1959
2169
  type TMDataGridColumnHelper<TData extends RowData> = {
1960
- accessor: <TAccessor extends AccessorFn<TData> | DeepKeys<TData>, TValue extends TAccessor extends AccessorFn<TData, infer TReturn> ? TReturn : TAccessor extends DeepKeys<TData> ? DeepValue<TData, TAccessor> : never>(accessor: TAccessor, column: WithRowTypedMeta<TAccessor extends AccessorFn<TData> ? DisplayColumnDef<TMDataGridFeatures, TData, TValue> : IdentifiedColumnDef<TMDataGridFeatures, TData, TValue>, TData>) => TAccessor extends AccessorFn<TData> ? AccessorFnColumnDef<TMDataGridFeatures, TData, TValue> : AccessorKeyColumnDef<TMDataGridFeatures, TData, TValue>;
2170
+ accessor: <TAccessor extends AccessorFn<TData> | DeepKeys<TData>, TValue extends TAccessor extends AccessorFn<TData, infer TReturn> ? TReturn : TAccessor extends DeepKeys<TData> ? DeepValue<TData, TAccessor> : never, const TId extends string = never, TType extends TMDataGridColumnType = "string", TOperator extends TMDataGridFilterOperator = TMDataGridFilterOperator, TFilterable extends boolean = true, TSortable extends boolean = true, TUrl extends boolean = true>(accessor: TAccessor, column: WithRowTypedMeta<TAccessor extends AccessorFn<TData> ? DisplayColumnDef<TMDataGridFeatures, TData, TValue> : IdentifiedColumnDef<TMDataGridFeatures, TData, TValue>, TData> & TMDataGridColumnInfoHints<TId, TType, TOperator, TFilterable, TSortable, TUrl>) => (TAccessor extends AccessorFn<TData> ? AccessorFnColumnDef<TMDataGridFeatures, TData, TValue> : AccessorKeyColumnDef<TMDataGridFeatures, TData, TValue>) & TMDataGridTypedColumn<{
2171
+ id: TMDataGridAccessorColumnId<TAccessor, TId>;
2172
+ type: TType;
2173
+ value: TValue;
2174
+ operators: TOperator;
2175
+ filterable: TFilterable;
2176
+ sortable: TSortable;
2177
+ url: TUrl;
2178
+ }>;
1961
2179
  columns: ColumnHelper<TMDataGridFeatures, TData>["columns"];
1962
2180
  display: (column: WithRowTypedMeta<DisplayColumnDef<TMDataGridFeatures, TData>, TData>) => DisplayColumnDef<TMDataGridFeatures, TData, unknown>;
1963
- group: (column: WithRowTypedMeta<GroupColumnDef<TMDataGridFeatures, TData, unknown>, TData>) => GroupColumnDef<TMDataGridFeatures, TData, unknown>;
2181
+ /** A header group. Carries the column info of every column under it. */
2182
+ group: <const TChildren extends ReadonlyArray<ColumnDef<TMDataGridFeatures, TData, any>>>(column: WithRowTypedMeta<Omit<GroupColumnDef<TMDataGridFeatures, TData, unknown>, "columns">, TData> & {
2183
+ columns: TChildren;
2184
+ }) => GroupColumnDef<TMDataGridFeatures, TData, unknown> & TMDataGridTypedColumn<TMDataGridColumnInfoOf<TChildren[number]>>;
1964
2185
  };
1965
2186
  declare function createTMDataGridColumnHelper<TData extends RowData>(): TMDataGridColumnHelper<TData>;
1966
2187
  /** What the `renderDetails` render prop is handed for an expanded row. */
@@ -2671,6 +2892,22 @@ type TMDataGridFilterValue = {
2671
2892
  type TMDataGridColumnType = "string" | "number" | "boolean" | "date" | "select" | "multiSelect";
2672
2893
  type TMDataGridFilterOperator = "contains" | "equals" | "notEquals" | "startsWith" | "endsWith" | "greaterThan" | "greaterThanOrEqual" | "lessThan" | "lessThanOrEqual" | "between" | "before" | "after" | "onOrBefore" | "onOrAfter" | "isAnyOf" | "isNoneOf" | "isEmpty" | "isNotEmpty";
2673
2894
  declare const FILTER_OPERATOR_LABELS: Record<TMDataGridFilterOperator, string>;
2895
+ declare const OPERATORS_BY_TYPE: {
2896
+ readonly string: readonly ["contains", "equals", "notEquals", "startsWith", "endsWith", "isEmpty", "isNotEmpty"];
2897
+ readonly number: readonly ["equals", "notEquals", "greaterThan", "greaterThanOrEqual", "lessThan", "lessThanOrEqual", "between", "isEmpty", "isNotEmpty"];
2898
+ readonly boolean: readonly ["equals", "notEquals", "isEmpty", "isNotEmpty"];
2899
+ readonly date: readonly ["equals", "notEquals", "before", "after", "onOrBefore", "onOrAfter", "between", "isEmpty", "isNotEmpty"];
2900
+ readonly select: readonly ["isAnyOf", "isNoneOf", "isEmpty", "isNotEmpty"];
2901
+ readonly multiSelect: readonly ["isAnyOf", "isNoneOf", "isEmpty", "isNotEmpty"];
2902
+ };
2903
+ /**
2904
+ * The operators each column type offers, as a type: the same lists the filter
2905
+ * panel offers, so a typed link can never name an operator the panel lacks.
2906
+ *
2907
+ * @internal Feeds the typed links in urlState.ts; not exported from the
2908
+ * package.
2909
+ */
2910
+ type OperatorsByColumnType = { [TType in TMDataGridColumnType]: (typeof OPERATORS_BY_TYPE)[TType][number]; };
2674
2911
  declare function getOperatorsForType(type: TMDataGridColumnType): readonly TMDataGridFilterOperator[];
2675
2912
  declare function operatorNeedsValue(operator: TMDataGridFilterOperator): boolean;
2676
2913
  /** Whether the operator's value is a string array - `isAnyOf` / `isNoneOf`. */
@@ -2726,14 +2963,19 @@ declare function activeColumnFilters<TData extends RowData>(source: TMDataGridTa
2726
2963
  *
2727
2964
  * The type's default operator is left implicit - "First name: Sofia" reads the
2728
2965
  * way a person would say it - while any other operator is spelled out, since
2729
- * that is the part a reader cannot guess.
2966
+ * that is the part a reader cannot guess. A value with an option reads as the
2967
+ * option's label, and a boolean as `labels.booleanTrue` / `booleanFalse`.
2730
2968
  */
2731
- declare function formatFilterLabel({ label, type, filter, operatorLabels }: {
2969
+ declare function formatFilterLabel({ label, type, filter, operatorLabels, options, labels }: {
2732
2970
  label: string;
2733
2971
  type: TMDataGridColumnType;
2734
2972
  filter: TMDataGridFilterValue;
2735
2973
  /** Localized operator names - `labels.operators`. Defaults to English. */
2736
2974
  operatorLabels?: Record<TMDataGridFilterOperator, string>;
2975
+ /** The column's options, so a value reads as its option's label. */
2976
+ options?: ReadonlyArray<TMDataGridOption>;
2977
+ /** What a boolean value reads as. Defaults to English. */
2978
+ labels?: Pick<TMDataGridLabels, "booleanTrue" | "booleanFalse">;
2737
2979
  }): string;
2738
2980
  declare function matchesFilter(cellValue: unknown, { operator, value }: TMDataGridFilterValue): boolean;
2739
2981
  /**
@@ -3626,6 +3868,16 @@ declare const ROW_NUMBER_COLUMN_ID = "__rowNumber__";
3626
3868
  //#region .types-tmp/components/TMDataGridGroupColumn.d.ts
3627
3869
  declare const GROUP_COLUMN_ID = "__group__";
3628
3870
  //#endregion
3871
+ //#region .types-tmp/core/valueText.d.ts
3872
+ type TMDataGridValueTextOptions = {
3873
+ /** The column's `meta.type`. A `boolean` column's `"true"` / `"false"` filter strings read as booleans. */
3874
+ type?: TMDataGridColumnType;
3875
+ /** The column's resolved options: a value with an option reads as its label. */
3876
+ options?: ReadonlyArray<TMDataGridOption>;
3877
+ /** What `true` and `false` read as. Defaults to English. */
3878
+ labels?: Pick<TMDataGridLabels, "booleanTrue" | "booleanFalse">;
3879
+ };
3880
+ //#endregion
3629
3881
  //#region .types-tmp/core/grouping.d.ts
3630
3882
  /**
3631
3883
  * The data rows under a group row, at any depth.
@@ -3646,8 +3898,10 @@ declare function getGroupDataRows<TData extends RowData>(row: Row<TMDataGridFeat
3646
3898
  * Deliberately not the grouped column's own `cell` renderer: that renderer is
3647
3899
  * written for a data row and is free to reach into `row.original`, which on a
3648
3900
  * group row is the first leaf's record rather than anything about the group.
3901
+ * `options` carries what the chrome knows of the column instead - its type,
3902
+ * its option labels and the boolean labels.
3649
3903
  */
3650
- declare function formatGroupValue(value: unknown, blankLabel?: string): string;
3904
+ declare function formatGroupValue(value: unknown, blankLabel?: string, options?: TMDataGridValueTextOptions): string;
3651
3905
  //#endregion
3652
3906
  //#region .types-tmp/useTMDataGridExport.d.ts
3653
3907
  /** What {@link useTMDataGridExport} returns. */
@@ -4040,4 +4294,4 @@ declare function getSelectableRowIds<TData extends RowData>(row: Row<TMDataGridF
4040
4294
  */
4041
4295
  declare function resolveRowSelectionClick<TData extends RowData>({ rows, rowId, anchorRowId, modifiers, selection, canReplaceSelection }: ResolveRowSelectionClickArgs<TData>): ResolvedRowSelection;
4042
4296
  //#endregion
4043
- export { type BuildExportDataArgs, type ColumnStepArgs, DATA_STATE_SLICES, DEFAULT_EXPORT_OPTIONS, DEFAULT_TMDATAGRID_SIZE, DETAILS_COLUMN_ID, DgAutocompleteFilter, DgDateRangeFilter, DgRangeSliderFilter, DgTriStateFilter, EDIT_COLUMN_ID, type ExportGridArgs, FILTER_OPERATOR_LABELS, GROUP_COLUMN_ID, type MoveColumnArgs, PERSIST_PAYLOAD_VERSION, ROW_NUMBER_COLUMN_ID, type ResolveRangeBoundsArgs, type ResolveRowSelectionClickArgs, type ResolvedRowSelection, SELECT_COLUMN_ID, SETTINGS_STATE_SLICES, SIZE_CONTROL_SIZE, SIZE_ROW_HEIGHT, TMDATAGRID_LABELS_EN, TMDATAGRID_LABELS_SV, TMDataGrid, type TMDataGridAddRowsOptions, type TMDataGridAddRowsResult, type TMDataGridAggregationName, type TMDataGridApi, TMDataGridBooleanEditor, type TMDataGridCapabilities, type TMDataGridCellEventArgs, type TMDataGridCellPosition, type TMDataGridCellRange, type TMDataGridCellSelectionMode, type TMDataGridClipboardTextOptions, type TMDataGridColSpanArgs, type TMDataGridColumnCapabilities, type TMDataGridColumnEditOptions, type TMDataGridColumnFilter, type TMDataGridColumnFilterOptions, type TMDataGridColumnHelper, type TMDataGridColumnMenuItemsArgs, type TMDataGridColumnMenuItemsRenderer, type TMDataGridColumnMeta, type TMDataGridColumnRegion, type TMDataGridColumnSearchable, type TMDataGridColumnType, type TMDataGridColumnsPanelProps, type TMDataGridCommitAllResult, type TMDataGridContextValue, type TMDataGridCsvFormatOptions, type TMDataGridDataSlice, TMDataGridDateEditor, type TMDataGridDetailsArgs, type TMDataGridDetailsRenderer, TMDataGridDraftActions, type TMDataGridDraftActionsActions, type TMDataGridDraftActionsControls, type TMDataGridDraftActionsProps, type TMDataGridDraftActionsSlotArgs, type TMDataGridDraftActionsState, type TMDataGridDropSide, type TMDataGridEditApi, type TMDataGridEditChange, type TMDataGridEditCommitArgs, type TMDataGridEditField, type TMDataGridEditMode, type TMDataGridEditRowProjection, type TMDataGridEditRowSnapshot, type TMDataGridEditState, type TMDataGridEditValueMap, type TMDataGridEditValueMapArgs, type TMDataGridEditingOptions, type TMDataGridEditorArgs, type TMDataGridEditorComponent, type TMDataGridExpandAllArgs, type TMDataGridExpandTarget, type TMDataGridExportApi, type TMDataGridExportColumns, type TMDataGridExportData, type TMDataGridExportFormat, type TMDataGridExportOptions, type TMDataGridExportPickerRequest, type TMDataGridExportRows, type TMDataGridExportSettings, type TMDataGridExportValueGetter, type TMDataGridExportWriteOptions, type TMDataGridFeatureFlags, type TMDataGridFeatures, type TMDataGridFieldValidate, type TMDataGridFilterControlArgs, type TMDataGridFilterControlComponent, type TMDataGridFilterControlLayout, type TMDataGridFilterFn, type TMDataGridFilterOperator, type TMDataGridFilterPanelLayout, type TMDataGridFilterPanelProps, TMDataGridFilterPills, type TMDataGridFilterPillsProps, type TMDataGridFilterSidebarSide, type TMDataGridFilterSurface, type TMDataGridFilterValue, TMDataGridFilterValueInput, type TMDataGridFilterValueShape, type TMDataGridFiltersOptions, type TMDataGridFiltersSettings, type TMDataGridFooterProps, type TMDataGridJsonFormatOptions, type TMDataGridLabels, type TMDataGridLabelsOverride, type TMDataGridMenuColumnsProps, type TMDataGridMenuExportProps, type TMDataGridMenuProps, TMDataGridMultiSelectEditor, TMDataGridNumberEditor, type TMDataGridOption, type TMDataGridOptionsArgs, type TMDataGridOptionsSource, type TMDataGridPaginationActions, type TMDataGridPaginationApi, type TMDataGridPaginationControls, type TMDataGridPaginationSlotArgs, type TMDataGridPaginationState, type TMDataGridPersistKey, type TMDataGridPersistence, type TMDataGridProps, type TMDataGridQuickSearchMode, type TMDataGridRangeBounds, type TMDataGridRowAddArgs, type TMDataGridRowClickModifiers, type TMDataGridRowContextMenuArgs, type TMDataGridRowContextMenuRenderer, type TMDataGridRowData, type TMDataGridRowDeleteArgs, type TMDataGridRowEditForm, type TMDataGridRowStyle, type TMDataGridRowValidators, type TMDataGridSaveDraftsArgs, type TMDataGridSaveDraftsResponse, type TMDataGridSaveDraftsResult, type TMDataGridSaveOutcomes, type TMDataGridScrollAlign, type TMDataGridScrollToRowArgs, TMDataGridSearch, type TMDataGridSearchProps, TMDataGridSelectEditor, type TMDataGridSelectionMode, type TMDataGridSettingsSlice, type TMDataGridSize, type TMDataGridStorageMode, TMDataGridStringEditor, type TMDataGridTable, type TMDataGridTableMeta, type TMDataGridTableProps, type TMDataGridTableValidateArgs, type TMDataGridTableValidators, type TMDataGridToolbarProps, type TMDataGridTsvFormatOptions, type TMDataGridUiActions, type TMDataGridUiState, type TMDataGridUiStore, type TMDataGridUrlStorage, type UseTMDataGridOptions, activeColumnFilters, aggregateColumn, areAllRowsExpanded, autosizeColumn, buildExportData, clearedValueForType, countSelectedExportRows, createTMDataGridColumnHelper, csvExcelFormat, csvFormat, downloadFile, emptyValueForOperator, exportGrid, filterValueShape, formatExportValue, formatFilterLabel, formatGroupValue, fuzzyGlobalFilterFn, getColumnCapabilities, getColumnDefaultOperator, getColumnLabel, getColumnOperators, getColumnRegion, getColumnType, getDisplayedRows, getEditFieldName, getExportableColumns, getGridCapabilities, getGroupDataRows, getOperatorsForType, getSelectableRowIds, getStepTargetColumn, getTMDataGridPaginationApi, guardFormula, hasPendingEdits, isControlColumn, isFilterActive, isGeneratedColumn, isPagingActive, jsonFormat, keepGeneratedColumnsOutermost, matchesFilter, mergeLabels, moveColumn, moveColumnByStep, normalizeFieldValidate, openColumnFilter, operatorNeedsValue, operatorTakesArrayValue, operatorTakesRangeValue, optionsToComboboxData, readFeatureFlags, resolveColumnOptions, resolveExpandAll, resolveExportOptions, resolveRangeBounds, resolveRowSelectionClick, tmDataGridFilterFn, toClipboardText, tsvFormat, useTMDataGrid, useTMDataGridContext, useTMDataGridExport, writeClipboardText, writeExportFile };
4297
+ export { type BuildExportDataArgs, type ColumnStepArgs, DATA_STATE_SLICES, DEFAULT_EXPORT_OPTIONS, DEFAULT_TMDATAGRID_SIZE, DETAILS_COLUMN_ID, DgAutocompleteFilter, DgDateRangeFilter, DgRangeSliderFilter, DgTriStateFilter, EDIT_COLUMN_ID, type ExportGridArgs, FILTER_OPERATOR_LABELS, GROUP_COLUMN_ID, type MoveColumnArgs, PERSIST_PAYLOAD_VERSION, ROW_NUMBER_COLUMN_ID, type ResolveRangeBoundsArgs, type ResolveRowSelectionClickArgs, type ResolvedRowSelection, SELECT_COLUMN_ID, SETTINGS_STATE_SLICES, SIZE_CONTROL_SIZE, SIZE_ROW_HEIGHT, TMDATAGRID_LABELS_EN, TMDATAGRID_LABELS_SV, TMDataGrid, type TMDataGridAddRowsOptions, type TMDataGridAddRowsResult, type TMDataGridAggregationName, type TMDataGridApi, TMDataGridBooleanEditor, type TMDataGridCapabilities, type TMDataGridCellEventArgs, type TMDataGridCellPosition, type TMDataGridCellRange, type TMDataGridCellSelectionMode, type TMDataGridClipboardTextOptions, type TMDataGridColSpanArgs, type TMDataGridColumnCapabilities, type TMDataGridColumnEditOptions, type TMDataGridColumnFilter, type TMDataGridColumnFilterOptions, type TMDataGridColumnHelper, type TMDataGridColumnInfo, type TMDataGridColumnInfoOf, type TMDataGridColumnMenuItemsArgs, type TMDataGridColumnMenuItemsRenderer, type TMDataGridColumnMeta, type TMDataGridColumnRegion, type TMDataGridColumnSearchable, type TMDataGridColumnType, type TMDataGridColumnsPanelProps, type TMDataGridCommitAllResult, type TMDataGridContextValue, type TMDataGridCsvFormatOptions, type TMDataGridDataSlice, TMDataGridDateEditor, type TMDataGridDateInput, type TMDataGridDetailsArgs, type TMDataGridDetailsRenderer, TMDataGridDraftActions, type TMDataGridDraftActionsActions, type TMDataGridDraftActionsControls, type TMDataGridDraftActionsProps, type TMDataGridDraftActionsSlotArgs, type TMDataGridDraftActionsState, type TMDataGridDropSide, type TMDataGridEditApi, type TMDataGridEditChange, type TMDataGridEditCommitArgs, type TMDataGridEditField, type TMDataGridEditMode, type TMDataGridEditRowProjection, type TMDataGridEditRowSnapshot, type TMDataGridEditState, type TMDataGridEditValueMap, type TMDataGridEditValueMapArgs, type TMDataGridEditingOptions, type TMDataGridEditorArgs, type TMDataGridEditorComponent, type TMDataGridExpandAllArgs, type TMDataGridExpandTarget, type TMDataGridExportApi, type TMDataGridExportColumns, type TMDataGridExportData, type TMDataGridExportFormat, type TMDataGridExportOptions, type TMDataGridExportPickerRequest, type TMDataGridExportRows, type TMDataGridExportSettings, type TMDataGridExportValueGetter, type TMDataGridExportWriteOptions, type TMDataGridFeatureFlags, type TMDataGridFeatures, type TMDataGridFieldValidate, type TMDataGridFilterControlArgs, type TMDataGridFilterControlComponent, type TMDataGridFilterControlLayout, type TMDataGridFilterFn, type TMDataGridFilterOperator, type TMDataGridFilterPanelLayout, type TMDataGridFilterPanelProps, TMDataGridFilterPills, type TMDataGridFilterPillsProps, type TMDataGridFilterSidebarSide, type TMDataGridFilterSurface, type TMDataGridFilterValue, TMDataGridFilterValueInput, type TMDataGridFilterValueShape, type TMDataGridFiltersOptions, type TMDataGridFiltersSettings, type TMDataGridFooterProps, type TMDataGridJsonFormatOptions, type TMDataGridLabels, type TMDataGridLabelsOverride, type TMDataGridMenuColumnsProps, type TMDataGridMenuExportProps, type TMDataGridMenuProps, TMDataGridMultiSelectEditor, TMDataGridNumberEditor, type TMDataGridOption, type TMDataGridOptionsArgs, type TMDataGridOptionsSource, type TMDataGridPaginationActions, type TMDataGridPaginationApi, type TMDataGridPaginationControls, type TMDataGridPaginationSlotArgs, type TMDataGridPaginationState, type TMDataGridPersistKey, type TMDataGridPersistence, type TMDataGridProps, type TMDataGridQuickSearchMode, type TMDataGridRangeBounds, type TMDataGridRowAddArgs, type TMDataGridRowClickModifiers, type TMDataGridRowContextMenuArgs, type TMDataGridRowContextMenuRenderer, type TMDataGridRowData, type TMDataGridRowDeleteArgs, type TMDataGridRowEditForm, type TMDataGridRowStyle, type TMDataGridRowValidators, type TMDataGridSaveDraftsArgs, type TMDataGridSaveDraftsResponse, type TMDataGridSaveDraftsResult, type TMDataGridSaveOutcomes, type TMDataGridScrollAlign, type TMDataGridScrollToRowArgs, TMDataGridSearch, type TMDataGridSearchProps, TMDataGridSelectEditor, type TMDataGridSelectionMode, type TMDataGridSettingsSlice, type TMDataGridSize, type TMDataGridStorageMode, TMDataGridStringEditor, type TMDataGridTable, type TMDataGridTableMeta, type TMDataGridTableProps, type TMDataGridTableValidateArgs, type TMDataGridTableValidators, type TMDataGridToolbarProps, type TMDataGridTsvFormatOptions, type TMDataGridTypedColumn, type TMDataGridUiActions, type TMDataGridUiState, type TMDataGridUiStore, type TMDataGridUrlFiltersInput, type TMDataGridUrlInput, type TMDataGridUrlPayload, type TMDataGridUrlSearchStorage, type TMDataGridUrlSortableId, type TMDataGridUrlState, type TMDataGridUrlStorage, type UseTMDataGridOptions, activeColumnFilters, aggregateColumn, areAllRowsExpanded, autosizeColumn, buildExportData, clearedValueForType, countSelectedExportRows, createTMDataGridColumnHelper, createTMDataGridUrlState, csvExcelFormat, csvFormat, downloadFile, emptyValueForOperator, exportGrid, filterValueShape, formatExportValue, formatFilterLabel, formatGroupValue, fuzzyGlobalFilterFn, getColumnCapabilities, getColumnDefaultOperator, getColumnLabel, getColumnOperators, getColumnRegion, getColumnType, getDisplayedRows, getEditFieldName, getExportableColumns, getGridCapabilities, getGroupDataRows, getOperatorsForType, getSelectableRowIds, getStepTargetColumn, getTMDataGridPaginationApi, guardFormula, hasPendingEdits, isControlColumn, isFilterActive, isGeneratedColumn, isPagingActive, jsonFormat, keepGeneratedColumnsOutermost, matchesFilter, mergeLabels, moveColumn, moveColumnByStep, normalizeFieldValidate, openColumnFilter, operatorNeedsValue, operatorTakesArrayValue, operatorTakesRangeValue, optionsToComboboxData, readFeatureFlags, resolveColumnOptions, resolveExpandAll, resolveExportOptions, resolveRangeBounds, resolveRowSelectionClick, tmDataGridFilterFn, toClipboardText, tsvFormat, useTMDataGrid, useTMDataGridContext, useTMDataGridExport, writeClipboardText, writeExportFile };