@ibiz-template/vue3-components 0.7.41-alpha.5 → 0.7.41-alpha.6

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.
Files changed (28) hide show
  1. package/dist/ibiz-markdown-editor-V31Pwvs_.js +1 -0
  2. package/dist/index-2Djp0sQl.js +4 -0
  3. package/dist/index.min.css +1 -1
  4. package/dist/index.system.min.js +1 -1
  5. package/dist/wang-editor-kEzIt0zV.js +1 -0
  6. package/dist/{xlsx-util-GVd_ca5q.js → xlsx-util-_VPcoWqm.js} +1 -1
  7. package/es/common/data-import2/data-import2.mjs +3 -2
  8. package/es/editor/code/monaco-editor/monaco-editor.mjs +2 -8
  9. package/es/editor/html/wang-editor/wang-editor.mjs +5 -10
  10. package/es/editor/markdown/ibiz-markdown-editor/ibiz-markdown-editor.mjs +2 -2
  11. package/es/editor/text-box/input/input.mjs +2 -8
  12. package/es/editor/upload/use/use-iview-upload.mjs +3 -4
  13. package/es/util/app-util/app-util.mjs +2 -8
  14. package/es/util/notification-util/upload-manager/upload-manager.mjs +1 -5
  15. package/es/web-app/util/unauthorized-handler/unauthorized-handler.mjs +1 -1
  16. package/lib/common/data-import2/data-import2.cjs +2 -1
  17. package/lib/editor/code/monaco-editor/monaco-editor.cjs +1 -7
  18. package/lib/editor/html/wang-editor/wang-editor.cjs +4 -9
  19. package/lib/editor/markdown/ibiz-markdown-editor/ibiz-markdown-editor.cjs +2 -2
  20. package/lib/editor/text-box/input/input.cjs +1 -7
  21. package/lib/editor/upload/use/use-iview-upload.cjs +2 -3
  22. package/lib/util/app-util/app-util.cjs +1 -7
  23. package/lib/util/notification-util/upload-manager/upload-manager.cjs +1 -5
  24. package/lib/web-app/util/unauthorized-handler/unauthorized-handler.cjs +1 -1
  25. package/package.json +4 -4
  26. package/dist/ibiz-markdown-editor--ivCvp3a.js +0 -1
  27. package/dist/index-u5jvzY6s.js +0 -4
  28. package/dist/wang-editor--AXyy3P_.js +0 -1
@@ -0,0 +1 @@
1
+ System.register(["vue","@ibiz-template/vue3-util","qx-util","cherry-markdown"],(function(e){"use strict";var t,l,n,o,r,i,a,s,c,d,u,h,m,v;return{setters:[function(e){t=e.defineComponent,l=e.ref,n=e.watch,o=e.onMounted,r=e.onBeforeUnmount,i=e.onUnmounted,a=e.createVNode,s=e.nextTick},function(e){c=e.getMarkDownProps,d=e.getEditorEmits,u=e.useNamespace,h=e.useUIStore},function(e){m=e.createUUID},function(e){v=e.default}],execute:function(){e("default",t({name:"IBizMarkDown",props:c(),emits:d(),setup(e,{emit:t}){var a;const c=u("markdown"),d=e.controller,b=l("");let f=null;const p=m(),g=ibiz.util.file.getUploadHeaders(),w=l({...g}),y=l(""),k=l(""),C=null==(a=null==d?void 0:d.editorParams)?void 0:a.customTheme,{UIStore:x}=h(),U=l(C||x.theme),z=l("editOnly");let E=null,B=0;const T=l({});let D=!1;n((()=>e.data),(e=>{if(e&&d){const t=ibiz.util.file.calcFileUpDownUrl(d.context,d.params,e,d.editorParams);y.value=t.uploadUrl,k.value=t.downloadUrl}}),{immediate:!0,deep:!0});const M=l(),S=async(e,t)=>{const l=await ibiz.util.file.fileUpload(y.value,e,w.value);t(k.value.replace("%fileId%",l.fileid))},I=()=>null==f?void 0:f.getMarkdown(),N=e=>{D=!0,null==f||f.setMarkdown(e,!1)};n((()=>e.value),((e,t)=>{e!==t&&(b.value=e||"")}),{immediate:!0}),n(b,((e,t)=>{const l=I();e!==t&&l!==e&&N(e)}));const O=e=>{t("change",I(),null==d?void 0:d.model.id,D),D=!1},P=(e,t)=>({[e]:t}),V=(e,t="")=>{const l=document.createElement(e);return l.className=t,l},q=e=>V("i","ch-icon ch-icon-".concat(e)),R=c.e("fullscreen"),j=e=>{for(;e.firstChild;)e.removeChild(e.firstChild)},H=()=>{if(f&&M.value){const e=f.editor.options.editorDom.parentElement;if(!e)return{};const t=e.classList,l=M.value.querySelector(".".concat(R));return l?{parentElement:e,cherryClass:t,fullscreenNode:l}:{}}return{}},L=()=>{const{parentElement:e,cherryClass:t,fullscreenNode:l}=H();e&&t&&l&&(j(l),l.appendChild(q("fullscreen")),l.title=ibiz.i18n.t("editor.common.fullscreen"),t.remove("fullscreen"),null==e||e.blur(),e.setAttribute("tabindex","-1"))},A=()=>{const{cherryClass:e}=H();return null==e?void 0:e.contains("fullscreen")},W=()=>{f&&M.value&&(A()?L():(()=>{const{parentElement:e,cherryClass:t,fullscreenNode:l}=H();e&&t&&l&&(j(l),l.appendChild(q("minscreen")),t.add("fullscreen"),l.title=ibiz.i18n.t("editor.common.minimize"),e.setAttribute("tabindex","-1"),s((()=>null==e?void 0:e.focus())))})())},F=e=>{e.stopPropagation(),"Escape"===e.key&&A()&&L()};n((()=>x.theme),(e=>{U.value=C||e,null==f||f.setTheme(U.value),null==f||f.setCodeBlockTheme(U.value)}));return o((()=>{var t;e.disabled&&(z.value="previewOnly"),s((()=>{var t;f=new v({id:p,value:b.value,previewer:{enablePreviewerBubble:!(e.disabled||e.readonly)},themeSettings:{mainTheme:U.value,codeBlockTheme:U.value},fileUpload:S,emoji:{useUnicode:!0},header:{anchorStyle:"autonumber"},editor:{height:"100%",defaultModel:z.value,codemirror:{autofocus:!1}},toolbars:{toolbar:["bold","italic","underline","strikethrough","|","color","header","|","list","image",{insert:["link","hr","br","code","formula","toc","table","line-table","bar-table"]},"settings","togglePreview"],bubble:["bold","italic","underline","strikethrough","sub","sup","|","size","color"],float:["h1","h2","h3","|","checklist","quote","quickTable","code"],customMenu:[],sidebar:[]},callback:{afterChange:O,beforeImageMounted:P},engine:{syntax:{table:{enableChart:!1,externals:["echarts"]}}}}),f.setTheme(U.value),C&&(f.setTheme(C),f.setCodeBlockTheme(C));const l=V("span","".concat(R," cherry-toolbar-button"));l.title=ibiz.i18n.t("editor.common.fullscreen"),l.onclick=W,l.appendChild(q("fullscreen"));const n=e.disabled?f.editor.options.editorDom.parentElement:null==(t=f.editor.options.editorDom.parentElement)?void 0:t.querySelector(".cherry-toolbar>.toolbar-right");null==n||n.appendChild(l)})),(()=>{if(window.ResizeObserver&&M.value){const e={width:M.value.offsetWidth?"".concat(M.value.offsetWidth,"px"):"100%"};d&&"number"==typeof d.parent.model.height&&Object.assign(e,{height:"".concat(d.parent.model.height,"px")}),T.value=c.cssVarBlock(e),E=new ResizeObserver((e=>{const t=e[0].contentRect.width;if(t!==B){const l={width:"".concat(e[0].contentRect.width,"px")};d&&"number"==typeof d.parent.model.height&&Object.assign(l,{height:"".concat(d.parent.model.height,"px")}),T.value=c.cssVarBlock(l),B=t}})),E.observe(M.value)}})(),null==(t=M.value)||t.addEventListener("keydown",F.bind(this))})),r((()=>{var e;null==(e=M.value)||e.removeEventListener("keydown",F.bind(this))})),i((()=>{f=null,E&&E.disconnect()})),{ns:c,currentVal:b,id:p,editor:f,markDownBox:M,headers:w,theme:U,defaultModel:z,cssVars:T,getCherryHtml:()=>null==f?void 0:f.getHtml(),getCherryContent:I,setCherryContent:N}},render(){return a("div",{ref:"markDownBox",class:[this.ns.b(),this.ns.is("disabled",this.disabled)]},[a("div",{id:this.id,style:this.cssVars,class:this.ns.b("cherry")},null)])}}))}}}));