@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.
- package/dist/{index-RwYoggQd.js → index-HNRMy1_g.js} +1 -1
- package/dist/index-QB7iGpIB.js +4 -0
- package/dist/{index-s7g1-ymW.js → index-xa8K5AHD.js} +1 -1
- package/dist/index.min.css +1 -1
- package/dist/index.system.min.js +1 -1
- package/dist/wang-editor-YqnK5uQU.js +1 -0
- package/dist/{xlsx-util-Rf5FMxyR.js → xlsx-util-nADTbeWP.js} +1 -1
- package/es/common/action-toolbar/action-toolbar.mjs +1 -1
- package/es/common/custom-theme/custom-theme.mjs +1 -1
- package/es/common/data-import2/data-import2.mjs +4 -1
- package/es/control/context-menu/context-menu.mjs +2 -2
- package/es/control/dashboard/custom-dashboard-container/custom-dashboard-container.d.ts +0 -1
- package/es/control/dashboard/custom-dashboard-container/custom-dashboard-container.mjs +1 -1
- package/es/control/dashboard/dashboard-design/dashboard-design.mjs +3 -3
- package/es/control/drtab/drtab-control.util.mjs +7 -11
- package/es/control/form/form-detail/form-button/form-button.mjs +1 -1
- package/es/control/form/form-detail/form-item/form-item-container/form-item-container.css +1 -1
- package/es/control/form/form-detail/form-item/form-item-container/form-item-container.d.ts +28 -0
- package/es/control/form/form-detail/form-item/form-item-container/form-item-container.mjs +52 -7
- package/es/control/form/form-detail/form-item/form-item.mjs +4 -0
- package/es/control/grid/grid/grid-control.util.d.ts +0 -2
- package/es/control/grid/grid/grid-control.util.mjs +24 -83
- package/es/control/grid/grid/grid.css +1 -1
- package/es/control/grid/grid/grid.d.ts +0 -2
- package/es/control/grid/grid/grid.mjs +1 -7
- package/es/control/grid/grid/index.d.ts +0 -2
- package/es/control/report-panel/report-panel.mjs +5 -0
- package/es/control/search-bar/search-bar.mjs +2 -2
- package/es/control/toolbar/export-excel/export-excel.mjs +2 -2
- package/es/control/toolbar/short-cut-button/short-cut-button.mjs +4 -1
- package/es/control/toolbar/toolbar.css +1 -1
- package/es/control/toolbar/toolbar.mjs +146 -10
- package/es/control/tree/index.d.ts +9 -0
- package/es/control/tree/tree.d.ts +9 -0
- package/es/control/tree/tree.mjs +5 -1
- package/es/editor/data-picker/ibiz-mpicker/ibiz-mpicker.css +1 -1
- package/es/editor/data-picker/ibiz-picker/ibiz-picker.mjs +2 -2
- package/es/editor/data-picker/ibiz-picker-embed-view/ibiz-picker-embed-view.css +1 -1
- package/es/editor/data-picker/ibiz-picker-embed-view/ibiz-picker-embed-view.d.ts +4 -0
- package/es/editor/data-picker/ibiz-picker-embed-view/ibiz-picker-embed-view.mjs +48 -3
- package/es/editor/data-picker/ibiz-picker-select-view/ibiz-picker-select-view.mjs +2 -2
- package/es/editor/data-picker/picker-editor.controller.d.ts +2 -2
- package/es/editor/dropdown-list/dropdown-list-editor.controller.d.ts +6 -0
- package/es/editor/dropdown-list/dropdown-list-editor.controller.mjs +10 -1
- package/es/editor/dropdown-list/ibiz-dropdown/ibiz-dropdown.d.ts +1 -1
- package/es/editor/dropdown-list/ibiz-dropdown/ibiz-dropdown.mjs +17 -4
- package/es/editor/dropdown-list/ibiz-emoji-picker/ibiz-emoji-picker.css +1 -1
- package/es/editor/dropdown-list/ibiz-emoji-picker/ibiz-emoji-picker.d.ts +3 -1
- package/es/editor/dropdown-list/ibiz-emoji-picker/ibiz-emoji-picker.mjs +26 -12
- package/es/editor/html/html-editor.controller.d.ts +88 -0
- package/es/editor/html/html-editor.controller.mjs +169 -6
- package/es/editor/html/wang-editor/component/emoji/emoji.css +1 -0
- package/es/editor/html/wang-editor/component/emoji/emoji.d.ts +17 -0
- package/es/editor/html/wang-editor/component/emoji/emoji.mjs +42 -0
- package/es/editor/html/wang-editor/component/index.d.ts +1 -0
- package/es/editor/html/wang-editor/component/index.mjs +3 -0
- package/es/editor/html/wang-editor/element/emoji.d.ts +7 -0
- package/es/editor/html/wang-editor/element/emoji.mjs +22 -0
- package/es/editor/html/wang-editor/element/index.d.ts +1 -0
- package/es/editor/html/wang-editor/element/index.mjs +3 -0
- package/es/editor/html/wang-editor/index.d.ts +4 -0
- package/es/editor/html/wang-editor/index.mjs +11 -0
- package/es/editor/html/wang-editor/module/ai-module.d.ts +67 -0
- package/es/editor/html/wang-editor/module/ai-module.mjs +76 -0
- package/es/editor/html/wang-editor/module/emoji-module.d.ts +7 -0
- package/es/editor/html/wang-editor/module/emoji-module.mjs +125 -0
- package/es/editor/html/wang-editor/module/index.d.ts +2 -0
- package/es/editor/html/wang-editor/module/index.mjs +4 -0
- package/es/editor/html/wang-editor/plugin/index.d.ts +1 -0
- package/es/editor/html/wang-editor/plugin/index.mjs +3 -0
- package/es/editor/html/wang-editor/plugin/plugin.d.ts +7 -0
- package/es/editor/html/wang-editor/plugin/plugin.mjs +23 -0
- package/es/editor/html/wang-editor/wang-editor.css +1 -1
- package/es/editor/html/wang-editor/wang-editor.mjs +7 -7
- package/es/editor/span/span/span.mjs +3 -1
- package/es/editor/text-box/ibiz-input-number/ibiz-input-number.mjs +12 -10
- package/es/editor/text-box/input/input.mjs +3 -0
- package/es/editor/user/ibiz-searchcond-edit/ibiz-searchcond-edit.mjs +1 -1
- package/es/locale/en/index.d.ts +4 -0
- package/es/locale/en/index.mjs +5 -1
- package/es/locale/zh-CN/index.d.ts +4 -0
- package/es/locale/zh-CN/index.mjs +5 -1
- package/es/node_modules/.pnpm/snabbdom@3.5.1/node_modules/snabbdom/build/h.mjs +89 -0
- package/es/node_modules/.pnpm/snabbdom@3.5.1/node_modules/snabbdom/build/helpers/attachto.mjs +47 -0
- package/es/node_modules/.pnpm/snabbdom@3.5.1/node_modules/snabbdom/build/hooks.mjs +1 -0
- package/es/node_modules/.pnpm/snabbdom@3.5.1/node_modules/snabbdom/build/htmldomapi.mjs +115 -0
- package/es/node_modules/.pnpm/snabbdom@3.5.1/node_modules/snabbdom/build/index.mjs +18 -0
- package/es/node_modules/.pnpm/snabbdom@3.5.1/node_modules/snabbdom/build/init.mjs +376 -0
- package/es/node_modules/.pnpm/snabbdom@3.5.1/node_modules/snabbdom/build/is.mjs +9 -0
- package/es/node_modules/.pnpm/snabbdom@3.5.1/node_modules/snabbdom/build/jsx.mjs +64 -0
- package/es/node_modules/.pnpm/snabbdom@3.5.1/node_modules/snabbdom/build/modules/attributes.mjs +59 -0
- package/es/node_modules/.pnpm/snabbdom@3.5.1/node_modules/snabbdom/build/modules/class.mjs +28 -0
- package/es/node_modules/.pnpm/snabbdom@3.5.1/node_modules/snabbdom/build/modules/dataset.mjs +42 -0
- package/es/node_modules/.pnpm/snabbdom@3.5.1/node_modules/snabbdom/build/modules/eventlisteners.mjs +85 -0
- package/es/node_modules/.pnpm/snabbdom@3.5.1/node_modules/snabbdom/build/modules/props.mjs +24 -0
- package/es/node_modules/.pnpm/snabbdom@3.5.1/node_modules/snabbdom/build/modules/style.mjs +115 -0
- package/es/node_modules/.pnpm/snabbdom@3.5.1/node_modules/snabbdom/build/thunk.mjs +52 -0
- package/es/node_modules/.pnpm/snabbdom@3.5.1/node_modules/snabbdom/build/tovnode.mjs +62 -0
- package/es/node_modules/.pnpm/snabbdom@3.5.1/node_modules/snabbdom/build/vnode.mjs +6 -0
- package/es/panel-component/nav-tabs/nav-tabs.controller.mjs +3 -2
- package/es/panel-component/panel-button/panel-button.mjs +1 -1
- package/es/view-engine/edit-view.engine.mjs +3 -2
- package/es/view-engine/opt-view.engine.mjs +2 -1
- package/es/view-engine/pickup-tree-view.engine.mjs +1 -0
- package/es/web-app/attach-environment-config.mjs +2 -1
- package/lib/common/action-toolbar/action-toolbar.cjs +1 -1
- package/lib/common/custom-theme/custom-theme.cjs +1 -1
- package/lib/common/data-import2/data-import2.cjs +4 -1
- package/lib/control/context-menu/context-menu.cjs +2 -2
- package/lib/control/dashboard/custom-dashboard-container/custom-dashboard-container.cjs +1 -1
- package/lib/control/dashboard/dashboard-design/dashboard-design.cjs +3 -3
- package/lib/control/drtab/drtab-control.util.cjs +7 -11
- package/lib/control/form/form-detail/form-button/form-button.cjs +1 -1
- package/lib/control/form/form-detail/form-item/form-item-container/form-item-container.cjs +51 -6
- package/lib/control/form/form-detail/form-item/form-item-container/form-item-container.css +1 -1
- package/lib/control/form/form-detail/form-item/form-item.cjs +4 -0
- package/lib/control/grid/grid/grid-control.util.cjs +24 -83
- package/lib/control/grid/grid/grid.cjs +1 -7
- package/lib/control/grid/grid/grid.css +1 -1
- package/lib/control/report-panel/report-panel.cjs +5 -0
- package/lib/control/search-bar/search-bar.cjs +2 -2
- package/lib/control/toolbar/export-excel/export-excel.cjs +2 -2
- package/lib/control/toolbar/short-cut-button/short-cut-button.cjs +4 -1
- package/lib/control/toolbar/toolbar.cjs +146 -10
- package/lib/control/toolbar/toolbar.css +1 -1
- package/lib/control/tree/tree.cjs +5 -1
- package/lib/editor/data-picker/ibiz-mpicker/ibiz-mpicker.css +1 -1
- package/lib/editor/data-picker/ibiz-picker/ibiz-picker.cjs +2 -2
- package/lib/editor/data-picker/ibiz-picker-embed-view/ibiz-picker-embed-view.cjs +48 -3
- package/lib/editor/data-picker/ibiz-picker-embed-view/ibiz-picker-embed-view.css +1 -1
- package/lib/editor/data-picker/ibiz-picker-select-view/ibiz-picker-select-view.cjs +2 -2
- package/lib/editor/dropdown-list/dropdown-list-editor.controller.cjs +10 -1
- package/lib/editor/dropdown-list/ibiz-dropdown/ibiz-dropdown.cjs +17 -4
- package/lib/editor/dropdown-list/ibiz-emoji-picker/ibiz-emoji-picker.cjs +24 -10
- package/lib/editor/dropdown-list/ibiz-emoji-picker/ibiz-emoji-picker.css +1 -1
- package/lib/editor/html/html-editor.controller.cjs +169 -6
- package/lib/editor/html/wang-editor/component/emoji/emoji.cjs +44 -0
- package/lib/editor/html/wang-editor/component/emoji/emoji.css +1 -0
- package/lib/editor/html/wang-editor/component/index.cjs +7 -0
- package/lib/editor/html/wang-editor/element/emoji.cjs +24 -0
- package/lib/editor/html/wang-editor/element/index.cjs +7 -0
- package/lib/editor/html/wang-editor/index.cjs +19 -0
- package/lib/editor/html/wang-editor/module/ai-module.cjs +78 -0
- package/lib/editor/html/wang-editor/module/emoji-module.cjs +127 -0
- package/lib/editor/html/wang-editor/module/index.cjs +9 -0
- package/lib/editor/html/wang-editor/plugin/index.cjs +7 -0
- package/lib/editor/html/wang-editor/plugin/plugin.cjs +25 -0
- package/lib/editor/html/wang-editor/wang-editor.cjs +7 -7
- package/lib/editor/html/wang-editor/wang-editor.css +1 -1
- package/lib/editor/span/span/span.cjs +2 -0
- package/lib/editor/text-box/ibiz-input-number/ibiz-input-number.cjs +12 -10
- package/lib/editor/text-box/input/input.cjs +3 -0
- package/lib/editor/user/ibiz-searchcond-edit/ibiz-searchcond-edit.cjs +1 -1
- package/lib/locale/en/index.cjs +5 -1
- package/lib/locale/zh-CN/index.cjs +5 -1
- package/lib/node_modules/.pnpm/snabbdom@3.5.1/node_modules/snabbdom/build/h.cjs +93 -0
- package/lib/node_modules/.pnpm/snabbdom@3.5.1/node_modules/snabbdom/build/helpers/attachto.cjs +49 -0
- package/lib/node_modules/.pnpm/snabbdom@3.5.1/node_modules/snabbdom/build/hooks.cjs +2 -0
- package/lib/node_modules/.pnpm/snabbdom@3.5.1/node_modules/snabbdom/build/htmldomapi.cjs +117 -0
- package/lib/node_modules/.pnpm/snabbdom@3.5.1/node_modules/snabbdom/build/index.cjs +42 -0
- package/lib/node_modules/.pnpm/snabbdom@3.5.1/node_modules/snabbdom/build/init.cjs +378 -0
- package/lib/node_modules/.pnpm/snabbdom@3.5.1/node_modules/snabbdom/build/is.cjs +12 -0
- package/lib/node_modules/.pnpm/snabbdom@3.5.1/node_modules/snabbdom/build/jsx.cjs +67 -0
- package/lib/node_modules/.pnpm/snabbdom@3.5.1/node_modules/snabbdom/build/modules/attributes.cjs +61 -0
- package/lib/node_modules/.pnpm/snabbdom@3.5.1/node_modules/snabbdom/build/modules/class.cjs +30 -0
- package/lib/node_modules/.pnpm/snabbdom@3.5.1/node_modules/snabbdom/build/modules/dataset.cjs +44 -0
- package/lib/node_modules/.pnpm/snabbdom@3.5.1/node_modules/snabbdom/build/modules/eventlisteners.cjs +87 -0
- package/lib/node_modules/.pnpm/snabbdom@3.5.1/node_modules/snabbdom/build/modules/props.cjs +26 -0
- package/lib/node_modules/.pnpm/snabbdom@3.5.1/node_modules/snabbdom/build/modules/style.cjs +117 -0
- package/lib/node_modules/.pnpm/snabbdom@3.5.1/node_modules/snabbdom/build/thunk.cjs +54 -0
- package/lib/node_modules/.pnpm/snabbdom@3.5.1/node_modules/snabbdom/build/tovnode.cjs +64 -0
- package/lib/node_modules/.pnpm/snabbdom@3.5.1/node_modules/snabbdom/build/vnode.cjs +8 -0
- package/lib/panel-component/nav-tabs/nav-tabs.controller.cjs +3 -2
- package/lib/panel-component/panel-button/panel-button.cjs +1 -1
- package/lib/view-engine/edit-view.engine.cjs +3 -2
- package/lib/view-engine/opt-view.engine.cjs +2 -1
- package/lib/view-engine/pickup-tree-view.engine.cjs +1 -0
- package/lib/web-app/attach-environment-config.cjs +2 -1
- package/package.json +8 -7
- package/dist/index-28jZm-aB.js +0 -4
- package/dist/wang-editor-XpJH4SXt.js +0 -1
- package/es/editor/html/wang-editor/ai/ai-modules.d.ts +0 -10
- package/es/editor/html/wang-editor/ai/ai-modules.mjs +0 -32
- package/lib/editor/html/wang-editor/ai/ai-modules.cjs +0 -34
- /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
- /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;
|