@ibiz-template/vue3-components 0.7.41-alpha.45 → 0.7.41-alpha.47

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 (99) hide show
  1. package/dist/ibiz-markdown-editor-DlU-04L2.js +1 -0
  2. package/dist/{index-DgqTP4Vw.js → index-B0XiEslO.js} +1 -1
  3. package/dist/{index-Dr0VM8iS.js → index-B6kaPJDO.js} +1 -1
  4. package/dist/index-BniHS_Fs.js +11 -0
  5. package/dist/index.min.css +1 -1
  6. package/dist/index.system.min.js +1 -1
  7. package/dist/{wang-editor-homqxACE.js → wang-editor-Bx-SzrX-.js} +1 -1
  8. package/dist/{xlsx-util-C5MBICNN.js → xlsx-util-DgYbktap.js} +1 -1
  9. package/es/common/button-list/button-list.css +1 -1
  10. package/es/control/drbar/drbar.controller.mjs +6 -1
  11. package/es/control/drbar/drbar.mjs +5 -5
  12. package/es/control/drtab/drtab-control.util.mjs +1 -1
  13. package/es/control/drtab/drtab.controller.mjs +6 -1
  14. package/es/control/drtab/drtab.mjs +5 -5
  15. package/es/control/form/form-detail/form-item/composite-form-item-ex/composite-form-item-ex.controller.mjs +14 -3
  16. package/es/control/form/form-detail/form-item/composite-form-item-ex/composite-form-item-ex.mjs +2 -2
  17. package/es/control/form/form-detail/form-item/composite-form-item-ex/composite-form-item-ex.state.mjs +6 -0
  18. package/es/editor/code/monaco-editor/monaco-editor.mjs +2 -2
  19. package/es/editor/markdown/ibiz-markdown-editor/ibiz-markdown-editor.mjs +10 -6
  20. package/es/index.mjs +1 -0
  21. package/es/locale/en/index.mjs +13 -0
  22. package/es/locale/zh-CN/index.mjs +13 -0
  23. package/es/node_modules/.pnpm/modern-screenshot@4.6.7/node_modules/modern-screenshot/dist/index.mjs +1652 -0
  24. package/es/util/ai-chat-util/ai-chat-util.mjs +57 -23
  25. package/es/util/app-util/app-util.mjs +2 -4
  26. package/es/util/index.mjs +1 -0
  27. package/es/util/inline-ai-util/inline-ai-textarea/inline-ai-textarea.hook.mjs +3 -3
  28. package/es/util/screen-shot-util/screen-shot/components/index.mjs +3 -0
  29. package/es/util/screen-shot-util/screen-shot/components/screen-shot/screen-shot.css +1 -0
  30. package/es/util/screen-shot-util/screen-shot/components/screen-shot/screen-shot.mjs +113 -0
  31. package/es/util/screen-shot-util/screen-shot/components/screen-shot-toolbar/screen-shot-toolbar.css +1 -0
  32. package/es/util/screen-shot-util/screen-shot/components/screen-shot-toolbar/screen-shot-toolbar.mjs +105 -0
  33. package/es/util/screen-shot-util/screen-shot/constant/index.mjs +172 -0
  34. package/es/util/screen-shot-util/screen-shot/controller/index.mjs +3 -0
  35. package/es/util/screen-shot-util/screen-shot/controller/screen-shot.controller.mjs +366 -0
  36. package/es/util/screen-shot-util/screen-shot/controller/screen-shot.store.mjs +51 -0
  37. package/es/util/screen-shot-util/screen-shot/icon/icon.mjs +90 -0
  38. package/es/util/screen-shot-util/screen-shot/icon/index.mjs +3 -0
  39. package/es/util/screen-shot-util/screen-shot/index.mjs +4 -0
  40. package/es/util/screen-shot-util/screen-shot/module/draw-arrow.mjs +109 -0
  41. package/es/util/screen-shot-util/screen-shot/module/draw-circle.mjs +25 -0
  42. package/es/util/screen-shot-util/screen-shot/module/draw-mosaic.mjs +54 -0
  43. package/es/util/screen-shot-util/screen-shot/module/draw-pencil.mjs +15 -0
  44. package/es/util/screen-shot-util/screen-shot/module/draw-rectangle.mjs +12 -0
  45. package/es/util/screen-shot-util/screen-shot/module/draw-text.mjs +12 -0
  46. package/es/util/screen-shot-util/screen-shot/module/index.mjs +8 -0
  47. package/es/util/screen-shot-util/screen-shot/type/index.mjs +16 -0
  48. package/es/util/screen-shot-util/screen-shot/util/index.mjs +8 -0
  49. package/es/util/screen-shot-util/screen-shot-util.mjs +67 -0
  50. package/es/view-engine/edit-view.engine.mjs +6 -1
  51. package/es/view-engine/opt-view.engine.mjs +6 -1
  52. package/es/web-app/main.mjs +2 -0
  53. package/lib/common/button-list/button-list.css +1 -1
  54. package/lib/control/drbar/drbar.cjs +4 -4
  55. package/lib/control/drbar/drbar.controller.cjs +6 -1
  56. package/lib/control/drtab/drtab-control.util.cjs +1 -1
  57. package/lib/control/drtab/drtab.cjs +4 -4
  58. package/lib/control/drtab/drtab.controller.cjs +6 -1
  59. package/lib/control/form/form-detail/form-item/composite-form-item-ex/composite-form-item-ex.cjs +2 -2
  60. package/lib/control/form/form-detail/form-item/composite-form-item-ex/composite-form-item-ex.controller.cjs +14 -3
  61. package/lib/control/form/form-detail/form-item/composite-form-item-ex/composite-form-item-ex.state.cjs +6 -0
  62. package/lib/editor/code/monaco-editor/monaco-editor.cjs +2 -2
  63. package/lib/editor/markdown/ibiz-markdown-editor/ibiz-markdown-editor.cjs +10 -6
  64. package/lib/index.cjs +2 -0
  65. package/lib/locale/en/index.cjs +13 -0
  66. package/lib/locale/zh-CN/index.cjs +13 -0
  67. package/lib/node_modules/.pnpm/modern-screenshot@4.6.7/node_modules/modern-screenshot/dist/index.cjs +1667 -0
  68. package/lib/util/ai-chat-util/ai-chat-util.cjs +57 -23
  69. package/lib/util/app-util/app-util.cjs +2 -4
  70. package/lib/util/index.cjs +2 -0
  71. package/lib/util/inline-ai-util/inline-ai-textarea/inline-ai-textarea.hook.cjs +3 -3
  72. package/lib/util/screen-shot-util/screen-shot/components/index.cjs +7 -0
  73. package/lib/util/screen-shot-util/screen-shot/components/screen-shot/screen-shot.cjs +115 -0
  74. package/lib/util/screen-shot-util/screen-shot/components/screen-shot/screen-shot.css +1 -0
  75. package/lib/util/screen-shot-util/screen-shot/components/screen-shot-toolbar/screen-shot-toolbar.cjs +107 -0
  76. package/lib/util/screen-shot-util/screen-shot/components/screen-shot-toolbar/screen-shot-toolbar.css +1 -0
  77. package/lib/util/screen-shot-util/screen-shot/constant/index.cjs +174 -0
  78. package/lib/util/screen-shot-util/screen-shot/controller/index.cjs +7 -0
  79. package/lib/util/screen-shot-util/screen-shot/controller/screen-shot.controller.cjs +368 -0
  80. package/lib/util/screen-shot-util/screen-shot/controller/screen-shot.store.cjs +53 -0
  81. package/lib/util/screen-shot-util/screen-shot/icon/icon.cjs +100 -0
  82. package/lib/util/screen-shot-util/screen-shot/icon/index.cjs +15 -0
  83. package/lib/util/screen-shot-util/screen-shot/index.cjs +8 -0
  84. package/lib/util/screen-shot-util/screen-shot/module/draw-arrow.cjs +111 -0
  85. package/lib/util/screen-shot-util/screen-shot/module/draw-circle.cjs +27 -0
  86. package/lib/util/screen-shot-util/screen-shot/module/draw-mosaic.cjs +56 -0
  87. package/lib/util/screen-shot-util/screen-shot/module/draw-pencil.cjs +18 -0
  88. package/lib/util/screen-shot-util/screen-shot/module/draw-rectangle.cjs +14 -0
  89. package/lib/util/screen-shot-util/screen-shot/module/draw-text.cjs +14 -0
  90. package/lib/util/screen-shot-util/screen-shot/module/index.cjs +18 -0
  91. package/lib/util/screen-shot-util/screen-shot/type/index.cjs +18 -0
  92. package/lib/util/screen-shot-util/screen-shot/util/index.cjs +10 -0
  93. package/lib/util/screen-shot-util/screen-shot-util.cjs +69 -0
  94. package/lib/view-engine/edit-view.engine.cjs +6 -1
  95. package/lib/view-engine/opt-view.engine.cjs +6 -1
  96. package/lib/web-app/main.cjs +2 -0
  97. package/package.json +6 -5
  98. package/dist/ibiz-markdown-editor-C7wR017-.js +0 -1
  99. package/dist/index-yLzheFmH.js +0 -11
@@ -1 +1 @@
1
- .ibiz-button-list{--ibiz-button-list-icon-margin:var(--ibiz-spacing-extra-tight);--ibiz-button-list-icon-size:var(--ibiz-width-icon-medium);--ibiz-button-list-popover-bg:var(--ibiz-color-bg-3);--ibiz-button-list-popover-padding:var(--ibiz-spacing-tight) var(--ibiz-spacing-none);--ibiz-button-list-popover-button-padding:var(--ibiz-spacing-tight) var(--ibiz-spacing-base-loose);--ibiz-button-list-popover-button-margin:var(--ibiz-spacing-none);--ibiz-button-list-popover-button-size:var(--ibiz-height-control-large);--ibiz-button-list-popover-button-font-size:var(--ibiz-font-size-regular);--ibiz-button-list-gap:var(--ibiz-spacing-base-tight)}.ibiz-button-list__content{display:flex}.ibiz-button-list__content .ibiz-button-list__dropdown{width:auto}.ibiz-button-list__content .el-button+.el-dropdown{margin-left:var(--ibiz-button-list-gap)}.ibiz-button-list__button-content{display:flex;gap:var(--ibiz-spacing-extra-tight);align-items:center;width:100%}.ibiz-button-list__button-content--icon{display:flex;align-items:center;justify-content:center;width:var(--ibiz-button-list-icon-size);height:var(--ibiz-button-list-icon-size);margin-right:var(--ibiz-button-list-icon-margin);font-size:var(--ibiz-button-list-icon-size)}.ibiz-button-list__item>span{width:100%;pointer-events:none}.ibiz-button-list__item--group>span{display:flex;justify-content:space-between}.ibiz-button-list__item--group-icon{display:flex;align-items:center;justify-content:center;width:var(--ibiz-button-list-icon-size);height:var(--ibiz-button-list-icon-size);margin-left:var(--ibiz-button-list-icon-margin);font-size:var(--ibiz-button-list-icon-size)}.ibiz-button-list__dropdown{width:100%;height:100%}.ibiz-button-list__dropdown .ibiz-icon{margin-right:0}.ibiz-button-list__dropdown .ibiz-icon+.ibiz-button-list__button-content--caption{margin-left:var(--ibiz-button-list-icon-margin)}.ibiz-button-list__dropdown .el-button-group{display:flex;width:100%;height:100%;border-radius:var(--ibiz-border-radius-small)}.ibiz-button-list__dropdown .el-button-group .el-button:first-child{flex-grow:1}.ibiz-button-list__dropdown .el-button-group .el-button:last-child{flex-shrink:0}.ibiz-button-list__dropdown--style2 .el-button{--el-button-active-bg-color:transparent;--el-button-bg-color:transparent;--el-mask-color-extra-light:transparent;--el-button-hover-bg-color:transparent}.ibiz-button-list__dropdown--style2 .el-button-group .ibiz-button-list__item{padding-right:0}.ibiz-button-list__dropdown--style2 .el-button-group .el-button{color:var(--ibiz-color-text-2)}.ibiz-button-list__dropdown--style2 .el-button-group:hover .el-button{color:var(--ibiz-color-primary)}.ibiz-button-list--itemx .ibiz-button-list__more-button{width:32px;padding-right:0;padding-left:0}.ibiz-button-list__dropdown-popper{--ibiz-button-list-icon-margin:var(--ibiz-spacing-extra-tight);--ibiz-button-list-icon-size:var(--ibiz-width-icon-medium);--ibiz-button-list-popover-bg:var(--ibiz-color-bg-3);--ibiz-button-list-popover-padding:var(--ibiz-spacing-tight) var(--ibiz-spacing-none);--ibiz-button-list-popover-button-padding:var(--ibiz-spacing-tight) var(--ibiz-spacing-base-loose);--ibiz-button-list-popover-button-margin:var(--ibiz-spacing-none);--ibiz-button-list-popover-button-size:var(--ibiz-height-control-large);--ibiz-button-list-popover-button-font-size:var(--ibiz-font-size-regular);--ibiz-button-list-gap:var(--ibiz-spacing-base-tight)}.ibiz-button-list__dropdown-popper>.el-scrollbar{min-width:150px;overflow:visible}.ibiz-button-list__dropdown-popper--style2.el-popper.el-dropdown__popper .el-scrollbar .el-dropdown__list{background-color:transparent}.ibiz-button-list__dropdown-popper--style2.el-popper.el-dropdown__popper .el-scrollbar .el-dropdown__list .el-dropdown-menu{background-color:transparent}.ibiz-button-list__dropdown-popper--style2.el-popper.el-dropdown__popper .el-scrollbar .el-dropdown__list .el-dropdown-menu__item{background-color:transparent}.ibiz-button-list__dropdown-popper--style2.el-popper.el-dropdown__popper .el-scrollbar .el-dropdown__list .el-dropdown-menu__item:hover{background-color:var(--ibiz-color-bg-0)}.ibiz-button-list__dropdown-popper--style2 .el-button{color:var(--ibiz-color-text-2)}.ibiz-button-list__dropdown-popper-content{padding:var(--ibiz-spacing-extra-tight) var(--ibiz-spacing-none)}.ibiz-button-list__popover{padding:var(--ibiz-spacing-extra-tight) var(--ibiz-spacing-none)!important;border-radius:0!important}.ibiz-button-list__dropdown-popper-content,.ibiz-button-list__popover{display:flex;flex-direction:column;background-color:var(--ibiz-color-primary)!important}.ibiz-button-list__dropdown-popper-content .el-button,.ibiz-button-list__popover .el-button{justify-content:flex-start;width:100%;height:var(--ibiz-height-control-large);padding:var(--ibiz-spacing-tight) var(--ibiz-spacing-base);margin:var(--ibiz-spacing-none);font-size:var(--ibiz-font-size-regular);color:var(--ibiz-color-primary-text)}.ibiz-button-list__dropdown-popper-content .el-button ion-icon,.ibiz-button-list__popover .el-button ion-icon{margin-right:var(--ibiz-spacing-extra-tight)}.ibiz-button-list__dropdown-popper-content .el-button.is-text:not(.is-disabled):hover,.ibiz-button-list__popover .el-button.is-text:not(.is-disabled):hover{background-color:var(--el-button-hover-bg-color);border-color:var(--el-button-hover-border-color)}
1
+ .ibiz-button-list{--ibiz-button-list-icon-margin:var(--ibiz-spacing-extra-tight);--ibiz-button-list-icon-size:var(--ibiz-width-icon-medium);--ibiz-button-list-popover-bg:var(--ibiz-color-bg-3);--ibiz-button-list-popover-padding:var(--ibiz-spacing-tight) var(--ibiz-spacing-none);--ibiz-button-list-popover-button-padding:var(--ibiz-spacing-tight) var(--ibiz-spacing-base-loose);--ibiz-button-list-popover-button-margin:var(--ibiz-spacing-none);--ibiz-button-list-popover-button-size:var(--ibiz-height-control-large);--ibiz-button-list-popover-button-font-size:var(--ibiz-font-size-regular);--ibiz-button-list-gap:var(--ibiz-spacing-base-tight)}.ibiz-button-list__content{display:flex}.ibiz-button-list__content .ibiz-button-list__dropdown{width:auto}.ibiz-button-list__content .el-button+.el-dropdown{margin-left:var(--ibiz-button-list-gap)}.ibiz-button-list__button-content{display:flex;gap:var(--ibiz-spacing-extra-tight);align-items:center;width:100%}.ibiz-button-list__button-content--icon{display:flex;align-items:center;justify-content:center;width:var(--ibiz-button-list-icon-size);height:var(--ibiz-button-list-icon-size);margin-right:var(--ibiz-button-list-icon-margin);font-size:var(--ibiz-button-list-icon-size)}.ibiz-button-list__item>span{width:100%;pointer-events:none}.ibiz-button-list__item--group>span{display:flex;justify-content:space-between}.ibiz-button-list__item--group-icon{display:flex;align-items:center;justify-content:center;width:var(--ibiz-button-list-icon-size);height:var(--ibiz-button-list-icon-size);margin-left:var(--ibiz-button-list-icon-margin);font-size:var(--ibiz-button-list-icon-size)}.ibiz-button-list__dropdown{width:100%;height:100%}.ibiz-button-list__dropdown .ibiz-icon{margin-right:0}.ibiz-button-list__dropdown .ibiz-icon+.ibiz-button-list__button-content--caption{margin-left:var(--ibiz-button-list-icon-margin)}.ibiz-button-list__dropdown .el-button-group{display:flex;width:100%;height:100%;border-radius:var(--ibiz-border-radius-small)}.ibiz-button-list__dropdown .el-button-group .el-button:first-child{flex-grow:1}.ibiz-button-list__dropdown .el-button-group .el-button:last-child{flex-shrink:0}.ibiz-button-list__dropdown--style2 .el-button{--el-button-active-bg-color:transparent;--el-button-bg-color:transparent;--el-mask-color-extra-light:transparent;--el-button-hover-bg-color:transparent}.ibiz-button-list__dropdown--style2 .el-button-group .ibiz-button-list__item{padding-right:0}.ibiz-button-list__dropdown--style2 .el-button-group .el-button{color:var(--ibiz-color-text-2)}.ibiz-button-list__dropdown--style2 .el-button-group:hover .el-button{color:var(--ibiz-color-primary)}.ibiz-button-list--itemx .ibiz-button-list__more-button{width:32px;padding-right:0;padding-left:0}.ibiz-button-list__dropdown-popper{--ibiz-button-list-icon-margin:var(--ibiz-spacing-extra-tight);--ibiz-button-list-icon-size:var(--ibiz-width-icon-medium);--ibiz-button-list-popover-bg:var(--ibiz-color-bg-3);--ibiz-button-list-popover-padding:var(--ibiz-spacing-tight) var(--ibiz-spacing-none);--ibiz-button-list-popover-button-padding:var(--ibiz-spacing-tight) var(--ibiz-spacing-base-loose);--ibiz-button-list-popover-button-margin:var(--ibiz-spacing-none);--ibiz-button-list-popover-button-size:var(--ibiz-height-control-large);--ibiz-button-list-popover-button-font-size:var(--ibiz-font-size-regular);--ibiz-button-list-gap:var(--ibiz-spacing-base-tight)}.ibiz-button-list__dropdown-popper>.el-scrollbar{min-width:150px;overflow:visible}.ibiz-button-list__dropdown-popper-content{padding:var(--ibiz-spacing-extra-tight) var(--ibiz-spacing-none)}.ibiz-button-list__popover{padding:var(--ibiz-spacing-extra-tight) var(--ibiz-spacing-none)!important;border-radius:0!important}.ibiz-button-list__dropdown-popper-content,.ibiz-button-list__popover{display:flex;flex-direction:column;background-color:var(--ibiz-color-primary)!important}.ibiz-button-list__dropdown-popper-content .el-button,.ibiz-button-list__popover .el-button{justify-content:flex-start;width:100%;height:var(--ibiz-height-control-large);padding:var(--ibiz-spacing-tight) var(--ibiz-spacing-base);margin:var(--ibiz-spacing-none);font-size:var(--ibiz-font-size-regular);color:var(--ibiz-color-primary-text)}.ibiz-button-list__dropdown-popper-content .el-button ion-icon,.ibiz-button-list__popover .el-button ion-icon{margin-right:var(--ibiz-spacing-extra-tight)}.ibiz-button-list__dropdown-popper-content .el-button.is-text:not(.is-disabled):hover,.ibiz-button-list__popover .el-button.is-text:not(.is-disabled):hover{background-color:var(--el-button-hover-bg-color);border-color:var(--el-button-hover-border-color)}.ibiz-button-list__dropdown-popper--style2 .el-scrollbar .el-dropdown__list,.ibiz-button-list__dropdown-popper--style2 .ibiz-button-list__dropdown-popper-content{background-color:transparent!important}.ibiz-button-list__dropdown-popper--style2 .el-button{color:var(--ibiz-color-text-2);background-color:transparent;border-radius:0}.ibiz-button-list__dropdown-popper--style2 .el-button.is-text:not(.is-disabled):hover{background-color:var(--ibiz-color-bg-0);border-color:transparent}
@@ -1,4 +1,5 @@
1
1
  import { ControlController, Srfuf, calcItemVisibleByCounter, calcItemVisible, calcNavParams, hasSubRoute, CounterService } from '@ibiz-template/runtime';
2
+ import { isNil } from 'ramda';
2
3
 
3
4
  "use strict";
4
5
  var __defProp = Object.defineProperty;
@@ -253,7 +254,11 @@ class DRBarController extends ControlController {
253
254
  const data = event.data[0];
254
255
  this.view.state.srfactiveviewdata = data;
255
256
  if (Object.prototype.hasOwnProperty.call(data, "srfreadonly")) {
256
- this.view.context.srfreadonly = data.srfreadonly;
257
+ if (data.srfreadonly) {
258
+ this.view.context.srfreadonly = true;
259
+ } else if (isNil(this.view.context.srfreadonly)) {
260
+ this.view.context.srfreadonly = false;
261
+ }
257
262
  }
258
263
  await this.calcDrBarItemsState();
259
264
  this.handleFormChange();
@@ -1,4 +1,4 @@
1
- import { defineComponent, createVNode, resolveComponent, reactive, onUnmounted, watch } from 'vue';
1
+ import { defineComponent, createVNode, resolveComponent, ref, onUnmounted, watch } from 'vue';
2
2
  import { useControlController, useNamespace, getNestedRoutePath, route2routePath } from '@ibiz-template/vue3-util';
3
3
  import { useRouter, useRoute } from 'vue-router';
4
4
  import { DRBarController } from './drbar.controller.mjs';
@@ -63,9 +63,9 @@ const DRBarControl = /* @__PURE__ */ defineComponent({
63
63
  const c = useControlController((...args) => new DRBarController(...args));
64
64
  const ns = useNamespace("control-".concat(c.model.controlType.toLowerCase()));
65
65
  const router = useRouter();
66
- const counterData = reactive({});
66
+ const counterData = ref({});
67
67
  const fn = (counter) => {
68
- Object.assign(counterData, counter);
68
+ counterData.value = counter;
69
69
  };
70
70
  c.evt.on("onCreated", () => {
71
71
  if (c.counter) {
@@ -157,9 +157,9 @@ const DRBarControl = /* @__PURE__ */ defineComponent({
157
157
  default: () => [createVNode(resolveComponent("iBizIcon"), {
158
158
  "class": ns.e("icon"),
159
159
  "icon": item.sysImage
160
- }, null), createVNode("span", null, [item.caption]), item.counterId && counterData[item.counterId] != null && createVNode(resolveComponent("iBizBadge"), {
160
+ }, null), createVNode("span", null, [item.caption]), item.counterId && counterData.value[item.counterId] != null && createVNode(resolveComponent("iBizBadge"), {
161
161
  "class": ns.e("counter"),
162
- "value": counterData[item.counterId],
162
+ "value": counterData.value[item.counterId],
163
163
  "counterMode": item.counterMode
164
164
  }, null)]
165
165
  });
@@ -39,7 +39,7 @@ function useAppDRTab(c, controlRef, counterData) {
39
39
  drTabPages.forEach((tab, index) => {
40
40
  if (!tab.hidden) {
41
41
  const caption = tab.caption || "";
42
- const counterNum = tab.counterId ? counterData[tab.counterId] : void 0;
42
+ const counterNum = tab.counterId ? counterData.value[tab.counterId] : void 0;
43
43
  const fontSize = "var(--".concat(defaultNamespace, "-font-size-regular)");
44
44
  if (counterNum != null && !(!counterNum && counterNum !== 0) && !(tab.counterMode === 1 && counterNum <= 0)) {
45
45
  const counterStyle = {
@@ -1,6 +1,7 @@
1
1
  import { createUUID } from 'qx-util';
2
2
  import { ControlController, calcItemVisibleByCounter, calcItemVisible, Srfuf, hasSubRoute, calcNavParams, CounterService } from '@ibiz-template/runtime';
3
3
  import { getNestedRoutePath } from '@ibiz-template/vue3-util';
4
+ import { isNil } from 'ramda';
4
5
 
5
6
  "use strict";
6
7
  var __defProp = Object.defineProperty;
@@ -270,7 +271,11 @@ class DRTabController extends ControlController {
270
271
  const data = event.data[0];
271
272
  this.view.state.srfactiveviewdata = data;
272
273
  if (Object.prototype.hasOwnProperty.call(data, "srfreadonly")) {
273
- this.view.context.srfreadonly = data.srfreadonly;
274
+ if (data.srfreadonly) {
275
+ this.view.context.srfreadonly = true;
276
+ } else if (isNil(this.view.context.srfreadonly)) {
277
+ this.view.context.srfreadonly = false;
278
+ }
274
279
  }
275
280
  await this.calcDrTabPagesState();
276
281
  this.handleFormChange();
@@ -1,4 +1,4 @@
1
- import { defineComponent, createVNode, resolveComponent, createTextVNode, ref, reactive, computed, onUnmounted, watch } from 'vue';
1
+ import { defineComponent, createVNode, resolveComponent, createTextVNode, ref, computed, onUnmounted, watch } from 'vue';
2
2
  import { useControlController, useNamespace, getNestedRoutePath, route2routePath } from '@ibiz-template/vue3-util';
3
3
  import { useRouter, useRoute } from 'vue-router';
4
4
  import { hasSubRoute } from '@ibiz-template/runtime';
@@ -55,13 +55,13 @@ const DRTabControl = /* @__PURE__ */ defineComponent({
55
55
  const ns = useNamespace("control-".concat(c.model.controlType.toLowerCase()));
56
56
  const router = useRouter();
57
57
  const controlRef = ref();
58
- const counterData = reactive({});
58
+ const counterData = ref({});
59
59
  const {
60
60
  visibleItems,
61
61
  moreItems
62
62
  } = useAppDRTab(c, controlRef, counterData);
63
63
  const fn = (counter) => {
64
- Object.assign(counterData, counter);
64
+ counterData.value = counter;
65
65
  };
66
66
  const tabPosition = ((_a = c.view.model.tabLayout) == null ? void 0 : _a.toLowerCase()) || "top";
67
67
  c.evt.on("onCreated", () => {
@@ -148,7 +148,7 @@ const DRTabControl = /* @__PURE__ */ defineComponent({
148
148
  }, null), createVNode("div", {
149
149
  "class": "caption"
150
150
  }, [(_b = activeTab.value) == null ? void 0 : _b.caption, ((_c = activeTab.value) == null ? void 0 : _c.counterId) && createVNode(resolveComponent("iBizBadge"), {
151
- "value": counterData[activeTab.value.counterId],
151
+ "value": counterData.value[activeTab.value.counterId],
152
152
  "counterMode": activeTab.value.counterMode
153
153
  }, null)]), createVNode("ion-icon", {
154
154
  "name": "chevron-down-outline"
@@ -169,7 +169,7 @@ const DRTabControl = /* @__PURE__ */ defineComponent({
169
169
  }, null), createVNode("span", {
170
170
  "class": "caption"
171
171
  }, [tab.caption]), tab.counterId && createVNode(resolveComponent("iBizBadge"), {
172
- "value": counterData[tab.counterId],
172
+ "value": counterData.value[tab.counterId],
173
173
  "counterMode": tab.counterMode
174
174
  }, null), tab.tag === c.state.activeName && createVNode("ion-icon", {
175
175
  "name": "checkmark-outline"
@@ -32,7 +32,7 @@ class CompositeFormItemExController extends FormItemController {
32
32
  __publicField(this, "codeListId", "");
33
33
  /**
34
34
  * @description 切换菜单选项
35
- * @type {{ id: string; name: string; icon?: ISysImage, editor?: IData }[]}
35
+ * @type {{ id: string; name: string; icon?: ISysImage, editor?: IData, valueItem?: string }[]}
36
36
  * @memberof CompositeFormItemExController
37
37
  */
38
38
  __publicField(this, "switchOptions", []);
@@ -47,6 +47,16 @@ class CompositeFormItemExController extends FormItemController {
47
47
  var _a;
48
48
  return new CompositeFormItemExState((_a = this.parent) == null ? void 0 : _a.state);
49
49
  }
50
+ get name() {
51
+ return this.state.editorValueItem || this.model.id;
52
+ }
53
+ get value() {
54
+ var _a;
55
+ const option = this.switchOptions.find(
56
+ (item) => item.id === this.state.editorId
57
+ );
58
+ return (_a = this.data) == null ? void 0 : _a[(option == null ? void 0 : option.valueItem) || this.model.id];
59
+ }
50
60
  async onInit() {
51
61
  var _a, _b, _c, _d;
52
62
  await super.onInit();
@@ -71,7 +81,8 @@ class CompositeFormItemExController extends FormItemController {
71
81
  id: item.value,
72
82
  name: item.text,
73
83
  icon: item.sysImage,
74
- editor: item.data
84
+ editor: item.data,
85
+ valueItem: item.userData
75
86
  };
76
87
  });
77
88
  this.defaultType = ((_b = this.switchOptions[0]) == null ? void 0 : _b.id) || "";
@@ -102,6 +113,7 @@ class CompositeFormItemExController extends FormItemController {
102
113
  if (!option) {
103
114
  return;
104
115
  }
116
+ this.state.editorValueItem = option.valueItem || "";
105
117
  const editorModel = {
106
118
  ...this.createEditorModel(),
107
119
  ...option.editor
@@ -147,7 +159,6 @@ class CompositeFormItemExController extends FormItemController {
147
159
  if (!id || id === this.state.editorId) {
148
160
  return;
149
161
  }
150
- this.setDataValue("", this.name);
151
162
  if (this.valueItem && this.valueItem.id) {
152
163
  this.setDataValue(id, this.valueItem.id);
153
164
  }
@@ -23,8 +23,8 @@ const CompositeFormItemEx = /* @__PURE__ */ defineComponent({
23
23
  const ns = useNamespace("form-item");
24
24
  const ns2 = useNamespace("composite-form-item-ex");
25
25
  const c = props.controller;
26
- const onValueChange = (val, name, ignore = false) => {
27
- props.controller.setDataValue(val, name, ignore);
26
+ const onValueChange = (val, _name, ignore = false) => {
27
+ props.controller.setDataValue(val, c.name, ignore);
28
28
  };
29
29
  const loading = ref(true);
30
30
  const editorRef = ref();
@@ -16,6 +16,12 @@ class CompositeFormItemExState extends FormItemState {
16
16
  * @memberof CompositeFormItemExState
17
17
  */
18
18
  __publicField(this, "editorId", "");
19
+ /**
20
+ * @description 当前选中的编辑器值项
21
+ * @type {string}
22
+ * @memberof CompositeFormItemExState
23
+ */
24
+ __publicField(this, "editorValueItem", "");
19
25
  }
20
26
  }
21
27
 
@@ -266,7 +266,7 @@ const IBizCode = /* @__PURE__ */ defineComponent({
266
266
  // 不要滚动条的边框
267
267
  });
268
268
  editor.__instanceId = UUID;
269
- if (c.deACMode && ibiz.env.enableAI) {
269
+ if (c.chatCompletion && ibiz.env.enableAI) {
270
270
  codeLensProviderDisposable = loaderMonaco.languages.registerCodeLensProvider(props.language || props.controller.language, {
271
271
  provideCodeLenses: function(model, _token) {
272
272
  if (!validate(model))
@@ -449,7 +449,7 @@ const IBizCode = /* @__PURE__ */ defineComponent({
449
449
  }, null);
450
450
  };
451
451
  const renderTextEditorToolbar = () => {
452
- if (!textTBVisible.value)
452
+ if (!textTBVisible.value || !c.chatCompletion)
453
453
  return null;
454
454
  return createVNode("div", {
455
455
  "ref": "textTBRef",
@@ -15,7 +15,7 @@ const IBizMarkDown = /* @__PURE__ */ defineComponent({
15
15
  emit,
16
16
  slots
17
17
  }) {
18
- var _a, _b, _c, _d, _e;
18
+ var _a, _b, _c, _d, _e, _f;
19
19
  const ns = useNamespace("markdown");
20
20
  const c = props.controller;
21
21
  const currentVal = ref("");
@@ -51,8 +51,12 @@ const IBizMarkDown = /* @__PURE__ */ defineComponent({
51
51
  const lastDirectoryState = ref("pure");
52
52
  let isIgnoreChange = false;
53
53
  let chatInstance;
54
+ let disabledirectory = false;
55
+ if ((_e = c == null ? void 0 : c.editorParams) == null ? void 0 : _e.disabledirectory) {
56
+ disabledirectory = c.editorParams.disabledirectory === "true";
57
+ }
54
58
  let tocPos = "absolute";
55
- if ((_e = c == null ? void 0 : c.editorParams) == null ? void 0 : _e.tocpos) {
59
+ if ((_f = c == null ? void 0 : c.editorParams) == null ? void 0 : _f.tocpos) {
56
60
  tocPos = c.editorParams.tocpos === "fixed" ? "fixed" : "absolute";
57
61
  }
58
62
  const [AIMenu, AIChart] = initCustomMenu(c, {
@@ -274,7 +278,7 @@ const IBizMarkDown = /* @__PURE__ */ defineComponent({
274
278
  defaultModel.value = "previewOnly";
275
279
  }
276
280
  nextTick(() => {
277
- var _a2;
281
+ var _a2, _b2, _c2;
278
282
  const bubble = ["bold", "italic", "underline", "strikethrough", "sub", "sup", "|", "size", "color"];
279
283
  const toolbar = ["bold", "italic", "underline", "strikethrough", "|", "color", "header", "|", "list", "image", {
280
284
  insert: ["link", "hr", "br", "code", "formula", "toc", "table", "line-table", "bar-table"]
@@ -328,7 +332,7 @@ const IBizMarkDown = /* @__PURE__ */ defineComponent({
328
332
  // 定义顶部右侧工具栏,默认为空
329
333
  toolbarRight: [],
330
334
  // 目录
331
- toc: {
335
+ toc: !disabledirectory && {
332
336
  updateLocationHash: false,
333
337
  // 要不要更新URL的hash
334
338
  defaultModel: "pure",
@@ -361,7 +365,7 @@ const IBizMarkDown = /* @__PURE__ */ defineComponent({
361
365
  editor.toggleToc("pure");
362
366
  const html = editor.engine.makeHtml(currentVal.value);
363
367
  editor.previewer.update(html);
364
- editor.toc.updateTocList();
368
+ (_b2 = (_a2 = editor.toc) == null ? void 0 : _a2.updateTocList) == null ? void 0 : _b2.call(_a2);
365
369
  editor.setTheme(theme.value);
366
370
  if (customTheme) {
367
371
  editor.setTheme(customTheme);
@@ -371,7 +375,7 @@ const IBizMarkDown = /* @__PURE__ */ defineComponent({
371
375
  span.title = ibiz.i18n.t("editor.common.fullscreen");
372
376
  span.onclick = onSwitchFullscreen;
373
377
  span.appendChild(createCherryIcon("fullscreen"));
374
- const parentElement = props.disabled ? editor.editor.options.editorDom.parentElement : (_a2 = editor.editor.options.editorDom.parentElement) == null ? void 0 : _a2.querySelector(".cherry-toolbar>.toolbar-right");
378
+ const parentElement = props.disabled ? editor.editor.options.editorDom.parentElement : (_c2 = editor.editor.options.editorDom.parentElement) == null ? void 0 : _c2.querySelector(".cherry-toolbar>.toolbar-right");
375
379
  parentElement == null ? void 0 : parentElement.appendChild(span);
376
380
  c == null ? void 0 : c.setMDEditor(editor);
377
381
  onMDEditorCreated(editor);
package/es/index.mjs CHANGED
@@ -181,6 +181,7 @@ export { useFocusByEnter } from './util/keydown-util/keydown-util.mjs';
181
181
  export { convertBtnType } from './util/button-util/button-util.mjs';
182
182
  export { InLineAIUtil } from './util/inline-ai-util/inline-ai-util.mjs';
183
183
  export { AIChatUtil } from './util/ai-chat-util/ai-chat-util.mjs';
184
+ export { ScreenShotUtil } from './util/screen-shot-util/screen-shot-util.mjs';
184
185
  export { parseHtml } from './util/wang-editor-util/wang-editor-util.mjs';
185
186
  export { ArrowLeftBold, ArrowRightBold } from './util/icon/icon.mjs';
186
187
  export { AuthGuard } from './web-app/guard/auth-guard/auth-guard.mjs';
@@ -875,6 +875,19 @@ var index = {
875
875
  violationPrivacy: "Violation of Privacy",
876
876
  contentInfringement: "Content infringement",
877
877
  placeholder: "Please enter"
878
+ },
879
+ screenShotUtil: {
880
+ prepareCanvas: "Prepare the canvas...",
881
+ small: "Small",
882
+ medium: "Medium",
883
+ big: "Big",
884
+ brush: "Brush",
885
+ rect: "Rect",
886
+ circle: "Circle",
887
+ mosaic: "Mosaic",
888
+ text: "Text",
889
+ arrow: "Arrow",
890
+ drawdown: "Drawdown"
878
891
  }
879
892
  },
880
893
  // runTime
@@ -871,6 +871,19 @@ var index = {
871
871
  violationPrivacy: "\u4FB5\u72AF\u9690\u79C1",
872
872
  contentInfringement: "\u5185\u5BB9\u4FB5\u6743",
873
873
  placeholder: "\u8BF7\u8F93\u5165"
874
+ },
875
+ screenShotUtil: {
876
+ prepareCanvas: "\u51C6\u5907\u753B\u5E03\u4E2D...",
877
+ small: "\u5C0F",
878
+ medium: "\u4E2D",
879
+ big: "\u5927",
880
+ brush: "\u753B\u7B14",
881
+ rect: "\u77E9\u5F62",
882
+ circle: "\u5706\u5F62",
883
+ mosaic: "\u9A6C\u8D5B\u514B",
884
+ text: "\u6587\u672C\u6CE8\u91CA",
885
+ arrow: "\u7BAD\u5934",
886
+ drawdown: "\u56DE\u64A4"
874
887
  }
875
888
  },
876
889
  // runTime