super-page-runtime 2.2.6 → 2.2.11

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.
@@ -494,7 +494,9 @@ function G(e2, s2) {
494
494
  f2.append("additionalParamMapStr", JSON.stringify(v2));
495
495
  const M2 = void 0 === p2.isPermission || "true" === p2.isPermission || p2.isPermission;
496
496
  f2.append("isPermission", M2 + "");
497
- const R2 = i2.systemCode, S2 = i2.backendUrl;
497
+ const R2 = i2.systemCode;
498
+ R2 && f2.append("systemCode", R2);
499
+ const S2 = i2.backendUrl;
498
500
  let I2 = n(S2, i2.isTest) + "/dsc/commons/import-data";
499
501
  I2 = o(I2, R2, S2, i2.isTest), c.post(I2, f2).then((e3) => {
500
502
  if (h2) l({ showClose: true, type: "success", message: u().t("superPageRuntimeMessage.asyncImport") });
@@ -67,7 +67,7 @@ function updateChartDatasources(t, e, o, n) {
67
67
  s.forEach((e2) => {
68
68
  const o2 = e2.services;
69
69
  if (o2 && o2.length > 0) {
70
- let e3 = o2[0].serviceInputs;
70
+ const e3 = o2[0].serviceInputs;
71
71
  e3 && (o2[0].serviceInParams = {}, e3.forEach((e4) => {
72
72
  const n2 = e4.name, a2 = e4.value;
73
73
  o2[0].serviceInParams[n2] = getValueFromVariable(t.entity, a2);
@@ -79,7 +79,7 @@ function updateChartDatasources(t, e, o, n) {
79
79
  const l = {};
80
80
  i.task && Object.assign(l, i.task);
81
81
  const c = { entityMap: i.data, additionalParamMap: u, taskMap: l, dataSourceList: s, systemCode: t.systemCode, pageCode: t.code }, p = t.backendUrl, f = getBaseUrl(p, t.isTest) + "/common/common-data/find-chart-datas";
82
- http.post(f, c).then((e2) => {
82
+ http.post(f, c, { headers: { customSystem: t.systemCode } }).then((e2) => {
83
83
  var _a, _b;
84
84
  t.chartDataSourceMap || (t.chartDataSourceMap = {});
85
85
  for (const o2 in e2) {
@@ -3,40 +3,40 @@ import { getCustomFunc } from "../../../../utils/events/event-util.js";
3
3
  import { getMinValue, getMaxValue, getSumValue, getAvgValue } from "../../../../utils/charts/chart-util.js";
4
4
  class ExpressionEvaluator {
5
5
  static evaluate(e, t, o) {
6
- const a = t.map((t2) => this.createExpression(e, t2, o)).join(" ");
7
- return this.evaluateExpression(a);
6
+ const r = t.map((t2) => this.createExpression(e, t2, o)).join(" ");
7
+ return this.evaluateExpression(r);
8
8
  }
9
9
  static createExpression(e, t, o) {
10
- const { propName: a, operator: r, propValue: n, leftBracket: s, rightBracket: l, joinSign: i, dataType: c } = t;
11
- if (!a || "" === a) return "";
12
- const u = getValueFromVariable(e.entity, a, o);
13
- let p = `${s} ${this.getComparisonExpression(u, r, getValueFromVariable(e.entity, n, o), c)} ${l}`;
10
+ const { propName: r, operator: a, propValue: n, leftBracket: s, rightBracket: l, joinSign: i, dataType: c } = t;
11
+ if (!r || "" === r) return "";
12
+ const u = getValueFromVariable(e.entity, r, o);
13
+ let p = `${s} ${this.getComparisonExpression(u, a, getValueFromVariable(e.entity, n, o), c)} ${l}`;
14
14
  return i && ("and" === i || "AND" === i ? p += "&&" : "or" !== i && "OR" !== i || (p += "||")), p.trim();
15
15
  }
16
- static getComparisonExpression(e, t, o, a) {
16
+ static getComparisonExpression(e, t, o, r) {
17
17
  t || (t = "EQ");
18
- const r = this.parseValue(e, a), n = this.parseValue(o, a);
18
+ const a = this.parseValue(e, r), n = this.parseValue(o, r);
19
19
  switch (t) {
20
20
  case "EQ":
21
- return `${r} === ${n}`;
21
+ return `${a} === ${n}`;
22
22
  case "GT":
23
- return `${r} > ${n}`;
23
+ return `${a} > ${n}`;
24
24
  case "LT":
25
- return `${r} < ${n}`;
25
+ return `${a} < ${n}`;
26
26
  case "GET":
27
- return `${r} >= ${n}`;
27
+ return `${a} >= ${n}`;
28
28
  case "LET":
29
- return `${r} <= ${n}`;
29
+ return `${a} <= ${n}`;
30
30
  case "NET":
31
- return `${r} !== ${n}`;
31
+ return `${a} !== ${n}`;
32
32
  case "CONTAIN":
33
- return `${r}.includes(${n})`;
33
+ return `${a}.includes(${n})`;
34
34
  case "NOT_CONTAIN":
35
- return `!${r}.includes(${n})`;
35
+ return `!${a}.includes(${n})`;
36
36
  case "IS_NULL":
37
- return `${r} === null`;
37
+ return `${a} === null`;
38
38
  case "IS_NOT_NULL":
39
- return `${r} !== null`;
39
+ return `${a} !== null`;
40
40
  default:
41
41
  throw new Error(`比较符号不匹配: ${t}`);
42
42
  }
@@ -75,71 +75,75 @@ function getSummaryTitleColumn(e) {
75
75
  function getSummaryDataColumn(e, t) {
76
76
  var _a;
77
77
  const o = {};
78
- return ((_a = e.props.summaries) == null ? void 0 : _a.dataColumn) && e.props.summaries.dataColumn.length > 0 && e.props.summaries.dataColumn.forEach((a) => {
78
+ return ((_a = e.props.summaries) == null ? void 0 : _a.dataColumn) && e.props.summaries.dataColumn.length > 0 && e.props.summaries.dataColumn.forEach((r) => {
79
79
  var _a2;
80
- const r = (_a2 = e.items) == null ? void 0 : _a2.find((e2) => a.prop === e2.props.base.prop);
81
- r && ("table" === t && r.props.base.tableSummary || "group" === t && r.props.base.groupSummary) && (o[a.prop] = a);
80
+ const a = (_a2 = e.items) == null ? void 0 : _a2.find((e2) => r.prop === e2.props.base.prop);
81
+ a && ("table" === t && a.props.base.tableSummary || "group" === t && a.props.base.groupSummary) && (o[r.prop] = r);
82
82
  }), o;
83
83
  }
84
- function summaryStatistics(e, t, o, a) {
85
- let r = "";
84
+ function summaryStatistics(e, t, o, r) {
85
+ let a = "";
86
86
  const n = e.summaryMode, s = t.map((e2) => Number(e2[o])).filter((e2) => !Number.isNaN(e2));
87
87
  if (s.length > 0) if ("custom" === n) {
88
- const n2 = getCustomFunc(a, e.customFunc);
89
- if (n2) {
88
+ const n2 = getCustomFunc(r, e.customFunc);
89
+ if (n2) try {
90
90
  const e2 = n2.apply(n2, [{ data: t, prop: o }]);
91
- r = e2 ? ` ${e2}` : " N/A";
92
- } else r = " N/A";
91
+ a = e2 ? ` ${e2}` : " N/A";
92
+ } catch (e2) {
93
+ }
94
+ else a = " N/A";
93
95
  } else switch (n) {
94
96
  case "sum":
95
- r = ` ${s.reduce((e2, t2) => e2 + t2, 0)}`;
97
+ a = ` ${s.reduce((e2, t2) => e2 + t2, 0)}`;
96
98
  break;
97
99
  case "avg":
98
- r = " " + s.reduce((e2, t2) => e2 + t2, 0) / s.length;
100
+ a = " " + s.reduce((e2, t2) => e2 + t2, 0) / s.length;
99
101
  break;
100
102
  case "min":
101
- r = ` ${Math.min(...s)}`;
103
+ a = ` ${Math.min(...s)}`;
102
104
  break;
103
105
  case "max":
104
- r = ` ${Math.max(...s)}`;
106
+ a = ` ${Math.max(...s)}`;
105
107
  break;
106
108
  default:
107
- r = " N/A";
109
+ a = " N/A";
108
110
  }
109
- else r = " N/A";
110
- return r;
111
+ else a = " N/A";
112
+ return a;
111
113
  }
112
114
  function replacePlaceholders(e, t) {
113
115
  if (e) return e.replace(/\$\{row\.(\w+)\}/g, (e2, o) => Object.prototype.hasOwnProperty.call(t, o) ? t[o] : "");
114
116
  }
115
117
  function getHeaderCellStyleUtil(e, t, o) {
116
118
  var _a;
117
- const a = {};
119
+ const r = {};
118
120
  e.column.property && ((_a = t.titleStyle) == null ? void 0 : _a.forEach((t2) => {
119
121
  if (t2.field && t2.field.includes(e.column.property)) if (t2.scopeFunc) {
120
- const r2 = getCustomFunc(o.pageContext, t2.scopeFunc);
121
- if (r2) {
122
- false !== r2.apply(r2, [{ item: t2, data: e }]) && copyStyle(a, t2);
122
+ const a2 = getCustomFunc(o.pageContext, t2.scopeFunc);
123
+ if (a2) try {
124
+ false !== a2.apply(a2, [{ item: t2, data: e }]) && copyStyle(r, t2);
125
+ } catch (e2) {
123
126
  }
124
- } else copyStyle(a, t2);
127
+ } else copyStyle(r, t2);
125
128
  }));
126
- const r = getCellStyleUtil(e, t.cellTitleStyle, o);
127
- return r && Object.assign(a, r), a;
129
+ const a = getCellStyleUtil(e, t.cellTitleStyle, o);
130
+ return a && Object.assign(r, a), r;
128
131
  }
129
132
  function getRowStyleUtil(e, t, o) {
130
- const a = {};
133
+ const r = {};
131
134
  if (o.configure.style.rowStyle) for (let t2 = 0; t2 < o.configure.style.rowStyle.length; t2++) {
132
- const r = o.configure.style.rowStyle[t2];
133
- if (r.scopeFunc) {
134
- const t3 = getCustomFunc(o.pageContext, r.scopeFunc);
135
- if (t3) {
135
+ const a = o.configure.style.rowStyle[t2];
136
+ if (a.scopeFunc) {
137
+ const t3 = getCustomFunc(o.pageContext, a.scopeFunc);
138
+ if (t3) try {
136
139
  const o2 = t3.apply(t3, [{ data: e }]);
137
- null != o2 && false !== o2 && copyStyle(a, r);
140
+ null != o2 && false !== o2 && copyStyle(r, a);
141
+ } catch (e2) {
138
142
  }
139
- } else if (r.matchingCondition) {
140
- const t3 = ExpressionEvaluator.evaluate(o.pageContext, r.matchingCondition, e.row);
141
- (t3 || void 0 === t3) && copyStyle(a, r);
142
- } else copyStyle(a, r);
143
+ } else if (a.matchingCondition) {
144
+ const t3 = ExpressionEvaluator.evaluate(o.pageContext, a.matchingCondition, e.row);
145
+ (t3 || void 0 === t3) && copyStyle(r, a);
146
+ } else copyStyle(r, a);
143
147
  }
144
148
  if (t && t.length > 0 && -1 !== t.indexOf(e.rowIndex)) {
145
149
  const e2 = {};
@@ -148,23 +152,24 @@ function getRowStyleUtil(e, t, o) {
148
152
  }
149
153
  return 0 === Object.keys(e2).length && (e2["background-color"] = "var(--el-table-row-hover-bg-color)"), e2;
150
154
  }
151
- return a;
155
+ return r;
152
156
  }
153
157
  function getCellStyleUtil(e, t, o) {
154
- const a = {};
155
- if (t) for (let r = 0; r < t.length; r++) {
156
- const n = t[r];
158
+ const r = {};
159
+ if (t) for (let a = 0; a < t.length; a++) {
160
+ const n = t[a];
157
161
  if (isSetStyle(n)) if (n.scopeFunc) {
158
162
  const t2 = getCustomFunc(o.pageContext, n.scopeFunc);
159
- if (t2) {
160
- false !== t2.apply(t2, [{ data: e }]) && copyStyle(a, n);
163
+ if (t2) try {
164
+ false !== t2.apply(t2, [{ data: e }]) && copyStyle(r, n);
165
+ } catch (e2) {
161
166
  }
162
167
  } else if (n.matchingCondition) {
163
168
  const t2 = ExpressionEvaluator.evaluate(o.pageContext, n.matchingCondition, e.row);
164
- (t2 || void 0 === t2) && copyStyle(a, n);
165
- } else copyStyle(a, n);
169
+ (t2 || void 0 === t2) && copyStyle(r, n);
170
+ } else copyStyle(r, n);
166
171
  }
167
- return a;
172
+ return r;
168
173
  }
169
174
  function isSetStyle(e) {
170
175
  let t;
@@ -174,43 +179,43 @@ function copyStyle(e, t) {
174
179
  Object.assign(e, t.style), t.customStyle && Object.assign(e, JSON.parse(t.customStyle));
175
180
  }
176
181
  function rowDataToColumn(e, t, o) {
177
- const a = t.props.dataOrigin.groupField, r = t.props.dataOrigin.rowToColumn.titleColumns, n = t.props.dataOrigin.rowToColumn.dataColumns, s = [], l = {};
178
- if (a && a.length > 0) e.forEach((e2) => {
179
- const t2 = a.map((t3) => e2[t3]).join("|");
182
+ const r = t.props.dataOrigin.groupField, a = t.props.dataOrigin.rowToColumn.titleColumns, n = t.props.dataOrigin.rowToColumn.dataColumns, s = [], l = {};
183
+ if (r && r.length > 0) e.forEach((e2) => {
184
+ const t2 = r.map((t3) => e2[t3]).join("|");
180
185
  if (!l[t2]) {
181
186
  const o2 = {};
182
- a.forEach((t3) => o2[t3] = e2[t3]), l[t2] = o2, s.push(o2);
187
+ r.forEach((t3) => o2[t3] = e2[t3]), l[t2] = o2, s.push(o2);
183
188
  }
184
189
  n.forEach((o2) => {
185
- const a2 = `${r.map((t3) => e2[t3]).join("")}${o2}`;
186
- l[t2][a2] = e2[o2];
190
+ const r2 = `${a.map((t3) => e2[t3]).join("")}${o2}`;
191
+ l[t2][r2] = e2[o2];
187
192
  });
188
193
  });
189
194
  else {
190
195
  const t2 = [];
191
196
  e.forEach((e2) => {
192
- r.forEach((o2) => {
197
+ a.forEach((o2) => {
193
198
  e2[o2] && t2.push(e2[o2]);
194
199
  });
195
200
  }), n.forEach((t3) => {
196
- const a2 = {}, n2 = o.find((e2) => {
201
+ const r2 = {}, n2 = o.find((e2) => {
197
202
  var _a, _b;
198
203
  return ((_b = (_a = e2.props) == null ? void 0 : _a.base) == null ? void 0 : _b.prop) === t3;
199
204
  });
200
- n2 && (a2.$GroupColumn = n2.props.base.name), e.forEach((e2) => {
201
- r.forEach((o2) => {
202
- const r2 = e2[o2], n3 = e2[t3];
203
- a2[r2] = n3;
205
+ n2 && (r2.$GroupColumn = n2.props.base.name), e.forEach((e2) => {
206
+ a.forEach((o2) => {
207
+ const a2 = e2[o2], n3 = e2[t3];
208
+ r2[a2] = n3;
204
209
  });
205
- }), s.push(a2);
210
+ }), s.push(r2);
206
211
  });
207
212
  }
208
213
  return s;
209
214
  }
210
215
  function colDataToRow(e, t) {
211
- const o = t.props.dataOrigin.groupField, a = t.props.dataOrigin.columnToRow.titleColumns, r = t.props.dataOrigin.columnToRow.dataColumns, n = t.props.dataOrigin.columnToRow.transColumns, s = t.props.dataOrigin.columnToRow.dataColumnsMapping;
216
+ const o = t.props.dataOrigin.groupField, r = t.props.dataOrigin.columnToRow.titleColumns, a = t.props.dataOrigin.columnToRow.dataColumns, n = t.props.dataOrigin.columnToRow.transColumns, s = t.props.dataOrigin.columnToRow.dataColumnsMapping;
212
217
  if (0 === e.length) return e;
213
- const l = [], i = groupBy(e, o), c = r.reduce((e2, t2) => t2.columns.length > e2.columns.length ? t2 : e2, r[0]), u = r.reduce((e2, t2) => (t2.columns.forEach((o2) => {
218
+ const l = [], i = groupBy(e, o), c = a.reduce((e2, t2) => t2.columns.length > e2.columns.length ? t2 : e2, a[0]), u = a.reduce((e2, t2) => (t2.columns.forEach((o2) => {
214
219
  e2[o2] = t2.prop;
215
220
  }), e2), {});
216
221
  return i.forEach((e2) => {
@@ -218,31 +223,31 @@ function colDataToRow(e, t) {
218
223
  const i2 = c.prop, p = {};
219
224
  if (o.forEach((t3) => {
220
225
  p[t3] = e2[t3];
221
- }), p[i2] = e2[t2], r.length > 1) {
226
+ }), p[i2] = e2[t2], a.length > 1) {
222
227
  const o2 = s.find((e3) => e3.props.includes(t2));
223
228
  o2 && o2.props.length > 1 && o2.props.forEach((o3) => {
224
229
  o3 !== t2 && u[o3] && (p[u[o3]] = e2[o3]);
225
230
  });
226
231
  }
227
- a.forEach((e3) => {
232
+ r.forEach((e3) => {
228
233
  const o2 = n.filter((t3) => t3.relatedTitle === e3.prop);
229
- let a2 = false;
234
+ let r2 = false;
230
235
  o2 && o2.length > 0 && o2.forEach((o3) => {
231
- if (o3.columns.includes(t2)) return p[e3.prop] = o3.label, void (a2 = true);
232
- }), a2 || (p[e3.prop] = t2);
236
+ if (o3.columns.includes(t2)) return p[e3.prop] = o3.label, void (r2 = true);
237
+ }), r2 || (p[e3.prop] = t2);
233
238
  }), l.push(p);
234
239
  });
235
240
  }), l;
236
241
  }
237
242
  function getColumnToRowTableConfig(e) {
238
- const t = e.items, o = e.props.dataOrigin.groupField, a = e.props.dataOrigin.columnToRow.titleColumns, r = e.props.dataOrigin.columnToRow.dataColumns, n = [];
243
+ const t = e.items, o = e.props.dataOrigin.groupField, r = e.props.dataOrigin.columnToRow.titleColumns, a = e.props.dataOrigin.columnToRow.dataColumns, n = [];
239
244
  o && o.length > 0 && o.forEach((e2) => {
240
245
  if (t) {
241
246
  const o2 = t.find((t2) => t2.props.base.prop === e2);
242
247
  o2 && n.push(o2);
243
248
  }
244
249
  });
245
- return [...a, ...r].forEach((e2) => {
250
+ return [...r, ...a].forEach((e2) => {
246
251
  if (t) {
247
252
  const o2 = t.find((t2) => t2.props.base.prop === e2);
248
253
  o2 ? n.push(o2) : n.push({ uuid: (/* @__PURE__ */ new Date()).getTime(), name: "", props: { base: { prop: e2.prop, name: e2.title, sortable: true, headerAlign: "center", align: "center", fixed: false, visible: true, dataType: "string" }, format: {}, size: { pc: {} } }, style: {}, componentIndex: 0, runtime: { common: { class: "", style: { pc_style: {}, pc_class: "" } } } });
@@ -252,17 +257,17 @@ function getColumnToRowTableConfig(e) {
252
257
  function groupBy(e, t) {
253
258
  const o = {};
254
259
  return e.forEach((e2) => {
255
- const a = t.map((t2) => e2[t2]).join("|");
256
- o[a] || (o[a] = { ...e2, records: [] }, t.forEach((t2, r) => {
257
- o[a][t2] = e2[t2];
258
- })), o[a].records.push(e2);
260
+ const r = t.map((t2) => e2[t2]).join("|");
261
+ o[r] || (o[r] = { ...e2, records: [] }, t.forEach((t2, a) => {
262
+ o[r][t2] = e2[t2];
263
+ })), o[r].records.push(e2);
259
264
  }), Object.values(o).map((e2) => ({ ...e2, records: void 0 }));
260
265
  }
261
266
  function getIndexColumn() {
262
267
  return { props: { base: { name: "序号", prop: "$index", columnWidth: 80, sortable: true, visible: true, displayOrder: 1, alignTitle: "center", alignContent: "center" } }, events: [], style: { titleFont: {}, contentFont: {}, width: {}, background: {}, tableCell: [{ type: "", model: "" }], conentPadding: {}, tittlePadding: {}, border: {}, shadow: {}, tittleClass: "" } };
263
268
  }
264
- function getNewColumnConfig(e, t, o, a) {
265
- return { uuid: (/* @__PURE__ */ new Date()).getTime(), name: "", props: { base: { prop: e, name: t, displayOrder: o, sortable: true, headerAlign: "center", align: "center", fixed: false, visible: true, dataType: a }, format: {}, size: { pc: {} } }, style: {}, componentIndex: 0, runtime: { common: { class: "", style: { pc_style: {}, pc_class: "" } } } };
269
+ function getNewColumnConfig(e, t, o, r) {
270
+ return { uuid: (/* @__PURE__ */ new Date()).getTime(), name: "", props: { base: { prop: e, name: t, displayOrder: o, sortable: true, headerAlign: "center", align: "center", fixed: false, visible: true, dataType: r }, format: {}, size: { pc: {} } }, style: {}, componentIndex: 0, runtime: { common: { class: "", style: { pc_style: {}, pc_class: "" } } } };
266
271
  }
267
272
  function computeFormula(itemConfs, datas, entity) {
268
273
  Object.keys(itemConfs).forEach((key) => {
@@ -301,7 +306,7 @@ function computeFormula(itemConfs, datas, entity) {
301
306
  function getFieldName(e) {
302
307
  return e.substring(6, e.length - 1);
303
308
  }
304
- function formatColContent(e, t, o, a, r) {
309
+ function formatColContent(e, t, o, r, a) {
305
310
  const n = e[o.props.base.prop];
306
311
  switch (t.type) {
307
312
  case "number":
@@ -311,7 +316,7 @@ function formatColContent(e, t, o, a, r) {
311
316
  case "percent":
312
317
  return formatPercent(n, t);
313
318
  case "custom":
314
- return formatCustomFunc(e, t, o, a, r);
319
+ return formatCustomFunc(e, t, o, r, a);
315
320
  default:
316
321
  return n;
317
322
  }
@@ -328,10 +333,14 @@ function formatPercent(e, t) {
328
333
  let o = e;
329
334
  return o || (o = 0), t.decimalDigit && (o = Number(e).toFixed(t.decimalDigit)), o + " %";
330
335
  }
331
- function formatCustomFunc(e, t, o, a, r) {
332
- const n = getCustomFunc(a, t.customFunc);
336
+ function formatCustomFunc(e, t, o, r, a) {
337
+ const n = getCustomFunc(r, t.customFunc);
333
338
  if (n) {
334
- return n.apply(n, [{ pageContext: a, configureObj: r, row: e, prop: o.props.base.prop }]);
339
+ try {
340
+ return n.apply(n, [{ pageContext: r, configureObj: a, row: e, prop: o.props.base.prop }]);
341
+ } catch (e2) {
342
+ }
343
+ return "";
335
344
  }
336
345
  }
337
346
  export {
@@ -1,39 +1,54 @@
1
- import { defineComponent as e, ref as o, onMounted as n, watch as r, resolveComponent as t, createElementBlock as a, openBlock as i, normalizeClass as u, normalizeStyle as p, unref as l, withDirectives as s, createVNode as c, createBlock as g, createCommentVNode as f, vShow as m, withCtx as d, Fragment as h, renderList as v, h as y } from "vue";
1
+ import { defineComponent as e, ref as o, onMounted as n, watch as r, resolveComponent as t, createElementBlock as i, openBlock as a, normalizeClass as u, normalizeStyle as p, unref as l, withDirectives as s, createVNode as c, createBlock as g, createCommentVNode as f, vShow as d, withCtx as m, Fragment as h, renderList as v, h as y } from "vue";
2
2
  import C from "../common/common-chart-header.vue.js";
3
- import { getSizeConfig as b, getChartDatasFromPage as x, getValueFromVariable as O, isPromise as S, setValueForVariableName as w, updateChartDatasourcesByComponent as j, caculateShowCondition as k } from "../../../../utils/page-helper-util.js";
4
- import { getCustomFunc as E } from "../../../../utils/events/event-util.js";
5
- import F from "./group-column.vue.js";
6
- import $ from "./normal-column.vue.js";
7
- import R from "./table-pageination.vue.js";
8
- import { getSummaryTitleColumn as H, getSummaryDataColumn as I, rowDataToColumn as T, getColumnToRowTableConfig as _, colDataToRow as z, computeFormula as D, getNewColumnConfig as P, summaryStatistics as G, replacePlaceholders as K, getIndexColumn as N, getHeaderCellStyleUtil as J, getRowStyleUtil as U, getCellStyleUtil as V, formatColContent as A } from "./chart-table-util.js";
9
- import { deepCopy as L } from "../../../../utils/common-util.js";
3
+ import { getSizeConfig as x, getChartDatasFromPage as b, getValueFromVariable as O, isPromise as w, setValueForVariableName as S, updateChartDatasourcesByComponent as j, caculateShowCondition as E } from "../../../../utils/page-helper-util.js";
4
+ import { getCustomFunc as $ } from "../../../../utils/events/event-util.js";
5
+ import k from "./group-column.vue.js";
6
+ import F from "./normal-column.vue.js";
7
+ import I from "./table-pageination.vue.js";
8
+ import { getSummaryTitleColumn as R, getSummaryDataColumn as H, rowDataToColumn as T, getColumnToRowTableConfig as _, colDataToRow as z, computeFormula as D, getNewColumnConfig as P, summaryStatistics as U, replacePlaceholders as G, getIndexColumn as K, getHeaderCellStyleUtil as N, getRowStyleUtil as J, getCellStyleUtil as L, formatColContent as V } from "./chart-table-util.js";
9
+ import { deepCopy as A } from "../../../../utils/common-util.js";
10
10
  const q = e({ __name: "table-runtime", props: { configure: { type: Object, default: () => ({}) }, pageContext: { type: Object, default: () => ({}) } }, setup(e2, { expose: q2 }) {
11
11
  var _a;
12
- const B = e2, M = B.configure.runtime ? B.configure.runtime : {}, Q = M.style, W = M.class, X = M.dataConfig, Y = M.headerInfo ? M.headerInfo : {}, Z = o(null), ee = o(M.props.isEnableGroupHeader), oe = o([]), ne = o([]), re = o([]), te = o({}), ae = o(false), ie = o({}), ue = o({}), pe = o({}), le = [], se = o({}), ce = o({}), ge = o(null), fe = o(0);
13
- let me, de = [];
14
- B.configure.props.modelCustom || (ee.value ? re.value = B.configure.props.groupHeaders : ne.value = B.configure.items, (_a = B.configure.items) == null ? void 0 : _a.forEach((e3) => {
15
- te.value[e3.uuid] = e3, Object.keys(e3.style).length > 0 && (se.value[e3.props.base.prop] = { cellStyle: e3.style, titleStyle: e3.titleStyle }), e3.formula && "" !== e3.formula.trim() && (ce.value[e3.props.base.prop] = e3.formula);
16
- })), ae.value = B.configure.props.base.showSummary, (ae.value || B.configure.props.highOrder.groupField && B.configure.props.highOrder.groupField.length > 0) && (ie.value = H(B.configure), ae.value && (ue.value = I(B.configure, "table")), B.configure.props.highOrder.groupField && B.configure.props.highOrder.groupField.length > 0 && (pe.value = I(B.configure, "group")));
17
- let he = b(B.pageContext, B.configure);
12
+ const B = e2, M = B.configure.runtime ? B.configure.runtime : {}, Q = M.style, W = M.class, X = M.dataConfig, Y = M.headerInfo ? M.headerInfo : {}, Z = o(null), ee = o(M.props.isEnableGroupHeader), oe = o([]), ne = o([]), re = o([]), te = o({}), ie = o(false), ae = o({}), ue = o({}), pe = o({}), le = [], se = o({}), ce = o({}), ge = o(null), fe = o(0);
13
+ let de, me = [];
14
+ if (!B.configure.props.modelCustom) {
15
+ if (ee.value) {
16
+ const e3 = [];
17
+ B.configure.props.groupHeaders.forEach((o2) => {
18
+ o2.parentUuid || e3.push(o2);
19
+ }), e3.sort((e4, o2) => e4.displayOrder - o2.displayOrder), re.value = e3, function() {
20
+ if (B.configure.props.base.showIndex) {
21
+ re.value.unshift({ columnUuid: "$index", displayOrder: 0, isLeaf: true, prop: "$index", titleText: "序号", uuid: "$index" });
22
+ const e4 = K();
23
+ e4 && (te.value.$index = e4);
24
+ }
25
+ }();
26
+ } else ne.value = B.configure.items;
27
+ (_a = B.configure.items) == null ? void 0 : _a.forEach((e3) => {
28
+ te.value[e3.uuid] = e3, Object.keys(e3.style).length > 0 && (se.value[e3.props.base.prop] = { cellStyle: e3.style, titleStyle: e3.titleStyle }), e3.formula && "" !== e3.formula.trim() && (ce.value[e3.props.base.prop] = e3.formula);
29
+ });
30
+ }
31
+ ie.value = B.configure.props.base.showSummary, (ie.value || B.configure.props.highOrder.groupField && B.configure.props.highOrder.groupField.length > 0) && (ae.value = R(B.configure), ie.value && (ue.value = H(B.configure, "table")), B.configure.props.highOrder.groupField && B.configure.props.highOrder.groupField.length > 0 && (pe.value = H(B.configure, "group")));
32
+ let he = x(B.pageContext, B.configure);
18
33
  function ve() {
19
34
  const e3 = B.configure.props.dataOrigin.variable.match(/\${(.*?)}/), o2 = e3 ? e3[1].split(".") : [];
20
35
  r(() => o2.reduce((e4, o3) => e4[o3], B.pageContext.entity), (e4) => {
21
- e4 ? ye(JSON.parse(JSON.stringify(e4))) : (oe.value = [], B.configure.props.modelCustom ? He(null) : ee.value ? re.value = B.configure.props.groupHeaders : ne.value = B.configure.items);
36
+ e4 ? ye(JSON.parse(JSON.stringify(e4))) : (oe.value = [], B.configure.props.modelCustom ? Re(null) : ee.value ? re.value = B.configure.props.groupHeaders : ne.value = B.configure.items);
22
37
  });
23
38
  }
24
39
  function ye(e3) {
25
40
  e3 || (e3 = []), (e3 = e3.length > 0 ? e3[0] : {}) || (e3 = {}), e3.hasRender ? e3.hasRender = true : (!function(e4) {
26
- He(e4), "service" === B.configure.props.dataOrigin.dataSource && e4.result ? de = e4.result[B.configure.props.dataOrigin.service.serviceDataField] : "variable" === B.configure.props.dataOrigin.dataSource && (ve(), de = O(B.pageContext.entity, B.configure.props.dataOrigin.variable));
27
- de && Ce(de, e4);
41
+ Re(e4), "service" === B.configure.props.dataOrigin.dataSource && e4.result ? me = e4.result[B.configure.props.dataOrigin.service.serviceDataField] : "variable" === B.configure.props.dataOrigin.dataSource && (ve(), me = O(B.pageContext.entity, B.configure.props.dataOrigin.variable));
42
+ me && Ce(me, e4);
28
43
  }(e3), e3.hasRender = true, X && (X.autoRefresh = false));
29
44
  }
30
45
  function Ce(e3, o2) {
31
46
  var _a2;
32
- if (be("rowToColumn")) {
47
+ if (xe("rowToColumn")) {
33
48
  if (e3 = T(e3, B.configure, ne.value), !ee.value) {
34
49
  const o3 = function(e4, o4, n2) {
35
- const r2 = B.configure.props.dataOrigin.rowToColumn.titleColumns, t2 = B.configure.props.dataOrigin.rowToColumn.dataColumns, a2 = e4.props.dataOrigin.groupField;
36
- if ((!a2 || 0 === a2.length) && n2.length > 0) {
50
+ const r2 = B.configure.props.dataOrigin.rowToColumn.titleColumns, t2 = B.configure.props.dataOrigin.rowToColumn.dataColumns, i2 = e4.props.dataOrigin.groupField;
51
+ if ((!i2 || 0 === i2.length) && n2.length > 0) {
37
52
  const e5 = [];
38
53
  return e5.push(P("$GroupColumn", B.configure.props.dataOrigin.rowToColumn.firstColumnTitle, 0, "string")), Object.keys(n2[0]).forEach((o5, n3) => {
39
54
  if ("$GroupColumn" === o5) return;
@@ -42,15 +57,15 @@ const q = e({ __name: "table-runtime", props: { configure: { type: Object, defau
42
57
  }), e5;
43
58
  }
44
59
  {
45
- const e5 = [...o4].filter((e6) => !r2.includes(e6.props.base.prop) && !t2.includes(e6.props.base.prop)), a3 = new RegExp(`(${t2.join("|")})$`), i2 = /* @__PURE__ */ new Set();
60
+ const e5 = [...o4].filter((e6) => !r2.includes(e6.props.base.prop) && !t2.includes(e6.props.base.prop)), i3 = new RegExp(`(${t2.join("|")})$`), a2 = /* @__PURE__ */ new Set();
46
61
  return n2.forEach((e6) => {
47
62
  Object.keys(e6).forEach((e7) => {
48
63
  if (t2.some((o5) => e7.includes(o5))) {
49
- const o5 = e7.split(a3)[0];
50
- i2.add(o5);
64
+ const o5 = e7.split(i3)[0];
65
+ a2.add(o5);
51
66
  }
52
67
  });
53
- }), i2.forEach((o5) => {
68
+ }), a2.forEach((o5) => {
54
69
  t2.forEach((r3) => {
55
70
  var _a3;
56
71
  (_a3 = ne.value.find((e6) => e6.props.base.prop === r3)) == null ? void 0 : _a3.props.base.name;
@@ -62,63 +77,63 @@ const q = e({ __name: "table-runtime", props: { configure: { type: Object, defau
62
77
  }(B.configure, ne.value, e3);
63
78
  ne.value = o3;
64
79
  }
65
- } else be("columnToRow") && (ee.value || (ne.value = _(B.configure)), e3 = z(e3, B.configure));
80
+ } else xe("columnToRow") && (ee.value || (ne.value = _(B.configure)), e3 = z(e3, B.configure));
66
81
  if (B.configure.props.dataOrigin.dataFormatting) {
67
- const o3 = E(B.pageContext, B.configure.props.dataOrigin.dataFormatting);
82
+ const o3 = $(B.pageContext, B.configure.props.dataOrigin.dataFormatting);
68
83
  if (o3) {
69
84
  const n2 = o3.apply(o3, [{ tableData: e3 }]);
70
85
  n2 && (e3 = n2);
71
86
  }
72
87
  }
73
88
  if (Object.keys(ce.value).length > 0 && e3 && e3.length > 0 && D(ce.value, e3, B.pageContext.entity), ((_a2 = B.configure.pageination) == null ? void 0 : _a2.enable) ? function(e4) {
74
- "frontend" === B.configure.pageination.type ? (fe.value = de.length, Fe(1, B.configure.pageination.pageSize)) : "backend" === B.configure.pageination.type && (oe.value = de, B.configure.pageination.totalFrom && (fe.value = e4.result[B.configure.pageination.totalFrom]));
89
+ "frontend" === B.configure.pageination.type ? (fe.value = me.length, ke(1, B.configure.pageination.pageSize)) : "backend" === B.configure.pageination.type && (oe.value = me, B.configure.pageination.totalFrom && (fe.value = e4.result[B.configure.pageination.totalFrom]));
75
90
  }(o2) : oe.value = e3, B.configure.props.highOrder.groupField && B.configure.props.highOrder.groupField.length > 0) {
76
91
  const e4 = B.configure.props.highOrder.groupField;
77
92
  oe.value = function(e5, o3) {
78
93
  var _a3, _b;
79
94
  if (0 === pe.value.length) return e5;
80
- const n2 = [], r2 = (_a3 = B.configure.items) == null ? void 0 : _a3.filter((e6) => o3.includes(e6.props.base.prop)), t2 = (_b = B.configure.items) == null ? void 0 : _b.filter((e6) => true === e6.props.base.groupSummary), a2 = {};
95
+ const n2 = [], r2 = (_a3 = B.configure.items) == null ? void 0 : _a3.filter((e6) => o3.includes(e6.props.base.prop)), t2 = (_b = B.configure.items) == null ? void 0 : _b.filter((e6) => true === e6.props.base.groupSummary), i2 = {};
81
96
  e5.forEach((e6) => {
82
97
  const n3 = o3.map((o4) => e6[o4]).join("|");
83
- a2[n3] || (a2[n3] = []), a2[n3].push(e6);
98
+ i2[n3] || (i2[n3] = []), i2[n3].push(e6);
84
99
  });
85
- const i2 = Object.values(a2);
86
- for (let e6 = 0; e6 < i2.length; e6++) {
87
- const o4 = i2[e6], a3 = {};
100
+ const a2 = Object.values(i2);
101
+ for (let e6 = 0; e6 < a2.length; e6++) {
102
+ const o4 = a2[e6], i3 = {};
88
103
  t2 == null ? void 0 : t2.forEach((e7) => {
89
- const n3 = e7.props.base.prop, r3 = G(pe.value[n3], o4, n3, B.pageContext);
90
- a3[n3] = r3;
104
+ const n3 = e7.props.base.prop, r3 = U(pe.value[n3], o4, n3, B.pageContext);
105
+ i3[n3] = r3;
91
106
  }), n2.push(...o4), r2 == null ? void 0 : r2.forEach((e7) => {
92
107
  const n3 = e7.props.base.prop;
93
- a3[n3] = K(e7.props.base.summaryTitle, o4[0]);
94
- }), n2.push(a3), le.push(n2.length - 1);
108
+ i3[n3] = G(e7.props.base.summaryTitle, o4[0]);
109
+ }), n2.push(i3), le.push(n2.length - 1);
95
110
  }
96
111
  return n2;
97
112
  }(oe.value, e4);
98
113
  }
99
114
  !function(e4) {
100
115
  if (B.configure.props.base.showIndex && -1 === e4.findIndex((e5) => "$index" === e5.props.base.prop)) {
101
- const o3 = N();
116
+ const o3 = K();
102
117
  o3 && e4.unshift(o3);
103
118
  }
104
119
  }(ne.value);
105
120
  }
106
- function be(e3) {
121
+ function xe(e3) {
107
122
  return B.configure.props.dataOrigin.transition === e3 && B.configure.props.dataOrigin[e3].titleColumns && B.configure.props.dataOrigin[e3].titleColumns.length > 0 && B.configure.props.dataOrigin[e3].dataColumns && B.configure.props.dataOrigin[e3].dataColumns.length > 0;
108
123
  }
109
- function xe(e3) {
124
+ function be(e3) {
110
125
  const o2 = se.value[e3.column.property] ? se.value[e3.column.property].titleStyle : null, n2 = Q == null ? void 0 : Q.titleStyle;
111
- return J(e3, { cellTitleStyle: o2, titleStyle: n2 }, B);
126
+ return N(e3, { cellTitleStyle: o2, titleStyle: n2 }, B);
112
127
  }
113
128
  function Oe(e3) {
114
- return U(e3, le, B);
129
+ return J(e3, le, B);
115
130
  }
116
- function Se(e3) {
131
+ function we(e3) {
117
132
  const o2 = se.value[e3.column.property] ? se.value[e3.column.property].cellStyle : null;
118
- return V(e3, o2, B);
133
+ return L(e3, o2, B);
119
134
  }
120
- he && he.maxHeight && (me = he.maxHeight), !me && he && he.fixHeight && (me = he.fixHeight), me && (me = Number(me + "")), n(() => {
121
- const e3 = x(B.pageContext, B.configure);
135
+ he && he.maxHeight && (de = he.maxHeight), !de && he && he.fixHeight && (de = he.fixHeight), de && (de = Number(de + "")), n(() => {
136
+ const e3 = b(B.pageContext, B.configure);
122
137
  if (e3) ye(e3);
123
138
  else if ("variable" === B.configure.props.dataOrigin.dataSource) {
124
139
  ve();
@@ -126,72 +141,72 @@ const q = e({ __name: "table-runtime", props: { configure: { type: Object, defau
126
141
  o2 && Ce(o2, e3);
127
142
  }
128
143
  });
129
- const we = (e3) => {
144
+ const Se = (e3) => {
130
145
  const { columns: o2, data: n2 } = e3, r2 = [];
131
146
  return o2.forEach((e4, o3) => {
132
- if (ie.value[e4.property]) {
133
- const t2 = ie.value[e4.property].label;
134
- r2[o3] = y("div", {}, [K(t2, n2)]);
147
+ if (ae.value[e4.property]) {
148
+ const t2 = ae.value[e4.property].label;
149
+ r2[o3] = y("div", {}, [G(t2, n2)]);
135
150
  } else if (ue.value[e4.property]) {
136
151
  const t2 = n2.filter((e5, o4) => !le.includes(o4));
137
- r2[o3] = G(ue.value[e4.property], t2, e4.property, B.pageContext);
152
+ r2[o3] = U(ue.value[e4.property], t2, e4.property, B.pageContext);
138
153
  }
139
154
  }), r2;
140
155
  };
141
156
  function je({ row: e3, column: o2, rowIndex: n2, columnIndex: r2 }) {
142
- const t2 = o2.property, a2 = B.configure.props.highOrder;
143
- if (a2.scopeFunc) {
144
- const t3 = E(B.pageContext, a2.scopeFunc);
157
+ const t2 = o2.property, i2 = B.configure.props.highOrder;
158
+ if (i2.scopeFunc) {
159
+ const t3 = $(B.pageContext, i2.scopeFunc);
145
160
  if (t3) {
146
- const a3 = t3.apply(t3, [{ tableData: oe.value, row: e3, column: o2, rowIndex: n2, columnIndex: r2 }]);
147
- if (a3) return a3;
161
+ const i3 = t3.apply(t3, [{ tableData: oe.value, row: e3, column: o2, rowIndex: n2, columnIndex: r2 }]);
162
+ if (i3) return i3;
148
163
  }
149
- } else if (a2 && a2.mergeColumn, a2 && a2.mergeRow && a2.mergeRow.includes(t2) && 0 === n2) return { rowspan: oe.value.length, colspan: 1 };
150
- }
151
- function ke(e3, o2) {
152
- "frontend" === B.configure.pageination.type ? Fe(e3, o2) : $e(e3, o2);
164
+ } else if (i2 && i2.mergeColumn, i2 && i2.mergeRow && i2.mergeRow.includes(t2) && 0 === n2) return { rowspan: oe.value.length, colspan: 1 };
153
165
  }
154
166
  function Ee(e3, o2) {
155
- "frontend" === B.configure.pageination.type ? Fe(e3, o2) : $e(e3, o2);
156
- }
157
- function Fe(e3, o2) {
158
- de && (oe.value = de.slice((e3 - 1) * o2, e3 * o2));
167
+ "frontend" === B.configure.pageination.type ? ke(e3, o2) : Fe(e3, o2);
159
168
  }
160
169
  function $e(e3, o2) {
161
- B.configure.pageination.currentPageSet && w(B.pageContext.entity, B.configure.pageination.currentPageSet, e3), B.configure.pageination.pageSizeSet && w(B.pageContext.entity, B.configure.pageination.pageSizeSet, o2), j(B.pageContext, B.configure.uuid);
170
+ "frontend" === B.configure.pageination.type ? ke(e3, o2) : Fe(e3, o2);
162
171
  }
163
- function Re(e3) {
172
+ function ke(e3, o2) {
173
+ me && (oe.value = me.slice((e3 - 1) * o2, e3 * o2));
174
+ }
175
+ function Fe(e3, o2) {
176
+ B.configure.pageination.currentPageSet && S(B.pageContext.entity, B.configure.pageination.currentPageSet, e3), B.configure.pageination.pageSizeSet && S(B.pageContext.entity, B.configure.pageination.pageSizeSet, o2), j(B.pageContext, B.configure.uuid);
177
+ }
178
+ function Ie(e3) {
164
179
  const o2 = e3.showCondition;
165
- return k(B.pageContext, o2);
180
+ return E(B.pageContext, o2);
166
181
  }
167
- function He(e3) {
182
+ function Re(e3) {
168
183
  if (B.configure.props.modelCustom) {
169
- const o2 = E(B.pageContext, B.configure.props.modelCustom);
184
+ const o2 = $(B.pageContext, B.configure.props.modelCustom);
170
185
  if (o2) {
171
186
  const n2 = o2.apply(o2, [{ pageContext: B.pageContext, configureObj: B.configure, value: e3 }]);
172
- S(n2) ? n2.then((e4) => {
187
+ w(n2) ? n2.then((e4) => {
173
188
  ne.value = e4.columns;
174
189
  }) : ne.value = n2.columns;
175
190
  }
176
191
  }
177
192
  }
178
- function Ie(e3, o2, n2) {
193
+ function He(e3, o2, n2) {
179
194
  e3.forEach((e4) => {
180
195
  const r2 = e4.props.base.prop, t2 = e4.props.base.name;
181
- let a2 = { name: r2, label: t2, i18nKey: t2 };
182
- e4.children && e4.childern.length > 0 && (a2.children = [], Ie(e4.children, a2.children, n2)), e4.props.format && e4.props.format.type && n2.push(e4), o2.push(a2);
196
+ let i2 = { name: r2, label: t2, i18nKey: t2 };
197
+ e4.children && e4.childern.length > 0 && (i2.children = [], He(e4.children, i2.children, n2)), e4.props.format && e4.props.format.type && n2.push(e4), o2.push(i2);
183
198
  });
184
199
  }
185
200
  return q2({ updateChartDatas: ye, exportChart: function() {
186
201
  let e3 = [], o2 = [];
187
202
  o2 = ee.value ? B.configure.props.groupHeaders : B.configure.items;
188
203
  let n2 = [];
189
- Ie(o2, e3, n2);
204
+ He(o2, e3, n2);
190
205
  return { isTable: true, dataArr: function(e4) {
191
206
  let o3 = [];
192
- oe.value && (o3 = L(oe.value), o3.forEach((o4) => {
207
+ oe.value && (o3 = A(oe.value), o3.forEach((o4) => {
193
208
  e4.forEach((e5) => {
194
- const n3 = A(o4, e5.props.format, e5, B.pageContext, B.configure);
209
+ const n3 = V(o4, e5.props.format, e5, B.pageContext, B.configure);
195
210
  o4[e5.props.base.prop] = n3;
196
211
  });
197
212
  }));
@@ -199,7 +214,7 @@ const q = e({ __name: "table-runtime", props: { configure: { type: Object, defau
199
214
  }(n2), columns: e3 };
200
215
  } }), (o2, n2) => {
201
216
  const r2 = t("el-table");
202
- return i(), a("div", { style: p(l(Q)), class: u([l(W), "amb-widget-chart"]), ref: "thisRef" }, [s(c(C, { ref_key: "headerRef", ref: Z, headerInfo: l(Y), configure: e2.configure, pageContext: e2.pageContext }, null, 8, ["headerInfo", "configure", "pageContext"]), [[m, l(Y).showHeader || e2.pageContext.showHomepageSearch]]), c(r2, { ref_key: "gridRef", ref: ge, data: oe.value, style: { width: "100%" }, "max-height": l(me), "header-cell-style": xe, "row-style": Oe, "cell-style": Se, "show-summary": ae.value, stripe: e2.configure.props.base.stripe, "summary-method": we, "span-method": je }, { default: d(() => [ee.value ? (i(true), a(h, { key: 0 }, v(re.value, (o3, n3) => (i(), a(h, { key: n3 }, [o3.isLeaf ? Re(te.value[o3.columnUuid]) ? (i(), g($, { key: 1, configure: e2.configure, pageContext: e2.pageContext, column: te.value[o3.columnUuid] }, null, 8, ["configure", "pageContext", "column"])) : f("", true) : (i(), g(F, { key: 0, configure: e2.configure, pageContext: e2.pageContext, groupColumn: o3, columnsConfigKeyValues: te.value }, null, 8, ["configure", "pageContext", "groupColumn", "columnsConfigKeyValues"]))], 64))), 128)) : (i(true), a(h, { key: 1 }, v(ne.value, (o3, n3) => (i(), a(h, { key: n3 }, [Re(o3) ? (i(), g($, { key: 0, column: o3, configure: e2.configure, pageContext: e2.pageContext }, null, 8, ["column", "configure", "pageContext"])) : f("", true)], 64))), 128))]), _: 1 }, 8, ["data", "max-height", "show-summary", "stripe"]), e2.configure.pageination && e2.configure.pageination.enable ? (i(), g(R, { key: 0, configure: e2.configure, "table-data": oe.value, total: fe.value, onPageChange: ke, onPageSizeChange: Ee }, null, 8, ["configure", "table-data", "total"])) : f("", true)], 6);
217
+ return a(), i("div", { style: p(l(Q)), class: u([l(W), "amb-widget-chart"]), ref: "thisRef" }, [s(c(C, { ref_key: "headerRef", ref: Z, headerInfo: l(Y), configure: e2.configure, pageContext: e2.pageContext }, null, 8, ["headerInfo", "configure", "pageContext"]), [[d, l(Y).showHeader || e2.pageContext.showHomepageSearch]]), c(r2, { ref_key: "gridRef", ref: ge, data: oe.value, style: { width: "100%" }, "max-height": l(de), "header-cell-style": be, "row-style": Oe, "cell-style": we, "show-summary": ie.value, stripe: e2.configure.props.base.stripe, "summary-method": Se, "span-method": je }, { default: m(() => [ee.value ? (a(true), i(h, { key: 0 }, v(re.value, (o3, n3) => (a(), i(h, { key: n3 }, [o3.isLeaf ? Ie(te.value[o3.columnUuid]) ? (a(), g(F, { key: 1, configure: e2.configure, pageContext: e2.pageContext, column: te.value[o3.columnUuid] }, null, 8, ["configure", "pageContext", "column"])) : f("", true) : (a(), g(k, { key: 0, configure: e2.configure, pageContext: e2.pageContext, groupColumn: o3, columnsConfigKeyValues: te.value }, null, 8, ["configure", "pageContext", "groupColumn", "columnsConfigKeyValues"]))], 64))), 128)) : (a(true), i(h, { key: 1 }, v(ne.value, (o3, n3) => (a(), i(h, { key: n3 }, [Ie(o3) ? (a(), g(F, { key: 0, column: o3, configure: e2.configure, pageContext: e2.pageContext }, null, 8, ["column", "configure", "pageContext"])) : f("", true)], 64))), 128))]), _: 1 }, 8, ["data", "max-height", "show-summary", "stripe"]), e2.configure.pageination && e2.configure.pageination.enable ? (a(), g(I, { key: 0, configure: e2.configure, "table-data": oe.value, total: fe.value, onPageChange: Ee, onPageSizeChange: $e }, null, 8, ["configure", "table-data", "total"])) : f("", true)], 6);
203
218
  };
204
219
  } });
205
220
  export {
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as e, ref as t, onMounted as n, watch as o, onUnmounted as i, resolveComponent as a, createElementBlock as l, openBlock as r, createVNode as u, unref as s } from "vue";
2
- import { setTableEvents as c, canExecuteButton as p, doAfterClickEvent as f, doBeforeClickEvent as d, gridSelectRecord as g, gridSelectAllRecords as m, gridSelectionChange as v, cellClick as h, cellDblClick as b, rowClick as w, rowDblClick as S, headerClick as C, getEventNameByType as y, getEventFuncByType as x, getHandleEvent as E } from "../../../../utils/events/event-util.js";
2
+ import { setTableEvents as c, canExecuteButton as p, doAfterClickEvent as d, doBeforeClickEvent as f, gridSelectRecord as g, gridSelectAllRecords as m, gridSelectionChange as v, cellClick as h, cellDblClick as b, rowClick as w, rowDblClick as S, headerClick as C, getEventNameByType as y, getEventFuncByType as x, getHandleEvent as E } from "../../../../utils/events/event-util.js";
3
3
  import { getBaseUrl as D, getListCode as O, getRealRestApiPath as k, isWorkflowPage as I, isVariableInvalidValue as T } from "../../../../utils/common-util.js";
4
4
  import { getAdditionalParamMap as R, getSaveFormRequestWithRow as V, standardEvents as j } from "../../../../utils/events/standard-event.js";
5
5
  import { isPromise as N } from "agilebuilder-ui/src/utils/common-util";
@@ -7,13 +7,13 @@ import { getOperationButtons as P, popupToPage as U } from "../../../../utils/ta
7
7
  import B from "../../../../utils/eventBus.js";
8
8
  import { getDefaultValue as M } from "../../../../utils/page-init-util.js";
9
9
  import { decomposeVariable as $, getSizeConfig as F } from "../../../../utils/page-helper-util.js";
10
- import { getRowStyleUtil as _, getCellStyleUtil as L, getHeaderCellStyleUtil as A } from "../../chart/table/chart-table-util.js";
10
+ import { getRowStyleUtil as L, getCellStyleUtil as _, getHeaderCellStyleUtil as A } from "../../chart/table/chart-table-util.js";
11
11
  const H = e({ __name: "main-table-runtime", props: { pageContext: {}, configure: {} }, emits: ["setSafeDeleteTableCode"], setup(e2, { expose: H2, emit: z }) {
12
12
  const W = e2, q = W.pageContext;
13
13
  let G = W.configure;
14
14
  const Q = t({});
15
15
  q.isTest ? Q.value = W.configure.runtime ? W.configure.runtime : {} : q.tableRuntimes && q.tableRuntimes[G.uuid] && (G = JSON.parse(q.tableRuntimes[G.uuid].configure), Q.value = G.runtime ? G.runtime : {});
16
- const J = Q.value.style, X = Q.value.class, K = q.systemCode, Y = q.backendUrl, Z = G.props && G.props.dataOrigin && G.props.dataOrigin.tableName;
16
+ const J = Q.value.style, K = Q.value.class, X = q.systemCode, Y = q.backendUrl, Z = G.props && G.props.dataOrigin && G.props.dataOrigin.tableName;
17
17
  let ee = D(q.backendUrl, q.isTest);
18
18
  ee || (ee = window.$vueApp.config.globalProperties.baseURL);
19
19
  const te = t({}), ne = [], oe = t({});
@@ -21,7 +21,7 @@ const H = e({ __name: "main-table-runtime", props: { pageContext: {}, configure:
21
21
  const e3 = q.systemCode, t2 = q.code;
22
22
  let n2 = G.props && G.props.dataOrigin && "[]" !== G.props.dataOrigin.sqlFilterCondition ? G.props.dataOrigin.sqlFilterCondition : null;
23
23
  null == n2 && (n2 = []);
24
- const i2 = { isSql: true, extraParam: { beanName: q.beanName, functionCode: t2 + ".listData", tableName: Z, systemCode: e3, pageCode: q.code, pageVersion: q.version }, initSearchForm: n2, lineEditOptions: { aftersaveIsCreateRow: false, autoSave: false, enter: me, esc: Se }, indexContinuous: !(!G.props || !G.props.otherSettings) && G.props.otherSettings.serialNumberContinuous, initSearch: !G.props || false !== G.props.dataOrigin.initializationQuery, resizeHeight: ke, pageCode: q.code, pageVersion: q.version, additionalParamMap: R(q), showOverflowTooltip: !(!G.props || !G.props.otherSettings || void 0 !== G.props.otherSettings.isBreakLine && false !== G.props.otherSettings.isBreakLine), isEnableEnterEvent: G.props && G.props.otherSettings && G.props.otherSettings.isEnableEnterEvent, isWithDataPermission: !!(G.props && G.props.otherSettings && G.props.otherSettings.isWithDataPermission) && G.props.otherSettings.isWithDataPermission, pageDevMode: false, isWorkflowEntity: I(q), tableClass: X, tableStyle: J, pageContext: q, configureObj: G, backendUrl: ee, cellStyleRender: Ae, rowStyleRender: Le, titleStyleRender: He };
24
+ const i2 = { isSql: true, rowKeyProp: G.props.dataOrigin.principalLinkage, extraParam: { beanName: q.beanName, functionCode: t2 + ".listData", tableName: Z, systemCode: e3, pageCode: q.code, pageVersion: q.version }, initSearchForm: n2, lineEditOptions: { aftersaveIsCreateRow: false, autoSave: false, enter: me, esc: Se }, indexContinuous: !(!G.props || !G.props.otherSettings) && G.props.otherSettings.serialNumberContinuous, initSearch: !G.props || false !== G.props.dataOrigin.initializationQuery, resizeHeight: ke, pageCode: q.code, pageVersion: q.version, additionalParamMap: R(q), showOverflowTooltip: !(!G.props || !G.props.otherSettings || void 0 !== G.props.otherSettings.isBreakLine && false !== G.props.otherSettings.isBreakLine), isEnableEnterEvent: G.props && G.props.otherSettings && G.props.otherSettings.isEnableEnterEvent, isWithDataPermission: !!(G.props && G.props.otherSettings && G.props.otherSettings.isWithDataPermission) && G.props.otherSettings.isWithDataPermission, pageDevMode: false, isWorkflowEntity: I(q), tableClass: K, tableStyle: J, pageContext: q, configureObj: G, backendUrl: ee, cellStyleRender: Ae, rowStyleRender: _e, titleStyleRender: He };
25
25
  (function(e4) {
26
26
  const t3 = [];
27
27
  e4.operations || (e4.operations = {});
@@ -74,9 +74,9 @@ const H = e({ __name: "main-table-runtime", props: { pageContext: {}, configure:
74
74
  }();
75
75
  const ie = t(), ae = function() {
76
76
  let e3 = ee + "/dsc/commons/list";
77
- e3 && (e3 = k(e3, K, Y, q.isTest));
77
+ e3 && (e3 = k(e3, X, Y, q.isTest));
78
78
  return e3;
79
- }(), le = O(q.code, q.version, G.uuid), re = q.code + "_" + le, ue = t([]), se = q.entity.page, ce = t({ data: [] }), pe = q.superGridItems, fe = pe ? pe[G.uuid] : null, de = t(false), ge = z;
79
+ }(), le = O(q.code, q.version, G.uuid), re = q.code + "_" + le, ue = t([]), se = q.entity.page, ce = t({ data: [] }), pe = q.superGridItems, de = pe ? pe[G.uuid] : null, fe = t(false), ge = z;
80
80
  function me({ rowIndex: e3, column: t2, row: n2, orgRow: o2 }) {
81
81
  ve(null, null, n2, t2, e3);
82
82
  }
@@ -84,7 +84,7 @@ const H = e({ __name: "main-table-runtime", props: { pageContext: {}, configure:
84
84
  const a2 = te.value.lineEditSave, l2 = G;
85
85
  a2.props.base.tableUuid = l2.uuid, oe.value.lineEditOptions.beforeSave = be, q.editData = n2, p({ pageContext: q, configureObj: a2 }).then((l3) => {
86
86
  true === l3.canExecute && (oe.value.lineEditOptions.saveRow = we, ie.value.saveRow(i2, le).then(() => {
87
- f(q, a2, { originalValue: e3, formatValue: t2, row: n2, column: o2, rowIndex: i2 });
87
+ d(q, a2, { originalValue: e3, formatValue: t2, row: n2, column: o2, rowIndex: i2 });
88
88
  }));
89
89
  }).finally(() => {
90
90
  q.editData = null;
@@ -104,7 +104,7 @@ const H = e({ __name: "main-table-runtime", props: { pageContext: {}, configure:
104
104
  function be({ row: e3, columns: t2, additionalParamMap: n2 }) {
105
105
  const o2 = te.value.lineEditSave, i2 = G;
106
106
  o2.props.base.tableUuid = i2.uuid;
107
- return d(q, o2, { row: e3, columns: t2 });
107
+ return f(q, o2, { row: e3, columns: t2 });
108
108
  }
109
109
  function we({ row: e3, columns: t2, dataTypeMap: n2, dynamicColumnInfo: o2, additionalParamMap: i2, mainDefaultValueColumns: a2 }) {
110
110
  const l2 = te.value.lineEditSave, r2 = G;
@@ -123,17 +123,17 @@ const H = e({ __name: "main-table-runtime", props: { pageContext: {}, configure:
123
123
  function Ce(e3, t2, n2, o2, i2) {
124
124
  const a2 = te.value.restoreEdit, l2 = G;
125
125
  a2.props.base.tableUuid = l2.uuid;
126
- const r2 = d(q, a2, { originalValue: e3, formatValue: t2, row: n2, column: o2, rowIndex: i2 });
126
+ const r2 = f(q, a2, { originalValue: e3, formatValue: t2, row: n2, column: o2, rowIndex: i2 });
127
127
  if (!r2) return;
128
128
  N(r2) ? r2.then((e4) => {
129
129
  e4 && ie.value.restoreRow(i2, le);
130
130
  }) : ie.value.restoreRow(i2, le);
131
- f(q, G, { originalValue: e3, formatValue: t2, row: n2, column: o2, rowIndex: i2 });
131
+ d(q, G, { originalValue: e3, formatValue: t2, row: n2, column: o2, rowIndex: i2 });
132
132
  }
133
133
  function ye(e3, t2, n2, o2, i2) {
134
134
  const a2 = te.value.lineEditUpdate, l2 = G;
135
135
  a2.props.base.tableUuid = l2.uuid;
136
- const r2 = d(q, a2, { originalValue: e3, formatValue: t2, row: n2, column: o2, rowIndex: i2 });
136
+ const r2 = f(q, a2, { originalValue: e3, formatValue: t2, row: n2, column: o2, rowIndex: i2 });
137
137
  r2 && (N(r2) ? r2.then((l3) => {
138
138
  l3 && xe(e3, t2, n2, o2, i2, a2);
139
139
  }) : xe(e3, t2, n2, o2, i2, a2));
@@ -142,7 +142,7 @@ const H = e({ __name: "main-table-runtime", props: { pageContext: {}, configure:
142
142
  q.editData = n2, p({ pageContext: q, configureObj: a2 }).then((a3) => {
143
143
  if (true === a3.canExecute) {
144
144
  ie.value.editRow(i2, le);
145
- f(q, G, { originalValue: e3, formatValue: t2, row: n2, column: o2, rowIndex: i2 });
145
+ d(q, G, { originalValue: e3, formatValue: t2, row: n2, column: o2, rowIndex: i2 });
146
146
  }
147
147
  }).finally(() => {
148
148
  q.editData = null;
@@ -151,7 +151,7 @@ const H = e({ __name: "main-table-runtime", props: { pageContext: {}, configure:
151
151
  function Ee(e3, t2, n2, o2, i2) {
152
152
  const a2 = te.value.lineEditDelete, l2 = G;
153
153
  a2.props.base.tableUuid = l2.uuid;
154
- const r2 = d(q, a2, { originalValue: e3, formatValue: t2, row: n2, column: o2, rowIndex: i2 });
154
+ const r2 = f(q, a2, { originalValue: e3, formatValue: t2, row: n2, column: o2, rowIndex: i2 });
155
155
  r2 && (N(r2) ? r2.then((l3) => {
156
156
  l3 && De(e3, t2, n2, o2, i2, a2);
157
157
  }) : De(e3, t2, n2, o2, i2, a2));
@@ -167,7 +167,7 @@ const H = e({ __name: "main-table-runtime", props: { pageContext: {}, configure:
167
167
  });
168
168
  else {
169
169
  Ce(e3, t2, n2, o2, i2);
170
- f(q, G, { originalValue: e3, formatValue: t2, row: n2, column: o2, rowIndex: i2 });
170
+ d(q, G, { originalValue: e3, formatValue: t2, row: n2, column: o2, rowIndex: i2 });
171
171
  }
172
172
  }
173
173
  function Oe(e3) {
@@ -245,14 +245,14 @@ const H = e({ __name: "main-table-runtime", props: { pageContext: {}, configure:
245
245
  function Fe() {
246
246
  ue.value = [];
247
247
  }
248
- function _e(e3) {
249
- de.value = true;
250
- }
251
248
  function Le(e3) {
252
- return _(e3, [], W);
249
+ fe.value = true;
250
+ }
251
+ function _e(e3) {
252
+ return L(e3, [], W);
253
253
  }
254
254
  function Ae(e3) {
255
- return L(e3, e3.cellStyle, W);
255
+ return _(e3, e3.cellStyle, W);
256
256
  }
257
257
  function He(e3) {
258
258
  const t2 = e3.titleStyle, n2 = W.configure.style.titleStyle;
@@ -305,7 +305,7 @@ const H = e({ __name: "main-table-runtime", props: { pageContext: {}, configure:
305
305
  }, validatorSunTableListData: function() {
306
306
  return ie.value.validatorSunTableListData();
307
307
  }, showMobileSearch: function() {
308
- de.value && ie.value.showMobileSearch();
308
+ fe.value && ie.value.showMobileSearch();
309
309
  }, getTableSelectOptions: function() {
310
310
  if (ie.value) return ie.value.getTableSelectOptions(le);
311
311
  }, dynamicControlTableEdit: function(e3, t2, n2) {
@@ -314,7 +314,7 @@ const H = e({ __name: "main-table-runtime", props: { pageContext: {}, configure:
314
314
  ie.value && ie.value.doLayout(e3);
315
315
  } }), (e3, t2) => {
316
316
  const n2 = a("super-grid");
317
- return r(), l("div", null, [u(n2, { ref_key: "gridRef", ref: ie, url: s(ae), options: oe.value, code: s(le), settings: s(fe), "search-form-info": ce.value, "list-toolbar-form-data": s(se), onSelect: Ve, onSelectAll: je, onSelectionChange: Ne, onCellClick: Pe, onCellDblclick: Ue, onRowClick: Be, onRowDblclick: Me, onHeaderClick: $e, onRefresh: Fe, onNewOpenGridDialog: s(U), onCanShowMobileSearch: _e }, null, 8, ["url", "options", "code", "settings", "search-form-info", "list-toolbar-form-data", "onNewOpenGridDialog"])]);
317
+ return r(), l("div", null, [u(n2, { ref_key: "gridRef", ref: ie, url: s(ae), options: oe.value, code: s(le), settings: s(de), "search-form-info": ce.value, "list-toolbar-form-data": s(se), onSelect: Ve, onSelectAll: je, onSelectionChange: Ne, onCellClick: Pe, onCellDblclick: Ue, onRowClick: Be, onRowDblclick: Me, onHeaderClick: $e, onRefresh: Fe, onNewOpenGridDialog: s(U), onCanShowMobileSearch: Le }, null, 8, ["url", "options", "code", "settings", "search-form-info", "list-toolbar-form-data", "onNewOpenGridDialog"])]);
318
318
  };
319
319
  } });
320
320
  export {
@@ -2,16 +2,16 @@ import { defineComponent as e, ref as t, computed as l, watch as o, onMounted as
2
2
  import { setVariableValue as C, getVariableValue as _, getOptionDatasFromPage as k, queryOptionDatasources as w, autoSetAfterSelect as S } from "../../../../utils/page-helper-util.js";
3
3
  import { getFormModelFields as T } from "../../../../utils/page-init-util.js";
4
4
  import { handleFormEvent as j, handleAfterInitEvent as R } from "../../../../utils/events/event-util.js";
5
- import z from "../common/title-suffix-element.vue.js";
6
- import { $t as I } from "../../../../utils/i18n-util.js";
7
- const M = { style: { float: "left" } }, V = { style: { float: "right", color: "var(--el-text-color-secondary)", "font-size": "13px" } }, q = e({ __name: "select-runtime", props: { pageContext: {}, configure: {} }, setup(e2, { expose: q2 }) {
5
+ import V from "../common/title-suffix-element.vue.js";
6
+ import { $t as z } from "../../../../utils/i18n-util.js";
7
+ const I = { style: { float: "left" } }, M = { style: { float: "right", color: "var(--el-text-color-secondary)", "font-size": "13px" } }, q = e({ __name: "select-runtime", props: { pageContext: {}, configure: {} }, setup(e2, { expose: q2 }) {
8
8
  const O = e2, P = O.pageContext.entity ? O.pageContext.entity : {};
9
9
  let A = T(O.pageContext, O.configure);
10
10
  const D = O.configure.runtime ? O.configure.runtime : {}, W = D.style, E = D.class, F = D.headerStyle, U = D.titleExceedStyle, $ = t(D.props ? D.props : {}), B = l({ get() {
11
11
  let e3 = _(P, A);
12
- return null != e3 && (e3 += ""), $.value.multiple && e3 && (e3 = e3.split(",")), e3;
12
+ return null != e3 && (e3 += ""), $.value.multiple && (e3 = e3 ? e3.split(",") : []), e3;
13
13
  }, set(e3) {
14
- $.value.multiple && e3 && e3.length > 0 && (e3 = e3.join(",")), C(P, A, e3);
14
+ $.value.multiple && e3 && e3.length > 0 && !$.value.arrayValue && (e3 = e3.join(",")), C(P, A, e3);
15
15
  } }), G = t($.value.options ? $.value.options : []), H = k(O.pageContext, O.configure);
16
16
  H.length > 0 && (G.value = H);
17
17
  const J = t(false), K = O.configure.props && O.configure.props.dataOrigin ? O.configure.props.dataOrigin : {}, L = K.optionValueSetType;
@@ -75,7 +75,7 @@ const M = { style: { float: "left" } }, V = { style: { float: "right", color: "v
75
75
  G.value = e3 || [];
76
76
  } }), (e3, t2) => {
77
77
  const l2 = n("el-option"), o2 = n("el-select"), a2 = n("el-form-item");
78
- return r(), i(a2, { ref_key: "formItemRef", ref: oe, required: !!$.value.required, class: p(f(E)), "label-width": $.value.labelWidth, style: s(f(W)) }, { label: c(() => [$.value.tittleShow ? (r(), g("div", { key: 0, ref_key: "titleRef", ref: ue, style: s({ ...f(F), ...f(U) }) }, [$.value.prefixType ? (r(), i(z, { key: 0, pageContext: e3.pageContext, property: $.value }, null, 8, ["pageContext", "property"])) : (r(), g(m, { key: 1 }, [b(x(f(I)($.value.title)), 1)], 64))], 4)) : h("", true)]), default: c(() => [v(o2, { ref_key: "componentRef", ref: ae, style: { width: "100%" }, disabled: "disabled" === $.value.state, size: $.value.size, clearable: $.value.clearable, multiple: $.value.multiple, "collapse-tags": $.value.collapseTags, "collapse-tags-tooltip": $.value.collapseTagsTooltip, filterable: $.value.filterable, "allow-create": $.value.allowCreate, placeholder: $.value.placeholder, "remote-show-suffix": $.value.remoteShowSuffix, remote: $.value.remote, "remote-method": $.value.remoteMethod, loading: J.value, onChange: $.value.changeMethod, modelValue: B.value, "onUpdate:modelValue": t2[0] || (t2[0] = (e4) => B.value = e4) }, { default: c(() => [(r(true), g(m, null, d(G.value, (t3) => (r(), i(l2, { key: t3.value, label: t3.label, value: t3.value, onClick: (l3) => f(j)(t3.value, e3.pageContext, e3.configure, "click", { values: B.value }) }, { default: c(() => [t3._description_ ? (r(), g(m, { key: 0 }, [y("span", M, x(t3.label), 1), y("span", V, x(t3._description_), 1)], 64)) : h("", true)]), _: 2 }, 1032, ["label", "value", "onClick"]))), 128))]), _: 1 }, 8, ["disabled", "size", "clearable", "multiple", "collapse-tags", "collapse-tags-tooltip", "filterable", "allow-create", "placeholder", "remote-show-suffix", "remote", "remote-method", "loading", "onChange", "modelValue"])]), _: 1 }, 8, ["required", "class", "label-width", "style"]);
78
+ return r(), i(a2, { ref_key: "formItemRef", ref: oe, required: !!$.value.required, class: p(f(E)), "label-width": $.value.labelWidth, style: s(f(W)) }, { label: c(() => [$.value.tittleShow ? (r(), g("div", { key: 0, ref_key: "titleRef", ref: ue, style: s({ ...f(F), ...f(U) }) }, [$.value.prefixType ? (r(), i(V, { key: 0, pageContext: e3.pageContext, property: $.value }, null, 8, ["pageContext", "property"])) : (r(), g(m, { key: 1 }, [b(x(f(z)($.value.title)), 1)], 64))], 4)) : h("", true)]), default: c(() => [v(o2, { ref_key: "componentRef", ref: ae, style: { width: "100%" }, disabled: "disabled" === $.value.state, size: $.value.size, clearable: $.value.clearable, multiple: $.value.multiple, "collapse-tags": $.value.collapseTags, "collapse-tags-tooltip": $.value.collapseTagsTooltip, filterable: $.value.filterable, "allow-create": $.value.allowCreate, placeholder: $.value.placeholder, "remote-show-suffix": $.value.remoteShowSuffix, remote: $.value.remote, "remote-method": $.value.remoteMethod, loading: J.value, onChange: $.value.changeMethod, modelValue: B.value, "onUpdate:modelValue": t2[0] || (t2[0] = (e4) => B.value = e4) }, { default: c(() => [(r(true), g(m, null, d(G.value, (t3) => (r(), i(l2, { key: t3.value, label: t3.label, value: t3.value, onClick: (l3) => f(j)(t3.value, e3.pageContext, e3.configure, "click", { values: B.value }) }, { default: c(() => [t3._description_ ? (r(), g(m, { key: 0 }, [y("span", I, x(t3.label), 1), y("span", M, x(t3._description_), 1)], 64)) : h("", true)]), _: 2 }, 1032, ["label", "value", "onClick"]))), 128))]), _: 1 }, 8, ["disabled", "size", "clearable", "multiple", "collapse-tags", "collapse-tags-tooltip", "filterable", "allow-create", "placeholder", "remote-show-suffix", "remote", "remote-method", "loading", "onChange", "modelValue"])]), _: 1 }, 8, ["required", "class", "label-width", "style"]);
79
79
  };
80
80
  } });
81
81
  export {
@@ -1,11 +1,11 @@
1
- import { defineComponent as e, ref as o, computed as t, markRaw as n, onMounted as i, resolveDirective as s, withDirectives as r, createCommentVNode as u, unref as l, createBlock as p, openBlock as a, resolveDynamicComponent as c, normalizeClass as g, normalizeStyle as f, vShow as d, nextTick as v } from "vue";
1
+ import { defineComponent as e, ref as o, computed as t, markRaw as n, onMounted as i, resolveDirective as s, withDirectives as r, createCommentVNode as u, unref as l, createBlock as p, openBlock as a, resolveDynamicComponent as c, normalizeClass as f, normalizeStyle as g, vShow as d, nextTick as v } from "vue";
2
2
  import m from "./error-render.vue.js";
3
3
  import { getRuntimeComponentByName as C } from "../../utils/assemblys-config.js";
4
4
  import { PageDimensions as x } from "../../utils/interfaces/page-design-types.js";
5
- import { addComponentRef as h, addComponentRefByCode as b } from "../../utils/global-refs.js";
5
+ import { addComponentRef as b, addComponentRefByCode as h } from "../../utils/global-refs.js";
6
6
  import { getPermissionCodes as y, packageFormRules as w, controlObjectRenderState as j } from "../../utils/page-init-util.js";
7
- import { caculateShowCondition as _, getFormPropName as S, getSizeConfig as B } from "../../utils/page-helper-util.js";
8
- import { isWorkflowPage as O, getPropClassName as P, isNumber as R } from "../../utils/common-util.js";
7
+ import { caculateShowCondition as _, getFormPropName as B, getSizeConfig as O } from "../../utils/page-helper-util.js";
8
+ import { isWorkflowPage as P, getPropClassName as R, isNumber as S } from "../../utils/common-util.js";
9
9
  import { isShowComponent as M } from "../../utils/events/event-util.js";
10
10
  const N = e({ __name: "object-render", props: { pageContext: {}, configure: {} }, setup(e2) {
11
11
  var _a, _b;
@@ -13,10 +13,10 @@ const N = e({ __name: "object-render", props: { pageContext: {}, configure: {} }
13
13
  null == N2.configure.style && (N2.configure.style = {});
14
14
  const $ = y(N2.configure, N2.pageContext);
15
15
  N2.configure && N2.configure.props && N2.configure.props.base && (N2.configure.props.base.functionCode = $), w(N2.pageContext, N2.configure);
16
- let E = o(true), F = o(true), H = o("");
16
+ let E = o(true), H = o(true), k = o("");
17
17
  if (N2.configure && N2.configure.props) {
18
18
  let e3 = [];
19
- ((_a = N2.configure.props.base) == null ? void 0 : _a.showConditions) && (e3 = "string" == typeof N2.configure.props.base.showConditions ? JSON.parse(N2.configure.props.base.showConditions) : N2.configure.props.base.showConditions), F = t(() => {
19
+ ((_a = N2.configure.props.base) == null ? void 0 : _a.showConditions) && (e3 = "string" == typeof N2.configure.props.base.showConditions ? JSON.parse(N2.configure.props.base.showConditions) : N2.configure.props.base.showConditions), H = t(() => {
20
20
  var _a2;
21
21
  let o2 = true;
22
22
  if (E.value) if (e3 && e3.length > 0) o2 = _(N2.pageContext, e3);
@@ -25,38 +25,38 @@ const N = e({ __name: "object-render", props: { pageContext: {}, configure: {} }
25
25
  e4 && "hidden" === e4 && (o2 = false);
26
26
  }
27
27
  else o2 = false;
28
- return N2.configure._dynamicShowFlag = o2, o2;
28
+ return o2;
29
29
  });
30
- if (N2.configure._dynamicShowFlag = F, (_b = N2.configure.props.base) == null ? void 0 : _b.editConditions) {
30
+ if (N2.configure._dynamicShowFlag = H, (_b = N2.configure.props.base) == null ? void 0 : _b.editConditions) {
31
31
  const e4 = N2.configure.props.base.editConditions;
32
32
  if (e4.length > 0) {
33
33
  const o2 = N2.configure.runtime ? N2.configure.runtime : {}, n2 = o2.props ? o2.props : {};
34
- if (n2.rawSate = n2.state, O(N2.pageContext) && N2.pageContext.fieldPermissionMap) {
34
+ if (n2.rawSate = n2.state, P(N2.pageContext) && N2.pageContext.fieldPermissionMap) {
35
35
  const e5 = N2.pageContext.fieldPermissionMap.get("all_fields");
36
- if (false === (e5 == null ? void 0 : e5.canEdit)) H.value = "disabled";
36
+ if (false === (e5 == null ? void 0 : e5.canEdit)) k.value = "disabled";
37
37
  else {
38
38
  const e6 = N2.configure.props.base;
39
39
  if (e6 && e6.prop) {
40
40
  let o3 = e6.prop;
41
- o3 = S(o3);
41
+ o3 = B(o3);
42
42
  const t2 = N2.pageContext.fieldPermissionMap.get(o3);
43
- t2 && false === t2.canEdit && (H.value = "disabled");
43
+ t2 && false === t2.canEdit && (k.value = "disabled");
44
44
  }
45
45
  }
46
46
  }
47
47
  n2.state = t({ get() {
48
- if ("disabled" === H.value) return H.value;
48
+ if ("disabled" === k.value) return k.value;
49
49
  return _(N2.pageContext, e4) ? "" : "disabled";
50
50
  }, set() {
51
51
  } });
52
52
  }
53
53
  }
54
54
  }
55
- const k = o({});
56
- k.value = n(C(N2.configure.name));
55
+ const F = o({});
56
+ F.value = n(C(N2.configure.name));
57
57
  const J = o(true);
58
- null == k.value && (k.value = m, J.value = false);
59
- const W = o(null), q = o({}), z = o(""), A = P(N2.configure);
58
+ null == F.value && (F.value = m, J.value = false);
59
+ const W = o(null), q = o({}), z = o(""), A = R(N2.configure);
60
60
  A && (z.value = A);
61
61
  const D = N2.configure.runtime && N2.configure.runtime.common ? N2.configure.runtime.common : {};
62
62
  if (D.class && (z.value += " " + D.class), D.style) {
@@ -73,22 +73,22 @@ const N = e({ __name: "object-render", props: { pageContext: {}, configure: {} }
73
73
  E.value = false;
74
74
  }), e3 && !e3.getConfigure && (e3.getConfigure = function() {
75
75
  return N2.configure;
76
- }), N2.configure.uuid && h(N2.pageContext, N2.configure.uuid, W), N2.configure.code) b(N2.pageContext, N2.configure.code, W);
76
+ }), N2.configure.uuid && b(N2.pageContext, N2.configure.uuid, W), N2.configure.code) h(N2.pageContext, N2.configure.code, W);
77
77
  else if (N2.configure.props && N2.configure.props.base) {
78
78
  const e4 = N2.configure.props.base;
79
79
  if (e4.prop) {
80
80
  let o3 = e4.prop;
81
- o3.startsWith("${") && (o3 = o3.substring(2, o3.length - 1)), o3.includes(".") && (o3 = o3.substring(o3.indexOf(".") + 1)), b(N2.pageContext, o3, W);
81
+ o3.startsWith("${") && (o3 = o3.substring(2, o3.length - 1)), o3.includes(".") && (o3 = o3.substring(o3.indexOf(".") + 1)), h(N2.pageContext, o3, W);
82
82
  }
83
83
  }
84
84
  const o2 = N2.configure.props ? N2.configure.props.base : null;
85
85
  if (o2 && o2.prop) {
86
86
  let e4 = o2.prop;
87
- e4 = S(e4), j(N2.pageContext, e4);
87
+ e4 = B(e4), j(N2.pageContext, e4);
88
88
  }
89
89
  !function() {
90
90
  if (!W.value) return;
91
- const e4 = B(N2.pageContext, N2.configure);
91
+ const e4 = O(N2.pageContext, N2.configure);
92
92
  "table" !== N2.configure.name && e4 && e4.isCalcHeight && v(() => {
93
93
  let e5 = W.value.$el;
94
94
  e5 || (e5 = W.value);
@@ -96,7 +96,7 @@ const N = e({ __name: "object-render", props: { pageContext: {}, configure: {} }
96
96
  if (!e5 || !o3) return;
97
97
  const t2 = e5.getBoundingClientRect();
98
98
  let n2 = window.innerHeight - t2.y - 80, i2 = n2 + "";
99
- R(n2) && (i2 = n2 + "px"), q.value.height = i2, q.value["overflow-y"] = "auto", q.value["overflow-x"] = "hidden", N2.configure.sytle || (N2.configure.sytle = {}), N2.configure.sytle._heightStyle = i2;
99
+ S(n2) && (i2 = n2 + "px"), q.value.height = i2, q.value["overflow-y"] = "auto", q.value["overflow-x"] = "hidden", N2.configure.sytle || (N2.configure.sytle = {}), N2.configure.sytle._heightStyle = i2;
100
100
  });
101
101
  }();
102
102
  }
@@ -128,7 +128,7 @@ const N = e({ __name: "object-render", props: { pageContext: {}, configure: {} }
128
128
  };
129
129
  return (e3, o2) => {
130
130
  const t2 = s("permission");
131
- return l(M)(e3.configure) ? r((a(), p(c(k.value), { key: 0, ref: G, style: f(q.value), class: g(z.value), configure: e3.configure, pageContext: e3.pageContext }, null, 8, ["style", "class", "configure", "pageContext"])), [[d, l(F)], [t2, l($) ? l($) : "true"]]) : u("", true);
131
+ return l(M)(e3.configure) ? r((a(), p(c(F.value), { key: 0, ref: G, style: g(q.value), class: f(z.value), configure: e3.configure, pageContext: e3.pageContext }, null, 8, ["style", "class", "configure", "pageContext"])), [[d, l(H)], [t2, l($) ? l($) : "true"]]) : u("", true);
132
132
  };
133
133
  } });
134
134
  export {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "super-page-runtime",
3
- "version": "2.2.6",
3
+ "version": "2.2.11",
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.5",
51
+ "agilebuilder-ui": "1.1.7",
52
52
  "axios": "^1.6.8",
53
53
  "cypress": "^13.6.6",
54
54
  "element-plus": "^2.6.1",