super-page-runtime 2.3.19-sit1 → 2.3.19-sit2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/dist/es/assets/chart-themes/bar-theme.d.ts +6 -0
  2. package/dist/es/assets/chart-themes/bar-theme.js +4 -0
  3. package/dist/es/assets/chart-themes/gauge-theme.d.ts +6 -0
  4. package/dist/es/assets/chart-themes/gauge-theme.js +4 -0
  5. package/dist/es/assets/chart-themes/pie-theme.d.ts +6 -0
  6. package/dist/es/assets/chart-themes/pie-theme.js +4 -0
  7. package/dist/es/assets/chart-themes/radar-theme.d.ts +6 -0
  8. package/dist/es/assets/chart-themes/radar-theme.js +4 -0
  9. package/dist/es/assets/chart-themes/scatter-theme.d.ts +6 -0
  10. package/dist/es/assets/chart-themes/scatter-theme.js +4 -0
  11. package/dist/es/components/runtime/utils/charts/chart-util.d.ts +1 -1
  12. package/dist/es/components/runtime/utils/charts/chart-util.js +118 -117
  13. package/dist/es/components/runtime/utils/events/data-backfill-util.d.ts +27 -0
  14. package/dist/es/components/runtime/utils/events/data-backfill-util.js +39 -0
  15. package/dist/es/components/runtime/utils/events/standard-event.js +406 -378
  16. package/dist/es/components/runtime/utils/page-init-util.d.ts +2 -1
  17. package/dist/es/components/runtime/utils/page-init-util.js +86 -65
  18. package/dist/es/components/runtime/views/assemblys/common/task-informition-dialog.vue.js +3 -3
  19. package/dist/es/components/runtime/views/assemblys/container/tools/tools-runtime.vue.js +1 -1
  20. package/dist/es/components/runtime/views/assemblys/container/tools/tools-runtime.vue2.js +9 -9
  21. package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue2.js +47 -46
  22. package/dist/es/components/runtime/views/assemblys/form/select/select-runtime.vue2.js +42 -25
  23. package/dist/es/components/runtime/views/super-page.vue.d.ts +9 -0
  24. package/dist/es/components/runtime/views/super-page.vue.js +1 -1
  25. package/dist/es/components/runtime/views/super-page.vue2.js +128 -120
  26. package/dist/es/i18n/langs/cn.js +1 -1
  27. package/dist/es/i18n/langs/en.js +1 -1
  28. package/dist/es/style.css +82 -82
  29. package/package.json +2 -2
  30. package/dist/es/assets/chart-themes/theme1.d.ts +0 -4
  31. package/dist/es/assets/chart-themes/theme1.js +0 -4
  32. package/dist/es/assets/chart-themes/theme2.d.ts +0 -4
  33. package/dist/es/assets/chart-themes/theme2.js +0 -4
  34. package/dist/es/assets/chart-themes/theme3.d.ts +0 -4
  35. package/dist/es/assets/chart-themes/theme3.js +0 -4
@@ -0,0 +1,6 @@
1
+ declare const themeMap: {
2
+ [key: string]: {
3
+ color: string[];
4
+ };
5
+ };
6
+ export default themeMap;
@@ -0,0 +1,4 @@
1
+ const c = { theme1: { color: ["#43C2C0", "#978DEB", "#FFBC5D", "#50ADFC", "#5470c6", "#91cc75", "#fac858", "#ee6666", "#73c0de", "#3ba272", "#fc8452", "#9a60b4", "#ea7ccc"] }, theme2: { color: ["#5FC8FB", "#9DE3CE", "#FFB47B", "#F88D7D", "#5470c6", "#91cc75", "#fac858", "#ee6666", "#73c0de", "#3ba272", "#fc8452", "#9a60b4", "#ea7ccc"] }, theme3: { color: ["#95C0F7", "#D3DE8F", "#61D4EB", "#F0BB50", "#5470c6", "#91cc75", "#fac858", "#ee6666", "#73c0de", "#3ba272", "#fc8452", "#9a60b4", "#ea7ccc"] } };
2
+ export {
3
+ c as default
4
+ };
@@ -0,0 +1,6 @@
1
+ declare const themeMap: {
2
+ [key: string]: {
3
+ color: string[];
4
+ };
5
+ };
6
+ export default themeMap;
@@ -0,0 +1,4 @@
1
+ const c = { theme1: { color: ["red", "#5470c6", "#91cc75", "#fac858", "#ee6666", "#73c0de", "#3ba272", "#fc8452", "#9a60b4", "#ea7ccc"] }, theme2: { color: ["yellow", "#5470c6", "#91cc75", "#fac858", "#ee6666", "#73c0de", "#3ba272", "#fc8452", "#9a60b4", "#ea7ccc"] }, theme3: { color: ["green", "#5470c6", "#91cc75", "#fac858", "#ee6666", "#73c0de", "#3ba272", "#fc8452", "#9a60b4", "#ea7ccc"] } };
2
+ export {
3
+ c as default
4
+ };
@@ -0,0 +1,6 @@
1
+ declare const themeMap: {
2
+ [key: string]: {
3
+ color: string[];
4
+ };
5
+ };
6
+ export default themeMap;
@@ -0,0 +1,4 @@
1
+ const c = { theme1: { color: ["#50ADFC", "#FFBC5D", "#FF8484", "#978DEB", "#43C2C0", "#5470c6", "#91cc75", "#fac858", "#ee6666", "#73c0de", "#3ba272", "#fc8452", "#9a60b4", "#ea7ccc"] }, theme2: { color: ["#5FC8FB", "#FFB47B", "#FFE101", "#F97C6D", "#8CD193", "#5470c6", "#91cc75", "#fac858", "#ee6666", "#73c0de", "#3ba272", "#fc8452", "#9a60b4", "#ea7ccc"] }, theme3: { color: ["#D3DE8F", "#F961B0", "#F0BB50", "#978DEB", "#95C0F7", "#5470c6", "#91cc75", "#fac858", "#ee6666", "#73c0de", "#3ba272", "#fc8452", "#9a60b4", "#ea7ccc"] } };
2
+ export {
3
+ c as default
4
+ };
@@ -0,0 +1,6 @@
1
+ declare const themeMap: {
2
+ [key: string]: {
3
+ color: string[];
4
+ };
5
+ };
6
+ export default themeMap;
@@ -0,0 +1,4 @@
1
+ const c = { theme1: { color: ["#50ADFC", "#978DEB", "#5470c6", "#91cc75", "#fac858", "#ee6666", "#73c0de", "#3ba272", "#fc8452", "#9a60b4", "#ea7ccc"] }, theme2: { color: ["#5FC8FB", "#95A4DF", "#5470c6", "#91cc75", "#fac858", "#ee6666", "#73c0de", "#3ba272", "#fc8452", "#9a60b4", "#ea7ccc"] }, theme3: { color: ["#D3DE8F", "#61D4EB", "#5470c6", "#91cc75", "#fac858", "#ee6666", "#73c0de", "#3ba272", "#fc8452", "#9a60b4", "#ea7ccc"] } };
2
+ export {
3
+ c as default
4
+ };
@@ -0,0 +1,6 @@
1
+ declare const themeMap: {
2
+ [key: string]: {
3
+ color: string[];
4
+ };
5
+ };
6
+ export default themeMap;
@@ -0,0 +1,4 @@
1
+ const c = { theme1: { color: ["red", "#5470c6", "#91cc75", "#fac858", "#ee6666", "#73c0de", "#3ba272", "#fc8452", "#9a60b4", "#ea7ccc"] }, theme2: { color: ["yellow", "#5470c6", "#91cc75", "#fac858", "#ee6666", "#73c0de", "#3ba272", "#fc8452", "#9a60b4", "#ea7ccc"] }, theme3: { color: ["green", "#5470c6", "#91cc75", "#fac858", "#ee6666", "#73c0de", "#3ba272", "#fc8452", "#9a60b4", "#ea7ccc"] } };
2
+ export {
3
+ c as default
4
+ };
@@ -12,7 +12,7 @@ export declare enum CommonName {
12
12
  * @param themeName 获取自定义的主题名称
13
13
  * @returns
14
14
  */
15
- export declare function getCustomTheme(themeName: string): any;
15
+ export declare function getCustomTheme(themeName: string, chartType?: string): any;
16
16
  /**
17
17
  * 获取所有主题对象
18
18
  * @returns
@@ -1,39 +1,40 @@
1
- import t from "../../../../assets/chart-themes/theme1.js";
2
- import e from "../../../../assets/chart-themes/theme2.js";
3
- import n from "../../../../assets/chart-themes/theme3.js";
4
- import { getDefaultValue as i } from "../page-init-util.js";
5
- import { getValueFromSource as s, setValueForVariableName as o, getParamNames as r, formatVariableValue as a, getValueFromVariable as l, setVariableValue as c } from "../page-helper-util.js";
6
- import { getI18n as f } from "agilebuilder-ui/src/utils/util";
7
- import { appendDefaultMethods as u } from "../events/event-util.js";
8
- var d = ((t2) => (t2.X_FIELD_NAME = "__x", t2.Y_TEMP_NAME = "__y", t2))(d || {});
9
- const p = { theme1: t, theme2: e, theme3: n };
10
- function h(t2) {
11
- return p[t2];
1
+ import t from "../../../../assets/chart-themes/bar-theme.js";
2
+ import e from "../../../../assets/chart-themes/gauge-theme.js";
3
+ import n from "../../../../assets/chart-themes/pie-theme.js";
4
+ import i from "../../../../assets/chart-themes/radar-theme.js";
5
+ import s from "../../../../assets/chart-themes/scatter-theme.js";
6
+ import { getDefaultValue as r } from "../page-init-util.js";
7
+ import { getValueFromSource as o, setValueForVariableName as a, getParamNames as l, formatVariableValue as c, getValueFromVariable as f, setVariableValue as u } from "../page-helper-util.js";
8
+ import { getI18n as d } from "agilebuilder-ui/src/utils/util";
9
+ import { appendDefaultMethods as p } from "../events/event-util.js";
10
+ var h = ((t2) => (t2.X_FIELD_NAME = "__x", t2.Y_TEMP_NAME = "__y", t2))(h || {});
11
+ function g(r2, o2 = "bar") {
12
+ return "bar" === o2 ? t[r2] : "gauge" === o2 ? e[r2] : "pie" === o2 ? n[r2] : "radar" === o2 ? i[r2] : "scatter" === o2 ? s[r2] : t[r2];
12
13
  }
13
- function g() {
14
+ function m() {
14
15
  return [{ value: "theme1", label: "主题1" }, { value: "theme2", label: "主题2" }, { value: "theme3", label: "主题3" }];
15
16
  }
16
- function m(t2, e2, n2, i2, s2) {
17
- return function(o2) {
18
- let r2 = o2 == null ? void 0 : o2.value;
19
- if (s2 && (r2 = o2), null == r2 || null == r2) return r2;
20
- if (Array.isArray(r2)) return r2;
21
- if (isNaN(r2) || !t2 || !t2.indexOf) return r2;
17
+ function x(t2, e2, n2, i2, s2) {
18
+ return function(r2) {
19
+ let o2 = r2 == null ? void 0 : r2.value;
20
+ if (s2 && (o2 = r2), null == o2 || null == o2) return o2;
21
+ if (Array.isArray(o2)) return o2;
22
+ if (isNaN(o2) || !t2 || !t2.indexOf) return o2;
22
23
  if (t2.indexOf("precision") > -1) {
23
24
  let t3 = parseInt(e2);
24
- (null == t3 || isNaN(t3)) && (t3 = 2), r2 = parseFloat(parseFloat(r2).toFixed(t3));
25
+ (null == t3 || isNaN(t3)) && (t3 = 2), o2 = parseFloat(parseFloat(o2).toFixed(t3));
25
26
  }
26
27
  let a2 = "";
27
28
  t2.indexOf("prefix") > -1 && n2 && (a2 = n2);
28
29
  let l2 = "";
29
- return t2.indexOf("append") > -1 && i2 && (l2 = i2), a2 + r2.toLocaleString() + l2;
30
+ return t2.indexOf("append") > -1 && i2 && (l2 = i2), a2 + o2.toLocaleString() + l2;
30
31
  };
31
32
  }
32
- function x(t2, e2) {
33
+ function b(t2, e2) {
33
34
  if (!e2) return;
34
- if (e2.tooltipFormatterArgs && (e2.tooltip || (e2.tooltip = {}), e2.tooltip.valueFormatter = m.apply(e2, e2.tooltipFormatterArgs)), e2.series) {
35
+ if (e2.tooltipFormatterArgs && (e2.tooltip || (e2.tooltip = {}), e2.tooltip.valueFormatter = x.apply(e2, e2.tooltipFormatterArgs)), e2.series) {
35
36
  const n3 = t2.props ? t2.props.enableDrill : null;
36
- for (const i3 of e2.series) e2.radar || (i3.data = []), i3.labelFormatterArgs && (i3.label || (i3.label = {}), i3.label.formatter = m.apply(i3, i3.labelFormatterArgs)), !n3 && t2.clickSet && t2.clickSet.selected && i3.emphasis && (i3.emphasis.disabled = false), "pie" === i3.type && t2.clickSet && t2.clickSet.selected && (t2.clickSet.multiple ? i3.selectedMode = "multiple" : i3.selectedMode = "single");
37
+ for (const i3 of e2.series) e2.radar || (i3.data = []), i3.labelFormatterArgs && (i3.label || (i3.label = {}), i3.label.formatter = x.apply(i3, i3.labelFormatterArgs)), !n3 && t2.clickSet && t2.clickSet.selected && i3.emphasis && (i3.emphasis.disabled = false), "pie" === i3.type && t2.clickSet && t2.clickSet.selected && (t2.clickSet.multiple ? i3.selectedMode = "multiple" : i3.selectedMode = "single");
37
38
  }
38
39
  if (e2.radar) for (const t3 of e2.radar) t3.indicator = [];
39
40
  const n2 = e2.series;
@@ -52,62 +53,62 @@ function I(t2, e2, n2) {
52
53
  if (!(n2 && e2 && e2.clickSet && t2)) return;
53
54
  const i2 = e2.clickSet;
54
55
  n2.on("click", function(s2) {
55
- let o2 = e2.highlightInfos ? e2.highlightInfos : [], r2 = -1;
56
- if (o2) {
56
+ let r2 = e2.highlightInfos ? e2.highlightInfos : [], o2 = -1;
57
+ if (r2) {
57
58
  const t3 = [];
58
- for (let a2 = 0; a2 < o2.length; a2++) {
59
- const l2 = o2[a2], c2 = l2.seriesIndex === s2.seriesIndex && l2.dataIndex === s2.dataIndex;
59
+ for (let a2 = 0; a2 < r2.length; a2++) {
60
+ const l2 = r2[a2], c2 = l2.seriesIndex === s2.seriesIndex && l2.dataIndex === s2.dataIndex;
60
61
  if (c2 || !i2.multiple) {
61
62
  if (i2.selected) {
62
63
  const t4 = "chart-pie" === e2.name ? "unselect" : "downplay";
63
64
  n2.dispatchAction({ type: t4, seriesIndex: l2.seriesIndex, dataIndex: l2.dataIndex });
64
65
  }
65
66
  } else t3.push(l2);
66
- c2 && (r2 = a2);
67
+ c2 && (o2 = a2);
67
68
  }
68
- o2 = t3;
69
+ r2 = t3;
69
70
  }
70
- if (-1 === r2) {
71
+ if (-1 === o2) {
71
72
  if (i2.selected) {
72
73
  const t3 = "chart-pie" === e2.name ? "select" : "highlight";
73
74
  n2.dispatchAction({ type: t3, seriesIndex: s2.seriesIndex, dataIndex: s2.dataIndex });
74
75
  }
75
- o2.push({ seriesIndex: s2.seriesIndex, dataIndex: s2.dataIndex });
76
+ r2.push({ seriesIndex: s2.seriesIndex, dataIndex: s2.dataIndex });
76
77
  }
77
- e2.highlightInfos = o2, v(t2, e2);
78
+ e2.highlightInfos = r2, N(t2, e2);
78
79
  });
79
80
  }
80
- function b(t2, e2, n2) {
81
+ function v(t2, e2, n2) {
81
82
  if (!n2 || !e2 || !t2) return;
82
83
  const i2 = e2.highlightInfos ? e2.highlightInfos : [];
83
84
  for (let t3 = 0; t3 < i2.length; t3++) {
84
- const s2 = i2[t3], o2 = "chart-pie" === e2.name ? "unselect" : "downplay";
85
- n2.dispatchAction({ type: o2, seriesIndex: s2.seriesIndex, dataIndex: s2.dataIndex });
85
+ const s2 = i2[t3], r2 = "chart-pie" === e2.name ? "unselect" : "downplay";
86
+ n2.dispatchAction({ type: r2, seriesIndex: s2.seriesIndex, dataIndex: s2.dataIndex });
86
87
  }
87
- e2.highlightInfos = [], v(t2, e2);
88
+ e2.highlightInfos = [], N(t2, e2);
88
89
  }
89
- function v(t2, e2) {
90
+ function N(t2, e2) {
90
91
  if (!e2.clickSet) return;
91
92
  const n2 = e2.clickSet, i2 = n2.variables;
92
93
  if (!i2 || 0 == i2.length) return;
93
- const r2 = e2.highlightInfos ? e2.highlightInfos : [], a2 = e2.cacheDatas ? e2.cacheDatas : [], l2 = [], c2 = [];
94
- for (const t3 of r2) c2.includes(t3.dataIndex) || (c2.push(t3.dataIndex), t3.dataIndex < a2.length && l2.push(a2[t3.dataIndex]));
94
+ const s2 = e2.highlightInfos ? e2.highlightInfos : [], r2 = e2.cacheDatas ? e2.cacheDatas : [], l2 = [], c2 = [];
95
+ for (const t3 of s2) c2.includes(t3.dataIndex) || (c2.push(t3.dataIndex), t3.dataIndex < r2.length && l2.push(r2[t3.dataIndex]));
95
96
  for (const e3 of i2) {
96
97
  if (!e3.fieldName || !e3.variable) continue;
97
98
  const i3 = [];
98
99
  for (const t3 of l2) {
99
- const n3 = s(t3, e3.fieldName, void 0);
100
+ const n3 = o(t3, e3.fieldName, void 0);
100
101
  null != n3 && i3.push(n3);
101
102
  }
102
- n2.multiple ? o(t2.entity, e3.variable, i3) : o(t2.entity, e3.variable, i3.length > 0 ? i3[0] : void 0);
103
+ n2.multiple ? a(t2.entity, e3.variable, i3) : a(t2.entity, e3.variable, i3.length > 0 ? i3[0] : void 0);
103
104
  }
104
105
  }
105
- function N(t2, e2, n2) {
106
- const i2 = e2.items ? e2.items : [], o2 = e2.props ? e2.props.orderByTarget : "";
106
+ function y(t2, e2, n2) {
107
+ const i2 = e2.items ? e2.items : [], s2 = e2.props ? e2.props.orderByTarget : "";
107
108
  let r2 = null;
108
- if ("x" == o2 || "X" == o2) r2 = "__x";
109
- else if (o2) {
110
- for (const t3 of i2) if (t3.uuid == o2) {
109
+ if ("x" == s2 || "X" == s2) r2 = "__x";
110
+ else if (s2) {
111
+ for (const t3 of i2) if (t3.uuid == s2) {
111
112
  const e3 = t3.props ? t3.props : {}, n3 = e3.yaxisSource, i3 = e3.yaxisField;
112
113
  if (i3 && (!n3 || "variable" == n3)) {
113
114
  r2 = i3;
@@ -116,60 +117,60 @@ function N(t2, e2, n2) {
116
117
  }
117
118
  }
118
119
  if (!r2) return;
119
- const l2 = e2.props ? e2.props.orderSource : "";
120
- let c2 = e2.props ? e2.props.orderFix : "";
121
- if ("variable" == l2) {
120
+ const a2 = e2.props ? e2.props.orderSource : "";
121
+ let l2 = e2.props ? e2.props.orderFix : "";
122
+ if ("variable" == a2) {
122
123
  const n3 = e2.props ? e2.props.orderVariable : "";
123
- c2 = a(t2, n3);
124
+ l2 = c(t2, n3);
124
125
  }
125
- c2 = "desc" == c2 || "DESC" == c2 ? "desc" : "asc", n2.sort((t3, e3) => {
126
- const n3 = s(t3, r2, void 0), i3 = s(e3, r2, void 0);
127
- return "desc" === c2 ? i3 - n3 : n3 - i3;
126
+ l2 = "desc" == l2 || "DESC" == l2 ? "desc" : "asc", n2.sort((t3, e3) => {
127
+ const n3 = o(t3, r2, void 0), i3 = o(e3, r2, void 0);
128
+ return "desc" === l2 ? i3 - n3 : n3 - i3;
128
129
  });
129
130
  }
130
- function y(t2, e2, n2, i2, o2) {
131
+ function S(t2, e2, n2, i2, s2) {
131
132
  if (!n2) return n2;
132
133
  const r2 = e2.props ? e2.props : {};
133
134
  if (!r2.limitQuantity) return n2;
134
- let l2 = null;
135
- if (r2.itemNumVariable ? (l2 = a(t2, r2.itemNumVariable), l2 = parseInt(l2)) : l2 = r2.itemNumFix ? r2.itemNumFix : 10, null == l2 || null == l2 || isNaN(l2)) return n2;
136
- if (n2.length < l2) return n2;
137
- const c2 = r2.overItemAlias, f2 = [], u2 = {};
138
- i2 = i2 || [], o2 = o2 || [];
135
+ let a2 = null;
136
+ if (r2.itemNumVariable ? (a2 = c(t2, r2.itemNumVariable), a2 = parseInt(a2)) : a2 = r2.itemNumFix ? r2.itemNumFix : 10, null == a2 || null == a2 || isNaN(a2)) return n2;
137
+ if (n2.length < a2) return n2;
138
+ const l2 = r2.overItemAlias, f2 = [], u2 = {};
139
+ i2 = i2 || [], s2 = s2 || [];
139
140
  for (let t3 = 0; t3 < n2.length; t3++) {
140
141
  const e3 = n2[t3];
141
- if (t3 < l2) f2.push(e3);
142
+ if (t3 < a2) f2.push(e3);
142
143
  else {
143
- if (!c2) break;
144
+ if (!l2) break;
144
145
  for (const t4 of i2) {
145
146
  if (!t4) continue;
146
- let n3 = s(e3, t4, void 0);
147
+ let n3 = o(e3, t4, void 0);
147
148
  n3 = null == n3 || null == n3 ? "" : n3, u2[t4] || (u2[t4] = []);
148
149
  const i3 = u2[t4];
149
150
  i3.includes(n3) || i3.push(n3);
150
151
  }
151
- for (const t4 of o2) {
152
+ for (const t4 of s2) {
152
153
  if (!t4) continue;
153
- const n3 = s(e3, t4, void 0);
154
+ const n3 = o(e3, t4, void 0);
154
155
  if (isNaN(n3)) continue;
155
156
  const i3 = u2[t4];
156
157
  isNaN(i3) ? u2[t4] = n3 : u2[t4] = n3 + i3;
157
158
  }
158
159
  }
159
160
  }
160
- return c2 && (u2.__x = c2, f2.push(u2)), f2;
161
+ return l2 && (u2.__x = l2, f2.push(u2)), f2;
161
162
  }
162
- function S(t2, e2, n2) {
163
+ function F(t2, e2, n2) {
163
164
  const i2 = {};
164
165
  for (const s2 of t2) {
165
166
  const t3 = s2.props ? s2.props : {};
166
167
  if ("formula" === t3.yaxisSource) {
167
- const s3 = r(t3.formula);
168
+ const s3 = l(t3.formula);
168
169
  for (const t4 of s3) if (!(t4 in i2)) {
169
- if (t4.startsWith("${min.")) i2[t4] = F(e2, t4.substring(6, t4.length - 1));
170
- else if (t4.startsWith("${max.")) i2[t4] = _(e2, t4.substring(6, t4.length - 1));
171
- else if (t4.startsWith("${sum.")) i2[t4] = A(e2, t4.substring(6, t4.length - 1));
172
- else if (t4.startsWith("${avg.")) i2[t4] = M(e2, t4.substring(6, t4.length - 1));
170
+ if (t4.startsWith("${min.")) i2[t4] = _(e2, t4.substring(6, t4.length - 1));
171
+ else if (t4.startsWith("${max.")) i2[t4] = A(e2, t4.substring(6, t4.length - 1));
172
+ else if (t4.startsWith("${sum.")) i2[t4] = M(e2, t4.substring(6, t4.length - 1));
173
+ else if (t4.startsWith("${avg.")) i2[t4] = k(e2, t4.substring(6, t4.length - 1));
173
174
  else if (t4.startsWith("${add.")) {
174
175
  const e3 = t4.substring(6, t4.length - 1);
175
176
  n2.add(e3);
@@ -179,70 +180,70 @@ function S(t2, e2, n2) {
179
180
  }
180
181
  return i2;
181
182
  }
182
- function F(t2, e2) {
183
+ function _(t2, e2) {
183
184
  let n2;
184
185
  for (const i2 of t2) {
185
- const t3 = parseFloat(s(i2, e2, null));
186
+ const t3 = parseFloat(o(i2, e2, null));
186
187
  (void 0 === n2 || !isNaN(t3) && t3 < n2) && (n2 = t3);
187
188
  }
188
189
  return n2;
189
190
  }
190
- function _(t2, e2) {
191
+ function A(t2, e2) {
191
192
  let n2;
192
193
  for (const i2 of t2) {
193
- const t3 = parseFloat(s(i2, e2, null));
194
+ const t3 = parseFloat(o(i2, e2, null));
194
195
  (void 0 === n2 || !isNaN(t3) && t3 > n2) && (n2 = t3);
195
196
  }
196
197
  return n2;
197
198
  }
198
- function A(t2, e2) {
199
+ function M(t2, e2) {
199
200
  let n2;
200
201
  for (const i2 of t2) {
201
- const t3 = parseFloat(s(i2, e2, null));
202
+ const t3 = parseFloat(o(i2, e2, null));
202
203
  void 0 === n2 ? n2 = t3 : isNaN(t3) || (n2 += t3);
203
204
  }
204
205
  return n2;
205
206
  }
206
- function M(t2, e2) {
207
- const n2 = A(t2, e2);
207
+ function k(t2, e2) {
208
+ const n2 = M(t2, e2);
208
209
  return void 0 === n2 || 0 === t2.length ? n2 : parseFloat((n2 / t2.length).toFixed(5));
209
210
  }
210
- function k(t2, e2, n2, i2) {
211
+ function w(t2, e2, n2, i2) {
211
212
  if (!t2) return;
212
213
  if (e2) for (const n3 in e2) t2 = t2.replace(new RegExp("\\${add." + n3 + "}", "g"), e2[n3]);
213
- const o2 = r(t2);
214
- for (const e3 of o2) {
215
- let o3 = null;
216
- o3 = e3.startsWith("${row.") ? s(n2, e3.substring(6, e3.length - 1), null) : l(i2.entity, e3), t2 = t2.replace(new RegExp(e3.replace("$", "\\$"), "g"), o3);
214
+ const s2 = l(t2);
215
+ for (const e3 of s2) {
216
+ let s3 = null;
217
+ s3 = e3.startsWith("${row.") ? o(n2, e3.substring(6, e3.length - 1), null) : f(i2.entity, e3), t2 = t2.replace(new RegExp(e3.replace("$", "\\$"), "g"), s3);
217
218
  }
218
219
  t2.includes("return ") || (t2 = "return " + t2);
219
- const a2 = new Function("params", t2);
220
- return u(a2, i2), a2({ pageContext: i2, row: n2 });
220
+ const r2 = new Function("params", t2);
221
+ return p(r2, i2), r2({ pageContext: i2, row: n2 });
221
222
  }
222
- function w(t2, e2) {
223
+ function $(t2, e2) {
223
224
  if (!t2 || !t2.$el) return;
224
225
  const n2 = t2.$el.getElementsByTagName("canvas");
225
226
  if (!n2 || 0 === n2.length) return;
226
227
  const i2 = n2[0], s2 = i2.width + ":" + i2.height;
227
228
  return { isTable: false, fileContent: i2.toDataURL(), fileSize: s2, title: e2 == null ? void 0 : e2.title };
228
229
  }
229
- function $(t2, e2, n2) {
230
- const s2 = window.localStorage.getItem("HOME_MY_CHARTS_CONDITIONS");
231
- let r2 = true;
232
- if (s2) {
233
- const t3 = JSON.parse(s2);
230
+ function j(t2, e2, n2) {
231
+ const i2 = window.localStorage.getItem("HOME_MY_CHARTS_CONDITIONS");
232
+ let s2 = true;
233
+ if (i2) {
234
+ const t3 = JSON.parse(i2);
234
235
  if (t3[n2]) {
235
- const i2 = t3[n2];
236
- if (Object.keys(i2).length > 0) {
237
- r2 = false;
238
- for (const t4 in i2) null !== i2[t4] && void 0 !== i2[t4] && o(e2.entity, t4, i2[t4]);
236
+ const i3 = t3[n2];
237
+ if (Object.keys(i3).length > 0) {
238
+ s2 = false;
239
+ for (const t4 in i3) null !== i3[t4] && void 0 !== i3[t4] && a(e2.entity, t4, i3[t4]);
239
240
  }
240
241
  }
241
242
  }
242
- if (r2 && t2) {
243
+ if (s2 && t2) {
243
244
  for (const n3 of t2) if (n3.prop && n3.value) {
244
- const t3 = i(e2, n3.value, "input-text", false), s3 = n3.prop.substring(2, n3.prop.length - 1).split(".");
245
- null != t3 && c(e2.entity, s3, t3);
245
+ const t3 = r(e2, n3.value, "input-text", false), i3 = n3.prop.substring(2, n3.prop.length - 1).split(".");
246
+ null != t3 && u(e2.entity, i3, t3);
246
247
  }
247
248
  }
248
249
  }
@@ -256,28 +257,28 @@ function E(t2) {
256
257
  var _a;
257
258
  if ((_a = t2 == null ? void 0 : t2.toolbox) == null ? void 0 : _a.feature) {
258
259
  const e2 = t2.toolbox.feature;
259
- for (const t3 in e2) e2[t3].show && (e2[t3].title = f().t("chartMessage." + t3), "dataView" === t3 && (e2[t3].lang = [f().t("chartMessage.dataView"), f().t("chartMessage.close"), f().t("chartMessage.refresh")]));
260
+ for (const t3 in e2) e2[t3].show && (e2[t3].title = d().t("chartMessage." + t3), "dataView" === t3 && (e2[t3].lang = [d().t("chartMessage.dataView"), d().t("chartMessage.close"), d().t("chartMessage.refresh")]));
260
261
  }
261
262
  }
262
263
  export {
263
- d as CommonName,
264
- S as caculateFormulaValue,
265
- b as clearChartSelected,
266
- k as executeChartFormula,
267
- w as exportCommonChart,
264
+ h as CommonName,
265
+ F as caculateFormulaValue,
266
+ v as clearChartSelected,
267
+ w as executeChartFormula,
268
+ $ as exportCommonChart,
268
269
  E as formatToolboxI18n,
269
- M as getAvgValue,
270
- h as getCustomTheme,
271
- g as getCustomThemeOptions,
272
- _ as getMaxValue,
273
- F as getMinValue,
274
- m as getNumFormatter,
275
- A as getSumValue,
276
- x as initChartOption,
277
- y as limitDatas,
270
+ k as getAvgValue,
271
+ g as getCustomTheme,
272
+ m as getCustomThemeOptions,
273
+ A as getMaxValue,
274
+ _ as getMinValue,
275
+ x as getNumFormatter,
276
+ M as getSumValue,
277
+ b as initChartOption,
278
+ S as limitDatas,
278
279
  I as monitorChartClickToVariable,
279
280
  O as setDefaultGrid,
280
- $ as setHomeChartInitConfigValue,
281
- N as sortDatas,
282
- v as updateClickVariablesForSelected
281
+ j as setHomeChartInitConfigValue,
282
+ y as sortDatas,
283
+ N as updateClickVariablesForSelected
283
284
  };
@@ -0,0 +1,27 @@
1
+ export declare function getBackFillDataKey(pageCode: string, dataId: string): string;
2
+ /**
3
+ * 缓存回填数据
4
+ * @param pageCode 页面编码
5
+ * @param data 数据
6
+ */
7
+ export declare function cacheBackfillData(pageCode: string, data: any): void;
8
+ /**
9
+ * 删除缓存回填数据
10
+ * @param pageCode 页面编码
11
+ * @param data 数据
12
+ */
13
+ export declare function removeCacheFillData(pageCode: string, data: any): void;
14
+ /**
15
+ * 删除缓存回填数据
16
+ * @param pageCode 页面编码
17
+ * @param dataId 数据ID
18
+ */
19
+ export declare function removeCacheFillDataById(pageCode: string, dataId: any): void;
20
+ /**
21
+ * sessionStorage中是否存在回填数据
22
+ * @param pageCode 页面编码
23
+ * @param dataId 数据ID
24
+ * @returns boolean
25
+ */
26
+ export declare function hasBackfillData(pageCode: string, dataId: any): boolean;
27
+ export declare function getRealFillData(pageCode: string, dataId: any, dbData: any): any;
@@ -0,0 +1,39 @@
1
+ import { getUsername as e } from "agilebuilder-ui/src/utils/auth";
2
+ function t(e2, t2) {
3
+ let i2 = "new";
4
+ return t2.id ? i2 = t2.id : t2.ID && (i2 = t2.ID), n(e2, i2);
5
+ }
6
+ function n(t2, n2) {
7
+ return n2 ? `${e()}_backfill_data_${t2}_${n2}` : `${e()}_backfill_data_${t2}_new`;
8
+ }
9
+ function i(e2, n2) {
10
+ sessionStorage.setItem(t(e2, n2), JSON.stringify(n2));
11
+ }
12
+ function o(e2, n2) {
13
+ sessionStorage.removeItem(t(e2, n2));
14
+ }
15
+ function r(e2, t2) {
16
+ sessionStorage.removeItem(n(e2, t2));
17
+ }
18
+ function s(e2, t2) {
19
+ return null !== sessionStorage.getItem(n(e2, t2));
20
+ }
21
+ function u(e2, t2, i2) {
22
+ const o2 = sessionStorage.getItem(n(e2, t2));
23
+ if (o2) {
24
+ const e3 = JSON.parse(o2);
25
+ let t3 = null;
26
+ e3.version ? t3 = e3.version : e3.VERSION && (t3 = e3.VERSION);
27
+ let n2 = null;
28
+ if (i2.version ? n2 = i2.version : i2.VERSION && (n2 = i2.VERSION), t3 == n2) return e3;
29
+ }
30
+ return i2;
31
+ }
32
+ export {
33
+ i as cacheBackfillData,
34
+ n as getBackFillDataKey,
35
+ u as getRealFillData,
36
+ s as hasBackfillData,
37
+ o as removeCacheFillData,
38
+ r as removeCacheFillDataById
39
+ };