@ibiz-template/vue3-components 0.7.41-alpha.76 → 0.7.41-alpha.77
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-0ma_IezZ.js +1 -0
- package/dist/index-CyC13qj8.js +338 -0
- package/dist/{index.es-NjzMvAN7.js → index.es-N1Gm9zAP.js} +1 -1
- package/dist/index.min.css +1 -1
- package/dist/index.system.min.js +1 -1
- package/dist/{wang-editor-CxNdHx5i.js → wang-editor-BxVEjDMU.js} +1 -1
- package/dist/{xlsx-util-yyM4_HrC.js → xlsx-util-CNj9LN7F.js} +1 -1
- package/es/common/rawitem/rawitem.mjs +32 -2
- package/es/editor/markdown/ibiz-markdown-editor/custom-menu.mjs +2 -0
- package/es/editor/markdown/ibiz-markdown-editor/ibiz-markdown-editor.mjs +105 -3
- package/es/editor/raw/ibiz-raw/ibiz-raw.mjs +13 -3
- package/es/panel-component/index.mjs +2 -1
- package/es/panel-component/panel-container-group/index.mjs +20 -0
- package/es/panel-component/panel-container-group/panel-container-group.controller.mjs +97 -0
- package/es/panel-component/panel-container-group/panel-container-group.css +1 -0
- package/es/panel-component/panel-container-group/panel-container-group.mjs +141 -0
- package/es/panel-component/panel-container-group/panel-container-group.provider.mjs +21 -0
- package/es/panel-component/panel-container-group/panel-container-group.state.mjs +23 -0
- package/lib/common/rawitem/rawitem.cjs +32 -2
- package/lib/editor/markdown/ibiz-markdown-editor/custom-menu.cjs +2 -0
- package/lib/editor/markdown/ibiz-markdown-editor/ibiz-markdown-editor.cjs +105 -3
- package/lib/editor/raw/ibiz-raw/ibiz-raw.cjs +13 -3
- package/lib/panel-component/index.cjs +26 -25
- package/lib/panel-component/panel-container-group/index.cjs +27 -0
- package/lib/panel-component/panel-container-group/panel-container-group.cjs +143 -0
- package/lib/panel-component/panel-container-group/panel-container-group.controller.cjs +99 -0
- package/lib/panel-component/panel-container-group/panel-container-group.css +1 -0
- package/lib/panel-component/panel-container-group/panel-container-group.provider.cjs +23 -0
- package/lib/panel-component/panel-container-group/panel-container-group.state.cjs +25 -0
- package/package.json +4 -4
- package/dist/ibiz-markdown-editor-BL2T9im7.js +0 -1
- package/dist/index-C1ZClqi3.js +0 -338
|
@@ -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,v,h,p,f,b,w,g;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,v=e.useNamespace},function(e){h=e.createUUID},function(e){p=e.default},function(e){f=e.parseSearchParams,b=e.UIActionUtil,w=e.OpenAppViewCommand},function(e){g=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,h())},v=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)},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",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),h()}),{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:v,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,I;const z=v("markdown"),P=e.controller,M=n("");let E=null;const A=h(),{isImgPreview:S,onMDEditorCreated:U,renderImgPreview:D}=C(z),O=ibiz.util.file.getUploadHeaders(),T=n({...O}),B=n(""),L=(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:N}=d(),R=n(L||N.theme),H=n(!1);let j="default";P&&(null==(x=P.editorParams)?void 0:x.showmode)&&(j=P.editorParams.showmode);const q=n(!1),F=n("editOnly");let J=null,W=null,$=0;const _=n({}),G=n({}),Y=n("pure");let X=!1,K=!1;(null==(y=null==P?void 0:P.editorParams)?void 0:y.disabledirectory)&&(K="true"===P.editorParams.disabledirectory);let Q="absolute";(null==(I=null==P?void 0:P.editorParams)?void 0:I.tocpos)&&(Q="fixed"===P.editorParams.tocpos?"fixed":"absolute");const[Z,ee,te]=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:H,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);B.value=n.uploadUrl}},{immediate:!0,deep:!0});const ne=n(),ie=async(t,n)=>{const i=await ibiz.util.file.fileUpload(B.value,t,T.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)},oe=()=>null==E?void 0:E.getMarkdown(),ae=e=>{X=!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=oe();e!==t&&n!==e&&ae(e)});const le=e=>{"manual"!==j&&(a("change",oe(),null==P?void 0:P.model.id,X),X=!1)},re=(e,t)=>({[e]:t}),se=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())||g.create({});switch(Object.assign(u,c),r){case"chunkview":case"view":ibiz.commands.execute(w.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)}},ce=(e,t="")=>{const n=document.createElement(e);return n.className=t,n},de=e=>ce("i","ch-icon ch-icon-".concat(e)),ue=z.e("fullscreen"),me=e=>{for(;e.firstChild;)e.removeChild(e.firstChild)},ve=()=>{if(E&&ne.value){const e=E.editor.options.editorDom.parentElement;if(!e)return{};const t=e.classList,n=ne.value.querySelector(".".concat(ue));return n?{parentElement:e,cherryClass:t,fullscreenNode:n}:{}}return{}},he=()=>{const{parentElement:e,cherryClass:t,fullscreenNode:n}=ve();e&&t&&n&&(me(n),n.appendChild(de("fullscreen")),n.title=ibiz.i18n.t("editor.common.fullscreen"),t.remove("fullscreen"),null==e||e.blur(),e.setAttribute("tabindex","-1"))},pe=()=>{const{cherryClass:e}=ve();return null==e?void 0:e.contains("fullscreen")},fe=()=>{E&&ne.value&&(pe()?(he(),E.toggleToc(Y.value),q.value=!1):((()=>{const{parentElement:e,cherryClass:n,fullscreenNode:i}=ve();e&&n&&i&&(me(i),i.appendChild(de("minscreen")),n.add("fullscreen"),i.title=ibiz.i18n.t("editor.common.minimize"),e.setAttribute("tabindex","-1"),t(()=>null==e?void 0:e.focus()))})(),Y.value=E.toc.model,E.toggleToc("full"),q.value=!0))},be=e=>{e.stopPropagation(),"Escape"===e.key&&(e.preventDefault(),pe()&&(he(),E.toggleToc(Y.value),q.value=!1))},we=e=>{null==P||P.setCurrentEditorTheme(e)},ge=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(()=>N.theme,e=>{R.value=L||e,null==E||E.setTheme(R.value),null==E||E.setCodeBlockTheme(R.value)});const ke=()=>{H.value=!0,F.value="editOnly",null==E||E.switchModel(F.value)},Ce=()=>{H.value=!1,F.value="previewOnly",null==E||E.switchModel(F.value)},xe=()=>{ae(M.value),Ce()},ye=()=>{a("change",oe(),null==P?void 0:P.model.id,X),X=!1,Ce()},Ie=()=>{const e=document.getElementById(A);null==e||e.focus()};return s(()=>{var n;(e.disabled||e.readonly||"manual"===j)&&(F.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)}E=new p({id:A,value:M.value,previewer:{enablePreviewerBubble:!(e.disabled||e.readonly)},themeSettings:{mainTheme:R.value,codeBlockTheme:R.value},fileUpload:ie,emoji:{useUnicode:!0},header:{anchorStyle:"autonumber"},editor:{height:"100%",defaultModel:F.value,codemirror:{autofocus:!1}},toolbars:{toolbar:a,bubble:o,float:["h1","h2","h3","|","checklist","quote","quickTable","code"],customMenu:{AI:Z,AIChart:ee,...te},sidebar:["theme","copy"],toolbarRight:[],toc:!K&&{updateLocationHash:!1,defaultModel:"pure",showAutoNumber:!0,position:Q,cssText:""}},callback:{afterChange:le,onClickPreview:se,beforeImageMounted:re},event:{changeMainTheme:we,selectionChange:ge},engine:{syntax:{table:{enableChart:!1,externals:["echarts"]}}}}),E.toggleToc("pure");const r=E.engine.makeHtml(M.value);E.previewer.update(r),null==(n=null==(t=E.toc)?void 0:t.updateTocList)||n.call(t),E.setTheme(R.value),L&&(E.setTheme(L),E.setCodeBlockTheme(L));const s=ce("span","".concat(ue," cherry-toolbar-button"));s.title=ibiz.i18n.t("editor.common.fullscreen"),s.onclick=fe,s.appendChild(de("fullscreen"));const c=e.disabled?E.editor.options.editorDom.parentElement:null==(i=E.editor.options.editorDom.parentElement)?void 0:i.querySelector(".cherry-toolbar>.toolbar-right");if(null==c||c.appendChild(s),null==P||P.setMDEditor(E),U(E),l.editorSwitchMenu&&window.ResizeObserver&&ne.value){const e=ne.value.querySelector(".cherry-toolbar");e&&(W=new ResizeObserver(e=>{var t;const n=null==(t=e[0])?void 0:t.contentRect.height;G.value=z.cssVarBlock({"toolbar-height":"".concat(n,"px")})}),W.observe(e))}}),(()=>{if(window.ResizeObserver&&ne.value){const e={width:ne.value.offsetWidth?"".concat(ne.value.offsetWidth,"px"):"100%"};P&&"number"==typeof P.parent.model.height&&Object.assign(e,{height:"".concat(P.parent.model.height,"px")}),_.value=z.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")}),_.value=z.cssVarBlock(n),$=t}}),J.observe(ne.value)}})(),null==(n=ne.value)||n.addEventListener("keydown",be.bind(this))}),i(()=>{var e;null==(e=ne.value)||e.removeEventListener("keydown",be.bind(this))}),c(()=>{E=null,J&&J.disconnect(),W&&W.disconnect()}),{ns:z,currentVal:M,id:A,editor:E,markDownBox:ne,headers:T,theme:R,UIStore:N,defaultModel:F,cssVars:_,isEditing:H,showmode:j,isFullScreen:q,isImgPreview:S,getCherryHtml:()=>null==E?void 0:E.getHtml(),getCherryContent:oe,setCherryContent:ae,renderHeader:()=>{if("manual"===j&&!H.value)return o("div",{onClick:Ie,class:[z.e("header"),z.is("fullscreen",q.value)]},[!e.disabled&&!e.readonly&&o("div",{class:z.em("header","edit"),onClick:ke,title:ibiz.i18n.t("editor.markdown.edit")},[o("i",{class:"fa fa-edit","aria-hidden":"true"},null)]),o("div",{class:z.em("header","full"),onClick:fe},[q.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"===j&&H.value&&!e.disabled&&!e.readonly)return o("div",{onClick:Ie,class:[z.e("footer"),z.is("fullscreen",q.value)]},[o("div",{class:z.em("footer","cancel"),onClick:xe},[ibiz.i18n.t("editor.common.cancel")]),o("div",{class:z.em("footer","save"),onClick:ye},[ibiz.i18n.t("editor.common.confirm")])])},renderImgPreview:D,renderEditorSwitchMenu:()=>{var e;return o("div",{class:[z.b("menu"),z.is("fullscreen",q.value)],style:G.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)])}}))}}});
|