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.
- package/dist/es/components/runtime/utils/events/event-util.d.ts +1 -0
- package/dist/es/components/runtime/utils/events/event-util.js +147 -135
- package/dist/es/components/runtime/utils/events/standard-event.js +35 -35
- package/dist/es/components/runtime/utils/page-init-util.js +59 -52
- package/dist/es/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue2.js +39 -37
- package/dist/es/components/runtime/views/assemblys/object-render.vue.js +72 -71
- package/dist/es/components/runtime/views/super-page-dialog.vue.js +6 -6
- package/dist/es/components/runtime/views/super-page.vue.js +1 -1
- package/package.json +2 -2
|
@@ -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 {
|
|
10
|
-
import { usePageContextStore as
|
|
11
|
-
const
|
|
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
|
|
14
|
-
null ==
|
|
15
|
-
const
|
|
16
|
-
|
|
17
|
-
let
|
|
18
|
-
if (
|
|
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 =
|
|
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 (
|
|
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 =
|
|
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 (
|
|
32
|
-
const e4 =
|
|
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 =
|
|
35
|
-
if (n2.rawSate = n2.state, L(
|
|
36
|
-
const e5 =
|
|
37
|
-
if (false === (e5 == null ? void 0 : e5.canEdit))
|
|
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 =
|
|
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 =
|
|
44
|
-
t2 && false === t2.canEdit && (
|
|
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" ===
|
|
50
|
-
return N(
|
|
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
|
|
57
|
-
|
|
58
|
-
const
|
|
59
|
-
null ==
|
|
60
|
-
const
|
|
61
|
-
|
|
62
|
-
const
|
|
63
|
-
if (
|
|
64
|
-
Object.assign(
|
|
65
|
-
const e3 =
|
|
66
|
-
o2 && Object.assign(
|
|
67
|
-
const t2 =
|
|
68
|
-
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
|
|
71
|
-
function
|
|
72
|
-
if (
|
|
73
|
-
|
|
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
|
-
|
|
76
|
+
H.value = false;
|
|
76
77
|
}), e3 && !e3.getConfigure && (e3.getConfigure = function() {
|
|
77
|
-
return
|
|
78
|
-
}),
|
|
79
|
-
else if (
|
|
80
|
-
const e4 =
|
|
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(
|
|
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 =
|
|
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), _(
|
|
90
|
+
e4 = P(e4), _($2.pageContext, e4);
|
|
90
91
|
}
|
|
91
92
|
!function() {
|
|
92
|
-
if (!
|
|
93
|
-
const e4 = B(
|
|
94
|
-
"table" !==
|
|
95
|
-
let e5 =
|
|
96
|
-
e5 || (e5 =
|
|
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"),
|
|
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
|
|
106
|
+
let Q;
|
|
106
107
|
i(() => {
|
|
107
|
-
|
|
108
|
-
|
|
108
|
+
U(), I.countComponentsLoadedNumber(), Q = setTimeout(() => {
|
|
109
|
+
I.componentsTotalNmber !== I.componentsLoadedNumber || I.pageComponentsLoaded || I.setPageComponentsLoaded(true);
|
|
109
110
|
}, 100);
|
|
110
111
|
}), s(() => {
|
|
111
|
-
|
|
112
|
+
Q && clearTimeout(Q);
|
|
112
113
|
});
|
|
113
|
-
const
|
|
114
|
-
if (!
|
|
115
|
-
let e3 =
|
|
116
|
-
e3 || (e3 =
|
|
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 =
|
|
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 && (
|
|
125
|
+
"top" == i2 && (z.value.top = e4.top + "px"), "bottom" == i2 && (z.value.bottom = "10px");
|
|
125
126
|
}
|
|
126
127
|
const n3 = e3.getBoundingClientRect();
|
|
127
|
-
|
|
128
|
-
} else if (n2.position && (
|
|
129
|
-
if (!
|
|
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
|
-
|
|
132
|
+
z.value.width = o3.width + "px";
|
|
132
133
|
}
|
|
133
|
-
n2.left && (
|
|
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(
|
|
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
|
-
|
|
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
|
|
3
|
-
const d = ["src"],
|
|
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),
|
|
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,
|
|
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 =
|
|
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
|
|
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 -
|
|
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.
|
|
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.
|
|
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",
|