@ibiz-template/vue3-components 0.7.41-alpha.41 → 0.7.41-alpha.43

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/dist/ibiz-markdown-editor-DJ662N4_.js +1 -0
  2. package/dist/{index-CaWTEUU1.js → index-CG3sQH0b.js} +1 -1
  3. package/dist/index-D3x_MFr-.js +11 -0
  4. package/dist/{index-CD2XM6M6.js → index-kZrZndeH.js} +1 -1
  5. package/dist/index.min.css +1 -1
  6. package/dist/index.system.min.js +1 -1
  7. package/dist/wang-editor-DDSO3Ha9.js +1 -0
  8. package/dist/{xlsx-util-Dvg2kWh7.js → xlsx-util-8YSXhmdI.js} +1 -1
  9. package/es/control/form/form-detail/form-item/composite-form-item-ex/composite-form-item-ex.controller.mjs +16 -6
  10. package/es/control/toolbar/export-excel/export-excel.mjs +19 -4
  11. package/es/editor/code/monaco-editor/monaco-editor.mjs +13 -195
  12. package/es/editor/html/wang-editor/module/ai-module.mjs +1 -1
  13. package/es/editor/html/wang-editor/wang-editor.mjs +31 -202
  14. package/es/editor/markdown/ibiz-markdown-editor/custom-menu.mjs +16 -223
  15. package/es/editor/markdown/ibiz-markdown-editor/ibiz-markdown-editor.css +1 -1
  16. package/es/editor/markdown/ibiz-markdown-editor/ibiz-markdown-editor.mjs +2 -1
  17. package/es/editor/text-box/input/input.mjs +9 -197
  18. package/es/locale/en/index.mjs +24 -1
  19. package/es/locale/zh-CN/index.mjs +24 -1
  20. package/es/panel-component/panel-app-title/panel-app-title.mjs +19 -42
  21. package/es/util/ai-chat-util/ai-chat-util.mjs +644 -15
  22. package/es/util/ai-chat-util/ai-feedback/ai-feedback.css +1 -0
  23. package/es/util/ai-chat-util/ai-feedback/ai-feedback.mjs +130 -0
  24. package/es/util/app-util/app-util.mjs +24 -246
  25. package/es/util/inline-ai-util/inline-ai-textarea/inline-ai-textarea.hook.mjs +12 -4
  26. package/es/util/inline-ai-util/inline-ai-textarea/inline-ai-textarea.mjs +3 -1
  27. package/lib/control/form/form-detail/form-item/composite-form-item-ex/composite-form-item-ex.controller.cjs +16 -6
  28. package/lib/control/toolbar/export-excel/export-excel.cjs +18 -3
  29. package/lib/editor/code/monaco-editor/monaco-editor.cjs +13 -195
  30. package/lib/editor/html/wang-editor/module/ai-module.cjs +1 -1
  31. package/lib/editor/html/wang-editor/wang-editor.cjs +30 -201
  32. package/lib/editor/markdown/ibiz-markdown-editor/custom-menu.cjs +16 -223
  33. package/lib/editor/markdown/ibiz-markdown-editor/ibiz-markdown-editor.cjs +2 -1
  34. package/lib/editor/markdown/ibiz-markdown-editor/ibiz-markdown-editor.css +1 -1
  35. package/lib/editor/text-box/input/input.cjs +8 -196
  36. package/lib/locale/en/index.cjs +24 -1
  37. package/lib/locale/zh-CN/index.cjs +24 -1
  38. package/lib/panel-component/panel-app-title/panel-app-title.cjs +18 -41
  39. package/lib/util/ai-chat-util/ai-chat-util.cjs +642 -13
  40. package/lib/util/ai-chat-util/ai-feedback/ai-feedback.cjs +132 -0
  41. package/lib/util/ai-chat-util/ai-feedback/ai-feedback.css +1 -0
  42. package/lib/util/app-util/app-util.cjs +23 -245
  43. package/lib/util/inline-ai-util/inline-ai-textarea/inline-ai-textarea.cjs +3 -1
  44. package/lib/util/inline-ai-util/inline-ai-textarea/inline-ai-textarea.hook.cjs +12 -4
  45. package/package.json +7 -7
  46. package/dist/ibiz-markdown-editor-DEV-iSvz.js +0 -1
  47. package/dist/index-Bv2fgePf.js +0 -11
  48. package/dist/wang-editor-4cNAgOaJ.js +0 -1
@@ -1 +1 @@
1
- System.register(["./index-Bv2fgePf.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.c8,AppUtil:e.bZ,ArrowLeftBold:e.c4,ArrowRightBold:e.c5,AuthGuard:e.c6,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,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.c3,runApp:e.c7,useAppGridBase:e.p,useAppGridPagination:e.o,useFocusByEnter:e.b$,useGridDraggable:e.r,useGridHeaderStyle:e.q,useITableEvent:e.u,usePagination:e.bW})},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
+ System.register(["./index-D3x_MFr-.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.c8,AppUtil:e.bZ,ArrowLeftBold:e.c4,ArrowRightBold:e.c5,AuthGuard:e.c6,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,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.c3,runApp:e.c7,useAppGridBase:e.p,useAppGridPagination:e.o,useFocusByEnter:e.b$,useGridDraggable:e.r,useGridHeaderStyle:e.q,useITableEvent:e.u,usePagination:e.bW})},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","ramda","@ibiz-template/vue3-util","@ibiz-template/core","element-plus","./index-D3x_MFr-.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,n,o,i,s,r,d,c,u,m,v,h,p,f,g,b,y,C,z;return{setters:[function(e){t=e.defineComponent,l=e.createVNode,a=e.resolveComponent,n=e.ref,o=e.shallowRef,i=e.watch,s=e.onBeforeUnmount,r=e.onMounted,d=e.nextTick,c=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,g=e.useUIStore},function(e){b=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}){const h=f("html"),p=e.controller,w=n(),x=n({});let S=null,k=0;const H=n(),M=o(),E=n(""),I=ibiz.util.file.getUploadHeaders(),F=n({...I}),P=n(""),B=n(!0),U=n(!1),T=n(!1),O=n(!1),V=n(!1),A=p.model;A.editorParams&&(A.editorParams.enableEdit&&(U.value=!0,T.value=!0,B.value=p.toBoolean(A.editorParams.enableEdit)&&!e.readonly&&!e.disabled),A.editorParams.enableedit&&(U.value=!0,T.value=!0,B.value=p.toBoolean(A.editorParams.enableedit)&&!e.readonly&&!e.disabled),A.editorParams.enableFullScreen&&(O.value=p.toBoolean(A.editorParams.enableFullScreen)),A.editorParams.enablefullscreen&&(O.value=p.toBoolean(A.editorParams.enablefullscreen))),e.readonly&&(U.value=!1,T.value=!0);i(()=>e.data,e=>{if(e){const t={...p.editorParams};t.uploadparams&&(t.uploadParams=JSON.parse(t.uploadparams));const l=ibiz.util.file.calcFileUpDownUrl(p.context,p.params,e,t);P.value=l.uploadUrl}},{immediate:!0,deep:!0});const L=(e,t)=>{if(t)return!0},j=e=>e,D=["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"];p.chatCompletion&&D.unshift("aichart","|");const N={excludeKeys:["group-video","emotion"],toolbarKeys:D},R={placeholder:p.placeHolder,readOnly:U.value?T.value:e.readonly,MENU_CONF:{uploadImage:{server:P.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&&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={...p.editorParams};return l.exportparams&&(l.exportParams=JSON.parse(l.exportparams)),t&&t.folder&&(l.osscat=t.folder),ibiz.util.file.calcFileUpDownUrl(p.context,p.params,e,l).downloadUrl})(e.data,t);let n=a.replace("%fileId%",t.id);const o=t.filename;if(ibiz.config.common.enableDownloadTicket){const i=await ibiz.util.file.getDownloadTicket(p.context,p.params,e.data,{fileId:t.id},p.downloadTicketParams);i&&i.ticket&&(n=a.replace("%fileId%",i.ticket),l(n,o,""))}else l(n,o,"")}},insertLink:{checkLink:L,parseLinkUrl:j},editLink:{checkLink:L,parseLinkUrl:j}},hoverbarKeys:C};let K;s(()=>{const e=M.value;null!=e&&e.destroy()});const q=l=>{M.value=l,p.onCreated(M.value),l.setHtml(E.value),l.on("aiClick",()=>{(async()=>{const l=p.model.appDataEntityId;if(!l||!p.deACMode)return;const{zIndex:a}=g(),n=a.increment();K=await ibiz.aiChatUtil.getAIChat();const{containerOptions:o,chatOptions:i}=await ibiz.aiChatUtil.getEditorExAIChatParams(p.editorParams,p.context,p.params,e.data,p.deACMode,{chatInstance:K,view:p.view,ctrl:p.ctrl});K.create({containerOptions:{zIndex:n,...o},chatOptions:{caption:p.deACMode.logicName,context:{...p.context},params:{...p.params,srfactag:p.deACMode.codeName},appDataEntityId:l,...i,action:(e,l)=>{"backfill"===e&&(U.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:n}=e,o=ibiz.inLineAIUtil.calcContextMenus(p.deACMode,e=>{p.doInLineAIUIAction(e,p.model.appId)});if(0===o.length)return;const i=l.getEditableContainer().getBoundingClientRect(),{zIndex:s}=g(),r=s.increment();ibiz.inLineAIUtil.showContextMenus(i.x+t,i.y+a+n,o,{zIndex:r,onClose:()=>{s.decrement()}})})},J=l=>{const a=l.getHtml(),n="<p><br></p>"===a?"":a;n===e.value||""===n&&v(e.value)||!U.value&&l.isFocused()&&t("change",n)},Z=e=>{},$=e=>{t("focus")},_=e=>{t("blur")},G=(e,t)=>{alert("【".concat(ibiz.i18n.t("editor.html.wangEditor.customTips"),"】").concat(t," - ").concat(e))},Q=(e,t,l)=>{l(!0)},W=()=>{const e=M.value;null!=e&&e.disable()},X=()=>{const e=M.value;null!=e&&e.enable()};r(()=>{i(()=>e.value,(t,l)=>{t===l||"string"!=typeof e.value&&null!=t||d(null==t?()=>{E.value=""}:()=>{E.value=t})},{immediate:!0}),i(()=>e.disabled,(e,t)=>{e!==t&&(!0===e?W():X())},{immediate:!0})});const Y=()=>{T.value=!T.value,T.value?W():(X(),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,n=null==(l=M.value.selection.anchor)?void 0:l.path;0===e&&n.length>0&&0===n[0]&&M.value.move(a-3)}}})())},ee=()=>{V.value=!V.value,d(()=>{T.value?W():(X(),M.value.focus())})};return r(()=>{b(0,()=>{if(w.value&&H.value){const e=w.value.offsetHeight;S=new ResizeObserver(t=>{const l=t[0].contentRect.height;if(l!==k){const a={height:"".concat(e-t[0].contentRect.height+(0!==l?300:0),"px"),"toolbar-height":"".concat(l,"px")};x.value=h.cssVarBlock(a),k=l}}),S.observe(H.value.selector)}})}),c(()=>{p.onDestroyed(),S&&S.disconnect(),K&&K.close()}),{ns:h,editorRef:M,mode:"default",valueHtml:E,toolbarConfig:N,editorConfig:R,handleCreated:q,handleChange:J,handleDestroyed:Z,handleFocus:$,handleBlur:_,customAlert:G,customPaste:Q,insertText:e=>{const t=M.value;null!=t&&t.insertText(e)},printHtml:()=>{const e=M.value;null!=e&&console.log(e.getHtml())},disable:W,enable:X,renderHeaserToolbar:()=>U.value||O.value?l("div",{class:h.b("custom-toolbar")},[U.value&&B.value&&T.value?l("i",{class:"fa fa-edit","aria-hidden":"true",title:ibiz.i18n.t("editor.html.enableedit"),onClick:()=>Y()},null):null,O.value?V.value?l("i",{class:"fa fa-compress","aria-hidden":"true",title:ibiz.i18n.t("editor.html.reduce"),onClick:()=>ee()},null):l("i",{class:"fa fa-expand","aria-hidden":"true",title:ibiz.i18n.t("editor.html.expand"),onClick:()=>ee()},null):null]):null,renderEditorContent:()=>l("div",{class:[h.b("content"),h.is("editing",!T.value)],ref:"htmlContent",style:x.value},[a.editorSwitchMenu?l("div",{class:h.b("menu")},[a.editorSwitchMenu()]):null,l(u,{ref:"toolbarRef",editor:M.value,"default-config":N,mode:"default",class:h.b("toolbar")},null),l(m,{class:[h.b("editor"),h.is("readonly",T.value)],modelValue:E.value,"onUpdate:modelValue":e=>E.value=e,"default-config":R,mode:"default",onOnCreated:q,onOnChange:J,onOnDestroyed:Z,onOnFocus:$,onOnBlur:_,oncustomAlert:G,oncustomPaste:Q},null)]),renderFooter:()=>U.value?l("div",{class:[h.b("footer"),{[h.b("footer-dialog")]:V.value}]},[l("div",{class:h.be("footer","cancel"),onClick:()=>{e.value!==E.value?y({title:ibiz.i18n.t("editor.common.confirmCancel"),type:"warning",customClass:h.b("message"),message:l("div",{class:h.be("message","message-content")},[l("p",null,[ibiz.i18n.t("editor.common.confirmCancelPrompt")]),l("p",{class:h.bem("message","message-content","message-tip")},[ibiz.i18n.t("editor.common.cancelEditPrompt")])]),showCancelButton:!0,cancelButtonClass:h.be("message","message-cancel"),confirmButtonClass:h.be("message","message-comfire")}).then(()=>{E.value=e.value||"",Y()}).catch(()=>{M.value.focus()}):Y()}},[ibiz.i18n.t("app.cancel")]),l("div",{class:h.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:w,hasEnableEdit:U,cssVars:x,toolbarRef:H,isFullScreen:V,readonlyState:T,changeFullScreenState:ee}},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])}}))}}});