@antcde/component-library 0.1.14-rc.6cfaa28 → 0.1.14-rc.703ea01

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 (88) hide show
  1. package/README.md +2 -2
  2. package/dist/index.js +41110 -35105
  3. package/dist/types/{components → src/components}/BaseDeleteDialog.vue.d.ts +8 -1
  4. package/dist/types/src/components/DmsFilePicker/composables/usePickerNavigation.d.ts +196 -0
  5. package/dist/types/src/components/DmsFilePicker/composables/usePickerUpload.d.ts +22 -0
  6. package/dist/types/src/components/DmsFilePicker/index.vue.d.ts +28 -0
  7. package/dist/types/src/components/DmsFilePicker/utils/fileFormatting.d.ts +6 -0
  8. package/dist/types/src/components/FilePreviewContent/index.vue.d.ts +31 -0
  9. package/dist/types/src/components/FlowWindowContent/index.vue.d.ts +113 -0
  10. package/dist/types/src/components/RichTextEditor/index.vue.d.ts +51 -0
  11. package/dist/types/{components → src/components}/StackedLabels/_LabelsMenuCard.vue.d.ts +1 -1
  12. package/dist/types/src/components/TasksFlow/components/_FlowBreadcrumb.vue.d.ts +17 -0
  13. package/dist/types/src/components/TasksFlow/components/_FlowEdgeConditionsDialog.vue.d.ts +10 -0
  14. package/dist/types/{components/TasksFlow/components/nodes/_triggerNode.vue.d.ts → src/components/TasksFlow/components/_FlowSearch.vue.d.ts} +4 -3
  15. package/dist/types/src/components/TasksFlow/components/_FlowStats.vue.d.ts +5 -0
  16. package/dist/types/src/components/TasksFlow/components/_InsertTemplateDialog.vue.d.ts +17 -0
  17. package/dist/types/src/components/TasksFlow/components/_SubflowPanel.vue.d.ts +125 -0
  18. package/dist/types/src/components/TasksFlow/components/_VersionDiffView.vue.d.ts +14 -0
  19. package/dist/types/src/components/TasksFlow/components/_VersionPublishDialog.vue.d.ts +14 -0
  20. package/dist/types/{components → src/components}/TasksFlow/components/_flowEditor.vue.d.ts +6 -7
  21. package/dist/types/src/components/TasksFlow/components/nodes/_DurationEditor.vue.d.ts +33 -0
  22. package/dist/types/src/components/TasksFlow/components/nodes/_NodeContextMenu.vue.d.ts +35 -0
  23. package/dist/types/src/components/TasksFlow/components/nodes/_UserPicker.vue.d.ts +32 -0
  24. package/dist/types/{components → src/components}/TasksFlow/components/nodes/_taskNode.vue.d.ts +2 -2
  25. package/dist/types/src/components/TasksFlow/components/nodes/_triggerNode.vue.d.ts +10 -0
  26. package/dist/types/src/components/TasksFlow/composables/useAutoLayout.d.ts +22 -0
  27. package/dist/types/src/components/TasksFlow/composables/useCriticalPath.d.ts +8 -0
  28. package/dist/types/src/components/TasksFlow/composables/useFlowCache.d.ts +17 -0
  29. package/dist/types/src/components/TasksFlow/composables/useFlowKeyboard.d.ts +15 -0
  30. package/dist/types/src/components/TasksFlow/composables/useFlowOperations.d.ts +8 -0
  31. package/dist/types/src/components/TasksFlow/composables/useFlowSearch.d.ts +14 -0
  32. package/dist/types/src/components/TasksFlow/composables/useFlowUsers.d.ts +27 -0
  33. package/dist/types/src/components/TasksFlow/composables/useFlowViewport.d.ts +28 -0
  34. package/dist/types/src/components/TasksFlow/composables/useTaskFlow.d.ts +335 -0
  35. package/dist/types/{components → src/components}/TasksFlow/composables/useTaskFlowDragDrop.d.ts +0 -1
  36. package/dist/types/src/components/TasksFlow/composables/useTaskFlowEdges.d.ts +18 -0
  37. package/dist/types/src/components/TasksFlow/composables/useTaskFlowTypes.d.ts +75 -0
  38. package/dist/types/src/components/TasksFlow/composables/useTemplateVersioning.d.ts +188 -0
  39. package/dist/types/src/components/TasksFlow/composables/useTriggerExecution.d.ts +21 -0
  40. package/dist/types/src/components/TasksFlow/index.vue.d.ts +39 -0
  41. package/dist/types/src/components/UnifiedWindow/index.vue.d.ts +67 -0
  42. package/dist/types/src/components/UnifiedWindow/useWindowDrag.d.ts +28 -0
  43. package/dist/types/src/components/VersionPublishDialog.vue.d.ts +24 -0
  44. package/dist/types/{index.d.ts → src/index.d.ts} +11 -1
  45. package/lib/GisViewer/GisViewer.vue +3 -2
  46. package/lib/build/layer-order.css +33 -0
  47. package/lib/build/uno.ts +117 -0
  48. package/lib/build/vite.ts +104 -0
  49. package/lib/build/vuetify-overrides.css +14 -0
  50. package/lib/build/vuetify.ts +230 -0
  51. package/lib/test/TESTING.claude.md +225 -0
  52. package/lib/test/createMockAppContext.ts +211 -0
  53. package/lib/test/createTestPinia.ts +31 -0
  54. package/lib/test/createTestRouter.ts +31 -0
  55. package/lib/test/index.ts +41 -0
  56. package/lib/test/mockVueRouter.ts +93 -0
  57. package/lib/test/mocks/createMockApi.ts +43 -0
  58. package/lib/test/mocks/createMockContext.ts +109 -0
  59. package/lib/test/mocks/createMockSignal.ts +30 -0
  60. package/lib/test/mocks/createMockUser.ts +87 -0
  61. package/lib/test/mocks/index.ts +11 -0
  62. package/lib/test/mountApp.ts +47 -0
  63. package/lib/test/mountWithContext.ts +94 -0
  64. package/lib/test/setup.ts +151 -0
  65. package/lib/test/testAppSetup.ts +110 -0
  66. package/lib/test/vitest.ts +69 -0
  67. package/package.json +127 -30
  68. package/dist/types/components/TasksFlow/composables/useTaskFlow.d.ts +0 -103
  69. package/dist/types/components/TasksFlow/index.vue.d.ts +0 -51
  70. /package/dist/types/{components → src/components}/BaseAntButton.vue.d.ts +0 -0
  71. /package/dist/types/{components → src/components}/BaseAntCard.vue.d.ts +0 -0
  72. /package/dist/types/{components → src/components}/BaseAntCreateCard.vue.d.ts +0 -0
  73. /package/dist/types/{components → src/components}/BaseAntDatePicker.vue.d.ts +0 -0
  74. /package/dist/types/{components → src/components}/BaseAntInput.vue.d.ts +0 -0
  75. /package/dist/types/{components → src/components}/BaseAntLoading.vue.d.ts +0 -0
  76. /package/dist/types/{components → src/components}/BaseAppCard.vue.d.ts +0 -0
  77. /package/dist/types/{components → src/components}/BaseAppCardSkeleton.vue.d.ts +0 -0
  78. /package/dist/types/{components → src/components}/BaseClickableIcon.vue.d.ts +0 -0
  79. /package/dist/types/{components → src/components}/BaseConfirmDialog.vue.d.ts +0 -0
  80. /package/dist/types/{components → src/components}/BaseDialog.vue.d.ts +0 -0
  81. /package/dist/types/{components → src/components}/BaseLimitedButton.vue.d.ts +0 -0
  82. /package/dist/types/{components → src/components}/BaseResizePanel.vue.d.ts +0 -0
  83. /package/dist/types/{components → src/components}/BulkLabelsMenu.vue.d.ts +0 -0
  84. /package/dist/types/{components → src/components}/GlobalLabelBadge.vue.d.ts +0 -0
  85. /package/dist/types/{components → src/components}/RBAC/Permissions/PermissionCard.vue.d.ts +0 -0
  86. /package/dist/types/{components → src/components}/StackedLabels/index.vue.d.ts +0 -0
  87. /package/dist/types/{components → src/components}/TasksFlow/components/_dropzoneBackground.vue.d.ts +0 -0
  88. /package/dist/types/{components → src/components}/TasksFlow/components/_flowEdge.vue.d.ts +0 -0
@@ -0,0 +1,14 @@
1
+ type __VLS_Props = {
2
+ isDark: boolean;
3
+ };
4
+ type __VLS_PublicProps = {
5
+ modelValue: boolean;
6
+ } & __VLS_Props;
7
+ declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
8
+ "update:modelValue": (value: boolean) => any;
9
+ sync: () => any;
10
+ }, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
11
+ "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
12
+ onSync?: (() => any) | undefined;
13
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
14
+ export default _default;
@@ -0,0 +1,14 @@
1
+ type __VLS_Props = {
2
+ isDark: boolean;
3
+ };
4
+ type __VLS_PublicProps = {
5
+ modelValue: boolean;
6
+ } & __VLS_Props;
7
+ declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
8
+ "update:modelValue": (value: boolean) => any;
9
+ published: () => any;
10
+ }, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
11
+ "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
12
+ onPublished?: (() => any) | undefined;
13
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
14
+ export default _default;
@@ -1,16 +1,15 @@
1
1
  type __VLS_Props = {
2
2
  isDark: boolean;
3
+ isAutoLayouting?: boolean;
4
+ isNavigating?: boolean;
5
+ isInSubflow?: boolean;
6
+ flowInstanceId?: string;
3
7
  };
4
8
  declare function createTaskAtViewportCenter(): Promise<void>;
5
9
  declare function createTriggerAtViewportCenter(triggerId: string): Promise<void>;
6
10
  declare const _default: import('vue').DefineComponent<__VLS_Props, {
7
11
  createTaskAtViewportCenter: typeof createTaskAtViewportCenter;
8
12
  createTriggerAtViewportCenter: typeof createTriggerAtViewportCenter;
9
- }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
10
- editTask: (...args: any[]) => void;
11
- }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
12
- onEditTask?: ((...args: any[]) => any) | undefined;
13
- }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
14
- containerEl: HTMLDivElement;
15
- }, HTMLDivElement>;
13
+ fitViewAnimated: () => void;
14
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
16
15
  export default _default;
@@ -0,0 +1,33 @@
1
+ type __VLS_Props = {
2
+ durationDays: number | null;
3
+ durationActiveDays: number[];
4
+ };
5
+ type __VLS_PublicProps = {
6
+ modelValue: boolean;
7
+ } & __VLS_Props;
8
+ declare function __VLS_template(): {
9
+ attrs: Partial<{}>;
10
+ slots: {
11
+ default?(_: {
12
+ menuProps: any;
13
+ isDefaultWorkdays: (days: number[]) => boolean;
14
+ }): any;
15
+ };
16
+ refs: {};
17
+ rootEl: any;
18
+ };
19
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
20
+ declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
21
+ "update:modelValue": (value: boolean) => any;
22
+ save: (days: number | null, activeDays: number[]) => any;
23
+ }, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
24
+ "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
25
+ onSave?: ((days: number | null, activeDays: number[]) => any) | undefined;
26
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
27
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
28
+ export default _default;
29
+ type __VLS_WithTemplateSlots<T, S> = T & {
30
+ new (): {
31
+ $slots: S;
32
+ };
33
+ };
@@ -0,0 +1,35 @@
1
+ type __VLS_Props = {
2
+ nodeId: string;
3
+ nodeTitle: string;
4
+ hasChildren: boolean;
5
+ isLocked: boolean;
6
+ contextMenuPos: {
7
+ x: number;
8
+ y: number;
9
+ };
10
+ };
11
+ type __VLS_PublicProps = {
12
+ modelValue: boolean;
13
+ } & __VLS_Props;
14
+ declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
15
+ "update:modelValue": (value: boolean) => any;
16
+ delete: () => any;
17
+ openNotepad: () => any;
18
+ drillDown: () => any;
19
+ manageSubflow: () => any;
20
+ insertTemplate: () => any;
21
+ insertBefore: () => any;
22
+ insertAfter: () => any;
23
+ duplicateBranch: () => any;
24
+ }, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
25
+ "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
26
+ onDelete?: (() => any) | undefined;
27
+ onOpenNotepad?: (() => any) | undefined;
28
+ onDrillDown?: (() => any) | undefined;
29
+ onManageSubflow?: (() => any) | undefined;
30
+ onInsertTemplate?: (() => any) | undefined;
31
+ onInsertBefore?: (() => any) | undefined;
32
+ onInsertAfter?: (() => any) | undefined;
33
+ onDuplicateBranch?: (() => any) | undefined;
34
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
35
+ export default _default;
@@ -0,0 +1,32 @@
1
+ type __VLS_Props = {
2
+ taskId: string;
3
+ isDark: boolean;
4
+ };
5
+ type __VLS_PublicProps = {
6
+ modelValue: boolean;
7
+ } & __VLS_Props;
8
+ declare function __VLS_template(): {
9
+ attrs: Partial<{}>;
10
+ slots: {
11
+ default?(_: {
12
+ menuProps: any;
13
+ }): any;
14
+ };
15
+ refs: {};
16
+ rootEl: any;
17
+ };
18
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
19
+ declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
20
+ "update:modelValue": (value: boolean) => any;
21
+ assigned: (userId: string | null) => any;
22
+ }, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
23
+ "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
24
+ onAssigned?: ((userId: string | null) => any) | undefined;
25
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
26
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
27
+ export default _default;
28
+ type __VLS_WithTemplateSlots<T, S> = T & {
29
+ new (): {
30
+ $slots: S;
31
+ };
32
+ };
@@ -4,8 +4,8 @@ type __VLS_Props = NodeProps & {
4
4
  isDark: boolean;
5
5
  };
6
6
  declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
7
- updateNodeInternals: (...args: any[]) => void;
7
+ updateNodeInternals: () => any;
8
8
  }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
9
- onUpdateNodeInternals?: ((...args: any[]) => any) | undefined;
9
+ onUpdateNodeInternals?: (() => any) | undefined;
10
10
  }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
11
11
  export default _default;
@@ -0,0 +1,10 @@
1
+ import { NodeProps } from '@vue-flow/core';
2
+ type __VLS_Props = NodeProps & {
3
+ isDark: boolean;
4
+ };
5
+ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
6
+ updateNodeInternals: () => any;
7
+ }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
8
+ onUpdateNodeInternals?: (() => any) | undefined;
9
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
10
+ export default _default;
@@ -0,0 +1,22 @@
1
+ import { TaskFlowEdge, TaskFlowNode } from './useTaskFlow';
2
+ interface LayoutOptions {
3
+ nodeWidth?: number;
4
+ nodeHeight?: number;
5
+ horizontalGap?: number;
6
+ verticalGap?: number;
7
+ direction?: 'LR' | 'TB';
8
+ }
9
+ /**
10
+ * Lightweight directed graph layout using a layered (Sugiyama-style) approach.
11
+ * Handles disconnected components by laying them out separately then stacking.
12
+ *
13
+ * Algorithm:
14
+ * 1. Find connected components
15
+ * 2. For each component: assign layers, order with barycenter, compute positions
16
+ * 3. Stack components vertically with spacing
17
+ */
18
+ export declare function computeAutoLayout(nodes: TaskFlowNode[], edges: TaskFlowEdge[], options?: LayoutOptions): Map<string, {
19
+ x: number;
20
+ y: number;
21
+ }>;
22
+ export {};
@@ -0,0 +1,8 @@
1
+ import { Ref } from 'vue';
2
+ import { TaskFlowEdge, TaskFlowNode } from './useTaskFlowTypes';
3
+ export declare function useCriticalPath(flowNodes: Ref<TaskFlowNode[]>, flowEdges: Ref<TaskFlowEdge[]>): {
4
+ isCriticalPathActive: Ref<boolean, boolean>;
5
+ toggleCriticalPath: () => void;
6
+ criticalNodeIds: import('vue').ComputedRef<Set<string>>;
7
+ criticalEdgeIds: import('vue').ComputedRef<Set<string>>;
8
+ };
@@ -0,0 +1,17 @@
1
+ import { TableQueryShort, Task } from '@antcde/connect-ts';
2
+ import { TaskFlowEdge, TaskFlowNode } from './useTaskFlowTypes';
3
+ interface FlowCacheEntry {
4
+ parent: Task;
5
+ nodes: TaskFlowNode[];
6
+ edges: TaskFlowEdge[];
7
+ queries: TableQueryShort[];
8
+ timestamp: number;
9
+ }
10
+ export declare function useFlowCache(): {
11
+ get: (taskId: string) => FlowCacheEntry | null;
12
+ set: (taskId: string, data: Omit<FlowCacheEntry, "timestamp">) => void;
13
+ invalidate: (taskId: string) => void;
14
+ updateNodesAndEdges: (taskId: string, nodes: TaskFlowNode[], edges: TaskFlowEdge[]) => void;
15
+ clear: () => void;
16
+ };
17
+ export {};
@@ -0,0 +1,15 @@
1
+ import { Ref } from 'vue';
2
+ interface FlowKeyboardOptions {
3
+ isLocked: Ref<boolean>;
4
+ createTask: () => void;
5
+ fitView: () => void;
6
+ autoLayout: () => void;
7
+ openSearch: () => void;
8
+ closeSearch: () => void;
9
+ isSearchOpen: Ref<boolean>;
10
+ deleteSelectedNodes: () => void;
11
+ }
12
+ export declare function useFlowKeyboard(options: FlowKeyboardOptions): {
13
+ setFocused: (val: boolean) => void;
14
+ };
15
+ export {};
@@ -0,0 +1,8 @@
1
+ import { AntConnect, Task } from '@antcde/connect-ts';
2
+ import { Ref } from 'vue';
3
+ import { TaskFlowEdge, TaskFlowNode } from './useTaskFlowTypes';
4
+ export declare function useFlowOperations(antConnect: AntConnect, flowParent: Ref<Task | null>, flowNodes: Ref<TaskFlowNode[]>, flowEdges: Ref<TaskFlowEdge[]>, fetchFlowNodesAndEdges: () => Promise<void>): {
5
+ insertAfter: (nodeId: string) => Promise<string | undefined>;
6
+ insertBefore: (nodeId: string) => Promise<string | undefined>;
7
+ duplicateBranch: (nodeId: string) => Promise<void>;
8
+ };
@@ -0,0 +1,14 @@
1
+ import { Ref } from 'vue';
2
+ import { TaskFlowNode } from './useTaskFlowTypes';
3
+ export declare function useFlowSearch(flowNodes: Ref<TaskFlowNode[]>): {
4
+ searchQuery: Ref<string, string>;
5
+ isSearchOpen: Ref<boolean, boolean>;
6
+ isSearchActive: import('vue').ComputedRef<boolean>;
7
+ matchedNodeIds: import('vue').ComputedRef<Set<string>>;
8
+ currentMatchId: import('vue').ComputedRef<string | null>;
9
+ matchIndex: Ref<number, number>;
10
+ matchCount: import('vue').ComputedRef<number>;
11
+ openSearch: () => void;
12
+ closeSearch: () => void;
13
+ navigateToMatch: (direction: "next" | "prev") => string | null;
14
+ };
@@ -0,0 +1,27 @@
1
+ import { AntConnect, Task } from '@antcde/connect-ts';
2
+ import { Ref } from 'vue';
3
+ export interface FlowUser {
4
+ id: string;
5
+ firstname: string;
6
+ lastname: string;
7
+ email: string;
8
+ name: string;
9
+ }
10
+ export declare function useFlowUsers(antConnect: AntConnect, flowParent: Ref<Task | null>): {
11
+ members: Ref<{
12
+ id: string;
13
+ firstname: string;
14
+ lastname: string;
15
+ email: string;
16
+ name: string;
17
+ }[], FlowUser[] | {
18
+ id: string;
19
+ firstname: string;
20
+ lastname: string;
21
+ email: string;
22
+ name: string;
23
+ }[]>;
24
+ isLoading: Ref<boolean, boolean>;
25
+ assignUser: (taskId: string, userId: string | null) => Promise<void>;
26
+ fetchMembers: () => Promise<void>;
27
+ };
@@ -0,0 +1,28 @@
1
+ import { Ref } from 'vue';
2
+ import { TaskFlowNode } from './useTaskFlowTypes';
3
+ export declare function useFlowViewport(flowNodes: Ref<TaskFlowNode[]>, isMounted: Ref<boolean>, persistNode: (data: {
4
+ id: string;
5
+ position_x: number;
6
+ position_y: number;
7
+ }) => Promise<void>): {
8
+ isShiftHeld: Ref<boolean, boolean>;
9
+ getActiveSnapGrid: () => [number, number];
10
+ findFreePosition: (desired: {
11
+ x: number;
12
+ y: number;
13
+ }) => {
14
+ x: number;
15
+ y: number;
16
+ };
17
+ getViewportCenterFlowPosition: () => {
18
+ x: number;
19
+ y: number;
20
+ };
21
+ centerAndPersistNode: (createdId: string, centerPos: {
22
+ x: number;
23
+ y: number;
24
+ }) => void;
25
+ fitViewAnimated: () => void;
26
+ handleZoomIn: () => void;
27
+ handleZoomOut: () => void;
28
+ };
@@ -0,0 +1,335 @@
1
+ import { AntConnect, Notepad, TableQueryShort, Task } from '@antcde/connect-ts';
2
+ import { Ref } from 'vue';
3
+ import { TaskFlowEdge, TaskFlowNode } from './useTaskFlowTypes';
4
+ 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
+ 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;
31
+ versions: Ref<{
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
+ }[], import('@antcde/connect-ts').TaskTemplateVersion[] | {
45
+ id: string;
46
+ template_id: string;
47
+ version: number;
48
+ change_summary: string | null;
49
+ created_by: string | {
50
+ id: string;
51
+ firstname: string;
52
+ lastname: string;
53
+ email: string;
54
+ };
55
+ created_at: string;
56
+ snapshot?: any;
57
+ }[]>;
58
+ versionCheck: Ref<{
59
+ has_update: boolean;
60
+ current_version: number;
61
+ latest_version: number;
62
+ template_id: string;
63
+ } | null, import('@antcde/connect-ts').VersionCheck | {
64
+ has_update: boolean;
65
+ current_version: number;
66
+ latest_version: number;
67
+ template_id: string;
68
+ } | null>;
69
+ versionDiff: Ref<{
70
+ added: {
71
+ source_id: string;
72
+ title: string;
73
+ change_type: "added" | "removed";
74
+ duration_days?: number | null | undefined;
75
+ position_x?: number | undefined;
76
+ position_y?: number | undefined;
77
+ checks?: {
78
+ name: string;
79
+ }[] | undefined;
80
+ }[];
81
+ removed: {
82
+ source_id: string;
83
+ title: string;
84
+ change_type: "added" | "removed";
85
+ duration_days?: number | null | undefined;
86
+ position_x?: number | undefined;
87
+ position_y?: number | undefined;
88
+ checks?: {
89
+ name: string;
90
+ }[] | undefined;
91
+ }[];
92
+ modified: {
93
+ source_id: string;
94
+ title: string;
95
+ change_type: "modified";
96
+ changes: Record<string, {
97
+ old: any;
98
+ new: any;
99
+ }>;
100
+ }[];
101
+ relations_added: {
102
+ source_ref: string;
103
+ target_ref: string;
104
+ type: string;
105
+ lag_days: number;
106
+ }[];
107
+ relations_removed: {
108
+ source_ref: string;
109
+ target_ref: string;
110
+ type: string;
111
+ lag_days: number;
112
+ }[];
113
+ from_version: number;
114
+ to_version: number;
115
+ task_mapping?: Record<string, string> | undefined;
116
+ target_version_id?: string | undefined;
117
+ from_version_id?: string | undefined;
118
+ } | null, import('@antcde/connect-ts').VersionDiff | {
119
+ added: {
120
+ source_id: string;
121
+ title: string;
122
+ change_type: "added" | "removed";
123
+ duration_days?: number | null | undefined;
124
+ position_x?: number | undefined;
125
+ position_y?: number | undefined;
126
+ checks?: {
127
+ name: string;
128
+ }[] | undefined;
129
+ }[];
130
+ removed: {
131
+ source_id: string;
132
+ title: string;
133
+ change_type: "added" | "removed";
134
+ duration_days?: number | null | undefined;
135
+ position_x?: number | undefined;
136
+ position_y?: number | undefined;
137
+ checks?: {
138
+ name: string;
139
+ }[] | undefined;
140
+ }[];
141
+ modified: {
142
+ source_id: string;
143
+ title: string;
144
+ change_type: "modified";
145
+ changes: Record<string, {
146
+ old: any;
147
+ new: any;
148
+ }>;
149
+ }[];
150
+ relations_added: {
151
+ source_ref: string;
152
+ target_ref: string;
153
+ type: string;
154
+ lag_days: number;
155
+ }[];
156
+ relations_removed: {
157
+ source_ref: string;
158
+ target_ref: string;
159
+ type: string;
160
+ lag_days: number;
161
+ }[];
162
+ from_version: number;
163
+ to_version: number;
164
+ task_mapping?: Record<string, string> | undefined;
165
+ target_version_id?: string | undefined;
166
+ from_version_id?: string | undefined;
167
+ } | 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
+ isPublishing: Ref<boolean, boolean>;
174
+ isSyncing: Ref<boolean, boolean>;
175
+ isDiffLoading: Ref<boolean, boolean>;
176
+ isCompareMode: Ref<boolean, boolean>;
177
+ isCompareOriginal: Ref<boolean, boolean>;
178
+ isCompareTwoVersions: Ref<boolean, boolean>;
179
+ selectedTargetVersionId: Ref<string | null, string | null>;
180
+ selectedFromVersionId: Ref<string | null, string | null>;
181
+ availableVersions: import('vue').ComputedRef<{
182
+ id: string;
183
+ template_id: string;
184
+ version: number;
185
+ change_summary: string | null;
186
+ created_by: string | {
187
+ id: string;
188
+ firstname: string;
189
+ lastname: string;
190
+ email: string;
191
+ };
192
+ created_at: string;
193
+ snapshot?: any;
194
+ }[]>;
195
+ diffNodeMap: import('vue').ComputedRef<Map<string, import('./useTemplateVersioning').DiffStatus>>;
196
+ diffEdgeMap: import('vue').ComputedRef<Map<string, import('./useTemplateVersioning').DiffStatus>>;
197
+ ghostNodes: import('vue').ComputedRef<TaskFlowNode[]>;
198
+ ghostEdges: import('vue').ComputedRef<TaskFlowEdge[]>;
199
+ canApplyCompare: import('vue').ComputedRef<boolean>;
200
+ 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;
227
+ flowStack: Ref<{
228
+ id: string;
229
+ title: string;
230
+ }[], {
231
+ id: string;
232
+ title: string;
233
+ }[]>;
234
+ isNavigating: Ref<boolean, boolean>;
235
+ navigateToChild: (childId: string, _childTitle: string) => Promise<void>;
236
+ 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;
245
+ insertAfter: (nodeId: string) => Promise<string | undefined>;
246
+ insertBefore: (nodeId: string) => Promise<string | undefined>;
247
+ duplicateBranch: (nodeId: string) => Promise<void>;
248
+ flowUsers: Ref<{
249
+ id: string;
250
+ firstname: string;
251
+ lastname: string;
252
+ email: string;
253
+ name: string;
254
+ }[], import('./useFlowUsers').FlowUser[] | {
255
+ id: string;
256
+ firstname: string;
257
+ lastname: string;
258
+ email: string;
259
+ name: string;
260
+ }[]>;
261
+ assignUser: (taskId: string, userId: string | null) => Promise<void>;
262
+ searchQuery: Ref<string, string>;
263
+ isSearchOpen: Ref<boolean, boolean>;
264
+ isSearchActive: import('vue').ComputedRef<boolean>;
265
+ matchedNodeIds: import('vue').ComputedRef<Set<string>>;
266
+ currentMatchId: import('vue').ComputedRef<string | null>;
267
+ matchIndex: Ref<number, number>;
268
+ matchCount: import('vue').ComputedRef<number>;
269
+ openSearch: () => void;
270
+ closeSearch: () => void;
271
+ navigateToMatch: (direction: "next" | "prev") => string | null;
272
+ getTriggerStatus: (nodeId: string) => import('./useTriggerExecution').TriggerExecutionStatus | null;
273
+ executionMap: Ref<Map<string, {
274
+ status: "success" | "error" | "never";
275
+ executedAt: string | null;
276
+ durationMs: number | null;
277
+ }> & Omit<Map<string, import('./useTriggerExecution').TriggerExecutionStatus>, keyof Map<any, any>>, Map<string, import('./useTriggerExecution').TriggerExecutionStatus> | (Map<string, {
278
+ status: "success" | "error" | "never";
279
+ executedAt: string | null;
280
+ durationMs: number | null;
281
+ }> & Omit<Map<string, import('./useTriggerExecution').TriggerExecutionStatus>, keyof Map<any, any>>)>;
282
+ refetchExecutions: () => Promise<void>;
283
+ isCriticalPathActive: Ref<boolean, boolean>;
284
+ toggleCriticalPath: () => void;
285
+ criticalNodeIds: import('vue').ComputedRef<Set<string>>;
286
+ 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
+ reevaluateRelation: (edgeId: string) => Promise<import('@antcde/connect-ts').TaskRelationReevaluateResponse | null>;
294
+ createRelationCondition: (edgeId: string, data: Parameters<AntConnect["tasks"]["createRelationCondition"]>[2]) => Promise<import('@antcde/connect-ts').TaskRelationCondition | null>;
295
+ updateRelationCondition: (edgeId: string, conditionId: string, data: Parameters<AntConnect["tasks"]["updateRelationCondition"]>[3]) => Promise<import('@antcde/connect-ts').TaskRelationCondition | null>;
296
+ deleteRelationCondition: (edgeId: string, conditionId: string) => Promise<void>;
297
+ 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>;
316
+ createNode: (position?: {
317
+ x: number;
318
+ y: number;
319
+ }) => Promise<string | null>;
320
+ updateNode: (data: {
321
+ id: string;
322
+ position_x: number;
323
+ position_y: number;
324
+ }) => Promise<void>;
325
+ 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
+ updateTaskDuration: (taskId: string, durationDays: number | null, durationActiveDays: number[]) => Promise<void>;
332
+ };
333
+ type TaskFlowStore = ReturnType<typeof useTaskFlow>;
334
+ export declare function provideTaskFlow(instance: TaskFlowStore): TaskFlowStore;
335
+ export declare function injectTaskFlow(): TaskFlowStore;