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

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 (66) hide show
  1. package/dist/ibiz-markdown-editor-DEV-iSvz.js +1 -0
  2. package/dist/index-Bv2fgePf.js +11 -0
  3. package/dist/{index-BewO9StC.js → index-CD2XM6M6.js} +1 -1
  4. package/dist/{index-ClxO69TM.js → index-CaWTEUU1.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-4cNAgOaJ.js +1 -0
  8. package/dist/{xlsx-util-Cg5zMYCC.js → xlsx-util-Dvg2kWh7.js} +1 -1
  9. package/es/control/form/form-detail/form-item/composite-form-item-ex/composite-form-item-ex.controller.mjs +2 -1
  10. package/es/control/form/form-detail/form-item/composite-form-item-ex/composite-form-item-ex.css +1 -1
  11. package/es/control/form/form-detail/form-item/composite-form-item-ex/composite-form-item-ex.mjs +12 -2
  12. package/es/editor/code/monaco-editor/monaco-editor.mjs +41 -32
  13. package/es/editor/html/wang-editor/config/index.mjs +3 -0
  14. package/es/editor/html/wang-editor/config/toolbar.mjs +90 -0
  15. package/es/editor/html/wang-editor/constants/svg.mjs +8 -0
  16. package/es/editor/html/wang-editor/wang-editor.css +1 -1
  17. package/es/editor/html/wang-editor/wang-editor.mjs +52 -39
  18. package/es/editor/markdown/ibiz-markdown-editor/custom-menu.mjs +264 -2
  19. package/es/editor/markdown/ibiz-markdown-editor/ibiz-markdown-editor.css +1 -1
  20. package/es/editor/markdown/ibiz-markdown-editor/ibiz-markdown-editor.mjs +38 -6
  21. package/es/editor/markdown/ibiz-markdown-editor/render-util.mjs +33 -4
  22. package/es/editor/text-box/input/input.mjs +41 -32
  23. package/es/index.mjs +1 -1
  24. package/es/locale/en/index.mjs +3 -1
  25. package/es/locale/zh-CN/index.mjs +3 -1
  26. package/es/util/ai-chat-util/ai-chat-util.mjs +216 -0
  27. package/es/util/app-util/app-util.mjs +20 -48
  28. package/es/util/index.mjs +1 -1
  29. package/es/util/inline-ai-util/inline-ai-textarea/icon.mjs +75 -1
  30. package/es/util/inline-ai-util/inline-ai-textarea/inline-ai-textarea.css +1 -1
  31. package/es/util/inline-ai-util/inline-ai-textarea/inline-ai-textarea.hook.mjs +136 -43
  32. package/es/util/inline-ai-util/inline-ai-textarea/inline-ai-textarea.mjs +130 -48
  33. package/es/util/inline-ai-util/inline-ai-util.mjs +2 -1
  34. package/es/web-app/main.mjs +2 -0
  35. package/lib/control/form/form-detail/form-item/composite-form-item-ex/composite-form-item-ex.cjs +12 -2
  36. package/lib/control/form/form-detail/form-item/composite-form-item-ex/composite-form-item-ex.controller.cjs +2 -1
  37. package/lib/control/form/form-detail/form-item/composite-form-item-ex/composite-form-item-ex.css +1 -1
  38. package/lib/editor/code/monaco-editor/monaco-editor.cjs +40 -31
  39. package/lib/editor/html/wang-editor/config/index.cjs +7 -0
  40. package/lib/editor/html/wang-editor/config/toolbar.cjs +92 -0
  41. package/lib/editor/html/wang-editor/constants/svg.cjs +14 -0
  42. package/lib/editor/html/wang-editor/wang-editor.cjs +51 -38
  43. package/lib/editor/html/wang-editor/wang-editor.css +1 -1
  44. package/lib/editor/markdown/ibiz-markdown-editor/custom-menu.cjs +264 -2
  45. package/lib/editor/markdown/ibiz-markdown-editor/ibiz-markdown-editor.cjs +38 -6
  46. package/lib/editor/markdown/ibiz-markdown-editor/ibiz-markdown-editor.css +1 -1
  47. package/lib/editor/markdown/ibiz-markdown-editor/render-util.cjs +33 -4
  48. package/lib/editor/text-box/input/input.cjs +40 -31
  49. package/lib/index.cjs +2 -2
  50. package/lib/locale/en/index.cjs +3 -1
  51. package/lib/locale/zh-CN/index.cjs +3 -1
  52. package/lib/util/ai-chat-util/ai-chat-util.cjs +218 -0
  53. package/lib/util/app-util/app-util.cjs +19 -47
  54. package/lib/util/index.cjs +2 -2
  55. package/lib/util/inline-ai-util/inline-ai-textarea/icon.cjs +78 -0
  56. package/lib/util/inline-ai-util/inline-ai-textarea/inline-ai-textarea.cjs +129 -47
  57. package/lib/util/inline-ai-util/inline-ai-textarea/inline-ai-textarea.css +1 -1
  58. package/lib/util/inline-ai-util/inline-ai-textarea/inline-ai-textarea.hook.cjs +135 -42
  59. package/lib/util/inline-ai-util/inline-ai-util.cjs +2 -1
  60. package/lib/web-app/main.cjs +2 -0
  61. package/package.json +5 -5
  62. package/dist/ibiz-markdown-editor-CxFS8frQ.js +0 -1
  63. package/dist/index-2eZnbrr4.js +0 -11
  64. package/dist/wang-editor-BPl509oX.js +0 -1
  65. package/es/util/ai-util/ai-util.mjs +0 -68
  66. package/lib/util/ai-util/ai-util.cjs +0 -71
@@ -1 +1 @@
1
- System.register(["./index-2eZnbrr4.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({ActionBarPortlet:e.as,AppDataUploadViewEngine:e.b8,AppRouter:e.c8,AppUtil:e.b_,ArrowLeftBold:e.c4,ArrowRightBold:e.c5,AuthGuard:e.c6,CalendarExpViewEngine:e.b9,CalendarViewEngine:e.ba,ChartExpViewEngine:e.bb,ChartPortlet:e.ak,ChartViewEngine:e.bc,ConfirmUtil:e.bT,ContainerPortlet:e.ad,CustomViewEngine:e.bd,DEIndexViewEngine:e.bg,DRBarController:e.a8,DRTabController:e.aa,DataViewControlProvider:e.W,DataViewEngine:e.b4,DataViewExpViewEngine:e.bf,DoingNotice:e.D,EditView2Engine:e.bi,EditView3Engine:e.bj,EditView4Engine:e.bk,EditViewEngine:e.bh,ErrorView:e.b0,ExpViewEngine:e.bl,FilterPortlet:e.aw,FormPickupDataViewEngine:e.bm,FullscreenUtil:e.b$,GanttViewEngine:e.bn,GridExpViewEngine:e.bo,GridViewEngine:e.b2,HtmlPortlet:e.aq,IBizActionBarPortlet:e.ar,IBizActionToolbar:e.f,IBizAppMenuControl:e.m,IBizAppMenuIconViewControl:e.n,IBizAuthUserinfo:e.aI,IBizCalendarControl:e.ax,IBizCalendarExpBarControl:e.a2,IBizCaptionBarControl:e.U,IBizChartControl:e.a5,IBizChartExpBarControl:e.a3,IBizChartPortlet:e.aj,IBizCol:e.d,IBizCommonComponents:e.b,IBizContainerPortlet:e.ac,IBizContextMenuControl:e.aF,IBizDRBarControl:e.a7,IBizDRTabControl:e.a9,IBizDashboardControl:e.ab,IBizDataViewControl:e.V,IBizDataViewExpBarControl:e.a1,IBizDynamicGridFieldEditColumn:e.y,IBizEditFormControl:e.R,IBizEditor:e.aW,IBizFilterPortlet:e.av,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.aE,IBizGridColumnHeader:e.z,IBizGridControl:e.o,IBizGridExpBarControl:e.a0,IBizGridFieldColumn:e.t,IBizGridFieldEditColumn:e.w,IBizGridGroupColumn:e.x,IBizGridUAColumn:e.v,IBizHtmlPortlet:e.ap,IBizIndexActions:e.aU,IBizKanbanControl:e.ay,IBizListControl:e.A,IBizListExpBarControl:e.$,IBizListPortlet:e.an,IBizMEditViewPanelControl:e.aB,IBizMapControl:e.aC,IBizMenuPortlet:e.ah,IBizNavPosIndex:e.aL,IBizPanelAppTitle:e.aO,IBizPanelButton:e.aM,IBizPanelComponents:e.aH,IBizPanelIndexViewSearch:e.aT,IBizPanelTabPanel:e.aQ,IBizPickupViewPanelControl:e.Y,IBizRawItem:e.g,IBizRawItemPortlet:e.al,IBizReportPanelControl:e.aD,IBizReportPortlet:e.at,IBizRow:e.e,IBizSearchBarControl:e.a4,IBizSearchFormControl:e.B,IBizSortBar:e.l,IBizSplit:e.j,IBizSplitContainer:e.aS,IBizSplitTrigger:e.k,IBizSubAppRefView:e.a$,IBizTabExpPanelControl:e.Z,IBizToolbarControl:e.T,IBizTreeControl:e.X,IBizTreeExpBarControl:e._,IBizTreeGridControl:e.aA,IBizTreeGridExControl:e.az,IBizUserAction:e.aV,IBizViewEngine:e.b1,IBizViewPanelControl:e.aG,IBizViewPortlet:e.af,IBizVue3:e.I,IBizWFStepTraceView:e.a_,IBizWizardPanelControl:e.a6,InLineAIUtil:e.c2,IndexViewEngine:e.b3,KanbanViewEngine:e.bp,ListExpViewEngine:e.bq,ListPortlet:e.ao,ListViewEngine:e.br,LoadingUtil:e.bQ,LoginView:e.aZ,LoginViewEngine:e.bs,MDCustomViewEngine:e.be,MEditView9Engine:e.bu,MPickupView2Engine:e.bw,MPickupViewEngine:e.bv,MapViewEngine:e.bt,MenuPortlet:e.ai,MessageUtil:e.bR,ModalUtil:e.bS,NavPosIndexController:e.aK,NavPosIndexState:e.aJ,NoticeUtil:e.bY,NotificationUtil:e.bU,OpenViewUtil:e.bV,OptViewEngine:e.b5,OverlayController:e.bW,PanelAppTitleController:e.aP,PanelButtonController:e.aN,PanelViewEngine:e.bx,PickupDataViewEngine:e.by,PickupGridViewEngine:e.bz,PickupTreeViewEngine:e.bA,PickupView2Engine:e.bC,PickupViewEngine:e.bB,PortalViewEngine:e.bD,PortletLayout:e.ae,RawItemPortlet:e.am,RenderUtil:e.bZ,ReportPortlet:e.au,ReportViewEngine:e.bE,SplitContainerController:e.aR,SubAppRefViewEngine:e.bF,TabExpViewEngine:e.b6,TabSearchViewEngine:e.bG,TreeExpViewEngine:e.b7,TreeGridExViewEngine:e.bH,TreeGridViewEngine:e.bI,TreeViewEngine:e.bJ,View403:e.aY,View404:e.aX,ViewPortlet:e.ag,WFDynaActionViewEngine:e.bK,WFDynaEditView3Engine:e.bM,WFDynaEditViewEngine:e.bL,WFDynaStartViewEngine:e.bN,WFStepDataViewEngine:e.bO,WizardViewEngine:e.bP,calcAiToolbarItemsByAc:e.c,convertBtnType:e.c1,i18n:e.i,parseHtml:e.c3,runApp:e.c7,useAppGridBase:e.q,useAppGridPagination:e.p,useFocusByEnter:e.c0,useGridDraggable:e.s,useGridHeaderStyle:e.r,useITableEvent:e.u,usePagination:e.bX})},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-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(){}}});
@@ -0,0 +1 @@
1
+ System.register(["vue","@wangeditor/editor-for-vue","qx-util","ramda","@ibiz-template/vue3-util","@ibiz-template/core","@ibiz-template/runtime","element-plus","./index-Bv2fgePf.js","@wangeditor/editor","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,o,l,i,n,s,r,c,d,u,m,p,v,h,g,f,b,y,S,C,w,z,I,x;return{setters:[function(e){t=e.defineComponent,a=e.createVNode,o=e.resolveComponent,l=e.ref,i=e.shallowRef,n=e.watch,s=e.onBeforeUnmount,r=e.onMounted,c=e.nextTick,d=e.onUnmounted},function(e){u=e.Toolbar,m=e.Editor},function(e){p=e.createUUID},function(e){v=e.isNil},function(e){h=e.getEditorEmits,g=e.getHtmlProps,f=e.useNamespace,b=e.useUIStore},function(e){y=e.awaitTimeout,S=e.IBizContext},function(e){C=e.UIActionUtil,w=e.SysUIActionTag},function(e){z=e.ElMessageBox},function(e){I=e.h},function(e){x=e.t},null,null,null,null,null,null,null,null,null,null,null,null,null,null],execute:function(){e("default",t({name:"IBizHtml",props:g(),emits:h(),setup(e,{emit:t,slots:o}){const h=f("html"),g=e.controller,A=l(),T=l({});let E=null,U=0;const k=l(),M=i(),F=l(""),H=ibiz.util.file.getUploadHeaders(),P=l({...H}),O=l(""),B=l(!0),D=l(!1),R=l(!1),L=l(!1),N=l(!1),V=g.model;V.editorParams&&(V.editorParams.enableEdit&&(D.value=!0,R.value=!0,B.value=g.toBoolean(V.editorParams.enableEdit)&&!e.readonly&&!e.disabled),V.editorParams.enableedit&&(D.value=!0,R.value=!0,B.value=g.toBoolean(V.editorParams.enableedit)&&!e.readonly&&!e.disabled),V.editorParams.enableFullScreen&&(L.value=g.toBoolean(V.editorParams.enableFullScreen)),V.editorParams.enablefullscreen&&(L.value=g.toBoolean(V.editorParams.enablefullscreen))),e.readonly&&(D.value=!1,R.value=!0);n(()=>e.data,e=>{if(e){const t={...g.editorParams};t.uploadparams&&(t.uploadParams=JSON.parse(t.uploadparams));const a=ibiz.util.file.calcFileUpDownUrl(g.context,g.params,e,t);O.value=a.uploadUrl}},{immediate:!0,deep:!0});const j=(e,t)=>{if(t)return!0},K=e=>e,q=["headerSelect","blockquote","|","bold","underline","italic",{key:"group-more-style",title:x("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:x("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:x("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:x("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:x("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"];g.chatCompletion&&q.unshift("aichart","|");const J={excludeKeys:["group-video","emotion"],toolbarKeys:q},Z={placeholder:g.placeHolder,readOnly:D.value?R.value:e.readonly,MENU_CONF:{uploadImage:{server:O.value,fieldName:"file",maxFileSize:10485760,maxNumberOfFiles:10,allowedFileTypes:[],headers:P.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,a){console.log("".concat(e.name," 上传出错"),t,a)},async customInsert(t,a){const o=((e,t)=>{const a={...g.editorParams};return a.exportparams&&(a.exportParams=JSON.parse(a.exportparams)),t&&t.folder&&(a.osscat=t.folder),ibiz.util.file.calcFileUpDownUrl(g.context,g.params,e,a).downloadUrl})(e.data,t);let l=o.replace("%fileId%",t.id);const i=t.filename;if(ibiz.config.common.enableDownloadTicket){const n=await ibiz.util.file.getDownloadTicket(g.context,g.params,e.data,{fileId:t.id},g.downloadTicketParams);n&&n.ticket&&(l=o.replace("%fileId%",n.ticket),a(l,i,""))}else a(l,i,"")}},insertLink:{checkLink:j,parseLinkUrl:K},editLink:{checkLink:j,parseLinkUrl:K}},hoverbarKeys:I};let Q;s(()=>{const e=M.value;null!=e&&e.destroy()});const $=a=>{M.value=a,g.onCreated(M.value),a.setHtml(F.value),a.on("aiClick",()=>{(async()=>{const a=g.model.appDataEntityId;if(!a||!g.deACMode)return;const o=await ibiz.aiChatUtil.getAIAgentList(g.context,g.params),{contentToolbarItems:l,footerToolbarItems:i,questionToolbarItems:n,otherToolbarItems:s}=ibiz.aiChatUtil.calcAiToolbarItemsByAc(g.deACMode),{containerOptions:r,chatOptions:c}=ibiz.aiChatUtil.getEditorExAIChatParams(g.editorParams,g.context,g.params,e.data),{zIndex:d}=b(),u=d.increment();Q=await ibiz.aiChatUtil.getAIChat();let m,v="";Q.create({containerOptions:{zIndex:u,...r},chatOptions:{caption:g.deACMode.logicName,context:{...g.context},params:{...g.params,srfactag:g.deACMode.codeName},appDataEntityId:a,contentToolbarItems:l,footerToolbarItems:i,questionToolbarItems:n,otherToolbarItems:s,aiAgentlist:o,...c,question:async(e,t,a,o,l,i,n,s)=>{v=p(),m=new AbortController;const r=await ibiz.hub.getApp(t.srfappid).deService.getService(t,o.appDataEntityId);try{const o={messages:l,sessionid:i};n&&(o.srfaiagent=n),s&&(o.mode=s),await r.aiChatSse(t=>{if(20===t.actionstate&&t.actionresult)e.addMessage({messageid:v,state:t.actionstate,type:"DEFAULT",role:"ASSISTANT",content:t.actionresult});else if(30===t.actionstate&&t.actionresult){const a=JSON.parse(t.actionresult).choices;a&&a.length>0&&e.replaceMessage({messageid:v,state:t.actionstate,type:"DEFAULT",role:"ASSISTANT",content:a[0].content||""})}else 40===t.actionstate&&e.replaceMessage({messageid:v,state:t.actionstate,type:"ERROR",role:"ASSISTANT",content:t.actionresult})},m,t,a,{...o})}catch(t){e.replaceMessage({messageid:v,state:40,type:"ERROR",role:"ASSISTANT",content:t.message||ibiz.i18n.t("app.aiError")}),null==m||m.abort()}finally{return e.completeMessage(v,!0),!0}},abortQuestion:async e=>{null==m||m.abort(),await e.stopMessage({messageid:v,state:30,type:"DEFAULT",role:"ASSISTANT",content:""}),await e.completeMessage(v,!0)},action:(e,a)=>{"backfill"===e&&(D.value?F.value=a.realcontent||"":t("change",a.realcontent))},history:async(e,t,a)=>{const o=await ibiz.hub.getApp(e.srfappid).deService.getService(e,a.appDataEntityId),l={};a.appendCurData&&Object.assign(l,{...a.appendCurData}),a.srfaiagent&&Object.assign(l,{srfaiagent:a.srfaiagent}),a.srfmode&&Object.assign(l,{mode:a.srfmode});const i=await o.aiChatHistory(e,t,l);if(i.data&&Array.isArray(i.data)){let e;i.data.forEach(t=>{if("TOOL"===t.role)e&&t.content&&Q.aiChat.updateRecommendPrompt(e,t.content);else{const a={messageid:p(),state:30,type:"DEFAULT",role:t.role,content:t.content,completed:!0};e=a,Q.aiChat.addMessage(a)}})}return!0},recommendPrompt:async(e,t,a)=>{const o=await ibiz.hub.getApp(e.srfappid).deService.getService(e,a.appDataEntityId),l=await o.aiChatRecommendPrompt(e,t,a.message);if(l.ok&&l.data){const e=l.data.choices;return e&&e.length>0?e[0]:null}return null},uploader:{onUpload:async(e,t,a)=>{const o=ibiz.util.file.calcFileUpDownUrl((null==a?void 0:a.context)||g.context,(null==a?void 0:a.params)||g.params,{}),l=ibiz.util.file.getUploadHeaders(),i=new FormData;return i.append("file",e),(await ibiz.net.axios({url:o.uploadUrl,method:"post",headers:l,data:i,onUploadProgress:e=>{const a=e.loaded/e.total*100;t(a)}})).data}},extendToolbarClick:async(e,t,a,o,l)=>{var i,n;const s=await C.exec(t.id,{view:g.view,ctrl:g.ctrl,context:S.create(a),params:o,data:[l],event:e},t.appId);if(s.closeView)g.view.closeView({ok:!0});else if(s.refresh)switch(s.refreshMode){case 1:g.view.callUIAction(w.REFRESH);break;case 2:null==(i=g.view.parentView)||i.callUIAction(w.REFRESH);break;case 3:null==(n=g.view.getTopView())||n.callUIAction(w.REFRESH)}return s}}})})()}),a.on("lineAiClick",()=>{const e=a.getSelectionPosition();if(!e||!e.left||!e.top)return;const t=ibiz.inLineAIUtil.calcContextMenus(g.deACMode,e=>{g.doInLineAIUIAction(e,g.model.appId)});if(0===t.length)return;const o=a.getEditableContainer().getBoundingClientRect();ibiz.inLineAIUtil.showContextMenus(o.x+Number(e.left.replace("px","")),o.y+Number(e.top.replace("px",""))+42,t)})},_=a=>{const o=a.getHtml(),l="<p><br></p>"===o?"":o;l===e.value||""===l&&v(e.value)||!D.value&&a.isFocused()&&t("change",l)},G=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(()=>{n(()=>e.value,(t,a)=>{t===a||"string"!=typeof e.value&&null!=t||c(null==t?()=>{F.value=""}:()=>{F.value=t})},{immediate:!0}),n(()=>e.disabled,(e,t)=>{e!==t&&(!0===e?te():ae())},{immediate:!0})});const oe=()=>{R.value=!R.value,R.value?te():(ae(),M.value.focus(),(()=>{var t,a;if(e.value){const o=e.value.indexOf("</p>");if(o>=0){const e=null==(t=M.value.selection.anchor)?void 0:t.offset,l=null==(a=M.value.selection.anchor)?void 0:a.path;0===e&&l.length>0&&0===l[0]&&M.value.move(o-3)}}})())},le=()=>{N.value=!N.value,c(()=>{R.value?te():(ae(),M.value.focus())})};return r(()=>{y(0,()=>{if(A.value&&k.value){const e=A.value.offsetHeight;E=new ResizeObserver(t=>{const a=t[0].contentRect.height;if(a!==U){const o={height:"".concat(e-t[0].contentRect.height+(0!==a?300:0),"px"),"toolbar-height":"".concat(a,"px")};T.value=h.cssVarBlock(o),U=a}}),E.observe(k.value.selector)}})}),d(()=>{g.onDestroyed(),E&&E.disconnect(),Q&&Q.close()}),{ns:h,editorRef:M,mode:"default",valueHtml:F,toolbarConfig:J,editorConfig:Z,handleCreated:$,handleChange:_,handleDestroyed:G,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:()=>D.value||L.value?a("div",{class:h.b("custom-toolbar")},[D.value&&B.value&&R.value?a("i",{class:"fa fa-edit","aria-hidden":"true",title:ibiz.i18n.t("editor.html.enableedit"),onClick:()=>oe()},null):null,L.value?N.value?a("i",{class:"fa fa-compress","aria-hidden":"true",title:ibiz.i18n.t("editor.html.reduce"),onClick:()=>le()},null):a("i",{class:"fa fa-expand","aria-hidden":"true",title:ibiz.i18n.t("editor.html.expand"),onClick:()=>le()},null):null]):null,renderEditorContent:()=>a("div",{class:[h.b("content"),h.is("editing",!R.value)],ref:"htmlContent",style:T.value},[o.editorSwitchMenu?a("div",{class:h.b("menu")},[o.editorSwitchMenu()]):null,a(u,{ref:"toolbarRef",editor:M.value,"default-config":J,mode:"default",class:h.b("toolbar")},null),a(m,{class:[h.b("editor"),h.is("readonly",R.value)],modelValue:F.value,"onUpdate:modelValue":e=>F.value=e,"default-config":Z,mode:"default",onOnCreated:$,onOnChange:_,onOnDestroyed:G,onOnFocus:W,onOnBlur:X,oncustomAlert:Y,oncustomPaste:ee},null)]),renderFooter:()=>D.value?a("div",{class:[h.b("footer"),{[h.b("footer-dialog")]:N.value}]},[a("div",{class:h.be("footer","cancel"),onClick:()=>{e.value!==F.value?z({title:ibiz.i18n.t("editor.common.confirmCancel"),type:"warning",customClass:h.b("message"),message:a("div",{class:h.be("message","message-content")},[a("p",null,[ibiz.i18n.t("editor.common.confirmCancelPrompt")]),a("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(()=>{F.value=e.value||"",oe()}).catch(()=>{M.value.focus()}):oe()}},[ibiz.i18n.t("app.cancel")]),a("div",{class:h.be("footer","save"),onClick:()=>(()=>{R.value=!0,M.value.disable();const e=F.value;t("change",e),N.value&&(N.value=!1)})()},[ibiz.i18n.t("app.save")])]):null,htmlContent:A,hasEnableEdit:D,cssVars:T,toolbarRef:k,isFullScreen:N,readonlyState:R,changeFullScreenState:le}},render(){const e=!!this.$slots.editorSwitchMenu;return this.isFullScreen?a(o("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])}}))}}});