@ibiz-template/vue3-components 0.7.41-alpha.36 → 0.7.41-alpha.38
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-qRaayafj.js +1 -0
- package/dist/index-BiYphJ2f.js +11 -0
- package/dist/{index-BFGNWF-0.js → index-C28lnh2e.js} +1 -1
- package/dist/{index-BiFsbM1Y.js → index-Dp8ExwuL.js} +1 -1
- package/dist/index.min.css +1 -1
- package/dist/index.system.min.js +1 -1
- package/dist/wang-editor-DDVqSnRX.js +1 -0
- package/dist/{xlsx-util-CxXULY47.js → xlsx-util-BMANxyk-.js} +1 -1
- package/es/control/calendar/calendar.mjs +33 -8
- package/es/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/form-mdctrl-repeater.mjs +10 -0
- package/es/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/form-mdctrl-repeater.util.mjs +30 -0
- package/es/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/repeater-grid/repeater-grid.mjs +114 -85
- package/es/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/repeater-grid2/repeater-grid2.css +1 -0
- package/es/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/repeater-grid2/repeater-grid2.mjs +309 -0
- package/es/control/tab-exp-panel/tab-exp-panel.mjs +4 -17
- package/es/editor/code/code-editor.controller.mjs +176 -1
- package/es/editor/code/monaco-editor/monaco-editor.css +1 -1
- package/es/editor/code/monaco-editor/monaco-editor.mjs +116 -6
- package/es/editor/html/html-editor.controller.mjs +77 -2
- package/es/editor/html/wang-editor/index.mjs +1 -0
- package/es/editor/html/wang-editor/module/index.mjs +1 -0
- package/es/editor/html/wang-editor/module/inline-ai-module.mjs +95 -0
- package/es/editor/html/wang-editor/wang-editor.css +1 -1
- package/es/editor/html/wang-editor/wang-editor.mjs +35 -4
- package/es/editor/markdown/ibiz-markdown-editor/custom-menu.mjs +45 -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 +109 -13
- package/es/editor/markdown/markdown-editor.controller.mjs +113 -1
- package/es/editor/text-box/input/input.css +1 -1
- package/es/index.mjs +1 -0
- package/es/locale/en/index.mjs +15 -2
- package/es/locale/zh-CN/index.mjs +15 -2
- package/es/panel-component/nav-breadcrumb/nav-breadcrumb.util.mjs +1 -1
- package/es/panel-component/user-message/internal-message/internal-message-json/internal-message-json.provider.mjs +2 -2
- package/es/util/ai-util/ai-util.mjs +6 -2
- package/es/util/app-util/app-util.mjs +41 -2
- package/es/util/index.mjs +1 -0
- package/es/util/inline-ai-util/inline-ai-textarea/icon.mjs +142 -0
- package/es/util/inline-ai-util/inline-ai-textarea/inline-ai-textarea.css +1 -0
- package/es/util/inline-ai-util/inline-ai-textarea/inline-ai-textarea.hook.mjs +162 -0
- package/es/util/inline-ai-util/inline-ai-textarea/inline-ai-textarea.mjs +205 -0
- package/es/util/inline-ai-util/inline-ai-util.mjs +145 -0
- package/es/web-app/main.mjs +2 -0
- package/lib/control/calendar/calendar.cjs +32 -7
- package/lib/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/form-mdctrl-repeater.cjs +10 -0
- package/lib/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/form-mdctrl-repeater.util.cjs +32 -0
- package/lib/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/repeater-grid/repeater-grid.cjs +113 -84
- package/lib/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/repeater-grid2/repeater-grid2.cjs +311 -0
- package/lib/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/repeater-grid2/repeater-grid2.css +1 -0
- package/lib/control/tab-exp-panel/tab-exp-panel.cjs +3 -16
- package/lib/editor/code/code-editor.controller.cjs +175 -0
- package/lib/editor/code/monaco-editor/monaco-editor.cjs +116 -6
- package/lib/editor/code/monaco-editor/monaco-editor.css +1 -1
- package/lib/editor/html/html-editor.controller.cjs +75 -0
- package/lib/editor/html/wang-editor/index.cjs +3 -0
- package/lib/editor/html/wang-editor/module/index.cjs +3 -0
- package/lib/editor/html/wang-editor/module/inline-ai-module.cjs +98 -0
- package/lib/editor/html/wang-editor/wang-editor.cjs +35 -4
- package/lib/editor/html/wang-editor/wang-editor.css +1 -1
- package/lib/editor/markdown/ibiz-markdown-editor/custom-menu.cjs +47 -0
- package/lib/editor/markdown/ibiz-markdown-editor/ibiz-markdown-editor.cjs +109 -13
- package/lib/editor/markdown/ibiz-markdown-editor/ibiz-markdown-editor.css +1 -1
- package/lib/editor/markdown/markdown-editor.controller.cjs +112 -0
- package/lib/editor/text-box/input/input.css +1 -1
- package/lib/index.cjs +2 -0
- package/lib/locale/en/index.cjs +15 -2
- package/lib/locale/zh-CN/index.cjs +15 -2
- package/lib/panel-component/nav-breadcrumb/nav-breadcrumb.util.cjs +1 -1
- package/lib/panel-component/user-message/internal-message/internal-message-json/internal-message-json.provider.cjs +2 -2
- package/lib/util/ai-util/ai-util.cjs +6 -2
- package/lib/util/app-util/app-util.cjs +40 -1
- package/lib/util/index.cjs +2 -0
- package/lib/util/inline-ai-util/inline-ai-textarea/icon.cjs +151 -0
- package/lib/util/inline-ai-util/inline-ai-textarea/inline-ai-textarea.cjs +207 -0
- package/lib/util/inline-ai-util/inline-ai-textarea/inline-ai-textarea.css +1 -0
- package/lib/util/inline-ai-util/inline-ai-textarea/inline-ai-textarea.hook.cjs +167 -0
- package/lib/util/inline-ai-util/inline-ai-util.cjs +147 -0
- package/lib/web-app/main.cjs +2 -0
- package/package.json +5 -5
- package/dist/ibiz-markdown-editor-Cs1m7gKI.js +0 -1
- package/dist/index-CCKb6xlM.js +0 -11
- package/dist/wang-editor-BIllIvre.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
System.register(["vue","@ibiz-template/vue3-util","qx-util","cherry-markdown"],function(e){"use strict";var t,i,l,n,o,a,r,s,d,c,u,m,h,f;return{setters:[function(e){t=e.nextTick,i=e.defineComponent,l=e.createVNode,n=e.ref,o=e.watch,a=e.onMounted,r=e.onBeforeUnmount,s=e.onUnmounted},function(e){d=e.getEditorEmits,c=e.getMarkDownProps,u=e.useNamespace,m=e.useUIStore},function(e){h=e.createUUID},function(e){f=e.default}],execute:function(){e("default",i({name:"IBizMarkDown",props:c(),emits:d(),setup(e,{emit:i}){var d,c,v;const b=u("markdown"),p=e.controller,g=n("");let w=null;const k=h(),[C]=function(e){return[f.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:(i,l,n)=>{var o,a;const r=null==(o=e.mdeditor)?void 0:o.editor.editor.getCursor("start"),s=null==(a=e.mdeditor)?void 0:a.editor.editor.getCursor("end");e.setCursorPos(r,s),n.stopPropagation(),n.preventDefault(),t(()=>{var t;if(null==(t=e.mdeditor)?void 0:t.bubble){e.mdeditor.bubble.visible=!0;const t=e.mdeditor.bubble.bubbleDom.getBoundingClientRect();if(!t||!t.left||!t.top)return;const i=ibiz.inLineAIUtil.calcContextMenus(e.deACMode,t=>{e.doInLineAIUIAction(t,e.model.appId)});if(0===i.length)return;ibiz.inLineAIUtil.showContextMenus(t.left,t.top+60,i)}})}})]}(p),y=ibiz.util.file.getUploadHeaders(),x=n({...y}),z=n(""),M=(null==(d=null==p?void 0:p.editorParams)?void 0:d.customTheme)||(null==(c=null==p?void 0:p.editorParams)?void 0:c.customtheme),{UIStore:U}=m(),I=n(M||U.theme),P=n(!1);let D="default";p&&(null==(v=p.editorParams)?void 0:v.showmode)&&(D=p.editorParams.showmode);const E=n(!1),T=n("editOnly");let A=null,B=0;const O=n({});let L=!1;o(()=>e.data,e=>{if(e&&p){const t={...p.editorParams};t.uploadparams&&(t.uploadParams=JSON.parse(t.uploadparams));const i=ibiz.util.file.calcFileUpDownUrl(p.context,p.params,e,t);z.value=i.uploadUrl}},{immediate:!0,deep:!0});const N=n(),S=async(t,i)=>{const l=await ibiz.util.file.fileUpload(z.value,t,x.value),n=((e,t)=>{if(!p)return"";const i={...p.editorParams};return i.exportparams&&(i.exportParams=JSON.parse(i.exportparams)),t&&t.folder&&(i.osscat=t.folder),ibiz.util.file.calcFileUpDownUrl(p.context,p.params,e,i).downloadUrl})(e.data||{},l.fileid);let o=n.replace("%fileId%",l.fileid);if(ibiz.config.common.enableDownloadTicket&&p){const t=await ibiz.util.file.getDownloadTicket(p.context,p.params,e.data||{},{fileId:l.fileid},p.downloadTicketParams);t&&t.ticket&&(o=n.replace("%fileId%",t.ticket),i(o))}else i(o)},H=()=>null==w?void 0:w.getMarkdown(),V=e=>{L=!0,null==w||w.setMarkdown(e,!0)};o(()=>e.value,(e,t)=>{e!==t&&(g.value=e||"")},{immediate:!0}),o(g,(e,t)=>{const i=H();e!==t&&i!==e&&V(e)});const R=e=>{"manual"!==D&&(i("change",H(),null==p?void 0:p.model.id,L),L=!1)},q=(e,t)=>({[e]:t}),F=(e,t="")=>{const i=document.createElement(e);return i.className=t,i},j=e=>F("i","ch-icon ch-icon-".concat(e)),J=b.e("fullscreen"),W=e=>{for(;e.firstChild;)e.removeChild(e.firstChild)},Y=()=>{if(w&&N.value){const e=w.editor.options.editorDom.parentElement;if(!e)return{};const t=e.classList,i=N.value.querySelector(".".concat(J));return i?{parentElement:e,cherryClass:t,fullscreenNode:i}:{}}return{}},G=()=>{const{parentElement:e,cherryClass:t,fullscreenNode:i}=Y();e&&t&&i&&(W(i),i.appendChild(j("fullscreen")),i.title=ibiz.i18n.t("editor.common.fullscreen"),t.remove("fullscreen"),null==e||e.blur(),e.setAttribute("tabindex","-1"))},K=()=>{const{cherryClass:e}=Y();return null==e?void 0:e.contains("fullscreen")},Q=()=>{w&&N.value&&(K()?(G(),E.value=!1):((()=>{const{parentElement:e,cherryClass:i,fullscreenNode:l}=Y();e&&i&&l&&(W(l),l.appendChild(j("minscreen")),i.add("fullscreen"),l.title=ibiz.i18n.t("editor.common.minimize"),e.setAttribute("tabindex","-1"),t(()=>null==e?void 0:e.focus()))})(),E.value=!0))},X=e=>{e.stopPropagation(),"Escape"===e.key&&K()&&(G(),E.value=!1)};o(()=>U.theme,e=>{I.value=M||e,null==w||w.setTheme(I.value),null==w||w.setCodeBlockTheme(I.value)});const Z=()=>{P.value=!0,T.value="editOnly",null==w||w.switchModel(T.value)},$=()=>{P.value=!1,T.value="previewOnly",null==w||w.switchModel(T.value)},_=()=>{V(g.value),$()},ee=()=>{i("change",H(),null==p?void 0:p.model.id,L),L=!1,$()};return a(()=>{(e.disabled||e.readonly||"manual"===D)&&(T.value="previewOnly"),t(()=>{var t;const i=["bold","italic","underline","strikethrough","sub","sup","|","size","color"];p.editorParams.ac&&p.deACMode&&i.unshift("AI"),w=new f({id:k,value:g.value,previewer:{enablePreviewerBubble:!(e.disabled||e.readonly)},themeSettings:{mainTheme:I.value,codeBlockTheme:I.value},fileUpload:S,emoji:{useUnicode:!0},header:{anchorStyle:"autonumber"},editor:{height:"100%",defaultModel:T.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:i,float:["h1","h2","h3","|","checklist","quote","quickTable","code"],customMenu:{AI:C},sidebar:["theme","copy"],toolbarRight:[],toc:{updateLocationHash:!1,defaultModel:"pure",showAutoNumber:!0,position:"absolute",cssText:""}},callback:{afterChange:R,beforeImageMounted:q},engine:{syntax:{table:{enableChart:!1,externals:["echarts"]}}}}),w.setTheme(I.value),M&&(w.setTheme(M),w.setCodeBlockTheme(M));const l=F("span","".concat(J," cherry-toolbar-button"));l.title=ibiz.i18n.t("editor.common.fullscreen"),l.onclick=Q,l.appendChild(j("fullscreen"));const n=e.disabled?w.editor.options.editorDom.parentElement:null==(t=w.editor.options.editorDom.parentElement)?void 0:t.querySelector(".cherry-toolbar>.toolbar-right");null==n||n.appendChild(l),p.setMDEditor(w)}),(()=>{if(window.ResizeObserver&&N.value){const e={width:N.value.offsetWidth?"".concat(N.value.offsetWidth,"px"):"100%"};p&&"number"==typeof p.parent.model.height&&Object.assign(e,{height:"".concat(p.parent.model.height,"px")}),O.value=b.cssVarBlock(e),A=new ResizeObserver(e=>{const t=e[0].contentRect.width;if(t!==B){const i={width:"".concat(e[0].contentRect.width,"px")};p&&"number"==typeof p.parent.model.height&&Object.assign(i,{height:"".concat(p.parent.model.height,"px")}),O.value=b.cssVarBlock(i),B=t}}),A.observe(N.value)}})(),document.addEventListener("keydown",X.bind(this))}),r(()=>{document.removeEventListener("keydown",X.bind(this))}),s(()=>{w=null,A&&A.disconnect()}),{ns:b,currentVal:g,id:k,editor:w,markDownBox:N,headers:x,theme:I,defaultModel:T,cssVars:O,isEditing:P,showmode:D,getCherryHtml:()=>null==w?void 0:w.getHtml(),getCherryContent:H,setCherryContent:V,renderHeader:()=>{if("manual"===D&&!P.value)return l("div",{class:[b.e("header"),b.is("fullscreen",E.value)]},[!e.disabled&&!e.readonly&&l("div",{class:b.em("header","edit"),onClick:Z,title:ibiz.i18n.t("editor.markdown.edit")},[l("i",{class:"fa fa-edit","aria-hidden":"true"},null)]),l("div",{class:b.em("header","full"),onClick:Q},[E.value?l("i",{class:"fa fa-compress","aria-hidden":"true",title:ibiz.i18n.t("editor.html.reduce")},null):l("i",{class:"fa fa-expand","aria-hidden":"true",title:ibiz.i18n.t("editor.common.fullscreen")},null)])])},renderFooter:()=>{if("manual"===D&&P.value&&!e.disabled&&!e.readonly)return l("div",{class:[b.e("footer"),b.is("fullscreen",E.value)]},[l("div",{class:b.em("footer","cancel"),onClick:_},[ibiz.i18n.t("editor.common.cancel")]),l("div",{class:b.em("footer","save"),onClick:ee},[ibiz.i18n.t("editor.common.confirm")])])}}},render(){return l("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.renderHeader(),this.renderFooter(),l("div",{id:this.id,style:this.cssVars,class:this.ns.b("cherry")},null)])}}))}}});
|