@blueking/bkflow-canvas-editor 1.1.0-beta.8 → 1.2.0-beta.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/README.md +14 -8
- package/dist/advanced.cjs.js +1 -1
- package/dist/advanced.d.ts +64 -35
- package/dist/advanced.esm.js +5 -3
- package/dist/context-B9wWQx6k.cjs +1 -0
- package/dist/{composable-Cf47ka9M.js → context-CVSZiSc9.js} +402 -350
- package/dist/index-Ac8oJo2D.js +512 -0
- package/dist/index-B0bs5G6n.cjs +1 -0
- package/dist/index-BUBxGOMp.cjs +74 -0
- package/dist/index-C5XXJX1_.cjs +1 -0
- package/dist/index-D_PNC9EL.cjs +1 -0
- package/dist/index-Ddt7hVPG.js +162 -0
- package/dist/index-FsDBMpW4.js +50941 -0
- package/dist/index-GVGs8lwh.js +234 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.d.ts +258 -55
- package/dist/index.esm.js +28 -28
- package/dist/style.css +1 -1
- package/package.json +2 -3
- package/dist/composable-YlUVct40.cjs +0 -1
- package/dist/index-BL3fS0Jt.js +0 -159
- package/dist/index-CC5gBhZo.cjs +0 -70
- package/dist/index-Cr1IApLI.cjs +0 -1
- package/dist/index-D2oS_A8g.cjs +0 -1
- package/dist/index-DhEdmFv2.js +0 -46969
- package/dist/index-Z3twZd2j.js +0 -502
- package/dist/index-aTwexVNR.js +0 -178
- package/dist/index-j1ZMdQyf.cjs +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as vue from 'vue';
|
|
2
|
-
import { ComputedRef, Ref } from 'vue';
|
|
2
|
+
import { Component, ComputedRef, Ref } from 'vue';
|
|
3
3
|
import { AxiosInstance, AxiosRequestConfig } from 'axios';
|
|
4
4
|
import * as _blueking_flow_canvas from '@blueking/flow-canvas';
|
|
5
5
|
import { ZoomToFitOptions, CanvasUiEvent, QuickAddConfig, CanvasSchema, FlowModel, FlowNodeModel, NodeActionsConfig, ConnectionValidator, CanvasPlugin, CanvasToolbarItem, CommandEnvelope } from '@blueking/flow-canvas';
|
|
@@ -17,12 +17,7 @@ interface FlowApiConfig {
|
|
|
17
17
|
/** CSRF cookie 名称(可选,用于创建新的 axios 实例时设置 xsrfCookieName) */
|
|
18
18
|
xsrfCookieName?: string;
|
|
19
19
|
/** 作用域数据(必需,由外部传入) */
|
|
20
|
-
scopeData:
|
|
21
|
-
scope_type: string;
|
|
22
|
-
scope_value: number;
|
|
23
|
-
/** 业务方传入的空间 ID,调试接口专用,语义独立于 scope_value */
|
|
24
|
-
space_id: number;
|
|
25
|
-
};
|
|
20
|
+
scopeData: ScopeData;
|
|
26
21
|
/**
|
|
27
22
|
* 用户查询 API 地址(可选)
|
|
28
23
|
* @deprecated 请改用 FlowEdit/FlowView 顶层组件的 `memberSelectorConfig.fetchUserApi`。
|
|
@@ -32,6 +27,12 @@ interface FlowApiConfig {
|
|
|
32
27
|
/** 是否启用第三方插件(可选,默认为 true) */
|
|
33
28
|
enableThirdPlugin?: boolean;
|
|
34
29
|
}
|
|
30
|
+
interface ScopeData {
|
|
31
|
+
scope_type: string;
|
|
32
|
+
scope_value: number;
|
|
33
|
+
/** 业务方传入的空间 ID,语义独立于 scope_value。 */
|
|
34
|
+
space_id: number;
|
|
35
|
+
}
|
|
35
36
|
|
|
36
37
|
type __VLS_Slots$7 = {
|
|
37
38
|
header?: () => any;
|
|
@@ -111,6 +112,11 @@ interface NodeExecutionState {
|
|
|
111
112
|
actions?: ExecutionNodeAction[];
|
|
112
113
|
/** 兼容旧版后端直接透出的动作数组字段 */
|
|
113
114
|
action_list?: ExecutionNodeAction[];
|
|
115
|
+
/**
|
|
116
|
+
* 条件网关命中的出边 flow_id。
|
|
117
|
+
* 有值时执行态连线优先按它着色,不要求目标节点已经执行(网关单步不会跑下游)。
|
|
118
|
+
*/
|
|
119
|
+
selectedFlowIds?: string[];
|
|
114
120
|
}
|
|
115
121
|
type TaskExecutionStates = Record<string, NodeExecutionState>;
|
|
116
122
|
|
|
@@ -697,13 +703,181 @@ interface CustomVariableType {
|
|
|
697
703
|
code: string;
|
|
698
704
|
}
|
|
699
705
|
|
|
706
|
+
/**
|
|
707
|
+
* filter 变量的宿主配置契约与注入。
|
|
708
|
+
*
|
|
709
|
+
* `RetrievalFilterField` 与 `getValues` 的返回结构和宿主
|
|
710
|
+
* `src/components/bk-monitor-retieval-filter/types.d.ts` 里的 `IFilterField`
|
|
711
|
+
* 逐字段一致——依赖包不带 `.d.ts`,宿主已经自己维护了一份,这里刻意同源,
|
|
712
|
+
* 避免出现两套形状相近但不兼容的类型。
|
|
713
|
+
*/
|
|
714
|
+
|
|
715
|
+
/**
|
|
716
|
+
* 关联节点的插件配置摘要。getFields 在节点表单未挂载时要用它自行取维度,
|
|
717
|
+
* 不能依赖「打开过节点配置」留下的内存缓存。
|
|
718
|
+
*/
|
|
719
|
+
interface FilterVariableSourceNodeComponent {
|
|
720
|
+
code?: string;
|
|
721
|
+
api_meta?: {
|
|
722
|
+
id?: string;
|
|
723
|
+
};
|
|
724
|
+
data?: Record<string, {
|
|
725
|
+
value?: unknown;
|
|
726
|
+
}>;
|
|
727
|
+
}
|
|
728
|
+
/** 关联来源。创建时由宿主锁定,用户不能在编辑器里改 */
|
|
729
|
+
interface FilterVariableSourceContext {
|
|
730
|
+
sourceNodeId: string;
|
|
731
|
+
sourceNodeName: string;
|
|
732
|
+
/** 关联表单项稳定 KEY,例如 query_condition */
|
|
733
|
+
sourceFieldKey: string;
|
|
734
|
+
sourceFieldName: string;
|
|
735
|
+
/** 关联节点当前 component,供宿主 getFields 在节点配置未打开时解析 */
|
|
736
|
+
sourceNodeComponent?: FilterVariableSourceNodeComponent;
|
|
737
|
+
}
|
|
738
|
+
interface RetrievalFilterField {
|
|
739
|
+
alias: string;
|
|
740
|
+
name: string;
|
|
741
|
+
type: string;
|
|
742
|
+
isEnableOptions?: boolean;
|
|
743
|
+
methods: Array<{
|
|
744
|
+
alias: string;
|
|
745
|
+
value: string;
|
|
746
|
+
placeholder?: string;
|
|
747
|
+
wildcardValue?: string;
|
|
748
|
+
options?: unknown[];
|
|
749
|
+
}>;
|
|
750
|
+
}
|
|
751
|
+
/**
|
|
752
|
+
* 候选值查询参数。
|
|
753
|
+
*
|
|
754
|
+
* 这是适配器归一化之后的稳定形状:依赖组件内部有四条 `getValueFn` 调用路径,
|
|
755
|
+
* 参数形状互不一致(`search`/`field`/`isInit__` vs `where` + `operator` vs
|
|
756
|
+
* `where` + `method`),禁止把 raw params 直接透给宿主。升级依赖时需重新核对。
|
|
757
|
+
*/
|
|
758
|
+
interface FilterCandidateQuery {
|
|
759
|
+
field?: string;
|
|
760
|
+
keyword?: string;
|
|
761
|
+
limit?: number;
|
|
762
|
+
method?: string;
|
|
763
|
+
/** 通配搜索路径会带 `options.is_wildcard`,宿主据此选择精确或模糊匹配 */
|
|
764
|
+
isWildcard?: boolean;
|
|
765
|
+
}
|
|
766
|
+
interface FilterVariableConfig {
|
|
767
|
+
/**
|
|
768
|
+
* 宿主注入的 **原始** `RetrievalFilter` 组件,即
|
|
769
|
+
* `import { RetrievalFilter } from '@blueking/monitor-vue3-components'`。
|
|
770
|
+
*
|
|
771
|
+
* 必须是原始组件而不是宿主自己的封装(例如 bk-incident 的
|
|
772
|
+
* `BkMonitorRetievalFilter`):封装层 props 是 `filters/fieldList/query`、事件是
|
|
773
|
+
* `change`,与适配器传入的 `fields/where` + `whereChange` 不兼容;且它的
|
|
774
|
+
* `getValueFn` 只透传 `fields`,会丢掉搜索关键词,候选值搜索无法工作。
|
|
775
|
+
*
|
|
776
|
+
* 编辑器不把该依赖列入自身 dependencies,所以拿不到注入就是不可用。
|
|
777
|
+
*/
|
|
778
|
+
retrievalFilterComponent: Component;
|
|
779
|
+
getFields(source: FilterVariableSourceContext): Promise<RetrievalFilterField[]>;
|
|
780
|
+
getValues(source: FilterVariableSourceContext, params: FilterCandidateQuery): Promise<{
|
|
781
|
+
count: number;
|
|
782
|
+
list: Array<{
|
|
783
|
+
id: string;
|
|
784
|
+
name: string;
|
|
785
|
+
}>;
|
|
786
|
+
}>;
|
|
787
|
+
/** 传给依赖组件的 `zIndex`,用于让候选值弹层盖在侧滑之上 */
|
|
788
|
+
popupZIndex?: number;
|
|
789
|
+
loadDelay?: number;
|
|
790
|
+
limit?: number;
|
|
791
|
+
}
|
|
792
|
+
/**
|
|
793
|
+
* 在顶层组件中提供 FilterVariableConfig。
|
|
794
|
+
*
|
|
795
|
+
* 与 `provideMemberSelectorConfig` 一致:`config` 为 undefined 时不调用 provide,
|
|
796
|
+
* 避免遮蔽父级已提供的配置。
|
|
797
|
+
*/
|
|
798
|
+
declare function provideFilterVariableConfig(config?: FilterVariableConfig): void;
|
|
799
|
+
|
|
800
|
+
/**
|
|
801
|
+
* filter(复合条件选择)变量的领域逻辑。
|
|
802
|
+
*
|
|
803
|
+
* `Variable.value` 直接就是提交给后端的条件数组 `{ key, operator, value, options }[]`,
|
|
804
|
+
* 不引入编辑态中间形状:编辑器与依赖组件之间只有一处命名差异(`operator` ⇄ `method`),
|
|
805
|
+
* 那一次转换收在适配器边界上(见 retrieval-filter-adapter/index.vue)。
|
|
806
|
+
*
|
|
807
|
+
* 关联标识复用 `Variable.source_info`(C-09),不另立字段。既有的节点删除清理逻辑
|
|
808
|
+
* 原先只放行 component_inputs / component_outputs,已显式把 filter 一并纳入
|
|
809
|
+
* (canvas-adapter/plugin/index.ts 的节点删除,以及 node-config-sideslider 保存时
|
|
810
|
+
* 对照节点数据里是否还引用 `${var}`)。节点删掉或表单里取消引用后不清理,
|
|
811
|
+
* 就会留下用户无法修复的孤儿变量——关联信息是只读的。
|
|
812
|
+
*/
|
|
813
|
+
|
|
814
|
+
/**
|
|
815
|
+
* 条件值标量。
|
|
816
|
+
*
|
|
817
|
+
* 必须允许 number:依赖协议里 `value` 是 `number[] | string[]`,整型字段的候选值
|
|
818
|
+
* 就是数字,统一转成字符串会改变提交给后端的类型。
|
|
819
|
+
*/
|
|
820
|
+
type FilterConditionValue = string | number;
|
|
821
|
+
/**
|
|
822
|
+
* 单条条件的附加选项。
|
|
823
|
+
*
|
|
824
|
+
* `is_wildcard`(通配匹配)与 `group_relation`(多值关系)由依赖组件在运算符的
|
|
825
|
+
* `methods[].options` 里声明、由用户勾选,并原样带在条件上。丢掉它等于静默改写
|
|
826
|
+
* 用户的选择,所以读写两侧都必须透传,也不做已知字段白名单。
|
|
827
|
+
*/
|
|
828
|
+
interface FilterConditionOptions {
|
|
829
|
+
is_wildcard?: boolean;
|
|
830
|
+
group_relation?: boolean;
|
|
831
|
+
[key: string]: unknown;
|
|
832
|
+
}
|
|
833
|
+
/** 单条条件,即 Variable.value 的元素。形状对齐宿主既有协议 */
|
|
834
|
+
interface FilterWhereItem {
|
|
835
|
+
key: string;
|
|
836
|
+
operator: string;
|
|
837
|
+
value: FilterConditionValue[];
|
|
838
|
+
options?: FilterConditionOptions;
|
|
839
|
+
}
|
|
840
|
+
type FilterWhereValue = FilterWhereItem[];
|
|
841
|
+
|
|
842
|
+
/**
|
|
843
|
+
* 全局变量受控创建的对外契约与守卫。
|
|
844
|
+
*
|
|
845
|
+
* filter 变量不能从普通「新建变量」入口创建——它必须携带关联节点与关联字段,
|
|
846
|
+
* 所以对外只暴露这一个方法,由宿主在节点表单里发起。
|
|
847
|
+
*/
|
|
848
|
+
|
|
849
|
+
interface OpenFilterVariableCreateRequest {
|
|
850
|
+
defaultCustomType: 'filter';
|
|
851
|
+
/** 关联来源,filter 场景必填 */
|
|
852
|
+
filterContext: FilterVariableSourceContext;
|
|
853
|
+
keyword?: string;
|
|
854
|
+
/**
|
|
855
|
+
* 可选:把宿主表单里已配好的真实维度条件带进来作为默认值。
|
|
856
|
+
* 已 hook 的 `${var}` 占位会被丢掉,不能当默认条件。
|
|
857
|
+
*/
|
|
858
|
+
initialValue?: FilterWhereValue;
|
|
859
|
+
onCreated?: (variable: Variable) => void;
|
|
860
|
+
}
|
|
861
|
+
interface OpenStandardVariableCreateRequest {
|
|
862
|
+
defaultCustomType?: string;
|
|
863
|
+
filterContext?: never;
|
|
864
|
+
keyword?: string;
|
|
865
|
+
cursorIndex?: number;
|
|
866
|
+
onCreated?: (variable: Variable) => void;
|
|
867
|
+
}
|
|
868
|
+
type OpenGlobalVariableCreateRequest = OpenFilterVariableCreateRequest | OpenStandardVariableCreateRequest;
|
|
869
|
+
|
|
700
870
|
/** 画布视口相关方法,供 FlowView / FlowEdit 对外透传 */
|
|
701
871
|
interface CanvasViewportExpose {
|
|
702
872
|
zoomToFit: (options?: ZoomToFitOptions) => void;
|
|
703
873
|
centerContent: () => void;
|
|
704
874
|
getZoom: () => number;
|
|
705
875
|
}
|
|
706
|
-
|
|
876
|
+
/** 受控创建能力。返回 false 表示未通过同步守卫,开发态会打印具体原因 */
|
|
877
|
+
interface GlobalVariableCreateExpose {
|
|
878
|
+
openGlobalVariableCreate: (request?: OpenGlobalVariableCreateRequest) => boolean;
|
|
879
|
+
}
|
|
880
|
+
interface FlowEditExpose extends CanvasViewportExpose, GlobalVariableCreateExpose {
|
|
707
881
|
isFlowEdited: boolean;
|
|
708
882
|
updateNodeInputParams: (inputParams: Record<string, PluginInputDataItem>) => void;
|
|
709
883
|
openGlobalVariables: () => void;
|
|
@@ -711,7 +885,7 @@ interface FlowEditExpose extends CanvasViewportExpose {
|
|
|
711
885
|
interface FlowViewExpose extends CanvasViewportExpose {
|
|
712
886
|
}
|
|
713
887
|
/** FlowDetail 统一详情页对外暴露(设计 §7.1) */
|
|
714
|
-
interface FlowDetailExpose extends CanvasViewportExpose {
|
|
888
|
+
interface FlowDetailExpose extends CanvasViewportExpose, GlobalVariableCreateExpose {
|
|
715
889
|
isFlowEdited: boolean;
|
|
716
890
|
updateNodeInputParams: (inputParams: Record<string, PluginInputDataItem>) => void;
|
|
717
891
|
openGlobalVariables: () => void;
|
|
@@ -720,13 +894,12 @@ interface FlowDetailExpose extends CanvasViewportExpose {
|
|
|
720
894
|
}
|
|
721
895
|
|
|
722
896
|
type DebugContextStatus = 'idle' | 'running' | 'terminating';
|
|
723
|
-
type DebugNodeStatus = 'not_run' | 'running' | 'waiting' | 'paused' | 'finished' | 'failed' | 'suspended' | 'skipped';
|
|
897
|
+
type DebugNodeStatus = 'not_run' | 'running' | 'waiting' | 'paused' | 'finished' | 'failed' | 'revoked' | 'suspended' | 'skipped';
|
|
724
898
|
type DebugExecutionMode = 'real' | 'mock';
|
|
725
899
|
interface DebugMissingVar {
|
|
726
900
|
key: string;
|
|
727
901
|
source_node_id: string | null;
|
|
728
902
|
}
|
|
729
|
-
type DebugRunMode = DebugExecutionMode | 'mixed';
|
|
730
903
|
type DebugRunType = 'global' | 'step';
|
|
731
904
|
type DebugRunStatus = 'not_run' | 'running' | 'waiting' | 'paused' | 'terminating' | 'finished' | 'failed' | 'revoked';
|
|
732
905
|
/** 运行级 / 节点级错误详情(last_error_detail、nodes[].error_detail)。 */
|
|
@@ -743,6 +916,15 @@ interface DebugErrorDetail {
|
|
|
743
916
|
failures?: DebugErrorFailure[];
|
|
744
917
|
[key: string]: unknown;
|
|
745
918
|
}
|
|
919
|
+
/** 条件网关分支求值结果(`debug_context.nodes[].condition_results`)。 */
|
|
920
|
+
interface DebugConditionResult {
|
|
921
|
+
flow_id: string;
|
|
922
|
+
name?: string;
|
|
923
|
+
expression?: string;
|
|
924
|
+
resolved_expression?: string;
|
|
925
|
+
matched?: boolean;
|
|
926
|
+
[key: string]: unknown;
|
|
927
|
+
}
|
|
746
928
|
interface DebugContextNode {
|
|
747
929
|
node_id: string;
|
|
748
930
|
node_type: string;
|
|
@@ -751,6 +933,10 @@ interface DebugContextNode {
|
|
|
751
933
|
can_step: boolean;
|
|
752
934
|
missing_vars: DebugMissingVar[];
|
|
753
935
|
waiting_reason?: string | null;
|
|
936
|
+
/** 是否支持单步调试;并行/汇聚网关为 false,仅用于展示全局调试状态。 */
|
|
937
|
+
supports_step?: boolean;
|
|
938
|
+
/** 是否支持 Mock;全部网关为 false。 */
|
|
939
|
+
supports_mock?: boolean;
|
|
754
940
|
mock_result?: 'success' | 'fail' | null;
|
|
755
941
|
error_detail?: DebugErrorDetail | string | null;
|
|
756
942
|
duration_ms?: number | null;
|
|
@@ -762,6 +948,10 @@ interface DebugContextNode {
|
|
|
762
948
|
mock_outputs?: Record<string, unknown> | null;
|
|
763
949
|
mock_error?: string | null;
|
|
764
950
|
outputs?: Record<string, unknown> | null;
|
|
951
|
+
/** 条件网关命中的出边 flow_id;画布用它把命中连线标绿。 */
|
|
952
|
+
selected_flow_ids?: string[];
|
|
953
|
+
/** 条件网关每个分支的表达式与命中结果。 */
|
|
954
|
+
condition_results?: DebugConditionResult[];
|
|
765
955
|
}
|
|
766
956
|
/**
|
|
767
957
|
* /debug_context/ 顶层结构。
|
|
@@ -800,28 +990,10 @@ interface DebugInputSchema {
|
|
|
800
990
|
constants?: Record<string, unknown>;
|
|
801
991
|
[key: string]: unknown;
|
|
802
992
|
}
|
|
803
|
-
interface DebugHistoryRun {
|
|
804
|
-
task_id?: number | string | null;
|
|
805
|
-
operator?: string;
|
|
806
|
-
started_at?: string;
|
|
807
|
-
finished_at?: string;
|
|
808
|
-
status?: DebugRunStatus | string;
|
|
809
|
-
run_type?: DebugRunType;
|
|
810
|
-
run_mode?: DebugRunMode;
|
|
811
|
-
[key: string]: unknown;
|
|
812
|
-
}
|
|
813
|
-
interface DebugHistory {
|
|
814
|
-
runs?: DebugHistoryRun[];
|
|
815
|
-
[key: string]: unknown;
|
|
816
|
-
}
|
|
817
993
|
interface DebugResetImpact {
|
|
818
994
|
reset_node_ids: string[];
|
|
819
995
|
reasons?: Record<string, string>;
|
|
820
996
|
}
|
|
821
|
-
interface DebugGlobalVarsResult {
|
|
822
|
-
global_vars: Record<string, unknown>;
|
|
823
|
-
[key: string]: unknown;
|
|
824
|
-
}
|
|
825
997
|
interface UpdateNodeDebugMockResult {
|
|
826
998
|
node_id: string;
|
|
827
999
|
execution_mode: DebugExecutionMode;
|
|
@@ -835,6 +1007,8 @@ interface RunNodeDebugStepResult {
|
|
|
835
1007
|
error_detail?: unknown;
|
|
836
1008
|
updated_global_vars?: Record<string, unknown>;
|
|
837
1009
|
log_ref?: DebugContextNode['log_ref'];
|
|
1010
|
+
selected_flow_ids?: string[];
|
|
1011
|
+
condition_results?: DebugConditionResult[];
|
|
838
1012
|
[key: string]: unknown;
|
|
839
1013
|
}
|
|
840
1014
|
interface RunGlobalDebugResult {
|
|
@@ -842,19 +1016,22 @@ interface RunGlobalDebugResult {
|
|
|
842
1016
|
status: DebugContextStatus;
|
|
843
1017
|
[key: string]: unknown;
|
|
844
1018
|
}
|
|
1019
|
+
/**
|
|
1020
|
+
* /debug_terminate/ 返回。
|
|
1021
|
+
*
|
|
1022
|
+
* 全局终止返回 `terminating`,需要继续轮询 /debug_context/ 直到 idle + last_run_status=revoked;
|
|
1023
|
+
* 单节点终止直接返回 `idle`,并用 reset_node_ids 告知哪些节点被恢复为「未调试」。
|
|
1024
|
+
*/
|
|
845
1025
|
interface TerminateDebugResult {
|
|
846
1026
|
status?: DebugContextStatus;
|
|
1027
|
+
/** 单节点终止:被恢复为 not_run 的节点,本地需同步清空输入、输出、耗时、错误与日志。 */
|
|
1028
|
+
reset_node_ids?: string[];
|
|
847
1029
|
[key: string]: unknown;
|
|
848
1030
|
}
|
|
849
1031
|
interface DebugResetResult {
|
|
850
1032
|
reset_node_ids?: string[];
|
|
851
1033
|
[key: string]: unknown;
|
|
852
1034
|
}
|
|
853
|
-
interface UpdateDebugContextVariableParams {
|
|
854
|
-
templateId: string | number;
|
|
855
|
-
key: string;
|
|
856
|
-
value: unknown;
|
|
857
|
-
}
|
|
858
1035
|
interface UpdateNodeDebugMockParams {
|
|
859
1036
|
templateId: string | number;
|
|
860
1037
|
nodeId: string;
|
|
@@ -887,9 +1064,7 @@ interface ResetDebugResultParams {
|
|
|
887
1064
|
interface DebugApiServices {
|
|
888
1065
|
fetchDebugContext(templateId: string | number): Promise<DebugContext>;
|
|
889
1066
|
fetchDebugInputSchema(templateId: string | number): Promise<DebugInputSchema>;
|
|
890
|
-
fetchDebugHistory(templateId: string | number): Promise<DebugHistory>;
|
|
891
1067
|
fetchDebugResetImpact(templateId: string | number): Promise<DebugResetImpact>;
|
|
892
|
-
updateDebugContextVariable(params: UpdateDebugContextVariableParams): Promise<DebugGlobalVarsResult>;
|
|
893
1068
|
updateNodeDebugMock(params: UpdateNodeDebugMockParams): Promise<UpdateNodeDebugMockResult>;
|
|
894
1069
|
runNodeDebugStep(params: RunNodeDebugStepParams): Promise<RunNodeDebugStepResult>;
|
|
895
1070
|
runGlobalDebug(params: RunGlobalDebugParams): Promise<RunGlobalDebugResult>;
|
|
@@ -925,6 +1100,7 @@ interface FetchTaskStateParams {
|
|
|
925
1100
|
interface FetchTaskNodeDetailParams {
|
|
926
1101
|
task_id: number | string;
|
|
927
1102
|
node_id: string;
|
|
1103
|
+
component_code?: string;
|
|
928
1104
|
}
|
|
929
1105
|
interface FetchTaskNodeSnapshotParams {
|
|
930
1106
|
task_id: number | string;
|
|
@@ -950,6 +1126,8 @@ interface FlowTaskDetail {
|
|
|
950
1126
|
id: number | string;
|
|
951
1127
|
template_id: number;
|
|
952
1128
|
pipeline_tree: PipelineTree;
|
|
1129
|
+
/** 任务已耗时(秒),调试摘要弹层刷新恢复用。 */
|
|
1130
|
+
elapsed_time?: number;
|
|
953
1131
|
[key: string]: unknown;
|
|
954
1132
|
}
|
|
955
1133
|
interface CreateFlowTaskParams {
|
|
@@ -1362,6 +1540,8 @@ type __VLS_Props$4 = {
|
|
|
1362
1540
|
onExecuteSuccess?: (result: FlowTaskExecuteSuccessResult) => void;
|
|
1363
1541
|
bkflowSaasUrl?: string;
|
|
1364
1542
|
memberSelectorConfig?: MemberSelectorConfig;
|
|
1543
|
+
/** 执行时填写 filter 变量条件所需的能力;不传则这类变量退化为只读文本 */
|
|
1544
|
+
filterVariableConfig?: FilterVariableConfig;
|
|
1365
1545
|
};
|
|
1366
1546
|
declare const __VLS_base$4: vue.DefineComponent<__VLS_Props$4, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
1367
1547
|
close: (...args: any[]) => void;
|
|
@@ -1394,6 +1574,12 @@ declare namespace __create_task_vue {
|
|
|
1394
1574
|
};
|
|
1395
1575
|
}
|
|
1396
1576
|
|
|
1577
|
+
interface CreateVariablePayload {
|
|
1578
|
+
keyword?: string;
|
|
1579
|
+
cursorIndex?: number;
|
|
1580
|
+
defaultCustomType?: string;
|
|
1581
|
+
}
|
|
1582
|
+
|
|
1397
1583
|
type __VLS_Slots$3 = {
|
|
1398
1584
|
header?: () => any;
|
|
1399
1585
|
inputParams?: (props: {
|
|
@@ -1432,6 +1618,8 @@ type __VLS_Props$3 = {
|
|
|
1432
1618
|
useCustomDebugConfirm?: boolean;
|
|
1433
1619
|
selectPanelConfig?: SelectPanelConfig;
|
|
1434
1620
|
memberSelectorConfig?: MemberSelectorConfig;
|
|
1621
|
+
/** 复合条件选择(filter)变量的宿主配置;不传则该类型变量不可用,其余功能不受影响 */
|
|
1622
|
+
filterVariableConfig?: FilterVariableConfig;
|
|
1435
1623
|
onSave?: (flowData: FlowTemplate) => void;
|
|
1436
1624
|
onSaveSuccess?: () => void;
|
|
1437
1625
|
onBack?: () => void;
|
|
@@ -1454,6 +1642,7 @@ declare const __VLS_base$3: vue.DefineComponent<__VLS_Props$3, {
|
|
|
1454
1642
|
isFlowEdited: ComputedRef<FlowEditExpose["isFlowEdited"]>;
|
|
1455
1643
|
updateNodeInputParams: FlowEditExpose["updateNodeInputParams"];
|
|
1456
1644
|
openGlobalVariables: FlowEditExpose["openGlobalVariables"];
|
|
1645
|
+
openGlobalVariableCreate: FlowEditExpose["openGlobalVariableCreate"];
|
|
1457
1646
|
zoomToFit: FlowEditExpose["zoomToFit"];
|
|
1458
1647
|
centerContent: FlowEditExpose["centerContent"];
|
|
1459
1648
|
getZoom: FlowEditExpose["getZoom"];
|
|
@@ -1467,10 +1656,7 @@ declare const __VLS_base$3: vue.DefineComponent<__VLS_Props$3, {
|
|
|
1467
1656
|
saveSuccess: () => any;
|
|
1468
1657
|
exitEdit: () => any;
|
|
1469
1658
|
debugBeforeClose: () => any;
|
|
1470
|
-
createVariable: (payload:
|
|
1471
|
-
keyword: string;
|
|
1472
|
-
cursorIndex: number;
|
|
1473
|
-
}) => any;
|
|
1659
|
+
createVariable: (payload: CreateVariablePayload) => any;
|
|
1474
1660
|
}, string, vue.PublicProps, Readonly<__VLS_Props$3> & Readonly<{
|
|
1475
1661
|
onBack?: (() => any) | undefined;
|
|
1476
1662
|
onSave?: ((flowData: FlowTemplate) => any) | undefined;
|
|
@@ -1481,10 +1667,7 @@ declare const __VLS_base$3: vue.DefineComponent<__VLS_Props$3, {
|
|
|
1481
1667
|
onSaveSuccess?: (() => any) | undefined;
|
|
1482
1668
|
onExitEdit?: (() => any) | undefined;
|
|
1483
1669
|
onDebugBeforeClose?: (() => any) | undefined;
|
|
1484
|
-
onCreateVariable?: ((payload:
|
|
1485
|
-
keyword: string;
|
|
1486
|
-
cursorIndex: number;
|
|
1487
|
-
}) => any) | undefined;
|
|
1670
|
+
onCreateVariable?: ((payload: CreateVariablePayload) => any) | undefined;
|
|
1488
1671
|
}>, {
|
|
1489
1672
|
quickAdd: QuickAddConfig;
|
|
1490
1673
|
enableThirdPlugin: boolean;
|
|
@@ -1614,6 +1797,7 @@ declare namespace __view_vue {
|
|
|
1614
1797
|
interface FlowDetailPermissions {
|
|
1615
1798
|
canEdit: boolean;
|
|
1616
1799
|
canDebug: boolean;
|
|
1800
|
+
canExecute: boolean;
|
|
1617
1801
|
}
|
|
1618
1802
|
|
|
1619
1803
|
type __VLS_Slots$1 = {
|
|
@@ -1633,6 +1817,12 @@ type __VLS_Slots$1 = {
|
|
|
1633
1817
|
updateNodeInputParams: (inputParams: Record<string, PluginInputDataItem>) => void;
|
|
1634
1818
|
updateVariableSourceInfo: (variableKey: string, nodeId: string, formKey: string) => void;
|
|
1635
1819
|
}) => any;
|
|
1820
|
+
customFormContent?: (props: {
|
|
1821
|
+
customFormData: Record<string, any>;
|
|
1822
|
+
additionalTaskParams: Record<string, any>;
|
|
1823
|
+
updateCustomFormData: (data: Record<string, any>) => void;
|
|
1824
|
+
updateAdditionalTaskParams: (params: Record<string, any>) => void;
|
|
1825
|
+
}) => any;
|
|
1636
1826
|
};
|
|
1637
1827
|
type __VLS_Props$1 = {
|
|
1638
1828
|
flowId: string;
|
|
@@ -1647,14 +1837,18 @@ type __VLS_Props$1 = {
|
|
|
1647
1837
|
hideTrigger?: boolean;
|
|
1648
1838
|
selectPanelConfig?: SelectPanelConfig;
|
|
1649
1839
|
memberSelectorConfig?: MemberSelectorConfig;
|
|
1840
|
+
/** 复合条件选择(filter)变量的宿主配置;不传则该类型变量不可用,其余功能不受影响 */
|
|
1841
|
+
filterVariableConfig?: FilterVariableConfig;
|
|
1650
1842
|
onSave?: (flowData: FlowTemplate) => void;
|
|
1651
1843
|
onSaveSuccess?: () => void;
|
|
1844
|
+
onExecuteSuccess?: (result: FlowTaskExecuteSuccessResult) => void;
|
|
1652
1845
|
onBack?: () => void;
|
|
1653
1846
|
};
|
|
1654
1847
|
declare const __VLS_base$1: vue.DefineComponent<__VLS_Props$1, {
|
|
1655
1848
|
isFlowEdited: ComputedRef<boolean>;
|
|
1656
1849
|
updateNodeInputParams: FlowDetailExpose["updateNodeInputParams"];
|
|
1657
1850
|
openGlobalVariables: FlowDetailExpose["openGlobalVariables"];
|
|
1851
|
+
openGlobalVariableCreate: FlowDetailExpose["openGlobalVariableCreate"];
|
|
1658
1852
|
refreshDebugContext: FlowDetailExpose["refreshDebugContext"];
|
|
1659
1853
|
openDebugResult: FlowDetailExpose["openDebugResult"];
|
|
1660
1854
|
zoomToFit: FlowDetailExpose["zoomToFit"];
|
|
@@ -1664,18 +1858,14 @@ declare const __VLS_base$1: vue.DefineComponent<__VLS_Props$1, {
|
|
|
1664
1858
|
back: () => any;
|
|
1665
1859
|
save: (flowData: FlowTemplate) => any;
|
|
1666
1860
|
saveSuccess: () => any;
|
|
1667
|
-
createVariable: (payload:
|
|
1668
|
-
|
|
1669
|
-
cursorIndex: number;
|
|
1670
|
-
}) => any;
|
|
1861
|
+
createVariable: (payload: CreateVariablePayload) => any;
|
|
1862
|
+
executeSuccess: (result: FlowTaskExecuteSuccessResult) => any;
|
|
1671
1863
|
}, string, vue.PublicProps, Readonly<__VLS_Props$1> & Readonly<{
|
|
1672
1864
|
onBack?: (() => any) | undefined;
|
|
1673
1865
|
onSave?: ((flowData: FlowTemplate) => any) | undefined;
|
|
1674
1866
|
onSaveSuccess?: (() => any) | undefined;
|
|
1675
|
-
onCreateVariable?: ((payload:
|
|
1676
|
-
|
|
1677
|
-
cursorIndex: number;
|
|
1678
|
-
}) => any) | undefined;
|
|
1867
|
+
onCreateVariable?: ((payload: CreateVariablePayload) => any) | undefined;
|
|
1868
|
+
onExecuteSuccess?: ((result: FlowTaskExecuteSuccessResult) => any) | undefined;
|
|
1679
1869
|
}>, {
|
|
1680
1870
|
quickAdd: QuickAddConfig;
|
|
1681
1871
|
enableThirdPlugin: boolean;
|
|
@@ -1741,10 +1931,19 @@ declare function isMockableNode(node: NodeType | Activity | undefined | null): n
|
|
|
1741
1931
|
declare const random4: () => string;
|
|
1742
1932
|
declare const generateId: (group?: number) => string;
|
|
1743
1933
|
|
|
1934
|
+
interface ValidatePipelineTreeOptions {
|
|
1935
|
+
/**
|
|
1936
|
+
* 需要「已配置插件」的节点集合,不传时要求全部节点均已配置。
|
|
1937
|
+
*
|
|
1938
|
+
* 单步 / Mock 调试只依赖目标节点自身的配置(后端 step_run 用目标节点单独拼一棵最小流程树),
|
|
1939
|
+
* 画布其余未配置节点不影响调试,因此这类场景只传目标节点,允许空节点先存为草稿。
|
|
1940
|
+
*/
|
|
1941
|
+
requireConfiguredNodeIds?: string[];
|
|
1942
|
+
}
|
|
1744
1943
|
/**
|
|
1745
1944
|
* 画布pipeline_tree数据校验
|
|
1746
1945
|
*/
|
|
1747
|
-
declare const validatePipelineTree: (pipelineTree: PipelineTree) => {
|
|
1946
|
+
declare const validatePipelineTree: (pipelineTree: PipelineTree, options?: ValidatePipelineTreeOptions) => {
|
|
1748
1947
|
valid: boolean;
|
|
1749
1948
|
message: string;
|
|
1750
1949
|
ids: string[];
|
|
@@ -1810,10 +2009,14 @@ declare class BkFlowModelAccessor {
|
|
|
1810
2009
|
*/
|
|
1811
2010
|
interface DebugCanvasContext {
|
|
1812
2011
|
isMockNode(nodeId: string): boolean;
|
|
2012
|
+
/** 节点调试状态;任务节点用它补充未执行(not_run)标识,不写入连线执行态。 */
|
|
2013
|
+
getNodeStatus?(nodeId: string): string | undefined;
|
|
1813
2014
|
/** 当前独立调试聚焦节点(不复用 X6 编辑选择态,设计 §9.3.2) */
|
|
1814
2015
|
focusedNodeId?(): string;
|
|
1815
2016
|
/** 打开该节点详情侧滑的“调试配置”Tab */
|
|
1816
2017
|
openNodeDebugPanel?(nodeId: string): void;
|
|
2018
|
+
/** 调试锁定期(running/terminating);节点配置据此展示只读说明 Alert */
|
|
2019
|
+
isLocked?(): boolean;
|
|
1817
2020
|
}
|
|
1818
2021
|
|
|
1819
2022
|
type __VLS_Props = {
|
|
@@ -2003,5 +2206,5 @@ declare const _default: {
|
|
|
2003
2206
|
FlowMockDebug: () => Promise<typeof __mock_vue>;
|
|
2004
2207
|
};
|
|
2005
2208
|
|
|
2006
|
-
export { _default$1 as BkFlowCanvas, BkFlowModelAccessor, BkFlowNodeAccessor, _default$5 as FlowCreateTask, _default$7 as FlowDebug, _default$2 as FlowDetail, _default$4 as FlowEdit, _default$6 as FlowExecute, _default$8 as FlowMockDebug, _default$3 as FlowView, bkflowConnectionValidator, createBkflowPlugin, createBkflowSchema, createExecutionStatusPlugin, _default as default, exportToPipelineTree, generateId, getUniformApiPluginFormValue, getVariableDefaultConfig, importFromPipelineTree, isMockableNode, mergeOutputs, normalizePluginOutputItems, provideFlowApiConfig, provideMemberSelectorConfig, provideSelectPanelConfig, random4, resolveExecutionActions, resolveMockFormControl, useFlowApiConfig, useFlowEditApiConfig, useFlowViewApiConfig, useMemberSelectorConfig, useSelectPanelConfig, validatePipelineTree };
|
|
2007
|
-
export type { Activity, CanvasViewportExpose, CreateFlowTaskResult, DndNodeItem, ExecuteFlowTaskResult, ExecutionNodeAction, FlowApiConfig, FlowDetailExpose, FlowDetailPermissions, FlowEditExpose, FlowTaskExecuteSuccessResult, FlowTemplate, FlowViewExpose, Gateway, GatewayCondition, MemberSelectorConfig, MockOutputField, NodeExecutionState, NodeExecutionStatus, NodeMockConfig, NotifyConfig, PipelineTree, PluginDetailCommon, PluginInputDataItem, SelectPanelConfig, SimulateDebugCanvasContext, SimulateDebugStage, SimulateDebugState, SpaceFlowConfig, TaskExecutionStates, TemplateConfigs, TriggerCron, TriggerItem, UniformApiPluginInputsItem, UpdateFlowParams, Variable, VariableReference };
|
|
2209
|
+
export { _default$1 as BkFlowCanvas, BkFlowModelAccessor, BkFlowNodeAccessor, _default$5 as FlowCreateTask, _default$7 as FlowDebug, _default$2 as FlowDetail, _default$4 as FlowEdit, _default$6 as FlowExecute, _default$8 as FlowMockDebug, _default$3 as FlowView, bkflowConnectionValidator, createBkflowPlugin, createBkflowSchema, createExecutionStatusPlugin, _default as default, exportToPipelineTree, generateId, getUniformApiPluginFormValue, getVariableDefaultConfig, importFromPipelineTree, isMockableNode, mergeOutputs, normalizePluginOutputItems, provideFilterVariableConfig, provideFlowApiConfig, provideMemberSelectorConfig, provideSelectPanelConfig, random4, resolveExecutionActions, resolveMockFormControl, useFlowApiConfig, useFlowEditApiConfig, useFlowViewApiConfig, useMemberSelectorConfig, useSelectPanelConfig, validatePipelineTree };
|
|
2210
|
+
export type { Activity, CanvasViewportExpose, CreateFlowTaskResult, DndNodeItem, ExecuteFlowTaskResult, ExecutionNodeAction, FilterCandidateQuery, FilterConditionOptions, FilterConditionValue, FilterVariableConfig, FilterVariableSourceContext, FilterVariableSourceNodeComponent, FilterWhereItem, FilterWhereValue, FlowApiConfig, FlowDetailExpose, FlowDetailPermissions, FlowEditExpose, FlowTaskExecuteSuccessResult, FlowTemplate, FlowViewExpose, Gateway, GatewayCondition, GlobalVariableCreateExpose, MemberSelectorConfig, MockOutputField, NodeExecutionState, NodeExecutionStatus, NodeMockConfig, NotifyConfig, OpenFilterVariableCreateRequest, OpenGlobalVariableCreateRequest, OpenStandardVariableCreateRequest, PipelineTree, PluginDetailCommon, PluginInputDataItem, RetrievalFilterField, SelectPanelConfig, SimulateDebugCanvasContext, SimulateDebugStage, SimulateDebugState, SpaceFlowConfig, TaskExecutionStates, TemplateConfigs, TriggerCron, TriggerItem, UniformApiPluginInputsItem, UpdateFlowParams, Variable, VariableReference };
|
package/dist/index.esm.js
CHANGED
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { g as
|
|
3
|
-
import "lodash";
|
|
1
|
+
import { v as o, w as s, x as i, F as l, y as r, z as t, A as n, G as u, H as g, I as c, J as w, K as F, N as f, O as p, P as m, Q as d, T as C, U as k, V as P, W as v, m as A, X as b, Y as x, Z as V, $ as M, a0 as S, a1 as T, r as B, u as E, a2 as D, a3 as I, a4 as N, a5 as O, a6 as z } from "./index-FsDBMpW4.js";
|
|
2
|
+
import { g as h, r as y } from "./context-CVSZiSc9.js";
|
|
4
3
|
export {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
4
|
+
o as BkFlowCanvas,
|
|
5
|
+
s as BkFlowModelAccessor,
|
|
6
|
+
i as BkFlowNodeAccessor,
|
|
7
|
+
l as FlowCreateTask,
|
|
8
|
+
r as FlowDebug,
|
|
9
|
+
t as FlowDetail,
|
|
10
|
+
n as FlowEdit,
|
|
11
|
+
u as FlowExecute,
|
|
13
12
|
g as FlowMockDebug,
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
c as FlowView,
|
|
14
|
+
w as bkflowConnectionValidator,
|
|
16
15
|
F as createBkflowPlugin,
|
|
17
16
|
f as createBkflowSchema,
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
17
|
+
p as createExecutionStatusPlugin,
|
|
18
|
+
m as default,
|
|
19
|
+
d as exportToPipelineTree,
|
|
20
|
+
h as generateId,
|
|
21
|
+
C as getUniformApiPluginFormValue,
|
|
22
|
+
k as getVariableDefaultConfig,
|
|
23
|
+
P as importFromPipelineTree,
|
|
25
24
|
v as isMockableNode,
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
25
|
+
A as mergeOutputs,
|
|
26
|
+
b as normalizePluginOutputItems,
|
|
27
|
+
x as provideFilterVariableConfig,
|
|
28
|
+
V as provideFlowApiConfig,
|
|
29
|
+
M as provideMemberSelectorConfig,
|
|
30
|
+
S as provideSelectPanelConfig,
|
|
31
|
+
y as random4,
|
|
32
|
+
T as resolveExecutionActions,
|
|
33
33
|
B as resolveMockFormControl,
|
|
34
34
|
E as useFlowApiConfig,
|
|
35
35
|
D as useFlowEditApiConfig,
|
|
36
36
|
I as useFlowViewApiConfig,
|
|
37
37
|
N as useMemberSelectorConfig,
|
|
38
38
|
O as useSelectPanelConfig,
|
|
39
|
-
|
|
39
|
+
z as validatePipelineTree
|
|
40
40
|
};
|