@prefecthq/graphs 1.0.3 → 1.0.5
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/assets/nodeLayout.worker-30c2c715.js.map +1 -0
- package/dist/graphs.mjs +4 -3
- package/dist/graphs.umd.js +57 -57
- package/dist/graphs.umd.js.map +1 -1
- package/dist/{index-77c40057.mjs → index-cd02333f.mjs} +3521 -3493
- package/dist/index-cd02333f.mjs.map +1 -0
- package/dist/types/src/FlowRunTimeline.vue.d.ts +14 -2
- package/dist/types/src/models/FlowRunTimeline.d.ts +11 -2
- package/dist/types/src/pixiFunctions/timelineGuide.d.ts +5 -9
- package/dist/types/src/pixiFunctions/timelineGuides.d.ts +8 -19
- package/dist/types/src/pixiFunctions/timelineNodes.d.ts +2 -0
- package/dist/{viewport.es-ff98659c.mjs → viewport.es-14935be0.mjs} +2 -2
- package/dist/{viewport.es-ff98659c.mjs.map → viewport.es-14935be0.mjs.map} +1 -1
- package/package.json +1 -1
- package/dist/assets/nodeLayout.worker-eea3d42c.js.map +0 -1
- package/dist/index-77c40057.mjs.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { GraphTimelineNode, TimelineThemeOptions, FormatDateFns, TimelineNodesLayoutOptions, CenterViewportOptions, ExpandedSubNodes, NodeSelectionEvent } from './models';
|
|
1
|
+
import { GraphTimelineNode, TimelineThemeOptions, FormatDateFns, TimelineNodesLayoutOptions, CenterViewportOptions, ExpandedSubNodes, NodeSelectionEvent, TimelineVisibleDateRange } from './models';
|
|
2
2
|
declare const _default: {
|
|
3
3
|
new (...args: any[]): {
|
|
4
4
|
$: import("vue").ComponentInternalInstance;
|
|
@@ -13,9 +13,11 @@ declare const _default: {
|
|
|
13
13
|
hideEdges?: boolean | undefined;
|
|
14
14
|
subNodeLabels?: Map<string, string> | undefined;
|
|
15
15
|
expandedSubNodes?: ExpandedSubNodes<Record<string, unknown>> | undefined;
|
|
16
|
+
visibleDateRange?: TimelineVisibleDateRange | undefined;
|
|
16
17
|
}>>> & {
|
|
17
18
|
onSelection?: ((value: NodeSelectionEvent | null) => any) | undefined;
|
|
18
19
|
onSubNodeToggle?: ((value: string) => any) | undefined;
|
|
20
|
+
"onUpdate:visibleDateRange"?: ((value: TimelineVisibleDateRange | undefined) => any) | undefined;
|
|
19
21
|
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>;
|
|
20
22
|
$attrs: {
|
|
21
23
|
[x: string]: unknown;
|
|
@@ -28,7 +30,7 @@ declare const _default: {
|
|
|
28
30
|
}>;
|
|
29
31
|
$root: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> | null;
|
|
30
32
|
$parent: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> | null;
|
|
31
|
-
$emit: ((event: "selection", value: NodeSelectionEvent | null) => void) & ((event: "subNodeToggle", value: string) => void);
|
|
33
|
+
$emit: ((event: "selection", value: NodeSelectionEvent | null) => void) & ((event: "subNodeToggle", value: string) => void) & ((event: "update:visibleDateRange", value: TimelineVisibleDateRange | undefined) => void);
|
|
32
34
|
$el: any;
|
|
33
35
|
$options: import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
34
36
|
graphData: GraphTimelineNode[];
|
|
@@ -40,9 +42,11 @@ declare const _default: {
|
|
|
40
42
|
hideEdges?: boolean | undefined;
|
|
41
43
|
subNodeLabels?: Map<string, string> | undefined;
|
|
42
44
|
expandedSubNodes?: ExpandedSubNodes<Record<string, unknown>> | undefined;
|
|
45
|
+
visibleDateRange?: TimelineVisibleDateRange | undefined;
|
|
43
46
|
}>>> & {
|
|
44
47
|
onSelection?: ((value: NodeSelectionEvent | null) => any) | undefined;
|
|
45
48
|
onSubNodeToggle?: ((value: string) => any) | undefined;
|
|
49
|
+
"onUpdate:visibleDateRange"?: ((value: TimelineVisibleDateRange | undefined) => any) | undefined;
|
|
46
50
|
}, {
|
|
47
51
|
centerViewport: ({ skipAnimation }?: CenterViewportOptions) => void;
|
|
48
52
|
moveViewportCenter: ({ xOffset, yOffset }: {
|
|
@@ -53,6 +57,8 @@ declare const _default: {
|
|
|
53
57
|
selection: (value: NodeSelectionEvent | null) => void;
|
|
54
58
|
} & {
|
|
55
59
|
subNodeToggle: (value: string) => void;
|
|
60
|
+
} & {
|
|
61
|
+
"update:visibleDateRange": (value: TimelineVisibleDateRange | undefined) => void;
|
|
56
62
|
}, string, {}, {}, string> & {
|
|
57
63
|
beforeCreate?: ((() => void) | (() => void)[]) | undefined;
|
|
58
64
|
created?: ((() => void) | (() => void)[]) | undefined;
|
|
@@ -83,9 +89,11 @@ declare const _default: {
|
|
|
83
89
|
hideEdges?: boolean | undefined;
|
|
84
90
|
subNodeLabels?: Map<string, string> | undefined;
|
|
85
91
|
expandedSubNodes?: ExpandedSubNodes<Record<string, unknown>> | undefined;
|
|
92
|
+
visibleDateRange?: TimelineVisibleDateRange | undefined;
|
|
86
93
|
}>>> & {
|
|
87
94
|
onSelection?: ((value: NodeSelectionEvent | null) => any) | undefined;
|
|
88
95
|
onSubNodeToggle?: ((value: string) => any) | undefined;
|
|
96
|
+
"onUpdate:visibleDateRange"?: ((value: TimelineVisibleDateRange | undefined) => any) | undefined;
|
|
89
97
|
} & import("vue").ShallowUnwrapRef<{
|
|
90
98
|
centerViewport: ({ skipAnimation }?: CenterViewportOptions) => void;
|
|
91
99
|
moveViewportCenter: ({ xOffset, yOffset }: {
|
|
@@ -106,9 +114,11 @@ declare const _default: {
|
|
|
106
114
|
hideEdges?: boolean | undefined;
|
|
107
115
|
subNodeLabels?: Map<string, string> | undefined;
|
|
108
116
|
expandedSubNodes?: ExpandedSubNodes<Record<string, unknown>> | undefined;
|
|
117
|
+
visibleDateRange?: TimelineVisibleDateRange | undefined;
|
|
109
118
|
}>>> & {
|
|
110
119
|
onSelection?: ((value: NodeSelectionEvent | null) => any) | undefined;
|
|
111
120
|
onSubNodeToggle?: ((value: string) => any) | undefined;
|
|
121
|
+
"onUpdate:visibleDateRange"?: ((value: TimelineVisibleDateRange | undefined) => any) | undefined;
|
|
112
122
|
}, {
|
|
113
123
|
centerViewport: ({ skipAnimation }?: CenterViewportOptions) => void;
|
|
114
124
|
moveViewportCenter: ({ xOffset, yOffset }: {
|
|
@@ -119,6 +129,8 @@ declare const _default: {
|
|
|
119
129
|
selection: (value: NodeSelectionEvent | null) => void;
|
|
120
130
|
} & {
|
|
121
131
|
subNodeToggle: (value: string) => void;
|
|
132
|
+
} & {
|
|
133
|
+
"update:visibleDateRange": (value: TimelineVisibleDateRange | undefined) => void;
|
|
122
134
|
}, string, {}, {}, string> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
|
|
123
135
|
export default _default;
|
|
124
136
|
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
@@ -5,17 +5,26 @@ import type { ComputedRef } from 'vue';
|
|
|
5
5
|
export type GraphTimelineNode = {
|
|
6
6
|
id: string;
|
|
7
7
|
label: string;
|
|
8
|
-
start
|
|
8
|
+
start?: Date;
|
|
9
9
|
end: Date | null;
|
|
10
10
|
state: string;
|
|
11
11
|
upstreamDependencies?: string[];
|
|
12
12
|
subFlowRunId?: string;
|
|
13
13
|
};
|
|
14
|
+
export declare function hasStartAndEndDates(node: GraphTimelineNode): node is GraphTimelineNode & {
|
|
15
|
+
start: Date;
|
|
16
|
+
end: Date;
|
|
17
|
+
};
|
|
14
18
|
export type InitTimelineScaleProps = {
|
|
15
19
|
minimumStartTime: number;
|
|
16
20
|
graphXDomain: number;
|
|
17
21
|
initialOverallTimeSpan: number;
|
|
18
22
|
};
|
|
23
|
+
export type TimelineVisibleDateRange = {
|
|
24
|
+
startDate: Date;
|
|
25
|
+
endDate: Date;
|
|
26
|
+
internalOrigin?: boolean;
|
|
27
|
+
};
|
|
19
28
|
export type TimelineNodesLayoutOptions = 'waterfall' | 'nearestParent';
|
|
20
29
|
export type NodeSelectionEventTypes = 'task' | 'subFlowRun';
|
|
21
30
|
export type NodeSelectionEvent = {
|
|
@@ -72,7 +81,7 @@ export type GraphState = {
|
|
|
72
81
|
centerViewport: (options?: CenterViewportOptions) => void;
|
|
73
82
|
};
|
|
74
83
|
export type DateToX = (date: Date) => number;
|
|
75
|
-
export type XToDate = (xPosition: number) =>
|
|
84
|
+
export type XToDate = (xPosition: number) => Date;
|
|
76
85
|
export type TimelineScale = {
|
|
77
86
|
dateToX: DateToX;
|
|
78
87
|
xToDate: XToDate;
|
|
@@ -1,24 +1,20 @@
|
|
|
1
|
-
import { Cull } from '@pixi-essentials/cull';
|
|
2
1
|
import { Application, Container } from 'pixi.js';
|
|
3
2
|
import { ComputedRef } from 'vue';
|
|
4
3
|
import { ParsedThemeStyles } from '../models';
|
|
5
4
|
type TimelineGuideProps = {
|
|
6
|
-
|
|
5
|
+
pixiApp: Application;
|
|
7
6
|
labelText: string | null;
|
|
8
|
-
|
|
9
|
-
cull: Cull;
|
|
7
|
+
styleOptions: ComputedRef<ParsedThemeStyles>;
|
|
10
8
|
};
|
|
11
9
|
export declare class TimelineGuide extends Container {
|
|
12
|
-
private readonly
|
|
10
|
+
private readonly pixiApp;
|
|
13
11
|
private readonly labelText;
|
|
14
|
-
private readonly
|
|
15
|
-
private readonly cull;
|
|
12
|
+
private readonly styleOptions;
|
|
16
13
|
private guideLine;
|
|
17
14
|
private label;
|
|
18
|
-
constructor({
|
|
15
|
+
constructor({ pixiApp, labelText, styleOptions, }: TimelineGuideProps);
|
|
19
16
|
private initGuideLine;
|
|
20
17
|
private drawLabel;
|
|
21
18
|
updateHeight(appHeight: number): void;
|
|
22
|
-
destroy(): void;
|
|
23
19
|
}
|
|
24
20
|
export {};
|
|
@@ -1,33 +1,22 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import type { Viewport } from 'pixi-viewport';
|
|
3
|
-
import { Application, Container } from 'pixi.js';
|
|
1
|
+
import { Container } from 'pixi.js';
|
|
4
2
|
import { ComputedRef, Ref } from 'vue';
|
|
5
|
-
import { FormatDateFns,
|
|
6
|
-
type
|
|
7
|
-
|
|
8
|
-
appRef: Application;
|
|
9
|
-
cull: Cull;
|
|
10
|
-
minimumStartDate: Date;
|
|
3
|
+
import { FormatDateFns, GraphState } from '../models';
|
|
4
|
+
type TimelineGuideProps = {
|
|
5
|
+
graphState: GraphState;
|
|
11
6
|
maximumEndDate: Ref<Date | undefined>;
|
|
12
|
-
isRunning: boolean;
|
|
13
|
-
styleOptions: ComputedRef<ParsedThemeStyles>;
|
|
14
7
|
formatDateFns: ComputedRef<FormatDateFns>;
|
|
15
8
|
};
|
|
16
9
|
export declare class TimelineGuides extends Container {
|
|
17
|
-
private readonly
|
|
18
|
-
private readonly appRef;
|
|
19
|
-
private readonly cull;
|
|
20
|
-
private readonly minimumStartDate;
|
|
10
|
+
private readonly graphState;
|
|
21
11
|
private readonly maximumEndDate;
|
|
22
|
-
private readonly isRunning;
|
|
23
|
-
private readonly styleOptions;
|
|
24
12
|
private readonly formatDateFns;
|
|
25
|
-
private readonly
|
|
13
|
+
private readonly unWatchers;
|
|
26
14
|
private idealGuideCount;
|
|
27
15
|
private currentTimeGap;
|
|
28
16
|
private labelFormatter;
|
|
29
17
|
private readonly guides;
|
|
30
|
-
constructor({
|
|
18
|
+
constructor({ graphState, maximumEndDate, formatDateFns, }: TimelineGuideProps);
|
|
19
|
+
private initWatchers;
|
|
31
20
|
updateGuides(): void;
|
|
32
21
|
private updateIdealGuideCount;
|
|
33
22
|
private updateCurrentTimeGap;
|
|
@@ -12,6 +12,7 @@ export declare class TimelineNodes extends Container {
|
|
|
12
12
|
private readonly layoutWorker;
|
|
13
13
|
private readonly isSubNodes;
|
|
14
14
|
private graphData;
|
|
15
|
+
private readonly graphDataLookup;
|
|
15
16
|
private readonly graphState;
|
|
16
17
|
private readonly nodeContainer;
|
|
17
18
|
readonly nodeRecords: Map<string, TimelineNode>;
|
|
@@ -45,6 +46,7 @@ export declare class TimelineNodes extends Container {
|
|
|
45
46
|
/**
|
|
46
47
|
* Utilities
|
|
47
48
|
*/
|
|
49
|
+
private setGraphDataLookup;
|
|
48
50
|
private registerEmits;
|
|
49
51
|
private emitNullSelection;
|
|
50
52
|
private getNodeData;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { P as c, R as b, T as C, C as P } from "./index-
|
|
1
|
+
import { P as c, R as b, T as C, C as P } from "./index-cd02333f.mjs";
|
|
2
2
|
import "vue";
|
|
3
3
|
class u {
|
|
4
4
|
constructor(t) {
|
|
@@ -1530,4 +1530,4 @@ export {
|
|
|
1530
1530
|
O as Viewport,
|
|
1531
1531
|
$ as Wheel
|
|
1532
1532
|
};
|
|
1533
|
-
//# sourceMappingURL=viewport.es-
|
|
1533
|
+
//# sourceMappingURL=viewport.es-14935be0.mjs.map
|