super-page-runtime 2.2.0 → 2.2.1

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/_virtual/_plugin-vue_export-helper.js +1 -2
  2. package/dist/es/components/runtime/index.d.ts +2 -1
  3. package/dist/es/components/runtime/utils/api/page-expose-util.js +70 -72
  4. package/dist/es/components/runtime/utils/assemblys-config.js +2 -4
  5. package/dist/es/components/runtime/utils/barcode-util.js +1 -2
  6. package/dist/es/components/runtime/utils/charts/chart-columnline-util.js +59 -81
  7. package/dist/es/components/runtime/utils/charts/chart-gauge-util.js +2 -4
  8. package/dist/es/components/runtime/utils/charts/chart-pie-util.js +8 -16
  9. package/dist/es/components/runtime/utils/charts/chart-radar-util.js +10 -18
  10. package/dist/es/components/runtime/utils/charts/chart-scatter-util.js +20 -25
  11. package/dist/es/components/runtime/utils/charts/chart-util.d.ts +1 -0
  12. package/dist/es/components/runtime/utils/charts/chart-util.js +200 -218
  13. package/dist/es/components/runtime/utils/common-util.js +7 -14
  14. package/dist/es/components/runtime/utils/events/event-util.js +97 -115
  15. package/dist/es/components/runtime/utils/events/print-label.js +20 -21
  16. package/dist/es/components/runtime/utils/events/standard-event.d.ts +2 -2
  17. package/dist/es/components/runtime/utils/events/standard-event.js +295 -337
  18. package/dist/es/components/runtime/utils/events/validator-util.js +85 -116
  19. package/dist/es/components/runtime/utils/form/date-shortcuts.js +1 -2
  20. package/dist/es/components/runtime/utils/form/scan-util.js +10 -17
  21. package/dist/es/components/runtime/utils/global-refs.js +7 -14
  22. package/dist/es/components/runtime/utils/i18n-util.js +1 -2
  23. package/dist/es/components/runtime/utils/interfaces/page-design-types.d.ts +2 -0
  24. package/dist/es/components/runtime/utils/page-helper-util.js +66 -116
  25. package/dist/es/components/runtime/utils/page-init-util.d.ts +6 -1
  26. package/dist/es/components/runtime/utils/page-init-util.js +65 -69
  27. package/dist/es/components/runtime/utils/page-permission-util.js +2 -4
  28. package/dist/es/components/runtime/utils/page-store.d.ts +2 -2
  29. package/dist/es/components/runtime/utils/table-utils.js +4 -8
  30. package/dist/es/components/runtime/utils/tree-utils.js +13 -15
  31. package/dist/es/components/runtime/views/assemblys/button/button/button-runtime.vue2.js +2 -2
  32. package/dist/es/components/runtime/views/assemblys/button/button-group/buttongroup-runtime.vue2.js +2 -2
  33. package/dist/es/components/runtime/views/assemblys/button/dropdown/dropdown-runtime.vue2.js +3 -4
  34. package/dist/es/components/runtime/views/assemblys/button/export-pdf/exportpdf-runtime.vue2.js +2 -2
  35. package/dist/es/components/runtime/views/assemblys/button/print-label/printlabel-runtime.vue2.js +2 -2
  36. package/dist/es/components/runtime/views/assemblys/chart/column-line/column-line-runtime.vue2.js +24 -28
  37. package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-breadcrumb.vue.js +2 -2
  38. package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-group.vue.js +2 -2
  39. package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header.vue.js +44 -40
  40. package/dist/es/components/runtime/views/assemblys/chart/common/common-homepage-search.vue.js +44 -0
  41. package/dist/es/components/runtime/views/assemblys/chart/common/common-homepage-search.vue2.js +4 -0
  42. package/dist/es/components/runtime/views/assemblys/chart/gauge/gauge-runtime.vue2.js +20 -20
  43. package/dist/es/components/runtime/views/assemblys/chart/pie/pie-runtime.vue2.js +20 -20
  44. package/dist/es/components/runtime/views/assemblys/chart/radar/radar-runtime.vue2.js +20 -20
  45. package/dist/es/components/runtime/views/assemblys/chart/scatter/scatter-runtime.vue2.js +22 -22
  46. package/dist/es/components/runtime/views/assemblys/chart/table/chart-table-util.d.ts +34 -1
  47. package/dist/es/components/runtime/views/assemblys/chart/table/chart-table-util.js +205 -170
  48. package/dist/es/components/runtime/views/assemblys/chart/table/group-column-item.vue.js +2 -2
  49. package/dist/es/components/runtime/views/assemblys/chart/table/group-column.vue.js +2 -2
  50. package/dist/es/components/runtime/views/assemblys/chart/table/normal-column.vue.js +19 -50
  51. package/dist/es/components/runtime/views/assemblys/chart/table/table-pageination.vue.js +2 -2
  52. package/dist/es/components/runtime/views/assemblys/chart/table/table-runtime.vue2.js +151 -120
  53. package/dist/es/components/runtime/views/assemblys/common/export-form-report-dialog.vue.d.ts +4 -4
  54. package/dist/es/components/runtime/views/assemblys/common/export-form-report-dialog.vue.js +2 -2
  55. package/dist/es/components/runtime/views/assemblys/common/remove-signer-dialog.vue.d.ts +6 -6
  56. package/dist/es/components/runtime/views/assemblys/common/remove-signer-dialog.vue.js +9 -11
  57. package/dist/es/components/runtime/views/assemblys/common/task-informition-dialog.vue.d.ts +6 -6
  58. package/dist/es/components/runtime/views/assemblys/common/task-informition-dialog.vue.js +2 -2
  59. package/dist/es/components/runtime/views/assemblys/container/card/card-runtime.vue2.js +2 -2
  60. package/dist/es/components/runtime/views/assemblys/container/collapse/collapse-runtime.vue2.js +2 -2
  61. package/dist/es/components/runtime/views/assemblys/container/container/container-runtime.vue2.js +2 -2
  62. package/dist/es/components/runtime/views/assemblys/container/flex/flex-runtime.vue2.js +2 -2
  63. package/dist/es/components/runtime/views/assemblys/container/form/form-runtime.vue2.js +2 -2
  64. package/dist/es/components/runtime/views/assemblys/container/iframe/iframe-runtime.vue2.js +2 -2
  65. package/dist/es/components/runtime/views/assemblys/container/tabs/tabs-runtime.vue2.js +2 -2
  66. package/dist/es/components/runtime/views/assemblys/container/tools/tools-runtime.vue2.js +2 -2
  67. package/dist/es/components/runtime/views/assemblys/data/bar-code/barcode-runtime.vue2.js +7 -7
  68. package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue.js +60 -72
  69. package/dist/es/components/runtime/views/assemblys/data/table/sub-table-runtime.vue.js +91 -95
  70. package/dist/es/components/runtime/views/assemblys/data/table/table-runtime.vue2.js +6 -9
  71. package/dist/es/components/runtime/views/assemblys/data/tree/tree-runtime.vue2.js +5 -5
  72. package/dist/es/components/runtime/views/assemblys/error-render.vue.d.ts +4 -4
  73. package/dist/es/components/runtime/views/assemblys/error-render.vue.js +2 -2
  74. package/dist/es/components/runtime/views/assemblys/form/checkbox/checkbox-runtime.vue2.js +6 -8
  75. package/dist/es/components/runtime/views/assemblys/form/common/title-suffix-element.vue.js +4 -6
  76. package/dist/es/components/runtime/views/assemblys/form/custom/custom-runtime.vue2.js +7 -9
  77. package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue2.js +10 -13
  78. package/dist/es/components/runtime/views/assemblys/form/dept-tree/depttree-runtime.vue2.js +25 -28
  79. package/dist/es/components/runtime/views/assemblys/form/divider/divider-runtime.vue2.js +3 -4
  80. package/dist/es/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue2.js +3 -4
  81. package/dist/es/components/runtime/views/assemblys/form/input-number/input-number-runtime.vue2.js +5 -5
  82. package/dist/es/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue2.js +9 -10
  83. package/dist/es/components/runtime/views/assemblys/form/label/label-runtime.vue2.js +9 -11
  84. package/dist/es/components/runtime/views/assemblys/form/link/link-runtime.vue2.js +2 -2
  85. package/dist/es/components/runtime/views/assemblys/form/placeholder/placeholder-runtime.vue.js +1 -1
  86. package/dist/es/components/runtime/views/assemblys/form/placeholder/placeholder-runtime.vue2.js +2 -2
  87. package/dist/es/components/runtime/views/assemblys/form/radio/radio-runtime.vue2.js +15 -20
  88. package/dist/es/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue2.js +20 -25
  89. package/dist/es/components/runtime/views/assemblys/form/select/select-runtime.vue2.js +15 -20
  90. package/dist/es/components/runtime/views/assemblys/form/separatelabel/separatelabel-runtime.vue2.js +2 -2
  91. package/dist/es/components/runtime/views/assemblys/form/switch/switch-runtime.vue2.js +2 -2
  92. package/dist/es/components/runtime/views/assemblys/form/tag/tag-runtime.vue2.js +4 -5
  93. package/dist/es/components/runtime/views/assemblys/form/textarea/textarea-runtime.vue2.js +5 -5
  94. package/dist/es/components/runtime/views/assemblys/home-chart-render.vue.d.ts +17 -0
  95. package/dist/es/components/runtime/views/assemblys/home-chart-render.vue.js +97 -0
  96. package/dist/es/components/runtime/views/assemblys/home-chart-render.vue2.js +4 -0
  97. package/dist/es/components/runtime/views/assemblys/object-render.vue.d.ts +1 -1
  98. package/dist/es/components/runtime/views/assemblys/object-render.vue.js +33 -43
  99. package/dist/es/components/runtime/views/assemblys/workflow/picture-flow/pictureflow-runtime.vue2.js +3 -4
  100. package/dist/es/components/runtime/views/assemblys/workflow/text-history/textflow-runtime.vue2.js +3 -4
  101. package/dist/es/components/runtime/views/assemblys/workflow/workflow-button/workflowbutton-runtime.vue2.js +3 -4
  102. package/dist/es/components/runtime/views/assemblys/workflow/workflow-node/workflownode-runtime.vue2.js +2 -2
  103. package/dist/es/components/runtime/views/home-chart.vue.d.ts +23 -0
  104. package/dist/es/components/runtime/views/home-chart.vue.js +36 -0
  105. package/dist/es/components/runtime/views/home-chart.vue2.js +4 -0
  106. package/dist/es/components/runtime/views/super-page-dialog.vue.d.ts +3 -3
  107. package/dist/es/components/runtime/views/super-page-dialog.vue.js +15 -13
  108. package/dist/es/components/runtime/views/super-page.vue.d.ts +15 -6
  109. package/dist/es/components/runtime/views/super-page.vue.js +171 -182
  110. package/dist/es/index.d.ts +2 -2
  111. package/dist/es/index.js +6 -4
  112. package/package.json +74 -74
  113. package/dist/es/components/runtime/views/assemblys/form/placeholder/placeholder-runtime.vue3.js +0 -1
@@ -2,8 +2,7 @@ import { getValueFromSource as o } from "../page-helper-util.js";
2
2
  import { deepCopy as s } from "../common-util.js";
3
3
  import { caculateFormulaValue as i, executeChartFormula as e } from "./chart-util.js";
4
4
  function r(r2, t, a, l) {
5
- if (!l || !l.result)
6
- return;
5
+ if (!l || !l.result) return;
7
6
  const u = l && l.result ? l.result : {}, f = t.serviceDataField;
8
7
  let c = null;
9
8
  f ? c = u[f] : u && (c = Array.isArray(u) ? u : [u]), c || (c = []);
@@ -13,31 +12,27 @@ function r(r2, t, a, l) {
13
12
  n.push(t2), p[t2.uuid] = t2;
14
13
  }
15
14
  const m = [], x = i(d, c, m);
16
- for (const o2 of n)
17
- if ("formula" === o2.yaxisSource) {
18
- let s2 = o2.formula ? o2.formula : "";
19
- for (const o3 in x)
20
- s2 = s2.replace(new RegExp(o3.replace("$", "\\$"), "g"), x[o3]);
21
- o2.formula = s2;
22
- }
15
+ for (const o2 of n) if ("formula" === o2.yaxisSource) {
16
+ let s2 = o2.formula ? o2.formula : "";
17
+ for (const o3 in x) s2 = s2.replace(new RegExp(o3.replace("$", "\\$"), "g"), x[o3]);
18
+ o2.formula = s2;
19
+ }
23
20
  const y = {};
24
- for (const s2 of c)
25
- if (s2) {
26
- for (const i2 of m) {
27
- const e2 = o(s2, i2, void 0);
28
- let r3 = y[i2];
29
- void 0 === e2 || isNaN(e2) || (void 0 === r3 ? r3 = e2 : r3 += e2), y[i2] = r3;
30
- }
31
- for (const i2 of n) {
32
- const t2 = i2.data, a2 = [];
33
- if (a2.push(o(s2, i2.xaxisField, void 0)), "formula" === i2.yaxisSource) {
34
- const o2 = e(i2.formula, y, s2, r2);
35
- a2.push(o2);
36
- } else
37
- a2.push(o(s2, i2.yaxisField, void 0));
38
- i2.sizeField ? a2.push(o(s2, i2.xaxisField, void 0)) : a2.push(i2.symbolSize), t2.push(a2);
39
- }
21
+ for (const s2 of c) if (s2) {
22
+ for (const i2 of m) {
23
+ const e2 = o(s2, i2, void 0);
24
+ let r3 = y[i2];
25
+ void 0 === e2 || isNaN(e2) || (void 0 === r3 ? r3 = e2 : r3 += e2), y[i2] = r3;
40
26
  }
27
+ for (const i2 of n) {
28
+ const t2 = i2.data, a2 = [];
29
+ if (a2.push(o(s2, i2.xaxisField, void 0)), "formula" === i2.yaxisSource) {
30
+ const o2 = e(i2.formula, y, s2, r2);
31
+ a2.push(o2);
32
+ } else a2.push(o(s2, i2.yaxisField, void 0));
33
+ i2.sizeField ? a2.push(o(s2, i2.xaxisField, void 0)) : a2.push(i2.symbolSize), t2.push(a2);
34
+ }
35
+ }
41
36
  const F = t.defaultSeries, h = s(F);
42
37
  for (const o2 of h) {
43
38
  const s2 = p[o2.uuid];
@@ -109,3 +109,4 @@ export declare function exportCommonChart(chartRef: any): {
109
109
  fileContent: any;
110
110
  fileSize: string;
111
111
  };
112
+ export declare function setHomeChartInitConfigValue(initConfig: any, tempContext: any, homeChartSettingUserId: any): void;
@@ -1,291 +1,273 @@
1
- import e from "../../../../assets/chart-themes/theme1.js";
2
- import t from "../../../../assets/chart-themes/theme2.js";
1
+ import t from "../../../../assets/chart-themes/theme1.js";
2
+ import e from "../../../../assets/chart-themes/theme2.js";
3
3
  import n from "../../../../assets/chart-themes/theme3.js";
4
- import { getValueFromSource as i, setValueForVariableName as s, formatVariableValue as o, getParamNames as r, getValueFromVariable as a } from "../page-helper-util.js";
5
- import { appendDefaultMethods as l } from "../events/event-util.js";
6
- var c = ((e2) => (e2.X_FIELD_NAME = "__x", e2.Y_TEMP_NAME = "__y", e2))(c || {});
7
- const f = { theme1: e, theme2: t, theme3: n };
8
- function u(e2) {
9
- return f[e2];
4
+ import { getDefaultValue as i } from "../page-init-util.js";
5
+ import { getValueFromSource as s, setValueForVariableName as o, getParamNames as r, formatVariableValue as l, getValueFromVariable as a, setVariableValue as c } from "../page-helper-util.js";
6
+ import { appendDefaultMethods as f } from "../events/event-util.js";
7
+ var u = ((t2) => (t2.X_FIELD_NAME = "__x", t2.Y_TEMP_NAME = "__y", t2))(u || {});
8
+ const p = { theme1: t, theme2: e, theme3: n };
9
+ function d(t2) {
10
+ return p[t2];
10
11
  }
11
- function d() {
12
+ function h() {
12
13
  return [{ value: "theme1", label: "主题1" }, { value: "theme2", label: "主题2" }, { value: "theme3", label: "主题3" }];
13
14
  }
14
- function p(e2, t2, n2, i2, s2) {
15
+ function m(t2, e2, n2, i2, s2) {
15
16
  return function(o2) {
16
17
  let r2 = o2.value;
17
- if (s2 && (r2 = o2), null == r2 || null == r2)
18
- return r2;
19
- if (Array.isArray(r2))
20
- return r2;
21
- if (isNaN(r2) || !e2 || !e2.indexOf)
22
- return r2;
23
- if (e2.indexOf("precision") > -1) {
24
- let e3 = parseInt(t2);
25
- (null == e3 || isNaN(e3)) && (e3 = 2), r2 = parseFloat(parseFloat(r2).toFixed(e3));
18
+ if (s2 && (r2 = o2), null == r2 || null == r2) return r2;
19
+ if (Array.isArray(r2)) return r2;
20
+ if (isNaN(r2) || !t2 || !t2.indexOf) return r2;
21
+ if (t2.indexOf("precision") > -1) {
22
+ let t3 = parseInt(e2);
23
+ (null == t3 || isNaN(t3)) && (t3 = 2), r2 = parseFloat(parseFloat(r2).toFixed(t3));
26
24
  }
27
- let a2 = "";
28
- e2.indexOf("prefix") > -1 && n2 && (a2 = n2);
29
25
  let l2 = "";
30
- return e2.indexOf("append") > -1 && i2 && (l2 = i2), a2 + r2.toLocaleString() + l2;
26
+ t2.indexOf("prefix") > -1 && n2 && (l2 = n2);
27
+ let a2 = "";
28
+ return t2.indexOf("append") > -1 && i2 && (a2 = i2), l2 + r2.toLocaleString() + a2;
31
29
  };
32
30
  }
33
- function h(e2, t2) {
34
- if (!t2)
35
- return;
36
- if (t2.tooltipFormatterArgs && (t2.tooltip || (t2.tooltip = {}), t2.tooltip.valueFormatter = p.apply(t2, t2.tooltipFormatterArgs)), t2.series) {
37
- const n3 = e2.props ? e2.props.enableDrill : null;
38
- for (const i3 of t2.series)
39
- t2.radar || (i3.data = []), i3.labelFormatterArgs && (i3.label || (i3.label = {}), i3.label.formatter = p.apply(i3, i3.labelFormatterArgs)), !n3 && e2.clickSet && e2.clickSet.selected && i3.emphasis && (i3.emphasis.disabled = false), "pie" === i3.type && e2.clickSet && e2.clickSet.selected && (e2.clickSet.multiple ? i3.selectedMode = "multiple" : i3.selectedMode = "single");
31
+ function g(t2, e2) {
32
+ if (!e2) return;
33
+ if (e2.tooltipFormatterArgs && (e2.tooltip || (e2.tooltip = {}), e2.tooltip.valueFormatter = m.apply(e2, e2.tooltipFormatterArgs)), e2.series) {
34
+ const n3 = t2.props ? t2.props.enableDrill : null;
35
+ 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");
40
36
  }
41
- if (t2.radar)
42
- for (const e3 of t2.radar)
43
- e3.indicator = [];
44
- const n2 = t2.series;
45
- e2.defaultSeries = n2;
46
- const i2 = t2.xAxis;
47
- i2 && i2.length > 0 && i2[0].data && (i2[0].data = []), e2.defaultXaxis = i2;
48
- const s2 = t2.yAxis;
49
- if (s2)
50
- for (const e3 of s2)
51
- e3.data && (e3.data = []), "auto" === e3._dataMin && (e3.min = function(e4) {
52
- if (e4.min)
53
- return 10 * Math.floor(e4.min / 10);
54
- }), "auto" === e3._dataMax && (e3.max = function(e4) {
55
- if (e4.max)
56
- return 10 * Math.ceil(e4.max / 10);
57
- });
58
- e2.defaultYaxis = s2;
37
+ if (e2.radar) for (const t3 of e2.radar) t3.indicator = [];
38
+ const n2 = e2.series;
39
+ t2.defaultSeries = n2;
40
+ const i2 = e2.xAxis;
41
+ i2 && i2.length > 0 && i2[0].data && (i2[0].data = []), t2.defaultXaxis = i2;
42
+ const s2 = e2.yAxis;
43
+ if (s2) for (const t3 of s2) t3.data && (t3.data = []), "auto" === t3._dataMin && (t3.min = function(t4) {
44
+ if (t4.min) return 10 * Math.floor(t4.min / 10);
45
+ }), "auto" === t3._dataMax && (t3.max = function(t4) {
46
+ if (t4.max) return 10 * Math.ceil(t4.max / 10);
47
+ });
48
+ t2.defaultYaxis = s2;
59
49
  }
60
- function m(e2, t2, n2) {
61
- if (!(n2 && t2 && t2.clickSet && e2))
62
- return;
63
- const i2 = t2.clickSet;
50
+ function x(t2, e2, n2) {
51
+ if (!(n2 && e2 && e2.clickSet && t2)) return;
52
+ const i2 = e2.clickSet;
64
53
  n2.on("click", function(s2) {
65
- let o2 = t2.highlightInfos ? t2.highlightInfos : [], r2 = -1;
54
+ let o2 = e2.highlightInfos ? e2.highlightInfos : [], r2 = -1;
66
55
  if (o2) {
67
- const e3 = [];
68
- for (let a2 = 0; a2 < o2.length; a2++) {
69
- const l2 = o2[a2], c2 = l2.seriesIndex === s2.seriesIndex && l2.dataIndex === s2.dataIndex;
56
+ const t3 = [];
57
+ for (let l2 = 0; l2 < o2.length; l2++) {
58
+ const a2 = o2[l2], c2 = a2.seriesIndex === s2.seriesIndex && a2.dataIndex === s2.dataIndex;
70
59
  if (c2 || !i2.multiple) {
71
60
  if (i2.selected) {
72
- const e4 = "chart-pie" === t2.name ? "unselect" : "downplay";
73
- n2.dispatchAction({ type: e4, seriesIndex: l2.seriesIndex, dataIndex: l2.dataIndex });
61
+ const t4 = "chart-pie" === e2.name ? "unselect" : "downplay";
62
+ n2.dispatchAction({ type: t4, seriesIndex: a2.seriesIndex, dataIndex: a2.dataIndex });
74
63
  }
75
- } else
76
- e3.push(l2);
77
- c2 && (r2 = a2);
64
+ } else t3.push(a2);
65
+ c2 && (r2 = l2);
78
66
  }
79
- o2 = e3;
67
+ o2 = t3;
80
68
  }
81
69
  if (-1 === r2) {
82
70
  if (i2.selected) {
83
- const e3 = "chart-pie" === t2.name ? "select" : "highlight";
84
- n2.dispatchAction({ type: e3, seriesIndex: s2.seriesIndex, dataIndex: s2.dataIndex });
71
+ const t3 = "chart-pie" === e2.name ? "select" : "highlight";
72
+ n2.dispatchAction({ type: t3, seriesIndex: s2.seriesIndex, dataIndex: s2.dataIndex });
85
73
  }
86
74
  o2.push({ seriesIndex: s2.seriesIndex, dataIndex: s2.dataIndex });
87
75
  }
88
- t2.highlightInfos = o2, x(e2, t2);
76
+ e2.highlightInfos = o2, b(t2, e2);
89
77
  });
90
78
  }
91
- function g(e2, t2, n2) {
92
- if (!n2 || !t2 || !e2)
93
- return;
94
- const i2 = t2.highlightInfos ? t2.highlightInfos : [];
95
- for (let e3 = 0; e3 < i2.length; e3++) {
96
- const s2 = i2[e3], o2 = "chart-pie" === t2.name ? "unselect" : "downplay";
79
+ function I(t2, e2, n2) {
80
+ if (!n2 || !e2 || !t2) return;
81
+ const i2 = e2.highlightInfos ? e2.highlightInfos : [];
82
+ for (let t3 = 0; t3 < i2.length; t3++) {
83
+ const s2 = i2[t3], o2 = "chart-pie" === e2.name ? "unselect" : "downplay";
97
84
  n2.dispatchAction({ type: o2, seriesIndex: s2.seriesIndex, dataIndex: s2.dataIndex });
98
85
  }
99
- t2.highlightInfos = [], x(e2, t2);
86
+ e2.highlightInfos = [], b(t2, e2);
100
87
  }
101
- function x(e2, t2) {
102
- if (!t2.clickSet)
103
- return;
104
- const n2 = t2.clickSet, o2 = n2.variables;
105
- if (!o2 || 0 == o2.length)
106
- return;
107
- const r2 = t2.highlightInfos ? t2.highlightInfos : [], a2 = t2.cacheDatas ? t2.cacheDatas : [], l2 = [], c2 = [];
108
- for (const e3 of r2)
109
- c2.includes(e3.dataIndex) || (c2.push(e3.dataIndex), e3.dataIndex < a2.length && l2.push(a2[e3.dataIndex]));
110
- for (const t3 of o2) {
111
- if (!t3.fieldName || !t3.variable)
112
- continue;
113
- const o3 = [];
114
- for (const e3 of l2) {
115
- const n3 = i(e3, t3.fieldName, void 0);
116
- null != n3 && o3.push(n3);
88
+ function b(t2, e2) {
89
+ if (!e2.clickSet) return;
90
+ const n2 = e2.clickSet, i2 = n2.variables;
91
+ if (!i2 || 0 == i2.length) return;
92
+ const r2 = e2.highlightInfos ? e2.highlightInfos : [], l2 = e2.cacheDatas ? e2.cacheDatas : [], a2 = [], c2 = [];
93
+ for (const t3 of r2) c2.includes(t3.dataIndex) || (c2.push(t3.dataIndex), t3.dataIndex < l2.length && a2.push(l2[t3.dataIndex]));
94
+ for (const e3 of i2) {
95
+ if (!e3.fieldName || !e3.variable) continue;
96
+ const i3 = [];
97
+ for (const t3 of a2) {
98
+ const n3 = s(t3, e3.fieldName, void 0);
99
+ null != n3 && i3.push(n3);
117
100
  }
118
- n2.multiple ? s(e2.entity, t3.variable, o3) : s(e2.entity, t3.variable, o3.length > 0 ? o3[0] : void 0);
101
+ n2.multiple ? o(t2.entity, e3.variable, i3) : o(t2.entity, e3.variable, i3.length > 0 ? i3[0] : void 0);
119
102
  }
120
103
  }
121
- function I(e2, t2, n2) {
122
- const s2 = t2.items ? t2.items : [], r2 = t2.props ? t2.props.orderByTarget : "";
123
- let a2 = null;
124
- if ("x" == r2 || "X" == r2)
125
- a2 = "__x";
126
- else if (r2) {
127
- for (const e3 of s2)
128
- if (e3.uuid == r2) {
129
- const t3 = e3.props ? e3.props : {}, n3 = t3.yaxisSource, i2 = t3.yaxisField;
130
- if (i2 && (!n3 || "variable" == n3)) {
131
- a2 = i2;
132
- break;
133
- }
104
+ function v(t2, e2, n2) {
105
+ const i2 = e2.items ? e2.items : [], o2 = e2.props ? e2.props.orderByTarget : "";
106
+ let r2 = null;
107
+ if ("x" == o2 || "X" == o2) r2 = "__x";
108
+ else if (o2) {
109
+ for (const t3 of i2) if (t3.uuid == o2) {
110
+ const e3 = t3.props ? t3.props : {}, n3 = e3.yaxisSource, i3 = e3.yaxisField;
111
+ if (i3 && (!n3 || "variable" == n3)) {
112
+ r2 = i3;
113
+ break;
134
114
  }
115
+ }
135
116
  }
136
- if (!a2)
137
- return;
138
- const l2 = t2.props ? t2.props.orderSource : "";
139
- let c2 = t2.props ? t2.props.orderFix : "";
140
- if ("variable" == l2) {
141
- const n3 = t2.props ? t2.props.orderVariable : "";
142
- c2 = o(e2, n3);
117
+ if (!r2) return;
118
+ const a2 = e2.props ? e2.props.orderSource : "";
119
+ let c2 = e2.props ? e2.props.orderFix : "";
120
+ if ("variable" == a2) {
121
+ const n3 = e2.props ? e2.props.orderVariable : "";
122
+ c2 = l(t2, n3);
143
123
  }
144
124
  c2 = "desc" == c2 || "DESC" == c2 ? "desc" : "asc";
145
125
  const f2 = n2.length;
146
- for (let e3 = 0; e3 < f2 - 1; e3++) {
147
- const t3 = i(n2[e3], a2, void 0);
148
- for (let s3 = e3 + 1; s3 < f2; s3++) {
149
- const o2 = i(n2[s3], a2, void 0);
150
- let r3 = false;
151
- "desc" == c2 ? t3 < o2 && (r3 = true) : t3 > o2 && (r3 = true), r3 && ([n2[e3], n2[s3]] = [n2[s3], n2[e3]]);
126
+ for (let t3 = 0; t3 < f2 - 1; t3++) {
127
+ const e3 = s(n2[t3], r2, void 0);
128
+ for (let i3 = t3 + 1; i3 < f2; i3++) {
129
+ const o3 = s(n2[i3], r2, void 0);
130
+ let l2 = false;
131
+ "desc" == c2 ? e3 < o3 && (l2 = true) : e3 > o3 && (l2 = true), l2 && ([n2[t3], n2[i3]] = [n2[i3], n2[t3]]);
152
132
  }
153
133
  }
154
134
  }
155
- function b(e2, t2, n2, s2, r2) {
156
- if (!n2)
157
- return n2;
158
- const a2 = t2.props ? t2.props : {};
159
- if (!a2.limitQuantity)
160
- return n2;
161
- let l2 = null;
162
- if (a2.itemNumVariable ? (l2 = o(e2, a2.itemNumVariable), l2 = parseInt(l2)) : l2 = a2.itemNumFix ? a2.itemNumFix : 10, null == l2 || null == l2 || isNaN(l2))
163
- return n2;
164
- if (n2.length < l2)
165
- return n2;
166
- const c2 = a2.overItemAlias, f2 = [], u2 = {};
167
- s2 = s2 || [], r2 = r2 || [];
168
- for (let e3 = 0; e3 < n2.length; e3++) {
169
- const t3 = n2[e3];
170
- if (e3 < l2)
171
- f2.push(t3);
135
+ function N(t2, e2, n2, i2, o2) {
136
+ if (!n2) return n2;
137
+ const r2 = e2.props ? e2.props : {};
138
+ if (!r2.limitQuantity) return n2;
139
+ let a2 = null;
140
+ if (r2.itemNumVariable ? (a2 = l(t2, r2.itemNumVariable), a2 = parseInt(a2)) : a2 = r2.itemNumFix ? r2.itemNumFix : 10, null == a2 || null == a2 || isNaN(a2)) return n2;
141
+ if (n2.length < a2) return n2;
142
+ const c2 = r2.overItemAlias, f2 = [], u2 = {};
143
+ i2 = i2 || [], o2 = o2 || [];
144
+ for (let t3 = 0; t3 < n2.length; t3++) {
145
+ const e3 = n2[t3];
146
+ if (t3 < a2) f2.push(e3);
172
147
  else {
173
- if (!c2)
174
- break;
175
- for (const e4 of s2) {
176
- if (!e4)
177
- continue;
178
- let n3 = i(t3, e4, void 0);
179
- n3 = null == n3 || null == n3 ? "" : n3, u2[e4] || (u2[e4] = []);
180
- const s3 = u2[e4];
181
- s3.includes(n3) || s3.push(n3);
148
+ if (!c2) break;
149
+ for (const t4 of i2) {
150
+ if (!t4) continue;
151
+ let n3 = s(e3, t4, void 0);
152
+ n3 = null == n3 || null == n3 ? "" : n3, u2[t4] || (u2[t4] = []);
153
+ const i3 = u2[t4];
154
+ i3.includes(n3) || i3.push(n3);
182
155
  }
183
- for (const e4 of r2) {
184
- if (!e4)
185
- continue;
186
- const n3 = i(t3, e4, void 0);
187
- if (isNaN(n3))
188
- continue;
189
- const s3 = u2[e4];
190
- isNaN(s3) ? u2[e4] = n3 : u2[e4] = n3 + s3;
156
+ for (const t4 of o2) {
157
+ if (!t4) continue;
158
+ const n3 = s(e3, t4, void 0);
159
+ if (isNaN(n3)) continue;
160
+ const i3 = u2[t4];
161
+ isNaN(i3) ? u2[t4] = n3 : u2[t4] = n3 + i3;
191
162
  }
192
163
  }
193
164
  }
194
165
  return c2 && (u2.__x = c2, f2.push(u2)), f2;
195
166
  }
196
- function v(e2, t2, n2) {
167
+ function y(t2, e2, n2) {
197
168
  const i2 = {};
198
- for (const s2 of e2) {
199
- const e3 = s2.props ? s2.props : {};
200
- if ("formula" === e3.yaxisSource) {
201
- const s3 = r(e3.formula);
202
- for (const e4 of s3)
203
- if (!(e4 in i2)) {
204
- if (e4.startsWith("${min."))
205
- i2[e4] = N(t2, e4.substring(6, e4.length - 1));
206
- else if (e4.startsWith("${max."))
207
- i2[e4] = y(t2, e4.substring(6, e4.length - 1));
208
- else if (e4.startsWith("${sum."))
209
- i2[e4] = F(t2, e4.substring(6, e4.length - 1));
210
- else if (e4.startsWith("${avg."))
211
- i2[e4] = S(t2, e4.substring(6, e4.length - 1));
212
- else if (e4.startsWith("${add.")) {
213
- const t3 = e4.substring(6, e4.length - 1);
214
- n2.push(t3);
215
- }
169
+ for (const s2 of t2) {
170
+ const t3 = s2.props ? s2.props : {};
171
+ if ("formula" === t3.yaxisSource) {
172
+ const s3 = r(t3.formula);
173
+ for (const t4 of s3) if (!(t4 in i2)) {
174
+ if (t4.startsWith("${min.")) i2[t4] = S(e2, t4.substring(6, t4.length - 1));
175
+ else if (t4.startsWith("${max.")) i2[t4] = F(e2, t4.substring(6, t4.length - 1));
176
+ else if (t4.startsWith("${sum.")) i2[t4] = _(e2, t4.substring(6, t4.length - 1));
177
+ else if (t4.startsWith("${avg.")) i2[t4] = A(e2, t4.substring(6, t4.length - 1));
178
+ else if (t4.startsWith("${add.")) {
179
+ const e3 = t4.substring(6, t4.length - 1);
180
+ n2.push(e3);
216
181
  }
182
+ }
217
183
  }
218
184
  }
219
185
  return i2;
220
186
  }
221
- function N(e2, t2) {
187
+ function S(t2, e2) {
222
188
  let n2;
223
- for (const s2 of e2) {
224
- const e3 = parseFloat(i(s2, t2, null));
225
- (void 0 === n2 || !isNaN(e3) && e3 < n2) && (n2 = e3);
189
+ for (const i2 of t2) {
190
+ const t3 = parseFloat(s(i2, e2, null));
191
+ (void 0 === n2 || !isNaN(t3) && t3 < n2) && (n2 = t3);
226
192
  }
227
193
  return n2;
228
194
  }
229
- function y(e2, t2) {
195
+ function F(t2, e2) {
230
196
  let n2;
231
- for (const s2 of e2) {
232
- const e3 = parseFloat(i(s2, t2, null));
233
- (void 0 === n2 || !isNaN(e3) && e3 > n2) && (n2 = e3);
197
+ for (const i2 of t2) {
198
+ const t3 = parseFloat(s(i2, e2, null));
199
+ (void 0 === n2 || !isNaN(t3) && t3 > n2) && (n2 = t3);
234
200
  }
235
201
  return n2;
236
202
  }
237
- function F(e2, t2) {
203
+ function _(t2, e2) {
238
204
  let n2;
239
- for (const s2 of e2) {
240
- const e3 = parseFloat(i(s2, t2, null));
241
- void 0 === n2 ? n2 = e3 : isNaN(e3) || (n2 += e3);
205
+ for (const i2 of t2) {
206
+ const t3 = parseFloat(s(i2, e2, null));
207
+ void 0 === n2 ? n2 = t3 : isNaN(t3) || (n2 += t3);
242
208
  }
243
209
  return n2;
244
210
  }
245
- function S(e2, t2) {
246
- const n2 = F(e2, t2);
247
- return void 0 === n2 || 0 === e2.length ? n2 : parseFloat((n2 / e2.length).toFixed(5));
211
+ function A(t2, e2) {
212
+ const n2 = _(t2, e2);
213
+ return void 0 === n2 || 0 === t2.length ? n2 : parseFloat((n2 / t2.length).toFixed(5));
248
214
  }
249
- function A(e2, t2, n2, s2) {
250
- if (!e2)
251
- return;
252
- if (t2)
253
- for (const n3 in t2)
254
- e2 = e2.replace(new RegExp("\\${add." + n3 + "}", "g"), t2[n3]);
255
- const o2 = r(e2);
256
- for (const t3 of o2) {
215
+ function k(t2, e2, n2, i2) {
216
+ if (!t2) return;
217
+ if (e2) for (const n3 in e2) t2 = t2.replace(new RegExp("\\${add." + n3 + "}", "g"), e2[n3]);
218
+ const o2 = r(t2);
219
+ for (const e3 of o2) {
257
220
  let o3 = null;
258
- o3 = t3.startsWith("${row.") ? i(n2, t3.substring(6, t3.length - 1), null) : a(s2.entity, t3), e2 = e2.replace(new RegExp(t3.replace("$", "\\$"), "g"), o3);
221
+ o3 = e3.startsWith("${row.") ? s(n2, e3.substring(6, e3.length - 1), null) : a(i2.entity, e3), t2 = t2.replace(new RegExp(e3.replace("$", "\\$"), "g"), o3);
259
222
  }
260
- e2.includes("return ") || (e2 = "return " + e2);
261
- const c2 = new Function("params", e2);
262
- return l(c2, s2), c2({ pageContext: s2, row: n2 });
223
+ t2.includes("return ") || (t2 = "return " + t2);
224
+ const l2 = new Function("params", t2);
225
+ return f(l2, i2), l2({ pageContext: i2, row: n2 });
263
226
  }
264
- function _(e2) {
265
- if (!e2 || !e2.$el)
266
- return;
267
- const t2 = e2.$el.getElementsByTagName("canvas");
268
- if (!t2 || 0 === t2.length)
269
- return;
270
- const n2 = t2[0], i2 = n2.width + ":" + n2.height;
227
+ function M(t2) {
228
+ if (!t2 || !t2.$el) return;
229
+ const e2 = t2.$el.getElementsByTagName("canvas");
230
+ if (!e2 || 0 === e2.length) return;
231
+ const n2 = e2[0], i2 = n2.width + ":" + n2.height;
271
232
  return { isTable: false, fileContent: n2.toDataURL(), fileSize: i2 };
272
233
  }
234
+ function $(t2, e2, n2) {
235
+ const s2 = window.localStorage.getItem("HOME_MY_CHARTS_CONDITIONS");
236
+ let r2 = true;
237
+ if (s2) {
238
+ const t3 = JSON.parse(s2);
239
+ if (t3[n2]) {
240
+ const i2 = t3[n2];
241
+ if (Object.keys(i2).length > 0) {
242
+ r2 = false;
243
+ for (const t4 in i2) null !== i2[t4] && void 0 !== i2[t4] && o(e2.entity, t4, i2[t4]);
244
+ }
245
+ }
246
+ }
247
+ if (r2 && t2) {
248
+ for (const n3 of t2) if (n3.prop && n3.value) {
249
+ const t3 = i(e2, n3.value, "input-text", false), s3 = n3.prop.substring(2, n3.prop.length - 1).split(".");
250
+ null != t3 && c(e2.entity, s3, t3);
251
+ }
252
+ }
253
+ }
273
254
  export {
274
- c as CommonName,
275
- v as caculateFormulaValue,
276
- g as clearChartSelected,
277
- A as executeChartFormula,
278
- _ as exportCommonChart,
279
- S as getAvgValue,
280
- u as getCustomTheme,
281
- d as getCustomThemeOptions,
282
- y as getMaxValue,
283
- N as getMinValue,
284
- p as getNumFormatter,
285
- F as getSumValue,
286
- h as initChartOption,
287
- b as limitDatas,
288
- m as monitorChartClickToVariable,
289
- I as sortDatas,
290
- x as updateClickVariablesForSelected
255
+ u as CommonName,
256
+ y as caculateFormulaValue,
257
+ I as clearChartSelected,
258
+ k as executeChartFormula,
259
+ M as exportCommonChart,
260
+ A as getAvgValue,
261
+ d as getCustomTheme,
262
+ h as getCustomThemeOptions,
263
+ F as getMaxValue,
264
+ S as getMinValue,
265
+ m as getNumFormatter,
266
+ _ as getSumValue,
267
+ g as initChartOption,
268
+ N as limitDatas,
269
+ x as monitorChartClickToVariable,
270
+ $ as setHomeChartInitConfigValue,
271
+ v as sortDatas,
272
+ b as updateClickVariablesForSelected
291
273
  };
@@ -4,8 +4,7 @@ function r(e2) {
4
4
  return "function" == typeof Array.isArray ? Array.isArray(e2) : "[object Array]" === Object.prototype.toString.call(e2);
5
5
  }
6
6
  function n(t2, r2) {
7
- if (r2)
8
- return t2;
7
+ if (r2) return t2;
9
8
  {
10
9
  const { baseURL: r3, projectModel: n2 } = window.$vueApp.config.globalProperties;
11
10
  let o2 = r3;
@@ -22,8 +21,7 @@ function o(e2, t2, r2, o2) {
22
21
  return i2;
23
22
  }
24
23
  function i(e2) {
25
- if (!e2)
26
- return e2;
24
+ if (!e2) return e2;
27
25
  const r2 = t();
28
26
  if (Array.isArray(e2)) {
29
27
  const t2 = [], n2 = [], o2 = "~-~-";
@@ -32,8 +30,7 @@ function i(e2) {
32
30
  if (i2.indexOf(o2) > 0) {
33
31
  const u2 = i2.substring(0, i2.indexOf(o2)), s2 = i2.substring(i2.indexOf(o2) + o2.length, i2.lastIndexOf(o2)), f2 = i2.substring(i2.lastIndexOf(o2) + o2.length);
34
32
  r2 === s2 && n2.indexOf(u2) < 0 && (t2.push({ templateUuid: e3.templateUuid, templateName: f2 }), n2.push(u2));
35
- } else
36
- t2.push(e3);
33
+ } else t2.push(e3);
37
34
  }), t2;
38
35
  }
39
36
  }
@@ -44,11 +41,9 @@ function s(e2, t2, r2) {
44
41
  return "V" + t2 + "__" + e2 + "__" + r2;
45
42
  }
46
43
  function f(e2) {
47
- if ("object" != typeof e2 || null == e2)
48
- return e2;
44
+ if ("object" != typeof e2 || null == e2) return e2;
49
45
  const t2 = Array.isArray(e2) ? [] : {};
50
- for (const r2 in e2)
51
- e2.hasOwnProperty(r2) && (t2[r2] = f(e2[r2]));
46
+ for (const r2 in e2) e2.hasOwnProperty(r2) && (t2[r2] = f(e2[r2]));
52
47
  return t2;
53
48
  }
54
49
  function l(e2) {
@@ -63,16 +58,14 @@ function a(e2) {
63
58
  r2.indexOf("${") >= 0 && (r2 = r2.substring(2, r2.lastIndexOf("}")));
64
59
  const n2 = r2.split(".");
65
60
  2 === n2.length ? t2 = n2[1] : 3 === n2.length && (t2 = n2[1] + "__" + n2[2]);
66
- } else
67
- e2.code && (t2 = e2.code);
61
+ } else e2.code && (t2 = e2.code);
68
62
  return t2;
69
63
  }
70
64
  function p(e2) {
71
65
  try {
72
66
  if (null != e2) {
73
67
  const t2 = parseInt(e2 + "");
74
- if (Number.isInteger(t2))
75
- return true;
68
+ if (Number.isInteger(t2)) return true;
76
69
  }
77
70
  return false;
78
71
  } catch (e3) {