@uipath/apollo-vertex 1.1.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.
- package/dist/lib/i18n.d.ts +2 -0
- package/dist/lib/table-features.d.ts +38 -0
- package/dist/lib/table-features.js +32 -0
- package/dist/locales/en.json +1 -0
- package/dist/registry/bar-chart/bar-chart-view.js +19 -17
- package/dist/registry/bar-chart/util/get-bar-color.js +2 -2
- package/dist/registry/calendar/calendar.js +2 -2
- package/dist/registry/chart/chart.d.ts +19 -17
- package/dist/registry/chart/chart.js +52 -20
- package/dist/registry/command/command.js +3 -0
- package/dist/registry/confidence-signal/confidence-signal-chip.js +1 -1
- package/dist/registry/data-table/data-table-column-header.d.ts +5 -4
- package/dist/registry/data-table/data-table-column-header.js +21 -18
- package/dist/registry/data-table/data-table-expand-toggle.d.ts +5 -4
- package/dist/registry/data-table/data-table-expand-toggle.js +1 -1
- package/dist/registry/data-table/data-table-filters.d.ts +4 -3
- package/dist/registry/data-table/data-table-filters.js +4 -4
- package/dist/registry/data-table/data-table-pagination.d.ts +5 -4
- package/dist/registry/data-table/data-table-pagination.js +2 -3
- package/dist/registry/data-table/data-table-search.d.ts +5 -4
- package/dist/registry/data-table/data-table-search.js +2 -2
- package/dist/registry/data-table/data-table-toolbar.d.ts +5 -4
- package/dist/registry/data-table/data-table-view-options.d.ts +5 -4
- package/dist/registry/data-table/data-table-view-options.js +2 -2
- package/dist/registry/data-table/data-table.d.ts +13 -12
- package/dist/registry/data-table/data-table.js +9 -12
- package/dist/registry/data-table/index.d.ts +3 -2
- package/dist/registry/data-table/index.js +1 -1
- package/dist/registry/filter-dropdown/filter-dropdown.d.ts +4 -4
- package/dist/registry/filter-dropdown/filter-dropdown.js +1 -1
- package/dist/registry/shell/shell-theme-provider.js +12 -6
- package/dist/registry/solution-tests/config.d.ts +5 -5
- package/dist/registry/solution-tests/solution-tests-view.js +1 -1
- package/dist/registry/sonner/sonner.d.ts +1 -1
- package/dist/registry/sonner/sonner.js +4 -4
- package/dist/registry/table-chart/table-chart-view.js +9 -5
- package/dist/registry/timeline/timeline-marker.js +2 -2
- package/dist/registry/use-data-table/types.d.ts +3 -2
- package/dist/registry/use-data-table/useColumnVisibility.d.ts +3 -3
- package/dist/registry/use-data-table/useDataTable.d.ts +8 -7
- package/dist/registry/use-data-table/useEntityColumns.d.ts +2 -2
- package/dist/registry/use-data-table/useEntityDataTable.d.ts +3 -3
- package/package.json +4 -5
- package/skills/setup/SKILL.md +123 -0
- package/dist/registry/use-data-table/useReactTableCompat.d.ts +0 -13
- package/dist/registry/use-data-table/useReactTableCompat.js +0 -9
|
@@ -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.
|
|
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 {
|
|
1
|
+
import type { RowData } from "@tanstack/react-table";
|
|
2
2
|
import type * as React from "react";
|
|
3
|
-
|
|
4
|
-
|
|
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 {
|
|
2
|
-
|
|
3
|
-
|
|
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.
|
|
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
|
|
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:
|
|
7
|
+
getFilterValue?: (value: unknown, row: DataTableRow<TData>) => string;
|
|
7
8
|
overflowVisible?: boolean;
|
|
8
9
|
}
|
|
9
10
|
}
|
|
10
|
-
interface DataTableProps<TData, TValue> {
|
|
11
|
-
columns:
|
|
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:
|
|
21
|
-
onColumnVisibilityChange: OnChangeFn<
|
|
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?:
|
|
31
|
-
globalFilterFn?:
|
|
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:
|
|
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:
|
|
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,
|
|
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 =
|
|
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
|
-
|
|
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 {
|
|
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 =
|
|
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?:
|
|
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";
|
|
@@ -42,6 +42,16 @@ const cssVarMap = {
|
|
|
42
42
|
function isValidTheme(value) {
|
|
43
43
|
return "light" === value || "dark" === value || "system" === value;
|
|
44
44
|
}
|
|
45
|
+
function useSystemDark() {
|
|
46
|
+
return useSyncExternalStore((cb)=>{
|
|
47
|
+
const mq = window.matchMedia("(prefers-color-scheme: dark)");
|
|
48
|
+
mq.addEventListener("change", cb);
|
|
49
|
+
return ()=>mq.removeEventListener("change", cb);
|
|
50
|
+
}, ()=>window.matchMedia("(prefers-color-scheme: dark)").matches, ()=>false);
|
|
51
|
+
}
|
|
52
|
+
function resolveSystemTheme(systemDark) {
|
|
53
|
+
return systemDark ? "dark" : "light";
|
|
54
|
+
}
|
|
45
55
|
function applyThemeClass(resolved) {
|
|
46
56
|
const root = window.document.documentElement;
|
|
47
57
|
root.classList.remove("light", "dark");
|
|
@@ -69,12 +79,8 @@ function ThemeProvider({ children, defaultTheme = "system", themeConfig, storage
|
|
|
69
79
|
const stored = localStorage.getItem(storageKey);
|
|
70
80
|
return isValidTheme(stored) ? stored : defaultTheme;
|
|
71
81
|
});
|
|
72
|
-
const systemDark =
|
|
73
|
-
|
|
74
|
-
mq.addEventListener("change", cb);
|
|
75
|
-
return ()=>mq.removeEventListener("change", cb);
|
|
76
|
-
}, ()=>window.matchMedia("(prefers-color-scheme: dark)").matches, ()=>false);
|
|
77
|
-
const resolvedTheme = "system" === theme ? systemDark ? "dark" : "light" : theme;
|
|
82
|
+
const systemDark = useSystemDark();
|
|
83
|
+
const resolvedTheme = "system" === theme ? resolveSystemTheme(systemDark) : theme;
|
|
78
84
|
const setTheme = (newTheme)=>{
|
|
79
85
|
localStorage.setItem(storageKey, newTheme);
|
|
80
86
|
setThemeState(newTheme);
|
|
@@ -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?:
|
|
74
|
+
subjectColumns?: DataTableColumnDef<SolutionTest>[];
|
|
75
75
|
/** Custom content (e.g. faceted filters) rendered in the test-cases table toolbar. */
|
|
76
|
-
subjectToolbarContent?: (table:
|
|
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:
|
|
102
|
-
subjectToolbarContent?: (table:
|
|
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,4 +1,4 @@
|
|
|
1
1
|
import { type ToasterProps } from "sonner";
|
|
2
2
|
export declare const apolloToastClassNames: NonNullable<NonNullable<ToasterProps["toastOptions"]>["classNames"]>;
|
|
3
|
-
declare const Toaster: ({ ...props }: ToasterProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
declare const Toaster: ({ theme: _theme, ...props }: ToasterProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
export { Toaster };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
3
|
import { CircleCheckIcon, InfoIcon, Loader2Icon, OctagonXIcon, TriangleAlertIcon } from "lucide-react";
|
|
4
|
-
import { useTheme } from "next-themes";
|
|
5
4
|
import { Toaster } from "sonner";
|
|
5
|
+
import { useTheme } from "../shell/shell-theme-provider.js";
|
|
6
6
|
const iconAlign = "[&>[data-icon]]:!items-start [&>[data-icon]>svg]:!mt-0.5";
|
|
7
7
|
const statusTextClasses = "[&>[data-icon]>svg]:!text-[oklch(0.166_0.0283_203.34)] dark:[&>[data-icon]>svg]:!text-foreground [&_[data-title]]:!text-[oklch(0.166_0.0283_203.34)] dark:[&_[data-title]]:!text-foreground [&_[data-description]]:!text-[oklch(0.166_0.0283_203.34)] dark:[&_[data-description]]:!text-foreground [&_[data-close-button]]:!text-[oklch(0.166_0.0283_203.34)] dark:[&_[data-close-button]]:!text-foreground";
|
|
8
8
|
const apolloToastClassNames = {
|
|
@@ -12,10 +12,10 @@ const apolloToastClassNames = {
|
|
|
12
12
|
error: `!border-destructive !bg-[color-mix(in_srgb,var(--destructive)_50%,var(--card)_50%)] dark:!bg-[color-mix(in_srgb,var(--destructive)_50%,var(--popover)_50%)] ${statusTextClasses} ${iconAlign}`,
|
|
13
13
|
closeButton: "!left-auto !right-2 !top-2 !transform-none !border-none !bg-transparent !rounded-sm"
|
|
14
14
|
};
|
|
15
|
-
const sonner_Toaster = ({ ...props })=>{
|
|
16
|
-
const {
|
|
15
|
+
const sonner_Toaster = ({ theme: _theme, ...props })=>{
|
|
16
|
+
const { resolvedTheme } = useTheme();
|
|
17
17
|
return /*#__PURE__*/ jsx(Toaster, {
|
|
18
|
-
theme:
|
|
18
|
+
theme: resolvedTheme,
|
|
19
19
|
className: "toaster group",
|
|
20
20
|
position: "top-center",
|
|
21
21
|
duration: 5000,
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { flexRender,
|
|
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 =
|
|
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:
|
|
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 {
|
|
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> =
|
|
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 {
|
|
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:
|
|
9
|
-
onColumnVisibilityChange: OnChangeFn<
|
|
8
|
+
columnVisibility: ColumnVisibilityState;
|
|
9
|
+
onColumnVisibilityChange: OnChangeFn<ColumnVisibilityState>;
|
|
10
10
|
};
|
|
@@ -1,20 +1,21 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
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:
|
|
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:
|
|
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").
|
|
17
|
-
onColumnVisibilityChange: import("@tanstack/react-table").OnChangeFn<import("@tanstack/react-table").
|
|
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 {
|
|
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:
|
|
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("
|
|
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").
|
|
19
|
-
onColumnVisibilityChange: import("@tanstack/react-table").OnChangeFn<import("@tanstack/react-table").
|
|
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.
|
|
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": "^
|
|
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",
|
|
@@ -68,7 +68,6 @@
|
|
|
68
68
|
"input-otp": "^1.4.2",
|
|
69
69
|
"lucide-react": "^0.577.0",
|
|
70
70
|
"luxon": "^3.7.1",
|
|
71
|
-
"next-themes": "^0.4.6",
|
|
72
71
|
"react-day-picker": "^9.13.0",
|
|
73
72
|
"react-joyride": "^3.0.2",
|
|
74
73
|
"react-resizable-panels": "^4.7.3",
|
|
@@ -95,7 +94,7 @@
|
|
|
95
94
|
"react-error-boundary": "^6.0.0",
|
|
96
95
|
"react-i18next": "^16.5.4 || ^17.0.0",
|
|
97
96
|
"react-markdown": "^10.1.0",
|
|
98
|
-
"recharts": "^
|
|
97
|
+
"recharts": "^3.8.0",
|
|
99
98
|
"remark-breaks": "^4.0.0",
|
|
100
99
|
"remark-gfm": "^4.0.1",
|
|
101
100
|
"tailwindcss": "^4.0.0"
|
|
@@ -143,7 +142,7 @@
|
|
|
143
142
|
"react-error-boundary": "^6.0.0",
|
|
144
143
|
"react-i18next": "^17.0.15",
|
|
145
144
|
"react-markdown": "^10.1.0",
|
|
146
|
-
"recharts": "
|
|
145
|
+
"recharts": "3.8.0",
|
|
147
146
|
"remark-breaks": "^4.0.0",
|
|
148
147
|
"remark-gfm": "^4.0.1",
|
|
149
148
|
"tailwindcss": "^4.1.17",
|