vue-data-ui 2.3.2 → 2.3.4

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 (148) hide show
  1. package/dist/Arrow-B6gJebT9.js +101 -0
  2. package/dist/Arrow-C5yj6zwY.cjs +1 -0
  3. package/dist/BaseIcon-7_g11dRj.js +174 -0
  4. package/dist/BaseIcon-JtWoVorZ.cjs +1 -0
  5. package/dist/DataTable-CwaOlAsy.js +127 -0
  6. package/dist/DataTable-Rm9II-m2.cjs +1 -0
  7. package/dist/Legend-CxvJTjEm.js +62 -0
  8. package/dist/Legend-D59FIuMs.cjs +1 -0
  9. package/dist/Shape-CVItL3vh.cjs +1 -0
  10. package/dist/Shape-CjLV0scA.js +107 -0
  11. package/dist/Slicer-Bxg5niHl.js +156 -0
  12. package/dist/Slicer-Cdss5Rus.cjs +1 -0
  13. package/dist/Title-2iks1ziC.js +46 -0
  14. package/dist/Title-Bb-A5OSV.cjs +1 -0
  15. package/dist/Tooltip-C3phqKuU.js +94 -0
  16. package/dist/Tooltip-C_UE6y-E.cjs +1 -0
  17. package/dist/_plugin-vue_export-helper-BHFhmbuH.cjs +1 -0
  18. package/dist/_plugin-vue_export-helper-CHgC5LLL.js +9 -0
  19. package/dist/html2canvas.esm-BA_v9SIU.cjs +22 -0
  20. package/dist/html2canvas.esm-d2sM-0Wm.js +4870 -0
  21. package/dist/index-p5gfZSvB.cjs +4 -0
  22. package/dist/index-uOtklCCx.js +10268 -0
  23. package/dist/{index.es-BoVO5twe.js → index.es-YufTdp0y.js} +1 -1
  24. package/dist/{index.es-w_iDpZ-o.cjs → index.es-uyeSCnWE.cjs} +1 -1
  25. package/dist/jspdf.es.min-C660YX78.js +8038 -0
  26. package/dist/jspdf.es.min-DLYY9DTT.cjs +243 -0
  27. package/dist/pdf-97UbtKC2.js +44 -0
  28. package/dist/pdf-Cz3729tZ.cjs +1 -0
  29. package/dist/style.css +1 -1
  30. package/dist/useNestedProp-2kIU-7On.cjs +1 -0
  31. package/dist/useNestedProp-BgWkUab_.js +13 -0
  32. package/dist/usePrinter-B6xQCyL-.js +464 -0
  33. package/dist/usePrinter-fZlsJid8.cjs +1 -0
  34. package/dist/useResponsive-B3TrDDIG.cjs +1 -0
  35. package/dist/useResponsive-NZB-WLRF.js +187 -0
  36. package/dist/vue-data-ui-Be0rgmbA.cjs +9 -0
  37. package/dist/vue-data-ui-Ccy6rBZN.js +246 -0
  38. package/dist/vue-data-ui.cjs +1 -1
  39. package/dist/vue-data-ui.js +62 -61
  40. package/dist/vue-ui-3d-bar-BKMPFDi2.js +1085 -0
  41. package/dist/vue-ui-3d-bar-CKa4UXq4.cjs +19 -0
  42. package/dist/vue-ui-accordion-C_pwrAJl.cjs +1 -0
  43. package/dist/vue-ui-accordion-HJPf7My0.js +77 -0
  44. package/dist/vue-ui-age-pyramid-CE1xnA-8.cjs +1 -0
  45. package/dist/vue-ui-age-pyramid-DB_CL-gu.js +596 -0
  46. package/dist/vue-ui-annotator-BAMZcPlH.cjs +371 -0
  47. package/dist/vue-ui-annotator-DQsAL-nZ.js +2177 -0
  48. package/dist/vue-ui-candlestick-DCl8fpNu.js +657 -0
  49. package/dist/vue-ui-candlestick-Duv6oG79.cjs +2 -0
  50. package/dist/vue-ui-chestnut-BYHA6MT4.js +1051 -0
  51. package/dist/vue-ui-chestnut-mIZ4-ZEM.cjs +6 -0
  52. package/dist/vue-ui-cursor-C96IChA3.js +229 -0
  53. package/dist/vue-ui-cursor-De7dy4Mo.cjs +1 -0
  54. package/dist/vue-ui-dashboard-B2Yz41yO.js +232 -0
  55. package/dist/vue-ui-dashboard-BMGwKr0K.cjs +1 -0
  56. package/dist/vue-ui-digits-BnxLp7zQ.js +153 -0
  57. package/dist/vue-ui-digits-DSWyL-5K.cjs +1 -0
  58. package/dist/vue-ui-donut-1kei9ws5.cjs +1 -0
  59. package/dist/vue-ui-donut-B9iXisHK.js +743 -0
  60. package/dist/vue-ui-donut-evolution-B7Sun8sw.js +799 -0
  61. package/dist/vue-ui-donut-evolution-yv17DnGy.cjs +1 -0
  62. package/dist/vue-ui-dumbbell-BJEf_JEq.cjs +9 -0
  63. package/dist/vue-ui-dumbbell-DIsDnD1d.js +624 -0
  64. package/dist/vue-ui-flow-BTivYoGd.js +454 -0
  65. package/dist/vue-ui-flow-DOxJa8di.cjs +1 -0
  66. package/dist/vue-ui-galaxy-BEmywfFB.js +485 -0
  67. package/dist/vue-ui-galaxy-CHGOwCwM.cjs +1 -0
  68. package/dist/vue-ui-gauge-QAfMl-8t.cjs +1 -0
  69. package/dist/vue-ui-gauge-o4rDOqF3.js +466 -0
  70. package/dist/vue-ui-heatmap-BS4EzedX.cjs +1 -0
  71. package/dist/vue-ui-heatmap-DwqQqEsk.js +598 -0
  72. package/dist/vue-ui-kpi-F4qkJ_U-.cjs +1 -0
  73. package/dist/vue-ui-kpi-h8elYTcA.js +54 -0
  74. package/dist/vue-ui-mini-loader-C_8B2Pm6.cjs +1 -0
  75. package/dist/vue-ui-mini-loader-Cgoi9rhH.js +131 -0
  76. package/dist/vue-ui-molecule-Bmv76SWz.js +750 -0
  77. package/dist/vue-ui-molecule-C5CY_YYc.cjs +1 -0
  78. package/dist/vue-ui-mood-radar-BN0dzlfp.cjs +1 -0
  79. package/dist/vue-ui-mood-radar-DeMouUIe.js +548 -0
  80. package/dist/vue-ui-nested-donuts-ZyFoV-Zn.cjs +16 -0
  81. package/dist/vue-ui-nested-donuts-wOUkSVyZ.js +771 -0
  82. package/dist/vue-ui-onion-DCOKG2wG.js +554 -0
  83. package/dist/vue-ui-onion-VmTUo7TR.cjs +1 -0
  84. package/dist/vue-ui-parallel-coordinate-plot-BGtO2P4a.js +651 -0
  85. package/dist/vue-ui-parallel-coordinate-plot-BziXRF8E.cjs +8 -0
  86. package/dist/vue-ui-quadrant--JOTjPZh.js +1178 -0
  87. package/dist/vue-ui-quadrant-DawUUrur.cjs +1 -0
  88. package/dist/vue-ui-quick-chart-LXKfaJgS.js +1310 -0
  89. package/dist/vue-ui-quick-chart-jFlFtiNV.cjs +13 -0
  90. package/dist/vue-ui-radar-CWNIqvcA.js +614 -0
  91. package/dist/vue-ui-radar-VGH-lhaT.cjs +1 -0
  92. package/dist/vue-ui-rating-BNrIoJHN.js +271 -0
  93. package/dist/vue-ui-rating-Dtu6pwGx.cjs +1 -0
  94. package/dist/vue-ui-relation-circle-B3NKudOy.js +304 -0
  95. package/dist/vue-ui-relation-circle-Dwpx9o18.cjs +1 -0
  96. package/dist/vue-ui-rings-CsUngX_F.js +510 -0
  97. package/dist/vue-ui-rings-D9_OG--0.cjs +1 -0
  98. package/dist/vue-ui-scatter-DUsuh7bd.cjs +1 -0
  99. package/dist/vue-ui-scatter-DgxTz4Jx.js +874 -0
  100. package/dist/vue-ui-screenshot-51H_VrYY.js +160 -0
  101. package/dist/vue-ui-screenshot-C2Dz7CAe.cjs +3 -0
  102. package/dist/vue-ui-skeleton-BM9rwmxY.js +2064 -0
  103. package/dist/vue-ui-skeleton-sjfOtCZr.cjs +41 -0
  104. package/dist/vue-ui-smiley-DNnBtHht.cjs +2 -0
  105. package/dist/vue-ui-smiley-H5rSN-1B.js +763 -0
  106. package/dist/vue-ui-spark-trend-CLXZDYlk.js +246 -0
  107. package/dist/vue-ui-spark-trend-R4JJvfry.cjs +1 -0
  108. package/dist/vue-ui-sparkbar-C0k4ah-7.js +242 -0
  109. package/dist/vue-ui-sparkbar-CEUDIw0A.cjs +1 -0
  110. package/dist/vue-ui-sparkgauge-BHj00A07.js +157 -0
  111. package/dist/vue-ui-sparkgauge-CaEw6nmI.cjs +1 -0
  112. package/dist/vue-ui-sparkhistogram-B6GuavEu.cjs +1 -0
  113. package/dist/vue-ui-sparkhistogram-DbMLYKqE.js +244 -0
  114. package/dist/vue-ui-sparkline-CJydanLS.cjs +1 -0
  115. package/dist/vue-ui-sparkline-CYova9x3.js +333 -0
  116. package/dist/vue-ui-sparkstackbar-Df__yM5b.cjs +1 -0
  117. package/dist/vue-ui-sparkstackbar-N5rVBM2h.js +244 -0
  118. package/dist/vue-ui-strip-plot-DJJ1vEWz.js +618 -0
  119. package/dist/vue-ui-strip-plot-b5lhB35d.cjs +1 -0
  120. package/dist/vue-ui-table-NHhOVDbs.cjs +14 -0
  121. package/dist/vue-ui-table-heatmap-Cro2etCY.js +237 -0
  122. package/dist/vue-ui-table-heatmap-DlL2nCqz.cjs +1 -0
  123. package/dist/vue-ui-table-sparkline-Bw2Gc_ur.cjs +1 -0
  124. package/dist/vue-ui-table-sparkline-DppMitqF.js +420 -0
  125. package/dist/vue-ui-table-xSvwJIa7.js +1430 -0
  126. package/dist/vue-ui-thermometer-M2kdp1x5.js +385 -0
  127. package/dist/vue-ui-thermometer-Q_3PX2V3.cjs +1 -0
  128. package/dist/vue-ui-timer-BtSDeIRp.cjs +64 -0
  129. package/dist/vue-ui-timer-CAaQ-QD6.js +453 -0
  130. package/dist/vue-ui-tiremarks-CbGOSEvD.cjs +1 -0
  131. package/dist/vue-ui-tiremarks-JFv4JLP0.js +249 -0
  132. package/dist/vue-ui-treemap-BqDX-bPf.cjs +1 -0
  133. package/dist/vue-ui-treemap-DCnv-xYr.js +722 -0
  134. package/dist/vue-ui-vertical-bar-CEbApJZl.js +737 -0
  135. package/dist/vue-ui-vertical-bar-CJB_KXyr.cjs +4 -0
  136. package/dist/vue-ui-waffle-CTS6C7gu.js +638 -0
  137. package/dist/vue-ui-waffle-IMEbGe-b.cjs +1 -0
  138. package/dist/vue-ui-wheel-CuOmEWMQ.cjs +1 -0
  139. package/dist/vue-ui-wheel-_zyCdFiI.js +227 -0
  140. package/dist/vue-ui-word-cloud-RDlXBEAN.js +346 -0
  141. package/dist/vue-ui-word-cloud-Y7Yk7uUJ.cjs +1 -0
  142. package/dist/vue-ui-xy-BZJQBKnU.cjs +3 -0
  143. package/dist/vue-ui-xy-DsvN9EIQ.js +2064 -0
  144. package/dist/vue-ui-xy-canvas-D_dnbyFS.cjs +9 -0
  145. package/dist/vue-ui-xy-canvas-Dbcw8-9Q.js +1006 -0
  146. package/package.json +1 -1
  147. package/dist/index-C6KVJkgd.cjs +0 -843
  148. package/dist/index-bDBuMYfe.js +0 -57303
@@ -0,0 +1,596 @@
1
+ import { computed as f, ref as d, onMounted as ve, openBlock as i, createElementBlock as u, normalizeClass as K, normalizeStyle as P, createVNode as N, createCommentVNode as y, createBlock as R, unref as g, createSlots as ye, withCtx as c, renderSlot as p, normalizeProps as D, guardReactiveProps as G, createElementVNode as r, Fragment as C, renderList as S, toDisplayString as m, createTextVNode as Q, nextTick as he } from "vue";
2
+ import { u as ce, c as fe, t as ge, o as pe, e as be, X as xe, s as Z, r as B, v as me, w as we, n as _e, q as ke } from "./index-uOtklCCx.js";
3
+ import { t as Ce, u as $e } from "./useResponsive-NZB-WLRF.js";
4
+ import { _ as Te } from "./Title-2iks1ziC.js";
5
+ import { u as Le, U as Se } from "./usePrinter-B6xQCyL-.js";
6
+ import { _ as ze } from "./Tooltip-C3phqKuU.js";
7
+ import { D as Ae } from "./DataTable-CwaOlAsy.js";
8
+ import Fe from "./vue-ui-skeleton-BM9rwmxY.js";
9
+ import Ie from "./vue-ui-accordion-HJPf7My0.js";
10
+ import { u as ee } from "./useNestedProp-BgWkUab_.js";
11
+ import { _ as Me } from "./_plugin-vue_export-helper-CHgC5LLL.js";
12
+ const Oe = ["id"], Pe = ["xmlns", "viewBox"], Ne = ["id"], Re = ["stop-color"], De = ["stop-color"], Ge = ["id"], Be = ["stop-color"], Ee = ["stop-color"], We = ["x", "y", "width", "height", "fill", "rx"], Xe = ["x", "y", "width", "height", "fill", "rx"], Ue = ["x", "y", "width", "height", "fill", "rx"], Ve = ["x", "y", "width", "height", "fill", "rx"], je = { key: 0 }, He = ["x", "y", "fill", "font-size", "font-weight"], Ye = ["x", "y", "fill", "font-size", "font-weight"], qe = { key: 1 }, Je = ["x", "y", "font-size", "fill", "font-weight"], Ke = { key: 2 }, Qe = { key: 0 }, Ze = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], et = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], tt = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], lt = ["x", "y", "font-size", "fill", "font-weight"], at = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], ot = ["x", "y", "font-size", "fill", "font-weight"], st = ["x", "y", "font-size", "fill", "font-weight"], it = ["x", "y", "width", "height", "fill", "onMouseover"], ut = {
13
+ __name: "vue-ui-age-pyramid",
14
+ props: {
15
+ config: {
16
+ type: Object,
17
+ default() {
18
+ return {};
19
+ }
20
+ },
21
+ dataset: {
22
+ type: Array,
23
+ default() {
24
+ return [];
25
+ }
26
+ }
27
+ },
28
+ setup(E, { expose: te }) {
29
+ const h = E, { vue_ui_age_pyramid: le } = ce(), z = f(() => !!h.dataset && h.dataset.length), b = d(fe()), ae = d(null), I = d(!1), M = d(""), A = d(null), W = d(0), $ = d(null), X = d(null), e = f(() => {
30
+ const t = ee({
31
+ userConfig: h.config,
32
+ defaultConfig: le
33
+ });
34
+ return t.theme ? {
35
+ ...ee({
36
+ userConfig: ge.vue_ui_age_pyramid[t.theme] || h.config,
37
+ defaultConfig: t
38
+ })
39
+ } : t;
40
+ }), U = d(null);
41
+ ve(() => {
42
+ if (pe(h.dataset) && be({
43
+ componentName: "VueUiAgePyramid",
44
+ type: "dataset"
45
+ }), e.value.responsive) {
46
+ const t = Ce(() => {
47
+ const { width: s, height: l } = $e({
48
+ chart: $.value,
49
+ title: e.value.style.title.text ? X.value : null
50
+ });
51
+ v.value.width = s, v.value.height = l;
52
+ });
53
+ U.value = new ResizeObserver(t), U.value.observe($.value.parentNode);
54
+ }
55
+ });
56
+ const { isPrinting: oe, isImaging: se, generatePdf: V, generateImage: j } = Le({
57
+ elementId: `vue-ui-age-pyramid_${b.value}`,
58
+ fileName: e.value.style.title.text || "vue-ui-age-pyramid"
59
+ }), x = d({
60
+ showTable: e.value.table.show,
61
+ showTooltip: e.value.style.tooltip.show
62
+ }), v = d({
63
+ height: e.value.style.height,
64
+ width: e.value.style.width
65
+ }), o = f(() => {
66
+ const t = v.value.width - e.value.style.layout.padding.right - e.value.style.layout.padding.left, s = e.value.style.layout.padding.left, l = v.value.width - e.value.style.layout.padding.right;
67
+ return {
68
+ top: e.value.style.layout.padding.top,
69
+ left: s,
70
+ right: l,
71
+ bottom: v.value.height - e.value.style.layout.padding.bottom,
72
+ width: t,
73
+ height: v.value.height - e.value.style.layout.padding.top - e.value.style.layout.padding.bottom,
74
+ centerX: e.value.style.layout.padding.left + t / 2,
75
+ leftChart: {
76
+ width: t / 2 - e.value.style.layout.centerSlit.width,
77
+ right: s + t / 2 - e.value.style.layout.centerSlit.width
78
+ },
79
+ rightChart: {
80
+ width: t / 2 - e.value.style.layout.centerSlit.width,
81
+ left: s + t / 2 + e.value.style.layout.centerSlit.width
82
+ }
83
+ };
84
+ }), ie = f(() => h.dataset.map((t) => e.value.style.layout.dataLabels.yAxis.display === "age" ? t[1] : t[0])), w = f(() => {
85
+ const t = ue(T.value / 5), s = [], l = [];
86
+ for (let a = 0; a <= 5; a += 1) {
87
+ const n = t * a, J = t * (a - 5);
88
+ s.push({
89
+ value: n,
90
+ x: o.value.left + o.value.width / 2 + e.value.style.layout.centerSlit.width + n / T.value * o.value.leftChart.width
91
+ }), l.push({
92
+ value: Math.abs(J),
93
+ x: o.value.left + o.value.width / 2 + J / T.value * o.value.leftChart.width - e.value.style.layout.centerSlit.width
94
+ });
95
+ }
96
+ return {
97
+ right: s,
98
+ left: l
99
+ };
100
+ });
101
+ function ue(t) {
102
+ if (t === 0) return 0;
103
+ const l = 10 ** Math.floor(Math.log10(Math.abs(t)));
104
+ let a;
105
+ return t < 0, a = Math.round(t / l) * l, a;
106
+ }
107
+ const T = f(() => Math.max(...h.dataset.flatMap((t) => t.slice(-2)))), _ = f(() => h.dataset.length), re = f(() => h.dataset.map((t) => ({
108
+ segment: t[0],
109
+ age: t[1],
110
+ left: {
111
+ value: t[2],
112
+ proportionToMax: t[2] / T.value
113
+ },
114
+ right: {
115
+ value: t[3],
116
+ proportionToMax: t[3] / T.value
117
+ }
118
+ }))), k = f(() => re.value.map((t, s) => {
119
+ const l = o.value.top + o.value.height / _.value * s, a = o.value.height / _.value - e.value.style.layout.bars.gap;
120
+ return {
121
+ segment: t.segment,
122
+ age: t.age,
123
+ left: {
124
+ ...t.left,
125
+ y: l,
126
+ color: e.value.style.layout.bars.left.color,
127
+ x: o.value.leftChart.right - t.left.proportionToMax * o.value.leftChart.width,
128
+ width: t.left.proportionToMax * o.value.leftChart.width,
129
+ height: a
130
+ },
131
+ right: {
132
+ ...t.right,
133
+ y: l,
134
+ color: e.value.style.layout.bars.right.color,
135
+ x: o.value.rightChart.left,
136
+ width: t.right.proportionToMax * o.value.rightChart.width,
137
+ height: a
138
+ }
139
+ };
140
+ })), O = d(null);
141
+ function ne(t, s) {
142
+ A.value = t, O.value = {
143
+ datapoint: s,
144
+ seriesIndex: t,
145
+ series: k.value,
146
+ config: e.value
147
+ };
148
+ const l = e.value.style.tooltip.customFormat;
149
+ if (me(l) && we(() => l({
150
+ seriesIndex: t,
151
+ datapoint: {
152
+ segment: s[0],
153
+ index: s[1],
154
+ left: s[2],
155
+ right: s[3]
156
+ },
157
+ series: k.value,
158
+ config: e.value
159
+ })))
160
+ M.value = l({
161
+ seriesIndex: t,
162
+ datapoint: {
163
+ segment: s[0],
164
+ index: s[1],
165
+ left: s[2],
166
+ right: s[3]
167
+ },
168
+ series: k.value,
169
+ config: e.value
170
+ });
171
+ else {
172
+ let a = "";
173
+ const n = k.value[t];
174
+ a += `<div><b>${n.segment}</b></div>`, a += `<div>${e.value.translations.age}: ${n.age}</div>`, a += `<div style="margin-top:6px;padding-top:6px;border-top:1px solid ${e.value.style.tooltip.borderColor}">`, a += '<div style="display:flex; flex-direction:row;gap:12px">', a += `<div style="display:flex;flex-direction:column;align-items:center;justify-content:center"><svg viewBox="0 0 12 12" height="12" width="12"><rect stroke="none" x="0" y="0" height="12" width="12" rx="2" fill="${e.value.style.layout.bars.gradient.underlayer}"/><rect stroke="none" x="0" y="0" height="12" width="12" rx="2" fill="${e.value.style.layout.bars.gradient.show ? `url(#age_pyramid_left_${b.value})` : e.value.style.layout.bars.left.color}"/></svg><div>${e.value.translations.female}</div><div><b>${n.left.value.toLocaleString()}</b></div></div>`, a += `<div style="display:flex;flex-direction:column;align-items:center;justify-content:center"><svg viewBox="0 0 12 12" height="12" width="12"><rect stroke="none" x="0" y="0" height="12" width="12" rx="2" fill="${e.value.style.layout.bars.gradient.underlayer}"/><rect stroke="none" x="0" y="0" height="12" width="12" rx="2" fill="${e.value.style.layout.bars.gradient.show ? `url(#age_pyramid_right_${b.value})` : e.value.style.layout.bars.right.color}"/></svg><div>${e.value.translations.male}</div><div><b>${n.right.value.toLocaleString()}</b></div></div>`, a += "</div>", a += `<div style="margin-top:6px;padding-top:6px;border-top:1px solid ${e.value.style.tooltip.borderColor}"><div>${e.value.translations.total}</div><div><b>${(n.left.value + n.right.value).toLocaleString()}</b></div></div>`, a += "</div>", M.value = `<div>${a}</div>`;
175
+ }
176
+ I.value = !0;
177
+ }
178
+ function H() {
179
+ he(() => {
180
+ const t = [e.value.translations.year, e.value.translations.age, e.value.translations.female, e.value.translations.male, e.value.translations.total], s = h.dataset.map((n) => [
181
+ n[0],
182
+ n[1],
183
+ n[2],
184
+ n[3],
185
+ n[2] + n[3]
186
+ ]), l = [[e.value.style.title.text], [e.value.style.title.subtitle.text], [[""], [""], [""]]].concat([t]).concat(s), a = _e(l);
187
+ ke({ csvContent: a, title: e.value.style.title.text || "vue-ui-heatmap" });
188
+ });
189
+ }
190
+ const F = f(() => {
191
+ const t = [
192
+ e.value.translations.year,
193
+ e.value.translations.age,
194
+ e.value.translations.female,
195
+ e.value.translations.male,
196
+ e.value.translations.total
197
+ ], s = h.dataset.map((a) => [
198
+ a[0],
199
+ a[1],
200
+ a[2].toLocaleString(),
201
+ a[3].toLocaleString(),
202
+ (a[2] + a[3]).toLocaleString()
203
+ ]), l = {
204
+ th: {
205
+ backgroundColor: e.value.table.th.backgroundColor,
206
+ color: e.value.table.th.color,
207
+ outline: e.value.table.th.outline
208
+ },
209
+ td: {
210
+ backgroundColor: e.value.table.td.backgroundColor,
211
+ color: e.value.table.td.color,
212
+ outline: e.value.table.td.outline
213
+ },
214
+ breakpoint: e.value.table.responsiveBreakpoint
215
+ };
216
+ return { head: t, body: s, config: l, colNames: t };
217
+ }), L = d(!1);
218
+ function de(t) {
219
+ L.value = t, W.value += 1;
220
+ }
221
+ function Y() {
222
+ x.value.showTable = !x.value.showTable;
223
+ }
224
+ function q() {
225
+ x.value.showTooltip = !x.value.showTooltip;
226
+ }
227
+ return te({
228
+ generatePdf: V,
229
+ generateCsv: H,
230
+ generateImage: j,
231
+ toggleTable: Y,
232
+ toggleTooltip: q
233
+ }), (t, s) => (i(), u("div", {
234
+ class: K(`vue-ui-age-pyramid ${L.value ? "vue-data-ui-wrapper-fullscreen" : ""}`),
235
+ ref_key: "agePyramid",
236
+ ref: $,
237
+ id: `vue-ui-age-pyramid_${b.value}`,
238
+ style: P(`font-family:${e.value.style.fontFamily};width:100%; text-align:center;${e.value.style.title.text ? "" : "padding-top:36px"};background:${e.value.style.backgroundColor};${e.value.responsive ? "height:100%" : ""}`)
239
+ }, [
240
+ e.value.style.title.text ? (i(), u("div", {
241
+ key: 0,
242
+ ref_key: "chartTitle",
243
+ ref: X,
244
+ style: P(`width:100%;background:${e.value.style.backgroundColor}`)
245
+ }, [
246
+ N(Te, {
247
+ config: {
248
+ title: {
249
+ cy: "pyramid-div-title",
250
+ ...e.value.style.title
251
+ },
252
+ subtitle: {
253
+ cy: "pyramid-div-subtitle",
254
+ ...e.value.style.title.subtitle
255
+ }
256
+ }
257
+ }, null, 8, ["config"])
258
+ ], 4)) : y("", !0),
259
+ e.value.userOptions.show && z.value ? (i(), R(Se, {
260
+ ref_key: "details",
261
+ ref: ae,
262
+ key: `user_options_${W.value}`,
263
+ backgroundColor: e.value.style.backgroundColor,
264
+ color: e.value.style.color,
265
+ isImaging: g(se),
266
+ isPrinting: g(oe),
267
+ uid: b.value,
268
+ hasTooltip: e.value.userOptions.buttons.tooltip && e.value.style.tooltip.show,
269
+ hasPdf: e.value.userOptions.buttons.pdf,
270
+ hasXls: e.value.userOptions.buttons.csv,
271
+ hasImg: e.value.userOptions.buttons.img,
272
+ hasTable: e.value.userOptions.buttons.table,
273
+ hasFullscreen: e.value.userOptions.buttons.fullscreen,
274
+ isFullscreen: L.value,
275
+ isTooltip: x.value.showTooltip,
276
+ titles: { ...e.value.userOptions.buttonTitles },
277
+ chartElement: $.value,
278
+ onToggleFullscreen: de,
279
+ onGeneratePdf: g(V),
280
+ onGenerateCsv: H,
281
+ onGenerateImage: g(j),
282
+ onToggleTable: Y,
283
+ onToggleTooltip: q
284
+ }, ye({ _: 2 }, [
285
+ t.$slots.optionTooltip ? {
286
+ name: "optionTooltip",
287
+ fn: c(() => [
288
+ p(t.$slots, "optionTooltip", {}, void 0, !0)
289
+ ]),
290
+ key: "0"
291
+ } : void 0,
292
+ t.$slots.optionPdf ? {
293
+ name: "optionPdf",
294
+ fn: c(() => [
295
+ p(t.$slots, "optionPdf", {}, void 0, !0)
296
+ ]),
297
+ key: "1"
298
+ } : void 0,
299
+ t.$slots.optionCsv ? {
300
+ name: "optionCsv",
301
+ fn: c(() => [
302
+ p(t.$slots, "optionCsv", {}, void 0, !0)
303
+ ]),
304
+ key: "2"
305
+ } : void 0,
306
+ t.$slots.optionImg ? {
307
+ name: "optionImg",
308
+ fn: c(() => [
309
+ p(t.$slots, "optionImg", {}, void 0, !0)
310
+ ]),
311
+ key: "3"
312
+ } : void 0,
313
+ t.$slots.optionTable ? {
314
+ name: "optionTable",
315
+ fn: c(() => [
316
+ p(t.$slots, "optionTable", {}, void 0, !0)
317
+ ]),
318
+ key: "4"
319
+ } : void 0,
320
+ t.$slots.optionFullscreen ? {
321
+ name: "optionFullscreen",
322
+ fn: c(({ toggleFullscreen: l, isFullscreen: a }) => [
323
+ p(t.$slots, "optionFullscreen", D(G({ toggleFullscreen: l, isFullscreen: a })), void 0, !0)
324
+ ]),
325
+ key: "5"
326
+ } : void 0
327
+ ]), 1032, ["backgroundColor", "color", "isImaging", "isPrinting", "uid", "hasTooltip", "hasPdf", "hasXls", "hasImg", "hasTable", "hasFullscreen", "isFullscreen", "isTooltip", "titles", "chartElement", "onGeneratePdf", "onGenerateImage"])) : y("", !0),
328
+ z.value ? (i(), u("svg", {
329
+ key: 2,
330
+ xmlns: g(xe),
331
+ class: K({ "vue-data-ui-fullscreen--on": L.value, "vue-data-ui-fulscreen--off": !L.value }),
332
+ viewBox: `0 0 ${v.value.width <= 0 ? 10 : v.value.width} ${v.value.height <= 0 ? 10 : v.value.height}`,
333
+ style: P(`max-width:100%;overflow:visible;background:${e.value.style.backgroundColor};color:${e.value.style.color}`)
334
+ }, [
335
+ r("defs", null, [
336
+ r("linearGradient", {
337
+ id: `age_pyramid_left_${b.value}`,
338
+ x1: "0%",
339
+ y1: "0%",
340
+ x2: "100%",
341
+ y2: "0%"
342
+ }, [
343
+ r("stop", {
344
+ offset: "0%",
345
+ "stop-color": e.value.style.layout.bars.left.color
346
+ }, null, 8, Re),
347
+ r("stop", {
348
+ offset: "100%",
349
+ "stop-color": `${g(Z)(e.value.style.layout.bars.left.color, e.value.style.layout.bars.gradient.shiftHue)}${g(B)[100 - e.value.style.layout.bars.gradient.intensity]}`
350
+ }, null, 8, De)
351
+ ], 8, Ne),
352
+ r("linearGradient", {
353
+ id: `age_pyramid_right_${b.value}`,
354
+ x1: "0%",
355
+ y1: "0%",
356
+ x2: "100%",
357
+ y2: "0%"
358
+ }, [
359
+ r("stop", {
360
+ offset: "0%",
361
+ "stop-color": `${g(Z)(e.value.style.layout.bars.right.color, e.value.style.layout.bars.gradient.shiftHue)}${g(B)[100 - e.value.style.layout.bars.gradient.intensity]}`
362
+ }, null, 8, Be),
363
+ r("stop", {
364
+ offset: "100%",
365
+ "stop-color": e.value.style.layout.bars.right.color
366
+ }, null, 8, Ee)
367
+ ], 8, Ge)
368
+ ]),
369
+ (i(!0), u(C, null, S(k.value, (l, a) => (i(), u("g", null, [
370
+ r("rect", {
371
+ x: l.left.x,
372
+ y: l.left.y,
373
+ width: l.left.width <= 0 ? 1e-4 : l.left.width,
374
+ height: l.left.height <= 0 ? 1e-4 : l.left.height,
375
+ fill: e.value.style.layout.bars.gradient.underlayer,
376
+ rx: e.value.style.layout.bars.borderRadius
377
+ }, null, 8, We),
378
+ r("rect", {
379
+ x: l.left.x,
380
+ y: l.left.y,
381
+ width: l.left.width <= 0 ? 1e-4 : l.left.width,
382
+ height: l.left.height <= 0 ? 1e-4 : l.left.height,
383
+ fill: e.value.style.layout.bars.gradient.show ? `url(#age_pyramid_left_${b.value})` : l.left.color,
384
+ rx: e.value.style.layout.bars.borderRadius
385
+ }, null, 8, Xe),
386
+ r("rect", {
387
+ x: l.right.x,
388
+ y: l.right.y,
389
+ width: l.right.width <= 0 ? 1e-4 : l.right.width,
390
+ height: l.right.height <= 0 ? 1e-4 : l.right.height,
391
+ fill: e.value.style.layout.bars.gradient.underlayer,
392
+ rx: e.value.style.layout.bars.borderRadius
393
+ }, null, 8, Ue),
394
+ r("rect", {
395
+ x: l.right.x,
396
+ y: l.right.y,
397
+ width: l.right.width <= 0 ? 1e-4 : l.right.width,
398
+ height: l.right.height <= 0 ? 1e-4 : l.right.height,
399
+ fill: e.value.style.layout.bars.gradient.show ? `url(#age_pyramid_right_${b.value})` : l.right.color,
400
+ rx: e.value.style.layout.bars.borderRadius
401
+ }, null, 8, Ve)
402
+ ]))), 256)),
403
+ r("g", null, [
404
+ e.value.style.layout.dataLabels.sideTitles.show ? (i(), u("g", je, [
405
+ r("text", {
406
+ x: o.value.left,
407
+ y: o.value.top + e.value.style.layout.dataLabels.sideTitles.offsetY,
408
+ fill: e.value.style.layout.dataLabels.sideTitles.useSideColor ? e.value.style.layout.bars.left.color : e.value.style.layout.dataLabels.sideTitles.color,
409
+ "font-size": e.value.style.layout.dataLabels.sideTitles.fontSize,
410
+ "text-anchor": "start",
411
+ "font-weight": e.value.style.layout.dataLabels.sideTitles.bold ? "bold" : "normal"
412
+ }, m(e.value.translations.female), 9, He),
413
+ r("text", {
414
+ x: o.value.right,
415
+ y: o.value.top + e.value.style.layout.dataLabels.sideTitles.offsetY,
416
+ fill: e.value.style.layout.dataLabels.sideTitles.useSideColor ? e.value.style.layout.bars.right.color : e.value.style.layout.dataLabels.sideTitles.color,
417
+ "font-size": e.value.style.layout.dataLabels.sideTitles.fontSize,
418
+ "text-anchor": "end",
419
+ "font-weight": e.value.style.layout.dataLabels.sideTitles.bold ? "bold" : "normal"
420
+ }, m(e.value.translations.male), 9, Ye)
421
+ ])) : y("", !0),
422
+ e.value.style.layout.dataLabels.yAxis.show ? (i(), u("g", qe, [
423
+ (i(!0), u(C, null, S(ie.value, (l, a) => (i(), u(C, null, [
424
+ a % e.value.style.layout.dataLabels.yAxis.showEvery === 0 ? (i(), u("text", {
425
+ key: 0,
426
+ x: o.value.centerX,
427
+ y: o.value.top + o.value.height / _.value * a + e.value.style.layout.dataLabels.yAxis.fontSize / 3,
428
+ "text-anchor": "middle",
429
+ "font-size": e.value.style.layout.dataLabels.yAxis.fontSize,
430
+ fill: e.value.style.layout.dataLabels.yAxis.color,
431
+ "font-weight": e.value.style.layout.dataLabels.yAxis.bold ? "bold" : "normal"
432
+ }, m(l), 9, Je)) : y("", !0)
433
+ ], 64))), 256))
434
+ ])) : y("", !0),
435
+ e.value.style.layout.dataLabels.xAxis.show ? (i(), u("g", Ke, [
436
+ e.value.style.layout.grid.show ? (i(), u("g", Qe, [
437
+ r("line", {
438
+ x1: w.value.right[0].x,
439
+ x2: w.value.right.at(-1).x,
440
+ y1: o.value.bottom + e.value.style.layout.dataLabels.xAxis.fontSize / 2,
441
+ y2: o.value.bottom + e.value.style.layout.dataLabels.xAxis.fontSize / 2,
442
+ stroke: e.value.style.layout.grid.stroke,
443
+ "stroke-width": e.value.style.layout.grid.strokeWidth,
444
+ "stroke-linecap": "round"
445
+ }, null, 8, Ze),
446
+ r("line", {
447
+ x1: w.value.left[0].x,
448
+ x2: w.value.left.at(-1).x,
449
+ y1: o.value.bottom + e.value.style.layout.dataLabels.xAxis.fontSize / 2,
450
+ y2: o.value.bottom + e.value.style.layout.dataLabels.xAxis.fontSize / 2,
451
+ stroke: e.value.style.layout.grid.stroke,
452
+ "stroke-width": e.value.style.layout.grid.strokeWidth,
453
+ "stroke-linecap": "round"
454
+ }, null, 8, et)
455
+ ])) : y("", !0),
456
+ (i(!0), u(C, null, S(w.value.right, (l) => (i(), u("g", null, [
457
+ e.value.style.layout.grid.show ? (i(), u("line", {
458
+ key: 0,
459
+ x1: l.x,
460
+ x2: l.x,
461
+ y1: o.value.bottom + e.value.style.layout.dataLabels.xAxis.fontSize / 2,
462
+ y2: o.value.bottom + e.value.style.layout.dataLabels.xAxis.fontSize / 4,
463
+ stroke: e.value.style.layout.grid.stroke,
464
+ "stroke-width": e.value.style.layout.grid.strokeWidth,
465
+ "stroke-linecap": "round"
466
+ }, null, 8, tt)) : y("", !0),
467
+ r("text", {
468
+ x: l.x,
469
+ y: o.value.bottom + e.value.style.layout.dataLabels.xAxis.fontSize * 2,
470
+ "font-size": e.value.style.layout.dataLabels.xAxis.fontSize,
471
+ fill: e.value.style.layout.dataLabels.xAxis.color,
472
+ "text-anchor": "middle",
473
+ "font-weight": e.value.style.layout.dataLabels.xAxis.bold ? "bold" : "normal"
474
+ }, m(Number((l.value / e.value.style.layout.dataLabels.xAxis.scale).toFixed(0)).toLocaleString()), 9, lt)
475
+ ]))), 256)),
476
+ (i(!0), u(C, null, S(w.value.left, (l) => (i(), u("g", null, [
477
+ e.value.style.layout.grid.show ? (i(), u("line", {
478
+ key: 0,
479
+ x1: l.x,
480
+ x2: l.x,
481
+ y1: o.value.bottom + e.value.style.layout.dataLabels.xAxis.fontSize / 2,
482
+ y2: o.value.bottom + e.value.style.layout.dataLabels.xAxis.fontSize / 4,
483
+ stroke: e.value.style.layout.grid.stroke,
484
+ "stroke-width": e.value.style.layout.grid.strokeWidth,
485
+ "stroke-linecap": "round"
486
+ }, null, 8, at)) : y("", !0),
487
+ r("text", {
488
+ x: l.x,
489
+ y: o.value.bottom + e.value.style.layout.dataLabels.xAxis.fontSize * 2,
490
+ "font-size": e.value.style.layout.dataLabels.xAxis.fontSize,
491
+ fill: e.value.style.layout.dataLabels.xAxis.color,
492
+ "text-anchor": "middle",
493
+ "font-weight": e.value.style.layout.dataLabels.xAxis.bold ? "bold" : "normal"
494
+ }, m(Number((l.value / e.value.style.layout.dataLabels.xAxis.scale).toFixed(0)).toLocaleString()), 9, ot)
495
+ ]))), 256)),
496
+ r("text", {
497
+ x: o.value.right,
498
+ y: v.value.height,
499
+ "text-anchor": "end",
500
+ "font-size": e.value.style.layout.dataLabels.xAxis.fontSize,
501
+ fill: e.value.style.layout.dataLabels.xAxis.color,
502
+ "font-weight": e.value.style.layout.dataLabels.xAxis.bold ? "bold" : "normal"
503
+ }, m(e.value.style.layout.dataLabels.xAxis.translation), 9, st)
504
+ ])) : y("", !0)
505
+ ]),
506
+ (i(!0), u(C, null, S(E.dataset, (l, a) => (i(), u("g", null, [
507
+ r("rect", {
508
+ x: o.value.left,
509
+ y: o.value.top + o.value.height / _.value * a - e.value.style.layout.bars.gap / 2,
510
+ width: o.value.width <= 0 ? 1e-4 : o.value.width,
511
+ height: o.value.height / _.value <= 0 ? 1e-4 : o.value.height / _.value,
512
+ fill: A.value !== null && A.value === a ? `${e.value.style.highlighter.color}${g(B)[e.value.style.highlighter.opacity]}` : "transparent",
513
+ onMouseover: (n) => ne(a, l),
514
+ onMouseleave: s[0] || (s[0] = (n) => {
515
+ A.value = null, I.value = !1;
516
+ })
517
+ }, null, 40, it)
518
+ ]))), 256)),
519
+ p(t.$slots, "svg", { svg: v.value }, void 0, !0)
520
+ ], 14, Pe)) : y("", !0),
521
+ z.value ? y("", !0) : (i(), R(Fe, {
522
+ key: 3,
523
+ config: {
524
+ type: "pyramid",
525
+ style: {
526
+ backgroundColor: e.value.style.backgroundColor,
527
+ pyramid: {
528
+ color: "#CCCCCC"
529
+ }
530
+ }
531
+ }
532
+ }, null, 8, ["config"])),
533
+ p(t.$slots, "legend", { legend: k.value }, void 0, !0),
534
+ N(ze, {
535
+ show: x.value.showTooltip && I.value,
536
+ backgroundColor: e.value.style.tooltip.backgroundColor,
537
+ color: e.value.style.tooltip.color,
538
+ borderRadius: e.value.style.tooltip.borderRadius,
539
+ borderColor: e.value.style.tooltip.borderColor,
540
+ borderWidth: e.value.style.tooltip.borderWidth,
541
+ fontSize: e.value.style.tooltip.fontSize,
542
+ backgroundOpacity: e.value.style.tooltip.backgroundOpacity,
543
+ parent: $.value,
544
+ content: M.value,
545
+ isCustom: e.value.style.tooltip.customFormat && typeof e.value.style.tooltip.customFormat == "function"
546
+ }, {
547
+ "tooltip-before": c(() => [
548
+ p(t.$slots, "tooltip-before", D(G({ ...O.value })), void 0, !0)
549
+ ]),
550
+ "tooltip-after": c(() => [
551
+ p(t.$slots, "tooltip-after", D(G({ ...O.value })), void 0, !0)
552
+ ]),
553
+ _: 3
554
+ }, 8, ["show", "backgroundColor", "color", "borderRadius", "borderColor", "borderWidth", "fontSize", "backgroundOpacity", "parent", "content", "isCustom"]),
555
+ z.value ? (i(), R(Ie, {
556
+ key: 4,
557
+ hideDetails: "",
558
+ config: {
559
+ open: x.value.showTable,
560
+ maxHeight: 1e4,
561
+ body: {
562
+ backgroundColor: e.value.style.backgroundColor,
563
+ color: e.value.style.color
564
+ },
565
+ head: {
566
+ backgroundColor: e.value.style.backgroundColor,
567
+ color: e.value.style.color
568
+ }
569
+ }
570
+ }, {
571
+ content: c(() => [
572
+ N(Ae, {
573
+ colNames: F.value.colNames,
574
+ head: F.value.head,
575
+ body: F.value.body,
576
+ config: F.value.config,
577
+ title: `${e.value.style.title.text}${e.value.style.title.subtitle.text ? ` : ${e.value.style.title.subtitle.text}` : ""}`,
578
+ onClose: s[1] || (s[1] = (l) => x.value.showTable = !1)
579
+ }, {
580
+ th: c(({ th: l }) => [
581
+ Q(m(l), 1)
582
+ ]),
583
+ td: c(({ td: l }) => [
584
+ Q(m(l), 1)
585
+ ]),
586
+ _: 1
587
+ }, 8, ["colNames", "head", "body", "config", "title"])
588
+ ]),
589
+ _: 1
590
+ }, 8, ["config"])) : y("", !0)
591
+ ], 14, Oe));
592
+ }
593
+ }, xt = /* @__PURE__ */ Me(ut, [["__scopeId", "data-v-44b2f1f2"]]);
594
+ export {
595
+ xt as default
596
+ };