@blueking/bkflow-canvas-editor 1.2.0-beta.1 → 1.2.0-beta.3
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 +2 -2
- package/dist/advanced.d.ts +53 -2
- package/dist/index-8tO7hc7_.cjs +93 -0
- package/dist/{index-CFs7FBc2.js → index-9e2UWIpw.js} +1 -1
- package/dist/{index-Bg_GQyNU.js → index-CgvFfGCg.js} +1 -1
- package/dist/{index-BxGg3wAN.cjs → index-ChlaQp9B.cjs} +1 -1
- package/dist/{index-uUrwPR1f.cjs → index-CvcYOHIk.cjs} +1 -1
- package/dist/{index-C98sai1H.cjs → index-DhCIRacZ.cjs} +1 -1
- package/dist/index-DhcQr90S.js +58511 -0
- package/dist/{index-YTEMyQpg.js → index-fpyKCleg.js} +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.d.ts +82 -4
- package/dist/index.esm.js +1 -1
- package/dist/style.css +1 -1
- package/package.json +3 -7
- package/dist/bkflow-canvas-editor_false-B70uLuHL.cjs +0 -1
- package/dist/bkflow-canvas-editor_false-BlC281Zg.cjs +0 -1
- package/dist/bkflow-canvas-editor_false-Casww7p4.js +0 -5
- package/dist/bkflow-canvas-editor_false-i9G8sqQi.js +0 -5
- package/dist/index-Bij1hZGP.js +0 -56012
- package/dist/index-DuddWhYg.cjs +0 -93
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as A, ref as V, shallowRef as x, computed as C, watch as U, resolveComponent as j, resolveDirective as K, openBlock as l, createBlock as f, createSlots as S, withCtx as y, withDirectives as G, createElementBlock as d, createElementVNode as i, createCommentVNode as v, Fragment as H, renderList as J, toDisplayString as B, unref as Y, createVNode as R, createTextVNode as E } from "vue";
|
|
2
|
-
import { c as _, u as z, i as M, b as Q, d as W, g as X, D as Z, B as ee, R as te, E as ae, _ as oe } from "./index-
|
|
2
|
+
import { c as _, u as z, i as M, b as Q, d as W, g as X, D as Z, B as ee, R as te, E as ae, _ as oe } from "./index-DhcQr90S.js";
|
|
3
3
|
import "bkui-vue/lib/message";
|
|
4
4
|
import "bkui-vue/lib/icon";
|
|
5
5
|
import "monaco-editor";
|
package/dist/index.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./index-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./index-8tO7hc7_.cjs"),o=require("./context-Bj442dps.cjs");exports.BkFlowCanvas=e.BkFlowCanvas;exports.BkFlowModelAccessor=e.BkFlowModelAccessor;exports.BkFlowNodeAccessor=e.BkFlowNodeAccessor;exports.FlowCreateTask=e.FlowCreateTask;exports.FlowDebug=e.FlowDebug;exports.FlowDetail=e.index;exports.FlowEdit=e.edit;exports.FlowExecute=e.execute;exports.FlowMockDebug=e.mock;exports.FlowView=e.view;exports.bkflowConnectionValidator=e.bkflowConnectionValidator;exports.createBkflowPlugin=e.createBkflowPlugin;exports.createBkflowSchema=e.createBkflowSchema;exports.createExecutionStatusPlugin=e.createExecutionStatusPlugin;exports.default=e.index$1;exports.exportToPipelineTree=e.exportToPipelineTree;exports.getUniformApiPluginFormValue=e.getUniformApiPluginFormValue;exports.getVariableDefaultConfig=e.getVariableDefaultConfig;exports.importFromPipelineTree=e.importFromPipelineTree;exports.isMockableNode=e.isMockableNode;exports.mergeOutputs=e.mergeOutputs;exports.normalizePluginOutputItems=e.normalizePluginOutputItems;exports.provideFilterVariableConfig=e.provideFilterVariableConfig;exports.provideFlowApiConfig=e.provideFlowApiConfig;exports.provideMemberSelectorConfig=e.provideMemberSelectorConfig;exports.provideSelectPanelConfig=e.provideSelectPanelConfig;exports.resolveExecutionActions=e.resolveExecutionActions;exports.resolveMockFormControl=e.resolveMockFormControl;exports.useFlowApiConfig=e.useFlowApiConfig;exports.useFlowEditApiConfig=e.useFlowEditApiConfig;exports.useFlowViewApiConfig=e.useFlowViewApiConfig;exports.useMemberSelectorConfig=e.useMemberSelectorConfig;exports.useSelectPanelConfig=e.useSelectPanelConfig;exports.validatePipelineTree=e.validatePipelineTree;exports.generateId=o.generateId;exports.random4=o.random4;
|
package/dist/index.d.ts
CHANGED
|
@@ -124,7 +124,7 @@ type PortOrientation = 'Top' | 'Right' | 'Bottom' | 'Left';
|
|
|
124
124
|
|
|
125
125
|
type GatewayType = 'ExclusiveGateway' | 'ParallelGateway' | 'ConditionalParallelGateway' | 'ConvergeGateway';
|
|
126
126
|
|
|
127
|
-
type NodeType = StartEvent | EndEvent | Activity | SubProcessActivity | Gateway;
|
|
127
|
+
type NodeType = StartEvent | EndEvent | Activity | SubProcessActivity | SubCanvasActivity | Gateway;
|
|
128
128
|
|
|
129
129
|
interface PluginInputDataItem {
|
|
130
130
|
value:
|
|
@@ -193,6 +193,7 @@ interface Activity {
|
|
|
193
193
|
loop?: number | null;
|
|
194
194
|
/** 执行态:生命周期阶段 */
|
|
195
195
|
phase?: number;
|
|
196
|
+
parent?: string | null;
|
|
196
197
|
}
|
|
197
198
|
|
|
198
199
|
/**
|
|
@@ -284,7 +285,51 @@ interface SubProcessActivity {
|
|
|
284
285
|
phase?: number;
|
|
285
286
|
}
|
|
286
287
|
|
|
287
|
-
|
|
288
|
+
/**
|
|
289
|
+
* 循环体容器节点(SubCanvas)节点。
|
|
290
|
+
*/
|
|
291
|
+
interface SubCanvasActivity {
|
|
292
|
+
id: string;
|
|
293
|
+
name: string;
|
|
294
|
+
stage_name?: string;
|
|
295
|
+
type: 'SubCanvas';
|
|
296
|
+
incoming: string[];
|
|
297
|
+
outgoing: string;
|
|
298
|
+
optional?: boolean;
|
|
299
|
+
/** 循环执行配置 */
|
|
300
|
+
loop_config?: LoopConfig;
|
|
301
|
+
/** 嵌套的完整子流程 */
|
|
302
|
+
pipeline: PipelineTree;
|
|
303
|
+
/** 节点标签 */
|
|
304
|
+
labels?: string[];
|
|
305
|
+
status?: NodeExecutionStatus;
|
|
306
|
+
/** 执行态:循环执行次数(未执行时为 null) */
|
|
307
|
+
loop?: number | null;
|
|
308
|
+
error_ignorable?: boolean;
|
|
309
|
+
retryable?: boolean;
|
|
310
|
+
skippable?: boolean;
|
|
311
|
+
auto_retry?: {
|
|
312
|
+
enable: boolean;
|
|
313
|
+
interval: number;
|
|
314
|
+
times: number;
|
|
315
|
+
};
|
|
316
|
+
timeout_config?: {
|
|
317
|
+
enable: boolean;
|
|
318
|
+
seconds: number;
|
|
319
|
+
action: string;
|
|
320
|
+
};
|
|
321
|
+
/** 执行态:实际重试次数 */
|
|
322
|
+
retry?: number;
|
|
323
|
+
/** 执行态:是否被跳过 */
|
|
324
|
+
skip?: boolean;
|
|
325
|
+
/** 执行态:是否自动忽略错误 */
|
|
326
|
+
error_ignored?: boolean;
|
|
327
|
+
/** 执行态:生命周期阶段 */
|
|
328
|
+
phase?: number;
|
|
329
|
+
parent?: string | null;
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
type ActivityUnion = Activity | SubProcessActivity | SubCanvasActivity;
|
|
288
333
|
|
|
289
334
|
interface StartEvent {
|
|
290
335
|
id: string;
|
|
@@ -327,6 +372,7 @@ interface Gateway {
|
|
|
327
372
|
parse_lang?: 'boolrule' | 'FEEL' | 'MAKO';
|
|
328
373
|
};
|
|
329
374
|
status?: NodeExecutionStatus;
|
|
375
|
+
parent?: string | null;
|
|
330
376
|
}
|
|
331
377
|
|
|
332
378
|
interface Flow {
|
|
@@ -343,15 +389,20 @@ interface Location {
|
|
|
343
389
|
| 'endpoint'
|
|
344
390
|
| 'tasknode'
|
|
345
391
|
| 'subflow'
|
|
392
|
+
| 'SubCanvas'
|
|
346
393
|
| 'branchgateway'
|
|
347
394
|
| 'convergegateway'
|
|
348
395
|
| 'parallelgateway'
|
|
349
396
|
| 'conditionalparallelgateway';
|
|
350
397
|
x: number;
|
|
351
398
|
y: number;
|
|
399
|
+
/** 容器节点(SubCanvas)resize 后持久化的尺寸 */
|
|
400
|
+
width?: number;
|
|
401
|
+
height?: number;
|
|
352
402
|
group?: string;
|
|
353
403
|
icon?: string;
|
|
354
404
|
name?: string;
|
|
405
|
+
parent?: string | boolean;
|
|
355
406
|
}
|
|
356
407
|
|
|
357
408
|
interface Line {
|
|
@@ -1468,7 +1519,7 @@ interface SelectPanelConfig {
|
|
|
1468
1519
|
* - mode 缺省或为 'legacy':使用组件内置的 UserSelector,依赖 fetchUserApi
|
|
1469
1520
|
* - mode 为 'tenant':使用多租户人员选择器 @blueking/bk-user-selector,
|
|
1470
1521
|
* tenantId 与 apiBaseUrl 在类型上即为必填
|
|
1471
|
-
*
|
|
1522
|
+
* 接入方需安装 peer 依赖 @blueking/bk-user-selector(^0.1.15,非 optional)
|
|
1472
1523
|
*/
|
|
1473
1524
|
type MemberSelectorConfig = {
|
|
1474
1525
|
mode?: 'legacy';
|
|
@@ -1613,9 +1664,29 @@ type __VLS_Props$5 = {
|
|
|
1613
1664
|
apiConfig: FlowApiConfig;
|
|
1614
1665
|
bkflowSaasUrl?: string;
|
|
1615
1666
|
showHeader?: boolean;
|
|
1667
|
+
showNodeActions?: boolean;
|
|
1668
|
+
autoFitView?: boolean;
|
|
1616
1669
|
onBack?: () => void;
|
|
1617
1670
|
};
|
|
1618
|
-
|
|
1671
|
+
/**
|
|
1672
|
+
* 网关条件数据
|
|
1673
|
+
*/
|
|
1674
|
+
interface GatewayConditionClickData {
|
|
1675
|
+
id: string;
|
|
1676
|
+
nodeId: string;
|
|
1677
|
+
name: string;
|
|
1678
|
+
value: string;
|
|
1679
|
+
tag: string;
|
|
1680
|
+
loc?: number;
|
|
1681
|
+
isDefault?: boolean;
|
|
1682
|
+
}
|
|
1683
|
+
declare function focusNode(nodeId: string, options?: {
|
|
1684
|
+
select?: boolean;
|
|
1685
|
+
highlight?: boolean;
|
|
1686
|
+
}): boolean;
|
|
1687
|
+
declare const __VLS_base$5: vue.DefineComponent<__VLS_Props$5, {
|
|
1688
|
+
focusNode: typeof focusNode;
|
|
1689
|
+
}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
1619
1690
|
retry: (nodeId: string) => any;
|
|
1620
1691
|
skip: (nodeId: string) => any;
|
|
1621
1692
|
resume: (nodeId: string) => any;
|
|
@@ -1629,6 +1700,8 @@ declare const __VLS_base$5: vue.DefineComponent<__VLS_Props$5, {}, {}, {}, {}, v
|
|
|
1629
1700
|
nodeId: string;
|
|
1630
1701
|
} & {
|
|
1631
1702
|
type: "node.click";
|
|
1703
|
+
nodeId: string;
|
|
1704
|
+
condition?: GatewayConditionClickData;
|
|
1632
1705
|
}) => any;
|
|
1633
1706
|
"execution-action": (payload: {
|
|
1634
1707
|
nodeId: string;
|
|
@@ -1648,6 +1721,8 @@ declare const __VLS_base$5: vue.DefineComponent<__VLS_Props$5, {}, {}, {}, {}, v
|
|
|
1648
1721
|
nodeId: string;
|
|
1649
1722
|
} & {
|
|
1650
1723
|
type: "node.click";
|
|
1724
|
+
nodeId: string;
|
|
1725
|
+
condition?: GatewayConditionClickData;
|
|
1651
1726
|
}) => any) | undefined;
|
|
1652
1727
|
"onExecution-action"?: ((payload: {
|
|
1653
1728
|
nodeId: string;
|
|
@@ -1657,6 +1732,8 @@ declare const __VLS_base$5: vue.DefineComponent<__VLS_Props$5, {}, {}, {}, {}, v
|
|
|
1657
1732
|
showHeader: boolean;
|
|
1658
1733
|
defaultZoom: number;
|
|
1659
1734
|
nodeStates: TaskExecutionStates;
|
|
1735
|
+
showNodeActions: boolean;
|
|
1736
|
+
autoFitView: boolean;
|
|
1660
1737
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
1661
1738
|
declare const __VLS_export$5: __VLS_WithSlots$5<typeof __VLS_base$5, __VLS_Slots$5>;
|
|
1662
1739
|
declare const _default$6: typeof __VLS_export$5;
|
|
@@ -2343,6 +2420,7 @@ declare function exportToPipelineTree(flowModel: FlowModel): PipelineTree;
|
|
|
2343
2420
|
* - node.remove:主动查找将被级联删除的边,清理对应网关条件;
|
|
2344
2421
|
* 若删除的是分支网关,级联删除关联的 placeholder 节点;
|
|
2345
2422
|
* 同时清理全局变量中对被删除节点的 source_info 引用,并删除已无引用的变量
|
|
2423
|
+
* - node.move / node.set-extensions(parentId):循环容器大小自适应(子节点移动后容器包住内容)
|
|
2346
2424
|
*/
|
|
2347
2425
|
declare function createBkflowPlugin(): CanvasPlugin;
|
|
2348
2426
|
|
package/dist/index.esm.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { w as o, x as s, y as i, F as l, z as r, A as t, G as n, H as u, I as g, J as c, K as w, N as F, O as f, P as p, Q as m, T as d, U as C, V as k, W as P, X as A, m as b, Y as v, Z as x, $ as V, a0 as M, a1 as S, a2 as T, r as B, u as E, a3 as D, a4 as I, a5 as N, a6 as O, a7 as z } from "./index-
|
|
1
|
+
import { w as o, x as s, y as i, F as l, z as r, A as t, G as n, H as u, I as g, J as c, K as w, N as F, O as f, P as p, Q as m, T as d, U as C, V as k, W as P, X as A, m as b, Y as v, Z as x, $ as V, a0 as M, a1 as S, a2 as T, r as B, u as E, a3 as D, a4 as I, a5 as N, a6 as O, a7 as z } from "./index-DhcQr90S.js";
|
|
2
2
|
import { g as h, r as y } from "./context-CdSU0w5S.js";
|
|
3
3
|
export {
|
|
4
4
|
o as BkFlowCanvas,
|