super-page-runtime 2.0.16 → 2.0.22

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 (198) hide show
  1. package/dist/es/components/runtime/utils/api/api-util.js +16 -14
  2. package/dist/es/components/runtime/utils/api/page-expose-util.d.ts +1 -0
  3. package/dist/es/components/runtime/utils/api/page-expose-util.js +202 -0
  4. package/dist/es/components/runtime/utils/assemblys-config.js +29 -7
  5. package/dist/es/components/runtime/utils/common-util.d.ts +3 -2
  6. package/dist/es/components/runtime/utils/common-util.js +21 -11
  7. package/dist/es/components/runtime/utils/events/event-util.js +9 -14
  8. package/dist/es/components/runtime/utils/events/standard-event.d.ts +1 -0
  9. package/dist/es/components/runtime/utils/events/standard-event.js +128 -110
  10. package/dist/es/components/runtime/utils/events/validator-util.js +4 -3
  11. package/dist/es/components/runtime/utils/global-refs.js +12 -0
  12. package/dist/es/components/runtime/utils/interfaces/page-design-types.d.ts +3 -1
  13. package/dist/es/components/runtime/utils/page-helper-util.js +4 -4
  14. package/dist/es/components/runtime/utils/page-init-util.js +6 -3
  15. package/dist/es/components/runtime/utils/table-utils.js +4 -5
  16. package/dist/es/components/runtime/views/assemblys/button/button/button-runtime.vue2.js +17 -17
  17. package/dist/es/components/runtime/views/assemblys/button/dropdown/dropdown-runtime.vue2.js +17 -17
  18. package/dist/es/components/runtime/views/assemblys/common/remove-signer-dialog.vue.d.ts +1 -1
  19. package/dist/es/components/runtime/views/assemblys/common/task-informition-dialog.vue.d.ts +1 -1
  20. package/dist/es/components/runtime/views/assemblys/container/flex/flex-runtime.vue2.js +5 -5
  21. package/dist/es/components/runtime/views/assemblys/container/tabs/tabs-runtime.vue2.js +13 -8
  22. package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue.js +12 -13
  23. package/dist/es/components/runtime/views/assemblys/data/table/sub-table-runtime.vue.js +2 -1
  24. package/dist/es/components/runtime/views/assemblys/form/checkbox/checkbox-runtime.vue2.js +11 -11
  25. package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue2.js +28 -28
  26. package/dist/es/components/runtime/views/assemblys/form/dept-tree/depttree-runtime.vue2.js +12 -12
  27. package/dist/es/components/runtime/views/assemblys/form/divider/divider-runtime.vue2.js +7 -5
  28. package/dist/es/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue2.js +14 -14
  29. package/dist/es/components/runtime/views/assemblys/form/input-number/input-number-runtime.vue2.js +15 -15
  30. package/dist/es/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue2.js +33 -33
  31. package/dist/es/components/runtime/views/assemblys/form/label/label-runtime.vue2.js +40 -37
  32. package/dist/es/components/runtime/views/assemblys/form/link/link-runtime.vue2.js +10 -10
  33. package/dist/es/components/runtime/views/assemblys/form/radio/radio-runtime.vue2.js +13 -13
  34. package/dist/es/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue2.js +91 -39
  35. package/dist/es/components/runtime/views/assemblys/form/select/select-runtime.vue2.js +27 -27
  36. package/dist/es/components/runtime/views/assemblys/form/separatelabel/separatelabel-runtime.vue.js +4 -0
  37. package/dist/es/components/runtime/views/assemblys/form/separatelabel/separatelabel-runtime.vue2.js +42 -0
  38. package/dist/es/components/runtime/views/assemblys/form/switch/switch-runtime.vue2.js +13 -13
  39. package/dist/es/components/runtime/views/assemblys/form/tag/tag-runtime.vue2.js +10 -10
  40. package/dist/es/components/runtime/views/assemblys/form/textarea/textarea-runtime.vue2.js +14 -14
  41. package/dist/es/components/runtime/views/assemblys/object-render.vue.js +8 -3
  42. package/dist/es/components/runtime/views/assemblys/workflow/picture-flow/pictureflow-runtime.vue.js +4 -0
  43. package/dist/es/components/runtime/views/assemblys/workflow/picture-flow/pictureflow-runtime.vue2.js +40 -0
  44. package/dist/es/components/runtime/views/assemblys/workflow/text-history/textflow-runtime.vue.js +4 -0
  45. package/dist/es/components/runtime/views/assemblys/workflow/text-history/textflow-runtime.vue2.js +40 -0
  46. package/dist/es/components/runtime/views/assemblys/workflow/workflow-button/workflowbutton-runtime.vue2.js +5 -7
  47. package/dist/es/components/runtime/views/super-page.vue.js +2 -2
  48. package/package.json +3 -2
  49. package/dist/lib/_virtual/AttributeMap.js +0 -4
  50. package/dist/lib/_virtual/Delta.js +0 -4
  51. package/dist/lib/_virtual/Op.js +0 -4
  52. package/dist/lib/_virtual/OpIterator.js +0 -4
  53. package/dist/lib/_virtual/__vite-browser-external.js +0 -3
  54. package/dist/lib/_virtual/_commonjsHelpers.js +0 -8
  55. package/dist/lib/_virtual/_plugin-vue_export-helper.js +0 -9
  56. package/dist/lib/_virtual/dayjs.min.js +0 -4
  57. package/dist/lib/_virtual/index.js +0 -4
  58. package/dist/lib/_virtual/index2.js +0 -4
  59. package/dist/lib/_virtual/index3.js +0 -4
  60. package/dist/lib/assets/chart-themes/theme1.d.ts +0 -4
  61. package/dist/lib/assets/chart-themes/theme1.js +0 -7
  62. package/dist/lib/assets/chart-themes/theme2.d.ts +0 -4
  63. package/dist/lib/assets/chart-themes/theme2.js +0 -7
  64. package/dist/lib/assets/chart-themes/theme3.d.ts +0 -4
  65. package/dist/lib/assets/chart-themes/theme3.js +0 -7
  66. package/dist/lib/components/runtime/index.d.ts +0 -4
  67. package/dist/lib/components/runtime/utils/api/api-util.d.ts +0 -11
  68. package/dist/lib/components/runtime/utils/api/api-util.js +0 -128
  69. package/dist/lib/components/runtime/utils/assemblys-config.js +0 -258
  70. package/dist/lib/components/runtime/utils/charts/chart-util.d.ts +0 -11
  71. package/dist/lib/components/runtime/utils/charts/chart-util.js +0 -28
  72. package/dist/lib/components/runtime/utils/common-util.d.ts +0 -16
  73. package/dist/lib/components/runtime/utils/common-util.js +0 -94
  74. package/dist/lib/components/runtime/utils/eventBus.d.ts +0 -7
  75. package/dist/lib/components/runtime/utils/eventBus.js +0 -10
  76. package/dist/lib/components/runtime/utils/events/event-util.d.ts +0 -48
  77. package/dist/lib/components/runtime/utils/events/event-util.js +0 -526
  78. package/dist/lib/components/runtime/utils/events/standard-event.d.ts +0 -61
  79. package/dist/lib/components/runtime/utils/events/standard-event.js +0 -1625
  80. package/dist/lib/components/runtime/utils/events/validator-util.d.ts +0 -4
  81. package/dist/lib/components/runtime/utils/events/validator-util.js +0 -389
  82. package/dist/lib/components/runtime/utils/global-refs.d.ts +0 -59
  83. package/dist/lib/components/runtime/utils/global-refs.js +0 -65
  84. package/dist/lib/components/runtime/utils/interfaces/page-design-types.d.ts +0 -223
  85. package/dist/lib/components/runtime/utils/interfaces/page-design-types.js +0 -9
  86. package/dist/lib/components/runtime/utils/page-helper-util.d.ts +0 -106
  87. package/dist/lib/components/runtime/utils/page-helper-util.js +0 -622
  88. package/dist/lib/components/runtime/utils/page-init-util.d.ts +0 -38
  89. package/dist/lib/components/runtime/utils/page-init-util.js +0 -200
  90. package/dist/lib/components/runtime/utils/page-permission-util.d.ts +0 -26
  91. package/dist/lib/components/runtime/utils/page-permission-util.js +0 -525
  92. package/dist/lib/components/runtime/utils/store-util.d.ts +0 -15
  93. package/dist/lib/components/runtime/utils/store-util.js +0 -17
  94. package/dist/lib/components/runtime/utils/store.d.ts +0 -2
  95. package/dist/lib/components/runtime/utils/store.js +0 -3
  96. package/dist/lib/components/runtime/utils/table-utils.js +0 -24
  97. package/dist/lib/components/runtime/views/assemblys/button/button/button-runtime.vue.js +0 -3
  98. package/dist/lib/components/runtime/views/assemblys/button/button/button-runtime.vue2.js +0 -54
  99. package/dist/lib/components/runtime/views/assemblys/button/button-group/buttongroup-runtime.vue.js +0 -3
  100. package/dist/lib/components/runtime/views/assemblys/button/button-group/buttongroup-runtime.vue2.js +0 -35
  101. package/dist/lib/components/runtime/views/assemblys/button/dropdown/dropdown-runtime.vue.js +0 -3
  102. package/dist/lib/components/runtime/views/assemblys/button/dropdown/dropdown-runtime.vue2.js +0 -110
  103. package/dist/lib/components/runtime/views/assemblys/chart/column-line/column-line-runtime.vue.js +0 -3
  104. package/dist/lib/components/runtime/views/assemblys/chart/column-line/column-line-runtime.vue2.js +0 -432
  105. package/dist/lib/components/runtime/views/assemblys/chart/common/common-chart-header-breadcrumb.vue.js +0 -43
  106. package/dist/lib/components/runtime/views/assemblys/chart/common/common-chart-header-breadcrumb.vue2.js +0 -3
  107. package/dist/lib/components/runtime/views/assemblys/chart/common/common-chart-header-group.vue.js +0 -61
  108. package/dist/lib/components/runtime/views/assemblys/chart/common/common-chart-header-group.vue2.js +0 -3
  109. package/dist/lib/components/runtime/views/assemblys/chart/common/common-chart-header.vue.js +0 -126
  110. package/dist/lib/components/runtime/views/assemblys/chart/common/common-chart-header.vue2.js +0 -3
  111. package/dist/lib/components/runtime/views/assemblys/chart/gauge/gauge-runtime.vue.js +0 -3
  112. package/dist/lib/components/runtime/views/assemblys/chart/gauge/gauge-runtime.vue2.js +0 -52
  113. package/dist/lib/components/runtime/views/assemblys/chart/pie/pie-runtime.vue.js +0 -3
  114. package/dist/lib/components/runtime/views/assemblys/chart/pie/pie-runtime.vue2.js +0 -54
  115. package/dist/lib/components/runtime/views/assemblys/chart/radar/radar-runtime.vue.js +0 -3
  116. package/dist/lib/components/runtime/views/assemblys/chart/radar/radar-runtime.vue2.js +0 -54
  117. package/dist/lib/components/runtime/views/assemblys/chart/scatter/scatter-runtime.vue.js +0 -3
  118. package/dist/lib/components/runtime/views/assemblys/chart/scatter/scatter-runtime.vue2.js +0 -56
  119. package/dist/lib/components/runtime/views/assemblys/common/export-form-report-dialog.vue.d.ts +0 -24
  120. package/dist/lib/components/runtime/views/assemblys/common/export-form-report-dialog.vue.js +0 -147
  121. package/dist/lib/components/runtime/views/assemblys/common/export-form-report-dialog.vue2.js +0 -3
  122. package/dist/lib/components/runtime/views/assemblys/common/remove-signer-dialog.vue.d.ts +0 -35
  123. package/dist/lib/components/runtime/views/assemblys/common/remove-signer-dialog.vue.js +0 -127
  124. package/dist/lib/components/runtime/views/assemblys/common/remove-signer-dialog.vue2.js +0 -3
  125. package/dist/lib/components/runtime/views/assemblys/common/task-informition-dialog.vue.d.ts +0 -26
  126. package/dist/lib/components/runtime/views/assemblys/common/task-informition-dialog.vue.js +0 -104
  127. package/dist/lib/components/runtime/views/assemblys/common/task-informition-dialog.vue2.js +0 -3
  128. package/dist/lib/components/runtime/views/assemblys/container/card/card-runtime.vue.js +0 -3
  129. package/dist/lib/components/runtime/views/assemblys/container/card/card-runtime.vue2.js +0 -72
  130. package/dist/lib/components/runtime/views/assemblys/container/collapse/collapse-runtime.vue.js +0 -3
  131. package/dist/lib/components/runtime/views/assemblys/container/collapse/collapse-runtime.vue2.js +0 -74
  132. package/dist/lib/components/runtime/views/assemblys/container/container/container-runtime.vue.js +0 -3
  133. package/dist/lib/components/runtime/views/assemblys/container/container/container-runtime.vue2.js +0 -79
  134. package/dist/lib/components/runtime/views/assemblys/container/flex/flex-runtime.vue.js +0 -3
  135. package/dist/lib/components/runtime/views/assemblys/container/flex/flex-runtime.vue2.js +0 -43
  136. package/dist/lib/components/runtime/views/assemblys/container/form/form-runtime.vue.js +0 -3
  137. package/dist/lib/components/runtime/views/assemblys/container/form/form-runtime.vue2.js +0 -44
  138. package/dist/lib/components/runtime/views/assemblys/container/iframe/iframe-runtime.vue.js +0 -3
  139. package/dist/lib/components/runtime/views/assemblys/container/iframe/iframe-runtime.vue2.js +0 -30
  140. package/dist/lib/components/runtime/views/assemblys/container/tabs/tabs-runtime.vue.js +0 -3
  141. package/dist/lib/components/runtime/views/assemblys/container/tabs/tabs-runtime.vue2.js +0 -69
  142. package/dist/lib/components/runtime/views/assemblys/container/tools/tools-runtime.vue.js +0 -3
  143. package/dist/lib/components/runtime/views/assemblys/container/tools/tools-runtime.vue2.js +0 -75
  144. package/dist/lib/components/runtime/views/assemblys/data/table/main-table-runtime.vue.js +0 -642
  145. package/dist/lib/components/runtime/views/assemblys/data/table/main-table-runtime.vue2.js +0 -3
  146. package/dist/lib/components/runtime/views/assemblys/data/table/sub-table-runtime.vue.js +0 -453
  147. package/dist/lib/components/runtime/views/assemblys/data/table/sub-table-runtime.vue2.js +0 -3
  148. package/dist/lib/components/runtime/views/assemblys/data/table/table-runtime.vue.js +0 -3
  149. package/dist/lib/components/runtime/views/assemblys/data/table/table-runtime.vue2.js +0 -88
  150. package/dist/lib/components/runtime/views/assemblys/error-render.vue.d.ts +0 -22
  151. package/dist/lib/components/runtime/views/assemblys/error-render.vue.js +0 -22
  152. package/dist/lib/components/runtime/views/assemblys/error-render.vue2.js +0 -3
  153. package/dist/lib/components/runtime/views/assemblys/form/checkbox/checkbox-runtime.vue.js +0 -3
  154. package/dist/lib/components/runtime/views/assemblys/form/checkbox/checkbox-runtime.vue2.js +0 -156
  155. package/dist/lib/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue.js +0 -3
  156. package/dist/lib/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue2.js +0 -82
  157. package/dist/lib/components/runtime/views/assemblys/form/dept-tree/depttree-runtime.vue.js +0 -3
  158. package/dist/lib/components/runtime/views/assemblys/form/dept-tree/depttree-runtime.vue2.js +0 -64
  159. package/dist/lib/components/runtime/views/assemblys/form/divider/divider-runtime.vue.js +0 -3
  160. package/dist/lib/components/runtime/views/assemblys/form/divider/divider-runtime.vue2.js +0 -40
  161. package/dist/lib/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue.js +0 -3
  162. package/dist/lib/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue2.js +0 -74
  163. package/dist/lib/components/runtime/views/assemblys/form/input-number/input-number-runtime.vue.js +0 -3
  164. package/dist/lib/components/runtime/views/assemblys/form/input-number/input-number-runtime.vue2.js +0 -63
  165. package/dist/lib/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue.js +0 -3
  166. package/dist/lib/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue2.js +0 -127
  167. package/dist/lib/components/runtime/views/assemblys/form/label/label-runtime.vue.js +0 -3
  168. package/dist/lib/components/runtime/views/assemblys/form/label/label-runtime.vue2.js +0 -127
  169. package/dist/lib/components/runtime/views/assemblys/form/link/link-runtime.vue.js +0 -3
  170. package/dist/lib/components/runtime/views/assemblys/form/link/link-runtime.vue2.js +0 -77
  171. package/dist/lib/components/runtime/views/assemblys/form/placeholder/placeholder-runtime.vue.js +0 -3
  172. package/dist/lib/components/runtime/views/assemblys/form/placeholder/placeholder-runtime.vue2.js +0 -29
  173. package/dist/lib/components/runtime/views/assemblys/form/radio/radio-runtime.vue.js +0 -3
  174. package/dist/lib/components/runtime/views/assemblys/form/radio/radio-runtime.vue2.js +0 -157
  175. package/dist/lib/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue.js +0 -3
  176. package/dist/lib/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue2.js +0 -164
  177. package/dist/lib/components/runtime/views/assemblys/form/select/select-runtime.vue.js +0 -3
  178. package/dist/lib/components/runtime/views/assemblys/form/select/select-runtime.vue2.js +0 -201
  179. package/dist/lib/components/runtime/views/assemblys/form/switch/switch-runtime.vue.js +0 -3
  180. package/dist/lib/components/runtime/views/assemblys/form/switch/switch-runtime.vue2.js +0 -63
  181. package/dist/lib/components/runtime/views/assemblys/form/tag/tag-runtime.vue.js +0 -3
  182. package/dist/lib/components/runtime/views/assemblys/form/tag/tag-runtime.vue2.js +0 -63
  183. package/dist/lib/components/runtime/views/assemblys/form/textarea/textarea-runtime.vue.js +0 -3
  184. package/dist/lib/components/runtime/views/assemblys/form/textarea/textarea-runtime.vue2.js +0 -65
  185. package/dist/lib/components/runtime/views/assemblys/object-render.vue.d.ts +0 -17
  186. package/dist/lib/components/runtime/views/assemblys/object-render.vue.js +0 -142
  187. package/dist/lib/components/runtime/views/assemblys/object-render.vue2.js +0 -3
  188. package/dist/lib/components/runtime/views/assemblys/workflow/workflow-button/workflowbutton-runtime.vue.js +0 -3
  189. package/dist/lib/components/runtime/views/assemblys/workflow/workflow-button/workflowbutton-runtime.vue2.js +0 -61
  190. package/dist/lib/components/runtime/views/super-page-dialog.vue.d.ts +0 -36
  191. package/dist/lib/components/runtime/views/super-page-dialog.vue.js +0 -73
  192. package/dist/lib/components/runtime/views/super-page-dialog.vue2.js +0 -3
  193. package/dist/lib/components/runtime/views/super-page.vue.d.ts +0 -91
  194. package/dist/lib/components/runtime/views/super-page.vue.js +0 -496
  195. package/dist/lib/components/runtime/views/super-page.vue2.js +0 -3
  196. package/dist/lib/favicon.ico +0 -0
  197. package/dist/lib/index.d.ts +0 -8
  198. package/dist/lib/index.js +0 -15
@@ -1,9 +1,10 @@
1
- import { defineComponent, ref, onMounted, resolveComponent, unref, openBlock, createBlock, normalizeClass, normalizeStyle, withCtx, createElementBlock, toDisplayString, createCommentVNode, createElementVNode } from "vue";
1
+ import { defineComponent, ref, onMounted, onBeforeUnmount, resolveComponent, openBlock, createBlock, normalizeClass, unref, normalizeStyle, withCtx, createElementBlock, toDisplayString, createCommentVNode, createElementVNode } from "vue";
2
2
  import { getFormModelFields } from "../../../../utils/page-init-util.js";
3
3
  import { formatVariableValue, setVariableValue } from "../../../../utils/page-helper-util.js";
4
4
  import Quill from "quill";
5
5
  import "quill/dist/quill.snow.css";
6
6
  import { handleEvent } from "../../../../utils/events/event-util.js";
7
+ import http from "agilebuilder-ui/src/utils/request";
7
8
  const _hoisted_1 = { style: { "width": "100%", "height": "100%" } };
8
9
  const _hoisted_2 = {
9
10
  key: 1,
@@ -24,13 +25,25 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
24
25
  const runtimeStyle = runtimeInfo.style;
25
26
  const runtimeClass = runtimeInfo.class;
26
27
  const headerStyle = runtimeInfo.headerStyle;
27
- const designProperty = runtimeInfo.props ? runtimeInfo.props : {};
28
+ const designProperty = ref(runtimeInfo.props ? runtimeInfo.props : {});
28
29
  let contentVariable = designProperty.value;
29
30
  const initValue = formatVariableValue(props.pageContext, contentVariable);
30
31
  const quillEditorRef = ref(null);
31
32
  const quill = ref(null);
32
33
  const fileBtn = ref(null);
33
- const fontSize = ["12px", "13px", "14px", "15px", "16px", "18px", "20px", "24px", "28px", "32px", "36px"];
34
+ const fontSize = [
35
+ "12px",
36
+ "13px",
37
+ "14px",
38
+ "15px",
39
+ "16px",
40
+ "18px",
41
+ "20px",
42
+ "24px",
43
+ "28px",
44
+ "32px",
45
+ "36px"
46
+ ];
34
47
  const option = ref({
35
48
  modules: {
36
49
  toolbar: [
@@ -63,28 +76,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
63
76
  ]
64
77
  },
65
78
  theme: "snow",
66
- placeholder: designProperty.placeholder,
67
- readOnly: designProperty.state == "readonly"
79
+ placeholder: designProperty.value.placeholder,
80
+ readOnly: designProperty.value.state == "readonly"
68
81
  });
69
- function updateEditorHeight() {
70
- if (quill && quill.value) {
71
- if (quill.value.container) {
72
- const parentNode = quill.value.container.parentNode;
73
- const parentRect = parentNode.getBoundingClientRect();
74
- const thisRect = quill.value.container.getBoundingClientRect();
75
- let newHeight = parentRect.height - (thisRect.top - parentRect.top);
76
- if (newHeight < 100) {
77
- newHeight = 100;
78
- }
79
- quill.value.container.style.height = newHeight + "px";
80
- }
81
- }
82
- }
83
- const imgHandler = (state) => {
84
- if (fileBtn.value && state) {
85
- fileBtn.value.click();
86
- }
87
- };
88
82
  const handleUpload = (e) => {
89
83
  const files = Array.prototype.slice.call(e.target.files);
90
84
  if (!files) {
@@ -95,34 +89,92 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
95
89
  alert("TODO:上传图片");
96
90
  };
97
91
  onMounted(() => {
92
+ var _a;
98
93
  quill.value = new Quill(quillEditorRef.value, option.value);
99
- quill.value.getModule("toolbar").addHandler("image", imgHandler);
100
- quill.value.on("text-change", function(delta, oldDelta, source) {
101
- if (window.updateQuillTimeout) {
102
- clearTimeout(window.updateQuillTimeout);
94
+ (_a = quillEditorRef.value) == null ? void 0 : _a.addEventListener("focusout", handleFocusOut);
95
+ quill.value.on("text-change", async function(delta, oldDelta, source) {
96
+ if (delta.ops && delta.ops.length > 0) {
97
+ for (let i = 0; i < delta.ops.length; i++) {
98
+ const ops = delta.ops[i];
99
+ if (ops.insert && ops.insert.image) {
100
+ const dataurl = ops.insert.image;
101
+ if (!dataurl.startsWith("data:image")) {
102
+ return;
103
+ }
104
+ const file = dataURLtoFile(dataurl, "image.png");
105
+ await uploadImage(file).then((res) => {
106
+ if (!quill.value) {
107
+ return;
108
+ }
109
+ const images = quill.value.root.getElementsByTagName("img");
110
+ if (images && images.length > 0) {
111
+ for (let i2 = 0; i2 < images.length; i2++) {
112
+ const img = images[i2];
113
+ if (img.src === dataurl) {
114
+ img.src = res.url;
115
+ }
116
+ }
117
+ }
118
+ }).catch((err) => {
119
+ console.error(err, "上传图片失败");
120
+ });
121
+ }
122
+ }
103
123
  }
104
- window.updateQuillTimeout = setTimeout(function() {
105
- setVariableValue(entity, dynamicFields, quill.value.root.innerHTML);
106
- handleEvent(quill.value.root.innerHTML, props.pageContext, props.configure, "change", { entity });
107
- console.log("new entity", entity);
108
- }, 1e3);
124
+ setVariableValue(entity, dynamicFields, quill.value.root.innerHTML);
109
125
  });
110
- updateEditorHeight();
126
+ updateEditorHeibusght();
111
127
  });
128
+ onBeforeUnmount(() => {
129
+ if (quillEditorRef.value) {
130
+ quillEditorRef.value.removeEventListener("focusout", handleFocusOut);
131
+ }
132
+ });
133
+ function handleFocusOut(event) {
134
+ var _a;
135
+ if (event.relatedTarget === null || !((_a = quillEditorRef.value) == null ? void 0 : _a.contains(event.relatedTarget))) {
136
+ handleEvent(quill.value.root.innerHTML, props.pageContext, props.configure, "change", {
137
+ entity
138
+ });
139
+ }
140
+ }
141
+ function uploadImage(blob) {
142
+ const params = new FormData();
143
+ params.append("file", blob);
144
+ const config = {
145
+ headers: {
146
+ "Content-Type": "multipart/form-data"
147
+ }
148
+ };
149
+ return http.post(
150
+ window.$vueApp.config.globalProperties.baseURL + "/common/fs-upload/rich-editor-image",
151
+ params,
152
+ config
153
+ );
154
+ }
155
+ function dataURLtoFile(dataurl, filename) {
156
+ let arr = dataurl.split(",");
157
+ let mime = arr[0].match(/:(.*?);/)[1];
158
+ let bstr = atob(arr[1]), n = bstr.length, u8arr = new Uint8Array(n);
159
+ while (n--) {
160
+ u8arr[n] = bstr.charCodeAt(n);
161
+ }
162
+ return new File([u8arr], filename, { type: mime });
163
+ }
112
164
  return (_ctx, _cache) => {
113
165
  const _component_el_form_item = resolveComponent("el-form-item");
114
- return unref(designProperty).tittleShow ? (openBlock(), createBlock(_component_el_form_item, {
166
+ return designProperty.value.tittleShow ? (openBlock(), createBlock(_component_el_form_item, {
115
167
  key: 0,
116
- required: unref(designProperty).required,
168
+ required: designProperty.value.required,
117
169
  class: normalizeClass(unref(runtimeClass)),
118
- "label-width": unref(designProperty).labelWidth,
170
+ "label-width": designProperty.value.labelWidth,
119
171
  style: normalizeStyle(unref(runtimeStyle))
120
172
  }, {
121
173
  label: withCtx(() => [
122
- unref(designProperty).tittleShow ? (openBlock(), createElementBlock("div", {
174
+ designProperty.value.tittleShow ? (openBlock(), createElementBlock("div", {
123
175
  key: 0,
124
176
  style: normalizeStyle({ ...unref(headerStyle) })
125
- }, toDisplayString(unref(designProperty).title), 5)) : createCommentVNode("", true)
177
+ }, toDisplayString(designProperty.value.title), 5)) : createCommentVNode("", true)
126
178
  ]),
127
179
  default: withCtx(() => [
128
180
  createElementVNode("div", _hoisted_1, [
@@ -1,4 +1,4 @@
1
- import { defineComponent, computed, ref, watch, resolveComponent, openBlock, createBlock, unref, normalizeClass, normalizeStyle, withCtx, createElementBlock, toDisplayString, createCommentVNode, createVNode, Fragment, renderList, createElementVNode } from "vue";
1
+ import { defineComponent, computed, ref, watch, resolveComponent, openBlock, createBlock, normalizeClass, unref, normalizeStyle, withCtx, createElementBlock, toDisplayString, createCommentVNode, createVNode, Fragment, renderList, createElementVNode } from "vue";
2
2
  import { getVariableValue, setVariableValue, getOptionDatasFromPage, queryOptionDatasources, autoSetAfterSelect } from "../../../../utils/page-helper-util.js";
3
3
  import { getFormModelFields } from "../../../../utils/page-init-util.js";
4
4
  import { handleEvent } from "../../../../utils/events/event-util.js";
@@ -26,8 +26,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
26
26
  const runtimeStyle = runtimeInfo.style;
27
27
  const runtimeClass = runtimeInfo.class;
28
28
  const headerStyle = runtimeInfo.headerStyle;
29
- const designProperty = runtimeInfo.props ? runtimeInfo.props : {};
30
- const listOptions = ref(designProperty.options ? designProperty.options : []);
29
+ const designProperty = ref(runtimeInfo.props ? runtimeInfo.props : {});
30
+ const listOptions = ref(designProperty.value.options ? designProperty.value.options : []);
31
31
  const cacheOptions = getOptionDatasFromPage(props.pageContext, props.configure);
32
32
  if (cacheOptions.length > 0) {
33
33
  listOptions.value = cacheOptions;
@@ -36,14 +36,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
36
36
  const dataOrigin = props.configure.props && props.configure.props.dataOrigin ? props.configure.props.dataOrigin : {};
37
37
  const valueType = dataOrigin.optionValueSetType;
38
38
  let autoSets = [];
39
- const optionconfigInfo = designProperty.optionconfigInfo ? designProperty.optionconfigInfo : {};
39
+ const optionconfigInfo = designProperty.value.optionconfigInfo ? designProperty.value.optionconfigInfo : {};
40
40
  if (valueType == "dynamicData" || valueType == "dataTable" || valueType == "service") {
41
41
  if (dataOrigin.filterType == "remote") {
42
- designProperty.filterable = true;
43
- designProperty.remote = true;
44
- designProperty.remoteShowSuffix = true;
42
+ designProperty.value.filterable = true;
43
+ designProperty.value.remote = true;
44
+ designProperty.value.remoteShowSuffix = true;
45
45
  let hisQuery = void 0;
46
- designProperty.remoteMethod = function(query) {
46
+ designProperty.value.remoteMethod = function(query) {
47
47
  if (hisQuery === query) {
48
48
  return;
49
49
  }
@@ -72,8 +72,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
72
72
  target: props.configure.props.base.optionProp
73
73
  });
74
74
  }
75
- designProperty.changeMethod = optionChange;
76
- const monitorFields = designProperty.monitorFields;
75
+ designProperty.value.changeMethod = optionChange;
76
+ const monitorFields = designProperty.value.monitorFields;
77
77
  const monitorFieldInfos = [];
78
78
  if (monitorFields) {
79
79
  const preFields = [];
@@ -144,33 +144,33 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
144
144
  const _component_el_select = resolveComponent("el-select");
145
145
  const _component_el_form_item = resolveComponent("el-form-item");
146
146
  return openBlock(), createBlock(_component_el_form_item, {
147
- required: unref(designProperty).required ? true : false,
147
+ required: designProperty.value.required ? true : false,
148
148
  class: normalizeClass(unref(runtimeClass)),
149
- "label-width": unref(designProperty).labelWidth,
149
+ "label-width": designProperty.value.labelWidth,
150
150
  style: normalizeStyle(unref(runtimeStyle))
151
151
  }, {
152
152
  label: withCtx(() => [
153
- unref(designProperty).tittleShow ? (openBlock(), createElementBlock("div", {
153
+ designProperty.value.tittleShow ? (openBlock(), createElementBlock("div", {
154
154
  key: 0,
155
155
  style: normalizeStyle({ ...unref(headerStyle) })
156
- }, toDisplayString(unref(designProperty).title), 5)) : createCommentVNode("", true)
156
+ }, toDisplayString(designProperty.value.title), 5)) : createCommentVNode("", true)
157
157
  ]),
158
158
  default: withCtx(() => [
159
159
  createVNode(_component_el_select, {
160
- disabled: unref(designProperty).state === "disabled",
161
- size: unref(designProperty).size,
162
- clearable: unref(designProperty).clearable,
163
- multiple: unref(designProperty).multiple,
164
- "collapse-tags": unref(designProperty).collapseTags,
165
- "collapse-tags-tooltip": unref(designProperty).collapseTagsTooltip,
166
- filterable: unref(designProperty).filterable,
167
- "allow-create": unref(designProperty).allowCreate,
168
- placeholder: unref(designProperty).placeholder,
169
- "remote-show-suffix": unref(designProperty).remoteShowSuffix,
170
- remote: unref(designProperty).remote,
171
- "remote-method": unref(designProperty).remoteMethod,
160
+ disabled: designProperty.value.state === "disabled",
161
+ size: designProperty.value.size,
162
+ clearable: designProperty.value.clearable,
163
+ multiple: designProperty.value.multiple,
164
+ "collapse-tags": designProperty.value.collapseTags,
165
+ "collapse-tags-tooltip": designProperty.value.collapseTagsTooltip,
166
+ filterable: designProperty.value.filterable,
167
+ "allow-create": designProperty.value.allowCreate,
168
+ placeholder: designProperty.value.placeholder,
169
+ "remote-show-suffix": designProperty.value.remoteShowSuffix,
170
+ remote: designProperty.value.remote,
171
+ "remote-method": designProperty.value.remoteMethod,
172
172
  loading: queryLoadingFlag.value,
173
- onChange: unref(designProperty).changeMethod,
173
+ onChange: designProperty.value.changeMethod,
174
174
  modelValue: dynamicModelMethod.value,
175
175
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => dynamicModelMethod.value = $event)
176
176
  }, {
@@ -0,0 +1,4 @@
1
+ import _sfc_main from "./separatelabel-runtime.vue2.js";
2
+ export {
3
+ _sfc_main as default
4
+ };
@@ -0,0 +1,42 @@
1
+ import { defineComponent, ref, openBlock, createElementBlock, normalizeStyle, unref, normalizeClass, createElementVNode, createBlock, createCommentVNode, createTextVNode, toDisplayString } from "vue";
2
+ import { SuperIcon } from "agilebuilder-ui";
3
+ const _sfc_main = /* @__PURE__ */ defineComponent({
4
+ __name: "separatelabel-runtime",
5
+ props: {
6
+ pageContext: {},
7
+ configure: {}
8
+ },
9
+ setup(__props, { expose: __expose }) {
10
+ const props = __props;
11
+ const thisRef = ref(null);
12
+ const runtimeInfo = props.configure.runtime ? props.configure.runtime : {};
13
+ const runtimeStyle = runtimeInfo.style;
14
+ const runtimeClass = runtimeInfo.class;
15
+ const headerStyle = runtimeInfo.headerStyle;
16
+ __expose({});
17
+ return (_ctx, _cache) => {
18
+ return openBlock(), createElementBlock("div", {
19
+ style: normalizeStyle(unref(runtimeStyle)),
20
+ class: normalizeClass([unref(runtimeClass), "amb-widget-separatelabel"]),
21
+ ref_key: "thisRef",
22
+ ref: thisRef
23
+ }, [
24
+ createElementVNode("div", {
25
+ class: "label",
26
+ style: normalizeStyle(unref(headerStyle))
27
+ }, [
28
+ _ctx.configure.props.iconType && _ctx.configure.props.iconValue ? (openBlock(), createBlock(unref(SuperIcon), {
29
+ key: 0,
30
+ iconType: _ctx.configure.props.iconType,
31
+ iconValue: _ctx.configure.props.iconValue,
32
+ style: { "margin-right": "2px" }
33
+ }, null, 8, ["iconType", "iconValue"])) : createCommentVNode("", true),
34
+ createTextVNode(" " + toDisplayString(_ctx.configure.props.base.title), 1)
35
+ ], 4)
36
+ ], 6);
37
+ };
38
+ }
39
+ });
40
+ export {
41
+ _sfc_main as default
42
+ };
@@ -1,4 +1,4 @@
1
- import { defineComponent, computed, resolveComponent, openBlock, createBlock, unref, normalizeClass, normalizeStyle, withCtx, createElementBlock, toDisplayString, createCommentVNode, createVNode } from "vue";
1
+ import { defineComponent, computed, ref, resolveComponent, openBlock, createBlock, normalizeClass, unref, normalizeStyle, withCtx, createElementBlock, toDisplayString, createCommentVNode, createVNode } from "vue";
2
2
  import { getFormModelFields } from "../../../../utils/page-init-util.js";
3
3
  import { getVariableValue, setVariableValue } from "../../../../utils/page-helper-util.js";
4
4
  import { handleEvent } from "../../../../utils/events/event-util.js";
@@ -24,32 +24,32 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
24
24
  const runtimeStyle = runtimeInfo.style;
25
25
  const runtimeClass = runtimeInfo.class;
26
26
  const headerStyle = runtimeInfo.headerStyle;
27
- const designProperty = runtimeInfo.props ? runtimeInfo.props : {};
27
+ const designProperty = ref(runtimeInfo.props ? runtimeInfo.props : {});
28
28
  const switchStyle = runtimeInfo.switchStyle;
29
29
  return (_ctx, _cache) => {
30
30
  const _component_el_switch = resolveComponent("el-switch");
31
31
  const _component_el_form_item = resolveComponent("el-form-item");
32
32
  return openBlock(), createBlock(_component_el_form_item, {
33
- required: unref(designProperty).required,
33
+ required: designProperty.value.required,
34
34
  class: normalizeClass(unref(runtimeClass)),
35
- "label-width": unref(designProperty).labelWidth,
35
+ "label-width": designProperty.value.labelWidth,
36
36
  style: normalizeStyle(unref(runtimeStyle))
37
37
  }, {
38
38
  label: withCtx(() => [
39
- unref(designProperty).tittleShow ? (openBlock(), createElementBlock("div", {
39
+ designProperty.value.tittleShow ? (openBlock(), createElementBlock("div", {
40
40
  key: 0,
41
41
  style: normalizeStyle({ ...unref(headerStyle) })
42
- }, toDisplayString(unref(designProperty).title), 5)) : createCommentVNode("", true)
42
+ }, toDisplayString(designProperty.value.title), 5)) : createCommentVNode("", true)
43
43
  ]),
44
44
  default: withCtx(() => [
45
45
  createVNode(_component_el_switch, {
46
- disabled: unref(designProperty).state === "disabled",
47
- "active-value:": unref(designProperty).activeValue,
48
- "active-text": unref(designProperty).activeText,
49
- "inactive-value": unref(designProperty).inactiveValue,
50
- "inactive-text": unref(designProperty).inactiveText,
51
- width: unref(designProperty).offOnWidth,
52
- size: unref(designProperty).size,
46
+ disabled: designProperty.value.state === "disabled",
47
+ "active-value:": designProperty.value.activeValue,
48
+ "active-text": designProperty.value.activeText,
49
+ "inactive-value": designProperty.value.inactiveValue,
50
+ "inactive-text": designProperty.value.inactiveText,
51
+ width: designProperty.value.offOnWidth,
52
+ size: designProperty.value.size,
53
53
  style: normalizeStyle(unref(switchStyle)),
54
54
  modelValue: dynamicModelMethod.value,
55
55
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => dynamicModelMethod.value = $event),
@@ -1,4 +1,4 @@
1
- import { defineComponent, computed, resolveComponent, openBlock, createBlock, unref, normalizeClass, normalizeStyle, withCtx, createElementBlock, toDisplayString, createCommentVNode, createVNode, createTextVNode } from "vue";
1
+ import { defineComponent, ref, computed, resolveComponent, openBlock, createBlock, normalizeClass, unref, normalizeStyle, withCtx, createElementBlock, toDisplayString, createCommentVNode, createVNode, createTextVNode } from "vue";
2
2
  import { getFormModelFields } from "../../../../utils/page-init-util.js";
3
3
  import { formatVariableValue } from "../../../../utils/page-helper-util.js";
4
4
  import { handleEvent } from "../../../../utils/events/event-util.js";
@@ -15,8 +15,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
15
15
  const runtimeStyle = runtimeInfo.style;
16
16
  const runtimeClass = runtimeInfo.class;
17
17
  const headerStyle = runtimeInfo.headerStyle;
18
- const designProperty = runtimeInfo.props ? runtimeInfo.props : {};
19
- let contentVariable = designProperty.formatting;
18
+ const designProperty = ref(runtimeInfo.props ? runtimeInfo.props : {});
19
+ let contentVariable = designProperty.value.formatting;
20
20
  if (!contentVariable) {
21
21
  const propsBase = props.configure.props.base ? props.configure.props.base : {};
22
22
  contentVariable = propsBase.prop;
@@ -32,22 +32,22 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
32
32
  const _component_el_tag = resolveComponent("el-tag");
33
33
  const _component_el_form_item = resolveComponent("el-form-item");
34
34
  return openBlock(), createBlock(_component_el_form_item, {
35
- required: unref(designProperty).required,
35
+ required: designProperty.value.required,
36
36
  class: normalizeClass(unref(runtimeClass)),
37
- "label-width": unref(designProperty).labelWidth,
37
+ "label-width": designProperty.value.labelWidth,
38
38
  style: normalizeStyle(unref(runtimeStyle))
39
39
  }, {
40
40
  label: withCtx(() => [
41
- unref(designProperty).tittleShow ? (openBlock(), createElementBlock("div", {
41
+ designProperty.value.tittleShow ? (openBlock(), createElementBlock("div", {
42
42
  key: 0,
43
43
  style: normalizeStyle({ ...unref(headerStyle) })
44
- }, toDisplayString(unref(designProperty).title), 5)) : createCommentVNode("", true)
44
+ }, toDisplayString(designProperty.value.title), 5)) : createCommentVNode("", true)
45
45
  ]),
46
46
  default: withCtx(() => [
47
47
  createVNode(_component_el_tag, {
48
- size: unref(designProperty).size,
49
- closable: unref(designProperty).closable,
50
- type: unref(designProperty).type,
48
+ size: designProperty.value.size,
49
+ closable: designProperty.value.closable,
50
+ type: designProperty.value.type,
51
51
  onClose: _cache[0] || (_cache[0] = ($event) => unref(handleEvent)($event, _ctx.pageContext, _ctx.configure, "remove")),
52
52
  onClick: _cache[1] || (_cache[1] = ($event) => unref(handleEvent)($event, _ctx.pageContext, _ctx.configure, "click"))
53
53
  }, {
@@ -1,4 +1,4 @@
1
- import { defineComponent, computed, resolveComponent, openBlock, createElementBlock, createVNode, unref, normalizeClass, normalizeStyle, withCtx, toDisplayString, createCommentVNode } from "vue";
1
+ import { defineComponent, computed, ref, resolveComponent, openBlock, createElementBlock, createVNode, normalizeClass, unref, normalizeStyle, withCtx, toDisplayString, createCommentVNode } from "vue";
2
2
  import { getFormModelFields } from "../../../../utils/page-init-util.js";
3
3
  import { getVariableValue, setVariableValue } from "../../../../utils/page-helper-util.js";
4
4
  import { handleEvent } from "../../../../utils/events/event-util.js";
@@ -21,7 +21,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
21
21
  }
22
22
  });
23
23
  const runtimeInfo = props.configure.runtime ? props.configure.runtime : {};
24
- const designProperty = runtimeInfo.props ? runtimeInfo.props : {};
24
+ const designProperty = ref(runtimeInfo.props ? runtimeInfo.props : {});
25
25
  const runtimeStyle = runtimeInfo.style;
26
26
  const runtimeClass = runtimeInfo.class;
27
27
  const headerStyle = runtimeInfo.headerStyle;
@@ -30,29 +30,29 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
30
30
  const _component_el_form_item = resolveComponent("el-form-item");
31
31
  return openBlock(), createElementBlock("div", null, [
32
32
  createVNode(_component_el_form_item, {
33
- required: unref(designProperty).required ? true : false,
33
+ required: designProperty.value.required ? true : false,
34
34
  class: normalizeClass(unref(runtimeClass)),
35
- "label-width": unref(designProperty).labelWidth,
35
+ "label-width": designProperty.value.labelWidth,
36
36
  style: normalizeStyle(unref(runtimeStyle))
37
37
  }, {
38
38
  label: withCtx(() => [
39
- unref(designProperty).tittleShow ? (openBlock(), createElementBlock("div", {
39
+ designProperty.value.tittleShow ? (openBlock(), createElementBlock("div", {
40
40
  key: 0,
41
41
  style: normalizeStyle({ ...unref(headerStyle) })
42
- }, toDisplayString(unref(designProperty).title), 5)) : createCommentVNode("", true)
42
+ }, toDisplayString(designProperty.value.title), 5)) : createCommentVNode("", true)
43
43
  ]),
44
44
  default: withCtx(() => [
45
45
  createVNode(_component_el_input, {
46
- disabled: unref(designProperty).state === "disabled",
47
- readonly: unref(designProperty).state === "readonly",
48
- size: unref(designProperty).size,
49
- clearable: unref(designProperty).clearable,
50
- placeholder: unref(designProperty).placeholder,
46
+ disabled: designProperty.value.state === "disabled",
47
+ readonly: designProperty.value.state === "readonly",
48
+ size: designProperty.value.size,
49
+ clearable: designProperty.value.clearable,
50
+ placeholder: designProperty.value.placeholder,
51
51
  modelValue: dynamicModelMethod.value,
52
52
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => dynamicModelMethod.value = $event),
53
- rows: unref(designProperty).rows ? unref(designProperty).rows : 2,
54
- maxlength: unref(designProperty).maxLength,
55
- "show-word-limit": unref(designProperty).showInputNum,
53
+ rows: designProperty.value.rows ? designProperty.value.rows : 2,
54
+ maxlength: designProperty.value.maxLength,
55
+ "show-word-limit": designProperty.value.showInputNum,
56
56
  type: "textarea",
57
57
  onInput: _cache[1] || (_cache[1] = ($event) => unref(handleEvent)($event, _ctx.pageContext, _ctx.configure, "input")),
58
58
  onChange: _cache[2] || (_cache[2] = ($event) => unref(handleEvent)($event, _ctx.pageContext, _ctx.configure, "change")),
@@ -61,12 +61,17 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
61
61
  thisRef.value = el;
62
62
  if (el && !el.show) {
63
63
  el.show = function() {
64
- handleShowFlag.value = true;
64
+ showFlag.value = true;
65
65
  };
66
66
  }
67
67
  if (el && !el.hide) {
68
68
  el.hide = function() {
69
- handleShowFlag.value = false;
69
+ showFlag.value = false;
70
+ };
71
+ }
72
+ if (el && !el.getConfigure) {
73
+ el.getConfigure = function() {
74
+ return props.configure;
70
75
  };
71
76
  }
72
77
  if (props.configure.uuid) {
@@ -110,7 +115,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
110
115
  runtimeStyle.value["width"] = thisRec.width + "px";
111
116
  } else if (thisStyle.position) {
112
117
  runtimeStyle.value["position"] = thisStyle.position;
113
- if (runtimeStyle.position != "relative") {
118
+ if (runtimeStyle.value.position != "relative") {
114
119
  if (!runtimeStyle.value["width"]) {
115
120
  const thisRec = thisRef.value.getBoundingClientRect();
116
121
  runtimeStyle.value["width"] = thisRec.width + "px";
@@ -0,0 +1,4 @@
1
+ import _sfc_main from "./pictureflow-runtime.vue2.js";
2
+ export {
3
+ _sfc_main as default
4
+ };
@@ -0,0 +1,40 @@
1
+ import { defineComponent, ref, watch, resolveComponent, openBlock, createBlock, unref, normalizeStyle } from "vue";
2
+ import "../../../../utils/eventBus.js";
3
+ import { getWorkflowId } from "../../../../utils/common-util.js";
4
+ const _sfc_main = /* @__PURE__ */ defineComponent({
5
+ __name: "pictureflow-runtime",
6
+ props: {
7
+ pageContext: {},
8
+ configure: {}
9
+ },
10
+ setup(__props) {
11
+ const props = __props;
12
+ const maxHeight = ref(null);
13
+ maxHeight.value = window.innerHeight - 120;
14
+ const historyGraphRef = ref(null);
15
+ const workflowId = getWorkflowId(props.pageContext);
16
+ if (props.pageContext.entity && props.pageContext.entity.task) {
17
+ watch(
18
+ props.pageContext.entity.task.id,
19
+ () => {
20
+ if (workflowId && historyGraphRef.value) {
21
+ historyGraphRef.value.refresh();
22
+ }
23
+ },
24
+ { immediate: true }
25
+ );
26
+ }
27
+ return (_ctx, _cache) => {
28
+ const _component_workflow_history = resolveComponent("workflow-history");
29
+ return openBlock(), createBlock(_component_workflow_history, {
30
+ id: unref(workflowId),
31
+ ref_key: "historyGraphRef",
32
+ ref: historyGraphRef,
33
+ style: normalizeStyle({ maxHeight: maxHeight.value + "px" })
34
+ }, null, 8, ["id", "style"]);
35
+ };
36
+ }
37
+ });
38
+ export {
39
+ _sfc_main as default
40
+ };
@@ -0,0 +1,4 @@
1
+ import _sfc_main from "./textflow-runtime.vue2.js";
2
+ export {
3
+ _sfc_main as default
4
+ };
@@ -0,0 +1,40 @@
1
+ import { defineComponent, ref, watch, resolveComponent, openBlock, createBlock, unref, normalizeStyle } from "vue";
2
+ import "../../../../utils/eventBus.js";
3
+ import { getWorkflowId } from "../../../../utils/common-util.js";
4
+ const _sfc_main = /* @__PURE__ */ defineComponent({
5
+ __name: "textflow-runtime",
6
+ props: {
7
+ pageContext: {},
8
+ configure: {}
9
+ },
10
+ setup(__props) {
11
+ const props = __props;
12
+ const maxHeight = ref(null);
13
+ maxHeight.value = window.innerHeight - 120;
14
+ const historyList = ref(null);
15
+ const workflowId = getWorkflowId(props.pageContext);
16
+ if (props.pageContext.entity && props.pageContext.entity.task) {
17
+ watch(
18
+ () => props.pageContext.entity.task.id,
19
+ () => {
20
+ if (workflowId && historyList.value) {
21
+ historyList.value.refresh();
22
+ }
23
+ },
24
+ { immediate: true }
25
+ );
26
+ }
27
+ return (_ctx, _cache) => {
28
+ const _component_workflow_history_list = resolveComponent("workflow-history-list");
29
+ return openBlock(), createBlock(_component_workflow_history_list, {
30
+ ref_key: "historyList",
31
+ ref: historyList,
32
+ "workflow-id": unref(workflowId),
33
+ style: normalizeStyle({ maxHeight: maxHeight.value + "px" })
34
+ }, null, 8, ["workflow-id", "style"]);
35
+ };
36
+ }
37
+ });
38
+ export {
39
+ _sfc_main as default
40
+ };
@@ -17,14 +17,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
17
17
  const completeTaskParam = props.pageContext.completeTaskParam;
18
18
  const visibleBtns = ref([]);
19
19
  props.configure.items.forEach((item) => {
20
- const pageCode = props.pageContext.code;
21
- const pageVersion = props.pageContext.version;
22
- if (isVisibleBtn(item, pageCode, pageVersion)) {
20
+ if (isVisibleBtn(item)) {
23
21
  visibleBtns.value.push(item);
24
22
  }
25
23
  });
26
- function getStandardClickEvent(events, pageCode, pageVersion) {
27
- const clickEventFunObj = getClickEventFuncByType(pageCode, pageVersion, events);
24
+ function getStandardClickEvent(events) {
25
+ const clickEventFunObj = getClickEventFuncByType(props.pageContext, events, "click");
28
26
  if (clickEventFunObj) {
29
27
  const isStandardEvent = clickEventFunObj.isStandard;
30
28
  if (isStandardEvent) {
@@ -32,9 +30,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
32
30
  }
33
31
  }
34
32
  }
35
- function isVisibleBtn(btnConfigure, pageCode, pageVersion) {
33
+ function isVisibleBtn(btnConfigure) {
36
34
  const events = btnConfigure.runtime && btnConfigure.runtime.events ? btnConfigure.runtime.events : [];
37
- const workflowStandardEventName = getStandardClickEvent(events, pageCode, pageVersion);
35
+ const workflowStandardEventName = getStandardClickEvent(events);
38
36
  const isVisible = isVisibleWorkflowButton(
39
37
  workflowStandardEventName,
40
38
  buttonInfo,