super-page-runtime 2.3.17-sit1 → 2.3.17-sit3

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 (30) hide show
  1. package/dist/es/components/runtime/utils/api/page-expose-util.js +44 -31
  2. package/dist/es/components/runtime/utils/charts/chart-util.d.ts +2 -1
  3. package/dist/es/components/runtime/utils/charts/chart-util.js +5 -5
  4. package/dist/es/components/runtime/utils/events/standard-event.js +3 -2
  5. package/dist/es/components/runtime/utils/events/validator-util.d.ts +1 -1
  6. package/dist/es/components/runtime/utils/events/validator-util.js +172 -166
  7. package/dist/es/components/runtime/views/assemblys/chart/column-line/column-line-runtime.vue.js +1 -1
  8. package/dist/es/components/runtime/views/assemblys/chart/column-line/column-line-runtime.vue2.js +1 -1
  9. package/dist/es/components/runtime/views/assemblys/chart/common/common-homepage-search.vue2.js +11 -10
  10. package/dist/es/components/runtime/views/assemblys/chart/gauge/gauge-runtime.vue.js +1 -1
  11. package/dist/es/components/runtime/views/assemblys/chart/gauge/gauge-runtime.vue2.js +1 -1
  12. package/dist/es/components/runtime/views/assemblys/chart/pie/pie-runtime.vue.js +1 -1
  13. package/dist/es/components/runtime/views/assemblys/chart/pie/pie-runtime.vue2.js +1 -1
  14. package/dist/es/components/runtime/views/assemblys/chart/radar/radar-runtime.vue.js +1 -1
  15. package/dist/es/components/runtime/views/assemblys/chart/radar/radar-runtime.vue2.js +1 -1
  16. package/dist/es/components/runtime/views/assemblys/chart/scatter/scatter-runtime.vue.js +1 -1
  17. package/dist/es/components/runtime/views/assemblys/chart/scatter/scatter-runtime.vue2.js +1 -1
  18. package/dist/es/components/runtime/views/assemblys/chart/table/table-runtime.vue2.js +1 -1
  19. package/dist/es/components/runtime/views/assemblys/container/card/card-runtime.vue.js +3 -3
  20. package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue.js +3 -0
  21. package/dist/es/components/runtime/views/assemblys/data/table/sub-table-runtime.vue.js +75 -72
  22. package/dist/es/components/runtime/views/assemblys/data/table/table-runtime.vue2.js +5 -2
  23. package/dist/es/components/runtime/views/assemblys/form/label/label-runtime.vue.js +4 -1
  24. package/dist/es/components/runtime/views/assemblys/form/label/label-runtime.vue2.js +20 -19
  25. package/dist/es/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue.js +1 -1
  26. package/dist/es/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue2.js +77 -70
  27. package/dist/es/components/runtime/views/assemblys/form/select/select-runtime.vue2.js +7 -5
  28. package/dist/es/components/runtime/views/assemblys/object-render.vue.js +74 -58
  29. package/dist/es/style.css +122 -71
  30. package/package.json +2 -2
@@ -7,8 +7,8 @@ import { $t as E } from "../../../../utils/i18n-util.js";
7
7
  import { getBaseUrl as A, addRequiredClassUtil as L } from "../../../../utils/common-util.js";
8
8
  import H from "quill";
9
9
  import "quill/dist/quill.snow.css";
10
- import { ElMessage as N } from "element-plus";
11
- const M = { class: "toolbar-right-btns" }, R = ["title"], _ = { class: "richtext-statusbar" }, j = { class: "word-count" }, V = { key: 0, class: "upload-loading" }, $ = ["innerHTML"], z = e({ __name: "richtext-runtime", props: { pageContext: {}, configure: {} }, setup(e2, { expose: z2 }) {
10
+ import { ElMessage as M } from "element-plus";
11
+ const N = { class: "toolbar-right-btns" }, R = ["title"], _ = { class: "richtext-statusbar" }, j = { class: "word-count" }, V = { key: 0, class: "upload-loading" }, $ = ["innerHTML"], z = e({ __name: "richtext-runtime", props: { pageContext: {}, configure: {} }, setup(e2, { expose: z2 }) {
12
12
  const B = ["12px", "14px", "16px", "18px", "20px", "24px", "28px", "32px", "36px", "48px"], F = H.import("attributors/style/size");
13
13
  F.whitelist = B, H.register(F, true);
14
14
  const U = [false, "Source Han Sans CN", "SimSun", "SimHei", "Microsoft YaHei", "KaiTi", "FangSong", "Arial", "Times New Roman", "Verdana", "Georgia", "Courier New"], D = H.import("attributors/style/font");
@@ -47,38 +47,57 @@ const M = { class: "toolbar-right-btns" }, R = ["title"], _ = { class: "richtext
47
47
  const t2 = e3.match(/serverPath=([^&"]+)/);
48
48
  return t2 ? t2[1] : "";
49
49
  }
50
- const we = { bold: "加粗", italic: "斜体", underline: "下划线", strike: "删除线", blockquote: "引用", "code-block": "代码块", 'list[value="ordered"]': "有序列表", 'list[value="bullet"]': "无序列表", 'script[value="sub"]': "下标", 'script[value="super"]': "上标", 'indent[value="-1"]': "减少缩进", 'indent[value="+1"]': "增加缩进", 'direction[value="rtl"]': "文字方向", size: "字体大小", header: "标题", color: "字体颜色", background: "背景颜色", font: "字体", align: "对齐方式", clean: "清除格式", link: "链接", image: "图片" };
51
- function Ce() {
50
+ function we(e3) {
51
+ if (!ne) return;
52
+ const t2 = function(e4) {
53
+ let t3 = e4.replace(/<img data-uuid="(.*?)"/g, (e5, t4) => {
54
+ const l3 = ke(t4), n2 = W.pageContext.backendUrl;
55
+ return `<img src="${A(n2, W.pageContext.isTest)}/common/fs-upload/download?serverPath=${l3}&isShowWatermark=false" data-uuid="${l3}"`;
56
+ });
57
+ return t3 = t3.replace(/\t/g, "    "), t3 = t3.replace(/ {2}/g, "  "), t3;
58
+ }(e3), l2 = ne.clipboard.convertHTML(t2);
59
+ ne.setContents(l2.ops), o(() => {
60
+ if (!ne) return;
61
+ ne.root.querySelectorAll("img").forEach((e4) => {
62
+ if (!e4.getAttribute("data-uuid")) {
63
+ const t3 = ke(e4.src);
64
+ e4.setAttribute("data-uuid", t3);
65
+ }
66
+ });
67
+ });
68
+ }
69
+ const Ce = { bold: "加粗", italic: "斜体", underline: "下划线", strike: "删除线", blockquote: "引用", "code-block": "代码块", 'list[value="ordered"]': "有序列表", 'list[value="bullet"]': "无序列表", 'script[value="sub"]': "下标", 'script[value="super"]': "上标", 'indent[value="-1"]': "减少缩进", 'indent[value="+1"]': "增加缩进", 'direction[value="rtl"]': "文字方向", size: "字体大小", header: "标题", color: "字体颜色", background: "背景颜色", font: "字体", align: "对齐方式", clean: "清除格式", link: "链接", image: "图片" };
70
+ function qe() {
52
71
  oe.value = !oe.value, o(() => {
53
72
  me();
54
73
  });
55
74
  }
56
- function qe() {
75
+ function Te() {
57
76
  ne && (ue.value = ne.root.innerHTML, re.value = true);
58
77
  }
59
- function Te() {
78
+ function Se() {
60
79
  if (!ne) return void (ie.value = 0);
61
80
  const e3 = ne.getText().trim();
62
81
  ie.value = e3.length;
63
82
  }
64
- function Se() {
65
- N.error({ message: "图片上传失败,请重试", duration: 3e3 });
83
+ function Ee() {
84
+ M.error({ message: "图片上传失败,请重试", duration: 3e3 });
66
85
  }
67
- function Ee(e3) {
86
+ function Ae(e3) {
68
87
  "Escape" === e3.key && oe.value && (oe.value = false);
69
88
  }
70
- function Ae(e3) {
89
+ function Le(e3) {
71
90
  var _a;
72
91
  ne && (null !== e3.relatedTarget && ((_a = le.value) == null ? void 0 : _a.contains(e3.relatedTarget)) || T(ne.root.innerHTML, W.pageContext, W.configure, "change", { entity: G }));
73
92
  }
74
- function Le(e3) {
93
+ function He(e3) {
75
94
  if ("img" === e3.target.localName) {
76
95
  ve.value = [];
77
96
  let t2 = e3.target.src;
78
97
  ve.value.push(t2), ge.value = true;
79
98
  }
80
99
  }
81
- function He(e3) {
100
+ function Me(e3) {
82
101
  const t2 = new FormData();
83
102
  t2.append("file", e3);
84
103
  const l2 = W.pageContext.backendUrl, n2 = A(l2, W.pageContext.isTest);
@@ -93,68 +112,52 @@ const M = { class: "toolbar-right-btns" }, R = ["title"], _ = { class: "richtext
93
112
  }
94
113
  return n(() => {
95
114
  var _a;
96
- if (!le.value) return;
97
- ne = new H(le.value, fe.value), ne.root.style.fontSize = "16px", function() {
115
+ le.value && (ne = new H(le.value, fe.value), ne.root.style.fontSize = "16px", function() {
98
116
  var _a2, _b;
99
- const e4 = (_b = (_a2 = le.value) == null ? void 0 : _a2.parentElement) == null ? void 0 : _b.querySelector(".ql-toolbar");
100
- if (!e4) return;
101
- e4.querySelectorAll("button").forEach((e5) => {
102
- const t3 = e5.className.match(/ql-([\w-]+)/);
103
- if (t3) {
104
- const l2 = t3[1], n2 = `${l2}[value="${e5.value}"]`;
105
- we[n2] ? e5.setAttribute("data-tooltip", we[n2]) : we[l2] && e5.setAttribute("data-tooltip", we[l2]);
117
+ const e3 = (_b = (_a2 = le.value) == null ? void 0 : _a2.parentElement) == null ? void 0 : _b.querySelector(".ql-toolbar");
118
+ if (!e3) return;
119
+ e3.querySelectorAll("button").forEach((e4) => {
120
+ const t2 = e4.className.match(/ql-([\w-]+)/);
121
+ if (t2) {
122
+ const l2 = t2[1], n2 = `${l2}[value="${e4.value}"]`;
123
+ Ce[n2] ? e4.setAttribute("data-tooltip", Ce[n2]) : Ce[l2] && e4.setAttribute("data-tooltip", Ce[l2]);
106
124
  }
107
- }), e4.querySelectorAll(".ql-picker").forEach((e5) => {
108
- const t3 = e5.className.match(/ql-(\w+)/);
109
- if (t3) {
110
- const l2 = t3[1];
111
- if (we[l2]) {
112
- const t4 = e5.querySelector(".ql-picker-label");
113
- t4 && t4.setAttribute("data-tooltip", we[l2]);
125
+ }), e3.querySelectorAll(".ql-picker").forEach((e4) => {
126
+ const t2 = e4.className.match(/ql-(\w+)/);
127
+ if (t2) {
128
+ const l2 = t2[1];
129
+ if (Ce[l2]) {
130
+ const t3 = e4.querySelector(".ql-picker-label");
131
+ t3 && t3.setAttribute("data-tooltip", Ce[l2]);
114
132
  }
115
133
  }
116
134
  });
117
135
  }(), function() {
118
136
  var _a2, _b;
119
- const e4 = (_b = (_a2 = le.value) == null ? void 0 : _a2.parentElement) == null ? void 0 : _b.querySelector(".ql-toolbar");
120
- e4 && e4.addEventListener("mousedown", (e5) => {
121
- e5.preventDefault();
137
+ const e3 = (_b = (_a2 = le.value) == null ? void 0 : _a2.parentElement) == null ? void 0 : _b.querySelector(".ql-toolbar");
138
+ e3 && e3.addEventListener("mousedown", (e4) => {
139
+ e4.preventDefault();
122
140
  });
123
- }();
124
- let e3 = te;
125
- e3 = e3.replace(/<img data-uuid="(.*?)"/g, (e4, t3) => {
126
- const l2 = ke(t3), n2 = W.pageContext.backendUrl;
127
- return `<img src="${A(n2, W.pageContext.isTest)}/common/fs-upload/download?serverPath=${l2}&isShowWatermark=false" data-uuid="${l2}"`;
128
- }), e3 = e3.replace(/\t/g, "    "), e3 = e3.replace(/ {2}/g, "  ");
129
- const t2 = ne.clipboard.convertHTML(e3);
130
- ne.setContents(t2.ops), o(() => {
141
+ }(), we(te), (_a = le.value) == null ? void 0 : _a.addEventListener("focusout", Le), ne.on("text-change", async function(e3) {
131
142
  if (!ne) return;
132
- ne.root.querySelectorAll("img").forEach((e4) => {
133
- if (!e4.getAttribute("data-uuid")) {
134
- const t3 = ke(e4.src);
135
- e4.setAttribute("data-uuid", t3);
136
- }
137
- });
138
- }), (_a = le.value) == null ? void 0 : _a.addEventListener("focusout", Ae), ne.on("text-change", async function(e4) {
139
- if (!ne) return;
140
- const t3 = ne.root.getElementsByTagName("img");
141
- for (const e5 of t3) if (!e5.getAttribute("data-uuid")) {
142
- const t4 = ke(e5.src);
143
- e5.setAttribute("data-uuid", t4);
143
+ const t2 = ne.root.getElementsByTagName("img");
144
+ for (const e4 of t2) if (!e4.getAttribute("data-uuid")) {
145
+ const t3 = ke(e4.src);
146
+ e4.setAttribute("data-uuid", t3);
144
147
  }
145
- if (e4.ops && e4.ops.length > 0) for (const t4 of e4.ops) {
146
- const e5 = t4.insert;
147
- if (e5 == null ? void 0 : e5.image) {
148
- const t5 = e5.image;
149
- if (!t5.startsWith("data:image")) continue;
148
+ if (e3.ops && e3.ops.length > 0) for (const t3 of e3.ops) {
149
+ const e4 = t3.insert;
150
+ if (e4 == null ? void 0 : e4.image) {
151
+ const t4 = e4.image;
152
+ if (!t4.startsWith("data:image")) continue;
150
153
  try {
151
154
  ae.value = true;
152
- const e6 = Ne(t5, "image.png"), l2 = await He(e6);
155
+ const e5 = Ne(t4, "image.png"), l2 = await Me(e5);
153
156
  if (!ne) return;
154
157
  const n2 = ne.root.getElementsByTagName("img");
155
- for (const e7 of n2) e7.src === t5 && (e7.width = 300, e7.src = l2.url, e7.setAttribute("data-uuid", l2.uuid));
156
- } catch (e6) {
157
- Se();
158
+ for (const e6 of n2) e6.src === t4 && (e6.width = 300, e6.src = l2.url, e6.setAttribute("data-uuid", l2.uuid));
159
+ } catch (e5) {
160
+ Ee();
158
161
  } finally {
159
162
  ae.value = false;
160
163
  }
@@ -164,23 +167,27 @@ const M = { class: "toolbar-right-btns" }, R = ["title"], _ = { class: "richtext
164
167
  se && clearTimeout(se);
165
168
  se = setTimeout(() => {
166
169
  if (!ne) return;
167
- const e5 = ne.root.innerHTML;
168
- C(G, I, e5), e5 && (P.value = "");
170
+ const e4 = ne.root.innerHTML;
171
+ C(G, I, e4), e4 && (P.value = "");
169
172
  }, 300);
170
- }(), Te();
171
- }), Te(), xe = ne.container, xe.addEventListener("click", Le), me(), o(() => {
172
- const e4 = w(G, I);
173
- q(e4, W.pageContext, W.configure, { formItemRef: he.value, componentRef: be.value, titleRef: ye.value, value: e4, entity: W.pageContext.entity.data, pageData: W.pageContext.entity.page });
174
- });
173
+ }(), Se();
174
+ }), Se(), xe = ne.container, xe.addEventListener("click", He), me(), o(() => {
175
+ const e3 = w(G, I);
176
+ q(e3, W.pageContext, W.configure, { formItemRef: he.value, componentRef: be.value, titleRef: ye.value, value: e3, entity: W.pageContext.entity.data, pageData: W.pageContext.entity.page });
177
+ }));
175
178
  }), n(() => {
176
- document.addEventListener("keydown", Ee);
179
+ document.addEventListener("keydown", Ae);
177
180
  }), i(() => {
178
- document.removeEventListener("keydown", Ee), se && clearTimeout(se), le.value && le.value.removeEventListener("focusout", Ae), xe && xe.removeEventListener("click", Le);
181
+ document.removeEventListener("keydown", Ae), se && clearTimeout(se), le.value && le.value.removeEventListener("focusout", Le), xe && xe.removeEventListener("click", He);
179
182
  }), z2({ addRequiredClass: function() {
180
183
  P.value = L();
184
+ }, setContent: function(e3) {
185
+ we(e3), Se();
186
+ }, getContent: function() {
187
+ return ne ? ne.root.innerHTML : "";
181
188
  } }), (e3, t2) => {
182
189
  const l2 = a("View"), n2 = a("el-icon"), o2 = a("FullScreen"), i2 = a("Close"), y2 = a("el-form-item"), x2 = a("el-image-viewer"), k2 = a("el-dialog");
183
- return u(), r(s, null, [c(y2, { required: X.value.required, class: m(v(Y) + (P.value ? " " + P.value : "")), "label-width": X.value.labelWidth, style: f(v(O)) }, { label: g(() => [X.value.tittleShow ? (u(), r("div", { key: 0, style: f({ ...v(J), ...v(Q) }) }, b(v(E)(X.value.title)), 5)) : p("", true)]), default: g(() => [h("div", { class: m(["richtext-wrapper", { "is-fullscreen": oe.value }]) }, [h("div", { ref_key: "quillEditorRef", ref: le, style: { width: "100%" } }, null, 512), h("div", M, [h("button", { class: "toolbar-btn", onClick: qe, title: "预览" }, [c(n2, null, { default: g(() => [c(l2)]), _: 1 })]), h("button", { class: "toolbar-btn", onClick: Ce, title: oe.value ? "退出全屏" : "全屏编辑" }, [oe.value ? (u(), d(n2, { key: 1 }, { default: g(() => [c(i2)]), _: 1 })) : (u(), d(n2, { key: 0 }, { default: g(() => [c(o2)]), _: 1 }))], 8, R)]), h("div", _, [h("span", j, "字数:" + b(ie.value), 1)]), ae.value ? (u(), r("div", V, t2[2] || (t2[2] = [h("div", { class: "loading-spinner" }, null, -1), h("span", null, "图片上传中...", -1)]))) : p("", true)], 2)]), _: 1 }, 8, ["required", "class", "label-width", "style"]), ge.value ? (u(), d(x2, { key: 0, "hide-on-click-modal": "", onClose: t2[0] || (t2[0] = () => {
190
+ return u(), r(s, null, [c(y2, { required: X.value.required, class: m(v(Y) + (P.value ? " " + P.value : "")), "label-width": X.value.labelWidth, style: f(v(O)) }, { label: g(() => [X.value.tittleShow ? (u(), r("div", { key: 0, style: f({ ...v(J), ...v(Q) }) }, b(v(E)(X.value.title)), 5)) : p("", true)]), default: g(() => [h("div", { class: m(["richtext-wrapper", { "is-fullscreen": oe.value }]) }, [h("div", { ref_key: "quillEditorRef", ref: le, style: { width: "100%" } }, null, 512), h("div", N, [h("button", { class: "toolbar-btn", onClick: Te, title: "预览" }, [c(n2, null, { default: g(() => [c(l2)]), _: 1 })]), h("button", { class: "toolbar-btn", onClick: qe, title: oe.value ? "退出全屏" : "全屏编辑" }, [oe.value ? (u(), d(n2, { key: 1 }, { default: g(() => [c(i2)]), _: 1 })) : (u(), d(n2, { key: 0 }, { default: g(() => [c(o2)]), _: 1 }))], 8, R)]), h("div", _, [h("span", j, "字数:" + b(ie.value), 1)]), ae.value ? (u(), r("div", V, t2[2] || (t2[2] = [h("div", { class: "loading-spinner" }, null, -1), h("span", null, "图片上传中...", -1)]))) : p("", true)], 2)]), _: 1 }, 8, ["required", "class", "label-width", "style"]), ge.value ? (u(), d(x2, { key: 0, "hide-on-click-modal": "", onClose: t2[0] || (t2[0] = () => {
184
191
  ge.value = false;
185
192
  }), "url-list": ve.value }, null, 8, ["url-list"])) : p("", true), c(k2, { modelValue: re.value, "onUpdate:modelValue": t2[1] || (t2[1] = (e4) => re.value = e4), title: "内容预览", width: "80%", "close-on-click-modal": true, "append-to-body": true, class: "richtext-preview-dialog" }, { default: g(() => [h("div", { class: "richtext-preview-content ql-editor", innerHTML: ue.value }, null, 8, $)]), _: 1 }, 8, ["modelValue"])], 64);
186
193
  };
@@ -8,9 +8,9 @@ import { addRequiredClassUtil as M } from "../../../../utils/common-util.js";
8
8
  import { CopyDocument as q } from "@element-plus/icons-vue";
9
9
  import z from "clipboard";
10
10
  import { ElMessage as E } from "element-plus";
11
- import { useI18n as P } from "vue-i18n";
12
- const D = { style: { "padding-left": "5px" } }, O = { style: { float: "left" } }, W = { style: { float: "right", color: "var(--el-text-color-secondary)", "font-size": "13px" } }, B = e({ __name: "select-runtime", props: { pageContext: {}, configure: {} }, setup(e2, { expose: B2 }) {
13
- const { t: F } = P(), U = e2, $ = t(null), G = U.pageContext.entity ? U.pageContext.entity : {};
11
+ import { useI18n as O } from "vue-i18n";
12
+ const P = { style: { "padding-left": "5px" } }, D = { style: { float: "left" } }, W = { style: { float: "right", color: "var(--el-text-color-secondary)", "font-size": "13px" } }, B = e({ __name: "select-runtime", props: { pageContext: {}, configure: {} }, setup(e2, { expose: B2 }) {
13
+ const { t: F } = O(), U = e2, $ = t(null), G = U.pageContext.entity ? U.pageContext.entity : {};
14
14
  let H = j(U.pageContext, U.configure);
15
15
  const J = U.configure.runtime ? U.configure.runtime : {}, K = J.style, L = J.class, N = J.headerStyle, Q = J.titleExceedStyle, X = t(J.props ? J.props : {});
16
16
  let Y = [];
@@ -111,9 +111,11 @@ const D = { style: { "padding-left": "5px" } }, O = { style: { float: "left" } }
111
111
  le.value = e3 || [];
112
112
  }, addRequiredClass: function() {
113
113
  $.value = M();
114
- }, getSelectItemsTitle: he }), (e3, t2) => {
114
+ }, getSelectItemsTitle: he, getOptions: function() {
115
+ return le.value;
116
+ } }), (e3, t2) => {
115
117
  const l2 = r("el-icon"), o2 = r("el-option"), a2 = r("el-select"), u2 = r("el-popover"), n2 = r("el-form-item");
116
- return s(), i(n2, { ref_key: "formItemRef", ref: ge, required: !!X.value.required, class: c(f(L) + ($.value ? " " + $.value : "")), "label-width": X.value.labelWidth, style: p(f(K)) }, { label: v(() => [X.value.tittleShow ? (s(), d("div", { key: 0, ref_key: "titleRef", ref: de, style: p({ ...f(N), ...f(Q) }) }, [X.value.prefixType ? (s(), i(V, { key: 0, pageContext: e3.pageContext, property: X.value }, null, 8, ["pageContext", "property"])) : (s(), d(h, { key: 1 }, [C(b(f(I)(X.value.title)), 1)], 64))], 4)) : x("", true)]), default: v(() => [g(u2, { placement: "top", trigger: "hover" }, { reference: v(() => [g(a2, { ref_key: "componentRef", ref: me, style: { width: "100%" }, disabled: "disabled" === X.value.state, size: X.value.size, clearable: X.value.clearable, multiple: X.value.multiple, "collapse-tags": X.value.collapseTags, "collapse-tags-tooltip": X.value.collapseTagsTooltip, filterable: X.value.filterable, "allow-create": X.value.allowCreate, placeholder: X.value.placeholder, "remote-show-suffix": X.value.remoteShowSuffix, remote: X.value.remote, "remote-method": X.value.remoteMethod, loading: ae.value, onChange: X.value.changeMethod, modelValue: te.value, "onUpdate:modelValue": t2[0] || (t2[0] = (e4) => te.value = e4) }, { default: v(() => [(s(true), d(h, null, y(le.value, (t3) => (s(), i(o2, { key: t3.value, label: t3.label, value: t3.value, onClick: (l3) => f(A)(t3.value, e3.pageContext, e3.configure, "click", { values: te.value }) }, { default: v(() => [t3._description_ ? (s(), d(h, { key: 0 }, [m("span", O, b(t3.label), 1), m("span", W, b(t3._description_), 1)], 64)) : x("", true)]), _: 2 }, 1032, ["label", "value", "onClick"]))), 128))]), _: 1 }, 8, ["disabled", "size", "clearable", "multiple", "collapse-tags", "collapse-tags-tooltip", "filterable", "allow-create", "placeholder", "remote-show-suffix", "remote", "remote-method", "loading", "onChange", "modelValue"])]), default: v(() => [m("span", D, [g(l2, { id: Z }, { default: v(() => [g(f(q))]), _: 1 })])]), _: 1 })]), _: 1 }, 8, ["required", "class", "label-width", "style"]);
118
+ return s(), i(n2, { ref_key: "formItemRef", ref: ge, required: !!X.value.required, class: c(f(L) + ($.value ? " " + $.value : "")), "label-width": X.value.labelWidth, style: p(f(K)) }, { label: v(() => [X.value.tittleShow ? (s(), d("div", { key: 0, ref_key: "titleRef", ref: de, style: p({ ...f(N), ...f(Q) }) }, [X.value.prefixType ? (s(), i(V, { key: 0, pageContext: e3.pageContext, property: X.value }, null, 8, ["pageContext", "property"])) : (s(), d(h, { key: 1 }, [C(b(f(I)(X.value.title)), 1)], 64))], 4)) : x("", true)]), default: v(() => [g(u2, { placement: "top", trigger: "hover" }, { reference: v(() => [g(a2, { ref_key: "componentRef", ref: me, style: { width: "100%" }, disabled: "disabled" === X.value.state, size: X.value.size, clearable: X.value.clearable, multiple: X.value.multiple, "collapse-tags": X.value.collapseTags, "collapse-tags-tooltip": X.value.collapseTagsTooltip, filterable: X.value.filterable, "allow-create": X.value.allowCreate, placeholder: X.value.placeholder, "remote-show-suffix": X.value.remoteShowSuffix, remote: X.value.remote, "remote-method": X.value.remoteMethod, loading: ae.value, onChange: X.value.changeMethod, modelValue: te.value, "onUpdate:modelValue": t2[0] || (t2[0] = (e4) => te.value = e4) }, { default: v(() => [(s(true), d(h, null, y(le.value, (t3) => (s(), i(o2, { key: t3.value, label: t3.label, value: t3.value, onClick: (l3) => f(A)(t3.value, e3.pageContext, e3.configure, "click", { values: te.value }) }, { default: v(() => [t3._description_ ? (s(), d(h, { key: 0 }, [m("span", D, b(t3.label), 1), m("span", W, b(t3._description_), 1)], 64)) : x("", true)]), _: 2 }, 1032, ["label", "value", "onClick"]))), 128))]), _: 1 }, 8, ["disabled", "size", "clearable", "multiple", "collapse-tags", "collapse-tags-tooltip", "filterable", "allow-create", "placeholder", "remote-show-suffix", "remote", "remote-method", "loading", "onChange", "modelValue"])]), default: v(() => [m("span", P, [g(l2, { id: Z }, { default: v(() => [g(f(q))]), _: 1 })])]), _: 1 })]), _: 1 }, 8, ["required", "class", "label-width", "style"]);
117
119
  };
118
120
  } });
119
121
  export {
@@ -1,129 +1,145 @@
1
- import { defineComponent as e, ref as o, computed as t, markRaw as n, onMounted as i, onUnmounted as s, withDirectives as r, createCommentVNode as u, unref as p, createBlock as l, openBlock as a, resolveDynamicComponent as g, normalizeClass as c, normalizeStyle as f, vShow as m, nextTick as d } from "vue";
1
+ import { defineComponent as e, ref as o, computed as t, markRaw as n, onMounted as i, onUnmounted as s, withDirectives as r, createCommentVNode as u, unref as l, createBlock as a, openBlock as p, resolveDynamicComponent as c, normalizeClass as g, normalizeStyle as f, vShow as m, nextTick as d } from "vue";
2
2
  import C from "./error-render.vue.js";
3
3
  import { getRuntimeComponentByName as v } from "../../utils/assemblys-config.js";
4
4
  import { PageDimensions as b } from "../../utils/interfaces/page-design-types.js";
5
5
  import { addComponentRef as x, addComponentRefByCode as h } from "../../utils/global-refs.js";
6
6
  import { getPermissionCodes as y, packageFormRules as j, controlObjectRenderState as w } from "../../utils/page-init-util.js";
7
- import { caculateShowCondition as N, getFormPropName as T, getSizeConfig as _ } from "../../utils/page-helper-util.js";
8
- import { isWorkflowPage as M, getPropClassName as P, isNumber as L } from "../../utils/common-util.js";
9
- import { isShowMobileEvent as O, isShowComponent as S } from "../../utils/events/event-util.js";
10
- import { usePageContextStore as H } from "../../utils/page-store.js";
11
- import { isHasFieldAuth as $ } from "../../utils/table-utils.js";
12
- import { checkPermission as F } from "agilebuilder-ui/src/utils/permission.js";
13
- const k = e({ __name: "object-render", props: { pageContext: {}, configure: {} }, setup(e2) {
7
+ import { caculateShowCondition as T, getFormPropName as M, getSizeConfig as N } from "../../utils/page-helper-util.js";
8
+ import { isWorkflowPage as _, getPropClassName as P, isNumber as $ } from "../../utils/common-util.js";
9
+ import { isShowMobileEvent as L, isShowComponent as O } from "../../utils/events/event-util.js";
10
+ import { usePageContextStore as S } from "../../utils/page-store.js";
11
+ import { isHasFieldAuth as H } from "../../utils/table-utils.js";
12
+ import { checkPermission as B } from "agilebuilder-ui/src/utils/permission.js";
13
+ const F = e({ __name: "object-render", props: { pageContext: {}, configure: {} }, setup(e2) {
14
14
  var _a, _b;
15
- const k2 = e2;
16
- null == k2.configure.style && (k2.configure.style = {});
17
- const A = y(k2.configure, k2.pageContext);
18
- k2.configure && k2.configure.props && k2.configure.props.base && (k2.configure.props.base.functionCode = A);
19
- const B = F(A || "true", k2.pageContext.systemCode), E = $(k2.pageContext, k2.configure), J = B && E;
20
- k2.configure && k2.configure.props && k2.configure.props.base && (k2.configure.props.base.isHasFieldAuthPermission = J), j(k2.pageContext, k2.configure, J);
21
- let R = o(null), W = o(true), q = o("");
22
- if (k2.configure && k2.configure.props) {
15
+ const F2 = e2;
16
+ null == F2.configure.style && (F2.configure.style = {});
17
+ const R = y(F2.configure, F2.pageContext);
18
+ F2.configure && F2.configure.props && F2.configure.props.base && (F2.configure.props.base.functionCode = R);
19
+ const k = B(R || "true", F2.pageContext.systemCode), A = H(F2.pageContext, F2.configure), E = k && A;
20
+ F2.configure && F2.configure.props && F2.configure.props.base && (F2.configure.props.base.isHasFieldAuthPermission = E), j(F2.pageContext, F2.configure, E);
21
+ let J = o(null), W = o(true), q = o("");
22
+ if (F2.configure && F2.configure.props) {
23
23
  let e3 = [];
24
- ((_a = k2.configure.props.base) == null ? void 0 : _a.showConditions) && (e3 = "string" == typeof k2.configure.props.base.showConditions ? JSON.parse(k2.configure.props.base.showConditions) : k2.configure.props.base.showConditions), W = t(() => {
24
+ ((_a = F2.configure.props.base) == null ? void 0 : _a.showConditions) && (e3 = "string" == typeof F2.configure.props.base.showConditions ? JSON.parse(F2.configure.props.base.showConditions) : F2.configure.props.base.showConditions), W = t(() => {
25
25
  var _a2;
26
26
  let o2 = true;
27
- if (J) if (R.value && null !== R.value) o2 = "show" === R.value;
28
- else if (O(k2.pageContext, k2.configure)) if (e3 && e3.length > 0) o2 = N(k2.pageContext, e3);
27
+ if (E) if (J.value && null !== J.value) o2 = "show" === J.value;
28
+ else if (L(F2.pageContext, F2.configure)) if (e3 && e3.length > 0) o2 = T(F2.pageContext, e3);
29
29
  else {
30
- const e4 = (_a2 = k2.configure.props.base) == null ? void 0 : _a2.state;
30
+ const e4 = (_a2 = F2.configure.props.base) == null ? void 0 : _a2.state;
31
31
  e4 && "hidden" === e4 && (o2 = false);
32
32
  }
33
33
  else o2 = false;
34
34
  else o2 = false;
35
35
  return o2;
36
36
  });
37
- if (k2.configure._dynamicShowFlag = W, (_b = k2.configure.props.base) == null ? void 0 : _b.editConditions) {
38
- const e4 = k2.configure.props.base.editConditions;
37
+ if (F2.configure._dynamicShowFlag = W, (_b = F2.configure.props.base) == null ? void 0 : _b.editConditions) {
38
+ const e4 = F2.configure.props.base.editConditions;
39
39
  if (e4.length > 0) {
40
- const o2 = k2.configure.runtime ? k2.configure.runtime : {}, n2 = o2.props ? o2.props : {};
41
- if (n2.rawSate = n2.state, M(k2.pageContext) && k2.pageContext.fieldPermissionMap) {
42
- const e5 = k2.configure.props.base;
40
+ const o2 = F2.configure.runtime ? F2.configure.runtime : {}, n2 = o2.props ? o2.props : {};
41
+ if (n2.rawSate = n2.state, _(F2.pageContext) && F2.pageContext.fieldPermissionMap) {
42
+ const e5 = F2.configure.props.base;
43
43
  if (e5 && e5.prop) {
44
44
  let o3 = e5.prop;
45
- o3 = T(o3);
46
- const t2 = k2.pageContext.fieldPermissionMap.get(o3);
45
+ o3 = M(o3);
46
+ const t2 = F2.pageContext.fieldPermissionMap.get(o3);
47
47
  t2 && false === t2.canEdit && (q.value = "disabled");
48
48
  }
49
49
  }
50
50
  n2.state = t({ get() {
51
51
  if ("disabled" === q.value) return q.value;
52
- return N(k2.pageContext, e4) ? "" : "disabled";
52
+ return T(F2.pageContext, e4) ? "" : "disabled";
53
53
  }, set() {
54
54
  } });
55
55
  }
56
56
  }
57
57
  }
58
58
  const z = o({});
59
- z.value = n(v(k2.configure.name));
59
+ z.value = n(v(F2.configure.name));
60
60
  const D = o(true);
61
61
  null == z.value && (z.value = C, D.value = false);
62
- const G = o(null), I = o({}), K = o(""), Q = P(k2.configure);
62
+ const G = o(null), I = o({}), K = o(""), Q = P(F2.configure);
63
63
  Q && (K.value = Q);
64
- const U = k2.configure.runtime && k2.configure.runtime.common ? k2.configure.runtime.common : {};
64
+ const U = F2.configure.runtime && F2.configure.runtime.common ? F2.configure.runtime.common : {};
65
65
  if (U.class && (K.value += " " + U.class), U.style) {
66
66
  Object.assign(I.value, U.style);
67
- const e3 = k2.pageContext && k2.pageContext.dimensions ? k2.pageContext.dimensions : b.PC, o2 = U.style[e3 + "_style"];
67
+ const e3 = F2.pageContext && F2.pageContext.dimensions ? F2.pageContext.dimensions : b.PC, o2 = U.style[e3 + "_style"];
68
68
  o2 && Object.assign(I.value, o2);
69
69
  const t2 = U.style[e3 + "_class"];
70
70
  t2 && (K.value += " " + t2);
71
71
  }
72
- const V = H();
72
+ const V = S();
73
73
  function X(e3) {
74
74
  if (G.value = e3, e3 && !e3.show && (e3.show = function() {
75
- R.value = "show";
75
+ J.value = "show";
76
76
  }), e3 && !e3.hide && (e3.hide = function() {
77
- R.value = "hide";
77
+ J.value = "hide";
78
78
  }), e3 && !e3.getConfigure && (e3.getConfigure = function() {
79
- return k2.configure;
80
- }), k2.configure.uuid && x(k2.pageContext, k2.configure.uuid, G), k2.configure.code) h(k2.pageContext, k2.configure.code, G);
81
- else if ("table" === k2.configure.name) h(k2.pageContext, k2.configure.uuid, G);
82
- else if (k2.configure.props && k2.configure.props.base) {
83
- const e4 = k2.configure.props.base;
79
+ return F2.configure;
80
+ }), F2.configure.uuid && x(F2.pageContext, F2.configure.uuid, G), F2.configure.code) h(F2.pageContext, F2.configure.code, G);
81
+ else if ("table" === F2.configure.name) h(F2.pageContext, F2.configure.uuid, G);
82
+ else if (F2.configure.props && F2.configure.props.base) {
83
+ const e4 = F2.configure.props.base;
84
84
  if (e4.prop) {
85
85
  let o3 = e4.prop;
86
- o3.startsWith("${") && (o3 = o3.substring(2, o3.length - 1)), o3.includes(".") && (o3 = o3.substring(o3.indexOf(".") + 1)), h(k2.pageContext, o3, G);
86
+ o3.startsWith("${") && (o3 = o3.substring(2, o3.length - 1)), o3.includes(".") && (o3 = o3.substring(o3.indexOf(".") + 1)), h(F2.pageContext, o3, G);
87
87
  }
88
88
  }
89
- const o2 = k2.configure.props ? k2.configure.props.base : null;
89
+ const o2 = F2.configure.props ? F2.configure.props.base : null;
90
90
  if (o2 && o2.prop) {
91
91
  let e4 = o2.prop;
92
- e4 = T(e4), w(k2.pageContext, e4), k2.pageContext.propTitleMap = k2.pageContext.propTitleMap || {}, k2.pageContext.propTitleMap[e4] = o2.title ? o2.title : e4;
92
+ e4 = M(e4), w(F2.pageContext, e4), F2.pageContext.propTitleMap = F2.pageContext.propTitleMap || {}, F2.pageContext.propTitleMap[e4] = o2.title ? o2.title : e4;
93
93
  }
94
94
  !function() {
95
95
  if (!G.value) return;
96
- const e4 = _(k2.pageContext, k2.configure);
97
- "table" !== k2.configure.name && e4 && e4.isCalcHeight && d(() => {
98
- let e5 = G.value.$el;
99
- e5 || (e5 = G.value);
100
- const o3 = e5.parentNode;
101
- if (!e5 || !o3) return;
102
- const t2 = e5.getBoundingClientRect();
103
- let n2 = window.innerHeight - t2.y - 80, i2 = n2 + "";
104
- L(n2) && (i2 = n2 + "px"), I.value.height = i2, I.value["overflow-y"] = "auto", I.value["overflow-x"] = "hidden", k2.configure.sytle || (k2.configure.sytle = {}), k2.configure.sytle._heightStyle = i2;
96
+ const e4 = N(F2.pageContext, F2.configure);
97
+ "table" !== F2.configure.name && e4 && e4.isCalcHeight && d(() => {
98
+ var _a2;
99
+ if (!(((_a2 = G.value) == null ? void 0 : _a2.$el) || G.value)) return;
100
+ const e5 = (o3 = 0) => {
101
+ if (!G.value) return;
102
+ let t2 = G.value.$el || G.value;
103
+ if (!t2) return;
104
+ const n2 = t2.getBoundingClientRect();
105
+ null !== ee && Math.abs(n2.y - ee) < 1 ? Z() : o3 < 10 ? (ee = n2.y, oe = setTimeout(() => {
106
+ e5(o3 + 1);
107
+ }, 50)) : Z();
108
+ };
109
+ ee = null, e5();
105
110
  });
106
111
  }();
107
112
  }
108
113
  let Y;
114
+ function Z() {
115
+ if (!G.value) return;
116
+ let e3 = G.value.$el;
117
+ e3 || (e3 = G.value);
118
+ const o2 = e3.parentNode;
119
+ if (!e3 || !o2) return;
120
+ const t2 = e3.getBoundingClientRect();
121
+ let n2 = window.innerHeight - t2.y - 30, i2 = n2 + "";
122
+ $(n2) && (i2 = n2 + "px"), I.value.height = i2, I.value["overflow-y"] = "auto", I.value["overflow-x"] = "hidden", F2.configure.sytle || (F2.configure.sytle = {}), F2.configure.sytle._heightStyle = i2;
123
+ }
109
124
  i(() => {
110
- Z(), V.countComponentsLoadedNumber(), Y = setTimeout(() => {
125
+ te(), V.countComponentsLoadedNumber(), Y = setTimeout(() => {
111
126
  V.componentsTotalNmber !== V.componentsLoadedNumber || V.pageComponentsLoaded || V.setPageComponentsLoaded(true);
112
127
  }, 30);
113
128
  }), s(() => {
114
- Y && clearTimeout(Y);
129
+ Y && clearTimeout(Y), oe && clearTimeout(oe);
115
130
  });
116
- const Z = () => {
131
+ let ee = null, oe = null;
132
+ const te = () => {
117
133
  if (!G.value) return;
118
134
  let e3 = G.value.$el;
119
135
  e3 || (e3 = G.value);
120
136
  const o2 = e3.parentNode;
121
137
  if (!e3 || !o2) return;
122
- const t2 = k2.configure.props ? k2.configure.props : {}, n2 = k2.configure.style ? k2.configure.style : {}, i2 = t2.position;
138
+ const t2 = F2.configure.props ? F2.configure.props : {}, n2 = F2.configure.style ? F2.configure.style : {}, i2 = t2.position;
123
139
  "top" == i2 || "bottom" == i2 || n2.position;
124
140
  };
125
- return (e3, o2) => p(J) && p(S)(e3.configure) ? r((a(), l(g(z.value), { key: 0, ref: X, style: f(I.value), class: c(K.value), configure: e3.configure, pageContext: e3.pageContext }, null, 8, ["style", "class", "configure", "pageContext"])), [[m, p(W)]]) : u("", true);
141
+ return (e3, o2) => l(E) && l(O)(e3.configure) ? r((p(), a(c(z.value), { key: 0, ref: X, style: f(I.value), class: g(K.value), configure: e3.configure, pageContext: e3.pageContext }, null, 8, ["style", "class", "configure", "pageContext"])), [[m, l(W)]]) : u("", true);
126
142
  } });
127
143
  export {
128
- k as default
144
+ F as default
129
145
  };