@orchidui/dashboard 1.63.0 → 1.64.0

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.
@@ -1,5 +1,5 @@
1
1
  import { defineAsyncComponent as o } from "vue";
2
- const t = o(() => import("../../../OcOverviewMonthlyBarChart-Dw0kACqh.js"));
2
+ const t = o(() => import("../../../OcOverviewMonthlyBarChart-DY9CBi1a.js"));
3
3
  export {
4
4
  t as OverviewMonthlyBarChart
5
5
  };
@@ -1,5 +1,5 @@
1
1
  import { defineAsyncComponent as e } from "vue";
2
- const r = e(() => import("../../../OcOverviewPieChart-OH9erQai.js"));
2
+ const r = e(() => import("../../../OcOverviewPieChart-CEKbsbpp.js"));
3
3
  export {
4
4
  r as OcOverviewPieChart
5
5
  };
@@ -4,16 +4,16 @@ import { g as st } from "./_commonjsHelpers-B4e78b8K.js";
4
4
  var P = { exports: {} }, it = P.exports, X;
5
5
  function ot() {
6
6
  return X || (X = 1, (function(H, g) {
7
- (function(b, A) {
8
- H.exports = A();
7
+ (function(w, F) {
8
+ H.exports = F();
9
9
  })(it, (function() {
10
- var b = 1e3, A = 6e4, V = 36e5, j = "millisecond", w = "second", O = "minute", _ = "hour", M = "day", F = "week", d = "month", N = "quarter", x = "year", o = "date", f = "Invalid Date", D = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, T = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, z = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(a) {
10
+ var w = 1e3, F = 6e4, V = 36e5, j = "millisecond", O = "second", _ = "minute", k = "hour", x = "day", L = "week", d = "month", N = "quarter", S = "year", o = "date", l = "Invalid Date", D = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, v = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, z = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(a) {
11
11
  var r = ["th", "st", "nd", "rd"], t = a % 100;
12
12
  return "[" + a + (r[(t - 20) % 10] || r[t] || r[0]) + "]";
13
13
  } }, W = function(a, r, t) {
14
14
  var n = String(a);
15
15
  return !n || n.length >= r ? a : "" + Array(r + 1 - n.length).join(t) + a;
16
- }, k = { s: W, z: function(a) {
16
+ }, C = { s: W, z: function(a) {
17
17
  var r = -a.utcOffset(), t = Math.abs(r), n = Math.floor(t / 60), e = t % 60;
18
18
  return (r <= 0 ? "+" : "-") + W(n, 2, "0") + ":" + W(e, 2, "0");
19
19
  }, m: function a(r, t) {
@@ -23,31 +23,31 @@ function ot() {
23
23
  }, a: function(a) {
24
24
  return a < 0 ? Math.ceil(a) || 0 : Math.floor(a);
25
25
  }, p: function(a) {
26
- return { M: d, y: x, w: F, d: M, D: o, h: _, m: O, s: w, ms: j, Q: N }[a] || String(a || "").toLowerCase().replace(/s$/, "");
26
+ return { M: d, y: S, w: L, d: x, D: o, h: k, m: _, s: O, ms: j, Q: N }[a] || String(a || "").toLowerCase().replace(/s$/, "");
27
27
  }, u: function(a) {
28
28
  return a === void 0;
29
- } }, S = "en", v = {};
30
- v[S] = z;
29
+ } }, b = "en", M = {};
30
+ M[b] = z;
31
31
  var K = "$isDayjsObject", R = function(a) {
32
32
  return a instanceof Z || !(!a || !a[K]);
33
33
  }, J = function a(r, t, n) {
34
34
  var e;
35
- if (!r) return S;
35
+ if (!r) return b;
36
36
  if (typeof r == "string") {
37
37
  var s = r.toLowerCase();
38
- v[s] && (e = s), t && (v[s] = t, e = s);
38
+ M[s] && (e = s), t && (M[s] = t, e = s);
39
39
  var i = r.split("-");
40
40
  if (!e && i.length > 1) return a(i[0]);
41
41
  } else {
42
42
  var c = r.name;
43
- v[c] = r, e = c;
43
+ M[c] = r, e = c;
44
44
  }
45
- return !n && e && (S = e), e || !n && S;
45
+ return !n && e && (b = e), e || !n && b;
46
46
  }, h = function(a, r) {
47
47
  if (R(a)) return a.clone();
48
48
  var t = typeof r == "object" ? r : {};
49
49
  return t.date = a, t.args = arguments, new Z(t);
50
- }, u = k;
50
+ }, u = C;
51
51
  u.l = J, u.i = R, u.w = function(a, r) {
52
52
  return h(a, { locale: r.$L, utc: r.$u, x: r.$x, $offset: r.$offset });
53
53
  };
@@ -65,8 +65,8 @@ function ot() {
65
65
  if (typeof e == "string" && !/Z$/i.test(e)) {
66
66
  var i = e.match(D);
67
67
  if (i) {
68
- var c = i[2] - 1 || 0, l = (i[7] || "0").substring(0, 3);
69
- return s ? new Date(Date.UTC(i[1], c, i[3] || 1, i[4] || 0, i[5] || 0, i[6] || 0, l)) : new Date(i[1], c, i[3] || 1, i[4] || 0, i[5] || 0, i[6] || 0, l);
68
+ var c = i[2] - 1 || 0, f = (i[7] || "0").substring(0, 3);
69
+ return s ? new Date(Date.UTC(i[1], c, i[3] || 1, i[4] || 0, i[5] || 0, i[6] || 0, f)) : new Date(i[1], c, i[3] || 1, i[4] || 0, i[5] || 0, i[6] || 0, f);
70
70
  }
71
71
  }
72
72
  return new Date(e);
@@ -77,7 +77,7 @@ function ot() {
77
77
  }, r.$utils = function() {
78
78
  return u;
79
79
  }, r.isValid = function() {
80
- return this.$d.toString() !== f;
80
+ return this.$d.toString() !== l;
81
81
  }, r.isSame = function(t, n) {
82
82
  var e = h(t);
83
83
  return this.startOf(n) <= e && e <= this.endOf(n);
@@ -92,40 +92,40 @@ function ot() {
92
92
  }, r.valueOf = function() {
93
93
  return this.$d.getTime();
94
94
  }, r.startOf = function(t, n) {
95
- var e = this, s = !!u.u(n) || n, i = u.p(t), c = function(Y, p) {
96
- var C = u.w(e.$u ? Date.UTC(e.$y, p, Y) : new Date(e.$y, p, Y), e);
97
- return s ? C : C.endOf(M);
98
- }, l = function(Y, p) {
99
- return u.w(e.toDate()[Y].apply(e.toDate("s"), (s ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(p)), e);
95
+ var e = this, s = !!u.u(n) || n, i = u.p(t), c = function(T, p) {
96
+ var A = u.w(e.$u ? Date.UTC(e.$y, p, T) : new Date(e.$y, p, T), e);
97
+ return s ? A : A.endOf(x);
98
+ }, f = function(T, p) {
99
+ return u.w(e.toDate()[T].apply(e.toDate("s"), (s ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(p)), e);
100
100
  }, m = this.$W, $ = this.$M, y = this.$D, B = "set" + (this.$u ? "UTC" : "");
101
101
  switch (i) {
102
- case x:
102
+ case S:
103
103
  return s ? c(1, 0) : c(31, 11);
104
104
  case d:
105
105
  return s ? c(1, $) : c(0, $ + 1);
106
- case F:
107
- var L = this.$locale().weekStart || 0, E = (m < L ? m + 7 : m) - L;
106
+ case L:
107
+ var Y = this.$locale().weekStart || 0, E = (m < Y ? m + 7 : m) - Y;
108
108
  return c(s ? y - E : y + (6 - E), $);
109
- case M:
109
+ case x:
110
110
  case o:
111
- return l(B + "Hours", 0);
111
+ return f(B + "Hours", 0);
112
+ case k:
113
+ return f(B + "Minutes", 1);
112
114
  case _:
113
- return l(B + "Minutes", 1);
115
+ return f(B + "Seconds", 2);
114
116
  case O:
115
- return l(B + "Seconds", 2);
116
- case w:
117
- return l(B + "Milliseconds", 3);
117
+ return f(B + "Milliseconds", 3);
118
118
  default:
119
119
  return this.clone();
120
120
  }
121
121
  }, r.endOf = function(t) {
122
122
  return this.startOf(t, !1);
123
123
  }, r.$set = function(t, n) {
124
- var e, s = u.p(t), i = "set" + (this.$u ? "UTC" : ""), c = (e = {}, e[M] = i + "Date", e[o] = i + "Date", e[d] = i + "Month", e[x] = i + "FullYear", e[_] = i + "Hours", e[O] = i + "Minutes", e[w] = i + "Seconds", e[j] = i + "Milliseconds", e)[s], l = s === M ? this.$D + (n - this.$W) : n;
125
- if (s === d || s === x) {
124
+ var e, s = u.p(t), i = "set" + (this.$u ? "UTC" : ""), c = (e = {}, e[x] = i + "Date", e[o] = i + "Date", e[d] = i + "Month", e[S] = i + "FullYear", e[k] = i + "Hours", e[_] = i + "Minutes", e[O] = i + "Seconds", e[j] = i + "Milliseconds", e)[s], f = s === x ? this.$D + (n - this.$W) : n;
125
+ if (s === d || s === S) {
126
126
  var m = this.clone().set(o, 1);
127
- m.$d[c](l), m.init(), this.$d = m.set(o, Math.min(this.$D, m.daysInMonth())).$d;
128
- } else c && this.$d[c](l);
127
+ m.$d[c](f), m.init(), this.$d = m.set(o, Math.min(this.$D, m.daysInMonth())).$d;
128
+ } else c && this.$d[c](f);
129
129
  return this.init(), this;
130
130
  }, r.set = function(t, n) {
131
131
  return this.clone().$set(t, n);
@@ -139,26 +139,26 @@ function ot() {
139
139
  return u.w(y.date(y.date() + Math.round($ * t)), s);
140
140
  };
141
141
  if (i === d) return this.set(d, this.$M + t);
142
- if (i === x) return this.set(x, this.$y + t);
143
- if (i === M) return c(1);
144
- if (i === F) return c(7);
145
- var l = (e = {}, e[O] = A, e[_] = V, e[w] = b, e)[i] || 1, m = this.$d.getTime() + t * l;
142
+ if (i === S) return this.set(S, this.$y + t);
143
+ if (i === x) return c(1);
144
+ if (i === L) return c(7);
145
+ var f = (e = {}, e[_] = F, e[k] = V, e[O] = w, e)[i] || 1, m = this.$d.getTime() + t * f;
146
146
  return u.w(m, this);
147
147
  }, r.subtract = function(t, n) {
148
148
  return this.add(-1 * t, n);
149
149
  }, r.format = function(t) {
150
150
  var n = this, e = this.$locale();
151
- if (!this.isValid()) return e.invalidDate || f;
152
- var s = t || "YYYY-MM-DDTHH:mm:ssZ", i = u.z(this), c = this.$H, l = this.$m, m = this.$M, $ = e.weekdays, y = e.months, B = e.meridiem, L = function(p, C, I, q) {
153
- return p && (p[C] || p(n, s)) || I[C].slice(0, q);
151
+ if (!this.isValid()) return e.invalidDate || l;
152
+ var s = t || "YYYY-MM-DDTHH:mm:ssZ", i = u.z(this), c = this.$H, f = this.$m, m = this.$M, $ = e.weekdays, y = e.months, B = e.meridiem, Y = function(p, A, I, q) {
153
+ return p && (p[A] || p(n, s)) || I[A].slice(0, q);
154
154
  }, E = function(p) {
155
155
  return u.s(c % 12 || 12, p, "0");
156
- }, Y = B || function(p, C, I) {
156
+ }, T = B || function(p, A, I) {
157
157
  var q = p < 12 ? "AM" : "PM";
158
158
  return I ? q.toLowerCase() : q;
159
159
  };
160
- return s.replace(T, (function(p, C) {
161
- return C || (function(I) {
160
+ return s.replace(v, (function(p, A) {
161
+ return A || (function(I) {
162
162
  switch (I) {
163
163
  case "YY":
164
164
  return String(n.$y).slice(-2);
@@ -169,9 +169,9 @@ function ot() {
169
169
  case "MM":
170
170
  return u.s(m + 1, 2, "0");
171
171
  case "MMM":
172
- return L(e.monthsShort, m, y, 3);
172
+ return Y(e.monthsShort, m, y, 3);
173
173
  case "MMMM":
174
- return L(y, m);
174
+ return Y(y, m);
175
175
  case "D":
176
176
  return n.$D;
177
177
  case "DD":
@@ -179,9 +179,9 @@ function ot() {
179
179
  case "d":
180
180
  return String(n.$W);
181
181
  case "dd":
182
- return L(e.weekdaysMin, n.$W, $, 2);
182
+ return Y(e.weekdaysMin, n.$W, $, 2);
183
183
  case "ddd":
184
- return L(e.weekdaysShort, n.$W, $, 3);
184
+ return Y(e.weekdaysShort, n.$W, $, 3);
185
185
  case "dddd":
186
186
  return $[n.$W];
187
187
  case "H":
@@ -193,13 +193,13 @@ function ot() {
193
193
  case "hh":
194
194
  return E(2);
195
195
  case "a":
196
- return Y(c, l, !0);
196
+ return T(c, f, !0);
197
197
  case "A":
198
- return Y(c, l, !1);
198
+ return T(c, f, !1);
199
199
  case "m":
200
- return String(l);
200
+ return String(f);
201
201
  case "mm":
202
- return u.s(l, 2, "0");
202
+ return u.s(f, 2, "0");
203
203
  case "s":
204
204
  return String(n.$s);
205
205
  case "ss":
@@ -215,11 +215,11 @@ function ot() {
215
215
  }, r.utcOffset = function() {
216
216
  return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
217
217
  }, r.diff = function(t, n, e) {
218
- var s, i = this, c = u.p(n), l = h(t), m = (l.utcOffset() - this.utcOffset()) * A, $ = this - l, y = function() {
219
- return u.m(i, l);
218
+ var s, i = this, c = u.p(n), f = h(t), m = (f.utcOffset() - this.utcOffset()) * F, $ = this - f, y = function() {
219
+ return u.m(i, f);
220
220
  };
221
221
  switch (c) {
222
- case x:
222
+ case S:
223
223
  s = y() / 12;
224
224
  break;
225
225
  case d:
@@ -228,20 +228,20 @@ function ot() {
228
228
  case N:
229
229
  s = y() / 3;
230
230
  break;
231
- case F:
231
+ case L:
232
232
  s = ($ - m) / 6048e5;
233
233
  break;
234
- case M:
234
+ case x:
235
235
  s = ($ - m) / 864e5;
236
236
  break;
237
- case _:
237
+ case k:
238
238
  s = $ / V;
239
239
  break;
240
- case O:
241
- s = $ / A;
240
+ case _:
241
+ s = $ / F;
242
242
  break;
243
- case w:
244
- s = $ / b;
243
+ case O:
244
+ s = $ / w;
245
245
  break;
246
246
  default:
247
247
  s = $;
@@ -250,7 +250,7 @@ function ot() {
250
250
  }, r.daysInMonth = function() {
251
251
  return this.endOf(d).$D;
252
252
  }, r.$locale = function() {
253
- return v[this.$L];
253
+ return M[this.$L];
254
254
  }, r.locale = function(t, n) {
255
255
  if (!t) return this.$L;
256
256
  var e = this.clone(), s = J(t, n, !0);
@@ -267,7 +267,7 @@ function ot() {
267
267
  return this.$d.toUTCString();
268
268
  }, a;
269
269
  })(), Q = Z.prototype;
270
- return h.prototype = Q, [["$ms", j], ["$s", w], ["$m", O], ["$H", _], ["$W", M], ["$M", d], ["$y", x], ["$D", o]].forEach((function(a) {
270
+ return h.prototype = Q, [["$ms", j], ["$s", O], ["$m", _], ["$H", k], ["$W", x], ["$M", d], ["$y", S], ["$D", o]].forEach((function(a) {
271
271
  Q[a[1]] = function(r) {
272
272
  return this.$g(r, a[0], a[1]);
273
273
  };
@@ -275,7 +275,7 @@ function ot() {
275
275
  return a.$i || (a(r, Z, h), a.$i = !0), h;
276
276
  }, h.locale = J, h.isDayjs = R, h.unix = function(a) {
277
277
  return h(1e3 * a);
278
- }, h.en = v[S], h.Ls = v, h.p = {}, h;
278
+ }, h.en = M[b], h.Ls = M, h.p = {}, h;
279
279
  }));
280
280
  })(P)), P.exports;
281
281
  }
@@ -299,17 +299,17 @@ const G = /* @__PURE__ */ st(ut), dt = {
299
299
  tooltipValueFormatter: Function
300
300
  },
301
301
  setup(H) {
302
- const g = H, b = U(() => g.labelData.length === 30), A = U(() => Math.max(...g.chartData));
303
- U(() => g.chartData.indexOf(A.value));
304
- const V = (o, f = "SGD") => (typeof o == "number" ? o : Number(o)).toLocaleString("en-US", {
302
+ const g = H, w = U(() => g.labelData.length === 30), F = U(() => Math.max(...g.chartData));
303
+ U(() => g.chartData.indexOf(F.value));
304
+ const V = (o, l = "SGD") => (typeof o == "number" ? o : Number(o)).toLocaleString("en-US", {
305
305
  minimumFractionDigits: 2,
306
306
  maximumFractionDigits: 2
307
- }), j = (o, f = !1) => f ? G(o).format("DD MMM").toUpperCase() : G(o).format("ddd DD/MM").toUpperCase(), w = (o) => {
308
- const f = [...g.chartData].sort((D, T) => T - D);
309
- return o === f[0] ? "#4C8AFD" : o === f[1] ? "#80ACFE" : "#CCDEFE";
310
- }, O = U(() => ({
307
+ }), j = (o, l = !1) => l ? G(o).format("DD MMM").toUpperCase() : G(o).format("ddd DD/MM").toUpperCase(), O = (o) => {
308
+ const l = [...g.chartData].sort((D, v) => v - D);
309
+ return o === l[0] ? "#4C8AFD" : o === l[1] ? "#80ACFE" : "#CCDEFE";
310
+ }, _ = U(() => ({
311
311
  xAxis: {
312
- data: g.labelData.map((o) => j(o, b.value)),
312
+ data: (g.labelData || []).map((o) => j(o, w.value)),
313
313
  splitLine: { show: !1 },
314
314
  axisLine: { show: !1 },
315
315
  axisTick: { show: !1 },
@@ -318,7 +318,7 @@ const G = /* @__PURE__ */ st(ut), dt = {
318
318
  fontSize: 10,
319
319
  margin: 4,
320
320
  width: 70,
321
- interval: b.value ? 3 : 0
321
+ interval: w.value ? 3 : 0
322
322
  }
323
323
  },
324
324
  tooltip: {
@@ -330,14 +330,14 @@ const G = /* @__PURE__ */ st(ut), dt = {
330
330
  lineStyle: { color: "#2465DE" }
331
331
  },
332
332
  formatter: (o) => {
333
- const f = g.labelData[o[0].dataIndex], D = G(f).format("DD MMM YYYY"), T = o[0].value;
333
+ const l = g.labelData[o[0].dataIndex], D = G(l).format("DD MMM YYYY"), v = o[0].value;
334
334
  return `
335
335
  <div class="py-3 px-4">
336
336
  <div class="flex items-center gap-2">
337
337
  <span class="text-xs font-medium text-oc-text-300">${D}</span>
338
338
  </div>
339
339
  <div class="flex items-center gap-2">
340
- <span class="font-semibold text-oc-text font-reddit-mono">${g.currency} ${V(T)}</span>
340
+ <span class="font-semibold text-oc-text font-reddit-mono">${g.currency} ${V(v)}</span>
341
341
  </div>
342
342
  </div>
343
343
  `;
@@ -368,12 +368,12 @@ const G = /* @__PURE__ */ st(ut), dt = {
368
368
  type: "bar",
369
369
  barCategoryGap: 4,
370
370
  itemStyle: {
371
- borderRadius: b.value ? [100, 100, 0, 0] : [4, 4, 0, 0],
372
- color: ({ value: o }) => w(o)
371
+ borderRadius: w.value ? [100, 100, 0, 0] : [4, 4, 0, 0],
372
+ color: ({ value: o }) => O(o)
373
373
  },
374
374
  clip: !0
375
375
  }]
376
- })), _ = U(() => g.labelData.map((o, f) => G(o).day() === 6 && f + 1 < g.labelData.length ? [f, f + 1] : null).filter(Boolean)), M = {
376
+ })), k = U(() => (g.labelData || []).map((o, l) => G(o).day() === 6 && l + 1 < g.labelData.length ? [l, l + 1] : null).filter(Boolean)), x = {
377
377
  itemStyle: {
378
378
  color: {
379
379
  type: "linear",
@@ -388,37 +388,38 @@ const G = /* @__PURE__ */ st(ut), dt = {
388
388
  global: !1
389
389
  }
390
390
  }
391
- }, F = tt(), { chart: d } = at(F, O), N = (o, f, D = !1) => {
392
- const z = o.getModel().getSeriesByType("bar").map((S) => S.getData())[0], W = z.count(), k = [];
393
- return f.forEach((S) => {
394
- if (S < W) {
395
- const v = z.getItemLayout(S);
396
- k.push([
397
- { x: v.x - 2 },
398
- { x: v.x + v.width + 2 }
391
+ }, L = tt(), { chart: d } = at(L, _), N = (o, l, D = !1) => {
392
+ const v = o.getModel().getSeriesByType("bar"), z = v == null ? void 0 : v.map((b) => b.getData())[0], W = z.count(), C = [];
393
+ return l.forEach((b) => {
394
+ if (b < W) {
395
+ const M = z.getItemLayout(b);
396
+ C.push([
397
+ { x: M.x - 2 },
398
+ { x: M.x + M.width + 2 }
399
399
  ]);
400
400
  }
401
- }), D && k.length > 0 ? [[
402
- { x: k[0][0].x },
403
- { x: k[k.length - 1][1].x }
404
- ]] : k;
405
- }, x = () => {
401
+ }), D && C.length > 0 ? [[
402
+ { x: C[0][0].x },
403
+ { x: C[C.length - 1][1].x }
404
+ ]] : C;
405
+ }, S = () => {
406
+ var o;
406
407
  if (d.value)
407
- if (b.value) {
408
- const o = _.value.map(
409
- (D) => N(d.value, D, !0).flat()
410
- ), f = {
408
+ if (w.value) {
409
+ const l = (o = k.value) == null ? void 0 : o.map(
410
+ (v) => N(d.value, v, !0).flat()
411
+ ), D = {
411
412
  series: {
412
413
  id: "myBar",
413
414
  markArea: {
414
- ...M,
415
- data: o
415
+ ...x,
416
+ data: l
416
417
  }
417
418
  }
418
419
  };
419
- d.value.setOption(f);
420
+ d.value.setOption(D);
420
421
  } else {
421
- const o = {
422
+ const l = {
422
423
  series: {
423
424
  id: "myBar",
424
425
  markArea: {
@@ -426,14 +427,14 @@ const G = /* @__PURE__ */ st(ut), dt = {
426
427
  }
427
428
  }
428
429
  };
429
- d.value.setOption(o);
430
+ d.value.setOption(l);
430
431
  }
431
432
  };
432
- return et([d, b], () => {
433
- d.value && x();
434
- }), (o, f) => (nt(), rt("div", {
433
+ return et([d, w], () => {
434
+ d.value && S();
435
+ }), (o, l) => (nt(), rt("div", {
435
436
  ref_key: "barChart",
436
- ref: F,
437
+ ref: L,
437
438
  class: "w-full"
438
439
  }, null, 512));
439
440
  }
@@ -1,27 +1,27 @@
1
- import { ref as m, computed as y, watch as x, nextTick as C, createElementBlock as i, openBlock as u, createElementVNode as a, createCommentVNode as F, toDisplayString as d, Fragment as w, renderList as k, normalizeStyle as V } from "vue";
1
+ import { ref as f, computed as y, watch as x, nextTick as w, createElementBlock as i, openBlock as u, createElementVNode as a, createCommentVNode as C, toDisplayString as d, Fragment as k, renderList as S, normalizeStyle as V } from "vue";
2
2
  import { u as L } from "./useChart-D5nAyTGV.js";
3
- const S = { class: "flex flex-col items-center justify-center" }, N = { class: "relative w-[210px] h-[210px]" }, T = { class: "absolute inset-0 flex flex-col items-center justify-center pointer-events-none" }, O = { class: "text-center" }, j = { class: "text-oc-text-400" }, E = { class: "text-lg font-semibold font-reddit-mono" }, P = {
3
+ const F = { class: "flex flex-col items-center justify-center" }, N = { class: "relative w-[210px] h-[210px]" }, T = { class: "absolute inset-0 flex flex-col items-center justify-center pointer-events-none" }, O = { class: "text-center" }, j = { class: "text-oc-text-400" }, P = { class: "text-lg font-semibold font-reddit-mono" }, z = {
4
4
  key: 0,
5
5
  class: "mt-4 flex flex-wrap gap-3 justify-center"
6
- }, z = { class: "text-sm" }, U = {
6
+ }, B = { class: "text-sm" }, $ = {
7
7
  __name: "OcOverviewPieChart",
8
8
  props: {
9
9
  chartData: Array,
10
10
  currency: String
11
11
  },
12
- setup(r) {
13
- const o = r, s = m(""), n = m(0), b = (e) => (typeof e == "number" ? e : Number(e)).toLocaleString("en-US", {
12
+ setup(o) {
13
+ const r = o, s = f(""), n = f(0), b = (e) => (typeof e == "number" ? e : Number(e)).toLocaleString("en-US", {
14
14
  minimumFractionDigits: 2,
15
15
  maximumFractionDigits: 2
16
16
  }), g = (e) => {
17
17
  const t = typeof e == "number" ? e : Number(e);
18
18
  return l.value ? Math.round(t / l.value * 100) : 0;
19
- }, l = y(() => !o.chartData || o.chartData.length === 0 ? 0 : o.chartData.reduce((e, t) => e + (t.value || 0), 0)), h = () => {
19
+ }, l = y(() => !r.chartData || r.chartData.length === 0 ? 0 : r.chartData.reduce((e, t) => e + (t.value || 0), 0)), h = () => {
20
20
  s.value = "Total", n.value = l.value;
21
21
  }, _ = y(() => ({
22
22
  series: [{
23
23
  id: "overviewPieChart",
24
- data: o.chartData || [],
24
+ data: r.chartData || [],
25
25
  type: "pie",
26
26
  radius: ["80%", "100%"],
27
27
  avoidLabelOverlap: !1,
@@ -52,22 +52,19 @@ const S = { class: "flex flex-col items-center justify-center" }, N = { class: "
52
52
  label: { show: !1 }
53
53
  }
54
54
  }]
55
- })), v = m(), { chart: p } = L(v, _), D = (e) => {
56
- const t = ["#356DFF", "#AEC5FF", "#86FFCC"];
57
- return t[e % t.length];
58
- };
55
+ })), v = f(), { chart: p } = L(v, _), D = (e) => r.chartData[e].itemStyle.color;
59
56
  return x(p, async (e) => {
60
- e && (await C(), h(), e.on("mouseover", "series", (t) => {
57
+ e && (await w(), h(), e.on("mouseover", "series", (t) => {
61
58
  if (t.componentType === "series" && t.seriesType === "pie") {
62
- const f = t.name || "Unknown", c = t.value || 0;
63
- s.value = `${f} (${g(c)}%)`, n.value = t.value || 0;
59
+ const m = t.name || "Unknown", c = t.value || 0;
60
+ s.value = `${m} (${g(c)}%)`, n.value = t.value || 0;
64
61
  }
65
62
  }), e.on("mouseout", "series", () => {
66
63
  s.value = "Total", n.value = l.value;
67
64
  }));
68
- }), x(() => o.chartData, () => {
65
+ }), x(() => r.chartData, () => {
69
66
  p.value && h();
70
- }, { deep: !0 }), (e, t) => (u(), i("div", S, [
67
+ }, { deep: !0 }), (e, t) => (u(), i("div", F, [
71
68
  a("div", N, [
72
69
  a("div", {
73
70
  ref_key: "pieChart",
@@ -77,12 +74,12 @@ const S = { class: "flex flex-col items-center justify-center" }, N = { class: "
77
74
  a("div", T, [
78
75
  a("div", O, [
79
76
  a("div", j, d(s.value), 1),
80
- a("div", E, d(r.currency) + " " + d(b(n.value)), 1)
77
+ a("div", P, d(o.currency) + " " + d(b(n.value)), 1)
81
78
  ])
82
79
  ])
83
80
  ]),
84
- r.chartData && r.chartData.length > 0 ? (u(), i("div", P, [
85
- (u(!0), i(w, null, k(r.chartData, (f, c) => (u(), i("div", {
81
+ o.chartData && o.chartData.length > 0 ? (u(), i("div", z, [
82
+ (u(!0), i(k, null, S(o.chartData, (m, c) => (u(), i("div", {
86
83
  key: c,
87
84
  class: "flex items-center gap-2 cursor-pointer hover:opacity-80 transition-opacity"
88
85
  }, [
@@ -90,12 +87,12 @@ const S = { class: "flex flex-col items-center justify-center" }, N = { class: "
90
87
  class: "w-3 h-3 rounded-full",
91
88
  style: V({ backgroundColor: D(c) })
92
89
  }, null, 4),
93
- a("span", z, d(f.name), 1)
90
+ a("span", B, d(m.name), 1)
94
91
  ]))), 128))
95
- ])) : F("", !0)
92
+ ])) : C("", !0)
96
93
  ]));
97
94
  }
98
95
  };
99
96
  export {
100
- U as default
97
+ $ as default
101
98
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@orchidui/dashboard",
3
3
  "description": "Orchid Dashboard UI , Dashboard Ui Library Vue 3 tailwind css",
4
- "version": "1.63.0",
4
+ "version": "1.64.0",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "build": "vite build"
@@ -35,7 +35,7 @@
35
35
  "dependencies": {
36
36
  "dayjs": "^1.11.10",
37
37
  "echarts": "^5.4.3",
38
- "@orchidui/core": "1.63.0",
38
+ "@orchidui/core": "1.64.0",
39
39
  "lottie-web": "^5.12.2",
40
40
  "quill": "^2.0.3",
41
41
  "quill-better-table": "^1.2.10",