super-page-runtime 2.3.32 → 2.3.33-cdn1
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 +138 -126
- package/dist/es/components/runtime/utils/page-init-util.js +36 -36
- package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue.js +9 -8
- package/dist/es/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue2.js +22 -22
- package/dist/es/components/runtime/views/assemblys/form/select/select-runtime.vue.js +4 -1
- package/dist/es/components/runtime/views/assemblys/form/select/select-runtime.vue2.js +88 -74
- package/dist/es/components/runtime/views/assemblys/workflow/extract-workflow/extract-workflow-runtime.vue.js +1 -1
- package/dist/es/components/runtime/views/assemblys/workflow/extract-workflow/extract-workflow-runtime.vue2.js +32 -27
- package/dist/es/components/runtime/views/super-page-dialog.vue.js +10 -10
- package/dist/es/style.css +20 -1
- package/package.json +2 -2
|
@@ -30,6 +30,7 @@ export declare function getHandleEvent($event: any, pageContext: PageContext, co
|
|
|
30
30
|
export declare function getTableUuid(pageContext: PageContext, configure: Component): any;
|
|
31
31
|
export declare function handleEventByEventName(pageContext: PageContext, configure: Component, eventName: string, otherParams?: object): any;
|
|
32
32
|
export declare function doSuffixOrPrefixClickEvent($event: any, pageContext: PageContext, configure: Component, eventType: any, otherParams?: object): void;
|
|
33
|
+
export declare function getDefaultEventParams($event: any, pageContext: PageContext, configure: Component, otherParams?: object): {};
|
|
33
34
|
export declare function doBeforeClickEvent(pageContext: PageContext, configure: Component, otherParams?: object): any;
|
|
34
35
|
/**
|
|
35
36
|
* TODO: 跳转页面功能
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { isMobileBrowser as e, isPromise as n } from "agilebuilder-ui/src/utils/common-util";
|
|
2
|
-
import { getAdditionalParamMap as t, standardEvents as
|
|
2
|
+
import { getAdditionalParamMap as t, standardEvents as o, judgeDataNumber as i, dealAfterOperate as r } from "./standard-event.js";
|
|
3
3
|
import { validateDataModelFunc as u } from "./validator-util.js";
|
|
4
4
|
import { getComponentRef as c, getComponentRefByCode as l } from "../global-refs.js";
|
|
5
5
|
import { ElMessage as a } from "element-plus";
|
|
@@ -16,14 +16,25 @@ function x(e2, n2) {
|
|
|
16
16
|
return e3.forEach((e4) => {
|
|
17
17
|
if (!e4.isStandard && e4.jsContent) if ("customFunc" === e4.name) {
|
|
18
18
|
let t3 = null;
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
19
|
+
try {
|
|
20
|
+
if (e4.funcParam) {
|
|
21
|
+
const n4 = e4.funcParam.split(",");
|
|
22
|
+
t3 = new Function(n4, e4.jsContent);
|
|
23
|
+
} else t3 = new Function(e4.jsContent);
|
|
24
|
+
n3[e4.eventName] = t3;
|
|
25
|
+
} catch (n4) {
|
|
26
|
+
const t4 = `自定义方法${e4.eventName}解析失败,请检查函数体是否正确`;
|
|
27
|
+
console.error(t4, n4), a.error(t4);
|
|
28
|
+
}
|
|
24
29
|
} else {
|
|
25
30
|
let t3 = e4.componentUuid + "_";
|
|
26
|
-
t3 += e4.name
|
|
31
|
+
t3 += e4.name;
|
|
32
|
+
try {
|
|
33
|
+
n3[t3] = new Function("params", e4.jsContent);
|
|
34
|
+
} catch (n4) {
|
|
35
|
+
let t4 = "";
|
|
36
|
+
e4.title && (t4 += e4.title + "的"), e4.label && (t4 += e4.label), t4 += "事件解析失败,请检查事件函数体是否正确", a.error(t4), console.error(t4, n4);
|
|
37
|
+
}
|
|
27
38
|
}
|
|
28
39
|
}), n3;
|
|
29
40
|
}(e2.customEvents);
|
|
@@ -70,154 +81,154 @@ function O(e2) {
|
|
|
70
81
|
});
|
|
71
82
|
}
|
|
72
83
|
}
|
|
73
|
-
function h(e2, n2, t2,
|
|
74
|
-
return w(e2, n2, t2,
|
|
84
|
+
function h(e2, n2, t2, o2, i2) {
|
|
85
|
+
return w(e2, n2, t2, o2, true, i2, false);
|
|
75
86
|
}
|
|
76
|
-
function
|
|
87
|
+
function y(e2, n2, t2, o2, i2) {
|
|
77
88
|
var _a, _b;
|
|
78
|
-
if (
|
|
89
|
+
if (o2 && "change" === o2) {
|
|
79
90
|
const e3 = n2.subTableWatchProps;
|
|
80
91
|
if (e3) for (const n3 in e3) {
|
|
81
|
-
const
|
|
82
|
-
|
|
92
|
+
const o3 = e3[n3], i3 = (_b = (_a = t2.props) == null ? void 0 : _a.base) == null ? void 0 : _b.prop;
|
|
93
|
+
o3 && o3.indexOf(i3) >= 0 && g.$emit("_refreshSubTable_" + n3, { propName: i3 });
|
|
83
94
|
}
|
|
84
95
|
}
|
|
85
|
-
return w(e2, n2, t2,
|
|
96
|
+
return w(e2, n2, t2, o2, true, i2, true);
|
|
86
97
|
}
|
|
87
|
-
function
|
|
88
|
-
return
|
|
98
|
+
function E(e2, n2, t2, o2) {
|
|
99
|
+
return y(e2, n2, t2, "afterInit", o2);
|
|
89
100
|
}
|
|
90
|
-
function N(e2, n2, t2,
|
|
91
|
-
return w(e2, n2, t2,
|
|
101
|
+
function N(e2, n2, t2, o2, i2) {
|
|
102
|
+
return w(e2, n2, t2, o2, false, i2, false);
|
|
92
103
|
}
|
|
93
|
-
function w(e2, t2,
|
|
94
|
-
const a2 =
|
|
104
|
+
function w(e2, t2, o2, r2, u2, c2, l2) {
|
|
105
|
+
const a2 = o2 && o2.runtime && o2.runtime.events ? o2.runtime.events : [];
|
|
95
106
|
let s2;
|
|
96
107
|
if (l2 || !function(e3) {
|
|
97
108
|
return e3 && S.indexOf(e3) >= 0;
|
|
98
109
|
}(r2)) {
|
|
99
|
-
if (s2 =
|
|
100
|
-
return
|
|
110
|
+
if (s2 = $(t2, a2, r2), u2) {
|
|
111
|
+
return z(t2, o2, s2, R(t2, o2, e2, c2));
|
|
101
112
|
}
|
|
102
113
|
return s2;
|
|
103
114
|
}
|
|
104
|
-
!function(e3, t3,
|
|
105
|
-
const r3 =
|
|
115
|
+
!function(e3, t3, o3) {
|
|
116
|
+
const r3 = i(t3, o3.ids);
|
|
106
117
|
if (!r3) return;
|
|
107
118
|
if (void 0 !== e3.canClick && false === e3.canClick) return;
|
|
108
|
-
Q(
|
|
109
|
-
if (true ===
|
|
119
|
+
Q(o3).then((i2) => {
|
|
120
|
+
if (true === i2.canExecute) {
|
|
110
121
|
e3.clickUuid = t3.uuid, e3.canClick = false;
|
|
111
|
-
const
|
|
122
|
+
const i3 = t3.runtime && t3.runtime.events ? t3.runtime.events : [], r4 = $(e3, i3, "beforeValidateForm");
|
|
112
123
|
let u3;
|
|
113
|
-
if (r4 && (u3 =
|
|
124
|
+
if (r4 && (u3 = z(e3, t3, r4, o3)), void 0 === u3 && (u3 = true), !u3) return void (e3.canClick = true);
|
|
114
125
|
n(u3) ? u3.then((n2) => {
|
|
115
|
-
n2 && true === n2 ? T(e3, t3,
|
|
126
|
+
n2 && true === n2 ? T(e3, t3, o3) : e3.canClick = true;
|
|
116
127
|
}).catch((n2) => {
|
|
117
128
|
e3.canClick = true;
|
|
118
|
-
}) : T(e3, t3,
|
|
129
|
+
}) : T(e3, t3, o3);
|
|
119
130
|
}
|
|
120
131
|
});
|
|
121
|
-
}(t2,
|
|
132
|
+
}(t2, o2, U(e2, t2, o2, c2));
|
|
122
133
|
}
|
|
123
134
|
const S = ["click", "suffixClick", "prefixClick", "menuClick"];
|
|
124
135
|
function P(e2, n2) {
|
|
125
136
|
return n2.props.base.tableUuid ? n2.props.base.tableUuid : e2.tableUuids && e2.tableUuids.length > 0 ? e2.tableUuids[0] : null;
|
|
126
137
|
}
|
|
127
|
-
function R(e2, n2, t2,
|
|
128
|
-
const
|
|
129
|
-
if (
|
|
130
|
-
return null != t2 && (
|
|
138
|
+
function R(e2, n2, t2, o2) {
|
|
139
|
+
const i2 = {};
|
|
140
|
+
if (o2) for (const e3 in o2) i2[e3] = o2[e3];
|
|
141
|
+
return null != t2 && (i2._value = t2), e2 && (i2.pageContext = e2), n2 && (i2.configureObj = n2), i2;
|
|
131
142
|
}
|
|
132
|
-
function T(e2, t2,
|
|
133
|
-
const
|
|
143
|
+
function T(e2, t2, o2) {
|
|
144
|
+
const i2 = t2.runtime && t2.runtime.events ? t2.runtime.events : [];
|
|
134
145
|
let r2 = true;
|
|
135
|
-
(
|
|
136
|
-
const c2 =
|
|
146
|
+
(o2 == null ? void 0 : o2.skipValidate) && (r2 = false);
|
|
147
|
+
const c2 = H(e2, i2, "click");
|
|
137
148
|
if (c2) {
|
|
138
149
|
const e3 = function(e4, n2) {
|
|
139
150
|
return e4 && v.includes(n2.eventName);
|
|
140
151
|
}(c2.isStandard, c2.event);
|
|
141
152
|
e3 && (r2 = false);
|
|
142
153
|
}
|
|
143
|
-
u(e2, t2, r2).then((
|
|
144
|
-
if (!
|
|
145
|
-
const r3 = D(e2, t2,
|
|
154
|
+
u(e2, t2, r2).then((i3) => {
|
|
155
|
+
if (!i3) return void (e2.canClick = true);
|
|
156
|
+
const r3 = D(e2, t2, o2);
|
|
146
157
|
r3 ? n(r3) ? r3.then((n2) => {
|
|
147
|
-
n2 ? A(e2, t2, c2,
|
|
158
|
+
n2 ? A(e2, t2, c2, o2) : e2.canClick = true;
|
|
148
159
|
}).catch((n2) => {
|
|
149
160
|
console.error(n2), e2.canClick = true;
|
|
150
|
-
}) : A(e2, t2, c2,
|
|
161
|
+
}) : A(e2, t2, c2, o2) : e2.canClick = true;
|
|
151
162
|
}).catch((n2) => {
|
|
152
163
|
console.error(n2), e2.canClick = true;
|
|
153
164
|
});
|
|
154
165
|
}
|
|
155
|
-
function F(e2, n2, t2,
|
|
156
|
-
const r2 = U(e2, n2, t2,
|
|
157
|
-
A(n2, t2,
|
|
166
|
+
function F(e2, n2, t2, o2, i2) {
|
|
167
|
+
const r2 = U(e2, n2, t2, i2);
|
|
168
|
+
A(n2, t2, H(n2, t2.runtime && t2.runtime.events ? t2.runtime.events : [], o2), r2);
|
|
158
169
|
}
|
|
159
|
-
function U(e2, n2, t2,
|
|
160
|
-
const
|
|
170
|
+
function U(e2, n2, t2, o2) {
|
|
171
|
+
const i2 = n2.code, r2 = n2.version, u2 = P(n2, t2);
|
|
161
172
|
if (u2) {
|
|
162
173
|
const e3 = c(n2, u2), t3 = e3 ? e3.getSelections() : null, l2 = e3 ? e3.getSelectionIds() : null;
|
|
163
|
-
|
|
164
|
-
_(n2) && (
|
|
174
|
+
o2 || (o2 = {}), o2.tableUuid = u2, o2.listCode = f(i2, r2, u2);
|
|
175
|
+
_(n2) && (o2.selections = t3, o2.id = l2 && l2.length > 0 ? l2[0] : null, o2.ids = l2);
|
|
165
176
|
const a2 = e3 ? e3.getTableConfigure() : null;
|
|
166
|
-
|
|
177
|
+
o2.tableConfigure = a2;
|
|
167
178
|
}
|
|
168
|
-
return R(n2, t2, e2,
|
|
179
|
+
return R(n2, t2, e2, o2);
|
|
169
180
|
}
|
|
170
181
|
function D(e2, n2, t2) {
|
|
171
|
-
const
|
|
172
|
-
let
|
|
173
|
-
return
|
|
182
|
+
const o2 = $(e2, n2.runtime && n2.runtime.events ? n2.runtime.events : [], "beforeClick");
|
|
183
|
+
let i2;
|
|
184
|
+
return o2 && (i2 = z(e2, n2, o2, null, t2)), void 0 === i2 || i2;
|
|
174
185
|
}
|
|
175
186
|
function L(e2, n2, t2) {
|
|
176
|
-
const
|
|
177
|
-
g.$emit(
|
|
187
|
+
const o2 = e2.code + "_";
|
|
188
|
+
g.$emit(o2 + "open-dialog", { pageContext: e2, configureObj: n2, eventParams: t2 });
|
|
178
189
|
}
|
|
179
190
|
function _(e2, n2) {
|
|
180
191
|
return !(!e2.pageType || "list" !== e2.pageType);
|
|
181
192
|
}
|
|
182
|
-
function V(e2, t2,
|
|
183
|
-
const
|
|
193
|
+
function V(e2, t2, o2) {
|
|
194
|
+
const i2 = t2.runtime && t2.runtime.events ? t2.runtime.events : [], r2 = $(e2, i2, "afterClick");
|
|
184
195
|
if (r2) {
|
|
185
|
-
const
|
|
186
|
-
n(
|
|
196
|
+
const i3 = z(e2, t2, r2, null, o2);
|
|
197
|
+
n(i3) ? i3.finally(() => {
|
|
187
198
|
e2.canClick = true;
|
|
188
199
|
}) : e2.canClick = true;
|
|
189
200
|
} else e2.canClick = true;
|
|
190
201
|
}
|
|
191
|
-
function q(e2, n2, t2,
|
|
192
|
-
|
|
193
|
-
const c2 =
|
|
194
|
-
c2 &&
|
|
202
|
+
function q(e2, n2, t2, o2, i2, u2) {
|
|
203
|
+
o2 ? (e2.result = i2, e2.canClick = true) : r(e2, n2, i2, "", u2);
|
|
204
|
+
const c2 = $(e2, n2.runtime && n2.runtime.events ? n2.runtime.events : [], "afterClick");
|
|
205
|
+
c2 && z(e2, n2, c2, t2);
|
|
195
206
|
}
|
|
196
|
-
function A(e2, t2,
|
|
207
|
+
function A(e2, t2, o2, i2) {
|
|
197
208
|
let r2 = t2, u2 = t2.props.linkPage;
|
|
198
209
|
if (u2 && u2 instanceof Array) {
|
|
199
210
|
const n2 = function(e3) {
|
|
200
211
|
let n3 = e3 ? e3.row : null;
|
|
201
212
|
n3 || (n3 = e3 && e3.selections && e3.selections.length > 0 ? e3.selections[0] : null);
|
|
202
213
|
return n3;
|
|
203
|
-
}(
|
|
214
|
+
}(i2), o3 = d(e2, t2, u2, n2);
|
|
204
215
|
let c2, l2 = false;
|
|
205
|
-
|
|
216
|
+
o3 && (l2 = o3.show, c2 = l2 ? o3.toPage : null), u2 = c2 ? c2.linkPage : null, u2 && (r2 = m(t2), r2.props.linkPage = u2);
|
|
206
217
|
}
|
|
207
|
-
u2 && u2.jumpPageUrl ? (e2.canClick = true, L(e2, r2,
|
|
208
|
-
const r3 =
|
|
218
|
+
u2 && u2.jumpPageUrl ? (e2.canClick = true, L(e2, r2, i2)) : function(e3, t3, o3, i3) {
|
|
219
|
+
const r3 = o3, u3 = _(e3);
|
|
209
220
|
if (r3) {
|
|
210
|
-
const
|
|
221
|
+
const o4 = r3.func, c2 = r3.isStandard, l2 = r3.event, a2 = z(e3, t3, o4, i3);
|
|
211
222
|
if (function(e4, n2) {
|
|
212
223
|
return e4 && ("exportForm" === n2.eventName || "exportPDF" === n2.eventName || "import" === n2.eventName || "assign" === n2.eventName || "copyTask" === n2.eventName || "addSigner" === n2.eventName || "returnTaskTo" === n2.eventName || "removeSigner" === n2.eventName || "saveQueryCharts" === n2.eventName || "addTransactor" === n2.eventName || "removeTransactor" === n2.eventName);
|
|
213
224
|
}(c2, l2)) return void (e3.canClick = true);
|
|
214
225
|
n(a2) ? a2.then((n2) => {
|
|
215
|
-
n2 ? q(e3, t3,
|
|
226
|
+
n2 ? q(e3, t3, i3, c2, n2, u3) : e3.canClick = true;
|
|
216
227
|
}).catch((n2) => {
|
|
217
228
|
console.error(n2), e3.canClick = true;
|
|
218
|
-
}) : q(e3, t3,
|
|
219
|
-
} else q(e3, t3,
|
|
220
|
-
}(e2, t2,
|
|
229
|
+
}) : q(e3, t3, i3, c2, a2, u3);
|
|
230
|
+
} else q(e3, t3, i3, false, null, u3);
|
|
231
|
+
}(e2, t2, o2, i2);
|
|
221
232
|
}
|
|
222
233
|
function I(e2, n2) {
|
|
223
234
|
const t2 = e2.customEvents;
|
|
@@ -226,16 +237,16 @@ function I(e2, n2) {
|
|
|
226
237
|
return e3 = "object" == typeof n2 ? n2.componentUuid + "_" + n2.name : n2, t2[e3];
|
|
227
238
|
}
|
|
228
239
|
}
|
|
229
|
-
function
|
|
240
|
+
function $(e2, n2, t2) {
|
|
230
241
|
if (n2 && t2) {
|
|
231
|
-
const
|
|
232
|
-
if (
|
|
233
|
-
const n3 =
|
|
234
|
-
return n3.isStandard ?
|
|
242
|
+
const i2 = n2.filter((e3) => e3.name === t2);
|
|
243
|
+
if (i2 && i2.length > 0) {
|
|
244
|
+
const n3 = i2[0];
|
|
245
|
+
return n3.isStandard ? o[n3.eventName] : I(e2, n3);
|
|
235
246
|
}
|
|
236
247
|
}
|
|
237
248
|
}
|
|
238
|
-
function
|
|
249
|
+
function B(e2, n2) {
|
|
239
250
|
if (e2 && n2) {
|
|
240
251
|
const t2 = e2.filter((e3) => e3.name === n2);
|
|
241
252
|
if (t2 && t2.length > 0) {
|
|
@@ -243,40 +254,40 @@ function $(e2, n2) {
|
|
|
243
254
|
}
|
|
244
255
|
}
|
|
245
256
|
}
|
|
246
|
-
function
|
|
257
|
+
function H(e2, n2, t2) {
|
|
247
258
|
if (n2 && t2) {
|
|
248
|
-
const
|
|
249
|
-
if (
|
|
250
|
-
const n3 =
|
|
251
|
-
return n3.isStandard ? { func:
|
|
259
|
+
const i2 = n2.filter((e3) => e3.name === t2);
|
|
260
|
+
if (i2 && i2.length > 0) {
|
|
261
|
+
const n3 = i2[0];
|
|
262
|
+
return n3.isStandard ? { func: o[n3.eventName], isStandard: true, event: n3 } : { func: I(e2, n3), isStandard: false, event: n3 };
|
|
252
263
|
}
|
|
253
264
|
}
|
|
254
265
|
}
|
|
255
|
-
function
|
|
266
|
+
function z(e2, n2, t2, o2, i2) {
|
|
256
267
|
if (t2) {
|
|
257
|
-
if (
|
|
258
|
-
return t2.apply(t2, [
|
|
268
|
+
if (o2 || (o2 = { pageContext: e2, configureObj: n2 }), i2 && o2) for (const e3 in i2) o2[e3] = i2[e3];
|
|
269
|
+
return t2.apply(t2, [o2]);
|
|
259
270
|
}
|
|
260
271
|
}
|
|
261
272
|
function Q(e2) {
|
|
262
|
-
const n2 = e2.pageContext,
|
|
273
|
+
const n2 = e2.pageContext, o2 = e2.configureObj, i2 = _(n2);
|
|
263
274
|
let r2 = [];
|
|
264
|
-
if (
|
|
275
|
+
if (i2) n2.editData ? r2.push(n2.editData) : r2 = e2.selections;
|
|
265
276
|
else {
|
|
266
277
|
const e3 = n2.entity.data;
|
|
267
278
|
r2.push(e3);
|
|
268
279
|
}
|
|
269
|
-
const u2 =
|
|
270
|
-
return new Promise((e3,
|
|
280
|
+
const u2 = o2.props.base.condition;
|
|
281
|
+
return new Promise((e3, o3) => {
|
|
271
282
|
if (null == u2 || "" === u2 || null == r2 || 0 === r2.length) e3({ canExecute: true });
|
|
272
283
|
else {
|
|
273
|
-
const
|
|
284
|
+
const o4 = n2.entity.context, i3 = t(n2), c2 = true, l2 = n2.tableName;
|
|
274
285
|
let f2, m2, g2 = true;
|
|
275
286
|
for (let e4 = 0; e4 < r2.length; e4++) {
|
|
276
287
|
const t2 = r2[e4];
|
|
277
288
|
for (let e5 = 0; e5 < u2.length; e5++) {
|
|
278
289
|
const r3 = u2[e5], a2 = r3.toolTips, p2 = r3.conditionList;
|
|
279
|
-
if (!s(p2, t2,
|
|
290
|
+
if (!s(p2, t2, i3, o4, c2, l2, null, n2)) {
|
|
280
291
|
g2 = false, f2 = a2, m2 = t2;
|
|
281
292
|
break;
|
|
282
293
|
}
|
|
@@ -286,33 +297,33 @@ function Q(e2) {
|
|
|
286
297
|
}
|
|
287
298
|
});
|
|
288
299
|
}
|
|
289
|
-
function W(e2, n2, t2,
|
|
290
|
-
var
|
|
291
|
-
n2 && (G("loadBeforeSend", N(null, (
|
|
300
|
+
function W(e2, n2, t2, o2) {
|
|
301
|
+
var i2;
|
|
302
|
+
n2 && (G("loadBeforeSend", N(null, (i2 = { pageContext: t2, configureObj: o2 }).pageContext, i2.configureObj, "beforeListLoad", i2), e2), G("beforeRequest", function(e3) {
|
|
292
303
|
return N(null, e3.pageContext, e3.configureObj, "beforeRequest", e3);
|
|
293
|
-
}({ pageContext: t2, configureObj:
|
|
304
|
+
}({ pageContext: t2, configureObj: o2 }), e2), G("gridDataLoaded", function(e3) {
|
|
294
305
|
return N(null, e3.pageContext, e3.configureObj, "onListLoad", e3);
|
|
295
|
-
}({ pageContext: t2, configureObj:
|
|
306
|
+
}({ pageContext: t2, configureObj: o2 }), e2), G("gridComplete", function(e3) {
|
|
296
307
|
return N(null, e3.pageContext, e3.configureObj, "afterListLoad", e3);
|
|
297
|
-
}({ pageContext: t2, configureObj:
|
|
308
|
+
}({ pageContext: t2, configureObj: o2 }), e2), G("resizeHeight", function(e3) {
|
|
298
309
|
return N(null, e3.pageContext, e3.configureObj, "resizeTableHeight", e3);
|
|
299
|
-
}({ pageContext: t2, configureObj:
|
|
310
|
+
}({ pageContext: t2, configureObj: o2 }), e2), e2.lineEditOptions || (e2.lineEditOptions = {}), G("beforeInsertRow", function(e3) {
|
|
300
311
|
return N(null, e3.pageContext, e3.configureObj, "beforeAddRow", e3);
|
|
301
|
-
}({ pageContext: t2, configureObj:
|
|
312
|
+
}({ pageContext: t2, configureObj: o2 }), e2.lineEditOptions), G("afterInsertRow", function(e3) {
|
|
302
313
|
return N(null, e3.pageContext, e3.configureObj, "afterAddRow", e3);
|
|
303
|
-
}({ pageContext: t2, configureObj:
|
|
314
|
+
}({ pageContext: t2, configureObj: o2 }), e2.lineEditOptions), G("beforeDelete", function(e3) {
|
|
304
315
|
return N(null, e3.pageContext, e3.configureObj, "beforeRemoveRow", e3);
|
|
305
|
-
}({ pageContext: t2, configureObj:
|
|
316
|
+
}({ pageContext: t2, configureObj: o2 }), e2.lineEditOptions), G("afterDelete", function(e3) {
|
|
306
317
|
return N(null, e3.pageContext, e3.configureObj, "afterRemoveRow", e3);
|
|
307
|
-
}({ pageContext: t2, configureObj:
|
|
318
|
+
}({ pageContext: t2, configureObj: o2 }), e2.lineEditOptions), G("beforeEdit", function(e3) {
|
|
308
319
|
return N(null, e3.pageContext, e3.configureObj, "beforeEdit", e3);
|
|
309
|
-
}({ pageContext: t2, configureObj:
|
|
320
|
+
}({ pageContext: t2, configureObj: o2 }), e2.lineEditOptions), G("beforeRestore", function(e3) {
|
|
310
321
|
return N(null, e3.pageContext, e3.configureObj, "beforeRestore", e3);
|
|
311
|
-
}({ pageContext: t2, configureObj:
|
|
322
|
+
}({ pageContext: t2, configureObj: o2 }), e2.lineEditOptions), G("beforeRestoreValidate", function(e3) {
|
|
312
323
|
return N(null, e3.pageContext, e3.configureObj, "beforeRestoreValidate", e3);
|
|
313
|
-
}({ pageContext: t2, configureObj:
|
|
324
|
+
}({ pageContext: t2, configureObj: o2 }), e2.lineEditOptions), function(e3, n3, t3) {
|
|
314
325
|
n3 && (t3[e3] = n3);
|
|
315
|
-
}("filterDataEvent", N(null, t2,
|
|
326
|
+
}("filterDataEvent", N(null, t2, o2, "filter-data", { pageContext: t2, configureObj: o2 }), e2));
|
|
316
327
|
}
|
|
317
328
|
function G(e2, n2, t2) {
|
|
318
329
|
n2 && (t2[e2] = n2);
|
|
@@ -344,7 +355,7 @@ function ne(e2, n2, t2) {
|
|
|
344
355
|
function te(e2) {
|
|
345
356
|
return N(null, e2.pageContext, e2.configureObj, "before-upload", e2);
|
|
346
357
|
}
|
|
347
|
-
function
|
|
358
|
+
function oe(n2) {
|
|
348
359
|
let t2 = true;
|
|
349
360
|
if (!e()) {
|
|
350
361
|
const e2 = n2 && n2.events ? n2.events : [];
|
|
@@ -355,19 +366,19 @@ function ie(n2) {
|
|
|
355
366
|
}
|
|
356
367
|
return t2;
|
|
357
368
|
}
|
|
358
|
-
function
|
|
359
|
-
return
|
|
369
|
+
function ie(e2, n2, t2, o2, i2) {
|
|
370
|
+
return z(e2, n2, $(e2, n2 && n2.runtime && n2.runtime.events ? n2.runtime.events : [], t2), { configure: n2, pageContext: e2, chartOption: o2, ...i2 });
|
|
360
371
|
}
|
|
361
372
|
function re(n2, t2) {
|
|
362
|
-
let
|
|
373
|
+
let o2 = true;
|
|
363
374
|
if (e()) {
|
|
364
|
-
const e2 =
|
|
375
|
+
const e2 = H(n2, t2 && t2.runtime && t2.runtime.events ? t2.runtime.events : [], "click");
|
|
365
376
|
if (e2) {
|
|
366
|
-
const n3 = e2.isStandard, t3 = e2.event,
|
|
367
|
-
n3 &&
|
|
377
|
+
const n3 = e2.isStandard, t3 = e2.event, i2 = navigator ? navigator.userAgent : null;
|
|
378
|
+
n3 && i2 && (i2.indexOf("Html5Plus") > 0 ? (b.includes(t3.eventName) || C.includes(t3.eventName)) && (o2 = false) : C.includes(t3.eventName) && (o2 = false));
|
|
368
379
|
}
|
|
369
380
|
}
|
|
370
|
-
return
|
|
381
|
+
return o2;
|
|
371
382
|
}
|
|
372
383
|
export {
|
|
373
384
|
j as appendDefaultMethods,
|
|
@@ -379,22 +390,23 @@ export {
|
|
|
379
390
|
L as doClickJumpPageEvent,
|
|
380
391
|
F as doSuffixOrPrefixClickEvent,
|
|
381
392
|
te as fileUploadBeforeUpload,
|
|
382
|
-
|
|
393
|
+
H as getClickEventFuncByType,
|
|
383
394
|
k as getCustomFunc,
|
|
384
|
-
|
|
385
|
-
$ as
|
|
395
|
+
U as getDefaultEventParams,
|
|
396
|
+
$ as getEventFuncByType,
|
|
397
|
+
B as getEventNameByType,
|
|
386
398
|
N as getHandleEvent,
|
|
387
399
|
P as getTableUuid,
|
|
388
400
|
K as gridSelectAllRecords,
|
|
389
401
|
J as gridSelectRecord,
|
|
390
402
|
M as gridSelectionChange,
|
|
391
|
-
|
|
392
|
-
|
|
403
|
+
E as handleAfterInitEvent,
|
|
404
|
+
ie as handleChartEvent,
|
|
393
405
|
h as handleEvent,
|
|
394
|
-
|
|
406
|
+
y as handleFormEvent,
|
|
395
407
|
ne as headerClick,
|
|
396
408
|
x as initPageEvents,
|
|
397
|
-
|
|
409
|
+
oe as isShowComponent,
|
|
398
410
|
re as isShowMobileEvent,
|
|
399
411
|
O as removeCustomFuncFromWindow,
|
|
400
412
|
Z as rowClick,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import e from "agilebuilder-ui/src/utils/request";
|
|
2
2
|
import { getAdditionalParamMap as t } from "./events/standard-event.js";
|
|
3
3
|
import { PageDimensions as n } from "./interfaces/page-design-types.js";
|
|
4
|
-
import { getFormPropName as i, getVariableValue as
|
|
4
|
+
import { getFormPropName as i, getVariableValue as s, formatVariableValue as r, setVariableValue as o } from "./page-helper-util.js";
|
|
5
5
|
import { getSessionCache as a } from "agilebuilder-ui/src/utils/auth";
|
|
6
6
|
import { functions as l } from "./api/page-expose-util.js";
|
|
7
|
-
import { isWorkflowPage as
|
|
7
|
+
import { isWorkflowPage as u, deepCopy as p } from "./common-util.js";
|
|
8
8
|
import { packageCustomValidator as d } from "./events/validator-util.js";
|
|
9
9
|
import { isMobileBrowser as c } from "agilebuilder-ui/src/utils/common-util";
|
|
10
10
|
function f(t2) {
|
|
@@ -24,8 +24,8 @@ function f(t2) {
|
|
|
24
24
|
}
|
|
25
25
|
function m(e2, t2) {
|
|
26
26
|
return new Promise((n2, i2) => {
|
|
27
|
-
e2 ? b().then((
|
|
28
|
-
|
|
27
|
+
e2 ? b().then((s2) => {
|
|
28
|
+
s2 && (e2.systemParam = h(s2)), e2.tableRuntimes && Object.keys(e2.tableRuntimes).length > 0 ? x(e2, t2, e2.systemVersion).then((t3) => {
|
|
29
29
|
e2.contextParam = h(t3.contextParam), e2.branchFieldAuth = t3.branchFieldAuth, e2.isWorkflowEntity = t3.isWorkflowEntity, e2.dataTypeMaps = t3.dataTypeMaps, e2.superGridItems = t3.superGrids, n2(e2);
|
|
30
30
|
}).catch((e3) => {
|
|
31
31
|
i2(e3);
|
|
@@ -60,7 +60,7 @@ function y(e2) {
|
|
|
60
60
|
if (c()) {
|
|
61
61
|
e3.entity.page._isMobile = "true";
|
|
62
62
|
const t3 = navigator ? navigator.userAgent : null;
|
|
63
|
-
t3 ? t3.indexOf("
|
|
63
|
+
t3 ? t3.indexOf("Html5Plus") > 0 ? (e3.entity.page._isMobileApp = "true", e3.entity.page._isMobileBrowser = "false") : (e3.entity.page._isMobileApp = "false", e3.entity.page._isMobileBrowser = "true") : (e3.entity.page._isMobileApp = "false", e3.entity.page._isMobileBrowser = "false");
|
|
64
64
|
} else e3.entity.page._isMobile = "false";
|
|
65
65
|
}(t2), Object.assign(t2, e2), t2.isWorkflowEntity = void 0 !== ((_b = e2.props) == null ? void 0 : _b.activeWorkflow) ? (_c = e2.props) == null ? void 0 : _c.activeWorkflow : e2.isWorkflowEntity, t2.dimensions = function() {
|
|
66
66
|
const e3 = window.outerWidth;
|
|
@@ -138,27 +138,27 @@ function C(e2, t2) {
|
|
|
138
138
|
function k(e2, t2) {
|
|
139
139
|
let n2, i2 = t2;
|
|
140
140
|
t2 || (n2 = e2.props.base ? e2.props.base : {}, i2 = n2.prop);
|
|
141
|
-
let
|
|
142
|
-
return t2 && !t2.startsWith("${") ?
|
|
141
|
+
let s2 = null;
|
|
142
|
+
return t2 && !t2.startsWith("${") ? s2 = ["data", t2] : !e2 || i2 && i2.startsWith("${") ? i2.startsWith("${") ? (i2 = i2.substring(2, i2.length - 1), s2 = i2.split("."), e2 && s2.length < 2 && (s2 = [e2.uuid])) : e2 && (s2 = ["page", e2.uuid]) : s2 = ["page", e2.uuid], s2 || e2 ? s2 : ["temp"];
|
|
143
143
|
}
|
|
144
144
|
function A(e2, t2, n2) {
|
|
145
145
|
var _a, _b;
|
|
146
|
-
const i2 = k(t2, n2),
|
|
147
|
-
if (null ==
|
|
146
|
+
const i2 = k(t2, n2), r2 = e2.entity;
|
|
147
|
+
if (null == r2.data.ID && null == r2.data.id) {
|
|
148
148
|
let n3, o2, a2 = false;
|
|
149
149
|
t2 && (n3 = t2.props.base ? t2.props.base : {}, o2 = t2.name, a2 = n3.multiple);
|
|
150
|
-
const l2 =
|
|
150
|
+
const l2 = s(r2, i2);
|
|
151
151
|
if (null == l2) {
|
|
152
|
-
const
|
|
153
|
-
if (
|
|
154
|
-
const t3 = T(e2,
|
|
155
|
-
if (M(t3)) I(
|
|
152
|
+
const s2 = n3 ? n3.defaultValue : null, l3 = Boolean((_a = t2 == null ? void 0 : t2.runtime) == null ? void 0 : _a.arrayValue);
|
|
153
|
+
if (s2) try {
|
|
154
|
+
const t3 = T(e2, s2, o2, a2);
|
|
155
|
+
if (M(t3)) I(r2, i2, t3, l3);
|
|
156
156
|
else if (((_b = n3.moreDefaultValue) == null ? void 0 : _b.length) > 0) {
|
|
157
157
|
const t4 = n3.moreDefaultValue;
|
|
158
158
|
for (let n4 = 0; n4 < t4.length; n4++) {
|
|
159
|
-
const
|
|
160
|
-
if (M(
|
|
161
|
-
I(
|
|
159
|
+
const s3 = T(e2, t4[n4], o2, a2);
|
|
160
|
+
if (M(s3)) {
|
|
161
|
+
I(r2, i2, s3, l3);
|
|
162
162
|
break;
|
|
163
163
|
}
|
|
164
164
|
}
|
|
@@ -177,12 +177,12 @@ function I(e2, t2, n2, i2) {
|
|
|
177
177
|
!Array.isArray(n2) || i2 ? o(e2, t2, n2) : o(e2, t2, n2.join(","));
|
|
178
178
|
}
|
|
179
179
|
function T(e2, t2, n2, i2) {
|
|
180
|
-
let
|
|
181
|
-
if (t2 && (
|
|
180
|
+
let s2;
|
|
181
|
+
if (t2 && (s2 = r(e2, t2), null != s2 && null != s2 && n2)) {
|
|
182
182
|
let e3 = false;
|
|
183
|
-
"checkbox" == n2 ? e3 = true : "select" == n2 && (e3 = i2), e3 && (
|
|
183
|
+
"checkbox" == n2 ? e3 = true : "select" == n2 && (e3 = i2), e3 && (s2 = (s2 + "").split(","));
|
|
184
184
|
}
|
|
185
|
-
return
|
|
185
|
+
return s2;
|
|
186
186
|
}
|
|
187
187
|
function j(e2, t2) {
|
|
188
188
|
var _a, _b;
|
|
@@ -190,14 +190,14 @@ function j(e2, t2) {
|
|
|
190
190
|
const n2 = [];
|
|
191
191
|
if (e2.autoPermissions) for (const i2 of e2.autoPermissions) n2.push(t2.code + "." + i2.simpleCode);
|
|
192
192
|
if (e2.functionCodes) {
|
|
193
|
-
const i2 = e2.sourceTypes ? e2.sourceTypes : [],
|
|
194
|
-
for (let e3 = 0; e3 <
|
|
195
|
-
const
|
|
193
|
+
const i2 = e2.sourceTypes ? e2.sourceTypes : [], s2 = e2.functionCodes;
|
|
194
|
+
for (let e3 = 0; e3 < s2.length; e3++) {
|
|
195
|
+
const r2 = s2[e3], o2 = e3 < i2.length ? i2[e3] : "";
|
|
196
196
|
let a2 = "";
|
|
197
|
-
if ("service" == o2) a2 =
|
|
198
|
-
else if ("standard" === o2) a2 = t2.code + "." +
|
|
197
|
+
if ("service" == o2) a2 = r2;
|
|
198
|
+
else if ("standard" === o2) a2 = t2.code + "." + r2;
|
|
199
199
|
else {
|
|
200
|
-
a2 = "custom" === O(
|
|
200
|
+
a2 = "custom" === O(r2, t2).type ? r2 : t2.code + "." + r2;
|
|
201
201
|
}
|
|
202
202
|
n2.includes(a2) || n2.push(a2);
|
|
203
203
|
}
|
|
@@ -211,26 +211,26 @@ function O(e2, t2) {
|
|
|
211
211
|
}
|
|
212
212
|
return null;
|
|
213
213
|
}
|
|
214
|
-
function x(n2, i2,
|
|
215
|
-
const
|
|
214
|
+
function x(n2, i2, s2) {
|
|
215
|
+
const r2 = n2.tableRuntimes, o2 = t(i2);
|
|
216
216
|
let a2;
|
|
217
217
|
const l2 = n2.code;
|
|
218
|
-
return o2 && Object.keys(o2) > 0 && (a2 = JSON.stringify(o2)), e.post(window.$vueApp.config.globalProperties.baseAPI + "/component/super-page-design/super-grids", { tableRuntimes:
|
|
218
|
+
return o2 && Object.keys(o2) > 0 && (a2 = JSON.stringify(o2)), e.post(window.$vueApp.config.globalProperties.baseAPI + "/component/super-page-design/super-grids", { tableRuntimes: r2, additionalParamMapJson: a2, pageCode: l2, publishVersion: s2, pageType: n2.pageType });
|
|
219
219
|
}
|
|
220
220
|
const R = ["button-detail", "print-label"];
|
|
221
221
|
function _(e2, t2, n2) {
|
|
222
222
|
var _a, _b;
|
|
223
|
-
const
|
|
223
|
+
const s2 = t2.props && t2.props.base ? t2.props.base.prop : null, r2 = u(e2);
|
|
224
224
|
let o2 = false;
|
|
225
|
-
if (
|
|
225
|
+
if (r2 && R.indexOf(t2.name) < 0 && e2.fieldPermissionMap) {
|
|
226
226
|
const n3 = e2.fieldPermissionMap.get("all_fields");
|
|
227
227
|
false === (n3 == null ? void 0 : n3.canEdit) && ((_a = t2.runtime) == null ? void 0 : _a.props) && (t2.runtime.props.state = "disabled", o2 = true);
|
|
228
228
|
}
|
|
229
|
-
if (
|
|
230
|
-
const a2 = i(
|
|
229
|
+
if (s2) {
|
|
230
|
+
const a2 = i(s2);
|
|
231
231
|
if (e2.rules || (e2.rules = {}), t2.props.rules && t2.props.rules.length > 0 && (e2.rules[a2] || (e2.rules[a2] = []), t2.props.rules.forEach((e3) => {
|
|
232
232
|
d(e3), !n2 && e3 && e3.required && (e3.required = false);
|
|
233
|
-
}), e2.rules[a2] = t2.props.rules),
|
|
233
|
+
}), e2.rules[a2] = t2.props.rules), r2 && !o2 && "button-detail" !== t2.name && e2.fieldPermissionMap) {
|
|
234
234
|
const i2 = e2.fieldPermissionMap.get(a2);
|
|
235
235
|
if (!n2 && e2.workflowRules && (e2.workflowRules[a2] || e2.workflowRules.rules && e2.workflowRules.rules[a2])) {
|
|
236
236
|
let t3 = e2.workflowRules[a2];
|
|
@@ -255,7 +255,7 @@ function V(e2, t2) {
|
|
|
255
255
|
if (i2) if ("dynamicControlFormEdit" === n2) {
|
|
256
256
|
let n3 = i2.filter((e3) => "_all_fields" === e3.name || e3.name === t2);
|
|
257
257
|
if (n3 && n3.length > 0 && (n3 = n3.filter((e3) => "_all_fields" === e3.name), n3 && n3.length > 0)) {
|
|
258
|
-
const e3 =
|
|
258
|
+
const e3 = p(n3[0]);
|
|
259
259
|
e3.name = t2, n3 = [e3];
|
|
260
260
|
}
|
|
261
261
|
l.dynamicControlFormEdit(e2, n3, false);
|