@ibiz-template/vue3-components 0.7.41-alpha.37 → 0.7.41-alpha.38

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 (68) hide show
  1. package/dist/ibiz-markdown-editor-qRaayafj.js +1 -0
  2. package/dist/index-BiYphJ2f.js +11 -0
  3. package/dist/{index-BFGNWF-0.js → index-C28lnh2e.js} +1 -1
  4. package/dist/{index-BiFsbM1Y.js → index-Dp8ExwuL.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-DDVqSnRX.js +1 -0
  8. package/dist/{xlsx-util-DZ5-cWNj.js → xlsx-util-BMANxyk-.js} +1 -1
  9. package/es/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/form-mdctrl-repeater.mjs +10 -0
  10. package/es/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/repeater-grid2/repeater-grid2.css +1 -0
  11. package/es/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/repeater-grid2/repeater-grid2.mjs +309 -0
  12. package/es/editor/code/code-editor.controller.mjs +176 -1
  13. package/es/editor/code/monaco-editor/monaco-editor.css +1 -1
  14. package/es/editor/code/monaco-editor/monaco-editor.mjs +116 -6
  15. package/es/editor/html/html-editor.controller.mjs +77 -2
  16. package/es/editor/html/wang-editor/index.mjs +1 -0
  17. package/es/editor/html/wang-editor/module/index.mjs +1 -0
  18. package/es/editor/html/wang-editor/module/inline-ai-module.mjs +95 -0
  19. package/es/editor/html/wang-editor/wang-editor.css +1 -1
  20. package/es/editor/html/wang-editor/wang-editor.mjs +35 -4
  21. package/es/editor/markdown/ibiz-markdown-editor/custom-menu.mjs +45 -0
  22. package/es/editor/markdown/ibiz-markdown-editor/ibiz-markdown-editor.css +1 -1
  23. package/es/editor/markdown/ibiz-markdown-editor/ibiz-markdown-editor.mjs +109 -13
  24. package/es/editor/markdown/markdown-editor.controller.mjs +113 -1
  25. package/es/index.mjs +1 -0
  26. package/es/locale/en/index.mjs +15 -2
  27. package/es/locale/zh-CN/index.mjs +15 -2
  28. package/es/util/ai-util/ai-util.mjs +6 -2
  29. package/es/util/app-util/app-util.mjs +41 -2
  30. package/es/util/index.mjs +1 -0
  31. package/es/util/inline-ai-util/inline-ai-textarea/icon.mjs +142 -0
  32. package/es/util/inline-ai-util/inline-ai-textarea/inline-ai-textarea.css +1 -0
  33. package/es/util/inline-ai-util/inline-ai-textarea/inline-ai-textarea.hook.mjs +162 -0
  34. package/es/util/inline-ai-util/inline-ai-textarea/inline-ai-textarea.mjs +205 -0
  35. package/es/util/inline-ai-util/inline-ai-util.mjs +145 -0
  36. package/es/web-app/main.mjs +2 -0
  37. package/lib/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/form-mdctrl-repeater.cjs +10 -0
  38. package/lib/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/repeater-grid2/repeater-grid2.cjs +311 -0
  39. package/lib/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/repeater-grid2/repeater-grid2.css +1 -0
  40. package/lib/editor/code/code-editor.controller.cjs +175 -0
  41. package/lib/editor/code/monaco-editor/monaco-editor.cjs +116 -6
  42. package/lib/editor/code/monaco-editor/monaco-editor.css +1 -1
  43. package/lib/editor/html/html-editor.controller.cjs +75 -0
  44. package/lib/editor/html/wang-editor/index.cjs +3 -0
  45. package/lib/editor/html/wang-editor/module/index.cjs +3 -0
  46. package/lib/editor/html/wang-editor/module/inline-ai-module.cjs +98 -0
  47. package/lib/editor/html/wang-editor/wang-editor.cjs +35 -4
  48. package/lib/editor/html/wang-editor/wang-editor.css +1 -1
  49. package/lib/editor/markdown/ibiz-markdown-editor/custom-menu.cjs +47 -0
  50. package/lib/editor/markdown/ibiz-markdown-editor/ibiz-markdown-editor.cjs +109 -13
  51. package/lib/editor/markdown/ibiz-markdown-editor/ibiz-markdown-editor.css +1 -1
  52. package/lib/editor/markdown/markdown-editor.controller.cjs +112 -0
  53. package/lib/index.cjs +2 -0
  54. package/lib/locale/en/index.cjs +15 -2
  55. package/lib/locale/zh-CN/index.cjs +15 -2
  56. package/lib/util/ai-util/ai-util.cjs +6 -2
  57. package/lib/util/app-util/app-util.cjs +40 -1
  58. package/lib/util/index.cjs +2 -0
  59. package/lib/util/inline-ai-util/inline-ai-textarea/icon.cjs +151 -0
  60. package/lib/util/inline-ai-util/inline-ai-textarea/inline-ai-textarea.cjs +207 -0
  61. package/lib/util/inline-ai-util/inline-ai-textarea/inline-ai-textarea.css +1 -0
  62. package/lib/util/inline-ai-util/inline-ai-textarea/inline-ai-textarea.hook.cjs +167 -0
  63. package/lib/util/inline-ai-util/inline-ai-util.cjs +147 -0
  64. package/lib/web-app/main.cjs +2 -0
  65. package/package.json +5 -5
  66. package/dist/ibiz-markdown-editor-Cs1m7gKI.js +0 -1
  67. package/dist/index-Dds3BDDF.js +0 -11
  68. package/dist/wang-editor-4cJ6X_hb.js +0 -1
@@ -23,6 +23,7 @@ var notificationUtil = require('../util/notification-util/notification-util.cjs'
23
23
  var loadingUtil = require('../util/loading-util/loading-util.cjs');
24
24
  var noticeUtil = require('../util/notice-util/notice-util.cjs');
25
25
  var overlayController = require('../util/overlay-controller/overlay-controller.cjs');
26
+ var inlineAiUtil = require('../util/inline-ai-util/inline-ai-util.cjs');
26
27
  var fullscreenUtil = require('../util/fullscreen/fullscreen-util.cjs');
27
28
 
28
29
  "use strict";
@@ -83,6 +84,7 @@ async function runApp(plugins, opts) {
83
84
  ibiz.loading = new loadingUtil.LoadingUtil();
84
85
  ibiz.notice = new noticeUtil.NoticeUtil();
85
86
  ibiz.overlay = new overlayController.OverlayController();
87
+ ibiz.inLineAIUtil = new inlineAiUtil.InLineAIUtil();
86
88
  ibiz.util.text.format = (value, code) => {
87
89
  return app.config.globalProperties.$textFormat(value, code);
88
90
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ibiz-template/vue3-components",
3
- "version": "0.7.41-alpha.37",
3
+ "version": "0.7.41-alpha.38",
4
4
  "description": "web端组件库(vue3)",
5
5
  "main": "lib/index.cjs",
6
6
  "module": "es/index.mjs",
@@ -30,16 +30,16 @@
30
30
  "dependencies": {
31
31
  "@amap/amap-jsapi-loader": "^1.0.1",
32
32
  "@floating-ui/dom": "^1.5.3",
33
- "@ibiz-template-plugin/ai-chat": "^0.0.32",
33
+ "@ibiz-template-plugin/ai-chat": "^0.0.33",
34
34
  "@ibiz-template-plugin/gantt": "0.1.8-alpha.316",
35
35
  "@ibiz-template-plugin/bi-report": "0.0.30",
36
36
  "@ibiz-template-plugin/data-view": "0.0.6",
37
37
  "@ibiz-template/core": "0.7.41-alpha.35",
38
38
  "@ibiz-template/devtool": "0.0.13",
39
- "@ibiz-template/model-helper": "0.7.41-alpha.36",
40
- "@ibiz-template/runtime": "0.7.41-alpha.36",
39
+ "@ibiz-template/model-helper": "0.7.41-alpha.37",
40
+ "@ibiz-template/runtime": "0.7.41-alpha.37",
41
41
  "@ibiz-template/theme": "0.7.39",
42
- "@ibiz-template/vue3-util": "0.7.41-alpha.36",
42
+ "@ibiz-template/vue3-util": "0.7.41-alpha.37",
43
43
  "@ibiz-template/web-theme": "3.9.0",
44
44
  "@ibiz/model-core": "^0.1.83",
45
45
  "@imengyu/vue3-context-menu": "^1.3.5",
@@ -1 +0,0 @@
1
- System.register(["vue","@ibiz-template/vue3-util","qx-util","cherry-markdown"],function(e){"use strict";var t,l,n,o,i,r,a,s,c,d,u,m,h,p;return{setters:[function(e){t=e.defineComponent,l=e.createVNode,n=e.ref,o=e.watch,i=e.onMounted,r=e.onBeforeUnmount,a=e.onUnmounted,s=e.nextTick},function(e){c=e.getEditorEmits,d=e.getMarkDownProps,u=e.useNamespace,m=e.useUIStore},function(e){h=e.createUUID},function(e){p=e.default}],execute:function(){e("default",t({name:"IBizMarkDown",props:d(),emits:c(),setup(e,{emit:t}){var l,c;const d=u("markdown"),f=e.controller,b=n("");let v=null;const g=h(),w=ibiz.util.file.getUploadHeaders(),k=n({...w}),y=n(""),C=(null==(l=null==f?void 0:f.editorParams)?void 0:l.customTheme)||(null==(c=null==f?void 0:f.editorParams)?void 0:c.customtheme),{UIStore:x}=m(),U=n(C||x.theme),z=n("editOnly");let T=null,D=0;const E=n({});let P=!1;o(()=>e.data,e=>{if(e&&f){const t={...f.editorParams};t.uploadparams&&(t.uploadParams=JSON.parse(t.uploadparams));const l=ibiz.util.file.calcFileUpDownUrl(f.context,f.params,e,t);y.value=l.uploadUrl}},{immediate:!0,deep:!0});const B=n(),M=async(t,l)=>{const n=await ibiz.util.file.fileUpload(y.value,t,k.value),o=((e,t)=>{if(!f)return"";const l={...f.editorParams};return l.exportparams&&(l.exportParams=JSON.parse(l.exportparams)),t&&t.folder&&(l.osscat=t.folder),ibiz.util.file.calcFileUpDownUrl(f.context,f.params,e,l).downloadUrl})(e.data||{},n.fileid);let i=o.replace("%fileId%",n.fileid);if(ibiz.config.common.enableDownloadTicket&&f){const t=await ibiz.util.file.getDownloadTicket(f.context,f.params,e.data||{},{fileId:n.fileid},f.downloadTicketParams);t&&t.ticket&&(i=o.replace("%fileId%",t.ticket),l(i))}else l(i)},S=()=>null==v?void 0:v.getMarkdown(),I=e=>{P=!0,null==v||v.setMarkdown(e,!1)};o(()=>e.value,(e,t)=>{e!==t&&(b.value=e||"")},{immediate:!0}),o(b,(e,t)=>{const l=S();e!==t&&l!==e&&I(e)});const N=e=>{t("change",S(),null==f?void 0:f.model.id,P),P=!1},O=(e,t)=>({[e]:t}),V=(e,t="")=>{const l=document.createElement(e);return l.className=t,l},q=e=>V("i","ch-icon ch-icon-".concat(e)),R=d.e("fullscreen"),j=e=>{for(;e.firstChild;)e.removeChild(e.firstChild)},H=()=>{if(v&&B.value){const e=v.editor.options.editorDom.parentElement;if(!e)return{};const t=e.classList,l=B.value.querySelector(".".concat(R));return l?{parentElement:e,cherryClass:t,fullscreenNode:l}:{}}return{}},L=()=>{const{parentElement:e,cherryClass:t,fullscreenNode:l}=H();e&&t&&l&&(j(l),l.appendChild(q("fullscreen")),l.title=ibiz.i18n.t("editor.common.fullscreen"),t.remove("fullscreen"),null==e||e.blur(),e.setAttribute("tabindex","-1"))},A=()=>{const{cherryClass:e}=H();return null==e?void 0:e.contains("fullscreen")},F=()=>{v&&B.value&&(A()?L():(()=>{const{parentElement:e,cherryClass:t,fullscreenNode:l}=H();e&&t&&l&&(j(l),l.appendChild(q("minscreen")),t.add("fullscreen"),l.title=ibiz.i18n.t("editor.common.minimize"),e.setAttribute("tabindex","-1"),s(()=>null==e?void 0:e.focus()))})())},J=e=>{e.stopPropagation(),"Escape"===e.key&&A()&&L()};o(()=>x.theme,e=>{U.value=C||e,null==v||v.setTheme(U.value),null==v||v.setCodeBlockTheme(U.value)});return i(()=>{var t;(e.disabled||e.readonly)&&(z.value="previewOnly"),s(()=>{var t;v=new p({id:g,value:b.value,previewer:{enablePreviewerBubble:!(e.disabled||e.readonly)},themeSettings:{mainTheme:U.value,codeBlockTheme:U.value},fileUpload:M,emoji:{useUnicode:!0},header:{anchorStyle:"autonumber"},editor:{height:"100%",defaultModel:z.value,codemirror:{autofocus:!1}},toolbars:{toolbar:["bold","italic","underline","strikethrough","|","color","header","|","list","image",{insert:["link","hr","br","code","formula","toc","table","line-table","bar-table"]},"settings","togglePreview"],bubble:["bold","italic","underline","strikethrough","sub","sup","|","size","color"],float:["h1","h2","h3","|","checklist","quote","quickTable","code"],customMenu:[],sidebar:[]},callback:{afterChange:N,beforeImageMounted:O},engine:{syntax:{table:{enableChart:!1,externals:["echarts"]}}}}),v.setTheme(U.value),C&&(v.setTheme(C),v.setCodeBlockTheme(C));const l=V("span","".concat(R," cherry-toolbar-button"));l.title=ibiz.i18n.t("editor.common.fullscreen"),l.onclick=F,l.appendChild(q("fullscreen"));const n=e.disabled?v.editor.options.editorDom.parentElement:null==(t=v.editor.options.editorDom.parentElement)?void 0:t.querySelector(".cherry-toolbar>.toolbar-right");null==n||n.appendChild(l)}),(()=>{if(window.ResizeObserver&&B.value){const e={width:B.value.offsetWidth?"".concat(B.value.offsetWidth,"px"):"100%"};f&&"number"==typeof f.parent.model.height&&Object.assign(e,{height:"".concat(f.parent.model.height,"px")}),E.value=d.cssVarBlock(e),T=new ResizeObserver(e=>{const t=e[0].contentRect.width;if(t!==D){const l={width:"".concat(e[0].contentRect.width,"px")};f&&"number"==typeof f.parent.model.height&&Object.assign(l,{height:"".concat(f.parent.model.height,"px")}),E.value=d.cssVarBlock(l),D=t}}),T.observe(B.value)}})(),null==(t=B.value)||t.addEventListener("keydown",J.bind(this))}),r(()=>{var e;null==(e=B.value)||e.removeEventListener("keydown",J.bind(this))}),a(()=>{v=null,T&&T.disconnect()}),{ns:d,currentVal:b,id:g,editor:v,markDownBox:B,headers:k,theme:U,defaultModel:z,cssVars:E,getCherryHtml:()=>null==v?void 0:v.getHtml(),getCherryContent:S,setCherryContent:I}},render(){return l("div",{ref:"markDownBox",class:[this.ns.b(),this.ns.is("disabled",this.disabled)]},[l("div",{id:this.id,style:this.cssVars,class:this.ns.b("cherry")},null)])}}))}}});