super-page-runtime 2.3.50 → 2.3.51-sit1

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 (76) hide show
  1. package/dist/es/components/runtime/utils/api/page-expose-util.js +136 -136
  2. package/dist/es/components/runtime/utils/charts/chart-util.d.ts +0 -5
  3. package/dist/es/components/runtime/utils/charts/chart-util.js +121 -90
  4. package/dist/es/components/runtime/utils/events/event-util.js +123 -122
  5. package/dist/es/components/runtime/utils/events/print-label.js +33 -34
  6. package/dist/es/components/runtime/utils/events/standard-event.js +92 -92
  7. package/dist/es/components/runtime/utils/events/validator-util.js +206 -209
  8. package/dist/es/components/runtime/utils/page-init-util.js +45 -47
  9. package/dist/es/components/runtime/utils/table-utils.js +1 -1
  10. package/dist/es/components/runtime/views/assemblys/button/button/button-runtime.vue2.js +8 -7
  11. package/dist/es/components/runtime/views/assemblys/button/button-group/buttongroup-runtime.vue.js +1 -1
  12. package/dist/es/components/runtime/views/assemblys/button/button-group/buttongroup-runtime.vue2.js +26 -14
  13. package/dist/es/components/runtime/views/assemblys/button/dropdown/dropdown-runtime.vue2.js +3 -3
  14. package/dist/es/components/runtime/views/assemblys/button/export-pdf/exportpdf-runtime.vue2.js +1 -1
  15. package/dist/es/components/runtime/views/assemblys/button/print-label/printlabel-runtime.vue2.js +3 -3
  16. package/dist/es/components/runtime/views/assemblys/chart/column-line/column-line-runtime.vue2.js +1 -1
  17. package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-group.vue.js +6 -10
  18. package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header.vue.js +6 -8
  19. package/dist/es/components/runtime/views/assemblys/chart/common/common-homepage-search.vue2.js +1 -1
  20. package/dist/es/components/runtime/views/assemblys/chart/common/home-chart-condition-render.vue.js +8 -8
  21. package/dist/es/components/runtime/views/assemblys/chart/gauge/gauge-runtime.vue2.js +1 -1
  22. package/dist/es/components/runtime/views/assemblys/chart/pie/pie-runtime.vue2.js +1 -1
  23. package/dist/es/components/runtime/views/assemblys/chart/radar/radar-runtime.vue2.js +1 -1
  24. package/dist/es/components/runtime/views/assemblys/chart/scatter/scatter-runtime.vue2.js +1 -1
  25. package/dist/es/components/runtime/views/assemblys/chart/table/chart-table-util.js +99 -104
  26. package/dist/es/components/runtime/views/assemblys/chart/table/table-runtime.vue2.js +2 -3
  27. package/dist/es/components/runtime/views/assemblys/common/event-call-component.vue.js +13 -13
  28. package/dist/es/components/runtime/views/assemblys/common/export-form-report-dialog.vue.js +9 -11
  29. package/dist/es/components/runtime/views/assemblys/common/save-chart-condition-dialog.vue.js +1 -1
  30. package/dist/es/components/runtime/views/assemblys/container/card/card-runtime.vue2.js +3 -3
  31. package/dist/es/components/runtime/views/assemblys/container/collapse/collapse-runtime.vue2.js +3 -3
  32. package/dist/es/components/runtime/views/assemblys/container/container/container-runtime.vue2.js +3 -3
  33. package/dist/es/components/runtime/views/assemblys/container/fixed/YxAffix.vue2.js +0 -2
  34. package/dist/es/components/runtime/views/assemblys/container/flex/flex-runtime.vue2.js +3 -3
  35. package/dist/es/components/runtime/views/assemblys/container/form/form-runtime.vue2.js +3 -3
  36. package/dist/es/components/runtime/views/assemblys/container/iframe/iframe-runtime.vue2.js +5 -5
  37. package/dist/es/components/runtime/views/assemblys/container/tabs/tabs-runtime.vue.js +1 -1
  38. package/dist/es/components/runtime/views/assemblys/container/tabs/tabs-runtime.vue2.js +3 -3
  39. package/dist/es/components/runtime/views/assemblys/data/bar-code/barcode-runtime.vue2.js +9 -11
  40. package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue.js +4 -4
  41. package/dist/es/components/runtime/views/assemblys/data/table/sub-table-runtime.vue.js +3 -3
  42. package/dist/es/components/runtime/views/assemblys/data/table/table-runtime.vue2.js +1 -1
  43. package/dist/es/components/runtime/views/assemblys/data/tree/tree-runtime.vue2.js +16 -16
  44. package/dist/es/components/runtime/views/assemblys/form/checkbox/checkbox-runtime.vue2.js +3 -3
  45. package/dist/es/components/runtime/views/assemblys/form/common/title-suffix-element.vue.js +3 -3
  46. package/dist/es/components/runtime/views/assemblys/form/custom/custom-runtime.vue2.js +6 -6
  47. package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue2.js +97 -55
  48. package/dist/es/components/runtime/views/assemblys/form/dept-tree/depttree-runtime.vue2.js +3 -3
  49. package/dist/es/components/runtime/views/assemblys/form/divider/divider-runtime.vue2.js +3 -3
  50. package/dist/es/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue2.js +6 -8
  51. package/dist/es/components/runtime/views/assemblys/form/image-upload/imageupload-runtime.vue2.js +5 -6
  52. package/dist/es/components/runtime/views/assemblys/form/input-number/input-number-runtime.vue2.js +3 -3
  53. package/dist/es/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue2.js +48 -49
  54. package/dist/es/components/runtime/views/assemblys/form/label/label-runtime.vue.js +1 -1
  55. package/dist/es/components/runtime/views/assemblys/form/label/label-runtime.vue2.js +49 -29
  56. package/dist/es/components/runtime/views/assemblys/form/link/link-runtime.vue2.js +7 -9
  57. package/dist/es/components/runtime/views/assemblys/form/radio/radio-runtime.vue2.js +3 -3
  58. package/dist/es/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue2.js +1 -1
  59. package/dist/es/components/runtime/views/assemblys/form/select/select-runtime.vue.js +2 -1
  60. package/dist/es/components/runtime/views/assemblys/form/select/select-runtime.vue2.js +61 -62
  61. package/dist/es/components/runtime/views/assemblys/form/separatelabel/separatelabel-runtime.vue2.js +1 -1
  62. package/dist/es/components/runtime/views/assemblys/form/switch/switch-runtime.vue2.js +3 -3
  63. package/dist/es/components/runtime/views/assemblys/form/tag/tag-runtime.vue2.js +11 -11
  64. package/dist/es/components/runtime/views/assemblys/form/textarea/textarea-runtime.vue.js +1 -1
  65. package/dist/es/components/runtime/views/assemblys/form/textarea/textarea-runtime.vue2.js +14 -14
  66. package/dist/es/components/runtime/views/assemblys/home-chart-render.vue.js +3 -3
  67. package/dist/es/components/runtime/views/assemblys/object-render.vue.js +9 -11
  68. package/dist/es/components/runtime/views/assemblys/page-bottom.vue.js +2 -2
  69. package/dist/es/components/runtime/views/assemblys/workflow/component/workflow-opinion-box.vue2.js +3 -3
  70. package/dist/es/components/runtime/views/assemblys/workflow/workflow-button/workflowbutton-runtime.vue.js +1 -1
  71. package/dist/es/components/runtime/views/assemblys/workflow/workflow-button/workflowbutton-runtime.vue2.js +27 -23
  72. package/dist/es/components/runtime/views/home-chart.vue.js +7 -7
  73. package/dist/es/components/runtime/views/super-page-dialog.vue.js +6 -7
  74. package/dist/es/components/runtime/views/super-page.vue2.js +98 -99
  75. package/dist/es/style.css +41 -34
  76. package/package.json +3 -3
@@ -2,22 +2,22 @@ import t from "../../../../assets/chart-themes/bar-theme.js";
2
2
  import e from "../../../../assets/chart-themes/gauge-theme.js";
3
3
  import i from "../../../../assets/chart-themes/pie-theme.js";
4
4
  import n 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";
5
+ import r from "../../../../assets/chart-themes/scatter-theme.js";
6
+ import { getDefaultValue as s } from "../page-init-util.js";
7
7
  import { getValueFromSource as o, setValueForVariableName as a, getParamNames as l, getValueFromVariable as c, formatVariableValue as f, setVariableValue as u } from "../page-helper-util.js";
8
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 ? i[r2] : "radar" === o2 ? n[r2] : "scatter" === o2 ? s[r2] : t[r2];
9
+ import { appendDefaultMethods as h } from "../events/event-util.js";
10
+ var p = ((t2) => (t2.X_FIELD_NAME = "__x", t2.Y_TEMP_NAME = "__y", t2))(p || {});
11
+ function g(s2, o2 = "bar") {
12
+ return "bar" === o2 ? t[s2] : "gauge" === o2 ? e[s2] : "pie" === o2 ? i[s2] : "radar" === o2 ? n[s2] : "scatter" === o2 ? r[s2] : t[s2];
13
13
  }
14
14
  function m() {
15
15
  return [{ value: "theme1", label: "主题1" }, { value: "theme2", label: "主题2" }, { value: "theme3", label: "主题3" }];
16
16
  }
17
- function x(t2, e2, i2, n2, 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;
17
+ function x(t2, e2, i2, n2, r2) {
18
+ return function(s2) {
19
+ let o2 = s2 == null ? void 0 : s2.value;
20
+ if (r2 && (o2 = s2), null == o2 || null == o2) return o2;
21
21
  if (Array.isArray(o2)) return o2;
22
22
  if (isNaN(o2) || !t2 || !t2.indexOf) return o2;
23
23
  if (t2.indexOf("precision") > -1) {
@@ -41,23 +41,23 @@ function b(t2, e2) {
41
41
  t2.defaultSeries = i2;
42
42
  const n2 = e2.xAxis;
43
43
  n2 && n2.length > 0 && n2[0].data && (n2[0].data = []), t2.defaultXaxis = n2;
44
- const s2 = e2.yAxis;
45
- if (s2) for (const t3 of s2) t3.data && (t3.data = []), "auto" === t3._dataMin && (t3.min = function(t4) {
44
+ const r2 = e2.yAxis;
45
+ if (r2) for (const t3 of r2) t3.data && (t3.data = []), "auto" === t3._dataMin && (t3.min = function(t4) {
46
46
  if (t4.min) return 10 * Math.floor(t4.min / 10);
47
47
  }), "auto" === t3._dataMax && (t3.max = function(t4) {
48
48
  if (t4.max) return 10 * Math.ceil(t4.max / 10);
49
49
  });
50
- t2.defaultYaxis = s2;
50
+ t2.defaultYaxis = r2;
51
51
  }
52
52
  function I(t2, e2, i2) {
53
53
  if (!(i2 && e2 && e2.clickSet && t2)) return;
54
54
  const n2 = e2.clickSet;
55
- i2.on("click", function(s2) {
56
- let r2 = e2.highlightInfos ? e2.highlightInfos : [], o2 = -1;
57
- if (r2) {
55
+ i2.on("click", function(r2) {
56
+ let s2 = e2.highlightInfos ? e2.highlightInfos : [], o2 = -1;
57
+ if (s2) {
58
58
  const t3 = [];
59
- for (let a2 = 0; a2 < r2.length; a2++) {
60
- const l2 = r2[a2], c2 = l2.seriesIndex === s2.seriesIndex && l2.dataIndex === s2.dataIndex;
59
+ for (let a2 = 0; a2 < s2.length; a2++) {
60
+ const l2 = s2[a2], c2 = l2.seriesIndex === r2.seriesIndex && l2.dataIndex === r2.dataIndex;
61
61
  if (c2 || !n2.multiple) {
62
62
  if (n2.selected) {
63
63
  const t4 = "chart-pie" === e2.name ? "unselect" : "downplay";
@@ -66,33 +66,33 @@ function I(t2, e2, i2) {
66
66
  } else t3.push(l2);
67
67
  c2 && (o2 = a2);
68
68
  }
69
- r2 = t3;
69
+ s2 = t3;
70
70
  }
71
71
  if (-1 === o2) {
72
72
  if (n2.selected) {
73
73
  const t3 = "chart-pie" === e2.name ? "select" : "highlight";
74
- i2.dispatchAction({ type: t3, seriesIndex: s2.seriesIndex, dataIndex: s2.dataIndex });
74
+ i2.dispatchAction({ type: t3, seriesIndex: r2.seriesIndex, dataIndex: r2.dataIndex });
75
75
  }
76
- r2.push({ seriesIndex: s2.seriesIndex, dataIndex: s2.dataIndex });
76
+ s2.push({ seriesIndex: r2.seriesIndex, dataIndex: r2.dataIndex });
77
77
  }
78
- e2.highlightInfos = r2, N(t2, e2);
78
+ e2.highlightInfos = s2, A(t2, e2);
79
79
  });
80
80
  }
81
- function v(t2, e2, i2) {
81
+ function y(t2, e2, i2) {
82
82
  if (!i2 || !e2 || !t2) return;
83
83
  const n2 = e2.highlightInfos ? e2.highlightInfos : [];
84
84
  for (let t3 = 0; t3 < n2.length; t3++) {
85
- const s2 = n2[t3], r2 = "chart-pie" === e2.name ? "unselect" : "downplay";
86
- i2.dispatchAction({ type: r2, seriesIndex: s2.seriesIndex, dataIndex: s2.dataIndex });
85
+ const r2 = n2[t3], s2 = "chart-pie" === e2.name ? "unselect" : "downplay";
86
+ i2.dispatchAction({ type: s2, seriesIndex: r2.seriesIndex, dataIndex: r2.dataIndex });
87
87
  }
88
- e2.highlightInfos = [], N(t2, e2);
88
+ e2.highlightInfos = [], A(t2, e2);
89
89
  }
90
- function N(t2, e2) {
90
+ function A(t2, e2) {
91
91
  if (!e2.clickSet) return;
92
92
  const i2 = e2.clickSet, n2 = i2.variables;
93
93
  if (!n2 || 0 == n2.length) return;
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]));
94
+ const r2 = e2.highlightInfos ? e2.highlightInfos : [], s2 = e2.cacheDatas ? e2.cacheDatas : [], l2 = [], c2 = [];
95
+ for (const t3 of r2) c2.includes(t3.dataIndex) || (c2.push(t3.dataIndex), t3.dataIndex < s2.length && l2.push(s2[t3.dataIndex]));
96
96
  for (const e3 of n2) {
97
97
  if (!e3.fieldName || !e3.variable) continue;
98
98
  const n3 = [];
@@ -103,24 +103,24 @@ function N(t2, e2) {
103
103
  i2.multiple ? a(t2.entity, e3.variable, n3) : a(t2.entity, e3.variable, n3.length > 0 ? n3[0] : void 0);
104
104
  }
105
105
  }
106
- function y(t2, e2, i2) {
107
- const n2 = e2.items ? e2.items : [], s2 = e2.props ? e2.props.orderByTarget : "";
108
- let r2 = null;
109
- if ("x" == s2 || "X" == s2) r2 = "__x";
110
- else if (s2) {
111
- for (const t3 of n2) if (t3.uuid == s2) {
106
+ function v(t2, e2, i2) {
107
+ const n2 = e2.items ? e2.items : [], r2 = e2.props ? e2.props.orderByTarget : "";
108
+ let s2 = null;
109
+ if ("x" == r2 || "X" == r2) s2 = "__x";
110
+ else if (r2) {
111
+ for (const t3 of n2) if (t3.uuid == r2) {
112
112
  const e3 = t3.props ? t3.props : {}, i3 = e3.yaxisSource, n3 = e3.yaxisField;
113
113
  if (n3 && (!i3 || "variable" == i3)) {
114
- r2 = n3;
114
+ s2 = n3;
115
115
  break;
116
116
  }
117
117
  if ("formula" == i3 && e3.formula) {
118
- r2 = t3.uuid + "_field";
118
+ s2 = t3.uuid + "_field";
119
119
  break;
120
120
  }
121
121
  }
122
122
  }
123
- if (!r2) return;
123
+ if (!s2) return;
124
124
  const a2 = e2.props ? e2.props.orderSource : "";
125
125
  let l2 = e2.props ? e2.props.orderFix : "";
126
126
  if ("variable" == a2) {
@@ -128,19 +128,19 @@ function y(t2, e2, i2) {
128
128
  l2 = f(t2, i3);
129
129
  }
130
130
  l2 = "desc" == l2 || "DESC" == l2 ? "desc" : "asc", i2.sort((t3, e3) => {
131
- const i3 = o(t3, r2, void 0), n3 = o(e3, r2, void 0);
131
+ const i3 = o(t3, s2, void 0), n3 = o(e3, s2, void 0);
132
132
  return "desc" === l2 ? n3 - i3 : i3 - n3;
133
133
  });
134
134
  }
135
- function S(t2, e2, i2, n2, s2) {
135
+ function N(t2, e2, i2, n2, r2) {
136
136
  if (!i2) return i2;
137
- const r2 = e2.props ? e2.props : {};
138
- if (!r2.limitQuantity) return i2;
137
+ const s2 = e2.props ? e2.props : {};
138
+ if (!s2.limitQuantity) return i2;
139
139
  let a2 = null;
140
- if (r2.itemNumVariable ? (a2 = f(t2, r2.itemNumVariable), a2 = parseInt(a2)) : a2 = r2.itemNumFix ? r2.itemNumFix : 10, null == a2 || null == a2 || isNaN(a2)) return i2;
140
+ if (s2.itemNumVariable ? (a2 = f(t2, s2.itemNumVariable), a2 = parseInt(a2)) : a2 = s2.itemNumFix ? s2.itemNumFix : 10, null == a2 || null == a2 || isNaN(a2)) return i2;
141
141
  if (i2.length < a2) return i2;
142
- const l2 = r2.overItemAlias, c2 = [], u2 = {};
143
- n2 = n2 || [], s2 = s2 || [];
142
+ const l2 = s2.overItemAlias, c2 = [], u2 = {};
143
+ n2 = n2 || [], r2 = r2 || [];
144
144
  for (let t3 = 0; t3 < i2.length; t3++) {
145
145
  const e3 = i2[t3];
146
146
  if (t3 < a2) c2.push(e3);
@@ -153,7 +153,7 @@ function S(t2, e2, i2, n2, s2) {
153
153
  const n3 = u2[t4];
154
154
  n3.includes(i3) || n3.push(i3);
155
155
  }
156
- for (const t4 of s2) {
156
+ for (const t4 of r2) {
157
157
  if (!t4) continue;
158
158
  const i3 = o(e3, t4, void 0);
159
159
  if (isNaN(i3)) continue;
@@ -164,17 +164,17 @@ function S(t2, e2, i2, n2, s2) {
164
164
  }
165
165
  return l2 && (u2.__x = l2, c2.push(u2)), c2;
166
166
  }
167
- function F(t2, e2, i2) {
167
+ function S(t2, e2, i2) {
168
168
  const n2 = {};
169
- for (const s2 of t2) {
170
- const t3 = s2.props ? s2.props : {};
169
+ for (const r2 of t2) {
170
+ const t3 = r2.props ? r2.props : {};
171
171
  if ("formula" === t3.yaxisSource) {
172
- const s3 = l(t3.formula);
173
- for (const t4 of s3) if (!(t4 in n2)) {
174
- if (t4.startsWith("${min.")) n2[t4] = _(e2, t4.substring(6, t4.length - 1));
175
- else if (t4.startsWith("${max.")) n2[t4] = A(e2, t4.substring(6, t4.length - 1));
176
- else if (t4.startsWith("${sum.")) n2[t4] = M(e2, t4.substring(6, t4.length - 1));
177
- else if (t4.startsWith("${avg.")) n2[t4] = k(e2, t4.substring(6, t4.length - 1));
172
+ const r3 = l(t3.formula);
173
+ for (const t4 of r3) if (!(t4 in n2)) {
174
+ if (t4.startsWith("${min.")) n2[t4] = M(e2, t4.substring(6, t4.length - 1));
175
+ else if (t4.startsWith("${max.")) n2[t4] = F(e2, t4.substring(6, t4.length - 1));
176
+ else if (t4.startsWith("${sum.")) n2[t4] = _(e2, t4.substring(6, t4.length - 1));
177
+ else if (t4.startsWith("${avg.")) n2[t4] = w(e2, t4.substring(6, t4.length - 1));
178
178
  else if (t4.startsWith("${add.")) {
179
179
  const e3 = t4.substring(6, t4.length - 1);
180
180
  i2.add(e3);
@@ -184,7 +184,7 @@ function F(t2, e2, i2) {
184
184
  }
185
185
  return n2;
186
186
  }
187
- function _(t2, e2) {
187
+ function M(t2, e2) {
188
188
  let i2;
189
189
  for (const n2 of t2) {
190
190
  const t3 = parseFloat(o(n2, e2, null));
@@ -192,7 +192,7 @@ function _(t2, e2) {
192
192
  }
193
193
  return i2;
194
194
  }
195
- function A(t2, e2) {
195
+ function F(t2, e2) {
196
196
  let i2;
197
197
  for (const n2 of t2) {
198
198
  const t3 = parseFloat(o(n2, e2, null));
@@ -200,7 +200,7 @@ function A(t2, e2) {
200
200
  }
201
201
  return i2;
202
202
  }
203
- function M(t2, e2) {
203
+ function _(t2, e2) {
204
204
  let i2;
205
205
  for (const n2 of t2) {
206
206
  const t3 = parseFloat(o(n2, e2, null));
@@ -208,50 +208,81 @@ function M(t2, e2) {
208
208
  }
209
209
  return i2;
210
210
  }
211
- function k(t2, e2) {
212
- const i2 = M(t2, e2);
211
+ function w(t2, e2) {
212
+ const i2 = _(t2, e2);
213
213
  return void 0 === i2 || 0 === t2.length ? i2 : parseFloat((i2 / t2.length).toFixed(5));
214
214
  }
215
- function w(t2, e2, i2, n2) {
215
+ function k(t2, e2, i2, n2) {
216
216
  if (!t2) return;
217
217
  if (e2) for (const i3 in e2) t2 = t2.replace(new RegExp("\\${add." + i3 + "}", "g"), e2[i3]);
218
- const s2 = l(t2);
219
- for (const e3 of s2) {
220
- let s3 = null;
221
- s3 = e3.startsWith("${row.") ? o(i2, e3.substring(6, e3.length - 1), null) : c(n2.entity, e3), t2 = t2.replace(new RegExp(e3.replace("$", "\\$"), "g"), s3);
218
+ const r2 = l(t2);
219
+ for (const e3 of r2) {
220
+ let r3 = null;
221
+ r3 = e3.startsWith("${row.") ? o(i2, e3.substring(6, e3.length - 1), null) : c(n2.entity, e3), t2 = t2.replace(new RegExp(e3.replace("$", "\\$"), "g"), r3);
222
222
  }
223
223
  t2.includes("return ") || (t2 = "return " + t2);
224
- const r2 = new Function("params", t2);
225
- return p(r2, n2), r2({ pageContext: n2, row: i2 });
224
+ const s2 = new Function("params", t2);
225
+ return h(s2, n2), s2({ pageContext: n2, row: i2 });
226
+ }
227
+ function O(t2) {
228
+ const e2 = String(t2 ?? "");
229
+ if (e2.length <= 8) return e2;
230
+ const i2 = [];
231
+ for (let t3 = 0; t3 < e2.length; t3 += 8) i2.push(e2.slice(t3, t3 + 8));
232
+ return i2.join("\n");
226
233
  }
227
- function $(t2, e2) {
234
+ function j(t2, e2) {
228
235
  if (!t2 || !t2.$el) return;
229
236
  const i2 = t2.$el.getElementsByTagName("canvas");
230
237
  if (!i2 || 0 === i2.length) return;
231
- const n2 = i2[0], s2 = n2.width + ":" + n2.height;
232
- return { isTable: false, fileContent: n2.toDataURL(), fileSize: s2, title: e2 == null ? void 0 : e2.title };
238
+ const n2 = i2[0];
239
+ let r2 = n2.toDataURL(), s2 = n2.width, o2 = n2.height;
240
+ const a2 = t2.chart;
241
+ if (a2 && "function" == typeof a2.getDataURL) {
242
+ const t3 = a2.getOption();
243
+ if (t3 && t3.xAxis) try {
244
+ const e3 = a2.getWidth(), i3 = a2.getHeight();
245
+ s2 = function(t4, e4) {
246
+ let i4 = 0;
247
+ const n3 = Array.isArray(t4.series) ? t4.series : [];
248
+ for (const t5 of n3) Array.isArray(t5.data) && (i4 = Math.max(i4, t5.data.length));
249
+ const r3 = Array.isArray(t4.xAxis) ? t4.xAxis[0] : t4.xAxis;
250
+ return r3 && Array.isArray(r3.data) && (i4 = Math.max(i4, r3.data.length)), Math.min(2400, Math.max(e4, 60 * i4 + 200));
251
+ }(t3, e3), o2 = i3, a2.setOption(function(t4) {
252
+ const e4 = { dataZoom: [] };
253
+ if (t4.xAxis) {
254
+ const i4 = Array.isArray(t4.xAxis) ? t4.xAxis : [t4.xAxis];
255
+ e4.xAxis = i4.map((t5) => ({ ...t5, axisLabel: { ...t5.axisLabel || {}, interval: 0, hideOverlap: false, formatter: O } }));
256
+ }
257
+ return e4;
258
+ }(t3), { replaceMerge: ["dataZoom", "xAxis"] }), a2.resize({ width: s2, height: o2 }), r2 = a2.getDataURL({ type: "png", pixelRatio: 2, backgroundColor: "#fff" }), a2.setOption(t3, true), a2.resize({ width: e3, height: i3 });
259
+ } catch (t4) {
260
+ s2 = n2.width, o2 = n2.height, r2 = n2.toDataURL();
261
+ }
262
+ }
263
+ return { isTable: false, fileContent: r2, fileSize: s2 + ":" + o2, title: e2 == null ? void 0 : e2.title };
233
264
  }
234
- function j(t2, e2, i2) {
265
+ function $(t2, e2, i2) {
235
266
  const n2 = window.localStorage.getItem("HOME_MY_CHARTS_CONDITIONS");
236
- let s2 = true;
267
+ let r2 = true;
237
268
  if (n2) {
238
269
  const t3 = JSON.parse(n2);
239
270
  if (t3[i2]) {
240
271
  const n3 = t3[i2];
241
272
  if (Object.keys(n3).length > 0) {
242
- s2 = false;
273
+ r2 = false;
243
274
  for (const t4 in n3) null !== n3[t4] && void 0 !== n3[t4] && a(e2.entity, t4, n3[t4]);
244
275
  }
245
276
  }
246
277
  }
247
- if (s2 && t2) {
278
+ if (r2 && t2) {
248
279
  for (const i3 of t2) if (i3.prop && i3.value) {
249
- const t3 = r(e2, i3.value, "input-text", false), n3 = i3.prop.substring(2, i3.prop.length - 1).split(".");
280
+ const t3 = s(e2, i3.value, "input-text", false), n3 = i3.prop.substring(2, i3.prop.length - 1).split(".");
250
281
  null != t3 && u(e2.entity, n3, t3);
251
282
  }
252
283
  }
253
284
  }
254
- function O(t2) {
285
+ function D(t2) {
255
286
  if (t2 == null ? void 0 : t2.grid) {
256
287
  const e2 = t2.grid, i2 = (t3) => !t3 || "0" === t3;
257
288
  i2(e2.top) && i2(e2.right) && i2(e2.bottom) && i2(e2.left) && Object.assign(e2, { right: "10%", bottom: "60", left: "10%" });
@@ -265,24 +296,24 @@ function E(t2) {
265
296
  }
266
297
  }
267
298
  export {
268
- h as CommonName,
269
- F as caculateFormulaValue,
270
- v as clearChartSelected,
271
- w as executeChartFormula,
272
- $ as exportCommonChart,
299
+ p as CommonName,
300
+ S as caculateFormulaValue,
301
+ y as clearChartSelected,
302
+ k as executeChartFormula,
303
+ j as exportCommonChart,
273
304
  E as formatToolboxI18n,
274
- k as getAvgValue,
305
+ w as getAvgValue,
275
306
  g as getCustomTheme,
276
307
  m as getCustomThemeOptions,
277
- A as getMaxValue,
278
- _ as getMinValue,
308
+ F as getMaxValue,
309
+ M as getMinValue,
279
310
  x as getNumFormatter,
280
- M as getSumValue,
311
+ _ as getSumValue,
281
312
  b as initChartOption,
282
- S as limitDatas,
313
+ N as limitDatas,
283
314
  I as monitorChartClickToVariable,
284
- O as setDefaultGrid,
285
- j as setHomeChartInitConfigValue,
286
- y as sortDatas,
287
- N as updateClickVariablesForSelected
315
+ D as setDefaultGrid,
316
+ $ as setHomeChartInitConfigValue,
317
+ v as sortDatas,
318
+ A as updateClickVariablesForSelected
288
319
  };