super-page-runtime 2.3.18 → 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 (113) 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/api/page-expose-util.js +70 -70
  12. package/dist/es/components/runtime/utils/assemblys-config.js +1 -1
  13. package/dist/es/components/runtime/utils/charts/chart-columnline-util.js +67 -66
  14. package/dist/es/components/runtime/utils/charts/chart-gauge-util.js +31 -30
  15. package/dist/es/components/runtime/utils/charts/chart-pie-util.js +66 -65
  16. package/dist/es/components/runtime/utils/charts/chart-radar-util.js +47 -46
  17. package/dist/es/components/runtime/utils/charts/chart-scatter-util.js +33 -32
  18. package/dist/es/components/runtime/utils/charts/chart-util.d.ts +2 -1
  19. package/dist/es/components/runtime/utils/charts/chart-util.js +129 -119
  20. package/dist/es/components/runtime/utils/events/data-backfill-util.d.ts +27 -0
  21. package/dist/es/components/runtime/utils/events/data-backfill-util.js +39 -0
  22. package/dist/es/components/runtime/utils/events/event-util.js +3 -3
  23. package/dist/es/components/runtime/utils/events/print-label.js +25 -26
  24. package/dist/es/components/runtime/utils/events/standard-event.d.ts +3 -1
  25. package/dist/es/components/runtime/utils/events/standard-event.js +577 -512
  26. package/dist/es/components/runtime/utils/events/validator-util.js +1 -1
  27. package/dist/es/components/runtime/utils/page-init-util.d.ts +2 -1
  28. package/dist/es/components/runtime/utils/page-init-util.js +87 -68
  29. package/dist/es/components/runtime/utils/page-store.js +10 -10
  30. package/dist/es/components/runtime/utils/table-utils.js +1 -1
  31. package/dist/es/components/runtime/views/assemblys/button/button/button-runtime.vue2.js +3 -3
  32. package/dist/es/components/runtime/views/assemblys/button/button-group/buttongroup-runtime.vue2.js +3 -3
  33. package/dist/es/components/runtime/views/assemblys/button/dropdown/dropdown-runtime.vue2.js +3 -3
  34. package/dist/es/components/runtime/views/assemblys/button/export-pdf/exportpdf-runtime.vue2.js +1 -1
  35. package/dist/es/components/runtime/views/assemblys/button/print-label/printlabel-runtime.vue2.js +3 -3
  36. package/dist/es/components/runtime/views/assemblys/chart/column-line/column-line-runtime.vue2.js +1 -1
  37. package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-group.vue.js +6 -10
  38. package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header.vue.js +6 -8
  39. package/dist/es/components/runtime/views/assemblys/chart/common/common-homepage-search.vue2.js +1 -1
  40. package/dist/es/components/runtime/views/assemblys/chart/gauge/gauge-runtime.vue2.js +1 -1
  41. package/dist/es/components/runtime/views/assemblys/chart/pie/pie-runtime.vue2.js +1 -1
  42. package/dist/es/components/runtime/views/assemblys/chart/radar/radar-runtime.vue2.js +1 -1
  43. package/dist/es/components/runtime/views/assemblys/chart/scatter/scatter-runtime.vue2.js +1 -1
  44. package/dist/es/components/runtime/views/assemblys/chart/table/chart-table-util.js +93 -98
  45. package/dist/es/components/runtime/views/assemblys/chart/table/table-runtime.vue2.js +148 -145
  46. package/dist/es/components/runtime/views/assemblys/common/event-call-component.vue.d.ts +5 -0
  47. package/dist/es/components/runtime/views/assemblys/common/event-call-component.vue.js +20 -0
  48. package/dist/es/components/runtime/views/assemblys/common/event-call-component.vue2.js +4 -0
  49. package/dist/es/components/runtime/views/assemblys/common/export-form-report-dialog.vue.js +9 -11
  50. package/dist/es/components/runtime/views/assemblys/common/save-chart-condition-dialog.vue.js +1 -1
  51. package/dist/es/components/runtime/views/assemblys/common/task-informition-dialog.vue.js +3 -3
  52. package/dist/es/components/runtime/views/assemblys/container/card/card-runtime.vue2.js +3 -3
  53. package/dist/es/components/runtime/views/assemblys/container/collapse/collapse-runtime.vue2.js +3 -3
  54. package/dist/es/components/runtime/views/assemblys/container/container/container-runtime.vue2.js +3 -3
  55. package/dist/es/components/runtime/views/assemblys/container/fixed/YxAffix.vue2.js +0 -2
  56. package/dist/es/components/runtime/views/assemblys/container/flex/flex-runtime.vue2.js +3 -3
  57. package/dist/es/components/runtime/views/assemblys/container/form/form-runtime.vue2.js +3 -3
  58. package/dist/es/components/runtime/views/assemblys/container/iframe/iframe-runtime.vue2.js +1 -1
  59. package/dist/es/components/runtime/views/assemblys/container/tabs/tabs-runtime.vue2.js +3 -3
  60. package/dist/es/components/runtime/views/assemblys/container/tools/tools-runtime.vue.js +1 -1
  61. package/dist/es/components/runtime/views/assemblys/container/tools/tools-runtime.vue2.js +37 -25
  62. package/dist/es/components/runtime/views/assemblys/data/bar-code/barcode-runtime.vue2.js +10 -12
  63. package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue.js +194 -194
  64. package/dist/es/components/runtime/views/assemblys/data/table/table-runtime.vue2.js +1 -1
  65. package/dist/es/components/runtime/views/assemblys/data/tree/tree-runtime.vue2.js +16 -16
  66. package/dist/es/components/runtime/views/assemblys/form/checkbox/checkbox-runtime.vue2.js +3 -3
  67. package/dist/es/components/runtime/views/assemblys/form/common/title-suffix-element.vue.js +3 -3
  68. package/dist/es/components/runtime/views/assemblys/form/custom/custom-runtime.vue2.js +6 -6
  69. package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue2.js +55 -54
  70. package/dist/es/components/runtime/views/assemblys/form/dept-tree/depttree-runtime.vue2.js +3 -3
  71. package/dist/es/components/runtime/views/assemblys/form/divider/divider-runtime.vue2.js +3 -3
  72. package/dist/es/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue2.js +4 -4
  73. package/dist/es/components/runtime/views/assemblys/form/input-number/input-number-runtime.vue2.js +3 -3
  74. package/dist/es/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue2.js +37 -38
  75. package/dist/es/components/runtime/views/assemblys/form/label/label-runtime.vue2.js +5 -7
  76. package/dist/es/components/runtime/views/assemblys/form/link/link-runtime.vue2.js +3 -4
  77. package/dist/es/components/runtime/views/assemblys/form/radio/radio-runtime.vue2.js +3 -3
  78. package/dist/es/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue2.js +2 -2
  79. package/dist/es/components/runtime/views/assemblys/form/select/select-runtime.vue2.js +43 -27
  80. package/dist/es/components/runtime/views/assemblys/form/separatelabel/separatelabel-runtime.vue2.js +1 -1
  81. package/dist/es/components/runtime/views/assemblys/form/switch/switch-runtime.vue2.js +3 -3
  82. package/dist/es/components/runtime/views/assemblys/form/tag/tag-runtime.vue2.js +11 -11
  83. package/dist/es/components/runtime/views/assemblys/form/textarea/textarea-runtime.vue2.js +3 -3
  84. package/dist/es/components/runtime/views/assemblys/home-chart-render.vue.js +3 -3
  85. package/dist/es/components/runtime/views/assemblys/object-render.vue.js +11 -13
  86. package/dist/es/components/runtime/views/assemblys/page-bottom.vue.d.ts +14 -0
  87. package/dist/es/components/runtime/views/assemblys/page-bottom.vue.js +6 -0
  88. package/dist/es/components/runtime/views/assemblys/page-bottom.vue2.js +4 -0
  89. package/dist/es/components/runtime/views/assemblys/workflow/component/workflow-opinion-box.vue.d.ts +14 -0
  90. package/dist/es/components/runtime/views/assemblys/workflow/component/workflow-opinion-box.vue.js +7 -0
  91. package/dist/es/components/runtime/views/assemblys/workflow/component/workflow-opinion-box.vue2.js +26 -0
  92. package/dist/es/components/runtime/views/assemblys/workflow/extract-workflow/extract-workflow-runtime-dialog.vue.js +7 -0
  93. package/dist/es/components/runtime/views/assemblys/workflow/extract-workflow/extract-workflow-runtime-dialog.vue2.js +28 -0
  94. package/dist/es/components/runtime/views/assemblys/workflow/extract-workflow/extract-workflow-runtime.vue.js +1 -1
  95. package/dist/es/components/runtime/views/assemblys/workflow/extract-workflow/extract-workflow-runtime.vue2.js +1 -1
  96. package/dist/es/components/runtime/views/assemblys/workflow/workflow-button/workflowbutton-runtime.vue.js +1 -1
  97. package/dist/es/components/runtime/views/assemblys/workflow/workflow-button/workflowbutton-runtime.vue2.js +9 -9
  98. package/dist/es/components/runtime/views/assemblys/workflow/workflow-node/workflownode-runtime.vue2.js +22 -13
  99. package/dist/es/components/runtime/views/home-chart.vue.js +7 -7
  100. package/dist/es/components/runtime/views/super-page-dialog.vue.js +0 -1
  101. package/dist/es/components/runtime/views/super-page.vue.d.ts +9 -0
  102. package/dist/es/components/runtime/views/super-page.vue.js +1 -1
  103. package/dist/es/components/runtime/views/super-page.vue2.js +180 -168
  104. package/dist/es/i18n/langs/cn.js +1 -1
  105. package/dist/es/i18n/langs/en.js +1 -1
  106. package/dist/es/style.css +134 -86
  107. package/package.json +2 -2
  108. package/dist/es/assets/chart-themes/theme1.d.ts +0 -4
  109. package/dist/es/assets/chart-themes/theme1.js +0 -4
  110. package/dist/es/assets/chart-themes/theme2.d.ts +0 -4
  111. package/dist/es/assets/chart-themes/theme2.js +0 -4
  112. package/dist/es/assets/chart-themes/theme3.d.ts +0 -4
  113. package/dist/es/assets/chart-themes/theme3.js +0 -4
@@ -1,37 +1,38 @@
1
- import { formatVariableValue as e, getValueFromSource as o } from "../page-helper-util.js";
2
- import { deepCopy as t } from "../common-util.js";
3
- import { setDefaultGrid as s } from "./chart-util.js";
4
- function r(r2, l, i, p) {
5
- if (!p || !p.result) return;
6
- s(i);
7
- const n = p && p.result ? p.result : {}, a = l.serviceDataField;
8
- let u = null;
9
- a ? u = n[a] : n && (u = [n]), u || (u = []);
10
- const c = l.props ? l.props.nameSource : void 0, d = l.props ? l.props.nameField : void 0, m = l.props ? l.props.nameFixed : void 0, f = l.props ? l.props.yaxisField : void 0, h = [d], v = [], g = [];
11
- for (const t2 of u) {
12
- if (!t2) continue;
13
- let s2 = null;
14
- s2 = "fixed" == c ? e(r2, m) : o(t2, d, void 0), v.push(s2);
15
- const l2 = o(t2, f, void 0);
16
- g.push(l2);
1
+ import { formatVariableValue as e, getValueFromSource as t } from "../page-helper-util.js";
2
+ import { deepCopy as o } from "../common-util.js";
3
+ import { setDefaultGrid as r, formatToolboxI18n as s } from "./chart-util.js";
4
+ import { handleChartEvent as l } from "../events/event-util.js";
5
+ function i(i2, p, a, n) {
6
+ if (!n || !n.result) return;
7
+ l(i2, p, "beforeUpdateChart", a, { resultData: n }), r(a);
8
+ const u = n && n.result ? n.result : {}, c = p.serviceDataField;
9
+ let m = null;
10
+ c ? m = u[c] : u && (m = [u]), m || (m = []);
11
+ const d = p.props ? p.props.nameSource : void 0, f = p.props ? p.props.nameField : void 0, h = p.props ? p.props.nameFixed : void 0, v = p.props ? p.props.yaxisField : void 0, g = [f], F = [], j = [];
12
+ for (const o2 of m) {
13
+ if (!o2) continue;
14
+ let r2 = null;
15
+ r2 = "fixed" == d ? e(i2, h) : t(o2, f, void 0), F.push(r2);
16
+ const s2 = t(o2, v, void 0);
17
+ j.push(s2);
17
18
  }
18
- const F = l.defaultSeries;
19
- let x = F[0].pieColors;
20
- x = x || [];
21
- let j = F[0].pieColorMap;
22
- j = j || {};
19
+ const x = p.defaultSeries;
20
+ let C = x[0].pieColors;
21
+ C = C || [];
22
+ let D = x[0].pieColorMap;
23
+ D = D || {};
23
24
  const S = [];
24
- for (let e2 = 0; e2 < v.length && e2 < g.length; e2++) {
25
- const o2 = { value: g[e2], name: v[e2] };
26
- if (e2 < x.length || j[o2.name]) {
27
- let t2 = j[o2.name];
28
- t2 || (t2 = x[e2]), t2 && (o2.itemStyle = { color: t2 });
25
+ for (let e2 = 0; e2 < F.length && e2 < j.length; e2++) {
26
+ const t2 = { value: j[e2], name: F[e2] };
27
+ if (e2 < C.length || D[t2.name]) {
28
+ let o2 = D[t2.name];
29
+ o2 || (o2 = C[e2]), o2 && (t2.itemStyle = { color: o2 });
29
30
  }
30
- S.push(o2);
31
+ S.push(t2);
31
32
  }
32
- const y = t(F);
33
- y[0].data = S, i.series = [y[0]], updateLegend(i), l.groupFields = h, l.cacheDatas = u, l.rawResult = p;
33
+ const y = o(x);
34
+ y[0].data = S, a.series = [y[0]], s(a), l(i2, p, "afterUpdateChart", a, { resultData: n }), p.groupFields = g, p.cacheDatas = m, p.rawResult = n;
34
35
  }
35
36
  export {
36
- r as updateChartOption
37
+ i as updateChartOption
37
38
  };
@@ -1,81 +1,82 @@
1
1
  import { getValueFromSource as o, setValueForVariableName as t } from "../page-helper-util.js";
2
- import { deepCopy as r } from "../common-util.js";
3
- import { setDefaultGrid as s, CommonName as e, caculateFormulaValue as l, executeChartFormula as n, sortDatas as p, limitDatas as i } from "./chart-util.js";
4
- function u(u2, c, a, f) {
5
- if (!f || !f.result) return;
6
- s(a);
7
- const g = f && f.result ? f.result : {};
8
- let m = f && f.groupValue ? f.groupValue : void 0;
9
- const h = c.serviceDataField;
10
- let d = null;
11
- h ? d = g[h] : g && (d = Array.isArray(g) ? g : [g]), d || (d = []);
12
- let y = c.props ? c.props.groups : null;
13
- if (y || (y = []), !m || 0 === m.length) {
14
- m = [];
15
- for (const o2 of y) m.push(o2.group);
2
+ import { deepCopy as e } from "../common-util.js";
3
+ import { setDefaultGrid as r, CommonName as s, caculateFormulaValue as l, executeChartFormula as n, sortDatas as p, limitDatas as i, formatToolboxI18n as a } from "./chart-util.js";
4
+ import { handleChartEvent as u } from "../events/event-util.js";
5
+ function c(c2, f, g, m) {
6
+ if (!m || !m.result) return;
7
+ u(c2, f, "beforeUpdateChart", g, { resultData: m }), r(g);
8
+ const h = m && m.result ? m.result : {};
9
+ let d = m && m.groupValue ? m.groupValue : void 0;
10
+ const y = f.serviceDataField;
11
+ let v = null;
12
+ y ? v = h[y] : h && (v = Array.isArray(h) ? h : [h]), v || (v = []);
13
+ let x = f.props ? f.props.groups : null;
14
+ if (x || (x = []), !d || 0 === d.length) {
15
+ d = [];
16
+ for (const o2 of x) d.push(o2.group);
16
17
  }
17
- const x = {}, v = [], E = [];
18
- for (const o2 of y) x[o2.group] = o2.target, o2.target && !v.includes(o2.target) && (v.push(o2.target), m.includes(o2.group) && E.push(o2.target));
19
- let F = c.props ? c.props.mulGroupShow : "";
20
- F = "break" == F ? "\r\n" : " ";
21
- for (const t2 of d) {
18
+ const D = {}, E = [], F = [];
19
+ for (const o2 of x) D[o2.group] = o2.target, o2.target && !E.includes(o2.target) && (E.push(o2.target), d.includes(o2.group) && F.push(o2.target));
20
+ let S = f.props ? f.props.mulGroupShow : "";
21
+ S = "break" == S ? "\r\n" : " ";
22
+ for (const t2 of v) {
22
23
  if (!t2) continue;
23
- const r2 = [];
24
- for (const s3 of m) {
25
- const e2 = x[s3], l2 = o(t2, e2, void 0);
26
- l2 && r2.push(l2);
24
+ const e2 = [];
25
+ for (const r3 of d) {
26
+ const s2 = D[r3], l2 = o(t2, s2, void 0);
27
+ l2 && e2.push(l2);
27
28
  }
28
- const s2 = r2.join(F);
29
- t2[e.X_FIELD_NAME] = s2;
29
+ const r2 = e2.join(S);
30
+ t2[s.X_FIELD_NAME] = r2;
30
31
  }
31
- const S = c.items ? c.items : [];
32
- if (0 == S.length) return;
33
- const _ = c.props ? c.props : {};
34
- let A = _.yaxisField;
35
- if (S[0].props.yaxisField = A, S[0].props.yaxisSource = _.yaxisSource, S[0].props.formula = _.formula, "formula" === _.yaxisSource) {
36
- const t2 = [], r2 = l(S, d, t2);
37
- let s2 = _.formula ? _.formula : "";
38
- for (const o2 in r2) s2 = s2.replace(new RegExp(o2.replace("$", "\\$"), "g"), r2[o2]);
39
- A = e.Y_TEMP_NAME;
32
+ const _ = f.items ? f.items : [];
33
+ if (0 == _.length) return;
34
+ const j = f.props ? f.props : {};
35
+ let A = j.yaxisField;
36
+ if (_[0].props.yaxisField = A, _[0].props.yaxisSource = j.yaxisSource, _[0].props.formula = j.formula, "formula" === j.yaxisSource) {
37
+ const t2 = [], e2 = l(_, v, t2);
38
+ let r2 = j.formula ? j.formula : "";
39
+ for (const o2 in e2) r2 = r2.replace(new RegExp(o2.replace("$", "\\$"), "g"), e2[o2]);
40
+ A = s.Y_TEMP_NAME;
40
41
  const p2 = {};
41
- for (const r3 of d) {
42
- if (!r3) continue;
43
- for (const s3 of t2) {
44
- const t3 = o(r3, s3, void 0);
45
- let e3 = p2[s3];
46
- void 0 === t3 || isNaN(t3) || (void 0 === e3 ? e3 = t3 : e3 += t3), p2[s3] = e3;
42
+ for (const e3 of v) {
43
+ if (!e3) continue;
44
+ for (const r3 of t2) {
45
+ const t3 = o(e3, r3, void 0);
46
+ let s3 = p2[r3];
47
+ void 0 === t3 || isNaN(t3) || (void 0 === s3 ? s3 = t3 : s3 += t3), p2[r3] = s3;
47
48
  }
48
- const e2 = n(s2, p2, r3, u2);
49
- r3[A] = e2;
49
+ const s2 = n(r2, p2, e3, c2);
50
+ e3[A] = s2;
50
51
  }
51
52
  }
52
- S[0].props.yaxisField = A, S[0].props.yaxisSource = "", p(u2, c, d), d = i(u2, c, d, v, [A]);
53
- const D = [], M = [];
54
- for (const t2 of d) {
53
+ _[0].props.yaxisField = A, _[0].props.yaxisSource = "", p(c2, f, v), v = i(c2, f, v, E, [A]);
54
+ const M = [], N = [];
55
+ for (const t2 of v) {
55
56
  if (!t2) continue;
56
- D.push(t2[e.X_FIELD_NAME]);
57
- const r2 = o(t2, A, void 0);
58
- M.push(r2);
57
+ M.push(t2[s.X_FIELD_NAME]);
58
+ const e2 = o(t2, A, void 0);
59
+ N.push(e2);
59
60
  }
60
- const N = c.defaultSeries;
61
- let j = N[0].pieColors;
62
- j = j || [];
63
- let b = N[0].pieColorMap;
64
- b = b || {};
65
- const w = [];
66
- for (let o2 = 0; o2 < D.length && o2 < M.length; o2++) {
67
- const t2 = { value: M[o2], name: D[o2] };
68
- if (o2 < j.length || b[t2.name]) {
69
- let r2 = b[t2.name];
70
- r2 || (r2 = j[o2]), r2 && (t2.itemStyle = { color: r2 });
61
+ const b = f.defaultSeries;
62
+ let C = b[0].pieColors;
63
+ C = C || [];
64
+ let w = b[0].pieColorMap;
65
+ w = w || {};
66
+ const I = [];
67
+ for (let o2 = 0; o2 < M.length && o2 < N.length; o2++) {
68
+ const t2 = { value: N[o2], name: M[o2] };
69
+ if (o2 < C.length || w[t2.name]) {
70
+ let e2 = w[t2.name];
71
+ e2 || (e2 = C[o2]), e2 && (t2.itemStyle = { color: e2 });
71
72
  }
72
- w.push(t2);
73
+ I.push(t2);
73
74
  }
74
- const I = r(N);
75
- I[0].data = w, a.series = [I[0]];
76
- const V = c.props ? c.props.selGroupVariable : null;
77
- !(c.props ? c.props.enableDrill : null) && V && (c.highlightInfos = [], t(u2.entity, V, null)), c.groupFields = E, c.cacheDatas = d, c.rawResult = f;
75
+ const V = e(b);
76
+ V[0].data = I, g.series = [V[0]], a(g);
77
+ const G = f.props ? f.props.selGroupVariable : null;
78
+ !(f.props ? f.props.enableDrill : null) && G && (f.highlightInfos = [], t(c2.entity, G, null)), u(c2, f, "afterUpdateChart", g, { resultData: m }), f.groupFields = F, f.cacheDatas = v, f.rawResult = m;
78
79
  }
79
80
  export {
80
- u as updateChartOption
81
+ c as updateChartOption
81
82
  };
@@ -1,55 +1,56 @@
1
1
  import { getValueFromSource as e } from "../page-helper-util.js";
2
- import { deepCopy as o } from "../common-util.js";
3
- import { setDefaultGrid as i, caculateFormulaValue as t, executeChartFormula as a } from "./chart-util.js";
4
- function s(s2, r, l, u) {
5
- if (!u || !u.result) return;
6
- i(l);
7
- const f = u && u.result ? u.result : {}, d = r.serviceDataField;
8
- let n = null;
9
- d ? n = f[d] : f && (n = Array.isArray(f) ? f : [f]), n || (n = []);
10
- const c = r.items ? r.items : [], p = [], m = {}, x = [], v = t(c, n, x);
11
- for (const e2 of c) {
12
- const o2 = e2.props ? e2.props : {}, i2 = o2.yaxisSource, t2 = o2.yaxisField;
13
- let a2 = null;
14
- if (!t2 || i2 && "variable" != i2) if ("formula" == i2) {
15
- let i3 = o2.formula ? o2.formula : "";
16
- for (const e3 in v) i3 = i3.replace(new RegExp(e3.replace("$", "\\$"), "g"), v[e3]);
17
- a2 = { uuid: e2.uuid, type: "formula", formula: i3, data: [] };
18
- } else a2 = { uuid: e2.uuid, type: "fixed", field: o2.yaxisFix, data: [] };
19
- else a2 = { uuid: e2.uuid, type: "variable", field: t2, data: [] };
20
- a2 && (p.push(a2), m[a2.uuid] = a2);
2
+ import { deepCopy as t } from "../common-util.js";
3
+ import { setDefaultGrid as o, caculateFormulaValue as a, executeChartFormula as i, formatToolboxI18n as r } from "./chart-util.js";
4
+ import { handleChartEvent as s } from "../events/event-util.js";
5
+ function l(l2, u, f, d) {
6
+ if (!d || !d.result) return;
7
+ s(l2, u, "beforeUpdateChart", f, { resultData: d }), o(f);
8
+ const n = d && d.result ? d.result : {}, p = u.serviceDataField;
9
+ let c = null;
10
+ p ? c = n[p] : n && (c = Array.isArray(n) ? n : [n]), c || (c = []);
11
+ const m = u.items ? u.items : [], v = [], x = {}, h = [], y = a(m, c, h);
12
+ for (const e2 of m) {
13
+ const t2 = e2.props ? e2.props : {}, o2 = t2.yaxisSource, a2 = t2.yaxisField;
14
+ let i2 = null;
15
+ if (!a2 || o2 && "variable" != o2) if ("formula" == o2) {
16
+ let o3 = t2.formula ? t2.formula : "";
17
+ for (const e3 in y) o3 = o3.replace(new RegExp(e3.replace("$", "\\$"), "g"), y[e3]);
18
+ i2 = { uuid: e2.uuid, type: "formula", formula: o3, data: [] };
19
+ } else i2 = { uuid: e2.uuid, type: "fixed", field: t2.yaxisFix, data: [] };
20
+ else i2 = { uuid: e2.uuid, type: "variable", field: a2, data: [] };
21
+ i2 && (v.push(i2), x[i2.uuid] = i2);
21
22
  }
22
- const y = r.props ? r.props : {}, h = y.nameField, F = y.maxSource, b = y.maxField, g = y.maxFixed, j = [], S = {};
23
- for (const o2 of n) {
24
- if (!o2) continue;
25
- const i2 = e(o2, h, void 0);
26
- let t2 = null;
27
- t2 = F && "variable" != F ? g : e(o2, b, void 0), j.push({ text: i2, max: t2 });
28
- for (const i3 of x) {
29
- const t3 = e(o2, i3, void 0);
30
- let a2 = S[i3];
31
- void 0 === t3 || isNaN(t3) || (void 0 === a2 ? a2 = t3 : a2 += t3), S[i3] = a2;
23
+ const F = u.props ? u.props : {}, b = F.nameField, j = F.maxSource, D = F.maxField, g = F.maxFixed, S = [], w = {};
24
+ for (const t2 of c) {
25
+ if (!t2) continue;
26
+ const o2 = e(t2, b, void 0);
27
+ let a2 = null;
28
+ a2 = j && "variable" != j ? g : e(t2, D, void 0), S.push({ text: o2, max: a2 });
29
+ for (const o3 of h) {
30
+ const a3 = e(t2, o3, void 0);
31
+ let i2 = w[o3];
32
+ void 0 === a3 || isNaN(a3) || (void 0 === i2 ? i2 = a3 : i2 += a3), w[o3] = i2;
32
33
  }
33
- for (const i3 of p) {
34
- const t3 = i3.data;
35
- if ("fixed" == i3.type) t3.push(i3.field);
36
- else if ("variable" == i3.type) {
37
- const a2 = e(o2, i3.field, void 0);
38
- t3.push(a2);
39
- } else if ("formula" == i3.type) {
40
- const e2 = a(i3.formula, S, o2, s2);
41
- t3.push(e2);
42
- } else t3.push(void 0);
34
+ for (const o3 of v) {
35
+ const a3 = o3.data;
36
+ if ("fixed" == o3.type) a3.push(o3.field);
37
+ else if ("variable" == o3.type) {
38
+ const i2 = e(t2, o3.field, void 0);
39
+ a3.push(i2);
40
+ } else if ("formula" == o3.type) {
41
+ const e2 = i(o3.formula, w, t2, l2);
42
+ a3.push(e2);
43
+ } else a3.push(void 0);
43
44
  }
44
45
  }
45
- l.radar[0].indicator = j;
46
- const w = r.defaultSeries, A = o(w), D = A[0].data;
47
- for (const e2 of D) {
48
- const o2 = m[e2.uuid];
49
- e2.value = o2.data;
46
+ f.radar[0].indicator = S, r(f);
47
+ const A = u.defaultSeries, C = t(A), N = C[0].data;
48
+ for (const e2 of N) {
49
+ const t2 = x[e2.uuid];
50
+ e2.value = t2.data;
50
51
  }
51
- l.series = A, r.cacheDatas = n, r.rawResult = u;
52
+ f.series = C, s(l2, u, "afterUpdateChart", f, { resultData: d }), u.cacheDatas = c, u.rawResult = d;
52
53
  }
53
54
  export {
54
- s as updateChartOption
55
+ l as updateChartOption
55
56
  };
@@ -1,46 +1,47 @@
1
1
  import { getValueFromSource as o } from "../page-helper-util.js";
2
2
  import { deepCopy as s } from "../common-util.js";
3
- import { setDefaultGrid as i, caculateFormulaValue as e, executeChartFormula as r } from "./chart-util.js";
4
- function t(t2, a, l, u) {
5
- if (!u || !u.result) return;
6
- i(l);
7
- const f = u && u.result ? u.result : {}, c = a.serviceDataField;
8
- let d = null;
9
- c ? d = f[c] : f && (d = Array.isArray(f) ? f : [f]), d || (d = []);
10
- const n = a.items ? a.items : [], p = [], m = {};
11
- for (const o2 of n) {
12
- const s2 = o2.props ? o2.props : {}, i2 = o2.props ? o2.style : {}, e2 = s2.xaxisField, r2 = s2.sizeField, t3 = { uuid: o2.uuid, xaxisField: e2, yaxisField: s2.yaxisField, yaxisSource: s2.yaxisSource, formula: s2.formula, sizeField: r2, symbolSize: i2.symbolSize, data: [] };
13
- p.push(t3), m[t3.uuid] = t3;
3
+ import { setDefaultGrid as e, caculateFormulaValue as i, executeChartFormula as t, formatToolboxI18n as r } from "./chart-util.js";
4
+ import { handleChartEvent as a } from "../events/event-util.js";
5
+ function l(l2, u, f, c) {
6
+ if (!c || !c.result) return;
7
+ a(l2, u, "beforeUpdateChart", f, { resultData: c }), e(f);
8
+ const d = c && c.result ? c.result : {}, n = u.serviceDataField;
9
+ let p = null;
10
+ n ? p = d[n] : d && (p = Array.isArray(d) ? d : [d]), p || (p = []);
11
+ const m = u.items ? u.items : [], x = [], y = {};
12
+ for (const o2 of m) {
13
+ const s2 = o2.props ? o2.props : {}, e2 = o2.props ? o2.style : {}, i2 = s2.xaxisField, t2 = s2.sizeField, r2 = { uuid: o2.uuid, xaxisField: i2, yaxisField: s2.yaxisField, yaxisSource: s2.yaxisSource, formula: s2.formula, sizeField: t2, symbolSize: e2.symbolSize, data: [] };
14
+ x.push(r2), y[r2.uuid] = r2;
14
15
  }
15
- const x = [], y = e(n, d, x);
16
- for (const o2 of p) if ("formula" === o2.yaxisSource) {
16
+ const h = [], F = i(m, p, h);
17
+ for (const o2 of x) if ("formula" === o2.yaxisSource) {
17
18
  let s2 = o2.formula ? o2.formula : "";
18
- for (const o3 in y) s2 = s2.replace(new RegExp(o3.replace("$", "\\$"), "g"), y[o3]);
19
+ for (const o3 in F) s2 = s2.replace(new RegExp(o3.replace("$", "\\$"), "g"), F[o3]);
19
20
  o2.formula = s2;
20
21
  }
21
- const F = {};
22
- for (const s2 of d) if (s2) {
23
- for (const i2 of x) {
24
- const e2 = o(s2, i2, void 0);
25
- let r2 = F[i2];
26
- void 0 === e2 || isNaN(e2) || (void 0 === r2 ? r2 = e2 : r2 += e2), F[i2] = r2;
22
+ const v = {};
23
+ for (const s2 of p) if (s2) {
24
+ for (const e2 of h) {
25
+ const i2 = o(s2, e2, void 0);
26
+ let t2 = v[e2];
27
+ void 0 === i2 || isNaN(i2) || (void 0 === t2 ? t2 = i2 : t2 += i2), v[e2] = t2;
27
28
  }
28
- for (const i2 of p) {
29
- const e2 = i2.data, a2 = [];
30
- if (a2.push(o(s2, i2.xaxisField, void 0)), "formula" === i2.yaxisSource) {
31
- const o2 = r(i2.formula, F, s2, t2);
32
- a2.push(o2);
33
- } else a2.push(o(s2, i2.yaxisField, void 0));
34
- i2.sizeField ? a2.push(o(s2, i2.xaxisField, void 0)) : a2.push(i2.symbolSize), e2.push(a2);
29
+ for (const e2 of x) {
30
+ const i2 = e2.data, r2 = [];
31
+ if (r2.push(o(s2, e2.xaxisField, void 0)), "formula" === e2.yaxisSource) {
32
+ const o2 = t(e2.formula, v, s2, l2);
33
+ r2.push(o2);
34
+ } else r2.push(o(s2, e2.yaxisField, void 0));
35
+ e2.sizeField ? r2.push(o(s2, e2.xaxisField, void 0)) : r2.push(e2.symbolSize), i2.push(r2);
35
36
  }
36
37
  }
37
- const h = a.defaultSeries, S = s(h);
38
- for (const o2 of S) {
39
- const s2 = m[o2.uuid];
38
+ const S = u.defaultSeries, z = s(S);
39
+ for (const o2 of z) {
40
+ const s2 = y[o2.uuid];
40
41
  o2.data = s2.data;
41
42
  }
42
- l.series = S, a.cacheDatas = d, a.rawResult = u;
43
+ f.series = z, r(f), a(l2, u, "afterUpdateChart", f, { resultData: c }), u.cacheDatas = p, u.rawResult = c;
43
44
  }
44
45
  export {
45
- t as updateChartOption
46
+ l as updateChartOption
46
47
  };
@@ -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
@@ -112,3 +112,4 @@ export declare function exportCommonChart(chartRef: any, headerInfo: any): {
112
112
  };
113
113
  export declare function setHomeChartInitConfigValue(initConfig: any, tempContext: any, homeChartSettingUserId: any): void;
114
114
  export declare function setDefaultGrid(chartOption: any): void;
115
+ export declare function formatToolboxI18n(chartOption: any): void;