@ibiz-template/vue3-components 0.7.41-alpha.85 → 0.7.41-alpha.86
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/ibiz-markdown-editor-8I67TTyP.js +1 -0
- package/dist/{index-DKnd7hoK.js → index-DXZebbt6.js} +14 -14
- package/dist/{index.es-BGx4OxzI.js → index.es-DjIFIH0H.js} +1 -1
- package/dist/index.min.css +1 -1
- package/dist/index.system.min.js +1 -1
- package/dist/wang-editor-DAuX9MZ2.js +1 -0
- package/dist/{xlsx-util-Dc8ZXudS.js → xlsx-util-C07LlKdO.js} +1 -1
- package/es/common/pql-editor/pql-editor.mjs +5 -4
- package/es/common/pql-editor/utils/index.mjs +80 -25
- package/es/control/app-menu/app-menu.css +1 -1
- package/es/control/app-menu/app-menu.mjs +9 -3
- package/es/control/calendar/components/calendar-user/calendar-user.mjs +2 -2
- package/es/control/drtab/flow-drtab.mjs +2 -1
- package/es/control/grid/grid/grid.css +1 -1
- package/es/editor/dropdown-list/ibiz-dropdown/ibiz-dropdown.mjs +7 -5
- package/es/editor/html/wang-editor/wang-editor.mjs +3 -0
- package/es/editor/markdown/ibiz-markdown-editor/ibiz-markdown-editor.css +1 -1
- package/es/editor/markdown/ibiz-markdown-editor/ibiz-markdown-editor.mjs +7 -0
- package/es/panel-component/panel-button/panel-button.controller.mjs +5 -2
- package/es/util/ai-chat-util/ai-chat-util.mjs +6 -2
- package/lib/common/pql-editor/pql-editor.cjs +4 -3
- package/lib/common/pql-editor/utils/index.cjs +82 -25
- package/lib/control/app-menu/app-menu.cjs +9 -3
- package/lib/control/app-menu/app-menu.css +1 -1
- package/lib/control/calendar/components/calendar-user/calendar-user.cjs +1 -1
- package/lib/control/drtab/flow-drtab.cjs +2 -1
- package/lib/control/grid/grid/grid.css +1 -1
- package/lib/editor/dropdown-list/ibiz-dropdown/ibiz-dropdown.cjs +7 -5
- package/lib/editor/html/wang-editor/wang-editor.cjs +3 -0
- package/lib/editor/markdown/ibiz-markdown-editor/ibiz-markdown-editor.cjs +7 -0
- package/lib/editor/markdown/ibiz-markdown-editor/ibiz-markdown-editor.css +1 -1
- package/lib/panel-component/panel-button/panel-button.controller.cjs +5 -2
- package/lib/util/ai-chat-util/ai-chat-util.cjs +6 -2
- package/package.json +6 -6
- package/dist/ibiz-markdown-editor-YVJmo2Yz.js +0 -1
- package/dist/wang-editor-D68lybS7.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
System.register(["vue","@ibiz-template/vue3-util","qx-util","cherry-markdown","@ibiz-template/runtime","@ibiz-template/core"],function(e){"use strict";var t,n,i,o,a,l,r,s,c,d,u,m,h,v,p,f,b,g,w;return{setters:[function(e){t=e.nextTick,n=e.ref,i=e.onBeforeUnmount,o=e.createVNode,a=e.resolveComponent,l=e.defineComponent,r=e.watch,s=e.onMounted,c=e.onUnmounted},function(e){d=e.useUIStore,u=e.getMarkDownEmits,m=e.getMarkDownProps,h=e.useNamespace},function(e){v=e.createUUID},function(e){p=e.default},function(e){f=e.parseSearchParams,b=e.UIActionUtil,g=e.OpenAppViewCommand},function(e){w=e.IBizContext}],execute:function(){function k(e,t){return!(!e||1!==e.nodeType||e.nodeName!==t)}function C(e){const l=n(""),r=n([]),s=n(),c=n(!1);let d=null;const u=async e=>{var n;if(c.value=!0,l.value=e,r.value=[e],await t(),s.value){const{container:e}=s.value.$refs;e&&(null==(n=e.children[0])||n.click())}},m=e=>{"Escape"!==e.key&&27!==e.keyCode||(e.stopPropagation(),e.preventDefault(),r.value=[],c.value=!1,v())},h=async()=>{var e;await t();const n=null==(e=s.value)?void 0:e.$refs.container;if(!n)return;const i=n.querySelector(".el-image-viewer__wrapper");null==i||i.addEventListener("keydown",m)},v=()=>{var e;const t=null==(e=s.value)?void 0:e.$refs.container;if(!t)return;const n=t.querySelector(".el-image-viewer__wrapper");null==n||n.removeEventListener("keydown",m)},p=e=>{const t=null==e?void 0:e.target;if(k(t,"IMG")&&t)return void u(t.src);const n=function(e){let t=e;for(;t;){if(t.classList.contains("cherry-previewer"))return null;const e=t.parentElement;if(k(t,"svg")&&e&&"mermaid"===e.dataset.type)return t;t=t.parentElement}return null}(t);n&&u(function(e){const t=e.cloneNode(!0),n=e.width.baseVal.value||e.clientWidth,i=e.height.baseVal.value||e.clientHeight;t.setAttribute("width",n),t.setAttribute("height",i),t.style.backgroundColor="white";const o=(new XMLSerializer).serializeToString(t),a=btoa(unescape(encodeURIComponent(o)));return"data:image/svg+xml;base64,".concat(a)}(n))},f=()=>{r.value=[],c.value=!1};return i(()=>{d&&(d.removeEventListener("click",p),d=null),v()}),{isImgPreview:c,renderImgPreview:()=>o(a("el-image"),{class:e.e("img-preview"),ref:s,"zoom-rate":1.1,src:l.value,"preview-src-list":r.value,"hide-on-click-modal":!0,onShow:h,onClose:f,fit:"cover"},null),onMDEditorCreated:e=>{var t,n;d=(null==(n=null==(t=null==e?void 0:e.previewer)?void 0:t.previewerBubble)?void 0:n.previewerDom)||null,null==d||d.addEventListener("click",p)}}}e("default",l({name:"IBizMarkDown",props:m(),emits:u(),setup(e,{emit:a,slots:l}){var u,m,k,x,y,z;const I=h("markdown"),P=e.controller,M=n("");let E=null;const A={en:"en_US","zh-CN":"zh_CN"},S=v(),{isImgPreview:U,onMDEditorCreated:D,renderImgPreview:O}=C(I),T=ibiz.util.file.getUploadHeaders(),B=n({...T}),L=n(""),N=(null==(u=null==P?void 0:P.editorParams)?void 0:u.customTheme)||(null==(m=null==P?void 0:P.editorParams)?void 0:m.customtheme),V="true"===(null==(k=null==P?void 0:P.editorParams)?void 0:k.enablenoaccess),{UIStore:R}=d(),H=n(N||R.theme),j=n(!1);let q="default";P&&(null==(x=P.editorParams)?void 0:x.showmode)&&(q=P.editorParams.showmode);const F=n(!1),_=n("editOnly");let J=null,W=null,$=0;const G=n({}),Y=n({}),X=n("pure");let K=!1,Q=!1;(null==(y=null==P?void 0:P.editorParams)?void 0:y.disabledirectory)&&(Q="true"===P.editorParams.disabledirectory);let Z="absolute";(null==(z=null==P?void 0:P.editorParams)?void 0:z.tocpos)&&(Z="fixed"===P.editorParams.tocpos?"fixed":"absolute");const[ee,te,ne]=function(e,n){if(!e)return[];const{props:i,isEditing:o,currentVal:a,emit:l}=n;let r=n.chatInstance;const s=p.createMenuHook("AI",{icon:{type:"svg",content:"<svg\n viewBox='0 0 16 16'\n xmlns='http://www.w3.org/2000/svg'\n fill='currentColor'\n height='1em'\n width='1em'\n preserveAspectRatio='xMidYMid meet'\n focusable='false'\n >\n <g\n id='aae1.Base基础/1.icon图标/2.normal/ai-star'\n stroke-width='1'\n fill-rule='evenodd'\n >\n <path\n d='M5.817 1.53l3.158 8.797h.054v.152l1.443 4.021-1.402.001-1.041-2.982H2.495l-1.03 2.982L0 14.5 4.671 1.533l1.146-.003zm7.86 5.424V14.5h-1.213V6.954h1.212zM5.248 3.549l-2.342 6.778h4.706L5.249 3.55zM13.046 0c.075 0 .147.02.204.071a.318.318 0 01.094.181l.064.273c.097.417.17.727.255.968.084.24.177.4.31.523.134.124.318.218.599.306.281.088.65.166 1.15.265a.358.358 0 01.195.095c.056.057.083.13.083.213a.289.289 0 01-.083.21.362.362 0 01-.197.094c-.528.093-.918.167-1.214.255-.295.088-.485.187-.621.324-.137.138-.23.324-.31.606-.08.283-.145.651-.23 1.147a.329.329 0 01-.093.184.293.293 0 01-.206.075.308.308 0 01-.207-.072.322.322 0 01-.1-.188l-.006-.033c-.085-.486-.149-.845-.228-1.12-.079-.274-.17-.452-.305-.585-.135-.133-.323-.23-.618-.32s-.683-.168-1.21-.273a.353.353 0 01-.2-.096.29.29 0 01-.08-.208c0-.079.023-.153.079-.211a.35.35 0 01.2-.097c.5-.098.869-.176 1.15-.263.282-.087.465-.18.597-.302.132-.12.224-.278.306-.511.082-.236.151-.539.244-.947l.071-.312a.312.312 0 01.102-.183.311.311 0 01.205-.069z'\n id='aae形状结合'\n ></path>\n </g>\n </svg>\n "},onClick:(n,i,o)=>{o.stopPropagation(),o.preventDefault(),t(()=>{var t;if(null==(t=e.mdeditor)?void 0:t.bubble){e.mdeditor.bubble.showBubble();const t=e.mdeditor.bubble.bubbleDom.getBoundingClientRect();if(!t||!t.left||!t.top)return;const n=ibiz.inLineAIUtil.calcContextMenus(e.deACMode,t=>{e.doInLineAIUIAction(t,e.model.appId)});if(0===n.length)return;const{zIndex:i}=d(),o=i.increment();ibiz.inLineAIUtil.showContextMenus(t.left,t.top+43,n,{zIndex:o,onClose:()=>{i.decrement()}})}})}}),c=p.createMenuHook("AIChart",{icon:{type:"svg",content:"<svg\n viewBox='0 0 16 16'\n xmlns='http://www.w3.org/2000/svg'\n fill='currentColor'\n height='1em'\n width='1em'\n preserveAspectRatio='xMidYMid meet'\n focusable='false'\n >\n <g\n id='aae1.Base基础/1.icon图标/2.normal/ai-star'\n stroke-width='1'\n fill-rule='evenodd'\n >\n <path\n d='M5.817 1.53l3.158 8.797h.054v.152l1.443 4.021-1.402.001-1.041-2.982H2.495l-1.03 2.982L0 14.5 4.671 1.533l1.146-.003zm7.86 5.424V14.5h-1.213V6.954h1.212zM5.248 3.549l-2.342 6.778h4.706L5.249 3.55zM13.046 0c.075 0 .147.02.204.071a.318.318 0 01.094.181l.064.273c.097.417.17.727.255.968.084.24.177.4.31.523.134.124.318.218.599.306.281.088.65.166 1.15.265a.358.358 0 01.195.095c.056.057.083.13.083.213a.289.289 0 01-.083.21.362.362 0 01-.197.094c-.528.093-.918.167-1.214.255-.295.088-.485.187-.621.324-.137.138-.23.324-.31.606-.08.283-.145.651-.23 1.147a.329.329 0 01-.093.184.293.293 0 01-.206.075.308.308 0 01-.207-.072.322.322 0 01-.1-.188l-.006-.033c-.085-.486-.149-.845-.228-1.12-.079-.274-.17-.452-.305-.585-.135-.133-.323-.23-.618-.32s-.683-.168-1.21-.273a.353.353 0 01-.2-.096.29.29 0 01-.08-.208c0-.079.023-.153.079-.211a.35.35 0 01.2-.097c.5-.098.869-.176 1.15-.263.282-.087.465-.18.597-.302.132-.12.224-.278.306-.511.082-.236.151-.539.244-.947l.071-.312a.312.312 0 01.102-.183.311.311 0 01.205-.069z'\n id='aae形状结合'\n ></path>\n </g>\n </svg>\n "},onClick:async()=>{const t=e.model.appDataEntityId;if(!t||!e.deACMode)return;const{zIndex:n}=d(),s=n.increment();r=await ibiz.aiChatUtil.getAIChat();const{containerOptions:c,chatOptions:u}=await ibiz.aiChatUtil.getEditorExAIChatParams(e.editorParams,e.context,e.params,i.data,e.deACMode,{chatInstance:r,view:e.view,ctrl:e.ctrl}),m=await ibiz.aiChatUtil.getAIResourceOptions(e.context,e.params);r.create({resourceOptions:m,containerOptions:{zIndex:s,...c},chatOptions:{caption:e.deACMode.logicName,context:{...e.context},params:{...e.params,srfactag:e.deACMode.codeName},appDataEntityId:t,...u,action:(e,t)=>{"backfill"===e&&(o.value?a.value=t.realcontent||"":l("change",t.realcontent))}}})}}),u={};return e.extraActions.forEach(t=>{const{uiactionId:n,sysImage:i,caption:o}=t,a=n.split("@")[0],r={onClick:async()=>{const t=await e.doCustomUIAction(n,e.model.appId);t.length>0&&l("customAction",{tag:n,data:t})}};i&&(r.icon={type:"svg",content:i.rawContent}),u[a]=p.createMenuHook(o,r)}),[s,c,u]}(P,{props:e,chatInstance:undefined,isEditing:j,currentVal:M,emit:a});r(()=>e.data,e=>{if(e&&P){const t={...P.editorParams,enableNoAccess:V};t.uploadparams&&(t.uploadParams=JSON.parse(t.uploadparams));const n=ibiz.util.file.calcFileUpDownUrl(P.context,P.params,e,t);L.value=n.uploadUrl}},{immediate:!0,deep:!0});const ie=n(),oe=async(t,n)=>{const i=await ibiz.util.file.fileUpload(L.value,t,B.value),o=((e,t)=>{if(!P)return"";const n={...P.editorParams,enableNoAccess:V};return n.exportparams&&(n.exportParams=JSON.parse(n.exportparams)),n.globaldownloadprifix?n.globalDownloadPrifix="true"===n.globaldownloadprifix:n.globalDownloadPrifix=ibiz.config.common.globalDownloadPrifix,t&&t.folder&&(n.osscat=t.folder),ibiz.util.file.calcFileUpDownUrl(P.context,P.params,e,n).downloadUrl})(e.data||{},i.fileid);let a=o.replace("%fileId%",i.fileid);if(ibiz.config.common.enableDownloadTicket&&P&&P.editorParams&&!V){const t=await ibiz.util.file.getDownloadTicket(P.context,P.params,e.data||{},{fileId:i.fileid},P.downloadTicketParams);t&&t.ticket&&(a=o.replace("%fileId%",t.ticket),n(a))}else n(a)},ae=()=>null==E?void 0:E.getMarkdown(),le=e=>{K=!0,null==E||E.setMarkdown(e,!0)};r(()=>e.value,(e,t)=>{e!==t&&(M.value=e||"")},{immediate:!0}),r(M,(e,t)=>{const n=ae();e!==t&&n!==e&&le(e)});const re=e=>{"manual"!==q&&(a("change",ae(),null==P?void 0:P.model.id,K),K=!1)},se=(e,t)=>({[e]:t}),ce=t=>{var n,i,o;const a=null==(n=t.target)?void 0:n.closest('a[href^="chunkview://"], a[href^="view://"], a[href^="action://"]');if(!a)return;t.preventDefault();let l=a.getAttribute("href");if(!l)return;const r=["chunkview","view","action"].find(e=>l.startsWith("".concat(e,"://")))||"";if(!r)return;if("chunkview"===r){const t=(null==P?void 0:P.editorParams.chunkview)||e.chunkView,n=(null==P?void 0:P.editorParams.chunkentity)||e.chunkEntity;if(!t||!n)return;const i=l.replace("chunkview://","");l="view://".concat(t,'?srfnavctx={"').concat(n,'":"').concat(i,'"}')}const{protocolId:s,context:c,params:d}=(e=>{const t=new URL(e),n={},i={};let o="";if(t.searchParams.size>0){const o=t.searchParams.get("srfnavctx");if(o){try{Object.assign(n,JSON.parse(o))}catch(t){ibiz.log.error(ibiz.i18n.t("runtime.utils.openRedirectView.parseSrfnavctxParameter",{urlStr:e}),t)}t.searchParams.delete("srfnavctx")}t.searchParams.forEach((e,t)=>{i[t]=e})}else if(t.search){const o=f(t.search),a=o.srfnavctx;if(a){try{const e=decodeURIComponent(a);Object.assign(n,JSON.parse(e))}catch(t){ibiz.log.error(ibiz.i18n.t("runtime.utils.openRedirectView.parseSrfnavctxParameter",{urlStr:e}),t)}delete o.srfnavctx}Object.keys(o).forEach(e=>{i[e]=o[e]})}const a=t.pathname||t.hostname,l=a.replace("//","").split("/"),[r,s]=l;return o="action:"===t.protocol?"".concat(t.username,"@").concat(a):s||r,{params:i,context:n,protocolId:o}})(l);if(!s)return;const u=(null==(i=null==P?void 0:P.context)?void 0:i.clone())||(null==(o=e.context)?void 0:o.clone())||w.create({});switch(Object.assign(u,c),r){case"chunkview":case"view":ibiz.commands.execute(g.TAG,s,Object.assign(u,{srfkeepnull:!0}),d);break;case"action":b.exec(s,{event:t,params:d,context:u,data:[e.data||{}],view:(null==P?void 0:P.view)||e.view,ctrl:(null==P?void 0:P.ctrl)||e.ctrl},u.appid||u.srfappid)}},de=(e,t="")=>{const n=document.createElement(e);return n.className=t,n},ue=e=>de("i","ch-icon ch-icon-".concat(e)),me=I.e("fullscreen"),he=e=>{for(;e.firstChild;)e.removeChild(e.firstChild)},ve=()=>{if(E&&ie.value){const e=E.editor.options.editorDom.parentElement;if(!e)return{};const t=e.classList,n=ie.value.querySelector(".".concat(me));return n?{parentElement:e,cherryClass:t,fullscreenNode:n}:{}}return{}},pe=()=>{const{parentElement:e,cherryClass:t,fullscreenNode:n}=ve();e&&t&&n&&(he(n),n.appendChild(ue("fullscreen")),n.title=ibiz.i18n.t("editor.common.fullscreen"),t.remove("fullscreen"),null==e||e.blur(),e.setAttribute("tabindex","-1"))},fe=()=>{const{cherryClass:e}=ve();return null==e?void 0:e.contains("fullscreen")},be=()=>{E&&ie.value&&(fe()?(pe(),E.toggleToc(X.value),F.value=!1):((()=>{const{parentElement:e,cherryClass:n,fullscreenNode:i}=ve();e&&n&&i&&(he(i),i.appendChild(ue("minscreen")),n.add("fullscreen"),i.title=ibiz.i18n.t("editor.common.minimize"),e.setAttribute("tabindex","-1"),t(()=>null==e?void 0:e.focus()))})(),X.value=E.toc.model,E.toggleToc("full"),F.value=!0))},ge=e=>{e.stopPropagation(),"Escape"===e.key&&(e.preventDefault(),fe()&&(pe(),E.toggleToc(X.value),F.value=!1))},we=e=>{null==P||P.setCurrentEditorTheme(e)},ke=e=>{var t,n;const{info:i}=e;let o=!0;const a=i.ranges&&i.ranges[0];if(a){const{anchor:e,head:t}=a;o=P.isPositionBefore(e,t)}else o=!0;const l=null==(t=P.mdeditor)?void 0:t.editor.editor.getCursor("start"),r=null==(n=P.mdeditor)?void 0:n.editor.editor.getCursor("end");P.setCursorPos(l,r),P.setSelectionDirection(o)};r(()=>R.theme,e=>{H.value=N||e,null==E||E.setTheme(H.value),null==E||E.setCodeBlockTheme(H.value)});const Ce=()=>{j.value=!0,_.value="editOnly",null==E||E.switchModel(_.value)},xe=()=>{j.value=!1,_.value="previewOnly",null==E||E.switchModel(_.value)},ye=()=>{le(M.value),xe()},ze=()=>{a("change",ae(),null==P?void 0:P.model.id,K),K=!1,xe()},Ie=()=>{const e=document.getElementById(S);null==e||e.focus()};return s(()=>{var n;(e.disabled||e.readonly||"manual"===q)&&(_.value="previewOnly"),t(()=>{var t,n,i;const o=["bold","italic","underline","strikethrough","sub","sup","|","size","color"],a=["bold","italic","underline","strikethrough","|","color","header","|","list","image",{insert:["link","hr","br","code","formula","toc","table","line-table","bar-table"]},"settings","togglePreview"];if(P&&P.chatCompletion&&(a.unshift("AIChart"),o.unshift("AI")),P&&P.extraActions.length>0){const e=P.extraActions.map(e=>e.uiactionId.split("@")[0]);a.push(...e)}const r=ibiz.i18n.getLang(),s=A[r]||r;E=new p({id:S,value:M.value,locale:s,previewer:{enablePreviewerBubble:!(e.disabled||e.readonly)},themeSettings:{mainTheme:H.value,codeBlockTheme:H.value},fileUpload:oe,emoji:{useUnicode:!0},header:{anchorStyle:"autonumber"},editor:{height:"100%",defaultModel:_.value,codemirror:{autofocus:!1,placeholder:null==P?void 0:P.placeHolder}},toolbars:{toolbar:a,bubble:o,float:["h1","h2","h3","|","checklist","quote","quickTable","code"],customMenu:{AI:ee,AIChart:te,...ne},sidebar:["theme","copy"],toolbarRight:[],toc:!Q&&{updateLocationHash:!1,defaultModel:"pure",showAutoNumber:!0,position:Z,cssText:""}},callback:{afterChange:re,onClickPreview:ce,beforeImageMounted:se},event:{changeMainTheme:we,selectionChange:ke},engine:{syntax:{table:{enableChart:!1,externals:["echarts"]}}}}),E.toggleToc("pure");const c=E.engine.makeHtml(M.value);E.previewer.update(c),null==(n=null==(t=E.toc)?void 0:t.updateTocList)||n.call(t),E.setTheme(H.value),N&&(E.setTheme(N),E.setCodeBlockTheme(N));const d=de("span","".concat(me," cherry-toolbar-button"));d.title=ibiz.i18n.t("editor.common.fullscreen"),d.onclick=be,d.appendChild(ue("fullscreen"));const u=e.disabled?E.editor.options.editorDom.parentElement:null==(i=E.editor.options.editorDom.parentElement)?void 0:i.querySelector(".cherry-toolbar>.toolbar-right");if(null==u||u.appendChild(d),null==P||P.setMDEditor(E),D(E),l.editorSwitchMenu&&window.ResizeObserver&&ie.value){const e=ie.value.querySelector(".cherry-toolbar");e&&(W=new ResizeObserver(e=>{var t;const n=null==(t=e[0])?void 0:t.contentRect.height;Y.value=I.cssVarBlock({"toolbar-height":"".concat(n,"px")})}),W.observe(e))}}),(()=>{if(window.ResizeObserver&&ie.value){const e={width:ie.value.offsetWidth?"".concat(ie.value.offsetWidth,"px"):"100%"};P&&"number"==typeof P.parent.model.height&&Object.assign(e,{height:"".concat(P.parent.model.height,"px")}),G.value=I.cssVarBlock(e),J=new ResizeObserver(e=>{const t=e[0].contentRect.width;if(t!==$){const n={width:"".concat(e[0].contentRect.width,"px")};P&&"number"==typeof P.parent.model.height&&Object.assign(n,{height:"".concat(P.parent.model.height,"px")}),G.value=I.cssVarBlock(n),$=t}}),J.observe(ie.value)}})(),null==(n=ie.value)||n.addEventListener("keydown",ge.bind(this))}),i(()=>{var e;null==(e=ie.value)||e.removeEventListener("keydown",ge.bind(this))}),c(()=>{E=null,J&&J.disconnect(),W&&W.disconnect()}),{ns:I,currentVal:M,id:S,editor:E,markDownBox:ie,headers:B,theme:H,UIStore:R,defaultModel:_,cssVars:G,isEditing:j,showmode:q,isFullScreen:F,isImgPreview:U,getCherryHtml:()=>null==E?void 0:E.getHtml(),getCherryContent:ae,setCherryContent:le,renderHeader:()=>{if("manual"===q&&!j.value)return o("div",{onClick:Ie,class:[I.e("header"),I.is("fullscreen",F.value)]},[!e.disabled&&!e.readonly&&o("div",{class:I.em("header","edit"),onClick:Ce,title:ibiz.i18n.t("editor.markdown.edit")},[o("i",{class:"fa fa-edit","aria-hidden":"true"},null)]),o("div",{class:I.em("header","full"),onClick:be},[F.value?o("i",{class:"fa fa-compress","aria-hidden":"true",title:ibiz.i18n.t("editor.html.reduce")},null):o("i",{class:"fa fa-expand","aria-hidden":"true",title:ibiz.i18n.t("editor.common.fullscreen")},null)])])},renderFooter:()=>{if("manual"===q&&j.value&&!e.disabled&&!e.readonly)return o("div",{onClick:Ie,class:[I.e("footer"),I.is("fullscreen",F.value)]},[o("div",{class:I.em("footer","cancel"),onClick:ye},[ibiz.i18n.t("editor.common.cancel")]),o("div",{class:I.em("footer","save"),onClick:ze},[ibiz.i18n.t("editor.common.confirm")])])},renderImgPreview:O,renderEditorSwitchMenu:()=>{var e;return o("div",{class:[I.b("menu"),I.is("fullscreen",F.value)],style:Y.value},[null==(e=l.editorSwitchMenu)?void 0:e.call(l)])}}},render(){const e=!!this.$slots.editorSwitchMenu;return o("div",{ref:"markDownBox",class:[this.ns.b(),this.ns.is("disabled",this.disabled),this.ns.is("manual","manual"===this.showmode),this.ns.is("editing",this.isEditing),this.ns.is("show-editor-switch-menu",e),this.ns.is("editor-content-fixed",this.isFullScreen||this.isImgPreview)]},[e?this.renderEditorSwitchMenu():null,this.renderHeader(),this.renderFooter(),this.renderImgPreview(),o("div",{tabindex:"-1",id:this.id,style:this.cssVars,class:[this.ns.b("cherry"),this.ns.m("dark"===this.UIStore.theme?"dark":"light")]},null)])}}))}}});
|