nemesischart 2.0.10 → 2.0.11
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/README.md +4 -2
- package/dist/nemesischart.js +593 -559
- package/dist/nemesischart.umd.cjs +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/nemesischart.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { ref as
|
|
2
|
-
import { Chart as
|
|
1
|
+
import { ref as _, shallowRef as _e, onMounted as et, onBeforeUnmount as tt, watch as ce, openBlock as v, createElementBlock as x, normalizeStyle as q, createElementVNode as E, computed as F, renderSlot as S, createTextVNode as j, toDisplayString as I, createCommentVNode as B, unref as y, normalizeClass as J, createVNode as P, createSlots as Y, withCtx as z, createBlock as re, Fragment as Me, renderList as De, withKeys as Fe, withModifiers as Le, Teleport as at, useCssVars as ot } from "vue";
|
|
2
|
+
import { Chart as Ie, Title as nt, Tooltip as rt, Legend as lt, Filler as st, LineController as it, LineElement as ct, PointElement as dt, BarController as ut, BarElement as pt, PieController as ft, PolarAreaController as gt, ArcElement as mt, CategoryScale as ht, LinearScale as yt, RadialLinearScale as vt } from "chart.js";
|
|
3
3
|
const W = (e, r) => {
|
|
4
4
|
const t = e.__vccOpts || e;
|
|
5
5
|
for (const [n, a] of r)
|
|
6
6
|
t[n] = a;
|
|
7
7
|
return t;
|
|
8
|
-
},
|
|
8
|
+
}, bt = {
|
|
9
9
|
__name: "ChartBase",
|
|
10
10
|
props: {
|
|
11
11
|
type: { type: String, required: !0 },
|
|
@@ -16,8 +16,7 @@ const W = (e, r) => {
|
|
|
16
16
|
width: { type: [String, Number], default: null }
|
|
17
17
|
},
|
|
18
18
|
setup(e, { expose: r }) {
|
|
19
|
-
|
|
20
|
-
ot,
|
|
19
|
+
Ie.register(
|
|
21
20
|
nt,
|
|
22
21
|
rt,
|
|
23
22
|
lt,
|
|
@@ -31,9 +30,10 @@ const W = (e, r) => {
|
|
|
31
30
|
gt,
|
|
32
31
|
mt,
|
|
33
32
|
ht,
|
|
34
|
-
yt
|
|
33
|
+
yt,
|
|
34
|
+
vt
|
|
35
35
|
);
|
|
36
|
-
const t = e, n =
|
|
36
|
+
const t = e, n = _(null), a = _e(null), u = {
|
|
37
37
|
responsive: !0,
|
|
38
38
|
maintainAspectRatio: !1,
|
|
39
39
|
plugins: {
|
|
@@ -43,38 +43,38 @@ const W = (e, r) => {
|
|
|
43
43
|
function c() {
|
|
44
44
|
return { ...u, ...t.options };
|
|
45
45
|
}
|
|
46
|
-
function
|
|
47
|
-
n.value && (a.value = new
|
|
46
|
+
function f() {
|
|
47
|
+
n.value && (a.value = new Ie(n.value, {
|
|
48
48
|
type: t.type,
|
|
49
49
|
data: t.data,
|
|
50
50
|
options: c(),
|
|
51
51
|
plugins: t.plugins
|
|
52
52
|
}));
|
|
53
53
|
}
|
|
54
|
-
function
|
|
54
|
+
function C() {
|
|
55
55
|
a.value && (a.value.destroy(), a.value = null);
|
|
56
56
|
}
|
|
57
|
-
return et(
|
|
57
|
+
return et(f), tt(C), ce(
|
|
58
58
|
() => t.data,
|
|
59
59
|
(l) => {
|
|
60
60
|
if (!a.value) return;
|
|
61
61
|
a.value.data.labels = l.labels;
|
|
62
|
-
const d = a.value.data.datasets,
|
|
63
|
-
d.length !==
|
|
62
|
+
const d = a.value.data.datasets, p = l.datasets;
|
|
63
|
+
d.length !== p.length ? a.value.data.datasets = p : p.forEach((g, b) => Object.assign(d[b], g)), a.value.update();
|
|
64
64
|
},
|
|
65
65
|
{ deep: !0 }
|
|
66
|
-
),
|
|
66
|
+
), ce(
|
|
67
67
|
() => t.options,
|
|
68
68
|
() => {
|
|
69
69
|
a.value && (a.value.options = c(), a.value.update());
|
|
70
70
|
},
|
|
71
71
|
{ deep: !0 }
|
|
72
|
-
),
|
|
72
|
+
), ce(
|
|
73
73
|
() => t.type,
|
|
74
74
|
() => {
|
|
75
|
-
|
|
75
|
+
C(), f();
|
|
76
76
|
}
|
|
77
|
-
), r({ chart: a }), (l, d) => (
|
|
77
|
+
), r({ chart: a }), (l, d) => (v(), x("div", {
|
|
78
78
|
class: "nc-chart-wrapper",
|
|
79
79
|
style: q({
|
|
80
80
|
height: typeof e.height == "number" ? `${e.height}px` : e.height,
|
|
@@ -87,28 +87,28 @@ const W = (e, r) => {
|
|
|
87
87
|
}, null, 512)
|
|
88
88
|
], 4));
|
|
89
89
|
}
|
|
90
|
-
},
|
|
91
|
-
function
|
|
92
|
-
const r = e.replace("#", ""), t = r.length === 3 ? r.split("").map((
|
|
93
|
-
if (c ===
|
|
94
|
-
const l = c -
|
|
95
|
-
let
|
|
96
|
-
return c === n ?
|
|
90
|
+
}, Q = /* @__PURE__ */ W(bt, [["__scopeId", "data-v-cafc7888"]]);
|
|
91
|
+
function xt(e) {
|
|
92
|
+
const r = e.replace("#", ""), t = r.length === 3 ? r.split("").map((g) => g + g).join("") : r, n = parseInt(t.slice(0, 2), 16) / 255, a = parseInt(t.slice(2, 4), 16) / 255, u = parseInt(t.slice(4, 6), 16) / 255, c = Math.max(n, a, u), f = Math.min(n, a, u), C = (c + f) / 2;
|
|
93
|
+
if (c === f) return [0, 0, C * 100];
|
|
94
|
+
const l = c - f, d = C > 0.5 ? l / (2 - c - f) : l / (c + f);
|
|
95
|
+
let p;
|
|
96
|
+
return c === n ? p = ((a - u) / l + (a < u ? 6 : 0)) / 6 : c === a ? p = ((u - n) / l + 2) / 6 : p = ((n - a) / l + 4) / 6, [p * 360, d * 100, C * 100];
|
|
97
97
|
}
|
|
98
|
-
function
|
|
98
|
+
function $t(e, r, t) {
|
|
99
99
|
e /= 360, r /= 100, t /= 100;
|
|
100
|
-
const n = t < 0.5 ? t * (1 + r) : t + r - t * r, a = 2 * t - n, u = (l) => (l < 0 && (l += 1), l > 1 && (l -= 1), l < 1 / 6 ? a + (n - a) * 6 * l : l < 1 / 2 ? n : l < 2 / 3 ? a + (n - a) * (2 / 3 - l) * 6 : a), c = r === 0 ? t : u(e + 1 / 3),
|
|
101
|
-
return "#" + [c,
|
|
100
|
+
const n = t < 0.5 ? t * (1 + r) : t + r - t * r, a = 2 * t - n, u = (l) => (l < 0 && (l += 1), l > 1 && (l -= 1), l < 1 / 6 ? a + (n - a) * 6 * l : l < 1 / 2 ? n : l < 2 / 3 ? a + (n - a) * (2 / 3 - l) * 6 : a), c = r === 0 ? t : u(e + 1 / 3), f = r === 0 ? t : u(e), C = r === 0 ? t : u(e - 1 / 3);
|
|
101
|
+
return "#" + [c, f, C].map((l) => Math.round(l * 255).toString(16).padStart(2, "0")).join("");
|
|
102
102
|
}
|
|
103
103
|
function de(e, r = 7) {
|
|
104
104
|
if (!(e != null && e.startsWith("#"))) return Array.from({ length: r }, () => e ?? "#3B82F6");
|
|
105
|
-
const [t, n] =
|
|
106
|
-
return Array.from({ length: r }, (c,
|
|
107
|
-
const
|
|
108
|
-
return
|
|
105
|
+
const [t, n] = xt(e), a = 20, u = 72;
|
|
106
|
+
return Array.from({ length: r }, (c, f) => {
|
|
107
|
+
const C = r === 1 ? 0.5 : f / (r - 1), l = a + C * (u - a), d = Math.max(50, n - Math.max(0, l - 55) * 0.6);
|
|
108
|
+
return $t(t, d, l);
|
|
109
109
|
});
|
|
110
110
|
}
|
|
111
|
-
const
|
|
111
|
+
const Ct = {
|
|
112
112
|
light: { bg: "#ffffff", text: "#000000", muted: "#64748B", grid: "rgba(15,23,42,0.06)" },
|
|
113
113
|
dark: { bg: "#000000", text: "#ffffff", muted: "#7b7b7b", grid: "rgba(255,255,255,0.08)" },
|
|
114
114
|
transparent: { bg: "transparent", text: "inherit", muted: "#7b7b7b", grid: "rgba(127,127,127,0.15)" }
|
|
@@ -116,7 +116,7 @@ const $t = {
|
|
|
116
116
|
function D(e, r) {
|
|
117
117
|
if (!e) return `rgba(59,130,246,${r})`;
|
|
118
118
|
if (e.startsWith("#")) {
|
|
119
|
-
const t = e.replace("#", ""), n = t.length === 3 ? t.split("").map((
|
|
119
|
+
const t = e.replace("#", ""), n = t.length === 3 ? t.split("").map((f) => f + f).join("") : t, a = parseInt(n.slice(0, 2), 16), u = parseInt(n.slice(2, 4), 16), c = parseInt(n.slice(4, 6), 16);
|
|
120
120
|
return `rgba(${a},${u},${c},${r})`;
|
|
121
121
|
}
|
|
122
122
|
if (e.startsWith("rgb")) {
|
|
@@ -127,7 +127,7 @@ function D(e, r) {
|
|
|
127
127
|
}
|
|
128
128
|
function G(e) {
|
|
129
129
|
const r = F(() => {
|
|
130
|
-
const n =
|
|
130
|
+
const n = Ct[e.tema], a = n ? { ...n, bg: e.corFundo || n.bg } : { bg: e.corFundo || e.tema, text: "#F8FAFC", muted: "#7b7b7b", grid: "rgba(255,255,255,0.08)" };
|
|
131
131
|
return {
|
|
132
132
|
...a,
|
|
133
133
|
text: e.corTexto || a.text,
|
|
@@ -157,13 +157,13 @@ function ze(e, r) {
|
|
|
157
157
|
}
|
|
158
158
|
r.setAttribute("style", n);
|
|
159
159
|
}
|
|
160
|
-
function
|
|
160
|
+
function kt(e, r) {
|
|
161
161
|
ze(e, r);
|
|
162
162
|
const t = e.querySelectorAll("*"), n = r.querySelectorAll("*");
|
|
163
163
|
for (let a = 0; a < t.length; a++)
|
|
164
164
|
n[a] && ze(t[a], n[a]);
|
|
165
165
|
}
|
|
166
|
-
function
|
|
166
|
+
function St(e, r) {
|
|
167
167
|
const t = e.querySelectorAll("canvas"), n = r.querySelectorAll("canvas");
|
|
168
168
|
t.forEach((a, u) => {
|
|
169
169
|
if (!n[u]) return;
|
|
@@ -173,29 +173,29 @@ function kt(e, r) {
|
|
|
173
173
|
} catch {
|
|
174
174
|
return;
|
|
175
175
|
}
|
|
176
|
-
const
|
|
177
|
-
c.setAttribute("style", `width:${
|
|
176
|
+
const f = a.getBoundingClientRect();
|
|
177
|
+
c.setAttribute("style", `width:${f.width}px;height:${f.height}px;display:block;`), n[u].replaceWith(c);
|
|
178
178
|
});
|
|
179
179
|
}
|
|
180
|
-
async function
|
|
180
|
+
async function At(e, r = {}) {
|
|
181
181
|
if (!e) return;
|
|
182
182
|
const {
|
|
183
183
|
nomeArquivo: t = "componente.png",
|
|
184
184
|
escala: n = 2,
|
|
185
185
|
corFundo: a = null
|
|
186
|
-
} = r, u = e.getBoundingClientRect(), c = Math.ceil(u.width),
|
|
187
|
-
|
|
188
|
-
const l = new XMLSerializer().serializeToString(
|
|
189
|
-
await new Promise((s,
|
|
190
|
-
|
|
186
|
+
} = r, u = e.getBoundingClientRect(), c = Math.ceil(u.width), f = Math.ceil(u.height), C = e.cloneNode(!0);
|
|
187
|
+
kt(e, C), St(e, C), C.style.margin = "0", C.style.transform = "none";
|
|
188
|
+
const l = new XMLSerializer().serializeToString(C), d = `<svg xmlns="http://www.w3.org/2000/svg" width="${c}" height="${f}"><foreignObject width="100%" height="100%"><div xmlns="http://www.w3.org/1999/xhtml" style="width:${c}px;height:${f}px;">` + l + "</div></foreignObject></svg>", g = "data:image/svg+xml;base64," + (typeof window < "u" && window.btoa ? window.btoa(unescape(encodeURIComponent(d))) : ""), b = new Image();
|
|
189
|
+
await new Promise((s, $) => {
|
|
190
|
+
b.onload = s, b.onerror = $, b.src = g;
|
|
191
191
|
});
|
|
192
|
-
const
|
|
193
|
-
|
|
194
|
-
const
|
|
195
|
-
|
|
192
|
+
const m = document.createElement("canvas");
|
|
193
|
+
m.width = c * n, m.height = f * n;
|
|
194
|
+
const k = m.getContext("2d");
|
|
195
|
+
k.scale(n, n), a && (k.fillStyle = a, k.fillRect(0, 0, c, f)), k.drawImage(b, 0, 0);
|
|
196
196
|
let M;
|
|
197
197
|
try {
|
|
198
|
-
M =
|
|
198
|
+
M = m.toDataURL("image/png");
|
|
199
199
|
} catch (s) {
|
|
200
200
|
console.error("Falha ao exportar imagem: canvas contaminado.", s);
|
|
201
201
|
return;
|
|
@@ -205,22 +205,22 @@ async function St(e, r = {}) {
|
|
|
205
205
|
}
|
|
206
206
|
const Ne = '<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/><polyline points="7 10 12 15 17 10"/><line x1="12" y1="15" x2="12" y2="3"/></svg>';
|
|
207
207
|
function K(e, r, t) {
|
|
208
|
-
const n =
|
|
208
|
+
const n = _(null);
|
|
209
209
|
async function a() {
|
|
210
|
-
await
|
|
210
|
+
await At(n.value, {
|
|
211
211
|
nomeArquivo: e.nomeArquivoExport,
|
|
212
212
|
corFundo: r.value.bg !== "transparent" ? r.value.bg : null
|
|
213
213
|
}), t("exportado");
|
|
214
214
|
}
|
|
215
215
|
return { cardRef: n, onExportar: a, iconeExportar: Ne };
|
|
216
216
|
}
|
|
217
|
-
const
|
|
217
|
+
const Bt = { class: "nc-topo nc-flex nc-align-items-start nc-justify-content-between nc-gap-3" }, Rt = {
|
|
218
218
|
key: 0,
|
|
219
219
|
class: "nc-legendas-flex nc-flex nc-flex-column"
|
|
220
|
-
},
|
|
220
|
+
}, qt = {
|
|
221
221
|
key: 1,
|
|
222
222
|
class: "nc-actions nc-inline-flex nc-align-items-center nc-gap-2"
|
|
223
|
-
},
|
|
223
|
+
}, wt = ["innerHTML"], Tt = {
|
|
224
224
|
__name: "CardCabecalho",
|
|
225
225
|
props: {
|
|
226
226
|
legenda: { type: String, default: null },
|
|
@@ -234,52 +234,52 @@ const At = { class: "nc-topo nc-flex nc-align-items-start nc-justify-content-bet
|
|
|
234
234
|
emits: ["botaoAcao", "exportar"],
|
|
235
235
|
setup(e, { emit: r }) {
|
|
236
236
|
const t = r, n = Ne;
|
|
237
|
-
return (a, u) => (
|
|
238
|
-
a.$slots.legenda || e.legenda || a.$slots.sublegenda || e.sublegenda ? (
|
|
239
|
-
a.$slots.legenda || e.legenda ? (
|
|
237
|
+
return (a, u) => (v(), x("div", Bt, [
|
|
238
|
+
a.$slots.legenda || e.legenda || a.$slots.sublegenda || e.sublegenda ? (v(), x("div", Rt, [
|
|
239
|
+
a.$slots.legenda || e.legenda ? (v(), x("div", {
|
|
240
240
|
key: 0,
|
|
241
241
|
class: "nc-text-xs nc-font-medium",
|
|
242
242
|
style: q({ color: e.palette.text, opacity: e.opacidadeLegenda })
|
|
243
243
|
}, [
|
|
244
|
-
|
|
245
|
-
j(
|
|
244
|
+
S(a.$slots, "legenda", {}, () => [
|
|
245
|
+
j(I(e.legenda), 1)
|
|
246
246
|
], !0)
|
|
247
|
-
], 4)) :
|
|
248
|
-
a.$slots.sublegenda || e.sublegenda ? (
|
|
247
|
+
], 4)) : B("", !0),
|
|
248
|
+
a.$slots.sublegenda || e.sublegenda ? (v(), x("div", {
|
|
249
249
|
key: 1,
|
|
250
250
|
class: "nc-text-xs",
|
|
251
251
|
style: q({ color: e.palette.muted })
|
|
252
252
|
}, [
|
|
253
|
-
|
|
254
|
-
j(
|
|
253
|
+
S(a.$slots, "sublegenda", {}, () => [
|
|
254
|
+
j(I(e.sublegenda), 1)
|
|
255
255
|
], !0)
|
|
256
|
-
], 4)) :
|
|
257
|
-
])) :
|
|
258
|
-
a.$slots.actions || e.botaoVisivel || e.exportar ? (
|
|
259
|
-
|
|
260
|
-
e.botaoVisivel ? (
|
|
256
|
+
], 4)) : B("", !0)
|
|
257
|
+
])) : B("", !0),
|
|
258
|
+
a.$slots.actions || e.botaoVisivel || e.exportar ? (v(), x("div", qt, [
|
|
259
|
+
S(a.$slots, "actions", {}, () => [
|
|
260
|
+
e.botaoVisivel ? (v(), x("button", {
|
|
261
261
|
key: 0,
|
|
262
262
|
class: "nc-btn nc-inline-flex nc-align-items-center",
|
|
263
|
-
style: q({ color: e.palette.text, borderColor:
|
|
263
|
+
style: q({ color: e.palette.text, borderColor: y(D)(e.palette.text, 0.18) }),
|
|
264
264
|
onClick: u[0] || (u[0] = (c) => t("botaoAcao"))
|
|
265
265
|
}, [
|
|
266
|
-
E("span", null,
|
|
267
|
-
], 4)) :
|
|
266
|
+
E("span", null, I(e.textoBotao), 1)
|
|
267
|
+
], 4)) : B("", !0)
|
|
268
268
|
], !0),
|
|
269
|
-
e.exportar ? (
|
|
269
|
+
e.exportar ? (v(), x("button", {
|
|
270
270
|
key: 0,
|
|
271
271
|
type: "button",
|
|
272
272
|
class: "nc-exportar nc-inline-flex nc-align-items-center nc-justify-content-center",
|
|
273
|
-
style: q({ color: e.palette.muted, borderColor:
|
|
273
|
+
style: q({ color: e.palette.muted, borderColor: y(D)(e.palette.text, 0.18) }),
|
|
274
274
|
title: "Exportar como imagem",
|
|
275
275
|
"aria-label": "Exportar como imagem",
|
|
276
276
|
onClick: u[1] || (u[1] = (c) => t("exportar")),
|
|
277
|
-
innerHTML:
|
|
278
|
-
}, null, 12,
|
|
279
|
-
])) :
|
|
277
|
+
innerHTML: y(n)
|
|
278
|
+
}, null, 12, wt)) : B("", !0)
|
|
279
|
+
])) : B("", !0)
|
|
280
280
|
]));
|
|
281
281
|
}
|
|
282
|
-
},
|
|
282
|
+
}, ee = /* @__PURE__ */ W(Tt, [["__scopeId", "data-v-35f0d105"]]), Et = { class: "nc-titulos nc-flex nc-flex-column" }, ue = {
|
|
283
283
|
__name: "CardTitulos",
|
|
284
284
|
props: {
|
|
285
285
|
titulo: { type: String, default: null },
|
|
@@ -287,29 +287,29 @@ const At = { class: "nc-topo nc-flex nc-align-items-start nc-justify-content-bet
|
|
|
287
287
|
palette: { type: Object, required: !0 }
|
|
288
288
|
},
|
|
289
289
|
setup(e) {
|
|
290
|
-
return (r, t) => (
|
|
291
|
-
r.$slots.titulo || e.titulo ? (
|
|
290
|
+
return (r, t) => (v(), x("div", Et, [
|
|
291
|
+
r.$slots.titulo || e.titulo ? (v(), x("div", {
|
|
292
292
|
key: 0,
|
|
293
293
|
class: "nc-m-0 nc-text-3xl nc-font-semibold",
|
|
294
294
|
style: q({ color: e.palette.text, lineHeight: "33px", letterSpacing: "-1px" })
|
|
295
295
|
}, [
|
|
296
|
-
|
|
297
|
-
j(
|
|
296
|
+
S(r.$slots, "titulo", {}, () => [
|
|
297
|
+
j(I(e.titulo), 1)
|
|
298
298
|
])
|
|
299
|
-
], 4)) :
|
|
300
|
-
r.$slots.descricao || e.descricao ? (
|
|
299
|
+
], 4)) : B("", !0),
|
|
300
|
+
r.$slots.descricao || e.descricao ? (v(), x("div", {
|
|
301
301
|
key: 1,
|
|
302
302
|
class: "nc-text-sm nc-mt-1",
|
|
303
303
|
style: q({ color: e.palette.muted })
|
|
304
304
|
}, [
|
|
305
|
-
|
|
306
|
-
j(
|
|
305
|
+
S(r.$slots, "descricao", {}, () => [
|
|
306
|
+
j(I(e.descricao), 1)
|
|
307
307
|
])
|
|
308
|
-
], 4)) :
|
|
308
|
+
], 4)) : B("", !0)
|
|
309
309
|
]));
|
|
310
310
|
}
|
|
311
311
|
};
|
|
312
|
-
function
|
|
312
|
+
function te(e) {
|
|
313
313
|
const r = F(() => e.tipoValor === "moeda" ? new Intl.NumberFormat(e.locale, { style: "currency", currency: e.moeda }) : e.tipoValor === "percentual" ? new Intl.NumberFormat(e.locale, { style: "percent", maximumFractionDigits: 2 }) : new Intl.NumberFormat(e.locale, { maximumFractionDigits: 2 }));
|
|
314
314
|
function t(n) {
|
|
315
315
|
if (n == null) return "";
|
|
@@ -318,7 +318,7 @@ function ee(e) {
|
|
|
318
318
|
}
|
|
319
319
|
return { formatador: r, formatar: t };
|
|
320
320
|
}
|
|
321
|
-
const
|
|
321
|
+
const ne = "1px solid rgba(15,23,42,.06)";
|
|
322
322
|
function pe(e, { caretFlexivel: r = !1 } = {}) {
|
|
323
323
|
let t = e.querySelector(".nc-tt");
|
|
324
324
|
if (t) return t;
|
|
@@ -380,46 +380,46 @@ function je(e, r) {
|
|
|
380
380
|
e && (r ? Object.assign(e.style, {
|
|
381
381
|
top: "-5px",
|
|
382
382
|
bottom: "",
|
|
383
|
-
borderLeft:
|
|
384
|
-
borderTop:
|
|
383
|
+
borderLeft: ne,
|
|
384
|
+
borderTop: ne,
|
|
385
385
|
borderRight: "",
|
|
386
386
|
borderBottom: ""
|
|
387
387
|
}) : Object.assign(e.style, {
|
|
388
388
|
top: "",
|
|
389
389
|
bottom: "-5px",
|
|
390
|
-
borderRight:
|
|
391
|
-
borderBottom:
|
|
390
|
+
borderRight: ne,
|
|
391
|
+
borderBottom: ne,
|
|
392
392
|
borderLeft: "",
|
|
393
393
|
borderTop: ""
|
|
394
394
|
}));
|
|
395
395
|
}
|
|
396
396
|
function ye({ corDe: e, valorDe: r, linhasExtrasDe: t = null, deveOcultar: n = () => !1 }) {
|
|
397
397
|
return function(u) {
|
|
398
|
-
const { chart: c, tooltip:
|
|
399
|
-
if (!
|
|
400
|
-
const l = pe(
|
|
401
|
-
if (
|
|
398
|
+
const { chart: c, tooltip: f } = u, C = fe(c);
|
|
399
|
+
if (!C) return;
|
|
400
|
+
const l = pe(C);
|
|
401
|
+
if (f.opacity === 0 || n()) {
|
|
402
402
|
l.style.opacity = "0";
|
|
403
403
|
return;
|
|
404
404
|
}
|
|
405
|
-
const d =
|
|
406
|
-
|
|
407
|
-
const { offsetLeft:
|
|
405
|
+
const d = f.dataPoints && f.dataPoints[0], p = l.querySelector(".nc-tt__content"), g = d && t ? t(d) : [], b = (Array.isArray(g) ? g : [g]).filter(Boolean);
|
|
406
|
+
p.innerHTML = me((f.title || []).join(" ")) + he(d ? e(d) : "#3B82F6", d ? r(d) : "") + b.map((T) => Oe(T)).join("");
|
|
407
|
+
const { offsetLeft: m, offsetTop: k } = c.canvas;
|
|
408
408
|
l.style.opacity = "1", l.style.visibility = "hidden", l.style.left = "0px", l.style.top = "0px";
|
|
409
|
-
const M = l.offsetWidth, o = l.offsetHeight, s = 4,
|
|
409
|
+
const M = l.offsetWidth, o = l.offsetHeight, s = 4, $ = m + f.caretX, h = k + f.caretY, A = ge($, M, C.clientWidth, s), i = h < o + 16 + s;
|
|
410
410
|
l.style.transform = i ? "translate(-50%, 16px)" : "translate(-50%, calc(-100% - 16px))";
|
|
411
|
-
const
|
|
412
|
-
if (je(
|
|
413
|
-
const T =
|
|
414
|
-
|
|
411
|
+
const R = l.querySelector(".nc-tt__caret");
|
|
412
|
+
if (je(R, i), R) {
|
|
413
|
+
const T = $ - A, w = M / 2, L = Math.max(-w + 8, Math.min(w - 8, T));
|
|
414
|
+
R.style.left = `calc(50% + ${L}px)`;
|
|
415
415
|
}
|
|
416
|
-
l.style.left =
|
|
416
|
+
l.style.left = A + "px", l.style.top = h + "px", l.style.visibility = "visible";
|
|
417
417
|
};
|
|
418
418
|
}
|
|
419
|
-
function
|
|
419
|
+
function Ft(e, r, t, n, a, u, c) {
|
|
420
420
|
e.fillStyle = r.corRotulo, e.beginPath(), e.roundRect ? e.roundRect(t, n, a, u, c) : (e.moveTo(t + c, n), e.lineTo(t + a - c, n), e.quadraticCurveTo(t + a, n, t + a, n + c), e.lineTo(t + a, n + u - c), e.quadraticCurveTo(t + a, n + u, t + a - c, n + u), e.lineTo(t + c, n + u), e.quadraticCurveTo(t, n + u, t, n + u - c), e.lineTo(t, n + c), e.quadraticCurveTo(t, n, t + c, n)), e.fill(), e.fillStyle = r.corTexto, e.textBaseline = "middle", e.textAlign = "center", e.fillText(r.rotulo, t + a / 2, n + u / 2);
|
|
421
421
|
}
|
|
422
|
-
function
|
|
422
|
+
function Lt(e) {
|
|
423
423
|
let r = e.querySelector(".nc-tt-linhaRef");
|
|
424
424
|
return r || (r = document.createElement("div"), r.className = "nc-tt-linhaRef", Object.assign(r.style, {
|
|
425
425
|
position: "absolute",
|
|
@@ -440,8 +440,8 @@ function Ft(e) {
|
|
|
440
440
|
}
|
|
441
441
|
function Pe({ linhasReferencia: e, horizontal: r = () => !1, formatar: t }) {
|
|
442
442
|
const n = F(() => {
|
|
443
|
-
const
|
|
444
|
-
return
|
|
443
|
+
const f = e();
|
|
444
|
+
return f ? (Array.isArray(f) ? f : [f]).filter((l) => l && (typeof l == "number" || typeof l.valor == "number")).map((l) => typeof l == "number" ? { valor: l, rotulo: null, cor: "#0F172A", corRotulo: "#0F172A", corTexto: "#FFFFFF", tracejado: [6, 6], espessura: 1 } : {
|
|
445
445
|
valor: l.valor,
|
|
446
446
|
rotulo: l.rotulo ?? null,
|
|
447
447
|
cor: l.cor || "#0F172A",
|
|
@@ -456,74 +456,74 @@ function Pe({ linhasReferencia: e, horizontal: r = () => !1, formatar: t }) {
|
|
|
456
456
|
linhasNormalizadas: n,
|
|
457
457
|
pluginLinhaReferencia: {
|
|
458
458
|
id: "linhaReferencia",
|
|
459
|
-
afterDatasetsDraw(
|
|
460
|
-
const
|
|
461
|
-
if (a.length = 0, !
|
|
462
|
-
const { ctx: l, chartArea: d, scales:
|
|
463
|
-
|
|
464
|
-
const
|
|
465
|
-
if (a.push({ linha:
|
|
466
|
-
if (
|
|
459
|
+
afterDatasetsDraw(f) {
|
|
460
|
+
const C = n.value;
|
|
461
|
+
if (a.length = 0, !C.length) return;
|
|
462
|
+
const { ctx: l, chartArea: d, scales: p } = f, g = r(), b = g ? p.x : p.y;
|
|
463
|
+
b && C.forEach((m) => {
|
|
464
|
+
const k = b.getPixelForValue(m.valor);
|
|
465
|
+
if (a.push({ linha: m, pos: k, horizontal: g, chartArea: d }), l.save(), l.beginPath(), l.setLineDash(m.tracejado), l.lineWidth = m.espessura, l.strokeStyle = m.cor, g) {
|
|
466
|
+
if (k < d.left || k > d.right) {
|
|
467
467
|
l.restore();
|
|
468
468
|
return;
|
|
469
469
|
}
|
|
470
|
-
l.moveTo(
|
|
470
|
+
l.moveTo(k, d.top), l.lineTo(k, d.bottom);
|
|
471
471
|
} else {
|
|
472
|
-
if (
|
|
472
|
+
if (k < d.top || k > d.bottom) {
|
|
473
473
|
l.restore();
|
|
474
474
|
return;
|
|
475
475
|
}
|
|
476
|
-
l.moveTo(d.left,
|
|
476
|
+
l.moveTo(d.left, k), l.lineTo(d.right, k);
|
|
477
477
|
}
|
|
478
|
-
if (l.stroke(), l.setLineDash([]),
|
|
478
|
+
if (l.stroke(), l.setLineDash([]), m.rotulo) {
|
|
479
479
|
l.font = "600 11px 'Inter', sans-serif";
|
|
480
|
-
const M = 8, o = 5,
|
|
480
|
+
const M = 8, o = 5, $ = l.measureText(m.rotulo).width, h = 12, A = $ + M * 2, i = h + o * 2, R = i / 2;
|
|
481
481
|
let T, w;
|
|
482
|
-
|
|
482
|
+
g ? (T = k - A / 2, w = d.top - i - 6, w < 0 && (w = d.top + 6)) : (T = d.left - A - 6, w = k - i / 2, T < 0 && (T = d.left + 6)), Ft(l, m, T, w, A, i, R);
|
|
483
483
|
}
|
|
484
484
|
l.restore();
|
|
485
485
|
});
|
|
486
486
|
},
|
|
487
|
-
beforeEvent(
|
|
487
|
+
beforeEvent(f, C) {
|
|
488
488
|
if (!a.length) {
|
|
489
489
|
u = null;
|
|
490
490
|
return;
|
|
491
491
|
}
|
|
492
|
-
const l =
|
|
492
|
+
const l = C.event;
|
|
493
493
|
if (!l || l.type === "mouseout" || l.x == null || l.y == null) {
|
|
494
494
|
u = null;
|
|
495
495
|
return;
|
|
496
496
|
}
|
|
497
497
|
const d = 8;
|
|
498
|
-
let
|
|
499
|
-
for (const
|
|
500
|
-
const
|
|
501
|
-
|
|
498
|
+
let p = null, g = 1 / 0;
|
|
499
|
+
for (const b of a) {
|
|
500
|
+
const m = b.horizontal ? Math.abs(l.x - b.pos) : Math.abs(l.y - b.pos), k = b.horizontal ? l.y >= b.chartArea.top && l.y <= b.chartArea.bottom : l.x >= b.chartArea.left && l.x <= b.chartArea.right;
|
|
501
|
+
m <= d && k && m < g && (g = m, p = b);
|
|
502
502
|
}
|
|
503
|
-
u =
|
|
503
|
+
u = p;
|
|
504
504
|
},
|
|
505
|
-
afterEvent(
|
|
505
|
+
afterEvent(f, C) {
|
|
506
506
|
if (!a.length) return;
|
|
507
|
-
const l =
|
|
507
|
+
const l = C.event;
|
|
508
508
|
if (!l) return;
|
|
509
|
-
const d = fe(
|
|
509
|
+
const d = fe(f);
|
|
510
510
|
if (!d) return;
|
|
511
511
|
if (!u) {
|
|
512
|
-
const
|
|
513
|
-
|
|
512
|
+
const R = d.querySelector(".nc-tt-linhaRef");
|
|
513
|
+
R && (R.style.opacity = "0");
|
|
514
514
|
return;
|
|
515
515
|
}
|
|
516
|
-
const
|
|
517
|
-
|
|
518
|
-
const
|
|
519
|
-
|
|
520
|
-
const
|
|
521
|
-
let s,
|
|
522
|
-
|
|
523
|
-
const
|
|
524
|
-
let
|
|
516
|
+
const p = u, g = Lt(d), b = p.linha.cor || "#0F172A";
|
|
517
|
+
g.innerHTML = me(p.linha.rotulo) + he(b, t(p.linha.valor));
|
|
518
|
+
const m = f.canvas;
|
|
519
|
+
g.style.opacity = "1", g.style.visibility = "hidden", g.style.left = "0px", g.style.top = "0px";
|
|
520
|
+
const k = g.offsetWidth, M = g.offsetHeight, o = 4;
|
|
521
|
+
let s, $;
|
|
522
|
+
p.horizontal ? (s = m.offsetLeft + p.pos, $ = m.offsetTop + l.y) : (s = m.offsetLeft + l.x, $ = m.offsetTop + p.pos);
|
|
523
|
+
const h = ge(s, k, d.clientWidth, o);
|
|
524
|
+
let A = $;
|
|
525
525
|
const i = M + 16 + o;
|
|
526
|
-
|
|
526
|
+
A < i && (A = i), g.style.left = h + "px", g.style.top = A + "px", g.style.visibility = "visible";
|
|
527
527
|
}
|
|
528
528
|
},
|
|
529
529
|
temLinhaHover: () => !!u
|
|
@@ -555,7 +555,7 @@ function Z(e) {
|
|
|
555
555
|
nomeArquivoExport: { type: String, default: "card.png" }
|
|
556
556
|
}, e);
|
|
557
557
|
}
|
|
558
|
-
function
|
|
558
|
+
function ae(e) {
|
|
559
559
|
return ve({
|
|
560
560
|
tipoValor: {
|
|
561
561
|
type: String,
|
|
@@ -566,7 +566,7 @@ function te(e) {
|
|
|
566
566
|
moeda: { type: String, default: "BRL" }
|
|
567
567
|
}, e);
|
|
568
568
|
}
|
|
569
|
-
function
|
|
569
|
+
function oe(e = "top") {
|
|
570
570
|
return {
|
|
571
571
|
direcao: {
|
|
572
572
|
type: String,
|
|
@@ -580,18 +580,21 @@ function Ve(e) {
|
|
|
580
580
|
rotuloCategoria: { type: String, default: "Categoria" },
|
|
581
581
|
rotuloQuantidade: { type: String, default: "Quantidade" },
|
|
582
582
|
mostrarCabecalho: { type: Boolean, default: !0 },
|
|
583
|
-
itensClicaveis: { type: Boolean, default: !1 }
|
|
583
|
+
itensClicaveis: { type: Boolean, default: !1 },
|
|
584
|
+
// Tooltip nativo (atributo `title`) exibido ao passar o mouse sobre a linha
|
|
585
|
+
// da tabela. `(item, index) => string`. Quando omitido, usa `item.descricao`.
|
|
586
|
+
tooltipLinha: { type: Function, default: null }
|
|
584
587
|
}, e);
|
|
585
588
|
}
|
|
586
|
-
const
|
|
589
|
+
const zt = { class: "card-linhas__header nc-flex nc-flex-column" }, Mt = { class: "card-linhas__chart nc-flex-1" }, Dt = {
|
|
587
590
|
key: 0,
|
|
588
591
|
class: "card-linhas__footer nc-mt-3"
|
|
589
|
-
},
|
|
592
|
+
}, Nt = {
|
|
590
593
|
__name: "CardLinhas",
|
|
591
594
|
props: {
|
|
592
595
|
...Z({ nomeArquivoExport: "card-linhas.png" }),
|
|
593
|
-
...
|
|
594
|
-
...
|
|
596
|
+
...ae(),
|
|
597
|
+
...oe("top"),
|
|
595
598
|
corDetalhes: { type: String, default: "#3B82F6" },
|
|
596
599
|
data: {
|
|
597
600
|
type: Array,
|
|
@@ -618,10 +621,10 @@ const Lt = { class: "card-linhas__header nc-flex nc-flex-column" }, zt = { class
|
|
|
618
621
|
},
|
|
619
622
|
emits: ["botaoAcao", "exportado"],
|
|
620
623
|
setup(e, { emit: r }) {
|
|
621
|
-
const t = e, n = r, { palette: a, cardStyle: u } = G(t), { formatar: c } =
|
|
624
|
+
const t = e, n = r, { palette: a, cardStyle: u } = G(t), { formatar: c } = te(t), { cardRef: f, onExportar: C, iconeExportar: l } = K(t, a, n), d = F(() => `card-linhas--${t.direcao}`), { linhasNormalizadas: p, pluginLinhaReferencia: g, temLinhaHover: b } = Pe({
|
|
622
625
|
linhasReferencia: () => t.linhasReferencia,
|
|
623
626
|
formatar: c
|
|
624
|
-
}),
|
|
627
|
+
}), m = [g], k = F(() => ({
|
|
625
628
|
labels: t.data.map((s) => s.rotulo),
|
|
626
629
|
datasets: [
|
|
627
630
|
{
|
|
@@ -631,10 +634,10 @@ const Lt = { class: "card-linhas__header nc-flex nc-flex-column" }, zt = { class
|
|
|
631
634
|
borderJoinStyle: "round",
|
|
632
635
|
borderCapStyle: "round",
|
|
633
636
|
backgroundColor: (s) => {
|
|
634
|
-
const { chart:
|
|
635
|
-
if (!
|
|
636
|
-
const i = t.corDetalhes || "#0400FF",
|
|
637
|
-
return T.addColorStop(0.16, D(i, 0.2)), T.addColorStop(1, D(
|
|
637
|
+
const { chart: $ } = s, { ctx: h, chartArea: A } = $;
|
|
638
|
+
if (!A) return "transparent";
|
|
639
|
+
const i = t.corDetalhes || "#0400FF", R = "#7C7C7C", T = h.createLinearGradient(0, A.top, 0, A.bottom);
|
|
640
|
+
return T.addColorStop(0.16, D(i, 0.2)), T.addColorStop(1, D(R, 0)), T;
|
|
638
641
|
},
|
|
639
642
|
fill: !0,
|
|
640
643
|
tension: 0.45,
|
|
@@ -650,13 +653,13 @@ const Lt = { class: "card-linhas__header nc-flex nc-flex-column" }, zt = { class
|
|
|
650
653
|
corDe: () => t.corDetalhes || "#3B82F6",
|
|
651
654
|
valorDe: (s) => c(s.parsed.y),
|
|
652
655
|
linhasExtrasDe: t.detalheTooltip ? (s) => t.detalheTooltip(t.data[s.dataIndex], s.dataIndex) : null,
|
|
653
|
-
deveOcultar:
|
|
656
|
+
deveOcultar: b
|
|
654
657
|
}), o = F(() => ({
|
|
655
658
|
responsive: !0,
|
|
656
659
|
maintainAspectRatio: !1,
|
|
657
660
|
interaction: { intersect: !1, mode: "index" },
|
|
658
661
|
layout: {
|
|
659
|
-
padding: { top:
|
|
662
|
+
padding: { top: p.value.length ? 24 : 0, right: 0, bottom: 0, left: 0 }
|
|
660
663
|
},
|
|
661
664
|
plugins: {
|
|
662
665
|
legend: { display: !1 },
|
|
@@ -665,8 +668,8 @@ const Lt = { class: "card-linhas__header nc-flex nc-flex-column" }, zt = { class
|
|
|
665
668
|
external: M,
|
|
666
669
|
callbacks: {
|
|
667
670
|
title: (s) => {
|
|
668
|
-
var
|
|
669
|
-
return ((
|
|
671
|
+
var $;
|
|
672
|
+
return (($ = s[0]) == null ? void 0 : $.label) ?? "";
|
|
670
673
|
},
|
|
671
674
|
label: (s) => c(s.parsed.y)
|
|
672
675
|
}
|
|
@@ -691,89 +694,89 @@ const Lt = { class: "card-linhas__header nc-flex nc-flex-column" }, zt = { class
|
|
|
691
694
|
display: !1,
|
|
692
695
|
grid: { display: !1 },
|
|
693
696
|
beginAtZero: !0,
|
|
694
|
-
suggestedMax:
|
|
697
|
+
suggestedMax: p.value.length ? Math.max(...p.value.map((s) => s.valor)) : void 0
|
|
695
698
|
}
|
|
696
699
|
}
|
|
697
700
|
}));
|
|
698
|
-
return (s,
|
|
701
|
+
return (s, $) => (v(), x("div", {
|
|
699
702
|
ref_key: "cardRef",
|
|
700
|
-
ref:
|
|
701
|
-
class:
|
|
702
|
-
style: q(
|
|
703
|
+
ref: f,
|
|
704
|
+
class: J(["card-linhas nc-p-4 nc-flex", d.value]),
|
|
705
|
+
style: q(y(u))
|
|
703
706
|
}, [
|
|
704
|
-
E("div",
|
|
705
|
-
P(
|
|
707
|
+
E("div", zt, [
|
|
708
|
+
P(ee, {
|
|
706
709
|
class: "card-linhas__topo",
|
|
707
710
|
legenda: s.legenda,
|
|
708
711
|
sublegenda: s.sublegenda,
|
|
709
|
-
palette:
|
|
712
|
+
palette: y(a),
|
|
710
713
|
"texto-botao": s.textoBotao,
|
|
711
714
|
"botao-visivel": s.botaoVisivel,
|
|
712
715
|
exportar: s.exportar,
|
|
713
716
|
"opacidade-legenda": "0.85",
|
|
714
|
-
onBotaoAcao:
|
|
715
|
-
onExportar:
|
|
716
|
-
},
|
|
717
|
+
onBotaoAcao: $[0] || ($[0] = (h) => n("botaoAcao")),
|
|
718
|
+
onExportar: y(C)
|
|
719
|
+
}, Y({ _: 2 }, [
|
|
717
720
|
s.$slots.legenda ? {
|
|
718
721
|
name: "legenda",
|
|
719
722
|
fn: z(() => [
|
|
720
|
-
|
|
723
|
+
S(s.$slots, "legenda", {}, void 0, !0)
|
|
721
724
|
]),
|
|
722
725
|
key: "0"
|
|
723
726
|
} : void 0,
|
|
724
727
|
s.$slots.sublegenda ? {
|
|
725
728
|
name: "sublegenda",
|
|
726
729
|
fn: z(() => [
|
|
727
|
-
|
|
730
|
+
S(s.$slots, "sublegenda", {}, void 0, !0)
|
|
728
731
|
]),
|
|
729
732
|
key: "1"
|
|
730
733
|
} : void 0,
|
|
731
734
|
s.$slots.actions ? {
|
|
732
735
|
name: "actions",
|
|
733
736
|
fn: z(() => [
|
|
734
|
-
|
|
737
|
+
S(s.$slots, "actions", {}, void 0, !0)
|
|
735
738
|
]),
|
|
736
739
|
key: "2"
|
|
737
740
|
} : void 0
|
|
738
741
|
]), 1032, ["legenda", "sublegenda", "palette", "texto-botao", "botao-visivel", "exportar", "onExportar"]),
|
|
739
|
-
s.$slots.titulo || s.titulo || s.$slots.descricao || s.descricao ? (
|
|
742
|
+
s.$slots.titulo || s.titulo || s.$slots.descricao || s.descricao ? (v(), re(ue, {
|
|
740
743
|
key: 0,
|
|
741
744
|
class: "card-linhas__titulos nc-mt-3 nc-mb-2",
|
|
742
745
|
titulo: s.titulo,
|
|
743
746
|
descricao: s.descricao,
|
|
744
|
-
palette:
|
|
745
|
-
},
|
|
747
|
+
palette: y(a)
|
|
748
|
+
}, Y({ _: 2 }, [
|
|
746
749
|
s.$slots.titulo ? {
|
|
747
750
|
name: "titulo",
|
|
748
751
|
fn: z(() => [
|
|
749
|
-
|
|
752
|
+
S(s.$slots, "titulo", {}, void 0, !0)
|
|
750
753
|
]),
|
|
751
754
|
key: "0"
|
|
752
755
|
} : void 0,
|
|
753
756
|
s.$slots.descricao ? {
|
|
754
757
|
name: "descricao",
|
|
755
758
|
fn: z(() => [
|
|
756
|
-
|
|
759
|
+
S(s.$slots, "descricao", {}, void 0, !0)
|
|
757
760
|
]),
|
|
758
761
|
key: "1"
|
|
759
762
|
} : void 0
|
|
760
|
-
]), 1032, ["titulo", "descricao", "palette"])) :
|
|
763
|
+
]), 1032, ["titulo", "descricao", "palette"])) : B("", !0)
|
|
761
764
|
]),
|
|
762
|
-
E("div",
|
|
763
|
-
P(
|
|
765
|
+
E("div", Mt, [
|
|
766
|
+
P(Q, {
|
|
764
767
|
type: "line",
|
|
765
|
-
data:
|
|
768
|
+
data: k.value,
|
|
766
769
|
options: o.value,
|
|
767
|
-
plugins:
|
|
770
|
+
plugins: m,
|
|
768
771
|
height: e.height
|
|
769
772
|
}, null, 8, ["data", "options", "height"])
|
|
770
773
|
]),
|
|
771
|
-
s.$slots.footer ? (
|
|
772
|
-
|
|
773
|
-
])) :
|
|
774
|
+
s.$slots.footer ? (v(), x("div", Dt, [
|
|
775
|
+
S(s.$slots, "footer", {}, void 0, !0)
|
|
776
|
+
])) : B("", !0)
|
|
774
777
|
], 6));
|
|
775
778
|
}
|
|
776
|
-
},
|
|
779
|
+
}, Ot = /* @__PURE__ */ W(Nt, [["__scopeId", "data-v-7715a094"]]), jt = { class: "nc-tabela-valor" }, Pt = ["role", "tabindex", "onMouseenter", "onFocus", "onClick", "onKeydown"], Vt = { class: "nc-tabela-rotulo nc-inline-flex nc-align-items-center nc-gap-2" }, Ht = { class: "nc-tabela-valor" }, Wt = {
|
|
777
780
|
__name: "TabelaDados",
|
|
778
781
|
props: {
|
|
779
782
|
data: { type: Array, required: !0 },
|
|
@@ -786,70 +789,99 @@ const Lt = { class: "card-linhas__header nc-flex nc-flex-column" }, zt = { class
|
|
|
786
789
|
itensClicaveis: { type: Boolean, default: !1 },
|
|
787
790
|
hoverIndex: { type: Number, default: null },
|
|
788
791
|
/** padding-inline aplicado à linha em hover/ativa (difere entre cards). */
|
|
789
|
-
padAtiva: { type: String, default: "0.40rem" }
|
|
792
|
+
padAtiva: { type: String, default: "0.40rem" },
|
|
793
|
+
/** `(item, index) => string` — tooltip da linha. Padrão: item.descricao. */
|
|
794
|
+
tooltipLinha: { type: Function, default: null }
|
|
790
795
|
},
|
|
791
796
|
emits: ["update:hoverIndex", "itemClicado"],
|
|
792
797
|
setup(e, { emit: r }) {
|
|
793
798
|
const t = e, n = r;
|
|
794
|
-
function a(
|
|
795
|
-
t.itensClicaveis && n("itemClicado", { item:
|
|
799
|
+
function a(p, g) {
|
|
800
|
+
t.itensClicaveis && n("itemClicado", { item: p, index: g, cor: t.coresAplicadas[g] });
|
|
801
|
+
}
|
|
802
|
+
function u(p, g) {
|
|
803
|
+
return (t.tooltipLinha ? t.tooltipLinha(p, g) : p == null ? void 0 : p.descricao) || "";
|
|
804
|
+
}
|
|
805
|
+
const c = _({ visivel: !1, texto: "", x: 0, y: 0 });
|
|
806
|
+
function f(p) {
|
|
807
|
+
const b = Math.min(Math.max(p.clientX, 150), window.innerWidth - 150), m = Math.max(p.clientY - 12, 80);
|
|
808
|
+
c.value.x = b, c.value.y = m;
|
|
809
|
+
}
|
|
810
|
+
function C(p, g, b) {
|
|
811
|
+
n("update:hoverIndex", b);
|
|
812
|
+
const m = u(g, b);
|
|
813
|
+
m && (c.value.texto = m, c.value.visivel = !0, f(p));
|
|
814
|
+
}
|
|
815
|
+
function l(p) {
|
|
816
|
+
c.value.visivel && f(p);
|
|
796
817
|
}
|
|
797
|
-
|
|
818
|
+
function d() {
|
|
819
|
+
n("update:hoverIndex", null), c.value.visivel = !1;
|
|
820
|
+
}
|
|
821
|
+
return (p, g) => (v(), x("div", {
|
|
798
822
|
class: "nc-tabela nc-flex nc-flex-column",
|
|
799
823
|
style: q({ "--nc-tabela-pad-ativa": e.padAtiva })
|
|
800
824
|
}, [
|
|
801
|
-
e.mostrarCabecalho ? (
|
|
825
|
+
e.mostrarCabecalho ? (v(), x("div", {
|
|
802
826
|
key: 0,
|
|
803
827
|
class: "nc-tabela-cab nc-flex nc-align-items-center nc-justify-content-between",
|
|
804
|
-
style: q({ color: e.palette.muted, borderColor:
|
|
828
|
+
style: q({ color: e.palette.muted, borderColor: y(D)(e.palette.muted, 0.25) })
|
|
805
829
|
}, [
|
|
806
|
-
E("span", null,
|
|
807
|
-
E("span",
|
|
808
|
-
], 4)) :
|
|
809
|
-
(
|
|
830
|
+
E("span", null, I(e.rotuloCategoria), 1),
|
|
831
|
+
E("span", jt, I(e.rotuloQuantidade), 1)
|
|
832
|
+
], 4)) : B("", !0),
|
|
833
|
+
(v(!0), x(Me, null, De(e.data, (b, m) => (v(), x("div", {
|
|
810
834
|
key: m,
|
|
811
|
-
class:
|
|
835
|
+
class: J(["nc-tabela-linha nc-flex nc-align-items-center nc-justify-content-between", { "nc-tabela-linha--clicavel": e.itensClicaveis, "nc-tabela-linha--ativa": e.hoverIndex === m }]),
|
|
812
836
|
style: q({
|
|
813
837
|
color: e.palette.text,
|
|
814
838
|
cursor: e.itensClicaveis ? "pointer" : "default",
|
|
815
|
-
"--nc-linha-bg":
|
|
816
|
-
"--nc-linha-bg-forte":
|
|
839
|
+
"--nc-linha-bg": y(D)(e.coresAplicadas[m], 0.05),
|
|
840
|
+
"--nc-linha-bg-forte": y(D)(e.coresAplicadas[m], 0.08)
|
|
817
841
|
}),
|
|
818
842
|
role: e.itensClicaveis ? "button" : null,
|
|
819
843
|
tabindex: e.itensClicaveis ? 0 : null,
|
|
820
|
-
onMouseenter: (
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
844
|
+
onMouseenter: (k) => C(k, b, m),
|
|
845
|
+
onMousemove: l,
|
|
846
|
+
onMouseleave: d,
|
|
847
|
+
onFocus: (k) => n("update:hoverIndex", m),
|
|
848
|
+
onBlur: g[0] || (g[0] = (k) => n("update:hoverIndex", null)),
|
|
849
|
+
onClick: (k) => a(b, m),
|
|
825
850
|
onKeydown: [
|
|
826
|
-
Fe(
|
|
827
|
-
Fe(
|
|
851
|
+
Fe(Le((k) => a(b, m), ["prevent"]), ["enter"]),
|
|
852
|
+
Fe(Le((k) => a(b, m), ["prevent"]), ["space"])
|
|
828
853
|
]
|
|
829
854
|
}, [
|
|
830
|
-
E("span",
|
|
855
|
+
E("span", Vt, [
|
|
831
856
|
E("span", {
|
|
832
857
|
class: "nc-bolinha",
|
|
833
858
|
style: q({ background: e.coresAplicadas[m] })
|
|
834
859
|
}, null, 4),
|
|
835
|
-
E("span", null,
|
|
860
|
+
E("span", null, I(b.rotulo), 1)
|
|
836
861
|
]),
|
|
837
|
-
E("span",
|
|
838
|
-
], 46,
|
|
862
|
+
E("span", Ht, I(e.formatar(b.quantidade)), 1)
|
|
863
|
+
], 46, Pt))), 128)),
|
|
864
|
+
(v(), re(at, { to: "body" }, [
|
|
865
|
+
c.value.visivel ? (v(), x("div", {
|
|
866
|
+
key: 0,
|
|
867
|
+
class: "nc-tabela-tt",
|
|
868
|
+
style: q({ left: c.value.x + "px", top: c.value.y + "px" })
|
|
869
|
+
}, I(c.value.texto), 5)) : B("", !0)
|
|
870
|
+
]))
|
|
839
871
|
], 4));
|
|
840
872
|
}
|
|
841
|
-
}, He = /* @__PURE__ */ W(
|
|
873
|
+
}, He = /* @__PURE__ */ W(Wt, [["__scopeId", "data-v-8e7c823a"]]), Xt = { class: "card-pizza__corpo nc-flex nc-align-items-center" }, Ut = { class: "card-pizza__chart-wrap nc-flex nc-align-items-center nc-justify-content-center" }, Yt = { class: "card-pizza__chart" }, Jt = {
|
|
842
874
|
key: 0,
|
|
843
875
|
class: "nc-centro nc-flex nc-flex-column nc-align-items-center nc-justify-content-center"
|
|
844
876
|
}, Qt = {
|
|
845
877
|
key: 0,
|
|
846
878
|
class: "card-pizza__footer nc-mt-3"
|
|
847
|
-
},
|
|
879
|
+
}, Gt = {
|
|
848
880
|
__name: "CardPizza",
|
|
849
881
|
props: {
|
|
850
882
|
...Z({ nomeArquivoExport: "card-pizza.png" }),
|
|
851
|
-
...
|
|
852
|
-
...
|
|
883
|
+
...ae(),
|
|
884
|
+
...oe("right"),
|
|
853
885
|
...Ve(),
|
|
854
886
|
corDetalhes: { type: String, default: "#3B82F6" },
|
|
855
887
|
data: {
|
|
@@ -872,15 +904,15 @@ const Lt = { class: "card-linhas__header nc-flex nc-flex-column" }, zt = { class
|
|
|
872
904
|
},
|
|
873
905
|
emits: ["botaoAcao", "exportado", "itemClicado"],
|
|
874
906
|
setup(e, { emit: r }) {
|
|
875
|
-
const t = e, n = r, { palette: a, cardStyle: u } = G(t), { formatar: c } =
|
|
907
|
+
const t = e, n = r, { palette: a, cardStyle: u } = G(t), { formatar: c } = te(t), { cardRef: f, onExportar: C, iconeExportar: l } = K(t, a, n), d = F(() => `card-pizza--${t.direcao}`), p = F(() => {
|
|
876
908
|
const o = de(t.corDetalhes, t.data.length);
|
|
877
|
-
return t.data.map((s,
|
|
878
|
-
}),
|
|
909
|
+
return t.data.map((s, $) => s.cor ?? o[$]);
|
|
910
|
+
}), g = F(() => ({
|
|
879
911
|
labels: t.data.map((o) => o.rotulo),
|
|
880
912
|
datasets: [
|
|
881
913
|
{
|
|
882
914
|
data: t.data.map((o) => o.quantidade),
|
|
883
|
-
backgroundColor:
|
|
915
|
+
backgroundColor: p.value,
|
|
884
916
|
borderWidth: 0,
|
|
885
917
|
borderColor: "transparent",
|
|
886
918
|
hoverOffset: 6,
|
|
@@ -888,12 +920,12 @@ const Lt = { class: "card-linhas__header nc-flex nc-flex-column" }, zt = { class
|
|
|
888
920
|
spacing: 0
|
|
889
921
|
}
|
|
890
922
|
]
|
|
891
|
-
})),
|
|
892
|
-
corDe: (o) =>
|
|
923
|
+
})), b = ye({
|
|
924
|
+
corDe: (o) => p.value[o.dataIndex],
|
|
893
925
|
valorDe: (o) => c(o.parsed),
|
|
894
926
|
linhasExtrasDe: t.detalheTooltip ? (o) => t.detalheTooltip(t.data[o.dataIndex], o.dataIndex) : null
|
|
895
|
-
}),
|
|
896
|
-
function
|
|
927
|
+
}), m = _(null);
|
|
928
|
+
function k(o) {
|
|
897
929
|
n("itemClicado", o);
|
|
898
930
|
}
|
|
899
931
|
const M = F(() => ({
|
|
@@ -901,19 +933,19 @@ const Lt = { class: "card-linhas__header nc-flex nc-flex-column" }, zt = { class
|
|
|
901
933
|
maintainAspectRatio: !1,
|
|
902
934
|
cutout: t.cutout,
|
|
903
935
|
layout: { padding: 4 },
|
|
904
|
-
onHover: (o, s,
|
|
905
|
-
|
|
936
|
+
onHover: (o, s, $) => {
|
|
937
|
+
m.value = s.length ? s[0].index : null, $.canvas.style.cursor = t.itensClicaveis && s.length ? "pointer" : "default";
|
|
906
938
|
},
|
|
907
939
|
onClick: (o, s) => {
|
|
908
940
|
if (!t.itensClicaveis || !s.length) return;
|
|
909
|
-
const
|
|
910
|
-
|
|
941
|
+
const $ = s[0].index, h = t.data[$];
|
|
942
|
+
h && k({ item: h, index: $, cor: p.value[$] });
|
|
911
943
|
},
|
|
912
944
|
plugins: {
|
|
913
945
|
legend: { display: !1 },
|
|
914
946
|
tooltip: {
|
|
915
947
|
enabled: !1,
|
|
916
|
-
external:
|
|
948
|
+
external: b,
|
|
917
949
|
callbacks: {
|
|
918
950
|
title: (o) => {
|
|
919
951
|
var s;
|
|
@@ -924,104 +956,105 @@ const Lt = { class: "card-linhas__header nc-flex nc-flex-column" }, zt = { class
|
|
|
924
956
|
}
|
|
925
957
|
}
|
|
926
958
|
}));
|
|
927
|
-
return (o, s) => (
|
|
959
|
+
return (o, s) => (v(), x("div", {
|
|
928
960
|
ref_key: "cardRef",
|
|
929
|
-
ref:
|
|
930
|
-
class:
|
|
931
|
-
style: q(
|
|
961
|
+
ref: f,
|
|
962
|
+
class: J(["card-pizza nc-p-4 nc-flex nc-flex-column", d.value]),
|
|
963
|
+
style: q(y(u))
|
|
932
964
|
}, [
|
|
933
|
-
P(
|
|
965
|
+
P(ee, {
|
|
934
966
|
class: "card-pizza__topo",
|
|
935
967
|
legenda: o.legenda,
|
|
936
968
|
sublegenda: o.sublegenda,
|
|
937
|
-
palette:
|
|
969
|
+
palette: y(a),
|
|
938
970
|
"texto-botao": o.textoBotao,
|
|
939
971
|
"botao-visivel": o.botaoVisivel,
|
|
940
972
|
exportar: o.exportar,
|
|
941
|
-
onBotaoAcao: s[0] || (s[0] = (
|
|
942
|
-
onExportar:
|
|
943
|
-
},
|
|
973
|
+
onBotaoAcao: s[0] || (s[0] = ($) => n("botaoAcao")),
|
|
974
|
+
onExportar: y(C)
|
|
975
|
+
}, Y({ _: 2 }, [
|
|
944
976
|
o.$slots.legenda ? {
|
|
945
977
|
name: "legenda",
|
|
946
978
|
fn: z(() => [
|
|
947
|
-
|
|
979
|
+
S(o.$slots, "legenda", {}, void 0, !0)
|
|
948
980
|
]),
|
|
949
981
|
key: "0"
|
|
950
982
|
} : void 0,
|
|
951
983
|
o.$slots.sublegenda ? {
|
|
952
984
|
name: "sublegenda",
|
|
953
985
|
fn: z(() => [
|
|
954
|
-
|
|
986
|
+
S(o.$slots, "sublegenda", {}, void 0, !0)
|
|
955
987
|
]),
|
|
956
988
|
key: "1"
|
|
957
989
|
} : void 0,
|
|
958
990
|
o.$slots.actions ? {
|
|
959
991
|
name: "actions",
|
|
960
992
|
fn: z(() => [
|
|
961
|
-
|
|
993
|
+
S(o.$slots, "actions", {}, void 0, !0)
|
|
962
994
|
]),
|
|
963
995
|
key: "2"
|
|
964
996
|
} : void 0
|
|
965
997
|
]), 1032, ["legenda", "sublegenda", "palette", "texto-botao", "botao-visivel", "exportar", "onExportar"]),
|
|
966
|
-
E("div",
|
|
998
|
+
E("div", Xt, [
|
|
967
999
|
P(He, {
|
|
968
1000
|
data: e.data,
|
|
969
|
-
"cores-aplicadas":
|
|
970
|
-
palette:
|
|
971
|
-
formatar:
|
|
1001
|
+
"cores-aplicadas": p.value,
|
|
1002
|
+
palette: y(a),
|
|
1003
|
+
formatar: y(c),
|
|
972
1004
|
"rotulo-categoria": o.rotuloCategoria,
|
|
973
1005
|
"rotulo-quantidade": o.rotuloQuantidade,
|
|
974
1006
|
"mostrar-cabecalho": o.mostrarCabecalho,
|
|
975
1007
|
"itens-clicaveis": o.itensClicaveis,
|
|
976
|
-
"
|
|
977
|
-
"
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
1008
|
+
"tooltip-linha": o.tooltipLinha,
|
|
1009
|
+
"hover-index": m.value,
|
|
1010
|
+
"onUpdate:hoverIndex": s[1] || (s[1] = ($) => m.value = $),
|
|
1011
|
+
onItemClicado: k
|
|
1012
|
+
}, null, 8, ["data", "cores-aplicadas", "palette", "formatar", "rotulo-categoria", "rotulo-quantidade", "mostrar-cabecalho", "itens-clicaveis", "tooltip-linha", "hover-index"]),
|
|
1013
|
+
E("div", Ut, [
|
|
1014
|
+
E("div", Yt, [
|
|
1015
|
+
P(Q, {
|
|
983
1016
|
type: "doughnut",
|
|
984
|
-
data:
|
|
1017
|
+
data: g.value,
|
|
985
1018
|
options: M.value,
|
|
986
1019
|
height: e.height
|
|
987
1020
|
}, null, 8, ["data", "options", "height"]),
|
|
988
|
-
o.$slots.titulo || o.titulo || o.$slots.descricao || o.descricao ? (
|
|
989
|
-
o.$slots.titulo || o.titulo ? (
|
|
1021
|
+
o.$slots.titulo || o.titulo || o.$slots.descricao || o.descricao ? (v(), x("div", Jt, [
|
|
1022
|
+
o.$slots.titulo || o.titulo ? (v(), x("div", {
|
|
990
1023
|
key: 0,
|
|
991
1024
|
class: "nc-centro-titulo nc-m-0 nc-font-semibold",
|
|
992
|
-
style: q({ color:
|
|
1025
|
+
style: q({ color: y(a).text })
|
|
993
1026
|
}, [
|
|
994
|
-
|
|
995
|
-
j(
|
|
1027
|
+
S(o.$slots, "titulo", {}, () => [
|
|
1028
|
+
j(I(o.titulo), 1)
|
|
996
1029
|
], !0)
|
|
997
|
-
], 4)) :
|
|
998
|
-
o.$slots.descricao || o.descricao ? (
|
|
1030
|
+
], 4)) : B("", !0),
|
|
1031
|
+
o.$slots.descricao || o.descricao ? (v(), x("div", {
|
|
999
1032
|
key: 1,
|
|
1000
1033
|
class: "nc-centro-desc",
|
|
1001
|
-
style: q({ color:
|
|
1034
|
+
style: q({ color: y(a).muted })
|
|
1002
1035
|
}, [
|
|
1003
|
-
|
|
1004
|
-
j(
|
|
1036
|
+
S(o.$slots, "descricao", {}, () => [
|
|
1037
|
+
j(I(o.descricao), 1)
|
|
1005
1038
|
], !0)
|
|
1006
|
-
], 4)) :
|
|
1007
|
-
])) :
|
|
1039
|
+
], 4)) : B("", !0)
|
|
1040
|
+
])) : B("", !0)
|
|
1008
1041
|
])
|
|
1009
1042
|
])
|
|
1010
1043
|
]),
|
|
1011
|
-
o.$slots.footer ? (
|
|
1012
|
-
|
|
1013
|
-
])) :
|
|
1044
|
+
o.$slots.footer ? (v(), x("div", Qt, [
|
|
1045
|
+
S(o.$slots, "footer", {}, void 0, !0)
|
|
1046
|
+
])) : B("", !0)
|
|
1014
1047
|
], 6));
|
|
1015
1048
|
}
|
|
1016
|
-
},
|
|
1049
|
+
}, Kt = /* @__PURE__ */ W(Gt, [["__scopeId", "data-v-ecbe8798"]]), Zt = { class: "card-barra__header nc-flex nc-flex-column" }, _t = { class: "card-barra__chart nc-flex-1" }, ea = {
|
|
1017
1050
|
key: 0,
|
|
1018
1051
|
class: "card-barra__footer nc-mt-3"
|
|
1019
|
-
},
|
|
1052
|
+
}, ta = {
|
|
1020
1053
|
__name: "CardBarra",
|
|
1021
1054
|
props: {
|
|
1022
1055
|
...Z({ nomeArquivoExport: "card-barra.png" }),
|
|
1023
|
-
...
|
|
1024
|
-
...
|
|
1056
|
+
...ae(),
|
|
1057
|
+
...oe("top"),
|
|
1025
1058
|
corDetalhes: { type: String, default: "#3B82F6" },
|
|
1026
1059
|
data: {
|
|
1027
1060
|
type: Array,
|
|
@@ -1064,28 +1097,28 @@ const Lt = { class: "card-linhas__header nc-flex nc-flex-column" }, zt = { class
|
|
|
1064
1097
|
},
|
|
1065
1098
|
emits: ["botaoAcao", "exportado"],
|
|
1066
1099
|
setup(e, { emit: r }) {
|
|
1067
|
-
|
|
1068
|
-
v655f41dd:
|
|
1100
|
+
ot((i) => ({
|
|
1101
|
+
v655f41dd: p.value
|
|
1069
1102
|
}));
|
|
1070
|
-
const t = e, n = r, { palette: a, cardStyle: u } = G(t), { formatar: c } =
|
|
1103
|
+
const t = e, n = r, { palette: a, cardStyle: u } = G(t), { formatar: c } = te(t), { cardRef: f, onExportar: C, iconeExportar: l } = K(t, a, n), d = F(() => `card-barra--${t.direcao}`), p = F(
|
|
1071
1104
|
() => typeof t.height == "number" ? `${t.height}px` : t.height
|
|
1072
|
-
),
|
|
1105
|
+
), g = F(() => t.orientacao === "horizontal"), { linhasNormalizadas: b, pluginLinhaReferencia: m, temLinhaHover: k } = Pe({
|
|
1073
1106
|
linhasReferencia: () => t.linhasReferencia,
|
|
1074
|
-
horizontal: () =>
|
|
1107
|
+
horizontal: () => g.value,
|
|
1075
1108
|
formatar: c
|
|
1076
|
-
}), M = [
|
|
1077
|
-
nome: i.nome ?? `Série ${
|
|
1078
|
-
cor: i.cor || t.cores[
|
|
1109
|
+
}), M = [m], o = F(() => Array.isArray(t.series) && t.series.length > 0 ? t.series.map((i, R) => ({
|
|
1110
|
+
nome: i.nome ?? `Série ${R + 1}`,
|
|
1111
|
+
cor: i.cor || t.cores[R % t.cores.length],
|
|
1079
1112
|
dados: Array.isArray(i.dados) ? i.dados : []
|
|
1080
1113
|
})) : [{ nome: t.legenda || "Valores", cor: t.corDetalhes, dados: t.data }]), s = F(() => {
|
|
1081
1114
|
const i = o.value[0];
|
|
1082
|
-
return i ? i.dados.map((
|
|
1083
|
-
}),
|
|
1084
|
-
const i = o.value,
|
|
1115
|
+
return i ? i.dados.map((R) => R.rotulo) : [];
|
|
1116
|
+
}), $ = F(() => {
|
|
1117
|
+
const i = o.value, R = i.length - 1, T = typeof t.larguraBarra == "number" ? t.larguraBarra : Number(t.larguraBarra) || 0.6, w = t.raioBarra, L = g.value;
|
|
1085
1118
|
function H(N) {
|
|
1086
1119
|
if (!t.empilhado || i.length === 1) return w;
|
|
1087
|
-
const V = N === 0, O = N ===
|
|
1088
|
-
return
|
|
1120
|
+
const V = N === 0, O = N === R;
|
|
1121
|
+
return L ? {
|
|
1089
1122
|
topLeft: V ? w : 0,
|
|
1090
1123
|
bottomLeft: V ? w : 0,
|
|
1091
1124
|
topRight: O ? w : 0,
|
|
@@ -1113,50 +1146,50 @@ const Lt = { class: "card-linhas__header nc-flex nc-flex-column" }, zt = { class
|
|
|
1113
1146
|
}))
|
|
1114
1147
|
};
|
|
1115
1148
|
});
|
|
1116
|
-
function
|
|
1149
|
+
function h(i) {
|
|
1117
1150
|
var qe, we, Te;
|
|
1118
|
-
const { chart:
|
|
1151
|
+
const { chart: R, tooltip: T } = i, w = fe(R);
|
|
1119
1152
|
if (!w) return;
|
|
1120
|
-
const
|
|
1121
|
-
if (T.opacity === 0 ||
|
|
1122
|
-
|
|
1153
|
+
const L = pe(w, { caretFlexivel: !0 });
|
|
1154
|
+
if (T.opacity === 0 || k()) {
|
|
1155
|
+
L.style.opacity = "0";
|
|
1123
1156
|
return;
|
|
1124
1157
|
}
|
|
1125
1158
|
const H = T.dataPoints || [], N = o.value.length > 1, V = H.map((X) => {
|
|
1126
1159
|
var Ee;
|
|
1127
|
-
const U = ((Ee = o.value[X.datasetIndex]) == null ? void 0 : Ee.cor) || t.corDetalhes,
|
|
1128
|
-
return he(U,
|
|
1160
|
+
const U = ((Ee = o.value[X.datasetIndex]) == null ? void 0 : Ee.cor) || t.corDetalhes, ie = c(g.value ? X.parsed.x : X.parsed.y);
|
|
1161
|
+
return he(U, ie, {
|
|
1129
1162
|
nome: N ? X.dataset.label : "",
|
|
1130
1163
|
alinharDireita: !0,
|
|
1131
1164
|
margemTopo: !0
|
|
1132
1165
|
});
|
|
1133
1166
|
}).join(""), O = (qe = H[0]) == null ? void 0 : qe.dataIndex;
|
|
1134
|
-
let
|
|
1167
|
+
let le = null;
|
|
1135
1168
|
if (O != null)
|
|
1136
|
-
for (const X of
|
|
1169
|
+
for (const X of R.data.datasets) {
|
|
1137
1170
|
const U = (we = X.previstos) == null ? void 0 : we[O];
|
|
1138
1171
|
if (U != null) {
|
|
1139
|
-
|
|
1172
|
+
le = U;
|
|
1140
1173
|
break;
|
|
1141
1174
|
}
|
|
1142
1175
|
}
|
|
1143
|
-
const We =
|
|
1176
|
+
const We = le != null ? `<div style="display:flex;align-items:center;gap:6px;margin-top:6px;padding-top:4px;border-top:1px dashed rgba(15,23,42,.08);"><span style="font-size:11px;color:#64748B;margin-right:6px;">Previsto</span><span style="font-size:12px;font-weight:700;color:#0F172A;letter-spacing:-.01em;line-height:1.1;margin-left:auto;">${c(le)}</span></div>` : "";
|
|
1144
1177
|
let be = "";
|
|
1145
1178
|
if (t.detalheTooltip && O != null) {
|
|
1146
1179
|
const X = (Te = o.value[0]) == null ? void 0 : Te.dados[O], U = t.detalheTooltip(X, O);
|
|
1147
|
-
be = (Array.isArray(U) ? U : [U]).filter(Boolean).map((
|
|
1180
|
+
be = (Array.isArray(U) ? U : [U]).filter(Boolean).map((ie) => Oe(ie)).join("");
|
|
1148
1181
|
}
|
|
1149
|
-
const Xe =
|
|
1182
|
+
const Xe = L.querySelector(".nc-tt__content");
|
|
1150
1183
|
Xe.innerHTML = me((T.title || []).join(" ")) + V + We + be;
|
|
1151
|
-
const { offsetLeft: Ue, offsetTop:
|
|
1152
|
-
|
|
1153
|
-
const
|
|
1184
|
+
const { offsetLeft: Ue, offsetTop: Ye } = R.canvas;
|
|
1185
|
+
L.style.opacity = "1", L.style.visibility = "hidden", L.style.left = "0px", L.style.top = "0px";
|
|
1186
|
+
const se = L.offsetWidth, Je = L.offsetHeight, xe = 4, $e = Ue + T.caretX, Ce = Ye + T.caretY, ke = ge($e, se, w.clientWidth, xe), Qe = se / 2, Se = 14, Ae = Ce - Se - Je, Be = Ae < xe, Ge = Be ? Ce + Se : Ae, Re = L.querySelector(".nc-tt__caret");
|
|
1154
1187
|
je(Re, Be);
|
|
1155
|
-
const Ke = $e - (ke -
|
|
1156
|
-
Re.style.left = Ze + "px",
|
|
1188
|
+
const Ke = $e - (ke - Qe), Ze = Math.max(10, Math.min(se - 10, Ke));
|
|
1189
|
+
Re.style.left = Ze + "px", L.style.left = ke + "px", L.style.top = Ge + "px", L.style.visibility = "visible";
|
|
1157
1190
|
}
|
|
1158
|
-
const
|
|
1159
|
-
const i =
|
|
1191
|
+
const A = F(() => {
|
|
1192
|
+
const i = g.value, R = {
|
|
1160
1193
|
grid: { display: !1, drawBorder: !1 },
|
|
1161
1194
|
border: { display: !1 },
|
|
1162
1195
|
ticks: { color: a.value.muted, font: { size: 10, family: "'Inter', sans-serif" }, padding: 8 },
|
|
@@ -1166,7 +1199,7 @@ const Lt = { class: "card-linhas__header nc-flex nc-flex-column" }, zt = { class
|
|
|
1166
1199
|
grid: { display: !1 },
|
|
1167
1200
|
beginAtZero: !0,
|
|
1168
1201
|
stacked: t.empilhado,
|
|
1169
|
-
suggestedMax:
|
|
1202
|
+
suggestedMax: b.value.length ? Math.max(...b.value.map((w) => w.valor)) : void 0
|
|
1170
1203
|
};
|
|
1171
1204
|
return {
|
|
1172
1205
|
responsive: !0,
|
|
@@ -1175,10 +1208,10 @@ const Lt = { class: "card-linhas__header nc-flex nc-flex-column" }, zt = { class
|
|
|
1175
1208
|
interaction: { intersect: !1, mode: "index", axis: i ? "y" : "x" },
|
|
1176
1209
|
layout: {
|
|
1177
1210
|
padding: {
|
|
1178
|
-
top:
|
|
1211
|
+
top: b.value.length && !i ? 24 : 12,
|
|
1179
1212
|
right: i ? 12 : 0,
|
|
1180
1213
|
bottom: 0,
|
|
1181
|
-
left:
|
|
1214
|
+
left: b.value.length && i ? 60 : 0
|
|
1182
1215
|
}
|
|
1183
1216
|
},
|
|
1184
1217
|
plugins: {
|
|
@@ -1198,112 +1231,112 @@ const Lt = { class: "card-linhas__header nc-flex nc-flex-column" }, zt = { class
|
|
|
1198
1231
|
},
|
|
1199
1232
|
tooltip: {
|
|
1200
1233
|
enabled: !1,
|
|
1201
|
-
external:
|
|
1234
|
+
external: h,
|
|
1202
1235
|
callbacks: {
|
|
1203
1236
|
title: (w) => {
|
|
1204
|
-
var
|
|
1205
|
-
return ((
|
|
1237
|
+
var L;
|
|
1238
|
+
return ((L = w[0]) == null ? void 0 : L.label) ?? "";
|
|
1206
1239
|
},
|
|
1207
1240
|
label: (w) => c(i ? w.parsed.x : w.parsed.y)
|
|
1208
1241
|
}
|
|
1209
1242
|
}
|
|
1210
1243
|
},
|
|
1211
1244
|
scales: {
|
|
1212
|
-
x: i ? T :
|
|
1213
|
-
y: i ?
|
|
1245
|
+
x: i ? T : R,
|
|
1246
|
+
y: i ? R : T
|
|
1214
1247
|
}
|
|
1215
1248
|
};
|
|
1216
1249
|
});
|
|
1217
|
-
return (i,
|
|
1250
|
+
return (i, R) => (v(), x("div", {
|
|
1218
1251
|
ref_key: "cardRef",
|
|
1219
|
-
ref:
|
|
1220
|
-
class:
|
|
1221
|
-
style: q(
|
|
1252
|
+
ref: f,
|
|
1253
|
+
class: J(["card-barra nc-p-4 nc-flex", d.value]),
|
|
1254
|
+
style: q(y(u))
|
|
1222
1255
|
}, [
|
|
1223
|
-
E("div",
|
|
1224
|
-
P(
|
|
1256
|
+
E("div", Zt, [
|
|
1257
|
+
P(ee, {
|
|
1225
1258
|
class: "card-barra__topo",
|
|
1226
1259
|
legenda: i.legenda,
|
|
1227
1260
|
sublegenda: i.sublegenda,
|
|
1228
|
-
palette:
|
|
1261
|
+
palette: y(a),
|
|
1229
1262
|
"texto-botao": i.textoBotao,
|
|
1230
1263
|
"botao-visivel": i.botaoVisivel,
|
|
1231
1264
|
exportar: i.exportar,
|
|
1232
1265
|
"opacidade-legenda": "0.85",
|
|
1233
|
-
onBotaoAcao:
|
|
1234
|
-
onExportar:
|
|
1235
|
-
},
|
|
1266
|
+
onBotaoAcao: R[0] || (R[0] = (T) => n("botaoAcao")),
|
|
1267
|
+
onExportar: y(C)
|
|
1268
|
+
}, Y({ _: 2 }, [
|
|
1236
1269
|
i.$slots.legenda ? {
|
|
1237
1270
|
name: "legenda",
|
|
1238
1271
|
fn: z(() => [
|
|
1239
|
-
|
|
1272
|
+
S(i.$slots, "legenda", {}, void 0, !0)
|
|
1240
1273
|
]),
|
|
1241
1274
|
key: "0"
|
|
1242
1275
|
} : void 0,
|
|
1243
1276
|
i.$slots.sublegenda ? {
|
|
1244
1277
|
name: "sublegenda",
|
|
1245
1278
|
fn: z(() => [
|
|
1246
|
-
|
|
1279
|
+
S(i.$slots, "sublegenda", {}, void 0, !0)
|
|
1247
1280
|
]),
|
|
1248
1281
|
key: "1"
|
|
1249
1282
|
} : void 0,
|
|
1250
1283
|
i.$slots.actions ? {
|
|
1251
1284
|
name: "actions",
|
|
1252
1285
|
fn: z(() => [
|
|
1253
|
-
|
|
1286
|
+
S(i.$slots, "actions", {}, void 0, !0)
|
|
1254
1287
|
]),
|
|
1255
1288
|
key: "2"
|
|
1256
1289
|
} : void 0
|
|
1257
1290
|
]), 1032, ["legenda", "sublegenda", "palette", "texto-botao", "botao-visivel", "exportar", "onExportar"]),
|
|
1258
|
-
i.$slots.titulo || i.titulo || i.$slots.descricao || i.descricao ? (
|
|
1291
|
+
i.$slots.titulo || i.titulo || i.$slots.descricao || i.descricao ? (v(), re(ue, {
|
|
1259
1292
|
key: 0,
|
|
1260
1293
|
class: "card-barra__titulos nc-mt-3 nc-mb-2",
|
|
1261
1294
|
titulo: i.titulo,
|
|
1262
1295
|
descricao: i.descricao,
|
|
1263
|
-
palette:
|
|
1264
|
-
},
|
|
1296
|
+
palette: y(a)
|
|
1297
|
+
}, Y({ _: 2 }, [
|
|
1265
1298
|
i.$slots.titulo ? {
|
|
1266
1299
|
name: "titulo",
|
|
1267
1300
|
fn: z(() => [
|
|
1268
|
-
|
|
1301
|
+
S(i.$slots, "titulo", {}, void 0, !0)
|
|
1269
1302
|
]),
|
|
1270
1303
|
key: "0"
|
|
1271
1304
|
} : void 0,
|
|
1272
1305
|
i.$slots.descricao ? {
|
|
1273
1306
|
name: "descricao",
|
|
1274
1307
|
fn: z(() => [
|
|
1275
|
-
|
|
1308
|
+
S(i.$slots, "descricao", {}, void 0, !0)
|
|
1276
1309
|
]),
|
|
1277
1310
|
key: "1"
|
|
1278
1311
|
} : void 0
|
|
1279
|
-
]), 1032, ["titulo", "descricao", "palette"])) :
|
|
1312
|
+
]), 1032, ["titulo", "descricao", "palette"])) : B("", !0)
|
|
1280
1313
|
]),
|
|
1281
|
-
E("div",
|
|
1282
|
-
P(
|
|
1314
|
+
E("div", _t, [
|
|
1315
|
+
P(Q, {
|
|
1283
1316
|
type: "bar",
|
|
1284
|
-
data:
|
|
1285
|
-
options:
|
|
1317
|
+
data: $.value,
|
|
1318
|
+
options: A.value,
|
|
1286
1319
|
plugins: M,
|
|
1287
1320
|
height: "100%"
|
|
1288
1321
|
}, null, 8, ["data", "options"])
|
|
1289
1322
|
]),
|
|
1290
|
-
i.$slots.footer ? (
|
|
1291
|
-
|
|
1292
|
-
])) :
|
|
1323
|
+
i.$slots.footer ? (v(), x("div", ea, [
|
|
1324
|
+
S(i.$slots, "footer", {}, void 0, !0)
|
|
1325
|
+
])) : B("", !0)
|
|
1293
1326
|
], 6));
|
|
1294
1327
|
}
|
|
1295
|
-
},
|
|
1328
|
+
}, aa = /* @__PURE__ */ W(ta, [["__scopeId", "data-v-857f5e5b"]]), oa = { class: "card-polar__corpo nc-flex nc-align-items-center" }, na = { class: "card-polar__chart-wrap nc-flex nc-align-items-center nc-justify-content-center" }, ra = { class: "card-polar__chart" }, la = {
|
|
1296
1329
|
key: 0,
|
|
1297
1330
|
class: "card-polar__centro-bottom"
|
|
1298
|
-
},
|
|
1331
|
+
}, sa = {
|
|
1299
1332
|
key: 0,
|
|
1300
1333
|
class: "card-polar__footer nc-mt-3"
|
|
1301
|
-
},
|
|
1334
|
+
}, ia = {
|
|
1302
1335
|
__name: "CardPolar",
|
|
1303
1336
|
props: {
|
|
1304
1337
|
...Z({ nomeArquivoExport: "card-polar.png" }),
|
|
1305
|
-
...
|
|
1306
|
-
...
|
|
1338
|
+
...ae(),
|
|
1339
|
+
...oe("right"),
|
|
1307
1340
|
...Ve(),
|
|
1308
1341
|
corDetalhes: { type: String, default: "#3B82F6" },
|
|
1309
1342
|
data: {
|
|
@@ -1326,39 +1359,39 @@ const Lt = { class: "card-linhas__header nc-flex nc-flex-column" }, zt = { class
|
|
|
1326
1359
|
},
|
|
1327
1360
|
emits: ["botaoAcao", "exportado", "itemClicado"],
|
|
1328
1361
|
setup(e, { emit: r }) {
|
|
1329
|
-
const t = e, n = r, { palette: a, cardStyle: u } = G(t), { formatar: c } =
|
|
1362
|
+
const t = e, n = r, { palette: a, cardStyle: u } = G(t), { formatar: c } = te(t), { cardRef: f, onExportar: C, iconeExportar: l } = K(t, a, n), d = F(() => `card-polar--${t.direcao}`), p = F(() => {
|
|
1330
1363
|
const o = de(t.corDetalhes, t.data.length);
|
|
1331
|
-
return t.data.map((s,
|
|
1332
|
-
}),
|
|
1364
|
+
return t.data.map((s, $) => s.cor ?? o[$]);
|
|
1365
|
+
}), g = F(() => ({
|
|
1333
1366
|
labels: t.data.map((o) => o.rotulo),
|
|
1334
1367
|
datasets: [
|
|
1335
1368
|
{
|
|
1336
1369
|
data: t.data.map((o) => o.quantidade),
|
|
1337
|
-
backgroundColor:
|
|
1338
|
-
borderColor:
|
|
1370
|
+
backgroundColor: p.value,
|
|
1371
|
+
borderColor: p.value,
|
|
1339
1372
|
borderWidth: 0,
|
|
1340
1373
|
hoverOffset: 6
|
|
1341
1374
|
}
|
|
1342
1375
|
]
|
|
1343
|
-
})),
|
|
1344
|
-
corDe: (o) =>
|
|
1376
|
+
})), b = ye({
|
|
1377
|
+
corDe: (o) => p.value[o.dataIndex],
|
|
1345
1378
|
valorDe: (o) => c(o.parsed.r ?? o.parsed),
|
|
1346
1379
|
linhasExtrasDe: t.detalheTooltip ? (o) => t.detalheTooltip(t.data[o.dataIndex], o.dataIndex) : null
|
|
1347
|
-
}),
|
|
1348
|
-
function
|
|
1380
|
+
}), m = _(null);
|
|
1381
|
+
function k(o) {
|
|
1349
1382
|
n("itemClicado", o);
|
|
1350
1383
|
}
|
|
1351
1384
|
const M = F(() => ({
|
|
1352
1385
|
responsive: !0,
|
|
1353
1386
|
maintainAspectRatio: !1,
|
|
1354
1387
|
layout: { padding: 4 },
|
|
1355
|
-
onHover: (o, s,
|
|
1356
|
-
|
|
1388
|
+
onHover: (o, s, $) => {
|
|
1389
|
+
m.value = s.length ? s[0].index : null, $.canvas.style.cursor = t.itensClicaveis && s.length ? "pointer" : "default";
|
|
1357
1390
|
},
|
|
1358
1391
|
onClick: (o, s) => {
|
|
1359
1392
|
if (!t.itensClicaveis || !s.length) return;
|
|
1360
|
-
const
|
|
1361
|
-
|
|
1393
|
+
const $ = s[0].index, h = t.data[$];
|
|
1394
|
+
h && k({ item: h, index: $, cor: p.value[$] });
|
|
1362
1395
|
},
|
|
1363
1396
|
scales: {
|
|
1364
1397
|
r: {
|
|
@@ -1379,7 +1412,7 @@ const Lt = { class: "card-linhas__header nc-flex nc-flex-column" }, zt = { class
|
|
|
1379
1412
|
legend: { display: !1 },
|
|
1380
1413
|
tooltip: {
|
|
1381
1414
|
enabled: !1,
|
|
1382
|
-
external:
|
|
1415
|
+
external: b,
|
|
1383
1416
|
callbacks: {
|
|
1384
1417
|
title: (o) => {
|
|
1385
1418
|
var s;
|
|
@@ -1393,111 +1426,112 @@ const Lt = { class: "card-linhas__header nc-flex nc-flex-column" }, zt = { class
|
|
|
1393
1426
|
}
|
|
1394
1427
|
}
|
|
1395
1428
|
}));
|
|
1396
|
-
return (o, s) => (
|
|
1429
|
+
return (o, s) => (v(), x("div", {
|
|
1397
1430
|
ref_key: "cardRef",
|
|
1398
|
-
ref:
|
|
1399
|
-
class:
|
|
1400
|
-
style: q(
|
|
1431
|
+
ref: f,
|
|
1432
|
+
class: J(["card-polar nc-p-4 nc-flex nc-flex-column", d.value]),
|
|
1433
|
+
style: q(y(u))
|
|
1401
1434
|
}, [
|
|
1402
|
-
P(
|
|
1435
|
+
P(ee, {
|
|
1403
1436
|
class: "card-polar__topo",
|
|
1404
1437
|
legenda: o.legenda,
|
|
1405
1438
|
sublegenda: o.sublegenda,
|
|
1406
|
-
palette:
|
|
1439
|
+
palette: y(a),
|
|
1407
1440
|
"texto-botao": o.textoBotao,
|
|
1408
1441
|
"botao-visivel": o.botaoVisivel,
|
|
1409
1442
|
exportar: o.exportar,
|
|
1410
|
-
onBotaoAcao: s[0] || (s[0] = (
|
|
1411
|
-
onExportar:
|
|
1412
|
-
},
|
|
1443
|
+
onBotaoAcao: s[0] || (s[0] = ($) => n("botaoAcao")),
|
|
1444
|
+
onExportar: y(C)
|
|
1445
|
+
}, Y({ _: 2 }, [
|
|
1413
1446
|
o.$slots.legenda ? {
|
|
1414
1447
|
name: "legenda",
|
|
1415
1448
|
fn: z(() => [
|
|
1416
|
-
|
|
1449
|
+
S(o.$slots, "legenda", {}, void 0, !0)
|
|
1417
1450
|
]),
|
|
1418
1451
|
key: "0"
|
|
1419
1452
|
} : void 0,
|
|
1420
1453
|
o.$slots.sublegenda ? {
|
|
1421
1454
|
name: "sublegenda",
|
|
1422
1455
|
fn: z(() => [
|
|
1423
|
-
|
|
1456
|
+
S(o.$slots, "sublegenda", {}, void 0, !0)
|
|
1424
1457
|
]),
|
|
1425
1458
|
key: "1"
|
|
1426
1459
|
} : void 0,
|
|
1427
1460
|
o.$slots.actions ? {
|
|
1428
1461
|
name: "actions",
|
|
1429
1462
|
fn: z(() => [
|
|
1430
|
-
|
|
1463
|
+
S(o.$slots, "actions", {}, void 0, !0)
|
|
1431
1464
|
]),
|
|
1432
1465
|
key: "2"
|
|
1433
1466
|
} : void 0
|
|
1434
1467
|
]), 1032, ["legenda", "sublegenda", "palette", "texto-botao", "botao-visivel", "exportar", "onExportar"]),
|
|
1435
|
-
E("div",
|
|
1468
|
+
E("div", oa, [
|
|
1436
1469
|
P(He, {
|
|
1437
1470
|
data: e.data,
|
|
1438
|
-
"cores-aplicadas":
|
|
1439
|
-
palette:
|
|
1440
|
-
formatar:
|
|
1471
|
+
"cores-aplicadas": p.value,
|
|
1472
|
+
palette: y(a),
|
|
1473
|
+
formatar: y(c),
|
|
1441
1474
|
"rotulo-categoria": o.rotuloCategoria,
|
|
1442
1475
|
"rotulo-quantidade": o.rotuloQuantidade,
|
|
1443
1476
|
"mostrar-cabecalho": o.mostrarCabecalho,
|
|
1444
1477
|
"itens-clicaveis": o.itensClicaveis,
|
|
1478
|
+
"tooltip-linha": o.tooltipLinha,
|
|
1445
1479
|
"pad-ativa": "0.25rem",
|
|
1446
|
-
"hover-index":
|
|
1447
|
-
"onUpdate:hoverIndex": s[1] || (s[1] = (
|
|
1448
|
-
onItemClicado:
|
|
1449
|
-
}, null, 8, ["data", "cores-aplicadas", "palette", "formatar", "rotulo-categoria", "rotulo-quantidade", "mostrar-cabecalho", "itens-clicaveis", "hover-index"]),
|
|
1450
|
-
E("div",
|
|
1451
|
-
E("div",
|
|
1452
|
-
P(
|
|
1480
|
+
"hover-index": m.value,
|
|
1481
|
+
"onUpdate:hoverIndex": s[1] || (s[1] = ($) => m.value = $),
|
|
1482
|
+
onItemClicado: k
|
|
1483
|
+
}, null, 8, ["data", "cores-aplicadas", "palette", "formatar", "rotulo-categoria", "rotulo-quantidade", "mostrar-cabecalho", "itens-clicaveis", "tooltip-linha", "hover-index"]),
|
|
1484
|
+
E("div", na, [
|
|
1485
|
+
E("div", ra, [
|
|
1486
|
+
P(Q, {
|
|
1453
1487
|
type: "polarArea",
|
|
1454
|
-
data:
|
|
1488
|
+
data: g.value,
|
|
1455
1489
|
options: M.value,
|
|
1456
1490
|
height: e.height
|
|
1457
1491
|
}, null, 8, ["data", "options", "height"]),
|
|
1458
|
-
o.$slots.titulo || o.titulo || o.$slots.descricao || o.descricao ? (
|
|
1459
|
-
o.$slots.titulo || o.titulo ? (
|
|
1492
|
+
o.$slots.titulo || o.titulo || o.$slots.descricao || o.descricao ? (v(), x("div", la, [
|
|
1493
|
+
o.$slots.titulo || o.titulo ? (v(), x("div", {
|
|
1460
1494
|
key: 0,
|
|
1461
1495
|
class: "card-polar__centro-titulo nc-m-0 nc-text-3xl nc-font-semibold",
|
|
1462
|
-
style: q({ color:
|
|
1496
|
+
style: q({ color: y(a).text, lineHeight: "33px", letterSpacing: "-1px" })
|
|
1463
1497
|
}, [
|
|
1464
|
-
|
|
1465
|
-
j(
|
|
1498
|
+
S(o.$slots, "titulo", {}, () => [
|
|
1499
|
+
j(I(o.titulo), 1)
|
|
1466
1500
|
], !0)
|
|
1467
|
-
], 4)) :
|
|
1468
|
-
o.$slots.descricao || o.descricao ? (
|
|
1501
|
+
], 4)) : B("", !0),
|
|
1502
|
+
o.$slots.descricao || o.descricao ? (v(), x("div", {
|
|
1469
1503
|
key: 1,
|
|
1470
1504
|
class: "card-polar__centro-desc",
|
|
1471
|
-
style: q({ color:
|
|
1505
|
+
style: q({ color: y(a).muted })
|
|
1472
1506
|
}, [
|
|
1473
|
-
|
|
1474
|
-
j(
|
|
1507
|
+
S(o.$slots, "descricao", {}, () => [
|
|
1508
|
+
j(I(o.descricao), 1)
|
|
1475
1509
|
], !0)
|
|
1476
|
-
], 4)) :
|
|
1477
|
-
])) :
|
|
1510
|
+
], 4)) : B("", !0)
|
|
1511
|
+
])) : B("", !0)
|
|
1478
1512
|
])
|
|
1479
1513
|
])
|
|
1480
1514
|
]),
|
|
1481
|
-
o.$slots.footer ? (
|
|
1482
|
-
|
|
1483
|
-
])) :
|
|
1515
|
+
o.$slots.footer ? (v(), x("div", sa, [
|
|
1516
|
+
S(o.$slots, "footer", {}, void 0, !0)
|
|
1517
|
+
])) : B("", !0)
|
|
1484
1518
|
], 6));
|
|
1485
1519
|
}
|
|
1486
|
-
},
|
|
1520
|
+
}, ca = /* @__PURE__ */ W(ia, [["__scopeId", "data-v-9f63090f"]]), da = { class: "card-progresso__corpo nc-flex nc-align-items-center nc-flex-wrap" }, ua = {
|
|
1487
1521
|
key: 0,
|
|
1488
1522
|
class: "card-progresso__chart-wrap nc-flex nc-align-items-center nc-justify-content-center"
|
|
1489
|
-
},
|
|
1523
|
+
}, pa = { class: "card-progresso__chart" }, fa = { class: "nc-centro nc-flex nc-flex-column nc-align-items-center nc-justify-content-center" }, ga = { class: "card-progresso__lista nc-flex nc-flex-column" }, ma = { class: "card-progresso__item-cab nc-flex nc-align-items-center nc-justify-content-between" }, ha = {
|
|
1490
1524
|
key: 0,
|
|
1491
1525
|
class: "card-progresso__item-valor nc-inline-flex nc-align-items-center nc-gap-2"
|
|
1492
|
-
},
|
|
1526
|
+
}, ya = { key: 0 }, va = {
|
|
1493
1527
|
key: 1,
|
|
1494
1528
|
class: "card-progresso__footer nc-mt-3"
|
|
1495
|
-
},
|
|
1529
|
+
}, ba = {
|
|
1496
1530
|
__name: "CardProgresso",
|
|
1497
1531
|
props: {
|
|
1498
1532
|
...Z({ nomeArquivoExport: "card-progresso.png" }),
|
|
1499
|
-
...
|
|
1500
|
-
...
|
|
1533
|
+
...ae(),
|
|
1534
|
+
...oe("top"),
|
|
1501
1535
|
corDetalhes: { type: String, default: "#3B82F6" },
|
|
1502
1536
|
corExcesso: { type: String, default: "#EF4444" },
|
|
1503
1537
|
formato: {
|
|
@@ -1524,29 +1558,29 @@ const Lt = { class: "card-linhas__header nc-flex nc-flex-column" }, zt = { class
|
|
|
1524
1558
|
},
|
|
1525
1559
|
emits: ["botaoAcao", "exportado"],
|
|
1526
1560
|
setup(e, { emit: r }) {
|
|
1527
|
-
const t = e, n = r, { palette: a, cardStyle: u } = G(t), { formatar: c } =
|
|
1528
|
-
const
|
|
1529
|
-
return t.data.map((
|
|
1530
|
-
const
|
|
1561
|
+
const t = e, n = r, { palette: a, cardStyle: u } = G(t), { formatar: c } = te(t), { cardRef: f, onExportar: C, iconeExportar: l } = K(t, a, n), d = F(() => `card-progresso--${t.direcao}`), p = F(() => {
|
|
1562
|
+
const h = de(t.corDetalhes, t.data.length);
|
|
1563
|
+
return t.data.map((A, i) => {
|
|
1564
|
+
const R = Number(A.meta ?? t.metaPadrao) || 0, T = Number(A.quantidade) || 0, w = A.cor ?? h[i], L = A.modo === "reducao";
|
|
1531
1565
|
let H;
|
|
1532
|
-
if (
|
|
1533
|
-
const N = Number(
|
|
1566
|
+
if (L) {
|
|
1567
|
+
const N = Number(A.valor_referencia) || 0, V = N - R;
|
|
1534
1568
|
H = V > 0 ? Math.max(0, Math.min(100, (N - T) / V * 100)) : 0;
|
|
1535
1569
|
} else
|
|
1536
|
-
H =
|
|
1537
|
-
return { rotulo:
|
|
1570
|
+
H = R > 0 ? Math.max(0, Math.min(100, T / R * 100)) : 0;
|
|
1571
|
+
return { rotulo: A.rotulo, quantidade: T, meta: R, valorReferencia: A.valor_referencia ?? null, cor: w, percentual: H, reducao: L };
|
|
1538
1572
|
});
|
|
1539
|
-
}),
|
|
1573
|
+
}), g = F(
|
|
1540
1574
|
() => typeof t.alturaBarra == "number" ? `${t.alturaBarra}px` : t.alturaBarra
|
|
1541
|
-
),
|
|
1575
|
+
), b = F(
|
|
1542
1576
|
() => typeof t.raioBarra == "number" ? `${t.raioBarra}px` : t.raioBarra
|
|
1543
|
-
),
|
|
1544
|
-
const
|
|
1577
|
+
), m = F(() => p.value.length ? p.value.reduce((h, A) => h + A.percentual, 0) / p.value.length : 0), k = F(() => p.value.every((h) => h.reducao)), M = F(() => {
|
|
1578
|
+
const h = Math.min(m.value, 100), A = Math.max(0, 100 - h), i = k.value ? t.corExcesso : t.corDetalhes;
|
|
1545
1579
|
return {
|
|
1546
1580
|
labels: ["Progresso", "Restante"],
|
|
1547
1581
|
datasets: [
|
|
1548
1582
|
{
|
|
1549
|
-
data: [
|
|
1583
|
+
data: [h, A],
|
|
1550
1584
|
backgroundColor: [i, D(a.value.muted, 0.15)],
|
|
1551
1585
|
borderWidth: 0,
|
|
1552
1586
|
borderColor: "transparent",
|
|
@@ -1567,15 +1601,15 @@ const Lt = { class: "card-linhas__header nc-flex nc-flex-column" }, zt = { class
|
|
|
1567
1601
|
tooltip: { enabled: !1 }
|
|
1568
1602
|
}
|
|
1569
1603
|
}));
|
|
1570
|
-
function s(
|
|
1571
|
-
const
|
|
1572
|
-
if (!
|
|
1573
|
-
getComputedStyle(
|
|
1574
|
-
const i = pe(
|
|
1604
|
+
function s(h) {
|
|
1605
|
+
const A = f.value;
|
|
1606
|
+
if (!A) return;
|
|
1607
|
+
getComputedStyle(A).position === "static" && (A.style.position = "relative");
|
|
1608
|
+
const i = pe(A);
|
|
1575
1609
|
i.style.whiteSpace = "normal";
|
|
1576
|
-
const
|
|
1577
|
-
|
|
1578
|
-
const T =
|
|
1610
|
+
const R = i.querySelector(".nc-tt__content");
|
|
1611
|
+
R.innerHTML = '<span style="font-size:11px;color:#0F172A;display:block;max-width:140px;line-height:1.5;"><strong>Modo Redução</strong>: o progresso aumenta conforme o valor diminui</span>', i.style.opacity = "1", i.style.visibility = "hidden", i.style.left = "0px", i.style.top = "0px";
|
|
1612
|
+
const T = h.currentTarget.getBoundingClientRect(), w = A.getBoundingClientRect(), L = T.left - w.left + T.width / 2, H = T.top - w.top;
|
|
1579
1613
|
i.style.transform = "translate(-50%, calc(-100% - 8px))";
|
|
1580
1614
|
const N = i.querySelector(".nc-tt__caret");
|
|
1581
1615
|
N && Object.assign(N.style, {
|
|
@@ -1585,164 +1619,164 @@ const Lt = { class: "card-linhas__header nc-flex nc-flex-column" }, zt = { class
|
|
|
1585
1619
|
borderTop: "",
|
|
1586
1620
|
borderRight: "1px solid rgba(15,23,42,.06)",
|
|
1587
1621
|
borderBottom: "1px solid rgba(15,23,42,.06)"
|
|
1588
|
-
}), i.style.left =
|
|
1622
|
+
}), i.style.left = L + "px", i.style.top = H + "px", i.style.visibility = "visible";
|
|
1589
1623
|
}
|
|
1590
|
-
function
|
|
1591
|
-
var
|
|
1592
|
-
const
|
|
1593
|
-
|
|
1624
|
+
function $() {
|
|
1625
|
+
var A;
|
|
1626
|
+
const h = (A = f.value) == null ? void 0 : A.querySelector(".nc-tt");
|
|
1627
|
+
h && (h.style.opacity = "0");
|
|
1594
1628
|
}
|
|
1595
|
-
return (
|
|
1629
|
+
return (h, A) => (v(), x("div", {
|
|
1596
1630
|
ref_key: "cardRef",
|
|
1597
|
-
ref:
|
|
1598
|
-
class:
|
|
1599
|
-
style: q(
|
|
1631
|
+
ref: f,
|
|
1632
|
+
class: J(["card-progresso nc-p-4 nc-flex nc-flex-column", d.value]),
|
|
1633
|
+
style: q(y(u))
|
|
1600
1634
|
}, [
|
|
1601
|
-
P(
|
|
1635
|
+
P(ee, {
|
|
1602
1636
|
class: "card-progresso__topo",
|
|
1603
|
-
legenda:
|
|
1604
|
-
sublegenda:
|
|
1605
|
-
palette:
|
|
1606
|
-
"texto-botao":
|
|
1607
|
-
"botao-visivel":
|
|
1608
|
-
exportar:
|
|
1609
|
-
onBotaoAcao:
|
|
1610
|
-
onExportar:
|
|
1611
|
-
},
|
|
1612
|
-
|
|
1637
|
+
legenda: h.legenda,
|
|
1638
|
+
sublegenda: h.sublegenda,
|
|
1639
|
+
palette: y(a),
|
|
1640
|
+
"texto-botao": h.textoBotao,
|
|
1641
|
+
"botao-visivel": h.botaoVisivel,
|
|
1642
|
+
exportar: h.exportar,
|
|
1643
|
+
onBotaoAcao: A[0] || (A[0] = (i) => n("botaoAcao")),
|
|
1644
|
+
onExportar: y(C)
|
|
1645
|
+
}, Y({ _: 2 }, [
|
|
1646
|
+
h.$slots.legenda ? {
|
|
1613
1647
|
name: "legenda",
|
|
1614
1648
|
fn: z(() => [
|
|
1615
|
-
|
|
1649
|
+
S(h.$slots, "legenda", {}, void 0, !0)
|
|
1616
1650
|
]),
|
|
1617
1651
|
key: "0"
|
|
1618
1652
|
} : void 0,
|
|
1619
|
-
|
|
1653
|
+
h.$slots.sublegenda ? {
|
|
1620
1654
|
name: "sublegenda",
|
|
1621
1655
|
fn: z(() => [
|
|
1622
|
-
|
|
1656
|
+
S(h.$slots, "sublegenda", {}, void 0, !0)
|
|
1623
1657
|
]),
|
|
1624
1658
|
key: "1"
|
|
1625
1659
|
} : void 0,
|
|
1626
|
-
|
|
1660
|
+
h.$slots.actions ? {
|
|
1627
1661
|
name: "actions",
|
|
1628
1662
|
fn: z(() => [
|
|
1629
|
-
|
|
1663
|
+
S(h.$slots, "actions", {}, void 0, !0)
|
|
1630
1664
|
]),
|
|
1631
1665
|
key: "2"
|
|
1632
1666
|
} : void 0
|
|
1633
1667
|
]), 1032, ["legenda", "sublegenda", "palette", "texto-botao", "botao-visivel", "exportar", "onExportar"]),
|
|
1634
|
-
|
|
1668
|
+
h.$slots.titulo || h.titulo || h.$slots.descricao || h.descricao ? (v(), re(ue, {
|
|
1635
1669
|
key: 0,
|
|
1636
1670
|
class: "card-progresso__titulos nc-mt-3 nc-mb-2",
|
|
1637
|
-
titulo:
|
|
1638
|
-
descricao:
|
|
1639
|
-
palette:
|
|
1640
|
-
},
|
|
1641
|
-
|
|
1671
|
+
titulo: h.titulo,
|
|
1672
|
+
descricao: h.descricao,
|
|
1673
|
+
palette: y(a)
|
|
1674
|
+
}, Y({ _: 2 }, [
|
|
1675
|
+
h.$slots.titulo ? {
|
|
1642
1676
|
name: "titulo",
|
|
1643
1677
|
fn: z(() => [
|
|
1644
|
-
|
|
1678
|
+
S(h.$slots, "titulo", {}, void 0, !0)
|
|
1645
1679
|
]),
|
|
1646
1680
|
key: "0"
|
|
1647
1681
|
} : void 0,
|
|
1648
|
-
|
|
1682
|
+
h.$slots.descricao ? {
|
|
1649
1683
|
name: "descricao",
|
|
1650
1684
|
fn: z(() => [
|
|
1651
|
-
|
|
1685
|
+
S(h.$slots, "descricao", {}, void 0, !0)
|
|
1652
1686
|
]),
|
|
1653
1687
|
key: "1"
|
|
1654
1688
|
} : void 0
|
|
1655
|
-
]), 1032, ["titulo", "descricao", "palette"])) :
|
|
1656
|
-
E("div",
|
|
1657
|
-
e.formato === "circular" ? (
|
|
1658
|
-
E("div",
|
|
1659
|
-
P(
|
|
1689
|
+
]), 1032, ["titulo", "descricao", "palette"])) : B("", !0),
|
|
1690
|
+
E("div", da, [
|
|
1691
|
+
e.formato === "circular" ? (v(), x("div", ua, [
|
|
1692
|
+
E("div", pa, [
|
|
1693
|
+
P(Q, {
|
|
1660
1694
|
type: "doughnut",
|
|
1661
1695
|
data: M.value,
|
|
1662
1696
|
options: o.value,
|
|
1663
1697
|
height: e.height
|
|
1664
1698
|
}, null, 8, ["data", "options", "height"]),
|
|
1665
|
-
E("div",
|
|
1699
|
+
E("div", fa, [
|
|
1666
1700
|
E("div", {
|
|
1667
1701
|
class: "nc-centro-titulo",
|
|
1668
|
-
style: q({ color:
|
|
1669
|
-
},
|
|
1702
|
+
style: q({ color: k.value ? t.corExcesso : y(a).text })
|
|
1703
|
+
}, I(Math.round(m.value)) + "% ", 5)
|
|
1670
1704
|
])
|
|
1671
1705
|
])
|
|
1672
|
-
])) :
|
|
1673
|
-
E("div",
|
|
1674
|
-
(
|
|
1675
|
-
key:
|
|
1706
|
+
])) : B("", !0),
|
|
1707
|
+
E("div", ga, [
|
|
1708
|
+
(v(!0), x(Me, null, De(p.value, (i, R) => (v(), x("div", {
|
|
1709
|
+
key: R,
|
|
1676
1710
|
class: "card-progresso__item nc-flex nc-flex-column"
|
|
1677
1711
|
}, [
|
|
1678
|
-
E("div",
|
|
1712
|
+
E("div", ma, [
|
|
1679
1713
|
E("span", {
|
|
1680
1714
|
class: "card-progresso__item-rotulo nc-inline-flex nc-align-items-center nc-gap-2",
|
|
1681
|
-
style: q({ color:
|
|
1715
|
+
style: q({ color: y(a).text })
|
|
1682
1716
|
}, [
|
|
1683
1717
|
E("span", {
|
|
1684
1718
|
class: "nc-bolinha",
|
|
1685
1719
|
style: q({ background: i.cor })
|
|
1686
1720
|
}, null, 4),
|
|
1687
|
-
E("span", null,
|
|
1688
|
-
i.reducao ? (
|
|
1721
|
+
E("span", null, I(i.rotulo), 1),
|
|
1722
|
+
i.reducao ? (v(), x("span", {
|
|
1689
1723
|
key: 0,
|
|
1690
1724
|
class: "card-progresso__item-modo",
|
|
1691
|
-
style: q({ color:
|
|
1725
|
+
style: q({ color: y(a).muted }),
|
|
1692
1726
|
onMouseenter: s,
|
|
1693
|
-
onMouseleave:
|
|
1694
|
-
}, "↓", 36)) :
|
|
1727
|
+
onMouseleave: $
|
|
1728
|
+
}, "↓", 36)) : B("", !0)
|
|
1695
1729
|
], 4),
|
|
1696
|
-
e.mostrarValor || e.mostrarPercentual ? (
|
|
1697
|
-
e.mostrarValor ? (
|
|
1730
|
+
e.mostrarValor || e.mostrarPercentual ? (v(), x("span", ha, [
|
|
1731
|
+
e.mostrarValor ? (v(), x("span", {
|
|
1698
1732
|
key: 0,
|
|
1699
1733
|
class: "card-progresso__item-nums",
|
|
1700
|
-
style: q({ color:
|
|
1734
|
+
style: q({ color: y(a).muted })
|
|
1701
1735
|
}, [
|
|
1702
|
-
j(
|
|
1703
|
-
i.meta ? (
|
|
1704
|
-
], 4)) :
|
|
1705
|
-
e.mostrarPercentual ? (
|
|
1736
|
+
j(I(y(c)(i.quantidade)), 1),
|
|
1737
|
+
i.meta ? (v(), x("span", ya, " / " + I(y(c)(i.meta)), 1)) : B("", !0)
|
|
1738
|
+
], 4)) : B("", !0),
|
|
1739
|
+
e.mostrarPercentual ? (v(), x("span", {
|
|
1706
1740
|
key: 1,
|
|
1707
1741
|
class: "card-progresso__item-pct",
|
|
1708
|
-
style: q({ background:
|
|
1709
|
-
},
|
|
1710
|
-
])) :
|
|
1742
|
+
style: q({ background: y(D)(i.cor, 0.12), color: i.cor })
|
|
1743
|
+
}, I(Math.round(i.percentual)) + "% ", 5)) : B("", !0)
|
|
1744
|
+
])) : B("", !0)
|
|
1711
1745
|
]),
|
|
1712
1746
|
E("div", {
|
|
1713
1747
|
class: "card-progresso__trilha nc-w-full",
|
|
1714
1748
|
style: q({
|
|
1715
|
-
height:
|
|
1716
|
-
borderRadius:
|
|
1717
|
-
background: i.reducao ?
|
|
1749
|
+
height: g.value,
|
|
1750
|
+
borderRadius: b.value,
|
|
1751
|
+
background: i.reducao ? y(D)(t.corExcesso, 0.18) : y(D)(y(a).muted, 0.15)
|
|
1718
1752
|
})
|
|
1719
1753
|
}, [
|
|
1720
1754
|
E("div", {
|
|
1721
1755
|
class: "card-progresso__preenchimento",
|
|
1722
|
-
style: q({ width: i.percentual + "%", background: i.cor, borderRadius:
|
|
1756
|
+
style: q({ width: i.percentual + "%", background: i.cor, borderRadius: b.value })
|
|
1723
1757
|
}, null, 4)
|
|
1724
1758
|
], 4)
|
|
1725
1759
|
]))), 128))
|
|
1726
1760
|
])
|
|
1727
1761
|
]),
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
])) :
|
|
1762
|
+
h.$slots.footer ? (v(), x("div", va, [
|
|
1763
|
+
S(h.$slots, "footer", {}, void 0, !0)
|
|
1764
|
+
])) : B("", !0)
|
|
1731
1765
|
], 6));
|
|
1732
1766
|
}
|
|
1733
|
-
},
|
|
1767
|
+
}, xa = /* @__PURE__ */ W(ba, [["__scopeId", "data-v-8002d271"]]), $a = {
|
|
1734
1768
|
key: 0,
|
|
1735
1769
|
class: "card-base__topo"
|
|
1736
|
-
},
|
|
1770
|
+
}, Ca = ["innerHTML"], ka = { class: "card-base__legendas nc-flex nc-flex-column" }, Sa = {
|
|
1737
1771
|
key: 1,
|
|
1738
1772
|
class: "card-base__titulos nc-flex nc-flex-column"
|
|
1739
|
-
},
|
|
1773
|
+
}, Aa = {
|
|
1740
1774
|
key: 2,
|
|
1741
1775
|
class: "card-base__acao nc-flex"
|
|
1742
|
-
},
|
|
1776
|
+
}, Ba = {
|
|
1743
1777
|
key: 3,
|
|
1744
1778
|
class: "card-base__footer"
|
|
1745
|
-
},
|
|
1779
|
+
}, Ra = {
|
|
1746
1780
|
__name: "CardBase",
|
|
1747
1781
|
props: {
|
|
1748
1782
|
...Z({
|
|
@@ -1759,122 +1793,122 @@ const Lt = { class: "card-linhas__header nc-flex nc-flex-column" }, zt = { class
|
|
|
1759
1793
|
},
|
|
1760
1794
|
emits: ["botaoAcao", "exportado"],
|
|
1761
1795
|
setup(e, { emit: r }) {
|
|
1762
|
-
const t = e, n = r, { palette: a, cardStyle: u } = G(t), { cardRef: c, onExportar:
|
|
1796
|
+
const t = e, n = r, { palette: a, cardStyle: u } = G(t), { cardRef: c, onExportar: f, iconeExportar: C } = K(t, a, n);
|
|
1763
1797
|
function l() {
|
|
1764
1798
|
n("botaoAcao");
|
|
1765
1799
|
}
|
|
1766
|
-
return (d,
|
|
1800
|
+
return (d, p) => (v(), x("div", {
|
|
1767
1801
|
ref_key: "cardRef",
|
|
1768
1802
|
ref: c,
|
|
1769
|
-
class:
|
|
1770
|
-
style: q(
|
|
1803
|
+
class: J(["card-base nc-flex nc-flex-column", `card-base--${e.alinhamento}`]),
|
|
1804
|
+
style: q(y(u))
|
|
1771
1805
|
}, [
|
|
1772
|
-
d.exportar ? (
|
|
1806
|
+
d.exportar ? (v(), x("div", $a, [
|
|
1773
1807
|
E("button", {
|
|
1774
1808
|
type: "button",
|
|
1775
1809
|
class: "nc-exportar card-base__exportar nc-inline-flex nc-align-items-center nc-justify-content-center",
|
|
1776
|
-
style: q({ color:
|
|
1810
|
+
style: q({ color: y(a).muted, borderColor: y(D)(y(a).text === "inherit" ? "#0F172A" : y(a).text, 0.18) }),
|
|
1777
1811
|
title: "Exportar como imagem",
|
|
1778
1812
|
"aria-label": "Exportar como imagem",
|
|
1779
|
-
onClick:
|
|
1780
|
-
innerHTML:
|
|
1781
|
-
}, null, 12,
|
|
1782
|
-
])) :
|
|
1783
|
-
E("div",
|
|
1784
|
-
d.$slots.legenda || d.legenda ? (
|
|
1813
|
+
onClick: p[0] || (p[0] = (...g) => y(f) && y(f)(...g)),
|
|
1814
|
+
innerHTML: y(C)
|
|
1815
|
+
}, null, 12, Ca)
|
|
1816
|
+
])) : B("", !0),
|
|
1817
|
+
E("div", ka, [
|
|
1818
|
+
d.$slots.legenda || d.legenda ? (v(), x("div", {
|
|
1785
1819
|
key: 0,
|
|
1786
1820
|
class: "card-base__legenda nc-font-medium nc-text-xs",
|
|
1787
|
-
style: q({ color:
|
|
1821
|
+
style: q({ color: y(a).text })
|
|
1788
1822
|
}, [
|
|
1789
|
-
|
|
1790
|
-
j(
|
|
1823
|
+
S(d.$slots, "legenda", {}, () => [
|
|
1824
|
+
j(I(d.legenda), 1)
|
|
1791
1825
|
], !0)
|
|
1792
|
-
], 4)) :
|
|
1793
|
-
d.$slots.sublegenda || d.sublegenda ? (
|
|
1826
|
+
], 4)) : B("", !0),
|
|
1827
|
+
d.$slots.sublegenda || d.sublegenda ? (v(), x("div", {
|
|
1794
1828
|
key: 1,
|
|
1795
1829
|
class: "card-base__sublegenda nc-text-xs",
|
|
1796
|
-
style: q({ color:
|
|
1830
|
+
style: q({ color: y(a).muted })
|
|
1797
1831
|
}, [
|
|
1798
|
-
|
|
1799
|
-
j(
|
|
1832
|
+
S(d.$slots, "sublegenda", {}, () => [
|
|
1833
|
+
j(I(d.sublegenda), 1)
|
|
1800
1834
|
], !0)
|
|
1801
|
-
], 4)) :
|
|
1835
|
+
], 4)) : B("", !0)
|
|
1802
1836
|
]),
|
|
1803
|
-
d.$slots.titulo || d.titulo || d.$slots.descricao || d.descricao ? (
|
|
1804
|
-
d.$slots.titulo || d.titulo ? (
|
|
1837
|
+
d.$slots.titulo || d.titulo || d.$slots.descricao || d.descricao ? (v(), x("div", Sa, [
|
|
1838
|
+
d.$slots.titulo || d.titulo ? (v(), x("div", {
|
|
1805
1839
|
key: 0,
|
|
1806
1840
|
class: "card-base__titulo nc-m-0 nc-text-3xl nc-font-semibold",
|
|
1807
|
-
style: q({ color:
|
|
1841
|
+
style: q({ color: y(a).text, lineHeight: "33px", letterSpacing: "-1px" })
|
|
1808
1842
|
}, [
|
|
1809
|
-
|
|
1810
|
-
j(
|
|
1843
|
+
S(d.$slots, "titulo", {}, () => [
|
|
1844
|
+
j(I(d.titulo), 1)
|
|
1811
1845
|
], !0)
|
|
1812
|
-
], 4)) :
|
|
1813
|
-
d.$slots.descricao || d.descricao ? (
|
|
1846
|
+
], 4)) : B("", !0),
|
|
1847
|
+
d.$slots.descricao || d.descricao ? (v(), x("div", {
|
|
1814
1848
|
key: 1,
|
|
1815
1849
|
class: "nc-text-sm",
|
|
1816
|
-
style: q({ color:
|
|
1850
|
+
style: q({ color: y(a).muted })
|
|
1817
1851
|
}, [
|
|
1818
|
-
|
|
1819
|
-
j(
|
|
1852
|
+
S(d.$slots, "descricao", {}, () => [
|
|
1853
|
+
j(I(d.descricao), 1)
|
|
1820
1854
|
], !0)
|
|
1821
|
-
], 4)) :
|
|
1822
|
-
])) :
|
|
1823
|
-
d.$slots.acao || d.botaoVisivel ? (
|
|
1824
|
-
|
|
1825
|
-
d.botaoVisivel ? (
|
|
1855
|
+
], 4)) : B("", !0)
|
|
1856
|
+
])) : B("", !0),
|
|
1857
|
+
d.$slots.acao || d.botaoVisivel ? (v(), x("div", Aa, [
|
|
1858
|
+
S(d.$slots, "acao", {}, () => [
|
|
1859
|
+
d.botaoVisivel ? (v(), x("button", {
|
|
1826
1860
|
key: 0,
|
|
1827
1861
|
type: "button",
|
|
1828
1862
|
class: "card-base__link nc-text-xs nc-inline-flex nc-align-items-center",
|
|
1829
|
-
style: q({ color:
|
|
1863
|
+
style: q({ color: y(a).text }),
|
|
1830
1864
|
onClick: l
|
|
1831
1865
|
}, [
|
|
1832
|
-
E("span", null,
|
|
1833
|
-
|
|
1866
|
+
E("span", null, I(d.textoBotao), 1),
|
|
1867
|
+
p[1] || (p[1] = E("span", {
|
|
1834
1868
|
class: "card-base__chevron",
|
|
1835
1869
|
"aria-hidden": "true"
|
|
1836
1870
|
}, "›", -1))
|
|
1837
|
-
], 4)) :
|
|
1871
|
+
], 4)) : B("", !0)
|
|
1838
1872
|
], !0)
|
|
1839
|
-
])) :
|
|
1840
|
-
d.$slots.footer ? (
|
|
1841
|
-
|
|
1842
|
-
])) :
|
|
1873
|
+
])) : B("", !0),
|
|
1874
|
+
d.$slots.footer ? (v(), x("div", Ba, [
|
|
1875
|
+
S(d.$slots, "footer", {}, void 0, !0)
|
|
1876
|
+
])) : B("", !0)
|
|
1843
1877
|
], 6));
|
|
1844
1878
|
}
|
|
1845
|
-
},
|
|
1879
|
+
}, qa = /* @__PURE__ */ W(Ra, [["__scopeId", "data-v-6fe4b0aa"]]), Ea = {
|
|
1846
1880
|
install(e) {
|
|
1847
|
-
e.component("ChartBase",
|
|
1881
|
+
e.component("ChartBase", Q), e.component("CardBase", qa), e.component("CardLinhas", Ot), e.component("CardPizza", Kt), e.component("CardBarra", aa), e.component("CardPolar", ca), e.component("CardProgresso", xa);
|
|
1848
1882
|
}
|
|
1849
1883
|
};
|
|
1850
1884
|
export {
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
|
|
1885
|
+
aa as CardBarra,
|
|
1886
|
+
qa as CardBase,
|
|
1887
|
+
Ot as CardLinhas,
|
|
1888
|
+
Kt as CardPizza,
|
|
1889
|
+
ca as CardPolar,
|
|
1890
|
+
xa as CardProgresso,
|
|
1891
|
+
Q as ChartBase,
|
|
1858
1892
|
Ne as ICONE_EXPORTAR_SVG,
|
|
1859
1893
|
It as SOMBRA_PADRAO,
|
|
1860
1894
|
je as aplicarCaretFlip,
|
|
1861
1895
|
ge as clampHorizontal,
|
|
1862
1896
|
pe as criarTooltipEl,
|
|
1863
1897
|
ye as criarTooltipExternoPadrao,
|
|
1864
|
-
|
|
1865
|
-
|
|
1898
|
+
Ea as default,
|
|
1899
|
+
At as exportarElementoComoImagem,
|
|
1866
1900
|
de as gerarPaleta,
|
|
1867
1901
|
fe as prepararTooltipParent,
|
|
1868
1902
|
Z as propsCartao,
|
|
1869
|
-
|
|
1903
|
+
oe as propsDirecao,
|
|
1870
1904
|
Ve as propsTabela,
|
|
1871
|
-
|
|
1905
|
+
ae as propsValor,
|
|
1872
1906
|
D as toRgba,
|
|
1873
1907
|
Oe as ttLinhaTexto,
|
|
1874
1908
|
he as ttLinhaValor,
|
|
1875
1909
|
me as ttTitulo,
|
|
1876
1910
|
K as useExportarCard,
|
|
1877
|
-
|
|
1911
|
+
te as useFormatadorValor,
|
|
1878
1912
|
Pe as useLinhasReferencia,
|
|
1879
1913
|
G as useTema
|
|
1880
1914
|
};
|