@antcde/component-library 0.1.14-rc.703ea01 → 0.1.14-rc.77e4e54

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 (31) hide show
  1. package/dist/index.js +25514 -26548
  2. package/dist/types/src/components/AntTourZone/_TourInfoCard.vue.d.ts +18 -0
  3. package/dist/types/src/components/AntTourZone/_TourRing.vue.d.ts +15 -0
  4. package/dist/types/src/components/AntTourZone/index.vue.d.ts +49 -0
  5. package/dist/types/src/components/BaseAntDatePicker.vue.d.ts +2 -0
  6. package/dist/types/src/components/FlowWindowContent/index.vue.d.ts +1 -63
  7. package/dist/types/src/components/TasksFlow/components/_FlowToolbar.vue.d.ts +26 -0
  8. package/dist/types/src/components/TasksFlow/components/_FlowTriggerMenu.vue.d.ts +17 -0
  9. package/dist/types/src/components/TasksFlow/components/_FlowVersionBar.vue.d.ts +12 -0
  10. package/dist/types/src/components/TasksFlow/components/_SubflowPanel.vue.d.ts +1 -93
  11. package/dist/types/src/components/TasksFlow/components/_flowEditor.vue.d.ts +2 -4
  12. package/dist/types/src/components/TasksFlow/components/nodes/_NodeMeta.vue.d.ts +14 -0
  13. package/dist/types/src/components/TasksFlow/components/nodes/useTaskNodeState.d.ts +86 -0
  14. package/dist/types/src/components/TasksFlow/composables/useFlowAutoLayout.d.ts +12 -0
  15. package/dist/types/src/components/TasksFlow/composables/useFlowCrud.d.ts +21 -0
  16. package/dist/types/src/components/TasksFlow/composables/useFlowEditor.d.ts +54 -0
  17. package/dist/types/src/components/TasksFlow/composables/useFlowFetch.d.ts +33 -0
  18. package/dist/types/src/components/TasksFlow/composables/useFlowNotifications.d.ts +15 -0
  19. package/dist/types/src/components/TasksFlow/composables/useFlowRealtime.d.ts +23 -0
  20. package/dist/types/src/components/TasksFlow/composables/useFlowSubflows.d.ts +22 -0
  21. package/dist/types/src/components/TasksFlow/composables/useTaskFlow.d.ts +81 -95
  22. package/dist/types/src/components/TasksFlow/composables/useTaskFlowEdgeConditions.d.ts +10 -0
  23. package/dist/types/src/components/TasksFlow/composables/useTaskFlowEdges.d.ts +6 -6
  24. package/dist/types/src/components/TasksFlow/composables/useTaskFlowMappers.d.ts +4 -0
  25. package/dist/types/src/components/TasksFlow/composables/useTaskFlowTypes.d.ts +1 -0
  26. package/dist/types/src/components/TasksFlow/composables/useTemplateVersioning.d.ts +26 -26
  27. package/dist/types/src/components/TasksFlow/composables/useTemplateVersioningState.d.ts +176 -0
  28. package/dist/types/src/components/TasksFlow/index.vue.d.ts +4 -4
  29. package/dist/types/src/index.d.ts +2 -1
  30. package/lib/build/vite.ts +14 -1
  31. package/package.json +20 -19
@@ -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
- insertTemplateHandler: Ref<((targetNodeId: string | null) => void) | null, ((targetNodeId: string | null) => void) | null>;
30
- openInsertTemplate: (targetNodeId: string | null) => void;
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('./useTemplateVersioning').DiffStatus>>;
196
- diffEdgeMap: import('vue').ComputedRef<Map<string, import('./useTemplateVersioning').DiffStatus>>;
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
- fetchVersions: () => Promise<void>;
202
- publishVersion: (changeSummary?: string) => Promise<import('@antcde/connect-ts').TaskTemplateVersion | null>;
203
- checkUpdates: () => Promise<void>;
204
- fetchDiff: (targetVersionId?: string) => Promise<void>;
205
- syncToVersion: (targetVersionId?: string) => Promise<import('@antcde/connect-ts').VersionSyncResult | null>;
206
- enterCompareMode: (targetVersionId?: string) => Promise<void>;
207
- enterCompareOriginalMode: () => Promise<void>;
208
- changeCompareTarget: (targetVersionId: string) => Promise<void>;
209
- switchToCompareOriginal: () => Promise<void>;
210
- switchToCompareVersion: (targetVersionId?: string) => Promise<void>;
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
- isSubflowWindow: Ref<boolean, boolean>;
238
- subflowWindows: Ref<SubflowWindow[], SubflowWindow[]>;
239
- openSubflowPanel: (nodeId: string, title: string) => void;
240
- closeSubflowWindow: (nodeId: string) => void;
241
- bringWindowToFront: (nodeId: string) => void;
242
- updateWindowPosition: (nodeId: string, x: number, y: number) => void;
243
- updateWindowSize: (nodeId: string, w: number, h: number) => void;
244
- antConnect: AntConnect;
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
- showTask: (taskId: string) => PromiseLike<boolean>;
299
- setHighlightedNode: (taskId: string) => Promise<string>;
300
- flowParent: Ref<Task | null, Task | null>;
301
- flowNodes: Ref<TaskFlowNode[], TaskFlowNode[]>;
302
- flowEdges: Ref<TaskFlowEdge[], TaskFlowEdge[]>;
303
- highlightedNodeId: Ref<string | null, string | null>;
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[];
@@ -51,6 +51,7 @@ export interface TaskFlowEdge {
51
51
  target: string;
52
52
  type: string;
53
53
  sourceHandle: string;
54
+ targetHandle?: string;
54
55
  markerEnd?: any;
55
56
  data: {
56
57
  relationType: 'BLOCKED_BY' | 'NON_BLOCKING' | 'CONDITIONAL';
@@ -1,8 +1,20 @@
1
- import { AntConnect, Task, TaskTemplateVersion, VersionCheck, VersionDiff } from '@antcde/connect-ts';
1
+ import { AntConnect, Task } from '@antcde/connect-ts';
2
2
  import { Ref } from 'vue';
3
- import { TaskFlowEdge, TaskFlowNode } from './useTaskFlowTypes';
4
- export type DiffStatus = 'added' | 'removed' | 'modified';
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
  };
@@ -0,0 +1,176 @@
1
+ import { Task, TaskTemplateVersion, VersionCheck, VersionDiff } from '@antcde/connect-ts';
2
+ import { Ref } from 'vue';
3
+ import { TaskFlowEdge, TaskFlowNode } from './useTaskFlowTypes';
4
+ export type DiffStatus = 'added' | 'removed' | 'modified';
5
+ export declare function useTemplateVersioningState(flowParent: Ref<Task | null>, flowEdges: Ref<TaskFlowEdge[]>): {
6
+ versions: Ref<{
7
+ id: string;
8
+ template_id: string;
9
+ version: number;
10
+ change_summary: string | null;
11
+ created_by: string | {
12
+ id: string;
13
+ firstname: string;
14
+ lastname: string;
15
+ email: string;
16
+ };
17
+ created_at: string;
18
+ snapshot?: any;
19
+ }[], TaskTemplateVersion[] | {
20
+ id: string;
21
+ template_id: string;
22
+ version: number;
23
+ change_summary: string | null;
24
+ created_by: string | {
25
+ id: string;
26
+ firstname: string;
27
+ lastname: string;
28
+ email: string;
29
+ };
30
+ created_at: string;
31
+ snapshot?: any;
32
+ }[]>;
33
+ versionCheck: Ref<{
34
+ has_update: boolean;
35
+ current_version: number;
36
+ latest_version: number;
37
+ template_id: string;
38
+ } | null, VersionCheck | {
39
+ has_update: boolean;
40
+ current_version: number;
41
+ latest_version: number;
42
+ template_id: string;
43
+ } | null>;
44
+ versionDiff: Ref<{
45
+ added: {
46
+ source_id: string;
47
+ title: string;
48
+ change_type: "added" | "removed";
49
+ duration_days?: number | null | undefined;
50
+ position_x?: number | undefined;
51
+ position_y?: number | undefined;
52
+ checks?: {
53
+ name: string;
54
+ }[] | undefined;
55
+ }[];
56
+ removed: {
57
+ source_id: string;
58
+ title: string;
59
+ change_type: "added" | "removed";
60
+ duration_days?: number | null | undefined;
61
+ position_x?: number | undefined;
62
+ position_y?: number | undefined;
63
+ checks?: {
64
+ name: string;
65
+ }[] | undefined;
66
+ }[];
67
+ modified: {
68
+ source_id: string;
69
+ title: string;
70
+ change_type: "modified";
71
+ changes: Record<string, {
72
+ old: any;
73
+ new: any;
74
+ }>;
75
+ }[];
76
+ relations_added: {
77
+ source_ref: string;
78
+ target_ref: string;
79
+ type: string;
80
+ lag_days: number;
81
+ }[];
82
+ relations_removed: {
83
+ source_ref: string;
84
+ target_ref: string;
85
+ type: string;
86
+ lag_days: number;
87
+ }[];
88
+ from_version: number;
89
+ to_version: number;
90
+ task_mapping?: Record<string, string> | undefined;
91
+ target_version_id?: string | undefined;
92
+ from_version_id?: string | undefined;
93
+ } | null, VersionDiff | {
94
+ added: {
95
+ source_id: string;
96
+ title: string;
97
+ change_type: "added" | "removed";
98
+ duration_days?: number | null | undefined;
99
+ position_x?: number | undefined;
100
+ position_y?: number | undefined;
101
+ checks?: {
102
+ name: string;
103
+ }[] | undefined;
104
+ }[];
105
+ removed: {
106
+ source_id: string;
107
+ title: string;
108
+ change_type: "added" | "removed";
109
+ duration_days?: number | null | undefined;
110
+ position_x?: number | undefined;
111
+ position_y?: number | undefined;
112
+ checks?: {
113
+ name: string;
114
+ }[] | undefined;
115
+ }[];
116
+ modified: {
117
+ source_id: string;
118
+ title: string;
119
+ change_type: "modified";
120
+ changes: Record<string, {
121
+ old: any;
122
+ new: any;
123
+ }>;
124
+ }[];
125
+ relations_added: {
126
+ source_ref: string;
127
+ target_ref: string;
128
+ type: string;
129
+ lag_days: number;
130
+ }[];
131
+ relations_removed: {
132
+ source_ref: string;
133
+ target_ref: string;
134
+ type: string;
135
+ lag_days: number;
136
+ }[];
137
+ from_version: number;
138
+ to_version: number;
139
+ task_mapping?: Record<string, string> | undefined;
140
+ target_version_id?: string | undefined;
141
+ from_version_id?: string | undefined;
142
+ } | null>;
143
+ isPublishing: Ref<boolean, boolean>;
144
+ isSyncing: Ref<boolean, boolean>;
145
+ isDiffLoading: Ref<boolean, boolean>;
146
+ isCompareMode: Ref<boolean, boolean>;
147
+ isCompareOriginal: Ref<boolean, boolean>;
148
+ isCompareTwoVersions: Ref<boolean, boolean>;
149
+ selectedTargetVersionId: Ref<string | null, string | null>;
150
+ selectedFromVersionId: Ref<string | null, string | null>;
151
+ isTemplate: import('vue').ComputedRef<boolean>;
152
+ hasUpdate: import('vue').ComputedRef<boolean>;
153
+ currentVersion: import('vue').ComputedRef<number>;
154
+ latestVersion: import('vue').ComputedRef<number>;
155
+ hasVersions: import('vue').ComputedRef<boolean>;
156
+ availableVersions: import('vue').ComputedRef<{
157
+ id: string;
158
+ template_id: string;
159
+ version: number;
160
+ change_summary: string | null;
161
+ created_by: string | {
162
+ id: string;
163
+ firstname: string;
164
+ lastname: string;
165
+ email: string;
166
+ };
167
+ created_at: string;
168
+ snapshot?: any;
169
+ }[]>;
170
+ diffNodeMap: import('vue').ComputedRef<Map<string, DiffStatus>>;
171
+ diffEdgeMap: import('vue').ComputedRef<Map<string, DiffStatus>>;
172
+ ghostNodes: import('vue').ComputedRef<TaskFlowNode[]>;
173
+ ghostEdges: import('vue').ComputedRef<TaskFlowEdge[]>;
174
+ canApplyCompare: import('vue').ComputedRef<boolean>;
175
+ totalChanges: import('vue').ComputedRef<number>;
176
+ };
@@ -18,7 +18,7 @@ declare function refreshFromExternal(): void;
18
18
  declare function handleTaskEvent(payload: {
19
19
  id: string;
20
20
  action: string;
21
- data?: any;
21
+ data?: Record<string, unknown>;
22
22
  }): void;
23
23
  declare const _default: import('vue').DefineComponent<__VLS_Props, {
24
24
  reloadFlow: typeof reloadFlow;
@@ -27,13 +27,13 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {
27
27
  handleTaskEvent: typeof handleTaskEvent;
28
28
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
29
29
  updated: () => any;
30
+ share: (task: Task) => any;
30
31
  parentTaskNotFound: () => any;
31
32
  deletedFlowId: (id: string) => any;
32
- share: (task: Task) => any;
33
33
  }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
34
34
  onUpdated?: (() => any) | undefined;
35
+ onShare?: ((task: Task) => any) | undefined;
35
36
  onParentTaskNotFound?: (() => any) | undefined;
36
37
  onDeletedFlowId?: ((id: string) => any) | undefined;
37
- onShare?: ((task: Task) => any) | undefined;
38
- }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
38
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, any, any>;
39
39
  export default _default;
@@ -25,13 +25,14 @@ import { default as FlowWindowContent } from './components/FlowWindowContent/ind
25
25
  import { default as UnifiedWindow } from './components/UnifiedWindow/index.vue';
26
26
  import { default as TaskFlow } from './components/TasksFlow/index.vue';
27
27
  import { default as VersionPublishDialog } from './components/VersionPublishDialog.vue';
28
+ import { default as AntTourZone } from './components/AntTourZone/index.vue';
28
29
  export type { AppLike } from './components/BaseAppCard.vue';
29
30
  export type { MentionItem } from './components/RichTextEditor/index.vue';
30
31
  export type { StackedLabel } from './components/StackedLabels/index.vue';
31
32
  export type { FlowChannelSubscriber } from './components/TasksFlow/composables/useTaskFlow';
32
33
  export type { WindowSizePreset } from './components/UnifiedWindow/index.vue';
33
34
  export * from '@antcde/vue-utils';
34
- export { BaseAntButton, BaseAntCard, BaseAntCreateCard, BaseAntDatePicker, BaseAntInput, BaseAntLoading, BaseAppCard, BaseAppCardSkeleton, BaseClickableIcon, BaseConfirmDialog, BaseDeleteDialog, BaseDialog, BaseLimitedButton, BaseResizePanel, BulkLabelsMenu, DmsFilePicker, FilePreviewContent, FlowWindowContent, GlobalLabelBadge, LabelsMenuCard, PermissionCard, RichTextEditor, StackedLabels, TaskFlow, UnifiedWindow, VersionPublishDialog, };
35
+ export { AntTourZone, BaseAntButton, BaseAntCard, BaseAntCreateCard, BaseAntDatePicker, BaseAntInput, BaseAntLoading, BaseAppCard, BaseAppCardSkeleton, BaseClickableIcon, BaseConfirmDialog, BaseDeleteDialog, BaseDialog, BaseLimitedButton, BaseResizePanel, BulkLabelsMenu, DmsFilePicker, FilePreviewContent, FlowWindowContent, GlobalLabelBadge, LabelsMenuCard, PermissionCard, RichTextEditor, StackedLabels, TaskFlow, UnifiedWindow, VersionPublishDialog, };
35
36
  declare const _default: {
36
37
  install: (app: App) => void;
37
38
  };
package/lib/build/vite.ts CHANGED
@@ -43,6 +43,14 @@ export const CSS_LAYER_ORDER = '@layer uno-base, uno-theme, vuetify-core, vuetif
43
43
  export function createAntViteConfig(appRoot: string | URL, overrides: UserConfig = {}): UserConfig {
44
44
  const resolve = (relative: string) => fileURLToPath(new URL(relative, appRoot))
45
45
 
46
+ // Resolve @antcde/* workspace packages to source so dev-mode HMR picks up
47
+ // their changes without rebuilding their dist. Mirrors ant-os' own aliases.
48
+ const componentLibSrc = fileURLToPath(new URL('../../src', import.meta.url))
49
+ const componentLibBuild = fileURLToPath(new URL('../../lib/build', import.meta.url))
50
+ const componentLibTest = fileURLToPath(new URL('../../lib/test', import.meta.url))
51
+ const vueUtilsSrc = fileURLToPath(new URL('../../../ant-vue-utils/src', import.meta.url))
52
+ const connectTsSrc = fileURLToPath(new URL('../../../ant-connect-ts/src', import.meta.url))
53
+
46
54
  const baseConfig = defineConfig({
47
55
  base: '/__APP_URL__/',
48
56
  optimizeDeps: { exclude: ['vuetify'] },
@@ -89,10 +97,15 @@ export function createAntViteConfig(appRoot: string | URL, overrides: UserConfig
89
97
  }),
90
98
  ],
91
99
  resolve: {
92
- dedupe: ['vuetify'],
100
+ dedupe: ['vue', 'vuetify'],
93
101
  extensions: ['.mjs', '.js', '.mts', '.ts', '.jsx', '.tsx', '.json', '.vue'],
94
102
  alias: {
95
103
  '@': resolve('./src'),
104
+ '@antcde/component-library/build': componentLibBuild,
105
+ '@antcde/component-library/test': componentLibTest,
106
+ '@antcde/component-library': componentLibSrc,
107
+ '@antcde/vue-utils': vueUtilsSrc,
108
+ '@antcde/connect-ts': connectTsSrc,
96
109
  },
97
110
  },
98
111
  build: {