@prefecthq/prefect-ui-library 3.0.1 → 3.0.2
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/{RunsPageWithDefaultFilter-BVqNQC5v.mjs → RunsPageWithDefaultFilter-BCl1-RE3.mjs} +2 -2
- package/dist/{RunsPageWithDefaultFilter-BVqNQC5v.mjs.map → RunsPageWithDefaultFilter-BCl1-RE3.mjs.map} +1 -1
- package/dist/{index-DrOXvI63.mjs → index-O7uqAfLu.mjs} +16 -3
- package/dist/{index-DrOXvI63.mjs.map → index-O7uqAfLu.mjs.map} +1 -1
- package/dist/prefect-ui-library.mjs +1 -1
- package/dist/prefect-ui-library.umd.js +1 -1
- package/dist/prefect-ui-library.umd.js.map +1 -1
- package/dist/types/src/router/index.d.ts +2 -1
- package/dist/types/src/router/routes.d.ts +1 -0
- package/package.json +1 -1
- package/src/router/index.ts +15 -2
- package/src/router/routes.ts +1 -0
|
@@ -6,7 +6,8 @@ export type Route = Exclude<RouteLocationRaw, string>;
|
|
|
6
6
|
type WorkspaceRoutes = ReturnType<typeof createWorkspaceRoutes>;
|
|
7
7
|
type WorkspaceRouteKey = keyof WorkspaceRoutes;
|
|
8
8
|
type WorkspaceRoute = ReturnType<WorkspaceRoutes[WorkspaceRouteKey]>;
|
|
9
|
-
export type
|
|
9
|
+
export type DeprecatedNamedRoutes = 'workspace.flow-runs' | 'workspace.flow-runs.flow-run' | 'workspace.flow-runs.task-run';
|
|
10
|
+
export type WorkspaceNamedRoute = WorkspaceRoute['name'] | DeprecatedNamedRoutes;
|
|
10
11
|
type WorkspaceRouteRecordParent = {
|
|
11
12
|
name?: WorkspaceNamedRoute;
|
|
12
13
|
children: WorkspaceRouteRecord[];
|
|
@@ -77,6 +77,7 @@ export declare function createWorkspaceRoutes(config?: CreateWorkspaceRoutesConf
|
|
|
77
77
|
tab?: string | undefined;
|
|
78
78
|
} | undefined;
|
|
79
79
|
};
|
|
80
|
+
/** @deprecated use workspace.runs instead */
|
|
80
81
|
flowRuns: () => {
|
|
81
82
|
readonly name: "workspace.flow-runs";
|
|
82
83
|
readonly params: {
|
package/package.json
CHANGED
package/src/router/index.ts
CHANGED
|
@@ -9,7 +9,8 @@ type WorkspaceRoutes = ReturnType<typeof createWorkspaceRoutes>
|
|
|
9
9
|
type WorkspaceRouteKey = keyof WorkspaceRoutes
|
|
10
10
|
type WorkspaceRoute = ReturnType<WorkspaceRoutes[WorkspaceRouteKey]>
|
|
11
11
|
|
|
12
|
-
export type
|
|
12
|
+
export type DeprecatedNamedRoutes = 'workspace.flow-runs' | 'workspace.flow-runs.flow-run' | 'workspace.flow-runs.task-run'
|
|
13
|
+
export type WorkspaceNamedRoute = WorkspaceRoute['name'] | DeprecatedNamedRoutes
|
|
13
14
|
|
|
14
15
|
type WorkspaceRouteRecordParent = { name?: WorkspaceNamedRoute, children: WorkspaceRouteRecord[] }
|
|
15
16
|
type WorkspaceRouteRecordChild = { name: WorkspaceNamedRoute }
|
|
@@ -54,7 +55,19 @@ export function createWorkspaceRouteRecords(components: Partial<WorkspaceRouteCo
|
|
|
54
55
|
{
|
|
55
56
|
path: 'flow-runs',
|
|
56
57
|
name: 'workspace.flow-runs',
|
|
57
|
-
redirect: { name: 'workspace.runs' },
|
|
58
|
+
redirect: to => ({ name: 'workspace.runs', query: to.query, params: to.params }),
|
|
59
|
+
children: [
|
|
60
|
+
{
|
|
61
|
+
name: 'workspace.flow-runs.flow-run',
|
|
62
|
+
path: 'flow-run/:flowRunId',
|
|
63
|
+
redirect: to => ({ name: 'workspace.runs.flow-run', query: to.query, params: to.params }),
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
name: 'workspace.flow-runs.task-run',
|
|
67
|
+
path: 'task-run/:taskRunId',
|
|
68
|
+
redirect: to => ({ name: 'workspace.runs.task-run', query: to.query, params: to.params }),
|
|
69
|
+
},
|
|
70
|
+
],
|
|
58
71
|
},
|
|
59
72
|
{
|
|
60
73
|
path: 'flows',
|
package/src/router/routes.ts
CHANGED
|
@@ -26,6 +26,7 @@ export function createWorkspaceRoutes(config?: CreateWorkspaceRoutesConfig) {
|
|
|
26
26
|
artifacts: () => ({ name: 'workspace.artifacts', params: { ...config } }) as const,
|
|
27
27
|
dashboard: () => ({ name: 'workspace.dashboard', params: { ...config } }) as const,
|
|
28
28
|
runs: (query?: { tab?: string }) => ({ name: 'workspace.runs', params: { ...config }, query }) as const,
|
|
29
|
+
/** @deprecated use workspace.runs instead */
|
|
29
30
|
flowRuns: () => ({ name: 'workspace.flow-runs', params: { ...config } }) as const,
|
|
30
31
|
flowRun: (flowRunId: string) => ({ name: 'workspace.runs.flow-run', params: { flowRunId, ...config } }) as const,
|
|
31
32
|
taskRun: (taskRunId: string) => ({ name: 'workspace.runs.task-run', params: { taskRunId, ...config } }) as const,
|