epic-designer-gold 1.0.3 → 1.0.5
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/attributeView-B2dWB_U2.cjs +1 -0
- package/dist/attributeView-Cu_tjo9A.js +106 -0
- package/dist/axios-B8aFvCWj.cjs +6 -0
- package/dist/{js.cookie-oHpRFPCO.js → axios-Bb3STC1u.js} +942 -737
- package/dist/col-BNNn9Yx8.cjs +1 -0
- package/dist/{col-Dy6oYMf5.js → col-u5YiB-UK.js} +8 -8
- package/dist/index-21c4Pe3i.cjs +1 -0
- package/dist/{index-XUQ1VGQg.js → index-B553TaXm.js} +1 -1
- package/dist/index-BLJT8e0Q.js +195 -0
- package/dist/index-BULuVnVl.js +1359 -0
- package/dist/index-BV9SE7wG.cjs +1 -0
- package/dist/index-BhcwWM1G.cjs +1 -0
- package/dist/index-Bn8pwpgq.cjs +1 -0
- package/dist/index-Bxi3JLms.cjs +1 -0
- package/dist/{index-DLMH0OSJ.js → index-Bybwt7-u.js} +1 -1
- package/dist/index-CEDIwmNK.js +72 -0
- package/dist/index-CEvDmc0a.js +104 -0
- package/dist/{index-DJxuHxdI.js → index-CHCOxt3B.js} +24 -24
- package/dist/index-CI3dhGXT.cjs +1 -0
- package/dist/index-CMbBKMQU.js +71 -0
- package/dist/index-CYAKMqdR.cjs +1 -0
- package/dist/{index-BKDRMrcc.js → index-CgwN4ucQ.js} +28 -47
- package/dist/index-CjIIhZdV.js +271 -0
- package/dist/index-Cq6eLpKZ.cjs +1 -0
- package/dist/{index-CYDtBJTI.cjs → index-CqeRfqUw.cjs} +1 -1
- package/dist/index-CrV5FaWU.cjs +10 -0
- package/dist/{index-DNeYX6HK.js → index-D0kQz_zt.js} +1 -1
- package/dist/index-DR80h8IU.js +4 -0
- package/dist/index-DUMEtCCN.cjs +1 -0
- package/dist/index-DddTXMY9.cjs +1 -0
- package/dist/{index-Dyo12Kua.cjs → index-DeFAvWuV.cjs} +1 -1
- package/dist/index-DeZ09CHf.cjs +1 -0
- package/dist/index-Dg7MK40D.js +581 -0
- package/dist/index-DxNdcsD-.js +602 -0
- package/dist/index-DzxQG0o7.cjs +1 -0
- package/dist/{index-DkyxbMHi.js → index-VblxMq6V.js} +24 -24
- package/dist/index.cjs +1 -1
- package/dist/index.js +35 -35
- package/dist/locale/index.d.ts +4 -0
- package/dist/locale/lang/en-US.d.ts +246 -0
- package/dist/locale/lang/zh-cn.d.ts +246 -0
- package/dist/modal-BLOgN3us.cjs +1 -0
- package/dist/modal-UFu4bD6x.js +57 -0
- package/dist/outline-CK-jNomF.cjs +1 -0
- package/dist/{outline-CNayBNNC.js → outline-DxCKINRN.js} +2 -2
- package/dist/row-BWnbt6dh.cjs +1 -0
- package/dist/{row-qOviQw5w.js → row-DAy14ve9.js} +4 -4
- package/dist/sign-B-FCN_7O.js +219 -0
- package/dist/sign-Dho4kHTC.cjs +1 -0
- package/dist/style.css +1 -1
- package/dist/styleView-CRUqDcCl.cjs +1 -0
- package/dist/{styleView-BLVqzqPV.js → styleView-ClMjCfMk.js} +34 -33
- package/dist/{tree.vue_vue_type_script_setup_true_lang-BntCm43E.js → tree.vue_vue_type_script_setup_true_lang-B9rWLveX.js} +1 -1
- package/dist/tree.vue_vue_type_script_setup_true_lang-DDDqMedP.cjs +1 -0
- package/dist/ui/antd/date-picker/datePicker.d.ts +2 -2
- package/dist/ui/elementPlus/index.cjs +1 -1
- package/dist/ui/elementPlus/index.js +553 -542
- package/dist/ui/naiveUi/index.cjs +1 -1
- package/dist/ui/naiveUi/index.js +1 -1
- package/dist/uploadFile-Bc5Rxk0b.js +77 -0
- package/dist/uploadFile-oB2-NP-v.cjs +1 -0
- package/dist/uploadImage-4tgp3t7X.cjs +1 -0
- package/dist/uploadImage-CF7fobUP.cjs +1 -0
- package/dist/{uploadImage-742IA7ei.js → uploadImage-CGXm3zNQ.js} +34 -33
- package/dist/{uploadImage-CnNnAISs.js → uploadImage-COCC3pxH.js} +17 -20
- package/package.json +1 -1
- package/dist/attributeView-B-IswSw7.js +0 -105
- package/dist/attributeView-CQBVIMGW.cjs +0 -1
- package/dist/col-RWuL5Zuz.cjs +0 -1
- package/dist/index-0GtpyUBx.js +0 -64
- package/dist/index-B4ido7VJ.cjs +0 -1
- package/dist/index-BGvqo4s7.js +0 -104
- package/dist/index-BMtRXkSh.cjs +0 -1
- package/dist/index-BSLudrcT.cjs +0 -1
- package/dist/index-BXO8Zj1H.cjs +0 -1
- package/dist/index-B_9x_cPH.js +0 -1633
- package/dist/index-B_TFfRwe.js +0 -194
- package/dist/index-C3_E7xcD.js +0 -270
- package/dist/index-C3a1hfUC.cjs +0 -10
- package/dist/index-CucdgcqX.cjs +0 -1
- package/dist/index-CvEzOhT_.cjs +0 -1
- package/dist/index-DEPx91yu.cjs +0 -1
- package/dist/index-DKVv0PbJ.js +0 -56
- package/dist/index-DSzJgAzW.cjs +0 -1
- package/dist/index-Dz1OM1dD.cjs +0 -1
- package/dist/index-HNPgHrkl.cjs +0 -1
- package/dist/index-JhxJizMR.js +0 -601
- package/dist/index-aBofZ4Mk.js +0 -4
- package/dist/index-sKJ91s0r.cjs +0 -1
- package/dist/js.cookie-BH1G_HRi.cjs +0 -6
- package/dist/modal-BPJM1Muh.js +0 -59
- package/dist/modal-_fid8E1T.cjs +0 -1
- package/dist/outline-6Qt3qlWm.cjs +0 -1
- package/dist/row-Bm8OjIsU.cjs +0 -1
- package/dist/sign--js815Se.cjs +0 -1
- package/dist/sign-CO47QOTw.js +0 -218
- package/dist/styleView-C1zTBeyd.cjs +0 -1
- package/dist/tree.vue_vue_type_script_setup_true_lang-BjjL_VlR.cjs +0 -1
- package/dist/uploadFile-CYDDVa_x.js +0 -76
- package/dist/uploadFile-eWBMdZ9d.cjs +0 -1
- package/dist/uploadImage-BQhv5ymq.cjs +0 -1
- package/dist/uploadImage-BXcN2FA_.cjs +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./axios-B8aFvCWj.cjs"),b=require("./index-Cq6eLpKZ.cjs"),V=e.defineComponent({__name:"index",props:{modelValue:{}},emits:["update:modelValue"],setup(v,{emit:i}){const{t:p}=b.useLocale(),s=r.pluginManager.getComponent("input"),d=r.pluginManager.getComponent("select"),m=v,c=i,l=e.ref(null),t=e.ref("px"),f=[{label:"px",value:"px"},{label:"%",value:"%"},{label:"vw",value:"vw"},{label:"vh",value:"vh"},{label:"rem",value:"rem"},{label:"em",value:"em"},{label:"pt",value:"pt"}];e.watch(()=>m.modelValue,n=>{if(!n)return;if(typeof n=="number"){l.value=String(n),t.value="px";return}const u=parseFloat(n);if(isNaN(u))return l.value=null,!1;const a=/^(\d+(\.\d+)?)(px|%|vw|vh|rem|em|pt){1}$/,o=n.trim().match(a);l.value=(o==null?void 0:o[1])??null,t.value=(o==null?void 0:o[3])??""},{immediate:!0}),e.watch(()=>t.value+l.value,()=>{x()});function x(){e.nextTick(()=>c("update:modelValue",l.value?l.value+t.value:void 0))}return(n,u)=>(e.openBlock(),e.createBlock(e.unref(s),{class:"epic-input-size",modelValue:l.value,"onUpdate:modelValue":u[2]||(u[2]=a=>l.value=a),value:l.value,"onUpdate:value":u[3]||(u[3]=a=>l.value=a),type:"number",min:"0",placeholder:e.unref(p)("pleaseEnter")},{suffix:e.withCtx(()=>[e.createVNode(e.unref(d),{value:t.value,"onUpdate:value":u[0]||(u[0]=a=>t.value=a),modelValue:t.value,"onUpdate:modelValue":u[1]||(u[1]=a=>t.value=a),style:{width:"68px"},options:f},null,8,["value","modelValue"])]),_:1},8,["modelValue","value","placeholder"]))}});exports.default=V;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),b=require("./vuedraggable.umd-BqhSJIAi.cjs"),c=require("./axios-B8aFvCWj.cjs"),h=require("./icon.vue_vue_type_script_setup_true_lang-DJbUD5AQ.cjs"),k=require("./index-CrV5FaWU.cjs");require("element-plus");const C=require("./index-Cq6eLpKZ.cjs"),N=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),E={key:0,class:"pl-4"},B=e.defineComponent({name:"EOptionItem",__name:"optionItem",props:{modelValue:{}},emits:["update:modelValue"],setup(_,{emit:f}){const o=_,m=c.pluginManager.getComponent("input"),v=e.inject("tree",!1),d=f,r=k.useVModel(o,"modelValue",d);function s(l){const n={label:"",value:""};l.children?l.children.push(n):l.children=[n]}function V(l){r.value=r.value.filter((n,p)=>p!==l)}return(l,n)=>{const p=e.resolveComponent("EOptionItem");return e.openBlock(),e.createBlock(e.unref(b.draggable),{modelValue:e.unref(r),"onUpdate:modelValue":n[0]||(n[0]=a=>e.isRef(r)?r.value=a:null),"item-key":"id","component-data":{type:"transition-group"},group:"option-list",handle:".handle",animation:200},{item:e.withCtx(({element:a,index:g})=>[e.createElementVNode("div",null,[e.createElementVNode("div",{class:e.normalizeClass([e.unref(v)?"grid-cols-[16px_auto_auto_16px_16px]":"grid-cols-[16px_auto_auto_16px]","option-item text-16px grid text-$epic-text-secondary gap-2 items-center mb-2"])},[e.createVNode(e.unref(h._sfc_main),{class:"mr-2 cursor-move handle",name:"icon--epic--drag"}),e.createVNode(e.unref(m),{modelValue:a.label,"onUpdate:modelValue":t=>a.label=t,value:a.label,"onUpdate:value":t=>a.label=t,placeholder:"label"},null,8,["modelValue","onUpdate:modelValue","value","onUpdate:value"]),e.createVNode(e.unref(m),{modelValue:a.value,"onUpdate:modelValue":t=>a.value=t,value:a.value,"onUpdate:value":t=>a.value=t,placeholder:"value"},null,8,["modelValue","onUpdate:modelValue","value","onUpdate:value"]),e.unref(v)?(e.openBlock(),e.createBlock(e.unref(h._sfc_main),{key:0,class:"cursor-pointer text-lg!",name:"icon--epic--add-rounded",onClick:t=>s(a)},null,8,["onClick"])):e.createCommentVNode("",!0),e.createVNode(e.unref(h._sfc_main),{class:"hover:text-red cursor-pointer",name:"icon--epic--delete-outline-rounded",onClick:t=>V(g)},null,8,["onClick"])],2),a.children?(e.openBlock(),e.createElementBlock("div",E,[e.createVNode(p,{modelValue:a.children,"onUpdate:modelValue":t=>a.children=t},null,8,["modelValue","onUpdate:modelValue"])])):e.createCommentVNode("",!0)])]),_:1},8,["modelValue"])}}}),S={class:""},U={class:"epic-tabs-box"},M=["title","onClick"],D={key:0},I={key:1},O={style:{"font-size":"12px","margin-bottom":"8px",display:"inline-block"}},q=e.defineComponent({__name:"index",props:{tree:{type:Boolean},modelValue:{},dynamicId:{},type:{}},emits:["update:modelValue","update:EOptionsEditor"],setup(_,{emit:f}){const{t:o}=C.useLocale(),m=c.pluginManager.getComponent("button"),v=c.pluginManager.getComponent("select"),d=e.ref([]),r=e.reactive({title:o("static")}),s=_,V=f;c.EventBus.on("deleteSourceData",t=>{n.value===t&&(n.value="",l.value=[])}),c.EventBus.on("updateSource",t=>{d.value=c.pluginManager.sourceData.map(u=>({...u,label:u.apiName,value:u.id}))}),e.onMounted(()=>{d.value=c.pluginManager.sourceData.map(t=>({...t,label:t.apiName,value:t.id}))});const l=k.useVModel(s,"modelValue",V),n=k.useVModel(s,"dynamicId",V);e.watch(()=>n.value,async()=>{n.value?r.title=o("dynamic"):r.title=o("static")},{immediate:!0});const p=[{title:o("static")},{title:o("dynamic")}];async function a(t){r.title=t.title,t.title===o("static")?(l.value=[],n.value=""):(l.value=[],d.value=c.pluginManager.sourceData.map(u=>({...u,label:u.apiName,value:u.id})))}s.modelValue,e.provide("tree",s.tree);function g(){const t=e.reactive({label:"",value:""});l.value.length?l.value=[...l.value,t]:l.value=[t]}return(t,u)=>{var y;return e.openBlock(),e.createElementBlock("div",S,[e.createElementVNode("div",null,[e.createElementVNode("div",U,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(p,(i,x)=>e.createElementVNode("div",{class:e.normalizeClass(["epic-tab cursor-pointer truncate",{checked:r.title===i.title}]),key:x,title:i.title,onClick:w=>a(i)},e.toDisplayString(i.title),11,M)),64))]),r.title===e.unref(o)("static")?(e.openBlock(),e.createElementBlock("div",D,[e.withDirectives(e.createElementVNode("div",{class:"py-4 my-2 text-center text-gray-400 bg-white"},e.toDisplayString(e.unref(o)("noOptions")),513),[[e.vShow,!((y=e.unref(l))!=null&&y.length)]]),e.createVNode(B,{modelValue:e.unref(l),"onUpdate:modelValue":u[0]||(u[0]=i=>e.isRef(l)?l.value=i:null)},null,8,["modelValue"]),e.createVNode(e.unref(m),{onClick:g},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)("addOption")),1)]),_:1})])):(e.openBlock(),e.createElementBlock("div",I,[e.createElementVNode("span",O,e.toDisplayString(e.unref(o)("dataSources")),1),e.createVNode(e.unref(v),{modelValue:e.unref(n),"onUpdate:modelValue":u[1]||(u[1]=i=>e.isRef(n)?n.value=i:null),placeholder:e.unref(o)("pleaseSelectDataSource"),clearable:"",options:d.value},null,8,["modelValue","placeholder","options"])]))])])}}}),$=N._export_sfc(q,[["__scopeId","data-v-040f106d"]]);exports.default=$;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),c=require("./axios-B8aFvCWj.cjs"),k=require("./icon.vue_vue_type_script_setup_true_lang-DJbUD5AQ.cjs"),V=require("./index-Cq6eLpKZ.cjs"),f={key:0,class:"epic-del-btn"},g=["onClick"],h=e.defineComponent({__name:"index",props:{modelValue:{type:Array,default:()=>[]}},emits:["update:modelValue"],setup(r,{emit:u}){const{t:s}=V.useLocale(),d=c.pluginManager.getComponent("number"),p=r,i=u,o=e.computed({get(){return p.modelValue},set(t){i("update:modelValue",t)}});function m(){const t={type:"col",children:[],componentProps:{span:12},id:c.getUUID()};o.value.push(t)}function _(t){o.value=o.value.filter((v,n)=>t!==n)}return(t,v)=>(e.openBlock(),e.createElementBlock("div",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value,(n,a)=>(e.openBlock(),e.createElementBlock("div",{key:a,class:"EColEditor-item"},[e.createVNode(e.unref(d),{value:n.componentProps.span,"onUpdate:value":l=>n.componentProps.span=l,modelValue:n.componentProps.span,"onUpdate:modelValue":l=>n.componentProps.span=l,style:{width:"100%"},min:1,max:24},null,8,["value","onUpdate:value","modelValue","onUpdate:modelValue"]),o.value.length>1?(e.openBlock(),e.createElementBlock("div",f,[e.createElementVNode("span",{onClick:l=>_(a)},[e.createVNode(e.unref(k._sfc_main),{name:"icon--epic--trash"})],8,g)])):e.createCommentVNode("",!0)]))),128)),e.createElementVNode("div",{class:"add-btn",onClick:m},e.toDisplayString(e.unref(s)("add")),1)]))}});exports.default=h;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),p=require("./axios-B8aFvCWj.cjs"),m=require("./icon.vue_vue_type_script_setup_true_lang-DJbUD5AQ.cjs"),f={class:"epic-breadcrumb pl-4 py-2 truncate h-40px flex items-center"},h={key:0,class:"flex items-center"},v={key:0},k=["onClick","onMouseenter"],g=e.defineComponent({__name:"breadcrumb",setup(_){const t=e.inject("designer");function i(r){t.setCheckedNode(r)}return(r,n)=>(e.openBlock(),e.createElementBlock("div",f,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(t).state.matched,(l,c)=>{var a;return e.openBlock(),e.createElementBlock("span",{key:c},[c>e.unref(t).state.matched.length-4?(e.openBlock(),e.createElementBlock("span",h,[e.unref(t).state.matched.length>3&&c===e.unref(t).state.matched.length-3?(e.openBlock(),e.createElementBlock("span",v,"...")):e.createCommentVNode("",!0),c!==0?(e.openBlock(),e.createBlock(e.unref(m._sfc_main),{key:1,class:"m-1",name:"icon--epic--arrow-forward-ios-rounded"})):e.createCommentVNode("",!0),e.createElementVNode("span",{class:"node-item cursor-pointer",onClick:o=>i(l),onMouseenter:e.withModifiers(o=>e.unref(t).setHoverNode(l),["stop"]),onMouseleave:n[0]||(n[0]=e.withModifiers(o=>e.unref(t).setHoverNode(null),["stop"]))},e.toDisplayString(l.label??((a=e.unref(p.pluginManager).getComponentConfingByType(l.type))==null?void 0:a.defaultSchema.label)),41,k)])):e.createCommentVNode("",!0)])}),128))]))}}),B={key:0,class:"epic-right-sidebar-container relative"},C={class:"w-308px"},b={class:"epic-actions-container"},y=["title","onClick"],N={class:"epic-sidebar-content"},E=e.defineComponent({__name:"index",setup(_){var a;const t=e.ref(!1),i=e.computed(()=>p.pluginManager.viewsContainers.rightSidebars.value.filter(o=>o.visible)),r=e.ref(0),n=e.shallowRef(null);n.value=(a=i.value[0])==null?void 0:a.component;function l(){t.value=!t.value}function c(o,s){if(r.value===s)return!1;n.value=o.component,r.value=s}return(o,s)=>n.value?(e.openBlock(),e.createElementBlock("div",B,[e.createElementVNode("div",{class:"epic-right-sidebar-hide-btn absolute left--18px top-80px cursor-pointer rounded-full flex justify-center items-center w-28px h-28px z-9",onClick:l},[e.createVNode(e.unref(m._sfc_main),{class:e.normalizeClass(["transition-all",{"rotate-180":t.value}]),name:"icon--epic--arrow-forward-ios-rounded"},null,8,["class"])]),s[0]||(s[0]=e.createElementVNode("div",{class:"w-10px"},null,-1)),e.createElementVNode("div",{class:e.normalizeClass(["epic-right-sidebar w-308px",{hide:t.value}])},[e.createElementVNode("div",C,[e.createVNode(g),e.createElementVNode("ul",b,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(u,d)=>(e.openBlock(),e.createElementBlock("li",{key:d,class:e.normalizeClass(["epic-action-item",{checked:r.value===d}]),title:u.title,onClick:V=>c(u,d)},e.toDisplayString(u.title),11,y))),128))]),e.createElementVNode("div",N,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(n.value)))])])],2)])):e.createCommentVNode("",!0)}});exports.default=E;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as g, ref as p, onMounted as h, watch as v, nextTick as V, openBlock as _, createElementBlock as T } from "vue";
|
|
2
2
|
import * as a from "monaco-editor";
|
|
3
|
-
import {
|
|
3
|
+
import { h as b } from "./index-BULuVnVl.js";
|
|
4
4
|
import { _ as y } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
5
5
|
const x = /* @__PURE__ */ g({
|
|
6
6
|
__name: "index",
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { defineComponent as g, ref as p, watch as r, nextTick as w, openBlock as U, createBlock as y, unref as o, withCtx as C, createVNode as k } from "vue";
|
|
2
|
+
import { p as v } from "./axios-Bb3STC1u.js";
|
|
3
|
+
import { u as N } from "./index-Dg7MK40D.js";
|
|
4
|
+
const A = /* @__PURE__ */ g({
|
|
5
|
+
__name: "index",
|
|
6
|
+
props: {
|
|
7
|
+
modelValue: {}
|
|
8
|
+
},
|
|
9
|
+
emits: ["update:modelValue"],
|
|
10
|
+
setup(m, { emit: i }) {
|
|
11
|
+
const { t: s } = N(), d = v.getComponent("input"), f = v.getComponent("select"), x = m, c = i, e = p(null), u = p("px"), V = [
|
|
12
|
+
{ label: "px", value: "px" },
|
|
13
|
+
{ label: "%", value: "%" },
|
|
14
|
+
{ label: "vw", value: "vw" },
|
|
15
|
+
{ label: "vh", value: "vh" },
|
|
16
|
+
{ label: "rem", value: "rem" },
|
|
17
|
+
{ label: "em", value: "em" },
|
|
18
|
+
{ label: "pt", value: "pt" }
|
|
19
|
+
];
|
|
20
|
+
r(
|
|
21
|
+
() => x.modelValue,
|
|
22
|
+
(t) => {
|
|
23
|
+
if (!t) return;
|
|
24
|
+
if (typeof t == "number") {
|
|
25
|
+
e.value = String(t), u.value = "px";
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
const l = parseFloat(t);
|
|
29
|
+
if (isNaN(l))
|
|
30
|
+
return e.value = null, !1;
|
|
31
|
+
const a = /^(\d+(\.\d+)?)(px|%|vw|vh|rem|em|pt){1}$/, n = t.trim().match(a);
|
|
32
|
+
e.value = (n == null ? void 0 : n[1]) ?? null, u.value = (n == null ? void 0 : n[3]) ?? "";
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
immediate: !0
|
|
36
|
+
}
|
|
37
|
+
), r(
|
|
38
|
+
() => u.value + e.value,
|
|
39
|
+
() => {
|
|
40
|
+
b();
|
|
41
|
+
}
|
|
42
|
+
);
|
|
43
|
+
function b() {
|
|
44
|
+
w(() => c("update:modelValue", e.value ? e.value + u.value : void 0));
|
|
45
|
+
}
|
|
46
|
+
return (t, l) => (U(), y(o(d), {
|
|
47
|
+
class: "epic-input-size",
|
|
48
|
+
modelValue: e.value,
|
|
49
|
+
"onUpdate:modelValue": l[2] || (l[2] = (a) => e.value = a),
|
|
50
|
+
value: e.value,
|
|
51
|
+
"onUpdate:value": l[3] || (l[3] = (a) => e.value = a),
|
|
52
|
+
type: "number",
|
|
53
|
+
min: "0",
|
|
54
|
+
placeholder: o(s)("pleaseEnter")
|
|
55
|
+
}, {
|
|
56
|
+
suffix: C(() => [
|
|
57
|
+
k(o(f), {
|
|
58
|
+
value: u.value,
|
|
59
|
+
"onUpdate:value": l[0] || (l[0] = (a) => u.value = a),
|
|
60
|
+
modelValue: u.value,
|
|
61
|
+
"onUpdate:modelValue": l[1] || (l[1] = (a) => u.value = a),
|
|
62
|
+
style: { width: "68px" },
|
|
63
|
+
options: V
|
|
64
|
+
}, null, 8, ["value", "modelValue"])
|
|
65
|
+
]),
|
|
66
|
+
_: 1
|
|
67
|
+
}, 8, ["modelValue", "value", "placeholder"]));
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
export {
|
|
71
|
+
A as default
|
|
72
|
+
};
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { defineComponent as E, inject as r, ref as w, computed as V, openBlock as h, createElementBlock as v, createElementVNode as a, createVNode as d, unref as o, withCtx as L, Fragment as F, renderList as M, normalizeClass as j, toDisplayString as f, mergeProps as q, withDirectives as z, vShow as A } from "vue";
|
|
2
|
+
import { d as G } from "./vuedraggable.umd-D2S7Eo7p.js";
|
|
3
|
+
import { p, i as B, q as H } from "./axios-Bb3STC1u.js";
|
|
4
|
+
import { _ as I } from "./icon.vue_vue_type_script_setup_true_lang-D3QdcReY.js";
|
|
5
|
+
import { u as J } from "./index-Dg7MK40D.js";
|
|
6
|
+
const K = { class: "epic-component-view flex flex-col" }, O = { class: "epic-search-box px-10px py-6px" }, Q = { class: "flex flex-1 overflow-auto" }, R = { class: "epic-tabs-box" }, W = ["title", "onClick"], X = { class: "h-full flex-1 overflow-auto py-2 box-border" }, Y = ["onClick"], Z = { class: "epic-componet-label flex-1 w-0 truncate" }, se = /* @__PURE__ */ E({
|
|
7
|
+
__name: "index",
|
|
8
|
+
setup(ee) {
|
|
9
|
+
const { t: c } = J(), N = p.getComponent("input"), g = r("pageSchema"), x = r("designer"), $ = r("revoke"), P = r("designerProps"), _ = p.getComponentSchemaGroups(), s = w(""), C = {
|
|
10
|
+
title: c("all"),
|
|
11
|
+
list: []
|
|
12
|
+
}, i = w(C), T = V(() => [C, ..._.value]), u = V(() => {
|
|
13
|
+
let l = i.value.list;
|
|
14
|
+
if (i.value.title === c("all")) {
|
|
15
|
+
const t = _.value.map((e) => e.list);
|
|
16
|
+
l = [].concat(...t);
|
|
17
|
+
}
|
|
18
|
+
return l.filter(
|
|
19
|
+
(t) => {
|
|
20
|
+
var e;
|
|
21
|
+
return ((e = t.label) == null ? void 0 : e.includes(s.value)) && (!P.value.formMode || t.type !== "form");
|
|
22
|
+
}
|
|
23
|
+
);
|
|
24
|
+
});
|
|
25
|
+
function U(l) {
|
|
26
|
+
i.value = l;
|
|
27
|
+
}
|
|
28
|
+
function D(l) {
|
|
29
|
+
var y, S, b;
|
|
30
|
+
const t = H(g.schemas, ((y = x.state.checkedNode) == null ? void 0 : y.id) ?? "root");
|
|
31
|
+
if (!t)
|
|
32
|
+
return !1;
|
|
33
|
+
let { list: e, schema: n, index: m } = t;
|
|
34
|
+
n.children && !((b = (S = p.getComponentConfingByType(n.type)) == null ? void 0 : S.editConstraints) != null && b.childImmovable) && (e = n.children, m = n.children.length - 1);
|
|
35
|
+
const k = B(l);
|
|
36
|
+
e.splice(m + 1, 0, k), x.setCheckedNode(k), $.push(g.schemas, "插入组件");
|
|
37
|
+
}
|
|
38
|
+
return (l, t) => (h(), v("div", K, [
|
|
39
|
+
a("div", O, [
|
|
40
|
+
d(o(N), {
|
|
41
|
+
placeholder: o(c)("searchComponent"),
|
|
42
|
+
modelValue: s.value,
|
|
43
|
+
"onUpdate:modelValue": t[0] || (t[0] = (e) => s.value = e),
|
|
44
|
+
clearable: "",
|
|
45
|
+
allowClear: "",
|
|
46
|
+
value: s.value,
|
|
47
|
+
"onUpdate:value": t[1] || (t[1] = (e) => s.value = e)
|
|
48
|
+
}, {
|
|
49
|
+
prefix: L(() => [
|
|
50
|
+
d(o(I), {
|
|
51
|
+
class: "text-$epic-text-helper",
|
|
52
|
+
name: "icon--epic--search-rounded"
|
|
53
|
+
})
|
|
54
|
+
]),
|
|
55
|
+
_: 1
|
|
56
|
+
}, 8, ["placeholder", "modelValue", "value"])
|
|
57
|
+
]),
|
|
58
|
+
a("div", Q, [
|
|
59
|
+
a("div", R, [
|
|
60
|
+
(h(!0), v(F, null, M(T.value, (e, n) => (h(), v("div", {
|
|
61
|
+
class: j(["epic-tab cursor-pointer truncate", { checked: i.value.title === e.title }]),
|
|
62
|
+
key: n,
|
|
63
|
+
title: e.title,
|
|
64
|
+
onClick: (m) => U(e)
|
|
65
|
+
}, f(e.title), 11, W))), 128))
|
|
66
|
+
]),
|
|
67
|
+
a("div", X, [
|
|
68
|
+
d(o(G), q({
|
|
69
|
+
modelValue: u.value,
|
|
70
|
+
"onUpdate:modelValue": t[2] || (t[2] = (e) => u.value = e)
|
|
71
|
+
}, {
|
|
72
|
+
group: { name: "edit-draggable", pull: "clone", put: !1 },
|
|
73
|
+
sort: !1,
|
|
74
|
+
animation: 180,
|
|
75
|
+
ghostClass: "moving"
|
|
76
|
+
}, {
|
|
77
|
+
clone: o(B),
|
|
78
|
+
"item-key": "id",
|
|
79
|
+
class: "grid grid-cols-[auto_auto] px-10px gap-2"
|
|
80
|
+
}), {
|
|
81
|
+
item: L(({ element: e }) => [
|
|
82
|
+
a("div", {
|
|
83
|
+
class: "epic-componet-item flex items-center truncate",
|
|
84
|
+
onClick: (n) => D(e)
|
|
85
|
+
}, [
|
|
86
|
+
d(o(I), {
|
|
87
|
+
name: o(p).getComponentConfingByType(e.type).icon ?? ""
|
|
88
|
+
}, null, 8, ["name"]),
|
|
89
|
+
a("div", Z, f(e.label), 1)
|
|
90
|
+
], 8, Y)
|
|
91
|
+
]),
|
|
92
|
+
_: 1
|
|
93
|
+
}, 16, ["modelValue", "clone"]),
|
|
94
|
+
z(a("div", { class: "text-center pt-42px text-gray-400" }, f(o(c)("noComponentFound")), 513), [
|
|
95
|
+
[A, !u.value.length]
|
|
96
|
+
])
|
|
97
|
+
])
|
|
98
|
+
])
|
|
99
|
+
]));
|
|
100
|
+
}
|
|
101
|
+
});
|
|
102
|
+
export {
|
|
103
|
+
se as default
|
|
104
|
+
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { defineComponent as U, inject as L, openBlock as p, createElementBlock as g, Fragment as A, renderList as T, createElementVNode as i, toDisplayString as O, createVNode as C, unref as _, withCtx as R, createCommentVNode as G, createTextVNode as J, ref as E, computed as S, withDirectives as F, normalizeClass as j, vShow as P, reactive as H, createBlock as K, nextTick as Q, toRaw as z, watch as W } from "vue";
|
|
2
|
-
import {
|
|
3
|
-
import { p as w } from "./js.cookie-oHpRFPCO.js";
|
|
2
|
+
import { o as q, p as w, g as X, a as Y } from "./axios-Bb3STC1u.js";
|
|
4
3
|
import { _ as D } from "./icon.vue_vue_type_script_setup_true_lang-D3QdcReY.js";
|
|
5
|
-
import { d as
|
|
6
|
-
import { _ as
|
|
4
|
+
import { d as Z } from "./vuedraggable.umd-D2S7Eo7p.js";
|
|
5
|
+
import { _ as ee } from "./tree.vue_vue_type_script_setup_true_lang-B9rWLveX.js";
|
|
6
|
+
import { _ as te } from "./index-BULuVnVl.js";
|
|
7
7
|
const ne = { class: "epic-event-info" }, oe = ["title"], le = { class: "epic-event-btn text-lg flex items-center text-$epic-text-secondary" }, ae = { class: "epic-action-editor-main" }, se = { class: "epic-editor-item rounded" }, ie = { class: "w-36px flex items-center text-lg" }, ce = { class: "flex-1" }, de = { key: 0 }, ue = { key: 1 }, re = { key: 2 }, pe = { class: "epic-action-box text-lg text-$epic-text-medium" }, me = ["onClick"], ve = ["onClick"], fe = /* @__PURE__ */ U({
|
|
8
8
|
__name: "EActionEditorItem",
|
|
9
9
|
props: {
|
|
@@ -25,8 +25,8 @@ const ne = { class: "epic-event-info" }, oe = ["title"], le = { class: "epic-eve
|
|
|
25
25
|
}
|
|
26
26
|
},
|
|
27
27
|
emits: ["add", "edit", "update:modelValue"],
|
|
28
|
-
setup(
|
|
29
|
-
const m =
|
|
28
|
+
setup(k, { emit: b }) {
|
|
29
|
+
const m = k, x = b, f = L("pageSchema");
|
|
30
30
|
function V(v) {
|
|
31
31
|
x("add", v);
|
|
32
32
|
}
|
|
@@ -49,7 +49,7 @@ const ne = { class: "epic-event-info" }, oe = ["title"], le = { class: "epic-eve
|
|
|
49
49
|
c[l.type] = m.events[l.type];
|
|
50
50
|
}), c;
|
|
51
51
|
}
|
|
52
|
-
return (v, c) => (p(!0), g(A, null, T(
|
|
52
|
+
return (v, c) => (p(!0), g(A, null, T(k.itemEvents, (l) => (p(), g("div", {
|
|
53
53
|
key: l.type,
|
|
54
54
|
class: "epic-event-item"
|
|
55
55
|
}, [
|
|
@@ -66,7 +66,7 @@ const ne = { class: "epic-event-info" }, oe = ["title"], le = { class: "epic-eve
|
|
|
66
66
|
])
|
|
67
67
|
]),
|
|
68
68
|
i("div", ae, [
|
|
69
|
-
C(_(
|
|
69
|
+
C(_(Z), {
|
|
70
70
|
modelValue: m.events[l.type],
|
|
71
71
|
"onUpdate:modelValue": (e) => m.events[l.type] = e,
|
|
72
72
|
"item-key": "id",
|
|
@@ -112,8 +112,8 @@ const ne = { class: "epic-event-info" }, oe = ["title"], le = { class: "epic-eve
|
|
|
112
112
|
}
|
|
113
113
|
}), he = { class: "h-full flex flex-col" }, ge = /* @__PURE__ */ U({
|
|
114
114
|
__name: "EScriptEdit",
|
|
115
|
-
setup(
|
|
116
|
-
const
|
|
115
|
+
setup(k) {
|
|
116
|
+
const b = w.getComponent("monacoEditor"), m = {
|
|
117
117
|
theme: "vs-light",
|
|
118
118
|
selectOnLineNumbers: !0,
|
|
119
119
|
minimap: {
|
|
@@ -122,7 +122,7 @@ const ne = { class: "epic-event-info" }, oe = ["title"], le = { class: "epic-eve
|
|
|
122
122
|
}, x = E(null), f = L("pageSchema");
|
|
123
123
|
return (V, h) => (p(), g("div", he, [
|
|
124
124
|
h[1] || (h[1] = i("div", { class: "pb-2" }, " 自定义函数编辑 ", -1)),
|
|
125
|
-
C(_(
|
|
125
|
+
C(_(b), {
|
|
126
126
|
ref_key: "monacoEditorRef",
|
|
127
127
|
ref: x,
|
|
128
128
|
autoToggleTheme: "",
|
|
@@ -141,8 +141,8 @@ const ne = { class: "epic-event-info" }, oe = ["title"], le = { class: "epic-eve
|
|
|
141
141
|
actionArgsConfigs: {}
|
|
142
142
|
},
|
|
143
143
|
emits: ["update:modelValue"],
|
|
144
|
-
setup(
|
|
145
|
-
const m =
|
|
144
|
+
setup(k, { emit: b }) {
|
|
145
|
+
const m = k, x = b, f = S(() => m.modelValue ? JSON.parse(m.modelValue) : []);
|
|
146
146
|
function V(r) {
|
|
147
147
|
var u;
|
|
148
148
|
return typeof r.show == "boolean" ? r.show : typeof r.show == "function" ? (u = r.show) == null ? void 0 : u.call(r, { values: f.value }) : !0;
|
|
@@ -165,7 +165,7 @@ const ne = { class: "epic-event-info" }, oe = ["title"], le = { class: "epic-eve
|
|
|
165
165
|
title: n.label
|
|
166
166
|
}, O(n.label), 9, ye),
|
|
167
167
|
i("div", xe, [
|
|
168
|
-
C(_(
|
|
168
|
+
C(_(te), {
|
|
169
169
|
componentSchema: { ...n, componentProps: { ...n.componentProps, input: !1, field: void 0, hidden: !1 }, show: !0, noFormItem: !0 },
|
|
170
170
|
"model-value": f.value[n.field],
|
|
171
171
|
"onUpdate:modelValue": (v) => h(v, n.field)
|
|
@@ -177,13 +177,13 @@ const ne = { class: "epic-event-info" }, oe = ["title"], le = { class: "epic-eve
|
|
|
177
177
|
]))), 128))
|
|
178
178
|
]));
|
|
179
179
|
}
|
|
180
|
-
}), Ce = { class: "rounded epic-modal-action-main" }, Ve = { class: "epic-modal-left-panel h-full flex flex-col" },
|
|
180
|
+
}), Ce = { class: "rounded epic-modal-action-main" }, Ve = { class: "epic-modal-left-panel h-full flex flex-col" }, be = { class: "flex flex-1 h-0 flex-col" }, ke = { class: "flex-1 h-0" }, Ee = { class: "epic-action-select h-30/100 flex flex-col" }, $e = { class: "flex-1 overflow-auto pr-8px" }, Ne = ["onClick"], Se = { class: "text-center pt-42px text-gray-400" }, we = { class: "epic-modal-right-panel" }, Oe = {
|
|
181
181
|
key: 1,
|
|
182
182
|
class: "text-center pt-42px text-gray-400"
|
|
183
183
|
}, Ae = /* @__PURE__ */ U({
|
|
184
184
|
__name: "EActionModal",
|
|
185
185
|
emits: ["add", "edit"],
|
|
186
|
-
setup(
|
|
186
|
+
setup(k, { expose: b, emit: m }) {
|
|
187
187
|
const x = w.getComponent("modal"), f = E(!0), V = L("pageSchema"), h = L("pageManager", {}), r = E(!1), u = E([]), n = E(null), v = m, c = S(() => {
|
|
188
188
|
var o;
|
|
189
189
|
return e.actionItem.type === "component" ? n.value ? (o = w.getComponentConfings()[n.value.type].config.action) == null ? void 0 : o.map((t) => ({
|
|
@@ -206,7 +206,7 @@ const ne = { class: "epic-event-info" }, oe = ["title"], le = { class: "epic-eve
|
|
|
206
206
|
...n.value,
|
|
207
207
|
label: "设置数据",
|
|
208
208
|
field: "0",
|
|
209
|
-
id:
|
|
209
|
+
id: X()
|
|
210
210
|
});
|
|
211
211
|
}
|
|
212
212
|
return (t == null ? void 0 : t.argsConfigs) ?? [];
|
|
@@ -238,7 +238,7 @@ const ne = { class: "epic-event-info" }, oe = ["title"], le = { class: "epic-eve
|
|
|
238
238
|
alert("请先选择动作方法");
|
|
239
239
|
return;
|
|
240
240
|
}
|
|
241
|
-
v(f.value ? "add" : "edit",
|
|
241
|
+
v(f.value ? "add" : "edit", Y(z(e.actionItem))), M();
|
|
242
242
|
}
|
|
243
243
|
function M() {
|
|
244
244
|
r.value = !1, u.value = [], e.cacheData = {};
|
|
@@ -254,7 +254,7 @@ const ne = { class: "epic-event-info" }, oe = ["title"], le = { class: "epic-eve
|
|
|
254
254
|
function d(o) {
|
|
255
255
|
e.actionItem.methodName = o, e.actionItem.args = e.cacheData[e.actionItem.componentId + e.actionItem.methodName];
|
|
256
256
|
}
|
|
257
|
-
return
|
|
257
|
+
return b({
|
|
258
258
|
handleOpen: $,
|
|
259
259
|
handleOpenEdit: N
|
|
260
260
|
}), (o, t) => (p(), K(_(x), {
|
|
@@ -271,7 +271,7 @@ const ne = { class: "epic-event-info" }, oe = ["title"], le = { class: "epic-eve
|
|
|
271
271
|
return [
|
|
272
272
|
i("div", Ce, [
|
|
273
273
|
i("div", Ve, [
|
|
274
|
-
i("div",
|
|
274
|
+
i("div", be, [
|
|
275
275
|
i("div", {
|
|
276
276
|
class: j(["fun-btn", { checked: e.actionItem.type === "custom" }]),
|
|
277
277
|
onClick: t[0] || (t[0] = (y) => s("custom"))
|
|
@@ -281,8 +281,8 @@ const ne = { class: "epic-event-info" }, oe = ["title"], le = { class: "epic-eve
|
|
|
281
281
|
onClick: t[1] || (t[1] = (y) => s("public"))
|
|
282
282
|
}, " 公共函数 ", 2),
|
|
283
283
|
t[5] || (t[5] = J(" 组件 ")),
|
|
284
|
-
i("div",
|
|
285
|
-
C(_(
|
|
284
|
+
i("div", ke, [
|
|
285
|
+
C(_(ee), {
|
|
286
286
|
selectedKeys: u.value,
|
|
287
287
|
"onUpdate:selectedKeys": t[2] || (t[2] = (y) => u.value = y),
|
|
288
288
|
options: _(V).schemas,
|
|
@@ -332,10 +332,10 @@ const ne = { class: "epic-event-info" }, oe = ["title"], le = { class: "epic-eve
|
|
|
332
332
|
}
|
|
333
333
|
},
|
|
334
334
|
emits: ["update:modelValue"],
|
|
335
|
-
setup(
|
|
335
|
+
setup(k, { emit: b }) {
|
|
336
336
|
const m = w.getComponent("Collapse"), x = w.getComponent("CollapseItem"), f = E(null);
|
|
337
337
|
let V = 0;
|
|
338
|
-
const h =
|
|
338
|
+
const h = k, r = b, u = S({
|
|
339
339
|
get() {
|
|
340
340
|
return h.modelValue;
|
|
341
341
|
},
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./axios-B8aFvCWj.cjs"),u=require("./icon.vue_vue_type_script_setup_true_lang-DJbUD5AQ.cjs"),v={class:"flex relative"},d={class:"epic-action-bar"},_={class:"epic-actions-container"},p=["title","onClick"],m={class:"text-14px"},f={class:"epic-sidebar-container"},k=e.defineComponent({name:"EActivityBar",__name:"index",setup(h){const i=e.computed(()=>r.pluginManager.viewsContainers.activitybars.value.filter(n=>n.visible)),t=e.ref(0),c=e.shallowRef(null);c.value=i.value[0].component;function s(n,a){if(t.value===a)return t.value=null,!1;c.value=n.component,t.value=a}return(n,a)=>(e.openBlock(),e.createElementBlock("div",v,[e.createElementVNode("div",d,[e.createElementVNode("ul",_,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(l,o)=>(e.openBlock(),e.createElementBlock("li",{key:o,class:e.normalizeClass(["epic-action-item",{checked:t.value===o}]),title:l.title,onClick:y=>s(l,o)},[e.createVNode(e.unref(u._sfc_main),{class:"relative",name:l.icon},null,8,["name"]),e.createElementVNode("div",m,e.toDisplayString(l.title),1)],10,p))),128))])]),e.createElementVNode("div",{class:e.normalizeClass(["epic-left-sidebar",{hide:t.value===null}])},[e.createElementVNode("div",f,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(c.value)))])],2)]))}});exports.default=k;
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { defineComponent as g, computed as k, openBlock as a, createElementBlock as l, Fragment as y, renderList as C, createVNode as r, unref as s, createElementVNode as c, createCommentVNode as U, toDisplayString as P } from "vue";
|
|
2
|
+
import { p as b, g as E } from "./axios-Bb3STC1u.js";
|
|
3
|
+
import { _ as N } from "./icon.vue_vue_type_script_setup_true_lang-D3QdcReY.js";
|
|
4
|
+
import { u as x } from "./index-Dg7MK40D.js";
|
|
5
|
+
const D = {
|
|
6
|
+
key: 0,
|
|
7
|
+
class: "epic-del-btn"
|
|
8
|
+
}, L = ["onClick"], w = /* @__PURE__ */ g({
|
|
9
|
+
__name: "index",
|
|
10
|
+
props: {
|
|
11
|
+
modelValue: {
|
|
12
|
+
type: Array,
|
|
13
|
+
default: () => []
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
emits: ["update:modelValue"],
|
|
17
|
+
setup(d, { emit: u }) {
|
|
18
|
+
const { t: m } = x(), i = b.getComponent("number"), v = d, f = u, t = k({
|
|
19
|
+
get() {
|
|
20
|
+
return v.modelValue;
|
|
21
|
+
},
|
|
22
|
+
set(e) {
|
|
23
|
+
f("update:modelValue", e);
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
function _() {
|
|
27
|
+
const e = {
|
|
28
|
+
type: "col",
|
|
29
|
+
children: [],
|
|
30
|
+
componentProps: {
|
|
31
|
+
span: 12
|
|
32
|
+
},
|
|
33
|
+
id: E()
|
|
34
|
+
};
|
|
35
|
+
t.value.push(e);
|
|
36
|
+
}
|
|
37
|
+
function V(e) {
|
|
38
|
+
t.value = t.value.filter((h, o) => e !== o);
|
|
39
|
+
}
|
|
40
|
+
return (e, h) => (a(), l("div", null, [
|
|
41
|
+
(a(!0), l(y, null, C(t.value, (o, p) => (a(), l("div", {
|
|
42
|
+
key: p,
|
|
43
|
+
class: "EColEditor-item"
|
|
44
|
+
}, [
|
|
45
|
+
r(s(i), {
|
|
46
|
+
value: o.componentProps.span,
|
|
47
|
+
"onUpdate:value": (n) => o.componentProps.span = n,
|
|
48
|
+
modelValue: o.componentProps.span,
|
|
49
|
+
"onUpdate:modelValue": (n) => o.componentProps.span = n,
|
|
50
|
+
style: { width: "100%" },
|
|
51
|
+
min: 1,
|
|
52
|
+
max: 24
|
|
53
|
+
}, null, 8, ["value", "onUpdate:value", "modelValue", "onUpdate:modelValue"]),
|
|
54
|
+
t.value.length > 1 ? (a(), l("div", D, [
|
|
55
|
+
c("span", {
|
|
56
|
+
onClick: (n) => V(p)
|
|
57
|
+
}, [
|
|
58
|
+
r(s(N), { name: "icon--epic--trash" })
|
|
59
|
+
], 8, L)
|
|
60
|
+
])) : U("", !0)
|
|
61
|
+
]))), 128)),
|
|
62
|
+
c("div", {
|
|
63
|
+
class: "add-btn",
|
|
64
|
+
onClick: _
|
|
65
|
+
}, P(s(m)("add")), 1)
|
|
66
|
+
]));
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
export {
|
|
70
|
+
w as default
|
|
71
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),y=require("./axios-B8aFvCWj.cjs"),_=require("./index-CrV5FaWU.cjs"),w=require("./icon.vue_vue_type_script_setup_true_lang-DJbUD5AQ.cjs"),k=require("./index-Cq6eLpKZ.cjs"),B=[{label:"string",value:"string"},{label:"number",value:"number"},{label:"boolean",value:"boolean"},{label:"method",value:"method"},{label:"regexp",value:"regexp"},{label:"integer",value:"integer"},{label:"float",value:"float"},{label:"array",value:"array"},{label:"object",value:"object"},{label:"date",value:"date"},{label:"url",value:"url"},{label:"hex",value:"hex"},{label:"email",value:"email"},{label:"any",value:"any"}],x=[{label:"change",value:"change"},{label:"blur",value:"blur"}],f=["string","number","url","array","email"],E={class:"rule-item-main bg-white m-t-2 p-2 rounded border border-solid border-gray-200 hover:border-primary transition-all relative"},q={key:0,class:"flex m-t-2 first:m-0"},C=["title"],N={class:"epic-attr-input"},P=e.defineComponent({__name:"ERuleItem",props:{rule:{}},emits:["change","delete","update:rule"],setup(v,{emit:g}){const{t:l}=k.useLocale(),d=g,c=v,n=e.computed({get(){return c.rule},set(t){d("update:rule",t)}}),i=e.inject("pageManager",{}),r=e.computed(()=>Object.entries(i.funcs.value).filter(([t,p])=>typeof p=="function").map(([t])=>({label:t,value:t}))),h=[{type:"select",label:l("validationTrigger"),model:"trigger",componentProps:{options:x,placeholder:l("validationTrigger"),multiple:!0,mode:"multiple"}},{type:"switch",label:l("customRule"),model:"isValidator"},{type:"select",label:l("validationFunction"),model:"validator",show(){return!!n.value.isValidator},componentProps:{options:r.value,placeholder:l("validationFunction")}},{type:"select",label:l("type"),model:"type",show(){return!n.value.isValidator},componentProps:{options:B,placeholder:l("type")}},{type:"input",label:l("regexValidation"),model:"pattern",show(){return!n.value.isValidator},componentProps:{placeholder:l("regexValidation")}},{type:"number",label:l("fieldLength"),model:"len",show(){return f.includes(n.value.type??"")},componentProps:{min:0,placeholder:l("fieldLength")}},{type:"number",label:l("minLength"),model:"min",show(){return f.includes(n.value.type??"")},componentProps:{min:0,placeholder:l("minLength")}},{type:"number",label:l("maxLength"),model:"max",show(){return f.includes(n.value.type??"")},componentProps:{min:0,placeholder:l("maxLength")}},{type:"input",label:l("validationMessage"),model:"message",componentProps:{placeholder:l("validationMessage")}}];function a(){const t=n.value;t.isValidator?(delete t.type,delete t.pattern,delete t.len,delete t.min,delete t.max):delete t.validator,d("change",t)}function b(){d("delete")}return(t,p)=>(e.openBlock(),e.createElementBlock("div",E,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(h,(o,V)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:V},[!o.show||o.show()?(e.openBlock(),e.createElementBlock("div",q,[e.createElementVNode("div",{class:"epic-attr-label",title:e.unref(l)("validationTrigger")},e.toDisplayString(o.label),9,C),e.createElementVNode("div",N,[e.createVNode(e.unref(_._sfc_main),{modelValue:n.value[o.model],"onUpdate:modelValue":u=>n.value[o.model]=u,componentSchema:{...o,noFormItem:!0},onChange:a},null,8,["modelValue","onUpdate:modelValue","componentSchema"])])])):e.createCommentVNode("",!0)],64))),64)),e.createElementVNode("div",{class:"rule-btn-delete absolute top-0 text-md right-0 transition-all w-24px h-24px cursor-pointer rounded-bl-2 flex justify-center items-center color-white",onClick:b},[e.createVNode(e.unref(w._sfc_main),{name:"icon--epic--delete-outline-rounded"})])]))}}),L={class:"rule-item-main m-t-2 p-2 rounded border border-solid transition-all relative"},T={key:0,class:"flex m-t-2 first:m-0"},F={class:"epic-attr-label"},M={class:"flex-1"},U=e.defineComponent({__name:"index",props:{ruleType:{type:String,default:"string"},modelValue:{type:Array,default:void 0}},emits:["update:modelValue"],setup(v,{emit:g}){const{t:l}=k.useLocale(),d=y.pluginManager.getComponent("button"),c=v,n=g,i=_.useVModel(c,"modelValue",n),r=e.ref({required:!1,message:l("required"),type:c.ruleType,trigger:["change"]}),h=[{type:"switch",label:l("required"),model:"required"},{type:"select",label:l("validationTrigger"),model:"trigger",show(){return!!r.value.required},componentProps:{options:x,placeholder:l("validationTrigger"),multiple:!0,mode:"multiple"}},{type:"select",label:l("type"),model:"type",show(){return!!r.value.required},componentProps:{options:B,placeholder:l("type")}},{type:"input",label:l("validationMessage"),model:"message",show(){return!!r.value.required},componentProps:{placeholder:l("validationMessage")}}],a=e.ref([]);e.watchEffect(()=>{i.value&&(a.value=[],i.value.forEach(o=>{typeof o.required<"u"?r.value=o:a.value.push(o)}))});function b(){a.value.push({message:"",type:c.ruleType,trigger:["change"]}),t()}function t(){if(r.value.required){i.value=y.deepClone([...a.value,r.value]);return}if(a.value.length){i.value=y.deepClone(a.value);return}i.value=void 0}function p(o){a.value.splice(o,1),t()}return(o,V)=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",L,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(h,(u,s)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:s},[!u.show||u.show()?(e.openBlock(),e.createElementBlock("div",T,[e.createElementVNode("div",F,e.toDisplayString(u.label),1),e.createElementVNode("div",M,[e.createVNode(e.unref(_._sfc_main),{modelValue:r.value[u.model],"onUpdate:modelValue":m=>r.value[u.model]=m,componentSchema:{...u,noFormItem:!0},onChange:t},null,8,["modelValue","onUpdate:modelValue","componentSchema"])])])):e.createCommentVNode("",!0)],64))),64))]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,(u,s)=>(e.openBlock(),e.createBlock(P,{key:s,rule:a.value[s],"onUpdate:rule":m=>a.value[s]=m,onDelete:m=>p(s),onChange:t},null,8,["rule","onUpdate:rule","onDelete"]))),128)),e.createVNode(e.unref(d),{class:"m-t-2",onClick:b},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)("addRule")),1)]),_:1})]))}});exports.default=U;
|