mirror of
https://github.com/Tencent/tmagic-editor.git
synced 2025-04-06 03:57:56 +08:00
refactor: 更新管理端runtime
This commit is contained in:
parent
a6226cba18
commit
a94f5d72e8
@ -23,7 +23,19 @@
|
||||
options: [
|
||||
{ value: "absolute", text: "\u7EDD\u5BF9\u5B9A\u4F4D" },
|
||||
{ value: "relative", text: "\u6D41\u5F0F\u5E03\u5C40" }
|
||||
]
|
||||
],
|
||||
onChange: (formState, v, { model }) => {
|
||||
if (!model.style)
|
||||
return v;
|
||||
if (v === "relative") {
|
||||
model.style.height = "auto";
|
||||
} else {
|
||||
const el = formState.stage?.renderer?.contentWindow.document.getElementById(model.id);
|
||||
if (el) {
|
||||
model.style.height = el.getBoundingClientRect().height;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
];
|
||||
|
||||
@ -36,7 +48,19 @@
|
||||
options: [
|
||||
{ value: "absolute", text: "\u7EDD\u5BF9\u5B9A\u4F4D" },
|
||||
{ value: "relative", text: "\u6D41\u5F0F\u5E03\u5C40" }
|
||||
]
|
||||
],
|
||||
onChange: (formState, v, { model }) => {
|
||||
if (!model.style)
|
||||
return v;
|
||||
if (v === "relative") {
|
||||
model.style.height = "auto";
|
||||
} else {
|
||||
const el = formState.stage?.renderer?.contentWindow.document.getElementById(model.id);
|
||||
if (el) {
|
||||
model.style.height = el.getBoundingClientRect().height;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
];
|
||||
|
||||
@ -92,4 +116,4 @@
|
||||
return configs;
|
||||
|
||||
}));
|
||||
//# sourceMappingURL=index.umd.js.map
|
||||
//# sourceMappingURL=index.umd.cjs.map
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -44,4 +44,4 @@
|
||||
return events;
|
||||
|
||||
}));
|
||||
//# sourceMappingURL=index.umd.js.map
|
||||
//# sourceMappingURL=index.umd.cjs.map
|
@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.umd.cjs","sources":["../../../../../packages/ui/src/page/src/event.ts","../../../../../packages/ui/src/overlay/src/event.ts","../../../.tmagic/event-entry.ts"],"sourcesContent":["export default {\n methods: [\n {\n label: '刷新页面',\n value: 'refresh',\n },\n ],\n};\n","export default {\n methods: [\n {\n label: '打开蒙层',\n value: 'openOverlay',\n },\n {\n label: '关闭蒙层',\n value: 'closeOverlay',\n },\n ],\n events: [\n {\n label: '打开蒙层',\n value: 'overlay:open',\n },\n {\n label: '关闭蒙层',\n value: 'overlay:close',\n },\n ],\n};\n","import page from '/parisma/github/tmagic-editor/packages/ui/src/page/src/event';\nimport overlay from '/parisma/github/tmagic-editor/packages/ui/src/overlay/src/event';\n\nconst events: Record<string, any> = {\n 'page': page,\n 'overlay': overlay,\n};\n\nexport default events;"],"names":[],"mappings":";;;;;;AAAA,eAAe;EAAA,EACb,OAAS,EAAA;EAAA,IACP;EAAA,MACE,KAAO,EAAA,0BAAA;EAAA,MACP,KAAO,EAAA,SAAA;EAAA,KACT;EAAA,GACF;EACF,CAAA;;ACPA,kBAAe;EAAA,EACb,OAAS,EAAA;EAAA,IACP;EAAA,MACE,KAAO,EAAA,0BAAA;EAAA,MACP,KAAO,EAAA,aAAA;EAAA,KACT;EAAA,IACA;EAAA,MACE,KAAO,EAAA,0BAAA;EAAA,MACP,KAAO,EAAA,cAAA;EAAA,KACT;EAAA,GACF;EAAA,EACA,MAAQ,EAAA;EAAA,IACN;EAAA,MACE,KAAO,EAAA,0BAAA;EAAA,MACP,KAAO,EAAA,cAAA;EAAA,KACT;EAAA,IACA;EAAA,MACE,KAAO,EAAA,0BAAA;EAAA,MACP,KAAO,EAAA,eAAA;EAAA,KACT;EAAA,GACF;EACF,CAAA;;AClBA,QAAM,MAA8B,GAAA;EAAA,EAClC,MAAQ,EAAA,IAAA;EAAA,EACR,SAAW,EAAA,OAAA;EACb;;;;;;;;"}
|
@ -1 +0,0 @@
|
||||
{"version":3,"file":"index.umd.js","sources":["../../../../../packages/ui/src/page/src/event.ts","../../../../../packages/ui/src/overlay/src/event.ts","../../../.tmagic/event-entry.ts"],"sourcesContent":["export default {\n methods: [\n {\n label: '刷新页面',\n value: 'refresh',\n },\n ],\n};\n","export default {\n methods: [\n {\n label: '打开蒙层',\n value: 'openOverlay',\n },\n {\n label: '关闭蒙层',\n value: 'closeOverlay',\n },\n ],\n events: [\n {\n label: '打开蒙层',\n value: 'overlay:open',\n },\n {\n label: '关闭蒙层',\n value: 'overlay:close',\n },\n ],\n};\n","import page from '/data/magic/tmagic-editor/packages/ui/src/page/src/event';\nimport overlay from '/data/magic/tmagic-editor/packages/ui/src/overlay/src/event';\n\nconst events: Record<string, any> = {\n 'page': page,\n 'overlay': overlay,\n};\n\nexport default events;"],"names":[],"mappings":";;;;;;AAAA,eAAe;EAAA,EACb,OAAS,EAAA;EAAA,IACP;EAAA,MACE,KAAO,EAAA,0BAAA;EAAA,MACP,KAAO,EAAA,SAAA;EAAA,KACT;EAAA,GACF;EACF,CAAA;;ACPA,kBAAe;EAAA,EACb,OAAS,EAAA;EAAA,IACP;EAAA,MACE,KAAO,EAAA,0BAAA;EAAA,MACP,KAAO,EAAA,aAAA;EAAA,KACT;EAAA,IACA;EAAA,MACE,KAAO,EAAA,0BAAA;EAAA,MACP,KAAO,EAAA,cAAA;EAAA,KACT;EAAA,GACF;EAAA,EACA,MAAQ,EAAA;EAAA,IACN;EAAA,MACE,KAAO,EAAA,0BAAA;EAAA,MACP,KAAO,EAAA,cAAA;EAAA,KACT;EAAA,IACA;EAAA,MACE,KAAO,EAAA,0BAAA;EAAA,MACP,KAAO,EAAA,eAAA;EAAA,KACT;EAAA,GACF;EACF,CAAA;;AClBA,QAAM,MAA8B,GAAA;EAAA,EAClC,MAAQ,EAAA,IAAA;EAAA,EACR,SAAW,EAAA,OAAA;EACb;;;;;;;;"}
|
@ -87,4 +87,4 @@
|
||||
return values;
|
||||
|
||||
}));
|
||||
//# sourceMappingURL=index.umd.js.map
|
||||
//# sourceMappingURL=index.umd.cjs.map
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -0,0 +1,2 @@
|
||||
System.register(["./index-legacy.1dc0be94.js"],(function(e,t){"use strict";var n,c;return{setters:[e=>{n=e.t,c=e._}],execute:function(){const t=Vue.defineComponent({props:{config:{type:Object,default:()=>({})}},setup(e){const t=Vue.getCurrentInstance()?.proxy,c=Vue.inject("app");return Vue.provide("hoc",t),{tagName:Vue.computed((()=>`magic-ui-${n(e.config.type)}`)),style:Vue.computed((()=>c?.transformStyle(e.config.style))),display:()=>{const t=e.config?.display;return"function"==typeof t?t(c):!1!==t}}}});e("C",c(t,[["render",function(e,t,n,c,o,i){return e.display()?(Vue.openBlock(),Vue.createBlock(Vue.resolveDynamicComponent(e.tagName),{key:0,id:e.config.id,class:Vue.normalizeClass("magic-ui-component"+(e.config.className?` ${e.config.className}`:"")),style:Vue.normalizeStyle(e.style),config:e.config},null,8,["id","class","style","config"])):Vue.createCommentVNode("v-if",!0)}],["__file","/parisma/github/tmagic-editor/packages/ui/src/Component.vue"]]))}}}));
|
||||
//# sourceMappingURL=Component-legacy.8992014a.js.map
|
@ -0,0 +1 @@
|
||||
{"version":3,"file":"Component-legacy.8992014a.js","sources":["../../../../../../packages/ui/src/Component.vue"],"sourcesContent":["<template>\n <component\n v-if=\"display()\"\n :is=\"tagName\"\n :id=\"config.id\"\n :class=\"`magic-ui-component${config.className ? ` ${config.className}` : ''}`\"\n :style=\"style\"\n :config=\"config\"\n ></component>\n</template>\n\n<script lang=\"ts\">\nimport { computed, defineComponent, getCurrentInstance, inject, provide } from 'vue';\n\nimport Core from '@tmagic/core';\nimport { toLine } from '@tmagic/utils';\n\nexport default defineComponent({\n props: {\n config: {\n type: Object,\n default: () => ({}),\n },\n },\n\n setup(props) {\n const vm = getCurrentInstance()?.proxy;\n const app: Core | undefined = inject('app');\n\n provide('hoc', vm);\n\n return {\n tagName: computed(() => `magic-ui-${toLine(props.config.type)}`),\n style: computed(() => app?.transformStyle(props.config.style)),\n\n display: () => {\n const displayCfg = props.config?.display;\n\n if (typeof displayCfg === 'function') {\n return displayCfg(app);\n }\n return displayCfg !== false;\n },\n };\n },\n});\n</script>\n"],"names":["Vue","defineComponent","props","config","type","Object","default","setup","vm","app","provide","tagName","style","display","displayCfg","_ctx","_cache","$props","$setup","$data","$options","createBlock","resolveDynamicComponent","key","id","class","normalizeClass","className","normalizeStyle"],"mappings":"wIAiBe,QAAAA,IAAgBC,gBAAA,CAAAC,MAAA,CACtBC,OAAA,CACGC,KAAAC,OACAC,QAAA,KAAA,CAAA,KAGVC,MAAAL,GAGE,MAAAM,EAAWR,gCACXS,EAA8BT,kBAI9B,OAFAA,IAAAU,QAAA,MAAAF,GAEA,CAAOG,QACIX,mDAAsDY,MACxDZ,sDAAsDa,QAAA,KAG3D,MAAAC,EAAAZ,EAAAC,QAAAU,QAEA,MAAA,mBAAAC,EACEA,EAAAL,IAEF,IAAAK,CAAA,EAEJ,yBA1CF,SAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,uCAGgBpB,IAAAqB,YAAArB,IAAAsB,wBAAAP,EAAAJ,SAAA,CAAAY,IAAA,EACRC,GAAAT,EAAAZ,OAAAqB,GACAC,MACCzB,IAAQ0B,eAAA,sBAAAX,EAAAZ,OAAAwB,UAAA,IAAAZ,EAAAZ,OAAAwB,YAAA,KAAAf,MAAAZ,IAAA4B,eAAAb,EAAAH"}
|
@ -0,0 +1,2 @@
|
||||
import{t as a,_ as c}from"./index.2a9a64ca.js";const r=Vue.defineComponent({props:{config:{type:Object,default:()=>({})}},setup(e){var t;const s=(t=Vue.getCurrentInstance())==null?void 0:t.proxy,n=Vue.inject("app");return Vue.provide("hoc",s),{tagName:Vue.computed(()=>`magic-ui-${a(e.config.type)}`),style:Vue.computed(()=>n==null?void 0:n.transformStyle(e.config.style)),display:()=>{var i;const o=(i=e.config)==null?void 0:i.display;return typeof o=="function"?o(n):o!==!1}}}});function u(e,s,n,t,o,i){return e.display()?(Vue.openBlock(),Vue.createBlock(Vue.resolveDynamicComponent(e.tagName),{key:0,id:e.config.id,class:Vue.normalizeClass(`magic-ui-component${e.config.className?` ${e.config.className}`:""}`),style:Vue.normalizeStyle(e.style),config:e.config},null,8,["id","class","style","config"])):Vue.createCommentVNode("v-if",!0)}const f=c(r,[["render",u],["__file","/parisma/github/tmagic-editor/packages/ui/src/Component.vue"]]);export{f as C};
|
||||
//# sourceMappingURL=Component.aeed2f79.js.map
|
@ -0,0 +1 @@
|
||||
{"version":3,"file":"Component.aeed2f79.js","sources":["../../../../../../packages/ui/src/Component.vue"],"sourcesContent":["<template>\n <component\n v-if=\"display()\"\n :is=\"tagName\"\n :id=\"config.id\"\n :class=\"`magic-ui-component${config.className ? ` ${config.className}` : ''}`\"\n :style=\"style\"\n :config=\"config\"\n ></component>\n</template>\n\n<script lang=\"ts\">\nimport { computed, defineComponent, getCurrentInstance, inject, provide } from 'vue';\n\nimport Core from '@tmagic/core';\nimport { toLine } from '@tmagic/utils';\n\nexport default defineComponent({\n props: {\n config: {\n type: Object,\n default: () => ({}),\n },\n },\n\n setup(props) {\n const vm = getCurrentInstance()?.proxy;\n const app: Core | undefined = inject('app');\n\n provide('hoc', vm);\n\n return {\n tagName: computed(() => `magic-ui-${toLine(props.config.type)}`),\n style: computed(() => app?.transformStyle(props.config.style)),\n\n display: () => {\n const displayCfg = props.config?.display;\n\n if (typeof displayCfg === 'function') {\n return displayCfg(app);\n }\n return displayCfg !== false;\n },\n };\n },\n});\n</script>\n"],"names":["_sfc_main","props","vm","_a","app","displayCfg","_sfc_render","_ctx","_cache","$props","$setup","$data","$options"],"mappings":"+CAiBA,MAAeA,EAAA,IAAgB,gBAAA,CAAA,MAAA,CACtB,OAAA,CACG,KAAA,OACA,QAAA,KAAA,CAAA,EACW,CACnB,EACF,MAAAC,EAAA,OAGE,MAAAC,GAAWC,EAAA,2BAAA,YAAAA,QACXC,EAA8B,kBAE9B,WAAA,QAAA,MAAAF,CAAA,EAEA,CAAO,QACI,iDAAsD,MACxD,kEAAsD,QAAA,IAAA,OAG3D,MAAAG,GAAAF,EAAAF,EAAA,SAAA,YAAAE,EAAA,QAEA,OAAA,OAAAE,GAAA,WACEA,EAAAD,CAAA,EAEFC,IAAA,EAAsB,CACxB,CACF,CAEJ,CAAA,EA5CE,SAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAA,qCAGgB,IAAA,YAAA,IAAA,wBAAAL,EAAA,OAAA,EAAA,CAAA,IAAA,EACR,GAAAA,EAAA,OAAA,GACA,MACC,IAAQ,eAAA,qBAAAA,EAAA,OAAA,UAAA,IAAAA,EAAA,OAAA,YAAA,IAAA,EAAA,MAAA,IAAA,eAAAA,EAAA,KAAA"}
|
@ -0,0 +1,2 @@
|
||||
System.register(["./Component-legacy.8992014a.js","./useApp-legacy.d06aeb34.js","./index-legacy.1dc0be94.js"],(function(e,n){"use strict";var t,o,i;return{setters:[e=>{t=e.C},e=>{o=e.u},e=>{i=e._}],execute:function(){const n=e=>({show:()=>{e.config.style.display="initial"},hide:()=>{e.config.style.display="none"}}),c=Vue.defineComponent({components:{"magic-ui-component":t},props:{config:{type:Object,default:()=>({})}},setup(e){const t=o(e);return{style:Vue.computed((()=>t?.transformStyle(e.config.style||{}))),display:()=>{const n=e.config?.display;return"function"==typeof n?n(t):!1!==n},...n(e)}}}),s=["id"];e("default",i(c,[["render",function(e,n,t,o,i,c){const l=Vue.resolveComponent("magic-ui-component");return e.display()?(Vue.openBlock(),Vue.createElementBlock("div",{key:0,id:`${e.config.id||""}`,class:Vue.normalizeClass(`magic-ui-container magic-layout-${e.config.layout}${e.config.className?` ${e.config.className}`:""}`),style:Vue.normalizeStyle(e.style)},[Vue.renderSlot(e.$slots,"default"),(Vue.openBlock(!0),Vue.createElementBlock(Vue.Fragment,null,Vue.renderList(e.config.items,(e=>(Vue.openBlock(),Vue.createBlock(l,{key:e.id,config:e},null,8,["config"])))),128))],14,s)):Vue.createCommentVNode("v-if",!0)}],["__file","/parisma/github/tmagic-editor/packages/ui/src/container/src/Container.vue"]]))}}}));
|
||||
//# sourceMappingURL=Container-legacy.3766957a.js.map
|
@ -0,0 +1 @@
|
||||
{"version":3,"file":"Container-legacy.3766957a.js","sources":["../../../../../../packages/ui/src/useCommonMethod.ts","../../../../../../packages/ui/src/container/src/Container.vue"],"sourcesContent":["/*\n * Tencent is pleased to support the open source community by making TMagicEditor available.\n *\n * Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport default (props: any) => ({\n show: () => {\n props.config.style.display = 'initial';\n },\n hide: () => {\n props.config.style.display = 'none';\n },\n});\n","<template>\n <div\n v-if=\"display()\"\n :id=\"`${config.id || ''}`\"\n :class=\"`magic-ui-container magic-layout-${config.layout}${config.className ? ` ${config.className}` : ''}`\"\n :style=\"style\"\n >\n <slot></slot>\n <magic-ui-component v-for=\"item in config.items\" :key=\"item.id\" :config=\"item\"></magic-ui-component>\n </div>\n</template>\n\n<script lang=\"ts\">\nimport { computed, defineComponent, PropType } from 'vue';\n\nimport type { MContainer } from '@tmagic/schema';\n\nimport Component from '../../Component.vue';\nimport useApp from '../../useApp';\nimport useCommonMethod from '../../useCommonMethod';\n\nexport default defineComponent({\n components: {\n 'magic-ui-component': Component,\n },\n\n props: {\n config: {\n type: Object as PropType<MContainer>,\n default: () => ({}),\n },\n },\n\n setup(props) {\n const app = useApp(props);\n\n return {\n style: computed(() => app?.transformStyle(props.config.style || {})),\n\n display: () => {\n const displayCfg = props.config?.display;\n\n if (typeof displayCfg === 'function') {\n return displayCfg(app);\n }\n return displayCfg !== false;\n },\n ...useCommonMethod(props),\n };\n },\n});\n</script>\n"],"names":["props","show","config","style","display","hide","_sfc_main","Vue","defineComponent","components","Component","type","Object","default","setup","app","useApp","computed","transformStyle","displayCfg","useCommonMethod","_component_magic_ui_component","resolveComponent","createElementBlock","key","id","_ctx","class","normalizeClass","layout","className","normalizeStyle","renderSlot","$slots","Fragment","renderList","items","item","openBlock","createBlock"],"mappings":"yNAkBe,QAACA,IAAgB,CAC9BC,KAAM,KACED,EAAAE,OAAOC,MAAMC,QAAU,SAAvB,EAERC,KAAM,KACEL,EAAAE,OAAOC,MAAMC,QAAU,MAAvB,ICFKE,EAAAC,IAAgBC,gBAAA,CAAAC,WAAA,CACjB,qBAAAC,GAEZV,MAAA,CAEOE,OAAA,CACGS,KAAAC,OACAC,QAAA,KAAA,CAAA,KAGVC,MAAAd,GAGE,MAAAe,EAAAC,EAAAhB,GAEA,MAAA,CAAOG,MACEI,IAASU,UAAA,IAAAF,GAAAG,eAAAlB,EAAAE,OAAAC,OAAA,CAAA,KAAmDC,QAAA,KAGjE,MAAAe,EAAAnB,EAAAE,QAAAE,QAEA,MAAA,mBAAAe,EACEA,EAAAJ,IAEF,IAAAI,CAAA,KACFC,EAAApB,GAEF,8DA9Ca,MAAAqB,EAAAd,IAAAe,iBAAA,0DACIf,IAAAgB,mBAAA,MAAA,CAAAC,IAAA,EACXC,GAAA,GAAAC,EAAAxB,OAAAuB,IAAA,KACEE,MAAApB,IAAAqB,eAAA,mCAAAF,EAAAxB,OAAA2B,SAAAH,EAAAxB,OAAA4B,UAAA,IAAAJ,EAAAxB,OAAA4B,YAAA,YAEKvB,IAAAwB,eAAAL,EAAAvB,QAAA,CACbI,IAAAyB,WAAAN,EAAAO,OAAA,YAAA1B,eAA8D,GAAAA,IAAAgB,mBAAAhB,IAAA2B,cAAA3B,IAAA4B,WAAAT,EAAAxB,OAAAkC,OAAAC,QAASC,YAAM/B,IAAAgC,YAAAlB,EAAA,CAAAG,IAAAa,EAAAZ"}
|
@ -0,0 +1,2 @@
|
||||
import{C as c}from"./Component.aeed2f79.js";import{u as a}from"./useApp.8bd6dbd4.js";import{_ as r}from"./index.2a9a64ca.js";const u=e=>({show:()=>{e.config.style.display="initial"},hide:()=>{e.config.style.display="none"}}),l=Vue.defineComponent({components:{"magic-ui-component":c},props:{config:{type:Object,default:()=>({})}},setup(e){const o=a(e);return{style:Vue.computed(()=>o==null?void 0:o.transformStyle(e.config.style||{})),display:()=>{var t;const n=(t=e.config)==null?void 0:t.display;return typeof n=="function"?n(o):n!==!1},...u(e)}}}),m=["id"];function f(e,o,n,t,d,p){const s=Vue.resolveComponent("magic-ui-component");return e.display()?(Vue.openBlock(),Vue.createElementBlock("div",{key:0,id:`${e.config.id||""}`,class:Vue.normalizeClass(`magic-ui-container magic-layout-${e.config.layout}${e.config.className?` ${e.config.className}`:""}`),style:Vue.normalizeStyle(e.style)},[Vue.renderSlot(e.$slots,"default"),(Vue.openBlock(!0),Vue.createElementBlock(Vue.Fragment,null,Vue.renderList(e.config.items,i=>(Vue.openBlock(),Vue.createBlock(s,{key:i.id,config:i},null,8,["config"]))),128))],14,m)):Vue.createCommentVNode("v-if",!0)}const C=r(l,[["render",f],["__file","/parisma/github/tmagic-editor/packages/ui/src/container/src/Container.vue"]]);export{C as default};
|
||||
//# sourceMappingURL=Container.7997a01b.js.map
|
@ -0,0 +1 @@
|
||||
{"version":3,"file":"Container.7997a01b.js","sources":["../../../../../../packages/ui/src/useCommonMethod.ts","../../../../../../packages/ui/src/container/src/Container.vue"],"sourcesContent":["/*\n * Tencent is pleased to support the open source community by making TMagicEditor available.\n *\n * Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport default (props: any) => ({\n show: () => {\n props.config.style.display = 'initial';\n },\n hide: () => {\n props.config.style.display = 'none';\n },\n});\n","<template>\n <div\n v-if=\"display()\"\n :id=\"`${config.id || ''}`\"\n :class=\"`magic-ui-container magic-layout-${config.layout}${config.className ? ` ${config.className}` : ''}`\"\n :style=\"style\"\n >\n <slot></slot>\n <magic-ui-component v-for=\"item in config.items\" :key=\"item.id\" :config=\"item\"></magic-ui-component>\n </div>\n</template>\n\n<script lang=\"ts\">\nimport { computed, defineComponent, PropType } from 'vue';\n\nimport type { MContainer } from '@tmagic/schema';\n\nimport Component from '../../Component.vue';\nimport useApp from '../../useApp';\nimport useCommonMethod from '../../useCommonMethod';\n\nexport default defineComponent({\n components: {\n 'magic-ui-component': Component,\n },\n\n props: {\n config: {\n type: Object as PropType<MContainer>,\n default: () => ({}),\n },\n },\n\n setup(props) {\n const app = useApp(props);\n\n return {\n style: computed(() => app?.transformStyle(props.config.style || {})),\n\n display: () => {\n const displayCfg = props.config?.display;\n\n if (typeof displayCfg === 'function') {\n return displayCfg(app);\n }\n return displayCfg !== false;\n },\n ...useCommonMethod(props),\n };\n },\n});\n</script>\n"],"names":["useCommonMethod","props","_sfc_main","Component","app","useApp","displayCfg","_a","_component_magic_ui_component","_ctx","item"],"mappings":"6HAkBA,MAAeA,EAACC,IAAgB,CAC9B,KAAM,IAAM,CACJA,EAAA,OAAO,MAAM,QAAU,SAC/B,EACA,KAAM,IAAM,CACJA,EAAA,OAAO,MAAM,QAAU,MAC/B,CACF,GCJeC,EAAA,IAAgB,gBAAA,CAAA,WAAA,CACjB,qBAAAC,CACY,EACxB,MAAA,CAEO,OAAA,CACG,KAAA,OACA,QAAA,KAAA,CAAA,EACW,CACnB,EACF,MAAAF,EAAA,CAGE,MAAAG,EAAAC,EAAAJ,CAAA,EAEA,MAAA,CAAO,MACE,IAAS,SAAA,IAAAG,GAAA,YAAAA,EAAA,eAAAH,EAAA,OAAA,OAAA,CAAA,EAAA,EAAmD,QAAA,IAAA,OAGjE,MAAAK,GAAAC,EAAAN,EAAA,SAAA,YAAAM,EAAA,QAEA,OAAA,OAAAD,GAAA,WACEA,EAAAF,CAAA,EAEFE,IAAA,EAAsB,EACxB,GAAAN,EAAAC,CAAA,CACwB,CAC1B,CAEJ,CAAA,mCAhDiB,MAAAO,EAAA,IAAA,iBAAA,oBAAA,sCACI,IAAA,mBAAA,MAAA,CAAA,IAAA,EACX,GAAA,GAAAC,EAAA,OAAA,IAAA,KACE,MAAA,IAAA,eAAA,mCAAAA,EAAA,OAAA,SAAAA,EAAA,OAAA,UAAA,IAAAA,EAAA,OAAA,YAAA,IAAA,QAEK,IAAA,eAAAA,EAAA,KAAA,CAAA,EAAA,CACb,IAAA,WAAAA,EAAA,OAAA,SAAA,GAAA,cAA8D,EAAA,EAAA,IAAA,mBAAA,IAAA,cAAA,IAAA,WAAAA,EAAA,OAAA,MAAAC,IAAS,IAAA,UAAM,EAAA,IAAA,YAAAF,EAAA,CAAA,IAAAE,EAAA"}
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -0,0 +1,2 @@
|
||||
System.register(["./Component-legacy.8992014a.js","./useApp-legacy.d06aeb34.js","./index-legacy.1dc0be94.js"],(function(e,n){"use strict";var t,o,c;return{setters:[e=>{t=e.C},e=>{o=e.u},e=>{c=e._}],execute:function(){const n=Vue.defineComponent({components:{"magic-ui-component":t},props:{config:{type:Object,default:()=>({})}},setup(e){const n=o(e);return{style:Vue.computed((()=>n?.transformStyle(e.config.style||{}))),refresh(){window.location.reload()}}}}),i=["id"];e("default",c(n,[["render",function(e,n,t,o,c,u){const a=Vue.resolveComponent("magic-ui-component");return Vue.openBlock(),Vue.createElementBlock("div",{id:`${e.config.id||""}`,class:Vue.normalizeClass(`magic-ui-page magic-ui-container magic-layout-${e.config.layout}${e.config.className?` ${e.config.className}`:""}`),style:Vue.normalizeStyle(e.style)},[Vue.renderSlot(e.$slots,"default"),(Vue.openBlock(!0),Vue.createElementBlock(Vue.Fragment,null,Vue.renderList(e.config.items,(e=>(Vue.openBlock(),Vue.createBlock(a,{key:e.id,config:e},null,8,["config"])))),128))],14,i)}],["__file","/parisma/github/tmagic-editor/packages/ui/src/page/src/index.vue"]]))}}}));
|
||||
//# sourceMappingURL=index-legacy.44438566.js.map
|
@ -0,0 +1 @@
|
||||
{"version":3,"file":"index-legacy.44438566.js","sources":["../../../../../../packages/ui/src/page/src/index.vue"],"sourcesContent":["<template>\n <div\n :id=\"`${config.id || ''}`\"\n :class=\"`magic-ui-page magic-ui-container magic-layout-${config.layout}${\n config.className ? ` ${config.className}` : ''\n }`\"\n :style=\"style\"\n >\n <slot></slot>\n <magic-ui-component v-for=\"item in config.items\" :key=\"item.id\" :config=\"item\"></magic-ui-component>\n </div>\n</template>\n\n<script lang=\"ts\">\nimport { computed, defineComponent, PropType } from 'vue';\n\nimport type { MPage } from '@tmagic/schema';\n\nimport Component from '../../Component.vue';\nimport useApp from '../../useApp';\n\nexport default defineComponent({\n components: {\n 'magic-ui-component': Component,\n },\n\n props: {\n config: {\n type: Object as PropType<MPage>,\n default: () => ({}),\n },\n },\n\n setup(props) {\n const app = useApp(props);\n\n return {\n style: computed(() => app?.transformStyle(props.config.style || {})),\n\n refresh() {\n window.location.reload();\n },\n };\n },\n});\n</script>\n"],"names":["_sfc_main","Vue","defineComponent","components","Component","props","config","type","Object","default","setup","app","useApp","style","computed","transformStyle","refresh","window","location","reload","resolveComponent","openBlock","createElementBlock","id","_ctx","class","normalizeClass","layout","className","normalizeStyle","renderSlot","$slots","Fragment","renderList","items","item","createBlock","_component_magic_ui_component","key"],"mappings":"yNAqBe,MAAAA,EAAAC,IAAgBC,gBAAA,CAAAC,WAAA,CACjB,qBAAAC,GAEZC,MAAA,CAEOC,OAAA,CACGC,KAAAC,OACAC,QAAA,KAAA,CAAA,KAGVC,MAAAL,GAGE,MAAAM,EAAAC,EAAAP,GAEA,MAAA,CAAOQ,MACEZ,IAASa,UAAA,IAAAH,GAAAI,eAAAV,EAAAC,OAAAO,OAAA,CAAA,KAAmDG,UAGjEC,OAAAC,SAAAC,QAAuB,EAE3B,sEAzCFlB,IASMmB,iBAAA,sBAPE,WAAAC,YAAApB,IAAAqB,mBAAA,MAAA,CAAAC,GAAA,GAAAC,EAAAlB,OAAAiB,IAAA,KAA0FE,MAG/FxB,IAAAyB,eAAA,iDAAAF,EAAAlB,OAAAqB,SAAAH,EAAAlB,OAAAsB,UAAA,IAAAJ,EAAAlB,OAAAsB,YAAA,YAEY3B,IAAA4B,eAAAL,EAAAX,QAAA,CACbZ,IAAA6B,WAAAN,EAAAO,OAAA,YAAA9B,eAA8D,GAAAA,IAAAqB,mBAAArB,IAAA+B,cAAA/B,IAAAgC,WAAAT,EAAAlB,OAAA4B,OAAAC,IAASlC,IAAAoB,YAAMpB,IAAAmC,YAAAC,EAAA,CAAAC,IAAAH,EAAAZ"}
|
@ -0,0 +1,2 @@
|
||||
System.register(["./useApp-legacy.d06aeb34.js","./index-legacy.1dc0be94.js"],(function(e,t){"use strict";var i,o;return{setters:[e=>{i=e.u},e=>{o=e._}],execute:function(){const t=Vue.defineComponent({props:{config:{type:Object,default:()=>({})},model:{type:Object,default:()=>({})}},setup(e){const t=Vue.ref(!1),o=i(e),n=o?.page?.getNode(e.config.id),c=()=>{t.value=!0,o&&o.emit("overlay:open",n)},r=()=>{t.value=!1,o&&o.emit("overlay:close",n)};return o?.on("editor:select",((t,i)=>{i.find((t=>t.id===e.config.id))?c():r()})),{visible:t,openOverlay:c,closeOverlay:r}}});e("default",o(t,[["render",function(e,t,i,o,n,c){const r=Vue.resolveComponent("magic-ui-container");return e.visible?(Vue.openBlock(),Vue.createBlock(r,{key:0,class:"magic-ui-overlay",config:{items:e.config.items}},{default:Vue.withCtx((()=>[Vue.renderSlot(e.$slots,"default")])),_:3},8,["config"])):Vue.createCommentVNode("v-if",!0)}],["__file","/parisma/github/tmagic-editor/packages/ui/src/overlay/src/index.vue"]]))}}}));
|
||||
//# sourceMappingURL=index-legacy.5db67b5f.js.map
|
@ -0,0 +1 @@
|
||||
{"version":3,"file":"index-legacy.5db67b5f.js","sources":["../../../../../../packages/ui/src/overlay/src/index.vue"],"sourcesContent":["<template>\n <magic-ui-container v-if=\"visible\" class=\"magic-ui-overlay\" :config=\"{ items: config.items }\">\n <slot></slot>\n </magic-ui-container>\n</template>\n<script lang=\"ts\">\nimport { defineComponent, ref } from 'vue';\n\nimport Core from '@tmagic/core';\nimport type { MNode } from '@tmagic/schema';\n\nimport useApp from '../../useApp';\n\nexport default defineComponent({\n props: {\n config: {\n type: Object,\n default: () => ({}),\n },\n\n model: {\n type: Object,\n default: () => ({}),\n },\n },\n\n setup(props) {\n const visible = ref(false);\n const app: Core | undefined = useApp(props);\n const node = app?.page?.getNode(props.config.id);\n\n const openOverlay = () => {\n visible.value = true;\n if (app) {\n app.emit('overlay:open', node);\n }\n };\n\n const closeOverlay = () => {\n visible.value = false;\n if (app) {\n app.emit('overlay:close', node);\n }\n };\n\n app?.on('editor:select', (info, path) => {\n if (path.find((node: MNode) => node.id === props.config.id)) {\n openOverlay();\n } else {\n closeOverlay();\n }\n });\n\n return {\n visible,\n\n openOverlay,\n closeOverlay,\n };\n },\n});\n</script>\n"],"names":["Vue","defineComponent","props","config","type","Object","default","model","setup","visible","app","useApp","node","page","getNode","id","openOverlay","value","emit","closeOverlay","on","info","path","find","node2","_component_magic_ui_container","resolveComponent","createBlock","key","class","items","_ctx"],"mappings":"2KAae,QAAAA,IAAgBC,gBAAA,CAAAC,MAAA,CACtBC,OAAA,CACGC,KAAAC,OACAC,QAAA,KAAA,CAAA,IAERC,MAAA,CAEOH,KAAAC,OACCC,QAAA,MAAA,KAGVE,MAAAN,GAGE,MAAAO,EAAgBT,YAChBU,EAAAC,EAAAT,GACAU,EAAAF,GAAAG,MAAAC,QAAAZ,EAAAC,OAAAY,IAEAC,EAAA,KACEP,EAAAQ,OAAA,EACAP,GACEA,EAAAQ,KAAA,eAAAN,EAA6B,EAIjCO,EAAA,KACEV,EAAAQ,OAAA,EACAP,GACEA,EAAAQ,KAAA,gBAAAN,EAA8B,EAYlC,OARAF,GAAAU,GAAA,iBAAA,CAAAC,EAAAC,KACEA,EAAAC,MAAAC,GAAAA,EAAAT,KAAAb,EAAAC,OAAAY,KACEC,IAEAG,GAAa,IAIjB,CAAOV,UACLO,cAEAG,eAEF,qDAzD+B,MAAAM,EAAAzB,IAAA0B,iBAAA,wDAA0B1B,IAAA2B,YAAAF,EAAA,CAAAG,IAAA,EAAEC,MAAA,mBAC9C1B,OAAA,CAAA2B,MAAAC,EAAA5B,OAAA2B,QAAA"}
|
@ -0,0 +1,2 @@
|
||||
System.register(["./useApp-legacy.d06aeb34.js","./index-legacy.1dc0be94.js"],(function(e,t){"use strict";var n,o;return{setters:[e=>{n=e.u},e=>{o=e._}],execute:function(){const t=Vue.defineComponent({props:{config:{type:Object,default:()=>({})},model:{type:Object,default:()=>({})}},setup(e){n(e);const t=Vue.getCurrentInstance()?.proxy,o=Vue.reactive([]),c=Vue.computed((()=>["function"==typeof e.config.preAction?e.config.preAction:()=>!0,...o,"function"==typeof e.config.postAction?e.config.postAction:()=>!0]));return{pushAction:function(e){o.push(e)},clickHandler:async function(){for(const n of c.value)if("function"==typeof n&&!1===await n(t,{model:e.model}))break},textConfig:Vue.computed((()=>({type:"text",text:e.config?.text||"",disabledText:e.config?.disabledText||"",html:e.config?.html||""})))}}});e("default",o(t,[["render",function(e,t,n,o,c,i){const u=Vue.resolveComponent("magic-ui-text");return Vue.openBlock(),Vue.createElementBlock("button",{class:"magic-ui-button",onClick:t[0]||(t[0]=(...t)=>e.clickHandler&&e.clickHandler(...t))},[Vue.renderSlot(e.$slots,"default",{},(()=>[Vue.createVNode(u,{config:e.textConfig},null,8,["config"])]))])}],["__file","/parisma/github/tmagic-editor/packages/ui/src/button/src/index.vue"]]))}}}));
|
||||
//# sourceMappingURL=index-legacy.a35443c4.js.map
|
@ -0,0 +1 @@
|
||||
{"version":3,"file":"index-legacy.a35443c4.js","sources":["../../../../../../packages/ui/src/button/src/index.vue"],"sourcesContent":["<template>\n <button class=\"magic-ui-button\" @click=\"clickHandler\">\n <slot>\n <magic-ui-text :config=\"textConfig\"></magic-ui-text>\n </slot>\n </button>\n</template>\n<script lang=\"ts\">\nimport { computed, defineComponent, getCurrentInstance, PropType, reactive } from 'vue';\n\nimport { MButton, MButtonInstance, MText } from '../../../src/types';\nimport useApp from '../../useApp';\n\nexport default defineComponent({\n props: {\n config: {\n type: Object as PropType<MButton>,\n default: () => ({}),\n },\n\n model: {\n type: Object,\n default: () => ({}),\n },\n },\n setup(props) {\n useApp(props);\n const vm: MButtonInstance = getCurrentInstance()?.proxy as MButtonInstance;\n const actions = reactive<Function[]>([]);\n const actualActions = computed(() => [\n typeof props.config.preAction === 'function' ? props.config.preAction : () => true,\n ...actions,\n typeof props.config.postAction === 'function' ? props.config.postAction : () => true,\n ]);\n function pushAction(action: Function): void {\n actions.push(action);\n }\n async function clickHandler(): Promise<void> {\n for (const fn of actualActions.value) {\n if (typeof fn === 'function') {\n const ret = await fn(vm, { model: props.model });\n if (ret === false) {\n break;\n }\n }\n }\n }\n\n const textConfig = computed<MText>(() => ({\n type: 'text',\n text: props.config?.text || '',\n disabledText: props.config?.disabledText || '',\n html: props.config?.html || '',\n }));\n\n return {\n pushAction,\n clickHandler,\n textConfig,\n };\n },\n});\n</script>\n"],"names":["_sfc_main","Vue","defineComponent","props","config","type","Object","default","model","setup","useApp","vm","actions","reactive","actualActions","preAction","postAction","pushAction","action","push","clickHandler","async","value","fn","textConfig","text","disabledText","html","resolveComponent","openBlock","createElementBlock","class"],"mappings":"2KAae,MAAAA,EAAAC,IAAgBC,gBAAA,CAAAC,MAAA,CACtBC,OAAA,CACGC,KAAAC,OACAC,QAAA,MAAA,IAERC,MAAA,CAEOH,KAAAC,OACCC,QAAA,MAAA,KAGVE,MAAAN,GAEEO,EAAAP,GACA,MAAAQ,EAA4BV,gCAC5BW,EAAgBX,IAAqBY,SAAA,IACrCC,EAAsBb,mBAAe,mBAAAE,EAAAC,OAAAW,UAAAZ,EAAAC,OAAAW,UAAA,KAAA,KAC2CH,EAC3E,mBAAAT,EAAAC,OAAAY,WAAAb,EAAAC,OAAAY,WAAA,KAAA,KAwBL,MAAA,CAAOC,WArBP,SAAAC,GACEN,EAAAO,KAAAD,EAAmB,EAqBnBE,aAnBFC,iBACE,IAAA,WAAAP,EAAAQ,MACE,GAAA,mBAAAC,IAEE,UADAA,EAAAZ,EAAA,CAAAH,MAAAL,EAAAK,QAEE,KAGN,EAYAgB,WATiBvB,oBAAuBI,KAAA,OAClCoB,KAAAtB,EAAAC,QAAAqB,MAAA,GACsBC,aAAAvB,EAAAC,QAAAsB,cAAA,GACgBC,KAAAxB,EAAAC,QAAAuB,MAAA,OAQ9C,6DA1DF1B,IAIS2B,iBAAA,iBAJwB,OAAA3B,IAAA4B,YAAO5B,IAAA6B,mBAAA,SAAA,CAAAC,MAAA,qFAG/B"}
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -0,0 +1,2 @@
|
||||
System.register(["./useApp-legacy.d06aeb34.js","./index-legacy.1dc0be94.js"],(function(e,t){"use strict";var i,s;return{setters:[e=>{i=e.u},e=>{s=e._}],execute:function(){const t=Vue.defineComponent({props:{config:{type:Object,default:()=>({})},model:{type:Object,default:()=>({})},vars:{type:Object,default:()=>({})}},setup(e){i(e);const t=Vue.getCurrentInstance()?.proxy,s=Vue.inject("hoc");return{displayText:Vue.computed((()=>{let i=e.config?.text||"";const{vars:c}=e;if(s?.disabled&&e.config?.disabledText&&(i=e.config.disabledText),"function"==typeof i)return i.bind(t)(t,{model:e.model});if("[object Object]"===Object.prototype.toString.call(c)){let e=i;return Object.entries(c).forEach((([t,i])=>{e=e.replace(new RegExp(`{{${t}}}`,"g"),i)})),e}return i||""}))}},render(){const e=this.config?.multiple?"magic-ui-text":"magic-ui-text magic-ui-text--single-line";return"function"==typeof this.$slots?.default?Vue.h("div",{class:e},[this.$slots?.default?.()||""]):Vue.h("div",{class:e,...this.displayText?{innerHTML:this.displayText}:{}})}});e("default",s(t,[["__file","/parisma/github/tmagic-editor/packages/ui/src/text/src/index.vue"]]))}}}));
|
||||
//# sourceMappingURL=index-legacy.f6a03169.js.map
|
@ -0,0 +1 @@
|
||||
{"version":3,"file":"index-legacy.f6a03169.js","sources":["../../../../../../packages/ui/src/text/src/index.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { computed, defineComponent, getCurrentInstance, h, inject, PropType } from 'vue';\n\nimport { MComponentInstance, MText, MTextInstance } from '../../../src/types';\nimport useApp from '../../useApp';\n\nexport default defineComponent({\n props: {\n config: {\n type: Object as PropType<MText>,\n default: () => ({}),\n },\n\n model: {\n type: Object,\n default: () => ({}),\n },\n\n vars: {\n type: Object,\n default: () => ({}),\n },\n },\n setup(props) {\n useApp(props);\n const vm: MTextInstance = getCurrentInstance()?.proxy as MTextInstance;\n const hoc: MComponentInstance = inject('hoc');\n const displayText = computed(() => {\n let text = props.config?.text || '';\n const { vars } = props;\n if (hoc?.disabled && props.config?.disabledText) {\n text = props.config.disabledText;\n }\n if (typeof text === 'function') {\n return text.bind(vm)(vm, { model: props.model });\n }\n if (Object.prototype.toString.call(vars) === '[object Object]') {\n let tmp: string = text;\n Object.entries(vars).forEach(([key, value]) => {\n tmp = tmp.replace(new RegExp(`{{${key}}}`, 'g'), value);\n });\n return tmp;\n }\n return text || '';\n });\n\n return {\n displayText,\n };\n },\n\n render() {\n const className = this.config?.multiple ? 'magic-ui-text' : 'magic-ui-text magic-ui-text--single-line';\n if (typeof this.$slots?.default === 'function') {\n return h('div', { class: className }, [this.$slots?.default?.() || '']);\n }\n return h('div', {\n class: className,\n ...(this.displayText ? { innerHTML: this.displayText } : {}),\n });\n },\n});\n</script>\n"],"names":["_sfc_main","Vue","defineComponent","props","config","type","Object","default","model","vars","setup","useApp","vm","hoc","displayText","text","disabled","disabledText","bind","prototype","toString","call","tmp","entries","forEach","key","value","replace","RegExp","render","className","this","multiple","$slots","h","class","innerHTML"],"mappings":"2KAMe,MAAAA,EAAAC,IAAgBC,gBAAA,CAAAC,MAAA,CACtBC,OAAA,CACGC,KAAAC,OACAC,QAAA,KAAA,CAAA,IAERC,MAAA,CAEOH,KAAAC,OACCC,QAAA,KAAA,CAAA,IAERE,KAAA,CAEMJ,KAAAC,OACEC,QAAA,KAAA,CAAA,KAGVG,MAAAP,GAEEQ,EAAAR,GACA,MAAAS,EAA0BX,gCAC1BY,EAAgCZ,kBAoBhC,MAAA,CAAOa,YAnBab,mBAClB,IAAAc,EAAAZ,EAAAC,QAAAW,MAAA,GACA,MAAAN,KAAAA,GAAAN,EAIA,GAHAU,GAAAG,UAAAb,EAAAC,QAAAa,eACEF,EAAAZ,EAAAC,OAAAa,cAEF,qBACE,OAAAF,EAAAG,KAAAN,EAAAG,CAAAH,EAAA,CAAAJ,MAAAL,EAAAK,QAEF,GAAA,oBAAAF,OAAAa,UAAAC,SAAAC,KAAAZ,GAAA,CACE,IAAAa,EAAAP,EAIA,OAHAT,OAAAiB,QAAAd,GAAAe,SAAA,EAAAC,EAAAC,MACEJ,EAAAA,EAAAK,QAAA,IAAAC,OAAA,KAAAH,MAAA,KAAAC,EAAA,IAEFJ,CAAO,CAET,OAAAP,GAAA,EAAA,IAKF,EACFc,SAGE,MAAAC,EAAAC,KAAA3B,QAAA4B,SAAA,gBAAA,2CACA,MAAA,mBAAAC,KAAAA,QAAA1B,QACWN,IAAAiC,EAAA,MAAA,CAAAC,MAAAL,GAAA,CAAAC,KAAAE,QAAA1B,aAAA,kBAEK4B,MAAAL,KACPC,KAAAjB,YAAA,CAAAsB,UAAAL,KAAAjB,aAAA,CAAA,GAER"}
|
@ -0,0 +1,2 @@
|
||||
System.register(["./useApp-legacy.d06aeb34.js","./index-legacy.1dc0be94.js"],(function(e,c){"use strict";var i,n;return{setters:[e=>{i=e.u},e=>{n=e._}],execute:function(){const c=Vue.defineComponent({props:{config:{type:Object,default:()=>({})},model:{type:Object,default:()=>({})}},setup:e=>(i(e),{clickHandler(){e.config.url&&(window.location.href=e.config.url)}})}),t=["src"];e("default",n(c,[["render",function(e,c,i,n,r,l){return Vue.openBlock(),Vue.createElementBlock("img",{class:"magic-ui-img",src:e.config.src,onClick:c[0]||(c[0]=(...c)=>e.clickHandler&&e.clickHandler(...c))},null,8,t)}],["__file","/parisma/github/tmagic-editor/packages/ui/src/img/src/index.vue"]]))}}}));
|
||||
//# sourceMappingURL=index-legacy.fac272b8.js.map
|
@ -0,0 +1 @@
|
||||
{"version":3,"file":"index-legacy.fac272b8.js","sources":["../../../../../../packages/ui/src/img/src/index.vue"],"sourcesContent":["<template>\n <img class=\"magic-ui-img\" :src=\"config.src\" @click=\"clickHandler\" />\n</template>\n<script lang=\"ts\">\nimport { defineComponent, PropType } from 'vue';\n\nimport { MImg } from '../../types';\nimport useApp from '../../useApp';\n\nexport default defineComponent({\n props: {\n config: {\n type: Object as PropType<MImg>,\n default: () => ({}),\n },\n\n model: {\n type: Object,\n default: () => ({}),\n },\n },\n setup(props) {\n useApp(props);\n\n return {\n clickHandler() {\n if (props.config.url) window.location.href = props.config.url;\n },\n };\n },\n});\n</script>\n"],"names":["_sfc_main","Vue","defineComponent","props","config","type","Object","default","model","setup","useApp","clickHandler","url","window","location","href","_ctx","_cache","$props","$setup","$data","$options","openBlock","createElementBlock","class","src"],"mappings":"2KASe,MAAAA,EAAAC,IAAgBC,gBAAA,CAAAC,MAAA,CACtBC,OAAA,CACGC,KAAAC,OACAC,QAAA,KAAA,CAAA,IAERC,MAAA,CAEOH,KAAAC,OACCC,QAAA,KAAA,CAAA,KAGVE,MAAAN,IAEEO,EAAAP,GAEA,CAAOQ,eAEHR,EAAAC,OAAAQ,MAAsBC,OAAAC,SAAAC,KAAAZ,EAAAC,OAAAQ,IAAoC,2CAzBtD,SAAAI,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,GAAsB,OAAApB,IAAAqB,YAAUrB,IAAAsB,mBAAA,MAAA,CAAAC,MAAA,eAAQC,IAAAT,EAAAZ,OAAAqB"}
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -0,0 +1,2 @@
|
||||
import{u as f}from"./useApp.8bd6dbd4.js";import{_ as m}from"./index.2a9a64ca.js";const p=Vue.defineComponent({props:{config:{type:Object,default:()=>({})},model:{type:Object,default:()=>({})},vars:{type:Object,default:()=>({})}},setup(e){var s;f(e);const i=(s=Vue.getCurrentInstance())==null?void 0:s.proxy,t=Vue.inject("hoc");return{displayText:Vue.computed(()=>{var u,l;let c=((u=e.config)==null?void 0:u.text)||"";const{vars:o}=e;if((t==null?void 0:t.disabled)&&((l=e.config)==null?void 0:l.disabledText)&&(c=e.config.disabledText),typeof c=="function")return c.bind(i)(i,{model:e.model});if(Object.prototype.toString.call(o)==="[object Object]"){let a=c;return Object.entries(o).forEach(([r,d])=>{a=a.replace(new RegExp(`{{${r}}}`,"g"),d)}),a}return c||""})}},render(){var i,t,n,s;const e=(i=this.config)!=null&&i.multiple?"magic-ui-text":"magic-ui-text magic-ui-text--single-line";return typeof((t=this.$slots)==null?void 0:t.default)=="function"?Vue.h("div",{class:e},[((s=(n=this.$slots)==null?void 0:n.default)==null?void 0:s.call(n))||""]):Vue.h("div",{class:e,...this.displayText?{innerHTML:this.displayText}:{}})}}),b=m(p,[["__file","/parisma/github/tmagic-editor/packages/ui/src/text/src/index.vue"]]);export{b as default};
|
||||
//# sourceMappingURL=index.55a4739f.js.map
|
@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.55a4739f.js","sources":["../../../../../../packages/ui/src/text/src/index.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { computed, defineComponent, getCurrentInstance, h, inject, PropType } from 'vue';\n\nimport { MComponentInstance, MText, MTextInstance } from '../../../src/types';\nimport useApp from '../../useApp';\n\nexport default defineComponent({\n props: {\n config: {\n type: Object as PropType<MText>,\n default: () => ({}),\n },\n\n model: {\n type: Object,\n default: () => ({}),\n },\n\n vars: {\n type: Object,\n default: () => ({}),\n },\n },\n setup(props) {\n useApp(props);\n const vm: MTextInstance = getCurrentInstance()?.proxy as MTextInstance;\n const hoc: MComponentInstance = inject('hoc');\n const displayText = computed(() => {\n let text = props.config?.text || '';\n const { vars } = props;\n if (hoc?.disabled && props.config?.disabledText) {\n text = props.config.disabledText;\n }\n if (typeof text === 'function') {\n return text.bind(vm)(vm, { model: props.model });\n }\n if (Object.prototype.toString.call(vars) === '[object Object]') {\n let tmp: string = text;\n Object.entries(vars).forEach(([key, value]) => {\n tmp = tmp.replace(new RegExp(`{{${key}}}`, 'g'), value);\n });\n return tmp;\n }\n return text || '';\n });\n\n return {\n displayText,\n };\n },\n\n render() {\n const className = this.config?.multiple ? 'magic-ui-text' : 'magic-ui-text magic-ui-text--single-line';\n if (typeof this.$slots?.default === 'function') {\n return h('div', { class: className }, [this.$slots?.default?.() || '']);\n }\n return h('div', {\n class: className,\n ...(this.displayText ? { innerHTML: this.displayText } : {}),\n });\n },\n});\n</script>\n"],"names":["_sfc_main","props","useApp","vm","_a","hoc","text","vars","_b","tmp","key","value","className","_d","_c"],"mappings":"iFAMA,MAAeA,EAAA,IAAgB,gBAAA,CAAA,MAAA,CACtB,OAAA,CACG,KAAA,OACA,QAAA,KAAA,CAAA,EACW,EACnB,MAAA,CAEO,KAAA,OACC,QAAA,KAAA,CAAA,EACW,EACnB,KAAA,CAEM,KAAA,OACE,QAAA,KAAA,CAAA,EACW,CACnB,EACF,MAAAC,EAAA,OAEEC,EAAAD,CAAA,EACA,MAAAE,GAA0BC,EAAA,2BAAA,YAAAA,QAC1BC,EAAgC,kBAoBhC,MAAA,CAAO,YAnBa,0BAClB,IAAAC,IAAAF,EAAAH,EAAA,SAAA,YAAAG,EAAA,OAAA,GACA,KAAA,CAAA,KAAAG,CAAA,EAAAN,EAIA,IAHAI,GAAA,YAAAA,EAAA,aAAAG,EAAAP,EAAA,SAAA,YAAAO,EAAA,gBACEF,EAAAL,EAAA,OAAA,cAEF,OAAAK,GAAA,WACE,OAAAA,EAAA,KAAAH,CAAA,EAAAA,EAAA,CAAA,MAAAF,EAAA,KAAA,CAAA,EAEF,GAAA,OAAA,UAAA,SAAA,KAAAM,CAAA,IAAA,kBAAA,CACE,IAAAE,EAAAH,EACA,cAAA,QAAAC,CAAA,EAAA,QAAA,CAAA,CAAAG,EAAAC,CAAA,IAAA,CACEF,EAAAA,EAAA,QAAA,IAAA,OAAA,KAAAC,MAAA,GAAA,EAAAC,CAAA,CAAsD,CAAA,EAExDF,CAAO,CAET,OAAAH,GAAA,EAAe,CAAA,CAIf,CACF,EACF,QAAA,aAGE,MAAAM,GAAAR,EAAA,KAAA,SAAA,MAAAA,EAAA,SAAA,gBAAA,2CACA,OAAA,QAAAI,EAAA,KAAA,SAAA,YAAAA,EAAA,UAAA,WACS,IAAE,EAAA,MAAA,CAAA,MAAAI,CAAA,EAAA,GAAAC,GAAAC,EAAA,KAAA,SAAA,YAAAA,EAAA,UAAA,YAAAD,EAAA,KAAAC,KAAA,EAAA,CAAA,EAEJ,aAAS,MAAAF,EACP,GAAA,KAAA,YAAA,CAAA,UAAA,KAAA,WAAA,EAAA,CAAA,CACmD,CAAA,CAC3D,CAEL,CAAA"}
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -0,0 +1,2 @@
|
||||
import{u as l}from"./useApp.8bd6dbd4.js";import{_ as d}from"./index.2a9a64ca.js";const m=Vue.defineComponent({props:{config:{type:Object,default:()=>({})},model:{type:Object,default:()=>({})}},setup(t){var o;l(t);const n=(o=Vue.getCurrentInstance())==null?void 0:o.proxy,c=Vue.reactive([]),f=Vue.computed(()=>[typeof t.config.preAction=="function"?t.config.preAction:()=>!0,...c,typeof t.config.postAction=="function"?t.config.postAction:()=>!0]);function a(e){c.push(e)}async function s(){for(const e of f.value)if(typeof e=="function"&&await e(n,{model:t.model})===!1)break}const i=Vue.computed(()=>{var e,u,r;return{type:"text",text:((e=t.config)==null?void 0:e.text)||"",disabledText:((u=t.config)==null?void 0:u.disabledText)||"",html:((r=t.config)==null?void 0:r.html)||""}});return{pushAction:a,clickHandler:s,textConfig:i}}});function g(t,n,c,f,a,s){const i=Vue.resolveComponent("magic-ui-text");return Vue.openBlock(),Vue.createElementBlock("button",{class:"magic-ui-button",onClick:n[0]||(n[0]=(...o)=>t.clickHandler&&t.clickHandler(...o))},[Vue.renderSlot(t.$slots,"default",{},()=>[Vue.createVNode(i,{config:t.textConfig},null,8,["config"])])])}const V=d(m,[["render",g],["__file","/parisma/github/tmagic-editor/packages/ui/src/button/src/index.vue"]]);export{V as default};
|
||||
//# sourceMappingURL=index.d9593460.js.map
|
@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.d9593460.js","sources":["../../../../../../packages/ui/src/button/src/index.vue"],"sourcesContent":["<template>\n <button class=\"magic-ui-button\" @click=\"clickHandler\">\n <slot>\n <magic-ui-text :config=\"textConfig\"></magic-ui-text>\n </slot>\n </button>\n</template>\n<script lang=\"ts\">\nimport { computed, defineComponent, getCurrentInstance, PropType, reactive } from 'vue';\n\nimport { MButton, MButtonInstance, MText } from '../../../src/types';\nimport useApp from '../../useApp';\n\nexport default defineComponent({\n props: {\n config: {\n type: Object as PropType<MButton>,\n default: () => ({}),\n },\n\n model: {\n type: Object,\n default: () => ({}),\n },\n },\n setup(props) {\n useApp(props);\n const vm: MButtonInstance = getCurrentInstance()?.proxy as MButtonInstance;\n const actions = reactive<Function[]>([]);\n const actualActions = computed(() => [\n typeof props.config.preAction === 'function' ? props.config.preAction : () => true,\n ...actions,\n typeof props.config.postAction === 'function' ? props.config.postAction : () => true,\n ]);\n function pushAction(action: Function): void {\n actions.push(action);\n }\n async function clickHandler(): Promise<void> {\n for (const fn of actualActions.value) {\n if (typeof fn === 'function') {\n const ret = await fn(vm, { model: props.model });\n if (ret === false) {\n break;\n }\n }\n }\n }\n\n const textConfig = computed<MText>(() => ({\n type: 'text',\n text: props.config?.text || '',\n disabledText: props.config?.disabledText || '',\n html: props.config?.html || '',\n }));\n\n return {\n pushAction,\n clickHandler,\n textConfig,\n };\n },\n});\n</script>\n"],"names":["_sfc_main","props","useApp","vm","_a","actions","actualActions","pushAction","action","clickHandler","fn","textConfig","_b","_c"],"mappings":"iFAaA,MAAeA,EAAA,IAAgB,gBAAA,CAAA,MAAA,CACtB,OAAA,CACG,KAAA,OACA,QAAA,KAAA,CAAA,EACW,EACnB,MAAA,CAEO,KAAA,OACC,QAAA,KAAA,CAAA,EACW,CACnB,EACF,MAAAC,EAAA,OAEEC,EAAAD,CAAA,EACA,MAAAE,GAA4BC,EAAA,2BAAA,YAAAA,QAC5BC,EAAgB,IAAqB,SAAA,CAAA,CAAA,EACrCC,EAAsB,kBAAe,OAAAL,EAAA,OAAA,WAAA,WAAAA,EAAA,OAAA,UAAA,IAAA,GAC2C,GAAAI,EAC3E,OAAAJ,EAAA,OAAA,YAAA,WAAAA,EAAA,OAAA,WAAA,IAAA,EAC6E,CAAA,EAElF,SAAAM,EAAAC,EAAA,CACEH,EAAA,KAAAG,CAAA,CAAmB,CAErB,eAAAC,GAAA,CACE,UAAAC,KAAAJ,EAAA,MACE,GAAA,OAAAI,GAAA,YACE,MAAAA,EAAAP,EAAA,CAAA,MAAAF,EAAA,KAAA,CAAA,IACA,GACE,KAGN,CAGF,MAAAU,EAAmB,mCAAuB,KAAA,OAClC,OAAAP,EAAAH,EAAA,SAAA,YAAAG,EAAA,OAAA,GACsB,eAAAQ,EAAAX,EAAA,SAAA,YAAAW,EAAA,eAAA,GACgB,OAAAC,EAAAZ,EAAA,SAAA,YAAAY,EAAA,OAAA,EAChB,EAAA,EAG9B,MAAA,CAAO,WAAAN,EACL,aAAAE,EACA,WAAAE,CACA,CACF,CAEJ,CAAA,kCA5DE,IAIS,iBAAA,eAAA,EAJwB,OAAA,IAAA,UAAA,EAAO,IAAA,mBAAA,SAAA,CAAA,MAAA,mFAG/B,EAAA"}
|
@ -0,0 +1,2 @@
|
||||
import{C as i}from"./Component.aeed2f79.js";import{u as c}from"./useApp.8bd6dbd4.js";import{_ as s}from"./index.2a9a64ca.js";const a=Vue.defineComponent({components:{"magic-ui-component":i},props:{config:{type:Object,default:()=>({})}},setup(e){const o=c(e);return{style:Vue.computed(()=>o==null?void 0:o.transformStyle(e.config.style||{})),refresh(){window.location.reload()}}}}),r=["id"];function u(e,o,l,m,p,f){const t=Vue.resolveComponent("magic-ui-component");return Vue.openBlock(),Vue.createElementBlock("div",{id:`${e.config.id||""}`,class:Vue.normalizeClass(`magic-ui-page magic-ui-container magic-layout-${e.config.layout}${e.config.className?` ${e.config.className}`:""}`),style:Vue.normalizeStyle(e.style)},[Vue.renderSlot(e.$slots,"default"),(Vue.openBlock(!0),Vue.createElementBlock(Vue.Fragment,null,Vue.renderList(e.config.items,n=>(Vue.openBlock(),Vue.createBlock(t,{key:n.id,config:n},null,8,["config"]))),128))],14,r)}const y=s(a,[["render",u],["__file","/parisma/github/tmagic-editor/packages/ui/src/page/src/index.vue"]]);export{y as default};
|
||||
//# sourceMappingURL=index.ee5b9415.js.map
|
@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.ee5b9415.js","sources":["../../../../../../packages/ui/src/page/src/index.vue"],"sourcesContent":["<template>\n <div\n :id=\"`${config.id || ''}`\"\n :class=\"`magic-ui-page magic-ui-container magic-layout-${config.layout}${\n config.className ? ` ${config.className}` : ''\n }`\"\n :style=\"style\"\n >\n <slot></slot>\n <magic-ui-component v-for=\"item in config.items\" :key=\"item.id\" :config=\"item\"></magic-ui-component>\n </div>\n</template>\n\n<script lang=\"ts\">\nimport { computed, defineComponent, PropType } from 'vue';\n\nimport type { MPage } from '@tmagic/schema';\n\nimport Component from '../../Component.vue';\nimport useApp from '../../useApp';\n\nexport default defineComponent({\n components: {\n 'magic-ui-component': Component,\n },\n\n props: {\n config: {\n type: Object as PropType<MPage>,\n default: () => ({}),\n },\n },\n\n setup(props) {\n const app = useApp(props);\n\n return {\n style: computed(() => app?.transformStyle(props.config.style || {})),\n\n refresh() {\n window.location.reload();\n },\n };\n },\n});\n</script>\n"],"names":["_sfc_main","Component","props","app","useApp","_ctx","item","_component_magic_ui_component"],"mappings":"6HAqBA,MAAeA,EAAA,IAAgB,gBAAA,CAAA,WAAA,CACjB,qBAAAC,CACY,EACxB,MAAA,CAEO,OAAA,CACG,KAAA,OACA,QAAA,KAAA,CAAA,EACW,CACnB,EACF,MAAAC,EAAA,CAGE,MAAAC,EAAAC,EAAAF,CAAA,EAEA,MAAA,CAAO,MACE,IAAS,SAAA,IAAAC,GAAA,YAAAA,EAAA,eAAAD,EAAA,OAAA,OAAA,CAAA,EAAA,EAAmD,SAAA,CAGjE,OAAA,SAAA,QAAuB,CACzB,CACF,CAEJ,CAAA,2CA3CE,IASM,iBAAA,oBAAA,EAPE,OAAA,IAAA,UAAA,EAAA,IAAA,mBAAA,MAAA,CAAA,GAAA,GAAAG,EAAA,OAAA,IAAA,KAA0F,MAG/F,IAAA,eAAA,iDAAAA,EAAA,OAAA,SAAAA,EAAA,OAAA,UAAA,IAAAA,EAAA,OAAA,YAAA,IAAA,QAEY,IAAA,eAAAA,EAAA,KAAA,CAAA,EAAA,CACb,IAAA,WAAAA,EAAA,OAAA,SAAA,GAAA,cAA8D,EAAA,EAAA,IAAA,mBAAA,IAAA,cAAA,IAAA,WAAAA,EAAA,OAAA,MAAAC,IAAS,IAAA,UAAM,EAAA,IAAA,YAAAC,EAAA,CAAA,IAAAD,EAAA"}
|
@ -0,0 +1,2 @@
|
||||
import{u as n}from"./useApp.8bd6dbd4.js";import{_ as o}from"./index.2a9a64ca.js";const r=Vue.defineComponent({props:{config:{type:Object,default:()=>({})},model:{type:Object,default:()=>({})}},setup(e){return n(e),{clickHandler(){e.config.url&&(window.location.href=e.config.url)}}}}),t=["src"];function s(e,i,l,a,u,f){return Vue.openBlock(),Vue.createElementBlock("img",{class:"magic-ui-img",src:e.config.src,onClick:i[0]||(i[0]=(...c)=>e.clickHandler&&e.clickHandler(...c))},null,8,t)}const m=o(r,[["render",s],["__file","/parisma/github/tmagic-editor/packages/ui/src/img/src/index.vue"]]);export{m as default};
|
||||
//# sourceMappingURL=index.fb366993.js.map
|
@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.fb366993.js","sources":["../../../../../../packages/ui/src/img/src/index.vue"],"sourcesContent":["<template>\n <img class=\"magic-ui-img\" :src=\"config.src\" @click=\"clickHandler\" />\n</template>\n<script lang=\"ts\">\nimport { defineComponent, PropType } from 'vue';\n\nimport { MImg } from '../../types';\nimport useApp from '../../useApp';\n\nexport default defineComponent({\n props: {\n config: {\n type: Object as PropType<MImg>,\n default: () => ({}),\n },\n\n model: {\n type: Object,\n default: () => ({}),\n },\n },\n setup(props) {\n useApp(props);\n\n return {\n clickHandler() {\n if (props.config.url) window.location.href = props.config.url;\n },\n };\n },\n});\n</script>\n"],"names":["_sfc_main","props","useApp","_sfc_render","_ctx","_cache","$props","$setup","$data","$options"],"mappings":"iFASA,MAAeA,EAAA,IAAgB,gBAAA,CAAA,MAAA,CACtB,OAAA,CACG,KAAA,OACA,QAAA,KAAA,CAAA,EACW,EACnB,MAAA,CAEO,KAAA,OACC,QAAA,KAAA,CAAA,EACW,CACnB,EACF,MAAAC,EAAA,CAEE,OAAAC,EAAAD,CAAA,EAEA,CAAO,cAAA,CAEHA,EAAA,OAAA,MAAsB,OAAA,SAAA,KAAAA,EAAA,OAAA,IAAoC,CAC5D,CACF,CAEJ,CAAA,YA7BY,SAAAE,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAA,CAAsB,OAAA,IAAA,UAAA,EAAU,IAAA,mBAAA,MAAA,CAAA,MAAA,eAAQ,IAAAL,EAAA,OAAA"}
|
@ -0,0 +1,2 @@
|
||||
import{u}from"./useApp.8bd6dbd4.js";import{_ as l}from"./index.2a9a64ca.js";const f=Vue.defineComponent({props:{config:{type:Object,default:()=>({})},model:{type:Object,default:()=>({})}},setup(o){var i;const t=Vue.ref(!1),e=u(o),n=(i=e==null?void 0:e.page)==null?void 0:i.getNode(o.config.id),c=()=>{t.value=!0,e&&e.emit("overlay:open",n)},s=()=>{t.value=!1,e&&e.emit("overlay:close",n)};return e==null||e.on("editor:select",(m,r)=>{r.find(a=>a.id===o.config.id)?c():s()}),{visible:t,openOverlay:c,closeOverlay:s}}});function d(o,t,e,n,c,s){const i=Vue.resolveComponent("magic-ui-container");return o.visible?(Vue.openBlock(),Vue.createBlock(i,{key:0,class:"magic-ui-overlay",config:{items:o.config.items}},{default:Vue.withCtx(()=>[Vue.renderSlot(o.$slots,"default")]),_:3},8,["config"])):Vue.createCommentVNode("v-if",!0)}const v=l(f,[["render",d],["__file","/parisma/github/tmagic-editor/packages/ui/src/overlay/src/index.vue"]]);export{v as default};
|
||||
//# sourceMappingURL=index.fed7c0dd.js.map
|
@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.fed7c0dd.js","sources":["../../../../../../packages/ui/src/overlay/src/index.vue"],"sourcesContent":["<template>\n <magic-ui-container v-if=\"visible\" class=\"magic-ui-overlay\" :config=\"{ items: config.items }\">\n <slot></slot>\n </magic-ui-container>\n</template>\n<script lang=\"ts\">\nimport { defineComponent, ref } from 'vue';\n\nimport Core from '@tmagic/core';\nimport type { MNode } from '@tmagic/schema';\n\nimport useApp from '../../useApp';\n\nexport default defineComponent({\n props: {\n config: {\n type: Object,\n default: () => ({}),\n },\n\n model: {\n type: Object,\n default: () => ({}),\n },\n },\n\n setup(props) {\n const visible = ref(false);\n const app: Core | undefined = useApp(props);\n const node = app?.page?.getNode(props.config.id);\n\n const openOverlay = () => {\n visible.value = true;\n if (app) {\n app.emit('overlay:open', node);\n }\n };\n\n const closeOverlay = () => {\n visible.value = false;\n if (app) {\n app.emit('overlay:close', node);\n }\n };\n\n app?.on('editor:select', (info, path) => {\n if (path.find((node: MNode) => node.id === props.config.id)) {\n openOverlay();\n } else {\n closeOverlay();\n }\n });\n\n return {\n visible,\n\n openOverlay,\n closeOverlay,\n };\n },\n});\n</script>\n"],"names":["_sfc_main","props","visible","app","useApp","node","_a","openOverlay","closeOverlay","info","path","node2","_component_magic_ui_container","_ctx"],"mappings":"4EAaA,MAAeA,EAAA,IAAgB,gBAAA,CAAA,MAAA,CACtB,OAAA,CACG,KAAA,OACA,QAAA,KAAA,CAAA,EACW,EACnB,MAAA,CAEO,KAAA,OACC,QAAA,KAAA,CAAA,EACW,CACnB,EACF,MAAAC,EAAA,OAGE,MAAAC,EAAgB,YAChBC,EAAAC,EAAAH,CAAA,EACAI,GAAAC,EAAAH,GAAA,YAAAA,EAAA,OAAA,YAAAG,EAAA,QAAAL,EAAA,OAAA,IAEAM,EAAA,IAAA,CACEL,EAAA,MAAA,GACAC,GACEA,EAAA,KAAA,eAAAE,CAAA,CACF,EAGFG,EAAA,IAAA,CACEN,EAAA,MAAA,GACAC,GACEA,EAAA,KAAA,gBAAAE,CAAA,CACF,EAGF,OAAAF,GAAA,MAAAA,EAAA,GAAA,gBAAA,CAAAM,EAAAC,IAAA,CACEA,EAAA,KAAAC,GAAAA,EAAA,KAAAV,EAAA,OAAA,EAAA,EACEM,IAEAC,GACF,GAGF,CAAO,QAAAN,EACL,YAAAK,EAEA,aAAAC,CACA,CACF,CAEJ,CAAA,0BA3DmC,MAAAI,EAAA,IAAA,iBAAA,oBAAA,oCAA0B,IAAA,YAAAA,EAAA,CAAA,IAAA,EAAE,MAAA,mBAC9C,OAAA,CAAA,MAAAC,EAAA,OAAA,KAAA,CAAA,EAAA"}
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -0,0 +1,2 @@
|
||||
System.register([],(function(e,t){"use strict";return{execute:function(){e("u",(e=>{const t=Vue.inject("app"),n=t?.page?.getNode(e.config.id),u=Vue.getCurrentInstance()?.proxy;return n?.emit("created",u),Vue.onMounted((()=>{n?.emit("mounted",u)})),Vue.onUnmounted((()=>{n?.emit("destroy",u)})),t}))}}}));
|
||||
//# sourceMappingURL=useApp-legacy.d06aeb34.js.map
|
@ -0,0 +1 @@
|
||||
{"version":3,"file":"useApp-legacy.d06aeb34.js","sources":["../../../../../../packages/ui/src/useApp.ts"],"sourcesContent":["/*\n * Tencent is pleased to support the open source community by making TMagicEditor available.\n *\n * Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { getCurrentInstance, inject, onMounted, onUnmounted } from 'vue';\n\nimport Core from '@tmagic/core';\n\nexport default (props: any) => {\n const app: Core | undefined = inject('app');\n const node = app?.page?.getNode(props.config.id);\n\n const vm = getCurrentInstance()?.proxy;\n\n node?.emit('created', vm);\n\n onMounted(() => {\n node?.emit('mounted', vm);\n });\n\n onUnmounted(() => {\n node?.emit('destroy', vm);\n });\n\n return app;\n};\n"],"names":["exports","props","app","Vue","node","page","getNode","config","id","vm","emit","onMounted","onUnmounted"],"mappings":"yEAsBAA,EAAA,KAAAC,IACE,MAAAC,EAA8BC,kBAC9BC,EAAAF,GAAAG,MAAAC,QAAAL,EAAAM,OAAAC,IAEAC,EAAWN,gCAYX,OAVAC,GAAAM,KAAA,UAAAD,GAEAN,IAAAQ,WAAA,KACEP,GAAAM,KAAA,UAAAD,EAAA,IAGFN,IAAAS,aAAA,KACER,GAAAM,KAAA,UAAAD,MAGFP,CAAA"}
|
@ -0,0 +1,2 @@
|
||||
const r=c=>{var u,o;const e=Vue.inject("app"),t=(u=e==null?void 0:e.page)==null?void 0:u.getNode(c.config.id),n=(o=Vue.getCurrentInstance())==null?void 0:o.proxy;return t==null||t.emit("created",n),Vue.onMounted(()=>{t==null||t.emit("mounted",n)}),Vue.onUnmounted(()=>{t==null||t.emit("destroy",n)}),e};export{r as u};
|
||||
//# sourceMappingURL=useApp.8bd6dbd4.js.map
|
@ -0,0 +1 @@
|
||||
{"version":3,"file":"useApp.8bd6dbd4.js","sources":["../../../../../../packages/ui/src/useApp.ts"],"sourcesContent":["/*\n * Tencent is pleased to support the open source community by making TMagicEditor available.\n *\n * Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { getCurrentInstance, inject, onMounted, onUnmounted } from 'vue';\n\nimport Core from '@tmagic/core';\n\nexport default (props: any) => {\n const app: Core | undefined = inject('app');\n const node = app?.page?.getNode(props.config.id);\n\n const vm = getCurrentInstance()?.proxy;\n\n node?.emit('created', vm);\n\n onMounted(() => {\n node?.emit('mounted', vm);\n });\n\n onUnmounted(() => {\n node?.emit('destroy', vm);\n });\n\n return app;\n};\n"],"names":["useApp","props","_a","_b","app","node","vm"],"mappings":"AAsBA,MAAAA,EAAAC,GAAA,CAAA,IAAAC,EAAAC,EACE,MAAAC,EAA8B,kBAC9BC,GAAAH,EAAAE,GAAA,YAAAA,EAAA,OAAA,YAAAF,EAAA,QAAAD,EAAA,OAAA,IAEAK,GAAWH,EAAA,2BAAA,YAAAA,QAEX,OAAAE,GAAA,MAAAA,EAAA,KAAA,UAAAC,GAEA,IAAA,UAAA,IAAA,CACED,GAAA,MAAAA,EAAA,KAAA,UAAAC,EAAwB,CAAA,EAG1B,IAAA,YAAA,IAAA,CACED,GAAA,MAAAA,EAAA,KAAA,UAAAC,EAAwB,CAAA,EAG1BF,CACF"}
|
@ -24,7 +24,7 @@
|
||||
}
|
||||
</style>
|
||||
<script src="https://unpkg.com/vue@next/dist/vue.runtime.global.js"></script>
|
||||
<script type="module" crossorigin src="/static/vue3/runtime/page/assets/index.30b4791d.js"></script>
|
||||
<script type="module" crossorigin src="/static/vue3/runtime/page/assets/index.2a9a64ca.js"></script>
|
||||
<script type="module">try{import.meta.url;import("_").catch(()=>1);}catch(e){}window.__vite_is_modern_browser=true;</script>
|
||||
<script type="module">!function(){if(window.__vite_is_modern_browser)return;console.warn("vite: loading legacy build because dynamic import or import.meta.url is unsupported, syntax error above should be ignored");var e=document.getElementById("vite-legacy-polyfill"),n=document.createElement("script");n.src=e.src,n.onload=function(){System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src'))},document.body.appendChild(n)}();</script>
|
||||
</head>
|
||||
@ -32,7 +32,7 @@
|
||||
<div id="app"></div>
|
||||
|
||||
<script nomodule>!function(){var e=document,t=e.createElement("script");if(!("noModule"in t)&&"onbeforeload"in t){var n=!1;e.addEventListener("beforeload",(function(e){if(e.target===t)n=!0;else if(!e.target.hasAttribute("nomodule")||!n)return;e.preventDefault()}),!0),t.type="module",t.src=".",e.head.appendChild(t),t.remove()}}();</script>
|
||||
<script nomodule crossorigin id="vite-legacy-polyfill" src="/static/vue3/runtime/page/assets/polyfills-legacy.7a061a97.js"></script>
|
||||
<script nomodule crossorigin id="vite-legacy-entry" data-src="/static/vue3/runtime/page/assets/index-legacy.07638326.js">System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src'))</script>
|
||||
<script nomodule crossorigin id="vite-legacy-polyfill" src="/static/vue3/runtime/page/assets/polyfills-legacy.a62c3647.js"></script>
|
||||
<script nomodule crossorigin id="vite-legacy-entry" data-src="/static/vue3/runtime/page/assets/index-legacy.1dc0be94.js">System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src'))</script>
|
||||
</body>
|
||||
</html>
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1,2 +1,2 @@
|
||||
System.register([],(function(e){"use strict";return{execute:function(){e("default",{})}}}));
|
||||
System.register([],(function(e,t){"use strict";return{execute:function(){e("default",{})}}}));
|
||||
//# sourceMappingURL=plugin-entry-legacy.7d9da6d6.js.map
|
||||
|
@ -1 +1 @@
|
||||
{"version":3,"file":"plugin-entry-legacy.7d9da6d6.js","sources":["../../../../.tmagic/plugin-entry.ts"],"sourcesContent":["const plugins: Record<string, any> = {};\nexport default plugins;"],"names":["exports"],"mappings":"uEAAqCA,EAAA,UAAA,CAAA"}
|
||||
{"version":3,"file":"plugin-entry-legacy.7d9da6d6.js","sources":["../../../../.tmagic/plugin-entry.ts"],"sourcesContent":["const plugins: Record<string, any> = {};\nexport default plugins;"],"names":["exports"],"mappings":"yEAAqCA,EAAA,UAAA,CAAA"}
|
@ -1 +1 @@
|
||||
{"version":3,"file":"plugin-entry.b765d2c2.js","sources":["../../../../.tmagic/plugin-entry.ts"],"sourcesContent":["const plugins: Record<string, any> = {};\nexport default plugins;"],"names":[],"mappings":"AAAA,KAAM,GAA+B,CAAA"}
|
||||
{"version":3,"file":"plugin-entry.b765d2c2.js","sources":["../../../../.tmagic/plugin-entry.ts"],"sourcesContent":["const plugins: Record<string, any> = {};\nexport default plugins;"],"names":["plugins"],"mappings":"AAAA,MAAMA,EAA+B,CAAA"}
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -37,7 +37,7 @@
|
||||
background-color: rgba(51, 153, 255, 0.5) !important;
|
||||
}
|
||||
</style>
|
||||
<script type="module" crossorigin src="/static/vue3/runtime/playground/assets/index.6f272ec3.js"></script>
|
||||
<script type="module" crossorigin src="/static/vue3/runtime/playground/assets/index.6b44beaf.js"></script>
|
||||
<script type="module">try{import.meta.url;import("_").catch(()=>1);}catch(e){}window.__vite_is_modern_browser=true;</script>
|
||||
<script type="module">!function(){if(window.__vite_is_modern_browser)return;console.warn("vite: loading legacy build because dynamic import or import.meta.url is unsupported, syntax error above should be ignored");var e=document.getElementById("vite-legacy-polyfill"),n=document.createElement("script");n.src=e.src,n.onload=function(){System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src'))},document.body.appendChild(n)}();</script>
|
||||
</head>
|
||||
@ -49,7 +49,7 @@
|
||||
|
||||
|
||||
<script nomodule>!function(){var e=document,t=e.createElement("script");if(!("noModule"in t)&&"onbeforeload"in t){var n=!1;e.addEventListener("beforeload",(function(e){if(e.target===t)n=!0;else if(!e.target.hasAttribute("nomodule")||!n)return;e.preventDefault()}),!0),t.type="module",t.src=".",e.head.appendChild(t),t.remove()}}();</script>
|
||||
<script nomodule crossorigin id="vite-legacy-polyfill" src="/static/vue3/runtime/playground/assets/polyfills-legacy.ebeee3b7.js"></script>
|
||||
<script nomodule crossorigin id="vite-legacy-entry" data-src="/static/vue3/runtime/playground/assets/index-legacy.97f27bc4.js">System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src'))</script>
|
||||
<script nomodule crossorigin id="vite-legacy-polyfill" src="/static/vue3/runtime/playground/assets/polyfills-legacy.c34c258a.js"></script>
|
||||
<script nomodule crossorigin id="vite-legacy-entry" data-src="/static/vue3/runtime/playground/assets/index-legacy.a7d99324.js">System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src'))</script>
|
||||
</body>
|
||||
</html>
|
Loading…
x
Reference in New Issue
Block a user