@blueking/bkflow-canvas-editor 1.1.0-beta.16 → 1.1.0-beta.17

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.
@@ -2,7 +2,7 @@ import { defineComponent as T, ref as y, shallowRef as q, watch as I, resolveCom
2
2
  import { InfoBox as P } from "bkui-vue/lib";
3
3
  import S from "bkui-vue/lib/message";
4
4
  import { cloneDeep as W } from "lodash";
5
- import { u as G, M as H, p as K, m as Q, r as x, f as X, a as Y, _ as Z } from "./index-D5NujJou.js";
5
+ import { u as G, M as H, p as K, m as Q, r as x, f as X, a as Y, _ as Z } from "./index-Dfjy7LPB.js";
6
6
  const $ = {
7
7
  key: 0,
8
8
  class: "mock-data-sideslider__title-sep"
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as $, ref as _, shallowRef as h, computed as V, watch as A, resolveComponent as C, resolveDirective as O, openBlock as c, createBlock as d, createSlots as P, withCtx as m, withDirectives as U, createElementBlock as K, createElementVNode as F, unref as G, createCommentVNode as g, createVNode as x, createTextVNode as B } from "vue";
2
2
  import { cloneDeep as p } from "lodash";
3
- import { u as H, i as S, g as Y, B as z, R as J, E as M, _ as Q } from "./index-D5NujJou.js";
3
+ import { u as H, i as S, g as Y, B as z, R as J, E as M, _ as Q } from "./index-Dfjy7LPB.js";
4
4
  import "bkui-vue/lib/message";
5
5
  import "bkui-vue/lib/icon";
6
6
  import "monaco-editor";
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as I, ref as S, computed as m, watch as K, nextTick as X, resolveComponent as A, openBlock as g, createElementBlock as w, createVNode as b, Fragment as Z, renderList as ee, withKeys as te, withModifiers as oe, normalizeClass as T, createElementVNode as a, createCommentVNode as H, toDisplayString as P, createSlots as j, withCtx as k, createTextVNode as B, onBeforeUnmount as se, resolveDirective as ne, normalizeStyle as ae, withDirectives as le, createBlock as q } from "vue";
2
- import { L as ie, S as ue, E as re, _ as Y, b as de, c as ce, o as pe, t as me, n as ve, D as J, C as be, d as fe, s as ge } from "./index-D5NujJou.js";
2
+ import { L as ie, S as ue, E as re, _ as Y, b as de, c as ce, o as pe, t as me, n as ve, D as J, C as be, d as fe, s as ge } from "./index-Dfjy7LPB.js";
3
3
  import { b as U } from "./context-0LckFRIf.js";
4
4
  const _e = { class: "debug-result-node-list" }, ye = ["data-node-id", "aria-selected", "onClick", "onKeydown"], ke = ["title"], we = {
5
5
  key: 0,
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),p=require("lodash"),i=require("./index-BEHD0pi6.cjs");require("bkui-vue/lib/message");require("bkui-vue/lib/icon");require("monaco-editor");const q={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"},_=t=>t.replace(/^\$\{(.+)\}$/,"$1"),k=t=>`\${${_(t)}}`;function D(t,u){const a=k(t.key),o=u?p.cloneDeep(u):{},c=t.custom_type??o.custom_type??q[t.type]??"input";return{...o,key:a,name:t.name??o.name??_(t.key),custom_type:c,desc:o.desc??"",index:o.index??0,show_type:"show",source_info:o.source_info??{},source_tag:o.source_tag??"",source_type:o.source_type??"custom",validation:o.validation??"",value:t.default??o.value,meta:{...o.meta??{},required:t.required??o.meta?.required??!1}}}function N(t,u={}){if(!t)return{};const a=t.constants;return a&&Object.keys(a).length>0?{...a}:Array.isArray(t.fields)&&t.fields.length>0?t.fields.reduce((o,c)=>{const l=k(c.key);return o[l]=D(c,u[l]),o},{}):{}}const j={class:"global-debug-input"},R={class:"form-params-wrapper"},E={class:"sideslider-footer-buttons"},T=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(t,{emit:u}){const a=t,o=u,c=i.useFlowApiConfig(),l=e.ref({}),b=e.shallowRef([]),d=e.shallowRef([]),m=e.shallowRef(!1),f=e.ref(),v=e.ref(),y=e.computed(()=>b.value.filter(n=>i.isBuiltinUsageVariable(n))),g=e.computed(()=>y.value.length>0||d.value.length>0);e.watch(()=>a.show,n=>{n&&(l.value=p.cloneDeep(a.initialValues??{}),w())});const w=async()=>{const n=N(a.schema,a.pipelineConstants),s=Object.values(n).filter(r=>typeof r=="object"&&r!==null&&r.show_type==="show");if(b.value=s,Object.keys(n).length<1){d.value=[];return}m.value=!0;try{d.value=await i.getInputFormsFromConstants(c,n)}catch(r){console.error("Failed to build debug input forms from schema:",r),d.value=[]}finally{m.value=!1}},V=n=>{l.value={...l.value,...p.cloneDeep(n)}},C=async()=>{const[n,s]=await Promise.all([Promise.resolve(typeof v.value?.validate=="function"?v.value.validate():!0),Promise.resolve(typeof f.value?.validate=="function"?f.value.validate():!0)]);!n||!s||o("confirm",p.cloneDeep(l.value))},h=()=>{o("close"),o("update:show",!1)};return(n,s)=>{const r=e.resolveComponent("bk-button"),x=e.resolveComponent("bk-sideslider"),B=e.resolveDirective("bkloading");return e.openBlock(),e.createBlock(x,{title:"调试参数","is-show":a.show,width:960,"quick-close":!0,"esc-close":!1,onClosed:h},e.createSlots({default:e.withCtx(()=>[e.withDirectives((e.openBlock(),e.createElementBlock("div",j,[e.createElementVNode("div",R,[y.value.length>0?(e.openBlock(),e.createBlock(e.unref(i.BuiltinVariableUsageForm),{key:0,ref_key:"builtinVariableFormRef",ref:v,modelValue:l.value,"onUpdate:modelValue":s[0]||(s[0]=F=>l.value=F),variables:y.value,editable:!a.readonly},null,8,["modelValue","variables","editable"])):e.createCommentVNode("",!0),d.value.length>0?(e.openBlock(),e.createBlock(i.RenderForm,{key:1,ref_key:"renderFormRef",ref:f,scheme:d.value,editable:!a.readonly,"form-option":{showRequired:!0,showGroup:!0,showLabel:!1,showHook:!1,showDesc:!0,formEdit:!a.readonly},"form-data":l.value,onChange:V},null,8,["scheme","editable","form-option","form-data"])):e.createCommentVNode("",!0),g.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(i.EmptyException,{key:2,title:"暂无参数"}))])])),[[B,{loading:m.value}]])]),_:2},[a.readonly?void 0:{name:"footer",fn:e.withCtx(()=>[e.createElementVNode("div",E,[e.createVNode(r,{theme:"primary","data-test":"save-and-run",loading:a.pending,onClick:C},{default:e.withCtx(()=>[...s[1]||(s[1]=[e.createTextVNode(" 保存并执行 ",-1)])]),_:1},8,["loading"]),e.createVNode(r,{disabled:a.pending,onClick:h},{default:e.withCtx(()=>[...s[2]||(s[2]=[e.createTextVNode("取消",-1)])]),_:1},8,["disabled"])])]),key:"0"}]),1032,["is-show"])}}}),I=i._export_sfc(T,[["__scopeId","data-v-22fd17ca"]]);exports.default=I;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),p=require("lodash"),i=require("./index-C9xkMVvP.cjs");require("bkui-vue/lib/message");require("bkui-vue/lib/icon");require("monaco-editor");const q={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"},_=t=>t.replace(/^\$\{(.+)\}$/,"$1"),k=t=>`\${${_(t)}}`;function D(t,u){const a=k(t.key),o=u?p.cloneDeep(u):{},c=t.custom_type??o.custom_type??q[t.type]??"input";return{...o,key:a,name:t.name??o.name??_(t.key),custom_type:c,desc:o.desc??"",index:o.index??0,show_type:"show",source_info:o.source_info??{},source_tag:o.source_tag??"",source_type:o.source_type??"custom",validation:o.validation??"",value:t.default??o.value,meta:{...o.meta??{},required:t.required??o.meta?.required??!1}}}function N(t,u={}){if(!t)return{};const a=t.constants;return a&&Object.keys(a).length>0?{...a}:Array.isArray(t.fields)&&t.fields.length>0?t.fields.reduce((o,c)=>{const l=k(c.key);return o[l]=D(c,u[l]),o},{}):{}}const j={class:"global-debug-input"},R={class:"form-params-wrapper"},E={class:"sideslider-footer-buttons"},T=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(t,{emit:u}){const a=t,o=u,c=i.useFlowApiConfig(),l=e.ref({}),b=e.shallowRef([]),d=e.shallowRef([]),m=e.shallowRef(!1),f=e.ref(),v=e.ref(),y=e.computed(()=>b.value.filter(n=>i.isBuiltinUsageVariable(n))),g=e.computed(()=>y.value.length>0||d.value.length>0);e.watch(()=>a.show,n=>{n&&(l.value=p.cloneDeep(a.initialValues??{}),w())});const w=async()=>{const n=N(a.schema,a.pipelineConstants),s=Object.values(n).filter(r=>typeof r=="object"&&r!==null&&r.show_type==="show");if(b.value=s,Object.keys(n).length<1){d.value=[];return}m.value=!0;try{d.value=await i.getInputFormsFromConstants(c,n)}catch(r){console.error("Failed to build debug input forms from schema:",r),d.value=[]}finally{m.value=!1}},V=n=>{l.value={...l.value,...p.cloneDeep(n)}},C=async()=>{const[n,s]=await Promise.all([Promise.resolve(typeof v.value?.validate=="function"?v.value.validate():!0),Promise.resolve(typeof f.value?.validate=="function"?f.value.validate():!0)]);!n||!s||o("confirm",p.cloneDeep(l.value))},h=()=>{o("close"),o("update:show",!1)};return(n,s)=>{const r=e.resolveComponent("bk-button"),x=e.resolveComponent("bk-sideslider"),B=e.resolveDirective("bkloading");return e.openBlock(),e.createBlock(x,{title:"调试参数","is-show":a.show,width:960,"quick-close":!0,"esc-close":!1,onClosed:h},e.createSlots({default:e.withCtx(()=>[e.withDirectives((e.openBlock(),e.createElementBlock("div",j,[e.createElementVNode("div",R,[y.value.length>0?(e.openBlock(),e.createBlock(e.unref(i.BuiltinVariableUsageForm),{key:0,ref_key:"builtinVariableFormRef",ref:v,modelValue:l.value,"onUpdate:modelValue":s[0]||(s[0]=F=>l.value=F),variables:y.value,editable:!a.readonly},null,8,["modelValue","variables","editable"])):e.createCommentVNode("",!0),d.value.length>0?(e.openBlock(),e.createBlock(i.RenderForm,{key:1,ref_key:"renderFormRef",ref:f,scheme:d.value,editable:!a.readonly,"form-option":{showRequired:!0,showGroup:!0,showLabel:!1,showHook:!1,showDesc:!0,formEdit:!a.readonly},"form-data":l.value,onChange:V},null,8,["scheme","editable","form-option","form-data"])):e.createCommentVNode("",!0),g.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(i.EmptyException,{key:2,title:"暂无参数"}))])])),[[B,{loading:m.value}]])]),_:2},[a.readonly?void 0:{name:"footer",fn:e.withCtx(()=>[e.createElementVNode("div",E,[e.createVNode(r,{theme:"primary","data-test":"save-and-run",loading:a.pending,onClick:C},{default:e.withCtx(()=>[...s[1]||(s[1]=[e.createTextVNode(" 保存并执行 ",-1)])]),_:1},8,["loading"]),e.createVNode(r,{disabled:a.pending,onClick:h},{default:e.withCtx(()=>[...s[2]||(s[2]=[e.createTextVNode("取消",-1)])]),_:1},8,["disabled"])])]),key:"0"}]),1032,["is-show"])}}}),I=i._export_sfc(T,[["__scopeId","data-v-22fd17ca"]]);exports.default=I;