@uipath/apollo-vertex 1.2.0 → 1.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.
- package/dist/lib/i18n.d.ts +10 -0
- package/dist/lib/table-features.d.ts +38 -0
- package/dist/lib/table-features.js +32 -0
- package/dist/locales/en.json +5 -0
- package/dist/registry/calendar/calendar.js +2 -2
- 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-company.js +2 -1
- package/dist/registry/shell/shell-locale-provider.d.ts +2 -1
- package/dist/registry/shell/shell-locale-provider.js +12 -8
- package/dist/registry/shell/shell-minimal-nav-item.d.ts +4 -3
- package/dist/registry/shell/shell-minimal-nav-item.js +3 -7
- package/dist/registry/shell/shell-nav-active.d.ts +12 -0
- package/dist/registry/shell/shell-nav-active.js +24 -0
- package/dist/registry/shell/shell-nav-label.d.ts +7 -0
- package/dist/registry/shell/shell-nav-label.js +54 -0
- package/dist/registry/shell/shell-sidebar.js +126 -114
- package/dist/registry/shell/shell-text.d.ts +2 -2
- package/dist/registry/shell/shell-text.js +3 -2
- package/dist/registry/shell/shell-translation-key.d.ts +5 -0
- package/dist/registry/shell/shell.d.ts +6 -3
- package/dist/registry/shell/shell.js +18 -13
- package/dist/registry/solution-tests/config.d.ts +5 -5
- package/dist/registry/solution-tests/solution-tests-view.js +1 -1
- 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 +2 -2
- 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,6 +1,6 @@
|
|
|
1
1
|
import type { LucideIcon } from "lucide-react";
|
|
2
2
|
import type { FC, PropsWithChildren } from "react";
|
|
3
|
-
import type {
|
|
3
|
+
import type { ShellNavLabel } from "./shell-translation-key";
|
|
4
4
|
export interface CompanyLogo {
|
|
5
5
|
url: string;
|
|
6
6
|
darkUrl?: string;
|
|
@@ -9,11 +9,13 @@ export interface CompanyLogo {
|
|
|
9
9
|
}
|
|
10
10
|
export interface ShellSubNavItem {
|
|
11
11
|
path: string;
|
|
12
|
-
|
|
12
|
+
to?: string;
|
|
13
|
+
label: ShellNavLabel;
|
|
13
14
|
}
|
|
14
15
|
export interface ShellNavItem {
|
|
15
16
|
path: string;
|
|
16
|
-
|
|
17
|
+
to?: string;
|
|
18
|
+
label: ShellNavLabel;
|
|
17
19
|
icon: LucideIcon;
|
|
18
20
|
subItems?: ShellSubNavItem[];
|
|
19
21
|
}
|
|
@@ -24,5 +26,6 @@ export interface ApolloShellProps extends PropsWithChildren {
|
|
|
24
26
|
companyLogo?: CompanyLogo;
|
|
25
27
|
navItems: ShellNavItem[];
|
|
26
28
|
loginDescription?: string;
|
|
29
|
+
configureI18n?: () => Promise<void>;
|
|
27
30
|
}
|
|
28
31
|
export declare const ApolloShell: FC<ApolloShellProps>;
|
|
@@ -7,9 +7,23 @@ import { ShellLayout } from "./shell-layout.js";
|
|
|
7
7
|
import { LocaleProvider } from "./shell-locale-provider.js";
|
|
8
8
|
import { ShellLogin } from "./shell-login.js";
|
|
9
9
|
import { ShellUserProvider } from "./shell-user-provider.js";
|
|
10
|
+
function ShellLoadingSkeleton() {
|
|
11
|
+
return /*#__PURE__*/ jsxs("div", {
|
|
12
|
+
className: "flex h-screen gap-4 p-4 bg-background dark:bg-sidebar",
|
|
13
|
+
children: [
|
|
14
|
+
/*#__PURE__*/ jsx(Skeleton, {
|
|
15
|
+
className: "h-full w-[280px]"
|
|
16
|
+
}),
|
|
17
|
+
/*#__PURE__*/ jsx(Skeleton, {
|
|
18
|
+
className: "h-full flex-1 rounded-lg"
|
|
19
|
+
})
|
|
20
|
+
]
|
|
21
|
+
});
|
|
22
|
+
}
|
|
10
23
|
const ApolloShellContent = ({ children, companyName, productName, companyLogo, variant, navItems, loginDescription })=>{
|
|
11
24
|
const authContext = useContext(AuthContext);
|
|
12
|
-
const { accessToken } = useAuth();
|
|
25
|
+
const { accessToken, isLoading } = useAuth();
|
|
26
|
+
if (authContext && isLoading) return /*#__PURE__*/ jsx(ShellLoadingSkeleton, {});
|
|
13
27
|
if (authContext && !accessToken) return /*#__PURE__*/ jsx(ShellLogin, {
|
|
14
28
|
title: productName,
|
|
15
29
|
description: loginDescription
|
|
@@ -25,18 +39,9 @@ const ApolloShellContent = ({ children, companyName, productName, companyLogo, v
|
|
|
25
39
|
})
|
|
26
40
|
});
|
|
27
41
|
};
|
|
28
|
-
const ApolloShell = ({ children, companyName, productName, companyLogo, variant, navItems, loginDescription })=>/*#__PURE__*/ jsx(LocaleProvider, {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
children: [
|
|
32
|
-
/*#__PURE__*/ jsx(Skeleton, {
|
|
33
|
-
className: "h-full w-[280px]"
|
|
34
|
-
}),
|
|
35
|
-
/*#__PURE__*/ jsx(Skeleton, {
|
|
36
|
-
className: "h-full flex-1 rounded-lg"
|
|
37
|
-
})
|
|
38
|
-
]
|
|
39
|
-
}),
|
|
42
|
+
const ApolloShell = ({ children, companyName, productName, companyLogo, variant, navItems, loginDescription, configureI18n })=>/*#__PURE__*/ jsx(LocaleProvider, {
|
|
43
|
+
configureI18n: configureI18n,
|
|
44
|
+
loadingElement: /*#__PURE__*/ jsx(ShellLoadingSkeleton, {}),
|
|
40
45
|
children: /*#__PURE__*/ jsx(ApolloShellContent, {
|
|
41
46
|
companyName: companyName,
|
|
42
47
|
productName: productName,
|
|
@@ -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,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.4.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",
|
|
@@ -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>;
|