@ecan-bi/tools 1.0.12 → 1.0.13

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.
package/dist/index.es.js CHANGED
@@ -1,59 +1,95 @@
1
- /*! @ecan-bi/tools@1.0.7 */
2
- import { unref as v, computed as ee } from "vue";
3
- import _ from "dayjs";
4
- import { cloneDeep as ae } from "lodash-es";
5
- const ge = (e, o) => {
6
- const l = {
7
- dayjs: _,
8
- ...o
9
- };
1
+ /*! @ecan-bi/tools@1.0.13 */
2
+ var Pe = Object.defineProperty, qe = Object.defineProperties;
3
+ var Xe = Object.getOwnPropertyDescriptors;
4
+ var de = Object.getOwnPropertySymbols;
5
+ var Ke = Object.prototype.hasOwnProperty, Ue = Object.prototype.propertyIsEnumerable;
6
+ var Be = (e, o, l) => o in e ? Pe(e, o, { enumerable: !0, configurable: !0, writable: !0, value: l }) : e[o] = l, C = (e, o) => {
7
+ for (var l in o || (o = {}))
8
+ Ke.call(o, l) && Be(e, l, o[l]);
9
+ if (de)
10
+ for (var l of de(o))
11
+ Ue.call(o, l) && Be(e, l, o[l]);
12
+ return e;
13
+ }, Y = (e, o) => qe(e, Xe(o));
14
+ var Se = (e, o) => {
15
+ var l = {};
16
+ for (var t in e)
17
+ Ke.call(e, t) && o.indexOf(t) < 0 && (l[t] = e[t]);
18
+ if (e != null && de)
19
+ for (var t of de(e))
20
+ o.indexOf(t) < 0 && Ue.call(e, t) && (l[t] = e[t]);
21
+ return l;
22
+ };
23
+ var We = (e, o, l) => new Promise((t, m) => {
24
+ var s = (n) => {
25
+ try {
26
+ d(l.next(n));
27
+ } catch (i) {
28
+ m(i);
29
+ }
30
+ }, r = (n) => {
31
+ try {
32
+ d(l.throw(n));
33
+ } catch (i) {
34
+ m(i);
35
+ }
36
+ }, d = (n) => n.done ? t(n.value) : Promise.resolve(n.value).then(s, r);
37
+ d((l = l.apply(e, o)).next());
38
+ });
39
+ import { unref as V, computed as oe } from "vue";
40
+ import $ from "dayjs";
41
+ import { cloneDeep as fe } from "lodash-es";
42
+ const we = (e, o) => {
43
+ const l = C({
44
+ dayjs: $
45
+ }, o);
10
46
  let t = "";
11
- const y = [];
12
- for (const f in l)
13
- t += `${f},`, y.push(l[f]);
47
+ const m = [];
48
+ for (const d in l)
49
+ t += `${d},`, m.push(l[d]);
14
50
  t = t.replace(/,$/, "");
15
- const d = `function (${t}){return ${e}}`;
16
- let a;
51
+ const s = `function (${t}){return ${e}}`;
52
+ let r;
17
53
  try {
18
- a = Function(`"use strict";return (${d})`)()(...y);
19
- } catch {
54
+ r = Function(`"use strict";return (${s})`)()(...m);
55
+ } catch (d) {
20
56
  return e;
21
57
  }
22
- return a;
23
- }, oe = (e = "", { textData: o, codeData: l } = {}, { useNewline: t = !1, useSpace: y = !1 } = {}) => {
24
- const d = { ...o }, a = (e || "").match(/\{(.+?)\}/g);
25
- if (a == null || a.length === 0)
58
+ return r;
59
+ }, ie = (e = "", { textData: o, codeData: l } = {}, { useNewline: t = !1, useSpace: m = !1 } = {}) => {
60
+ const s = C({}, o), r = (e || "").match(/\{(.+?)\}/g);
61
+ if (r == null || r.length === 0)
26
62
  return e;
27
- for (let f = 0; f < a.length; f++) {
28
- const r = a[f];
29
- let i = r.slice(1, -1).trim();
30
- const s = /[\u4e00-\u9fa5a-z-_A-Z0-9]*/g, n = i.match(s);
31
- for (let g = 0; g < n.length; g++) {
32
- const u = n[g], x = d[u];
33
- x != null && (i = i.replace(u, x));
63
+ for (let d = 0; d < r.length; d++) {
64
+ const n = r[d];
65
+ let i = n.slice(1, -1).trim();
66
+ const f = /[\u4e00-\u9fa5a-z-_A-Z0-9]*/g, a = i.match(f);
67
+ for (let b = 0; b < a.length; b++) {
68
+ const u = a[b], S = s[u];
69
+ S != null && (i = i.replace(u, S));
34
70
  }
35
- (/\(.*\)/g.test(i) || /[+/\\*]/g.test(i)) && (i = ge(i, l)), e = e.replace(r, i);
71
+ (/\(.*\)/g.test(i) || /[+/\\*]/g.test(i)) && (i = we(i, l)), e = e.replace(n, i);
36
72
  }
37
- return t && (e = e == null ? void 0 : e.replace(/\n|\\n/g, "<br/>")), y && (e = e == null ? void 0 : e.replace(/\s{2,}?/g, "&nbsp;&nbsp;")), e = e.replace(/Qfw\((.*?)\)/, (f, r) => o != null && o.Qfw ? o == null ? void 0 : o.Qfw(r) : r), e;
38
- }, Y = (e, o) => {
73
+ return t && (e = e == null ? void 0 : e.replace(/\n|\\n/g, "<br/>")), m && (e = e == null ? void 0 : e.replace(/\s{2,}?/g, "&nbsp;&nbsp;")), e = e.replace(/Qfw\((.*?)\)/, (d, n) => o != null && o.Qfw ? o == null ? void 0 : o.Qfw(n) : n), e;
74
+ }, K = (e, o) => {
39
75
  if (typeof e == "string" && typeof o == "string")
40
76
  return e.toLocaleLowerCase().includes(o.toLocaleLowerCase());
41
77
  if (typeof e == "string" && Array.isArray(o)) {
42
78
  const l = o.length;
43
79
  for (let t = 0; t < l; t++) {
44
- const y = o[t];
45
- if (typeof y == "string" && e.toLocaleLowerCase().includes(y.toLocaleLowerCase()))
80
+ const m = o[t];
81
+ if (typeof m == "string" && e.toLocaleLowerCase().includes(m.toLocaleLowerCase()))
46
82
  return !0;
47
83
  }
48
84
  }
49
85
  return !1;
50
- }, K = (e, o) => Object.prototype.hasOwnProperty.call(e, o), de = (e) => {
86
+ }, W = (e, o) => Object.prototype.hasOwnProperty.call(e, o), ue = (e) => {
51
87
  const o = [];
52
88
  for (const l of e)
53
- l.conditions ? o.push(...de(l.conditions)) : (l == null ? void 0 : l.dataType) === "component" && o.push(l);
89
+ l.conditions ? o.push(...ue(l.conditions)) : (l == null ? void 0 : l.dataType) === "component" && o.push(l);
54
90
  return o;
55
91
  };
56
- function Re(e) {
92
+ function Je(e) {
57
93
  const o = e.split("-");
58
94
  let l = "";
59
95
  if (o != null && o.length)
@@ -70,21 +106,21 @@ function Re(e) {
70
106
  }
71
107
  return l;
72
108
  }
73
- const Ye = (e) => e.replace(/\\n/g, `
74
- `), Be = (e = "", o) => {
75
- var a;
76
- const l = e.match(/\{(.+?)\}/g), t = ((a = e.split(`
77
- `)) == null ? void 0 : a.length) - 1;
78
- let y = "";
109
+ const Ze = (e) => e.replace(/\\n/g, `
110
+ `), Oe = (e = "", o) => {
111
+ var r;
112
+ const l = e.match(/\{(.+?)\}/g), t = ((r = e.split(`
113
+ `)) == null ? void 0 : r.length) - 1;
114
+ let m = "";
79
115
  if (t)
80
- for (let f = 0; f < t; f++)
81
- y += `
116
+ for (let d = 0; d < t; d++)
117
+ m += `
82
118
  `;
83
- let d = e;
119
+ let s = e;
84
120
  if (l != null && l.length) {
85
- for (const f of l) {
86
- const r = oe(
87
- f,
121
+ for (const d of l) {
122
+ const n = ie(
123
+ d,
88
124
  {
89
125
  textData: o
90
126
  },
@@ -93,61 +129,63 @@ const Ye = (e) => e.replace(/\\n/g, `
93
129
  useSpace: !1
94
130
  }
95
131
  );
96
- r && (d = d.replace(f, r));
132
+ n && (s = s.replace(d, n));
97
133
  }
98
- return `${y}{text|${d}}`;
134
+ return `${m}{text|${s}}`;
99
135
  } else
100
136
  return e;
101
137
  };
102
- function Ke(e) {
103
- let o = "", l = "", t = "", y = "";
138
+ function el(e) {
139
+ let o = "", l = "", t = "", m = "";
104
140
  e.indexOf(".") > -1 ? (l = e.split(".")[0], t = e.split(".")[1]) : l = e;
105
- let d = 0, a = 0;
106
- for (a = l.length - 1; a >= 0; )
107
- d % 3 === 0 && d !== 0 ? l[a] === "-" ? o += l[a] : o += "," + l[a] : o += l[a], a--, d++;
108
- return o = o.split("").reverse().join(""), e.indexOf(".") > -1 ? y = o + "." + t : y = o, y;
141
+ let s = 0, r = 0;
142
+ for (r = l.length - 1; r >= 0; )
143
+ s % 3 === 0 && s !== 0 ? l[r] === "-" ? o += l[r] : o += "," + l[r] : o += l[r], r--, s++;
144
+ return o = o.split("").reverse().join(""), e.indexOf(".") > -1 ? m = o + "." + t : m = o, m;
109
145
  }
110
- async function Ue({ graphicConfig: e, request: o, INDICATOR_URL: l = "", PAGE_ID: t, dataSourceId: y }) {
111
- var d;
112
- try {
113
- const { leftAxisList: a = [], rightAxisList: f = [], queryColumnList: r = [], indicators: i = [] } = v(e), s = [...a, ...f, ...r, ...i], n = {};
114
- for (const g of s) {
115
- const { indexCode: u = "", parentId: x = "" } = g;
116
- x && !K(g, "calcType") && !n[x] && (n[x] = u);
117
- }
118
- if ((d = Object.keys(n)) != null && d.length) {
119
- const g = [];
120
- for (const b in n)
121
- g.push(
122
- new Promise((S, c) => {
123
- o.post(
124
- `${l}/diagram/hrpIndexWithComplex`,
125
- {
126
- pageId: t,
127
- indexGuid: b,
128
- indexCode: n[b],
129
- dataSourceId: y
130
- }
131
- ).then((m) => {
132
- var N;
133
- const { success: A, data: w = [] } = m.data;
134
- A && ((N = w == null ? void 0 : w.dataViewColumns) != null && N.length) ? S(w.dataViewColumns) : c(w);
135
- }).catch((m) => {
136
- c(m);
137
- });
138
- })
139
- );
140
- return (await Promise.all(g)).reduce(
141
- (b, S) => b.filter((c) => S.find((m) => m.typeGuid === c.typeGuid))
142
- ).filter((b) => b.typeGuid);
146
+ function ll(s) {
147
+ return We(this, arguments, function* ({ graphicConfig: e, request: o, INDICATOR_URL: l = "", PAGE_ID: t, dataSourceId: m }) {
148
+ var r;
149
+ try {
150
+ const { leftAxisList: d = [], rightAxisList: n = [], queryColumnList: i = [], indicators: f = [] } = V(e), a = [...d, ...n, ...i, ...f], b = {};
151
+ for (const u of a) {
152
+ const { indexCode: S = "", parentId: A = "" } = u;
153
+ A && !W(u, "calcType") && !b[A] && (b[A] = S);
154
+ }
155
+ if ((r = Object.keys(b)) != null && r.length) {
156
+ const u = [];
157
+ for (const x in b)
158
+ u.push(
159
+ new Promise((c, y) => {
160
+ o.post(
161
+ `${l}/diagram/hrpIndexWithComplex`,
162
+ {
163
+ pageId: t,
164
+ indexGuid: x,
165
+ indexCode: b[x],
166
+ dataSourceId: m
167
+ }
168
+ ).then((g) => {
169
+ var v;
170
+ const { success: w, data: N = [] } = g.data;
171
+ w && ((v = N == null ? void 0 : N.dataViewColumns) != null && v.length) ? c(N.dataViewColumns) : y(N);
172
+ }).catch((g) => {
173
+ y(g);
174
+ });
175
+ })
176
+ );
177
+ return (yield Promise.all(u)).reduce(
178
+ (x, c) => x.filter((y) => c.find((g) => g.typeGuid === y.typeGuid))
179
+ ).filter((x) => x.typeGuid);
180
+ }
181
+ } catch (d) {
143
182
  }
144
- } catch {
145
- }
146
- return [];
183
+ return [];
184
+ });
147
185
  }
148
- const We = ["table", "bar", "combograph", "line", "pie", "radar", "scatter", "list", "circulate"];
149
- let Ee = /* @__PURE__ */ new Map();
150
- const _e = [
186
+ const ol = ["table", "bar", "combograph", "line", "pie", "radar", "scatter", "list", "circulate"];
187
+ let ze = /* @__PURE__ */ new Map();
188
+ const tl = [
151
189
  "keyValue",
152
190
  "conditionKey",
153
191
  "conditionLabel",
@@ -156,181 +194,172 @@ const _e = [
156
194
  "customValue",
157
195
  "id",
158
196
  "keyName"
159
- ], se = (e) => Ee.get(e), ze = (e, o = {}) => {
160
- const { around: l, unit: t, id: y } = e;
161
- let d = "";
162
- const { pageMode: a = "", componentList: f = [] } = (o == null ? void 0 : o.graphicConfig) || {};
163
- let r = null, i = null;
164
- if (a === "design") {
165
- const s = f == null ? void 0 : f.find((c) => c.id === y);
166
- if (!s)
197
+ ], ce = (e) => ze.get(e), il = (e, o = {}) => {
198
+ const { around: l, unit: t, id: m } = e;
199
+ let s = "";
200
+ const { pageMode: r = "", componentList: d = [] } = (o == null ? void 0 : o.graphicConfig) || {};
201
+ let n = null, i = null;
202
+ if (r === "design") {
203
+ const f = d == null ? void 0 : d.find((c) => c.id === m);
204
+ if (!f)
167
205
  return [];
168
- const { interval: n, intervalUnit: g, startTime: u, endTime: x, operate: b, useCurrentTime: S } = s || {};
169
- if (S && (r = _().subtract(n, g), i = _()), u && (r = _(u)), x && (i = _(x)), b) {
170
- const { type: c, value: m, mode: A } = b;
206
+ const { interval: a, intervalUnit: b, startTime: u, endTime: S, operate: A, useCurrentTime: x } = f || {};
207
+ if (x && (n = $().subtract(a, b), i = $()), u && (n = $(u)), S && (i = $(S)), A) {
208
+ const { type: c, value: y, mode: g } = A;
171
209
  switch (c) {
172
210
  case "add":
173
- r = r && r.add(m, A), i = i && i.add(m, A);
211
+ n = n && n.add(y, g), i = i && i.add(y, g);
174
212
  break;
175
213
  case "minus":
176
- r = r && r.subtract(m, A), i = i && i.subtract(m, A);
214
+ n = n && n.subtract(y, g), i = i && i.subtract(y, g);
177
215
  }
178
216
  }
179
217
  } else {
180
- const s = se(y) || {};
181
- v(s.startTime) && (r = _(v(s.startTime))), v(s.endTime) && (i = _(v(s.endTime)));
218
+ const f = ce(m) || {};
219
+ V(f.startTime) && (n = $(V(f.startTime))), V(f.endTime) && (i = $(V(f.endTime)));
182
220
  }
183
- if (r && i) {
184
- const s = i.diff(r, t.toLowerCase());
185
- d = `${l === "before" ? "-" : ""}${s + 1}`;
221
+ if (n && i) {
222
+ const f = i.diff(n, t.toLowerCase());
223
+ s = `${l === "before" ? "-" : ""}${f + 1}`;
186
224
  }
187
- return d ? [d] : [];
188
- }, Me = (e, o) => {
225
+ return s ? [s] : [];
226
+ }, _e = (e, o) => {
189
227
  if (o)
190
- K(e, "indexCode") && (e.hrpIndexCode = e.indexCode, delete e.indexCode), K(e, "indexCodeNum") && (e.hrpIndexCodeNum = e.indexCodeNum, delete e.indexCodeNum), K(e, "dataType") && delete e.dataType;
228
+ W(e, "indexCode") && (e.hrpIndexCode = e.indexCode, delete e.indexCode), W(e, "indexCodeNum") && (e.hrpIndexCodeNum = e.indexCodeNum, delete e.indexCodeNum), W(e, "dataType") && delete e.dataType;
191
229
  else {
192
- const { calcWays: l = [], dateCalcTypes: t = [], activeKey: y, componentId: d = "" } = e;
193
- if (y === 5 && (l != null && l.length) && (t != null && t.length) && d) {
194
- const a = l[0].split("-");
195
- (a == null ? void 0 : a.length) > 1 && a[0] === "rangeValue" && (e.calcWays = ze({
196
- around: a[1],
230
+ const { calcWays: l = [], dateCalcTypes: t = [], activeKey: m, componentId: s = "" } = e;
231
+ if (m === 5 && (l != null && l.length) && (t != null && t.length) && s) {
232
+ const r = l[0].split("-");
233
+ (r == null ? void 0 : r.length) > 1 && r[0] === "rangeValue" && (e.calcWays = il({
234
+ around: r[1],
197
235
  unit: t[0],
198
- id: d
236
+ id: s
199
237
  })), delete e.radioValue;
200
238
  }
201
- if (K(e, "dataType")) {
239
+ if (W(e, "dataType")) {
202
240
  if (e.fieldType === "DATE" && (e.label = e.fieldName), e.dataType === "component")
203
241
  if (e.fieldValue === "PARENT") {
204
- let a = e.modelKey;
205
- a && e.prop && (a += `-${e.prop}`), e.fieldValue = "${" + a + "}";
242
+ let r = e.modelKey;
243
+ r && e.prop && (r += `-${e.prop}`), e.fieldValue = "${" + r + "}";
206
244
  } else
207
245
  e.fieldValue = "${" + e.fieldValue + "}";
208
246
  delete e.dataType;
209
247
  }
210
- K(e, "activeKey") && delete e.activeKey, K(e, "radioValue") && delete e.radioValue, K(e, "indexCode") && (e.hrpIndexCode = e.indexCode, delete e.indexCode), K(e, "indexCodeNum") && (e.hrpIndexCodeNum = e.indexCodeNum, delete e.indexCodeNum), e.dataType !== "component" && e.useCurrentTime && (e.fieldValue = _().format(e.dateFormat)), K(e, "modelKey") && delete e.modelKey, K(e, "prop") && delete e.prop, delete e.useCurrentTime;
248
+ W(e, "activeKey") && delete e.activeKey, W(e, "radioValue") && delete e.radioValue, W(e, "indexCode") && (e.hrpIndexCode = e.indexCode, delete e.indexCode), W(e, "indexCodeNum") && (e.hrpIndexCodeNum = e.indexCodeNum, delete e.indexCodeNum), e.dataType !== "component" && e.useCurrentTime && (e.fieldValue = $().format(e.dateFormat)), W(e, "modelKey") && delete e.modelKey, W(e, "prop") && delete e.prop, delete e.useCurrentTime;
211
249
  }
212
- }, O = (e, o) => {
250
+ }, le = (e, o) => {
213
251
  const l = [];
214
- return e != null && e.length && ae(e).forEach((t) => {
252
+ return e != null && e.length && fe(e).forEach((t) => {
215
253
  if (t.join && t.conditions) {
216
- const y = !t.conditions.some((d) => d.join && d.conditions);
217
- t.conditions.forEach((d, a) => {
218
- Me(d, o);
219
- const f = {};
220
- if (a < t.conditions.length - 1 && (f.join = t.join), y)
221
- l.push({
222
- ...f,
223
- ...d
224
- });
225
- else if (d.join && d.conditions) {
226
- const r = o ? "sqlConditions" : "conditions";
227
- l.push({
228
- [r]: O([d], o),
229
- ...f
230
- });
254
+ const m = !t.conditions.some((s) => s.join && s.conditions);
255
+ t.conditions.forEach((s, r) => {
256
+ _e(s, o);
257
+ const d = {};
258
+ if (r < t.conditions.length - 1 && (d.join = t.join), m)
259
+ l.push(C(C({}, d), s));
260
+ else if (s.join && s.conditions) {
261
+ const n = o ? "sqlConditions" : "conditions";
262
+ l.push(C({
263
+ [n]: le([s], o)
264
+ }, d));
231
265
  } else
232
- l.push({
233
- ...f,
234
- ...d
235
- });
266
+ l.push(C(C({}, d), s));
236
267
  });
237
268
  } else
238
- Me(t, o), l.push(t);
269
+ _e(t, o), l.push(t);
239
270
  }), l;
240
- }, xe = (e = {}, o) => {
271
+ }, Ae = (e = {}, o) => {
241
272
  if (e != null && e.sortCpnts && o) {
242
- const w = je(e);
273
+ const w = Qe(e);
243
274
  w && (o.sort = w);
244
275
  }
245
276
  const {
246
277
  label: l,
247
278
  name: t,
248
- location: y,
249
- show: d,
250
- indexCode: a,
251
- indexCodeNum: f,
252
- calcType: r = "COLUMN",
279
+ location: m,
280
+ show: s,
281
+ indexCode: r,
282
+ indexCodeNum: d,
283
+ calcType: n = "COLUMN",
253
284
  builtInFormula: i,
254
- builtInValueSource: s,
255
- builtInCalcWay: n,
256
- formula: g,
285
+ builtInValueSource: f,
286
+ builtInCalcWay: a,
287
+ formula: b,
257
288
  conditions: u,
258
- aggregate: x,
259
- distinct: b,
260
- dimByCount: S,
289
+ aggregate: S,
290
+ distinct: A,
291
+ dimByCount: x,
261
292
  dataTo: c
262
293
  } = e;
263
- let m;
264
- if (u && (m = O(u)), r === "COMPONENT") {
294
+ let y;
295
+ if (u && (y = le(u)), n === "COMPONENT") {
265
296
  const w = {};
266
- return fe(w, s), {
297
+ return me(w, f), {
267
298
  label: l.trim(),
268
299
  columnName: t,
269
- show: d,
270
- calcType: r,
271
- componentAlias: n,
300
+ show: s,
301
+ calcType: n,
302
+ componentAlias: a,
272
303
  componentValue: w.fieldValue || null
273
304
  };
274
305
  }
275
- const A = {
306
+ const g = {
276
307
  label: l.trim(),
277
308
  columnName: t,
278
- location: y,
279
- show: d,
280
- calcType: c === "1" ? "VIEW" : r,
281
- hrpIndexCode: a,
282
- hrpIndexCodeNum: f,
283
- aggregate: x,
309
+ location: m,
310
+ show: s,
311
+ calcType: c === "1" ? "VIEW" : n,
312
+ hrpIndexCode: r,
313
+ hrpIndexCodeNum: d,
314
+ aggregate: S,
284
315
  builtInFormula: i,
285
- builtInValueSource: s,
286
- formula: g,
287
- conditions: m
316
+ builtInValueSource: f,
317
+ formula: b,
318
+ conditions: y
288
319
  };
289
320
  if (i === "DATE_OFFSET") {
290
- const w = n.split("-");
321
+ const w = a.split("-");
291
322
  if ((w == null ? void 0 : w.length) === 3) {
292
323
  let N = w[0];
293
- return w[2] === "before" && w[0] !== "0" && (N = `-${w[0]}`), {
294
- ...A,
324
+ return w[2] === "before" && w[0] !== "0" && (N = `-${w[0]}`), Y(C({}, g), {
295
325
  calcWays: [N],
296
326
  dateCalcTypes: [w[1]]
297
- };
327
+ });
298
328
  }
299
329
  } else
300
- return t === "the_count" && (A.calcType = "AGGREGATE", A.distinct = !!b, A.typeGuid = S), {
301
- ...A,
302
- builtInCalcWay: n
303
- };
304
- }, $e = (e) => {
330
+ return t === "the_count" && (g.calcType = "AGGREGATE", g.distinct = !!A, g.typeGuid = x), Y(C({}, g), {
331
+ builtInCalcWay: a
332
+ });
333
+ }, nl = (e) => {
305
334
  if (!e)
306
335
  return [];
307
- const o = ae((e == null ? void 0 : e.controlList) || []).filter((x) => x.conditionKey !== "parentCode"), {
336
+ const o = fe((e == null ? void 0 : e.controlList) || []).filter((S) => S.conditionKey !== "parentCode"), {
308
337
  classificationList: l = [],
309
338
  rowHeaderList: t = [],
310
- dimensionList: y = [],
311
- seriesList: d = [],
312
- leftAxisList: a = [],
313
- rightAxisList: f = [],
314
- queryColumnList: r = [],
339
+ dimensionList: m = [],
340
+ seriesList: s = [],
341
+ leftAxisList: r = [],
342
+ rightAxisList: d = [],
343
+ queryColumnList: n = [],
315
344
  indicators: i = []
316
345
  } = e;
317
- De(o);
318
- const s = [
346
+ He(o);
347
+ const f = [
319
348
  ...l,
320
349
  ...t,
321
- ...y,
322
- ...d,
323
- ...a,
324
- ...f,
350
+ ...m,
351
+ ...s,
325
352
  ...r,
353
+ ...d,
354
+ ...n,
326
355
  ...i
327
- ], n = [];
328
- for (const x of s) {
329
- const b = de((x == null ? void 0 : x.conditions) || []);
330
- if (b != null && b.length) {
331
- const S = b.filter((c) => (c == null ? void 0 : c.dataType) === "component").map((c) => {
332
- const m = {};
333
- return c != null && c.dateFormat && (m.format = c.dateFormat), c.fieldValue === "PARENT" && (m.id = "PARENT", m.keyName = c.modelKey, m.modelKey = c.modelKey, m.prop = c.prop), {
356
+ ], a = [];
357
+ for (const S of f) {
358
+ const A = ue((S == null ? void 0 : S.conditions) || []);
359
+ if (A != null && A.length) {
360
+ const x = A.filter((c) => (c == null ? void 0 : c.dataType) === "component").map((c) => {
361
+ const y = {};
362
+ return c != null && c.dateFormat && (y.format = c.dateFormat), c.fieldValue === "PARENT" && (y.id = "PARENT", y.keyName = c.modelKey, y.modelKey = c.modelKey, y.prop = c.prop), C({
334
363
  conditionKey: c.fieldName,
335
364
  conditionLabel: c.fieldName,
336
365
  conditionName: c.fieldName,
@@ -341,94 +370,93 @@ const _e = [
341
370
  notGlobal: !0,
342
371
  indexCode: c.indexCode,
343
372
  typeGuid: c.typeGuid,
344
- indexCodeNum: c.indexCodeNum,
345
- ...m
346
- };
373
+ indexCodeNum: c.indexCodeNum
374
+ }, y);
347
375
  });
348
- if (S != null && S.length)
349
- for (const c of S)
350
- n.find((m) => m.keyName === c.keyName) || n.push(c);
376
+ if (x != null && x.length)
377
+ for (const c of x)
378
+ a.find((y) => y.keyName === c.keyName) || a.push(c);
351
379
  }
352
380
  }
353
- const g = n.length, u = o;
354
- for (let x = 0; x < g; x++) {
355
- const b = n[x];
356
- if ((b == null ? void 0 : b.conditionKey) === "parentCode")
381
+ const b = a.length, u = o;
382
+ for (let S = 0; S < b; S++) {
383
+ const A = a[S];
384
+ if ((A == null ? void 0 : A.conditionKey) === "parentCode")
357
385
  continue;
358
386
  const {
359
- id: S,
387
+ id: x,
360
388
  keyName: c,
361
- prop: m,
362
- format: A,
389
+ prop: y,
390
+ format: g,
363
391
  modelKey: w,
364
392
  dataType: N = "component",
365
- customValue: k
366
- } = b, M = Ge(b);
367
- fe(M, S, { prop: m, dateFormat: A, modelKey: w, keyName: c }), N === "" && (M.fieldValue = k || ""), u.push(M);
393
+ customValue: v
394
+ } = A, E = $e(A);
395
+ me(E, x, { prop: y, dateFormat: g, modelKey: w, keyName: c }), N === "" && (E.fieldValue = v || ""), u.push(E);
368
396
  }
369
- for (let x = u.length - 1; x >= 0; x--) {
370
- const b = u[x];
371
- b.globalCondition || de(u).find((c) => c.alias === b.alias && c.globalCondition) && u.splice(x, 1);
397
+ for (let S = u.length - 1; S >= 0; S--) {
398
+ const A = u[S];
399
+ A.globalCondition || ue(u).find((c) => c.alias === A.alias && c.globalCondition) && u.splice(S, 1);
372
400
  }
373
401
  return u;
374
402
  };
375
- function Ge(e) {
403
+ function $e(e) {
376
404
  const {
377
405
  id: o,
378
406
  keyName: l,
379
407
  conditionLabel: t,
380
- conditionKey: y,
381
- conditionValueType: d,
382
- prop: a,
383
- rule: f = "NONE",
384
- notGlobal: r = !1,
408
+ conditionKey: m,
409
+ conditionValueType: s,
410
+ prop: r,
411
+ rule: d = "NONE",
412
+ notGlobal: n = !1,
385
413
  indexCode: i,
386
- typeGuid: s,
387
- indexCodeNum: n,
388
- dataType: g = "component"
414
+ typeGuid: f,
415
+ indexCodeNum: a,
416
+ dataType: b = "component"
389
417
  } = e;
390
418
  let u = l || o;
391
- u && a && (u += `-${a}`);
392
- let x = f;
393
- return x === "NONE" && (["startTime", "endTime"].includes(a) ? x = a === "startTime" ? "GREATER_EQUAL" : "LESS_EQUAL" : l != null && l.includes("startTime") ? x = a === "GREATER_EQUAL" : l != null && l.includes("endTime") ? x = a === "LESS_EQUAL" : x = "EQUAL"), o === "PARENT" && (u = e.modelKey, u && a && (u += `-${a}`), x = f), {
394
- rule: x,
419
+ u && r && (u += `-${r}`);
420
+ let S = d;
421
+ return S === "NONE" && (["startTime", "endTime"].includes(r) ? S = r === "startTime" ? "GREATER_EQUAL" : "LESS_EQUAL" : l != null && l.includes("startTime") ? S = r === "GREATER_EQUAL" : l != null && l.includes("endTime") ? S = r === "LESS_EQUAL" : S = "EQUAL"), o === "PARENT" && (u = e.modelKey, u && r && (u += `-${r}`), S = d), {
422
+ rule: S,
395
423
  label: t,
396
- fieldName: y,
424
+ fieldName: m,
397
425
  fieldValue: "",
398
426
  // 在关联控件中取
399
427
  // dateFormat: 'YYYY-MM',
400
- valueType: d,
428
+ valueType: s,
401
429
  alias: u,
402
- globalCondition: !r,
430
+ globalCondition: !n,
403
431
  indexCode: i,
404
- typeGuid: s,
405
- indexCodeNum: n,
406
- dataType: g
432
+ typeGuid: f,
433
+ indexCodeNum: a,
434
+ dataType: b
407
435
  };
408
436
  }
409
- function De(e) {
437
+ function He(e) {
410
438
  if (e != null && e.length)
411
439
  for (const o of e)
412
440
  if (o != null && o.conditions)
413
- De(o.conditions);
441
+ He(o.conditions);
414
442
  else {
415
443
  const {
416
444
  id: l,
417
445
  keyName: t,
418
- prop: y,
419
- modelKey: d,
420
- format: a,
421
- dataType: f = "component",
422
- customValue: r
423
- } = o, i = Ge(o);
424
- fe(i, l, { prop: y, dateFormat: a, modelKey: d, keyName: t }), f === "" && (i.fieldValue = r || "");
425
- for (const s in i)
426
- o[s] = i[s];
427
- for (const s of _e)
428
- delete o[s];
446
+ prop: m,
447
+ modelKey: s,
448
+ format: r,
449
+ dataType: d = "component",
450
+ customValue: n
451
+ } = o, i = $e(o);
452
+ me(i, l, { prop: m, dateFormat: r, modelKey: s, keyName: t }), d === "" && (i.fieldValue = n || "");
453
+ for (const f in i)
454
+ o[f] = i[f];
455
+ for (const f of tl)
456
+ delete o[f];
429
457
  }
430
458
  }
431
- function He(e) {
459
+ function rl(e) {
432
460
  const o = [];
433
461
  if (e != null && e.length) {
434
462
  for (const l of e)
@@ -439,7 +467,7 @@ function He(e) {
439
467
  valueType: l.variableType,
440
468
  alias: l.keyName || ""
441
469
  };
442
- fe(t, l.id, {
470
+ me(t, l.id, {
443
471
  dateFormat: l.format,
444
472
  prop: l.dateTypeValue,
445
473
  keyName: l.keyName,
@@ -451,107 +479,107 @@ function He(e) {
451
479
  }
452
480
  return o;
453
481
  }
454
- function fe(e, o, l) {
455
- const { prop: t = "", dateFormat: y = "", modelKey: d = "", keyName: a = "", operateValue: f, operateMode: r, operateType: i } = l || {}, s = d || a;
456
- if (o === "PARENT" && s && t) {
457
- const m = window.config.record;
458
- let A = t, w = y;
482
+ function me(e, o, l) {
483
+ const { prop: t = "", dateFormat: m = "", modelKey: s = "", keyName: r = "", operateValue: d, operateMode: n, operateType: i } = l || {}, f = s || r;
484
+ if (o === "PARENT" && f && t) {
485
+ const y = window.config.record;
486
+ let g = t, w = m;
459
487
  const N = t.match(/\{(.+?)\}/g);
460
488
  if (N != null && N.length) {
461
- const k = N[0].slice(1, -1).trim();
462
- A = t.replace(N[0], ""), w = k, e.dateFormat = w;
489
+ const v = N[0].slice(1, -1).trim();
490
+ g = t.replace(N[0], ""), w = v, e.dateFormat = w;
463
491
  }
464
- if (m && m[s]) {
465
- const k = v(m[s][A]);
466
- _.isDayjs(k) ? e.fieldValue = k.format(w || "YYYY-MM-DD") : e.fieldValue = k;
492
+ if (y && y[f]) {
493
+ const v = V(y[f][g]);
494
+ $.isDayjs(v) ? e.fieldValue = v.format(w || "YYYY-MM-DD") : e.fieldValue = v;
467
495
  }
468
496
  return;
469
497
  }
470
- const n = se(o) || {}, { value: g, format: u = "YYYY-MM-DD", type: x = "", useCurrentTime: b, RECORD: S } = n || {}, c = y || u;
471
- if (Y(n.type, "date")) {
472
- let m;
473
- if (b ? g ? m = v(g) : m = _() : m = v(g), f && r && i)
498
+ const a = ce(o) || {}, { value: b, format: u = "YYYY-MM-DD", type: S = "", useCurrentTime: A, RECORD: x } = a || {}, c = m || u;
499
+ if (K(a.type, "date")) {
500
+ let y;
501
+ if (A ? b ? y = V(b) : y = $() : y = V(b), d && n && i)
474
502
  switch (i) {
475
503
  case "add":
476
- m = m.add(f, r);
504
+ y = y.add(d, n);
477
505
  break;
478
506
  case "minus":
479
- m = m.subtract(f, r);
507
+ y = y.subtract(d, n);
480
508
  break;
481
509
  }
482
- e.fieldValue = m == null ? void 0 : m.format(c), e.dateFormat = c;
483
- } else if (x === "ecanRangePicker") {
484
- let m = t;
510
+ e.fieldValue = y == null ? void 0 : y.format(c), e.dateFormat = c;
511
+ } else if (S === "ecanRangePicker") {
512
+ let y = t;
485
513
  if (!t) {
486
- const w = a && a.split("-");
487
- w != null && w.length && (m = w[w.length - 1]);
514
+ const w = r && r.split("-");
515
+ w != null && w.length && (y = w[w.length - 1]);
488
516
  }
489
- if (!m)
517
+ if (!y)
490
518
  return;
491
- let A = null;
492
- if (v(n[m]) && (A = _(v(n[m]))), f && r && i) {
493
- if (f === "rangeValue") {
494
- if (n.startTime && n.endTime) {
495
- const w = v(n.endTime).diff(v(n.startTime), r) + 1;
519
+ let g = null;
520
+ if (V(a[y]) && (g = $(V(a[y]))), d && n && i) {
521
+ if (d === "rangeValue") {
522
+ if (a.startTime && a.endTime) {
523
+ const w = V(a.endTime).diff(V(a.startTime), n) + 1;
496
524
  switch (i) {
497
525
  case "add":
498
- A = A && A.add(w, r);
526
+ g = g && g.add(w, n);
499
527
  break;
500
528
  case "minus":
501
- A = A && A.subtract(w, r);
529
+ g = g && g.subtract(w, n);
502
530
  }
503
531
  }
504
- } else if (!isNaN(+f))
532
+ } else if (!isNaN(+d))
505
533
  switch (i) {
506
534
  case "add":
507
- A = A && A.add(f, r);
535
+ g = g && g.add(d, n);
508
536
  break;
509
537
  case "minus":
510
- A = A && A.subtract(f, r);
538
+ g = g && g.subtract(d, n);
511
539
  }
512
540
  }
513
- if (A && (e.fieldValue = A == null ? void 0 : A.format(c)), m === "rangeValue" && n.startTime && n.endTime) {
514
- const w = Re(c);
515
- w && (e.fieldValue = v(n.endTime).diff(v(n.startTime), w) + 1);
541
+ if (g && (e.fieldValue = g == null ? void 0 : g.format(c)), y === "rangeValue" && a.startTime && a.endTime) {
542
+ const w = Je(c);
543
+ w && (e.fieldValue = V(a.endTime).diff(V(a.startTime), w) + 1);
516
544
  }
517
545
  e.dateFormat = c;
518
546
  } else
519
- Y(x, We) ? d && S ? e.fieldValue = S[d] : !d && S ? e.fieldValue = S.value : e.fieldValue = v(g) : e.fieldValue = v(g);
547
+ K(S, ol) ? s && x ? e.fieldValue = x[s] : !s && x ? e.fieldValue = x.value : e.fieldValue = V(b) : e.fieldValue = V(b);
520
548
  }
521
- const re = (e) => {
549
+ const se = (e) => {
522
550
  var o;
523
551
  if (e) {
524
- const l = Array.isArray(e) ? ae(e) : [ae(e)];
525
- let t = "", y = [];
526
- const d = [], a = [], f = [];
527
- for (const r of l) {
528
- if (r.defaultCode && (r.label = r.columnName, delete r.defaultCode), r.type === "CUSTOM" && (y = r.customOrderColumns), t = r.type, d.push(r.label), (o = r.columnName) != null && o.includes("_ecanrepeat_")) {
529
- const i = r.columnName.split("_ecanrepeat_");
530
- a.push(i[0]);
552
+ const l = Array.isArray(e) ? fe(e) : [fe(e)];
553
+ let t = "", m = [];
554
+ const s = [], r = [], d = [];
555
+ for (const n of l) {
556
+ if (n.defaultCode && (n.label = n.columnName, delete n.defaultCode), n.type === "CUSTOM" && (m = n.customOrderColumns), t = n.type, s.push(n.label), (o = n.columnName) != null && o.includes("_ecanrepeat_")) {
557
+ const i = n.columnName.split("_ecanrepeat_");
558
+ r.push(i[0]);
531
559
  } else
532
- a.push(r.columnName);
533
- f.push(r.order);
560
+ r.push(n.columnName);
561
+ d.push(n.order);
534
562
  }
535
- return t !== "CUSTOM" && (d == null ? void 0 : d.length) > 1 && (t = "COMBINATION"), t === "CUSTOM" ? {
536
- label: d.join(","),
537
- columnName: a.join(","),
563
+ return t !== "CUSTOM" && (s == null ? void 0 : s.length) > 1 && (t = "COMBINATION"), t === "CUSTOM" ? {
564
+ label: s.join(","),
565
+ columnName: r.join(","),
538
566
  type: t,
539
- customOrderColumns: y
567
+ customOrderColumns: m
540
568
  } : {
541
- label: d.join(","),
542
- columnName: a.join(","),
543
- order: f.join(","),
569
+ label: s.join(","),
570
+ columnName: r.join(","),
571
+ order: d.join(","),
544
572
  type: t
545
573
  };
546
574
  } else
547
575
  return e;
548
- }, je = (e) => {
576
+ }, Qe = (e) => {
549
577
  const { sortCpnts: o = [] } = e;
550
578
  let l, t = "";
551
- for (const y of o) {
552
- const d = se(y) || {}, { type: a, RECORD: f } = d;
553
- if (Y(a, "image") && Y(f == null ? void 0 : f.value, ["asc", "desc"])) {
554
- t = f.value.toUpperCase();
579
+ for (const m of o) {
580
+ const s = ce(m) || {}, { type: r, RECORD: d } = s;
581
+ if (K(r, "image") && K(d == null ? void 0 : d.value, ["asc", "desc"])) {
582
+ t = d.value.toUpperCase();
555
583
  break;
556
584
  }
557
585
  }
@@ -561,443 +589,436 @@ const re = (e) => {
561
589
  order: t,
562
590
  type: "NORMAL"
563
591
  }), l;
564
- }, Qe = (e, o = {}) => {
565
- var Le, Ce, Te, pe, Ne, Fe, ve, ke, Ve;
566
- const { graphicConfig: l, type: t, globalModel: y, isGroupTable: d = !1 } = e;
567
- y && (Ee = y);
568
- let a = e.pageId;
569
- const f = Y(t, "pivottable");
592
+ }, al = (e, o = {}) => {
593
+ var Ne, Fe, ve, ke, Ve, Ie, he, Ge, De, je;
594
+ const { graphicConfig: l, type: t, globalModel: m, isGroupTable: s = !1 } = e;
595
+ m && (ze = m);
596
+ let r = e.pageId;
597
+ const d = K(t, "pivottable");
570
598
  let {
571
- source: r,
599
+ source: n,
572
600
  dataViewId: i,
573
- plugin: s = "1",
601
+ plugin: f = "1",
574
602
  // 插件类型
575
- layer: n,
603
+ layer: a,
576
604
  // 后台图表类型,值分0,1
577
- chartType: g,
605
+ chartType: b,
578
606
  // 前端图表类型
579
607
  classificationList: u = [],
580
- rowHeaderList: x = [],
581
- dimensionList: b = [],
608
+ rowHeaderList: S = [],
609
+ dimensionList: A = [],
582
610
  // 文本组件的维度列表
583
- seriesList: S = [],
611
+ seriesList: x = [],
584
612
  leftAxisList: c = [],
585
- rightAxisList: m = [],
586
- queryColumnList: A = [],
613
+ rightAxisList: y = [],
614
+ queryColumnList: g = [],
587
615
  indicators: w = [],
588
616
  controlList: N = [],
589
- formFields: k = {},
590
- variableList: M = [],
591
- variableConditions: X = [],
617
+ formFields: v = {},
618
+ variableList: E = [],
619
+ variableConditions: Z = [],
592
620
  // dataSourceId, // 所属数据源ID
593
- idxLibMode: ie,
621
+ idxLibMode: re,
594
622
  // 指标库模式, source= INDICATOR_LIB时候必填, NORMAL_YEAR_TABLE = 普通年表, WITH_DATE_DIM_TABLE = 带有时间维度表
595
- preview: ue = !1,
623
+ preview: ye = !1,
596
624
  // 预览开关
597
- edvDataSetId: be
625
+ edvDataSetId: Le
598
626
  // 数据集id
599
- } = l || {}, V = [];
600
- if ((l == null ? void 0 : l.pageMode) === "design" ? (V = (l.sqlConditions ?? []).map((L) => {
601
- const C = {};
602
- if (!K(L, "globalCondition") && !L.join && (C.globalCondition = !0), !L.join) {
603
- const T = L.rule || "EQUAL";
604
- C.rule = T === "NONE" ? "EQUAL" : T;
627
+ } = l || {}, I = [];
628
+ if ((l == null ? void 0 : l.pageMode) === "design" ? (I = ((Ne = l.sqlConditions) != null ? Ne : []).map((L) => {
629
+ const T = {};
630
+ if (!W(L, "globalCondition") && !L.join && (T.globalCondition = !0), !L.join) {
631
+ const p = L.rule || "EQUAL";
632
+ T.rule = p === "NONE" ? "EQUAL" : p;
605
633
  }
606
- return {
607
- ...L,
608
- ...C
609
- };
610
- }), X != null && X.length && (V = V.concat(X))) : (V = $e(l), M != null && M.length && (V = V.concat(He(M)))), V != null && V.length) {
611
- const L = V.filter((T) => T.globalCondition), C = V.filter((T) => !T.globalCondition);
612
- (L == null ? void 0 : L.length) > 1 && (V = [
634
+ return C(C({}, L), T);
635
+ }), Z != null && Z.length && (I = I.concat(Z))) : (I = nl(l), E != null && E.length && (I = I.concat(rl(E)))), I != null && I.length) {
636
+ const L = I.filter((p) => p.globalCondition), T = I.filter((p) => !p.globalCondition);
637
+ (L == null ? void 0 : L.length) > 1 && (I = [
613
638
  {
614
639
  join: "&&",
615
640
  conditions: L
616
641
  },
617
- ...C
642
+ ...T
618
643
  ]);
619
644
  }
620
- V != null && V.length && (V = O(V, "1")), n == null && (Y(t, ["table", "card"]) || Y(t, ["list", "circulate"]) && (u == null ? void 0 : u.length) > 1 ? n = "1" : Y(t, ["select", "checkbox", "radio"]) ? n = "3" : n = "2");
621
- let z;
622
- const Se = [];
623
- let ce = "";
645
+ I != null && I.length && (I = le(I, "1")), a == null && (K(t, ["table", "card"]) || K(t, ["list", "circulate"]) && (u == null ? void 0 : u.length) > 1 ? a = "1" : K(t, ["select", "checkbox", "radio"]) ? a = "3" : a = "2");
646
+ let H;
647
+ const Ce = [];
648
+ let xe = "";
624
649
  if (Array.isArray(u) && u.length > 0 && (!["ecanList", "ecanCirculate"].includes(t) || (u == null ? void 0 : u.length) === 1)) {
625
650
  const L = u.length;
626
- for (let C = 0; C < L; C++) {
627
- const T = u[C] || {}, {
628
- label: E = "",
629
- name: G = "",
630
- show: D = !1,
631
- sort: $,
632
- customGroup: Q,
633
- conditions: p,
634
- dateFormat: F,
635
- typeGuid: j = "",
636
- truncations: h = []
637
- } = T;
638
- if (D || L === 1) {
639
- ce = j, z = {
640
- label: E.trim(),
641
- columnName: G,
642
- show: D,
643
- sort: je(T) || re($) || $,
644
- customGroup: Q,
645
- conditions: O(p),
646
- typeGuid: j
647
- }, F && (z.dateFormat = F), G === "the_date" && !z.dateFormat && (z.dateFormat = "YYYY-MM");
648
- const I = {};
649
- if (Array.isArray(h) && h.length > 0) {
650
- const B = h.length;
651
- for (let U = 0; U < B; U++) {
652
- const W = h[U] || {}, { rule: H = "", num: P = 0, name: Z = "" } = W;
653
- H && P && (I.num = P, I.rule = H, Z && (I.otherGroupName = Z));
651
+ for (let T = 0; T < L; T++) {
652
+ const p = u[T] || {}, {
653
+ label: G = "",
654
+ name: D = "",
655
+ show: j = !1,
656
+ sort: Q,
657
+ customGroup: q,
658
+ conditions: F,
659
+ dateFormat: k,
660
+ typeGuid: R = "",
661
+ truncations: M = []
662
+ } = p;
663
+ if (j || L === 1) {
664
+ xe = R, H = {
665
+ label: G.trim(),
666
+ columnName: D,
667
+ show: j,
668
+ sort: Qe(p) || se(Q) || Q,
669
+ customGroup: q,
670
+ conditions: le(F),
671
+ typeGuid: R
672
+ }, k && (H.dateFormat = k), D === "the_date" && !H.dateFormat && (H.dateFormat = "YYYY-MM");
673
+ const h = {};
674
+ if (Array.isArray(M) && M.length > 0) {
675
+ const U = M.length;
676
+ for (let _ = 0; _ < U; _++) {
677
+ const z = M[_] || {}, { rule: P = "", num: X = 0, name: ee = "" } = z;
678
+ P && X && (h.num = X, h.rule = P, ee && (h.otherGroupName = ee));
654
679
  }
655
680
  }
656
- if ((Le = Object.keys(I)) != null && Le.length && (z.truncation = I), Y(t, ["scatter", "valueline"]))
657
- Se.push(z);
681
+ if ((Fe = Object.keys(h)) != null && Fe.length && (H.truncation = h), K(t, ["scatter", "valueline"]))
682
+ Ce.push(H);
658
683
  else
659
684
  break;
660
685
  }
661
686
  }
662
687
  }
663
- let Ae;
664
- if (Array.isArray(S) && S.length > 0) {
665
- const L = S.length;
666
- for (let C = 0; C < L; C++) {
667
- const T = S[C] || {}, { label: E = "", name: G = "", show: D = !1, sort: $, customGroup: Q, conditions: p, typeGuid: F } = T;
668
- if (D || L === 1) {
669
- Ae = {
670
- label: E.trim(),
671
- columnName: G,
672
- show: D,
673
- sort: re($),
674
- customGroup: Q,
675
- conditions: O(p),
676
- typeGuid: F
688
+ let Te;
689
+ if (Array.isArray(x) && x.length > 0) {
690
+ const L = x.length;
691
+ for (let T = 0; T < L; T++) {
692
+ const p = x[T] || {}, { label: G = "", name: D = "", show: j = !1, sort: Q, customGroup: q, conditions: F, typeGuid: k } = p;
693
+ if (j || L === 1) {
694
+ Te = {
695
+ label: G.trim(),
696
+ columnName: D,
697
+ show: j,
698
+ sort: se(Q),
699
+ customGroup: q,
700
+ conditions: le(F),
701
+ typeGuid: k
677
702
  };
678
703
  break;
679
704
  }
680
705
  }
681
706
  }
682
- const R = [];
707
+ const B = [];
683
708
  c == null || c.forEach((L) => {
684
- L.location = "LEFT", R.push(xe(L, z));
685
- }), m == null || m.forEach((L) => {
686
- L.location = "RIGHT", R.push(xe(L, z));
709
+ L.location = "LEFT", B.push(Ae(L, H));
710
+ }), y == null || y.forEach((L) => {
711
+ L.location = "RIGHT", B.push(Ae(L, H));
687
712
  });
688
- let ne = w;
689
- (Te = (Ce = o == null ? void 0 : o.pivotTableCal) == null ? void 0 : Ce.indicators) != null && Te.length && (ne = o.pivotTableCal.indicators), ne == null || ne.forEach((L) => {
690
- L.location = "LEFT", R.push(xe(L, z));
713
+ let ae = w;
714
+ (ke = (ve = o == null ? void 0 : o.pivotTableCal) == null ? void 0 : ve.indicators) != null && ke.length && (ae = o.pivotTableCal.indicators), ae == null || ae.forEach((L) => {
715
+ L.location = "LEFT", B.push(Ae(L, H));
691
716
  });
692
- const q = [];
693
- ["ecanList", "ecanCirculate"].includes(t) && (u == null ? void 0 : u.length) > 1 && (A = u), (Ne = (pe = o == null ? void 0 : o.pivotTableCal) == null ? void 0 : pe.dimensions) != null && Ne.length && (A = o.pivotTableCal.dimensions), A == null || A.forEach((L) => {
694
- const { label: C, name: T, location: E, show: G, indexCode: D, sort: $, typeGuid: Q, indexCodeNum: p, dateFormat: F, conditions: j } = L;
695
- let h = re($);
717
+ const J = [];
718
+ ["ecanList", "ecanCirculate"].includes(t) && (u == null ? void 0 : u.length) > 1 && (g = u), (Ie = (Ve = o == null ? void 0 : o.pivotTableCal) == null ? void 0 : Ve.dimensions) != null && Ie.length && (g = o.pivotTableCal.dimensions), g == null || g.forEach((L) => {
719
+ const { label: T, name: p, location: G, show: D, indexCode: j, sort: Q, typeGuid: q, indexCodeNum: F, dateFormat: k, conditions: R } = L;
720
+ let M = se(Q);
696
721
  if (o.sort) {
697
- const { field: B, order: U } = o.sort;
698
- let W = R.find((H) => H.label === B);
699
- !W && C === B && (W = L), W && (h = {
700
- columnName: W.columnName,
722
+ const { field: U, order: _ } = o.sort;
723
+ let z = B.find((P) => P.label === U);
724
+ !z && T === U && (z = L), z && (M = {
725
+ columnName: z.columnName,
701
726
  label: o.sort.field,
702
- order: U.toUpperCase(),
727
+ order: _.toUpperCase(),
703
728
  type: "NORMAL"
704
729
  });
705
730
  }
706
- const I = {
707
- label: C,
708
- columnName: T,
709
- location: E,
710
- show: G,
711
- sort: h,
731
+ const h = {
732
+ label: T,
733
+ columnName: p,
734
+ location: G,
735
+ show: D,
736
+ sort: M,
712
737
  calcType: "COLUMN",
713
- hrpIndexCode: D,
714
- hrpIndexCodeNum: p,
715
- conditions: O(j),
716
- typeGuid: Q
738
+ hrpIndexCode: j,
739
+ hrpIndexCodeNum: F,
740
+ conditions: le(R),
741
+ typeGuid: q
717
742
  };
718
- F && (I.dateFormat = F), T === "the_date" && !I.dateFormat && (I.dateFormat = "YYYY-MM"), q.push(I);
743
+ k && (h.dateFormat = k), p === "the_date" && !h.dateFormat && (h.dateFormat = "YYYY-MM"), J.push(h);
719
744
  });
720
- let te = [], J = [];
721
- if (Array.isArray(x) && x.length > 0 ? J = x : Array.isArray(b) && b.length > 0 && (J = b), J != null && J.length) {
722
- const L = J.length;
723
- for (let C = 0; C < L; C++) {
724
- const T = J[C] || {}, { label: E = "", name: G = "", show: D = !1, sort: $, customGroup: Q, conditions: p, truncations: F, typeGuid: j = "", dateFormat: h } = T;
725
- let I = re($);
745
+ let ne = [], O = [];
746
+ if (Array.isArray(S) && S.length > 0 ? O = S : Array.isArray(A) && A.length > 0 && (O = A), O != null && O.length) {
747
+ const L = O.length;
748
+ for (let T = 0; T < L; T++) {
749
+ const p = O[T] || {}, { label: G = "", name: D = "", show: j = !1, sort: Q, customGroup: q, conditions: F, truncations: k, typeGuid: R = "", dateFormat: M } = p;
750
+ let h = se(Q);
726
751
  if (o.sort) {
727
- const { field: W, order: H } = o.sort;
728
- let P = R.find((Z) => Z.label === W);
729
- !P && T.label === W && (P = T), P && (I = {
730
- columnName: P.columnName,
752
+ const { field: z, order: P } = o.sort;
753
+ let X = B.find((ee) => ee.label === z);
754
+ !X && p.label === z && (X = p), X && (h = {
755
+ columnName: X.columnName,
731
756
  label: o.sort.field,
732
- order: H.toUpperCase(),
757
+ order: P.toUpperCase(),
733
758
  type: "NORMAL"
734
759
  });
735
760
  }
736
- const B = {
737
- label: E.trim(),
738
- columnName: G,
739
- show: D,
740
- sort: I,
741
- customGroup: Q,
742
- conditions: O(p),
743
- typeGuid: j
761
+ const U = {
762
+ label: G.trim(),
763
+ columnName: D,
764
+ show: j,
765
+ sort: h,
766
+ customGroup: q,
767
+ conditions: le(F),
768
+ typeGuid: R
744
769
  };
745
- h && (B.dateFormat = h), G === "the_date" && !B.dateFormat && (B.dateFormat = "YYYY-MM");
746
- const U = {};
747
- if (Array.isArray(F) && F.length > 0) {
748
- const W = F.length;
749
- for (let H = 0; H < W; H++) {
750
- const P = F[H] || {}, { rule: Z = "", num: Ie = 0, name: he = "" } = P;
751
- Z && Ie && (U.num = Ie, U.rule = Z, he && (U.otherGroupName = he));
770
+ M && (U.dateFormat = M), D === "the_date" && !U.dateFormat && (U.dateFormat = "YYYY-MM");
771
+ const _ = {};
772
+ if (Array.isArray(k) && k.length > 0) {
773
+ const z = k.length;
774
+ for (let P = 0; P < z; P++) {
775
+ const X = k[P] || {}, { rule: ee = "", num: Re = 0, name: Ye = "" } = X;
776
+ ee && Re && (_.num = Re, _.rule = ee, Ye && (_.otherGroupName = Ye));
752
777
  }
753
778
  }
754
- (Fe = Object.keys(U)) != null && Fe.length && (B.truncation = U), te.push(B);
779
+ (he = Object.keys(_)) != null && he.length && (U.truncation = _), ne.push(U);
755
780
  }
756
781
  }
757
- let ye = [], we;
782
+ let ge = [], pe;
758
783
  if (o != null && o.pivotTableCal) {
759
784
  let L = [];
760
785
  const {
761
- calc: C = [],
762
- filter: T = [],
763
- truncations: E = [],
764
- sorts: G = [],
765
- aggregateMethod: D = [],
766
- rowDimensionKeys: $ = [],
767
- colDimensionKeys: Q = []
786
+ calc: T = [],
787
+ filter: p = [],
788
+ truncations: G = [],
789
+ sorts: D = [],
790
+ aggregateMethod: j = [],
791
+ rowDimensionKeys: Q = [],
792
+ colDimensionKeys: q = []
768
793
  } = o.pivotTableCal;
769
- if (R.push(...C), T != null && T.length)
770
- for (const p of T) {
771
- const { type: F, ...j } = p;
772
- F === "indicators" ? L = R : F === "dimension" && (L = q);
773
- const h = L.find((I) => I.columnName === p.fieldName);
774
- h && (h.conditions || (h.conditions = []), h.conditions.push(j));
775
- }
776
- if (E != null && E.length)
777
- for (const p of E) {
778
- const F = q.find((j) => j.columnName === p.key);
779
- F && (F.truncation = {
780
- num: p.num,
781
- rule: p.rule
782
- });
794
+ if (B.push(...T), p != null && p.length)
795
+ for (const F of p) {
796
+ const Me = F, { type: k } = Me, R = Se(Me, ["type"]);
797
+ k === "indicators" ? L = B : k === "dimension" && (L = J);
798
+ const M = L.find((h) => h.columnName === F.fieldName);
799
+ M && (M.conditions || (M.conditions = []), M.conditions.push(R));
783
800
  }
784
801
  if (G != null && G.length)
785
- for (const p of G) {
786
- const { fieldType: F, columnData: j, ...h } = p;
787
- F === "indicators" ? (L = R, we = j) : F === "dimension" && (L = q);
788
- const I = L.find((B) => B.label === h.label);
789
- I && (I.sort = {
790
- ...h,
791
- columnName: I.columnName
802
+ for (const F of G) {
803
+ const k = J.find((R) => R.columnName === F.key);
804
+ k && (k.truncation = {
805
+ num: F.num,
806
+ rule: F.rule
792
807
  });
793
808
  }
794
- if ((ve = Object.keys(D)) != null && ve.length)
795
- for (const p in D) {
796
- const F = q.find((j) => j.label === p);
797
- F && ((ke = D[p]) != null && ke.length) && (F.aggregateMethod = D[p]);
809
+ if (D != null && D.length)
810
+ for (const F of D) {
811
+ const Ee = F, { fieldType: k, columnData: R } = Ee, M = Se(Ee, ["fieldType", "columnData"]);
812
+ k === "indicators" ? (L = B, pe = R) : k === "dimension" && (L = J);
813
+ const h = L.find((U) => U.label === M.label);
814
+ h && (h.sort = Y(C({}, M), {
815
+ columnName: h.columnName
816
+ }));
817
+ }
818
+ if ((Ge = Object.keys(j)) != null && Ge.length)
819
+ for (const F in j) {
820
+ const k = J.find((R) => R.label === F);
821
+ k && ((De = j[F]) != null && De.length) && (k.aggregateMethod = j[F]);
798
822
  }
799
- te = [], ye = [];
800
- for (const p of q)
801
- $.includes(p.columnName) ? te.push(p) : Q.includes(p.columnName) && ye.push(p);
823
+ ne = [], ge = [];
824
+ for (const F of J)
825
+ Q.includes(F.columnName) ? ne.push(F) : q.includes(F.columnName) && ge.push(F);
802
826
  }
803
- if (Y(t, ["text", "proportion", "counter"]) ? g = "zb" : Y(t, ["valueline"]) && (g = "valueline"), d || t === "card") {
804
- if (te.length === 0 || R.length === 0)
827
+ if (K(t, ["text", "proportion", "counter"]) ? b = "zb" : K(t, ["valueline"]) && (b = "valueline"), s || t === "card") {
828
+ if (ne.length === 0 || B.length === 0)
805
829
  return;
806
- g = "grouptable";
830
+ b = "grouptable";
807
831
  } else {
808
- if (n === "1" && q.length === 0)
832
+ if (a === "1" && J.length === 0)
809
833
  return;
810
- if (n === "2" && R.length === 0)
834
+ if (a === "2" && B.length === 0)
811
835
  return;
812
- if (n === "3" && (!ce && r !== "EDV_DATA_SET" || !k.labelField || !k.valueField))
836
+ if (a === "3" && (!xe && n !== "EDV_DATA_SET" || !v.labelField || !v.valueField))
813
837
  return;
814
- if (n === "3" && t === "ecanDataSelect" && R.length === 0)
838
+ if (a === "3" && t === "ecanDataSelect" && B.length === 0)
815
839
  return;
816
840
  }
817
- if (b != null && b.length && (n = "1", g = "grouptable"), !a) {
841
+ if (A != null && A.length && (a = "1", b = "grouptable"), !r) {
818
842
  const { pathname: L } = window == null ? void 0 : window.location;
819
843
  if (L) {
820
- const C = L.split("/");
821
- C != null && C.length && (a = C[C.length - 1]);
844
+ const T = L.split("/");
845
+ T != null && T.length && (r = T[T.length - 1]);
822
846
  }
823
847
  }
824
- let me;
825
- if (!Y(t, ["scatter", "valueline"]) && ((Ve = Object.keys(k)) != null && Ve.length)) {
826
- const L = de(N).find((T) => T.conditionKey === "parentCode"), C = {};
848
+ let be;
849
+ if (!K(t, ["scatter", "valueline"]) && ((je = Object.keys(v)) != null && je.length)) {
850
+ const L = ue(N).find((p) => p.conditionKey === "parentCode"), T = {};
827
851
  if (L) {
828
- const T = se(L.id) || {};
829
- if (T != null && T.itemCodes)
830
- C.parentItemCodes = T.itemCodes;
852
+ const p = ce(L.id) || {};
853
+ if (p != null && p.itemCodes)
854
+ T.parentItemCodes = p.itemCodes;
831
855
  else
832
856
  return;
833
857
  }
834
- t === "ecanDataSelect" && (C.indicatorList = R.filter((T) => T.show)), r === "EDV_DATA_SET" && (C.edvDataSetId = be), me = {
858
+ t === "ecanDataSelect" && (T.indicatorList = B.filter((p) => p.show)), n === "EDV_DATA_SET" && (T.edvDataSetId = Le), be = C({
835
859
  url: "/diagram/formData",
836
- source: r,
860
+ source: n,
837
861
  dataViewId: i,
838
862
  plugin: "4",
839
- layer: n,
863
+ layer: a,
840
864
  chartType: "normalSelect",
841
- rangeIndexTypeGuid: ce,
865
+ rangeIndexTypeGuid: xe,
842
866
  type: t === "ecanDataSelect" ? "normalSelectData" : "normalSelect",
843
- labelField: k.labelField,
844
- valueField: k.valueField,
845
- pageId: a,
846
- sqlConditions: V,
867
+ labelField: v.labelField,
868
+ valueField: v.valueField,
869
+ pageId: r,
870
+ sqlConditions: I,
847
871
  idxLibMode: "WITH_DATE_DIM_TABLE",
848
- keyName: e.keyName,
849
- ...C
850
- };
872
+ keyName: e.keyName
873
+ }, T);
851
874
  } else {
852
875
  let L = {};
853
- Y(t, ["scatter", "valueline"]) ? L = {
854
- classifications: Se
876
+ K(t, ["scatter", "valueline"]) ? L = {
877
+ classifications: Ce
855
878
  } : L = {
856
- classification: z
857
- }, me = {
879
+ classification: H
880
+ }, be = C({
858
881
  url: "/diagram",
859
- source: r,
882
+ source: n,
860
883
  dataViewId: i,
861
- plugin: f ? "5" : s,
862
- layer: n,
863
- chartType: f ? "pivot-table" : g,
864
- series: Ae,
865
- indicatorList: R,
866
- queryColumns: d ? [] : q,
884
+ plugin: d ? "5" : f,
885
+ layer: a,
886
+ chartType: d ? "pivot-table" : b,
887
+ series: Te,
888
+ indicatorList: B,
889
+ queryColumns: s ? [] : J,
867
890
  pageFlag: !0,
868
- pageId: a,
869
- edvDataSetId: be || "",
870
- sqlConditions: V.map((C) => {
871
- const { fieldValue: T } = C, E = {};
872
- return T && Array.isArray(T) && (E.fieldValue = JSON.stringify(T)), {
873
- ...C,
874
- ...E
875
- };
891
+ pageId: r,
892
+ edvDataSetId: Le || "",
893
+ sqlConditions: I.map((T) => {
894
+ const { fieldValue: p } = T, G = {};
895
+ return p && Array.isArray(p) && (G.fieldValue = JSON.stringify(p)), C(C({}, T), G);
876
896
  }),
877
- idxLibMode: ie,
878
- preview: ue,
879
- rowHeaders: te,
897
+ idxLibMode: re,
898
+ preview: ye,
899
+ rowHeaders: ne,
880
900
  keyName: e.keyName,
881
901
  // 透视表指标排序相关入参
882
- columnData: we,
883
- columnHeaders: ye,
884
- ...L
885
- };
902
+ columnData: pe,
903
+ columnHeaders: ge
904
+ }, L);
886
905
  }
887
- return me;
888
- }, Pe = {
889
- formatIndicatorParams: Qe
890
- }, qe = (e = [], o) => {
906
+ return be;
907
+ }, dl = () => {
908
+ console.log("This is indicator");
909
+ }, sl = {
910
+ formatIndicatorParams: al,
911
+ formatTest: dl
912
+ }, fl = (e = [], o) => {
891
913
  let { name: l = "name", types: t = [] } = o || {};
892
914
  l = (l == null ? void 0 : l.trim()) || l;
893
- const y = /* @__PURE__ */ new Set(), d = /* @__PURE__ */ new Map(), a = e.length, f = t.length;
894
- if (a === 1) {
895
- const s = [];
896
- for (let g = 0; g < f; g++) {
897
- const u = t[g], { label: x, value: b } = u, S = { ...e[0], value: e[0][b] };
898
- y.add(x), s.push(S);
915
+ const m = /* @__PURE__ */ new Set(), s = /* @__PURE__ */ new Map(), r = e.length, d = t.length;
916
+ if (r === 1) {
917
+ const f = [];
918
+ for (let b = 0; b < d; b++) {
919
+ const u = t[b], { label: S, value: A } = u, x = Y(C({}, e[0]), { value: e[0][A] });
920
+ m.add(S), f.push(x);
899
921
  }
900
- const n = e[0][l] || "";
901
- d.set(n, s);
922
+ const a = e[0][l] || "";
923
+ s.set(a, f);
902
924
  } else
903
- for (let s = 0; s < a; s++) {
904
- const n = e[s], g = n[l];
905
- y.add(g);
906
- for (let u = 0; u < f; u++) {
907
- const x = t[u], { label: b, value: S } = x, c = { ...n, value: n[S] };
908
- if (d.has(b)) {
909
- const m = d.get(b);
910
- m.push(c), d.set(b, m);
925
+ for (let f = 0; f < r; f++) {
926
+ const a = e[f], b = a[l];
927
+ m.add(b);
928
+ for (let u = 0; u < d; u++) {
929
+ const S = t[u], { label: A, value: x } = S, c = Y(C({}, a), { value: a[x] });
930
+ if (s.has(A)) {
931
+ const y = s.get(A);
932
+ y.push(c), s.set(A, y);
911
933
  } else
912
- d.set(b, [c]);
934
+ s.set(A, [c]);
913
935
  }
914
936
  }
915
- const r = Array.from(y), i = [];
916
- for (const [s, n] of d)
937
+ const n = Array.from(m), i = [];
938
+ for (const [f, a] of s)
917
939
  i.push({
918
- name: s,
919
- data: n
940
+ name: f,
941
+ data: a
920
942
  });
921
943
  return {
922
- dimensions: r,
944
+ dimensions: n,
923
945
  dataset: i
924
946
  };
925
- }, Xe = (e, o) => {
926
- let { name: l = "name", value: t = "value", type: y = "type" } = o || {};
927
- l = l == null ? void 0 : l.trim(), t = t == null ? void 0 : t.trim(), y = y == null ? void 0 : y.trim();
928
- const d = /* @__PURE__ */ new Set(), a = /* @__PURE__ */ new Map(), f = e.length;
929
- for (let s = 0; s < f; s++) {
930
- const n = e[s], g = n[l] || "", u = n[t] || "", x = n[y] || "";
931
- if (d.add(g), a.has(x)) {
932
- const b = a.get(x);
933
- b.push({ name: g, value: u, ...n }), a.set(x, b);
947
+ }, ul = (e, o) => {
948
+ let { name: l = "name", value: t = "value", type: m = "type" } = o || {};
949
+ l = l == null ? void 0 : l.trim(), t = t == null ? void 0 : t.trim(), m = m == null ? void 0 : m.trim();
950
+ const s = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Map(), d = e.length;
951
+ for (let f = 0; f < d; f++) {
952
+ const a = e[f], b = a[l] || "", u = a[t] || "", S = a[m] || "";
953
+ if (s.add(b), r.has(S)) {
954
+ const A = r.get(S);
955
+ A.push(C({ name: b, value: u }, a)), r.set(S, A);
934
956
  } else
935
- a.set(x, [{ name: g, value: u, ...n }]);
957
+ r.set(S, [C({ name: b, value: u }, a)]);
936
958
  }
937
- const r = Array.from(d), i = [];
938
- for (const [s, n] of a)
959
+ const n = Array.from(s), i = [];
960
+ for (const [f, a] of r)
939
961
  i.push({
940
- name: s,
941
- data: n
962
+ name: f,
963
+ data: a
942
964
  });
943
965
  return {
944
- dimensions: r,
966
+ dimensions: n,
945
967
  dataset: i
946
968
  };
947
- }, le = (e, o) => {
948
- var y;
969
+ }, te = (e, o) => {
970
+ var m;
949
971
  if (console.log("This is useValueFormatter"), e == null)
950
972
  return o;
951
973
  const l = e.match(/\{.*\}/g);
952
974
  if (l == null || l.length === 0)
953
975
  return o;
954
976
  const t = l.length;
955
- for (let d = 0; d < t; d++) {
956
- const a = l[d];
957
- if (a == null || a === "")
977
+ for (let s = 0; s < t; s++) {
978
+ const r = l[s];
979
+ if (r == null || r === "")
958
980
  break;
959
- let f = (y = a.slice(1, -1)) == null ? void 0 : y.trim();
960
- f = f == null ? void 0 : f.replace(/value/g, o);
981
+ let d = (m = r.slice(1, -1)) == null ? void 0 : m.trim();
982
+ d = d == null ? void 0 : d.replace(/value/g, o);
961
983
  try {
962
- let r = f;
963
- (/\(.*\)/g.test(f) || /[+/\\*]/g.test(f)) && (r = ge(f)), e = e.replace(a, r);
964
- } catch {
965
- e = e.replace(a, f);
984
+ let n = d;
985
+ (/\(.*\)/g.test(d) || /[+/\\*]/g.test(d)) && (n = we(d)), e = e.replace(r, n);
986
+ } catch (n) {
987
+ e = e.replace(r, d);
966
988
  }
967
989
  }
968
990
  return e;
969
991
  };
970
- function Je(e) {
992
+ function cl(e) {
971
993
  return e.isShowMarkLine ? {
972
994
  markLine: {
973
995
  data: [{ type: e.markLineType }]
974
996
  }
975
997
  } : {};
976
998
  }
977
- const Ze = (e, o, l) => {
999
+ const ml = (e, o, l) => {
978
1000
  switch (e.type) {
979
1001
  case "bar":
980
- return Oe(e, o, l);
1002
+ return yl(e, o, l);
981
1003
  case "line":
982
- return el(e, o, l);
1004
+ return xl(e, o, l);
983
1005
  case "pie":
984
- return ll(e, o, l);
1006
+ return gl(e, o, l);
985
1007
  case "comboGraph":
986
- return ol(e, o, l);
1008
+ return bl(e, o, l);
987
1009
  default:
988
1010
  return {};
989
1011
  }
990
- }, Oe = (e, o, l) => {
991
- const t = e.yAxisLabelFormatter, y = e.xAxisLabelFormatter, { dimensions: d = [], dataset: a = [] } = o, f = ee(() => {
992
- const { gradientShow: i, gradientColors: s, gradientOffset: n, barBorderRadius: g } = e, u = a, x = u.length, b = [];
993
- for (let S = 0; S < x; S++) {
994
- const c = {
995
- ...u[S],
1012
+ }, yl = (e, o, l) => {
1013
+ const t = e.yAxisLabelFormatter, m = e.xAxisLabelFormatter, { dimensions: s = [], dataset: r = [] } = o, d = oe(() => {
1014
+ const { gradientShow: i, gradientColors: f, gradientOffset: a, barBorderRadius: b } = e, u = r, S = u.length, A = [];
1015
+ for (let x = 0; x < S; x++) {
1016
+ const c = Y(C({}, u[x]), {
996
1017
  type: "bar",
997
1018
  barWidth: e.barWidth,
998
1019
  showBackground: e.showBarBackground
999
- }, { isStack: m, stackColumns: A } = e;
1000
- if (m && A.includes(u[S].name || !A) && (c.stack = "stack"), c.label = {
1020
+ }), { isStack: y, stackColumns: g } = e;
1021
+ if (y && g.includes(u[x].name || !g) && (c.stack = "stack"), c.label = {
1001
1022
  show: e.labelShow,
1002
1023
  fontSize: e.labelFontSize,
1003
1024
  position: e.labelPosition,
@@ -1005,20 +1026,19 @@ const Ze = (e, o, l) => {
1005
1026
  width: e.labelWidth,
1006
1027
  overflow: e.labelOverflow,
1007
1028
  formatter: (w) => {
1008
- let N = "", k = e.labelFormatter;
1009
- k === "" && (k = "{c}");
1010
- const { seriesName: M, name: X, value: ie, data: ue } = w || {};
1011
- return N += oe(
1012
- k,
1029
+ let N = "", v = e.labelFormatter;
1030
+ v === "" && (v = "{c}");
1031
+ const { seriesName: E, name: Z, value: re, data: ye } = w || {};
1032
+ return N += ie(
1033
+ v,
1013
1034
  {
1014
- textData: {
1015
- name: X,
1016
- value: ie,
1017
- a: M,
1018
- b: X,
1019
- c: ie || 0,
1020
- ...ue
1021
- }
1035
+ textData: C({
1036
+ name: Z,
1037
+ value: re,
1038
+ a: E,
1039
+ b: Z,
1040
+ c: re || 0
1041
+ }, ye)
1022
1042
  },
1023
1043
  {
1024
1044
  useNewline: !0,
@@ -1034,80 +1054,78 @@ const Ze = (e, o, l) => {
1034
1054
  y2: e.isUseHorizontalAxis ? 0 : 1,
1035
1055
  colorStops: [{
1036
1056
  offset: 0,
1037
- color: e.colors[S]
1057
+ color: e.colors[x]
1038
1058
  }, {
1039
- offset: n,
1040
- color: s[S]
1059
+ offset: a,
1060
+ color: f[x]
1041
1061
  }, {
1042
1062
  offset: 1,
1043
- color: s[S]
1063
+ color: f[x]
1044
1064
  }]
1045
1065
  }
1046
- }), g) {
1047
- const w = g.split(",");
1066
+ }), b) {
1067
+ const w = b.split(",");
1048
1068
  if (w != null && w.length) {
1049
1069
  const N = [];
1050
- for (const k of w) {
1051
- const M = parseFloat(k);
1052
- isNaN(M) || N.push(M);
1070
+ for (const v of w) {
1071
+ const E = parseFloat(v);
1072
+ isNaN(E) || N.push(E);
1053
1073
  }
1054
1074
  c.itemStyle.barBorderRadius = N;
1055
1075
  }
1056
1076
  }
1057
1077
  e.isShowMarkLine && (c.markLine = {
1058
1078
  data: [{ type: e.markLineType }]
1059
- }), b.push(c);
1079
+ }), A.push(c);
1060
1080
  }
1061
- return b;
1062
- }), r = ee(() => d.map((i) => {
1063
- let s = {};
1064
- return i && typeof i == "object" ? s = {
1065
- ...i,
1081
+ return A;
1082
+ }), n = oe(() => s.map((i) => {
1083
+ let f = {};
1084
+ return i && typeof i == "object" ? f = Y(C({}, i), {
1066
1085
  textStyle: {
1067
1086
  fontSize: l
1068
1087
  }
1069
- } : s = {
1088
+ }) : f = {
1070
1089
  value: i,
1071
1090
  textStyle: {
1072
1091
  fontSize: l
1073
1092
  }
1074
- }, s;
1093
+ }, f;
1075
1094
  }));
1076
1095
  return {
1077
1096
  tooltip: {
1078
1097
  trigger: "axis",
1079
1098
  show: e.tooltipShow,
1080
1099
  formatter: (i) => {
1081
- const s = i.length;
1082
- let n = "", g = e.tooltipFormatter;
1083
- g === "" && (g = "{marker} {a} {c}");
1084
- for (let u = 0; u < s; u++) {
1085
- const { marker: x, seriesName: b, name: S, value: c, data: m } = i[u] || {};
1100
+ const f = i.length;
1101
+ let a = "", b = e.tooltipFormatter;
1102
+ b === "" && (b = "{marker} {a} {c}");
1103
+ for (let u = 0; u < f; u++) {
1104
+ const { marker: S, seriesName: A, name: x, value: c, data: y } = i[u] || {};
1086
1105
  if (u === 0) {
1087
- let A = S;
1088
- typeof S == "string" && S[0] === "0" && !isNaN(+S) && (A = (+S).toString()), n += `${le(y, A)}<br/>`;
1106
+ let g = x;
1107
+ typeof x == "string" && x[0] === "0" && !isNaN(+x) && (g = (+x).toString()), a += `${te(m, g)}<br/>`;
1089
1108
  }
1090
- n += oe(
1091
- g,
1109
+ a += ie(
1110
+ b,
1092
1111
  {
1093
- textData: {
1094
- marker: x,
1095
- name: S,
1112
+ textData: C({
1113
+ marker: S,
1114
+ name: x,
1096
1115
  value: c,
1097
- Qfw: Ke,
1098
- a: b,
1099
- b: S,
1100
- c: c || 0,
1101
- ...m
1102
- }
1116
+ Qfw: el,
1117
+ a: A,
1118
+ b: x,
1119
+ c: c || 0
1120
+ }, y)
1103
1121
  },
1104
1122
  {
1105
1123
  useNewline: !0,
1106
1124
  useSpace: !0
1107
1125
  }
1108
- ), n += "<br/>";
1126
+ ), a += "<br/>";
1109
1127
  }
1110
- return n;
1128
+ return a;
1111
1129
  },
1112
1130
  // valueFormatter: (value) => {
1113
1131
  // return useVariablesInText(chartsOptions.tooltipValueFormatter as string, { value })
@@ -1140,20 +1158,20 @@ const Ze = (e, o, l) => {
1140
1158
  itemHeight: e.legendItemHeight,
1141
1159
  itemWidth: e.legendItemWidth,
1142
1160
  itemGap: e.legendItemGap,
1143
- data: a.map((i, s) => ({
1161
+ data: r.map((i, f) => ({
1144
1162
  name: i.name,
1145
1163
  itemStyle: {
1146
- color: e.colors[s]
1164
+ color: e.colors[f]
1147
1165
  },
1148
1166
  icon: e.legendType
1149
1167
  })),
1150
- formatter: (i) => Be(e.legendFormatter, {
1168
+ formatter: (i) => Oe(e.legendFormatter, {
1151
1169
  name: i
1152
1170
  })
1153
1171
  },
1154
1172
  xAxis: {
1155
1173
  type: e.isUseHorizontalAxis ? "value" : "category",
1156
- data: e.isUseHorizontalAxis ? null : v(r),
1174
+ data: e.isUseHorizontalAxis ? null : V(n),
1157
1175
  inverse: e.isUseHorizontalAxis ? e.xAxisInverse : e.axisInverse,
1158
1176
  minInterval: e.xAxisMinInterval,
1159
1177
  splitLine: {
@@ -1175,7 +1193,7 @@ const Ze = (e, o, l) => {
1175
1193
  overflow: e.xAxisLabelOverflow,
1176
1194
  fontSize: e.xAxisLabelFontSize,
1177
1195
  formatter(i) {
1178
- return typeof i == "string" && i[0] === "0" && !isNaN(+i) && (i = (+i).toString()), le(y, i);
1196
+ return typeof i == "string" && i[0] === "0" && !isNaN(+i) && (i = (+i).toString()), te(m, i);
1179
1197
  }
1180
1198
  },
1181
1199
  axisLine: {
@@ -1197,7 +1215,7 @@ const Ze = (e, o, l) => {
1197
1215
  },
1198
1216
  yAxis: {
1199
1217
  type: e.isUseHorizontalAxis ? "category" : "value",
1200
- data: e.isUseHorizontalAxis ? v(d) : null,
1218
+ data: e.isUseHorizontalAxis ? V(s) : null,
1201
1219
  inverse: e.isUseHorizontalAxis ? e.axisInverse : e.yAxisInverse,
1202
1220
  minInterval: e.yAxisMinInterval,
1203
1221
  splitLine: {
@@ -1218,7 +1236,7 @@ const Ze = (e, o, l) => {
1218
1236
  width: e.yAxisLabelWidth,
1219
1237
  overflow: e.yAxisLabelOverflow,
1220
1238
  formatter(i) {
1221
- return le(t, i);
1239
+ return te(t, i);
1222
1240
  }
1223
1241
  },
1224
1242
  axisLine: {
@@ -1235,29 +1253,28 @@ const Ze = (e, o, l) => {
1235
1253
  },
1236
1254
  max: e.yAxisMaxValue || null
1237
1255
  },
1238
- series: v(f)
1256
+ series: V(d)
1239
1257
  };
1240
- }, el = (e, o, l) => {
1241
- const t = e.yAxisLabelFormatter, y = e.xAxisLabelFormatter, { dimensions: d = [], dataset: a = [] } = o, f = ee(() => d.map((i) => {
1242
- let s = {};
1243
- return i && typeof i == "object" ? s = {
1244
- ...i,
1258
+ }, xl = (e, o, l) => {
1259
+ const t = e.yAxisLabelFormatter, m = e.xAxisLabelFormatter, { dimensions: s = [], dataset: r = [] } = o, d = oe(() => s.map((i) => {
1260
+ let f = {};
1261
+ return i && typeof i == "object" ? f = Y(C({}, i), {
1245
1262
  textStyle: {
1246
1263
  fontSize: l
1247
1264
  }
1248
- } : s = {
1265
+ }) : f = {
1249
1266
  value: i,
1250
1267
  textStyle: {
1251
1268
  fontSize: l
1252
1269
  }
1253
- }, s;
1254
- })), r = ee(() => {
1255
- const i = [], s = a.length;
1256
- for (let n = 0; n < s; n++) {
1257
- const g = {};
1258
- e.shadowColor && (g.shadowColor = e.shadowColor, g.shadowBlur = e.shadowBlur, g.shadowOffsetY = e.shadowOffsetY, g.shadowOffsetX = e.shadowOffsetX), i.push({
1259
- type: "line",
1260
- ...a[n],
1270
+ }, f;
1271
+ })), n = oe(() => {
1272
+ const i = [], f = r.length;
1273
+ for (let a = 0; a < f; a++) {
1274
+ const b = {};
1275
+ e.shadowColor && (b.shadowColor = e.shadowColor, b.shadowBlur = e.shadowBlur, b.shadowOffsetY = e.shadowOffsetY, b.shadowOffsetX = e.shadowOffsetX), i.push(C(Y(C({
1276
+ type: "line"
1277
+ }, r[a]), {
1261
1278
  symbolSize: e.symbolSize,
1262
1279
  smooth: e.smooth,
1263
1280
  areaStyle: {
@@ -1269,21 +1286,19 @@ const Ze = (e, o, l) => {
1269
1286
  y2: 1,
1270
1287
  colorStops: [{
1271
1288
  offset: 0,
1272
- color: e.colors[n]
1289
+ color: e.colors[a]
1273
1290
  }, {
1274
1291
  offset: 1,
1275
1292
  color: e.areaGradientColor || "transparent"
1276
1293
  }],
1277
1294
  global: !1
1278
- } : e.colors[n],
1295
+ } : e.colors[a],
1279
1296
  opacity: e.areaStyleOpacity
1280
1297
  },
1281
- lineStyle: {
1282
- width: e.lineStyleWidth,
1283
- ...g
1284
- },
1285
- ...Je(e)
1286
- });
1298
+ lineStyle: C({
1299
+ width: e.lineStyleWidth
1300
+ }, b)
1301
+ }), cl(e)));
1287
1302
  }
1288
1303
  return i;
1289
1304
  });
@@ -1292,31 +1307,30 @@ const Ze = (e, o, l) => {
1292
1307
  trigger: "axis",
1293
1308
  show: e.tooltipShow,
1294
1309
  formatter: (i) => {
1295
- const s = i.length;
1296
- let n = "", g = e.tooltipFormatter;
1297
- g === "" && (g = "{marker} {a} {c}");
1298
- for (let u = 0; u < s; u++) {
1299
- const { marker: x, seriesName: b, name: S, value: c, data: m } = i[u] || {};
1300
- u === 0 && (n += `${S}<br/>`), n += oe(
1301
- g,
1310
+ const f = i.length;
1311
+ let a = "", b = e.tooltipFormatter;
1312
+ b === "" && (b = "{marker} {a} {c}");
1313
+ for (let u = 0; u < f; u++) {
1314
+ const { marker: S, seriesName: A, name: x, value: c, data: y } = i[u] || {};
1315
+ u === 0 && (a += `${x}<br/>`), a += ie(
1316
+ b,
1302
1317
  {
1303
- textData: {
1304
- marker: x,
1305
- name: S,
1318
+ textData: C({
1319
+ marker: S,
1320
+ name: x,
1306
1321
  value: c,
1307
- a: b,
1308
- b: S,
1309
- c,
1310
- ...m
1311
- }
1322
+ a: A,
1323
+ b: x,
1324
+ c
1325
+ }, y)
1312
1326
  },
1313
1327
  {
1314
1328
  useNewline: !0,
1315
1329
  useSpace: !0
1316
1330
  }
1317
- ), n += "<br/>";
1331
+ ), a += "<br/>";
1318
1332
  }
1319
- return n;
1333
+ return a;
1320
1334
  },
1321
1335
  textStyle: {
1322
1336
  color: e.tooltipTextStyleColor,
@@ -1328,7 +1342,7 @@ const Ze = (e, o, l) => {
1328
1342
  xAxis: {
1329
1343
  name: e.xAxisName,
1330
1344
  type: "category",
1331
- data: v(f),
1345
+ data: V(d),
1332
1346
  minInterval: e.xAxisMinInterval,
1333
1347
  splitLine: {
1334
1348
  show: e.xAxisSplitLineShow,
@@ -1343,7 +1357,7 @@ const Ze = (e, o, l) => {
1343
1357
  width: e.xAxisLabelWidth,
1344
1358
  overflow: e.xAxisLabelOverflow,
1345
1359
  formatter(i) {
1346
- return le(y, i);
1360
+ return te(m, i);
1347
1361
  }
1348
1362
  },
1349
1363
  axisLine: {
@@ -1369,7 +1383,7 @@ const Ze = (e, o, l) => {
1369
1383
  fontSize: l,
1370
1384
  color: e.yAxisLabelColor,
1371
1385
  formatter(i) {
1372
- return le(t, i);
1386
+ return te(t, i);
1373
1387
  }
1374
1388
  },
1375
1389
  axisLine: {
@@ -1389,17 +1403,16 @@ const Ze = (e, o, l) => {
1389
1403
  fontSize: l
1390
1404
  }
1391
1405
  },
1392
- series: v(r)
1406
+ series: V(n)
1393
1407
  };
1394
- }, ll = (e, o, l) => {
1408
+ }, gl = (e, o, l) => {
1395
1409
  const { dataset: t = [] } = o;
1396
- let { data: y = [] } = t[0] || {};
1410
+ let { data: m = [] } = t[0] || {};
1397
1411
  if (Array.isArray(e.colors)) {
1398
- const d = e.isUseLabelColors, a = e.colors;
1399
- y = y.map((f, r) => ({
1400
- label: d ? { color: a[r] } : {},
1401
- ...f
1402
- }));
1412
+ const s = e.isUseLabelColors, r = e.colors;
1413
+ m = m.map((d, n) => C({
1414
+ label: s ? { color: r[n] } : {}
1415
+ }, d));
1403
1416
  }
1404
1417
  return {
1405
1418
  title: {
@@ -1416,22 +1429,21 @@ const Ze = (e, o, l) => {
1416
1429
  tooltip: {
1417
1430
  show: e.tooltipShow,
1418
1431
  trigger: e.tooltipTrigger,
1419
- formatter: (d) => {
1420
- const { marker: a, seriesName: f, name: r, value: i, percent: s, data: n } = d || {};
1421
- return oe(
1432
+ formatter: (s) => {
1433
+ const { marker: r, seriesName: d, name: n, value: i, percent: f, data: a } = s || {};
1434
+ return ie(
1422
1435
  e.tooltipFormatter,
1423
1436
  {
1424
- textData: {
1425
- marker: a,
1426
- name: r,
1437
+ textData: C({
1438
+ marker: r,
1439
+ name: n,
1427
1440
  value: i,
1428
- percent: s,
1429
- a: f,
1430
- b: r,
1441
+ percent: f,
1442
+ a: d,
1443
+ b: n,
1431
1444
  c: i,
1432
- d: s,
1433
- ...n
1434
- }
1445
+ d: f
1446
+ }, a)
1435
1447
  },
1436
1448
  {
1437
1449
  useNewline: !0,
@@ -1458,7 +1470,7 @@ const Ze = (e, o, l) => {
1458
1470
  },
1459
1471
  series: [
1460
1472
  {
1461
- data: y,
1473
+ data: m,
1462
1474
  type: "pie",
1463
1475
  radius: [e.innerRadius, e.outerRadius],
1464
1476
  center: [e.centerLeft, e.centerTop],
@@ -1470,7 +1482,7 @@ const Ze = (e, o, l) => {
1470
1482
  color: e.labelColor,
1471
1483
  fontSize: l === 18 ? l : e.labelFontSize,
1472
1484
  position: e.labelPosition,
1473
- formatter: Ye(e.labelFormatter)
1485
+ formatter: Ze(e.labelFormatter)
1474
1486
  },
1475
1487
  labelLine: {
1476
1488
  show: e.labelLineShow,
@@ -1488,37 +1500,34 @@ const Ze = (e, o, l) => {
1488
1500
  }
1489
1501
  ]
1490
1502
  };
1491
- }, ol = (e, o, l) => {
1492
- const { dimensions: t = [], dataset: y = [] } = o, d = ee(() => t.map((r) => {
1503
+ }, bl = (e, o, l) => {
1504
+ const { dimensions: t = [], dataset: m = [] } = o, s = oe(() => t.map((n) => {
1493
1505
  let i = {};
1494
- return r && typeof r == "object" ? i = {
1495
- ...r,
1506
+ return n && typeof n == "object" ? i = Y(C({}, n), {
1496
1507
  textStyle: {
1497
1508
  fontSize: l
1498
1509
  }
1499
- } : i = {
1500
- value: r,
1510
+ }) : i = {
1511
+ value: n,
1501
1512
  textStyle: {
1502
1513
  fontSize: l
1503
1514
  }
1504
1515
  }, i;
1505
- })), a = ee(() => {
1506
- const r = [], i = y.length, s = e.seriesTypes;
1507
- for (let n = 0; n < i; n++) {
1508
- const g = s[n], { type: u, axisIndex: x } = g || {};
1509
- let b = {
1516
+ })), r = oe(() => {
1517
+ const n = [], i = m.length, f = e.seriesTypes;
1518
+ for (let a = 0; a < i; a++) {
1519
+ const b = f[a], { type: u, axisIndex: S } = b || {};
1520
+ let A = C({
1510
1521
  type: u,
1511
- yAxisIndex: x,
1512
- ...y[n]
1513
- };
1522
+ yAxisIndex: S
1523
+ }, m[a]);
1514
1524
  if (u === "line") {
1515
- const S = {};
1516
- e.shadowColor && (S.shadowColor = e.shadowColor, S.shadowBlur = e.shadowBlur, S.shadowOffsetY = e.shadowOffsetY, S.shadowOffsetX = e.shadowOffsetX), b = {
1517
- ...b,
1525
+ const x = {};
1526
+ e.shadowColor && (x.shadowColor = e.shadowColor, x.shadowBlur = e.shadowBlur, x.shadowOffsetY = e.shadowOffsetY, x.shadowOffsetX = e.shadowOffsetX), A = Y(C({}, A), {
1518
1527
  symbolSize: e.symbolSize,
1519
1528
  smooth: e.smooth,
1520
1529
  itemStyle: {
1521
- color: e.colors[n]
1530
+ color: e.colors[a]
1522
1531
  },
1523
1532
  areaStyle: {
1524
1533
  color: e.areaGradientShow ? {
@@ -1529,70 +1538,68 @@ const Ze = (e, o, l) => {
1529
1538
  y2: 1,
1530
1539
  colorStops: [{
1531
1540
  offset: 0,
1532
- color: e.colors[n]
1541
+ color: e.colors[a]
1533
1542
  }, {
1534
1543
  offset: 1,
1535
1544
  color: e.areaGradientColor || "transparent"
1536
1545
  }],
1537
1546
  global: !1
1538
- } : e.colors[n],
1547
+ } : e.colors[a],
1539
1548
  opacity: e.areaStyleOpacity
1540
1549
  },
1541
- lineStyle: {
1542
- width: e.lineStyleWidth,
1543
- ...S
1544
- }
1545
- };
1550
+ lineStyle: C({
1551
+ width: e.lineStyleWidth
1552
+ }, x)
1553
+ });
1546
1554
  }
1547
1555
  if (u === "bar") {
1548
- const { gradientShow: S, gradientColors: c, gradientOffset: m } = e, A = {};
1556
+ const { gradientShow: x, gradientColors: c, gradientOffset: y } = e, g = {};
1549
1557
  if (e.barBorderRadius) {
1550
1558
  const w = e.barBorderRadius.split(",");
1551
1559
  if (w != null && w.length) {
1552
1560
  const N = [];
1553
- for (const k of w) {
1554
- const M = parseFloat(k);
1555
- isNaN(M) || N.push(M);
1561
+ for (const v of w) {
1562
+ const E = parseFloat(v);
1563
+ isNaN(E) || N.push(E);
1556
1564
  }
1557
- A.borderRadius = N;
1565
+ g.borderRadius = N;
1558
1566
  }
1559
1567
  }
1560
- S && (A.color = {
1568
+ x && (g.color = {
1561
1569
  x: 0,
1562
1570
  y: 0,
1563
1571
  x2: 0,
1564
1572
  y2: 1,
1565
1573
  colorStops: [{
1566
1574
  offset: 0,
1567
- color: e.colors[n]
1575
+ color: e.colors[a]
1568
1576
  }, {
1569
- offset: m,
1570
- color: c[n]
1577
+ offset: y,
1578
+ color: c[a]
1571
1579
  }, {
1572
1580
  offset: 1,
1573
- color: c[n]
1581
+ color: c[a]
1574
1582
  }]
1575
- }), b = {
1576
- ...b,
1583
+ }), A = Y(C({}, A), {
1577
1584
  barWidth: e.barWidth,
1578
- itemStyle: A
1579
- };
1585
+ itemStyle: g
1586
+ });
1580
1587
  }
1581
- e.isShowMarkLine && (b.markLine = {
1588
+ e.isShowMarkLine && (A.markLine = {
1582
1589
  data: [{ type: e.markLineType }]
1583
- }), r.push(b);
1590
+ }), n.push(A);
1584
1591
  }
1585
- return r;
1586
- }), f = ee(() => {
1587
- const r = e.yAxis;
1588
- return r == null ? void 0 : r.map((i, s) => ({
1592
+ return n;
1593
+ }), d = oe(() => {
1594
+ const n = e.yAxis;
1595
+ return n == null ? void 0 : n.map((i, f) => ({
1589
1596
  type: "value",
1590
1597
  minInterval: e.yAxisMinInterval,
1591
1598
  splitLine: {
1592
- show: s === 0 ? e.yAxisLeftSplitLineShow : e.yAxisRightSplitLineShow,
1599
+ show: f === 0 ? e.yAxisLeftSplitLineShow : e.yAxisRightSplitLineShow,
1593
1600
  lineStyle: {
1594
1601
  color: e.yAxisSplitLineStyleColor,
1595
- type: s === 0 ? e.yAxisLeftSplitLineType : e.yAxisRightSplitLineType
1602
+ type: f === 0 ? e.yAxisLeftSplitLineType : e.yAxisRightSplitLineType
1596
1603
  }
1597
1604
  },
1598
1605
  splitArea: {
@@ -1602,8 +1609,8 @@ const Ze = (e, o, l) => {
1602
1609
  fontSize: l,
1603
1610
  show: e.yAxisLabelShow,
1604
1611
  color: e.yAxisLabelColor,
1605
- formatter(n) {
1606
- return le(i.axisLabelFormatter, n);
1612
+ formatter(a) {
1613
+ return te(i.axisLabelFormatter, a);
1607
1614
  }
1608
1615
  },
1609
1616
  axisLine: {
@@ -1612,11 +1619,11 @@ const Ze = (e, o, l) => {
1612
1619
  color: e.yAxisLineStyleColor
1613
1620
  }
1614
1621
  },
1615
- name: s === 0 ? e.yAxisLeftName : e.yAxisRightName,
1622
+ name: f === 0 ? e.yAxisLeftName : e.yAxisRightName,
1616
1623
  nameTextStyle: {
1617
1624
  fontSize: e.yAxisLabelFontSize,
1618
1625
  color: e.yAxisLabelColor,
1619
- align: s === 0 ? "right" : "left"
1626
+ align: f === 0 ? "right" : "left"
1620
1627
  },
1621
1628
  max: e.yAxisMaxValue || null
1622
1629
  }));
@@ -1635,35 +1642,34 @@ const Ze = (e, o, l) => {
1635
1642
  tooltip: {
1636
1643
  trigger: "axis",
1637
1644
  show: e.tooltipShow,
1638
- formatter: (r) => {
1639
- const i = r.length;
1640
- let s = "", n = e.tooltipFormatter;
1641
- n === "" && (n = "{marker} {a} {c}");
1642
- const g = e.seriesTypes;
1645
+ formatter: (n) => {
1646
+ const i = n.length;
1647
+ let f = "", a = e.tooltipFormatter;
1648
+ a === "" && (a = "{marker} {a} {c}");
1649
+ const b = e.seriesTypes;
1643
1650
  for (let u = 0; u < i; u++) {
1644
- const x = g[u], { tooltipFormatter: b } = x || {}, { marker: S, seriesName: c, name: m, value: A, data: w } = r[u] || {};
1645
- u === 0 && (s += `${m}<br/>`), s += oe(
1651
+ const S = b[u], { tooltipFormatter: A } = S || {}, { marker: x, seriesName: c, name: y, value: g, data: w } = n[u] || {};
1652
+ u === 0 && (f += `${y}<br/>`), f += ie(
1646
1653
  // 如果系列有提示框组件就使用自定义,没有就用默认的
1647
- b || n,
1654
+ A || a,
1648
1655
  {
1649
- textData: {
1650
- marker: S,
1651
- name: m,
1652
- value: A,
1656
+ textData: C({
1657
+ marker: x,
1658
+ name: y,
1659
+ value: g,
1653
1660
  seriesName: c,
1654
1661
  a: c,
1655
- b: m,
1656
- c: A,
1657
- ...w
1658
- }
1662
+ b: y,
1663
+ c: g
1664
+ }, w)
1659
1665
  },
1660
1666
  {
1661
1667
  useNewline: !0,
1662
1668
  useSpace: !0
1663
1669
  }
1664
- ), s += "<br/>";
1670
+ ), f += "<br/>";
1665
1671
  }
1666
- return s;
1672
+ return f;
1667
1673
  },
1668
1674
  textStyle: {
1669
1675
  color: e.tooltipTextStyleColor || "#333",
@@ -1676,7 +1682,7 @@ const Ze = (e, o, l) => {
1676
1682
  name: e.xAxisName,
1677
1683
  minInterval: e.xAxisMinInterval,
1678
1684
  type: "category",
1679
- data: v(d),
1685
+ data: V(s),
1680
1686
  splitLine: {
1681
1687
  show: e.xAxisSplitLineShow,
1682
1688
  lineStyle: {
@@ -1699,10 +1705,10 @@ const Ze = (e, o, l) => {
1699
1705
  show: e.xAxisTickShow
1700
1706
  }
1701
1707
  },
1702
- yAxis: v(f),
1703
- series: v(a)
1708
+ yAxis: V(d),
1709
+ series: V(r)
1704
1710
  };
1705
- }, tl = (e) => ({
1711
+ }, Sl = (e) => ({
1706
1712
  title: {
1707
1713
  text: e.titleText,
1708
1714
  subtext: e.titleSubtext,
@@ -1721,20 +1727,16 @@ const Ze = (e, o, l) => {
1721
1727
  containLabel: e.gridContainLabel
1722
1728
  },
1723
1729
  color: e.colors
1724
- }), il = (e, o, l = 12) => ({
1725
- ...tl(e),
1726
- ...Ze(e, o, l)
1727
- }), dl = {
1728
- ...Pe,
1729
- runCode: ge,
1730
- useTransformChartDataByAttrKey: qe,
1731
- useTransformChartDataByAttrValue: Xe,
1732
- useValueFormatter: le,
1733
- useVariablesInText: oe,
1734
- transformProps: il,
1735
- getIndicatorParams: Ue
1736
- };
1730
+ }), Al = (e, o, l = 12) => C(C({}, Sl(e)), ml(e, o, l)), pl = Y(C({}, sl), {
1731
+ runCode: we,
1732
+ useTransformChartDataByAttrKey: fl,
1733
+ useTransformChartDataByAttrValue: ul,
1734
+ useValueFormatter: te,
1735
+ useVariablesInText: ie,
1736
+ transformProps: Al,
1737
+ getIndicatorParams: ll
1738
+ });
1737
1739
  export {
1738
- dl as default
1740
+ pl as default
1739
1741
  };
1740
1742
  //# sourceMappingURL=index.es.js.map