@prefecthq/graphs 1.0.7 → 2.0.1
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/LICENSE +201 -0
- package/dist/assets/nodeLayout.worker-ba54e168.js.map +1 -0
- package/dist/graphs.mjs +3 -4
- package/dist/graphs.umd.js +578 -63
- package/dist/graphs.umd.js.map +1 -1
- package/dist/index-aba921f4.mjs +19945 -0
- package/dist/index-aba921f4.mjs.map +1 -0
- package/dist/types/demo/App.vue.d.ts +1 -43
- package/dist/types/demo/components/ComponentPage.vue.d.ts +18 -85
- package/dist/types/demo/components/ContextSidebar.vue.d.ts +1 -43
- package/dist/types/demo/components/HashLink.vue.d.ts +11 -54
- package/dist/types/demo/components/ResizableSection.vue.d.ts +8 -47
- package/dist/types/demo/sections/Data.vue.d.ts +1 -43
- package/dist/types/demo/sections/Home.vue.d.ts +1 -43
- package/dist/types/demo/sections/components/FlowRunTimelineDemo.vue.d.ts +1 -43
- package/dist/types/demo/sections/components/TimescaleTable.vue.d.ts +16 -67
- package/dist/types/demo/utilities/timescaleData.d.ts +2 -2
- package/dist/types/src/FlowRunTimeline.vue.d.ts +30 -122
- package/dist/types/src/containers/guide.d.ts +28 -0
- package/dist/types/src/containers/guides.d.ts +26 -0
- package/dist/types/src/index.d.ts +1 -0
- package/dist/types/src/models/FlowRunTimeline.d.ts +16 -28
- package/dist/types/src/pixiFunctions/bitmapFonts.d.ts +1 -1
- package/dist/types/src/pixiFunctions/index.d.ts +1 -2
- package/dist/types/src/pixiFunctions/nodeSprites.d.ts +2 -2
- package/dist/types/src/pixiFunctions/subNodesToggle.d.ts +3 -2
- package/dist/types/src/pixiFunctions/timeScale.d.ts +2 -0
- package/dist/types/src/pixiFunctions/timelineEdge.d.ts +2 -2
- package/dist/types/src/pixiFunctions/timelineNode.d.ts +8 -7
- package/dist/types/src/pixiFunctions/timelineNodes.d.ts +8 -10
- package/dist/types/src/pixiFunctions/timelinePlayhead.d.ts +4 -19
- package/dist/types/src/types/index.d.ts +1 -0
- package/dist/types/src/types/timeline.d.ts +11 -0
- package/dist/types/src/utilities/index.d.ts +2 -1
- package/dist/types/src/utilities/time.d.ts +13 -10
- package/dist/types/src/utilities/viewport.d.ts +3 -0
- package/dist/types/src/utilities/zIndex.d.ts +5 -0
- package/dist/types/src/workers/layouts/nearestNeighbor.d.ts +10 -0
- package/dist/types/src/workers/layouts/waterfall.d.ts +3 -0
- package/dist/{viewport.es-a4ca92c6.mjs → viewport.es-73ad6f79.mjs} +706 -2
- package/dist/{viewport.es-a4ca92c6.mjs.map → viewport.es-73ad6f79.mjs.map} +1 -1
- package/package.json +11 -11
- package/dist/assets/nodeLayout.worker-30c2c715.js.map +0 -1
- package/dist/index-0669fb1d.mjs +0 -17267
- package/dist/index-0669fb1d.mjs.map +0 -1
- package/dist/types/src/pixiFunctions/timelineGuide.d.ts +0 -20
- package/dist/types/src/pixiFunctions/timelineGuides.d.ts +0 -33
- package/dist/types/src/pixiFunctions/timelineScale.d.ts +0 -7
|
@@ -1,111 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
selectedNodeId?: string | null | undefined;
|
|
12
|
-
layout?: TimelineNodesLayoutOptions | undefined;
|
|
13
|
-
hideEdges?: boolean | undefined;
|
|
14
|
-
subNodeLabels?: Map<string, string> | undefined;
|
|
15
|
-
expandedSubNodes?: ExpandedSubNodes<Record<string, unknown>> | undefined;
|
|
16
|
-
visibleDateRange?: TimelineVisibleDateRange | undefined;
|
|
17
|
-
}>>> & {
|
|
18
|
-
onSelection?: ((value: NodeSelectionEvent | null) => any) | undefined;
|
|
19
|
-
onSubNodeToggle?: ((value: string) => any) | undefined;
|
|
20
|
-
"onUpdate:visibleDateRange"?: ((value: TimelineVisibleDateRange | undefined) => any) | undefined;
|
|
21
|
-
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>;
|
|
22
|
-
$attrs: {
|
|
23
|
-
[x: string]: unknown;
|
|
24
|
-
};
|
|
25
|
-
$refs: {
|
|
26
|
-
[x: string]: unknown;
|
|
27
|
-
};
|
|
28
|
-
$slots: Readonly<{
|
|
29
|
-
[name: string]: import("vue").Slot | undefined;
|
|
30
|
-
}>;
|
|
31
|
-
$root: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> | null;
|
|
32
|
-
$parent: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> | null;
|
|
33
|
-
$emit: ((event: "selection", value: NodeSelectionEvent | null) => void) & ((event: "subNodeToggle", value: string) => void) & ((event: "update:visibleDateRange", value: TimelineVisibleDateRange | undefined) => void);
|
|
34
|
-
$el: any;
|
|
35
|
-
$options: import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
36
|
-
graphData: GraphTimelineNode[];
|
|
37
|
-
isRunning?: boolean | undefined;
|
|
38
|
-
theme?: TimelineThemeOptions | undefined;
|
|
39
|
-
formatDateFns?: Partial<FormatDateFns> | undefined;
|
|
40
|
-
selectedNodeId?: string | null | undefined;
|
|
41
|
-
layout?: TimelineNodesLayoutOptions | undefined;
|
|
42
|
-
hideEdges?: boolean | undefined;
|
|
43
|
-
subNodeLabels?: Map<string, string> | undefined;
|
|
44
|
-
expandedSubNodes?: ExpandedSubNodes<Record<string, unknown>> | undefined;
|
|
45
|
-
visibleDateRange?: TimelineVisibleDateRange | undefined;
|
|
46
|
-
}>>> & {
|
|
47
|
-
onSelection?: ((value: NodeSelectionEvent | null) => any) | undefined;
|
|
48
|
-
onSubNodeToggle?: ((value: string) => any) | undefined;
|
|
49
|
-
"onUpdate:visibleDateRange"?: ((value: TimelineVisibleDateRange | undefined) => any) | undefined;
|
|
50
|
-
}, {
|
|
51
|
-
centerViewport: ({ skipAnimation }?: CenterViewportOptions) => void;
|
|
52
|
-
moveViewportCenter: ({ xOffset, yOffset }: {
|
|
53
|
-
xOffset: number;
|
|
54
|
-
yOffset: number;
|
|
55
|
-
}) => void;
|
|
56
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
57
|
-
selection: (value: NodeSelectionEvent | null) => void;
|
|
58
|
-
} & {
|
|
59
|
-
subNodeToggle: (value: string) => void;
|
|
60
|
-
} & {
|
|
61
|
-
"update:visibleDateRange": (value: TimelineVisibleDateRange | undefined) => void;
|
|
62
|
-
}, string, {}, {}, string> & {
|
|
63
|
-
beforeCreate?: ((() => void) | (() => void)[]) | undefined;
|
|
64
|
-
created?: ((() => void) | (() => void)[]) | undefined;
|
|
65
|
-
beforeMount?: ((() => void) | (() => void)[]) | undefined;
|
|
66
|
-
mounted?: ((() => void) | (() => void)[]) | undefined;
|
|
67
|
-
beforeUpdate?: ((() => void) | (() => void)[]) | undefined;
|
|
68
|
-
updated?: ((() => void) | (() => void)[]) | undefined;
|
|
69
|
-
activated?: ((() => void) | (() => void)[]) | undefined;
|
|
70
|
-
deactivated?: ((() => void) | (() => void)[]) | undefined;
|
|
71
|
-
beforeDestroy?: ((() => void) | (() => void)[]) | undefined;
|
|
72
|
-
beforeUnmount?: ((() => void) | (() => void)[]) | undefined;
|
|
73
|
-
destroyed?: ((() => void) | (() => void)[]) | undefined;
|
|
74
|
-
unmounted?: ((() => void) | (() => void)[]) | undefined;
|
|
75
|
-
renderTracked?: (((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[]) | undefined;
|
|
76
|
-
renderTriggered?: (((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[]) | undefined;
|
|
77
|
-
errorCaptured?: (((err: unknown, instance: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> | null, info: string) => boolean | void) | ((err: unknown, instance: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> | null, info: string) => boolean | void)[]) | undefined;
|
|
78
|
-
};
|
|
79
|
-
$forceUpdate: () => void;
|
|
80
|
-
$nextTick: typeof import("vue").nextTick;
|
|
81
|
-
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (args_0: R, args_1: R) => any : (...args: any) => any, options?: import("vue").WatchOptions<boolean> | undefined): import("vue").WatchStopHandle;
|
|
82
|
-
} & Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
83
|
-
graphData: GraphTimelineNode[];
|
|
84
|
-
isRunning?: boolean | undefined;
|
|
85
|
-
theme?: TimelineThemeOptions | undefined;
|
|
86
|
-
formatDateFns?: Partial<FormatDateFns> | undefined;
|
|
87
|
-
selectedNodeId?: string | null | undefined;
|
|
88
|
-
layout?: TimelineNodesLayoutOptions | undefined;
|
|
89
|
-
hideEdges?: boolean | undefined;
|
|
90
|
-
subNodeLabels?: Map<string, string> | undefined;
|
|
91
|
-
expandedSubNodes?: ExpandedSubNodes<Record<string, unknown>> | undefined;
|
|
92
|
-
visibleDateRange?: TimelineVisibleDateRange | undefined;
|
|
93
|
-
}>>> & {
|
|
94
|
-
onSelection?: ((value: NodeSelectionEvent | null) => any) | undefined;
|
|
95
|
-
onSubNodeToggle?: ((value: string) => any) | undefined;
|
|
96
|
-
"onUpdate:visibleDateRange"?: ((value: TimelineVisibleDateRange | undefined) => any) | undefined;
|
|
97
|
-
} & import("vue").ShallowUnwrapRef<{
|
|
98
|
-
centerViewport: ({ skipAnimation }?: CenterViewportOptions) => void;
|
|
99
|
-
moveViewportCenter: ({ xOffset, yOffset }: {
|
|
100
|
-
xOffset: number;
|
|
101
|
-
yOffset: number;
|
|
102
|
-
}) => void;
|
|
103
|
-
}> & {} & import("vue").ComponentCustomProperties & {};
|
|
104
|
-
__isFragment?: undefined;
|
|
105
|
-
__isTeleport?: undefined;
|
|
106
|
-
__isSuspense?: undefined;
|
|
107
|
-
} & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
108
|
-
graphData: GraphTimelineNode[];
|
|
1
|
+
import { TimelineThemeOptions, FormatDateFns, TimelineNodesLayoutOptions, CenterViewportOptions, ExpandedSubNodes, NodeSelectionEvent, TimelineVisibleDateRange } from './models';
|
|
2
|
+
import { TimelineData } from './types/timeline';
|
|
3
|
+
declare function centerViewport({ skipAnimation }?: CenterViewportOptions): void;
|
|
4
|
+
type MoveViewportCenterOptions = {
|
|
5
|
+
xOffset: number;
|
|
6
|
+
yOffset: number;
|
|
7
|
+
};
|
|
8
|
+
declare function moveViewportCenter({ xOffset, yOffset }: MoveViewportCenterOptions): void;
|
|
9
|
+
declare const _default: import("vue").DefineComponent<__VLS_TypePropsToRuntimeProps<{
|
|
10
|
+
data: TimelineData;
|
|
109
11
|
isRunning?: boolean | undefined;
|
|
110
12
|
theme?: TimelineThemeOptions | undefined;
|
|
111
13
|
formatDateFns?: Partial<FormatDateFns> | undefined;
|
|
@@ -113,25 +15,31 @@ declare const _default: {
|
|
|
113
15
|
layout?: TimelineNodesLayoutOptions | undefined;
|
|
114
16
|
hideEdges?: boolean | undefined;
|
|
115
17
|
subNodeLabels?: Map<string, string> | undefined;
|
|
116
|
-
expandedSubNodes?: ExpandedSubNodes
|
|
18
|
+
expandedSubNodes?: ExpandedSubNodes | undefined;
|
|
117
19
|
visibleDateRange?: TimelineVisibleDateRange | undefined;
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
"onUpdate:visibleDateRange"?: ((value: TimelineVisibleDateRange | undefined) => any) | undefined;
|
|
122
|
-
}, {
|
|
123
|
-
centerViewport: ({ skipAnimation }?: CenterViewportOptions) => void;
|
|
124
|
-
moveViewportCenter: ({ xOffset, yOffset }: {
|
|
125
|
-
xOffset: number;
|
|
126
|
-
yOffset: number;
|
|
127
|
-
}) => void;
|
|
20
|
+
}>, {
|
|
21
|
+
centerViewport: typeof centerViewport;
|
|
22
|
+
moveViewportCenter: typeof moveViewportCenter;
|
|
128
23
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
129
24
|
selection: (value: NodeSelectionEvent | null) => void;
|
|
130
|
-
} & {
|
|
131
25
|
subNodeToggle: (value: string) => void;
|
|
132
|
-
} & {
|
|
133
26
|
"update:visibleDateRange": (value: TimelineVisibleDateRange | undefined) => void;
|
|
134
|
-
}, string,
|
|
27
|
+
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
28
|
+
data: TimelineData;
|
|
29
|
+
isRunning?: boolean | undefined;
|
|
30
|
+
theme?: TimelineThemeOptions | undefined;
|
|
31
|
+
formatDateFns?: Partial<FormatDateFns> | undefined;
|
|
32
|
+
selectedNodeId?: string | null | undefined;
|
|
33
|
+
layout?: TimelineNodesLayoutOptions | undefined;
|
|
34
|
+
hideEdges?: boolean | undefined;
|
|
35
|
+
subNodeLabels?: Map<string, string> | undefined;
|
|
36
|
+
expandedSubNodes?: ExpandedSubNodes | undefined;
|
|
37
|
+
visibleDateRange?: TimelineVisibleDateRange | undefined;
|
|
38
|
+
}>>> & {
|
|
39
|
+
onSelection?: ((value: NodeSelectionEvent | null) => any) | undefined;
|
|
40
|
+
onSubNodeToggle?: ((value: string) => any) | undefined;
|
|
41
|
+
"onUpdate:visibleDateRange"?: ((value: TimelineVisibleDateRange | undefined) => any) | undefined;
|
|
42
|
+
}, {}, {}>;
|
|
135
43
|
export default _default;
|
|
136
44
|
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
137
45
|
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Viewport } from 'pixi-viewport';
|
|
2
|
+
import { Application, Container } from 'pixi.js';
|
|
3
|
+
import { GraphState, ParsedThemeStyles } from '../models/FlowRunTimeline';
|
|
4
|
+
export type GuideDateFormatter = (value: Date) => string;
|
|
5
|
+
export type GuidesArgs = {
|
|
6
|
+
application: Application;
|
|
7
|
+
viewport: Viewport;
|
|
8
|
+
styles: ParsedThemeStyles;
|
|
9
|
+
};
|
|
10
|
+
export declare class Guide extends Container {
|
|
11
|
+
private readonly state;
|
|
12
|
+
private readonly viewportUpdated;
|
|
13
|
+
private format;
|
|
14
|
+
private date;
|
|
15
|
+
private line;
|
|
16
|
+
private label;
|
|
17
|
+
private readonly unwatch;
|
|
18
|
+
constructor(state: GraphState);
|
|
19
|
+
setDate(value: Date): void;
|
|
20
|
+
setFormat(value: GuideDateFormatter): void;
|
|
21
|
+
destroy(): void;
|
|
22
|
+
private readonly tick;
|
|
23
|
+
private createLine;
|
|
24
|
+
private createLabel;
|
|
25
|
+
private getPositionX;
|
|
26
|
+
private updatePosition;
|
|
27
|
+
private updateLabel;
|
|
28
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Viewport } from 'pixi-viewport';
|
|
2
|
+
import { Application, Container } from 'pixi.js';
|
|
3
|
+
import { FormatDateFns, GraphState, ParsedThemeStyles } from '../models/FlowRunTimeline';
|
|
4
|
+
export type GuidesArgs = {
|
|
5
|
+
application: Application;
|
|
6
|
+
viewport: Viewport;
|
|
7
|
+
styles: ParsedThemeStyles;
|
|
8
|
+
formatters: FormatDateFns;
|
|
9
|
+
};
|
|
10
|
+
export declare class Guides extends Container {
|
|
11
|
+
private readonly state;
|
|
12
|
+
private readonly guides;
|
|
13
|
+
private readonly viewportUpdated;
|
|
14
|
+
private readonly unwatch;
|
|
15
|
+
constructor(state: GraphState);
|
|
16
|
+
destroy(): void;
|
|
17
|
+
private readonly tick;
|
|
18
|
+
private getViewportDates;
|
|
19
|
+
private getTimeSpan;
|
|
20
|
+
private getFirstGuideDate;
|
|
21
|
+
private getGuideDates;
|
|
22
|
+
private getLabelFormat;
|
|
23
|
+
private updateGuides;
|
|
24
|
+
private updateOrCreateGuide;
|
|
25
|
+
private removeGuides;
|
|
26
|
+
}
|
|
@@ -2,20 +2,8 @@ import { Cull } from '@pixi-essentials/cull';
|
|
|
2
2
|
import type { Viewport } from 'pixi-viewport';
|
|
3
3
|
import type { Application, IBitmapTextStyle, TextStyle } from 'pixi.js';
|
|
4
4
|
import type { ComputedRef } from 'vue';
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
label: string;
|
|
8
|
-
start?: Date;
|
|
9
|
-
end: Date | null;
|
|
10
|
-
state: string;
|
|
11
|
-
upstreamDependencies?: string[];
|
|
12
|
-
subFlowRunId?: string;
|
|
13
|
-
};
|
|
14
|
-
export declare function hasStartAndEndDates(node: GraphTimelineNode): node is GraphTimelineNode & {
|
|
15
|
-
start: Date;
|
|
16
|
-
end: Date;
|
|
17
|
-
};
|
|
18
|
-
export type InitTimelineScaleProps = {
|
|
5
|
+
import { TimelineData, TimelineItem } from '../types/timeline';
|
|
6
|
+
export type TimeScaleArgs = {
|
|
19
7
|
minimumStartTime: number;
|
|
20
8
|
graphXDomain: number;
|
|
21
9
|
initialOverallTimeSpan: number;
|
|
@@ -32,21 +20,19 @@ export type NodeSelectionEvent = {
|
|
|
32
20
|
type: NodeSelectionEventTypes;
|
|
33
21
|
};
|
|
34
22
|
export type ExpandedSubNodes<T extends Record<string, unknown> = Record<string, unknown>> = Map<string, {
|
|
35
|
-
data:
|
|
23
|
+
data: TimelineData | ComputedRef<TimelineData>;
|
|
36
24
|
} & T>;
|
|
37
25
|
export type NodeShoveDirection = 1 | -1;
|
|
38
|
-
export type
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
centerViewportAfter?: boolean;
|
|
46
|
-
};
|
|
26
|
+
export type NodeLayoutWorkerArgs = {
|
|
27
|
+
layoutSetting?: TimelineNodesLayoutOptions;
|
|
28
|
+
data?: TimelineData;
|
|
29
|
+
apxCharacterWidth?: number;
|
|
30
|
+
spacingMinimumNodeEdgeGap?: number;
|
|
31
|
+
timeScaleArgs?: TimeScaleArgs;
|
|
32
|
+
centerViewportAfter?: boolean;
|
|
47
33
|
};
|
|
48
34
|
export type NodeLayoutItem = {
|
|
49
|
-
|
|
35
|
+
row: number;
|
|
50
36
|
nextDependencyShove?: NodeShoveDirection;
|
|
51
37
|
startX: number;
|
|
52
38
|
endX: number;
|
|
@@ -68,10 +54,12 @@ export type GraphState = {
|
|
|
68
54
|
viewport: Viewport;
|
|
69
55
|
cull: Cull;
|
|
70
56
|
cullScreen: () => void;
|
|
71
|
-
|
|
57
|
+
timeScale: TimeScale;
|
|
58
|
+
timeScaleArgs: TimeScaleArgs;
|
|
72
59
|
styleOptions: ComputedRef<ParsedThemeStyles>;
|
|
73
60
|
styleNode: ComputedRef<NodeThemeFn>;
|
|
74
61
|
layoutSetting: ComputedRef<TimelineNodesLayoutOptions>;
|
|
62
|
+
formatDateFns: ComputedRef<FormatDateFns>;
|
|
75
63
|
isRunning: ComputedRef<boolean>;
|
|
76
64
|
hideEdges: ComputedRef<boolean>;
|
|
77
65
|
subNodeLabels: ComputedRef<Map<string, string>>;
|
|
@@ -82,7 +70,7 @@ export type GraphState = {
|
|
|
82
70
|
};
|
|
83
71
|
export type DateToX = (date: Date) => number;
|
|
84
72
|
export type XToDate = (xPosition: number) => Date;
|
|
85
|
-
export type
|
|
73
|
+
export type TimeScale = {
|
|
86
74
|
dateToX: DateToX;
|
|
87
75
|
xToDate: XToDate;
|
|
88
76
|
};
|
|
@@ -110,7 +98,7 @@ type NodeThemeOptions = {
|
|
|
110
98
|
onFillSubNodeToggleHoverBg: string;
|
|
111
99
|
onFillSubNodeToggleHoverBgAlpha: number;
|
|
112
100
|
};
|
|
113
|
-
export type NodeThemeFn = (node:
|
|
101
|
+
export type NodeThemeFn = (node: TimelineItem) => NodeThemeOptions;
|
|
114
102
|
export declare const nodeThemeFnDefault: NodeThemeFn;
|
|
115
103
|
type Sizing = `${string}px` | `${string}em` | `${string}rem`;
|
|
116
104
|
export type RGB = `rgb(${number}, ${number}, ${number})`;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { TextStyles, ParsedThemeStyles } from '../models';
|
|
2
2
|
export declare function updateBitmapFonts(styles: ParsedThemeStyles): void;
|
|
3
|
-
export declare const getBitmapFonts: (styles: ParsedThemeStyles) => Promise<TextStyles
|
|
3
|
+
export declare const getBitmapFonts: (styles: ParsedThemeStyles) => Promise<TextStyles>;
|
|
4
4
|
export declare const initBitmapFonts: (styles: ParsedThemeStyles) => void;
|
|
@@ -6,9 +6,8 @@ export * from './loadingIndicator';
|
|
|
6
6
|
export * from './nodeSprites';
|
|
7
7
|
export * from './roundedBorderRect';
|
|
8
8
|
export * from './timelineEdge';
|
|
9
|
-
export * from './timelineGuides';
|
|
10
9
|
export * from './timelineNode';
|
|
11
10
|
export * from './timelineNodes';
|
|
12
11
|
export * from './timelinePlayhead';
|
|
13
|
-
export * from './
|
|
12
|
+
export * from './timeScale';
|
|
14
13
|
export * from './subNodesToggle';
|
|
@@ -8,7 +8,7 @@ type SimpleFillTextureProps = {
|
|
|
8
8
|
pixiApp: Application;
|
|
9
9
|
fill: number;
|
|
10
10
|
};
|
|
11
|
-
export declare function getSimpleFillTexture({ pixiApp, fill, }: SimpleFillTextureProps): Texture;
|
|
11
|
+
export declare function getSimpleFillTexture({ pixiApp, fill: providedFill, }: SimpleFillTextureProps): Texture;
|
|
12
12
|
type GetNodeBoxTexturesProps = {
|
|
13
13
|
pixiApp: Application;
|
|
14
14
|
fill: number;
|
|
@@ -16,7 +16,7 @@ type GetNodeBoxTexturesProps = {
|
|
|
16
16
|
boxCapWidth: number;
|
|
17
17
|
height: number;
|
|
18
18
|
};
|
|
19
|
-
export declare function getNodeBoxTextures({ pixiApp, fill, borderRadius, boxCapWidth, height, }: GetNodeBoxTexturesProps): BoxTextures;
|
|
19
|
+
export declare function getNodeBoxTextures({ pixiApp, fill: providedFill, borderRadius, boxCapWidth, height, }: GetNodeBoxTexturesProps): BoxTextures;
|
|
20
20
|
type GetArrowTextureProps = {
|
|
21
21
|
pixiApp: Application;
|
|
22
22
|
strokeColor: number;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { Container } from 'pixi.js';
|
|
2
|
-
import { GraphState
|
|
2
|
+
import { GraphState } from '../models';
|
|
3
|
+
import { TimelineItem } from '../types/timeline';
|
|
3
4
|
type SubNodesToggleProps = {
|
|
4
5
|
graphState: GraphState;
|
|
5
|
-
nodeData:
|
|
6
|
+
nodeData: TimelineItem;
|
|
6
7
|
size: number;
|
|
7
8
|
floating?: boolean;
|
|
8
9
|
};
|
|
@@ -4,7 +4,7 @@ import { TimelineNode } from '../pixiFunctions';
|
|
|
4
4
|
type TimelineEdgeProps = {
|
|
5
5
|
sourceNode: TimelineNode;
|
|
6
6
|
targetNode: TimelineNode;
|
|
7
|
-
|
|
7
|
+
state: GraphState;
|
|
8
8
|
};
|
|
9
9
|
export declare class TimelineEdge extends Container {
|
|
10
10
|
private readonly sourceNode;
|
|
@@ -22,7 +22,7 @@ export declare class TimelineEdge extends Container {
|
|
|
22
22
|
private readonly edge;
|
|
23
23
|
private readonly arrow;
|
|
24
24
|
private readonly unWatchers;
|
|
25
|
-
constructor({ sourceNode, targetNode,
|
|
25
|
+
constructor({ sourceNode, targetNode, state, }: TimelineEdgeProps);
|
|
26
26
|
private initCulling;
|
|
27
27
|
private initWatchers;
|
|
28
28
|
private assignBezierPositions;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Container } from 'pixi.js';
|
|
2
2
|
import { Ref } from 'vue';
|
|
3
|
-
import {
|
|
3
|
+
import { GraphState, NodeLayoutRow, NodesLayout } from '../models';
|
|
4
|
+
import { TimelineItem } from '../types/timeline';
|
|
4
5
|
export declare const nodeClickEvents: {
|
|
5
6
|
nodeDetails: string;
|
|
6
7
|
subNodesToggle: string;
|
|
@@ -12,14 +13,14 @@ export declare const nodeAnimationDurations: {
|
|
|
12
13
|
};
|
|
13
14
|
export declare const timelineNodeBoxName = "box";
|
|
14
15
|
type TimelineNodeProps = {
|
|
15
|
-
nodeData:
|
|
16
|
-
|
|
16
|
+
nodeData: TimelineItem;
|
|
17
|
+
state: GraphState;
|
|
17
18
|
layout: Ref<NodesLayout>;
|
|
18
19
|
layoutRows: Ref<NodeLayoutRow[]>;
|
|
19
20
|
};
|
|
20
21
|
export declare class TimelineNode extends Container {
|
|
21
|
-
nodeData:
|
|
22
|
-
private readonly
|
|
22
|
+
nodeData: TimelineItem;
|
|
23
|
+
private readonly state;
|
|
23
24
|
private readonly layout;
|
|
24
25
|
private readonly layoutRows;
|
|
25
26
|
private currentState;
|
|
@@ -52,7 +53,7 @@ export declare class TimelineNode extends Container {
|
|
|
52
53
|
private subNodesContentTicker;
|
|
53
54
|
private isSelected;
|
|
54
55
|
private selectedRing;
|
|
55
|
-
constructor({ nodeData,
|
|
56
|
+
constructor({ nodeData, state, layout, layoutRows, }: TimelineNodeProps);
|
|
56
57
|
private initWatchers;
|
|
57
58
|
private drawSubNodesOutline;
|
|
58
59
|
private initBox;
|
|
@@ -78,7 +79,7 @@ export declare class TimelineNode extends Container {
|
|
|
78
79
|
/**
|
|
79
80
|
* Update Functions
|
|
80
81
|
*/
|
|
81
|
-
update(newData?:
|
|
82
|
+
update(newData?: TimelineItem): void;
|
|
82
83
|
private updatePosition;
|
|
83
84
|
private updateIsRunningNode;
|
|
84
85
|
private updateBoxWidth;
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { Container } from 'pixi.js';
|
|
2
|
-
import {
|
|
2
|
+
import { GraphState } from '../models';
|
|
3
3
|
import { TimelineNode } from '../pixiFunctions';
|
|
4
|
+
import { TimelineData } from '../types/timeline';
|
|
4
5
|
export declare const timelineUpdateEvent = "timelineUpdateEvent";
|
|
5
6
|
type TimelineNodesProps = {
|
|
6
7
|
nodeContentContainerName?: string;
|
|
7
8
|
isSubNodes?: boolean;
|
|
8
|
-
|
|
9
|
-
|
|
9
|
+
data: TimelineData;
|
|
10
|
+
state: GraphState;
|
|
10
11
|
};
|
|
11
12
|
export declare class TimelineNodes extends Container {
|
|
12
13
|
private readonly layoutWorker;
|
|
13
14
|
private readonly isSubNodes;
|
|
14
|
-
private
|
|
15
|
-
private readonly
|
|
16
|
-
private readonly graphState;
|
|
15
|
+
private data;
|
|
16
|
+
private readonly state;
|
|
17
17
|
private readonly nodeContainer;
|
|
18
18
|
readonly nodeRecords: Map<string, TimelineNode>;
|
|
19
19
|
private readonly layout;
|
|
@@ -22,7 +22,7 @@ export declare class TimelineNodes extends Container {
|
|
|
22
22
|
private readonly edgeRecords;
|
|
23
23
|
private readonly unWatchers;
|
|
24
24
|
private isSelectionPathHighlighted;
|
|
25
|
-
constructor({ nodeContentContainerName, isSubNodes,
|
|
25
|
+
constructor({ nodeContentContainerName, isSubNodes, data, state, }: TimelineNodesProps);
|
|
26
26
|
private initWatchers;
|
|
27
27
|
private initLayoutWorker;
|
|
28
28
|
private initDeselectLayer;
|
|
@@ -32,7 +32,7 @@ export declare class TimelineNodes extends Container {
|
|
|
32
32
|
/**
|
|
33
33
|
* Update Functions
|
|
34
34
|
*/
|
|
35
|
-
update(newData:
|
|
35
|
+
update(newData: TimelineData): void;
|
|
36
36
|
updateHideEdges(): void;
|
|
37
37
|
private updateLayoutRows;
|
|
38
38
|
updateLayoutSetting(): void;
|
|
@@ -46,10 +46,8 @@ export declare class TimelineNodes extends Container {
|
|
|
46
46
|
/**
|
|
47
47
|
* Utilities
|
|
48
48
|
*/
|
|
49
|
-
private setGraphDataLookup;
|
|
50
49
|
private registerEmits;
|
|
51
50
|
private emitNullSelection;
|
|
52
|
-
private getNodeData;
|
|
53
51
|
getEarliestNodeStart(): Date | null;
|
|
54
52
|
destroy(): void;
|
|
55
53
|
}
|
|
@@ -1,29 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import { Application, Container } from 'pixi.js';
|
|
4
|
-
import { ComputedRef } from 'vue';
|
|
5
|
-
import { FormatDateFns, ParsedThemeStyles } from '../models';
|
|
6
|
-
type TimelinePlayheadProps = {
|
|
7
|
-
viewportRef: Viewport;
|
|
8
|
-
appRef: Application;
|
|
9
|
-
cull: Cull;
|
|
10
|
-
formatDateFns: ComputedRef<FormatDateFns>;
|
|
11
|
-
styleOptions: ComputedRef<ParsedThemeStyles>;
|
|
12
|
-
};
|
|
1
|
+
import { Container } from 'pixi.js';
|
|
2
|
+
import { GraphState } from '../models';
|
|
13
3
|
export declare class TimelinePlayhead extends Container {
|
|
14
|
-
private readonly
|
|
15
|
-
private readonly appRef;
|
|
16
|
-
private readonly cull;
|
|
17
|
-
private readonly formatDateFns;
|
|
18
|
-
private readonly styleOptions;
|
|
4
|
+
private readonly state;
|
|
19
5
|
private readonly unwatch;
|
|
20
6
|
private readonly playhead;
|
|
21
7
|
private label;
|
|
22
|
-
constructor(
|
|
8
|
+
constructor(state: GraphState);
|
|
23
9
|
private drawPlayhead;
|
|
24
10
|
private drawTimeLabel;
|
|
25
11
|
private getTimeLabelY;
|
|
26
12
|
updatePosition(): void;
|
|
27
13
|
destroy(): void;
|
|
28
14
|
}
|
|
29
|
-
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './timeline';
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import { GuideDateFormatter } from '../containers/guide';
|
|
2
|
+
import { FormatDateFns } from '../models/FlowRunTimeline';
|
|
3
|
+
import { TimelineData } from '../types/timeline';
|
|
1
4
|
export declare const intervals: {
|
|
2
5
|
readonly year: 31536000;
|
|
3
6
|
readonly day: 86400;
|
|
@@ -10,10 +13,7 @@ export declare function secondsToApproximateString(input: number, showOnes?: boo
|
|
|
10
13
|
export declare function formatDateBySeconds(date: Date): string;
|
|
11
14
|
export declare function formatDateByMinutes(date: Date): string;
|
|
12
15
|
export declare function formatDate(date: Date): string;
|
|
13
|
-
export declare function getDateBounds(
|
|
14
|
-
start: Date;
|
|
15
|
-
end: Date | null;
|
|
16
|
-
}[], minimumTimeSpan?: number): {
|
|
16
|
+
export declare function getDateBounds(data: TimelineData, minimumTimeSpan?: number, isRunning?: boolean): {
|
|
17
17
|
min: Date;
|
|
18
18
|
max: Date;
|
|
19
19
|
span: number;
|
|
@@ -28,12 +28,15 @@ export declare const timeLengths: {
|
|
|
28
28
|
week: number;
|
|
29
29
|
};
|
|
30
30
|
export declare const labelFormats: {
|
|
31
|
-
seconds:
|
|
32
|
-
minutes:
|
|
33
|
-
date:
|
|
31
|
+
readonly seconds: "seconds";
|
|
32
|
+
readonly minutes: "minutes";
|
|
33
|
+
readonly date: "date";
|
|
34
34
|
};
|
|
35
|
-
export
|
|
35
|
+
export type TimeSpan = {
|
|
36
36
|
ceiling: number;
|
|
37
37
|
span: number;
|
|
38
|
-
labelFormat:
|
|
39
|
-
}
|
|
38
|
+
labelFormat: typeof labelFormats[keyof typeof labelFormats];
|
|
39
|
+
};
|
|
40
|
+
export declare const timeSpanSlots: TimeSpan[];
|
|
41
|
+
export declare function getTimeSpanSlot(span: number): TimeSpan;
|
|
42
|
+
export declare function getLabelFormatter(labelFormat: string, formatters: FormatDateFns): GuideDateFormatter;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { NodesLayout, TimeScale } from '../../models';
|
|
2
|
+
import { TimelineData } from '../../types/timeline';
|
|
3
|
+
type FactoryArgs = {
|
|
4
|
+
data: TimelineData;
|
|
5
|
+
timeScale: TimeScale;
|
|
6
|
+
currentApxCharacterWidth: number;
|
|
7
|
+
minimumNodeEdgeGap: number;
|
|
8
|
+
};
|
|
9
|
+
export declare function generateNearestParentLayout({ data, timeScale, currentApxCharacterWidth, minimumNodeEdgeGap, }: FactoryArgs): Promise<NodesLayout>;
|
|
10
|
+
export {};
|