super-page-runtime 2.2.22 → 2.2.26

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.
@@ -6,138 +6,139 @@ import { addComponentRef as h, addComponentRefByCode as y } from "../../utils/gl
6
6
  import { getPermissionCodes as w, packageFormRules as j, controlObjectRenderState as _ } from "../../utils/page-init-util.js";
7
7
  import { caculateShowCondition as N, getFormPropName as P, getSizeConfig as B } from "../../utils/page-helper-util.js";
8
8
  import { isWorkflowPage as L, getPropClassName as O, isNumber as R } from "../../utils/common-util.js";
9
- import { isShowComponent as S } from "../../utils/events/event-util.js";
10
- import { usePageContextStore as M } from "../../utils/page-store.js";
11
- const T = e({ __name: "object-render", props: { pageContext: {}, configure: {} }, setup(e2) {
9
+ import { isShowMobileEvent as S, isShowComponent as M } from "../../utils/events/event-util.js";
10
+ import { usePageContextStore as T } from "../../utils/page-store.js";
11
+ const $ = e({ __name: "object-render", props: { pageContext: {}, configure: {} }, setup(e2) {
12
12
  var _a, _b;
13
- const T2 = e2;
14
- null == T2.configure.style && (T2.configure.style = {});
15
- const $ = w(T2.configure, T2.pageContext);
16
- T2.configure && T2.configure.props && T2.configure.props.base && (T2.configure.props.base.functionCode = $), j(T2.pageContext, T2.configure);
17
- let E = o(true), H = o(true), k = o("");
18
- if (T2.configure && T2.configure.props) {
13
+ const $2 = e2;
14
+ null == $2.configure.style && ($2.configure.style = {});
15
+ const E = w($2.configure, $2.pageContext);
16
+ $2.configure && $2.configure.props && $2.configure.props.base && ($2.configure.props.base.functionCode = E), j($2.pageContext, $2.configure);
17
+ let H = o(true), k = o(true), F = o("");
18
+ if ($2.configure && $2.configure.props) {
19
19
  let e3 = [];
20
- ((_a = T2.configure.props.base) == null ? void 0 : _a.showConditions) && (e3 = "string" == typeof T2.configure.props.base.showConditions ? JSON.parse(T2.configure.props.base.showConditions) : T2.configure.props.base.showConditions), H = t(() => {
20
+ ((_a = $2.configure.props.base) == null ? void 0 : _a.showConditions) && (e3 = "string" == typeof $2.configure.props.base.showConditions ? JSON.parse($2.configure.props.base.showConditions) : $2.configure.props.base.showConditions), k = t(() => {
21
21
  var _a2;
22
22
  let o2 = true;
23
- if (E.value) if (e3 && e3.length > 0) o2 = N(T2.pageContext, e3);
23
+ if (H.value) if (S($2.pageContext, $2.configure)) if (e3 && e3.length > 0) o2 = N($2.pageContext, e3);
24
24
  else {
25
- const e4 = (_a2 = T2.configure.props.base) == null ? void 0 : _a2.state;
25
+ const e4 = (_a2 = $2.configure.props.base) == null ? void 0 : _a2.state;
26
26
  e4 && "hidden" === e4 && (o2 = false);
27
27
  }
28
28
  else o2 = false;
29
+ else o2 = false;
29
30
  return o2;
30
31
  });
31
- if (T2.configure._dynamicShowFlag = H, (_b = T2.configure.props.base) == null ? void 0 : _b.editConditions) {
32
- const e4 = T2.configure.props.base.editConditions;
32
+ if ($2.configure._dynamicShowFlag = k, (_b = $2.configure.props.base) == null ? void 0 : _b.editConditions) {
33
+ const e4 = $2.configure.props.base.editConditions;
33
34
  if (e4.length > 0) {
34
- const o2 = T2.configure.runtime ? T2.configure.runtime : {}, n2 = o2.props ? o2.props : {};
35
- if (n2.rawSate = n2.state, L(T2.pageContext) && T2.pageContext.fieldPermissionMap) {
36
- const e5 = T2.pageContext.fieldPermissionMap.get("all_fields");
37
- if (false === (e5 == null ? void 0 : e5.canEdit)) k.value = "disabled";
35
+ const o2 = $2.configure.runtime ? $2.configure.runtime : {}, n2 = o2.props ? o2.props : {};
36
+ if (n2.rawSate = n2.state, L($2.pageContext) && $2.pageContext.fieldPermissionMap) {
37
+ const e5 = $2.pageContext.fieldPermissionMap.get("all_fields");
38
+ if (false === (e5 == null ? void 0 : e5.canEdit)) F.value = "disabled";
38
39
  else {
39
- const e6 = T2.configure.props.base;
40
+ const e6 = $2.configure.props.base;
40
41
  if (e6 && e6.prop) {
41
42
  let o3 = e6.prop;
42
43
  o3 = P(o3);
43
- const t2 = T2.pageContext.fieldPermissionMap.get(o3);
44
- t2 && false === t2.canEdit && (k.value = "disabled");
44
+ const t2 = $2.pageContext.fieldPermissionMap.get(o3);
45
+ t2 && false === t2.canEdit && (F.value = "disabled");
45
46
  }
46
47
  }
47
48
  }
48
49
  n2.state = t({ get() {
49
- if ("disabled" === k.value) return k.value;
50
- return N(T2.pageContext, e4) ? "" : "disabled";
50
+ if ("disabled" === F.value) return F.value;
51
+ return N($2.pageContext, e4) ? "" : "disabled";
51
52
  }, set() {
52
53
  } });
53
54
  }
54
55
  }
55
56
  }
56
- const F = o({});
57
- F.value = n(b(T2.configure.name));
58
- const J = o(true);
59
- null == F.value && (F.value = C, J.value = false);
60
- const W = o(null), q = o({}), z = o(""), A = O(T2.configure);
61
- A && (z.value = A);
62
- const D = T2.configure.runtime && T2.configure.runtime.common ? T2.configure.runtime.common : {};
63
- if (D.class && (z.value += " " + D.class), D.style) {
64
- Object.assign(q.value, D.style);
65
- const e3 = T2.pageContext && T2.pageContext.dimensions ? T2.pageContext.dimensions : x.PC, o2 = D.style[e3 + "_style"];
66
- o2 && Object.assign(q.value, o2);
67
- const t2 = D.style[e3 + "_class"];
68
- t2 && (z.value += " " + t2);
57
+ const J = o({});
58
+ J.value = n(b($2.configure.name));
59
+ const W = o(true);
60
+ null == J.value && (J.value = C, W.value = false);
61
+ const q = o(null), z = o({}), A = o(""), D = O($2.configure);
62
+ D && (A.value = D);
63
+ const G = $2.configure.runtime && $2.configure.runtime.common ? $2.configure.runtime.common : {};
64
+ if (G.class && (A.value += " " + G.class), G.style) {
65
+ Object.assign(z.value, G.style);
66
+ const e3 = $2.pageContext && $2.pageContext.dimensions ? $2.pageContext.dimensions : x.PC, o2 = G.style[e3 + "_style"];
67
+ o2 && Object.assign(z.value, o2);
68
+ const t2 = G.style[e3 + "_class"];
69
+ t2 && (A.value += " " + t2);
69
70
  }
70
- const G = M();
71
- function I(e3) {
72
- if (W.value = e3, e3 && !e3.show && (e3.show = function() {
73
- E.value = true;
71
+ const I = T();
72
+ function K(e3) {
73
+ if (q.value = e3, e3 && !e3.show && (e3.show = function() {
74
+ H.value = true;
74
75
  }), e3 && !e3.hide && (e3.hide = function() {
75
- E.value = false;
76
+ H.value = false;
76
77
  }), e3 && !e3.getConfigure && (e3.getConfigure = function() {
77
- return T2.configure;
78
- }), T2.configure.uuid && h(T2.pageContext, T2.configure.uuid, W), T2.configure.code) y(T2.pageContext, T2.configure.code, W);
79
- else if (T2.configure.props && T2.configure.props.base) {
80
- const e4 = T2.configure.props.base;
78
+ return $2.configure;
79
+ }), $2.configure.uuid && h($2.pageContext, $2.configure.uuid, q), $2.configure.code) y($2.pageContext, $2.configure.code, q);
80
+ else if ($2.configure.props && $2.configure.props.base) {
81
+ const e4 = $2.configure.props.base;
81
82
  if (e4.prop) {
82
83
  let o3 = e4.prop;
83
- o3.startsWith("${") && (o3 = o3.substring(2, o3.length - 1)), o3.includes(".") && (o3 = o3.substring(o3.indexOf(".") + 1)), y(T2.pageContext, o3, W);
84
+ o3.startsWith("${") && (o3 = o3.substring(2, o3.length - 1)), o3.includes(".") && (o3 = o3.substring(o3.indexOf(".") + 1)), y($2.pageContext, o3, q);
84
85
  }
85
86
  }
86
- const o2 = T2.configure.props ? T2.configure.props.base : null;
87
+ const o2 = $2.configure.props ? $2.configure.props.base : null;
87
88
  if (o2 && o2.prop) {
88
89
  let e4 = o2.prop;
89
- e4 = P(e4), _(T2.pageContext, e4);
90
+ e4 = P(e4), _($2.pageContext, e4);
90
91
  }
91
92
  !function() {
92
- if (!W.value) return;
93
- const e4 = B(T2.pageContext, T2.configure);
94
- "table" !== T2.configure.name && e4 && e4.isCalcHeight && v(() => {
95
- let e5 = W.value.$el;
96
- e5 || (e5 = W.value);
93
+ if (!q.value) return;
94
+ const e4 = B($2.pageContext, $2.configure);
95
+ "table" !== $2.configure.name && e4 && e4.isCalcHeight && v(() => {
96
+ let e5 = q.value.$el;
97
+ e5 || (e5 = q.value);
97
98
  const o3 = e5.parentNode;
98
99
  if (!e5 || !o3) return;
99
100
  const t2 = e5.getBoundingClientRect();
100
101
  let n2 = window.innerHeight - t2.y - 80, i2 = n2 + "";
101
- R(n2) && (i2 = n2 + "px"), q.value.height = i2, q.value["overflow-y"] = "auto", q.value["overflow-x"] = "hidden", T2.configure.sytle || (T2.configure.sytle = {}), T2.configure.sytle._heightStyle = i2;
102
+ R(n2) && (i2 = n2 + "px"), z.value.height = i2, z.value["overflow-y"] = "auto", z.value["overflow-x"] = "hidden", $2.configure.sytle || ($2.configure.sytle = {}), $2.configure.sytle._heightStyle = i2;
102
103
  });
103
104
  }();
104
105
  }
105
- let K;
106
+ let Q;
106
107
  i(() => {
107
- Q(), G.countComponentsLoadedNumber(), K = setTimeout(() => {
108
- G.componentsTotalNmber !== G.componentsLoadedNumber || G.pageComponentsLoaded || G.setPageComponentsLoaded(true);
108
+ U(), I.countComponentsLoadedNumber(), Q = setTimeout(() => {
109
+ I.componentsTotalNmber !== I.componentsLoadedNumber || I.pageComponentsLoaded || I.setPageComponentsLoaded(true);
109
110
  }, 100);
110
111
  }), s(() => {
111
- K && clearTimeout(K);
112
+ Q && clearTimeout(Q);
112
113
  });
113
- const Q = () => {
114
- if (!W.value) return;
115
- let e3 = W.value.$el;
116
- e3 || (e3 = W.value);
114
+ const U = () => {
115
+ if (!q.value) return;
116
+ let e3 = q.value.$el;
117
+ e3 || (e3 = q.value);
117
118
  const o2 = e3.parentNode;
118
119
  if (!e3 || !o2) return;
119
- const t2 = T2.configure.props ? T2.configure.props : {}, n2 = T2.configure.style ? T2.configure.style : {}, i2 = t2.position;
120
+ const t2 = $2.configure.props ? $2.configure.props : {}, n2 = $2.configure.style ? $2.configure.style : {}, i2 = t2.position;
120
121
  if ("top" == i2 || "bottom" == i2) {
121
122
  const t3 = [o2];
122
123
  if (t3 && t3.length > 0) {
123
124
  const e4 = t3[0].getBoundingClientRect();
124
- "top" == i2 && (q.value.top = e4.top + "px"), "bottom" == i2 && (q.value.bottom = "10px");
125
+ "top" == i2 && (z.value.top = e4.top + "px"), "bottom" == i2 && (z.value.bottom = "10px");
125
126
  }
126
127
  const n3 = e3.getBoundingClientRect();
127
- q.value.width = n3.width + "px";
128
- } else if (n2.position && (q.value.position = n2.position, "relative" != q.value.position)) {
129
- if (!q.value.width) {
128
+ z.value.width = n3.width + "px";
129
+ } else if (n2.position && (z.value.position = n2.position, "relative" != z.value.position)) {
130
+ if (!z.value.width) {
130
131
  const o3 = e3.getBoundingClientRect();
131
- q.value.width = o3.width + "px";
132
+ z.value.width = o3.width + "px";
132
133
  }
133
- n2.left && (q.value.left = n2.left + "px"), n2.top && (q.value.top = n2.top + "px");
134
+ n2.left && (z.value.left = n2.left + "px"), n2.top && (z.value.top = n2.top + "px");
134
135
  }
135
136
  };
136
137
  return (e3, o2) => {
137
138
  const t2 = r("permission");
138
- return p(S)(e3.configure) ? u((c(), a(g(F.value), { key: 0, ref: I, style: d(q.value), class: f(z.value), configure: e3.configure, pageContext: e3.pageContext }, null, 8, ["style", "class", "configure", "pageContext"])), [[m, p(H)], [t2, p($) ? p($) : "true"]]) : l("", true);
139
+ return p(M)(e3.configure) ? u((c(), a(g(J.value), { key: 0, ref: K, style: d(z.value), class: f(A.value), configure: e3.configure, pageContext: e3.pageContext }, null, 8, ["style", "class", "configure", "pageContext"])), [[m, p(k)], [t2, p(E) ? p(E) : "true"]]) : l("", true);
139
140
  };
140
141
  } });
141
142
  export {
142
- T as default
143
+ $ as default
143
144
  };
@@ -1,9 +1,9 @@
1
1
  import { defineComponent as e, ref as a, resolveComponent as l, createBlock as t, openBlock as u, withCtx as o, createElementBlock as n, createCommentVNode as r } from "vue";
2
- import i from "./super-page.vue.js";
3
- const d = ["src"], s = ["src"], p = e({ __name: "super-page-dialog", props: { parentPageContext: {}, parentPageEventParams: {}, jumpPageSetting: {}, isTest: { type: Boolean }, customParams: {} }, emits: ["open", "opened", "close", "closed"], setup(e2, { emit: p2 }) {
4
- const g = e2, v = p2, m = a(true), c = g.jumpPageSetting ? g.jumpPageSetting : null, P = a(null), f = a(null), h = a(null), j = a(null), C = a(null), w = a(null), y = a({}), b = a(false), k = a(false), O = a("rtl"), I = a(null), _ = a(false), V = a(null);
2
+ import s from "./super-page.vue.js";
3
+ const d = ["src"], i = ["src"], p = e({ __name: "super-page-dialog", props: { parentPageContext: {}, parentPageEventParams: {}, jumpPageSetting: {}, isTest: { type: Boolean }, customParams: {} }, emits: ["open", "opened", "close", "closed"], setup(e2, { emit: p2 }) {
4
+ const g = e2, v = p2, m = a(true), c = g.jumpPageSetting ? g.jumpPageSetting : null, P = a(null), f = a(null), h = a(null), j = a(null), w = a(null), C = a(null), y = a({}), b = a(false), k = a(false), O = a("rtl"), I = a(null), _ = a(false), V = a(null);
5
5
  if (c) {
6
- _.value = !(!c || void 0 === c._isIframe) && c._isIframe, V.value = c && c._path ? c._path : null, w.value = c && c.dialogType ? c.dialogType : "dialog", b.value = !(!c || !c.draggable) && c.draggable, k.value = !(!c || !c.overflow) && c.overflow, O.value = c && c.showPosition ? c.showPosition : "rtl", f.value = c && c.jumpPageTitle ? c.jumpPageTitle : null, P.value = c && c.jumpPageWidth ? c.jumpPageWidth : "100%", I.value = c && c.jumpPageHeight ? c.jumpPageHeight : null, h.value = c && c.pageCode, j.value = c && c.dataId ? c.dataId : null, C.value = c && c.taskId ? c.taskId : null;
6
+ _.value = !(!c || void 0 === c._isIframe) && c._isIframe, V.value = c && c._path ? c._path : null, C.value = c && c.dialogType ? c.dialogType : "dialog", b.value = !(!c || !c.draggable) && c.draggable, k.value = !(!c || !c.overflow) && c.overflow, O.value = c && c.showPosition ? c.showPosition : "rtl", f.value = c && c.jumpPageTitle ? c.jumpPageTitle : null, P.value = c && c.jumpPageWidth ? c.jumpPageWidth : "100%", I.value = c && c.jumpPageHeight ? c.jumpPageHeight : null, h.value = c && c.pageCode, j.value = c && c.dataId ? c.dataId : null, w.value = c && c.taskId ? c.taskId : null;
7
7
  const e3 = !!c.isNeedId;
8
8
  if (g.parentPageEventParams) {
9
9
  try {
@@ -13,11 +13,11 @@ const d = ["src"], s = ["src"], p = e({ __name: "super-page-dialog", props: { pa
13
13
  }
14
14
  null !== j.value && void 0 !== j.value || (j.value = g.parentPageEventParams.id);
15
15
  }
16
- y.value.parentPageCode = c && c.parentPageCode ? c.parentPageCode : null, y.value.parentPageVersion = c && c.parentPageVersion ? c.parentPageVersion : null, y.value.jumpMode = c ? c.jumpMode : null, y.value.id = j.value, y.value.isNeedId = e3, y.value.taskId = C.value, g.customParams && Object.assign(y.value, g.customParams);
16
+ y.value.parentPageCode = c && c.parentPageCode ? c.parentPageCode : null, y.value.parentPageVersion = c && c.parentPageVersion ? c.parentPageVersion : null, y.value.jumpMode = c ? c.jumpMode : null, y.value.id = j.value, y.value.isNeedId = e3, y.value.taskId = w.value, g.customParams && Object.assign(y.value, g.customParams);
17
17
  }
18
18
  return (e3, a2) => {
19
19
  const p3 = l("el-drawer"), g2 = l("el-dialog");
20
- return w.value && "drawer" === w.value ? (u(), t(p3, { key: 0, modelValue: m.value, "onUpdate:modelValue": a2[0] || (a2[0] = (e4) => m.value = e4), title: f.value, direction: O.value, size: P.value, onOpen: a2[1] || (a2[1] = (e4) => v("open")), onOpened: a2[2] || (a2[2] = (e4) => v("opened")), onClose: a2[3] || (a2[3] = (e4) => v("close")), onClosed: a2[4] || (a2[4] = (e4) => v("closed")) }, { default: o(() => [!_.value && h.value ? (u(), t(i, { key: 0, pageCode: h.value, pageRequest: y.value, isDialog: true }, null, 8, ["pageCode", "pageRequest"])) : _.value ? (u(), n("iframe", { key: 1, height: "98%", width: "100%", src: V.value, frameborder: "0", allowtransparency: "no" }, null, 8, d)) : r("", true)]), _: 1 }, 8, ["modelValue", "title", "direction", "size"])) : (u(), t(g2, { key: 1, "model-value": "", title: f.value, "close-on-click-modal": false, "append-to-body": "", width: P.value, draggable: b.value, overflow: k.value, onOpen: a2[5] || (a2[5] = (a3) => e3.$emit("open")), onOpend: a2[6] || (a2[6] = (a3) => e3.$emit("opend")), onClose: a2[7] || (a2[7] = (e4) => v("close")), onClosed: a2[8] || (a2[8] = (a3) => e3.$emit("closed")) }, { default: o(() => [!_.value && h.value ? (u(), t(i, { key: 0, pageCode: h.value, pageRequest: y.value, contentHeight: I.value, isDialog: true }, null, 8, ["pageCode", "pageRequest", "contentHeight"])) : _.value ? (u(), n("iframe", { key: 1, height: "98%", width: "100%", src: V.value, frameborder: "0", allowtransparency: "no" }, null, 8, s)) : r("", true)]), _: 1 }, 8, ["title", "width", "draggable", "overflow"]));
20
+ return C.value && "drawer" === C.value ? (u(), t(p3, { key: 0, modelValue: m.value, "onUpdate:modelValue": a2[0] || (a2[0] = (e4) => m.value = e4), title: f.value, direction: O.value, size: P.value, class: "content-drawer", onOpen: a2[1] || (a2[1] = (e4) => v("open")), onOpened: a2[2] || (a2[2] = (e4) => v("opened")), onClose: a2[3] || (a2[3] = (e4) => v("close")), onClosed: a2[4] || (a2[4] = (e4) => v("closed")) }, { default: o(() => [!_.value && h.value ? (u(), t(s, { key: 0, pageCode: h.value, pageRequest: y.value, isDialog: true }, null, 8, ["pageCode", "pageRequest"])) : _.value ? (u(), n("iframe", { key: 1, height: "98%", width: "100%", src: V.value, frameborder: "0", allowtransparency: "no" }, null, 8, d)) : r("", true)]), _: 1 }, 8, ["modelValue", "title", "direction", "size"])) : (u(), t(g2, { key: 1, "model-value": "", title: f.value, "close-on-click-modal": false, "append-to-body": "", width: P.value, draggable: b.value, overflow: k.value, onOpen: a2[5] || (a2[5] = (a3) => e3.$emit("open")), onOpend: a2[6] || (a2[6] = (a3) => e3.$emit("opend")), onClose: a2[7] || (a2[7] = (e4) => v("close")), onClosed: a2[8] || (a2[8] = (a3) => e3.$emit("closed")) }, { default: o(() => [!_.value && h.value ? (u(), t(s, { key: 0, pageCode: h.value, pageRequest: y.value, contentHeight: I.value, isDialog: true }, null, 8, ["pageCode", "pageRequest", "contentHeight"])) : _.value ? (u(), n("iframe", { key: 1, height: "98%", width: "100%", src: V.value, frameborder: "0", allowtransparency: "no" }, null, 8, i)) : r("", true)]), _: 1 }, 8, ["title", "width", "draggable", "overflow"]));
21
21
  };
22
22
  } });
23
23
  export {
@@ -140,7 +140,7 @@ const me = { class: "app-container" }, ge = e({ __name: "super-page", props: { p
140
140
  let l2 = ye.contentHeight;
141
141
  if (!l2) {
142
142
  const a3 = e3.getBoundingClientRect();
143
- l2 = Le ? window.innerHeight - a3.y - 78 : window.innerHeight - a3.y - 40;
143
+ l2 = Le ? window.innerHeight - a3.y - 28 : window.innerHeight - a3.y - 40;
144
144
  }
145
145
  let a2 = l2;
146
146
  ie(l2) && (a2 = l2 + "px"), e3.style.height = a2, e3.style["overflow-y"] = "auto";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "super-page-runtime",
3
- "version": "2.2.22",
3
+ "version": "2.2.26",
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.10",
51
+ "agilebuilder-ui": "1.1.11",
52
52
  "axios": "^1.6.8",
53
53
  "cypress": "^13.6.6",
54
54
  "element-plus": "^2.6.1",