@uipath/apollo-vertex 1.2.0 → 1.3.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 (39) hide show
  1. package/dist/lib/i18n.d.ts +2 -0
  2. package/dist/lib/table-features.d.ts +38 -0
  3. package/dist/lib/table-features.js +32 -0
  4. package/dist/locales/en.json +1 -0
  5. package/dist/registry/calendar/calendar.js +2 -2
  6. package/dist/registry/command/command.js +3 -0
  7. package/dist/registry/confidence-signal/confidence-signal-chip.js +1 -1
  8. package/dist/registry/data-table/data-table-column-header.d.ts +5 -4
  9. package/dist/registry/data-table/data-table-column-header.js +21 -18
  10. package/dist/registry/data-table/data-table-expand-toggle.d.ts +5 -4
  11. package/dist/registry/data-table/data-table-expand-toggle.js +1 -1
  12. package/dist/registry/data-table/data-table-filters.d.ts +4 -3
  13. package/dist/registry/data-table/data-table-filters.js +4 -4
  14. package/dist/registry/data-table/data-table-pagination.d.ts +5 -4
  15. package/dist/registry/data-table/data-table-pagination.js +2 -3
  16. package/dist/registry/data-table/data-table-search.d.ts +5 -4
  17. package/dist/registry/data-table/data-table-search.js +2 -2
  18. package/dist/registry/data-table/data-table-toolbar.d.ts +5 -4
  19. package/dist/registry/data-table/data-table-view-options.d.ts +5 -4
  20. package/dist/registry/data-table/data-table-view-options.js +2 -2
  21. package/dist/registry/data-table/data-table.d.ts +13 -12
  22. package/dist/registry/data-table/data-table.js +9 -12
  23. package/dist/registry/data-table/index.d.ts +3 -2
  24. package/dist/registry/data-table/index.js +1 -1
  25. package/dist/registry/filter-dropdown/filter-dropdown.d.ts +4 -4
  26. package/dist/registry/filter-dropdown/filter-dropdown.js +1 -1
  27. package/dist/registry/solution-tests/config.d.ts +5 -5
  28. package/dist/registry/solution-tests/solution-tests-view.js +1 -1
  29. package/dist/registry/table-chart/table-chart-view.js +9 -5
  30. package/dist/registry/timeline/timeline-marker.js +2 -2
  31. package/dist/registry/use-data-table/types.d.ts +3 -2
  32. package/dist/registry/use-data-table/useColumnVisibility.d.ts +3 -3
  33. package/dist/registry/use-data-table/useDataTable.d.ts +8 -7
  34. package/dist/registry/use-data-table/useEntityColumns.d.ts +2 -2
  35. package/dist/registry/use-data-table/useEntityDataTable.d.ts +3 -3
  36. package/package.json +2 -2
  37. package/skills/setup/SKILL.md +123 -0
  38. package/dist/registry/use-data-table/useReactTableCompat.d.ts +0 -13
  39. package/dist/registry/use-data-table/useReactTableCompat.js +0 -9
@@ -277,6 +277,7 @@ declare const localeLoaders: {
277
277
  scroll_to_bottom: string;
278
278
  search: string;
279
279
  search_frameworks: string;
280
+ search_input: string;
280
281
  secondary: string;
281
282
  select_a_framework: string;
282
283
  select_all: string;
@@ -643,6 +644,7 @@ declare const localeLoaders: {
643
644
  scroll_to_bottom: string;
644
645
  search: string;
645
646
  search_frameworks: string;
647
+ search_input: string;
646
648
  secondary: string;
647
649
  select_a_framework: string;
648
650
  select_all: string;
@@ -0,0 +1,38 @@
1
+ import { type Column, type ColumnDef, type FilterFn, type ReactTable, type Row, type RowData } from "@tanstack/react-table";
2
+ export type { RowData };
3
+ export declare const dataTableFeatures: {
4
+ rowSortingFeature: import("@tanstack/react-table").TableFeature;
5
+ columnFilteringFeature: import("@tanstack/react-table").TableFeature;
6
+ globalFilteringFeature: import("@tanstack/react-table").TableFeature;
7
+ rowPaginationFeature: import("@tanstack/react-table").TableFeature;
8
+ rowSelectionFeature: import("@tanstack/react-table").TableFeature;
9
+ rowExpandingFeature: import("@tanstack/react-table").TableFeature;
10
+ columnVisibilityFeature: import("@tanstack/react-table").TableFeature;
11
+ columnOrderingFeature: import("@tanstack/react-table").TableFeature;
12
+ columnSizingFeature: import("@tanstack/react-table").TableFeature;
13
+ columnResizingFeature: import("@tanstack/react-table").TableFeature;
14
+ sortedRowModel: (table: import("@tanstack/react-table").Table<any, any>) => () => import("@tanstack/react-table").RowModel<any, any>;
15
+ filteredRowModel: (table: import("@tanstack/react-table").Table<any, any>) => () => import("@tanstack/react-table").RowModel<any, any>;
16
+ paginatedRowModel: (table: import("@tanstack/react-table").Table<any, any>) => () => import("@tanstack/react-table").RowModel<any, any>;
17
+ expandedRowModel: (table: import("@tanstack/react-table").Table<any, any>) => () => import("@tanstack/react-table").RowModel<any, any>;
18
+ sortFns: {
19
+ alphanumeric: import("@tanstack/react-table").CreatedSortFn<any, any>;
20
+ text: import("@tanstack/react-table").CreatedSortFn<any, any>;
21
+ datetime: import("@tanstack/react-table").CreatedSortFn<any, any>;
22
+ basic: import("@tanstack/react-table").CreatedSortFn<any, any>;
23
+ };
24
+ filterFns: {
25
+ includesString: import("@tanstack/react-table").CreatedFilterFn<any, any>;
26
+ inNumberRange: import("@tanstack/react-table").CreatedFilterFn<any, any>;
27
+ equals: import("@tanstack/react-table").CreatedFilterFn<any, any>;
28
+ arrIncludes: import("@tanstack/react-table").CreatedFilterFn<any, any>;
29
+ inDateRange: import("@tanstack/react-table").CreatedFilterFn<any, any>;
30
+ weakEquals: import("@tanstack/react-table").CreatedFilterFn<any, any>;
31
+ };
32
+ };
33
+ export type DataTableFeatures = typeof dataTableFeatures;
34
+ export type DataTableColumnDef<TData extends RowData, TValue = unknown> = ColumnDef<DataTableFeatures, TData, TValue>;
35
+ export type DataTableRow<TData extends RowData> = Row<DataTableFeatures, TData>;
36
+ export type DataTableColumn<TData extends RowData, TValue = unknown> = Column<DataTableFeatures, TData, TValue>;
37
+ export type DataTableInstance<TData extends RowData> = ReactTable<DataTableFeatures, TData>;
38
+ export type DataTableFilterFn<TData extends RowData> = FilterFn<DataTableFeatures, TData>;
@@ -0,0 +1,32 @@
1
+ import { columnFilteringFeature, columnOrderingFeature, columnResizingFeature, columnSizingFeature, columnVisibilityFeature, createExpandedRowModel, createFilteredRowModel, createPaginatedRowModel, createSortedRowModel, filterFn_arrIncludes, filterFn_equals, filterFn_inDateRange, filterFn_inNumberRange, filterFn_includesString, filterFn_weakEquals, globalFilteringFeature, rowExpandingFeature, rowPaginationFeature, rowSelectionFeature, rowSortingFeature, sortFn_alphanumeric, sortFn_basic, sortFn_datetime, sortFn_text, tableFeatures } from "@tanstack/react-table";
2
+ const dataTableFeatures = tableFeatures({
3
+ rowSortingFeature: rowSortingFeature,
4
+ columnFilteringFeature: columnFilteringFeature,
5
+ globalFilteringFeature: globalFilteringFeature,
6
+ rowPaginationFeature: rowPaginationFeature,
7
+ rowSelectionFeature: rowSelectionFeature,
8
+ rowExpandingFeature: rowExpandingFeature,
9
+ columnVisibilityFeature: columnVisibilityFeature,
10
+ columnOrderingFeature: columnOrderingFeature,
11
+ columnSizingFeature: columnSizingFeature,
12
+ columnResizingFeature: columnResizingFeature,
13
+ sortedRowModel: createSortedRowModel(),
14
+ filteredRowModel: createFilteredRowModel(),
15
+ paginatedRowModel: createPaginatedRowModel(),
16
+ expandedRowModel: createExpandedRowModel(),
17
+ sortFns: {
18
+ alphanumeric: sortFn_alphanumeric,
19
+ text: sortFn_text,
20
+ datetime: sortFn_datetime,
21
+ basic: sortFn_basic
22
+ },
23
+ filterFns: {
24
+ includesString: filterFn_includesString,
25
+ inNumberRange: filterFn_inNumberRange,
26
+ equals: filterFn_equals,
27
+ arrIncludes: filterFn_arrIncludes,
28
+ inDateRange: filterFn_inDateRange,
29
+ weakEquals: filterFn_weakEquals
30
+ }
31
+ });
32
+ export { dataTableFeatures };
@@ -274,6 +274,7 @@
274
274
  "scroll_to_bottom": "Scroll to bottom",
275
275
  "search": "Search...",
276
276
  "search_frameworks": "Search frameworks",
277
+ "search_input": "Search",
277
278
  "secondary": "Secondary",
278
279
  "select_a_framework": "Select a framework",
279
280
  "select_all": "Select all",
@@ -34,10 +34,10 @@ function Calendar({ className, classNames, showOutsideDays = true, captionLayout
34
34
  dropdown: cn("absolute bg-popover inset-0 opacity-0", defaultClassNames.dropdown),
35
35
  caption_label: cn("select-none font-medium", "label" === captionLayout ? "text-sm" : "rounded-md pl-2 pr-1 flex items-center gap-1 text-sm h-8 [&>svg]:text-muted-foreground [&>svg]:size-3.5", defaultClassNames.caption_label),
36
36
  weekdays: cn("flex", defaultClassNames.weekdays),
37
- weekday: cn("text-muted-foreground rounded-md flex-1 font-normal text-[0.8rem] select-none", defaultClassNames.weekday),
37
+ weekday: cn("text-muted-foreground rounded-md flex-1 font-normal text-xs select-none", defaultClassNames.weekday),
38
38
  week: cn("flex w-full mt-2", defaultClassNames.week),
39
39
  week_number_header: cn("select-none w-(--cell-size)", defaultClassNames.week_number_header),
40
- week_number: cn("text-[0.8rem] select-none text-muted-foreground", defaultClassNames.week_number),
40
+ week_number: cn("text-xs select-none text-muted-foreground", defaultClassNames.week_number),
41
41
  day: cn("relative w-full h-full p-0 text-center [&:last-child[data-selected=true]_button]:rounded-r-md group/day aspect-square select-none", props.showWeekNumber ? "[&:nth-child(2)[data-selected=true]_button]:rounded-l-md" : "[&:first-child[data-selected=true]_button]:rounded-l-md", defaultClassNames.day),
42
42
  range_start: cn("rounded-l-md bg-accent", defaultClassNames.range_start),
43
43
  range_middle: cn("rounded-none", defaultClassNames.range_middle),
@@ -5,6 +5,7 @@ import { SearchIcon } from "lucide-react";
5
5
  import "react";
6
6
  import { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle } from "../dialog/dialog.js";
7
7
  import { cn } from "../../lib/utils.js";
8
+ import { useVertexTranslation } from "../../lib/vertex-translation.js";
8
9
  function command_Command({ className, ...props }) {
9
10
  return /*#__PURE__*/ jsx(Command, {
10
11
  "data-slot": "command",
@@ -39,6 +40,7 @@ function CommandDialog({ title = "Command Palette", description = "Search for a
39
40
  });
40
41
  }
41
42
  function CommandInput({ className, ...props }) {
43
+ const { t } = useVertexTranslation();
42
44
  return /*#__PURE__*/ jsxs("div", {
43
45
  "data-slot": "command-input-wrapper",
44
46
  className: "flex h-9 items-center gap-2 border-b px-3",
@@ -48,6 +50,7 @@ function CommandInput({ className, ...props }) {
48
50
  }),
49
51
  /*#__PURE__*/ jsx(Command.Input, {
50
52
  "data-slot": "command-input",
53
+ "aria-label": t("search_input"),
51
54
  className: cn("placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50", className),
52
55
  ...props
53
56
  })
@@ -5,7 +5,7 @@ import { SignalBars } from "./confidence-signal-bars.js";
5
5
  import { LEVEL_CONFIG } from "./confidence-signal-levels.js";
6
6
  function ConfidenceSignalChip({ level, label, accessibleLabel, animateIn = false, interactive = false, className, ...props }) {
7
7
  return /*#__PURE__*/ jsxs("button", {
8
- className: cn("inline-flex items-center gap-1.5 text-xs font-semibold focus-visible:outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50", LEVEL_CONFIG[level].textClass, interactive && "cursor-pointer", className),
8
+ className: cn("relative inline-flex items-center gap-1.5 text-xs font-semibold focus-visible:outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50", "after:absolute after:top-1/2 after:left-1/2 after:size-full after:min-h-6 after:min-w-6 after:-translate-x-1/2 after:-translate-y-1/2", LEVEL_CONFIG[level].textClass, interactive && "cursor-pointer", className),
9
9
  "aria-label": accessibleLabel,
10
10
  ...props,
11
11
  type: "button",
@@ -1,8 +1,9 @@
1
- import type { Column } from "@tanstack/react-table";
1
+ import { type RowData } from "@tanstack/react-table";
2
2
  import * as React from "react";
3
- interface DataTableColumnHeaderProps<TData, TValue> extends React.HTMLAttributes<HTMLDivElement> {
4
- column: Column<TData, TValue>;
3
+ import type { DataTableColumn } from "../../lib/table-features";
4
+ interface DataTableColumnHeaderProps<TData extends RowData, TValue> extends React.HTMLAttributes<HTMLDivElement> {
5
+ column: DataTableColumn<TData, TValue>;
5
6
  title: string;
6
7
  }
7
- declare function DataTableColumnHeader<TData, TValue>({ column, title, className, }: DataTableColumnHeaderProps<TData, TValue>): import("react/jsx-runtime").JSX.Element;
8
+ declare function DataTableColumnHeader<TData extends RowData, TValue>({ column, title, className, }: DataTableColumnHeaderProps<TData, TValue>): import("react/jsx-runtime").JSX.Element;
8
9
  export { DataTableColumnHeader };
@@ -1,5 +1,6 @@
1
1
  "use client";
2
2
  import { jsx, jsxs } from "react/jsx-runtime";
3
+ import { Subscribe } from "@tanstack/react-table";
3
4
  import { ArrowDownIcon, ArrowUpIcon } from "lucide-react";
4
5
  import "react";
5
6
  import { Button } from "../button/button.js";
@@ -16,29 +17,31 @@ function SortIcon({ sortDirection }) {
16
17
  });
17
18
  }
18
19
  function DataTableColumnHeader({ column, title, className }) {
19
- "use no memo";
20
20
  if (!column.getCanSort()) return /*#__PURE__*/ jsx("div", {
21
21
  className: cn(className),
22
22
  children: title
23
23
  });
24
- return /*#__PURE__*/ jsx("div", {
25
- "data-slot": "data-table-column-header",
26
- className: cn("flex items-center gap-2", className),
27
- children: /*#__PURE__*/ jsxs(Button, {
28
- variant: "ghost",
29
- size: "sm",
30
- onClick: ()=>column.toggleSorting("asc" === column.getIsSorted()),
31
- className: "group/sort gap-1.5 -mx-2.5 -my-1 px-2.5 text-xs font-semibold text-muted-foreground",
32
- children: [
33
- /*#__PURE__*/ jsx("span", {
34
- className: "truncate",
35
- children: title
36
- }),
37
- /*#__PURE__*/ jsx(SortIcon, {
38
- sortDirection: column.getIsSorted()
24
+ return /*#__PURE__*/ jsx(Subscribe, {
25
+ source: column.table.atoms.sorting,
26
+ children: ()=>/*#__PURE__*/ jsx("div", {
27
+ "data-slot": "data-table-column-header",
28
+ className: cn("flex items-center gap-2", className),
29
+ children: /*#__PURE__*/ jsxs(Button, {
30
+ variant: "ghost",
31
+ size: "sm",
32
+ onClick: ()=>column.toggleSorting("asc" === column.getIsSorted()),
33
+ className: "group/sort gap-1.5 -mx-2.5 -my-1 px-2.5 text-xs font-semibold text-muted-foreground",
34
+ children: [
35
+ /*#__PURE__*/ jsx("span", {
36
+ className: "truncate",
37
+ children: title
38
+ }),
39
+ /*#__PURE__*/ jsx(SortIcon, {
40
+ sortDirection: column.getIsSorted()
41
+ })
42
+ ]
39
43
  })
40
- ]
41
- })
44
+ })
42
45
  });
43
46
  }
44
47
  export { DataTableColumnHeader };
@@ -1,12 +1,13 @@
1
- import type { Table as TanstackTable } from "@tanstack/react-table";
2
- interface DataTableExpandAllToggleProps<TData> {
3
- table: TanstackTable<TData>;
1
+ import type { RowData } from "@tanstack/react-table";
2
+ import type { DataTableInstance } from "../../lib/table-features";
3
+ interface DataTableExpandAllToggleProps<TData extends RowData> {
4
+ table: DataTableInstance<TData>;
4
5
  }
5
6
  /**
6
7
  * Expand/collapse-all toggle for a data table's expand-column header. Reflects
7
8
  * and toggles the table's all-rows-expanded state, with distinct double-chevron
8
9
  * icons to set it apart from the per-row single-chevron expand controls.
9
10
  */
10
- declare function DataTableExpandAllToggle<TData>({ table, }: DataTableExpandAllToggleProps<TData>): import("react/jsx-runtime").JSX.Element;
11
+ declare function DataTableExpandAllToggle<TData extends RowData>({ table, }: DataTableExpandAllToggleProps<TData>): import("react/jsx-runtime").JSX.Element;
11
12
  export { DataTableExpandAllToggle };
12
13
  export type { DataTableExpandAllToggleProps };
@@ -1,8 +1,8 @@
1
1
  "use client";
2
2
  import { jsx } from "react/jsx-runtime";
3
3
  import { ChevronsDownUp, ChevronsUpDown } from "lucide-react";
4
- import { useVertexTranslation } from "../../lib/vertex-translation.js";
5
4
  import { Button } from "../button/button.js";
5
+ import { useVertexTranslation } from "../../lib/vertex-translation.js";
6
6
  function DataTableExpandAllToggle({ table }) {
7
7
  const { t } = useVertexTranslation();
8
8
  const allExpanded = table.getIsAllRowsExpanded();
@@ -1,3 +1,4 @@
1
- import type { Row, RowData } from "@tanstack/react-table";
2
- export declare const dataTableGlobalFilterFn: (row: Row<RowData>, _columnId: string, filterValue: string) => boolean;
3
- export declare const dataTableFacetedFilterFn: (row: Row<RowData>, columnId: string, filterValue: unknown) => boolean;
1
+ import type { RowData } from "@tanstack/react-table";
2
+ import type { DataTableRow } from "../../lib/table-features";
3
+ export declare function dataTableGlobalFilterFn<TData extends RowData>(row: DataTableRow<TData>, _columnId: string, filterValue: string): boolean;
4
+ export declare function dataTableFacetedFilterFn<TData extends RowData>(row: DataTableRow<TData>, columnId: string, filterValue: unknown): boolean;
@@ -1,4 +1,4 @@
1
- const dataTableGlobalFilterFn = (row, _columnId, filterValue)=>{
1
+ function dataTableGlobalFilterFn(row, _columnId, filterValue) {
2
2
  if (!filterValue) return true;
3
3
  const searchStr = filterValue.toLowerCase();
4
4
  return row.getVisibleCells().some((cell)=>{
@@ -7,10 +7,10 @@ const dataTableGlobalFilterFn = (row, _columnId, filterValue)=>{
7
7
  const displayValue = meta?.getFilterValue ? meta.getFilterValue(value, row) : "string" == typeof value ? value : "number" == typeof value || "boolean" == typeof value ? String(value) : "";
8
8
  return displayValue.toLowerCase().includes(searchStr);
9
9
  });
10
- };
11
- const dataTableFacetedFilterFn = (row, columnId, filterValue)=>{
10
+ }
11
+ function dataTableFacetedFilterFn(row, columnId, filterValue) {
12
12
  if (!filterValue || !Array.isArray(filterValue) || 0 === filterValue.length) return true;
13
13
  const cellValue = String(row.getValue(columnId) ?? "");
14
14
  return filterValue.includes(cellValue);
15
- };
15
+ }
16
16
  export { dataTableFacetedFilterFn, dataTableGlobalFilterFn };
@@ -1,8 +1,9 @@
1
- import type { Table as TanstackTable } from "@tanstack/react-table";
2
- interface DataTablePaginationProps<TData> {
3
- table: TanstackTable<TData>;
1
+ import type { RowData } from "@tanstack/react-table";
2
+ import type { DataTableInstance } from "../../lib/table-features";
3
+ interface DataTablePaginationProps<TData extends RowData> {
4
+ table: DataTableInstance<TData>;
4
5
  paginationSizes?: number[];
5
6
  className?: string;
6
7
  }
7
- declare function DataTablePagination<TData>({ table, paginationSizes, className, }: DataTablePaginationProps<TData>): import("react/jsx-runtime").JSX.Element;
8
+ declare function DataTablePagination<TData extends RowData>({ table, paginationSizes, className, }: DataTablePaginationProps<TData>): import("react/jsx-runtime").JSX.Element;
8
9
  export { DataTablePagination };
@@ -1,19 +1,18 @@
1
1
  "use client";
2
2
  import { jsx, jsxs } from "react/jsx-runtime";
3
3
  import { ChevronLeftIcon, ChevronRightIcon, ChevronsLeftIcon, ChevronsRightIcon } from "lucide-react";
4
- import { useVertexTranslation } from "../../lib/vertex-translation.js";
5
4
  import { Button } from "../button/button.js";
6
5
  import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "../select/select.js";
7
6
  import { cn } from "../../lib/utils.js";
7
+ import { useVertexTranslation } from "../../lib/vertex-translation.js";
8
8
  function DataTablePagination({ table, paginationSizes = [
9
9
  10,
10
10
  25,
11
11
  50,
12
12
  100
13
13
  ], className }) {
14
- "use no memo";
15
14
  const { t } = useVertexTranslation();
16
- const { pageIndex, pageSize } = table.getState().pagination;
15
+ const { pageIndex, pageSize } = table.state.pagination;
17
16
  const totalRows = table.getFilteredRowModel().rows.length;
18
17
  const pageCount = table.getPageCount();
19
18
  const canPreviousPage = pageIndex > 0;
@@ -1,8 +1,9 @@
1
- import type { Table as TanstackTable } from "@tanstack/react-table";
2
- interface DataTableSearchProps<TData> {
3
- table: TanstackTable<TData>;
1
+ import type { RowData } from "@tanstack/react-table";
2
+ import type { DataTableInstance } from "../../lib/table-features";
3
+ interface DataTableSearchProps<TData extends RowData> {
4
+ table: DataTableInstance<TData>;
4
5
  placeholder?: string;
5
6
  className?: string;
6
7
  }
7
- declare function DataTableSearch<TData>({ table, placeholder, className, }: DataTableSearchProps<TData>): import("react/jsx-runtime").JSX.Element;
8
+ declare function DataTableSearch<TData extends RowData>({ table, placeholder, className, }: DataTableSearchProps<TData>): import("react/jsx-runtime").JSX.Element;
8
9
  export { DataTableSearch };
@@ -1,9 +1,9 @@
1
1
  "use client";
2
2
  import { jsx, jsxs } from "react/jsx-runtime";
3
3
  import { SearchIcon } from "lucide-react";
4
- import { useVertexTranslation } from "../../lib/vertex-translation.js";
5
4
  import { Input } from "../input/input.js";
6
5
  import { cn } from "../../lib/utils.js";
6
+ import { useVertexTranslation } from "../../lib/vertex-translation.js";
7
7
  function DataTableSearch({ table, placeholder, className }) {
8
8
  const { t } = useVertexTranslation();
9
9
  return /*#__PURE__*/ jsxs("div", {
@@ -17,7 +17,7 @@ function DataTableSearch({ table, placeholder, className }) {
17
17
  placeholder: placeholder ?? t("search", {
18
18
  defaultValue: "Search..."
19
19
  }),
20
- value: String(table.getState().globalFilter ?? ""),
20
+ value: String(table.state.globalFilter ?? ""),
21
21
  onChange: (e)=>table.setGlobalFilter(e.target.value),
22
22
  className: "w-full sm:w-80 md:w-96 pl-9 border-0"
23
23
  })
@@ -1,11 +1,12 @@
1
- import type { Table } from "@tanstack/react-table";
1
+ import type { RowData } from "@tanstack/react-table";
2
2
  import type * as React from "react";
3
- interface DataTableToolbarProps<TData> {
4
- table: Table<TData>;
3
+ import type { DataTableInstance } from "../../lib/table-features";
4
+ interface DataTableToolbarProps<TData extends RowData> {
5
+ table: DataTableInstance<TData>;
5
6
  className?: string;
6
7
  enableSearch?: boolean;
7
8
  enableViewOptions?: boolean;
8
9
  customContent?: React.ReactNode;
9
10
  }
10
- declare function DataTableToolbar<TData>({ table, className, enableSearch, enableViewOptions, customContent, }: DataTableToolbarProps<TData>): import("react/jsx-runtime").JSX.Element | null;
11
+ declare function DataTableToolbar<TData extends RowData>({ table, className, enableSearch, enableViewOptions, customContent, }: DataTableToolbarProps<TData>): import("react/jsx-runtime").JSX.Element | null;
11
12
  export { DataTableToolbar };
@@ -1,7 +1,8 @@
1
- import type { Table as TanstackTable } from "@tanstack/react-table";
2
- interface DataTableViewOptionsProps<TData> {
3
- table: TanstackTable<TData>;
1
+ import type { RowData } from "@tanstack/react-table";
2
+ import type { DataTableInstance } from "../../lib/table-features";
3
+ interface DataTableViewOptionsProps<TData extends RowData> {
4
+ table: DataTableInstance<TData>;
4
5
  className?: string;
5
6
  }
6
- declare function DataTableViewOptions<TData>({ table, className, }: DataTableViewOptionsProps<TData>): import("react/jsx-runtime").JSX.Element;
7
+ declare function DataTableViewOptions<TData extends RowData>({ table, className, }: DataTableViewOptionsProps<TData>): import("react/jsx-runtime").JSX.Element;
7
8
  export { DataTableViewOptions };
@@ -1,15 +1,15 @@
1
1
  "use client";
2
2
  import { jsx, jsxs } from "react/jsx-runtime";
3
3
  import { Columns3Icon } from "lucide-react";
4
- import { useVertexTranslation } from "../../lib/vertex-translation.js";
5
4
  import { Button } from "../button/button.js";
6
5
  import { DropdownMenu, DropdownMenuContent, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuTrigger } from "../dropdown-menu/dropdown-menu.js";
7
6
  import { Tooltip, TooltipContent, TooltipTrigger } from "../tooltip/tooltip.js";
7
+ import { useVertexTranslation } from "../../lib/vertex-translation.js";
8
8
  import { SortableColumnList } from "./sortable-column-list.js";
9
9
  function DataTableViewOptions({ table, className }) {
10
10
  const { t } = useVertexTranslation();
11
11
  const allReorderableColumns = table.getAllColumns().filter((column)=>null != column.accessorFn && column.getCanHide());
12
- const currentOrder = table.getState().columnOrder;
12
+ const currentOrder = table.state.columnOrder;
13
13
  const orderedColumns = ()=>{
14
14
  if (!currentOrder || 0 === currentOrder.length) return allReorderableColumns;
15
15
  const orderMap = new Map(currentOrder.map((id, index)=>[
@@ -1,14 +1,15 @@
1
- import { type ColumnDef, type ColumnFiltersState, type ExpandedState, type FilterFn, type OnChangeFn, type PaginationState, type Row, type RowData, type RowSelectionState, type SortingState, type Table as TanstackTable, type VisibilityState } from "@tanstack/react-table";
1
+ import { type ColumnFiltersState, type ColumnVisibilityState, type ExpandedState, type OnChangeFn, type PaginationState, type RowData, type RowSelectionState, type SortingState } from "@tanstack/react-table";
2
2
  import * as React from "react";
3
+ import { type DataTableColumnDef, type DataTableFilterFn, type DataTableInstance, type DataTableRow } from "../../lib/table-features";
3
4
  declare module "@tanstack/react-table" {
4
- interface ColumnMeta<TData extends RowData, TValue> {
5
+ interface ColumnMeta<TFeatures, TData extends RowData, TValue> {
5
6
  displayName?: string;
6
- getFilterValue?: (value: unknown, row: Row<TData>) => string;
7
+ getFilterValue?: (value: unknown, row: DataTableRow<TData>) => string;
7
8
  overflowVisible?: boolean;
8
9
  }
9
10
  }
10
- interface DataTableProps<TData, TValue> {
11
- columns: ColumnDef<TData, TValue>[];
11
+ interface DataTableProps<TData extends RowData, TValue = unknown> {
12
+ columns: DataTableColumnDef<TData, TValue>[];
12
13
  data: TData[];
13
14
  className?: string;
14
15
  isLoading?: boolean;
@@ -17,8 +18,8 @@ interface DataTableProps<TData, TValue> {
17
18
  onSortingChange: OnChangeFn<SortingState>;
18
19
  columnFilters: ColumnFiltersState;
19
20
  onColumnFiltersChange: OnChangeFn<ColumnFiltersState>;
20
- columnVisibility: VisibilityState;
21
- onColumnVisibilityChange: OnChangeFn<VisibilityState>;
21
+ columnVisibility: ColumnVisibilityState;
22
+ onColumnVisibilityChange: OnChangeFn<ColumnVisibilityState>;
22
23
  columnOrder: string[];
23
24
  onColumnOrderChange: OnChangeFn<string[]>;
24
25
  rowSelection?: RowSelectionState;
@@ -27,22 +28,22 @@ interface DataTableProps<TData, TValue> {
27
28
  onGlobalFilterChange: OnChangeFn<string>;
28
29
  pagination?: PaginationState;
29
30
  onPaginationChange?: OnChangeFn<PaginationState>;
30
- getRowId?: (originalRow: TData, index: number, parent?: Row<TData>) => string;
31
- globalFilterFn?: FilterFn<TData>;
31
+ getRowId?: (originalRow: TData, index: number, parent?: DataTableRow<TData>) => string;
32
+ globalFilterFn?: DataTableFilterFn<TData>;
32
33
  enableSearch?: boolean;
33
34
  enableViewOptions?: boolean;
34
35
  enableColumnResizing?: boolean;
35
- toolbarContent?: (table: TanstackTable<TData>) => React.ReactNode;
36
+ toolbarContent?: (table: DataTableInstance<TData>) => React.ReactNode;
36
37
  noResultsMessage?: React.ReactNode;
37
38
  stickyHeader?: boolean;
38
39
  expanded?: ExpandedState;
39
40
  onExpandedChange?: OnChangeFn<ExpandedState>;
40
- renderExpandedRow?: (row: Row<TData>) => React.ReactNode;
41
+ renderExpandedRow?: (row: DataTableRow<TData>) => React.ReactNode;
41
42
  getRowClassName?: (row: TData) => string;
42
43
  skeletonColumnWidths?: string[];
43
44
  plain?: boolean;
44
45
  }
45
- declare function DataTable<TData, TValue>({ columns, data, className, isLoading, onRowClick, sorting, onSortingChange, columnFilters, onColumnFiltersChange, columnVisibility, onColumnVisibilityChange, columnOrder, onColumnOrderChange, rowSelection, onRowSelectionChange, globalFilter, onGlobalFilterChange, pagination, onPaginationChange, getRowId, globalFilterFn, enableSearch, enableViewOptions, enableColumnResizing, toolbarContent, noResultsMessage, stickyHeader, expanded, onExpandedChange, renderExpandedRow, getRowClassName, skeletonColumnWidths, plain, }: DataTableProps<TData, TValue>): import("react/jsx-runtime").JSX.Element;
46
+ declare function DataTable<TData extends RowData, TValue = unknown>({ columns, data, className, isLoading, onRowClick, sorting, onSortingChange, columnFilters, onColumnFiltersChange, columnVisibility, onColumnVisibilityChange, columnOrder, onColumnOrderChange, rowSelection, onRowSelectionChange, globalFilter, onGlobalFilterChange, pagination, onPaginationChange, getRowId, globalFilterFn, enableSearch, enableViewOptions, enableColumnResizing, toolbarContent, noResultsMessage, stickyHeader, expanded, onExpandedChange, renderExpandedRow, getRowClassName, skeletonColumnWidths, plain, }: DataTableProps<TData, TValue>): import("react/jsx-runtime").JSX.Element;
46
47
  export { DataTable };
47
48
  export type { DataTableProps };
48
49
  /** @public */
@@ -1,10 +1,10 @@
1
1
  "use client";
2
2
  import { jsx, jsxs } from "react/jsx-runtime";
3
- import { flexRender, getCoreRowModel, getExpandedRowModel, getFilteredRowModel, getPaginationRowModel, getSortedRowModel } from "@tanstack/react-table";
3
+ import { flexRender, useTable } from "@tanstack/react-table";
4
4
  import { Fragment } from "react";
5
+ import { dataTableFeatures } from "../../lib/table-features.js";
5
6
  import { useVertexTranslation } from "../../lib/vertex-translation.js";
6
7
  import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from "../table/table.js";
7
- import { useReactTableCompat } from "../use-data-table/useReactTableCompat.js";
8
8
  import { cn } from "../../lib/utils.js";
9
9
  import { DataTableExpandAllToggle } from "./data-table-expand-toggle.js";
10
10
  import { DataTablePagination } from "./data-table-pagination.js";
@@ -24,9 +24,10 @@ function DataTable({ columns, data, className, isLoading = false, onRowClick, so
24
24
  pageIndex: 0
25
25
  });
26
26
  };
27
- const table = useReactTableCompat({
27
+ const table = useTable({
28
+ features: dataTableFeatures,
28
29
  data,
29
- columns,
30
+ columns: columns,
30
31
  onSortingChange,
31
32
  onColumnFiltersChange: (updater)=>{
32
33
  onColumnFiltersChange(updater);
@@ -42,8 +43,10 @@ function DataTable({ columns, data, className, isLoading = false, onRowClick, so
42
43
  resetPageIndex();
43
44
  },
44
45
  ...isPaginationEnabled && {
45
- onPaginationChange,
46
- getPaginationRowModel: getPaginationRowModel()
46
+ onPaginationChange
47
+ },
48
+ ...!isPaginationEnabled && {
49
+ manualPagination: true
47
50
  },
48
51
  ...onExpandedChange ? {
49
52
  onExpandedChange
@@ -51,12 +54,6 @@ function DataTable({ columns, data, className, isLoading = false, onRowClick, so
51
54
  ...getRowId ? {
52
55
  getRowId
53
56
  } : {},
54
- getCoreRowModel: getCoreRowModel(),
55
- getSortedRowModel: getSortedRowModel(),
56
- getFilteredRowModel: getFilteredRowModel(),
57
- ...renderExpandedRow ? {
58
- getExpandedRowModel: getExpandedRowModel()
59
- } : {},
60
57
  ...globalFilterFn ? {
61
58
  globalFilterFn
62
59
  } : {},
@@ -1,8 +1,9 @@
1
- export type { ColumnDef, ColumnFiltersState, ExpandedState, OnChangeFn, PaginationState, Row, RowSelectionState, SortingState, Table as TanstackTable, VisibilityState, } from "@tanstack/react-table";
1
+ export type { ColumnFiltersState, ColumnVisibilityState, ColumnVisibilityState as VisibilityState, ExpandedState, OnChangeFn, PaginationState, RowSelectionState, SortingState, } from "@tanstack/react-table";
2
+ export { FilterDropdown, type FilterDropdownOption, type FilterDropdownProps, } from "../filter-dropdown/index";
3
+ export type { DataTableColumnDef as ColumnDef, DataTableInstance as TanstackTable, DataTableRow as Row, } from "../../lib/table-features";
2
4
  export type { DataTableProps } from "./data-table";
3
5
  export { DataTable } from "./data-table";
4
6
  export { DataTableColumnHeader } from "./data-table-column-header";
5
- export { FilterDropdown, type FilterDropdownOption, type FilterDropdownProps, } from "../filter-dropdown/index";
6
7
  export { dataTableFacetedFilterFn, dataTableGlobalFilterFn, } from "./data-table-filters";
7
8
  export { DataTablePagination } from "./data-table-pagination";
8
9
  export { DataTableCell, DataTableRow } from "./data-table-row";
@@ -1,6 +1,6 @@
1
+ import { FilterDropdown } from "../filter-dropdown/index.js";
1
2
  import { DataTable } from "./data-table.js";
2
3
  import { DataTableColumnHeader } from "./data-table-column-header.js";
3
- import { FilterDropdown } from "../filter-dropdown/index.js";
4
4
  import { dataTableFacetedFilterFn, dataTableGlobalFilterFn } from "./data-table-filters.js";
5
5
  import { DataTablePagination } from "./data-table-pagination.js";
6
6
  import { DataTableCell, DataTableRow } from "./data-table-row.js";
@@ -1,5 +1,5 @@
1
- import type { Column } from "@tanstack/react-table";
2
1
  import { type ReactNode } from "react";
2
+ import type { DataTableColumn, RowData } from "../../lib/table-features";
3
3
  interface FilterDropdownOption {
4
4
  label: string;
5
5
  value: string;
@@ -7,14 +7,14 @@ interface FilterDropdownOption {
7
7
  className?: string;
8
8
  }>;
9
9
  }
10
- interface FilterDropdownProps<TData = unknown, TValue = unknown> {
10
+ interface FilterDropdownProps<TData extends RowData = RowData, TValue = unknown> {
11
11
  title: string;
12
12
  options: FilterDropdownOption[];
13
13
  className?: string;
14
14
  /** Multi-select (default) or single-select mode */
15
15
  multiSelect?: boolean;
16
16
  /** TanStack Table column integration (optional) */
17
- column?: Column<TData, TValue>;
17
+ column?: DataTableColumn<TData, TValue>;
18
18
  /** Standalone value — used when no column is provided */
19
19
  value?: string[] | string;
20
20
  /** Standalone onChange — used when no column is provided */
@@ -56,6 +56,6 @@ interface FilterDropdownProps<TData = unknown, TValue = unknown> {
56
56
  /** Known options for selected values that may not be loaded yet (used for the trigger label) */
57
57
  selectedOptions?: FilterDropdownOption[];
58
58
  }
59
- declare function FilterDropdown<TData, TValue>({ title, options, className, multiSelect, column, value: valueProp, onChange: onChangeProp, enableSearch, searchThreshold, searchPlaceholder, noOptionsMessage, noResultsMessage, align, popoverWidth, isLoading, hasMore, onLoadMore, loadingMessage, onSearchChange, searchDebounceMs, error, errorMessage, onRetry, retryLabel, selectedOptions, }: FilterDropdownProps<TData, TValue>): import("react/jsx-runtime").JSX.Element;
59
+ declare function FilterDropdown<TData extends RowData = RowData, TValue = unknown>({ title, options, className, multiSelect, column, value: valueProp, onChange: onChangeProp, enableSearch, searchThreshold, searchPlaceholder, noOptionsMessage, noResultsMessage, align, popoverWidth, isLoading, hasMore, onLoadMore, loadingMessage, onSearchChange, searchDebounceMs, error, errorMessage, onRetry, retryLabel, selectedOptions, }: FilterDropdownProps<TData, TValue>): import("react/jsx-runtime").JSX.Element;
60
60
  export { FilterDropdown };
61
61
  export type { FilterDropdownOption, FilterDropdownProps };
@@ -2,12 +2,12 @@
2
2
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
3
3
  import { ChevronDownIcon, SearchIcon, XIcon } from "lucide-react";
4
4
  import { useState } from "react";
5
- import { useVertexTranslation } from "../../lib/vertex-translation.js";
6
5
  import { Button } from "../button/button.js";
7
6
  import { Input } from "../input/input.js";
8
7
  import { Popover, PopoverContent, PopoverTrigger } from "../popover/popover.js";
9
8
  import { Separator } from "../separator/separator.js";
10
9
  import { cn } from "../../lib/utils.js";
10
+ import { useVertexTranslation } from "../../lib/vertex-translation.js";
11
11
  import { FilterDropdownOptionRow } from "./filter-dropdown-option.js";
12
12
  import { FILTER_DROPDOWN_LIST_SLOT, FilterDropdownError, FilterDropdownLoadingMore, FilterDropdownSentinel, FilterDropdownSkeleton } from "./filter-dropdown-states.js";
13
13
  import { useFilterDropdownSearch } from "./use-filter-dropdown-search.js";
@@ -1,5 +1,5 @@
1
- import type { ColumnDef, Table as TanstackTable } from "@tanstack/react-table";
2
1
  import type { ReactNode } from "react";
2
+ import type { DataTableColumnDef, DataTableInstance } from "../../lib/table-features";
3
3
  import type { EvaluatorRenderers } from "./evaluators/registry";
4
4
  import type { ProcessOutputRenderers } from "./outputs/registry";
5
5
  import type { SolutionTest, SolutionTestRun } from "./types";
@@ -71,9 +71,9 @@ export type TrackSolutionTestEvent = UnionToIntersection<{
71
71
  /** Per-vertical presentation config; everything else is hard-coded in `constants`. */
72
72
  export interface SolutionTestsConfig {
73
73
  /** Columns inserted between the Test Name and Version columns. */
74
- subjectColumns?: ColumnDef<SolutionTest>[];
74
+ subjectColumns?: DataTableColumnDef<SolutionTest>[];
75
75
  /** Custom content (e.g. faceted filters) rendered in the test-cases table toolbar. */
76
- subjectToolbarContent?: (table: TanstackTable<SolutionTest>) => ReactNode;
76
+ subjectToolbarContent?: (table: DataTableInstance<SolutionTest>) => ReactNode;
77
77
  /** When set, the test name links to its subject. */
78
78
  getSubjectHref?: (test: SolutionTest) => string | undefined;
79
79
  /** Opens a run's details. The host owns the route + navigation; the view
@@ -98,8 +98,8 @@ export interface SolutionTestsConfig {
98
98
  }
99
99
  /** Config with defaults applied — what components read from context. */
100
100
  export interface ResolvedSolutionTestsConfig {
101
- subjectColumns: ColumnDef<SolutionTest>[];
102
- subjectToolbarContent?: (table: TanstackTable<SolutionTest>) => ReactNode;
101
+ subjectColumns: DataTableColumnDef<SolutionTest>[];
102
+ subjectToolbarContent?: (table: DataTableInstance<SolutionTest>) => ReactNode;
103
103
  getSubjectHref?: (test: SolutionTest) => string | undefined;
104
104
  onOpenRun?: (run: SolutionTestRun) => void;
105
105
  subjectNoun?: {
@@ -3,7 +3,6 @@ import { jsx, jsxs } from "react/jsx-runtime";
3
3
  import { Link } from "@tanstack/react-router";
4
4
  import { ChevronRightIcon, Play, PlayCircle, Square, Trash2 } from "lucide-react";
5
5
  import { useState } from "react";
6
- import { useVertexTranslation } from "../../lib/vertex-translation.js";
7
6
  import { Alert, AlertDescription } from "../alert/alert.js";
8
7
  import { Badge } from "../badge/badge.js";
9
8
  import { Button } from "../button/button.js";
@@ -15,6 +14,7 @@ import { Switch } from "../switch/switch.js";
15
14
  import { Tabs, TabsContent, TabsList, TabsTrigger } from "../tabs/tabs.js";
16
15
  import { Tooltip, TooltipContent, TooltipTrigger } from "../tooltip/tooltip.js";
17
16
  import { renderValueOrEmptyState } from "../../lib/renderValueOrEmptyState.js";
17
+ import { useVertexTranslation } from "../../lib/vertex-translation.js";
18
18
  import { defaultRunStatusLabels, defaultTestStatusLabels } from "./constants.js";
19
19
  import { useSolutionTestsConfig } from "./context.js";
20
20
  import { DeleteConfirmDialog } from "./delete-confirm-dialog.js";
@@ -1,9 +1,13 @@
1
1
  "use client";
2
2
  import { jsx, jsxs } from "react/jsx-runtime";
3
- import { flexRender, getCoreRowModel, useReactTable } from "@tanstack/react-table";
3
+ import { columnVisibilityFeature, flexRender, rowSortingFeature, tableFeatures, useTable } from "@tanstack/react-table";
4
4
  import { useMemo, useState } from "react";
5
- import { useVertexTranslation } from "../../lib/vertex-translation.js";
6
5
  import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from "../table/table.js";
6
+ import { useVertexTranslation } from "../../lib/vertex-translation.js";
7
+ const tableChartFeatures = tableFeatures({
8
+ rowSortingFeature: rowSortingFeature,
9
+ columnVisibilityFeature: columnVisibilityFeature
10
+ });
7
11
  function TableChart({ columns, rows, sort, onSortChange }) {
8
12
  const { t } = useVertexTranslation();
9
13
  const [sorting, setSorting] = useState(()=>sort ? [
@@ -43,7 +47,7 @@ function TableChart({ columns, rows, sort, onSortChange }) {
43
47
  cell: ({ getValue })=>{
44
48
  const value = getValue();
45
49
  return /*#__PURE__*/ jsx("div", {
46
- className: "right" === column.align ? "text-right" : "text-left",
50
+ className: "right" === column.align ? "text-right tabular-nums" : "text-left",
47
51
  children: column.format(value)
48
52
  });
49
53
  }
@@ -51,10 +55,10 @@ function TableChart({ columns, rows, sort, onSortChange }) {
51
55
  columns,
52
56
  t
53
57
  ]);
54
- const table = useReactTable({
58
+ const table = useTable({
59
+ features: tableChartFeatures,
55
60
  data: rows,
56
61
  columns: columnDefs,
57
- getCoreRowModel: getCoreRowModel(),
58
62
  manualSorting: true,
59
63
  onSortingChange: (updater)=>{
60
64
  const newSorting = "function" == typeof updater ? updater(sorting) : updater;
@@ -26,8 +26,8 @@ function TimelineMarker({ variant, initials, compact = false }) {
26
26
  case "user":
27
27
  return /*#__PURE__*/ jsx(MarkerCircle, {
28
28
  compact: compact,
29
- className: cn("bg-muted font-medium text-muted-foreground shadow-sm", compact ? "text-[9px]" : "text-xs"),
30
- children: initials ?? "?"
29
+ className: "bg-muted text-xs font-medium text-muted-foreground shadow-sm",
30
+ children: (compact ? initials?.[0] : initials) ?? "?"
31
31
  });
32
32
  case "ai-upcoming":
33
33
  case "ai-suspended":
@@ -1,6 +1,7 @@
1
- import type { ColumnDef } from "@tanstack/react-table";
1
+ import type { RowData } from "@tanstack/react-table";
2
+ import type { DataTableColumnDef } from "../../lib/table-features";
2
3
  export type EntityRecord = Record<string, unknown>;
3
- export type ColumnDefWithAccessorKey<T> = ColumnDef<T> & {
4
+ export type ColumnDefWithAccessorKey<T extends RowData> = DataTableColumnDef<T> & {
4
5
  accessorKey: string;
5
6
  };
6
7
  export interface Column {
@@ -1,10 +1,10 @@
1
- import type { OnChangeFn, VisibilityState } from "@tanstack/react-table";
1
+ import type { ColumnVisibilityState, OnChangeFn } from "@tanstack/react-table";
2
2
  export interface UseColumnVisibilityOptions {
3
3
  storageKey: string;
4
4
  allColumnKeys: string[];
5
5
  defaultVisibleColumns: string[];
6
6
  }
7
7
  export declare function useColumnVisibility({ storageKey, allColumnKeys, defaultVisibleColumns, }: UseColumnVisibilityOptions): {
8
- columnVisibility: VisibilityState;
9
- onColumnVisibilityChange: OnChangeFn<VisibilityState>;
8
+ columnVisibility: ColumnVisibilityState;
9
+ onColumnVisibilityChange: OnChangeFn<ColumnVisibilityState>;
10
10
  };
@@ -1,20 +1,21 @@
1
- import type { ColumnDef, ColumnFiltersState, RowSelectionState } from "@tanstack/react-table";
2
- export interface UseDataTableOptions<TData> {
1
+ import type { ColumnFiltersState, RowData, RowSelectionState } from "@tanstack/react-table";
2
+ import type { DataTableColumnDef } from "../../lib/table-features";
3
+ export interface UseDataTableOptions<TData extends RowData> {
3
4
  data: TData[];
4
- columns: ColumnDef<TData>[];
5
+ columns: DataTableColumnDef<TData>[];
5
6
  isLoading?: boolean;
6
7
  storageKey: string;
7
8
  defaultColumnOrder?: string[];
8
9
  defaultVisibleColumns?: string[];
9
10
  }
10
- export declare function useDataTable<TData>({ data, columns, isLoading, storageKey, defaultColumnOrder: defaultColumnOrderProp, defaultVisibleColumns: defaultVisibleColumnsProp, }: UseDataTableOptions<TData>): {
11
+ export declare function useDataTable<TData extends RowData>({ data, columns, isLoading, storageKey, defaultColumnOrder: defaultColumnOrderProp, defaultVisibleColumns: defaultVisibleColumnsProp, }: UseDataTableOptions<TData>): {
11
12
  data: TData[];
12
13
  isLoading: boolean;
13
- columns: ColumnDef<TData>[];
14
+ columns: DataTableColumnDef<TData>[];
14
15
  sorting: import("@tanstack/react-table").SortingState;
15
16
  onSortingChange: import("@tanstack/react-table").OnChangeFn<import("@tanstack/react-table").SortingState>;
16
- columnVisibility: import("@tanstack/react-table").VisibilityState;
17
- onColumnVisibilityChange: import("@tanstack/react-table").OnChangeFn<import("@tanstack/react-table").VisibilityState>;
17
+ columnVisibility: import("@tanstack/react-table").ColumnVisibilityState;
18
+ onColumnVisibilityChange: import("@tanstack/react-table").OnChangeFn<import("@tanstack/react-table").ColumnVisibilityState>;
18
19
  columnOrder: string[];
19
20
  onColumnOrderChange: import("@tanstack/react-table").OnChangeFn<string[]>;
20
21
  columnFilters: ColumnFiltersState;
@@ -1,4 +1,4 @@
1
- import type { ColumnDef } from "@tanstack/react-table";
1
+ import type { DataTableColumnDef } from "../../lib/table-features";
2
2
  import type { Column, ColumnDefWithAccessorKey, EntityRecord, ExtraColumn, VssEntity } from "./types";
3
3
  export interface UseEntityColumnsOptions<TRecord extends EntityRecord = EntityRecord> {
4
4
  entity: VssEntity;
@@ -10,5 +10,5 @@ export interface UseEntityColumnsOptions<TRecord extends EntityRecord = EntityRe
10
10
  export declare function useEntityColumns<TRecord extends EntityRecord = EntityRecord>({ entity, systemFields, columnOrder: columnOrderProp, extraColumns, columnOverrides, }: UseEntityColumnsOptions<TRecord>): {
11
11
  allColumns: Column[];
12
12
  allColumnKeys: string[];
13
- columns: ColumnDef<TRecord>[];
13
+ columns: DataTableColumnDef<TRecord>[];
14
14
  };
@@ -12,11 +12,11 @@ export interface UseEntityDataTableOptions<TRecord extends EntityRecord = Entity
12
12
  export declare function useEntityDataTable<TRecord extends EntityRecord = EntityRecord>({ entity, storageKey: storageKeyProp, initialVisibleColumnCount, systemFields, columnOrder: columnOrderProp, extraColumns, columnOverrides, }: UseEntityDataTableOptions<TRecord>): {
13
13
  data: Record<string, unknown>[];
14
14
  isLoading: boolean;
15
- columns: import("@tanstack/react-table").ColumnDef<TRecord>[];
15
+ columns: import("../data-table").ColumnDef<TRecord>[];
16
16
  sorting: import("@tanstack/react-table").SortingState;
17
17
  onSortingChange: import("@tanstack/react-table").OnChangeFn<import("@tanstack/react-table").SortingState>;
18
- columnVisibility: import("@tanstack/react-table").VisibilityState;
19
- onColumnVisibilityChange: import("@tanstack/react-table").OnChangeFn<import("@tanstack/react-table").VisibilityState>;
18
+ columnVisibility: import("@tanstack/react-table").ColumnVisibilityState;
19
+ onColumnVisibilityChange: import("@tanstack/react-table").OnChangeFn<import("@tanstack/react-table").ColumnVisibilityState>;
20
20
  columnOrder: string[];
21
21
  onColumnOrderChange: import("@tanstack/react-table").OnChangeFn<string[]>;
22
22
  columnFilters: ColumnFiltersState;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uipath/apollo-vertex",
3
- "version": "1.2.0",
3
+ "version": "1.3.0",
4
4
  "description": "UiPath Apollo Vertex design system components",
5
5
  "license": "MIT",
6
6
  "keywords": [
@@ -58,7 +58,7 @@
58
58
  "@radix-ui/react-tooltip": "^1.2.8",
59
59
  "@tanstack/react-form": "^1.33.5",
60
60
  "@tanstack/react-store": "^0.11.0",
61
- "@tanstack/react-table": "^8.21.3",
61
+ "@tanstack/react-table": "^9.2.3",
62
62
  "@types/luxon": "^3.7.1",
63
63
  "class-variance-authority": "^0.7.1",
64
64
  "clsx": "^2.1.1",
@@ -0,0 +1,123 @@
1
+ ---
2
+ name: setup
3
+ description: >
4
+ Use when adding @uipath/apollo-vertex to a React app, or when an app that
5
+ already depends on it is missing the Vertex stylesheet or the agent skill
6
+ setup. Covers peer dependencies, importing the Vertex CSS, setting up
7
+ TanStack Intent so agents load the Vertex skills, and adding a rule to the
8
+ project's agent instructions. Not for building UI: load
9
+ use-vertex-components for that.
10
+ metadata:
11
+ purpose: >
12
+ Set up a React app to use Apollo Vertex and make its coding agents follow
13
+ the Vertex skills when they change UI.
14
+ type: lifecycle
15
+ library: '@uipath/apollo-vertex'
16
+ sources:
17
+ - 'UiPath/apollo-ui:packages/apollo-vertex/package.json'
18
+ - 'UiPath/apollo-ui:packages/apollo-vertex/styles/tailwind.css'
19
+ - 'UiPath/apollo-ui:apps/apollo-vertex/content/docs/getting-started.mdx'
20
+ ---
21
+
22
+ # Set up Apollo Vertex
23
+
24
+ Work from the project root and use the project's package manager (npm, pnpm,
25
+ yarn or bun) for every install. Do each step, then run the completion check.
26
+
27
+ ## 1. Install the package and its peers
28
+
29
+ Install `@uipath/apollo-vertex` if the project doesn't have it yet.
30
+
31
+ Then read `peerDependencies` in
32
+ `node_modules/@uipath/apollo-vertex/package.json` and make sure the app has
33
+ every package listed there, in a version that matches the range. Also install
34
+ every package listed in `peerDependenciesMeta`, even the ones marked optional
35
+ or missing from `peerDependencies`: the package entry imports them, so the
36
+ app's bundler fails to resolve the entry without them.
37
+
38
+ - If the app already has a peer in a version outside the range, tell the user
39
+ about the conflict instead of upgrading it on your own.
40
+ - Some `@uipath` peers are not on the public npm registry. If installing one
41
+ fails with a 404 or an authentication error, stop and ask the user for access
42
+ to UiPath's package registry. Do not install look-alike packages from npm.
43
+ - If the app doesn't use Tailwind yet, set it up for the app's bundler with
44
+ Tailwind's own install guide: install the integration, such as
45
+ `@tailwindcss/vite`, and register it in the bundler config. Installing it is
46
+ not enough.
47
+
48
+ ## 2. Import the stylesheet
49
+
50
+ Add these lines once to the app's main CSS file, the one that sets up Tailwind,
51
+ and remove its own `@import "tailwindcss";` line. If the app has no CSS file
52
+ yet, create one and import it from the app's entry point:
53
+
54
+ ```css
55
+ @import "@uipath/apollo-vertex/tailwind.css";
56
+ @source "./";
57
+ ```
58
+
59
+ `tailwind.css` includes Tailwind, the Vertex theme and the classes the Vertex
60
+ components use. Keep `@source "./";` and adjust the path if the CSS file is not
61
+ next to the app's sources. Without it, Tailwind drops the classes used in the
62
+ app's own files.
63
+
64
+ ## 3. Set up TanStack Intent
65
+
66
+ [TanStack Intent](https://tanstack.com/intent) finds the skills that ship in
67
+ `node_modules` and tells agents to load them.
68
+
69
+ 1. Add `@tanstack/intent` as a dev dependency.
70
+ 2. Add this to the project's `package.json`. If an `intent.skills` list already
71
+ exists, add `@uipath/apollo-vertex` to it instead of replacing it:
72
+
73
+ ```json
74
+ {
75
+ "intent": {
76
+ "skills": ["@uipath/apollo-vertex"]
77
+ }
78
+ }
79
+ ```
80
+
81
+ 3. Run `intent install` through the package manager, for example
82
+ `npx intent install` or `pnpm exec intent install`. It writes a skill
83
+ loading block into `AGENTS.md`, or into another agent instructions file that
84
+ already has one.
85
+ 4. Tell the user that you allowed agents to load the `@uipath/apollo-vertex`
86
+ skills, and that they can change this with `intent install --review` in a
87
+ terminal.
88
+
89
+ Without the `intent.skills` entry, `intent install` stops and asks for
90
+ permissions in an interactive terminal, which an agent can't answer.
91
+
92
+ ## 4. Add the Vertex rule to the agent instructions
93
+
94
+ `intent install` printed which file it wrote the skill loading block to. The
95
+ block starts with `<!-- intent-skills:start -->`. Add this section to that same
96
+ file, right after the block:
97
+
98
+ ```markdown
99
+ ## UI
100
+
101
+ This app uses Apollo Vertex (`@uipath/apollo-vertex`) for all UI. Before
102
+ building or changing UI, run `intent list` and load the matching
103
+ `@uipath/apollo-vertex` skills, then follow them.
104
+ ```
105
+
106
+ Write the `intent` command the way the skill loading block does, for example
107
+ `npm exec --no -- intent list`.
108
+
109
+ If that file is `AGENTS.md`, make sure Claude Code reads it too: if the
110
+ project has a `CLAUDE.md`, it must import `AGENTS.md` with an `@AGENTS.md` line,
111
+ and if there is no `CLAUDE.md`, create one that contains only `@AGENTS.md`.
112
+
113
+ ## Completion
114
+
115
+ - `intent list` shows `@uipath/apollo-vertex` with the `use-vertex-components`
116
+ skill.
117
+ - One agent instructions file has both the skill loading block and the UI
118
+ section.
119
+ - The app builds, and a Vertex component such as `Button` renders with Vertex
120
+ styling.
121
+
122
+ Then tell the user what you changed, and load `use-vertex-components` before
123
+ building any UI.
@@ -1,13 +0,0 @@
1
- import { type Table, useReactTable } from "@tanstack/react-table";
2
- /**
3
- * React Compiler compatibility wrapper for useReactTable.
4
- *
5
- * useReactTable returns a mutable object with a stable reference. The React
6
- * Compiler caches values by reference, so child components that receive the
7
- * table instance never see a "change" and skip re-renders. Spreading into a
8
- * new object on every render gives children a fresh reference while keeping
9
- * all methods intact (they are closures, not prototype methods).
10
- *
11
- * @see https://github.com/facebook/react/pull/31820
12
- */
13
- export declare function useReactTableCompat<TData>(options: Parameters<typeof useReactTable<TData>>[0]): Table<TData>;
@@ -1,9 +0,0 @@
1
- "use client";
2
- import { useReactTable } from "@tanstack/react-table";
3
- function useReactTableCompat(options) {
4
- "use no memo";
5
- return {
6
- ...useReactTable(options)
7
- };
8
- }
9
- export { useReactTableCompat };