@antcde/component-library 0.1.2 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/component-library.css +1 -1
- package/dist/index.js +22757 -21782
- package/dist/types/components/BaseAppCardSkeleton.vue.d.ts +6 -1
- package/dist/types/components/TasksFlow/components/_dropzoneBackground.vue.d.ts +17 -0
- package/dist/types/components/TasksFlow/components/_flowEditor.vue.d.ts +16 -0
- package/dist/types/components/TasksFlow/components/nodes/_triggerNode.vue.d.ts +6 -0
- package/dist/types/components/TasksFlow/{useTaskFlow.d.ts → composables/useTaskFlow.d.ts} +28 -2
- package/dist/types/components/TasksFlow/composables/useTaskFlowDragDrop.d.ts +37 -0
- package/dist/types/components/TasksFlow/index.vue.d.ts +51 -0
- package/dist/types/index.d.ts +1 -1
- package/package.json +4 -3
- package/dist/types/components/TasksFlow/TaskFlow.vue.d.ts +0 -24
- package/dist/types/components/TasksFlow/TaskFlowEditor.vue.d.ts +0 -9
- /package/dist/types/components/TasksFlow/{TaskFlowEdge.vue.d.ts → components/_flowEdge.vue.d.ts} +0 -0
- /package/dist/types/components/TasksFlow/{TaskFlowNode.vue.d.ts → components/nodes/_taskNode.vue.d.ts} +0 -0
|
@@ -1,2 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
small?: boolean;
|
|
3
|
+
};
|
|
4
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
5
|
+
small: boolean;
|
|
6
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
2
7
|
export default _default;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
declare function __VLS_template(): {
|
|
2
|
+
attrs: Partial<{}>;
|
|
3
|
+
slots: {
|
|
4
|
+
default?(_: {}): any;
|
|
5
|
+
};
|
|
6
|
+
refs: {};
|
|
7
|
+
rootEl: HTMLDivElement;
|
|
8
|
+
};
|
|
9
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
10
|
+
declare const __VLS_component: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
|
|
11
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
12
|
+
export default _default;
|
|
13
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
14
|
+
new (): {
|
|
15
|
+
$slots: S;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
isDark: boolean;
|
|
3
|
+
};
|
|
4
|
+
declare function createTaskAtViewportCenter(): Promise<void>;
|
|
5
|
+
declare function createTriggerAtViewportCenter(triggerId: string): Promise<void>;
|
|
6
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {
|
|
7
|
+
createTaskAtViewportCenter: typeof createTaskAtViewportCenter;
|
|
8
|
+
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>;
|
|
16
|
+
export default _default;
|
|
@@ -0,0 +1,6 @@
|
|
|
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, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
6
|
+
export default _default;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AntConnect, Notepad, TableQueryShort, Task } from '@antcde/connect-ts';
|
|
1
|
+
import { AntConnect, Event, Notepad, TableQueryShort, Task } from '@antcde/connect-ts';
|
|
2
2
|
import { Ref } from 'vue';
|
|
3
3
|
export declare function useTaskFlow(antConnect: AntConnect, notepad: Notepad): {
|
|
4
4
|
showTask: (taskId: string) => PromiseLike<boolean>;
|
|
@@ -8,12 +8,16 @@ export declare function useTaskFlow(antConnect: AntConnect, notepad: Notepad): {
|
|
|
8
8
|
flowEdges: Ref<TaskFlowEdge[], TaskFlowEdge[]>;
|
|
9
9
|
highlightedNodeId: Ref<string | null, string | null>;
|
|
10
10
|
projectQueries: Ref<TableQueryShort[], TableQueryShort[]>;
|
|
11
|
+
isAutoRefreshEnabled: Ref<boolean, boolean>;
|
|
11
12
|
fetchFlowParent: (taskId: string) => Promise<boolean>;
|
|
12
13
|
updateFlowParent: (title: string) => Promise<void>;
|
|
13
14
|
deleteFlowParent: () => Promise<void>;
|
|
14
15
|
toggleLockFlowParent: (is_locked: boolean) => Promise<void>;
|
|
15
16
|
fetchFlowNodesAndEdges: () => Promise<void>;
|
|
16
|
-
createNode: (
|
|
17
|
+
createNode: (position?: {
|
|
18
|
+
x: number;
|
|
19
|
+
y: number;
|
|
20
|
+
}) => Promise<string | null>;
|
|
17
21
|
updateNode: (data: {
|
|
18
22
|
id: string;
|
|
19
23
|
position_x: number;
|
|
@@ -22,8 +26,13 @@ export declare function useTaskFlow(antConnect: AntConnect, notepad: Notepad): {
|
|
|
22
26
|
deleteNode: (nodeId: string) => Promise<void>;
|
|
23
27
|
createEdge: (source: string, target: string, type: "BLOCKED_BY" | "NON_BLOCKING") => Promise<void>;
|
|
24
28
|
deleteEdge: (edgeId: string) => Promise<void>;
|
|
29
|
+
createTriggerNode: (triggerId: string, position?: {
|
|
30
|
+
x: number;
|
|
31
|
+
y: number;
|
|
32
|
+
}) => Promise<string | null>;
|
|
25
33
|
addRelationQuery: (edgeId: string, queryId: string) => Promise<void>;
|
|
26
34
|
deleteRelationQuery: (edgeId: string, queryId: string) => Promise<void>;
|
|
35
|
+
setEdgeRelationType: (edgeId: string, newType: "BLOCKED_BY" | "NON_BLOCKING") => Promise<void>;
|
|
27
36
|
addTaskRelationQueryApi: import('@antcde/vue-utils').UseApiReturn<import('@antcde/connect-ts').TableQuery | null, [taskId: string, relationId: string, queryId: string], true>;
|
|
28
37
|
deleteTaskRelationQueryApi: import('@antcde/vue-utils').UseApiReturn<{
|
|
29
38
|
id: string;
|
|
@@ -32,6 +41,8 @@ export declare function useTaskFlow(antConnect: AntConnect, notepad: Notepad): {
|
|
|
32
41
|
getFlowNodesApi: import('@antcde/vue-utils').UseApiReturn<import('@antcde/connect-ts/services/TaskService').GetTasksResponse<Task> | null, [licenseId: string, query?: string | undefined], true>;
|
|
33
42
|
deletedFlowId: Ref<string | null, string | null>;
|
|
34
43
|
updateFlowTask: (task: Task) => void;
|
|
44
|
+
enableAutoRefresh: () => void;
|
|
45
|
+
disableAutoRefresh: () => void;
|
|
35
46
|
};
|
|
36
47
|
export interface TaskFlowNode {
|
|
37
48
|
id: string;
|
|
@@ -48,6 +59,21 @@ export interface TaskFlowNode {
|
|
|
48
59
|
color: string;
|
|
49
60
|
icon: string;
|
|
50
61
|
};
|
|
62
|
+
assigned_to?: {
|
|
63
|
+
id: string;
|
|
64
|
+
firstname: string;
|
|
65
|
+
lastname: string;
|
|
66
|
+
email: string;
|
|
67
|
+
};
|
|
68
|
+
trigger?: {
|
|
69
|
+
id: string;
|
|
70
|
+
name: string;
|
|
71
|
+
is_active: boolean;
|
|
72
|
+
close_task_after_execution: boolean;
|
|
73
|
+
event: Pick<Event, 'id' | 'name' | 'code' | 'description'>;
|
|
74
|
+
};
|
|
75
|
+
trigger_id?: string;
|
|
76
|
+
isTriggerTask?: boolean;
|
|
51
77
|
};
|
|
52
78
|
draggable: boolean;
|
|
53
79
|
position: {
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
interface TaskFlowDragDropApi {
|
|
3
|
+
screenToFlowCoordinate: (pos: {
|
|
4
|
+
x: number;
|
|
5
|
+
y: number;
|
|
6
|
+
}) => {
|
|
7
|
+
x: number;
|
|
8
|
+
y: number;
|
|
9
|
+
};
|
|
10
|
+
updateNode: (id: string, updater: (node: any) => any) => void;
|
|
11
|
+
viewport?: Ref<{
|
|
12
|
+
x: number;
|
|
13
|
+
y: number;
|
|
14
|
+
zoom: number;
|
|
15
|
+
}>;
|
|
16
|
+
}
|
|
17
|
+
export declare function useTaskFlowDragDrop(api?: TaskFlowDragDropApi): {
|
|
18
|
+
isDragOver: Ref<boolean, boolean>;
|
|
19
|
+
isDragging: Ref<boolean, boolean>;
|
|
20
|
+
draggedType: Ref<string | null, string | null>;
|
|
21
|
+
onDragStart: (event: DragEvent, type: string, data?: any) => void;
|
|
22
|
+
onDragOver: (event: DragEvent) => void;
|
|
23
|
+
onDragLeave: (event: DragEvent) => void;
|
|
24
|
+
onDrop: (event: DragEvent, createNodeFn: (position?: {
|
|
25
|
+
x: number;
|
|
26
|
+
y: number;
|
|
27
|
+
}) => Promise<string | null>, createTriggerNodeFn?: (id: string, position?: {
|
|
28
|
+
x: number;
|
|
29
|
+
y: number;
|
|
30
|
+
}) => Promise<string | null>, persistPositionFn?: (data: {
|
|
31
|
+
id: string;
|
|
32
|
+
position_x: number;
|
|
33
|
+
position_y: number;
|
|
34
|
+
}) => Promise<void>) => Promise<void>;
|
|
35
|
+
onDragEnd: () => void;
|
|
36
|
+
};
|
|
37
|
+
export {};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { AntConnect, Notepad, Task } from '@antcde/connect-ts';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
flowId: string;
|
|
4
|
+
highlightId: string | null;
|
|
5
|
+
userId: string;
|
|
6
|
+
antConnect: AntConnect;
|
|
7
|
+
notepad: Notepad;
|
|
8
|
+
isDark: boolean;
|
|
9
|
+
};
|
|
10
|
+
declare function reloadFlow(): void;
|
|
11
|
+
declare function updateFlowTask(task: Task): void;
|
|
12
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {
|
|
13
|
+
reloadFlow: typeof reloadFlow;
|
|
14
|
+
updateFlowTask: typeof updateFlowTask;
|
|
15
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
16
|
+
updated: (...args: any[]) => void;
|
|
17
|
+
parentTaskNotFound: (...args: any[]) => void;
|
|
18
|
+
deletedFlowId: (...args: any[]) => void;
|
|
19
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
20
|
+
onUpdated?: ((...args: any[]) => any) | undefined;
|
|
21
|
+
onParentTaskNotFound?: ((...args: any[]) => any) | undefined;
|
|
22
|
+
onDeletedFlowId?: ((...args: any[]) => any) | undefined;
|
|
23
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
24
|
+
editorRef: import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{
|
|
25
|
+
isDark: boolean;
|
|
26
|
+
}> & Readonly<{
|
|
27
|
+
onEditTask?: ((...args: any[]) => any) | undefined;
|
|
28
|
+
}>, {
|
|
29
|
+
createTaskAtViewportCenter: () => Promise<void>;
|
|
30
|
+
createTriggerAtViewportCenter: (triggerId: string) => Promise<void>;
|
|
31
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
32
|
+
editTask: (...args: any[]) => void;
|
|
33
|
+
}, import('vue').PublicProps, {}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
|
|
34
|
+
containerEl: HTMLDivElement;
|
|
35
|
+
}, HTMLDivElement, import('vue').ComponentProvideOptions, {
|
|
36
|
+
P: {};
|
|
37
|
+
B: {};
|
|
38
|
+
D: {};
|
|
39
|
+
C: {};
|
|
40
|
+
M: {};
|
|
41
|
+
Defaults: {};
|
|
42
|
+
}, Readonly<{
|
|
43
|
+
isDark: boolean;
|
|
44
|
+
}> & Readonly<{
|
|
45
|
+
onEditTask?: ((...args: any[]) => any) | undefined;
|
|
46
|
+
}>, {
|
|
47
|
+
createTaskAtViewportCenter: () => Promise<void>;
|
|
48
|
+
createTriggerAtViewportCenter: (triggerId: string) => Promise<void>;
|
|
49
|
+
}, {}, {}, {}, {}> | null;
|
|
50
|
+
}, any>;
|
|
51
|
+
export default _default;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ import { default as BaseDeleteDialog } from './components/BaseDeleteDialog.vue';
|
|
|
13
13
|
import { default as BaseDialog } from './components/BaseDialog.vue';
|
|
14
14
|
import { default as BaseResizePanel } from './components/BaseResizePanel.vue';
|
|
15
15
|
import { default as PermissionCard } from './components/RBAC/Permissions/PermissionCard.vue';
|
|
16
|
-
import { default as TaskFlow } from './components/TasksFlow/
|
|
16
|
+
import { default as TaskFlow } from './components/TasksFlow/index.vue';
|
|
17
17
|
export type { AppLike } from './components/BaseAppCard.vue';
|
|
18
18
|
export * from '@antcde/vue-utils';
|
|
19
19
|
export { BaseAntButton, BaseAntCard, BaseAntCreateCard, BaseAntDatePicker, BaseAntInput, BaseAntLoading, BaseAppCard, BaseAppCardSkeleton, BaseClickableIcon, BaseConfirmDialog, BaseDeleteDialog, BaseDialog, BaseResizePanel, PermissionCard, TaskFlow, };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@antcde/component-library",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.4",
|
|
5
5
|
"description": "Helper to use ant components in Vue 3",
|
|
6
6
|
"author": "CollaborAll",
|
|
7
7
|
"repository": {
|
|
@@ -57,6 +57,7 @@
|
|
|
57
57
|
"dependencies": {
|
|
58
58
|
"@arcgis/core": "^4.30.9",
|
|
59
59
|
"@mdi/font": "^7.2.96",
|
|
60
|
+
"@vue-flow/background": "^1.3.2",
|
|
60
61
|
"@vue-flow/core": "^1.41.6",
|
|
61
62
|
"@vue-flow/minimap": "^1.4.0",
|
|
62
63
|
"@vueuse/core": "^12.0.0",
|
|
@@ -67,8 +68,8 @@
|
|
|
67
68
|
"vue-i18n": "^10.0.1",
|
|
68
69
|
"vue-router": "^4.4.4",
|
|
69
70
|
"vuetify": "^3.7.4",
|
|
70
|
-
"@antcde/
|
|
71
|
-
"@antcde/
|
|
71
|
+
"@antcde/connect-ts": "0.4.2",
|
|
72
|
+
"@antcde/vue-utils": "0.2.0"
|
|
72
73
|
},
|
|
73
74
|
"bundleDependencies": [
|
|
74
75
|
"vue",
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { AntConnect, Notepad, Task } from '@antcde/connect-ts';
|
|
2
|
-
type __VLS_Props = {
|
|
3
|
-
flowId: string;
|
|
4
|
-
highlightId: string | null;
|
|
5
|
-
userId: string;
|
|
6
|
-
antConnect: AntConnect;
|
|
7
|
-
notepad: Notepad;
|
|
8
|
-
isDark: boolean;
|
|
9
|
-
};
|
|
10
|
-
declare function reloadFlow(): void;
|
|
11
|
-
declare function updateFlowTask(task: Task): void;
|
|
12
|
-
declare const _default: import('vue').DefineComponent<__VLS_Props, {
|
|
13
|
-
reloadFlow: typeof reloadFlow;
|
|
14
|
-
updateFlowTask: typeof updateFlowTask;
|
|
15
|
-
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
16
|
-
updated: (...args: any[]) => void;
|
|
17
|
-
parentTaskNotFound: (...args: any[]) => void;
|
|
18
|
-
deletedFlowId: (...args: any[]) => void;
|
|
19
|
-
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
20
|
-
onUpdated?: ((...args: any[]) => any) | undefined;
|
|
21
|
-
onParentTaskNotFound?: ((...args: any[]) => any) | undefined;
|
|
22
|
-
onDeletedFlowId?: ((...args: any[]) => any) | undefined;
|
|
23
|
-
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
24
|
-
export default _default;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
type __VLS_Props = {
|
|
2
|
-
isDark: boolean;
|
|
3
|
-
};
|
|
4
|
-
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
5
|
-
editTask: (...args: any[]) => void;
|
|
6
|
-
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
7
|
-
onEditTask?: ((...args: any[]) => any) | undefined;
|
|
8
|
-
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
9
|
-
export default _default;
|
/package/dist/types/components/TasksFlow/{TaskFlowEdge.vue.d.ts → components/_flowEdge.vue.d.ts}
RENAMED
|
File without changes
|
|
File without changes
|