@orchidui/dashboard 1.56.0 → 1.58.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-CSheXsBM.js"));
2
+ const t = o(() => import("../../../OcOverviewMonthlyBarChart-D9_FsW21.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-D2YLaN_P.js"));
2
+ const r = e(() => import("../../../OcOverviewPieChart-D2CKOk4R.js"));
3
3
  export {
4
4
  r as OcOverviewPieChart
5
5
  };
@@ -1,7 +1,7 @@
1
- import { computed as s, ref as F, watch as M, createElementBlock as S, openBlock as k } from "vue";
1
+ import { computed as i, ref as w, watch as F, createElementBlock as M, openBlock as S } from "vue";
2
2
  import { u as B } from "./useChart-D5nAyTGV.js";
3
3
  import { d as u } from "./dayjs.min-CTPVfFeV.js";
4
- const O = {
4
+ const E = {
5
5
  __name: "OcOverviewMonthlyBarChart",
6
6
  props: {
7
7
  variant: {
@@ -19,17 +19,17 @@ const O = {
19
19
  tooltipValueFormatter: Function
20
20
  },
21
21
  setup(m) {
22
- const a = m, l = s(() => a.labelData.length === 30), x = s(() => Math.max(...a.chartData));
23
- s(() => a.chartData.indexOf(x.value));
24
- const g = (t, e = "SGD") => (typeof t == "number" ? t : Number(t)).toLocaleString("en-US", {
22
+ const e = m, s = i(() => e.labelData.length === 30), x = i(() => Math.max(...e.chartData));
23
+ i(() => e.chartData.indexOf(x.value));
24
+ const h = (t, a = "SGD") => (typeof t == "number" ? t : Number(t)).toLocaleString("en-US", {
25
25
  minimumFractionDigits: 2,
26
26
  maximumFractionDigits: 2
27
- }), y = (t, e = !1) => e ? u(t).format("DD MMM").toUpperCase() : u(t).format("ddd DD/MM").toUpperCase(), D = (t) => {
28
- const e = [...a.chartData].sort((r, i) => i - r);
29
- return t === e[0] ? "#4C8AFD" : t === e[1] ? "#80ACFE" : "#CCDEFE";
30
- }, b = s(() => ({
27
+ }), y = (t, a = !1) => a ? u(t).format("DD MMM").toUpperCase() : u(t).format("ddd DD/MM").toUpperCase(), g = (t) => {
28
+ const a = [...e.chartData].sort((r, l) => l - r);
29
+ return t === a[0] ? "#4C8AFD" : t === a[1] ? "#80ACFE" : "#CCDEFE";
30
+ }, D = i(() => ({
31
31
  xAxis: {
32
- data: a.labelData.map((t) => y(t, l.value)),
32
+ data: e.labelData.map((t) => y(t, s.value)),
33
33
  splitLine: { show: !1 },
34
34
  axisLine: { show: !1 },
35
35
  axisTick: { show: !1 },
@@ -38,7 +38,7 @@ const O = {
38
38
  fontSize: 10,
39
39
  margin: 4,
40
40
  width: 70,
41
- interval: l.value ? 3 : 0
41
+ interval: s.value ? 3 : 0
42
42
  }
43
43
  },
44
44
  tooltip: {
@@ -50,14 +50,14 @@ const O = {
50
50
  lineStyle: { color: "#2465DE" }
51
51
  },
52
52
  formatter: (t) => {
53
- const e = a.labelData[t[0].dataIndex], r = u(e).format("DD MMM YYYY"), i = t[0].value;
53
+ const a = e.labelData[t[0].dataIndex], r = u(a).format("DD MMM YYYY"), l = t[0].value;
54
54
  return `
55
55
  <div class="py-3 px-4">
56
56
  <div class="flex items-center gap-2">
57
57
  <span class="text-xs font-medium text-oc-text-300">${r}</span>
58
58
  </div>
59
59
  <div class="flex items-center gap-2">
60
- <span class="font-semibold text-oc-text font-reddit-mono">SGD ${g(i)}</span>
60
+ <span class="font-semibold text-oc-text font-reddit-mono">SGD ${h(l)}</span>
61
61
  </div>
62
62
  </div>
63
63
  `;
@@ -83,17 +83,16 @@ const O = {
83
83
  },
84
84
  series: [{
85
85
  id: "myBar",
86
- data: a.chartData,
86
+ data: e.chartData,
87
87
  type: "bar",
88
88
  barCategoryGap: 4,
89
89
  itemStyle: {
90
- borderRadius: l.value ? [100, 100, 0, 0] : [4, 4, 0, 0],
91
- color: ({ value: t }) => D(t)
90
+ borderRadius: s.value ? [100, 100, 0, 0] : [4, 4, 0, 0],
91
+ color: ({ value: t }) => g(t)
92
92
  },
93
93
  clip: !0
94
94
  }]
95
- })), p = s(() => a.labelData.map((t, e) => u(t).day() === 6 && e + 1 < a.labelData.length ? [e, e + 1] : null).filter(Boolean)), v = {
96
- silent: !0,
95
+ })), b = i(() => e.labelData.map((t, a) => u(t).day() === 6 && a + 1 < e.labelData.length ? [a, a + 1] : null).filter(Boolean)), v = {
97
96
  itemStyle: {
98
97
  color: {
99
98
  type: "linear",
@@ -106,48 +105,58 @@ const O = {
106
105
  { offset: 1, color: "rgba(36, 93, 239, 0.01)" }
107
106
  ],
108
107
  global: !1
109
- },
110
- borderColor: "rgba(53, 109, 255, 0.15)",
111
- borderWidth: 1
108
+ }
112
109
  }
113
- }, f = F(), { chart: n } = B(f, b), C = (t, e, r = !1) => {
114
- const h = t.getModel().getSeriesByType("bar").map((c) => c.getData())[0], w = h.count(), o = [];
115
- return e.forEach((c) => {
116
- if (c < w) {
117
- const d = h.getItemLayout(c);
118
- o.push([
119
- { x: d.x - 2 },
120
- { x: d.x + d.width + 2 }
110
+ }, d = w(), { chart: o } = B(d, D), A = (t, a, r = !1) => {
111
+ const f = t.getModel().getSeriesByType("bar").map((c) => c.getData())[0], k = f.count(), n = [];
112
+ return a.forEach((c) => {
113
+ if (c < k) {
114
+ const p = f.getItemLayout(c);
115
+ n.push([
116
+ { x: p.x - 2 },
117
+ { x: p.x + p.width + 2 }
121
118
  ]);
122
119
  }
123
- }), r && o.length > 0 ? [[
124
- { x: o[0][0].x },
125
- { x: o[o.length - 1][1].x }
126
- ]] : o;
127
- }, A = () => {
128
- if (!n.value || p.value.length === 0) return;
129
- const t = p.value.map(
130
- (r) => C(n.value, r, !0).flat()
131
- ), e = {
132
- series: {
133
- id: "myBar",
134
- markArea: {
135
- ...v,
136
- data: t
137
- }
120
+ }), r && n.length > 0 ? [[
121
+ { x: n[0][0].x },
122
+ { x: n[n.length - 1][1].x }
123
+ ]] : n;
124
+ }, C = () => {
125
+ if (o.value)
126
+ if (s.value) {
127
+ const t = b.value.map(
128
+ (r) => A(o.value, r, !0).flat()
129
+ ), a = {
130
+ series: {
131
+ id: "myBar",
132
+ markArea: {
133
+ ...v,
134
+ data: t
135
+ }
136
+ }
137
+ };
138
+ o.value.setOption(a);
139
+ } else {
140
+ const t = {
141
+ series: {
142
+ id: "myBar",
143
+ markArea: {
144
+ data: []
145
+ }
146
+ }
147
+ };
148
+ o.value.setOption(t);
138
149
  }
139
- };
140
- n.value.setOption(e);
141
150
  };
142
- return M([n, l], () => {
143
- n.value && A();
144
- }), (t, e) => (k(), S("div", {
151
+ return F([o, s], () => {
152
+ o.value && C();
153
+ }), (t, a) => (S(), M("div", {
145
154
  ref_key: "barChart",
146
- ref: f,
155
+ ref: d,
147
156
  class: "w-full"
148
157
  }, null, 512));
149
158
  }
150
159
  };
151
160
  export {
152
- O as default
161
+ E as default
153
162
  };
@@ -45,8 +45,8 @@ const L = { class: "flex flex-col items-center justify-center" }, N = { class: "
45
45
  },
46
46
  blur: {
47
47
  itemStyle: {
48
- color: "#F2F2F4"
49
- // Tailwind gray-200
48
+ color: "#F2F2F4",
49
+ opacity: 1
50
50
  },
51
51
  label: { show: !1 }
52
52
  }
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.56.0",
4
+ "version": "1.58.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.56.0",
38
+ "@orchidui/core": "1.58.0",
39
39
  "lottie-web": "^5.12.2",
40
40
  "quill": "^2.0.3",
41
41
  "quill-better-table": "^1.2.10",