@ibiz-template/vue3-components 0.7.26 → 0.7.28-alpha.0

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 (186) hide show
  1. package/dist/{index-RwYoggQd.js → index-HNRMy1_g.js} +1 -1
  2. package/dist/index-QB7iGpIB.js +4 -0
  3. package/dist/{index-s7g1-ymW.js → index-xa8K5AHD.js} +1 -1
  4. package/dist/index.min.css +1 -1
  5. package/dist/index.system.min.js +1 -1
  6. package/dist/wang-editor-YqnK5uQU.js +1 -0
  7. package/dist/{xlsx-util-Rf5FMxyR.js → xlsx-util-nADTbeWP.js} +1 -1
  8. package/es/common/action-toolbar/action-toolbar.mjs +1 -1
  9. package/es/common/custom-theme/custom-theme.mjs +1 -1
  10. package/es/common/data-import2/data-import2.mjs +4 -1
  11. package/es/control/context-menu/context-menu.mjs +2 -2
  12. package/es/control/dashboard/custom-dashboard-container/custom-dashboard-container.d.ts +0 -1
  13. package/es/control/dashboard/custom-dashboard-container/custom-dashboard-container.mjs +1 -1
  14. package/es/control/dashboard/dashboard-design/dashboard-design.mjs +3 -3
  15. package/es/control/drtab/drtab-control.util.mjs +7 -11
  16. package/es/control/form/form-detail/form-button/form-button.mjs +1 -1
  17. package/es/control/form/form-detail/form-item/form-item-container/form-item-container.css +1 -1
  18. package/es/control/form/form-detail/form-item/form-item-container/form-item-container.d.ts +28 -0
  19. package/es/control/form/form-detail/form-item/form-item-container/form-item-container.mjs +52 -7
  20. package/es/control/form/form-detail/form-item/form-item.mjs +4 -0
  21. package/es/control/grid/grid/grid-control.util.d.ts +0 -2
  22. package/es/control/grid/grid/grid-control.util.mjs +24 -83
  23. package/es/control/grid/grid/grid.css +1 -1
  24. package/es/control/grid/grid/grid.d.ts +0 -2
  25. package/es/control/grid/grid/grid.mjs +1 -7
  26. package/es/control/grid/grid/index.d.ts +0 -2
  27. package/es/control/report-panel/report-panel.mjs +5 -0
  28. package/es/control/search-bar/search-bar.mjs +2 -2
  29. package/es/control/toolbar/export-excel/export-excel.mjs +2 -2
  30. package/es/control/toolbar/short-cut-button/short-cut-button.mjs +4 -1
  31. package/es/control/toolbar/toolbar.css +1 -1
  32. package/es/control/toolbar/toolbar.mjs +146 -10
  33. package/es/control/tree/index.d.ts +9 -0
  34. package/es/control/tree/tree.d.ts +9 -0
  35. package/es/control/tree/tree.mjs +5 -1
  36. package/es/editor/data-picker/ibiz-mpicker/ibiz-mpicker.css +1 -1
  37. package/es/editor/data-picker/ibiz-picker/ibiz-picker.mjs +2 -2
  38. package/es/editor/data-picker/ibiz-picker-embed-view/ibiz-picker-embed-view.css +1 -1
  39. package/es/editor/data-picker/ibiz-picker-embed-view/ibiz-picker-embed-view.d.ts +4 -0
  40. package/es/editor/data-picker/ibiz-picker-embed-view/ibiz-picker-embed-view.mjs +48 -3
  41. package/es/editor/data-picker/ibiz-picker-select-view/ibiz-picker-select-view.mjs +2 -2
  42. package/es/editor/data-picker/picker-editor.controller.d.ts +2 -2
  43. package/es/editor/dropdown-list/dropdown-list-editor.controller.d.ts +6 -0
  44. package/es/editor/dropdown-list/dropdown-list-editor.controller.mjs +10 -1
  45. package/es/editor/dropdown-list/ibiz-dropdown/ibiz-dropdown.d.ts +1 -1
  46. package/es/editor/dropdown-list/ibiz-dropdown/ibiz-dropdown.mjs +17 -4
  47. package/es/editor/dropdown-list/ibiz-emoji-picker/ibiz-emoji-picker.css +1 -1
  48. package/es/editor/dropdown-list/ibiz-emoji-picker/ibiz-emoji-picker.d.ts +3 -1
  49. package/es/editor/dropdown-list/ibiz-emoji-picker/ibiz-emoji-picker.mjs +26 -12
  50. package/es/editor/html/html-editor.controller.d.ts +88 -0
  51. package/es/editor/html/html-editor.controller.mjs +169 -6
  52. package/es/editor/html/wang-editor/component/emoji/emoji.css +1 -0
  53. package/es/editor/html/wang-editor/component/emoji/emoji.d.ts +17 -0
  54. package/es/editor/html/wang-editor/component/emoji/emoji.mjs +42 -0
  55. package/es/editor/html/wang-editor/component/index.d.ts +1 -0
  56. package/es/editor/html/wang-editor/component/index.mjs +3 -0
  57. package/es/editor/html/wang-editor/element/emoji.d.ts +7 -0
  58. package/es/editor/html/wang-editor/element/emoji.mjs +22 -0
  59. package/es/editor/html/wang-editor/element/index.d.ts +1 -0
  60. package/es/editor/html/wang-editor/element/index.mjs +3 -0
  61. package/es/editor/html/wang-editor/index.d.ts +4 -0
  62. package/es/editor/html/wang-editor/index.mjs +11 -0
  63. package/es/editor/html/wang-editor/module/ai-module.d.ts +67 -0
  64. package/es/editor/html/wang-editor/module/ai-module.mjs +76 -0
  65. package/es/editor/html/wang-editor/module/emoji-module.d.ts +7 -0
  66. package/es/editor/html/wang-editor/module/emoji-module.mjs +125 -0
  67. package/es/editor/html/wang-editor/module/index.d.ts +2 -0
  68. package/es/editor/html/wang-editor/module/index.mjs +4 -0
  69. package/es/editor/html/wang-editor/plugin/index.d.ts +1 -0
  70. package/es/editor/html/wang-editor/plugin/index.mjs +3 -0
  71. package/es/editor/html/wang-editor/plugin/plugin.d.ts +7 -0
  72. package/es/editor/html/wang-editor/plugin/plugin.mjs +23 -0
  73. package/es/editor/html/wang-editor/wang-editor.css +1 -1
  74. package/es/editor/html/wang-editor/wang-editor.mjs +7 -7
  75. package/es/editor/span/span/span.mjs +3 -1
  76. package/es/editor/text-box/ibiz-input-number/ibiz-input-number.mjs +12 -10
  77. package/es/editor/text-box/input/input.mjs +3 -0
  78. package/es/editor/user/ibiz-searchcond-edit/ibiz-searchcond-edit.mjs +1 -1
  79. package/es/locale/en/index.d.ts +4 -0
  80. package/es/locale/en/index.mjs +5 -1
  81. package/es/locale/zh-CN/index.d.ts +4 -0
  82. package/es/locale/zh-CN/index.mjs +5 -1
  83. package/es/node_modules/.pnpm/snabbdom@3.5.1/node_modules/snabbdom/build/h.mjs +89 -0
  84. package/es/node_modules/.pnpm/snabbdom@3.5.1/node_modules/snabbdom/build/helpers/attachto.mjs +47 -0
  85. package/es/node_modules/.pnpm/snabbdom@3.5.1/node_modules/snabbdom/build/hooks.mjs +1 -0
  86. package/es/node_modules/.pnpm/snabbdom@3.5.1/node_modules/snabbdom/build/htmldomapi.mjs +115 -0
  87. package/es/node_modules/.pnpm/snabbdom@3.5.1/node_modules/snabbdom/build/index.mjs +18 -0
  88. package/es/node_modules/.pnpm/snabbdom@3.5.1/node_modules/snabbdom/build/init.mjs +376 -0
  89. package/es/node_modules/.pnpm/snabbdom@3.5.1/node_modules/snabbdom/build/is.mjs +9 -0
  90. package/es/node_modules/.pnpm/snabbdom@3.5.1/node_modules/snabbdom/build/jsx.mjs +64 -0
  91. package/es/node_modules/.pnpm/snabbdom@3.5.1/node_modules/snabbdom/build/modules/attributes.mjs +59 -0
  92. package/es/node_modules/.pnpm/snabbdom@3.5.1/node_modules/snabbdom/build/modules/class.mjs +28 -0
  93. package/es/node_modules/.pnpm/snabbdom@3.5.1/node_modules/snabbdom/build/modules/dataset.mjs +42 -0
  94. package/es/node_modules/.pnpm/snabbdom@3.5.1/node_modules/snabbdom/build/modules/eventlisteners.mjs +85 -0
  95. package/es/node_modules/.pnpm/snabbdom@3.5.1/node_modules/snabbdom/build/modules/props.mjs +24 -0
  96. package/es/node_modules/.pnpm/snabbdom@3.5.1/node_modules/snabbdom/build/modules/style.mjs +115 -0
  97. package/es/node_modules/.pnpm/snabbdom@3.5.1/node_modules/snabbdom/build/thunk.mjs +52 -0
  98. package/es/node_modules/.pnpm/snabbdom@3.5.1/node_modules/snabbdom/build/tovnode.mjs +62 -0
  99. package/es/node_modules/.pnpm/snabbdom@3.5.1/node_modules/snabbdom/build/vnode.mjs +6 -0
  100. package/es/panel-component/nav-tabs/nav-tabs.controller.mjs +3 -2
  101. package/es/panel-component/panel-button/panel-button.mjs +1 -1
  102. package/es/view-engine/edit-view.engine.mjs +3 -2
  103. package/es/view-engine/opt-view.engine.mjs +2 -1
  104. package/es/view-engine/pickup-tree-view.engine.mjs +1 -0
  105. package/es/web-app/attach-environment-config.mjs +2 -1
  106. package/lib/common/action-toolbar/action-toolbar.cjs +1 -1
  107. package/lib/common/custom-theme/custom-theme.cjs +1 -1
  108. package/lib/common/data-import2/data-import2.cjs +4 -1
  109. package/lib/control/context-menu/context-menu.cjs +2 -2
  110. package/lib/control/dashboard/custom-dashboard-container/custom-dashboard-container.cjs +1 -1
  111. package/lib/control/dashboard/dashboard-design/dashboard-design.cjs +3 -3
  112. package/lib/control/drtab/drtab-control.util.cjs +7 -11
  113. package/lib/control/form/form-detail/form-button/form-button.cjs +1 -1
  114. package/lib/control/form/form-detail/form-item/form-item-container/form-item-container.cjs +51 -6
  115. package/lib/control/form/form-detail/form-item/form-item-container/form-item-container.css +1 -1
  116. package/lib/control/form/form-detail/form-item/form-item.cjs +4 -0
  117. package/lib/control/grid/grid/grid-control.util.cjs +24 -83
  118. package/lib/control/grid/grid/grid.cjs +1 -7
  119. package/lib/control/grid/grid/grid.css +1 -1
  120. package/lib/control/report-panel/report-panel.cjs +5 -0
  121. package/lib/control/search-bar/search-bar.cjs +2 -2
  122. package/lib/control/toolbar/export-excel/export-excel.cjs +2 -2
  123. package/lib/control/toolbar/short-cut-button/short-cut-button.cjs +4 -1
  124. package/lib/control/toolbar/toolbar.cjs +146 -10
  125. package/lib/control/toolbar/toolbar.css +1 -1
  126. package/lib/control/tree/tree.cjs +5 -1
  127. package/lib/editor/data-picker/ibiz-mpicker/ibiz-mpicker.css +1 -1
  128. package/lib/editor/data-picker/ibiz-picker/ibiz-picker.cjs +2 -2
  129. package/lib/editor/data-picker/ibiz-picker-embed-view/ibiz-picker-embed-view.cjs +48 -3
  130. package/lib/editor/data-picker/ibiz-picker-embed-view/ibiz-picker-embed-view.css +1 -1
  131. package/lib/editor/data-picker/ibiz-picker-select-view/ibiz-picker-select-view.cjs +2 -2
  132. package/lib/editor/dropdown-list/dropdown-list-editor.controller.cjs +10 -1
  133. package/lib/editor/dropdown-list/ibiz-dropdown/ibiz-dropdown.cjs +17 -4
  134. package/lib/editor/dropdown-list/ibiz-emoji-picker/ibiz-emoji-picker.cjs +24 -10
  135. package/lib/editor/dropdown-list/ibiz-emoji-picker/ibiz-emoji-picker.css +1 -1
  136. package/lib/editor/html/html-editor.controller.cjs +169 -6
  137. package/lib/editor/html/wang-editor/component/emoji/emoji.cjs +44 -0
  138. package/lib/editor/html/wang-editor/component/emoji/emoji.css +1 -0
  139. package/lib/editor/html/wang-editor/component/index.cjs +7 -0
  140. package/lib/editor/html/wang-editor/element/emoji.cjs +24 -0
  141. package/lib/editor/html/wang-editor/element/index.cjs +7 -0
  142. package/lib/editor/html/wang-editor/index.cjs +19 -0
  143. package/lib/editor/html/wang-editor/module/ai-module.cjs +78 -0
  144. package/lib/editor/html/wang-editor/module/emoji-module.cjs +127 -0
  145. package/lib/editor/html/wang-editor/module/index.cjs +9 -0
  146. package/lib/editor/html/wang-editor/plugin/index.cjs +7 -0
  147. package/lib/editor/html/wang-editor/plugin/plugin.cjs +25 -0
  148. package/lib/editor/html/wang-editor/wang-editor.cjs +7 -7
  149. package/lib/editor/html/wang-editor/wang-editor.css +1 -1
  150. package/lib/editor/span/span/span.cjs +2 -0
  151. package/lib/editor/text-box/ibiz-input-number/ibiz-input-number.cjs +12 -10
  152. package/lib/editor/text-box/input/input.cjs +3 -0
  153. package/lib/editor/user/ibiz-searchcond-edit/ibiz-searchcond-edit.cjs +1 -1
  154. package/lib/locale/en/index.cjs +5 -1
  155. package/lib/locale/zh-CN/index.cjs +5 -1
  156. package/lib/node_modules/.pnpm/snabbdom@3.5.1/node_modules/snabbdom/build/h.cjs +93 -0
  157. package/lib/node_modules/.pnpm/snabbdom@3.5.1/node_modules/snabbdom/build/helpers/attachto.cjs +49 -0
  158. package/lib/node_modules/.pnpm/snabbdom@3.5.1/node_modules/snabbdom/build/hooks.cjs +2 -0
  159. package/lib/node_modules/.pnpm/snabbdom@3.5.1/node_modules/snabbdom/build/htmldomapi.cjs +117 -0
  160. package/lib/node_modules/.pnpm/snabbdom@3.5.1/node_modules/snabbdom/build/index.cjs +42 -0
  161. package/lib/node_modules/.pnpm/snabbdom@3.5.1/node_modules/snabbdom/build/init.cjs +378 -0
  162. package/lib/node_modules/.pnpm/snabbdom@3.5.1/node_modules/snabbdom/build/is.cjs +12 -0
  163. package/lib/node_modules/.pnpm/snabbdom@3.5.1/node_modules/snabbdom/build/jsx.cjs +67 -0
  164. package/lib/node_modules/.pnpm/snabbdom@3.5.1/node_modules/snabbdom/build/modules/attributes.cjs +61 -0
  165. package/lib/node_modules/.pnpm/snabbdom@3.5.1/node_modules/snabbdom/build/modules/class.cjs +30 -0
  166. package/lib/node_modules/.pnpm/snabbdom@3.5.1/node_modules/snabbdom/build/modules/dataset.cjs +44 -0
  167. package/lib/node_modules/.pnpm/snabbdom@3.5.1/node_modules/snabbdom/build/modules/eventlisteners.cjs +87 -0
  168. package/lib/node_modules/.pnpm/snabbdom@3.5.1/node_modules/snabbdom/build/modules/props.cjs +26 -0
  169. package/lib/node_modules/.pnpm/snabbdom@3.5.1/node_modules/snabbdom/build/modules/style.cjs +117 -0
  170. package/lib/node_modules/.pnpm/snabbdom@3.5.1/node_modules/snabbdom/build/thunk.cjs +54 -0
  171. package/lib/node_modules/.pnpm/snabbdom@3.5.1/node_modules/snabbdom/build/tovnode.cjs +64 -0
  172. package/lib/node_modules/.pnpm/snabbdom@3.5.1/node_modules/snabbdom/build/vnode.cjs +8 -0
  173. package/lib/panel-component/nav-tabs/nav-tabs.controller.cjs +3 -2
  174. package/lib/panel-component/panel-button/panel-button.cjs +1 -1
  175. package/lib/view-engine/edit-view.engine.cjs +3 -2
  176. package/lib/view-engine/opt-view.engine.cjs +2 -1
  177. package/lib/view-engine/pickup-tree-view.engine.cjs +1 -0
  178. package/lib/web-app/attach-environment-config.cjs +2 -1
  179. package/package.json +8 -7
  180. package/dist/index-28jZm-aB.js +0 -4
  181. package/dist/wang-editor-XpJH4SXt.js +0 -1
  182. package/es/editor/html/wang-editor/ai/ai-modules.d.ts +0 -10
  183. package/es/editor/html/wang-editor/ai/ai-modules.mjs +0 -32
  184. package/lib/editor/html/wang-editor/ai/ai-modules.cjs +0 -34
  185. /package/es/node_modules/.pnpm/{@ibiz-template_core@0.7.26_axios@1.6.8_lodash-es@4.17.21_qs@6.11.2_qx-util@0.4.8_ramda@0.29.1 → @ibiz-template_core@0.7.28-alpha.0_axios@1.6.8_lodash-es@4.17.21_qs@6.11.2_qx-util@0.4.8_ramda@0.29.1}/node_modules/@ibiz-template/core/out/utils/namespace/namespace.mjs +0 -0
  186. /package/lib/node_modules/.pnpm/{@ibiz-template_core@0.7.26_axios@1.6.8_lodash-es@4.17.21_qs@6.11.2_qx-util@0.4.8_ramda@0.29.1 → @ibiz-template_core@0.7.28-alpha.0_axios@1.6.8_lodash-es@4.17.21_qs@6.11.2_qx-util@0.4.8_ramda@0.29.1}/node_modules/@ibiz-template/core/out/utils/namespace/namespace.cjs +0 -0
@@ -1 +0,0 @@
1
- System.register(["vue","@wangeditor/editor-for-vue","qx-util","ramda","@ibiz-template/vue3-util","@ibiz-template/core","element-plus"],(function(e,t){"use strict";var a,l,n,o,s,i,r,c,u,d,v,m,h,f,g,p,b,S,C,y,E;return{setters:[function(e){a=e.defineComponent,l=e.ref,n=e.shallowRef,o=e.watch,s=e.onBeforeUnmount,i=e.onMounted,r=e.nextTick,c=e.onUnmounted,u=e.createVNode,d=e.resolveComponent},function(e){v=e.Toolbar,m=e.Editor},function(e){h=e.getCookie,f=e.createUUID},function(e){g=e.isNil},function(e){p=e.getHtmlProps,b=e.getEditorEmits,S=e.useNamespace},function(e){C=e.CoreConst,y=e.awaitTimeout},function(e){E=e.ElMessageBox}],execute:function(){e("default",a({name:"IBizHtml",props:p(),emits:b(),setup(e,{emit:a}){const d=S("html"),p=e.controller,b=l(),F=l({});let T=null,k=0;const U=l(),w=n(),A=l(""),x=l({Authorization:"Bearer ".concat(h(C.TOKEN))}),z=l(""),B=l(""),H=l(!0),N=l(!1),O=l(!1),P=l(!1),L=l(!1),R=p.model;R.editorParams&&(R.editorParams.enableEdit&&(N.value=!0,O.value=!0,H.value=p.toBoolean(R.editorParams.enableEdit)&&!e.readonly&&!e.disabled),R.editorParams.enableFullScreen&&(P.value=p.toBoolean(R.editorParams.enableFullScreen))),e.readonly&&(N.value=!1,O.value=!0),o((()=>e.data),(e=>{if(e){const t=ibiz.util.file.calcFileUpDownUrl(p.context,p.params,e,p.editorParams);z.value=t.uploadUrl,B.value=t.downloadUrl}}),{immediate:!0,deep:!0});const I=(e,t)=>{if(t)return!0},D=e=>e,M={excludeKeys:["group-video"]};p.chatCompletion&&(M.insertKeys={index:60,keys:["|","aichart"]});const V={placeholder:p.placeHolder,readOnly:N.value?O.value:e.readonly,MENU_CONF:{uploadImage:{server:z.value,fieldName:"file",maxFileSize:10485760,maxNumberOfFiles:10,allowedFileTypes:[],headers:x.value,withCredentials:!0,onBeforeUpload:e=>e,onProgress(e){console.log("progress",e)},onSuccess(e,t){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(e,t){t(B.value.replace("%fileId%",e.id),e.filename,"")}},insertLink:{checkLink:I,parseLinkUrl:D},editLink:{checkLink:I,parseLinkUrl:D}}};let K;s((()=>{const e=w.value;null!=e&&e.destroy()}));const q=e=>{w.value=e,e.setHtml(A.value),e.on("aiClick",(()=>{(async()=>{var e;if(p.deService){const l=await t.import("@ibiz-template-plugin/ai-chat"),n=l.chat||l.default.chat;K=n;const o=n.create({question:async e=>{var t;const a=f();return await(null==(t=p.deService)?void 0:t.aiChatSse((e=>{if(ibiz.log.info("aiChatSse",e),20===e.actionstate&&e.actionresult)o.addMessage({messageid:a,state:e.actionstate,type:"DEFAULT",role:"ASSISTANT",content:e.actionresult});else if(30===e.actionstate&&e.actionresult){const t=JSON.parse(e.actionresult).choices;t&&t.length>0&&o.replaceMessage({messageid:a,state:e.actionstate,type:"DEFAULT",role:"ASSISTANT",content:t[0].content||""})}else 40===e.actionstate&&o.replaceMessage({messageid:a,state:e.actionstate,type:"ERROR",role:"ASSISTANT",content:e.actionresult})}),p.context,{},{messages:e})),o.addMessage({messageid:a,state:10,type:"DEFAULT",role:"ASSISTANT",content:""}),!0},action:(e,t)=>{"backfill"===e&&(N.value?A.value=t.content:a("change",t.content))}}),s=await(null==(e=p.deService)?void 0:e.aiChatHistory(p.context,{}));s.data&&Array.isArray(s.data)&&s.data.forEach((e=>{const t={messageid:f(),state:30,type:"DEFAULT",role:e.role,content:e.content};o.addMessage(t)}))}})()}))},J=t=>{const l=t.getHtml(),n="<p><br></p>"===l?"":l;n===e.value||""===n&&g(e.value)||!N.value&&t.isFocused()&&a("change",n)},_=e=>{},j=e=>{a("focus")},G=e=>{a("blur")},Q=(e,t)=>{alert("【".concat(ibiz.i18n.t("editor.html.wangEditor.customTips"),"】").concat(t," - ").concat(e))},W=(e,t,a)=>{a(!0)},X=()=>{const e=w.value;null!=e&&e.disable()},Y=()=>{const e=w.value;null!=e&&e.enable()};i((()=>{o((()=>e.value),((t,a)=>{t===a||"string"!=typeof e.value&&null!=t||r(null==t?()=>{A.value=""}:()=>{A.value=t})}),{immediate:!0}),o((()=>e.disabled),((e,t)=>{e!==t&&(!0===e?X():Y())}),{immediate:!0})}));const Z=()=>{O.value=!O.value,O.value?X():(Y(),w.value.focus(),(()=>{var t,a;if(e.value){const l=e.value.indexOf("</p>");if(l>=0){const e=null==(t=w.value.selection.anchor)?void 0:t.offset,n=null==(a=w.value.selection.anchor)?void 0:a.path;0===e&&n.length>0&&0===n[0]&&w.value.move(l-3)}}})())},$=()=>{L.value=!L.value,r((()=>{O.value?X():(Y(),w.value.focus())}))};return i((()=>{y(0,(()=>{if(b.value&&U.value){const e=b.value.offsetHeight;T=new ResizeObserver((t=>{const a=t[0].contentRect.height;if(a!==k){const l={height:"".concat(e-t[0].contentRect.height+(0!==a?300:0),"px")};F.value=d.cssVarBlock(l),k=a}})),T.observe(U.value.selector)}}))})),c((()=>{T&&T.disconnect(),K&&K.close()})),{ns:d,editorRef:w,mode:"default",valueHtml:A,toolbarConfig:M,editorConfig:V,handleCreated:q,handleChange:J,handleDestroyed:_,handleFocus:j,handleBlur:G,customAlert:Q,customPaste:W,insertText:e=>{const t=w.value;null!=t&&t.insertText(e)},printHtml:()=>{const e=w.value;null!=e&&console.log(e.getHtml())},disable:X,enable:Y,renderHeaserToolbar:()=>N.value||P.value?u("div",{class:d.b("custom-toolbar")},[N.value&&H.value&&O.value?u("i",{class:"fa fa-edit","aria-hidden":"true",onClick:()=>Z()},null):null,P.value?L.value?u("i",{class:"fa fa-compress","aria-hidden":"true",onClick:()=>$()},null):u("i",{class:"fa fa-expand","aria-hidden":"true",onClick:()=>$()},null):null]):null,renderEditorContent:()=>u("div",{class:d.b("content"),ref:"htmlContent",style:F.value},[u(v,{ref:"toolbarRef",editor:w.value,"default-config":M,mode:"default",class:d.b("toolbar")},null),u(m,{class:[d.b("editor"),d.is("readonly",O.value)],modelValue:A.value,"onUpdate:modelValue":e=>A.value=e,"default-config":V,mode:"default",onOnCreated:q,onOnChange:J,onOnDestroyed:_,onOnFocus:j,onOnBlur:G,oncustomAlert:Q,oncustomPaste:W},null)]),renderFooter:()=>N.value?u("div",{class:[d.b("footer"),{[d.b("footer-dialog")]:L.value}]},[u("div",{class:d.be("footer","cancel"),onClick:()=>{e.value!==A.value?E({title:ibiz.i18n.t("editor.common.confirmCancel"),type:"warning",customClass:d.b("message"),message:u("div",{class:d.be("message","message-content")},[u("p",null,[ibiz.i18n.t("editor.common.confirmCancelPrompt")]),u("p",{class:d.bem("message","message-content","message-tip")},[ibiz.i18n.t("editor.common.cancelEditPrompt")])]),showCancelButton:!0,cancelButtonClass:d.be("message","message-cancel"),confirmButtonClass:d.be("message","message-comfire")}).then((()=>{A.value=e.value||"",Z()})).catch((()=>{w.value.focus()})):Z()}},[ibiz.i18n.t("app.cancel")]),u("div",{class:d.be("footer","save"),onClick:()=>(()=>{O.value=!0,w.value.disable();const e=A.value;a("change",e),L.value&&(L.value=!1)})()},[ibiz.i18n.t("app.save")])]):null,htmlContent:b,hasEnableEdit:N,cssVars:F,toolbarRef:U,isFullScreen:L,readonlyState:O,changeFullScreenState:$}},render(){return this.isFullScreen?u(d("el-dialog"),{modelValue:this.isFullScreen,"onUpdate:modelValue":e=>this.isFullScreen=e,width:"80%",top:"10vh",class:this.ns.b("dialog-full-screen"),onClose:()=>this.changeFullScreenState()},{default:()=>[u("div",{class:[this.ns.b(),{[this.ns.b("editor-readonly")]:this.readonlyState}]},[this.renderHeaserToolbar(),this.renderEditorContent(),this.hasEnableEdit&&!this.readonlyState?this.renderFooter():null])]}):u("div",{class:[this.ns.b(),{[this.ns.b("editor-readonly")]:this.readonlyState},this.ns.is("show-ai",!0)]},[this.renderHeaserToolbar(),this.renderEditorContent(),this.hasEnableEdit&&!this.readonlyState?this.renderFooter():null])}}))}}}));
@@ -1,10 +0,0 @@
1
- import { IButtonMenu, IDomEditor } from '@wangeditor/editor';
2
- export declare class AIMenu implements IButtonMenu {
3
- title: string;
4
- iconSvg: string;
5
- tag: string;
6
- isActive(editor: IDomEditor): boolean;
7
- getValue(editor: IDomEditor): string | boolean;
8
- isDisabled(editor: IDomEditor): boolean;
9
- exec(editor: IDomEditor, value: string | boolean): void;
10
- }
@@ -1,32 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
4
- var __publicField = (obj, key, value) => {
5
- __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
6
- return value;
7
- };
8
- class AIMenu {
9
- constructor() {
10
- __publicField(this, "title", "AI");
11
- __publicField(this, "iconSvg", '<svg xmlns="http://www.w3.org/2000/svg" version="1.1"> <text x="0" y="13" font-size="16" fill="black">AI</text></svg>');
12
- __publicField(this, "tag", "button");
13
- }
14
- // 菜单是否需要激活(如选中加粗文本,“加粗”菜单会激活),用不到则返回 false
15
- isActive(editor) {
16
- return false;
17
- }
18
- // 获取菜单执行时的 value ,用不到则返回空 字符串或 false
19
- getValue(editor) {
20
- return "aichart";
21
- }
22
- // 菜单是否需要禁用(如选中 H1 ,“引用”菜单被禁用),用不到则返回 false
23
- isDisabled(editor) {
24
- return false;
25
- }
26
- // 点击菜单时触发的函数
27
- exec(editor, value) {
28
- editor.emit("aiClick");
29
- }
30
- }
31
-
32
- export { AIMenu };
@@ -1,34 +0,0 @@
1
- 'use strict';
2
-
3
- "use strict";
4
- var __defProp = Object.defineProperty;
5
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
6
- var __publicField = (obj, key, value) => {
7
- __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
8
- return value;
9
- };
10
- class AIMenu {
11
- constructor() {
12
- __publicField(this, "title", "AI");
13
- __publicField(this, "iconSvg", '<svg xmlns="http://www.w3.org/2000/svg" version="1.1"> <text x="0" y="13" font-size="16" fill="black">AI</text></svg>');
14
- __publicField(this, "tag", "button");
15
- }
16
- // 菜单是否需要激活(如选中加粗文本,“加粗”菜单会激活),用不到则返回 false
17
- isActive(editor) {
18
- return false;
19
- }
20
- // 获取菜单执行时的 value ,用不到则返回空 字符串或 false
21
- getValue(editor) {
22
- return "aichart";
23
- }
24
- // 菜单是否需要禁用(如选中 H1 ,“引用”菜单被禁用),用不到则返回 false
25
- isDisabled(editor) {
26
- return false;
27
- }
28
- // 点击菜单时触发的函数
29
- exec(editor, value) {
30
- editor.emit("aiClick");
31
- }
32
- }
33
-
34
- exports.AIMenu = AIMenu;