@ibiz-template/vue3-components 0.7.41-alpha.95 → 0.7.41-alpha.97
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-CQRvKzXG.js +1 -0
- package/dist/index-CTxNNWbw.js +1 -0
- package/dist/index-DAM-lgrU.js +1 -0
- package/dist/index-YyzbGEva.js +339 -0
- package/dist/{index.es-Cvhhf-Jp.js → index.es-Bx7ry_G4.js} +1 -1
- package/dist/index.min.css +1 -1
- package/dist/index.system.min.js +1 -1
- package/dist/wang-editor-BnRUlcfv.js +1 -0
- package/dist/{xlsx-util-Dq_UVHCG.js → xlsx-util-DXx8himL.js} +1 -1
- package/es/common/control-navigation/provider/navigation-base.provider.mjs +3 -1
- package/es/common/high-light-code/high-light-code-util.mjs +183 -0
- package/es/common/high-light-code/high-light-code.css +1 -0
- package/es/common/high-light-code/high-light-code.mjs +31 -0
- package/es/common/index.mjs +2 -0
- package/es/control/dashboard/portlet/menu-portlet/app-menu-portlet/app-menu-portlet.css +1 -1
- package/es/control/dashboard/portlet/menu-portlet/app-menu-portlet/app-menu-portlet.mjs +20 -3
- package/es/control/dashboard/portlet/rawitem-portlet/rawitem-portlet.mjs +32 -7
- package/es/control/data-view/data-view.mjs +98 -2
- package/es/control/form/form-detail/form-rawitem/form-rawitem.mjs +3 -1
- package/es/control/list/list.css +1 -1
- package/es/control/list/list.mjs +80 -2
- package/es/control/search-bar/filter-mode-select/filter-mode-select.mjs +2 -2
- package/es/control/search-bar/filter-tree/filter-tree.mjs +2 -2
- package/es/editor/ai-chat/embed-ai-chat/embed-ai-chat.mjs +10 -3
- package/es/editor/code/code-editor.controller.mjs +13 -3
- package/es/editor/code/monaco-editor/monaco-editor.css +1 -1
- package/es/editor/code/monaco-editor/monaco-editor.mjs +41 -8
- package/es/editor/dropdown-list/ibiz-virtualized-list/ibiz-virtualized-list.mjs +1 -1
- package/es/editor/html/wang-editor/wang-editor.mjs +5 -1
- package/es/editor/markdown/ibiz-markdown-editor/custom-menu.mjs +7 -1
- package/es/editor/raw/ibiz-raw/ibiz-raw.mjs +3 -1
- package/es/editor/text-box/input/input.mjs +5 -1
- package/es/locale/en/index.mjs +4 -3
- package/es/locale/zh-CN/index.mjs +4 -3
- package/es/util/app-util/app-util.mjs +9 -2
- package/es/util/inline-ai-util/inline-ai-util.mjs +17 -1
- package/lib/common/control-navigation/provider/navigation-base.provider.cjs +3 -1
- package/lib/common/high-light-code/high-light-code-util.cjs +185 -0
- package/lib/common/high-light-code/high-light-code.cjs +33 -0
- package/lib/common/high-light-code/high-light-code.css +1 -0
- package/lib/common/index.cjs +2 -0
- package/lib/control/dashboard/portlet/menu-portlet/app-menu-portlet/app-menu-portlet.cjs +20 -3
- package/lib/control/dashboard/portlet/menu-portlet/app-menu-portlet/app-menu-portlet.css +1 -1
- package/lib/control/dashboard/portlet/rawitem-portlet/rawitem-portlet.cjs +31 -6
- package/lib/control/data-view/data-view.cjs +97 -1
- package/lib/control/form/form-detail/form-rawitem/form-rawitem.cjs +3 -1
- package/lib/control/list/list.cjs +80 -2
- package/lib/control/list/list.css +1 -1
- package/lib/control/search-bar/filter-mode-select/filter-mode-select.cjs +2 -2
- package/lib/control/search-bar/filter-tree/filter-tree.cjs +2 -2
- package/lib/editor/ai-chat/embed-ai-chat/embed-ai-chat.cjs +10 -3
- package/lib/editor/code/code-editor.controller.cjs +13 -3
- package/lib/editor/code/monaco-editor/monaco-editor.cjs +41 -8
- package/lib/editor/code/monaco-editor/monaco-editor.css +1 -1
- package/lib/editor/dropdown-list/ibiz-virtualized-list/ibiz-virtualized-list.cjs +1 -1
- package/lib/editor/html/wang-editor/wang-editor.cjs +5 -1
- package/lib/editor/markdown/ibiz-markdown-editor/custom-menu.cjs +7 -1
- package/lib/editor/raw/ibiz-raw/ibiz-raw.cjs +3 -1
- package/lib/editor/text-box/input/input.cjs +5 -1
- package/lib/locale/en/index.cjs +4 -3
- package/lib/locale/zh-CN/index.cjs +4 -3
- package/lib/util/app-util/app-util.cjs +9 -2
- package/lib/util/inline-ai-util/inline-ai-util.cjs +17 -1
- package/package.json +6 -6
- package/dist/ibiz-markdown-editor-8I67TTyP.js +0 -1
- package/dist/index-1KhprUjB.js +0 -339
- package/dist/index-ChKlnzfZ.js +0 -1
- package/dist/index-DiSn0c6_.js +0 -1
- package/dist/wang-editor-D7CsxIdH.js +0 -1
package/dist/index.system.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["./index-
|
|
1
|
+
System.register(["./index-YyzbGEva.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","@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.c4,ActionBarPortlet:e.at,AppDataUploadViewEngine:e.b9,AppFuncBlockProvider:e.ch,AppRouter:e.cg,AppUtil:e.b$,ArrowLeftBold:e.cc,ArrowRightBold:e.cd,AuthGuard:e.ce,CalendarExpViewEngine:e.ba,CalendarViewEngine:e.bb,ChartExpViewEngine:e.bc,ChartPortlet:e.al,ChartViewEngine:e.bd,ConfirmUtil:e.bU,ContainerPortlet:e.ae,CustomViewEngine:e.be,DEIndexViewEngine:e.bh,DRBarController:e.a9,DRTabController:e.ab,DataViewControlProvider:e.W,DataViewEngine:e.b5,DataViewExpViewEngine:e.bg,DoingNotice:e.D,EditView2Engine:e.bj,EditView3Engine:e.bk,EditView4Engine:e.bl,EditViewEngine:e.bi,ErrorView:e.b1,ExpViewEngine:e.bm,FilterPortlet:e.ax,FormPickupDataViewEngine:e.bn,FullscreenUtil:e.c0,GanttViewEngine:e.bo,GridExpViewEngine:e.bp,GridViewEngine:e.b3,HtmlPortlet:e.ar,IBizActionBarPortlet:e.as,IBizActionToolbar:e.e,IBizAppMenuControl:e.m,IBizAppMenuIconViewControl:e.n,IBizAuthUserinfo:e.aJ,IBizCalendarControl:e.ay,IBizCalendarExpBarControl:e.a3,IBizCaptionBarControl:e.U,IBizChartControl:e.a6,IBizChartExpBarControl:e.a4,IBizChartPortlet:e.ak,IBizCol:e.b,IBizCommonComponents:e.a,IBizContainerPortlet:e.ad,IBizContextMenuControl:e.aG,IBizDRBarControl:e.a8,IBizDRTabControl:e.aa,IBizDashboardControl:e.ac,IBizDataViewControl:e.V,IBizDataViewExpBarControl:e.a2,IBizDynamicGridFieldEditColumn:e.y,IBizEditFormControl:e.R,IBizEditor:e.aX,IBizFilterPortlet:e.aw,IBizFormButton:e.J,IBizFormButtonList:e.P,IBizFormControl:e.S,IBizFormDRUIPart:e.K,IBizFormGroupPanel:e.C,IBizFormIFrame:e.Q,IBizFormItem:e.E,IBizFormItemContainer:e.F,IBizFormMDCtrl:e.L,IBizFormPage:e.G,IBizFormPageItem:e.H,IBizFormRawItem:e.M,IBizFormTabPage:e.O,IBizFormTabPanel:e.N,IBizGanttControl:e.aF,IBizGridColumnHeader:e.z,IBizGridControl:e.o,IBizGridExpBarControl:e.a1,IBizGridFieldColumn:e.t,IBizGridFieldEditColumn:e.w,IBizGridGroupColumn:e.x,IBizGridUAColumn:e.v,IBizHtmlPortlet:e.aq,IBizIndexActions:e.aV,IBizKanbanControl:e.az,IBizListControl:e.A,IBizListExpBarControl:e.a0,IBizListPortlet:e.ao,IBizMEditViewPanelControl:e.aC,IBizMapControl:e.aD,IBizMenuPortlet:e.ai,IBizNavPosIndex:e.aM,IBizPanelAppTitle:e.aP,IBizPanelButton:e.aN,IBizPanelComponents:e.aI,IBizPanelIndexViewSearch:e.aU,IBizPanelTabPanel:e.aR,IBizPickupViewPanelControl:e.Y,IBizRawItem:e.f,IBizRawItemPortlet:e.am,IBizReportPanelControl:e.aE,IBizReportPortlet:e.au,IBizRow:e.d,IBizSearchBarControl:e.a5,IBizSearchFormControl:e.B,IBizSortBar:e.l,IBizSplit:e.j,IBizSplitContainer:e.aT,IBizSplitTrigger:e.k,IBizSubAppRefView:e.b0,IBizTabExpPanelControl:e.Z,IBizToolbarControl:e.T,IBizTreeControl:e.X,IBizTreeExpBarControl:e.$,IBizTreeGridControl:e.aB,IBizTreeGridExControl:e.aA,IBizUserAction:e.aW,IBizViewEngine:e.b2,IBizViewPanelControl:e.aH,IBizViewPortlet:e.ag,IBizVue3:e.I,IBizWFStepTraceView:e.a$,IBizWizardPanelControl:e.a7,InLineAIUtil:e.c3,IndexViewEngine:e.b4,KanbanViewEngine:e.bq,ListExpViewEngine:e.br,ListPortlet:e.ap,ListViewEngine:e.bs,LoadingUtil:e.bR,LoginView:e.a_,LoginViewEngine:e.bt,MDCustomViewEngine:e.bf,MEditView9Engine:e.bv,MPickupView2Engine:e.bx,MPickupViewEngine:e.bw,MapViewEngine:e.bu,MenuPortlet:e.aj,MessageUtil:e.bS,ModalUtil:e.bT,NavPosIndexController:e.aL,NavPosIndexState:e.aK,NoticeUtil:e.bZ,NotificationUtil:e.bV,OpenViewUtil:e.bW,OptViewEngine:e.b6,OverlayController:e.bX,PanelAppTitleController:e.aQ,PanelButtonController:e.aO,PanelViewEngine:e.by,PickupDataViewEngine:e.bz,PickupGridViewEngine:e.bA,PickupTreeViewEngine:e.bB,PickupView2Engine:e.bD,PickupViewEngine:e.bC,PortalViewEngine:e.bE,PortletLayout:e.af,PrintPreviewUtil:e.c8,QrcodeUtil:e.ca,RawItemPortlet:e.an,RenderUtil:e.b_,ReportPortlet:e.av,ReportViewEngine:e.bF,ScreenShotUtil:e.c5,SplitContainerController:e.aS,SubAppRefViewEngine:e.bG,TabExpViewEngine:e.b7,TabSearchViewEngine:e.bH,TreeExpViewEngine:e.b8,TreeGridExViewEngine:e.bI,TreeGridViewEngine:e.bJ,TreeViewEngine:e.bK,View403:e.aZ,View404:e.aY,ViewPortlet:e.ah,WFDynaActionViewEngine:e.bL,WFDynaEditView3Engine:e.bN,WFDynaEditViewEngine:e.bM,WFDynaStartViewEngine:e.bO,WFStepDataViewEngine:e.bP,WizardViewEngine:e.bQ,convertBtnType:e.c2,i18n:e.i,parseHtml:e.cb,runApp:e.cf,splitPathToSegments:e.c6,useAppGridBase:e.q,useAppGridPagination:e.p,useContextMenu:e.c9,useFocusByEnter:e.c1,useGridDraggable:e.s,useGridHeaderStyle:e.r,useITableEvent:e.u,usePagination:e.bY,validateRouteSegments:e.c7})},null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null],execute:function(){}}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
System.register(["vue","@wangeditor/editor-for-vue","@wangeditor/editor","ramda","@ibiz-template/vue3-util","@ibiz-template/core","element-plus","./index-YyzbGEva.js","@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,a,l,o,n,i,s,r,c,d,u,m,v,h,p,f,g,b,y,C,z,x;return{setters:[function(e){t=e.defineComponent,a=e.createVNode,l=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.t,h=e.i18nChangeLanguage},function(e){p=e.isNil},function(e){f=e.getHtmlEmits,g=e.getHtmlProps,b=e.useNamespace,y=e.useUIStore},function(e){C=e.awaitTimeout},function(e){z=e.ElMessageBox},function(e){x=e.h},null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null],execute:function(){e("default",t({name:"IBizHtml",props:g(),emits:f(),setup(e,{emit:t,slots:l}){var f;const g=b("html"),w=e.controller,S=o(),k=o({});let I=null,P=0;const H=o(),M=n(),E=o(""),U=ibiz.util.file.getUploadHeaders(),F=o({...U}),A=o(""),B=o(!0),O=o(!1),T=o(!1),L=o(!1),V=o(!1);let D=!1;const N=w.model;N.editorParams&&(N.editorParams.enableEdit&&(O.value=!0,T.value=!0,B.value=w.toBoolean(N.editorParams.enableEdit)&&!e.readonly&&!e.disabled),N.editorParams.enableedit&&(O.value=!0,T.value=!0,B.value=w.toBoolean(N.editorParams.enableedit)&&!e.readonly&&!e.disabled),N.editorParams.enableFullScreen&&(L.value=w.toBoolean(N.editorParams.enableFullScreen)),N.editorParams.enablefullscreen&&(L.value=w.toBoolean(N.editorParams.enablefullscreen)),N.editorParams.enablenoaccess&&(D="true"===(null==(f=null==w?void 0:w.editorParams)?void 0:f.enablenoaccess))),e.readonly&&(O.value=!1,T.value=!0);i(()=>e.data,e=>{if(e){const t={...w.editorParams,enableNoAccess:D};t.uploadparams&&(t.uploadParams=JSON.parse(t.uploadparams));const a=ibiz.util.file.calcFileUpDownUrl(w.context,w.params,e,t);A.value=a.uploadUrl}},{immediate:!0,deep:!0});const j=(e,t)=>{if(t)return!0},R=e=>e,K=["headerSelect","blockquote","|","bold","underline","italic",{key:"group-more-style",title:v("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:v("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:v("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:v("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:v("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(w.chatCompletion&&K.unshift("aichart","|"),w.extraActions.length>0){const e=w.extraActions.map(e=>e.uiactionId.split("@")[0]);K.push(...e)}const q={excludeKeys:["group-video","emotion"],toolbarKeys:K},J=ibiz.i18n.getLang();h(J);const Z={placeholder:w.placeHolder,readOnly:O.value?T.value:e.readonly,MENU_CONF:{uploadImage:{server:A.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&&!D&&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,a){console.log("".concat(e.name," 上传出错"),t,a)},async customInsert(t,a){const l=((e,t)=>{const a={...w.editorParams,enableNoAccess:D};return a.exportparams&&(a.exportParams=JSON.parse(a.exportparams)),t&&t.folder&&(a.osscat=t.folder),a.globaldownloadprifix?a.globalDownloadPrifix="true"===a.globaldownloadprifix:a.globalDownloadPrifix=ibiz.config.common.globalDownloadPrifix,ibiz.util.file.calcFileUpDownUrl(w.context,w.params,e,a).downloadUrl})(e.data,t);let o=l.replace("%fileId%",t.id);const n=t.filename;if(ibiz.config.common.enableDownloadTicket&&!D){const i=await ibiz.util.file.getDownloadTicket(w.context,w.params,e.data,{fileId:t.id},w.downloadTicketParams);i&&i.ticket&&(o=l.replace("%fileId%",i.ticket),a(o,n,""))}else a(o,n,"")}},insertLink:{checkLink:j,parseLinkUrl:R},editLink:{checkLink:j,parseLinkUrl:R}},hoverbarKeys:x};let $;s(()=>{const e=M.value;null!=e&&e.destroy()});const _=a=>{M.value=a,w.onCreated(M.value),a.setHtml(E.value),a.on("aiClick",()=>{(async()=>{const a=w.model.appDataEntityId;if(!a||!w.deACMode)return;const{zIndex:l}=y(),o=l.increment();$=await ibiz.aiChatUtil.getAIChat();const{containerOptions:n,chatOptions:i}=await ibiz.aiChatUtil.getEditorExAIChatParams(w.editorParams,w.context,w.params,e.data,w.deACMode,{chatInstance:$,view:w.view,ctrl:w.ctrl}),s=await ibiz.aiChatUtil.getAIResourceOptions(w.context,w.params);let r=w.deACMode.logicName;w.editorParams.srfaichatcaption&&(r=ibiz.appUtil.resolveI18nText(w.editorParams.srfaichatcaption)),$.create({resourceOptions:s,containerOptions:{zIndex:o,...n},chatOptions:{caption:r,context:{...w.context},params:{...w.params,srfactag:w.deACMode.codeName},appDataEntityId:a,...i,action:(e,a)=>{"backfill"===e&&(O.value?E.value=a.realcontent||"":t("change",a.realcontent))}}})})()}),a.on("lineAiClick",()=>{const e=a.getEditableContainer().querySelector(".w-e-hover-bar");if(!e)return;const{offsetLeft:t,offsetTop:l,offsetHeight:o}=e,n=ibiz.inLineAIUtil.calcContextMenus(w.deACMode,e=>{w.doInLineAIUIAction(e,w.model.appId)});if(0===n.length)return;const i=a.getEditableContainer().getBoundingClientRect(),{zIndex:s}=y(),r=s.increment();ibiz.inLineAIUtil.showContextMenus(i.x+t,i.y+l+o,n,{zIndex:r,onClose:()=>{s.decrement()}})}),a.on("customAction",async e=>{const a=await w.doCustomUIAction(e.uiactionId,w.model.appId);a.length>0&&t("customAction",{tag:e.uiactionId,data:a})})},G=a=>{const l=a.getHtml(),o="<p><br></p>"===l?"":l;o===e.value||""===o&&p(e.value)||!O.value&&a.isFocused()&&t("change",o)},Q=e=>{},W=e=>{t("focus")},X=e=>{t("blur")},Y=(e,t)=>{alert("【".concat(ibiz.i18n.t("editor.html.wangEditor.customTips"),"】").concat(t," - ").concat(e))},ee=(e,t,a)=>{a(!0)},te=()=>{const e=M.value;null!=e&&e.disable()},ae=()=>{const e=M.value;null!=e&&e.enable()};r(()=>{i(()=>e.value,(t,a)=>{t===a||"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?te():ae())},{immediate:!0})});const le=()=>{T.value=!T.value,T.value?te():(ae(),M.value.focus(),(()=>{var t,a;if(e.value){const l=e.value.indexOf("</p>");if(l>=0){const e=null==(t=M.value.selection.anchor)?void 0:t.offset,o=null==(a=M.value.selection.anchor)?void 0:a.path;0===e&&o.length>0&&0===o[0]&&M.value.move(l-3)}}})())},oe=()=>{V.value=!V.value,c(()=>{T.value?te():(ae(),M.value.focus())})};return r(()=>{C(0,()=>{if(S.value&&H.value){const e=S.value.offsetHeight;I=new ResizeObserver(t=>{const a=t[0].contentRect.height;if(a!==P){const l={height:"".concat(e-t[0].contentRect.height+(0!==a?300:0),"px"),"toolbar-height":"".concat(a,"px")};k.value=g.cssVarBlock(l),P=a}}),I.observe(H.value.selector)}})}),d(()=>{w.onDestroyed(),I&&I.disconnect(),$&&$.close()}),{ns:g,editorRef:M,mode:"default",valueHtml:E,toolbarConfig:q,editorConfig:Z,handleCreated:_,handleChange:G,handleDestroyed:Q,handleFocus:W,handleBlur:X,customAlert:Y,customPaste:ee,insertText:e=>{const t=M.value;null!=t&&t.insertText(e)},printHtml:()=>{const e=M.value;null!=e&&console.log(e.getHtml())},disable:te,enable:ae,renderHeaserToolbar:()=>O.value||L.value?a("div",{class:g.b("custom-toolbar")},[O.value&&B.value&&T.value?a("i",{class:"fa fa-edit","aria-hidden":"true",title:ibiz.i18n.t("editor.html.enableedit"),onClick:()=>le()},null):null,L.value?V.value?a("i",{class:"fa fa-compress","aria-hidden":"true",title:ibiz.i18n.t("editor.html.reduce"),onClick:()=>oe()},null):a("i",{class:"fa fa-expand","aria-hidden":"true",title:ibiz.i18n.t("editor.html.expand"),onClick:()=>oe()},null):null]):null,renderEditorContent:()=>a("div",{class:[g.b("content"),g.is("editing",!T.value)],ref:"htmlContent",style:k.value},[l.editorSwitchMenu?a("div",{class:g.b("menu")},[l.editorSwitchMenu()]):null,a(u,{ref:"toolbarRef",editor:M.value,"default-config":q,mode:"default",class:g.b("toolbar")},null),a(m,{class:[g.b("editor"),g.is("readonly",T.value)],modelValue:E.value,"onUpdate:modelValue":e=>E.value=e,"default-config":Z,mode:"default",onOnCreated:_,onOnChange:G,onOnDestroyed:Q,onOnFocus:W,onOnBlur:X,oncustomAlert:Y,oncustomPaste:ee},null)]),renderFooter:()=>O.value?a("div",{class:[g.b("footer"),{[g.b("footer-dialog")]:V.value}]},[a("div",{class:g.be("footer","cancel"),onClick:()=>{e.value!==E.value?z({title:ibiz.i18n.t("editor.common.confirmCancel"),type:"warning",customClass:g.b("message"),message:a("div",{class:g.be("message","message-content")},[a("p",null,[ibiz.i18n.t("editor.common.confirmCancelPrompt")]),a("p",{class:g.bem("message","message-content","message-tip")},[ibiz.i18n.t("editor.common.cancelEditPrompt")])]),showCancelButton:!0,cancelButtonClass:g.be("message","message-cancel"),confirmButtonClass:g.be("message","message-comfire")}).then(()=>{E.value=e.value||"",le()}).catch(()=>{M.value.focus()}):le()}},[ibiz.i18n.t("app.cancel")]),a("div",{class:g.be("footer","save"),onClick:()=>(()=>{T.value=!0,M.value.disable();const e=E.value;t("change",e),V.value&&(V.value=!1)})()},[ibiz.i18n.t("app.save")])]):null,htmlContent:S,hasEnableEdit:O,cssVars:k,toolbarRef:H,isFullScreen:V,readonlyState:T,changeFullScreenState:oe}},render(){const e=!!this.$slots.editorSwitchMenu;return this.isFullScreen?a(l("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:()=>[a("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])]}):a("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])}}))}}});
|