@antcde/component-library 0.1.14-rc.f79030c → 0.1.14-rc.fd98dae

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.
Files changed (107) hide show
  1. package/README.md +2 -2
  2. package/dist/index.js +40068 -35097
  3. package/dist/types/src/components/AntTourZone/_TourInfoCard.vue.d.ts +18 -0
  4. package/dist/types/src/components/AntTourZone/_TourRing.vue.d.ts +15 -0
  5. package/dist/types/src/components/AntTourZone/index.vue.d.ts +49 -0
  6. package/dist/types/{components → src/components}/BaseAntDatePicker.vue.d.ts +2 -0
  7. package/dist/types/{components → src/components}/BaseDeleteDialog.vue.d.ts +8 -1
  8. package/dist/types/src/components/DmsFilePicker/composables/usePickerNavigation.d.ts +196 -0
  9. package/dist/types/src/components/DmsFilePicker/composables/usePickerUpload.d.ts +22 -0
  10. package/dist/types/src/components/DmsFilePicker/index.vue.d.ts +28 -0
  11. package/dist/types/src/components/DmsFilePicker/utils/fileFormatting.d.ts +6 -0
  12. package/dist/types/src/components/FilePreviewContent/index.vue.d.ts +31 -0
  13. package/dist/types/src/components/FlowWindowContent/index.vue.d.ts +51 -0
  14. package/dist/types/src/components/RichTextEditor/index.vue.d.ts +51 -0
  15. package/dist/types/{components → src/components}/StackedLabels/_LabelsMenuCard.vue.d.ts +1 -1
  16. package/dist/types/src/components/TasksFlow/components/_FlowBreadcrumb.vue.d.ts +17 -0
  17. package/dist/types/src/components/TasksFlow/components/_FlowEdgeConditionsDialog.vue.d.ts +10 -0
  18. package/dist/types/{components/TasksFlow/components/nodes/_triggerNode.vue.d.ts → src/components/TasksFlow/components/_FlowSearch.vue.d.ts} +4 -3
  19. package/dist/types/src/components/TasksFlow/components/_FlowStats.vue.d.ts +5 -0
  20. package/dist/types/src/components/TasksFlow/components/_FlowToolbar.vue.d.ts +26 -0
  21. package/dist/types/src/components/TasksFlow/components/_FlowTriggerMenu.vue.d.ts +17 -0
  22. package/dist/types/src/components/TasksFlow/components/_FlowVersionBar.vue.d.ts +12 -0
  23. package/dist/types/src/components/TasksFlow/components/_InsertTemplateDialog.vue.d.ts +17 -0
  24. package/dist/types/src/components/TasksFlow/components/_SubflowPanel.vue.d.ts +33 -0
  25. package/dist/types/src/components/TasksFlow/components/_VersionDiffView.vue.d.ts +14 -0
  26. package/dist/types/src/components/TasksFlow/components/_VersionPublishDialog.vue.d.ts +14 -0
  27. package/dist/types/src/components/TasksFlow/components/_flowEditor.vue.d.ts +13 -0
  28. package/dist/types/src/components/TasksFlow/components/nodes/_DurationEditor.vue.d.ts +33 -0
  29. package/dist/types/src/components/TasksFlow/components/nodes/_NodeContextMenu.vue.d.ts +35 -0
  30. package/dist/types/src/components/TasksFlow/components/nodes/_NodeMeta.vue.d.ts +14 -0
  31. package/dist/types/src/components/TasksFlow/components/nodes/_UserPicker.vue.d.ts +32 -0
  32. package/dist/types/{components → src/components}/TasksFlow/components/nodes/_taskNode.vue.d.ts +2 -2
  33. package/dist/types/src/components/TasksFlow/components/nodes/_triggerNode.vue.d.ts +10 -0
  34. package/dist/types/src/components/TasksFlow/components/nodes/useTaskNodeState.d.ts +86 -0
  35. package/dist/types/src/components/TasksFlow/composables/useAutoLayout.d.ts +22 -0
  36. package/dist/types/src/components/TasksFlow/composables/useCriticalPath.d.ts +8 -0
  37. package/dist/types/src/components/TasksFlow/composables/useFlowAutoLayout.d.ts +12 -0
  38. package/dist/types/src/components/TasksFlow/composables/useFlowCache.d.ts +17 -0
  39. package/dist/types/src/components/TasksFlow/composables/useFlowCrud.d.ts +21 -0
  40. package/dist/types/src/components/TasksFlow/composables/useFlowEditor.d.ts +54 -0
  41. package/dist/types/src/components/TasksFlow/composables/useFlowFetch.d.ts +33 -0
  42. package/dist/types/src/components/TasksFlow/composables/useFlowKeyboard.d.ts +15 -0
  43. package/dist/types/src/components/TasksFlow/composables/useFlowNotifications.d.ts +15 -0
  44. package/dist/types/src/components/TasksFlow/composables/useFlowOperations.d.ts +8 -0
  45. package/dist/types/src/components/TasksFlow/composables/useFlowRealtime.d.ts +23 -0
  46. package/dist/types/src/components/TasksFlow/composables/useFlowSearch.d.ts +14 -0
  47. package/dist/types/src/components/TasksFlow/composables/useFlowSubflows.d.ts +22 -0
  48. package/dist/types/src/components/TasksFlow/composables/useFlowUsers.d.ts +27 -0
  49. package/dist/types/src/components/TasksFlow/composables/useFlowViewport.d.ts +28 -0
  50. package/dist/types/src/components/TasksFlow/composables/useTaskFlow.d.ts +321 -0
  51. package/dist/types/{components → src/components}/TasksFlow/composables/useTaskFlowDragDrop.d.ts +0 -1
  52. package/dist/types/src/components/TasksFlow/composables/useTaskFlowEdgeConditions.d.ts +10 -0
  53. package/dist/types/src/components/TasksFlow/composables/useTaskFlowEdges.d.ts +18 -0
  54. package/dist/types/src/components/TasksFlow/composables/useTaskFlowMappers.d.ts +4 -0
  55. package/dist/types/src/components/TasksFlow/composables/useTaskFlowTypes.d.ts +76 -0
  56. package/dist/types/src/components/TasksFlow/composables/useTemplateVersioning.d.ts +188 -0
  57. package/dist/types/src/components/TasksFlow/composables/useTemplateVersioningState.d.ts +176 -0
  58. package/dist/types/src/components/TasksFlow/composables/useTriggerExecution.d.ts +21 -0
  59. package/dist/types/src/components/TasksFlow/index.vue.d.ts +39 -0
  60. package/dist/types/src/components/UnifiedWindow/index.vue.d.ts +67 -0
  61. package/dist/types/src/components/UnifiedWindow/useWindowDrag.d.ts +28 -0
  62. package/dist/types/src/components/VersionPublishDialog.vue.d.ts +24 -0
  63. package/dist/types/{index.d.ts → src/index.d.ts} +12 -1
  64. package/lib/GisViewer/GisViewer.vue +3 -2
  65. package/lib/build/layer-order.css +33 -0
  66. package/lib/build/uno.ts +117 -0
  67. package/lib/build/vite.ts +117 -0
  68. package/lib/build/vuetify-overrides.css +14 -0
  69. package/lib/build/vuetify.ts +230 -0
  70. package/lib/test/TESTING.claude.md +225 -0
  71. package/lib/test/createMockAppContext.ts +211 -0
  72. package/lib/test/createTestPinia.ts +31 -0
  73. package/lib/test/createTestRouter.ts +31 -0
  74. package/lib/test/index.ts +41 -0
  75. package/lib/test/mockVueRouter.ts +93 -0
  76. package/lib/test/mocks/createMockApi.ts +43 -0
  77. package/lib/test/mocks/createMockContext.ts +109 -0
  78. package/lib/test/mocks/createMockSignal.ts +30 -0
  79. package/lib/test/mocks/createMockUser.ts +87 -0
  80. package/lib/test/mocks/index.ts +11 -0
  81. package/lib/test/mountApp.ts +47 -0
  82. package/lib/test/mountWithContext.ts +94 -0
  83. package/lib/test/setup.ts +151 -0
  84. package/lib/test/testAppSetup.ts +115 -0
  85. package/lib/test/vitest.ts +69 -0
  86. package/package.json +128 -30
  87. package/dist/types/components/TasksFlow/components/_flowEditor.vue.d.ts +0 -16
  88. package/dist/types/components/TasksFlow/composables/useTaskFlow.d.ts +0 -103
  89. package/dist/types/components/TasksFlow/index.vue.d.ts +0 -51
  90. /package/dist/types/{components → src/components}/BaseAntButton.vue.d.ts +0 -0
  91. /package/dist/types/{components → src/components}/BaseAntCard.vue.d.ts +0 -0
  92. /package/dist/types/{components → src/components}/BaseAntCreateCard.vue.d.ts +0 -0
  93. /package/dist/types/{components → src/components}/BaseAntInput.vue.d.ts +0 -0
  94. /package/dist/types/{components → src/components}/BaseAntLoading.vue.d.ts +0 -0
  95. /package/dist/types/{components → src/components}/BaseAppCard.vue.d.ts +0 -0
  96. /package/dist/types/{components → src/components}/BaseAppCardSkeleton.vue.d.ts +0 -0
  97. /package/dist/types/{components → src/components}/BaseClickableIcon.vue.d.ts +0 -0
  98. /package/dist/types/{components → src/components}/BaseConfirmDialog.vue.d.ts +0 -0
  99. /package/dist/types/{components → src/components}/BaseDialog.vue.d.ts +0 -0
  100. /package/dist/types/{components → src/components}/BaseLimitedButton.vue.d.ts +0 -0
  101. /package/dist/types/{components → src/components}/BaseResizePanel.vue.d.ts +0 -0
  102. /package/dist/types/{components → src/components}/BulkLabelsMenu.vue.d.ts +0 -0
  103. /package/dist/types/{components → src/components}/GlobalLabelBadge.vue.d.ts +0 -0
  104. /package/dist/types/{components → src/components}/RBAC/Permissions/PermissionCard.vue.d.ts +0 -0
  105. /package/dist/types/{components → src/components}/StackedLabels/index.vue.d.ts +0 -0
  106. /package/dist/types/{components → src/components}/TasksFlow/components/_dropzoneBackground.vue.d.ts +0 -0
  107. /package/dist/types/{components → src/components}/TasksFlow/components/_flowEdge.vue.d.ts +0 -0
@@ -0,0 +1,321 @@
1
+ import { AntConnect, Notepad, TableQueryShort, Task } from '@antcde/connect-ts';
2
+ import { Ref } from 'vue';
3
+ import { FlowChannelSubscriber } from './useFlowRealtime';
4
+ import { TaskFlowEdge, TaskFlowNode } from './useTaskFlowTypes';
5
+ export type { FlowNotification } from './useFlowNotifications';
6
+ export type { FlowChannelSubscriber } from './useFlowRealtime';
7
+ export type { SubflowWindow } from './useFlowSubflows';
8
+ export type { TaskFlowEdge, TaskFlowNode, TaskFlowQuery } from './useTaskFlowTypes';
9
+ export declare function useTaskFlow(antConnect: AntConnect, notepad: Notepad, channelSubscriber?: FlowChannelSubscriber): {
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;
22
+ versions: Ref<{
23
+ id: string;
24
+ template_id: string;
25
+ version: number;
26
+ change_summary: string | null;
27
+ created_by: string | {
28
+ id: string;
29
+ firstname: string;
30
+ lastname: string;
31
+ email: string;
32
+ };
33
+ created_at: string;
34
+ snapshot?: any;
35
+ }[], import('@antcde/connect-ts').TaskTemplateVersion[] | {
36
+ id: string;
37
+ template_id: string;
38
+ version: number;
39
+ change_summary: string | null;
40
+ created_by: string | {
41
+ id: string;
42
+ firstname: string;
43
+ lastname: string;
44
+ email: string;
45
+ };
46
+ created_at: string;
47
+ snapshot?: any;
48
+ }[]>;
49
+ versionCheck: Ref<{
50
+ has_update: boolean;
51
+ current_version: number;
52
+ latest_version: number;
53
+ template_id: string;
54
+ } | null, import('@antcde/connect-ts').VersionCheck | {
55
+ has_update: boolean;
56
+ current_version: number;
57
+ latest_version: number;
58
+ template_id: string;
59
+ } | null>;
60
+ versionDiff: Ref<{
61
+ added: {
62
+ source_id: string;
63
+ title: string;
64
+ change_type: "added" | "removed";
65
+ duration_days?: number | null | undefined;
66
+ position_x?: number | undefined;
67
+ position_y?: number | undefined;
68
+ checks?: {
69
+ name: string;
70
+ }[] | undefined;
71
+ }[];
72
+ removed: {
73
+ source_id: string;
74
+ title: string;
75
+ change_type: "added" | "removed";
76
+ duration_days?: number | null | undefined;
77
+ position_x?: number | undefined;
78
+ position_y?: number | undefined;
79
+ checks?: {
80
+ name: string;
81
+ }[] | undefined;
82
+ }[];
83
+ modified: {
84
+ source_id: string;
85
+ title: string;
86
+ change_type: "modified";
87
+ changes: Record<string, {
88
+ old: any;
89
+ new: any;
90
+ }>;
91
+ }[];
92
+ relations_added: {
93
+ source_ref: string;
94
+ target_ref: string;
95
+ type: string;
96
+ lag_days: number;
97
+ }[];
98
+ relations_removed: {
99
+ source_ref: string;
100
+ target_ref: string;
101
+ type: string;
102
+ lag_days: number;
103
+ }[];
104
+ from_version: number;
105
+ to_version: number;
106
+ task_mapping?: Record<string, string> | undefined;
107
+ target_version_id?: string | undefined;
108
+ from_version_id?: string | undefined;
109
+ } | null, import('@antcde/connect-ts').VersionDiff | {
110
+ added: {
111
+ source_id: string;
112
+ title: string;
113
+ change_type: "added" | "removed";
114
+ duration_days?: number | null | undefined;
115
+ position_x?: number | undefined;
116
+ position_y?: number | undefined;
117
+ checks?: {
118
+ name: string;
119
+ }[] | undefined;
120
+ }[];
121
+ removed: {
122
+ source_id: string;
123
+ title: string;
124
+ change_type: "added" | "removed";
125
+ duration_days?: number | null | undefined;
126
+ position_x?: number | undefined;
127
+ position_y?: number | undefined;
128
+ checks?: {
129
+ name: string;
130
+ }[] | undefined;
131
+ }[];
132
+ modified: {
133
+ source_id: string;
134
+ title: string;
135
+ change_type: "modified";
136
+ changes: Record<string, {
137
+ old: any;
138
+ new: any;
139
+ }>;
140
+ }[];
141
+ relations_added: {
142
+ source_ref: string;
143
+ target_ref: string;
144
+ type: string;
145
+ lag_days: number;
146
+ }[];
147
+ relations_removed: {
148
+ source_ref: string;
149
+ target_ref: string;
150
+ type: string;
151
+ lag_days: number;
152
+ }[];
153
+ from_version: number;
154
+ to_version: number;
155
+ task_mapping?: Record<string, string> | undefined;
156
+ target_version_id?: string | undefined;
157
+ from_version_id?: string | undefined;
158
+ } | null>;
159
+ isPublishing: Ref<boolean, boolean>;
160
+ isSyncing: Ref<boolean, boolean>;
161
+ isDiffLoading: Ref<boolean, boolean>;
162
+ isCompareMode: Ref<boolean, boolean>;
163
+ isCompareOriginal: Ref<boolean, boolean>;
164
+ isCompareTwoVersions: Ref<boolean, boolean>;
165
+ selectedTargetVersionId: Ref<string | null, string | null>;
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>;
172
+ availableVersions: import('vue').ComputedRef<{
173
+ id: string;
174
+ template_id: string;
175
+ version: number;
176
+ change_summary: string | null;
177
+ created_by: string | {
178
+ id: string;
179
+ firstname: string;
180
+ lastname: string;
181
+ email: string;
182
+ };
183
+ created_at: string;
184
+ snapshot?: any;
185
+ }[]>;
186
+ diffNodeMap: import('vue').ComputedRef<Map<string, import('./useTemplateVersioningState').DiffStatus>>;
187
+ diffEdgeMap: import('vue').ComputedRef<Map<string, import('./useTemplateVersioningState').DiffStatus>>;
188
+ ghostNodes: import('vue').ComputedRef<TaskFlowNode[]>;
189
+ ghostEdges: import('vue').ComputedRef<TaskFlowEdge[]>;
190
+ canApplyCompare: import('vue').ComputedRef<boolean>;
191
+ totalChanges: import('vue').ComputedRef<number>;
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;
202
+ flowStack: Ref<{
203
+ id: string;
204
+ title: string;
205
+ }[], {
206
+ id: string;
207
+ title: string;
208
+ }[]>;
209
+ isNavigating: Ref<boolean, boolean>;
210
+ navigateToChild: (childId: string, _childTitle: string) => Promise<void>;
211
+ navigateBack: (index?: number) => Promise<void>;
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;
222
+ insertAfter: (nodeId: string) => Promise<string | undefined>;
223
+ insertBefore: (nodeId: string) => Promise<string | undefined>;
224
+ duplicateBranch: (nodeId: string) => Promise<void>;
225
+ flowUsers: Ref<{
226
+ id: string;
227
+ firstname: string;
228
+ lastname: string;
229
+ email: string;
230
+ name: string;
231
+ }[], import('./useFlowUsers').FlowUser[] | {
232
+ id: string;
233
+ firstname: string;
234
+ lastname: string;
235
+ email: string;
236
+ name: string;
237
+ }[]>;
238
+ assignUser: (taskId: string, userId: string | null) => Promise<void>;
239
+ searchQuery: Ref<string, string>;
240
+ isSearchOpen: Ref<boolean, boolean>;
241
+ isSearchActive: import('vue').ComputedRef<boolean>;
242
+ matchedNodeIds: import('vue').ComputedRef<Set<string>>;
243
+ currentMatchId: import('vue').ComputedRef<string | null>;
244
+ matchIndex: Ref<number, number>;
245
+ matchCount: import('vue').ComputedRef<number>;
246
+ openSearch: () => void;
247
+ closeSearch: () => void;
248
+ navigateToMatch: (direction: "next" | "prev") => string | null;
249
+ getTriggerStatus: (nodeId: string) => import('./useTriggerExecution').TriggerExecutionStatus | null;
250
+ executionMap: Ref<Map<string, {
251
+ status: "success" | "error" | "never";
252
+ executedAt: string | null;
253
+ durationMs: number | null;
254
+ }> & Omit<Map<string, import('./useTriggerExecution').TriggerExecutionStatus>, keyof Map<any, any>>, Map<string, import('./useTriggerExecution').TriggerExecutionStatus> | (Map<string, {
255
+ status: "success" | "error" | "never";
256
+ executedAt: string | null;
257
+ durationMs: number | null;
258
+ }> & Omit<Map<string, import('./useTriggerExecution').TriggerExecutionStatus>, keyof Map<any, any>>)>;
259
+ refetchExecutions: () => Promise<void>;
260
+ isCriticalPathActive: Ref<boolean, boolean>;
261
+ toggleCriticalPath: () => void;
262
+ criticalNodeIds: import('vue').ComputedRef<Set<string>>;
263
+ criticalEdgeIds: import('vue').ComputedRef<Set<string>>;
264
+ reevaluateRelation: (edgeId: string) => Promise<import('@antcde/connect-ts').TaskRelationReevaluateResponse | null>;
265
+ createRelationCondition: (edgeId: string, data: Parameters<AntConnect["tasks"]["createRelationCondition"]>[2]) => Promise<import('@antcde/connect-ts').TaskRelationCondition | null>;
266
+ updateRelationCondition: (edgeId: string, conditionId: string, data: Parameters<AntConnect["tasks"]["updateRelationCondition"]>[3]) => Promise<import('@antcde/connect-ts').TaskRelationCondition | null>;
267
+ deleteRelationCondition: (edgeId: string, conditionId: string) => Promise<void>;
268
+ setRelationBooleanMode: (edgeId: string, mode: "AND" | "OR" | null) => 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>;
275
+ createNode: (position?: {
276
+ x: number;
277
+ y: number;
278
+ }) => Promise<string | null>;
279
+ createTriggerNode: (triggerId: string, position?: {
280
+ x: number;
281
+ y: number;
282
+ }) => Promise<string | null>;
283
+ updateNode: (data: {
284
+ id: string;
285
+ position_x: number;
286
+ position_y: number;
287
+ }) => Promise<void>;
288
+ deleteNode: (nodeId: string) => Promise<void>;
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[]>;
318
+ };
319
+ type TaskFlowStore = ReturnType<typeof useTaskFlow>;
320
+ export declare function provideTaskFlow(instance: TaskFlowStore): TaskFlowStore;
321
+ export declare function injectTaskFlow(): TaskFlowStore;
@@ -18,7 +18,6 @@ export declare function useTaskFlowDragDrop(api?: TaskFlowDragDropApi): {
18
18
  isDragOver: Ref<boolean, boolean>;
19
19
  isDragging: Ref<boolean, boolean>;
20
20
  draggedType: Ref<string | null, string | null>;
21
- onDragStart: (event: DragEvent, type: string, data?: any) => void;
22
21
  onDragOver: (event: DragEvent) => void;
23
22
  onDragLeave: (event: DragEvent) => void;
24
23
  onDrop: (event: DragEvent, createNodeFn: (position?: {
@@ -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
+ };
@@ -0,0 +1,18 @@
1
+ import { AntConnect } from '@antcde/connect-ts';
2
+ import { Ref } from 'vue';
3
+ import { TaskFlowEdge } from './useTaskFlowTypes';
4
+ type RelationType = 'BLOCKED_BY' | 'NON_BLOCKING' | 'CONDITIONAL';
5
+ export declare function useTaskFlowEdges(antConnect: AntConnect, flowEdges: Ref<TaskFlowEdge[]>): {
6
+ reevaluateRelation: (edgeId: string) => Promise<import('@antcde/connect-ts').TaskRelationReevaluateResponse | null>;
7
+ createRelationCondition: (edgeId: string, data: Parameters<AntConnect["tasks"]["createRelationCondition"]>[2]) => Promise<import('@antcde/connect-ts').TaskRelationCondition | null>;
8
+ updateRelationCondition: (edgeId: string, conditionId: string, data: Parameters<AntConnect["tasks"]["updateRelationCondition"]>[3]) => Promise<import('@antcde/connect-ts').TaskRelationCondition | null>;
9
+ deleteRelationCondition: (edgeId: string, conditionId: string) => Promise<void>;
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
+ };
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[];
@@ -0,0 +1,76 @@
1
+ import { Event, ResourceLabel, TaskRelationCondition } from '@antcde/connect-ts';
2
+ export interface TaskFlowNode {
3
+ id: string;
4
+ type: string;
5
+ data: {
6
+ status: string;
7
+ title: string;
8
+ description?: string;
9
+ progress: number;
10
+ script?: string;
11
+ isLocked: boolean;
12
+ app?: {
13
+ title: string;
14
+ color: string;
15
+ icon: string;
16
+ } | null;
17
+ assigned_to: string | {
18
+ id: string;
19
+ firstname: string;
20
+ lastname: string;
21
+ email: string;
22
+ } | null;
23
+ trigger?: {
24
+ id: string;
25
+ name: string;
26
+ is_active: boolean;
27
+ close_task_after_execution: boolean;
28
+ event: Pick<Event, 'id' | 'name' | 'code' | 'description'>;
29
+ };
30
+ trigger_id?: string;
31
+ isTriggerTask?: boolean;
32
+ checksCount?: number;
33
+ attachmentsCount?: number;
34
+ childrenCount?: number;
35
+ durationDays?: number | null;
36
+ durationActiveDays?: number[];
37
+ plannedStart?: string | null;
38
+ plannedEnd?: string | null;
39
+ labels?: ResourceLabel[];
40
+ };
41
+ draggable: boolean;
42
+ position: {
43
+ x: number;
44
+ y: number;
45
+ };
46
+ isLoading: boolean;
47
+ }
48
+ export interface TaskFlowEdge {
49
+ id: string;
50
+ source: string;
51
+ target: string;
52
+ type: string;
53
+ sourceHandle: string;
54
+ targetHandle?: string;
55
+ markerEnd?: any;
56
+ data: {
57
+ relationType: 'BLOCKED_BY' | 'NON_BLOCKING' | 'CONDITIONAL';
58
+ queries: TaskFlowQuery[];
59
+ lagDays?: number;
60
+ lagActiveDays?: number[];
61
+ conditions?: TaskRelationCondition[];
62
+ conditionBooleanMode?: 'AND' | 'OR' | null;
63
+ };
64
+ }
65
+ export interface TaskFlowQuery {
66
+ id: string;
67
+ name: string;
68
+ }
69
+ type AssignedToNode = string | {
70
+ id: string;
71
+ firstname: string;
72
+ lastname: string;
73
+ email: string;
74
+ } | null;
75
+ export declare function normalizeAssignedTo(value: unknown): AssignedToNode;
76
+ export {};
@@ -0,0 +1,188 @@
1
+ import { AntConnect, Task } from '@antcde/connect-ts';
2
+ import { Ref } from 'vue';
3
+ import { TaskFlowEdge } from './useTaskFlowTypes';
4
+ export type { DiffStatus } from './useTemplateVersioningState';
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;
18
+ versions: Ref<{
19
+ id: string;
20
+ template_id: string;
21
+ version: number;
22
+ change_summary: string | null;
23
+ created_by: string | {
24
+ id: string;
25
+ firstname: string;
26
+ lastname: string;
27
+ email: string;
28
+ };
29
+ created_at: string;
30
+ snapshot?: any;
31
+ }[], import('@antcde/connect-ts').TaskTemplateVersion[] | {
32
+ id: string;
33
+ template_id: string;
34
+ version: number;
35
+ change_summary: string | null;
36
+ created_by: string | {
37
+ id: string;
38
+ firstname: string;
39
+ lastname: string;
40
+ email: string;
41
+ };
42
+ created_at: string;
43
+ snapshot?: any;
44
+ }[]>;
45
+ versionCheck: Ref<{
46
+ has_update: boolean;
47
+ current_version: number;
48
+ latest_version: number;
49
+ template_id: string;
50
+ } | null, import('@antcde/connect-ts').VersionCheck | {
51
+ has_update: boolean;
52
+ current_version: number;
53
+ latest_version: number;
54
+ template_id: string;
55
+ } | null>;
56
+ versionDiff: Ref<{
57
+ added: {
58
+ source_id: string;
59
+ title: string;
60
+ change_type: "added" | "removed";
61
+ duration_days?: number | null | undefined;
62
+ position_x?: number | undefined;
63
+ position_y?: number | undefined;
64
+ checks?: {
65
+ name: string;
66
+ }[] | undefined;
67
+ }[];
68
+ removed: {
69
+ source_id: string;
70
+ title: string;
71
+ change_type: "added" | "removed";
72
+ duration_days?: number | null | undefined;
73
+ position_x?: number | undefined;
74
+ position_y?: number | undefined;
75
+ checks?: {
76
+ name: string;
77
+ }[] | undefined;
78
+ }[];
79
+ modified: {
80
+ source_id: string;
81
+ title: string;
82
+ change_type: "modified";
83
+ changes: Record<string, {
84
+ old: any;
85
+ new: any;
86
+ }>;
87
+ }[];
88
+ relations_added: {
89
+ source_ref: string;
90
+ target_ref: string;
91
+ type: string;
92
+ lag_days: number;
93
+ }[];
94
+ relations_removed: {
95
+ source_ref: string;
96
+ target_ref: string;
97
+ type: string;
98
+ lag_days: number;
99
+ }[];
100
+ from_version: number;
101
+ to_version: number;
102
+ task_mapping?: Record<string, string> | undefined;
103
+ target_version_id?: string | undefined;
104
+ from_version_id?: string | undefined;
105
+ } | null, import('@antcde/connect-ts').VersionDiff | {
106
+ added: {
107
+ source_id: string;
108
+ title: string;
109
+ change_type: "added" | "removed";
110
+ duration_days?: number | null | undefined;
111
+ position_x?: number | undefined;
112
+ position_y?: number | undefined;
113
+ checks?: {
114
+ name: string;
115
+ }[] | undefined;
116
+ }[];
117
+ removed: {
118
+ source_id: string;
119
+ title: string;
120
+ change_type: "added" | "removed";
121
+ duration_days?: number | null | undefined;
122
+ position_x?: number | undefined;
123
+ position_y?: number | undefined;
124
+ checks?: {
125
+ name: string;
126
+ }[] | undefined;
127
+ }[];
128
+ modified: {
129
+ source_id: string;
130
+ title: string;
131
+ change_type: "modified";
132
+ changes: Record<string, {
133
+ old: any;
134
+ new: any;
135
+ }>;
136
+ }[];
137
+ relations_added: {
138
+ source_ref: string;
139
+ target_ref: string;
140
+ type: string;
141
+ lag_days: number;
142
+ }[];
143
+ relations_removed: {
144
+ source_ref: string;
145
+ target_ref: string;
146
+ type: string;
147
+ lag_days: number;
148
+ }[];
149
+ from_version: number;
150
+ to_version: number;
151
+ task_mapping?: Record<string, string> | undefined;
152
+ target_version_id?: string | undefined;
153
+ from_version_id?: string | undefined;
154
+ } | null>;
155
+ isPublishing: Ref<boolean, boolean>;
156
+ isSyncing: Ref<boolean, boolean>;
157
+ isDiffLoading: Ref<boolean, boolean>;
158
+ isCompareMode: Ref<boolean, boolean>;
159
+ isCompareOriginal: Ref<boolean, boolean>;
160
+ isCompareTwoVersions: Ref<boolean, boolean>;
161
+ selectedTargetVersionId: Ref<string | null, string | null>;
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>;
168
+ availableVersions: import('vue').ComputedRef<{
169
+ id: string;
170
+ template_id: string;
171
+ version: number;
172
+ change_summary: string | null;
173
+ created_by: string | {
174
+ id: string;
175
+ firstname: string;
176
+ lastname: string;
177
+ email: string;
178
+ };
179
+ created_at: string;
180
+ snapshot?: any;
181
+ }[]>;
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[]>;
185
+ ghostEdges: import('vue').ComputedRef<TaskFlowEdge[]>;
186
+ canApplyCompare: import('vue').ComputedRef<boolean>;
187
+ totalChanges: import('vue').ComputedRef<number>;
188
+ };