@blueking/bkflow-canvas-editor 1.2.0-beta.1 → 1.2.0-beta.2
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/advanced.d.ts +53 -2
- package/dist/{index-CFs7FBc2.js → index-BDAWGVae.js} +1 -1
- package/dist/{index-BxGg3wAN.cjs → index-BPyjvoGz.cjs} +1 -1
- package/dist/{index-Bg_GQyNU.js → index-CJ5t_LGa.js} +1 -1
- package/dist/index-ClP9Gq3W.cjs +93 -0
- package/dist/index-CwMEGzur.js +58458 -0
- package/dist/{index-uUrwPR1f.cjs → index-Ddr99mq4.cjs} +1 -1
- package/dist/{index-C98sai1H.cjs → index-DuVnZGZk.cjs} +1 -1
- package/dist/{index-YTEMyQpg.js → index-RubzksMv.js} +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.d.ts +81 -3
- package/dist/index.es.min-BpHMrg2Y.cjs +2 -0
- package/dist/index.es.min-DYp0DL9J.js +3543 -0
- package/dist/index.esm.js +1 -1
- package/dist/style.css +1 -1
- package/package.json +2 -1
- 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
package/dist/advanced.d.ts
CHANGED
|
@@ -56,7 +56,7 @@ type PortOrientation = 'Top' | 'Right' | 'Bottom' | 'Left';
|
|
|
56
56
|
|
|
57
57
|
type GatewayType = 'ExclusiveGateway' | 'ParallelGateway' | 'ConditionalParallelGateway' | 'ConvergeGateway';
|
|
58
58
|
|
|
59
|
-
type NodeType = StartEvent | EndEvent | Activity | SubProcessActivity | Gateway;
|
|
59
|
+
type NodeType = StartEvent | EndEvent | Activity | SubProcessActivity | SubCanvasActivity | Gateway;
|
|
60
60
|
|
|
61
61
|
interface PluginInputDataItem {
|
|
62
62
|
value:
|
|
@@ -125,6 +125,7 @@ interface Activity {
|
|
|
125
125
|
loop?: number | null;
|
|
126
126
|
/** 执行态:生命周期阶段 */
|
|
127
127
|
phase?: number;
|
|
128
|
+
parent?: string | null;
|
|
128
129
|
}
|
|
129
130
|
|
|
130
131
|
/**
|
|
@@ -216,7 +217,51 @@ interface SubProcessActivity {
|
|
|
216
217
|
phase?: number;
|
|
217
218
|
}
|
|
218
219
|
|
|
219
|
-
|
|
220
|
+
/**
|
|
221
|
+
* 循环体容器节点(SubCanvas)节点。
|
|
222
|
+
*/
|
|
223
|
+
interface SubCanvasActivity {
|
|
224
|
+
id: string;
|
|
225
|
+
name: string;
|
|
226
|
+
stage_name?: string;
|
|
227
|
+
type: 'SubCanvas';
|
|
228
|
+
incoming: string[];
|
|
229
|
+
outgoing: string;
|
|
230
|
+
optional?: boolean;
|
|
231
|
+
/** 循环执行配置 */
|
|
232
|
+
loop_config?: LoopConfig;
|
|
233
|
+
/** 嵌套的完整子流程 */
|
|
234
|
+
pipeline: PipelineTree;
|
|
235
|
+
/** 节点标签 */
|
|
236
|
+
labels?: string[];
|
|
237
|
+
status?: NodeExecutionStatus;
|
|
238
|
+
/** 执行态:循环执行次数(未执行时为 null) */
|
|
239
|
+
loop?: number | null;
|
|
240
|
+
error_ignorable?: boolean;
|
|
241
|
+
retryable?: boolean;
|
|
242
|
+
skippable?: boolean;
|
|
243
|
+
auto_retry?: {
|
|
244
|
+
enable: boolean;
|
|
245
|
+
interval: number;
|
|
246
|
+
times: number;
|
|
247
|
+
};
|
|
248
|
+
timeout_config?: {
|
|
249
|
+
enable: boolean;
|
|
250
|
+
seconds: number;
|
|
251
|
+
action: string;
|
|
252
|
+
};
|
|
253
|
+
/** 执行态:实际重试次数 */
|
|
254
|
+
retry?: number;
|
|
255
|
+
/** 执行态:是否被跳过 */
|
|
256
|
+
skip?: boolean;
|
|
257
|
+
/** 执行态:是否自动忽略错误 */
|
|
258
|
+
error_ignored?: boolean;
|
|
259
|
+
/** 执行态:生命周期阶段 */
|
|
260
|
+
phase?: number;
|
|
261
|
+
parent?: string | null;
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
type ActivityUnion = Activity | SubProcessActivity | SubCanvasActivity;
|
|
220
265
|
|
|
221
266
|
interface StartEvent {
|
|
222
267
|
id: string;
|
|
@@ -259,6 +304,7 @@ interface Gateway {
|
|
|
259
304
|
parse_lang?: 'boolrule' | 'FEEL' | 'MAKO';
|
|
260
305
|
};
|
|
261
306
|
status?: NodeExecutionStatus;
|
|
307
|
+
parent?: string | null;
|
|
262
308
|
}
|
|
263
309
|
|
|
264
310
|
interface Flow {
|
|
@@ -275,15 +321,20 @@ interface Location {
|
|
|
275
321
|
| 'endpoint'
|
|
276
322
|
| 'tasknode'
|
|
277
323
|
| 'subflow'
|
|
324
|
+
| 'SubCanvas'
|
|
278
325
|
| 'branchgateway'
|
|
279
326
|
| 'convergegateway'
|
|
280
327
|
| 'parallelgateway'
|
|
281
328
|
| 'conditionalparallelgateway';
|
|
282
329
|
x: number;
|
|
283
330
|
y: number;
|
|
331
|
+
/** 容器节点(SubCanvas)resize 后持久化的尺寸 */
|
|
332
|
+
width?: number;
|
|
333
|
+
height?: number;
|
|
284
334
|
group?: string;
|
|
285
335
|
icon?: string;
|
|
286
336
|
name?: string;
|
|
337
|
+
parent?: string | boolean;
|
|
287
338
|
}
|
|
288
339
|
|
|
289
340
|
interface Line {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as G, ref as S, computed as i, watch as K, nextTick as Q, resolveComponent as N, openBlock as f, createElementBlock as y, createVNode as p, Fragment as W, renderList as X, withKeys as Z, withModifiers as ee, normalizeClass as L, createElementVNode as o, createCommentVNode as F, toDisplayString as E, createSlots as Y, withCtx as k, createTextVNode as A, onBeforeUnmount as te, resolveDirective as se, normalizeStyle as oe, withDirectives as le, createBlock as q } from "vue";
|
|
2
|
-
import { L as ae, S as ne, E as ue, _ as j, e as ie, j as re, k as de, o as ce, t as pe, s as me, n as ve, l as J, C as be, q as fe, v as ge } from "./index-
|
|
2
|
+
import { L as ae, S as ne, E as ue, _ as j, e as ie, j as re, k as de, o as ce, t as pe, s as me, n as ve, l as J, C as be, q as fe, v as ge } from "./index-CwMEGzur.js";
|
|
3
3
|
const _e = { class: "debug-result-node-list" }, ke = ["data-node-id", "aria-selected", "onClick", "onKeydown"], ye = ["title"], we = {
|
|
4
4
|
key: 0,
|
|
5
5
|
class: "debug-result-node-list__mock",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-ClP9Gq3W.cjs");require("bkui-vue/lib/message");require("bkui-vue/lib/icon");require("monaco-editor");const N={string:"input",text:"input",textarea:"textarea",int:"input",integer:"input",number:"input",float:"input",json:"json",object:"json",array:"array",list:"array",select:"select",time:"timepicker",datetime:"timepicker"},h=l=>l.replace(/^\$\{(.+)\}$/,"$1"),g=l=>`\${${h(l)}}`;function F(l,c){const a=g(l.key),n=c?s.cloneDeep(c):{},d=l.custom_type??n.custom_type??N[l.type]??"input";return{...n,key:a,name:l.name??n.name??h(l.key),custom_type:d,desc:n.desc??"",index:n.index??0,show_type:"show",source_info:n.source_info??{},source_tag:n.source_tag??"",source_type:n.source_type??"custom",validation:n.validation??"",value:l.default??n.value,meta:{...n.meta??{},required:l.required??n.meta?.required??!1}}}function D(l,c={}){if(!l)return{};const a=l.constants;return a&&Object.keys(a).length>0?{...a}:Array.isArray(l.fields)&&l.fields.length>0?l.fields.reduce((n,d)=>{const r=g(d.key);return n[r]=F(d,c[r]),n},{}):{}}const j={class:"global-debug-input"},q={key:0,class:"global-debug-input__params","data-test":"input-params"},R={key:0},L=["title"],O={class:"col-value"},T={key:1,class:"global-debug-input__value"},I={key:1,class:"form-params-wrapper"},P={class:"sideslider-footer-buttons"},$=e.defineComponent({__name:"index",props:{show:{type:Boolean},schema:{},pipelineConstants:{default:()=>({})},initialValues:{default:()=>({})},pending:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1}},emits:["confirm","close","update:show"],setup(l,{emit:c}){const a=l,n=c,d=s.useFlowApiConfig(),r=e.ref({}),p=e.shallowRef([]),m=e.shallowRef([]),f=e.shallowRef(!1),y=e.ref(),v=e.ref(),k=e.computed(()=>p.value.filter(t=>s.isBuiltinUsageVariable(t))),V=e.computed(()=>k.value.length>0||m.value.length>0),b=e.computed(()=>[...p.value].sort((t,o)=>(t.index??0)-(o.index??0)).map(t=>{const o=Object.prototype.hasOwnProperty.call(r.value,t.key)?r.value[t.key]:t.value;return{key:t.key,name:t.name||t.key,value:o,display:s.formatDebugValue(o),isComplex:s.isComplexDebugValue(o)}}));e.watch(()=>a.show,t=>{t&&(r.value=s.cloneDeep(a.initialValues??{}),w())});const w=async()=>{const t=D(a.schema,a.pipelineConstants),o=Object.values(t).filter(i=>typeof i=="object"&&i!==null&&i.show_type==="show");if(p.value=o,a.readonly||Object.keys(t).length<1){m.value=[];return}f.value=!0;try{m.value=await s.getInputFormsFromConstants(d,t)}catch(i){console.error("Failed to build debug input forms from schema:",i),m.value=[]}finally{f.value=!1}},B=t=>{r.value={...r.value,...s.cloneDeep(t)}},C=async()=>{const[t,o]=await Promise.all([Promise.resolve(typeof v.value?.validate=="function"?v.value.validate():!0),Promise.resolve(typeof y.value?.validate=="function"?y.value.validate():!0)]);!t||!o||n("confirm",s.cloneDeep(r.value))},_=()=>{n("close"),n("update:show",!1)};return(t,o)=>{const i=e.resolveComponent("bk-button"),x=e.resolveComponent("bk-sideslider"),E=e.resolveDirective("bkloading");return e.openBlock(),e.createBlock(x,{title:"调试参数","is-show":a.show,width:960,"quick-close":!0,"esc-close":!1,onClosed:_},e.createSlots({default:e.withCtx(()=>[e.withDirectives((e.openBlock(),e.createElementBlock("div",j,[a.readonly?(e.openBlock(),e.createElementBlock("table",q,[o[2]||(o[2]=e.createElementVNode("thead",null,[e.createElementVNode("tr",null,[e.createElementVNode("th",{class:"col-name"},"参数名"),e.createElementVNode("th",{class:"col-value"},"参数值")])],-1)),e.createElementVNode("tbody",null,[b.value.length===0?(e.openBlock(),e.createElementBlock("tr",R,[...o[1]||(o[1]=[e.createElementVNode("td",{class:"global-debug-input__empty",colspan:"2"},"暂无参数",-1)])])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value,u=>(e.openBlock(),e.createElementBlock("tr",{key:u.key,"data-test":"input-row"},[e.createElementVNode("td",{class:"col-name",title:u.key},e.toDisplayString(u.name),9,L),e.createElementVNode("td",O,[u.isComplex?(e.openBlock(),e.createBlock(s.DebugJsonViewer,{key:0,value:u.value,"data-test":"json-viewer"},null,8,["value"])):(e.openBlock(),e.createElementBlock("pre",T,e.toDisplayString(u.display),1))])]))),128))])])):(e.openBlock(),e.createElementBlock("div",I,[k.value.length>0?(e.openBlock(),e.createBlock(e.unref(s.BuiltinVariableUsageForm),{key:0,ref_key:"builtinVariableFormRef",ref:v,modelValue:r.value,"onUpdate:modelValue":o[0]||(o[0]=u=>r.value=u),variables:k.value},null,8,["modelValue","variables"])):e.createCommentVNode("",!0),m.value.length>0?(e.openBlock(),e.createBlock(s.RenderForm,{key:1,ref_key:"renderFormRef",ref:y,scheme:m.value,editable:"","form-option":{showRequired:!0,showGroup:!0,showLabel:!1,showHook:!1,showDesc:!0,formEdit:!0},"form-data":r.value,onChange:B},null,8,["scheme","form-data"])):e.createCommentVNode("",!0),V.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(s.EmptyException,{key:2,title:"暂无参数"}))]))])),[[E,{loading:f.value}]])]),_:2},[a.readonly?void 0:{name:"footer",fn:e.withCtx(()=>[e.createElementVNode("div",P,[e.createVNode(i,{theme:"primary","data-test":"save-and-run",loading:a.pending,onClick:C},{default:e.withCtx(()=>[...o[3]||(o[3]=[e.createTextVNode(" 保存并执行 ",-1)])]),_:1},8,["loading"]),e.createVNode(i,{disabled:a.pending,onClick:_},{default:e.withCtx(()=>[...o[4]||(o[4]=[e.createTextVNode("取消",-1)])]),_:1},8,["disabled"])])]),key:"0"}]),1032,["is-show"])}}}),S=s._export_sfc($,[["__scopeId","data-v-01a33593"]]);exports.default=S;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as q, ref as f, shallowRef as J, computed as x, watch as P, resolveComponent as p, resolveDirective as U, openBlock as l, createBlock as v, withCtx as i, withDirectives as z, createElementBlock as y, Fragment as A, renderList as W, createVNode as b, createCommentVNode as g, createElementVNode as V, createTextVNode as C, toDisplayString as M } from "vue";
|
|
2
2
|
import { InfoBox as X } from "bkui-vue/lib";
|
|
3
3
|
import G from "bkui-vue/lib/message";
|
|
4
|
-
import { u as H, c as K, M as Q, p as Z, m as $, h as ee, r as T, f as te, a as oe, _ as se } from "./index-
|
|
4
|
+
import { u as H, c as K, M as Q, p as Z, m as $, h as ee, r as T, f as te, a as oe, _ as se } from "./index-CwMEGzur.js";
|
|
5
5
|
const ae = {
|
|
6
6
|
key: 0,
|
|
7
7
|
class: "mock-data-sideslider__title-sep"
|