vue-data-ui 2.2.92 → 2.2.93

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/dist/index-DZlxUin4.js +57288 -0
  2. package/dist/{index.es-Dc9Fd4o6.js → index.es-Cgqo-FBk.js} +1 -1
  3. package/dist/style.css +1 -1
  4. package/dist/vue-data-ui.js +61 -455
  5. package/package.json +1 -1
  6. package/dist/data-table-d-VcuH-r.js +0 -1488
  7. package/dist/legend-DJCYLsl_.js +0 -61
  8. package/dist/themes-lgjsYHsH.js +0 -4967
  9. package/dist/title-BF-9Qcni.js +0 -56
  10. package/dist/tooltip-D85WEOKi.js +0 -94
  11. package/dist/user-options-DZgCz8UA.js +0 -415
  12. package/dist/vue-ui-3d-bar-DW7kGJSz.js +0 -20360
  13. package/dist/vue-ui-age-pyramid-4hcuKpFY.js +0 -781
  14. package/dist/vue-ui-annotator-C83FVvl8.js +0 -2175
  15. package/dist/vue-ui-candlestick-diclGj95.js +0 -807
  16. package/dist/vue-ui-chestnut-ACetHLdG.js +0 -1049
  17. package/dist/vue-ui-cursor-Rx7UNaYT.js +0 -229
  18. package/dist/vue-ui-dashboard-B3PlN0ks.js +0 -231
  19. package/dist/vue-ui-digits-CxMXID42.js +0 -154
  20. package/dist/vue-ui-donut-DMiwVXNd.js +0 -1534
  21. package/dist/vue-ui-dumbbell-B_X1T8TR.js +0 -621
  22. package/dist/vue-ui-flow-B72wzQ6V.js +0 -451
  23. package/dist/vue-ui-galaxy-DXX5yivT.js +0 -482
  24. package/dist/vue-ui-gauge-Cs9PDurH.js +0 -466
  25. package/dist/vue-ui-heatmap-PcoNSLdN.js +0 -581
  26. package/dist/vue-ui-kpi-DchEmPtB.js +0 -55
  27. package/dist/vue-ui-mini-loader-DltJLkqy.js +0 -131
  28. package/dist/vue-ui-molecule-CWvukBzs.js +0 -746
  29. package/dist/vue-ui-mood-radar-DEfdtIi8.js +0 -544
  30. package/dist/vue-ui-nested-donuts-9URpqgXE.js +0 -768
  31. package/dist/vue-ui-onion-C0eowUT6.js +0 -551
  32. package/dist/vue-ui-parallel-coordinate-plot-Bc_pAaPJ.js +0 -647
  33. package/dist/vue-ui-quadrant-_ddVAm9V.js +0 -1174
  34. package/dist/vue-ui-quick-chart-Cio0hDYO.js +0 -1310
  35. package/dist/vue-ui-radar-Dyg38i33.js +0 -853
  36. package/dist/vue-ui-rating-CE1Lmwd2.js +0 -271
  37. package/dist/vue-ui-relation-circle-BMlB3k3d.js +0 -303
  38. package/dist/vue-ui-rings-BuXeijvb.js +0 -507
  39. package/dist/vue-ui-scatter-B1hZfOua.js +0 -870
  40. package/dist/vue-ui-screenshot-0QXgxzGs.js +0 -160
  41. package/dist/vue-ui-smiley-B7kR7exr.js +0 -763
  42. package/dist/vue-ui-spark-trend-BmL2KiYL.js +0 -245
  43. package/dist/vue-ui-sparkgauge-BMzFv14L.js +0 -158
  44. package/dist/vue-ui-sparkhistogram-DWpOXqHm.js +0 -243
  45. package/dist/vue-ui-sparkstackbar-DB9VQXlc.js +0 -244
  46. package/dist/vue-ui-strip-plot-DyN6P0JO.js +0 -614
  47. package/dist/vue-ui-table-DM3zL89q.js +0 -2180
  48. package/dist/vue-ui-table-heatmap-gWx0Nslu.js +0 -237
  49. package/dist/vue-ui-thermometer-Bcqv5kd_.js +0 -384
  50. package/dist/vue-ui-timer-BIFxjujK.js +0 -451
  51. package/dist/vue-ui-tiremarks-zBwHpED_.js +0 -248
  52. package/dist/vue-ui-treemap-BaplVc_z.js +0 -719
  53. package/dist/vue-ui-vertical-bar-CdK6ZJPM.js +0 -734
  54. package/dist/vue-ui-waffle-COOzH7M3.js +0 -635
  55. package/dist/vue-ui-wheel-BEpuVTBk.js +0 -226
  56. package/dist/vue-ui-word-cloud-DNqxAAiX.js +0 -344
  57. package/dist/vue-ui-xy-_mHq-czW.js +0 -2058
  58. package/dist/vue-ui-xy-canvas-DqX8Gee5.js +0 -1003
@@ -1,734 +0,0 @@
1
- import { useCssVars as De, computed as f, ref as v, onMounted as Re, onBeforeUnmount as Me, openBlock as d, createElementBlock as h, normalizeClass as S, normalizeStyle as i, createVNode as D, createCommentVNode as b, createBlock as J, unref as T, createSlots as Ae, withCtx as m, renderSlot as x, normalizeProps as Q, guardReactiveProps as Y, createElementVNode as o, toDisplayString as u, Fragment as R, renderList as M, withKeys as Ue, createTextVNode as Xe } from "vue";
2
- import { _ as Ee, e as Ge, f as He, p as V, g as je, i as be, j as Z, h as ee, X as We, x as Ke, o as te, B as qe, y as Je, z as Qe, n as Ye, v as Ze, w as et } from "./data-table-d-VcuH-r.js";
3
- import { t as tt, u as lt } from "./vue-ui-age-pyramid-4hcuKpFY.js";
4
- import { t as at } from "./themes-lgjsYHsH.js";
5
- import { u as me, _ as ot } from "./title-BF-9Qcni.js";
6
- import { U as nt } from "./user-options-DZgCz8UA.js";
7
- import { _ as ut } from "./tooltip-D85WEOKi.js";
8
- import { L as _e } from "./legend-DJCYLsl_.js";
9
- import { u as rt, a as st, S as it, A as dt } from "./vue-ui-3d-bar-DW7kGJSz.js";
10
- const ct = ["id"], vt = ["onClick"], ht = ["xmlns", "viewBox"], pt = ["id"], gt = ["stop-color"], yt = ["stop-color"], ft = ["x", "y", "width", "height", "fill", "rx"], bt = ["x", "y", "width", "height", "fill", "rx", "stroke", "stroke-width"], mt = ["x2", "y1", "y2", "stroke", "stroke-width"], _t = ["x", "y", "font-size", "fill", "font-weight"], xt = ["x", "y", "font-size", "fill", "font-weight"], $t = ["x", "y", "font-size", "fill", "font-weight"], kt = ["x", "y", "font-size", "fill", "font-weight"], Ct = ["y", "width", "height", "fill", "onMouseenter"], wt = ["onClick"], Tt = { style: "width:100%;padding-top: 36px;position:relative" }, Nt = { class: "vue-ui-data-table" }, Lt = { key: 0 }, Pt = { style: { width: "100%" } }, Vt = ["data-cell"], St = { style: { display: "flex", "align-items": "center", gap: "5px", "justify-content": "flex-end", width: "100%", "padding-right": "3px" } }, Ft = ["data-cell"], zt = { style: { display: "flex", "align-items": "center", gap: "5px", "justify-content": "flex-end", width: "100%", "padding-right": "3px" } }, Bt = ["data-cell"], It = { style: { display: "flex", "align-items": "center", gap: "5px", "justify-content": "flex-end", width: "100%", "padding-right": "3px" } }, Ot = ["data-cell"], Dt = { style: { display: "flex", "align-items": "center", gap: "5px", "justify-content": "flex-end", width: "100%", "padding-right": "3px" } }, Rt = ["data-cell"], Mt = { style: { display: "flex", "align-items": "center", gap: "5px", "justify-content": "flex-end", width: "100%", "padding-right": "3px" } }, At = ["data-cell"], Ut = { style: { display: "flex", "align-items": "center", gap: "5px", "justify-content": "flex-end", width: "100%", "padding-right": "3px" } }, Xt = ["data-cell"], Et = { style: { display: "flex", "align-items": "center", gap: "5px", "justify-content": "flex-end", width: "100%", "padding-right": "3px" } }, Gt = {
11
- __name: "vue-ui-vertical-bar",
12
- props: {
13
- config: {
14
- type: Object,
15
- default() {
16
- return {};
17
- }
18
- },
19
- dataset: {
20
- type: Array,
21
- default() {
22
- return [];
23
- }
24
- }
25
- },
26
- emits: ["selectLegend"],
27
- setup(xe, { expose: $e, emit: ke }) {
28
- const w = xe;
29
- De((t) => ({
30
- "7410f552": t.tdo
31
- }));
32
- const { vue_ui_vertical_bar: Ce } = rt(), A = f(() => !!w.dataset && w.dataset.length), N = v(Ge()), we = v(null), G = v(!1), H = v(""), U = v(0), Te = v(null), le = v(0), F = v(null), ae = v(null), j = v(null), e = f(() => {
33
- const t = me({
34
- userConfig: w.config,
35
- defaultConfig: Ce
36
- });
37
- return t.theme ? {
38
- ...me({
39
- userConfig: at.vue_ui_vertical_bar[t.theme] || w.config,
40
- defaultConfig: t
41
- }),
42
- customPalette: He[t.theme] || V
43
- } : t;
44
- }), { isPrinting: Ne, isImaging: Le, generatePdf: oe, generateImage: ne } = st({
45
- elementId: `vue-ui-vertical-bar_${N.value}`,
46
- fileName: e.value.style.chart.title.text || "vue-ui-vertical-bar"
47
- }), ue = f(() => je(e.value.customPalette)), re = v(null), se = v(!1), Pe = f(() => e.value.table.responsiveBreakpoint), X = v(null);
48
- Re(() => {
49
- if (be(w.dataset) && Z({
50
- componentName: "VueUiVerticalBar",
51
- type: "dataset"
52
- }), U.value = w.dataset.flatMap((t) => t.children && t.children.length > 0 ? t.children.length : 1).reduce((t, a) => t + a, 0), Ve(), e.value.responsive) {
53
- const t = tt(() => {
54
- const { width: a, height: l } = lt({
55
- chart: F.value,
56
- title: e.value.style.chart.title.text ? ae.value : null,
57
- legend: e.value.style.chart.legend.show ? j.value : null
58
- });
59
- ce.value = a, c.value = l / U.value - g.value * 2;
60
- });
61
- X.value = new ResizeObserver(t), X.value.observe(F.value.parentNode);
62
- }
63
- }), Me(() => {
64
- X.value && X.value.disconnect();
65
- });
66
- function Ve() {
67
- new ResizeObserver((a) => {
68
- a.forEach((l) => {
69
- se.value = l.contentRect.width < Pe.value;
70
- });
71
- }).observe(re.value);
72
- }
73
- const _ = v({
74
- showTable: e.value.table.show,
75
- sortDesc: e.value.style.chart.layout.bars.sort === "desc",
76
- showTooltip: e.value.style.chart.tooltip.show
77
- }), ie = f(() => _.value.sortDesc), L = f(() => (w.dataset.forEach((t, a) => {
78
- t.children && (be(t.children) ? Z({
79
- componentName: "VueUiVerticalBar",
80
- type: "datasetAttributeEmpty",
81
- property: `children (index ${a})`
82
- }) : t.children.forEach((l, n) => {
83
- [null, void 0].includes(l.name) && Z({
84
- componentName: "VueUiVerticalBar",
85
- type: "datasetSerieAttribute",
86
- property: "name",
87
- key: "children",
88
- index: n
89
- });
90
- }));
91
- }), w.dataset.map((t, a) => {
92
- const l = `vertical_parent_${a}_${N.value}`, n = !!t.children && t.children.length > 0;
93
- return ![null, void 0].includes(t.value) && t.value < 0 && console.warn(`VueUiVerticalBar is not designed to graph negative values. ${t.name || "serie at index" + a} has the following value: ${t.value}`), {
94
- ...t,
95
- id: l,
96
- shape: "square",
97
- opacity: C.value.includes(l) ? 0.5 : 1,
98
- value: n ? t.children.map((r) => r.value || 0).reduce((r, s) => r + s, 0) : t.value || 0,
99
- hasChildren: n,
100
- isChild: !1,
101
- segregate: () => z(l),
102
- isSegregated: C.value.includes(l),
103
- color: ee(t.color) || ue.value[a] || V[a] || V[a % V.length],
104
- children: !t.children || !t.children.length ? [] : t.children.toSorted((r, s) => ie.value ? s.value - r.value : r.value - s.value).map((r, s) => (![null, void 0].includes(r.value) && r.value < 0 && console.warn(`VueUiVerticalBar is not designed to graph negative values. ${r.name + " child serie" || "child serie at index" + a + ", " + s} has the following value: ${r.value}`), {
105
- ...r,
106
- value: r.value || 0,
107
- isChild: !0,
108
- parentId: l,
109
- parentName: t.name,
110
- parentValue: t.value,
111
- id: `vertical_child_${a}_${s}_${N.value}`,
112
- childIndex: s,
113
- color: ee(r.color) || ee(t.color) || ue.value[a] || V[a] || V[a % V.length]
114
- })).map((r, s) => ({
115
- ...r,
116
- isFirstChild: s === 0,
117
- isLastChild: s === t.children.length - 1
118
- }))
119
- };
120
- }).toSorted((t, a) => ie.value ? a.value - t.value : t.value - a.value))), de = f(() => ({
121
- cy: "vertical-bar-div-legend",
122
- backgroundColor: e.value.style.chart.legend.backgroundColor,
123
- color: e.value.style.chart.legend.color,
124
- fontSize: e.value.style.chart.legend.fontSize,
125
- paddingBottom: 12,
126
- fontWeight: e.value.style.chart.legend.bold ? "bold" : ""
127
- })), c = v(e.value.style.chart.layout.bars.height), g = v(e.value.style.chart.layout.bars.gap), Se = f(() => (c.value + g.value) * U.value), ce = v(512), p = f(() => ({
128
- width: ce.value,
129
- height: Se.value,
130
- padding: {
131
- top: 12,
132
- left: 128 + e.value.style.chart.layout.bars.offsetX,
133
- right: 64 + e.value.style.chart.layout.bars.paddingRight,
134
- bottom: 12
135
- }
136
- })), y = f(() => ({
137
- fullHeight: p.value.padding.top + p.value.padding.bottom + p.value.height,
138
- top: p.value.padding.top,
139
- left: p.value.padding.left,
140
- right: p.value.width - p.value.padding.right,
141
- bottom: p.value.padding.top + p.value.height,
142
- width: p.value.width - (p.value.padding.left + p.value.padding.right)
143
- }));
144
- function W() {
145
- U.value = P.value.flatMap((t) => t.children && t.children.length > 0 ? t.children.length : 1).reduce((t, a) => t + a, 0);
146
- }
147
- const C = v([]);
148
- function z(t) {
149
- C.value.includes(t) ? C.value = C.value.filter((a) => a !== t) : C.value.push(t), W(), ke("selectLegend", P.value);
150
- }
151
- const P = f(() => L.value.filter((t) => !C.value.includes(t.id))), $ = f(() => P.value.map((t) => t.value).reduce((t, a) => t + a));
152
- function ve(t, a = !1, l = 0) {
153
- return a ? (t / $.value * 100).toFixed(l) + "%" : t / $.value;
154
- }
155
- const B = f(() => P.value.flatMap((t) => t.hasChildren ? t.children : t)), Fe = f(() => Math.max(...P.value.flatMap((t) => t.children && t.children.length ? Math.max(...t.children.map((a) => a.value)) : t.value)));
156
- function I(t) {
157
- const a = t / Fe.value;
158
- return y.value.width * a;
159
- }
160
- function ze(t) {
161
- return I(t) + y.value.left;
162
- }
163
- function E(t, a) {
164
- const l = P.value.find((s) => s.id === t.parentId), n = y.value.top + (g.value + c.value) * a, r = l.children.length * (g.value + c.value);
165
- return {
166
- y: n + r / 2 - e.value.style.chart.layout.bars.parentLabels.fontSize,
167
- name: l.name,
168
- value: [void 0, NaN, null].includes(l.value) ? "" : l.value.toFixed(e.value.style.chart.layout.bars.dataLabels.value.roundingValue),
169
- percentageToTotal: isNaN(l.value / $.value) ? "" : ve(l.value, !0, e.value.style.chart.layout.bars.dataLabels.percentage.roundingPercentage)
170
- };
171
- }
172
- function Be() {
173
- return P.value;
174
- }
175
- const K = v(null), q = v(null);
176
- function Ie(t, a) {
177
- q.value = {
178
- datapoint: t,
179
- seriesIndex: a,
180
- series: L.value,
181
- config: e.value
182
- }, G.value = !0, K.value = t.id;
183
- let l = "";
184
- const n = t.isChild ? t.parentName : t.name, r = t.isChild ? t.name : "", s = e.value.style.chart.tooltip.customFormat;
185
- Je(s) && Qe(() => s({
186
- datapoint: t,
187
- series: L.value,
188
- config: e.value,
189
- seriesIndex: a
190
- })) ? H.value = s({
191
- datapoint: t,
192
- series: L.value,
193
- config: e.value,
194
- seriesIndex: a
195
- }) : (l += `<div style="width:100%;text-align:center;border-bottom:1px solid ${e.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;text-align:left;">
196
- <div style="display:flex;align-items:center;gap:4px;"><svg viewBox="0 0 12 12" height="14" width="14"><rect x="0" y="0" height="12" width="12" rx="2" stroke="none" fill="${t.color}"/></svg> ${n}</div>
197
- ${r ? `<div>${r}</div>` : ""}
198
- </div>`, e.value.style.chart.tooltip.showValue && (l += `<div>${e.value.translations.value}: <b>${e.value.style.chart.tooltip.prefix}${[void 0, NaN, null].includes(t.value) ? "-" : t.value.toFixed(e.value.style.chart.tooltip.roundingValue)}${e.value.style.chart.tooltip.suffix}</b></div>`), e.value.style.chart.tooltip.showPercentage && (l += `<div>${e.value.translations.percentageToTotal} : <b>${isNaN(t.value / $.value) ? "-" : `${(t.value / $.value * 100).toFixed(e.value.style.chart.tooltip.roundingPercentage)}`}%</b></div>`, t.isChild && (l += `<div>${e.value.translations.percentageToSerie}: <b>${isNaN(t.value / t.parentValue) ? "-" : `${(t.value / t.parentValue * 100).toFixed(e.value.style.chart.tooltip.roundingPercentage)}`}%</b></div>`)), H.value = `<div style="text-align:left">${l}</div>`);
199
- }
200
- function he(t) {
201
- if (isNaN(t) || !e.value.style.chart.layout.bars.dataLabels.value.show)
202
- return "";
203
- const a = Ye({
204
- p: e.value.style.chart.layout.bars.dataLabels.value.prefix,
205
- v: t,
206
- s: e.value.style.chart.layout.bars.dataLabels.value.suffix,
207
- r: e.value.style.chart.layout.bars.dataLabels.value.roundingValue
208
- }), l = `(${ve(t, !0, e.value.style.chart.layout.bars.dataLabels.percentage.roundingPercentage)})`;
209
- return `${a}${e.value.style.chart.layout.bars.dataLabels.percentage.show ? ` ${l}` : ""}`;
210
- }
211
- const k = f(() => {
212
- const t = [
213
- e.value.translations.parentName,
214
- e.value.translations.value,
215
- e.value.translations.percentageToTotal,
216
- e.value.translations.childName,
217
- e.value.translations.value,
218
- e.value.translations.percentageToSerie,
219
- e.value.translations.percentageToTotal
220
- ], a = B.value.map((l) => l.isChild ? l.isFirstChild ? {
221
- color: l.color,
222
- parentName: l.parentName,
223
- parentValue: l.parentValue,
224
- percentageToTotal: l.parentValue / $.value,
225
- childName: l.name,
226
- childValue: l.value,
227
- childPercentageToParent: l.value / l.parentValue,
228
- childPercentageToTotal: l.value / $.value
229
- } : {
230
- color: "",
231
- parentName: "",
232
- parentValue: "",
233
- percentageToTotal: "",
234
- childName: l.name,
235
- childValue: l.value,
236
- childPercentageToParent: l.value / l.parentValue,
237
- childPercentageToTotal: l.value / $.value
238
- } : {
239
- color: l.color,
240
- parentName: l.name,
241
- parentValue: l.value,
242
- percentageToTotal: l.value / $.value,
243
- childName: "",
244
- childValue: "",
245
- childPercentageToParent: "",
246
- childPercentageToTotal: ""
247
- });
248
- return { head: t, body: a };
249
- });
250
- function pe() {
251
- const t = [[e.value.style.chart.title.text], [e.value.style.chart.title.subtitle.text], [""]], a = k.value.head, l = k.value.body.map((s) => [
252
- s.parentName,
253
- s.parentValue,
254
- s.percentageToTotal,
255
- s.childName,
256
- s.childValue,
257
- s.childPercentageToParent,
258
- s.childPercentageToTotal
259
- ]), n = t.concat([a]).concat(l), r = Ze(n);
260
- et({ csvContent: r, title: e.value.style.chart.title.text || "vue-ui-vertical-bar" });
261
- }
262
- const O = v(!1);
263
- function Oe(t) {
264
- O.value = t, le.value += 1;
265
- }
266
- function ge() {
267
- _.value.showTable = !_.value.showTable;
268
- }
269
- function ye() {
270
- _.value.sortDesc = !_.value.sortDesc, W();
271
- }
272
- function fe() {
273
- _.value.showTooltip = !_.value.showTooltip;
274
- }
275
- return $e({
276
- getData: Be,
277
- recalculateHeight: W,
278
- generatePdf: oe,
279
- generateCsv: pe,
280
- generateImage: ne,
281
- toggleTable: ge,
282
- toggleSort: ye,
283
- toggleTooltip: fe
284
- }), (t, a) => (d(), h("div", {
285
- class: S(`vue-ui-vertical-bar ${O.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${e.value.useCssAnimation ? "" : "vue-ui-dna"}`),
286
- ref_key: "verticalBarChart",
287
- ref: F,
288
- id: `vue-ui-vertical-bar_${N.value}`,
289
- style: i(`font-family:${e.value.style.fontFamily};width:100%; text-align:center;${e.value.style.chart.title.text ? "" : "padding-top:36px"};background:${e.value.style.chart.backgroundColor};${e.value.responsive ? "height: 100%" : ""}`)
290
- }, [
291
- e.value.style.chart.title.text ? (d(), h("div", {
292
- key: 0,
293
- ref_key: "chartTitle",
294
- ref: ae,
295
- style: i(`width:100%;background:${e.value.style.chart.backgroundColor};padding-bottom:12px`)
296
- }, [
297
- D(ot, {
298
- config: {
299
- title: {
300
- cy: "vertical-bar-div-title",
301
- ...e.value.style.chart.title
302
- },
303
- subtitle: {
304
- cy: "vertical-bar-div-subtitle",
305
- ...e.value.style.chart.title.subtitle
306
- }
307
- }
308
- }, null, 8, ["config"])
309
- ], 4)) : b("", !0),
310
- e.value.userOptions.show && A.value ? (d(), J(nt, {
311
- ref_key: "details",
312
- ref: we,
313
- key: `user_options_${le.value}`,
314
- backgroundColor: e.value.style.chart.backgroundColor,
315
- color: e.value.style.chart.color,
316
- isImaging: T(Le),
317
- isPrinting: T(Ne),
318
- uid: N.value,
319
- hasTooltip: e.value.userOptions.buttons.tooltip && e.value.style.chart.tooltip.show,
320
- hasPdf: e.value.userOptions.buttons.pdf,
321
- hasImg: e.value.userOptions.buttons.img,
322
- hasXls: e.value.userOptions.buttons.csv,
323
- hasTable: e.value.userOptions.buttons.table,
324
- hasSort: e.value.userOptions.buttons.sort,
325
- hasFullscreen: e.value.userOptions.buttons.fullscreen,
326
- isFullscreen: O.value,
327
- isTooltip: _.value.showTooltip,
328
- titles: { ...e.value.userOptions.buttonTitles },
329
- chartElement: F.value,
330
- onToggleFullscreen: Oe,
331
- onGeneratePdf: T(oe),
332
- onGenerateCsv: pe,
333
- onGenerateImage: T(ne),
334
- onToggleTable: ge,
335
- onToggleSort: ye,
336
- onToggleTooltip: fe
337
- }, Ae({ _: 2 }, [
338
- t.$slots.optionTooltip ? {
339
- name: "optionTooltip",
340
- fn: m(() => [
341
- x(t.$slots, "optionTooltip", {}, void 0, !0)
342
- ]),
343
- key: "0"
344
- } : void 0,
345
- t.$slots.optionPdf ? {
346
- name: "optionPdf",
347
- fn: m(() => [
348
- x(t.$slots, "optionPdf", {}, void 0, !0)
349
- ]),
350
- key: "1"
351
- } : void 0,
352
- t.$slots.optionCsv ? {
353
- name: "optionCsv",
354
- fn: m(() => [
355
- x(t.$slots, "optionCsv", {}, void 0, !0)
356
- ]),
357
- key: "2"
358
- } : void 0,
359
- t.$slots.optionImg ? {
360
- name: "optionImg",
361
- fn: m(() => [
362
- x(t.$slots, "optionImg", {}, void 0, !0)
363
- ]),
364
- key: "3"
365
- } : void 0,
366
- t.$slots.optionTable ? {
367
- name: "optionTable",
368
- fn: m(() => [
369
- x(t.$slots, "optionTable", {}, void 0, !0)
370
- ]),
371
- key: "4"
372
- } : void 0,
373
- t.$slots.optionLabels ? {
374
- name: "optionLabels",
375
- fn: m(() => [
376
- x(t.$slots, "optionLabels", {}, void 0, !0)
377
- ]),
378
- key: "5"
379
- } : void 0,
380
- t.$slots.optionSort ? {
381
- name: "optionSort",
382
- fn: m(() => [
383
- x(t.$slots, "optionSort", {}, void 0, !0)
384
- ]),
385
- key: "6"
386
- } : void 0,
387
- t.$slots.optionFullscreen ? {
388
- name: "optionFullscreen",
389
- fn: m(({ toggleFullscreen: l, isFullscreen: n }) => [
390
- x(t.$slots, "optionFullscreen", Q(Y({ toggleFullscreen: l, isFullscreen: n })), void 0, !0)
391
- ]),
392
- key: "7"
393
- } : void 0
394
- ]), 1032, ["backgroundColor", "color", "isImaging", "isPrinting", "uid", "hasTooltip", "hasPdf", "hasImg", "hasXls", "hasTable", "hasSort", "hasFullscreen", "isFullscreen", "isTooltip", "titles", "chartElement", "onGeneratePdf", "onGenerateImage"])) : b("", !0),
395
- e.value.style.chart.legend.show && e.value.style.chart.legend.position === "top" ? (d(), h("div", {
396
- key: 2,
397
- ref_key: "chartLegend",
398
- ref: j
399
- }, [
400
- D(_e, {
401
- legendSet: L.value,
402
- config: de.value,
403
- onClickMarker: a[0] || (a[0] = ({ legend: l }) => z(l.id))
404
- }, {
405
- item: m(({ legend: l }) => [
406
- o("div", {
407
- "data-cy-legend-item": "",
408
- onClick: (n) => z(l.id),
409
- style: i(`opacity:${C.value.includes(l.id) ? 0.5 : 1}`)
410
- }, u(l.name) + ": " + u(e.value.style.chart.legend.prefix) + u(l.value.toFixed(e.value.style.chart.legend.roundingValue)) + u(e.value.style.chart.legend.suffix), 13, vt)
411
- ]),
412
- _: 1
413
- }, 8, ["legendSet", "config"])
414
- ], 512)) : b("", !0),
415
- A.value ? (d(), h("svg", {
416
- key: 3,
417
- xmlns: T(We),
418
- class: S({ "vue-data-ui-fullscreen--on": O.value, "vue-data-ui-fulscreen--off": !O.value }),
419
- viewBox: `0 0 ${p.value.width <= 0 ? 10 : p.value.width} ${y.value.fullHeight <= 0 ? 10 : y.value.fullHeight}`,
420
- style: i(`max-width:100%;overflow:visible;background:${e.value.style.chart.backgroundColor};color:${e.value.style.chart.color}`)
421
- }, [
422
- (d(!0), h(R, null, M(B.value, (l, n) => (d(), h("linearGradient", {
423
- x1: "0%",
424
- y1: "0%",
425
- x2: "100%",
426
- y2: "0%",
427
- id: `vertical_bar_gradient_${N.value}_${n}`
428
- }, [
429
- o("stop", {
430
- offset: "0%",
431
- "stop-color": l.color
432
- }, null, 8, gt),
433
- o("stop", {
434
- offset: "100%",
435
- "stop-color": `${T(Ke)(l.color, 0.03)}${T(te)[100 - e.value.style.chart.layout.bars.gradientIntensity]}`
436
- }, null, 8, yt)
437
- ], 8, pt))), 256)),
438
- (d(!0), h(R, null, M(B.value, (l, n) => (d(), h("g", null, [
439
- o("rect", {
440
- x: y.value.left,
441
- y: y.value.top + (g.value + c.value) * n,
442
- width: I(l.value) <= 0 ? 1e-4 : I(l.value),
443
- height: c.value <= 0 ? 1e-4 : c.value,
444
- fill: e.value.style.chart.layout.bars.underlayerColor,
445
- rx: e.value.style.chart.layout.bars.borderRadius,
446
- class: S({ animated: e.value.useCssAnimation })
447
- }, null, 10, ft)
448
- ]))), 256)),
449
- (d(!0), h(R, null, M(B.value, (l, n) => (d(), h("g", null, [
450
- o("rect", {
451
- x: y.value.left,
452
- y: y.value.top + (g.value + c.value) * n,
453
- width: I(l.value) <= 0 ? 1e-4 : I(l.value),
454
- height: c.value <= 0 ? 1e-4 : c.value,
455
- fill: e.value.style.chart.layout.bars.useGradient ? `url(#vertical_bar_gradient_${N.value}_${n})` : `${l.color}${T(te)[e.value.style.chart.layout.bars.fillOpacity]}`,
456
- rx: e.value.style.chart.layout.bars.borderRadius,
457
- stroke: e.value.style.chart.layout.bars.useStroke ? l.color : "none",
458
- "stroke-width": e.value.style.chart.layout.bars.useStroke ? e.value.style.chart.layout.bars.strokeWidth : 0,
459
- class: S({ animated: e.value.useCssAnimation })
460
- }, null, 10, bt),
461
- (!l.isChild || l.isLastChild) && e.value.style.chart.layout.separators.show && n !== B.value.length - 1 ? (d(), h("line", {
462
- key: 0,
463
- x1: 0,
464
- x2: y.value.left,
465
- y1: c.value + g.value / 2 + y.value.top + (g.value + c.value) * n,
466
- y2: c.value + g.value / 2 + y.value.top + (g.value + c.value) * n,
467
- stroke: e.value.style.chart.layout.separators.color,
468
- "stroke-width": e.value.style.chart.layout.separators.strokeWidth,
469
- "stroke-linecap": "round"
470
- }, null, 8, mt)) : b("", !0),
471
- o("text", {
472
- x: ze(l.value) + 3 + e.value.style.chart.layout.bars.dataLabels.offsetX,
473
- y: y.value.top + (g.value + c.value) * n + c.value / 2 + e.value.style.chart.layout.bars.dataLabels.fontSize / 2,
474
- "text-anchor": "start",
475
- "font-size": e.value.style.chart.layout.bars.dataLabels.fontSize,
476
- fill: e.value.style.chart.layout.bars.dataLabels.color,
477
- "font-weight": e.value.style.chart.layout.bars.dataLabels.bold ? "bold" : "normal"
478
- }, u(he(l.value)), 9, _t),
479
- (l.isChild || !l.hasChildren) && e.value.style.chart.layout.bars.nameLabels.show ? (d(), h("text", {
480
- key: 1,
481
- "text-anchor": "end",
482
- x: y.value.left - 3 + e.value.style.chart.layout.bars.nameLabels.offsetX,
483
- y: y.value.top + (g.value + c.value) * n + c.value / 2 + e.value.style.chart.layout.bars.nameLabels.fontSize / 2,
484
- "font-size": e.value.style.chart.layout.bars.nameLabels.fontSize,
485
- fill: e.value.style.chart.layout.bars.nameLabels.color,
486
- "font-weight": e.value.style.chart.layout.bars.nameLabels.bold ? "bold" : "normal"
487
- }, u(l.name), 9, xt)) : b("", !0),
488
- l.isChild && l.childIndex === 0 && e.value.style.chart.layout.bars.parentLabels.show ? (d(), h("text", {
489
- key: 2,
490
- x: 3 + e.value.style.chart.layout.bars.parentLabels.offsetX,
491
- y: E(l, n).y,
492
- "font-size": e.value.style.chart.layout.bars.parentLabels.fontSize,
493
- fill: e.value.style.chart.layout.bars.parentLabels.color,
494
- "font-weight": e.value.style.chart.layout.bars.parentLabels.bold ? "bold" : "normal",
495
- "text-anchor": "start"
496
- }, u(E(l, n).name), 9, $t)) : b("", !0),
497
- l.isChild && l.childIndex === 0 && e.value.style.chart.layout.bars.parentLabels.show ? (d(), h("text", {
498
- key: 3,
499
- x: 3 + e.value.style.chart.layout.bars.parentLabels.offsetX,
500
- y: E(l, n).y + e.value.style.chart.layout.bars.parentLabels.fontSize + 6,
501
- "font-size": e.value.style.chart.layout.bars.parentLabels.fontSize,
502
- fill: e.value.style.chart.layout.bars.parentLabels.color,
503
- "font-weight": e.value.style.chart.layout.bars.dataLabels.bold ? "bold" : "normal",
504
- "text-anchor": "start"
505
- }, u(he(E(l, n).value)), 9, kt)) : b("", !0),
506
- o("rect", {
507
- "data-cy-trap": "",
508
- x: 0,
509
- y: y.value.top + (g.value + c.value) * n - g.value / 2,
510
- width: p.value.width <= 0 ? 1e-4 : p.value.width,
511
- height: c.value + g.value <= 0 ? 1e-4 : c.value + g.value,
512
- fill: K.value === l.id ? `${e.value.style.chart.layout.highlighter.color}${T(te)[e.value.style.chart.layout.highlighter.opacity]}` : "transparent",
513
- onMouseenter: (r) => Ie(l, n),
514
- onMouseleave: a[1] || (a[1] = (r) => {
515
- Te.value = null, G.value = !1, K.value = null;
516
- })
517
- }, null, 40, Ct)
518
- ]))), 256)),
519
- x(t.$slots, "svg", { svg: p.value }, void 0, !0)
520
- ], 14, ht)) : b("", !0),
521
- A.value ? b("", !0) : (d(), J(it, {
522
- key: 4,
523
- config: {
524
- type: "verticalBar",
525
- style: {
526
- backgroundColor: e.value.style.chart.backgroundColor,
527
- verticalBar: {
528
- axis: {
529
- color: "#CCCCCC"
530
- },
531
- color: "#CCCCCC"
532
- }
533
- }
534
- }
535
- }, null, 8, ["config"])),
536
- e.value.style.chart.legend.show && e.value.style.chart.legend.position === "bottom" ? (d(), h("div", {
537
- key: 5,
538
- ref_key: "chartLegend",
539
- ref: j
540
- }, [
541
- D(_e, {
542
- legendSet: L.value,
543
- config: de.value,
544
- onClickMarker: a[2] || (a[2] = ({ legend: l }) => z(l.id))
545
- }, {
546
- item: m(({ legend: l }) => [
547
- o("div", {
548
- onClick: (n) => z(l.id),
549
- style: i(`opacity:${C.value.includes(l.id) ? 0.5 : 1}`)
550
- }, u(l.name) + " : " + u(e.value.style.chart.legend.prefix) + u(l.value.toFixed(e.value.style.chart.legend.roundingValue)) + u(e.value.style.chart.legend.suffix), 13, wt)
551
- ]),
552
- _: 1
553
- }, 8, ["legendSet", "config"])
554
- ], 512)) : b("", !0),
555
- x(t.$slots, "legend", { legend: L.value }, void 0, !0),
556
- D(ut, {
557
- show: _.value.showTooltip && G.value && C.value.length < w.dataset.length,
558
- backgroundColor: e.value.style.chart.tooltip.backgroundColor,
559
- color: e.value.style.chart.tooltip.color,
560
- borderRadius: e.value.style.chart.tooltip.borderRadius,
561
- borderColor: e.value.style.chart.tooltip.borderColor,
562
- borderWidth: e.value.style.chart.tooltip.borderWidth,
563
- fontSize: e.value.style.chart.tooltip.fontSize,
564
- backgroundOpacity: e.value.style.chart.tooltip.backgroundOpacity,
565
- parent: F.value,
566
- content: H.value,
567
- isCustom: e.value.style.chart.tooltip.customFormat && typeof e.value.style.chart.tooltip.customFormat == "function"
568
- }, {
569
- "tooltip-before": m(() => [
570
- x(t.$slots, "tooltip-before", Q(Y({ ...q.value })), void 0, !0)
571
- ]),
572
- "tooltip-after": m(() => [
573
- x(t.$slots, "tooltip-after", Q(Y({ ...q.value })), void 0, !0)
574
- ]),
575
- _: 3
576
- }, 8, ["show", "backgroundColor", "color", "borderRadius", "borderColor", "borderWidth", "fontSize", "backgroundOpacity", "parent", "content", "isCustom"]),
577
- A.value ? (d(), J(dt, {
578
- key: 6,
579
- hideDetails: "",
580
- config: {
581
- open: _.value.showTable,
582
- maxHeight: 1e4,
583
- body: {
584
- backgroundColor: e.value.style.chart.backgroundColor,
585
- color: e.value.style.chart.color
586
- },
587
- head: {
588
- backgroundColor: e.value.style.chart.backgroundColor,
589
- color: e.value.style.chart.color
590
- }
591
- }
592
- }, {
593
- content: m(() => [
594
- o("div", {
595
- ref_key: "tableContainer",
596
- ref: re,
597
- class: "vue-ui-vertical-bar-table"
598
- }, [
599
- o("div", Tt, [
600
- o("div", {
601
- role: "button",
602
- tabindex: "0",
603
- style: i(`width:32px; position: absolute; top: 0; right:4px; padding: 0 0px; display: flex; align-items:center;justify-content:center;height: 36px; width: 32px; cursor:pointer; background:${e.value.table.th.backgroundColor};`),
604
- onClick: a[3] || (a[3] = (l) => _.value.showTable = !1),
605
- onKeypress: a[4] || (a[4] = Ue((l) => _.value.showTable = !1, ["enter"]))
606
- }, [
607
- D(qe, {
608
- name: "close",
609
- stroke: e.value.table.th.color,
610
- "stroke-width": 2
611
- }, null, 8, ["stroke"])
612
- ], 36),
613
- o("div", {
614
- style: { width: "100%", "container-type": "inline-size" },
615
- class: S({ "vue-ui-responsive": se.value })
616
- }, [
617
- o("table", Nt, [
618
- o("caption", {
619
- style: i({ backgroundColor: e.value.table.th.backgroundColor, color: e.value.table.th.color, outline: e.value.table.th.outline }),
620
- class: "vue-ui-data-table__caption"
621
- }, [
622
- Xe(u(e.value.style.chart.title.text) + " ", 1),
623
- e.value.style.chart.title.subtitle.text ? (d(), h("span", Lt, u(e.value.style.chart.title.subtitle.text), 1)) : b("", !0)
624
- ], 4),
625
- o("thead", null, [
626
- o("tr", {
627
- role: "row",
628
- style: i(`background:${e.value.table.th.backgroundColor};color:${e.value.table.th.color}`)
629
- }, [
630
- (d(!0), h(R, null, M(k.value.head, (l) => (d(), h("th", {
631
- style: i(`outline:${e.value.table.th.outline}`)
632
- }, [
633
- o("div", Pt, u(l), 1)
634
- ], 4))), 256))
635
- ], 4),
636
- o("tr", null, [
637
- o("th", {
638
- style: i(`background:${e.value.table.th.backgroundColor};color:${e.value.table.th.color};outline:${e.value.table.th.outline}`)
639
- }, null, 4),
640
- o("th", {
641
- style: i(`background:${e.value.table.th.backgroundColor};color:${e.value.table.th.color};outline:${e.value.table.th.outline};text-align:right;padding-right:5px;font-weight:bold`)
642
- }, "∑ " + u(e.value.table.td.prefix) + u(isNaN($.value) ? "" : $.value.toFixed(e.value.table.td.roundingValue)) + u(e.value.table.td.suffix), 5),
643
- o("th", {
644
- style: i(`background:${e.value.table.th.backgroundColor};color:${e.value.table.th.color};outline:${e.value.table.th.outline};text-align:right;padding-right:5px;font-weight:bold`)
645
- }, "100%", 4),
646
- o("th", {
647
- style: i(`background:${e.value.table.th.backgroundColor};color:${e.value.table.th.color};outline:${e.value.table.th.outline}`)
648
- }, null, 4),
649
- o("th", {
650
- style: i(`background:${e.value.table.th.backgroundColor};color:${e.value.table.th.color};outline:${e.value.table.th.outline}`)
651
- }, null, 4),
652
- o("th", {
653
- style: i(`background:${e.value.table.th.backgroundColor};color:${e.value.table.th.color};outline:${e.value.table.th.outline}`)
654
- }, null, 4),
655
- o("th", {
656
- style: i(`background:${e.value.table.th.backgroundColor};color:${e.value.table.th.color};outline:${e.value.table.th.outline}`)
657
- }, null, 4)
658
- ])
659
- ]),
660
- o("tbody", null, [
661
- (d(!0), h(R, null, M(k.value.body, (l, n) => (d(), h("tr", {
662
- class: S({ "vue-ui-data-table__tbody__row": !0, "vue-ui-data-table__tbody__row-even": n % 2 === 0, "vue-ui-data-table__tbody__row-odd": n % 2 !== 0 }),
663
- style: i(`background:${e.value.table.td.backgroundColor};color:${e.value.table.td.color}`)
664
- }, [
665
- o("td", {
666
- class: "vue-ui-data-table__tbody__td",
667
- style: i(`outline:${e.value.table.td.outline};font-variant-numeric: tabular-nums;`),
668
- "data-cell": k.value.head[0] ?? ""
669
- }, [
670
- o("div", St, [
671
- l.color ? (d(), h("span", {
672
- key: 0,
673
- style: i(`color:${l.color};margin-right:3px`)
674
- }, "⬤", 4)) : b("", !0),
675
- o("span", null, u(l.parentName), 1)
676
- ])
677
- ], 12, Vt),
678
- o("td", {
679
- class: "vue-ui-data-table__tbody__td",
680
- style: i(`outline:${e.value.table.td.outline}`),
681
- "data-cell": k.value.head[1] ?? ""
682
- }, [
683
- o("div", zt, u(e.value.table.td.prefix) + u(["", NaN, void 0].includes(l.parentValue) ? "" : l.parentValue.toFixed(e.value.table.td.roundingValue)) + u(e.value.table.td.suffix), 1)
684
- ], 12, Ft),
685
- o("td", {
686
- class: "vue-ui-data-table__tbody__td",
687
- style: i(`outline:${e.value.table.td.outline}`),
688
- "data-cell": k.value.head[2] ?? ""
689
- }, [
690
- o("div", It, u(["", NaN, void 0].includes(l.percentageToTotal) ? "" : `${(l.percentageToTotal * 100).toFixed(e.value.table.td.roundingPercentage)}%`), 1)
691
- ], 12, Bt),
692
- o("td", {
693
- class: "vue-ui-data-table__tbody__td",
694
- style: i(`outline:${e.value.table.td.outline}`),
695
- "data-cell": k.value.head[3] ?? ""
696
- }, [
697
- o("div", Dt, u(l.childName), 1)
698
- ], 12, Ot),
699
- o("td", {
700
- class: "vue-ui-data-table__tbody__td",
701
- style: i(`outline:${e.value.table.td.outline}`),
702
- "data-cell": k.value.head[4] ?? ""
703
- }, [
704
- o("div", Mt, u(e.value.table.td.prefix) + u(["", NaN, void 0].includes(l.childValue) ? "" : l.childValue.toFixed(e.value.table.td.roundingValue)) + u(e.value.table.td.suffix), 1)
705
- ], 12, Rt),
706
- o("td", {
707
- class: "vue-ui-data-table__tbody__td",
708
- style: i(`outline:${e.value.table.td.outline}`),
709
- "data-cell": k.value.head[5] ?? ""
710
- }, [
711
- o("div", Ut, u(["", NaN, void 0].includes(l.childPercentageToParent) ? "" : `${(l.childPercentageToParent * 100).toFixed(e.value.table.td.roundingPercentage)}%`), 1)
712
- ], 12, At),
713
- o("td", {
714
- class: "vue-ui-data-table__tbody__td",
715
- style: i(`outline:${e.value.table.td.outline}`),
716
- "data-cell": k.value.head[6] ?? ""
717
- }, [
718
- o("div", Et, u(["", NaN, void 0].includes(l.childPercentageToTotal) ? "" : `${(l.childPercentageToTotal * 100).toFixed(e.value.table.td.roundingPercentage)}%`), 1)
719
- ], 12, Xt)
720
- ], 6))), 256))
721
- ])
722
- ])
723
- ], 2)
724
- ])
725
- ], 512)
726
- ]),
727
- _: 1
728
- }, 8, ["config"])) : b("", !0)
729
- ], 14, ct));
730
- }
731
- }, el = /* @__PURE__ */ Ee(Gt, [["__scopeId", "data-v-22e85059"]]);
732
- export {
733
- el as default
734
- };