@blueking/bkflow-canvas-editor 1.1.0-beta.37 → 1.1.0-beta.39
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.cjs.js +1 -1
- package/dist/advanced.d.ts +12 -4
- package/dist/advanced.esm.js +1 -1
- package/dist/{context-DXxB0x9T.cjs → context-DbBT1PuL.cjs} +1 -1
- package/dist/{context-BGCiN3VZ.js → context-DrPMCAhz.js} +21 -16
- package/dist/{index-CpjND587.cjs → index-BRZ-dr9I.cjs} +1 -1
- package/dist/{index-CtaJOmk9.cjs → index-CAobmC0i.cjs} +1 -1
- package/dist/{index-BS7obrkw.js → index-CYYAgUFr.js} +1 -1
- package/dist/{index-Dk3SgTQy.js → index-CgPGpMD4.js} +453 -440
- package/dist/{index-BNn7pD-q.js → index-CoMRlJ6B.js} +1 -1
- package/dist/{index-CwqBSUUA.cjs → index-DLXN1H-M.cjs} +6 -6
- package/dist/{index-D0FGEVjb.cjs → index-DNtT2x7X.cjs} +1 -1
- package/dist/{index-CvhThQOj.js → index-PRLJjFf4.js} +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.d.ts +12 -4
- package/dist/index.esm.js +2 -2
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),M=require("bkui-vue/lib"),N=require("bkui-vue/lib/message"),s=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),M=require("bkui-vue/lib"),N=require("bkui-vue/lib/message"),s=require("./index-DLXN1H-M.cjs"),O={key:0,class:"mock-data-sideslider__title-sep"},F=["title"],S={class:"mock-data-sideslider"},D={class:"mock-data-sideslider__footer"},j="当前节点的输出不支持mock,是否需要在调试时跳过当前节点?",q="跳过调试",Y=e.defineComponent({__name:"index",props:{show:{type:Boolean},node:{default:null},outputs:{default:()=>({})},pending:{type:Boolean,default:!1}},emits:["confirm","close","update:show"],setup(f,{emit:y}){const o=f,p=y,h=s.useFlowApiConfig(),k=e.ref(!1),u=e.shallowRef([]),d=e.ref({}),_=e.ref({}),m=e.ref(!1),b=e.computed(()=>m.value?j:"暂无输出结果"),C=e.computed(()=>m.value?q:"确定"),w=async()=>{if(o.node){k.value=!0,_.value={},m.value=!1;try{const t=await s.pluginDetailRequest(h,o.node.component);u.value=s.mergeOutputs(t.outputs??[]),m.value=s.hasOnlySystemOutputs(t.outputs);const n=o.outputs??{},a={};u.value.forEach(l=>{const c=Object.prototype.hasOwnProperty.call(n,l.key)?n[l.key]:l.type==="object"?{}:void 0,r=s.resolveMockFormControl(l);a[l.key]=r==="json-editor"||r==="data-table"?s.formatJsonFieldValue(c):c}),d.value=a}catch(t){console.error(t),u.value=[],d.value={},m.value=!1,N({theme:"error",message:"加载输出结果失败"})}finally{k.value=!1}}},g=()=>{const t={},n={};return u.value.forEach(a=>{const l=d.value[a.key],c=s.resolveMockFormControl(a);if(c==="json-editor"||c==="data-table"){const r=s.parseJsonFieldValue(l);if(!r.valid){t[a.key]=r.message;return}r.value!==void 0&&(n[a.key]=r.value);return}l!==void 0&&l!==""&&(n[a.key]=l)}),{errors:t,outputs:n}},x=t=>{M.InfoBox({title:"确认 Mock 输出?",content:"Mock 输出将覆盖当前输出结果,执行时跳过该节点并以 Mock 值替代实际输出",confirmText:"确定",cancelText:"取消",width:400,onConfirm:()=>{t()}})},V=()=>{if(m.value){p("confirm",{outputs:{}});return}const{errors:t,outputs:n}=g();_.value=t,!(Object.keys(t).length>0)&&x(()=>p("confirm",{outputs:n}))},v=()=>{p("close"),p("update:show",!1)};return e.watch(()=>[o.show,o.node?.id],([t])=>{t&&o.node&&(d.value=s.cloneDeep(o.outputs??{}),w())},{immediate:!0}),(t,n)=>{const a=e.resolveComponent("bk-form-item"),l=e.resolveComponent("bk-form"),c=e.resolveComponent("bk-exception"),r=e.resolveComponent("bk-button"),B=e.resolveComponent("bk-sideslider"),E=e.resolveDirective("bkloading");return e.openBlock(),e.createBlock(B,{"is-show":o.show,width:960,"quick-close":"","esc-close":!1,onClosed:v},{header:e.withCtx(()=>[n[0]||(n[0]=e.createElementVNode("span",{class:"mock-data-sideslider__title"},"Mock输出",-1)),o.node?.name?(e.openBlock(),e.createElementBlock("span",O,"-")):e.createCommentVNode("",!0),o.node?.name?(e.openBlock(),e.createElementBlock("span",{key:1,class:"mock-data-sideslider__title-node",title:o.node.name},e.toDisplayString(o.node.name),9,F)):e.createCommentVNode("",!0)]),footer:e.withCtx(()=>[e.createElementVNode("div",D,[e.createVNode(r,{theme:"primary","data-test":"mock-confirm",loading:o.pending,onClick:V},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(C.value),1)]),_:1},8,["loading"]),e.createVNode(r,{disabled:o.pending,onClick:v},{default:e.withCtx(()=>[...n[1]||(n[1]=[e.createTextVNode("取消",-1)])]),_:1},8,["disabled"])])]),default:e.withCtx(()=>[e.withDirectives((e.openBlock(),e.createElementBlock("div",S,[u.value.length>0?(e.openBlock(),e.createBlock(l,{key:0,"form-type":"vertical","label-width":120,"data-test":"mock-outputs-form"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,i=>(e.openBlock(),e.createBlock(a,{key:i.key,label:i.name||i.key},{default:e.withCtx(()=>[e.createVNode(s.MockFieldRenderer,{modelValue:d.value[i.key],"onUpdate:modelValue":T=>d.value[i.key]=T,field:i,error:_.value[i.key]},null,8,["modelValue","onUpdate:modelValue","field","error"])]),_:2},1032,["label"]))),128))]),_:1})):k.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(c,{key:1,class:"mock-data-sideslider__exception",scene:"part",type:"empty",title:b.value},null,8,["title"]))])),[[E,{loading:k.value}]])]),_:1},8,["is-show"])}}}),I=s._export_sfc(Y,[["__scopeId","data-v-c4e2476a"]]);exports.default=I;
|
|
@@ -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 B, 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 } 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 } from "./index-CgPGpMD4.js";
|
|
3
3
|
const ge = { class: "debug-result-node-list" }, _e = ["data-node-id", "aria-selected", "onClick", "onKeydown"], ke = ["title"], ye = {
|
|
4
4
|
key: 0,
|
|
5
5
|
class: "debug-result-node-list__mock",
|
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-DLXN1H-M.cjs"),o=require("./context-DbBT1PuL.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.provideSelectRelatedOptionConfig=e.provideSelectRelatedOptionConfig;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
|
@@ -149,20 +149,26 @@ interface ActivityComponent {
|
|
|
149
149
|
api_meta?: {
|
|
150
150
|
id: string;
|
|
151
151
|
name: string;
|
|
152
|
+
/** 项目内 uniform_api 仍可能写入;标准运维 V4 对齐 bkflow,不再落这个字段 */
|
|
152
153
|
alias?: string;
|
|
153
|
-
meta_url
|
|
154
|
+
/** 目录项有 meta_url 才写;V4 开放插件通常只有 meta_url_template */
|
|
155
|
+
meta_url?: string;
|
|
154
156
|
api_key: string;
|
|
155
157
|
category: {
|
|
156
158
|
id: string;
|
|
157
159
|
name: string;
|
|
158
160
|
};
|
|
159
|
-
//
|
|
160
|
-
|
|
161
|
+
// 标准运维 V4 开放插件的落库字段,对齐 bkflow NodeConfig.vue `if (isV4)` 保存分支
|
|
162
|
+
plugin_source?: string;
|
|
161
163
|
plugin_code?: string;
|
|
162
164
|
plugin_version?: string;
|
|
163
|
-
source_key?: string;
|
|
164
165
|
wrapper_version?: string;
|
|
165
166
|
versions?: string[];
|
|
167
|
+
meta_url_template?: string;
|
|
168
|
+
latest_version?: string;
|
|
169
|
+
default_version?: string;
|
|
170
|
+
desc?: string;
|
|
171
|
+
source_key?: string;
|
|
166
172
|
};
|
|
167
173
|
}
|
|
168
174
|
|
|
@@ -503,6 +509,8 @@ interface PluginMetaItem {
|
|
|
503
509
|
interface SopsPluginSourceItem {
|
|
504
510
|
id: string;
|
|
505
511
|
name: string;
|
|
512
|
+
/** 空间配置 uniform_api.api[api_name].source_key,缺省时等于 api_name */
|
|
513
|
+
source_key?: string;
|
|
506
514
|
}
|
|
507
515
|
interface SopsPluginCategory {
|
|
508
516
|
id: string;
|
package/dist/index.esm.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
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 p, K as w, N as f, O as F, P as d, Q as m, T as C, U as k, V as v, W as P, m as A, X as b, Y as x, Z as S, $ as V, a0 as M, a1 as T, a2 as B, r as E, u as D, a3 as O, a4 as I, a5 as N, a6 as z, a7 as U } from "./index-
|
|
2
|
-
import { g as y, d as G } from "./context-
|
|
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 p, K as w, N as f, O as F, P as d, Q as m, T as C, U as k, V as v, W as P, m as A, X as b, Y as x, Z as S, $ as V, a0 as M, a1 as T, a2 as B, r as E, u as D, a3 as O, a4 as I, a5 as N, a6 as z, a7 as U } from "./index-CgPGpMD4.js";
|
|
2
|
+
import { g as y, d as G } from "./context-DrPMCAhz.js";
|
|
3
3
|
export {
|
|
4
4
|
o as BkFlowCanvas,
|
|
5
5
|
s as BkFlowModelAccessor,
|