super-page-runtime 2.2.48 → 2.2.51-sit4

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.
@@ -103,26 +103,37 @@ function P(e2, t2, s2, i2) {
103
103
  return n2;
104
104
  }
105
105
  function M(e2, t2) {
106
- if (!t2 || !e2 || t2.isTest) return "true";
107
106
  const s2 = [];
108
107
  if (e2.autoPermissions) for (const i2 of e2.autoPermissions) s2.push(t2.code + "." + i2.simpleCode);
109
108
  if (e2.functionCodes) {
110
109
  const i2 = e2.sourceTypes ? e2.sourceTypes : [], n2 = e2.functionCodes;
111
110
  for (let e3 = 0; e3 < n2.length; e3++) {
112
- const o2 = n2[e3];
113
- let r2 = "";
114
- r2 = "service" == (e3 < i2.length ? i2[e3] : "") ? o2 : t2.code + "." + o2, s2.includes(r2) || s2.push(r2);
111
+ const o2 = n2[e3], r2 = e3 < i2.length ? i2[e3] : "";
112
+ let l2 = "";
113
+ if ("service" == r2) l2 = o2;
114
+ else if ("standard" === r2) l2 = t2.code + "." + o2;
115
+ else {
116
+ l2 = "custom" === j(o2, t2).type ? o2 : t2.code + "." + o2;
117
+ }
118
+ s2.includes(l2) || s2.push(l2);
115
119
  }
116
120
  }
117
121
  return s2.join(",");
118
122
  }
119
- function j(s2, i2, n2) {
123
+ function j(e2, t2) {
124
+ const s2 = t2.pagePermissions;
125
+ if (s2 && s2.length > 0) {
126
+ for (let t3 = 0; t3 < s2.length; t3++) if (s2[t3].simpleCode === e2) return s2[t3];
127
+ }
128
+ return null;
129
+ }
130
+ function C(s2, i2, n2) {
120
131
  const o2 = s2.tableRuntimes, r2 = t(i2);
121
132
  let l2;
122
133
  const a2 = i2.code;
123
134
  return r2 && Object.keys(r2) > 0 && (l2 = JSON.stringify(r2)), e.post(window.$vueApp.config.globalProperties.baseAPI + "/component/super-page-design/super-grids", { tableRuntimes: o2, additionalParamMapJson: l2, pageCode: a2, publishVersion: n2, pageType: s2.pageType });
124
135
  }
125
- function C(e2, t2) {
136
+ function I(e2, t2) {
126
137
  var _a, _b;
127
138
  const s2 = t2.props && t2.props.base ? t2.props.base.prop : null;
128
139
  let n2 = false;
@@ -141,7 +152,7 @@ function C(e2, t2) {
141
152
  ((_b = t2.props) == null ? void 0 : _b.customRuleEvents) && (e2.customRuleEvents || (e2.customRuleEvents = []), e2.customRuleEvents.push({ prop: o2, events: t2.props.customRuleEvents }));
142
153
  }
143
154
  }
144
- function I(e2, t2) {
155
+ function O(e2, t2) {
145
156
  if (e2.initInfo) {
146
157
  ["dynamicControlFormEdit", "disableElement", "enableElement", "hideElement", "showElement"].forEach((s2) => {
147
158
  const i2 = e2.initInfo[s2];
@@ -157,7 +168,7 @@ function I(e2, t2) {
157
168
  }
158
169
  }
159
170
  export {
160
- I as controlObjectRenderState,
171
+ O as controlObjectRenderState,
161
172
  c as convertToPageContext,
162
173
  P as getDefaultValue,
163
174
  w as getFormModelFields,
@@ -166,7 +177,7 @@ export {
166
177
  b as packageAdditionalMapWithLocationSearch,
167
178
  y as packageAdditionalMapWithPageRequest,
168
179
  h as packageAdditionalMapWithRoute,
169
- C as packageFormRules,
180
+ I as packageFormRules,
170
181
  f as queryPageDesignByCode,
171
- j as queryPageSuperGrids
182
+ C as queryPageSuperGrids
172
183
  };
@@ -1,7 +1,7 @@
1
1
  import e from "./FixedBox.vue2.js";
2
2
  /* empty css */
3
3
  import o from "../../../../../../_virtual/_plugin-vue_export-helper.js";
4
- const r = o(e, [["__scopeId", "data-v-1cc14e88"]]);
4
+ const r = o(e, [["__scopeId", "data-v-9b488f43"]]);
5
5
  export {
6
6
  r as default
7
7
  };
@@ -1,73 +1,7 @@
1
- import { defineComponent as e, ref as t, onMounted as o, nextTick as n, onUnmounted as i, watchEffect as l, computed as a, createElementBlock as r, openBlock as s, createCommentVNode as u, createElementVNode as f, normalizeStyle as c, normalizeClass as d, renderSlot as p } from "vue";
2
- const v = e({ __name: "YxAffix", props: { offset: { type: Number, default: 0 }, position: { type: String, default: "top", validator: (e2) => ["top", "bottom"].includes(e2) }, target: { type: [String, HTMLElement], default: () => window }, autoDetectParentScroll: { type: Boolean, default: true }, stickyInScrollContainer: { type: Boolean, default: true }, zIndex: { type: Number, default: 100 }, enableIntervalUpdate: { type: Boolean, default: true }, enableIntervalTime: { type: Number, default: 2e3 } }, emits: ["change"], setup(e2, { emit: v2 }) {
3
- const m = e2, w = v2, x = t(null), y = t(null), h = t(false), g = t({}), b = t([]), T = t(window), B = t(0), I = t(null), E = () => {
4
- try {
5
- if (!y.value) return;
6
- const e3 = y.value.getBoundingClientRect(), t2 = T.value;
7
- if (t2 === window) {
8
- const t3 = "top" === m.position ? e3.top <= m.offset : e3.bottom >= window.innerHeight - m.offset;
9
- B.value = 0, S(t3, e3);
10
- } else if (m.stickyInScrollContainer) {
11
- const o2 = t2.getBoundingClientRect(), { isFixTop: n2, isFixBottom: i2, containerOffset: l2 } = ((e4) => {
12
- const t3 = ["top"].includes(m.position), o3 = ["bottom"].includes(m.position);
13
- if (!x.value) return { isTop: t3, isBottom: o3 };
14
- const n3 = x.value.getBoundingClientRect(), i3 = n3.top - e4.top, l3 = n3.left - e4.left, a2 = e4.height - n3.height - i3, r2 = e4.top, s2 = window.innerHeight - e4.bottom;
15
- return { isTop: t3, isBottom: o3, containerTop: r2, containerBottom: s2, containerOffset: t3 ? r2 : o3 ? s2 : 0, offsetTop: i3, offsetLeft: l3, offsetBottom: a2, isFixTop: t3 && i3 <= 0, isFixBottom: o3 && a2 <= 0 };
16
- })(o2);
17
- B.value = l2 ?? 0, S(n2 || i2 || false, e3);
18
- }
19
- } catch (e3) {
20
- }
21
- }, S = (e3, t2) => {
22
- e3 !== h.value && (h.value = e3, w("change", e3), g.value = e3 ? { width: `${t2.width}px`, height: `${t2.height}px` } : {});
23
- }, C = () => {
24
- requestAnimationFrame(E);
25
- };
26
- let L;
27
- const k = () => {
28
- h.value = false, clearTimeout(L), L = window.setTimeout(() => {
29
- E();
30
- }, 100);
31
- };
32
- o(() => {
33
- setTimeout(() => {
34
- n(() => {
35
- try {
36
- m.enableIntervalUpdate && (I.value = setInterval(C, m.enableIntervalTime));
37
- const e3 = (() => {
38
- if (m.autoDetectParentScroll && y.value) {
39
- const e4 = [];
40
- let t2 = y.value.parentElement;
41
- for (; t2 && t2 !== document.body; ) {
42
- const { overflowY: o2 } = window.getComputedStyle(t2);
43
- /(auto|scroll)/.test(o2) && e4.push(t2), t2 = t2.parentElement;
44
- }
45
- return [...e4, window];
46
- }
47
- if ("string" == typeof m.target) {
48
- const e4 = document.querySelector(m.target);
49
- return [...e4 ? [e4] : [], window];
50
- }
51
- return [window];
52
- })();
53
- b.value = e3, T.value = e3[0], b.value.forEach((e4) => e4.addEventListener("scroll", C)), window.addEventListener("resize", k), E();
54
- } catch (e3) {
55
- }
56
- });
57
- }, 100);
58
- }), i(() => {
59
- T.value && b.value.forEach((e3) => e3.removeEventListener("scroll", C)), window.removeEventListener("resize", k), clearTimeout(L), I.value && clearInterval(I.value);
60
- }), l(() => {
61
- n(() => {
62
- C();
63
- });
64
- });
65
- const z = a(() => {
66
- var _a;
67
- return h.value ? { position: "fixed", width: `${(_a = y.value) == null ? void 0 : _a.offsetWidth}px`, zIndex: m.zIndex, [m.position]: `${m.offset + B.value}px` } : { position: "relative" };
68
- });
69
- return (e3, t2) => (s(), r("div", { ref_key: "affixMainRef", ref: x, class: "yx-affix" }, [h.value ? (s(), r("div", { key: 0, style: c(g.value), class: "yx-affix-placeholder" }, null, 4)) : u("", true), f("div", { ref_key: "affixRef", ref: y, style: c(z.value), class: d({ "yx-affix-content": true, "is-fixed": h.value, "is-top": "top" === m.position, "is-bottom": "bottom" === m.position }) }, [p(e3.$slots, "default")], 6)], 512));
70
- } });
1
+ import e from "./YxAffix.vue2.js";
2
+ /* empty css */
3
+ import o from "../../../../../../_virtual/_plugin-vue_export-helper.js";
4
+ const r = o(e, [["__scopeId", "data-v-d053fb6d"]]);
71
5
  export {
72
- v as default
6
+ r as default
73
7
  };
@@ -1,4 +1,74 @@
1
- import f from "./YxAffix.vue.js";
1
+ import { defineComponent as e, ref as t, onMounted as o, nextTick as n, onUnmounted as i, watchEffect as l, computed as a, createElementBlock as r, openBlock as s, createCommentVNode as u, createElementVNode as f, normalizeStyle as c, normalizeClass as d, renderSlot as p } from "vue";
2
+ const v = e({ __name: "YxAffix", props: { offset: { type: Number, default: 0 }, position: { type: String, default: "top", validator: (e2) => ["top", "bottom"].includes(e2) }, target: { type: [String, HTMLElement], default: () => window }, autoDetectParentScroll: { type: Boolean, default: true }, stickyInScrollContainer: { type: Boolean, default: true }, zIndex: { type: Number, default: 100 }, enableIntervalUpdate: { type: Boolean, default: true }, enableIntervalTime: { type: Number, default: 2e3 } }, emits: ["change"], setup(e2, { emit: v2 }) {
3
+ const m = e2, w = v2, h = t(null), x = t(null), y = t(false), g = t({}), b = t([]), T = t(window), B = t(0), I = t(null), E = () => {
4
+ try {
5
+ if (!x.value) return;
6
+ const e3 = x.value.getBoundingClientRect(), t2 = T.value;
7
+ if (t2 === window) {
8
+ const t3 = "top" === m.position ? e3.top <= m.offset : e3.bottom >= window.innerHeight - m.offset;
9
+ B.value = 0, S(t3, e3);
10
+ } else if (m.stickyInScrollContainer) {
11
+ const o2 = t2.getBoundingClientRect(), { isFixTop: n2, isFixBottom: i2, containerOffset: l2 } = ((e4) => {
12
+ const t3 = ["top"].includes(m.position), o3 = ["bottom"].includes(m.position);
13
+ if (!h.value) return { isTop: t3, isBottom: o3 };
14
+ const n3 = h.value.getBoundingClientRect(), i3 = n3.top - e4.top, l3 = n3.left - e4.left, a2 = e4.height - n3.height - i3, r2 = e4.top, s2 = window.innerHeight - e4.bottom;
15
+ return { isTop: t3, isBottom: o3, containerTop: r2, containerBottom: s2, containerOffset: t3 ? r2 : o3 ? s2 : 0, offsetTop: i3, offsetLeft: l3, offsetBottom: a2, isFixTop: t3 && i3 <= 0, isFixBottom: o3 && a2 <= 0 };
16
+ })(o2);
17
+ B.value = l2 ?? 0, S(n2 || i2 || false, e3);
18
+ }
19
+ } catch (e3) {
20
+ }
21
+ }, S = (e3, t2) => {
22
+ var _a;
23
+ e3 === y.value && ((_a = g.value) == null ? void 0 : _a.height) === `${t2.height}px` || (y.value = e3, w("change", e3), g.value = e3 ? { width: "100%", height: `${t2.height}px` } : {});
24
+ }, C = () => {
25
+ requestAnimationFrame(E);
26
+ };
27
+ let L;
28
+ const k = () => {
29
+ y.value = false, clearTimeout(L), L = window.setTimeout(() => {
30
+ E();
31
+ }, 100);
32
+ };
33
+ o(() => {
34
+ setTimeout(() => {
35
+ n(() => {
36
+ try {
37
+ m.enableIntervalUpdate && (I.value = setInterval(C, m.enableIntervalTime));
38
+ const e3 = (() => {
39
+ if (m.autoDetectParentScroll && x.value) {
40
+ const e4 = [];
41
+ let t2 = x.value.parentElement;
42
+ for (; t2 && t2 !== document.body; ) {
43
+ const { overflowY: o2 } = window.getComputedStyle(t2);
44
+ /(auto|scroll)/.test(o2) && e4.push(t2), t2 = t2.parentElement;
45
+ }
46
+ return [...e4, window];
47
+ }
48
+ if ("string" == typeof m.target) {
49
+ const e4 = document.querySelector(m.target);
50
+ return [...e4 ? [e4] : [], window];
51
+ }
52
+ return [window];
53
+ })();
54
+ b.value = e3, T.value = e3[0], b.value.forEach((e4) => e4.addEventListener("scroll", C)), window.addEventListener("resize", k), E();
55
+ } catch (e3) {
56
+ }
57
+ });
58
+ }, 100);
59
+ }), i(() => {
60
+ T.value && b.value.forEach((e3) => e3.removeEventListener("scroll", C)), window.removeEventListener("resize", k), clearTimeout(L), I.value && clearInterval(I.value);
61
+ }), l(() => {
62
+ n(() => {
63
+ C();
64
+ });
65
+ });
66
+ const z = a(() => {
67
+ var _a;
68
+ return y.value ? { position: "fixed", width: `${(_a = x.value) == null ? void 0 : _a.offsetWidth}px`, zIndex: m.zIndex, [m.position]: `${m.offset + B.value}px` } : { position: "relative" };
69
+ });
70
+ return (e3, t2) => (s(), r("div", { ref_key: "affixMainRef", ref: h, class: "yx-affix" }, [y.value ? (s(), r("div", { key: 0, style: c(g.value), class: "yx-affix-placeholder" }, null, 4)) : u("", true), f("div", { ref_key: "affixRef", ref: x, style: c(z.value), class: d({ "yx-affix-content": true, "is-fixed": y.value, "is-top": "top" === m.position, "is-bottom": "bottom" === m.position }) }, [p(e3.$slots, "default", {}, void 0, true)], 6)], 512));
71
+ } });
2
72
  export {
3
- f as default
73
+ v as default
4
74
  };
@@ -1,7 +1,7 @@
1
1
  import o from "./tools-runtime.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../../../../../../_virtual/_plugin-vue_export-helper.js";
4
- const e = t(o, [["__scopeId", "data-v-7aefa8b2"]]);
4
+ const e = t(o, [["__scopeId", "data-v-a1efabab"]]);
5
5
  export {
6
6
  e as default
7
7
  };
@@ -1,32 +1,35 @@
1
- import { defineComponent as e, ref as t, computed as o, onMounted as i, nextTick as a, onUnmounted as n, createBlock as l, createElementBlock as u, openBlock as s, withCtx as f, createElementVNode as r, normalizeStyle as p, normalizeClass as g, unref as d, Fragment as v, renderList as c } from "vue";
2
- import m from "../../object-render.vue.js";
3
- import { handleAfterInitEvent as x } from "../../../../utils/events/event-util.js";
4
- import y from "../fixed/YxAffix.vue.js";
5
- import C from "../fixed/FixedBox.vue.js";
6
- const b = { "data-v": "1.0.0", class: "amb-widget-tools-parent" }, k = { "data-v": "1.0.0", class: "amb-widget-tools-parent" }, w = { key: 2, "data-v": "1.0.0", class: "amb-widget-tools-parent" }, _ = e({ __name: "tools-runtime", props: { pageContext: {}, configure: {} }, setup(e2) {
7
- const _2 = e2, j = t(null), R = _2.configure.runtime ?? {}, h = R.class, A = o(() => _2.configure.props), F = o(() => {
8
- const { gap: e3 } = A.value ?? {};
1
+ import { defineComponent as e, ref as t, computed as o, onMounted as i, nextTick as a, onUnmounted as n, createBlock as l, createElementBlock as u, createCommentVNode as s, openBlock as f, withCtx as r, createElementVNode as g, normalizeStyle as p, normalizeClass as v, unref as d, Fragment as c, renderList as m } from "vue";
2
+ import x from "../../object-render.vue.js";
3
+ import { handleAfterInitEvent as y } from "../../../../utils/events/event-util.js";
4
+ import C from "../fixed/YxAffix.vue.js";
5
+ import b from "../fixed/FixedBox.vue.js";
6
+ const k = { "data-v": "1.0.0", class: "amb-widget-tools-parent" }, w = { "data-v": "1.0.0", class: "amb-widget-tools-parent" }, _ = { key: 2, "data-v": "1.0.0", class: "amb-widget-tools-parent" }, j = e({ __name: "tools-runtime", props: { pageContext: {}, configure: {} }, setup(e2) {
7
+ const j2 = e2, h = t(null), R = j2.configure.runtime ?? {}, A = R.class, F = o(() => j2.configure.props), B = o(() => {
8
+ var _a, _b;
9
+ return !!((_b = (_a = j2.configure) == null ? void 0 : _a.items) == null ? void 0 : _b.length);
10
+ }), D = o(() => {
11
+ const { gap: e3 } = F.value ?? {};
9
12
  return { backgroundColor: "#fff", ...e3 ? { gap: `${e3}px` } : {}, ...R.style ?? {} };
10
- }), B = o(() => {
13
+ }), Y = o(() => {
11
14
  var _a, _b, _c;
12
- return !![(_a = A.value) == null ? void 0 : _a.isAffix, (_b = A.value) == null ? void 0 : _b.isFixed].every((e3) => void 0 === e3) || ((_c = A.value) == null ? void 0 : _c.isAffix);
13
- }), D = o(() => {
15
+ return !![(_a = F.value) == null ? void 0 : _a.isAffix, (_b = F.value) == null ? void 0 : _b.isFixed].every((e3) => void 0 === e3) || ((_c = F.value) == null ? void 0 : _c.isAffix);
16
+ }), $ = o(() => {
14
17
  var _a;
15
- return (_a = A.value) == null ? void 0 : _a.isFixed;
16
- }), Y = o(() => {
18
+ return (_a = F.value) == null ? void 0 : _a.isFixed;
19
+ }), q = o(() => {
17
20
  var _a, _b;
18
- return ["top"].includes((_a = A.value) == null ? void 0 : _a.position) ? "top" : ["bottom"].includes((_b = A.value) == null ? void 0 : _b.position) ? "bottom" : void 0;
19
- }), $ = o(() => {
21
+ return ["top"].includes((_a = F.value) == null ? void 0 : _a.position) ? "top" : ["bottom"].includes((_b = F.value) == null ? void 0 : _b.position) ? "bottom" : void 0;
22
+ }), z = o(() => {
20
23
  var _a;
21
- return ((_a = A.value) == null ? void 0 : _a.offset) ?? 0;
24
+ return ((_a = F.value) == null ? void 0 : _a.offset) ?? 0;
22
25
  });
23
26
  return i(() => {
24
27
  a(() => {
25
- x(null, _2.pageContext, _2.configure, { componentRef: j.value, entity: _2.pageContext.entity.data, pageData: _2.pageContext.entity.page });
28
+ y(null, j2.pageContext, j2.configure, { componentRef: h.value, entity: j2.pageContext.entity.data, pageData: j2.pageContext.entity.page });
26
29
  });
27
30
  }), n(() => {
28
- }), (e3, t2) => D.value ? (s(), l(C, { key: 0, position: Y.value, offset: $.value }, { default: f(() => [r("div", b, [r("div", { class: g(["amb-widget-container-tool amb-widget-tools", d(h)]), style: p(F.value), ref_key: "thisRef", ref: j }, [(s(true), u(v, null, c(_2.configure.items, (e4) => (s(), l(m, { pageContext: _2.pageContext, configure: e4, key: e4.uuid }, null, 8, ["pageContext", "configure"]))), 128))], 6)])]), _: 1 }, 8, ["position", "offset"])) : B.value ? (s(), l(y, { key: 1, position: Y.value, offset: $.value }, { default: f(() => [r("div", k, [r("div", { class: g(["amb-widget-container-tool amb-widget-tools", d(h)]), style: p(F.value), ref_key: "thisRef", ref: j }, [(s(true), u(v, null, c(_2.configure.items, (e4) => (s(), l(m, { pageContext: _2.pageContext, configure: e4, key: e4.uuid }, null, 8, ["pageContext", "configure"]))), 128))], 6)])]), _: 1 }, 8, ["position", "offset"])) : (s(), u("div", w, [r("div", { class: g(["amb-widget-container-tool amb-widget-tools", d(h)]), style: p(F.value), ref_key: "thisRef", ref: j }, [(s(true), u(v, null, c(_2.configure.items, (e4) => (s(), l(m, { pageContext: _2.pageContext, configure: e4, key: e4.uuid }, null, 8, ["pageContext", "configure"]))), 128))], 6)]));
31
+ }), (e3, t2) => $.value && B.value ? (f(), l(b, { key: 0, position: q.value, offset: z.value }, { default: r(() => [g("div", k, [g("div", { class: v(["amb-widget-container-tool amb-widget-tools", d(A)]), style: p(D.value), ref_key: "thisRef", ref: h }, [(f(true), u(c, null, m(j2.configure.items, (e4) => (f(), l(x, { pageContext: j2.pageContext, configure: e4, key: e4.uuid }, null, 8, ["pageContext", "configure"]))), 128))], 6)])]), _: 1 }, 8, ["position", "offset"])) : Y.value && B.value ? (f(), l(C, { key: 1, position: q.value, offset: z.value }, { default: r(() => [g("div", w, [g("div", { class: v(["amb-widget-container-tool amb-widget-tools", d(A)]), style: p(D.value), ref_key: "thisRef", ref: h }, [(f(true), u(c, null, m(j2.configure.items, (e4) => (f(), l(x, { pageContext: j2.pageContext, configure: e4, key: e4.uuid }, null, 8, ["pageContext", "configure"]))), 128))], 6)])]), _: 1 }, 8, ["position", "offset"])) : B.value ? (f(), u("div", _, [g("div", { class: v(["amb-widget-container-tool amb-widget-tools", d(A)]), style: p(D.value), ref_key: "thisRef", ref: h }, [(f(true), u(c, null, m(j2.configure.items, (e4) => (f(), l(x, { pageContext: j2.pageContext, configure: e4, key: e4.uuid }, null, 8, ["pageContext", "configure"]))), 128))], 6)])) : s("", true);
29
32
  } });
30
33
  export {
31
- _ as default
34
+ j as default
32
35
  };
@@ -1,29 +1,29 @@
1
1
  import { defineComponent as e, ref as l, computed as t, onMounted as o, nextTick as n, onUnmounted as a, watch as u, resolveComponent as i, createBlock as r, openBlock as c, normalizeStyle as p, normalizeClass as s, unref as v, withCtx as f, createVNode as g, createCommentVNode as y, createSlots as m, createTextVNode as d, toDisplayString as x, createElementBlock as C, Fragment as I } from "vue";
2
- import { SuperIcon as T } from "agilebuilder-ui";
3
- import { getFormModelFields as k } from "../../../../utils/page-init-util.js";
2
+ import { SuperIcon as k } from "agilebuilder-ui";
3
+ import { getFormModelFields as T } from "../../../../utils/page-init-util.js";
4
4
  import { setVariableValue as V, getVariableValue as h } from "../../../../utils/page-helper-util.js";
5
- import { handleAfterInitEvent as w, handleFormEvent as b, doSuffixOrPrefixClickEvent as _ } from "../../../../utils/events/event-util.js";
6
- import { formatScanRuleSets as j, analysisScanValue as S, setScanAnalysisValue as R } from "../../../../utils/form/scan-util.js";
7
- import P from "../common/title-suffix-element.vue.js";
8
- import { isMobileBrowser as q } from "agilebuilder-ui/src/utils/common-util";
9
- import z from "../../../../utils/eventBus.js";
10
- import { $t as D } from "../../../../utils/i18n-util.js";
5
+ import { handleFormEvent as w, handleAfterInitEvent as b, doSuffixOrPrefixClickEvent as _ } from "../../../../utils/events/event-util.js";
6
+ import { formatScanRuleSets as S, analysisScanValue as j, setScanAnalysisValue as R } from "../../../../utils/form/scan-util.js";
7
+ import D from "../common/title-suffix-element.vue.js";
8
+ import { isMobileBrowser as P } from "agilebuilder-ui/src/utils/common-util";
9
+ import q from "../../../../utils/eventBus.js";
10
+ import { $t as z } from "../../../../utils/i18n-util.js";
11
11
  const L = e({ __name: "inputtext-runtime", props: { pageContext: {}, configure: {} }, setup(e2, { expose: L2 }) {
12
12
  var _a, _b, _c;
13
13
  const N = e2, O = N.pageContext.entity ? N.pageContext.entity : {};
14
- let B = k(N.pageContext, N.configure);
15
- const J = l(q()), M = N.pageContext.code, $ = l(B && B.length > 0 ? M + "__" + B.join("__") : null), A = t({ get: () => h(O, B), set(e3) {
14
+ let B = T(N.pageContext, N.configure);
15
+ const J = l(P()), M = N.pageContext.code, $ = l(B && B.length > 0 ? M + "__" + B.join("__") : null), A = t({ get: () => h(O, B), set(e3) {
16
16
  e3 = e3.trim(), V(O, B, e3);
17
17
  } }), E = l(null), F = l(null), U = l(null);
18
18
  o(() => {
19
- z.$on($.value + "-scanDone", (e3) => {
20
- ae(e3.result);
19
+ q.$on($.value + "-scanDone", (e3) => {
20
+ ae(e3.result), w(e3.result, N.pageContext, N.configure, "afterScanDone");
21
21
  }), n(() => {
22
22
  const e3 = A.value;
23
- w(e3, N.pageContext, N.configure, { formItemRef: E.value, componentRef: F.value, titleRef: U.value, value: e3, entity: N.pageContext.entity.data, pageData: N.pageContext.entity.page });
23
+ b(e3, N.pageContext, N.configure, { formItemRef: E.value, componentRef: F.value, titleRef: U.value, value: e3, entity: N.pageContext.entity.data, pageData: N.pageContext.entity.page });
24
24
  });
25
25
  }), a(() => {
26
- z.$off($.value + "-scanDone");
26
+ q.$off($.value + "-scanDone");
27
27
  });
28
28
  const W = N.configure.runtime ? N.configure.runtime : {}, G = l(W.props ? W.props : {}), H = l(!!((_a = G.value.scan) == null ? void 0 : _a.enable));
29
29
  let K = false;
@@ -33,11 +33,11 @@ const L = e({ __name: "inputtext-runtime", props: { pageContext: {}, configure:
33
33
  X = navigator.userAgent.indexOf(" uni-app ") > 0 ? "app" : "browser";
34
34
  const Y = !(!J.value || !X || "app" !== X), Z = l(!!((Y || K) && H.value || J.value && H.value && "https:" === window.location.protocol));
35
35
  let ee = {};
36
- ((_b = G.value.scan) == null ? void 0 : _b.enable) && ((_c = G.value.scan.ruleList) == null ? void 0 : _c.length) > 0 && (j(G.value.scan.ruleList).then((e3) => {
36
+ ((_b = G.value.scan) == null ? void 0 : _b.enable) && ((_c = G.value.scan.ruleList) == null ? void 0 : _c.length) > 0 && (S(G.value.scan.ruleList).then((e3) => {
37
37
  ee = e3;
38
38
  }), u(() => A.value, (e3) => {
39
39
  e3 = e3.trim();
40
- const l2 = S(e3, ee);
40
+ const l2 = j(e3, ee);
41
41
  l2 && R(N.pageContext, l2.scanSet, l2.params);
42
42
  }));
43
43
  const le = W.style, te = W.class, oe = W.headerStyle, ne = W.titleExceedStyle;
@@ -45,24 +45,25 @@ const L = e({ __name: "inputtext-runtime", props: { pageContext: {}, configure:
45
45
  return V(O, B, e3);
46
46
  }
47
47
  const ue = l(false);
48
- function ie(e3) {
48
+ function ie() {
49
+ if (Y || K) {
50
+ const e3 = { type: "scan", componentId: $.value, systemCode: N.pageContext.systemCode };
51
+ K && (e3.type = "dingTalkScan"), window.parent.postMessage(JSON.stringify(e3), "*");
52
+ } else if (J.value) if ("https:" === window.location.protocol) ue.value = true;
53
+ else {
54
+ const e3 = { type: "scan", componentId: $.value, systemCode: N.pageContext.systemCode };
55
+ window.parent.postMessage(JSON.stringify(e3), "*");
56
+ }
57
+ else ue.value = true;
58
+ }
59
+ function re(e3) {
49
60
  ue.value = false, ae(e3);
50
61
  }
51
62
  return L2({ getValue: function() {
52
63
  return h(O, B);
53
- }, setValue: ae }), (e3, l2) => {
64
+ }, setValue: ae, scanClick: ie }), (e3, l2) => {
54
65
  const t2 = i("el-input"), o2 = i("scan-code-input-browser"), n2 = i("el-form-item");
55
- return c(), r(n2, { ref_key: "formItemRef", ref: E, required: !!G.value.required, class: s(v(te)), "label-width": G.value.labelWidth, style: p(v(le)) }, { label: f(() => [G.value.tittleShow ? (c(), C("div", { key: 0, ref_key: "titleRef", ref: U, style: p({ ...v(oe), ...v(ne) }) }, [G.value.prefixType ? (c(), r(P, { key: 0, pageContext: e3.pageContext, property: G.value }, null, 8, ["pageContext", "property"])) : (c(), C(I, { key: 1 }, [d(x(v(D)(G.value.title)), 1)], 64))], 4)) : y("", true)]), default: f(() => [g(t2, { ref_key: "componentRef", ref: F, disabled: "disabled" === G.value.state, readonly: "readonly" === G.value.state, size: G.value.size, clearable: G.value.clearable, placeholder: G.value.placeholder, maxlength: G.value.maxLength, "show-word-limit": G.value.showInputNum, modelValue: A.value, "onUpdate:modelValue": l2[5] || (l2[5] = (e4) => A.value = e4), onInput: l2[6] || (l2[6] = (l3) => v(b)(l3, e3.pageContext, e3.configure, "input")), onChange: l2[7] || (l2[7] = (l3) => v(b)(l3, e3.pageContext, e3.configure, "change")), onBlur: l2[8] || (l2[8] = (l3) => v(b)(l3, e3.pageContext, e3.configure, "blur")), onFocus: l2[9] || (l2[9] = (l3) => v(b)(l3, e3.pageContext, e3.configure, "focus")), onClick: l2[10] || (l2[10] = (l3) => v(b)(l3, e3.pageContext, e3.configure, "click")) }, m({ _: 2 }, ["outer" != G.value.iconPosition && (G.value.preIconType && G.value.preIconValue || G.value.preText) ? { name: "prefix", fn: f(() => [G.value.preIconType && G.value.preIconValue ? (c(), r(v(T), { key: 0, iconType: G.value.preIconType, iconValue: G.value.preIconValue, onClick: l2[0] || (l2[0] = (l3) => v(_)(A.value, e3.pageContext, e3.configure, "prefixClick")) }, null, 8, ["iconType", "iconValue"])) : y("", true), d(" " + x(v(D)(G.value.preText)), 1)]), key: "0" } : void 0, "outer" == G.value.iconPosition && (G.value.preIconType && G.value.preIconValue || G.value.preText) ? { name: "prepend", fn: f(() => [G.value.preIconType && G.value.preIconValue ? (c(), r(v(T), { key: 0, iconType: G.value.preIconType, iconValue: G.value.preIconValue, onClick: l2[1] || (l2[1] = (l3) => v(_)(A.value, e3.pageContext, e3.configure, "prefixClick")) }, null, 8, ["iconType", "iconValue"])) : y("", true), d(" " + x(v(D)(G.value.preText)), 1)]), key: "1" } : void 0, "outer" != G.value.iconPosition && (G.value.sufIconType && G.value.sufIconValue || G.value.sufText) ? { name: "suffix", fn: f(() => [G.value.sufIconType && G.value.sufIconValue ? (c(), r(v(T), { key: 0, iconType: G.value.sufIconType, iconValue: G.value.sufIconValue, onClick: l2[2] || (l2[2] = (l3) => v(_)(A.value, e3.pageContext, e3.configure, "suffixClick")) }, null, 8, ["iconType", "iconValue"])) : y("", true), d(" " + x(v(D)(G.value.sufText)), 1)]), key: "2" } : void 0, Z.value || "outer" == G.value.iconPosition && (G.value.sufIconType && G.value.sufIconValue || G.value.sufText) ? { name: "append", fn: f(() => [Z.value ? (c(), r(v(T), { key: 0, iconValue: "fa-barcode", onClick: l2[3] || (l2[3] = (e4) => function() {
56
- if (Y || K) {
57
- const e5 = { type: "scan", componentId: $.value, systemCode: N.pageContext.systemCode };
58
- K && (e5.type = "dingTalkScan"), window.parent.postMessage(JSON.stringify(e5), "*");
59
- } else if (J.value) if ("https:" === window.location.protocol) ue.value = true;
60
- else {
61
- const e5 = { type: "scan", componentId: $.value, systemCode: N.pageContext.systemCode };
62
- window.parent.postMessage(JSON.stringify(e5), "*");
63
- }
64
- else ue.value = true;
65
- }()) })) : y("", true), G.value.sufIconType && G.value.sufIconValue ? (c(), r(v(T), { key: 1, iconType: G.value.sufIconType, iconValue: G.value.sufIconValue, onClick: l2[4] || (l2[4] = (l3) => v(_)(A.value, e3.pageContext, e3.configure, "suffixClick")) }, null, 8, ["iconType", "iconValue"])) : y("", true), d(" " + x(v(D)(G.value.sufText)), 1)]), key: "3" } : void 0]), 1032, ["disabled", "readonly", "size", "clearable", "placeholder", "maxlength", "show-word-limit", "modelValue"]), ue.value ? (c(), r(o2, { key: 0, onClose: ie })) : y("", true)]), _: 1 }, 8, ["required", "class", "label-width", "style"]);
66
+ return c(), r(n2, { ref_key: "formItemRef", ref: E, required: !!G.value.required, class: s(v(te)), "label-width": G.value.labelWidth, style: p(v(le)) }, { label: f(() => [G.value.tittleShow ? (c(), C("div", { key: 0, ref_key: "titleRef", ref: U, style: p({ ...v(oe), ...v(ne) }) }, [G.value.prefixType ? (c(), r(D, { key: 0, pageContext: e3.pageContext, property: G.value }, null, 8, ["pageContext", "property"])) : (c(), C(I, { key: 1 }, [d(x(v(z)(G.value.title)), 1)], 64))], 4)) : y("", true)]), default: f(() => [g(t2, { ref_key: "componentRef", ref: F, disabled: "disabled" === G.value.state, readonly: "readonly" === G.value.state, size: G.value.size, clearable: G.value.clearable, placeholder: G.value.placeholder, maxlength: G.value.maxLength, "show-word-limit": G.value.showInputNum, modelValue: A.value, "onUpdate:modelValue": l2[5] || (l2[5] = (e4) => A.value = e4), onInput: l2[6] || (l2[6] = (l3) => v(w)(l3, e3.pageContext, e3.configure, "input")), onChange: l2[7] || (l2[7] = (l3) => v(w)(l3, e3.pageContext, e3.configure, "change")), onBlur: l2[8] || (l2[8] = (l3) => v(w)(l3, e3.pageContext, e3.configure, "blur")), onFocus: l2[9] || (l2[9] = (l3) => v(w)(l3, e3.pageContext, e3.configure, "focus")), onClick: l2[10] || (l2[10] = (l3) => v(w)(l3, e3.pageContext, e3.configure, "click")) }, m({ _: 2 }, ["outer" != G.value.iconPosition && (G.value.preIconType && G.value.preIconValue || G.value.preText) ? { name: "prefix", fn: f(() => [G.value.preIconType && G.value.preIconValue ? (c(), r(v(k), { key: 0, iconType: G.value.preIconType, iconValue: G.value.preIconValue, onClick: l2[0] || (l2[0] = (l3) => v(_)(A.value, e3.pageContext, e3.configure, "prefixClick")) }, null, 8, ["iconType", "iconValue"])) : y("", true), d(" " + x(v(z)(G.value.preText)), 1)]), key: "0" } : void 0, "outer" == G.value.iconPosition && (G.value.preIconType && G.value.preIconValue || G.value.preText) ? { name: "prepend", fn: f(() => [G.value.preIconType && G.value.preIconValue ? (c(), r(v(k), { key: 0, iconType: G.value.preIconType, iconValue: G.value.preIconValue, onClick: l2[1] || (l2[1] = (l3) => v(_)(A.value, e3.pageContext, e3.configure, "prefixClick")) }, null, 8, ["iconType", "iconValue"])) : y("", true), d(" " + x(v(z)(G.value.preText)), 1)]), key: "1" } : void 0, "outer" != G.value.iconPosition && (G.value.sufIconType && G.value.sufIconValue || G.value.sufText) ? { name: "suffix", fn: f(() => [G.value.sufIconType && G.value.sufIconValue ? (c(), r(v(k), { key: 0, iconType: G.value.sufIconType, iconValue: G.value.sufIconValue, onClick: l2[2] || (l2[2] = (l3) => v(_)(A.value, e3.pageContext, e3.configure, "suffixClick")) }, null, 8, ["iconType", "iconValue"])) : y("", true), d(" " + x(v(z)(G.value.sufText)), 1)]), key: "2" } : void 0, Z.value || "outer" == G.value.iconPosition && (G.value.sufIconType && G.value.sufIconValue || G.value.sufText) ? { name: "append", fn: f(() => [Z.value ? (c(), r(v(k), { key: 0, iconValue: "fa-barcode", onClick: l2[3] || (l2[3] = (e4) => ie()) })) : y("", true), G.value.sufIconType && G.value.sufIconValue ? (c(), r(v(k), { key: 1, iconType: G.value.sufIconType, iconValue: G.value.sufIconValue, onClick: l2[4] || (l2[4] = (l3) => v(_)(A.value, e3.pageContext, e3.configure, "suffixClick")) }, null, 8, ["iconType", "iconValue"])) : y("", true), d(" " + x(v(z)(G.value.sufText)), 1)]), key: "3" } : void 0]), 1032, ["disabled", "readonly", "size", "clearable", "placeholder", "maxlength", "show-word-limit", "modelValue"]), ue.value ? (c(), r(o2, { key: 0, onClose: re })) : y("", true)]), _: 1 }, 8, ["required", "class", "label-width", "style"]);
66
67
  };
67
68
  } });
68
69
  export {
@@ -1,7 +1,7 @@
1
1
  import e from "./super-page.vue2.js";
2
2
  /* empty css */
3
3
  import p from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const r = p(e, [["__scopeId", "data-v-4041ec8a"]]);
4
+ const r = p(e, [["__scopeId", "data-v-5470676c"]]);
5
5
  export {
6
6
  r as default
7
7
  };
package/dist/es/style.css CHANGED
@@ -1,13 +1,18 @@
1
- .runtime-page-container[data-v-4041ec8a] {
1
+ .runtime-page-container[data-v-5470676c] {
2
2
  overflow: auto;
3
3
  height: 100%;
4
+ max-height: 100vh;
4
5
  padding: var(--runtime-page-container-padding, 15px);
5
6
  }
6
- .runtime-page-container .runtime-page-container-view[data-v-4041ec8a] {
7
+ .runtime-page-container[data-v-5470676c] .runtime-page-container-view {
7
8
  display: flex;
8
9
  flex-direction: column;
9
10
  align-items: stretch;
11
+ height: 100%;
10
12
  gap: var(--runtime-page-container-view-gap, 15px);
13
+ }
14
+ .runtime-page-container[data-v-5470676c] .runtime-page-container-view > .el-row[class*=el-col-] {
15
+ flex: none;
11
16
  }.yx-card-box-view-main[data-v-799b1858] > .el-card__header {
12
17
  position: relative;
13
18
  }
@@ -59,24 +64,41 @@
59
64
  justify-content: flex-start;
60
65
  text-align: left;
61
66
  }
62
- }.yx-fixed-box-main.is-top > .yx-fixed-box-container[data-v-1cc14e88] {
67
+ }.yx-affix[data-v-d053fb6d]:has(.yx-affix-content:empty) {
68
+ display: none;
69
+ }
70
+ .yx-affix .yx-affix-content.is-fixed.is-top > .yx-fixed-box-container[data-v-d053fb6d] {
63
71
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
64
72
  }
65
- .yx-fixed-box-main.is-bottom > .yx-fixed-box-container[data-v-1cc14e88] {
73
+ .yx-affix .yx-affix-content.is-fixed.is-bottom > .yx-fixed-box-container[data-v-d053fb6d] {
74
+ box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.2);
75
+ }.yx-fixed-box-main[data-v-9b488f43]:has(.yx-fixed-box-container:empty) {
76
+ display: none;
77
+ }
78
+ .yx-fixed-box-main.is-top > .yx-fixed-box-container[data-v-9b488f43] {
79
+ box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
80
+ }
81
+ .yx-fixed-box-main.is-bottom > .yx-fixed-box-container[data-v-9b488f43] {
66
82
  box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.2);
67
83
  }
68
84
  @media (max-width: 768px) {
69
- .yx-fixed-box-main > .yx-fixed-box-container[data-v-1cc14e88] {
85
+ .yx-fixed-box-main > .yx-fixed-box-container[data-v-9b488f43] {
70
86
  width: 100% !important;
71
87
  left: 0 !important;
72
88
  right: 0 !important;
73
89
  }
74
- }.amb-widget-container-tool[data-v-7aefa8b2] {
90
+ }.amb-widget-tools-parent[data-v-a1efabab]:empty {
91
+ display: none;
92
+ }
93
+ .amb-widget-tools-parent[data-v-a1efabab] .amb-widget-container-tool {
75
94
  display: flex;
76
95
  flex-wrap: wrap;
77
96
  gap: var(--amb-widget-container-tool-gap, 10px);
78
97
  }
79
- .amb-widget-container-tool[data-v-7aefa8b2] > .page-runtime-header-btn:has(> .page-runtime-header-btn) {
98
+ .amb-widget-tools-parent[data-v-a1efabab] .amb-widget-container-tool:empty {
99
+ display: none;
100
+ }
101
+ .amb-widget-tools-parent[data-v-a1efabab] .amb-widget-container-tool > .page-runtime-header-btn:has(> .page-runtime-header-btn) {
80
102
  display: flex;
81
103
  flex-wrap: wrap;
82
104
  gap: inherit;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "super-page-runtime",
3
- "version": "2.2.48",
3
+ "version": "2.2.51-sit4",
4
4
  "description": "AgileBuilder super page runtime",
5
5
  "license": "ISC",
6
6
  "main": "dist/es/index.js",
@@ -48,7 +48,7 @@
48
48
  "@vitejs/plugin-vue-jsx": "^3.1.0",
49
49
  "@vue/eslint-config-prettier": "^8.0.0",
50
50
  "@vue/test-utils": "^2.4.4",
51
- "agilebuilder-ui": "1.1.17",
51
+ "agilebuilder-ui": "1.1.19-sit3",
52
52
  "axios": "^1.6.8",
53
53
  "cypress": "^13.6.6",
54
54
  "element-plus": "^2.6.1",