@antcde/component-library 0.1.14-rc.703ea01 → 0.1.14-rc.8f1db38
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/index.js +9620 -9459
- package/dist/types/src/components/TasksFlow/components/_flowEditor.vue.d.ts +2 -4
- package/dist/types/src/components/TasksFlow/composables/useFlowCrud.d.ts +21 -0
- package/dist/types/src/components/TasksFlow/composables/useFlowEditor.d.ts +54 -0
- package/dist/types/src/components/TasksFlow/composables/useFlowFetch.d.ts +33 -0
- package/dist/types/src/components/TasksFlow/composables/useFlowNotifications.d.ts +15 -0
- package/dist/types/src/components/TasksFlow/composables/useFlowRealtime.d.ts +23 -0
- package/dist/types/src/components/TasksFlow/composables/useFlowSubflows.d.ts +22 -0
- package/dist/types/src/components/TasksFlow/composables/useTaskFlow.d.ts +81 -95
- package/dist/types/src/components/TasksFlow/composables/useTaskFlowEdgeConditions.d.ts +10 -0
- package/dist/types/src/components/TasksFlow/composables/useTaskFlowEdges.d.ts +6 -6
- package/dist/types/src/components/TasksFlow/composables/useTaskFlowMappers.d.ts +4 -0
- package/dist/types/src/components/TasksFlow/composables/useTaskFlowTypes.d.ts +1 -0
- package/dist/types/src/components/TasksFlow/composables/useTemplateVersioning.d.ts +26 -26
- package/dist/types/src/components/TasksFlow/composables/useTemplateVersioningState.d.ts +176 -0
- package/package.json +3 -3
|
@@ -5,11 +5,9 @@ type __VLS_Props = {
|
|
|
5
5
|
isInSubflow?: boolean;
|
|
6
6
|
flowInstanceId?: string;
|
|
7
7
|
};
|
|
8
|
-
declare function createTaskAtViewportCenter(): Promise<void>;
|
|
9
|
-
declare function createTriggerAtViewportCenter(triggerId: string): Promise<void>;
|
|
10
8
|
declare const _default: import('vue').DefineComponent<__VLS_Props, {
|
|
11
|
-
createTaskAtViewportCenter:
|
|
12
|
-
createTriggerAtViewportCenter:
|
|
9
|
+
createTaskAtViewportCenter: () => Promise<void>;
|
|
10
|
+
createTriggerAtViewportCenter: (triggerId: string) => Promise<void>;
|
|
13
11
|
fitViewAnimated: () => void;
|
|
14
12
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
15
13
|
export default _default;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { AntConnect, Task } from '@antcde/connect-ts';
|
|
2
|
+
import { Ref } from 'vue';
|
|
3
|
+
import { TaskFlowEdge, TaskFlowNode } from './useTaskFlowTypes';
|
|
4
|
+
export declare function useFlowCrud(antConnect: AntConnect, flowParent: Ref<Task | null>, flowNodes: Ref<TaskFlowNode[]>, flowEdges: Ref<TaskFlowEdge[]>, fetchFlowNodesAndEdges: () => Promise<void>, closeSubflowWindow: (nodeId: string) => void): {
|
|
5
|
+
createNode: (position?: {
|
|
6
|
+
x: number;
|
|
7
|
+
y: number;
|
|
8
|
+
}) => Promise<string | null>;
|
|
9
|
+
createTriggerNode: (triggerId: string, position?: {
|
|
10
|
+
x: number;
|
|
11
|
+
y: number;
|
|
12
|
+
}) => Promise<string | null>;
|
|
13
|
+
updateNode: (data: {
|
|
14
|
+
id: string;
|
|
15
|
+
position_x: number;
|
|
16
|
+
position_y: number;
|
|
17
|
+
}) => Promise<void>;
|
|
18
|
+
deleteNode: (nodeId: string) => Promise<void>;
|
|
19
|
+
updateTaskDuration: (taskId: string, durationDays: number | null, durationActiveDays: number[]) => Promise<void>;
|
|
20
|
+
updateFlowTask: (task: Task) => void;
|
|
21
|
+
};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { useVueFlow } from '@vue-flow/core';
|
|
2
|
+
import { useTaskFlow } from './useTaskFlow';
|
|
3
|
+
type FlowStore = ReturnType<typeof useTaskFlow>;
|
|
4
|
+
type VueFlowApi = ReturnType<typeof useVueFlow>;
|
|
5
|
+
interface FlowEditorProps {
|
|
6
|
+
isDark: boolean;
|
|
7
|
+
isAutoLayouting?: boolean;
|
|
8
|
+
isNavigating?: boolean;
|
|
9
|
+
isInSubflow?: boolean;
|
|
10
|
+
flowInstanceId?: string;
|
|
11
|
+
}
|
|
12
|
+
export declare function useFlowEditor(props: FlowEditorProps, flowStore: FlowStore, vueFlowApi: VueFlowApi): {
|
|
13
|
+
isLoadingFlow: import('vue').ComputedRef<boolean>;
|
|
14
|
+
isLocked: import('vue').ComputedRef<boolean>;
|
|
15
|
+
isShiftHeld: import('vue').Ref<boolean, boolean>;
|
|
16
|
+
activeSnapGrid: import('vue').ComputedRef<[number, number]>;
|
|
17
|
+
isDragOver: import('vue').Ref<boolean, boolean>;
|
|
18
|
+
connectingSourceId: import('vue').Ref<string | null, string | null>;
|
|
19
|
+
conditionsEditorVisible: import('vue').WritableComputedRef<boolean, boolean>;
|
|
20
|
+
getSelectedNodes: import('vue').ComputedRef<import('@vue-flow/core').GraphNode<any, any, string>[]>;
|
|
21
|
+
pendingDeleteIds: import('vue').Ref<string[], string[]>;
|
|
22
|
+
showDeleteConfirm: import('vue').Ref<boolean, boolean>;
|
|
23
|
+
batchMenu: import('vue').Ref<boolean, boolean>;
|
|
24
|
+
batchMenuPos: import('vue').Ref<{
|
|
25
|
+
x: number;
|
|
26
|
+
y: number;
|
|
27
|
+
}, {
|
|
28
|
+
x: number;
|
|
29
|
+
y: number;
|
|
30
|
+
} | {
|
|
31
|
+
x: number;
|
|
32
|
+
y: number;
|
|
33
|
+
}>;
|
|
34
|
+
handleZoomIn: () => void;
|
|
35
|
+
handleZoomOut: () => void;
|
|
36
|
+
fitViewAnimated: () => void;
|
|
37
|
+
handleDragOver: (e: DragEvent) => void;
|
|
38
|
+
handleDragLeave: (e: DragEvent) => void;
|
|
39
|
+
handleDrop: (e: DragEvent) => void;
|
|
40
|
+
updateNodePosition: (event: any) => void;
|
|
41
|
+
createEdge: (event: any) => void;
|
|
42
|
+
onConnectStart: (event: any) => void;
|
|
43
|
+
onConnectStop: () => void;
|
|
44
|
+
onPaneContextMenu: (e: MouseEvent) => void;
|
|
45
|
+
batchSetStatus: (status: string) => Promise<void>;
|
|
46
|
+
batchDelete: () => Promise<void>;
|
|
47
|
+
confirmKeyboardDelete: () => Promise<void>;
|
|
48
|
+
onContainerEnter: () => void;
|
|
49
|
+
onContainerLeave: () => void;
|
|
50
|
+
getMinimapNodeColor: (node: any) => string;
|
|
51
|
+
createTaskAtViewportCenter: () => Promise<void>;
|
|
52
|
+
createTriggerAtViewportCenter: (triggerId: string) => Promise<void>;
|
|
53
|
+
};
|
|
54
|
+
export {};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { AntConnect, TableQueryShort, Task } from '@antcde/connect-ts';
|
|
2
|
+
import { Ref } from 'vue';
|
|
3
|
+
import { useFlowCache } from './useFlowCache';
|
|
4
|
+
import { useFlowNotifications } from './useFlowNotifications';
|
|
5
|
+
import { TaskFlowEdge, TaskFlowNode } from './useTaskFlowTypes';
|
|
6
|
+
interface FlowFetchOptions {
|
|
7
|
+
antConnect: AntConnect;
|
|
8
|
+
flowParent: Ref<Task | null>;
|
|
9
|
+
flowNodes: Ref<TaskFlowNode[]>;
|
|
10
|
+
flowEdges: Ref<TaskFlowEdge[]>;
|
|
11
|
+
flowCache: ReturnType<typeof useFlowCache>;
|
|
12
|
+
notifications: ReturnType<typeof useFlowNotifications>;
|
|
13
|
+
highlightedNodeId: Ref<string | null>;
|
|
14
|
+
showTask: (id: string) => Promise<boolean>;
|
|
15
|
+
projectQueries: Ref<TableQueryShort[]>;
|
|
16
|
+
}
|
|
17
|
+
export declare function useFlowFetch({ antConnect, flowParent, flowNodes, flowEdges, flowCache, notifications, highlightedNodeId, showTask, projectQueries }: FlowFetchOptions): {
|
|
18
|
+
deletedFlowId: Ref<string | null, string | null>;
|
|
19
|
+
isAutoRefreshEnabled: Ref<boolean, boolean>;
|
|
20
|
+
isAutoRefreshing: Ref<boolean, boolean>;
|
|
21
|
+
deleteFlowParentApi: import('@antcde/vue-utils').UseApiReturn<import('@antcde/connect-ts').MessageResponse | null, [taskId: string, method: string], true>;
|
|
22
|
+
getFlowNodesApi: import('@antcde/vue-utils').UseApiReturn<import('@antcde/connect-ts/services/TaskTemplate.types').GetTasksResponse<Task> | null, [licenseId: string, query?: string | undefined], true>;
|
|
23
|
+
fetchFlowNodesAndEdges: (isAutoRefresh?: boolean) => Promise<void>;
|
|
24
|
+
refreshFromExternal: () => Promise<void>;
|
|
25
|
+
fetchProjectQueries: () => Promise<void>;
|
|
26
|
+
fetchFlowParent: (taskId: string) => Promise<boolean>;
|
|
27
|
+
updateFlowParent: (title: string) => Promise<void>;
|
|
28
|
+
deleteFlowParent: () => Promise<void>;
|
|
29
|
+
toggleLockFlowParent: (is_locked: boolean) => Promise<void>;
|
|
30
|
+
enableAutoRefresh: () => void;
|
|
31
|
+
disableAutoRefresh: () => void;
|
|
32
|
+
};
|
|
33
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
export interface FlowNotification {
|
|
3
|
+
id: string;
|
|
4
|
+
title: string;
|
|
5
|
+
oldStatus: string;
|
|
6
|
+
newStatus: string;
|
|
7
|
+
timestamp: number;
|
|
8
|
+
}
|
|
9
|
+
export declare function useFlowNotifications(): {
|
|
10
|
+
recentlyChangedNodeIds: Ref<Set<string>, Set<string>>;
|
|
11
|
+
flowNotifications: Ref<FlowNotification[], FlowNotification[]>;
|
|
12
|
+
dismissNotification: (id: string) => void;
|
|
13
|
+
trackStatusChange: (nodeId: string, title: string, oldStatus: string, newStatus: string) => void;
|
|
14
|
+
trackNewNode: (nodeId: string) => void;
|
|
15
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Task } from '@antcde/connect-ts';
|
|
2
|
+
import { Ref } from 'vue';
|
|
3
|
+
import { useFlowCache } from './useFlowCache';
|
|
4
|
+
import { useFlowNotifications } from './useFlowNotifications';
|
|
5
|
+
import { TaskFlowEdge, TaskFlowNode } from './useTaskFlowTypes';
|
|
6
|
+
export type FlowChannelSubscriber = (channel: string, events: string[], callback: (payload: Record<string, unknown>) => void) => () => void;
|
|
7
|
+
interface FlowRealtimeOptions {
|
|
8
|
+
flowParent: Ref<Task | null>;
|
|
9
|
+
flowNodes: Ref<TaskFlowNode[]>;
|
|
10
|
+
flowEdges: Ref<TaskFlowEdge[]>;
|
|
11
|
+
flowCache: ReturnType<typeof useFlowCache>;
|
|
12
|
+
notifications: ReturnType<typeof useFlowNotifications>;
|
|
13
|
+
channelSubscriber?: FlowChannelSubscriber;
|
|
14
|
+
refreshFromExternal: () => Promise<void>;
|
|
15
|
+
}
|
|
16
|
+
export declare function useFlowRealtime({ flowParent, flowNodes, flowEdges, flowCache, notifications, channelSubscriber, refreshFromExternal, }: FlowRealtimeOptions): {
|
|
17
|
+
handleTaskEvent: (payload: {
|
|
18
|
+
id: string;
|
|
19
|
+
action: string;
|
|
20
|
+
data?: Record<string, unknown>;
|
|
21
|
+
}) => void;
|
|
22
|
+
};
|
|
23
|
+
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
export interface SubflowWindow {
|
|
3
|
+
id: string;
|
|
4
|
+
nodeId: string;
|
|
5
|
+
title: string;
|
|
6
|
+
x: number;
|
|
7
|
+
y: number;
|
|
8
|
+
w: number;
|
|
9
|
+
h: number;
|
|
10
|
+
zIndex: number;
|
|
11
|
+
}
|
|
12
|
+
export declare function useFlowSubflows(): {
|
|
13
|
+
subflowWindows: Ref<SubflowWindow[], SubflowWindow[]>;
|
|
14
|
+
isSubflowWindow: Ref<boolean, boolean>;
|
|
15
|
+
insertTemplateHandler: Ref<((targetNodeId: string | null) => void) | null, ((targetNodeId: string | null) => void) | null>;
|
|
16
|
+
openInsertTemplate: (targetNodeId: string | null) => void;
|
|
17
|
+
openSubflowPanel: (nodeId: string, title: string) => void;
|
|
18
|
+
closeSubflowWindow: (nodeId: string) => void;
|
|
19
|
+
bringWindowToFront: (nodeId: string) => void;
|
|
20
|
+
updateWindowPosition: (nodeId: string, x: number, y: number) => void;
|
|
21
|
+
updateWindowSize: (nodeId: string, w: number, h: number) => void;
|
|
22
|
+
};
|
|
@@ -1,33 +1,24 @@
|
|
|
1
1
|
import { AntConnect, Notepad, TableQueryShort, Task } from '@antcde/connect-ts';
|
|
2
2
|
import { Ref } from 'vue';
|
|
3
|
+
import { FlowChannelSubscriber } from './useFlowRealtime';
|
|
3
4
|
import { TaskFlowEdge, TaskFlowNode } from './useTaskFlowTypes';
|
|
5
|
+
export type { FlowNotification } from './useFlowNotifications';
|
|
6
|
+
export type { FlowChannelSubscriber } from './useFlowRealtime';
|
|
7
|
+
export type { SubflowWindow } from './useFlowSubflows';
|
|
4
8
|
export type { TaskFlowEdge, TaskFlowNode, TaskFlowQuery } from './useTaskFlowTypes';
|
|
5
|
-
export interface SubflowWindow {
|
|
6
|
-
id: string;
|
|
7
|
-
nodeId: string;
|
|
8
|
-
title: string;
|
|
9
|
-
x: number;
|
|
10
|
-
y: number;
|
|
11
|
-
w: number;
|
|
12
|
-
h: number;
|
|
13
|
-
zIndex: number;
|
|
14
|
-
}
|
|
15
|
-
export interface FlowNotification {
|
|
16
|
-
id: string;
|
|
17
|
-
title: string;
|
|
18
|
-
oldStatus: string;
|
|
19
|
-
newStatus: string;
|
|
20
|
-
timestamp: number;
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* Optional real-time channel subscriber. The flow composable calls `subscribe`
|
|
24
|
-
* when it knows which project/license channel to listen on, and the host
|
|
25
|
-
* provides the Echo/signal implementation.
|
|
26
|
-
*/
|
|
27
|
-
export type FlowChannelSubscriber = (channel: string, events: string[], callback: (payload: any) => void) => () => void;
|
|
28
9
|
export declare function useTaskFlow(antConnect: AntConnect, notepad: Notepad, channelSubscriber?: FlowChannelSubscriber): {
|
|
29
|
-
|
|
30
|
-
|
|
10
|
+
fetchVersions: () => Promise<void>;
|
|
11
|
+
publishVersion: (changeSummary?: string) => Promise<import('@antcde/connect-ts').TaskTemplateVersion | null>;
|
|
12
|
+
checkUpdates: () => Promise<void>;
|
|
13
|
+
fetchDiff: (targetVersionId?: string) => Promise<void>;
|
|
14
|
+
syncToVersion: (targetVersionId?: string) => Promise<import('@antcde/connect-ts').VersionSyncResult | null>;
|
|
15
|
+
enterCompareMode: (targetVersionId?: string) => Promise<void>;
|
|
16
|
+
enterCompareOriginalMode: () => Promise<void>;
|
|
17
|
+
changeCompareTarget: (targetVersionId: string) => Promise<void>;
|
|
18
|
+
switchToCompareOriginal: () => Promise<void>;
|
|
19
|
+
switchToCompareVersion: (targetVersionId?: string) => Promise<void>;
|
|
20
|
+
compareTwoTemplateVersions: (fromVersionId: string, toVersionId: string) => Promise<void>;
|
|
21
|
+
exitCompareMode: () => void;
|
|
31
22
|
versions: Ref<{
|
|
32
23
|
id: string;
|
|
33
24
|
template_id: string;
|
|
@@ -165,11 +156,6 @@ export declare function useTaskFlow(antConnect: AntConnect, notepad: Notepad, ch
|
|
|
165
156
|
target_version_id?: string | undefined;
|
|
166
157
|
from_version_id?: string | undefined;
|
|
167
158
|
} | null>;
|
|
168
|
-
isTemplate: import('vue').ComputedRef<boolean>;
|
|
169
|
-
hasUpdate: import('vue').ComputedRef<boolean>;
|
|
170
|
-
currentVersion: import('vue').ComputedRef<number>;
|
|
171
|
-
latestVersion: import('vue').ComputedRef<number>;
|
|
172
|
-
hasVersions: import('vue').ComputedRef<boolean>;
|
|
173
159
|
isPublishing: Ref<boolean, boolean>;
|
|
174
160
|
isSyncing: Ref<boolean, boolean>;
|
|
175
161
|
isDiffLoading: Ref<boolean, boolean>;
|
|
@@ -178,6 +164,11 @@ export declare function useTaskFlow(antConnect: AntConnect, notepad: Notepad, ch
|
|
|
178
164
|
isCompareTwoVersions: Ref<boolean, boolean>;
|
|
179
165
|
selectedTargetVersionId: Ref<string | null, string | null>;
|
|
180
166
|
selectedFromVersionId: Ref<string | null, string | null>;
|
|
167
|
+
isTemplate: import('vue').ComputedRef<boolean>;
|
|
168
|
+
hasUpdate: import('vue').ComputedRef<boolean>;
|
|
169
|
+
currentVersion: import('vue').ComputedRef<number>;
|
|
170
|
+
latestVersion: import('vue').ComputedRef<number>;
|
|
171
|
+
hasVersions: import('vue').ComputedRef<boolean>;
|
|
181
172
|
availableVersions: import('vue').ComputedRef<{
|
|
182
173
|
id: string;
|
|
183
174
|
template_id: string;
|
|
@@ -192,38 +183,22 @@ export declare function useTaskFlow(antConnect: AntConnect, notepad: Notepad, ch
|
|
|
192
183
|
created_at: string;
|
|
193
184
|
snapshot?: any;
|
|
194
185
|
}[]>;
|
|
195
|
-
diffNodeMap: import('vue').ComputedRef<Map<string, import('./
|
|
196
|
-
diffEdgeMap: import('vue').ComputedRef<Map<string, import('./
|
|
186
|
+
diffNodeMap: import('vue').ComputedRef<Map<string, import('./useTemplateVersioningState').DiffStatus>>;
|
|
187
|
+
diffEdgeMap: import('vue').ComputedRef<Map<string, import('./useTemplateVersioningState').DiffStatus>>;
|
|
197
188
|
ghostNodes: import('vue').ComputedRef<TaskFlowNode[]>;
|
|
198
189
|
ghostEdges: import('vue').ComputedRef<TaskFlowEdge[]>;
|
|
199
190
|
canApplyCompare: import('vue').ComputedRef<boolean>;
|
|
200
191
|
totalChanges: import('vue').ComputedRef<number>;
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
compareTwoTemplateVersions: (fromVersionId: string, toVersionId: string) => Promise<void>;
|
|
212
|
-
exitCompareMode: () => void;
|
|
213
|
-
deleteFlowParentApi: import('@antcde/vue-utils').UseApiReturn<import('@antcde/connect-ts').MessageResponse | null, [taskId: string, method: string], true>;
|
|
214
|
-
getFlowNodesApi: import('@antcde/vue-utils').UseApiReturn<import('@antcde/connect-ts/services/TaskTemplate.types').GetTasksResponse<Task> | null, [licenseId: string, query?: string | undefined], true>;
|
|
215
|
-
deletedFlowId: Ref<string | null, string | null>;
|
|
216
|
-
enableAutoRefresh: () => void;
|
|
217
|
-
disableAutoRefresh: () => void;
|
|
218
|
-
refreshFromExternal: () => Promise<void>;
|
|
219
|
-
handleTaskEvent: (payload: {
|
|
220
|
-
id: string;
|
|
221
|
-
action: string;
|
|
222
|
-
data?: any;
|
|
223
|
-
}) => void;
|
|
224
|
-
recentlyChangedNodeIds: Ref<Set<string>, Set<string>>;
|
|
225
|
-
flowNotifications: Ref<FlowNotification[], FlowNotification[]>;
|
|
226
|
-
dismissNotification: (id: string) => void;
|
|
192
|
+
antConnect: AntConnect;
|
|
193
|
+
subflowWindows: Ref<import('./useFlowSubflows').SubflowWindow[], import('./useFlowSubflows').SubflowWindow[]>;
|
|
194
|
+
isSubflowWindow: Ref<boolean, boolean>;
|
|
195
|
+
insertTemplateHandler: Ref<((targetNodeId: string | null) => void) | null, ((targetNodeId: string | null) => void) | null>;
|
|
196
|
+
openInsertTemplate: (targetNodeId: string | null) => void;
|
|
197
|
+
openSubflowPanel: (nodeId: string, title: string) => void;
|
|
198
|
+
closeSubflowWindow: (nodeId: string) => void;
|
|
199
|
+
bringWindowToFront: (nodeId: string) => void;
|
|
200
|
+
updateWindowPosition: (nodeId: string, x: number, y: number) => void;
|
|
201
|
+
updateWindowSize: (nodeId: string, w: number, h: number) => void;
|
|
227
202
|
flowStack: Ref<{
|
|
228
203
|
id: string;
|
|
229
204
|
title: string;
|
|
@@ -234,14 +209,16 @@ export declare function useTaskFlow(antConnect: AntConnect, notepad: Notepad, ch
|
|
|
234
209
|
isNavigating: Ref<boolean, boolean>;
|
|
235
210
|
navigateToChild: (childId: string, _childTitle: string) => Promise<void>;
|
|
236
211
|
navigateBack: (index?: number) => Promise<void>;
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
212
|
+
handleTaskEvent: (payload: {
|
|
213
|
+
id: string;
|
|
214
|
+
action: string;
|
|
215
|
+
data?: Record<string, unknown>;
|
|
216
|
+
}) => void;
|
|
217
|
+
recentlyChangedNodeIds: Ref<Set<string>, Set<string>>;
|
|
218
|
+
flowNotifications: Ref<import('./useFlowNotifications').FlowNotification[], import('./useFlowNotifications').FlowNotification[]>;
|
|
219
|
+
dismissNotification: (id: string) => void;
|
|
220
|
+
trackStatusChange: (nodeId: string, title: string, oldStatus: string, newStatus: string) => void;
|
|
221
|
+
trackNewNode: (nodeId: string) => void;
|
|
245
222
|
insertAfter: (nodeId: string) => Promise<string | undefined>;
|
|
246
223
|
insertBefore: (nodeId: string) => Promise<string | undefined>;
|
|
247
224
|
duplicateBranch: (nodeId: string) => Promise<void>;
|
|
@@ -284,51 +261,60 @@ export declare function useTaskFlow(antConnect: AntConnect, notepad: Notepad, ch
|
|
|
284
261
|
toggleCriticalPath: () => void;
|
|
285
262
|
criticalNodeIds: import('vue').ComputedRef<Set<string>>;
|
|
286
263
|
criticalEdgeIds: import('vue').ComputedRef<Set<string>>;
|
|
287
|
-
createEdge: (source: string, target: string, type: "BLOCKED_BY" | "NON_BLOCKING" | "CONDITIONAL") => Promise<void>;
|
|
288
|
-
deleteEdge: (edgeId: string) => Promise<void>;
|
|
289
|
-
setEdgeRelationType: (edgeId: string, newType: "BLOCKED_BY" | "NON_BLOCKING" | "CONDITIONAL") => Promise<void>;
|
|
290
|
-
updateEdgeLag: (edgeId: string, lagDays: number, lagActiveDays: number[]) => Promise<void>;
|
|
291
|
-
addRelationQuery: (edgeId: string, queryId: string) => Promise<void>;
|
|
292
|
-
deleteRelationQuery: (edgeId: string, queryId: string) => Promise<void>;
|
|
293
264
|
reevaluateRelation: (edgeId: string) => Promise<import('@antcde/connect-ts').TaskRelationReevaluateResponse | null>;
|
|
294
265
|
createRelationCondition: (edgeId: string, data: Parameters<AntConnect["tasks"]["createRelationCondition"]>[2]) => Promise<import('@antcde/connect-ts').TaskRelationCondition | null>;
|
|
295
266
|
updateRelationCondition: (edgeId: string, conditionId: string, data: Parameters<AntConnect["tasks"]["updateRelationCondition"]>[3]) => Promise<import('@antcde/connect-ts').TaskRelationCondition | null>;
|
|
296
267
|
deleteRelationCondition: (edgeId: string, conditionId: string) => Promise<void>;
|
|
297
268
|
setRelationBooleanMode: (edgeId: string, mode: "AND" | "OR" | null) => Promise<void>;
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
hoveredNodeId: Ref<string | null, string | null>;
|
|
305
|
-
editingConditionsEdgeId: Ref<string | null, string | null>;
|
|
306
|
-
openConditionsEditor: (edgeId: string) => void;
|
|
307
|
-
closeConditionsEditor: () => void;
|
|
308
|
-
fallbackProjectId: Ref<string | null, string | null>;
|
|
309
|
-
projectQueries: Ref<TableQueryShort[], TableQueryShort[]>;
|
|
310
|
-
isAutoRefreshEnabled: Ref<boolean, boolean>;
|
|
311
|
-
fetchFlowParent: (taskId: string) => Promise<boolean>;
|
|
312
|
-
updateFlowParent: (title: string) => Promise<void>;
|
|
313
|
-
deleteFlowParent: () => Promise<void>;
|
|
314
|
-
toggleLockFlowParent: (is_locked: boolean) => Promise<void>;
|
|
315
|
-
fetchFlowNodesAndEdges: (isAutoRefresh?: boolean) => Promise<void>;
|
|
269
|
+
createEdge: (source: string, target: string, type: "BLOCKED_BY" | "NON_BLOCKING" | "CONDITIONAL", sourceHandle?: string, targetHandle?: string) => Promise<void>;
|
|
270
|
+
deleteEdge: (edgeId: string) => Promise<void>;
|
|
271
|
+
setEdgeRelationType: (edgeId: string, newType: "BLOCKED_BY" | "NON_BLOCKING" | "CONDITIONAL") => Promise<void>;
|
|
272
|
+
updateEdgeLag: (edgeId: string, lagDays: number, lagActiveDays: number[]) => Promise<void>;
|
|
273
|
+
addRelationQuery: (edgeId: string, queryId: string) => Promise<void>;
|
|
274
|
+
deleteRelationQuery: (edgeId: string, queryId: string) => Promise<void>;
|
|
316
275
|
createNode: (position?: {
|
|
317
276
|
x: number;
|
|
318
277
|
y: number;
|
|
319
278
|
}) => Promise<string | null>;
|
|
279
|
+
createTriggerNode: (triggerId: string, position?: {
|
|
280
|
+
x: number;
|
|
281
|
+
y: number;
|
|
282
|
+
}) => Promise<string | null>;
|
|
320
283
|
updateNode: (data: {
|
|
321
284
|
id: string;
|
|
322
285
|
position_x: number;
|
|
323
286
|
position_y: number;
|
|
324
287
|
}) => Promise<void>;
|
|
325
288
|
deleteNode: (nodeId: string) => Promise<void>;
|
|
326
|
-
createTriggerNode: (triggerId: string, position?: {
|
|
327
|
-
x: number;
|
|
328
|
-
y: number;
|
|
329
|
-
}) => Promise<string | null>;
|
|
330
|
-
updateFlowTask: (task: Task) => void;
|
|
331
289
|
updateTaskDuration: (taskId: string, durationDays: number | null, durationActiveDays: number[]) => Promise<void>;
|
|
290
|
+
updateFlowTask: (task: Task) => void;
|
|
291
|
+
deletedFlowId: Ref<string | null, string | null>;
|
|
292
|
+
isAutoRefreshEnabled: Ref<boolean, boolean>;
|
|
293
|
+
isAutoRefreshing: Ref<boolean, boolean>;
|
|
294
|
+
deleteFlowParentApi: import('@antcde/vue-utils').UseApiReturn<import('@antcde/connect-ts').MessageResponse | null, [taskId: string, method: string], true>;
|
|
295
|
+
getFlowNodesApi: import('@antcde/vue-utils').UseApiReturn<import('@antcde/connect-ts/services/TaskTemplate.types').GetTasksResponse<Task> | null, [licenseId: string, query?: string | undefined], true>;
|
|
296
|
+
fetchFlowNodesAndEdges: (isAutoRefresh?: boolean) => Promise<void>;
|
|
297
|
+
refreshFromExternal: () => Promise<void>;
|
|
298
|
+
fetchProjectQueries: () => Promise<void>;
|
|
299
|
+
fetchFlowParent: (taskId: string) => Promise<boolean>;
|
|
300
|
+
updateFlowParent: (title: string) => Promise<void>;
|
|
301
|
+
deleteFlowParent: () => Promise<void>;
|
|
302
|
+
toggleLockFlowParent: (is_locked: boolean) => Promise<void>;
|
|
303
|
+
enableAutoRefresh: () => void;
|
|
304
|
+
disableAutoRefresh: () => void;
|
|
305
|
+
showTask: (taskId: string) => Promise<boolean>;
|
|
306
|
+
setHighlightedNode: (taskId: string) => Promise<string>;
|
|
307
|
+
flowParent: Ref<Task | null, Task | null>;
|
|
308
|
+
flowNodes: Ref<TaskFlowNode[], TaskFlowNode[]>;
|
|
309
|
+
flowEdges: Ref<TaskFlowEdge[], TaskFlowEdge[]>;
|
|
310
|
+
highlightedNodeId: Ref<string | null, string | null>;
|
|
311
|
+
hoveredNodeId: Ref<string | null, string | null>;
|
|
312
|
+
layoutDirection: Ref<"TB" | "LR", "TB" | "LR">;
|
|
313
|
+
editingConditionsEdgeId: Ref<string | null, string | null>;
|
|
314
|
+
openConditionsEditor: (edgeId: string) => void;
|
|
315
|
+
closeConditionsEditor: () => void;
|
|
316
|
+
fallbackProjectId: Ref<string | null, string | null>;
|
|
317
|
+
projectQueries: Ref<TableQueryShort[], TableQueryShort[]>;
|
|
332
318
|
};
|
|
333
319
|
type TaskFlowStore = ReturnType<typeof useTaskFlow>;
|
|
334
320
|
export declare function provideTaskFlow(instance: TaskFlowStore): TaskFlowStore;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { AntConnect } from '@antcde/connect-ts';
|
|
2
|
+
import { Ref } from 'vue';
|
|
3
|
+
import { TaskFlowEdge } from './useTaskFlowTypes';
|
|
4
|
+
export declare function useTaskFlowEdgeConditions(antConnect: AntConnect, flowEdges: Ref<TaskFlowEdge[]>): {
|
|
5
|
+
reevaluateRelation: (edgeId: string) => Promise<import('@antcde/connect-ts').TaskRelationReevaluateResponse | null>;
|
|
6
|
+
createRelationCondition: (edgeId: string, data: Parameters<AntConnect["tasks"]["createRelationCondition"]>[2]) => Promise<import('@antcde/connect-ts').TaskRelationCondition | null>;
|
|
7
|
+
updateRelationCondition: (edgeId: string, conditionId: string, data: Parameters<AntConnect["tasks"]["updateRelationCondition"]>[3]) => Promise<import('@antcde/connect-ts').TaskRelationCondition | null>;
|
|
8
|
+
deleteRelationCondition: (edgeId: string, conditionId: string) => Promise<void>;
|
|
9
|
+
setRelationBooleanMode: (edgeId: string, mode: "AND" | "OR" | null) => Promise<void>;
|
|
10
|
+
};
|
|
@@ -3,16 +3,16 @@ import { Ref } from 'vue';
|
|
|
3
3
|
import { TaskFlowEdge } from './useTaskFlowTypes';
|
|
4
4
|
type RelationType = 'BLOCKED_BY' | 'NON_BLOCKING' | 'CONDITIONAL';
|
|
5
5
|
export declare function useTaskFlowEdges(antConnect: AntConnect, flowEdges: Ref<TaskFlowEdge[]>): {
|
|
6
|
-
createEdge: (source: string, target: string, type: RelationType) => Promise<void>;
|
|
7
|
-
deleteEdge: (edgeId: string) => Promise<void>;
|
|
8
|
-
setEdgeRelationType: (edgeId: string, newType: RelationType) => Promise<void>;
|
|
9
|
-
updateEdgeLag: (edgeId: string, lagDays: number, lagActiveDays: number[]) => Promise<void>;
|
|
10
|
-
addRelationQuery: (edgeId: string, queryId: string) => Promise<void>;
|
|
11
|
-
deleteRelationQuery: (edgeId: string, queryId: string) => Promise<void>;
|
|
12
6
|
reevaluateRelation: (edgeId: string) => Promise<import('@antcde/connect-ts').TaskRelationReevaluateResponse | null>;
|
|
13
7
|
createRelationCondition: (edgeId: string, data: Parameters<AntConnect["tasks"]["createRelationCondition"]>[2]) => Promise<import('@antcde/connect-ts').TaskRelationCondition | null>;
|
|
14
8
|
updateRelationCondition: (edgeId: string, conditionId: string, data: Parameters<AntConnect["tasks"]["updateRelationCondition"]>[3]) => Promise<import('@antcde/connect-ts').TaskRelationCondition | null>;
|
|
15
9
|
deleteRelationCondition: (edgeId: string, conditionId: string) => Promise<void>;
|
|
16
10
|
setRelationBooleanMode: (edgeId: string, mode: "AND" | "OR" | null) => Promise<void>;
|
|
11
|
+
createEdge: (source: string, target: string, type: RelationType, sourceHandle?: string, targetHandle?: string) => Promise<void>;
|
|
12
|
+
deleteEdge: (edgeId: string) => Promise<void>;
|
|
13
|
+
setEdgeRelationType: (edgeId: string, newType: RelationType) => Promise<void>;
|
|
14
|
+
updateEdgeLag: (edgeId: string, lagDays: number, lagActiveDays: number[]) => Promise<void>;
|
|
15
|
+
addRelationQuery: (edgeId: string, queryId: string) => Promise<void>;
|
|
16
|
+
deleteRelationQuery: (edgeId: string, queryId: string) => Promise<void>;
|
|
17
17
|
};
|
|
18
18
|
export {};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { Task, TaskRelation } from '@antcde/connect-ts';
|
|
2
|
+
import { TaskFlowEdge, TaskFlowNode } from './useTaskFlowTypes';
|
|
3
|
+
export declare function mapTasksToNodes(tasks: Task[]): TaskFlowNode[];
|
|
4
|
+
export declare function mapTasksToEdges(relations: TaskRelation[]): TaskFlowEdge[];
|
|
@@ -1,8 +1,20 @@
|
|
|
1
|
-
import { AntConnect, Task
|
|
1
|
+
import { AntConnect, Task } from '@antcde/connect-ts';
|
|
2
2
|
import { Ref } from 'vue';
|
|
3
|
-
import { TaskFlowEdge
|
|
4
|
-
export type DiffStatus
|
|
3
|
+
import { TaskFlowEdge } from './useTaskFlowTypes';
|
|
4
|
+
export type { DiffStatus } from './useTemplateVersioningState';
|
|
5
5
|
export declare function useTemplateVersioning(antConnect: AntConnect, flowParent: Ref<Task | null>, flowEdges: Ref<TaskFlowEdge[]>): {
|
|
6
|
+
fetchVersions: () => Promise<void>;
|
|
7
|
+
publishVersion: (changeSummary?: string) => Promise<import('@antcde/connect-ts').TaskTemplateVersion | null>;
|
|
8
|
+
checkUpdates: () => Promise<void>;
|
|
9
|
+
fetchDiff: (targetVersionId?: string) => Promise<void>;
|
|
10
|
+
syncToVersion: (targetVersionId?: string) => Promise<import('@antcde/connect-ts').VersionSyncResult | null>;
|
|
11
|
+
enterCompareMode: (targetVersionId?: string) => Promise<void>;
|
|
12
|
+
enterCompareOriginalMode: () => Promise<void>;
|
|
13
|
+
changeCompareTarget: (targetVersionId: string) => Promise<void>;
|
|
14
|
+
switchToCompareOriginal: () => Promise<void>;
|
|
15
|
+
switchToCompareVersion: (targetVersionId?: string) => Promise<void>;
|
|
16
|
+
compareTwoTemplateVersions: (fromVersionId: string, toVersionId: string) => Promise<void>;
|
|
17
|
+
exitCompareMode: () => void;
|
|
6
18
|
versions: Ref<{
|
|
7
19
|
id: string;
|
|
8
20
|
template_id: string;
|
|
@@ -16,7 +28,7 @@ export declare function useTemplateVersioning(antConnect: AntConnect, flowParent
|
|
|
16
28
|
};
|
|
17
29
|
created_at: string;
|
|
18
30
|
snapshot?: any;
|
|
19
|
-
}[], TaskTemplateVersion[] | {
|
|
31
|
+
}[], import('@antcde/connect-ts').TaskTemplateVersion[] | {
|
|
20
32
|
id: string;
|
|
21
33
|
template_id: string;
|
|
22
34
|
version: number;
|
|
@@ -35,7 +47,7 @@ export declare function useTemplateVersioning(antConnect: AntConnect, flowParent
|
|
|
35
47
|
current_version: number;
|
|
36
48
|
latest_version: number;
|
|
37
49
|
template_id: string;
|
|
38
|
-
} | null, VersionCheck | {
|
|
50
|
+
} | null, import('@antcde/connect-ts').VersionCheck | {
|
|
39
51
|
has_update: boolean;
|
|
40
52
|
current_version: number;
|
|
41
53
|
latest_version: number;
|
|
@@ -90,7 +102,7 @@ export declare function useTemplateVersioning(antConnect: AntConnect, flowParent
|
|
|
90
102
|
task_mapping?: Record<string, string> | undefined;
|
|
91
103
|
target_version_id?: string | undefined;
|
|
92
104
|
from_version_id?: string | undefined;
|
|
93
|
-
} | null, VersionDiff | {
|
|
105
|
+
} | null, import('@antcde/connect-ts').VersionDiff | {
|
|
94
106
|
added: {
|
|
95
107
|
source_id: string;
|
|
96
108
|
title: string;
|
|
@@ -140,11 +152,6 @@ export declare function useTemplateVersioning(antConnect: AntConnect, flowParent
|
|
|
140
152
|
target_version_id?: string | undefined;
|
|
141
153
|
from_version_id?: string | undefined;
|
|
142
154
|
} | null>;
|
|
143
|
-
isTemplate: import('vue').ComputedRef<boolean>;
|
|
144
|
-
hasUpdate: import('vue').ComputedRef<boolean>;
|
|
145
|
-
currentVersion: import('vue').ComputedRef<number>;
|
|
146
|
-
latestVersion: import('vue').ComputedRef<number>;
|
|
147
|
-
hasVersions: import('vue').ComputedRef<boolean>;
|
|
148
155
|
isPublishing: Ref<boolean, boolean>;
|
|
149
156
|
isSyncing: Ref<boolean, boolean>;
|
|
150
157
|
isDiffLoading: Ref<boolean, boolean>;
|
|
@@ -153,6 +160,11 @@ export declare function useTemplateVersioning(antConnect: AntConnect, flowParent
|
|
|
153
160
|
isCompareTwoVersions: Ref<boolean, boolean>;
|
|
154
161
|
selectedTargetVersionId: Ref<string | null, string | null>;
|
|
155
162
|
selectedFromVersionId: Ref<string | null, string | null>;
|
|
163
|
+
isTemplate: import('vue').ComputedRef<boolean>;
|
|
164
|
+
hasUpdate: import('vue').ComputedRef<boolean>;
|
|
165
|
+
currentVersion: import('vue').ComputedRef<number>;
|
|
166
|
+
latestVersion: import('vue').ComputedRef<number>;
|
|
167
|
+
hasVersions: import('vue').ComputedRef<boolean>;
|
|
156
168
|
availableVersions: import('vue').ComputedRef<{
|
|
157
169
|
id: string;
|
|
158
170
|
template_id: string;
|
|
@@ -167,22 +179,10 @@ export declare function useTemplateVersioning(antConnect: AntConnect, flowParent
|
|
|
167
179
|
created_at: string;
|
|
168
180
|
snapshot?: any;
|
|
169
181
|
}[]>;
|
|
170
|
-
diffNodeMap: import('vue').ComputedRef<Map<string, DiffStatus>>;
|
|
171
|
-
diffEdgeMap: import('vue').ComputedRef<Map<string, DiffStatus>>;
|
|
172
|
-
ghostNodes: import('vue').ComputedRef<TaskFlowNode[]>;
|
|
182
|
+
diffNodeMap: import('vue').ComputedRef<Map<string, import('./useTemplateVersioningState').DiffStatus>>;
|
|
183
|
+
diffEdgeMap: import('vue').ComputedRef<Map<string, import('./useTemplateVersioningState').DiffStatus>>;
|
|
184
|
+
ghostNodes: import('vue').ComputedRef<import('./useTaskFlowTypes').TaskFlowNode[]>;
|
|
173
185
|
ghostEdges: import('vue').ComputedRef<TaskFlowEdge[]>;
|
|
174
186
|
canApplyCompare: import('vue').ComputedRef<boolean>;
|
|
175
187
|
totalChanges: import('vue').ComputedRef<number>;
|
|
176
|
-
fetchVersions: () => Promise<void>;
|
|
177
|
-
publishVersion: (changeSummary?: string) => Promise<TaskTemplateVersion | null>;
|
|
178
|
-
checkUpdates: () => Promise<void>;
|
|
179
|
-
fetchDiff: (targetVersionId?: string) => Promise<void>;
|
|
180
|
-
syncToVersion: (targetVersionId?: string) => Promise<import('@antcde/connect-ts').VersionSyncResult | null>;
|
|
181
|
-
enterCompareMode: (targetVersionId?: string) => Promise<void>;
|
|
182
|
-
enterCompareOriginalMode: () => Promise<void>;
|
|
183
|
-
changeCompareTarget: (targetVersionId: string) => Promise<void>;
|
|
184
|
-
switchToCompareOriginal: () => Promise<void>;
|
|
185
|
-
switchToCompareVersion: (targetVersionId?: string) => Promise<void>;
|
|
186
|
-
compareTwoTemplateVersions: (fromVersionId: string, toVersionId: string) => Promise<void>;
|
|
187
|
-
exitCompareMode: () => void;
|
|
188
188
|
};
|