@ibiz-template/vue3-components 0.7.41-alpha.147 → 0.7.41-alpha.148
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/{index-BAfdAw1V.js → index-XJPaZevZ.js} +4 -4
- package/dist/{index.es-CSMb33DK.js → index.es-A4wdDqMS.js} +1 -1
- package/dist/index.min.css +1 -1
- package/dist/index.system.min.js +1 -1
- package/dist/{wang-editor-LyrHDNOt.js → wang-editor-OiXckyL8.js} +1 -1
- package/dist/{xlsx-util-DcIFyyjA.js → xlsx-util-3jxhkwUT.js} +1 -1
- package/es/common/no-data/no-data.css +1 -1
- package/es/common/no-data/no-data.mjs +1 -1
- package/lib/common/no-data/no-data.cjs +1 -1
- package/lib/common/no-data/no-data.css +1 -1
- package/package.json +1 -1
- package/src/common/no-data/no-data.scss +1 -1
- package/src/common/no-data/no-data.tsx +2 -1
package/dist/index.system.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["./index-
|
|
1
|
+
System.register(["./index-XJPaZevZ.js","@ibiz-template/model-helper","@ibiz-template/vue3-util","qs","@ibiz-template/core","vue","@ibiz-template/runtime","qx-util","element-plus","ramda","lodash-es","@floating-ui/dom","interactjs","dayjs","vuedraggable","@wangeditor/editor","@ibiz-template/devtool","@imengyu/vue3-context-menu","vue-router","async-validator","dayjs/plugin/quarterOfYear","axios","dayjs/plugin/customParseFormat","vue-i18n"],function(e){"use strict";return{setters:[function(i){e({AIChatUtil:i.cG,ActionBarPortlet:i.at,AppDataUploadViewEngine:i.bL,AppFuncBlockProvider:i.cU,AppRouter:i.cT,AppSwitchController:i.aO,AppSwitchState:i.b4,AppUtil:i.cB,ArrowLeftBold:i.cP,ArrowRightBold:i.cQ,AuthCaptchaController:i.aP,AuthCaptchaState:i.b5,AuthGuard:i.cR,AuthUserinfoController:i.aQ,BottomSideMenuController:i.aJ,CalendarExpViewEngine:i.bM,CalendarViewEngine:i.bN,ChartExpViewEngine:i.bO,ChartPortlet:i.al,ChartViewEngine:i.bP,ConfirmUtil:i.cu,ContainerPortlet:i.ae,CoopPosController:i.aR,CoopPosState:i.b6,CustomViewEngine:i.bQ,DEIndexViewEngine:i.bT,DRBarController:i.a9,DRTabController:i.ab,DataViewControlProvider:i.W,DataViewEngine:i.bH,DataViewExpViewEngine:i.bS,DoingNotice:i.D,EditView2Engine:i.bV,EditView3Engine:i.bW,EditView4Engine:i.bX,EditViewEngine:i.bU,ErrorView:i.bC,ExpViewEngine:i.bY,ExtendMenuBase:i.b3,ExtendMenuBaseController:i.aK,FilterPortlet:i.ax,FormPickupDataViewEngine:i.bZ,FullscreenUtil:i.cC,GanttViewEngine:i.b_,GlobalSearchController:i.aS,GlobalSearchState:i.b7,GridExpViewEngine:i.b$,GridViewEngine:i.bF,HtmlPortlet:i.ar,IBizActionBarPortlet:i.as,IBizActionToolbar:i.e,IBizAppMenuControl:i.m,IBizAppMenuIconViewControl:i.n,IBizAuthUserinfo:i.bj,IBizCalendarControl:i.ay,IBizCalendarExpBarControl:i.a3,IBizCaptionBarControl:i.U,IBizChartControl:i.a6,IBizChartExpBarControl:i.a4,IBizChartPortlet:i.ak,IBizCol:i.b,IBizCommonComponents:i.a,IBizContainerPortlet:i.ad,IBizContextMenuControl:i.aG,IBizDRBarControl:i.a8,IBizDRTabControl:i.aa,IBizDashboardControl:i.ac,IBizDataViewControl:i.V,IBizDataViewExpBarControl:i.a2,IBizDynamicGridFieldEditColumn:i.y,IBizEditFormControl:i.R,IBizEditor:i.bw,IBizFilterPortlet:i.aw,IBizFormButton:i.J,IBizFormButtonList:i.P,IBizFormControl:i.S,IBizFormDRUIPart:i.K,IBizFormGroupPanel:i.C,IBizFormIFrame:i.Q,IBizFormItem:i.E,IBizFormItemContainer:i.F,IBizFormMDCtrl:i.L,IBizFormPage:i.G,IBizFormPageItem:i.H,IBizFormRawItem:i.M,IBizFormTabPage:i.O,IBizFormTabPanel:i.N,IBizGanttControl:i.aF,IBizGridColumnHeader:i.z,IBizGridControl:i.o,IBizGridExpBarControl:i.a1,IBizGridFieldColumn:i.t,IBizGridFieldEditColumn:i.w,IBizGridGroupColumn:i.x,IBizGridUAColumn:i.v,IBizHtmlPortlet:i.aq,IBizIndexActions:i.bu,IBizKanbanControl:i.az,IBizListControl:i.A,IBizListExpBarControl:i.a0,IBizListPortlet:i.ao,IBizMEditViewPanelControl:i.aC,IBizMapControl:i.aD,IBizMenuPortlet:i.ai,IBizNavPosIndex:i.bm,IBizPanelAppTitle:i.bo,IBizPanelButton:i.bn,IBizPanelComponents:i.aI,IBizPanelIndexViewSearch:i.bt,IBizPanelTabPanel:i.bq,IBizPickupViewPanelControl:i.Y,IBizRawItem:i.f,IBizRawItemPortlet:i.am,IBizReportPanelControl:i.aE,IBizReportPortlet:i.au,IBizRow:i.d,IBizSearchBarControl:i.a5,IBizSearchFormControl:i.B,IBizSortBar:i.l,IBizSplit:i.j,IBizSplitContainer:i.bs,IBizSplitTrigger:i.k,IBizSubAppRefView:i.bB,IBizTabExpPanelControl:i.Z,IBizToolbarControl:i.T,IBizTreeControl:i.X,IBizTreeExpBarControl:i.$,IBizTreeGridControl:i.aB,IBizTreeGridExControl:i.aA,IBizUserAction:i.bv,IBizViewEngine:i.bE,IBizViewPanelControl:i.aH,IBizViewPortlet:i.ag,IBizVue3:i.I,IBizWFStepTraceView:i.bA,IBizWizardPanelControl:i.a7,InLineAIUtil:i.cF,IndexBlankPlaceholderController:i.aT,IndexBlankPlaceholderState:i.b8,IndexViewEngine:i.bG,KanbanViewEngine:i.c0,LeftSideMenuController:i.aL,ListExpViewEngine:i.c1,ListPortlet:i.ap,ListViewEngine:i.c2,LoadingUtil:i.cr,LoginView:i.bz,LoginViewEngine:i.c3,MDCustomViewEngine:i.bR,MEditView9Engine:i.c5,MPickupView2Engine:i.c7,MPickupViewEngine:i.c6,MapViewEngine:i.c4,MenuPortlet:i.aj,MessageUtil:i.cs,ModalUtil:i.ct,NavBreadcrumbController:i.aU,NavBreadcrumbState:i.b9,NavPosIndexController:i.bl,NavPosIndexState:i.bk,NavTabsController:i.aV,NavTabsState:i.ba,NoticeUtil:i.cz,NotificationUtil:i.cv,OpenViewUtil:i.cw,OptViewEngine:i.bI,OverlayController:i.cx,PanelAppLoginViewController:i.aW,PanelAppLoginViewState:i.bb,PanelAppTitleController:i.bp,PanelAppTitleState:i.bc,PanelButtonController:i.aX,PanelButtonListController:i.aY,PanelButtonListState:i.bd,PanelButtonState:i.be,PanelContainerGroupController:i.aZ,PanelContainerGroupState:i.bf,PanelIndexViewSearchController:i.a_,PanelRememberMeController:i.a$,PanelRememberMeState:i.bg,PanelTabPanelController:i.b0,PanelTabPanelState:i.bh,PanelViewEngine:i.c8,PickupDataViewEngine:i.c9,PickupGridViewEngine:i.ca,PickupTreeViewEngine:i.cb,PickupView2Engine:i.cd,PickupViewEngine:i.cc,PortalViewEngine:i.ce,PortletLayout:i.af,PrintPreviewUtil:i.cK,QrcodeUtil:i.cM,RawItemPortlet:i.an,RenderUtil:i.cA,ReportPortlet:i.av,ReportViewEngine:i.cf,RightSideMenuController:i.aM,ScreenShotUtil:i.cH,SearchFormButtonsController:i.b1,SplitContainerController:i.br,SplitContainerState:i.bi,SubAppRefViewEngine:i.cg,TabExpViewEngine:i.bJ,TabSearchViewEngine:i.ch,TopSideMenuController:i.aN,TreeExpViewEngine:i.bK,TreeGridExViewEngine:i.ci,TreeGridViewEngine:i.cj,TreeViewEngine:i.ck,UnauthorizedView:i.bD,View403:i.by,View404:i.bx,ViewMsgPosController:i.b2,ViewPortlet:i.ah,WFDynaActionViewEngine:i.cl,WFDynaEditView3Engine:i.cn,WFDynaEditViewEngine:i.cm,WFDynaStartViewEngine:i.co,WFStepDataViewEngine:i.cp,WizardViewEngine:i.cq,convertBtnType:i.cE,getRelativePathWithoutRoot:i.cN,i18n:i.i,parseHtml:i.cO,runApp:i.cS,splitPathToSegments:i.cI,useAppGridBase:i.q,useAppGridPagination:i.p,useContextMenu:i.cL,useFocusByEnter:i.cD,useGridDraggable:i.s,useGridHeaderStyle:i.r,useITableEvent:i.u,usePagination:i.cy,validateRouteSegments:i.cJ})},null,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","@wangeditor/editor","ramda","@ibiz-template/vue3-util","@ibiz-template/core","element-plus","./index-BAfdAw1V.js","@ibiz-template/runtime","qx-util","lodash-es","@floating-ui/dom","interactjs","dayjs","qs","vuedraggable","@ibiz-template/devtool","@imengyu/vue3-context-menu","vue-router","async-validator","dayjs/plugin/quarterOfYear","axios","dayjs/plugin/customParseFormat","vue-i18n","@ibiz-template/model-helper"],function(e){"use strict";var t,o,l,a,i,n,s,r,c,d,u,m,h,v,b,f,p,g,y,C,w,z,x,S,k;return{setters:[function(e){t=e.defineComponent,o=e.withDirectives,l=e.createVNode,a=e.resolveDirective,i=e.resolveComponent,n=e.ref,s=e.shallowRef,r=e.watch,c=e.onBeforeUnmount,d=e.onMounted,u=e.nextTick,m=e.onUnmounted},function(e){h=e.Toolbar,v=e.Editor},function(e){b=e.t,f=e.i18nChangeLanguage},function(e){p=e.isNil},function(e){g=e.getHtmlEmits,y=e.getHtmlProps,C=e.useNamespace,w=e.useSemanticNode,z=e.useUIStore},function(e){x=e.awaitTimeout},function(e){S=e.ElMessageBox},function(e){k=e.h},null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null],execute:function(){e("default",t({name:"IBizHtml",props:y(),emits:g(),setup(e,{emit:t,slots:o}){var a;const i=C("html"),g=e.controller,{semanticClass:y,semanticStyle:I}=w(g),P=[{class:y("editor.customToolbar"),selector:".".concat(i.b("custom-toolbar"))},{class:y("editor.customToolbar.item"),selector:".".concat(i.be("custom-toolbar","item"))},{class:y("editor.hoverToolbar"),selector:".w-e-hover-bar"},{class:y("editor.hoverToolbar.item"),selector:".w-e-hover-bar .w-e-bar-item"},{class:y("editor.toolbar"),selector:".w-e-toolbar"},{class:y("editor.toolbar.item"),selector:".w-e-toolbar .w-e-bar-item"},{class:y("editor.input"),selector:".".concat(i.b("editor"))},{class:y("editor.footer"),selector:".".concat(i.b("footer"))},{class:y("editor.footer.cancel"),selector:".".concat(i.be("footer","cancel"))},{class:y("editor.footer.save"),selector:".".concat(i.be("footer","save"))}],H=[{style:I("editor.customToolbar"),selector:".".concat(i.b("custom-toolbar"))},{style:I("editor.customToolbar.item"),selector:".".concat(i.be("custom-toolbar","item"))},{style:I("editor.hoverToolbar"),selector:".w-e-hover-bar"},{style:I("editor.hoverToolbar.item"),selector:".w-e-hover-bar .w-e-bar-item"},{style:I("editor.toolbar"),selector:".w-e-toolbar"},{style:I("editor.toolbar.item"),selector:".w-e-toolbar .w-e-bar-item"},{style:I("editor.input"),selector:".".concat(i.b("editor"))},{style:I("editor.footer"),selector:".".concat(i.b("footer"))},{style:I("editor.footer.cancel"),selector:".".concat(i.be("footer","cancel"))},{style:I("editor.footer.save"),selector:".".concat(i.be("footer","save"))}],M=n(),T=n({});let E=null,U=0;const F=n(),A=s(),B=n(""),O=ibiz.util.file.getUploadHeaders(),D=n({...O}),L=n(""),V=n(!0),N=n(!1),j=n(!1),R=n(!1),K=n(!1);let q=!1;const J=g.model;J.editorParams&&(J.editorParams.enableEdit&&(N.value=!0,j.value=!0,V.value=g.toBoolean(J.editorParams.enableEdit)&&!e.readonly&&!e.disabled),J.editorParams.enableedit&&(N.value=!0,j.value=!0,V.value=g.toBoolean(J.editorParams.enableedit)&&!e.readonly&&!e.disabled),J.editorParams.enableFullScreen&&(R.value=g.toBoolean(J.editorParams.enableFullScreen)),J.editorParams.enablefullscreen&&(R.value=g.toBoolean(J.editorParams.enablefullscreen)),J.editorParams.enablenoaccess&&(q="true"===(null==(a=null==g?void 0:g.editorParams)?void 0:a.enablenoaccess))),e.readonly&&(N.value=!1,j.value=!0);r(()=>e.data,e=>{if(e){const t={...g.editorParams,enableNoAccess:q};t.uploadparams&&(t.uploadParams=JSON.parse(t.uploadparams));const o=ibiz.util.file.calcFileUpDownUrl(g.context,g.params,e,t);L.value=o.uploadUrl}},{immediate:!0,deep:!0});const Z=(e,t)=>{if(t)return!0},Y=e=>e,$=["headerSelect","blockquote","|","bold","underline","italic",{key:"group-more-style",title:b("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:b("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:b("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:b("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:b("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"];if(g.chatCompletion&&$.unshift("aichart","|"),g.extraActions.length>0){const e=g.extraActions.map(e=>e.uiactionId.split("@")[0]);$.push(...e)}const _={excludeKeys:["group-video","emotion"],toolbarKeys:$},G=ibiz.i18n.getLang();f(G);const Q={placeholder:g.placeHolder,readOnly:N.value?j.value:e.readonly,MENU_CONF:{uploadImage:{server:L.value,fieldName:"file",maxFileSize:10485760,maxNumberOfFiles:10,allowedFileTypes:[],headers:D.value,withCredentials:!0,onBeforeUpload:e=>e,onProgress(e){console.log("progress",e)},onSuccess(e,t){ibiz.config.common.enableDownloadTicket&&!q&&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,o){console.log("".concat(e.name," 上传出错"),t,o)},async customInsert(t,o){const l=((e,t)=>{const o={...g.editorParams,enableNoAccess:q};return o.exportparams&&(o.exportParams=JSON.parse(o.exportparams)),t&&t.folder&&(o.osscat=t.folder),o.globaldownloadprifix?o.globalDownloadPrifix="true"===o.globaldownloadprifix:o.globalDownloadPrifix=ibiz.config.common.globalDownloadPrifix,ibiz.util.file.calcFileUpDownUrl(g.context,g.params,e,o).downloadUrl})(e.data,t);let a=l.replace("%fileId%",t.id);const i=t.filename;if(ibiz.config.common.enableDownloadTicket&&!q){const n=await ibiz.util.file.getDownloadTicket(g.context,g.params,e.data,{fileId:t.id},g.downloadTicketParams);n&&n.ticket&&(a=l.replace("%fileId%",n.ticket),o(a,i,""))}else o(a,i,"")}},insertLink:{checkLink:Z,parseLinkUrl:Y},editLink:{checkLink:Z,parseLinkUrl:Y}},hoverbarKeys:k};let W;c(()=>{const e=A.value;null!=e&&e.destroy()});const X=o=>{A.value=o,g.onCreated(A.value),o.setHtml(B.value),o.on("aiClick",()=>{(async()=>{const o=g.model.appDataEntityId;if(!o||!g.deACMode)return;const{zIndex:l}=z(),a=l.increment();W=await ibiz.aiChatUtil.getAIChat();const{containerOptions:i,chatOptions:n}=await ibiz.aiChatUtil.getEditorExAIChatParams(g.editorParams,g.context,g.params,e.data,g.deACMode,{chatInstance:W,view:g.view,ctrl:g.ctrl}),s=await ibiz.aiChatUtil.getAIResourceOptions(g.context,g.params);let r=g.deACMode.logicName;g.editorParams.srfaichatcaption&&(r=ibiz.appUtil.resolveI18nText(g.editorParams.srfaichatcaption)),W.create({resourceOptions:s,containerOptions:{zIndex:a,...i},chatOptions:{caption:r,context:{...g.context},params:{...g.params,srfactag:g.deACMode.codeName},appDataEntityId:o,...n,action:(e,o)=>{"backfill"===e&&(N.value?B.value=o.realcontent||"":t("change",o.realcontent))}}})})()}),o.on("lineAiClick",()=>{const e=o.getEditableContainer().querySelector(".w-e-hover-bar");if(!e)return;const{offsetLeft:t,offsetTop:l,offsetHeight:a}=e,i=ibiz.inLineAIUtil.calcContextMenus(g.deACMode,e=>{g.doInLineAIUIAction(e,g.model.appId)});if(0===i.length)return;const n=o.getEditableContainer().getBoundingClientRect(),{zIndex:s}=z(),r=s.increment();ibiz.inLineAIUtil.showContextMenus(n.x+t,n.y+l+a,i,{zIndex:r,onClose:()=>{s.decrement()}})}),o.on("customAction",async e=>{const o=await g.doCustomUIAction(e.uiactionId,g.model.appId);o.length>0&&t("customAction",{tag:e.uiactionId,data:o})})},ee=o=>{const l=o.getHtml(),a="<p><br></p>"===l?"":l;a===e.value||""===a&&p(e.value)||!N.value&&o.isFocused()&&t("change",a)},te=e=>{},oe=e=>{t("focus")},le=e=>{t("blur")},ae=(e,t)=>{alert("【".concat(ibiz.i18n.t("editor.html.wangEditor.customTips"),"】").concat(t," - ").concat(e))},ie=(e,t,o)=>{o(!0)},ne=()=>{const e=A.value;null!=e&&e.disable()},se=()=>{const e=A.value;null!=e&&e.enable()};d(()=>{r(()=>e.value,(t,o)=>{t===o||"string"!=typeof e.value&&null!=t||u(null==t?()=>{B.value=""}:()=>{B.value=t})},{immediate:!0}),r(()=>e.disabled,(e,t)=>{e!==t&&(!0===e?ne():se())},{immediate:!0})});const re=()=>{j.value=!j.value,j.value?ne():(se(),A.value.focus(),(()=>{var t,o;if(e.value){const l=e.value.indexOf("</p>");if(l>=0){const e=null==(t=A.value.selection.anchor)?void 0:t.offset,a=null==(o=A.value.selection.anchor)?void 0:o.path;0===e&&a.length>0&&0===a[0]&&A.value.move(l-3)}}})())},ce=()=>{K.value=!K.value,u(()=>{j.value?ne():(se(),A.value.focus())})};return d(()=>{x(0,()=>{if(M.value&&F.value){const e=M.value.offsetHeight;E=new ResizeObserver(t=>{const o=t[0].contentRect.height;if(o!==U){const l={height:"".concat(e-t[0].contentRect.height+(0!==o?300:0),"px"),"toolbar-height":"".concat(o,"px")};T.value=i.cssVarBlock(l),U=o}}),E.observe(F.value.selector)}})}),m(()=>{g.onDestroyed(),E&&E.disconnect(),W&&W.close()}),{ns:i,cssVars:T,valueHtml:B,editorRef:A,childClass:P,childStyle:H,toolbarRef:F,htmlContent:M,editorConfig:Q,isFullScreen:K,hasEnableEdit:N,toolbarConfig:_,readonlyState:j,semanticClass:y,semanticStyle:I,mode:"default",enable:se,disable:ne,printHtml:()=>{const e=A.value;null!=e&&console.log(e.getHtml())},insertText:e=>{const t=A.value;null!=t&&t.insertText(e)},handleBlur:le,handleFocus:oe,customAlert:ae,customPaste:ie,handleChange:ee,renderFooter:()=>N.value?l("div",{class:[i.b("footer"),{[i.b("footer-dialog")]:K.value}]},[l("div",{class:i.be("footer","cancel"),onClick:()=>{e.value!==B.value?S({title:ibiz.i18n.t("editor.common.confirmCancel"),type:"warning",customClass:i.b("message"),message:l("div",{class:i.be("message","message-content")},[l("p",null,[ibiz.i18n.t("editor.common.confirmCancelPrompt")]),l("p",{class:i.bem("message","message-content","message-tip")},[ibiz.i18n.t("editor.common.cancelEditPrompt")])]),showCancelButton:!0,cancelButtonClass:i.be("message","message-cancel"),confirmButtonClass:i.be("message","message-comfire")}).then(()=>{B.value=e.value||"",re()}).catch(()=>{A.value.focus()}):re()}},[ibiz.i18n.t("app.cancel")]),l("div",{class:i.be("footer","save"),onClick:()=>(()=>{j.value=!0,A.value.disable();const e=B.value;t("change",e),K.value&&(K.value=!1)})()},[ibiz.i18n.t("app.save")])]):null,handleCreated:X,handleDestroyed:te,renderHeaserToolbar:()=>N.value||R.value?l("div",{class:i.b("custom-toolbar")},[N.value&&V.value&&j.value?l("i",{"aria-hidden":"true",class:["fa fa-edit",i.be("custom-toolbar","item")],title:ibiz.i18n.t("editor.html.enableedit"),onClick:()=>re()},null):null,R.value?K.value?l("i",{class:["fa fa-compress",i.be("custom-toolbar","item")],"aria-hidden":"true",title:ibiz.i18n.t("editor.html.reduce"),onClick:()=>ce()},null):l("i",{class:["fa fa-expand",i.be("custom-toolbar","item")],"aria-hidden":"true",title:ibiz.i18n.t("editor.html.expand"),onClick:()=>ce()},null):null]):null,renderEditorContent:()=>l("div",{ref:"htmlContent",class:[i.b("content"),i.is("editing",!j.value),y("editor.content")],style:{...T.value,...I("editor.content")}},[o.editorSwitchMenu?l("div",{class:i.b("menu")},[o.editorSwitchMenu()]):null,l(h,{ref:"toolbarRef",editor:A.value,"default-config":_,mode:"default",class:i.b("toolbar")},null),l(v,{class:[i.b("editor"),i.is("readonly",j.value)],modelValue:B.value,"onUpdate:modelValue":e=>B.value=e,"default-config":Q,mode:"default",onOnCreated:X,onOnChange:ee,onOnDestroyed:te,onOnFocus:oe,onOnBlur:le,oncustomAlert:ae,oncustomPaste:ie},null)]),changeFullScreenState:ce}},render(){const e=!!this.$slots.editorSwitchMenu;return this.isFullScreen?l(i("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:()=>[o(l("div",{class:[this.ns.b(),this.semanticClass("editor.root"),{[this.ns.b("editor-readonly")]:this.readonlyState},this.ns.is("show-editor-switch-menu",e)],style:this.semanticStyle("editor.root")},[this.renderHeaserToolbar(),this.renderEditorContent(),this.hasEnableEdit&&!this.readonlyState?this.renderFooter():null]),[[a("child-class"),this.childClass],[a("child-style"),this.childStyle]])]}):o(l("div",{class:[this.ns.b(),this.semanticClass("editor.root"),{[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)],style:this.semanticStyle("editor.root")},[this.renderHeaserToolbar(),this.renderEditorContent(),this.hasEnableEdit&&!this.readonlyState?this.renderFooter():null]),[[a("child-class"),this.childClass],[a("child-style"),this.childStyle]])}}))}}});
|
|
1
|
+
System.register(["vue","@wangeditor/editor-for-vue","@wangeditor/editor","ramda","@ibiz-template/vue3-util","@ibiz-template/core","element-plus","./index-XJPaZevZ.js","@ibiz-template/runtime","qx-util","lodash-es","@floating-ui/dom","interactjs","dayjs","qs","vuedraggable","@ibiz-template/devtool","@imengyu/vue3-context-menu","vue-router","async-validator","dayjs/plugin/quarterOfYear","axios","dayjs/plugin/customParseFormat","vue-i18n","@ibiz-template/model-helper"],function(e){"use strict";var t,o,l,a,i,n,s,r,c,d,u,m,h,v,b,f,p,g,y,C,w,z,x,S,k;return{setters:[function(e){t=e.defineComponent,o=e.withDirectives,l=e.createVNode,a=e.resolveDirective,i=e.resolveComponent,n=e.ref,s=e.shallowRef,r=e.watch,c=e.onBeforeUnmount,d=e.onMounted,u=e.nextTick,m=e.onUnmounted},function(e){h=e.Toolbar,v=e.Editor},function(e){b=e.t,f=e.i18nChangeLanguage},function(e){p=e.isNil},function(e){g=e.getHtmlEmits,y=e.getHtmlProps,C=e.useNamespace,w=e.useSemanticNode,z=e.useUIStore},function(e){x=e.awaitTimeout},function(e){S=e.ElMessageBox},function(e){k=e.h},null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null],execute:function(){e("default",t({name:"IBizHtml",props:y(),emits:g(),setup(e,{emit:t,slots:o}){var a;const i=C("html"),g=e.controller,{semanticClass:y,semanticStyle:I}=w(g),P=[{class:y("editor.customToolbar"),selector:".".concat(i.b("custom-toolbar"))},{class:y("editor.customToolbar.item"),selector:".".concat(i.be("custom-toolbar","item"))},{class:y("editor.hoverToolbar"),selector:".w-e-hover-bar"},{class:y("editor.hoverToolbar.item"),selector:".w-e-hover-bar .w-e-bar-item"},{class:y("editor.toolbar"),selector:".w-e-toolbar"},{class:y("editor.toolbar.item"),selector:".w-e-toolbar .w-e-bar-item"},{class:y("editor.input"),selector:".".concat(i.b("editor"))},{class:y("editor.footer"),selector:".".concat(i.b("footer"))},{class:y("editor.footer.cancel"),selector:".".concat(i.be("footer","cancel"))},{class:y("editor.footer.save"),selector:".".concat(i.be("footer","save"))}],H=[{style:I("editor.customToolbar"),selector:".".concat(i.b("custom-toolbar"))},{style:I("editor.customToolbar.item"),selector:".".concat(i.be("custom-toolbar","item"))},{style:I("editor.hoverToolbar"),selector:".w-e-hover-bar"},{style:I("editor.hoverToolbar.item"),selector:".w-e-hover-bar .w-e-bar-item"},{style:I("editor.toolbar"),selector:".w-e-toolbar"},{style:I("editor.toolbar.item"),selector:".w-e-toolbar .w-e-bar-item"},{style:I("editor.input"),selector:".".concat(i.b("editor"))},{style:I("editor.footer"),selector:".".concat(i.b("footer"))},{style:I("editor.footer.cancel"),selector:".".concat(i.be("footer","cancel"))},{style:I("editor.footer.save"),selector:".".concat(i.be("footer","save"))}],M=n(),T=n({});let E=null,U=0;const F=n(),A=s(),B=n(""),O=ibiz.util.file.getUploadHeaders(),D=n({...O}),L=n(""),V=n(!0),N=n(!1),j=n(!1),R=n(!1),K=n(!1);let q=!1;const J=g.model;J.editorParams&&(J.editorParams.enableEdit&&(N.value=!0,j.value=!0,V.value=g.toBoolean(J.editorParams.enableEdit)&&!e.readonly&&!e.disabled),J.editorParams.enableedit&&(N.value=!0,j.value=!0,V.value=g.toBoolean(J.editorParams.enableedit)&&!e.readonly&&!e.disabled),J.editorParams.enableFullScreen&&(R.value=g.toBoolean(J.editorParams.enableFullScreen)),J.editorParams.enablefullscreen&&(R.value=g.toBoolean(J.editorParams.enablefullscreen)),J.editorParams.enablenoaccess&&(q="true"===(null==(a=null==g?void 0:g.editorParams)?void 0:a.enablenoaccess))),e.readonly&&(N.value=!1,j.value=!0);r(()=>e.data,e=>{if(e){const t={...g.editorParams,enableNoAccess:q};t.uploadparams&&(t.uploadParams=JSON.parse(t.uploadparams));const o=ibiz.util.file.calcFileUpDownUrl(g.context,g.params,e,t);L.value=o.uploadUrl}},{immediate:!0,deep:!0});const Z=(e,t)=>{if(t)return!0},Y=e=>e,$=["headerSelect","blockquote","|","bold","underline","italic",{key:"group-more-style",title:b("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:b("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:b("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:b("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:b("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"];if(g.chatCompletion&&$.unshift("aichart","|"),g.extraActions.length>0){const e=g.extraActions.map(e=>e.uiactionId.split("@")[0]);$.push(...e)}const _={excludeKeys:["group-video","emotion"],toolbarKeys:$},G=ibiz.i18n.getLang();f(G);const Q={placeholder:g.placeHolder,readOnly:N.value?j.value:e.readonly,MENU_CONF:{uploadImage:{server:L.value,fieldName:"file",maxFileSize:10485760,maxNumberOfFiles:10,allowedFileTypes:[],headers:D.value,withCredentials:!0,onBeforeUpload:e=>e,onProgress(e){console.log("progress",e)},onSuccess(e,t){ibiz.config.common.enableDownloadTicket&&!q&&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,o){console.log("".concat(e.name," 上传出错"),t,o)},async customInsert(t,o){const l=((e,t)=>{const o={...g.editorParams,enableNoAccess:q};return o.exportparams&&(o.exportParams=JSON.parse(o.exportparams)),t&&t.folder&&(o.osscat=t.folder),o.globaldownloadprifix?o.globalDownloadPrifix="true"===o.globaldownloadprifix:o.globalDownloadPrifix=ibiz.config.common.globalDownloadPrifix,ibiz.util.file.calcFileUpDownUrl(g.context,g.params,e,o).downloadUrl})(e.data,t);let a=l.replace("%fileId%",t.id);const i=t.filename;if(ibiz.config.common.enableDownloadTicket&&!q){const n=await ibiz.util.file.getDownloadTicket(g.context,g.params,e.data,{fileId:t.id},g.downloadTicketParams);n&&n.ticket&&(a=l.replace("%fileId%",n.ticket),o(a,i,""))}else o(a,i,"")}},insertLink:{checkLink:Z,parseLinkUrl:Y},editLink:{checkLink:Z,parseLinkUrl:Y}},hoverbarKeys:k};let W;c(()=>{const e=A.value;null!=e&&e.destroy()});const X=o=>{A.value=o,g.onCreated(A.value),o.setHtml(B.value),o.on("aiClick",()=>{(async()=>{const o=g.model.appDataEntityId;if(!o||!g.deACMode)return;const{zIndex:l}=z(),a=l.increment();W=await ibiz.aiChatUtil.getAIChat();const{containerOptions:i,chatOptions:n}=await ibiz.aiChatUtil.getEditorExAIChatParams(g.editorParams,g.context,g.params,e.data,g.deACMode,{chatInstance:W,view:g.view,ctrl:g.ctrl}),s=await ibiz.aiChatUtil.getAIResourceOptions(g.context,g.params);let r=g.deACMode.logicName;g.editorParams.srfaichatcaption&&(r=ibiz.appUtil.resolveI18nText(g.editorParams.srfaichatcaption)),W.create({resourceOptions:s,containerOptions:{zIndex:a,...i},chatOptions:{caption:r,context:{...g.context},params:{...g.params,srfactag:g.deACMode.codeName},appDataEntityId:o,...n,action:(e,o)=>{"backfill"===e&&(N.value?B.value=o.realcontent||"":t("change",o.realcontent))}}})})()}),o.on("lineAiClick",()=>{const e=o.getEditableContainer().querySelector(".w-e-hover-bar");if(!e)return;const{offsetLeft:t,offsetTop:l,offsetHeight:a}=e,i=ibiz.inLineAIUtil.calcContextMenus(g.deACMode,e=>{g.doInLineAIUIAction(e,g.model.appId)});if(0===i.length)return;const n=o.getEditableContainer().getBoundingClientRect(),{zIndex:s}=z(),r=s.increment();ibiz.inLineAIUtil.showContextMenus(n.x+t,n.y+l+a,i,{zIndex:r,onClose:()=>{s.decrement()}})}),o.on("customAction",async e=>{const o=await g.doCustomUIAction(e.uiactionId,g.model.appId);o.length>0&&t("customAction",{tag:e.uiactionId,data:o})})},ee=o=>{const l=o.getHtml(),a="<p><br></p>"===l?"":l;a===e.value||""===a&&p(e.value)||!N.value&&o.isFocused()&&t("change",a)},te=e=>{},oe=e=>{t("focus")},le=e=>{t("blur")},ae=(e,t)=>{alert("【".concat(ibiz.i18n.t("editor.html.wangEditor.customTips"),"】").concat(t," - ").concat(e))},ie=(e,t,o)=>{o(!0)},ne=()=>{const e=A.value;null!=e&&e.disable()},se=()=>{const e=A.value;null!=e&&e.enable()};d(()=>{r(()=>e.value,(t,o)=>{t===o||"string"!=typeof e.value&&null!=t||u(null==t?()=>{B.value=""}:()=>{B.value=t})},{immediate:!0}),r(()=>e.disabled,(e,t)=>{e!==t&&(!0===e?ne():se())},{immediate:!0})});const re=()=>{j.value=!j.value,j.value?ne():(se(),A.value.focus(),(()=>{var t,o;if(e.value){const l=e.value.indexOf("</p>");if(l>=0){const e=null==(t=A.value.selection.anchor)?void 0:t.offset,a=null==(o=A.value.selection.anchor)?void 0:o.path;0===e&&a.length>0&&0===a[0]&&A.value.move(l-3)}}})())},ce=()=>{K.value=!K.value,u(()=>{j.value?ne():(se(),A.value.focus())})};return d(()=>{x(0,()=>{if(M.value&&F.value){const e=M.value.offsetHeight;E=new ResizeObserver(t=>{const o=t[0].contentRect.height;if(o!==U){const l={height:"".concat(e-t[0].contentRect.height+(0!==o?300:0),"px"),"toolbar-height":"".concat(o,"px")};T.value=i.cssVarBlock(l),U=o}}),E.observe(F.value.selector)}})}),m(()=>{g.onDestroyed(),E&&E.disconnect(),W&&W.close()}),{ns:i,cssVars:T,valueHtml:B,editorRef:A,childClass:P,childStyle:H,toolbarRef:F,htmlContent:M,editorConfig:Q,isFullScreen:K,hasEnableEdit:N,toolbarConfig:_,readonlyState:j,semanticClass:y,semanticStyle:I,mode:"default",enable:se,disable:ne,printHtml:()=>{const e=A.value;null!=e&&console.log(e.getHtml())},insertText:e=>{const t=A.value;null!=t&&t.insertText(e)},handleBlur:le,handleFocus:oe,customAlert:ae,customPaste:ie,handleChange:ee,renderFooter:()=>N.value?l("div",{class:[i.b("footer"),{[i.b("footer-dialog")]:K.value}]},[l("div",{class:i.be("footer","cancel"),onClick:()=>{e.value!==B.value?S({title:ibiz.i18n.t("editor.common.confirmCancel"),type:"warning",customClass:i.b("message"),message:l("div",{class:i.be("message","message-content")},[l("p",null,[ibiz.i18n.t("editor.common.confirmCancelPrompt")]),l("p",{class:i.bem("message","message-content","message-tip")},[ibiz.i18n.t("editor.common.cancelEditPrompt")])]),showCancelButton:!0,cancelButtonClass:i.be("message","message-cancel"),confirmButtonClass:i.be("message","message-comfire")}).then(()=>{B.value=e.value||"",re()}).catch(()=>{A.value.focus()}):re()}},[ibiz.i18n.t("app.cancel")]),l("div",{class:i.be("footer","save"),onClick:()=>(()=>{j.value=!0,A.value.disable();const e=B.value;t("change",e),K.value&&(K.value=!1)})()},[ibiz.i18n.t("app.save")])]):null,handleCreated:X,handleDestroyed:te,renderHeaserToolbar:()=>N.value||R.value?l("div",{class:i.b("custom-toolbar")},[N.value&&V.value&&j.value?l("i",{"aria-hidden":"true",class:["fa fa-edit",i.be("custom-toolbar","item")],title:ibiz.i18n.t("editor.html.enableedit"),onClick:()=>re()},null):null,R.value?K.value?l("i",{class:["fa fa-compress",i.be("custom-toolbar","item")],"aria-hidden":"true",title:ibiz.i18n.t("editor.html.reduce"),onClick:()=>ce()},null):l("i",{class:["fa fa-expand",i.be("custom-toolbar","item")],"aria-hidden":"true",title:ibiz.i18n.t("editor.html.expand"),onClick:()=>ce()},null):null]):null,renderEditorContent:()=>l("div",{ref:"htmlContent",class:[i.b("content"),i.is("editing",!j.value),y("editor.content")],style:{...T.value,...I("editor.content")}},[o.editorSwitchMenu?l("div",{class:i.b("menu")},[o.editorSwitchMenu()]):null,l(h,{ref:"toolbarRef",editor:A.value,"default-config":_,mode:"default",class:i.b("toolbar")},null),l(v,{class:[i.b("editor"),i.is("readonly",j.value)],modelValue:B.value,"onUpdate:modelValue":e=>B.value=e,"default-config":Q,mode:"default",onOnCreated:X,onOnChange:ee,onOnDestroyed:te,onOnFocus:oe,onOnBlur:le,oncustomAlert:ae,oncustomPaste:ie},null)]),changeFullScreenState:ce}},render(){const e=!!this.$slots.editorSwitchMenu;return this.isFullScreen?l(i("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:()=>[o(l("div",{class:[this.ns.b(),this.semanticClass("editor.root"),{[this.ns.b("editor-readonly")]:this.readonlyState},this.ns.is("show-editor-switch-menu",e)],style:this.semanticStyle("editor.root")},[this.renderHeaserToolbar(),this.renderEditorContent(),this.hasEnableEdit&&!this.readonlyState?this.renderFooter():null]),[[a("child-class"),this.childClass],[a("child-style"),this.childStyle]])]}):o(l("div",{class:[this.ns.b(),this.semanticClass("editor.root"),{[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)],style:this.semanticStyle("editor.root")},[this.renderHeaserToolbar(),this.renderEditorContent(),this.hasEnableEdit&&!this.readonlyState?this.renderFooter():null]),[[a("child-class"),this.childClass],[a("child-style"),this.childStyle]])}}))}}});
|