super-page-runtime 2.2.29-tmp2 → 2.2.32

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 (167) hide show
  1. package/dist/es/_virtual/_plugin-vue_export-helper.js +5 -7
  2. package/dist/es/assets/chart-themes/theme1.js +2 -6
  3. package/dist/es/assets/chart-themes/theme2.js +2 -6
  4. package/dist/es/assets/chart-themes/theme3.js +2 -6
  5. package/dist/es/components/runtime/utils/api/api-util.js +4 -7
  6. package/dist/es/components/runtime/utils/api/page-expose-util.js +135 -443
  7. package/dist/es/components/runtime/utils/assemblys-config.js +13 -369
  8. package/dist/es/components/runtime/utils/barcode-util.js +9 -33
  9. package/dist/es/components/runtime/utils/charts/chart-columnline-util.js +122 -306
  10. package/dist/es/components/runtime/utils/charts/chart-gauge-util.js +29 -68
  11. package/dist/es/components/runtime/utils/charts/chart-pie-util.js +68 -152
  12. package/dist/es/components/runtime/utils/charts/chart-radar-util.js +46 -124
  13. package/dist/es/components/runtime/utils/charts/chart-scatter-util.js +36 -99
  14. package/dist/es/components/runtime/utils/charts/chart-util.js +224 -522
  15. package/dist/es/components/runtime/utils/common-util.js +76 -156
  16. package/dist/es/components/runtime/utils/eventBus.js +3 -8
  17. package/dist/es/components/runtime/utils/events/event-util.js +362 -775
  18. package/dist/es/components/runtime/utils/events/print-label.js +72 -140
  19. package/dist/es/components/runtime/utils/events/standard-event.js +808 -2320
  20. package/dist/es/components/runtime/utils/events/validator-util.js +224 -560
  21. package/dist/es/components/runtime/utils/form/date-shortcuts.js +28 -88
  22. package/dist/es/components/runtime/utils/form/scan-util.js +61 -162
  23. package/dist/es/components/runtime/utils/global-refs.js +53 -84
  24. package/dist/es/components/runtime/utils/i18n-util.js +11 -20
  25. package/dist/es/components/runtime/utils/interfaces/page-design-types.d.ts +6 -0
  26. package/dist/es/components/runtime/utils/interfaces/page-design-types.js +2 -7
  27. package/dist/es/components/runtime/utils/page-helper-util.js +280 -660
  28. package/dist/es/components/runtime/utils/page-init-util.js +141 -406
  29. package/dist/es/components/runtime/utils/page-permission-util.js +22 -531
  30. package/dist/es/components/runtime/utils/page-store.js +23 -68
  31. package/dist/es/components/runtime/utils/store-util.js +9 -13
  32. package/dist/es/components/runtime/utils/store.js +2 -2
  33. package/dist/es/components/runtime/utils/table-utils.d.ts +4 -0
  34. package/dist/es/components/runtime/utils/table-utils.js +40 -81
  35. package/dist/es/components/runtime/utils/tree-utils.js +17 -37
  36. package/dist/es/components/runtime/views/assemblys/button/button/button-runtime.vue.js +2 -2
  37. package/dist/es/components/runtime/views/assemblys/button/button/button-runtime.vue2.js +21 -83
  38. package/dist/es/components/runtime/views/assemblys/button/button-group/buttongroup-runtime.vue.js +2 -2
  39. package/dist/es/components/runtime/views/assemblys/button/button-group/buttongroup-runtime.vue2.js +14 -46
  40. package/dist/es/components/runtime/views/assemblys/button/dropdown/dropdown-runtime.vue.js +2 -2
  41. package/dist/es/components/runtime/views/assemblys/button/dropdown/dropdown-runtime.vue2.js +36 -132
  42. package/dist/es/components/runtime/views/assemblys/button/export-pdf/exportpdf-runtime.vue.js +2 -2
  43. package/dist/es/components/runtime/views/assemblys/button/export-pdf/exportpdf-runtime.vue2.js +4 -18
  44. package/dist/es/components/runtime/views/assemblys/button/print-label/printlabel-runtime.vue.js +2 -2
  45. package/dist/es/components/runtime/views/assemblys/button/print-label/printlabel-runtime.vue2.js +17 -107
  46. package/dist/es/components/runtime/views/assemblys/chart/column-line/column-line-runtime.vue.js +2 -2
  47. package/dist/es/components/runtime/views/assemblys/chart/column-line/column-line-runtime.vue2.js +50 -198
  48. package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-breadcrumb.vue.js +12 -42
  49. package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-breadcrumb.vue2.js +2 -2
  50. package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-group.vue.js +7 -60
  51. package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-group.vue2.js +2 -2
  52. package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header.vue.js +52 -203
  53. package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header.vue2.js +2 -2
  54. package/dist/es/components/runtime/views/assemblys/chart/common/common-homepage-search.vue.js +4 -4
  55. package/dist/es/components/runtime/views/assemblys/chart/common/common-homepage-search.vue2.js +46 -162
  56. package/dist/es/components/runtime/views/assemblys/chart/gauge/gauge-runtime.vue.js +2 -2
  57. package/dist/es/components/runtime/views/assemblys/chart/gauge/gauge-runtime.vue2.js +32 -109
  58. package/dist/es/components/runtime/views/assemblys/chart/pie/pie-runtime.vue.js +2 -2
  59. package/dist/es/components/runtime/views/assemblys/chart/pie/pie-runtime.vue2.js +43 -166
  60. package/dist/es/components/runtime/views/assemblys/chart/radar/radar-runtime.vue.js +2 -2
  61. package/dist/es/components/runtime/views/assemblys/chart/radar/radar-runtime.vue2.js +32 -117
  62. package/dist/es/components/runtime/views/assemblys/chart/scatter/scatter-runtime.vue.js +2 -2
  63. package/dist/es/components/runtime/views/assemblys/chart/scatter/scatter-runtime.vue2.js +32 -118
  64. package/dist/es/components/runtime/views/assemblys/chart/table/chart-table-util.js +246 -597
  65. package/dist/es/components/runtime/views/assemblys/chart/table/group-column-item.vue.js +4 -42
  66. package/dist/es/components/runtime/views/assemblys/chart/table/group-column-item.vue2.js +2 -2
  67. package/dist/es/components/runtime/views/assemblys/chart/table/group-column.vue.js +8 -62
  68. package/dist/es/components/runtime/views/assemblys/chart/table/group-column.vue2.js +2 -2
  69. package/dist/es/components/runtime/views/assemblys/chart/table/normal-column.vue.js +29 -160
  70. package/dist/es/components/runtime/views/assemblys/chart/table/normal-column.vue2.js +2 -2
  71. package/dist/es/components/runtime/views/assemblys/chart/table/table-pageination.vue.js +13 -62
  72. package/dist/es/components/runtime/views/assemblys/chart/table/table-pageination.vue2.js +2 -2
  73. package/dist/es/components/runtime/views/assemblys/chart/table/table-runtime.vue.js +2 -2
  74. package/dist/es/components/runtime/views/assemblys/chart/table/table-runtime.vue2.js +212 -594
  75. package/dist/es/components/runtime/views/assemblys/common/export-form-report-dialog.vue.js +29 -139
  76. package/dist/es/components/runtime/views/assemblys/common/export-form-report-dialog.vue2.js +2 -2
  77. package/dist/es/components/runtime/views/assemblys/common/remove-signer-dialog.vue.js +21 -125
  78. package/dist/es/components/runtime/views/assemblys/common/remove-signer-dialog.vue2.js +2 -2
  79. package/dist/es/components/runtime/views/assemblys/common/task-informition-dialog.vue.js +16 -102
  80. package/dist/es/components/runtime/views/assemblys/common/task-informition-dialog.vue2.js +2 -2
  81. package/dist/es/components/runtime/views/assemblys/container/card/card-runtime.vue.js +2 -2
  82. package/dist/es/components/runtime/views/assemblys/container/card/card-runtime.vue2.js +18 -81
  83. package/dist/es/components/runtime/views/assemblys/container/collapse/collapse-runtime.vue.js +2 -2
  84. package/dist/es/components/runtime/views/assemblys/container/collapse/collapse-runtime.vue2.js +17 -82
  85. package/dist/es/components/runtime/views/assemblys/container/container/container-runtime.vue.js +2 -2
  86. package/dist/es/components/runtime/views/assemblys/container/container/container-runtime.vue2.js +14 -86
  87. package/dist/es/components/runtime/views/assemblys/container/flex/flex-runtime.vue.js +2 -2
  88. package/dist/es/components/runtime/views/assemblys/container/flex/flex-runtime.vue2.js +21 -79
  89. package/dist/es/components/runtime/views/assemblys/container/form/form-runtime.vue.js +2 -2
  90. package/dist/es/components/runtime/views/assemblys/container/form/form-runtime.vue2.js +16 -61
  91. package/dist/es/components/runtime/views/assemblys/container/iframe/iframe-runtime.vue.js +2 -2
  92. package/dist/es/components/runtime/views/assemblys/container/iframe/iframe-runtime.vue2.js +10 -37
  93. package/dist/es/components/runtime/views/assemblys/container/tabs/tabs-runtime.vue.js +2 -2
  94. package/dist/es/components/runtime/views/assemblys/container/tabs/tabs-runtime.vue2.js +38 -127
  95. package/dist/es/components/runtime/views/assemblys/container/tools/tools-runtime.vue.js +2 -2
  96. package/dist/es/components/runtime/views/assemblys/container/tools/tools-runtime.vue2.js +28 -76
  97. package/dist/es/components/runtime/views/assemblys/data/bar-code/barcode-runtime.vue.js +2 -2
  98. package/dist/es/components/runtime/views/assemblys/data/bar-code/barcode-runtime.vue2.js +61 -178
  99. package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue.js +317 -810
  100. package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue2.js +2 -2
  101. package/dist/es/components/runtime/views/assemblys/data/table/sub-table-runtime.vue.js +262 -635
  102. package/dist/es/components/runtime/views/assemblys/data/table/sub-table-runtime.vue2.js +2 -2
  103. package/dist/es/components/runtime/views/assemblys/data/table/table-runtime.vue.js +2 -2
  104. package/dist/es/components/runtime/views/assemblys/data/table/table-runtime.vue2.js +40 -115
  105. package/dist/es/components/runtime/views/assemblys/data/tree/tree-runtime.vue.js +2 -2
  106. package/dist/es/components/runtime/views/assemblys/data/tree/tree-runtime.vue2.js +56 -215
  107. package/dist/es/components/runtime/views/assemblys/error-render.vue.js +3 -21
  108. package/dist/es/components/runtime/views/assemblys/error-render.vue2.js +2 -2
  109. package/dist/es/components/runtime/views/assemblys/form/checkbox/checkbox-runtime.vue.js +2 -2
  110. package/dist/es/components/runtime/views/assemblys/form/checkbox/checkbox-runtime.vue2.js +42 -154
  111. package/dist/es/components/runtime/views/assemblys/form/common/title-suffix-element.vue.js +34 -98
  112. package/dist/es/components/runtime/views/assemblys/form/common/title-suffix-element.vue2.js +2 -2
  113. package/dist/es/components/runtime/views/assemblys/form/custom/custom-runtime.vue.js +2 -2
  114. package/dist/es/components/runtime/views/assemblys/form/custom/custom-runtime.vue2.js +52 -200
  115. package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue.js +2 -2
  116. package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue2.js +68 -239
  117. package/dist/es/components/runtime/views/assemblys/form/dept-tree/depttree-runtime.vue.js +2 -2
  118. package/dist/es/components/runtime/views/assemblys/form/dept-tree/depttree-runtime.vue2.js +31 -109
  119. package/dist/es/components/runtime/views/assemblys/form/divider/divider-runtime.vue.js +2 -2
  120. package/dist/es/components/runtime/views/assemblys/form/divider/divider-runtime.vue2.js +21 -59
  121. package/dist/es/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue.js +2 -2
  122. package/dist/es/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue2.js +56 -188
  123. package/dist/es/components/runtime/views/assemblys/form/input-number/input-number-runtime.vue.js +2 -2
  124. package/dist/es/components/runtime/views/assemblys/form/input-number/input-number-runtime.vue2.js +22 -103
  125. package/dist/es/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue.js +2 -2
  126. package/dist/es/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue2.js +57 -245
  127. package/dist/es/components/runtime/views/assemblys/form/label/label-runtime.vue.js +2 -2
  128. package/dist/es/components/runtime/views/assemblys/form/label/label-runtime.vue2.js +32 -174
  129. package/dist/es/components/runtime/views/assemblys/form/link/link-runtime.vue.js +2 -2
  130. package/dist/es/components/runtime/views/assemblys/form/link/link-runtime.vue2.js +28 -107
  131. package/dist/es/components/runtime/views/assemblys/form/placeholder/placeholder-runtime.vue.js +4 -4
  132. package/dist/es/components/runtime/views/assemblys/form/placeholder/placeholder-runtime.vue2.js +13 -50
  133. package/dist/es/components/runtime/views/assemblys/form/radio/radio-runtime.vue.js +2 -2
  134. package/dist/es/components/runtime/views/assemblys/form/radio/radio-runtime.vue2.js +64 -194
  135. package/dist/es/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue.js +2 -2
  136. package/dist/es/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue2.js +88 -249
  137. package/dist/es/components/runtime/views/assemblys/form/select/select-runtime.vue.js +2 -2
  138. package/dist/es/components/runtime/views/assemblys/form/select/select-runtime.vue2.js +80 -263
  139. package/dist/es/components/runtime/views/assemblys/form/separatelabel/separatelabel-runtime.vue.js +2 -2
  140. package/dist/es/components/runtime/views/assemblys/form/separatelabel/separatelabel-runtime.vue2.js +13 -57
  141. package/dist/es/components/runtime/views/assemblys/form/switch/switch-runtime.vue.js +2 -2
  142. package/dist/es/components/runtime/views/assemblys/form/switch/switch-runtime.vue2.js +30 -155
  143. package/dist/es/components/runtime/views/assemblys/form/tag/tag-runtime.vue.js +2 -2
  144. package/dist/es/components/runtime/views/assemblys/form/tag/tag-runtime.vue2.js +40 -129
  145. package/dist/es/components/runtime/views/assemblys/form/textarea/textarea-runtime.vue.js +2 -2
  146. package/dist/es/components/runtime/views/assemblys/form/textarea/textarea-runtime.vue2.js +22 -107
  147. package/dist/es/components/runtime/views/assemblys/home-chart-render.vue.js +89 -188
  148. package/dist/es/components/runtime/views/assemblys/home-chart-render.vue2.js +2 -2
  149. package/dist/es/components/runtime/views/assemblys/object-render.vue.js +133 -272
  150. package/dist/es/components/runtime/views/assemblys/object-render.vue2.js +2 -2
  151. package/dist/es/components/runtime/views/assemblys/workflow/picture-flow/pictureflow-runtime.vue.js +2 -2
  152. package/dist/es/components/runtime/views/assemblys/workflow/picture-flow/pictureflow-runtime.vue2.js +18 -46
  153. package/dist/es/components/runtime/views/assemblys/workflow/text-history/textflow-runtime.vue.js +2 -2
  154. package/dist/es/components/runtime/views/assemblys/workflow/text-history/textflow-runtime.vue2.js +21 -49
  155. package/dist/es/components/runtime/views/assemblys/workflow/workflow-button/workflowbutton-runtime.vue.js +2 -2
  156. package/dist/es/components/runtime/views/assemblys/workflow/workflow-button/workflowbutton-runtime.vue2.js +20 -58
  157. package/dist/es/components/runtime/views/assemblys/workflow/workflow-node/workflownode-runtime.vue.js +2 -2
  158. package/dist/es/components/runtime/views/assemblys/workflow/workflow-node/workflownode-runtime.vue2.js +16 -53
  159. package/dist/es/components/runtime/views/home-chart.vue.js +41 -160
  160. package/dist/es/components/runtime/views/home-chart.vue2.js +2 -2
  161. package/dist/es/components/runtime/views/super-page-dialog.vue.js +20 -139
  162. package/dist/es/components/runtime/views/super-page-dialog.vue2.js +2 -2
  163. package/dist/es/components/runtime/views/super-page.vue.js +226 -754
  164. package/dist/es/components/runtime/views/super-page.vue2.js +2 -2
  165. package/dist/es/i18n/langs/cn.js +2 -55
  166. package/dist/es/i18n/langs/en.js +2 -55
  167. package/package.json +2 -2
@@ -1,571 +1,273 @@
1
- import theme1 from "../../../../assets/chart-themes/theme1.js";
2
- import theme2 from "../../../../assets/chart-themes/theme2.js";
3
- import theme3 from "../../../../assets/chart-themes/theme3.js";
4
- import { getDefaultValue } from "../page-init-util.js";
5
- import { getValueFromSource, setValueForVariableName, getParamNames, formatVariableValue, getValueFromVariable, setVariableValue } from "../page-helper-util.js";
6
- import { appendDefaultMethods } from "../events/event-util.js";
7
- var CommonName = /* @__PURE__ */ ((CommonName2) => {
8
- CommonName2["X_FIELD_NAME"] = "__x";
9
- CommonName2["Y_TEMP_NAME"] = "__y";
10
- return CommonName2;
11
- })(CommonName || {});
12
- const themeMap = {
13
- theme1,
14
- theme2,
15
- theme3
16
- };
17
- function getCustomTheme(themeName) {
18
- return themeMap[themeName];
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 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];
19
11
  }
20
- function getCustomThemeOptions() {
21
- return [
22
- {
23
- value: "theme1",
24
- label: "主题1"
25
- },
26
- {
27
- value: "theme2",
28
- label: "主题2"
29
- },
30
- {
31
- value: "theme3",
32
- label: "主题3"
33
- }
34
- ];
12
+ function h() {
13
+ return [{ value: "theme1", label: "主题1" }, { value: "theme2", label: "主题2" }, { value: "theme3", label: "主题3" }];
35
14
  }
36
- function getNumFormatter(labelNumFormat, numPrecision, numPrefix, numAppend, isValueFormatter) {
37
- const func = function(params) {
38
- let labelValue = params.value;
39
- if (isValueFormatter) {
40
- labelValue = params;
41
- }
42
- if (labelValue == void 0 || labelValue == null) {
43
- return labelValue;
44
- }
45
- if (Array.isArray(labelValue)) {
46
- console.log("numformatter is array", labelValue);
47
- return labelValue;
48
- }
49
- if (isNaN(labelValue) || !labelNumFormat || !labelNumFormat.indexOf) {
50
- return labelValue;
51
- }
52
- if (labelNumFormat.indexOf("precision") > -1) {
53
- let precision = parseInt(numPrecision);
54
- if (precision == null || isNaN(precision)) {
55
- precision = 2;
56
- }
57
- labelValue = parseFloat(parseFloat(labelValue).toFixed(precision));
58
- }
59
- let prefix = "";
60
- if (labelNumFormat.indexOf("prefix") > -1 && numPrefix) {
61
- prefix = numPrefix;
62
- }
63
- let append = "";
64
- if (labelNumFormat.indexOf("append") > -1 && numAppend) {
65
- append = numAppend;
66
- }
67
- return prefix + labelValue.toLocaleString() + append;
15
+ function m(t2, e2, n2, i2, s2) {
16
+ return function(o2) {
17
+ let r2 = o2.value;
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));
24
+ }
25
+ let 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;
68
29
  };
69
- return func;
70
30
  }
71
- function initChartOption(configure, chartOption) {
72
- if (!chartOption) {
73
- return;
74
- }
75
- if (chartOption.tooltipFormatterArgs) {
76
- if (!chartOption.tooltip) {
77
- chartOption.tooltip = {};
78
- }
79
- chartOption.tooltip.valueFormatter = getNumFormatter.apply(
80
- chartOption,
81
- chartOption.tooltipFormatterArgs
82
- );
83
- }
84
- if (chartOption.series) {
85
- const enableDrill = configure.props ? configure.props.enableDrill : null;
86
- for (const s of chartOption.series) {
87
- if (!chartOption.radar) {
88
- s.data = [];
89
- }
90
- if (s.labelFormatterArgs) {
91
- if (!s.label) {
92
- s.label = {};
93
- }
94
- s.label.formatter = getNumFormatter.apply(s, s.labelFormatterArgs);
95
- }
96
- if (!enableDrill && configure.clickSet && configure.clickSet.selected) {
97
- if (s.emphasis) {
98
- s.emphasis.disabled = false;
99
- }
100
- }
101
- if (s.type === "pie" && configure.clickSet) {
102
- if (configure.clickSet.selected) {
103
- if (configure.clickSet.multiple) {
104
- s.selectedMode = "multiple";
105
- } else {
106
- s.selectedMode = "single";
107
- }
108
- }
109
- }
110
- }
111
- }
112
- if (chartOption.radar) {
113
- for (const r of chartOption.radar) {
114
- r.indicator = [];
115
- }
116
- }
117
- const defaultSeries = chartOption.series;
118
- configure.defaultSeries = defaultSeries;
119
- const defaultXaxis = chartOption.xAxis;
120
- if (defaultXaxis && defaultXaxis.length > 0 && defaultXaxis[0].data) {
121
- defaultXaxis[0].data = [];
122
- }
123
- configure.defaultXaxis = defaultXaxis;
124
- const defaultYaxis = chartOption.yAxis;
125
- if (defaultYaxis) {
126
- for (const yAxis of defaultYaxis) {
127
- if (yAxis.data) {
128
- yAxis.data = [];
129
- }
130
- if (yAxis._dataMin === "auto") {
131
- yAxis.min = function(value) {
132
- if (value.min) {
133
- return Math.floor(value.min / 10) * 10;
134
- }
135
- };
136
- }
137
- if (yAxis._dataMax === "auto") {
138
- yAxis.max = function(value) {
139
- if (value.max) {
140
- return Math.ceil(value.max / 10) * 10;
141
- }
142
- };
143
- }
144
- }
145
- }
146
- configure.defaultYaxis = defaultYaxis;
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");
36
+ }
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;
147
49
  }
148
- function monitorChartClickToVariable(pageContext, configure, chart) {
149
- if (!chart || !configure || !configure.clickSet || !pageContext) {
150
- return;
151
- }
152
- const clickSet = configure.clickSet;
153
- chart.on("click", function(params) {
154
- let highlightInfos = configure.highlightInfos ? configure.highlightInfos : [];
155
- console.log("highlightInfos", highlightInfos, params);
156
- let hisSelectIndex = -1;
157
- if (highlightInfos) {
158
- const newInfos = [];
159
- for (let i = 0; i < highlightInfos.length; i++) {
160
- const info = highlightInfos[i];
161
- const hisSelected = info.seriesIndex === params.seriesIndex && info.dataIndex === params.dataIndex;
162
- if (hisSelected || !clickSet.multiple) {
163
- if (clickSet.selected) {
164
- const typeName = configure.name === "chart-pie" ? "unselect" : "downplay";
165
- chart.dispatchAction({
166
- type: typeName,
167
- seriesIndex: info.seriesIndex,
168
- dataIndex: info.dataIndex
169
- });
50
+ function x(t2, e2, n2) {
51
+ if (!(n2 && e2 && e2.clickSet && t2)) return;
52
+ const i2 = e2.clickSet;
53
+ n2.on("click", function(s2) {
54
+ let o2 = e2.highlightInfos ? e2.highlightInfos : [], r2 = -1;
55
+ if (o2) {
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;
59
+ if (c2 || !i2.multiple) {
60
+ if (i2.selected) {
61
+ const t4 = "chart-pie" === e2.name ? "unselect" : "downplay";
62
+ n2.dispatchAction({ type: t4, seriesIndex: a2.seriesIndex, dataIndex: a2.dataIndex });
170
63
  }
171
- } else {
172
- newInfos.push(info);
173
- }
174
- if (hisSelected) {
175
- hisSelectIndex = i;
176
- }
64
+ } else t3.push(a2);
65
+ c2 && (r2 = l2);
177
66
  }
178
- highlightInfos = newInfos;
67
+ o2 = t3;
179
68
  }
180
- if (hisSelectIndex === -1) {
181
- if (clickSet.selected) {
182
- const typeName = configure.name === "chart-pie" ? "select" : "highlight";
183
- chart.dispatchAction({
184
- type: typeName,
185
- seriesIndex: params.seriesIndex,
186
- dataIndex: params.dataIndex
187
- });
69
+ if (-1 === r2) {
70
+ if (i2.selected) {
71
+ const t3 = "chart-pie" === e2.name ? "select" : "highlight";
72
+ n2.dispatchAction({ type: t3, seriesIndex: s2.seriesIndex, dataIndex: s2.dataIndex });
188
73
  }
189
- highlightInfos.push({
190
- seriesIndex: params.seriesIndex,
191
- dataIndex: params.dataIndex
192
- });
74
+ o2.push({ seriesIndex: s2.seriesIndex, dataIndex: s2.dataIndex });
193
75
  }
194
- configure.highlightInfos = highlightInfos;
195
- updateClickVariablesForSelected(pageContext, configure);
76
+ e2.highlightInfos = o2, b(t2, e2);
196
77
  });
197
78
  }
198
- function clearChartSelected(pageContext, configure, chart) {
199
- if (!chart || !configure || !pageContext) {
200
- return;
201
- }
202
- const highlightInfos = configure.highlightInfos ? configure.highlightInfos : [];
203
- for (let i = 0; i < highlightInfos.length; i++) {
204
- const info = highlightInfos[i];
205
- const typeName = configure.name === "chart-pie" ? "unselect" : "downplay";
206
- chart.dispatchAction({
207
- type: typeName,
208
- seriesIndex: info.seriesIndex,
209
- dataIndex: info.dataIndex
210
- });
211
- }
212
- configure.highlightInfos = [];
213
- updateClickVariablesForSelected(pageContext, configure);
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";
84
+ n2.dispatchAction({ type: o2, seriesIndex: s2.seriesIndex, dataIndex: s2.dataIndex });
85
+ }
86
+ e2.highlightInfos = [], b(t2, e2);
214
87
  }
215
- function updateClickVariablesForSelected(pageContext, configure) {
216
- if (!configure.clickSet) {
217
- return;
218
- }
219
- const clickSet = configure.clickSet;
220
- const variables = clickSet.variables;
221
- if (!variables || variables.length == 0) {
222
- return;
223
- }
224
- const highlightInfos = configure.highlightInfos ? configure.highlightInfos : [];
225
- const caheDatas = configure.cacheDatas ? configure.cacheDatas : [];
226
- const selDatas = [];
227
- const existIndexs = [];
228
- for (const highlightInfo of highlightInfos) {
229
- if (existIndexs.includes(highlightInfo.dataIndex)) {
230
- continue;
231
- }
232
- existIndexs.push(highlightInfo.dataIndex);
233
- if (highlightInfo.dataIndex < caheDatas.length) {
234
- selDatas.push(caheDatas[highlightInfo.dataIndex]);
235
- }
236
- }
237
- for (const v of variables) {
238
- if (!v.fieldName || !v.variable) {
239
- continue;
240
- }
241
- const values = [];
242
- for (const data of selDatas) {
243
- const value = getValueFromSource(data, v.fieldName, void 0);
244
- if (value == void 0) {
245
- continue;
246
- }
247
- values.push(value);
248
- }
249
- if (clickSet.multiple) {
250
- setValueForVariableName(pageContext.entity, v.variable, values);
251
- } else {
252
- setValueForVariableName(
253
- pageContext.entity,
254
- v.variable,
255
- values.length > 0 ? values[0] : void 0
256
- );
257
- }
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);
100
+ }
101
+ n2.multiple ? o(t2.entity, e3.variable, i3) : o(t2.entity, e3.variable, i3.length > 0 ? i3[0] : void 0);
258
102
  }
259
103
  }
260
- function sortDatas(pageContext, configure, datas) {
261
- const itemConfs = configure.items ? configure.items : [];
262
- const orderByTarget = configure.props ? configure.props.orderByTarget : "";
263
- let orderField = null;
264
- if (orderByTarget == "x" || orderByTarget == "X") {
265
- orderField = "__x";
266
- } else if (orderByTarget) {
267
- for (const item of itemConfs) {
268
- if (item.uuid == orderByTarget) {
269
- const itemProps = item.props ? item.props : {};
270
- const sourceType = itemProps.yaxisSource;
271
- const yaxisField = itemProps.yaxisField;
272
- if (yaxisField && (!sourceType || sourceType == "variable")) {
273
- orderField = yaxisField;
274
- break;
275
- }
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;
276
114
  }
277
115
  }
278
116
  }
279
- if (!orderField) {
280
- return;
281
- }
282
- const orderSource = configure.props ? configure.props.orderSource : "";
283
- let orderValue = configure.props ? configure.props.orderFix : "";
284
- if (orderSource == "variable") {
285
- const orderVariable = configure.props ? configure.props.orderVariable : "";
286
- orderValue = formatVariableValue(pageContext, orderVariable);
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);
287
123
  }
288
- orderValue = orderValue == "desc" || orderValue == "DESC" ? "desc" : "asc";
289
- const maxLen = datas.length;
290
- for (let i = 0; i < maxLen - 1; i++) {
291
- const vali = getValueFromSource(datas[i], orderField, void 0);
292
- for (let j = i + 1; j < maxLen; j++) {
293
- const valj = getValueFromSource(datas[j], orderField, void 0);
294
- let isSwap = false;
295
- if ("desc" == orderValue) {
296
- if (vali < valj) {
297
- isSwap = true;
298
- }
299
- } else {
300
- if (vali > valj) {
301
- isSwap = true;
302
- }
303
- }
304
- if (isSwap) {
305
- [datas[i], datas[j]] = [datas[j], datas[i]];
306
- }
124
+ c2 = "desc" == c2 || "DESC" == c2 ? "desc" : "asc";
125
+ const f2 = n2.length;
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]]);
307
132
  }
308
133
  }
309
134
  }
310
- function limitDatas(pageContext, configure, datas, groupFields, numFields) {
311
- if (!datas) {
312
- return datas;
313
- }
314
- const confProps = configure.props ? configure.props : {};
315
- if (!confProps.limitQuantity) {
316
- return datas;
317
- }
318
- let limitNum = null;
319
- if (confProps.itemNumVariable) {
320
- limitNum = formatVariableValue(pageContext, confProps.itemNumVariable);
321
- limitNum = parseInt(limitNum);
322
- } else {
323
- limitNum = confProps.itemNumFix ? confProps.itemNumFix : 10;
324
- }
325
- if (limitNum == null || limitNum == void 0 || isNaN(limitNum)) {
326
- return datas;
327
- }
328
- if (datas.length < limitNum) {
329
- return datas;
330
- }
331
- const overItemAlias = confProps.overItemAlias;
332
- const newDatas = [];
333
- const otherData = {};
334
- groupFields = groupFields ? groupFields : [];
335
- numFields = numFields ? numFields : [];
336
- for (let i = 0; i < datas.length; i++) {
337
- const data = datas[i];
338
- if (i < limitNum) {
339
- newDatas.push(data);
340
- continue;
341
- }
342
- if (!overItemAlias) {
343
- break;
344
- }
345
- for (const groupField of groupFields) {
346
- if (!groupField) {
347
- continue;
348
- }
349
- let value = getValueFromSource(data, groupField, void 0);
350
- value = value == null || value == void 0 ? "" : value;
351
- if (!otherData[groupField]) {
352
- otherData[groupField] = [];
353
- }
354
- const existValues = otherData[groupField];
355
- if (!existValues.includes(value)) {
356
- existValues.push(value);
357
- }
358
- }
359
- for (const numField of numFields) {
360
- if (!numField) {
361
- continue;
362
- }
363
- const value = getValueFromSource(data, numField, void 0);
364
- if (isNaN(value)) {
365
- continue;
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);
147
+ else {
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);
366
155
  }
367
- const hisValue = otherData[numField];
368
- if (isNaN(hisValue)) {
369
- otherData[numField] = value;
370
- } else {
371
- otherData[numField] = value + hisValue;
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;
372
162
  }
373
163
  }
374
164
  }
375
- if (overItemAlias) {
376
- otherData[
377
- "__x"
378
- /* X_FIELD_NAME */
379
- ] = overItemAlias;
380
- newDatas.push(otherData);
381
- }
382
- return newDatas;
165
+ return c2 && (u2.__x = c2, f2.push(u2)), f2;
383
166
  }
384
- function caculateFormulaValue(itemConfs, datas, accumulateFields) {
385
- const totalValueMap = {};
386
- for (const item of itemConfs) {
387
- const itemProps = item.props ? item.props : {};
388
- const sourceType = itemProps.yaxisSource;
389
- if (sourceType === "formula") {
390
- const paramNames = getParamNames(itemProps.formula);
391
- for (const paramName of paramNames) {
392
- if (paramName in totalValueMap) {
393
- continue;
394
- }
395
- if (paramName.startsWith("${min.")) {
396
- totalValueMap[paramName] = getMinValue(
397
- datas,
398
- paramName.substring(6, paramName.length - 1)
399
- );
400
- } else if (paramName.startsWith("${max.")) {
401
- totalValueMap[paramName] = getMaxValue(
402
- datas,
403
- paramName.substring(6, paramName.length - 1)
404
- );
405
- } else if (paramName.startsWith("${sum.")) {
406
- totalValueMap[paramName] = getSumValue(
407
- datas,
408
- paramName.substring(6, paramName.length - 1)
409
- );
410
- } else if (paramName.startsWith("${avg.")) {
411
- totalValueMap[paramName] = getAvgValue(
412
- datas,
413
- paramName.substring(6, paramName.length - 1)
414
- );
415
- } else if (paramName.startsWith("${add.")) {
416
- const fieldName = paramName.substring(6, paramName.length - 1);
417
- accumulateFields.push(fieldName);
167
+ function y(t2, e2, n2) {
168
+ const i2 = {};
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);
418
181
  }
419
182
  }
420
183
  }
421
184
  }
422
- return totalValueMap;
185
+ return i2;
423
186
  }
424
- function getMinValue(datas, fieldName) {
425
- let minValue = void 0;
426
- for (const d of datas) {
427
- const value = parseFloat(getValueFromSource(d, fieldName, null));
428
- if (minValue === void 0) {
429
- minValue = value;
430
- } else if (!isNaN(value) && value < minValue) {
431
- minValue = value;
432
- }
187
+ function S(t2, e2) {
188
+ let n2;
189
+ for (const i2 of t2) {
190
+ const t3 = parseFloat(s(i2, e2, null));
191
+ (void 0 === n2 || !isNaN(t3) && t3 < n2) && (n2 = t3);
433
192
  }
434
- return minValue;
193
+ return n2;
435
194
  }
436
- function getMaxValue(datas, fieldName) {
437
- let maxValue = void 0;
438
- for (const d of datas) {
439
- const value = parseFloat(getValueFromSource(d, fieldName, null));
440
- if (maxValue === void 0) {
441
- maxValue = value;
442
- } else if (!isNaN(value) && value > maxValue) {
443
- maxValue = value;
444
- }
195
+ function F(t2, e2) {
196
+ let n2;
197
+ for (const i2 of t2) {
198
+ const t3 = parseFloat(s(i2, e2, null));
199
+ (void 0 === n2 || !isNaN(t3) && t3 > n2) && (n2 = t3);
445
200
  }
446
- return maxValue;
201
+ return n2;
447
202
  }
448
- function getSumValue(datas, fieldName) {
449
- let sumValue = void 0;
450
- for (const d of datas) {
451
- const value = parseFloat(getValueFromSource(d, fieldName, null));
452
- if (sumValue === void 0) {
453
- sumValue = value;
454
- } else if (!isNaN(value)) {
455
- sumValue += value;
456
- }
203
+ function _(t2, e2) {
204
+ let n2;
205
+ for (const i2 of t2) {
206
+ const t3 = parseFloat(s(i2, e2, null));
207
+ void 0 === n2 ? n2 = t3 : isNaN(t3) || (n2 += t3);
457
208
  }
458
- return sumValue;
209
+ return n2;
459
210
  }
460
- function getAvgValue(datas, fieldName) {
461
- const sumValue = getSumValue(datas, fieldName);
462
- if (sumValue === void 0 || datas.length === 0) {
463
- return sumValue;
464
- }
465
- return parseFloat((sumValue / datas.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));
466
214
  }
467
- function executeChartFormula(formulaStr, accumulateMap, rowData, pageContext) {
468
- if (!formulaStr) {
469
- return void 0;
470
- }
471
- if (accumulateMap) {
472
- for (const accumulateField in accumulateMap) {
473
- formulaStr = formulaStr.replace(
474
- new RegExp("\\${add." + accumulateField + "}", "g"),
475
- accumulateMap[accumulateField]
476
- );
477
- }
478
- }
479
- const paramNames = getParamNames(formulaStr);
480
- for (const paramName of paramNames) {
481
- let value = null;
482
- if (paramName.startsWith("${row.")) {
483
- value = getValueFromSource(rowData, paramName.substring(6, paramName.length - 1), null);
484
- } else {
485
- value = getValueFromVariable(pageContext.entity, paramName);
486
- }
487
- formulaStr = formulaStr.replace(new RegExp(paramName.replace("$", "\\$"), "g"), value);
488
- }
489
- if (!formulaStr.includes("return ")) {
490
- formulaStr = "return " + formulaStr;
491
- }
492
- const newFunc = new Function("params", formulaStr);
493
- appendDefaultMethods(newFunc, pageContext);
494
- return newFunc({
495
- pageContext,
496
- row: rowData
497
- });
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) {
220
+ let o3 = null;
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);
222
+ }
223
+ t2.includes("return ") || (t2 = "return " + t2);
224
+ const l2 = new Function("params", t2);
225
+ return f(l2, i2), l2({ pageContext: i2, row: n2 });
498
226
  }
499
- function exportCommonChart(chartRef) {
500
- if (!chartRef || !chartRef.$el) {
501
- return;
502
- }
503
- const canvasDoms = chartRef.$el.getElementsByTagName("canvas");
504
- if (!canvasDoms || canvasDoms.length === 0) {
505
- return;
506
- }
507
- const canvasDom = canvasDoms[0];
508
- const fileSize = canvasDom.width + ":" + canvasDom.height;
509
- return {
510
- isTable: false,
511
- fileContent: canvasDom.toDataURL(),
512
- fileSize
513
- };
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;
232
+ return { isTable: false, fileContent: n2.toDataURL(), fileSize: i2 };
514
233
  }
515
- function setHomeChartInitConfigValue(initConfig, tempContext, homeChartSettingUserId) {
516
- const homeMyChartsConditions = window.localStorage.getItem("HOME_MY_CHARTS_CONDITIONS");
517
- let setInitConfig = true;
518
- if (homeMyChartsConditions) {
519
- const conditions = JSON.parse(homeMyChartsConditions);
520
- if (conditions[homeChartSettingUserId]) {
521
- const conditionValues = conditions[homeChartSettingUserId];
522
- if (Object.keys(conditionValues).length > 0) {
523
- setInitConfig = false;
524
- for (const key in conditionValues) {
525
- if (conditionValues[key] !== null && conditionValues[key] !== void 0) {
526
- setValueForVariableName(tempContext.entity, key, conditionValues[key]);
527
- }
528
- }
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]);
529
244
  }
530
245
  }
531
246
  }
532
- if (setInitConfig && initConfig) {
533
- for (const variable of initConfig) {
534
- if (variable.prop) {
535
- if (variable.value) {
536
- const defaultValue = getDefaultValue(
537
- tempContext,
538
- variable.value,
539
- "input-text",
540
- false
541
- );
542
- const propName = variable.prop.substring(2, variable.prop.length - 1);
543
- const fields = propName.split(".");
544
- if (defaultValue !== void 0 && defaultValue !== null) {
545
- setVariableValue(tempContext.entity, fields, defaultValue);
546
- }
547
- }
548
- }
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);
549
251
  }
550
252
  }
551
253
  }
552
254
  export {
553
- CommonName,
554
- caculateFormulaValue,
555
- clearChartSelected,
556
- executeChartFormula,
557
- exportCommonChart,
558
- getAvgValue,
559
- getCustomTheme,
560
- getCustomThemeOptions,
561
- getMaxValue,
562
- getMinValue,
563
- getNumFormatter,
564
- getSumValue,
565
- initChartOption,
566
- limitDatas,
567
- monitorChartClickToVariable,
568
- setHomeChartInitConfigValue,
569
- sortDatas,
570
- 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
571
273
  };