@ibiz-template/vue3-components 0.7.41-alpha.41 → 0.7.41-alpha.42
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-pEdb_gS_.js +1 -0
- package/dist/{index-Bv2fgePf.js → index-BObZTN7-.js} +3 -3
- package/dist/index.min.css +1 -1
- package/dist/index.system.min.js +1 -1
- package/dist/wang-editor-Ck-JCWqK.js +1 -0
- package/dist/{xlsx-util-Dvg2kWh7.js → xlsx-util-B1eGfH7d.js} +1 -1
- package/es/control/form/form-detail/form-item/composite-form-item-ex/composite-form-item-ex.controller.mjs +16 -6
- package/es/editor/code/monaco-editor/monaco-editor.mjs +8 -2
- package/es/editor/html/wang-editor/wang-editor.mjs +12 -2
- package/es/editor/markdown/ibiz-markdown-editor/custom-menu.mjs +11 -2
- package/es/editor/markdown/ibiz-markdown-editor/ibiz-markdown-editor.css +1 -1
- package/es/editor/markdown/ibiz-markdown-editor/ibiz-markdown-editor.mjs +2 -1
- package/es/editor/text-box/input/input.mjs +1 -1
- package/es/util/ai-chat-util/ai-chat-util.mjs +8 -9
- package/es/util/inline-ai-util/inline-ai-textarea/inline-ai-textarea.hook.mjs +7 -3
- package/es/util/inline-ai-util/inline-ai-textarea/inline-ai-textarea.mjs +3 -1
- package/lib/control/form/form-detail/form-item/composite-form-item-ex/composite-form-item-ex.controller.cjs +16 -6
- package/lib/editor/code/monaco-editor/monaco-editor.cjs +8 -2
- package/lib/editor/html/wang-editor/wang-editor.cjs +12 -2
- package/lib/editor/markdown/ibiz-markdown-editor/custom-menu.cjs +11 -2
- package/lib/editor/markdown/ibiz-markdown-editor/ibiz-markdown-editor.cjs +2 -1
- package/lib/editor/markdown/ibiz-markdown-editor/ibiz-markdown-editor.css +1 -1
- package/lib/editor/text-box/input/input.cjs +1 -1
- package/lib/util/ai-chat-util/ai-chat-util.cjs +8 -9
- package/lib/util/inline-ai-util/inline-ai-textarea/inline-ai-textarea.cjs +3 -1
- package/lib/util/inline-ai-util/inline-ai-textarea/inline-ai-textarea.hook.cjs +7 -3
- package/package.json +4 -4
- package/dist/ibiz-markdown-editor-DEV-iSvz.js +0 -1
- package/dist/wang-editor-4cNAgOaJ.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
System.register(["vue","@ibiz-template/vue3-util","qx-util","cherry-markdown","@ibiz-template/core","@ibiz-template/runtime"],function(e){"use strict";var t,n,a,i,o,l,r,s,c,d,u,m,h,p,v,f,b,g;return{setters:[function(e){t=e.nextTick,n=e.ref,a=e.onBeforeUnmount,i=e.createVNode,o=e.resolveComponent,l=e.defineComponent,r=e.watch,s=e.onMounted,c=e.onUnmounted},function(e){d=e.useUIStore,u=e.getEditorEmits,m=e.getMarkDownProps,h=e.useNamespace},function(e){p=e.createUUID},function(e){v=e.default},function(e){f=e.IBizContext},function(e){b=e.UIActionUtil,g=e.SysUIActionTag}],execute:function(){function w(e,t){return!(!e||1!==e.nodeType||e.nodeName!==t)}function y(e){const l=n(""),r=n([]),s=n();let c=null;const d=async e=>{var n;if(l.value=e,r.value=[e],await t(),s.value){const{container:e}=s.value.$refs;e&&(null==(n=e.children[0])||n.click())}},u=e=>{"Escape"!==e.key&&27!==e.keyCode||(e.stopPropagation(),e.preventDefault(),r.value=[],h())},m=async()=>{var e;await t();const n=null==(e=s.value)?void 0:e.$refs.container;if(!n)return;const a=n.querySelector(".el-image-viewer__wrapper");null==a||a.addEventListener("keydown",u)},h=()=>{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",u)},p=e=>{const t=null==e?void 0:e.target;if(w(t,"IMG")&&t)return void d(t.src);const n=function(e){let t=e;for(;t;){if(t.classList.contains("cherry-previewer"))return null;const e=t.parentElement;if(w(t,"svg")&&e&&"mermaid"===e.dataset.type)return t;t=t.parentElement}return null}(t);n&&d(function(e){const t=e.cloneNode(!0),n=e.width.baseVal.value||e.clientWidth,a=e.height.baseVal.value||e.clientHeight;t.setAttribute("width",n),t.setAttribute("height",a),t.style.backgroundColor="white";const i=(new XMLSerializer).serializeToString(t),o=btoa(unescape(encodeURIComponent(i)));return"data:image/svg+xml;base64,".concat(o)}(n))};return a(()=>{c&&(c.removeEventListener("click",p),c=null),h()}),{renderImgPreview:()=>i(o("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:m,fit:"cover"},null),onMDEditorCreated:e=>{var t,n;c=(null==(n=null==(t=null==e?void 0:e.previewer)?void 0:t.previewerBubble)?void 0:n.previewerDom)||null,null==c||c.addEventListener("click",p)}}}e("default",l({name:"IBizMarkDown",props:m(),emits:u(),setup(e,{emit:o,slots:l}){var u,m,w;const C=h("markdown"),I=e.controller,k=n("");let A=null;const z=p(),{onMDEditorCreated:E,renderImgPreview:M}=y(C),T=ibiz.util.file.getUploadHeaders(),x=n({...T}),S=n(""),U=(null==(u=null==I?void 0:I.editorParams)?void 0:u.customTheme)||(null==(m=null==I?void 0:I.editorParams)?void 0:m.customtheme),{UIStore:D}=d(),P=n(U||D.theme),R=n(!1);let O="default";I&&(null==(w=I.editorParams)?void 0:w.showmode)&&(O=I.editorParams.showmode);const L=n(!1),B=n("editOnly");let N=null,V=null,H=0;const F=n({}),q=n({}),j=n("pure");let $=!1;const[_,J]=function(e,n){const{props:a,isEditing:i,currentVal:o,emit:l}=n;let r=n.chatInstance;return[v.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,a,i)=>{i.stopPropagation(),i.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:a}=d(),i=a.increment();ibiz.inLineAIUtil.showContextMenus(t.left,t.top+43,n,{zIndex:i,onClose:()=>{a.decrement()}})}})}}),v.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 n=await ibiz.aiChatUtil.getAIAgentList(e.context,e.params,e.editorParams),{contentToolbarItems:s,footerToolbarItems:c,questionToolbarItems:u,otherToolbarItems:m}=ibiz.aiChatUtil.calcAiToolbarItemsByAc(e.deACMode),{containerOptions:h,chatOptions:v}=ibiz.aiChatUtil.getEditorExAIChatParams(e.editorParams,e.context,e.params,a.data),{zIndex:w}=d(),y=w.increment();r=await ibiz.aiChatUtil.getAIChat();let C,I="";r.create({containerOptions:{zIndex:y,...h},chatOptions:{caption:e.deACMode.logicName,context:{...e.context},params:{...e.params,srfactag:e.deACMode.codeName},appDataEntityId:t,contentToolbarItems:s,footerToolbarItems:c,questionToolbarItems:u,otherToolbarItems:m,aiAgentlist:n,...v,question:async(e,t,n,a,i,o,l,r)=>{I=p(),C=new AbortController;const s=await ibiz.hub.getApp(t.srfappid).deService.getService(t,a.appDataEntityId);try{const a={messages:i,sessionid:o};l&&(a.srfaiagent=l),r&&(a.mode=r),await s.aiChatSse(t=>{if(20===t.actionstate&&t.actionresult)e.addMessage({messageid:I,state:t.actionstate,type:"DEFAULT",role:"ASSISTANT",content:t.actionresult});else if(30===t.actionstate&&t.actionresult){const n=JSON.parse(t.actionresult).choices;n&&n.length>0&&e.replaceMessage({messageid:I,state:t.actionstate,type:"DEFAULT",role:"ASSISTANT",content:n[0].content||""})}else 40===t.actionstate&&e.replaceMessage({messageid:I,state:t.actionstate,type:"ERROR",role:"ASSISTANT",content:t.actionresult})},C,t,n,{...a})}catch(t){e.replaceMessage({messageid:I,state:40,type:"ERROR",role:"ASSISTANT",content:t.message||ibiz.i18n.t("app.aiError")}),null==C||C.abort()}finally{return e.completeMessage(I,!0),!0}},abortQuestion:async e=>{null==C||C.abort(),await e.stopMessage({messageid:I,state:30,type:"DEFAULT",role:"ASSISTANT",content:""}),await e.completeMessage(I,!0)},action:(e,t)=>{"backfill"===e&&(i.value?o.value=t.realcontent||"":l("change",t.realcontent))},history:async(e,t,n)=>{const a=await ibiz.hub.getApp(e.srfappid).deService.getService(e,n.appDataEntityId),i={};n.appendCurData&&Object.assign(i,{...n.appendCurData}),n.srfaiagent&&Object.assign(i,{srfaiagent:n.srfaiagent}),n.srfmode&&Object.assign(i,{mode:n.srfmode});const o=await a.aiChatHistory(e,t,i);if(o.data&&Array.isArray(o.data)){let e;o.data.forEach(t=>{if("TOOL"===t.role)e&&t.content&&r.aiChat.updateRecommendPrompt(e,t.content);else{const n={messageid:p(),state:30,type:"DEFAULT",role:t.role,content:t.content,completed:!0};e=n,r.aiChat.addMessage(n)}})}return!0},recommendPrompt:async(e,t,n)=>{const a=await ibiz.hub.getApp(e.srfappid).deService.getService(e,n.appDataEntityId),i=await a.aiChatRecommendPrompt(e,t,n.message);if(i.ok&&i.data){const e=i.data.choices;return e&&e.length>0?e[0]:null}return null},uploader:{onUpload:async(t,n,a)=>{const i=ibiz.util.file.calcFileUpDownUrl((null==a?void 0:a.context)||e.context,(null==a?void 0:a.params)||e.params,{}),o=ibiz.util.file.getUploadHeaders(),l=new FormData;return l.append("file",t),(await ibiz.net.axios({url:i.uploadUrl,method:"post",headers:o,data:l,onUploadProgress:e=>{const t=e.loaded/e.total*100;n(t)}})).data}},extendToolbarClick:async(t,n,a,i,o)=>{var l,r;const s=await b.exec(n.id,{view:e.view,ctrl:e.ctrl,context:f.create(a),params:i,data:[o],event:t},n.appId);if(s.closeView)e.view.closeView({ok:!0});else if(s.refresh)switch(s.refreshMode){case 1:e.view.callUIAction(g.REFRESH);break;case 2:null==(l=e.view.parentView)||l.callUIAction(g.REFRESH);break;case 3:null==(r=e.view.getTopView())||r.callUIAction(g.REFRESH)}return s}}})}})]}(I,{props:e,chatInstance:undefined,isEditing:R,currentVal:k,emit:o});r(()=>e.data,e=>{if(e&&I){const t={...I.editorParams};t.uploadparams&&(t.uploadParams=JSON.parse(t.uploadparams));const n=ibiz.util.file.calcFileUpDownUrl(I.context,I.params,e,t);S.value=n.uploadUrl}},{immediate:!0,deep:!0});const W=n(),Y=async(t,n)=>{const a=await ibiz.util.file.fileUpload(S.value,t,x.value),i=((e,t)=>{if(!I)return"";const n={...I.editorParams};return n.exportparams&&(n.exportParams=JSON.parse(n.exportparams)),t&&t.folder&&(n.osscat=t.folder),ibiz.util.file.calcFileUpDownUrl(I.context,I.params,e,n).downloadUrl})(e.data||{},a.fileid);let o=i.replace("%fileId%",a.fileid);if(ibiz.config.common.enableDownloadTicket&&I){const t=await ibiz.util.file.getDownloadTicket(I.context,I.params,e.data||{},{fileId:a.fileid},I.downloadTicketParams);t&&t.ticket&&(o=i.replace("%fileId%",t.ticket),n(o))}else n(o)},G=()=>null==A?void 0:A.getMarkdown(),Q=e=>{$=!0,null==A||A.setMarkdown(e,!0)};r(()=>e.value,(e,t)=>{e!==t&&(k.value=e||"")},{immediate:!0}),r(k,(e,t)=>{const n=G();e!==t&&n!==e&&Q(e)});const X=e=>{"manual"!==O&&(o("change",G(),null==I?void 0:I.model.id,$),$=!1)},K=(e,t)=>({[e]:t}),Z=(e,t="")=>{const n=document.createElement(e);return n.className=t,n},ee=e=>Z("i","ch-icon ch-icon-".concat(e)),te=C.e("fullscreen"),ne=e=>{for(;e.firstChild;)e.removeChild(e.firstChild)},ae=()=>{if(A&&W.value){const e=A.editor.options.editorDom.parentElement;if(!e)return{};const t=e.classList,n=W.value.querySelector(".".concat(te));return n?{parentElement:e,cherryClass:t,fullscreenNode:n}:{}}return{}},ie=()=>{const{parentElement:e,cherryClass:t,fullscreenNode:n}=ae();e&&t&&n&&(ne(n),n.appendChild(ee("fullscreen")),n.title=ibiz.i18n.t("editor.common.fullscreen"),t.remove("fullscreen"),null==e||e.blur(),e.setAttribute("tabindex","-1"))},oe=()=>{const{cherryClass:e}=ae();return null==e?void 0:e.contains("fullscreen")},le=()=>{A&&W.value&&(oe()?(ie(),A.toggleToc(j.value),L.value=!1):((()=>{const{parentElement:e,cherryClass:n,fullscreenNode:a}=ae();e&&n&&a&&(ne(a),a.appendChild(ee("minscreen")),n.add("fullscreen"),a.title=ibiz.i18n.t("editor.common.minimize"),e.setAttribute("tabindex","-1"),t(()=>null==e?void 0:e.focus()))})(),j.value=A.toc.model,A.toggleToc("full"),L.value=!0))},re=e=>{e.stopPropagation(),"Escape"===e.key&&(e.preventDefault(),oe()&&(ie(),A.toggleToc(j.value),L.value=!1))},se=e=>{null==I||I.setCurrentEditorTheme(e)},ce=e=>{var t,n;const{info:a}=e;let i=!0;const o=a.ranges&&a.ranges[0];if(o){const{anchor:e,head:t}=o;i=I.isPositionBefore(e,t)}else i=!0;const l=null==(t=I.mdeditor)?void 0:t.editor.editor.getCursor("start"),r=null==(n=I.mdeditor)?void 0:n.editor.editor.getCursor("end");I.setCursorPos(l,r),I.setSelectionDirection(i)};r(()=>D.theme,e=>{P.value=U||e,null==A||A.setTheme(P.value),null==A||A.setCodeBlockTheme(P.value)});const de=()=>{R.value=!0,B.value="editOnly",null==A||A.switchModel(B.value)},ue=()=>{R.value=!1,B.value="previewOnly",null==A||A.switchModel(B.value)},me=()=>{Q(k.value),ue()},he=()=>{o("change",G(),null==I?void 0:I.model.id,$),$=!1,ue()},pe=()=>{const e=document.getElementById(z);null==e||e.focus()};return s(()=>{var n;(e.disabled||e.readonly||"manual"===O)&&(B.value="previewOnly"),t(()=>{var t;const n=["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"];I&&I.chatCompletion&&(a.unshift("AIChart"),n.unshift("AI")),A=new v({id:z,value:k.value,previewer:{enablePreviewerBubble:!(e.disabled||e.readonly)},themeSettings:{mainTheme:P.value,codeBlockTheme:P.value},fileUpload:Y,emoji:{useUnicode:!0},header:{anchorStyle:"autonumber"},editor:{height:"100%",defaultModel:B.value,codemirror:{autofocus:!1}},toolbars:{toolbar:a,bubble:n,float:["h1","h2","h3","|","checklist","quote","quickTable","code"],customMenu:{AI:_,AIChart:J},sidebar:["theme","copy"],toolbarRight:[],toc:{updateLocationHash:!1,defaultModel:"pure",showAutoNumber:!0,position:"absolute",cssText:""}},callback:{afterChange:X,beforeImageMounted:K},event:{changeMainTheme:se,selectionChange:ce},engine:{syntax:{table:{enableChart:!1,externals:["echarts"]}}}}),A.toggleToc("pure"),A.setTheme(P.value),U&&(A.setTheme(U),A.setCodeBlockTheme(U));const i=Z("span","".concat(te," cherry-toolbar-button"));i.title=ibiz.i18n.t("editor.common.fullscreen"),i.onclick=le,i.appendChild(ee("fullscreen"));const o=e.disabled?A.editor.options.editorDom.parentElement:null==(t=A.editor.options.editorDom.parentElement)?void 0:t.querySelector(".cherry-toolbar>.toolbar-right");if(null==o||o.appendChild(i),null==I||I.setMDEditor(A),E(A),l.editorSwitchMenu&&window.ResizeObserver&&W.value){const e=W.value.querySelector(".cherry-toolbar");e&&(V=new ResizeObserver(e=>{var t;const n=null==(t=e[0])?void 0:t.contentRect.height;q.value=C.cssVarBlock({"toolbar-height":"".concat(n,"px")})}),V.observe(e))}}),(()=>{if(window.ResizeObserver&&W.value){const e={width:W.value.offsetWidth?"".concat(W.value.offsetWidth,"px"):"100%"};I&&"number"==typeof I.parent.model.height&&Object.assign(e,{height:"".concat(I.parent.model.height,"px")}),F.value=C.cssVarBlock(e),N=new ResizeObserver(e=>{const t=e[0].contentRect.width;if(t!==H){const n={width:"".concat(e[0].contentRect.width,"px")};I&&"number"==typeof I.parent.model.height&&Object.assign(n,{height:"".concat(I.parent.model.height,"px")}),F.value=C.cssVarBlock(n),H=t}}),N.observe(W.value)}})(),null==(n=W.value)||n.addEventListener("keydown",re.bind(this))}),a(()=>{var e;null==(e=W.value)||e.removeEventListener("keydown",re.bind(this))}),c(()=>{A=null,N&&N.disconnect(),V&&V.disconnect()}),{ns:C,currentVal:k,id:z,editor:A,markDownBox:W,headers:x,theme:P,defaultModel:B,cssVars:F,isEditing:R,showmode:O,getCherryHtml:()=>null==A?void 0:A.getHtml(),getCherryContent:G,setCherryContent:Q,renderHeader:()=>{if("manual"===O&&!R.value)return i("div",{onClick:pe,class:[C.e("header"),C.is("fullscreen",L.value)]},[!e.disabled&&!e.readonly&&i("div",{class:C.em("header","edit"),onClick:de,title:ibiz.i18n.t("editor.markdown.edit")},[i("i",{class:"fa fa-edit","aria-hidden":"true"},null)]),i("div",{class:C.em("header","full"),onClick:le},[L.value?i("i",{class:"fa fa-compress","aria-hidden":"true",title:ibiz.i18n.t("editor.html.reduce")},null):i("i",{class:"fa fa-expand","aria-hidden":"true",title:ibiz.i18n.t("editor.common.fullscreen")},null)])])},renderFooter:()=>{if("manual"===O&&R.value&&!e.disabled&&!e.readonly)return i("div",{onClick:pe,class:[C.e("footer"),C.is("fullscreen",L.value)]},[i("div",{class:C.em("footer","cancel"),onClick:me},[ibiz.i18n.t("editor.common.cancel")]),i("div",{class:C.em("footer","save"),onClick:he},[ibiz.i18n.t("editor.common.confirm")])])},renderImgPreview:M,renderEditorSwitchMenu:()=>{var e;return i("div",{class:[C.b("menu"),C.is("fullscreen",L.value)],style:q.value},[null==(e=l.editorSwitchMenu)?void 0:e.call(l)])}}},render(){const e=!!this.$slots.editorSwitchMenu;return i("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)]},[e?this.renderEditorSwitchMenu():null,this.renderHeader(),this.renderFooter(),this.renderImgPreview(),i("div",{tabindex:"-1",id:this.id,style:this.cssVars,class:[this.ns.b("cherry"),this.ns.m("dark"===this.theme?"dark":"light")]},null)])}}))}}});
|