@prefecthq/prefect-ui-library 2.2.2 → 2.2.4
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/{FlowRunsPageWithDefaultFilter-8cfdc0d6.mjs → FlowRunsPageWithDefaultFilter-614b705e.mjs} +2 -2
- package/dist/{FlowRunsPageWithDefaultFilter-8cfdc0d6.mjs.map → FlowRunsPageWithDefaultFilter-614b705e.mjs.map} +1 -1
- package/dist/{index-e93ba0ff.mjs → index-b5f2e26b.mjs} +19923 -19854
- package/dist/index-b5f2e26b.mjs.map +1 -0
- package/dist/prefect-ui-library.mjs +1 -1
- package/dist/prefect-ui-library.umd.js +77 -77
- package/dist/prefect-ui-library.umd.js.map +1 -1
- package/dist/types/src/compositions/usePagination.d.ts +1 -2
- package/dist/types/src/compositions/useSubscriptions.d.ts +2 -1
- package/dist/types/src/maps/index.d.ts +6 -0
- package/dist/types/src/maps/runGraphData.d.ts +5 -0
- package/dist/types/src/models/api/RunGraphDataResponse.d.ts +19 -0
- package/dist/types/src/services/Mapper.d.ts +6 -0
- package/package.json +7 -7
- package/dist/index-e93ba0ff.mjs.map +0 -1
|
@@ -9,7 +9,6 @@ type PaginationFilter = {
|
|
|
9
9
|
type PaginationParameters = [filter?: PaginationFilter, ...any[]];
|
|
10
10
|
type PaginationFetchAction = (...parameters: PaginationParameters) => Promise<unknown[]>;
|
|
11
11
|
type PaginationCountAction = (...parameters: PaginationParameters) => Promise<number>;
|
|
12
|
-
type FetchSubscriptionAction<TFetch extends PaginationFetchAction> = (parameters: Parameters<TFetch>[]) => Promise<Awaited<ReturnType<TFetch>>>;
|
|
13
12
|
export type PaginationOptions = SubscriptionOptions & {
|
|
14
13
|
mode?: 'page' | 'infinite';
|
|
15
14
|
page?: MaybeRef<number>;
|
|
@@ -25,7 +24,7 @@ export type UsePaginationEntity<TFetch extends PaginationFetchAction, TCount ext
|
|
|
25
24
|
[P in TProperty]: ComputedRef<Awaited<ReturnType<TFetch>>>;
|
|
26
25
|
};
|
|
27
26
|
export type UsePagination<TFetch extends PaginationFetchAction, TCount extends PaginationCountAction> = {
|
|
28
|
-
subscriptions: UseSubscriptions<TCount |
|
|
27
|
+
subscriptions: UseSubscriptions<TCount | TFetch | (() => undefined)>['subscriptions'];
|
|
29
28
|
results: ComputedRef<Awaited<ReturnType<TFetch>>>;
|
|
30
29
|
total: ComputedRef<number>;
|
|
31
30
|
pages: ComputedRef<number>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Action, UseSubscription } from '@prefecthq/vue-compositions';
|
|
2
|
+
import { MaybeRefOrGetter } from 'vue';
|
|
2
3
|
type ExtractAction<T extends readonly UseSubscription<Action>[]> = {
|
|
3
4
|
[K in keyof T]: T[K] extends UseSubscription<infer V> ? V : never;
|
|
4
5
|
};
|
|
@@ -8,5 +9,5 @@ export type UseSubscriptions<T extends Action> = {
|
|
|
8
9
|
errors: UseSubscription<T>['error'][];
|
|
9
10
|
};
|
|
10
11
|
};
|
|
11
|
-
export declare function useSubscriptions<T extends UseSubscription<Action>[]>(subscriptions: T): UseSubscriptions<ExtractAction<T>[number]>;
|
|
12
|
+
export declare function useSubscriptions<T extends UseSubscription<Action>[]>(subscriptions: MaybeRefOrGetter<T>): UseSubscriptions<ExtractAction<T>[number]>;
|
|
12
13
|
export {};
|
|
@@ -188,6 +188,12 @@ export declare const maps: {
|
|
|
188
188
|
PrefectWorkerCollectionResponse: {
|
|
189
189
|
WorkerCollectionItem: import("..").MapFunction<import("..").PrefectWorkerCollectionResponse, import("..").WorkerCollectionItem[]>;
|
|
190
190
|
};
|
|
191
|
+
RunGraphDataResponse: {
|
|
192
|
+
RunGraphData: import("..").MapFunction<import("../models/api/RunGraphDataResponse").RunGraphDataResponse, import("@prefecthq/graphs").RunGraphData>;
|
|
193
|
+
};
|
|
194
|
+
RunGraphNodeResponse: {
|
|
195
|
+
RunGraphNode: import("..").MapFunction<import("../models/api/RunGraphDataResponse").RunGraphNodeResponse, import("@prefecthq/graphs").RunGraphNode>;
|
|
196
|
+
};
|
|
191
197
|
RunHistory: {
|
|
192
198
|
FlowRunHistoryResponse: import("..").MapFunction<import("..").RunHistory, import("..").FlowRunHistoryResponse>;
|
|
193
199
|
DivergingBarChartItem: import("..").MapFunction<import("..").RunHistory, import("@prefecthq/vue-charts").DivergingBarChartItem>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { RunGraphData, RunGraphNode } from '@prefecthq/graphs';
|
|
2
|
+
import { RunGraphDataResponse, RunGraphNodeResponse } from '../models/api/RunGraphDataResponse';
|
|
3
|
+
import { MapFunction } from '../services/Mapper';
|
|
4
|
+
export declare const mapRunGraphNodeResponse: MapFunction<RunGraphNodeResponse, RunGraphNode>;
|
|
5
|
+
export declare const mapRunGraphDataResponse: MapFunction<RunGraphDataResponse, RunGraphData>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { RunGraphEdge, RunGraphNodeKind } from '@prefecthq/graphs';
|
|
2
|
+
import { ServerStateType } from '../../models/StateType';
|
|
3
|
+
export type RunGraphDataResponse = {
|
|
4
|
+
start_time: string;
|
|
5
|
+
end_time: string | null;
|
|
6
|
+
root_node_ids: string[];
|
|
7
|
+
nodes: [string, RunGraphNodeResponse][];
|
|
8
|
+
};
|
|
9
|
+
export type RunGraphNodeResponse = {
|
|
10
|
+
kind: RunGraphNodeKind;
|
|
11
|
+
id: string;
|
|
12
|
+
label: string;
|
|
13
|
+
state_name: string;
|
|
14
|
+
state_type: ServerStateType;
|
|
15
|
+
start_time: string;
|
|
16
|
+
end_time: string | null;
|
|
17
|
+
parents: RunGraphEdge[];
|
|
18
|
+
children: RunGraphEdge[];
|
|
19
|
+
};
|
|
@@ -212,6 +212,12 @@ export declare const mapper: Mapper<{
|
|
|
212
212
|
PrefectWorkerCollectionResponse: {
|
|
213
213
|
WorkerCollectionItem: MapFunction<import("..").PrefectWorkerCollectionResponse, import("..").WorkerCollectionItem[]>;
|
|
214
214
|
};
|
|
215
|
+
RunGraphDataResponse: {
|
|
216
|
+
RunGraphData: MapFunction<import("../models/api/RunGraphDataResponse").RunGraphDataResponse, import("@prefecthq/graphs").RunGraphData>;
|
|
217
|
+
};
|
|
218
|
+
RunGraphNodeResponse: {
|
|
219
|
+
RunGraphNode: MapFunction<import("../models/api/RunGraphDataResponse").RunGraphNodeResponse, import("@prefecthq/graphs").RunGraphNode>;
|
|
220
|
+
};
|
|
215
221
|
RunHistory: {
|
|
216
222
|
FlowRunHistoryResponse: MapFunction<import("..").RunHistory, import("..").FlowRunHistoryResponse>;
|
|
217
223
|
DivergingBarChartItem: MapFunction<import("..").RunHistory, import("@prefecthq/vue-charts").DivergingBarChartItem>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prefecthq/prefect-ui-library",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.4",
|
|
4
4
|
"private": false,
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -45,9 +45,9 @@
|
|
|
45
45
|
"@types/lodash.camelcase": "4.3.9",
|
|
46
46
|
"@types/lodash.debounce": "4.0.9",
|
|
47
47
|
"@types/lodash.merge": "4.6.9",
|
|
48
|
-
"@types/node": "^20.
|
|
49
|
-
"@types/prismjs": "^1.26.
|
|
50
|
-
"@vitejs/plugin-vue": "4.4.
|
|
48
|
+
"@types/node": "^20.9.0",
|
|
49
|
+
"@types/prismjs": "^1.26.3",
|
|
50
|
+
"@vitejs/plugin-vue": "4.4.1",
|
|
51
51
|
"auto-changelog": "^2.4.0",
|
|
52
52
|
"autoprefixer": "10.4.16",
|
|
53
53
|
"eslint": "8.53.0",
|
|
@@ -71,10 +71,10 @@
|
|
|
71
71
|
"vue-router": "^4.0.12"
|
|
72
72
|
},
|
|
73
73
|
"dependencies": {
|
|
74
|
-
"@prefecthq/graphs": "2.1.
|
|
75
|
-
"@types/lodash.isequal": "4.5.
|
|
74
|
+
"@prefecthq/graphs": "2.1.7",
|
|
75
|
+
"@types/lodash.isequal": "4.5.8",
|
|
76
76
|
"axios": "0.27.2",
|
|
77
|
-
"cronstrue": "^2.
|
|
77
|
+
"cronstrue": "^2.43.0",
|
|
78
78
|
"d3": "7.8.5",
|
|
79
79
|
"date-fns": "2.30.0",
|
|
80
80
|
"date-fns-tz": "1.3.7",
|