super-page-runtime 2.3.37-sit1 → 2.3.37-sit2
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.
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { defineComponent as e, ref as o, computed as t, watch as n, markRaw as i, onMounted as
|
|
1
|
+
import { defineComponent as e, ref as o, computed as t, watch as n, markRaw as i, onMounted as r, onUnmounted as s, withDirectives as u, createCommentVNode as l, unref as a, createBlock as p, openBlock as g, resolveDynamicComponent as c, normalizeClass as f, normalizeStyle as d, vShow as m, nextTick as C } from "vue";
|
|
2
2
|
import v from "./error-render.vue.js";
|
|
3
3
|
import { getRuntimeComponentByName as h } from "../../utils/assemblys-config.js";
|
|
4
|
-
import { PageDimensions as
|
|
5
|
-
import { addComponentRef as
|
|
6
|
-
import {
|
|
4
|
+
import { PageDimensions as b } from "../../utils/interfaces/page-design-types.js";
|
|
5
|
+
import { addComponentRef as x, addComponentRefByCode as y } from "../../utils/global-refs.js";
|
|
6
|
+
import { getPermissionCodes as w, packageFormRules as j, getModelFields as N, controlObjectRenderState as M } from "../../utils/page-init-util.js";
|
|
7
7
|
import { caculateShowCondition as V, getFormPropName as _, getSizeConfig as A } from "../../utils/page-helper-util.js";
|
|
8
8
|
import { isWorkflowPage as S, getPropClassName as T, isNumber as $ } from "../../utils/common-util.js";
|
|
9
9
|
import { isShowMobileEvent as O, isShowComponent as P } from "../../utils/events/event-util.js";
|
|
@@ -14,19 +14,19 @@ import { isMobileBrowser as F } from "agilebuilder-ui/src/utils/common-util";
|
|
|
14
14
|
const k = e({ __name: "object-render", props: { pageContext: {}, configure: {} }, setup(e2) {
|
|
15
15
|
var _a, _b, _c;
|
|
16
16
|
const k2 = e2;
|
|
17
|
-
null == k2.configure.style && (k2.configure.style = {})
|
|
18
|
-
let D =
|
|
19
|
-
const E =
|
|
20
|
-
k2.configure && k2.configure.props && k2.configure.props.base && (k2.configure.props.base.functionCode =
|
|
21
|
-
const
|
|
22
|
-
k2.configure && k2.configure.props && k2.configure.props.base && (k2.configure.props.base.isHasFieldAuthPermission =
|
|
23
|
-
let
|
|
17
|
+
null == k2.configure.style && (k2.configure.style = {});
|
|
18
|
+
let D = null;
|
|
19
|
+
const E = w(k2.configure, k2.pageContext);
|
|
20
|
+
k2.configure && k2.configure.props && k2.configure.props.base && (k2.configure.props.base.functionCode = E);
|
|
21
|
+
const J = R(E || "true", k2.pageContext.systemCode), L = H(k2.pageContext, k2.configure), W = J && L;
|
|
22
|
+
k2.configure && k2.configure.props && k2.configure.props.base && (k2.configure.props.base.isHasFieldAuthPermission = W), j(k2.pageContext, k2.configure, W);
|
|
23
|
+
let q = o(null), z = o(true), G = o("");
|
|
24
24
|
if (k2.configure && k2.configure.props) {
|
|
25
25
|
let e3 = [];
|
|
26
|
-
((_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),
|
|
26
|
+
((_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), z = t(() => {
|
|
27
27
|
var _a2;
|
|
28
28
|
let o2 = true;
|
|
29
|
-
if (
|
|
29
|
+
if (W) if (q.value && null !== q.value) o2 = "show" === q.value;
|
|
30
30
|
else if (O(k2.pageContext, k2.configure)) if (e3 && e3.length > 0) o2 = V(k2.pageContext, e3);
|
|
31
31
|
else {
|
|
32
32
|
const e4 = (_a2 = k2.configure.props.base) == null ? void 0 : _a2.state;
|
|
@@ -36,9 +36,17 @@ const k = e({ __name: "object-render", props: { pageContext: {}, configure: {} }
|
|
|
36
36
|
else o2 = false;
|
|
37
37
|
return o2;
|
|
38
38
|
});
|
|
39
|
-
if (k2.configure._dynamicShowFlag =
|
|
40
|
-
|
|
41
|
-
|
|
39
|
+
if (k2.configure._dynamicShowFlag = z, (_b = k2.configure.props) == null ? void 0 : _b.hiddenNotValidator) {
|
|
40
|
+
if (k2.pageContext.hiddenNotValidatorCodes || (k2.pageContext.hiddenNotValidatorCodes = /* @__PURE__ */ new Set()), "table" === k2.configure.name) D = k2.configure.code ? k2.configure.code : k2.configure.uuid;
|
|
41
|
+
else {
|
|
42
|
+
let e4 = N(k2.configure);
|
|
43
|
+
D = e4 && e4.length > 0 ? e4[1] : null;
|
|
44
|
+
}
|
|
45
|
+
n(z, (e4) => {
|
|
46
|
+
e4 ? k2.pageContext.hiddenNotValidatorCodes.delete(D) : k2.pageContext.hiddenNotValidatorCodes.add(D);
|
|
47
|
+
}, { immediate: true });
|
|
48
|
+
}
|
|
49
|
+
if ((_c = k2.configure.props.base) == null ? void 0 : _c.editConditions) {
|
|
42
50
|
const e4 = k2.configure.props.base.editConditions;
|
|
43
51
|
if (e4.length > 0) {
|
|
44
52
|
const o2 = k2.configure.runtime ? k2.configure.runtime : {}, n2 = o2.props ? o2.props : {};
|
|
@@ -48,46 +56,46 @@ const k = e({ __name: "object-render", props: { pageContext: {}, configure: {} }
|
|
|
48
56
|
let o3 = e5.prop;
|
|
49
57
|
o3 = _(o3);
|
|
50
58
|
const t2 = k2.pageContext.fieldPermissionMap.get(o3);
|
|
51
|
-
t2 && false === t2.canEdit && (
|
|
59
|
+
t2 && false === t2.canEdit && (G.value = "disabled");
|
|
52
60
|
}
|
|
53
61
|
}
|
|
54
62
|
n2.state = t({ get() {
|
|
55
|
-
if ("disabled" ===
|
|
63
|
+
if ("disabled" === G.value) return G.value;
|
|
56
64
|
return V(k2.pageContext, e4) ? "" : "disabled";
|
|
57
65
|
}, set() {
|
|
58
66
|
} });
|
|
59
67
|
}
|
|
60
68
|
}
|
|
61
69
|
}
|
|
62
|
-
const
|
|
63
|
-
|
|
64
|
-
const
|
|
65
|
-
null ==
|
|
66
|
-
const
|
|
67
|
-
|
|
68
|
-
const
|
|
69
|
-
if (
|
|
70
|
-
Object.assign(
|
|
71
|
-
const e3 = k2.pageContext && k2.pageContext.dimensions ? k2.pageContext.dimensions :
|
|
72
|
-
o2 && Object.assign(
|
|
73
|
-
const t2 =
|
|
74
|
-
t2 && (
|
|
70
|
+
const I = o({});
|
|
71
|
+
I.value = i(h(k2.configure.name));
|
|
72
|
+
const K = o(true);
|
|
73
|
+
null == I.value && (I.value = v, K.value = false);
|
|
74
|
+
const Q = o(null), U = o({}), X = o(""), Y = T(k2.configure);
|
|
75
|
+
Y && (X.value = Y);
|
|
76
|
+
const Z = k2.configure.runtime && k2.configure.runtime.common ? k2.configure.runtime.common : {};
|
|
77
|
+
if (Z.class && (X.value += " " + Z.class), Z.style) {
|
|
78
|
+
Object.assign(U.value, Z.style);
|
|
79
|
+
const e3 = k2.pageContext && k2.pageContext.dimensions ? k2.pageContext.dimensions : b.PC, o2 = Z.style[e3 + "_style"];
|
|
80
|
+
o2 && Object.assign(U.value, o2);
|
|
81
|
+
const t2 = Z.style[e3 + "_class"];
|
|
82
|
+
t2 && (X.value += " " + t2);
|
|
75
83
|
}
|
|
76
|
-
const
|
|
77
|
-
function
|
|
78
|
-
if (
|
|
79
|
-
|
|
84
|
+
const ee = B();
|
|
85
|
+
function oe(e3) {
|
|
86
|
+
if (Q.value = e3, e3 && !e3.show && (e3.show = function() {
|
|
87
|
+
q.value = "show";
|
|
80
88
|
}), e3 && !e3.hide && (e3.hide = function() {
|
|
81
|
-
|
|
89
|
+
q.value = "hide";
|
|
82
90
|
}), e3 && !e3.getConfigure && (e3.getConfigure = function() {
|
|
83
91
|
return k2.configure;
|
|
84
|
-
}), k2.configure.uuid &&
|
|
85
|
-
else if ("table" === k2.configure.name) y(k2.pageContext, k2.configure.uuid,
|
|
92
|
+
}), k2.configure.uuid && x(k2.pageContext, k2.configure.uuid, Q), k2.configure.code) y(k2.pageContext, k2.configure.code, Q);
|
|
93
|
+
else if ("table" === k2.configure.name) y(k2.pageContext, k2.configure.uuid, Q);
|
|
86
94
|
else if (k2.configure.props && k2.configure.props.base) {
|
|
87
95
|
const e4 = k2.configure.props.base;
|
|
88
96
|
if (e4.prop) {
|
|
89
97
|
let o3 = e4.prop;
|
|
90
|
-
o3.startsWith("${") && (o3 = o3.substring(2, o3.length - 1)), o3.includes(".") && (o3 = o3.substring(o3.indexOf(".") + 1)), y(k2.pageContext, o3,
|
|
98
|
+
o3.startsWith("${") && (o3 = o3.substring(2, o3.length - 1)), o3.includes(".") && (o3 = o3.substring(o3.indexOf(".") + 1)), y(k2.pageContext, o3, Q);
|
|
91
99
|
}
|
|
92
100
|
}
|
|
93
101
|
const o2 = k2.configure.props ? k2.configure.props.base : null;
|
|
@@ -96,28 +104,28 @@ const k = e({ __name: "object-render", props: { pageContext: {}, configure: {} }
|
|
|
96
104
|
e4 = _(e4), M(k2.pageContext, e4), k2.pageContext.propTitleMap = k2.pageContext.propTitleMap || {}, k2.pageContext.propTitleMap[e4] = o2.title ? o2.title : e4;
|
|
97
105
|
}
|
|
98
106
|
!function() {
|
|
99
|
-
if (!
|
|
107
|
+
if (!Q.value) return;
|
|
100
108
|
const e4 = A(k2.pageContext, k2.configure);
|
|
101
109
|
"table" !== k2.configure.name && e4 && e4.isCalcHeight && C(() => {
|
|
102
110
|
var _a2;
|
|
103
|
-
if (!(((_a2 =
|
|
111
|
+
if (!(((_a2 = Q.value) == null ? void 0 : _a2.$el) || Q.value)) return;
|
|
104
112
|
const e5 = (o3 = 0) => {
|
|
105
|
-
if (!
|
|
106
|
-
let t2 =
|
|
113
|
+
if (!Q.value) return;
|
|
114
|
+
let t2 = Q.value.$el || Q.value;
|
|
107
115
|
if (!t2) return;
|
|
108
116
|
const n2 = t2.getBoundingClientRect();
|
|
109
|
-
null !==
|
|
117
|
+
null !== ne && Math.abs(n2.y - ne) < 1 ? te() : o3 < 10 ? (ne = n2.y, ie = setTimeout(() => {
|
|
110
118
|
e5(o3 + 1);
|
|
111
|
-
}, 50)) :
|
|
119
|
+
}, 50)) : te();
|
|
112
120
|
};
|
|
113
|
-
|
|
121
|
+
ne = null, e5();
|
|
114
122
|
});
|
|
115
123
|
}();
|
|
116
124
|
}
|
|
117
|
-
function
|
|
118
|
-
if (!
|
|
119
|
-
let e3 =
|
|
120
|
-
e3 || (e3 =
|
|
125
|
+
function te() {
|
|
126
|
+
if (!Q.value) return;
|
|
127
|
+
let e3 = Q.value.$el;
|
|
128
|
+
e3 || (e3 = Q.value);
|
|
121
129
|
const o2 = e3.parentNode;
|
|
122
130
|
if (!e3 || !o2) return;
|
|
123
131
|
const t2 = e3.getBoundingClientRect();
|
|
@@ -125,30 +133,30 @@ const k = e({ __name: "object-render", props: { pageContext: {}, configure: {} }
|
|
|
125
133
|
if ("tabs" === k2.configure.name && k2.pageContext.isDialog && !F()) {
|
|
126
134
|
const o3 = e3.closest(".runtime-page-container");
|
|
127
135
|
if (o3) {
|
|
128
|
-
const e4 = o3.getBoundingClientRect(),
|
|
129
|
-
n2 = e4.height -
|
|
136
|
+
const e4 = o3.getBoundingClientRect(), r2 = t2.y - e4.y;
|
|
137
|
+
n2 = e4.height - r2 - 30, i2 = n2 + "px";
|
|
130
138
|
}
|
|
131
139
|
} else $(n2) && (i2 = n2 + "px");
|
|
132
|
-
|
|
140
|
+
U.value.height = i2, U.value["overflow-y"] = "auto", U.value["overflow-x"] = "hidden", k2.configure.sytle || (k2.configure.sytle = {}), k2.configure.sytle._heightStyle = i2;
|
|
133
141
|
}
|
|
134
|
-
|
|
142
|
+
r(() => {
|
|
135
143
|
var _a2, _b2, _c2;
|
|
136
|
-
re(),
|
|
137
|
-
}),
|
|
144
|
+
re(), ee.countComponentsLoadedNumber(), ((_c2 = (_b2 = (_a2 = k2.configure.props) == null ? void 0 : _a2.base) == null ? void 0 : _b2.autoAnchorConditions) == null ? void 0 : _c2.length) > 0 && ee.setAutoAnchorComponentConditions(k2.configure.uuid, k2.configure.props.base.autoAnchorConditions);
|
|
145
|
+
}), s(() => {
|
|
138
146
|
var _a2;
|
|
139
|
-
|
|
147
|
+
ie && clearTimeout(ie), D && ((_a2 = k2.pageContext.hiddenNotValidatorCodes) == null ? void 0 : _a2.delete(D));
|
|
140
148
|
});
|
|
141
|
-
let
|
|
149
|
+
let ne = null, ie = null;
|
|
142
150
|
const re = () => {
|
|
143
|
-
if (!
|
|
144
|
-
let e3 =
|
|
145
|
-
e3 || (e3 =
|
|
151
|
+
if (!Q.value) return;
|
|
152
|
+
let e3 = Q.value.$el;
|
|
153
|
+
e3 || (e3 = Q.value);
|
|
146
154
|
const o2 = e3.parentNode;
|
|
147
155
|
if (!e3 || !o2) return;
|
|
148
156
|
const t2 = k2.configure.props ? k2.configure.props : {}, n2 = k2.configure.style ? k2.configure.style : {}, i2 = t2.position;
|
|
149
157
|
"top" == i2 || "bottom" == i2 || n2.position;
|
|
150
158
|
};
|
|
151
|
-
return (e3, o2) => a(
|
|
159
|
+
return (e3, o2) => a(W) && a(P)(e3.configure) ? u((g(), p(c(I.value), { key: 0, ref: oe, style: d(U.value), class: f(X.value), configure: e3.configure, pageContext: e3.pageContext }, null, 8, ["style", "class", "configure", "pageContext"])), [[m, a(z)]]) : l("", true);
|
|
152
160
|
} });
|
|
153
161
|
export {
|
|
154
162
|
k as default
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "super-page-runtime",
|
|
3
|
-
"version": "2.3.37-
|
|
3
|
+
"version": "2.3.37-sit2",
|
|
4
4
|
"description": "AgileBuilder super page runtime",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"main": "dist/es/index.js",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"@vitejs/plugin-vue-jsx": "^3.1.0",
|
|
50
50
|
"@vue/eslint-config-prettier": "^8.0.0",
|
|
51
51
|
"@vue/test-utils": "^2.4.4",
|
|
52
|
-
"agilebuilder-ui": "1.1.93-
|
|
52
|
+
"agilebuilder-ui": "1.1.93-sit2",
|
|
53
53
|
"axios": "^1.6.8",
|
|
54
54
|
"cypress": "^13.6.6",
|
|
55
55
|
"element-plus": "^2.6.1",
|