@kong-ui-public/entities-plugins 9.104.3 → 9.105.0
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/entities-plugins.es.js +11145 -10269
- package/dist/entities-plugins.umd.js +35 -35
- package/dist/style.css +1 -1
- package/dist/types/components/free-form/Datakit/constants.d.ts +6 -0
- package/dist/types/components/free-form/Datakit/constants.d.ts.map +1 -1
- package/dist/types/components/free-form/Datakit/flow-editor/FlowCanvas.vue.d.ts.map +1 -1
- package/dist/types/components/free-form/Datakit/flow-editor/FlowEditor.vue.d.ts +18 -0
- package/dist/types/components/free-form/Datakit/flow-editor/FlowEditor.vue.d.ts.map +1 -1
- package/dist/types/components/free-form/Datakit/flow-editor/composables/useBranchLayout.d.ts +21 -0
- package/dist/types/components/free-form/Datakit/flow-editor/composables/useBranchLayout.d.ts.map +1 -0
- package/dist/types/components/free-form/Datakit/flow-editor/composables/useBranchNodeForm.d.ts +41 -0
- package/dist/types/components/free-form/Datakit/flow-editor/composables/useBranchNodeForm.d.ts.map +1 -0
- package/dist/types/components/free-form/Datakit/flow-editor/composables/useNodeForm.d.ts.map +1 -1
- package/dist/types/components/free-form/Datakit/flow-editor/node/FlowNode.vue.d.ts.map +1 -1
- package/dist/types/components/free-form/Datakit/flow-editor/node/GroupNode.vue.d.ts +7 -0
- package/dist/types/components/free-form/Datakit/flow-editor/node/GroupNode.vue.d.ts.map +1 -0
- package/dist/types/components/free-form/Datakit/flow-editor/node/NodeBadge.vue.d.ts +1 -1
- package/dist/types/components/free-form/Datakit/flow-editor/node/NodeBadge.vue.d.ts.map +1 -1
- package/dist/types/components/free-form/Datakit/flow-editor/node/NodePanelItem.vue.d.ts.map +1 -1
- package/dist/types/components/free-form/Datakit/flow-editor/node/NodePropertiesPanel.vue.d.ts.map +1 -1
- package/dist/types/components/free-form/Datakit/flow-editor/node/ValueIndicator.vue.d.ts.map +1 -1
- package/dist/types/components/free-form/Datakit/flow-editor/node/node-visual.d.ts +3 -0
- package/dist/types/components/free-form/Datakit/flow-editor/node/node-visual.d.ts.map +1 -0
- package/dist/types/components/free-form/Datakit/flow-editor/node/node.d.ts +1 -0
- package/dist/types/components/free-form/Datakit/flow-editor/node/node.d.ts.map +1 -1
- package/dist/types/components/free-form/Datakit/flow-editor/node-forms/InputsField.vue.d.ts.map +1 -1
- package/dist/types/components/free-form/Datakit/flow-editor/node-forms/NodeFormBranch.vue.d.ts +7 -0
- package/dist/types/components/free-form/Datakit/flow-editor/node-forms/NodeFormBranch.vue.d.ts.map +1 -0
- package/dist/types/components/free-form/Datakit/flow-editor/node-forms/NodeFormCall.vue.d.ts.map +1 -1
- package/dist/types/components/free-form/Datakit/flow-editor/store/branch-group-manager.d.ts +53 -0
- package/dist/types/components/free-form/Datakit/flow-editor/store/branch-group-manager.d.ts.map +1 -0
- package/dist/types/components/free-form/Datakit/flow-editor/store/flow.d.ts +168 -14
- package/dist/types/components/free-form/Datakit/flow-editor/store/flow.d.ts.map +1 -1
- package/dist/types/components/free-form/Datakit/flow-editor/store/graph.d.ts +11 -0
- package/dist/types/components/free-form/Datakit/flow-editor/store/graph.d.ts.map +1 -0
- package/dist/types/components/free-form/Datakit/flow-editor/store/helpers.d.ts +29 -2
- package/dist/types/components/free-form/Datakit/flow-editor/store/helpers.d.ts.map +1 -1
- package/dist/types/components/free-form/Datakit/flow-editor/store/history.d.ts +1 -0
- package/dist/types/components/free-form/Datakit/flow-editor/store/history.d.ts.map +1 -1
- package/dist/types/components/free-form/Datakit/flow-editor/store/init.d.ts.map +1 -1
- package/dist/types/components/free-form/Datakit/flow-editor/store/store.d.ts +105 -3
- package/dist/types/components/free-form/Datakit/flow-editor/store/store.d.ts.map +1 -1
- package/dist/types/components/free-form/Datakit/flow-editor/store/validation.d.ts +2 -9
- package/dist/types/components/free-form/Datakit/flow-editor/store/validation.d.ts.map +1 -1
- package/dist/types/components/free-form/Datakit/schema/compat.d.ts +24 -0
- package/dist/types/components/free-form/Datakit/schema/compat.d.ts.map +1 -1
- package/dist/types/components/free-form/Datakit/schema/strict.d.ts +72 -0
- package/dist/types/components/free-form/Datakit/schema/strict.d.ts.map +1 -1
- package/dist/types/components/free-form/Datakit/types.d.ts +49 -5
- package/dist/types/components/free-form/Datakit/types.d.ts.map +1 -1
- package/dist/types/components/free-form/shared/EnhancedInput.vue.d.ts.map +1 -1
- package/package.json +6 -6
package/dist/types/components/free-form/Datakit/flow-editor/node/ValueIndicator.vue.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ValueIndicator.vue.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/free-form/Datakit/flow-editor/node/ValueIndicator.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ValueIndicator.vue.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/free-form/Datakit/flow-editor/node/ValueIndicator.vue"],"names":[],"mappings":"AAsJA,OAAO,KAAK,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAKvD,UAAU,KAAK;IACb,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,UAAU,CAAC,EAAE,YAAY,CAAA;IACzB,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,WAAW,CAAC,EAAE,YAAY,EAAE,CAAA;IAC5B,gBAAgB,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG,SAAS,CAAC,CAAA;IAC5C,IAAI,EAAE,OAAO,GAAG,QAAQ,CAAA;IACxB,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB;;AAqJD,wBAIG"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"node-visual.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/free-form/Datakit/flow-editor/node/node-visual.ts"],"names":[],"mappings":"AAyBA,OAAO,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAEvD,eAAO,MAAM,WAAW,EAAE,MAAM,CAAC,QAAQ,EAAE,UAAU,CAiEpD,CAAA"}
|
|
@@ -4,6 +4,7 @@ export declare function getNodeTypeName(type: NodeType): string;
|
|
|
4
4
|
export declare const CONFIG_NODE_META_MAP: Record<ConfigNodeType, NodeMeta>;
|
|
5
5
|
export declare const IMPLICIT_NODE_META_MAP: Record<ImplicitNodeType, NodeMeta>;
|
|
6
6
|
export declare const isImplicitName: (name: NodeName) => name is ImplicitNodeName;
|
|
7
|
+
export declare const isNodeType: (type: string) => type is NodeType;
|
|
7
8
|
export declare const isImplicitType: (type: NodeType) => type is ImplicitNodeType;
|
|
8
9
|
export declare const isConfigType: (type: NodeType) => type is ConfigNodeType;
|
|
9
10
|
export declare const isImplicitNode: (node: NodeMeta | NodeInstance) => node is (NodeMeta | NodeInstance) & {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"node.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/free-form/Datakit/flow-editor/node/node.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,OAAO,EACP,gBAAgB,EAChB,gBAAgB,EAChB,YAAY,EACZ,MAAM,EACN,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,cAAc,
|
|
1
|
+
{"version":3,"file":"node.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/free-form/Datakit/flow-editor/node/node.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,OAAO,EACP,gBAAgB,EAChB,gBAAgB,EAChB,YAAY,EACZ,MAAM,EACN,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,cAAc,EAGf,MAAM,aAAa,CAAA;AASpB,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,QAAQ,GAAG,MAAM,CAE7D;AAMD,wBAAgB,eAAe,CAAC,IAAI,EAAE,QAAQ,GAAG,MAAM,CAEtD;AAED,eAAO,MAAM,oBAAoB,EAAE,MAAM,CAAC,cAAc,EAAE,QAAQ,CAsGjE,CAAA;AAED,eAAO,MAAM,sBAAsB,EAAE,MAAM,CAAC,gBAAgB,EAAE,QAAQ,CAkErE,CAAA;AAID,eAAO,MAAM,cAAc,GAAI,MAAM,QAAQ,KAAG,IAAI,IAAI,gBACG,CAAA;AAE3D,eAAO,MAAM,UAAU,GAAI,MAAM,MAAM,KAAG,IAAI,IAAI,QACoC,CAAA;AAEtF,eAAO,MAAM,cAAc,GAAI,MAAM,QAAQ,KAAG,IAAI,IAAI,gBACG,CAAA;AAE3D,eAAO,MAAM,YAAY,GAAI,MAAM,QAAQ,KAAG,IAAI,IAAI,cACG,CAAA;AAEzD,eAAO,MAAM,cAAc,GACzB,MAAM,QAAQ,GAAG,YAAY,KAC5B,IAAI,IAAI,CAAC,QAAQ,GAAG,YAAY,CAAC,GAAG;IAAE,IAAI,EAAE,gBAAgB,CAAA;CACpC,CAAA;AAE3B,eAAO,MAAM,QAAQ,GAAI,KAAK,MAAM,KAAG,EAAE,IAAI,MAClB,CAAA;AAE3B,eAAO,MAAM,SAAS,GAAI,KAAK,MAAM,KAAG,EAAE,IAAI,OAClB,CAAA"}
|
package/dist/types/components/free-form/Datakit/flow-editor/node-forms/InputsField.vue.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputsField.vue.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/free-form/Datakit/flow-editor/node-forms/InputsField.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"InputsField.vue.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/free-form/Datakit/flow-editor/node-forms/InputsField.vue"],"names":[],"mappings":"AAmKA,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAA;AAC1E,OAAO,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAE1D,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,WAAW,EAAE,CAAA;IACpB,UAAU,EAAE,SAAS,EAAE,CAAA;IACvB,kBAAkB,EAAE,UAAU,CAAC,OAAO,WAAW,CAAC,CAAC,oBAAoB,CAAC,CAAA;CACzE,CAAC;;;;;;;;;;;;;;AAwOF,wBAKG"}
|
package/dist/types/components/free-form/Datakit/flow-editor/node-forms/NodeFormBranch.vue.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { NodeId } from '../../types';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
nodeId: NodeId;
|
|
4
|
+
};
|
|
5
|
+
declare const _default: import("vue").DefineComponent<__VLS_Props, void, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
6
|
+
export default _default;
|
|
7
|
+
//# sourceMappingURL=NodeFormBranch.vue.d.ts.map
|
package/dist/types/components/free-form/Datakit/flow-editor/node-forms/NodeFormBranch.vue.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NodeFormBranch.vue.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/free-form/Datakit/flow-editor/node-forms/NodeFormBranch.vue"],"names":[],"mappings":"AAkGA,OAAO,KAAK,EAAc,MAAM,EAAE,MAAM,aAAa,CAAA;AAKrD,KAAK,WAAW,GAAG;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;;AA6MtC,wBAIG"}
|
package/dist/types/components/free-form/Datakit/flow-editor/node-forms/NodeFormCall.vue.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NodeFormCall.vue.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/free-form/Datakit/flow-editor/node-forms/NodeFormCall.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"NodeFormCall.vue.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/free-form/Datakit/flow-editor/node-forms/NodeFormCall.vue"],"names":[],"mappings":"AAoIA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AAIzC,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,CAAA;CACf,CAAC;;AAwRF,wBAIG"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Branch Group Manager
|
|
3
|
+
*
|
|
4
|
+
* Manages logical groups of nodes organized under branch nodes (e.g., "then", "else").
|
|
5
|
+
* Responsible for:
|
|
6
|
+
* - Validating membership (phase compatibility, cycle detection, type checking)
|
|
7
|
+
* - Synchronizing node config with group state
|
|
8
|
+
* - Managing group lifecycle (create, update, delete)
|
|
9
|
+
* - Providing query APIs for membership lookup
|
|
10
|
+
*
|
|
11
|
+
* Groups are stored in two places:
|
|
12
|
+
* 1. Node config: `node.config[branchName]` contains NodeId[]
|
|
13
|
+
* 2. State groups: `state.groups` contains GroupInstance[] with layout info
|
|
14
|
+
*
|
|
15
|
+
* @module branch-group-manager
|
|
16
|
+
*/
|
|
17
|
+
import type { ComputedRef, Ref } from 'vue';
|
|
18
|
+
import type { BranchName, EditorState, GroupId, GroupInstance, NodeId, NodeInstance } from '../../types';
|
|
19
|
+
import type { TaggedHistory } from './history';
|
|
20
|
+
export interface CommitOptions {
|
|
21
|
+
/** Whether to commit the change to history. Defaults to true. */
|
|
22
|
+
commit?: boolean;
|
|
23
|
+
/** Optional tag for the history commit. */
|
|
24
|
+
tag?: string;
|
|
25
|
+
}
|
|
26
|
+
interface BranchGroupManagerContext {
|
|
27
|
+
state: Ref<EditorState>;
|
|
28
|
+
groupMapById: ComputedRef<Map<GroupId, GroupInstance>>;
|
|
29
|
+
getNodeById: (id: NodeId) => NodeInstance | undefined;
|
|
30
|
+
history: TaggedHistory<EditorState>;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Creates a manager for branch group operations.
|
|
34
|
+
* Handles membership validation, cycle detection, and group lifecycle.
|
|
35
|
+
*
|
|
36
|
+
* @returns An object with methods for managing branch groups
|
|
37
|
+
*/
|
|
38
|
+
export declare function createBranchGroupManager({ state, groupMapById, getNodeById, history }: BranchGroupManagerContext): {
|
|
39
|
+
setMembers: (ownerId: NodeId, branch: BranchName, members: readonly NodeId[], options?: CommitOptions) => boolean;
|
|
40
|
+
prepareMembers: (ownerId: NodeId, branch: BranchName, candidates: readonly NodeId[]) => NodeId[];
|
|
41
|
+
addMember: (ownerId: NodeId, branch: BranchName, memberId: NodeId, options?: CommitOptions) => boolean;
|
|
42
|
+
dropTarget: (targetId: NodeId) => void;
|
|
43
|
+
clear: (ownerId: NodeId) => void;
|
|
44
|
+
getMembers: (ownerId: NodeId, branch: BranchName) => NodeId[];
|
|
45
|
+
findMembership: (memberId: NodeId) => {
|
|
46
|
+
ownerId: NodeId;
|
|
47
|
+
branch: BranchName;
|
|
48
|
+
} | undefined;
|
|
49
|
+
wouldCreateCycle: (ownerId: NodeId, memberId: NodeId) => boolean;
|
|
50
|
+
};
|
|
51
|
+
export type BranchGroupManager = ReturnType<typeof createBranchGroupManager>;
|
|
52
|
+
export {};
|
|
53
|
+
//# sourceMappingURL=branch-group-manager.d.ts.map
|
package/dist/types/components/free-form/Datakit/flow-editor/store/branch-group-manager.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"branch-group-manager.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/free-form/Datakit/flow-editor/store/branch-group-manager.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAGH,OAAO,KAAK,EAAE,WAAW,EAAE,GAAG,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,KAAK,EACV,UAAU,EACV,WAAW,EACX,OAAO,EACP,aAAa,EACb,MAAM,EACN,YAAY,EACb,MAAM,aAAa,CAAA;AAGpB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,WAAW,CAAA;AAG9C,MAAM,WAAW,aAAa;IAC5B,iEAAiE;IACjE,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,2CAA2C;IAC3C,GAAG,CAAC,EAAE,MAAM,CAAA;CACb;AAED,UAAU,yBAAyB;IACjC,KAAK,EAAE,GAAG,CAAC,WAAW,CAAC,CAAA;IACvB,YAAY,EAAE,WAAW,CAAC,GAAG,CAAC,OAAO,EAAE,aAAa,CAAC,CAAC,CAAA;IACtD,WAAW,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,YAAY,GAAG,SAAS,CAAA;IACrD,OAAO,EAAE,aAAa,CAAC,WAAW,CAAC,CAAA;CACpC;AAeD;;;;;GAKG;AACH,wBAAgB,wBAAwB,CAAC,EAAE,KAAK,EAAE,YAAY,EAAE,WAAW,EAAE,OAAO,EAAE,EAAE,yBAAyB;0BAuGpG,MAAM,UACP,UAAU,WACT,SAAS,MAAM,EAAE,YACjB,aAAa,KACrB,OAAO;8BA3CuB,MAAM,UAAU,UAAU,cAAc,SAAS,MAAM,EAAE,KAAG,MAAM,EAAE;yBAsJzE,MAAM,UAAU,UAAU,YAAY,MAAM,YAAW,aAAa,KAAQ,OAAO;2BA2BjF,MAAM;qBAnGZ,MAAM;0BAQD,MAAM,UAAU,UAAU,KAAG,MAAM,EAAE;+BAgBhC,MAAM,KAAG;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,UAAU,CAAA;KAAE,GAAG,SAAS;gCAU3D,MAAM,YAAY,MAAM,KAAG,OAAO;EAoFtE;AAED,MAAM,MAAM,kBAAkB,GAAG,UAAU,CAAC,OAAO,wBAAwB,CAAC,CAAA"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { FitViewParams, Node, XYPosition } from '@vue-flow/core';
|
|
2
2
|
import type { MaybeRefOrGetter } from '@vueuse/core';
|
|
3
|
-
import type {
|
|
3
|
+
import type { EdgeId, EdgeInstance, FieldId, GroupId, NodeId, NodeInstance, NodePhase } from '../../types';
|
|
4
|
+
import type { FlowEdge } from '../../types';
|
|
4
5
|
export interface LayoutOptions {
|
|
5
6
|
/**
|
|
6
7
|
* The viewport (unscaled width and height) of the canvas.
|
|
@@ -70,6 +71,21 @@ declare const provideFlowStore: (options: UseFlowOptions) => {
|
|
|
70
71
|
target: NodeId;
|
|
71
72
|
targetField?: FieldId | undefined;
|
|
72
73
|
}[];
|
|
74
|
+
groups: {
|
|
75
|
+
id: GroupId;
|
|
76
|
+
ownerId: NodeId;
|
|
77
|
+
branch: import("../../types").BranchName;
|
|
78
|
+
phase: NodePhase;
|
|
79
|
+
memberIds: NodeId[];
|
|
80
|
+
position?: {
|
|
81
|
+
x: number;
|
|
82
|
+
y: number;
|
|
83
|
+
} | undefined;
|
|
84
|
+
dimensions?: {
|
|
85
|
+
width: number;
|
|
86
|
+
height: number;
|
|
87
|
+
} | undefined;
|
|
88
|
+
}[];
|
|
73
89
|
pendingLayout?: false | "clearHistory" | "keepHistory" | undefined;
|
|
74
90
|
pendingFitView?: boolean | undefined;
|
|
75
91
|
}, import("../../types").EditorState | {
|
|
@@ -106,6 +122,21 @@ declare const provideFlowStore: (options: UseFlowOptions) => {
|
|
|
106
122
|
target: NodeId;
|
|
107
123
|
targetField?: FieldId | undefined;
|
|
108
124
|
}[];
|
|
125
|
+
groups: {
|
|
126
|
+
id: GroupId;
|
|
127
|
+
ownerId: NodeId;
|
|
128
|
+
branch: import("../../types").BranchName;
|
|
129
|
+
phase: NodePhase;
|
|
130
|
+
memberIds: NodeId[];
|
|
131
|
+
position?: {
|
|
132
|
+
x: number;
|
|
133
|
+
y: number;
|
|
134
|
+
} | undefined;
|
|
135
|
+
dimensions?: {
|
|
136
|
+
width: number;
|
|
137
|
+
height: number;
|
|
138
|
+
} | undefined;
|
|
139
|
+
}[];
|
|
109
140
|
pendingLayout?: false | "clearHistory" | "keepHistory" | undefined;
|
|
110
141
|
pendingFitView?: boolean | undefined;
|
|
111
142
|
}>;
|
|
@@ -118,6 +149,7 @@ declare const provideFlowStore: (options: UseFlowOptions) => {
|
|
|
118
149
|
nodeMapByName: import("vue").ComputedRef<Map<"request" | "response" | "vault" | "service_request" | "service_response" | (string & import("zod").$brand<"ConfigNodeName">), NodeInstance>>;
|
|
119
150
|
edgeMapById: import("vue").ComputedRef<Map<`edge:${number}`, EdgeInstance>>;
|
|
120
151
|
edgeIdMapByNodeId: import("vue").ComputedRef<Map<`node:${number}`, Set<`edge:${number}`>>>;
|
|
152
|
+
groupMapById: import("vue").ComputedRef<Map<`node:${number}:then` | `node:${number}:else`, import("../../types").GroupInstance>>;
|
|
121
153
|
getNodeById: (id: NodeId) => NodeInstance | undefined;
|
|
122
154
|
getNodeByName: (name: import("../../types").NodeName) => NodeInstance | undefined;
|
|
123
155
|
getEdgeById: (id: EdgeId) => EdgeInstance | undefined;
|
|
@@ -132,18 +164,38 @@ declare const provideFlowStore: (options: UseFlowOptions) => {
|
|
|
132
164
|
removeNode: (nodeId: NodeId, commitNow?: boolean) => void;
|
|
133
165
|
renameNode: (nodeId: NodeId, newName: import("../../types").NodeName, commitNow?: boolean, tag?: string) => void;
|
|
134
166
|
moveNode: (nodeId: NodeId, position: XYPosition, commitNow?: boolean) => void;
|
|
167
|
+
moveGroup: (groupId: GroupId, position: XYPosition, commitNow?: boolean) => void;
|
|
168
|
+
setGroupLayout: (groupId: GroupId, layout: {
|
|
169
|
+
position: XYPosition;
|
|
170
|
+
dimensions: import("@vue-flow/core").Dimensions;
|
|
171
|
+
}, commitNow?: boolean) => boolean;
|
|
135
172
|
toggleExpanded: (nodeId: NodeId, io: "input" | "output", value?: boolean, commitNow?: boolean, tag?: string) => void;
|
|
136
173
|
replaceConfig: (nodeId: NodeId, next: Record<string, unknown>, commitNow?: boolean, tag?: string) => void;
|
|
174
|
+
branchGroups: {
|
|
175
|
+
setMembers: (ownerId: NodeId, branch: import("../../types").BranchName, members: readonly NodeId[], options?: import("./branch-group-manager").CommitOptions) => boolean;
|
|
176
|
+
prepareMembers: (ownerId: NodeId, branch: import("../../types").BranchName, candidates: readonly NodeId[]) => NodeId[];
|
|
177
|
+
addMember: (ownerId: NodeId, branch: import("../../types").BranchName, memberId: NodeId, options?: import("./branch-group-manager").CommitOptions) => boolean;
|
|
178
|
+
dropTarget: (targetId: NodeId) => void;
|
|
179
|
+
clear: (ownerId: NodeId) => void;
|
|
180
|
+
getMembers: (ownerId: NodeId, branch: import("../../types").BranchName) => NodeId[];
|
|
181
|
+
findMembership: (memberId: NodeId) => {
|
|
182
|
+
ownerId: NodeId;
|
|
183
|
+
branch: import("../../types").BranchName;
|
|
184
|
+
} | undefined;
|
|
185
|
+
wouldCreateCycle: (ownerId: NodeId, memberId: NodeId) => boolean;
|
|
186
|
+
};
|
|
137
187
|
addField: (nodeId: NodeId, io: "input" | "output", name: import("../../types").FieldName, commitNow?: boolean) => void;
|
|
138
188
|
renameField: (nodeId: NodeId, fieldId: FieldId, newName: import("../../types").FieldName, commitNow?: boolean) => void;
|
|
139
189
|
removeField: (nodeId: NodeId, fieldId: FieldId, cascade?: boolean, commitNow?: boolean) => void;
|
|
140
|
-
connectEdge: (payload: EdgeData, commitNow?: boolean) => `edge:${number}` | undefined;
|
|
141
|
-
replaceConnection: (edgeId: EdgeId, next: EdgeData, commitNow?: boolean) => void;
|
|
190
|
+
connectEdge: (payload: import("../../types").EdgeData, commitNow?: boolean) => `edge:${number}` | undefined;
|
|
191
|
+
replaceConnection: (edgeId: EdgeId, next: import("../../types").EdgeData, commitNow?: boolean) => void;
|
|
142
192
|
disconnectEdge: (edgeId: EdgeId, commitNow?: boolean) => void;
|
|
143
193
|
disconnectInEdges: (nodeId: NodeId, commitNow?: boolean) => void;
|
|
144
194
|
disconnectOutEdges: (nodeId: NodeId, commitNow?: boolean) => void;
|
|
145
195
|
toConfigNodes: () => import("../../types").ConfigNode[];
|
|
146
196
|
toUINodes: () => import("../../types").UINode[];
|
|
197
|
+
toUIGroups: () => import("../../types").UIGroup[];
|
|
198
|
+
toUIData: () => import("../../types").DatakitUIData;
|
|
147
199
|
load: (pluginData: import("../../types").DatakitPluginData, keepHistory?: boolean) => void;
|
|
148
200
|
commit: (tag?: string) => void;
|
|
149
201
|
undo: () => void;
|
|
@@ -153,7 +205,7 @@ declare const provideFlowStore: (options: UseFlowOptions) => {
|
|
|
153
205
|
clear: () => void;
|
|
154
206
|
reset: () => void;
|
|
155
207
|
revert: () => void;
|
|
156
|
-
isValidConnection: (edge: EdgeData) => boolean;
|
|
208
|
+
isValidConnection: (edge: import("../../types").EdgeData) => boolean;
|
|
157
209
|
isValidVueFlowConnection: (conn: {
|
|
158
210
|
source?: string | null;
|
|
159
211
|
sourceHandle?: string | null;
|
|
@@ -166,7 +218,7 @@ declare const provideFlowStore: (options: UseFlowOptions) => {
|
|
|
166
218
|
};
|
|
167
219
|
readonly: boolean | undefined;
|
|
168
220
|
nodes: import("vue").ComputedRef<Node<NodeInstance, any, string>[]>;
|
|
169
|
-
edges: import("vue").ComputedRef<
|
|
221
|
+
edges: import("vue").ComputedRef<FlowEdge[]>;
|
|
170
222
|
selectNode: (nodeId?: NodeId) => Promise<void>;
|
|
171
223
|
autoLayout: (commitNow?: boolean) => void;
|
|
172
224
|
placeToRight: (nodeId: NodeId) => XYPosition;
|
|
@@ -210,6 +262,21 @@ declare const provideFlowStore: (options: UseFlowOptions) => {
|
|
|
210
262
|
target: NodeId;
|
|
211
263
|
targetField?: FieldId | undefined;
|
|
212
264
|
}[];
|
|
265
|
+
groups: {
|
|
266
|
+
id: GroupId;
|
|
267
|
+
ownerId: NodeId;
|
|
268
|
+
branch: import("../../types").BranchName;
|
|
269
|
+
phase: NodePhase;
|
|
270
|
+
memberIds: NodeId[];
|
|
271
|
+
position?: {
|
|
272
|
+
x: number;
|
|
273
|
+
y: number;
|
|
274
|
+
} | undefined;
|
|
275
|
+
dimensions?: {
|
|
276
|
+
width: number;
|
|
277
|
+
height: number;
|
|
278
|
+
} | undefined;
|
|
279
|
+
}[];
|
|
213
280
|
pendingLayout?: false | "clearHistory" | "keepHistory" | undefined;
|
|
214
281
|
pendingFitView?: boolean | undefined;
|
|
215
282
|
}, import("../../types").EditorState | {
|
|
@@ -246,6 +313,21 @@ declare const provideFlowStore: (options: UseFlowOptions) => {
|
|
|
246
313
|
target: NodeId;
|
|
247
314
|
targetField?: FieldId | undefined;
|
|
248
315
|
}[];
|
|
316
|
+
groups: {
|
|
317
|
+
id: GroupId;
|
|
318
|
+
ownerId: NodeId;
|
|
319
|
+
branch: import("../../types").BranchName;
|
|
320
|
+
phase: NodePhase;
|
|
321
|
+
memberIds: NodeId[];
|
|
322
|
+
position?: {
|
|
323
|
+
x: number;
|
|
324
|
+
y: number;
|
|
325
|
+
} | undefined;
|
|
326
|
+
dimensions?: {
|
|
327
|
+
width: number;
|
|
328
|
+
height: number;
|
|
329
|
+
} | undefined;
|
|
330
|
+
}[];
|
|
249
331
|
pendingLayout?: false | "clearHistory" | "keepHistory" | undefined;
|
|
250
332
|
pendingFitView?: boolean | undefined;
|
|
251
333
|
}>;
|
|
@@ -258,6 +340,7 @@ declare const provideFlowStore: (options: UseFlowOptions) => {
|
|
|
258
340
|
nodeMapByName: import("vue").ComputedRef<Map<"request" | "response" | "vault" | "service_request" | "service_response" | (string & import("zod").$brand<"ConfigNodeName">), NodeInstance>>;
|
|
259
341
|
edgeMapById: import("vue").ComputedRef<Map<`edge:${number}`, EdgeInstance>>;
|
|
260
342
|
edgeIdMapByNodeId: import("vue").ComputedRef<Map<`node:${number}`, Set<`edge:${number}`>>>;
|
|
343
|
+
groupMapById: import("vue").ComputedRef<Map<`node:${number}:then` | `node:${number}:else`, import("../../types").GroupInstance>>;
|
|
261
344
|
getNodeById: (id: NodeId) => NodeInstance | undefined;
|
|
262
345
|
getNodeByName: (name: import("../../types").NodeName) => NodeInstance | undefined;
|
|
263
346
|
getEdgeById: (id: EdgeId) => EdgeInstance | undefined;
|
|
@@ -272,18 +355,38 @@ declare const provideFlowStore: (options: UseFlowOptions) => {
|
|
|
272
355
|
removeNode: (nodeId: NodeId, commitNow?: boolean) => void;
|
|
273
356
|
renameNode: (nodeId: NodeId, newName: import("../../types").NodeName, commitNow?: boolean, tag?: string) => void;
|
|
274
357
|
moveNode: (nodeId: NodeId, position: XYPosition, commitNow?: boolean) => void;
|
|
358
|
+
moveGroup: (groupId: GroupId, position: XYPosition, commitNow?: boolean) => void;
|
|
359
|
+
setGroupLayout: (groupId: GroupId, layout: {
|
|
360
|
+
position: XYPosition;
|
|
361
|
+
dimensions: import("@vue-flow/core").Dimensions;
|
|
362
|
+
}, commitNow?: boolean) => boolean;
|
|
275
363
|
toggleExpanded: (nodeId: NodeId, io: "input" | "output", value?: boolean, commitNow?: boolean, tag?: string) => void;
|
|
276
364
|
replaceConfig: (nodeId: NodeId, next: Record<string, unknown>, commitNow?: boolean, tag?: string) => void;
|
|
365
|
+
branchGroups: {
|
|
366
|
+
setMembers: (ownerId: NodeId, branch: import("../../types").BranchName, members: readonly NodeId[], options?: import("./branch-group-manager").CommitOptions) => boolean;
|
|
367
|
+
prepareMembers: (ownerId: NodeId, branch: import("../../types").BranchName, candidates: readonly NodeId[]) => NodeId[];
|
|
368
|
+
addMember: (ownerId: NodeId, branch: import("../../types").BranchName, memberId: NodeId, options?: import("./branch-group-manager").CommitOptions) => boolean;
|
|
369
|
+
dropTarget: (targetId: NodeId) => void;
|
|
370
|
+
clear: (ownerId: NodeId) => void;
|
|
371
|
+
getMembers: (ownerId: NodeId, branch: import("../../types").BranchName) => NodeId[];
|
|
372
|
+
findMembership: (memberId: NodeId) => {
|
|
373
|
+
ownerId: NodeId;
|
|
374
|
+
branch: import("../../types").BranchName;
|
|
375
|
+
} | undefined;
|
|
376
|
+
wouldCreateCycle: (ownerId: NodeId, memberId: NodeId) => boolean;
|
|
377
|
+
};
|
|
277
378
|
addField: (nodeId: NodeId, io: "input" | "output", name: import("../../types").FieldName, commitNow?: boolean) => void;
|
|
278
379
|
renameField: (nodeId: NodeId, fieldId: FieldId, newName: import("../../types").FieldName, commitNow?: boolean) => void;
|
|
279
380
|
removeField: (nodeId: NodeId, fieldId: FieldId, cascade?: boolean, commitNow?: boolean) => void;
|
|
280
|
-
connectEdge: (payload: EdgeData, commitNow?: boolean) => `edge:${number}` | undefined;
|
|
281
|
-
replaceConnection: (edgeId: EdgeId, next: EdgeData, commitNow?: boolean) => void;
|
|
381
|
+
connectEdge: (payload: import("../../types").EdgeData, commitNow?: boolean) => `edge:${number}` | undefined;
|
|
382
|
+
replaceConnection: (edgeId: EdgeId, next: import("../../types").EdgeData, commitNow?: boolean) => void;
|
|
282
383
|
disconnectEdge: (edgeId: EdgeId, commitNow?: boolean) => void;
|
|
283
384
|
disconnectInEdges: (nodeId: NodeId, commitNow?: boolean) => void;
|
|
284
385
|
disconnectOutEdges: (nodeId: NodeId, commitNow?: boolean) => void;
|
|
285
386
|
toConfigNodes: () => import("../../types").ConfigNode[];
|
|
286
387
|
toUINodes: () => import("../../types").UINode[];
|
|
388
|
+
toUIGroups: () => import("../../types").UIGroup[];
|
|
389
|
+
toUIData: () => import("../../types").DatakitUIData;
|
|
287
390
|
load: (pluginData: import("../../types").DatakitPluginData, keepHistory?: boolean) => void;
|
|
288
391
|
commit: (tag?: string) => void;
|
|
289
392
|
undo: () => void;
|
|
@@ -293,7 +396,7 @@ declare const provideFlowStore: (options: UseFlowOptions) => {
|
|
|
293
396
|
clear: () => void;
|
|
294
397
|
reset: () => void;
|
|
295
398
|
revert: () => void;
|
|
296
|
-
isValidConnection: (edge: EdgeData) => boolean;
|
|
399
|
+
isValidConnection: (edge: import("../../types").EdgeData) => boolean;
|
|
297
400
|
isValidVueFlowConnection: (conn: {
|
|
298
401
|
source?: string | null;
|
|
299
402
|
sourceHandle?: string | null;
|
|
@@ -306,7 +409,7 @@ declare const provideFlowStore: (options: UseFlowOptions) => {
|
|
|
306
409
|
};
|
|
307
410
|
readonly: boolean | undefined;
|
|
308
411
|
nodes: import("vue").ComputedRef<Node<NodeInstance, any, string>[]>;
|
|
309
|
-
edges: import("vue").ComputedRef<
|
|
412
|
+
edges: import("vue").ComputedRef<FlowEdge[]>;
|
|
310
413
|
selectNode: (nodeId?: NodeId) => Promise<void>;
|
|
311
414
|
autoLayout: (commitNow?: boolean) => void;
|
|
312
415
|
placeToRight: (nodeId: NodeId) => XYPosition;
|
|
@@ -352,6 +455,21 @@ export declare function useFlowStore(): {
|
|
|
352
455
|
target: NodeId;
|
|
353
456
|
targetField?: FieldId | undefined;
|
|
354
457
|
}[];
|
|
458
|
+
groups: {
|
|
459
|
+
id: GroupId;
|
|
460
|
+
ownerId: NodeId;
|
|
461
|
+
branch: import("../../types").BranchName;
|
|
462
|
+
phase: NodePhase;
|
|
463
|
+
memberIds: NodeId[];
|
|
464
|
+
position?: {
|
|
465
|
+
x: number;
|
|
466
|
+
y: number;
|
|
467
|
+
} | undefined;
|
|
468
|
+
dimensions?: {
|
|
469
|
+
width: number;
|
|
470
|
+
height: number;
|
|
471
|
+
} | undefined;
|
|
472
|
+
}[];
|
|
355
473
|
pendingLayout?: false | "clearHistory" | "keepHistory" | undefined;
|
|
356
474
|
pendingFitView?: boolean | undefined;
|
|
357
475
|
}, import("../../types").EditorState | {
|
|
@@ -388,6 +506,21 @@ export declare function useFlowStore(): {
|
|
|
388
506
|
target: NodeId;
|
|
389
507
|
targetField?: FieldId | undefined;
|
|
390
508
|
}[];
|
|
509
|
+
groups: {
|
|
510
|
+
id: GroupId;
|
|
511
|
+
ownerId: NodeId;
|
|
512
|
+
branch: import("../../types").BranchName;
|
|
513
|
+
phase: NodePhase;
|
|
514
|
+
memberIds: NodeId[];
|
|
515
|
+
position?: {
|
|
516
|
+
x: number;
|
|
517
|
+
y: number;
|
|
518
|
+
} | undefined;
|
|
519
|
+
dimensions?: {
|
|
520
|
+
width: number;
|
|
521
|
+
height: number;
|
|
522
|
+
} | undefined;
|
|
523
|
+
}[];
|
|
391
524
|
pendingLayout?: false | "clearHistory" | "keepHistory" | undefined;
|
|
392
525
|
pendingFitView?: boolean | undefined;
|
|
393
526
|
}>;
|
|
@@ -400,6 +533,7 @@ export declare function useFlowStore(): {
|
|
|
400
533
|
nodeMapByName: import("vue").ComputedRef<Map<"request" | "response" | "vault" | "service_request" | "service_response" | (string & import("zod").$brand<"ConfigNodeName">), NodeInstance>>;
|
|
401
534
|
edgeMapById: import("vue").ComputedRef<Map<`edge:${number}`, EdgeInstance>>;
|
|
402
535
|
edgeIdMapByNodeId: import("vue").ComputedRef<Map<`node:${number}`, Set<`edge:${number}`>>>;
|
|
536
|
+
groupMapById: import("vue").ComputedRef<Map<`node:${number}:then` | `node:${number}:else`, import("../../types").GroupInstance>>;
|
|
403
537
|
getNodeById: (id: NodeId) => NodeInstance | undefined;
|
|
404
538
|
getNodeByName: (name: import("../../types").NodeName) => NodeInstance | undefined;
|
|
405
539
|
getEdgeById: (id: EdgeId) => EdgeInstance | undefined;
|
|
@@ -414,18 +548,38 @@ export declare function useFlowStore(): {
|
|
|
414
548
|
removeNode: (nodeId: NodeId, commitNow?: boolean) => void;
|
|
415
549
|
renameNode: (nodeId: NodeId, newName: import("../../types").NodeName, commitNow?: boolean, tag?: string) => void;
|
|
416
550
|
moveNode: (nodeId: NodeId, position: XYPosition, commitNow?: boolean) => void;
|
|
551
|
+
moveGroup: (groupId: GroupId, position: XYPosition, commitNow?: boolean) => void;
|
|
552
|
+
setGroupLayout: (groupId: GroupId, layout: {
|
|
553
|
+
position: XYPosition;
|
|
554
|
+
dimensions: import("@vue-flow/core").Dimensions;
|
|
555
|
+
}, commitNow?: boolean) => boolean;
|
|
417
556
|
toggleExpanded: (nodeId: NodeId, io: "input" | "output", value?: boolean, commitNow?: boolean, tag?: string) => void;
|
|
418
557
|
replaceConfig: (nodeId: NodeId, next: Record<string, unknown>, commitNow?: boolean, tag?: string) => void;
|
|
558
|
+
branchGroups: {
|
|
559
|
+
setMembers: (ownerId: NodeId, branch: import("../../types").BranchName, members: readonly NodeId[], options?: import("./branch-group-manager").CommitOptions) => boolean;
|
|
560
|
+
prepareMembers: (ownerId: NodeId, branch: import("../../types").BranchName, candidates: readonly NodeId[]) => NodeId[];
|
|
561
|
+
addMember: (ownerId: NodeId, branch: import("../../types").BranchName, memberId: NodeId, options?: import("./branch-group-manager").CommitOptions) => boolean;
|
|
562
|
+
dropTarget: (targetId: NodeId) => void;
|
|
563
|
+
clear: (ownerId: NodeId) => void;
|
|
564
|
+
getMembers: (ownerId: NodeId, branch: import("../../types").BranchName) => NodeId[];
|
|
565
|
+
findMembership: (memberId: NodeId) => {
|
|
566
|
+
ownerId: NodeId;
|
|
567
|
+
branch: import("../../types").BranchName;
|
|
568
|
+
} | undefined;
|
|
569
|
+
wouldCreateCycle: (ownerId: NodeId, memberId: NodeId) => boolean;
|
|
570
|
+
};
|
|
419
571
|
addField: (nodeId: NodeId, io: "input" | "output", name: import("../../types").FieldName, commitNow?: boolean) => void;
|
|
420
572
|
renameField: (nodeId: NodeId, fieldId: FieldId, newName: import("../../types").FieldName, commitNow?: boolean) => void;
|
|
421
573
|
removeField: (nodeId: NodeId, fieldId: FieldId, cascade?: boolean, commitNow?: boolean) => void;
|
|
422
|
-
connectEdge: (payload: EdgeData, commitNow?: boolean) => `edge:${number}` | undefined;
|
|
423
|
-
replaceConnection: (edgeId: EdgeId, next: EdgeData, commitNow?: boolean) => void;
|
|
574
|
+
connectEdge: (payload: import("../../types").EdgeData, commitNow?: boolean) => `edge:${number}` | undefined;
|
|
575
|
+
replaceConnection: (edgeId: EdgeId, next: import("../../types").EdgeData, commitNow?: boolean) => void;
|
|
424
576
|
disconnectEdge: (edgeId: EdgeId, commitNow?: boolean) => void;
|
|
425
577
|
disconnectInEdges: (nodeId: NodeId, commitNow?: boolean) => void;
|
|
426
578
|
disconnectOutEdges: (nodeId: NodeId, commitNow?: boolean) => void;
|
|
427
579
|
toConfigNodes: () => import("../../types").ConfigNode[];
|
|
428
580
|
toUINodes: () => import("../../types").UINode[];
|
|
581
|
+
toUIGroups: () => import("../../types").UIGroup[];
|
|
582
|
+
toUIData: () => import("../../types").DatakitUIData;
|
|
429
583
|
load: (pluginData: import("../../types").DatakitPluginData, keepHistory?: boolean) => void;
|
|
430
584
|
commit: (tag?: string) => void;
|
|
431
585
|
undo: () => void;
|
|
@@ -435,7 +589,7 @@ export declare function useFlowStore(): {
|
|
|
435
589
|
clear: () => void;
|
|
436
590
|
reset: () => void;
|
|
437
591
|
revert: () => void;
|
|
438
|
-
isValidConnection: (edge: EdgeData) => boolean;
|
|
592
|
+
isValidConnection: (edge: import("../../types").EdgeData) => boolean;
|
|
439
593
|
isValidVueFlowConnection: (conn: {
|
|
440
594
|
source?: string | null;
|
|
441
595
|
sourceHandle?: string | null;
|
|
@@ -448,7 +602,7 @@ export declare function useFlowStore(): {
|
|
|
448
602
|
};
|
|
449
603
|
readonly: boolean | undefined;
|
|
450
604
|
nodes: import("vue").ComputedRef<Node<NodeInstance, any, string>[]>;
|
|
451
|
-
edges: import("vue").ComputedRef<
|
|
605
|
+
edges: import("vue").ComputedRef<FlowEdge[]>;
|
|
452
606
|
selectNode: (nodeId?: NodeId) => Promise<void>;
|
|
453
607
|
autoLayout: (commitNow?: boolean) => void;
|
|
454
608
|
placeToRight: (nodeId: NodeId) => XYPosition;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flow.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/free-form/Datakit/flow-editor/store/flow.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAc,
|
|
1
|
+
{"version":3,"file":"flow.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/free-form/Datakit/flow-editor/store/flow.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAc,aAAa,EAAE,IAAI,EAA6B,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAC5G,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAA;AAEpD,OAAO,KAAK,EACV,MAAM,EACN,YAAY,EACZ,OAAO,EACP,OAAO,EACP,MAAM,EACN,YAAY,EACZ,SAAS,EACV,MAAM,aAAa,CAAA;AAIpB,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AA8G3C,MAAM,WAAW,aAAa;IAC5B;;;OAGG;IACH,QAAQ,CAAC,EAAE;QACT,KAAK,EAAE,gBAAgB,CAAC,MAAM,CAAC,CAAA;QAC/B,MAAM,EAAE,gBAAgB,CAAC,MAAM,CAAC,CAAA;KACjC,CAAA;IAED;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,CAAA;IAEhB;;;;OAIG;IACH,IAAI,CAAC,EAAE;QACL,KAAK,CAAC,EAAE,MAAM,CAAA;QACd,KAAK,CAAC,EAAE,MAAM,CAAA;QACd,KAAK,CAAC,EAAE,MAAM,CAAA;KACf,CAAA;CACF;AAED,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,SAAS,CAAA;IAChB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,aAAa,EAAE,aAAa,CAAA;IAC5B,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB;AAED,QAAA,MAAO,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAeO,CAAC;wBACZ,CAAC;kBACf,CAAC;wBAAgC,CAAC;;;;;;;;;0BAypBA,MAAM;;2BAiBX,MAAM,KAAG,UAAU;mCAsCX,MAAM;;+BAlEV,OAAO,CAAC,aAAa,CAAC;GA/pBnC,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAef,CAAC;wBACZ,CAAC;kBACf,CAAC;wBAAgC,CAAC;;;;;;;;;0BAypBA,MAAM;;2BAiBX,MAAM,KAAG,UAAU;mCAsCX,MAAM;;+BAlEV,OAAO,CAAC,aAAa,CAAC;aA0H3D,CAAA;AAED,OAAO,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,CAAA;AAEjD,wBAAgB,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBA9wBE,CAAC;wBACZ,CAAC;kBACf,CAAC;wBAAgC,CAAC;;;;;;;;;0BAypBA,MAAM;;2BAiBX,MAAM,KAAG,UAAU;mCAsCX,MAAM;;+BAlEV,OAAO,CAAC,aAAa,CAAC;EAoI3D"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { EdgeInstance, GroupInstance, NodeId } from '../../types';
|
|
2
|
+
export type SimpleEdge = {
|
|
3
|
+
source: NodeId;
|
|
4
|
+
target: NodeId;
|
|
5
|
+
};
|
|
6
|
+
export declare function getDataEdges(edges: readonly EdgeInstance[]): SimpleEdge[];
|
|
7
|
+
export declare function getBranchMembershipEdges(groups: readonly GroupInstance[]): SimpleEdge[];
|
|
8
|
+
export declare function getCombinedEdges(edges: readonly EdgeInstance[], groups: readonly GroupInstance[]): SimpleEdge[];
|
|
9
|
+
export declare function buildAdjacency(edges: readonly SimpleEdge[], extra?: SimpleEdge | null): Map<`node:${number}`, `node:${number}`[]>;
|
|
10
|
+
export declare function hasCycle(graph: ReadonlyMap<NodeId, readonly NodeId[]>): boolean;
|
|
11
|
+
//# sourceMappingURL=graph.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"graph.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/free-form/Datakit/flow-editor/store/graph.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,YAAY,EACZ,aAAa,EACb,MAAM,EACP,MAAM,aAAa,CAAA;AAEpB,MAAM,MAAM,UAAU,GAAG;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAA;AAE3D,wBAAgB,YAAY,CAAC,KAAK,EAAE,SAAS,YAAY,EAAE,GAAG,UAAU,EAAE,CAEzE;AAED,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,SAAS,aAAa,EAAE,GAAG,UAAU,EAAE,CAQvF;AAED,wBAAgB,gBAAgB,CAC9B,KAAK,EAAE,SAAS,YAAY,EAAE,EAC9B,MAAM,EAAE,SAAS,aAAa,EAAE,GAC/B,UAAU,EAAE,CAKd;AAED,wBAAgB,cAAc,CAC5B,KAAK,EAAE,SAAS,UAAU,EAAE,EAC5B,KAAK,CAAC,EAAE,UAAU,GAAG,IAAI,6CAiB1B;AAED,wBAAgB,QAAQ,CAAC,KAAK,EAAE,WAAW,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC,GAAG,OAAO,CAwB/E"}
|
|
@@ -1,8 +1,20 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Dimensions, XYPosition } from '@vue-flow/core';
|
|
2
|
+
import type { EdgeId, FieldId, FieldName, NodePhase, ImplicitNodeName, NodeInstance, NodeField, NodeId, NodeName, NodeType, UINode, ConfigNodeType, ConfigNodeName, NameConnection, IdConnection, GroupId, GroupName, GroupInstance } from '../../types';
|
|
3
|
+
import type { BranchName } from '../../schema/strict';
|
|
2
4
|
/** Deep clone for snapshots and immutable returns. */
|
|
3
5
|
export declare function clone<T>(value: T): T;
|
|
6
|
+
/**
|
|
7
|
+
* Check if two arrays contain the same elements, ignoring order.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* setsEqual([1, 2, 3], [3, 2, 1]) // true
|
|
11
|
+
* setsEqual([1, 2], [1, 2, 3]) // false
|
|
12
|
+
*/
|
|
13
|
+
export declare function setsEqual<T>(a: readonly T[], b: readonly T[]): boolean;
|
|
4
14
|
/** Generate a unique runtime id. */
|
|
5
|
-
export declare function createId
|
|
15
|
+
export declare function createId(type: 'node'): NodeId;
|
|
16
|
+
export declare function createId(type: 'edge'): EdgeId;
|
|
17
|
+
export declare function createId(type: 'field'): FieldId;
|
|
6
18
|
/** Parse "NODE" or "NODE.FIELD". */
|
|
7
19
|
export declare function parseNameConnection(nameConnection: NameConnection): {
|
|
8
20
|
nodeName: NodeName;
|
|
@@ -18,6 +30,7 @@ export declare function getFieldsFromMeta(type: NodeType): {
|
|
|
18
30
|
input: FieldName[];
|
|
19
31
|
output: FieldName[];
|
|
20
32
|
};
|
|
33
|
+
export declare function getBranchesFromMeta(type: NodeType): BranchName[];
|
|
21
34
|
/** Build NodeField array from names. */
|
|
22
35
|
export declare function toFieldArray(names?: FieldName[]): NodeField[];
|
|
23
36
|
/** Find a field by visible name. */
|
|
@@ -33,4 +46,18 @@ export declare const IMPLICIT_NODE_NAMES: ImplicitNodeName[];
|
|
|
33
46
|
export declare function makeDefaultImplicitUINode(name: ImplicitNodeName): UINode;
|
|
34
47
|
/** Generate a unique node name when user doesn’t supply one. */
|
|
35
48
|
export declare function generateNodeName(prefixOrType: ConfigNodeType | string, nodeNames: ReadonlySet<NodeName>): ConfigNodeName;
|
|
49
|
+
export declare function makeGroupId(nodeId: NodeId, branch: BranchName): GroupId;
|
|
50
|
+
export declare function parseGroupId(groupId: GroupId): {
|
|
51
|
+
nodeId: NodeId;
|
|
52
|
+
branch: BranchName;
|
|
53
|
+
};
|
|
54
|
+
export declare function makeGroupName(nodeName: NodeName, branch: BranchName): GroupName;
|
|
55
|
+
export declare function parseGroupName(name: GroupName): {
|
|
56
|
+
nodeName: NodeName;
|
|
57
|
+
branch: BranchName;
|
|
58
|
+
};
|
|
59
|
+
export declare function toGroupInstance(nodeId: NodeId, branch: BranchName, phase: NodePhase, memberIds: NodeId[], layout?: {
|
|
60
|
+
position?: XYPosition;
|
|
61
|
+
dimensions?: Dimensions;
|
|
62
|
+
}): GroupInstance;
|
|
36
63
|
//# sourceMappingURL=helpers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/free-form/Datakit/flow-editor/store/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,MAAM,EACN,OAAO,EACP,SAAS,
|
|
1
|
+
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/free-form/Datakit/flow-editor/store/helpers.ts"],"names":[],"mappings":"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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"history.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/free-form/Datakit/flow-editor/store/history.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,KAAK,CAAA;AAE9B,KAAK,aAAa,GAAG,QAAQ,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,OAAO,GAAG,QAAQ,CAAA;AAE9E,0EAA0E;AAC1E,wBAAgB,gBAAgB,CAAC,CAAC,EAChC,QAAQ,EAAE,GAAG,CAAC,CAAC,CAAC,EAChB,OAAO,CAAC,EAAE;IACR,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,KAAK,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,CAAA;IACnB,eAAe,CAAC,EAAE,CAAC,MAAM,EAAE,aAAa,EAAE,QAAQ,EAAE,CAAC,KAAK,IAAI,CAAA;CAC/D;;;mBAmCqB,MAAM;;;;;;EA8D7B"}
|
|
1
|
+
{"version":3,"file":"history.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/free-form/Datakit/flow-editor/store/history.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,KAAK,CAAA;AAE9B,KAAK,aAAa,GAAG,QAAQ,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,OAAO,GAAG,QAAQ,CAAA;AAE9E,0EAA0E;AAC1E,wBAAgB,gBAAgB,CAAC,CAAC,EAChC,QAAQ,EAAE,GAAG,CAAC,CAAC,CAAC,EAChB,OAAO,CAAC,EAAE;IACR,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,KAAK,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,CAAA;IACnB,eAAe,CAAC,EAAE,CAAC,MAAM,EAAE,aAAa,EAAE,QAAQ,EAAE,CAAC,KAAK,IAAI,CAAA;CAC/D;;;mBAmCqB,MAAM;;;;;;EA8D7B;AAED,MAAM,MAAM,aAAa,CAAC,CAAC,IAAI,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/free-form/Datakit/flow-editor/store/init.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,UAAU,EACV,UAAU,EACV,iBAAiB,EAEjB,WAAW,EAGX,uBAAuB,
|
|
1
|
+
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/free-form/Datakit/flow-editor/store/init.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,UAAU,EACV,UAAU,EACV,iBAAiB,EAEjB,WAAW,EAGX,uBAAuB,EAEvB,YAAY,EAGZ,QAAQ,EACR,MAAM,EAEP,MAAM,aAAa,CAAA;AAiBpB;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAC7B,UAAU,EAAE,iBAAiB,EAC7B,sBAAsB,CAAC,EAAE,OAAO,GAC/B,WAAW,CAkMb;AAED,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,uBAAuB,GAAG,YAAY,CAmB/E;AASD,wBAAgB,iBAAiB,CAAC,EAChC,IAAI,EACJ,UAAU,EACV,MAAM,EACN,UAAU,GACX,EAAE;IACD,IAAI,EAAE,QAAQ,CAAA;IACd,UAAU,CAAC,EAAE,UAAU,CAAA;IACvB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,UAAU,EAAE,iBAAiB,CAAA;CAC9B,GAAG,YAAY,CAmBf;AAED,oCAAoC;AACpC,wBAAgB,aAAa,CAAC,UAAU,EAAE,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAI7E;AAED,wBAAgB,gCAAgC,CAC9C,UAAU,EAAE,UAAU,EACtB,GAAG,EAAE,UAAU,EAAE,GAChB,IAAI,CAgDN"}
|