@ibiz-template/vue3-components 0.7.41-alpha.50 → 0.7.41-alpha.51
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/chart-B_uQaEfA.js +1 -0
- package/dist/{index-CXRnZZS2.js → index-CXaTaGlg.js} +4 -4
- package/dist/index.min.css +1 -1
- package/dist/index.system.min.js +1 -1
- package/dist/{wang-editor-9WDOiHof.js → wang-editor-Bcmawui0.js} +1 -1
- package/dist/{xlsx-util-CgGjW9-u.js → xlsx-util-fU5jMSIx.js} +1 -1
- package/es/control/chart/chart.mjs +1 -0
- package/es/control/drtab/drtab-control.util.mjs +1 -1
- package/es/control/form/form-detail/form-item/composite-form-item-ex/composite-form-item-ex.controller.mjs +10 -1
- package/es/control/form/form-detail/form-item/composite-form-item-ex/composite-form-item-ex.css +1 -1
- package/es/control/form/form-detail/form-item/composite-form-item-ex/composite-form-item-ex.mjs +3 -2
- package/es/control/form/form-detail/form-item/form-item-container/form-item-container.mjs +2 -1
- package/es/editor/data-picker/ibiz-picker-embed-view/ibiz-picker-embed-view.mjs +2 -4
- package/es/util/ai-chat-util/ai-chat-util.mjs +60 -22
- package/es/util/fullscreen/fullscreen-util.mjs +1 -1
- package/es/web-app/router/index.mjs +181 -95
- package/lib/control/chart/chart.cjs +1 -0
- package/lib/control/drtab/drtab-control.util.cjs +1 -1
- package/lib/control/form/form-detail/form-item/composite-form-item-ex/composite-form-item-ex.cjs +3 -2
- package/lib/control/form/form-detail/form-item/composite-form-item-ex/composite-form-item-ex.controller.cjs +10 -1
- package/lib/control/form/form-detail/form-item/composite-form-item-ex/composite-form-item-ex.css +1 -1
- package/lib/control/form/form-detail/form-item/form-item-container/form-item-container.cjs +2 -1
- package/lib/editor/data-picker/ibiz-picker-embed-view/ibiz-picker-embed-view.cjs +2 -4
- package/lib/util/ai-chat-util/ai-chat-util.cjs +60 -22
- package/lib/util/fullscreen/fullscreen-util.cjs +1 -1
- package/lib/web-app/router/index.cjs +181 -95
- package/package.json +6 -6
- package/dist/chart-pMMcGXRE.js +0 -1
- /package/es/node_modules/.pnpm/{@ibiz-template_core@0.7.41-alpha.52_axios@1.12.2_lodash-es@4.17.21_qs@6.14.0_qx-util@0.4.8_ramda@0.29.1 → @ibiz-template_core@0.7.41-alpha.53_axios@1.12.2_lodash-es@4.17.21_qs@6.14.0_qx-util@0.4.8_ramda@0.29.1}/node_modules/@ibiz-template/core/out/utils/namespace/namespace.mjs +0 -0
- /package/lib/node_modules/.pnpm/{@ibiz-template_core@0.7.41-alpha.52_axios@1.12.2_lodash-es@4.17.21_qs@6.14.0_qx-util@0.4.8_ramda@0.29.1 → @ibiz-template_core@0.7.41-alpha.53_axios@1.12.2_lodash-es@4.17.21_qs@6.14.0_qx-util@0.4.8_ramda@0.29.1}/node_modules/@ibiz-template/core/out/utils/namespace/namespace.cjs +0 -0
package/dist/index.system.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["./index-
|
|
1
|
+
System.register(["./index-CXaTaGlg.js","@ibiz-template/model-helper","@ibiz-template/vue3-util","vue","@ibiz-template/core","@ibiz-template/runtime","qx-util","element-plus","ramda","lodash-es","@floating-ui/dom","interactjs","dayjs","qs","vuedraggable","@wangeditor/editor","@imengyu/vue3-context-menu","vue-router","async-validator","@ibiz-template/devtool","axios","dayjs/plugin/customParseFormat","vue-i18n"],function(i){"use strict";return{setters:[function(e){i({AIChatUtil:e.c2,ActionBarPortlet:e.ar,AppDataUploadViewEngine:e.b7,AppRouter:e.cb,AppUtil:e.bZ,ArrowLeftBold:e.c7,ArrowRightBold:e.c8,AuthGuard:e.c9,CalendarExpViewEngine:e.b8,CalendarViewEngine:e.b9,ChartExpViewEngine:e.ba,ChartPortlet:e.aj,ChartViewEngine:e.bb,ConfirmUtil:e.bS,ContainerPortlet:e.ac,CustomViewEngine:e.bc,DEIndexViewEngine:e.bf,DRBarController:e.a7,DRTabController:e.a9,DataViewControlProvider:e.V,DataViewEngine:e.b3,DataViewExpViewEngine:e.be,DoingNotice:e.D,EditView2Engine:e.bh,EditView3Engine:e.bi,EditView4Engine:e.bj,EditViewEngine:e.bg,ErrorView:e.a$,ExpViewEngine:e.bk,FilterPortlet:e.av,FormPickupDataViewEngine:e.bl,FullscreenUtil:e.b_,GanttViewEngine:e.bm,GridExpViewEngine:e.bn,GridViewEngine:e.b1,HtmlPortlet:e.ap,IBizActionBarPortlet:e.aq,IBizActionToolbar:e.e,IBizAppMenuControl:e.l,IBizAppMenuIconViewControl:e.m,IBizAuthUserinfo:e.aH,IBizCalendarControl:e.aw,IBizCalendarExpBarControl:e.a1,IBizCaptionBarControl:e.T,IBizChartControl:e.a4,IBizChartExpBarControl:e.a2,IBizChartPortlet:e.ai,IBizCol:e.b,IBizCommonComponents:e.a,IBizContainerPortlet:e.ab,IBizContextMenuControl:e.aE,IBizDRBarControl:e.a6,IBizDRTabControl:e.a8,IBizDashboardControl:e.aa,IBizDataViewControl:e.U,IBizDataViewExpBarControl:e.a0,IBizDynamicGridFieldEditColumn:e.x,IBizEditFormControl:e.Q,IBizEditor:e.aV,IBizFilterPortlet:e.au,IBizFormButton:e.H,IBizFormButtonList:e.O,IBizFormControl:e.R,IBizFormDRUIPart:e.J,IBizFormGroupPanel:e.B,IBizFormIFrame:e.P,IBizFormItem:e.C,IBizFormItemContainer:e.E,IBizFormMDCtrl:e.K,IBizFormPage:e.F,IBizFormPageItem:e.G,IBizFormRawItem:e.L,IBizFormTabPage:e.N,IBizFormTabPanel:e.M,IBizGanttControl:e.aD,IBizGridColumnHeader:e.y,IBizGridControl:e.n,IBizGridExpBarControl:e.$,IBizGridFieldColumn:e.s,IBizGridFieldEditColumn:e.v,IBizGridGroupColumn:e.w,IBizGridUAColumn:e.t,IBizHtmlPortlet:e.ao,IBizIndexActions:e.aT,IBizKanbanControl:e.ax,IBizListControl:e.z,IBizListExpBarControl:e._,IBizListPortlet:e.am,IBizMEditViewPanelControl:e.aA,IBizMapControl:e.aB,IBizMenuPortlet:e.ag,IBizNavPosIndex:e.aK,IBizPanelAppTitle:e.aN,IBizPanelButton:e.aL,IBizPanelComponents:e.aG,IBizPanelIndexViewSearch:e.aS,IBizPanelTabPanel:e.aP,IBizPickupViewPanelControl:e.X,IBizRawItem:e.f,IBizRawItemPortlet:e.ak,IBizReportPanelControl:e.aC,IBizReportPortlet:e.as,IBizRow:e.d,IBizSearchBarControl:e.a3,IBizSearchFormControl:e.A,IBizSortBar:e.k,IBizSplit:e.g,IBizSplitContainer:e.aR,IBizSplitTrigger:e.j,IBizSubAppRefView:e.a_,IBizTabExpPanelControl:e.Y,IBizToolbarControl:e.S,IBizTreeControl:e.W,IBizTreeExpBarControl:e.Z,IBizTreeGridControl:e.az,IBizTreeGridExControl:e.ay,IBizUserAction:e.aU,IBizViewEngine:e.b0,IBizViewPanelControl:e.aF,IBizViewPortlet:e.ae,IBizVue3:e.I,IBizWFStepTraceView:e.aZ,IBizWizardPanelControl:e.a5,InLineAIUtil:e.c1,IndexViewEngine:e.b2,KanbanViewEngine:e.bo,ListExpViewEngine:e.bp,ListPortlet:e.an,ListViewEngine:e.bq,LoadingUtil:e.bP,LoginView:e.aY,LoginViewEngine:e.br,MDCustomViewEngine:e.bd,MEditView9Engine:e.bt,MPickupView2Engine:e.bv,MPickupViewEngine:e.bu,MapViewEngine:e.bs,MenuPortlet:e.ah,MessageUtil:e.bQ,ModalUtil:e.bR,NavPosIndexController:e.aJ,NavPosIndexState:e.aI,NoticeUtil:e.bX,NotificationUtil:e.bT,OpenViewUtil:e.bU,OptViewEngine:e.b4,OverlayController:e.bV,PanelAppTitleController:e.aO,PanelButtonController:e.aM,PanelViewEngine:e.bw,PickupDataViewEngine:e.bx,PickupGridViewEngine:e.by,PickupTreeViewEngine:e.bz,PickupView2Engine:e.bB,PickupViewEngine:e.bA,PortalViewEngine:e.bC,PortletLayout:e.ad,RawItemPortlet:e.al,RenderUtil:e.bY,ReportPortlet:e.at,ReportViewEngine:e.bD,ScreenShotUtil:e.c3,SplitContainerController:e.aQ,SubAppRefViewEngine:e.bE,TabExpViewEngine:e.b5,TabSearchViewEngine:e.bF,TreeExpViewEngine:e.b6,TreeGridExViewEngine:e.bG,TreeGridViewEngine:e.bH,TreeViewEngine:e.bI,View403:e.aX,View404:e.aW,ViewPortlet:e.af,WFDynaActionViewEngine:e.bJ,WFDynaEditView3Engine:e.bL,WFDynaEditViewEngine:e.bK,WFDynaStartViewEngine:e.bM,WFStepDataViewEngine:e.bN,WizardViewEngine:e.bO,convertBtnType:e.c0,i18n:e.i,parseHtml:e.c6,runApp:e.ca,splitPathToSegments:e.c4,useAppGridBase:e.p,useAppGridPagination:e.o,useFocusByEnter:e.b$,useGridDraggable:e.r,useGridHeaderStyle:e.q,useITableEvent:e.u,usePagination:e.bW,validateRouteSegments:e.c5})},null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null],execute:function(){}}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["vue","@wangeditor/editor-for-vue","ramda","@ibiz-template/vue3-util","@ibiz-template/core","element-plus","./index-CXRnZZS2.js","@wangeditor/editor","@ibiz-template/runtime","qx-util","lodash-es","@floating-ui/dom","interactjs","dayjs","qs","vuedraggable","@imengyu/vue3-context-menu","vue-router","async-validator","@ibiz-template/devtool","axios","dayjs/plugin/customParseFormat","vue-i18n","@ibiz-template/model-helper"],function(e){"use strict";var t,l,a,o,n,i,s,r,c,d,u,m,v,h,p,f,b,g,y,C,z;return{setters:[function(e){t=e.defineComponent,l=e.createVNode,a=e.resolveComponent,o=e.ref,n=e.shallowRef,i=e.watch,s=e.onBeforeUnmount,r=e.onMounted,c=e.nextTick,d=e.onUnmounted},function(e){u=e.Toolbar,m=e.Editor},function(e){v=e.isNil},function(e){h=e.getEditorEmits,p=e.getHtmlProps,f=e.useNamespace,b=e.useUIStore},function(e){g=e.awaitTimeout},function(e){y=e.ElMessageBox},function(e){C=e.h},function(e){z=e.t},null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null],execute:function(){e("default",t({name:"IBizHtml",props:p(),emits:h(),setup(e,{emit:t,slots:a}){var h;const p=f("html"),w=e.controller,x=o(),S=o({});let k=null,H=0;const I=o(),M=n(),E=o(""),P=ibiz.util.file.getUploadHeaders(),F=o({...P}),U=o(""),B=o(!0),O=o(!1),A=o(!1),T=o(!1),V=o(!1);let L=!1;const N=w.model;N.editorParams&&(N.editorParams.enableEdit&&(O.value=!0,A.value=!0,B.value=w.toBoolean(N.editorParams.enableEdit)&&!e.readonly&&!e.disabled),N.editorParams.enableedit&&(O.value=!0,A.value=!0,B.value=w.toBoolean(N.editorParams.enableedit)&&!e.readonly&&!e.disabled),N.editorParams.enableFullScreen&&(T.value=w.toBoolean(N.editorParams.enableFullScreen)),N.editorParams.enablefullscreen&&(T.value=w.toBoolean(N.editorParams.enablefullscreen)),N.editorParams.enablenoaccess&&(L="true"===(null==(h=null==w?void 0:w.editorParams)?void 0:h.enablenoaccess))),e.readonly&&(O.value=!1,A.value=!0);i(()=>e.data,e=>{if(e){const t={...w.editorParams,enableNoAccess:L};t.uploadparams&&(t.uploadParams=JSON.parse(t.uploadparams));const l=ibiz.util.file.calcFileUpDownUrl(w.context,w.params,e,t);U.value=l.uploadUrl}},{immediate:!0,deep:!0});const j=(e,t)=>{if(t)return!0},D=e=>e,R=["headerSelect","blockquote","|","bold","underline","italic",{key:"group-more-style",title:z("editor.more"),iconSvg:'<svg viewBox="0 0 1024 1024"><path d="M204.8 505.6m-76.8 0a76.8 76.8 0 1 0 153.6 0 76.8 76.8 0 1 0-153.6 0Z"></path><path d="M505.6 505.6m-76.8 0a76.8 76.8 0 1 0 153.6 0 76.8 76.8 0 1 0-153.6 0Z"></path><path d="M806.4 505.6m-76.8 0a76.8 76.8 0 1 0 153.6 0 76.8 76.8 0 1 0-153.6 0Z"></path></svg>',menuKeys:["through","code","sup","sub","clearStyle"]},"color","bgColor","|","fontSize","fontFamily","lineHeight","|","bulletedList","numberedList","todo",{key:"group-justify",title:z("editor.justify"),iconSvg:'<svg viewBox="0 0 1024 1024"><path d="M768 793.6v102.4H51.2v-102.4h716.8z m204.8-230.4v102.4H51.2v-102.4h921.6z m-204.8-230.4v102.4H51.2v-102.4h716.8zM972.8 102.4v102.4H51.2V102.4h921.6z"></path></svg>',menuKeys:["justifyLeft","justifyRight","justifyCenter","justifyJustify"]},{key:"group-indent",title:z("editor.indent"),iconSvg:'<svg viewBox="0 0 1024 1024"><path d="M0 64h1024v128H0z m384 192h640v128H384z m0 192h640v128H384z m0 192h640v128H384zM0 832h1024v128H0z m0-128V320l256 192z"></path></svg>',menuKeys:["indent","delIndent"]},"|","emotion","insertLink",{key:"group-image",title:z("editor.image"),iconSvg:'<svg viewBox="0 0 1024 1024"><path d="M959.877 128l0.123 0.123v767.775l-0.123 0.122H64.102l-0.122-0.122V128.123l0.122-0.123h895.775zM960 64H64C28.795 64 0 92.795 0 128v768c0 35.205 28.795 64 64 64h896c35.205 0 64-28.795 64-64V128c0-35.205-28.795-64-64-64zM832 288.01c0 53.023-42.988 96.01-96.01 96.01s-96.01-42.987-96.01-96.01S682.967 192 735.99 192 832 234.988 832 288.01zM896 832H128V704l224.01-384 256 320h64l224.01-192z"></path></svg>',menuKeys:["insertImage","uploadImage"]},{key:"group-video",title:z("editor.video"),iconSvg:'<svg viewBox="0 0 1024 1024"><path d="M981.184 160.096C837.568 139.456 678.848 128 512 128S186.432 139.456 42.816 160.096C15.296 267.808 0 386.848 0 512s15.264 244.16 42.816 351.904C186.464 884.544 345.152 896 512 896s325.568-11.456 469.184-32.096C1008.704 756.192 1024 637.152 1024 512s-15.264-244.16-42.816-351.904zM384 704V320l320 192-320 192z"></path></svg>',menuKeys:["insertVideo","uploadVideo"]},"insertTable","codeBlock","divider","|","undo","redo","|","fullScreen","emoji"];w.chatCompletion&&R.unshift("aichart","|");const K={excludeKeys:["group-video","emotion"],toolbarKeys:R},q={placeholder:w.placeHolder,readOnly:O.value?A.value:e.readonly,MENU_CONF:{uploadImage:{server:U.value,fieldName:"file",maxFileSize:10485760,maxNumberOfFiles:10,allowedFileTypes:[],headers:F.value,withCredentials:!0,onBeforeUpload:e=>e,onProgress(e){console.log("progress",e)},onSuccess(e,t){ibiz.config.common.enableDownloadTicket&&!L&&t.ticket&&ibiz.util.file.setDownloadTicket(t.id,t.ticket),console.log("".concat(e.name," 上传成功"),t)},onFailed(e,t){console.log("".concat(e.name," 上传失败"),t)},onError(e,t,l){console.log("".concat(e.name," 上传出错"),t,l)},async customInsert(t,l){const a=((e,t)=>{const l={...w.editorParams,enableNoAccess:L};return l.exportparams&&(l.exportParams=JSON.parse(l.exportparams)),t&&t.folder&&(l.osscat=t.folder),ibiz.util.file.calcFileUpDownUrl(w.context,w.params,e,l).downloadUrl})(e.data,t);let o=a.replace("%fileId%",t.id);const n=t.filename;if(ibiz.config.common.enableDownloadTicket&&!L){const i=await ibiz.util.file.getDownloadTicket(w.context,w.params,e.data,{fileId:t.id},w.downloadTicketParams);i&&i.ticket&&(o=a.replace("%fileId%",i.ticket),l(o,n,""))}else l(o,n,"")}},insertLink:{checkLink:j,parseLinkUrl:D},editLink:{checkLink:j,parseLinkUrl:D}},hoverbarKeys:C};let J;s(()=>{const e=M.value;null!=e&&e.destroy()});const Z=l=>{M.value=l,w.onCreated(M.value),l.setHtml(E.value),l.on("aiClick",()=>{(async()=>{const l=w.model.appDataEntityId;if(!l||!w.deACMode)return;const{zIndex:a}=b(),o=a.increment();J=await ibiz.aiChatUtil.getAIChat();const{containerOptions:n,chatOptions:i}=await ibiz.aiChatUtil.getEditorExAIChatParams(w.editorParams,w.context,w.params,e.data,w.deACMode,{chatInstance:J,view:w.view,ctrl:w.ctrl}),s=await ibiz.aiChatUtil.getAIResourceOptions(w.context,w.params);J.create({resourceOptions:s,containerOptions:{zIndex:o,...n},chatOptions:{caption:w.deACMode.logicName,context:{...w.context},params:{...w.params,srfactag:w.deACMode.codeName},appDataEntityId:l,...i,action:(e,l)=>{"backfill"===e&&(O.value?E.value=l.realcontent||"":t("change",l.realcontent))}}})})()}),l.on("lineAiClick",()=>{const e=l.getEditableContainer().querySelector(".w-e-hover-bar");if(!e)return;const{offsetLeft:t,offsetTop:a,offsetHeight:o}=e,n=ibiz.inLineAIUtil.calcContextMenus(w.deACMode,e=>{w.doInLineAIUIAction(e,w.model.appId)});if(0===n.length)return;const i=l.getEditableContainer().getBoundingClientRect(),{zIndex:s}=b(),r=s.increment();ibiz.inLineAIUtil.showContextMenus(i.x+t,i.y+a+o,n,{zIndex:r,onClose:()=>{s.decrement()}})})},$=l=>{const a=l.getHtml(),o="<p><br></p>"===a?"":a;o===e.value||""===o&&v(e.value)||!O.value&&l.isFocused()&&t("change",o)},_=e=>{},G=e=>{t("focus")},Q=e=>{t("blur")},W=(e,t)=>{alert("【".concat(ibiz.i18n.t("editor.html.wangEditor.customTips"),"】").concat(t," - ").concat(e))},X=(e,t,l)=>{l(!0)},Y=()=>{const e=M.value;null!=e&&e.disable()},ee=()=>{const e=M.value;null!=e&&e.enable()};r(()=>{i(()=>e.value,(t,l)=>{t===l||"string"!=typeof e.value&&null!=t||c(null==t?()=>{E.value=""}:()=>{E.value=t})},{immediate:!0}),i(()=>e.disabled,(e,t)=>{e!==t&&(!0===e?Y():ee())},{immediate:!0})});const te=()=>{A.value=!A.value,A.value?Y():(ee(),M.value.focus(),(()=>{var t,l;if(e.value){const a=e.value.indexOf("</p>");if(a>=0){const e=null==(t=M.value.selection.anchor)?void 0:t.offset,o=null==(l=M.value.selection.anchor)?void 0:l.path;0===e&&o.length>0&&0===o[0]&&M.value.move(a-3)}}})())},le=()=>{V.value=!V.value,c(()=>{A.value?Y():(ee(),M.value.focus())})};return r(()=>{g(0,()=>{if(x.value&&I.value){const e=x.value.offsetHeight;k=new ResizeObserver(t=>{const l=t[0].contentRect.height;if(l!==H){const a={height:"".concat(e-t[0].contentRect.height+(0!==l?300:0),"px"),"toolbar-height":"".concat(l,"px")};S.value=p.cssVarBlock(a),H=l}}),k.observe(I.value.selector)}})}),d(()=>{w.onDestroyed(),k&&k.disconnect(),J&&J.close()}),{ns:p,editorRef:M,mode:"default",valueHtml:E,toolbarConfig:K,editorConfig:q,handleCreated:Z,handleChange:$,handleDestroyed:_,handleFocus:G,handleBlur:Q,customAlert:W,customPaste:X,insertText:e=>{const t=M.value;null!=t&&t.insertText(e)},printHtml:()=>{const e=M.value;null!=e&&console.log(e.getHtml())},disable:Y,enable:ee,renderHeaserToolbar:()=>O.value||T.value?l("div",{class:p.b("custom-toolbar")},[O.value&&B.value&&A.value?l("i",{class:"fa fa-edit","aria-hidden":"true",title:ibiz.i18n.t("editor.html.enableedit"),onClick:()=>te()},null):null,T.value?V.value?l("i",{class:"fa fa-compress","aria-hidden":"true",title:ibiz.i18n.t("editor.html.reduce"),onClick:()=>le()},null):l("i",{class:"fa fa-expand","aria-hidden":"true",title:ibiz.i18n.t("editor.html.expand"),onClick:()=>le()},null):null]):null,renderEditorContent:()=>l("div",{class:[p.b("content"),p.is("editing",!A.value)],ref:"htmlContent",style:S.value},[a.editorSwitchMenu?l("div",{class:p.b("menu")},[a.editorSwitchMenu()]):null,l(u,{ref:"toolbarRef",editor:M.value,"default-config":K,mode:"default",class:p.b("toolbar")},null),l(m,{class:[p.b("editor"),p.is("readonly",A.value)],modelValue:E.value,"onUpdate:modelValue":e=>E.value=e,"default-config":q,mode:"default",onOnCreated:Z,onOnChange:$,onOnDestroyed:_,onOnFocus:G,onOnBlur:Q,oncustomAlert:W,oncustomPaste:X},null)]),renderFooter:()=>O.value?l("div",{class:[p.b("footer"),{[p.b("footer-dialog")]:V.value}]},[l("div",{class:p.be("footer","cancel"),onClick:()=>{e.value!==E.value?y({title:ibiz.i18n.t("editor.common.confirmCancel"),type:"warning",customClass:p.b("message"),message:l("div",{class:p.be("message","message-content")},[l("p",null,[ibiz.i18n.t("editor.common.confirmCancelPrompt")]),l("p",{class:p.bem("message","message-content","message-tip")},[ibiz.i18n.t("editor.common.cancelEditPrompt")])]),showCancelButton:!0,cancelButtonClass:p.be("message","message-cancel"),confirmButtonClass:p.be("message","message-comfire")}).then(()=>{E.value=e.value||"",te()}).catch(()=>{M.value.focus()}):te()}},[ibiz.i18n.t("app.cancel")]),l("div",{class:p.be("footer","save"),onClick:()=>(()=>{A.value=!0,M.value.disable();const e=E.value;t("change",e),V.value&&(V.value=!1)})()},[ibiz.i18n.t("app.save")])]):null,htmlContent:x,hasEnableEdit:O,cssVars:S,toolbarRef:I,isFullScreen:V,readonlyState:A,changeFullScreenState:le}},render(){const e=!!this.$slots.editorSwitchMenu;return this.isFullScreen?l(a("el-dialog"),{modelValue:this.isFullScreen,"onUpdate:modelValue":e=>this.isFullScreen=e,width:"80%",top:"10vh",class:[this.ns.b("dialog-full-screen"),this.ns.is("editing",!this.readonlyState)],onClose:()=>this.changeFullScreenState()},{default:()=>[l("div",{class:[this.ns.b(),{[this.ns.b("editor-readonly")]:this.readonlyState},this.ns.is("show-editor-switch-menu",e)]},[this.renderHeaserToolbar(),this.renderEditorContent(),this.hasEnableEdit&&!this.readonlyState?this.renderFooter():null])]}):l("div",{class:[this.ns.b(),{[this.ns.b("editor-readonly")]:this.readonlyState},this.ns.is("show-ai",!0),this.ns.is("enable-edit",!this.readonly&&!this.disabled),this.ns.is("show-editor-switch-menu",e)]},[this.renderHeaserToolbar(),this.renderEditorContent(),this.hasEnableEdit&&!this.readonlyState?this.renderFooter():null])}}))}}});
|
|
1
|
+
System.register(["vue","@wangeditor/editor-for-vue","ramda","@ibiz-template/vue3-util","@ibiz-template/core","element-plus","./index-CXaTaGlg.js","@wangeditor/editor","@ibiz-template/runtime","qx-util","lodash-es","@floating-ui/dom","interactjs","dayjs","qs","vuedraggable","@imengyu/vue3-context-menu","vue-router","async-validator","@ibiz-template/devtool","axios","dayjs/plugin/customParseFormat","vue-i18n","@ibiz-template/model-helper"],function(e){"use strict";var t,l,a,o,n,i,s,r,c,d,u,m,v,h,p,f,b,g,y,C,z;return{setters:[function(e){t=e.defineComponent,l=e.createVNode,a=e.resolveComponent,o=e.ref,n=e.shallowRef,i=e.watch,s=e.onBeforeUnmount,r=e.onMounted,c=e.nextTick,d=e.onUnmounted},function(e){u=e.Toolbar,m=e.Editor},function(e){v=e.isNil},function(e){h=e.getEditorEmits,p=e.getHtmlProps,f=e.useNamespace,b=e.useUIStore},function(e){g=e.awaitTimeout},function(e){y=e.ElMessageBox},function(e){C=e.h},function(e){z=e.t},null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null],execute:function(){e("default",t({name:"IBizHtml",props:p(),emits:h(),setup(e,{emit:t,slots:a}){var h;const p=f("html"),w=e.controller,x=o(),S=o({});let k=null,H=0;const I=o(),M=n(),E=o(""),P=ibiz.util.file.getUploadHeaders(),F=o({...P}),U=o(""),B=o(!0),O=o(!1),A=o(!1),T=o(!1),V=o(!1);let L=!1;const N=w.model;N.editorParams&&(N.editorParams.enableEdit&&(O.value=!0,A.value=!0,B.value=w.toBoolean(N.editorParams.enableEdit)&&!e.readonly&&!e.disabled),N.editorParams.enableedit&&(O.value=!0,A.value=!0,B.value=w.toBoolean(N.editorParams.enableedit)&&!e.readonly&&!e.disabled),N.editorParams.enableFullScreen&&(T.value=w.toBoolean(N.editorParams.enableFullScreen)),N.editorParams.enablefullscreen&&(T.value=w.toBoolean(N.editorParams.enablefullscreen)),N.editorParams.enablenoaccess&&(L="true"===(null==(h=null==w?void 0:w.editorParams)?void 0:h.enablenoaccess))),e.readonly&&(O.value=!1,A.value=!0);i(()=>e.data,e=>{if(e){const t={...w.editorParams,enableNoAccess:L};t.uploadparams&&(t.uploadParams=JSON.parse(t.uploadparams));const l=ibiz.util.file.calcFileUpDownUrl(w.context,w.params,e,t);U.value=l.uploadUrl}},{immediate:!0,deep:!0});const j=(e,t)=>{if(t)return!0},D=e=>e,R=["headerSelect","blockquote","|","bold","underline","italic",{key:"group-more-style",title:z("editor.more"),iconSvg:'<svg viewBox="0 0 1024 1024"><path d="M204.8 505.6m-76.8 0a76.8 76.8 0 1 0 153.6 0 76.8 76.8 0 1 0-153.6 0Z"></path><path d="M505.6 505.6m-76.8 0a76.8 76.8 0 1 0 153.6 0 76.8 76.8 0 1 0-153.6 0Z"></path><path d="M806.4 505.6m-76.8 0a76.8 76.8 0 1 0 153.6 0 76.8 76.8 0 1 0-153.6 0Z"></path></svg>',menuKeys:["through","code","sup","sub","clearStyle"]},"color","bgColor","|","fontSize","fontFamily","lineHeight","|","bulletedList","numberedList","todo",{key:"group-justify",title:z("editor.justify"),iconSvg:'<svg viewBox="0 0 1024 1024"><path d="M768 793.6v102.4H51.2v-102.4h716.8z m204.8-230.4v102.4H51.2v-102.4h921.6z m-204.8-230.4v102.4H51.2v-102.4h716.8zM972.8 102.4v102.4H51.2V102.4h921.6z"></path></svg>',menuKeys:["justifyLeft","justifyRight","justifyCenter","justifyJustify"]},{key:"group-indent",title:z("editor.indent"),iconSvg:'<svg viewBox="0 0 1024 1024"><path d="M0 64h1024v128H0z m384 192h640v128H384z m0 192h640v128H384z m0 192h640v128H384zM0 832h1024v128H0z m0-128V320l256 192z"></path></svg>',menuKeys:["indent","delIndent"]},"|","emotion","insertLink",{key:"group-image",title:z("editor.image"),iconSvg:'<svg viewBox="0 0 1024 1024"><path d="M959.877 128l0.123 0.123v767.775l-0.123 0.122H64.102l-0.122-0.122V128.123l0.122-0.123h895.775zM960 64H64C28.795 64 0 92.795 0 128v768c0 35.205 28.795 64 64 64h896c35.205 0 64-28.795 64-64V128c0-35.205-28.795-64-64-64zM832 288.01c0 53.023-42.988 96.01-96.01 96.01s-96.01-42.987-96.01-96.01S682.967 192 735.99 192 832 234.988 832 288.01zM896 832H128V704l224.01-384 256 320h64l224.01-192z"></path></svg>',menuKeys:["insertImage","uploadImage"]},{key:"group-video",title:z("editor.video"),iconSvg:'<svg viewBox="0 0 1024 1024"><path d="M981.184 160.096C837.568 139.456 678.848 128 512 128S186.432 139.456 42.816 160.096C15.296 267.808 0 386.848 0 512s15.264 244.16 42.816 351.904C186.464 884.544 345.152 896 512 896s325.568-11.456 469.184-32.096C1008.704 756.192 1024 637.152 1024 512s-15.264-244.16-42.816-351.904zM384 704V320l320 192-320 192z"></path></svg>',menuKeys:["insertVideo","uploadVideo"]},"insertTable","codeBlock","divider","|","undo","redo","|","fullScreen","emoji"];w.chatCompletion&&R.unshift("aichart","|");const K={excludeKeys:["group-video","emotion"],toolbarKeys:R},q={placeholder:w.placeHolder,readOnly:O.value?A.value:e.readonly,MENU_CONF:{uploadImage:{server:U.value,fieldName:"file",maxFileSize:10485760,maxNumberOfFiles:10,allowedFileTypes:[],headers:F.value,withCredentials:!0,onBeforeUpload:e=>e,onProgress(e){console.log("progress",e)},onSuccess(e,t){ibiz.config.common.enableDownloadTicket&&!L&&t.ticket&&ibiz.util.file.setDownloadTicket(t.id,t.ticket),console.log("".concat(e.name," 上传成功"),t)},onFailed(e,t){console.log("".concat(e.name," 上传失败"),t)},onError(e,t,l){console.log("".concat(e.name," 上传出错"),t,l)},async customInsert(t,l){const a=((e,t)=>{const l={...w.editorParams,enableNoAccess:L};return l.exportparams&&(l.exportParams=JSON.parse(l.exportparams)),t&&t.folder&&(l.osscat=t.folder),ibiz.util.file.calcFileUpDownUrl(w.context,w.params,e,l).downloadUrl})(e.data,t);let o=a.replace("%fileId%",t.id);const n=t.filename;if(ibiz.config.common.enableDownloadTicket&&!L){const i=await ibiz.util.file.getDownloadTicket(w.context,w.params,e.data,{fileId:t.id},w.downloadTicketParams);i&&i.ticket&&(o=a.replace("%fileId%",i.ticket),l(o,n,""))}else l(o,n,"")}},insertLink:{checkLink:j,parseLinkUrl:D},editLink:{checkLink:j,parseLinkUrl:D}},hoverbarKeys:C};let J;s(()=>{const e=M.value;null!=e&&e.destroy()});const Z=l=>{M.value=l,w.onCreated(M.value),l.setHtml(E.value),l.on("aiClick",()=>{(async()=>{const l=w.model.appDataEntityId;if(!l||!w.deACMode)return;const{zIndex:a}=b(),o=a.increment();J=await ibiz.aiChatUtil.getAIChat();const{containerOptions:n,chatOptions:i}=await ibiz.aiChatUtil.getEditorExAIChatParams(w.editorParams,w.context,w.params,e.data,w.deACMode,{chatInstance:J,view:w.view,ctrl:w.ctrl}),s=await ibiz.aiChatUtil.getAIResourceOptions(w.context,w.params);J.create({resourceOptions:s,containerOptions:{zIndex:o,...n},chatOptions:{caption:w.deACMode.logicName,context:{...w.context},params:{...w.params,srfactag:w.deACMode.codeName},appDataEntityId:l,...i,action:(e,l)=>{"backfill"===e&&(O.value?E.value=l.realcontent||"":t("change",l.realcontent))}}})})()}),l.on("lineAiClick",()=>{const e=l.getEditableContainer().querySelector(".w-e-hover-bar");if(!e)return;const{offsetLeft:t,offsetTop:a,offsetHeight:o}=e,n=ibiz.inLineAIUtil.calcContextMenus(w.deACMode,e=>{w.doInLineAIUIAction(e,w.model.appId)});if(0===n.length)return;const i=l.getEditableContainer().getBoundingClientRect(),{zIndex:s}=b(),r=s.increment();ibiz.inLineAIUtil.showContextMenus(i.x+t,i.y+a+o,n,{zIndex:r,onClose:()=>{s.decrement()}})})},$=l=>{const a=l.getHtml(),o="<p><br></p>"===a?"":a;o===e.value||""===o&&v(e.value)||!O.value&&l.isFocused()&&t("change",o)},_=e=>{},G=e=>{t("focus")},Q=e=>{t("blur")},W=(e,t)=>{alert("【".concat(ibiz.i18n.t("editor.html.wangEditor.customTips"),"】").concat(t," - ").concat(e))},X=(e,t,l)=>{l(!0)},Y=()=>{const e=M.value;null!=e&&e.disable()},ee=()=>{const e=M.value;null!=e&&e.enable()};r(()=>{i(()=>e.value,(t,l)=>{t===l||"string"!=typeof e.value&&null!=t||c(null==t?()=>{E.value=""}:()=>{E.value=t})},{immediate:!0}),i(()=>e.disabled,(e,t)=>{e!==t&&(!0===e?Y():ee())},{immediate:!0})});const te=()=>{A.value=!A.value,A.value?Y():(ee(),M.value.focus(),(()=>{var t,l;if(e.value){const a=e.value.indexOf("</p>");if(a>=0){const e=null==(t=M.value.selection.anchor)?void 0:t.offset,o=null==(l=M.value.selection.anchor)?void 0:l.path;0===e&&o.length>0&&0===o[0]&&M.value.move(a-3)}}})())},le=()=>{V.value=!V.value,c(()=>{A.value?Y():(ee(),M.value.focus())})};return r(()=>{g(0,()=>{if(x.value&&I.value){const e=x.value.offsetHeight;k=new ResizeObserver(t=>{const l=t[0].contentRect.height;if(l!==H){const a={height:"".concat(e-t[0].contentRect.height+(0!==l?300:0),"px"),"toolbar-height":"".concat(l,"px")};S.value=p.cssVarBlock(a),H=l}}),k.observe(I.value.selector)}})}),d(()=>{w.onDestroyed(),k&&k.disconnect(),J&&J.close()}),{ns:p,editorRef:M,mode:"default",valueHtml:E,toolbarConfig:K,editorConfig:q,handleCreated:Z,handleChange:$,handleDestroyed:_,handleFocus:G,handleBlur:Q,customAlert:W,customPaste:X,insertText:e=>{const t=M.value;null!=t&&t.insertText(e)},printHtml:()=>{const e=M.value;null!=e&&console.log(e.getHtml())},disable:Y,enable:ee,renderHeaserToolbar:()=>O.value||T.value?l("div",{class:p.b("custom-toolbar")},[O.value&&B.value&&A.value?l("i",{class:"fa fa-edit","aria-hidden":"true",title:ibiz.i18n.t("editor.html.enableedit"),onClick:()=>te()},null):null,T.value?V.value?l("i",{class:"fa fa-compress","aria-hidden":"true",title:ibiz.i18n.t("editor.html.reduce"),onClick:()=>le()},null):l("i",{class:"fa fa-expand","aria-hidden":"true",title:ibiz.i18n.t("editor.html.expand"),onClick:()=>le()},null):null]):null,renderEditorContent:()=>l("div",{class:[p.b("content"),p.is("editing",!A.value)],ref:"htmlContent",style:S.value},[a.editorSwitchMenu?l("div",{class:p.b("menu")},[a.editorSwitchMenu()]):null,l(u,{ref:"toolbarRef",editor:M.value,"default-config":K,mode:"default",class:p.b("toolbar")},null),l(m,{class:[p.b("editor"),p.is("readonly",A.value)],modelValue:E.value,"onUpdate:modelValue":e=>E.value=e,"default-config":q,mode:"default",onOnCreated:Z,onOnChange:$,onOnDestroyed:_,onOnFocus:G,onOnBlur:Q,oncustomAlert:W,oncustomPaste:X},null)]),renderFooter:()=>O.value?l("div",{class:[p.b("footer"),{[p.b("footer-dialog")]:V.value}]},[l("div",{class:p.be("footer","cancel"),onClick:()=>{e.value!==E.value?y({title:ibiz.i18n.t("editor.common.confirmCancel"),type:"warning",customClass:p.b("message"),message:l("div",{class:p.be("message","message-content")},[l("p",null,[ibiz.i18n.t("editor.common.confirmCancelPrompt")]),l("p",{class:p.bem("message","message-content","message-tip")},[ibiz.i18n.t("editor.common.cancelEditPrompt")])]),showCancelButton:!0,cancelButtonClass:p.be("message","message-cancel"),confirmButtonClass:p.be("message","message-comfire")}).then(()=>{E.value=e.value||"",te()}).catch(()=>{M.value.focus()}):te()}},[ibiz.i18n.t("app.cancel")]),l("div",{class:p.be("footer","save"),onClick:()=>(()=>{A.value=!0,M.value.disable();const e=E.value;t("change",e),V.value&&(V.value=!1)})()},[ibiz.i18n.t("app.save")])]):null,htmlContent:x,hasEnableEdit:O,cssVars:S,toolbarRef:I,isFullScreen:V,readonlyState:A,changeFullScreenState:le}},render(){const e=!!this.$slots.editorSwitchMenu;return this.isFullScreen?l(a("el-dialog"),{modelValue:this.isFullScreen,"onUpdate:modelValue":e=>this.isFullScreen=e,width:"80%",top:"10vh",class:[this.ns.b("dialog-full-screen"),this.ns.is("editing",!this.readonlyState)],onClose:()=>this.changeFullScreenState()},{default:()=>[l("div",{class:[this.ns.b(),{[this.ns.b("editor-readonly")]:this.readonlyState},this.ns.is("show-editor-switch-menu",e)]},[this.renderHeaserToolbar(),this.renderEditorContent(),this.hasEnableEdit&&!this.readonlyState?this.renderFooter():null])]}):l("div",{class:[this.ns.b(),{[this.ns.b("editor-readonly")]:this.readonlyState},this.ns.is("show-ai",!0),this.ns.is("enable-edit",!this.readonly&&!this.disabled),this.ns.is("show-editor-switch-menu",e)]},[this.renderHeaserToolbar(),this.renderEditorContent(),this.hasEnableEdit&&!this.readonlyState?this.renderFooter():null])}}))}}});
|