vue-data-ui 3.0.23 → 3.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (108) hide show
  1. package/dist/{Arrow-B1Op9F3x.js → Arrow-DvG07exK.js} +1 -1
  2. package/dist/{BaseDraggableDialog-B4OaMIom.js → BaseDraggableDialog-O7900pGp.js} +72 -59
  3. package/dist/{BaseIcon-CgUOIGjr.js → BaseIcon-DHtro8us.js} +1 -1
  4. package/dist/{useLoading-D7YHNtLX.js → BaseScanner-BgWxam9d.js} +11 -11
  5. package/dist/{ColorPicker-C0nf8VH0.js → ColorPicker-CpWzNn4r.js} +2 -2
  6. package/dist/DataTable-DJjA2_wf.js +140 -0
  7. package/dist/{Legend-CyYXMSsW.js → Legend-2-dC7DVb.js} +2 -2
  8. package/dist/{NonSvgPenAndPaper-D63qeScu.js → NonSvgPenAndPaper-DHeE4Yuv.js} +3 -3
  9. package/dist/{PackageVersion-B6M-3jRt.js → PackageVersion-DU12WH3O.js} +1 -1
  10. package/dist/{PenAndPaper-zym5uEeN.js → PenAndPaper-B7QEDgx4.js} +3 -3
  11. package/dist/{Shape-CYVs2kYz.js → Shape-Dj2Hl33H.js} +1 -1
  12. package/dist/{Slicer-BTIFUO4x.js → Slicer-D99HytqX.js} +2 -2
  13. package/dist/{SparkTooltip-CNz7AYUL.js → SparkTooltip-B-wL07rI.js} +1 -1
  14. package/dist/{Title-D_e0SFWS.js → Title-Dq2_Z9kR.js} +1 -1
  15. package/dist/{Tooltip-DjVoFYj1.js → Tooltip-Y219DXZO.js} +1 -1
  16. package/dist/{UserOptions-z0NWZ7aQ.js → UserOptions-BuGfCdAY.js} +2 -2
  17. package/dist/{dom-to-png-DD0au3Qz.js → dom-to-png-BhciAKaM.js} +1 -1
  18. package/dist/{img-z5p1gGfY.js → img-JOqdlnUs.js} +1 -1
  19. package/dist/{index-BEuUtONc.js → index-CDQbCd41.js} +37 -2
  20. package/dist/{pdf-BmUjVBni.js → pdf-Dd-LIJqz.js} +1 -1
  21. package/dist/style.css +1 -1
  22. package/dist/types/vue-data-ui.d.cts +35 -0
  23. package/dist/types/vue-data-ui.d.ts +35 -0
  24. package/dist/{useAutoSizeLabelsInsideViewbox-CchB8S-o.js → useAutoSizeLabelsInsideViewbox-Bky5KGFZ.js} +1 -1
  25. package/dist/{useNestedProp-DhLFhguL.js → useNestedProp-BPEHGiYX.js} +1 -1
  26. package/dist/{usePrinter-DiB0_UNt.js → usePrinter-Bnl1YeUU.js} +2 -2
  27. package/dist/{vue-data-ui-DJIAas-7.js → vue-data-ui-DcNYz3cZ.js} +64 -64
  28. package/dist/vue-data-ui.js +1 -1
  29. package/dist/vue-ui-3d-bar-BNIFAeN-.js +1369 -0
  30. package/dist/{vue-ui-accordion-B4YfUjZ5.js → vue-ui-accordion-Bf_LHFFX.js} +3 -3
  31. package/dist/{vue-ui-age-pyramid-CkXXNN79.js → vue-ui-age-pyramid-Bz-l1afR.js} +333 -286
  32. package/dist/{vue-ui-annotator-DnSsIkvU.js → vue-ui-annotator-BcfRH2BF.js} +2 -2
  33. package/dist/{vue-ui-bullet-kZkBsWPY.js → vue-ui-bullet-DK1aM9fX.js} +8 -8
  34. package/dist/{vue-ui-candlestick-CIn0xZm0.js → vue-ui-candlestick-D6mMjvtu.js} +453 -406
  35. package/dist/{vue-ui-carousel-table-f1FDOAqH.js → vue-ui-carousel-table-Vp5f238W.js} +4 -4
  36. package/dist/{vue-ui-chestnut-B-jSj7FT.js → vue-ui-chestnut-BKc4v-lf.js} +509 -459
  37. package/dist/vue-ui-chord-CquhRjf0.js +1100 -0
  38. package/dist/vue-ui-circle-pack-D6zLgxa3.js +755 -0
  39. package/dist/{vue-ui-cursor-DdBrui6i.js → vue-ui-cursor-DIXb2S93.js} +2 -2
  40. package/dist/{vue-ui-dashboard-DSUfW7mI.js → vue-ui-dashboard-DmiriAK7.js} +62 -62
  41. package/dist/{vue-ui-digits-Cb3Wq5WR.js → vue-ui-digits-CLAIo9gW.js} +2 -2
  42. package/dist/{vue-ui-donut-BCZqlAO3.js → vue-ui-donut-C8h_tCSO.js} +477 -431
  43. package/dist/{vue-ui-donut-evolution-HmQBq9VP.js → vue-ui-donut-evolution-C3r0YhKz.js} +482 -435
  44. package/dist/{vue-ui-dumbbell-B5w2oqNO.js → vue-ui-dumbbell-D-t4M00E.js} +443 -398
  45. package/dist/vue-ui-flow-D7_D_UNm.js +900 -0
  46. package/dist/vue-ui-funnel-B0QOfZRz.js +666 -0
  47. package/dist/vue-ui-galaxy-Ccw5uNes.js +744 -0
  48. package/dist/{vue-ui-gauge-C_KLPWk2.js → vue-ui-gauge-DvW7nFmK.js} +8 -8
  49. package/dist/{vue-ui-gizmo-CsPX25Ti.js → vue-ui-gizmo-WGQxvGPy.js} +4 -4
  50. package/dist/vue-ui-heatmap-BQkLujyp.js +1127 -0
  51. package/dist/{vue-ui-history-plot-DgpYiaUD.js → vue-ui-history-plot-eU33r_Ot.js} +408 -361
  52. package/dist/{vue-ui-kpi-DOgibU7W.js → vue-ui-kpi-CKg2i71M.js} +3 -3
  53. package/dist/{vue-ui-mini-loader-BjsQAxDx.js → vue-ui-mini-loader-BmkGQsm_.js} +2 -2
  54. package/dist/vue-ui-molecule-Dlu0hjSg.js +702 -0
  55. package/dist/{vue-ui-mood-radar-DMwVl3wz.js → vue-ui-mood-radar-DQaxfw9R.js} +342 -291
  56. package/dist/{vue-ui-nested-donuts-H0GzIAF0.js → vue-ui-nested-donuts-Djj9Aw_i.js} +548 -502
  57. package/dist/{vue-ui-onion-A6nKcus1.js → vue-ui-onion-ZgsErXis.js} +363 -317
  58. package/dist/vue-ui-parallel-coordinate-plot-B5fB22Jc.js +979 -0
  59. package/dist/vue-ui-quadrant-CMevCtXH.js +1483 -0
  60. package/dist/{vue-ui-quick-chart-mwXE3w_o.js → vue-ui-quick-chart-DcparKSX.js} +7 -7
  61. package/dist/vue-ui-radar-DFbxoKCK.js +858 -0
  62. package/dist/{vue-ui-rating-CleNHFo5.js → vue-ui-rating-ZUpxCWrk.js} +2 -2
  63. package/dist/{vue-ui-relation-circle-CMCH7Ia6.js → vue-ui-relation-circle-eNKJY4Sx.js} +8 -8
  64. package/dist/vue-ui-ridgeline-D4shpQZd.js +1204 -0
  65. package/dist/vue-ui-rings-TdTHMbsa.js +785 -0
  66. package/dist/{vue-ui-scatter-kv28dsT3.js → vue-ui-scatter-CVuV9ljU.js} +594 -548
  67. package/dist/{vue-ui-skeleton-DCNOYh9x.js → vue-ui-skeleton-CFxBU2-p.js} +3 -3
  68. package/dist/{vue-ui-smiley-DcS0CM-z.js → vue-ui-smiley-Har3B3aQ.js} +2 -2
  69. package/dist/{vue-ui-spark-trend-LHgReXth.js → vue-ui-spark-trend-FPk-XEwI.js} +4 -4
  70. package/dist/{vue-ui-sparkbar-Da315uRq.js → vue-ui-sparkbar-V3eJ0w0t.js} +4 -4
  71. package/dist/{vue-ui-sparkgauge-BeAkjGap.js → vue-ui-sparkgauge-DKTGkWnJ.js} +4 -4
  72. package/dist/{vue-ui-sparkhistogram-Cy19W3y1.js → vue-ui-sparkhistogram-DJsgFwHs.js} +5 -5
  73. package/dist/{vue-ui-sparkline-IjlQWgs3.js → vue-ui-sparkline-Dmrm5SL5.js} +4 -4
  74. package/dist/{vue-ui-sparkstackbar-CoFgOa3r.js → vue-ui-sparkstackbar-B0Pl7VMI.js} +4 -4
  75. package/dist/{vue-ui-stackbar-fbCs4sHF.js → vue-ui-stackbar-CNsgBPhj.js} +525 -479
  76. package/dist/{vue-ui-strip-plot-Cm8Zr6RE.js → vue-ui-strip-plot-CYAWwYOM.js} +390 -343
  77. package/dist/{vue-ui-table-q7jWgS26.js → vue-ui-table-Dn6H98rP.js} +3 -3
  78. package/dist/{vue-ui-table-heatmap-CsK9gR1G.js → vue-ui-table-heatmap-COI9LRqC.js} +5 -5
  79. package/dist/{vue-ui-table-sparkline-CXTPucPr.js → vue-ui-table-sparkline-B7Gg5FfJ.js} +4 -4
  80. package/dist/{vue-ui-thermometer-BFxdNgrd.js → vue-ui-thermometer-Bgynq5El.js} +8 -8
  81. package/dist/{vue-ui-timer-BsoeDFjK.js → vue-ui-timer-CXng51v5.js} +5 -5
  82. package/dist/{vue-ui-tiremarks-BW_jSayT.js → vue-ui-tiremarks-Cy1U3hO1.js} +7 -7
  83. package/dist/vue-ui-treemap-BsvIvRmE.js +1092 -0
  84. package/dist/{vue-ui-vertical-bar-OrLV4CxH.js → vue-ui-vertical-bar-DHqWeDIf.js} +512 -464
  85. package/dist/{vue-ui-waffle-BA6rNfVs.js → vue-ui-waffle-D1Mscj3N.js} +416 -370
  86. package/dist/{vue-ui-wheel-B_BkI-5f.js → vue-ui-wheel-DpV-N5tF.js} +7 -7
  87. package/dist/vue-ui-word-cloud-MaNQ3Kdk.js +811 -0
  88. package/dist/{vue-ui-world-B4mKuSSn.js → vue-ui-world-DYz6zw3x.js} +512 -466
  89. package/dist/{vue-ui-xy-m1SWJk77.js → vue-ui-xy-B1nqNbzw.js} +1551 -1500
  90. package/dist/vue-ui-xy-canvas-D4wd-Asd.js +1291 -0
  91. package/package.json +1 -1
  92. package/dist/DataTable-nO6ydJO2.js +0 -133
  93. package/dist/vue-ui-3d-bar-B56WqLJ-.js +0 -1323
  94. package/dist/vue-ui-chord-Ck4yV3Tb.js +0 -1049
  95. package/dist/vue-ui-circle-pack-BAfRk_Hd.js +0 -709
  96. package/dist/vue-ui-flow-BXkxtUoF.js +0 -852
  97. package/dist/vue-ui-funnel-DFvDO--q.js +0 -620
  98. package/dist/vue-ui-galaxy-BXNLLc3U.js +0 -691
  99. package/dist/vue-ui-heatmap-BHq6hBaL.js +0 -1078
  100. package/dist/vue-ui-molecule-BtyMTwEn.js +0 -656
  101. package/dist/vue-ui-parallel-coordinate-plot-DZ9_0F5c.js +0 -927
  102. package/dist/vue-ui-quadrant-CUggSeUN.js +0 -1432
  103. package/dist/vue-ui-radar-BRKZ8e_X.js +0 -807
  104. package/dist/vue-ui-ridgeline-xW7UrSfR.js +0 -1157
  105. package/dist/vue-ui-rings-D3NfFMaO.js +0 -739
  106. package/dist/vue-ui-treemap-DhAYSVB9.js +0 -1046
  107. package/dist/vue-ui-word-cloud-CrSLGFOK.js +0 -765
  108. package/dist/vue-ui-xy-canvas-CX2JT6T3.js +0 -1243
@@ -1,1078 +0,0 @@
1
- import { useCssVars as Bt, defineAsyncComponent as ve, computed as g, ref as c, shallowRef as nt, toRefs as Ut, watch as Re, onBeforeUnmount as Fe, onMounted as Yt, watchEffect as Ne, reactive as rt, createElementBlock as n, openBlock as u, normalizeStyle as k, normalizeClass as ce, createBlock as de, createCommentVNode as p, createElementVNode as h, createVNode as He, unref as i, createSlots as Gt, withCtx as O, renderSlot as T, normalizeProps as Z, guardReactiveProps as ee, Fragment as L, renderList as R, withDirectives as vt, createTextVNode as ct, toDisplayString as z, vShow as Wt, withKeys as jt, nextTick as qt } from "vue";
2
- import { u as Kt, c as Xe, t as Jt, b as Qt, C as Zt, o as dt, f as yt, P as ye, g as el, X as tl, F as xe, k as E, i as H, h as D, v as ll, w as al, y as ol, z as sl } from "./index-BEuUtONc.js";
3
- import { u as ht } from "./useNestedProp-DhLFhguL.js";
4
- import { u as ul } from "./usePrinter-DiB0_UNt.js";
5
- import { u as il } from "./useUserOptionState-BIvW1Kz7.js";
6
- import { u as nl } from "./useChartAccessibility-9icAAmYg.js";
7
- import rl from "./vue-ui-accordion-B4YfUjZ5.js";
8
- import vl from "./Title-D_e0SFWS.js";
9
- import cl from "./img-z5p1gGfY.js";
10
- import { t as we, u as dl } from "./useResponsive-DfdjqQps.js";
11
- import { u as ft } from "./useTimeLabelCollider-CIsgDrl9.js";
12
- import { u as pt } from "./useTimeLabels-BGFjWgrv.js";
13
- import { u as yl, B as hl } from "./useLoading-D7YHNtLX.js";
14
- import { _ as fl } from "./_plugin-vue_export-helper-CHgC5LLL.js";
15
- const pl = {
16
- mounted(b, X) {
17
- gt(b, X.value);
18
- },
19
- updated(b, X) {
20
- gt(b, X.value);
21
- }
22
- };
23
- function gt(b, {
24
- cellWidth: X,
25
- cellHeight: he,
26
- maxFontSize: Y,
27
- minFontSize: fe,
28
- index: $,
29
- reportRotation: te,
30
- reportHide: P,
31
- rotateAll: ke,
32
- hideAll: C
33
- }) {
34
- b.removeAttribute("transform"), b.removeAttribute("visibility");
35
- let le = !1, G = !1;
36
- b.setAttribute("font-size", Y);
37
- const W = b.getComputedTextLength();
38
- if (W <= X)
39
- te($, !1), P($, !1);
40
- else {
41
- const w = Math.floor(Y * X / W);
42
- w >= fe ? (b.setAttribute("font-size", w), te($, !1), P($, !1)) : (te($, !0), P($, !1), le = !0);
43
- }
44
- if (ke && (le = !0), le) {
45
- b.setAttribute("font-size", Y);
46
- const w = b.getBBox(), Ae = w.x + w.width / 2, ae = w.y + w.height / 2;
47
- b.setAttribute("transform", `rotate(-90 ${Ae} ${ae})`);
48
- const j = b.getBBox().width;
49
- if (j <= he)
50
- P($, !1);
51
- else {
52
- const oe = Math.floor(Y * he / j);
53
- oe >= fe ? (b.setAttribute("font-size", oe), P($, !1)) : (G = !0, P($, !0));
54
- }
55
- }
56
- (C || G) && b.setAttribute("visibility", "hidden");
57
- }
58
- const gl = ["id"], bl = ["xmlns", "viewBox"], ml = ["x", "y", "width", "height"], xl = ["x", "y", "height", "width", "fill", "stroke", "stroke-width"], wl = ["x", "y", "height", "width", "fill", "stroke", "stroke-width"], kl = ["x", "y", "width", "height", "fill", "stroke", "stroke-width"], Al = ["x", "y", "width", "height", "fill", "stroke", "stroke-width", "onMouseover", "onMouseout", "onClick"], Ll = ["font-size", "font-weight", "fill", "x", "y"], Cl = ["x", "y", "width", "height", "fill", "stroke", "stroke-width"], Tl = ["x", "y", "width", "height", "fill", "stroke", "stroke-width"], _l = ["font-size", "fill", "x", "y", "font-weight"], zl = ["font-size", "fill", "x", "y", "font-weight"], Sl = ["text-anchor", "font-size", "fill", "font-weight", "transform"], $l = ["text-anchor", "font-size", "fill", "font-weight", "transform"], Ml = { key: 6 }, Ol = ["x", "y", "width", "height", "stroke", "stroke-width"], Rl = { class: "vue-ui-heatmap-legend-gauge-right" }, Fl = ["data-value"], Nl = { class: "vue-ui-heatmap-gauge-indicator-value" }, Hl = {
59
- key: 4,
60
- class: "vue-data-ui-watermark"
61
- }, Xl = { class: "vue-ui-data-table" }, Pl = { key: 0 }, Il = ["data-cell"], Vl = { style: { display: "flex", "align-items": "center", gap: "5px", "justify-content": "flex-end", width: "100%", "padding-right": "3px" } }, El = ["data-cell"], Dl = { style: { display: "flex", "align-items": "center", gap: "5px", "justify-content": "flex-end", width: "100%", "padding-right": "3px" } }, Bl = {
62
- __name: "vue-ui-heatmap",
63
- props: {
64
- config: {
65
- type: Object,
66
- default() {
67
- return {};
68
- }
69
- },
70
- dataset: {
71
- type: Array,
72
- default() {
73
- return [];
74
- }
75
- }
76
- },
77
- emits: ["selectDatapoint"],
78
- setup(b, { expose: X, emit: he }) {
79
- Bt((t) => ({
80
- "6eaf1725": t.tdo
81
- }));
82
- const Y = ve(() => import("./BaseIcon-CgUOIGjr.js")), fe = ve(() => import("./PackageVersion-B6M-3jRt.js")), $ = ve(() => import("./PenAndPaper-zym5uEeN.js")), te = ve(() => import("./Tooltip-DjVoFYj1.js")), P = ve(() => import("./UserOptions-z0NWZ7aQ.js")), { vue_ui_heatmap: ke } = Kt(), C = b, le = he, G = g({
83
- get() {
84
- return !!C.dataset && C.dataset.length;
85
- },
86
- set(t) {
87
- return t;
88
- }
89
- }), W = c(Xe()), w = c(null), Ae = c(null), ae = c(!1), j = c(""), oe = c(void 0), se = c(null), Pe = c(0), Le = c(null), Ie = c(!1), Ve = c(0), bt = c(null), Ee = c(null), De = c(null), mt = c(null), Be = c(null), xt = c(null), Ce = c(null), Te = c(null), wt = c(null), Ue = c(null), q = nt(null), e = c(Se());
90
- function kt() {
91
- const t = Array(7).fill("_"), a = [], o = 14, s = t.length;
92
- for (let d = 0; d < s; d += 1) {
93
- const v = [];
94
- for (let x = 0; x < o; x += 1)
95
- v.push(d + x * 2);
96
- a.push({
97
- name: `${t[d]}`,
98
- values: v
99
- });
100
- }
101
- return a;
102
- }
103
- const { loading: pe, FINAL_DATASET: m, manualLoading: _e } = yl({
104
- ...Ut(C),
105
- FINAL_CONFIG: e,
106
- prepareConfig: Se,
107
- skeletonDataset: kt(),
108
- skeletonConfig: Jt({
109
- defaultConfig: e.value,
110
- userConfig: {
111
- table: { show: !1 },
112
- userOptions: { show: !1 },
113
- style: {
114
- backgroundColor: "#99999930",
115
- layout: {
116
- cells: {
117
- colors: {
118
- hot: "#999999",
119
- cold: "#CACACA"
120
- },
121
- columnTotal: { value: { show: !1 } },
122
- rowTotal: { value: { show: !1 } },
123
- value: { show: !1 }
124
- },
125
- dataLabels: {
126
- xAxis: { show: !1 },
127
- yAxis: { show: !1 }
128
- }
129
- }
130
- }
131
- }
132
- })
133
- }), { userOptionsVisible: ze, setUserOptionsVisibility: At, keepUserOptionState: Ye } = il({ config: e.value }), { svgRef: Ge } = nl({ config: e.value.style.title });
134
- function We(t) {
135
- At(t);
136
- }
137
- function Se() {
138
- const t = ht({
139
- userConfig: C.config,
140
- defaultConfig: ke
141
- });
142
- let a = {};
143
- return t.theme ? a = {
144
- ...ht({
145
- userConfig: Qt.vue_ui_heatmap[t.theme] || C.config,
146
- defaultConfig: t
147
- })
148
- } : a = t, C.config && Zt(C.config, "style.layout.dataLabels.xAxis.showOnlyAtModulo") ? a.style.layout.dataLabels.xAxis.showOnlyAtModulo = C.config.style.layout.dataLabels.xAxis.showOnlyAtModulo : a.style.layout.dataLabels.xAxis.showOnlyAtModulo = null, a;
149
- }
150
- Re(() => C.config, (t) => {
151
- pe.value || (e.value = Se()), ze.value = !e.value.userOptions.showOnChartHover, $e(), Ve.value += 1, S.value.showTable = e.value.table.show, S.value.showTooltip = e.value.style.tooltip.show, ue.value = e.value.style.layout.width, ie.value = e.value.style.layout.height;
152
- }, { deep: !0 }), Re(() => C.dataset, (t) => {
153
- Array.isArray(t) && t.length > 0 && (_e.value = !1), $e();
154
- }, { deep: !0 });
155
- const { isPrinting: je, isImaging: qe, generatePdf: Ke, generateImage: Je } = ul({
156
- elementId: `heatmap__${W.value}`,
157
- fileName: e.value.style.title.text || "vue-ui-heatmap",
158
- options: e.value.userOptions.print
159
- }), Lt = g(() => e.value.userOptions.show && !e.value.style.title.text), S = c({
160
- showTable: e.value.table.show,
161
- showTooltip: e.value.style.tooltip.show
162
- });
163
- Re(e, () => {
164
- S.value = {
165
- showTable: e.value.table.show,
166
- showTooltip: e.value.style.tooltip.show
167
- };
168
- }, { immediate: !0 });
169
- const Ct = g(() => e.value.table.responsiveBreakpoint), K = nt(null);
170
- function Tt() {
171
- K.value && K.value.disconnect(), K.value = new ResizeObserver((t) => {
172
- t.forEach((a) => {
173
- Ie.value = a.contentRect.width < Ct.value;
174
- });
175
- }), Le.value && K.value.observe(Le.value);
176
- }
177
- Fe(() => {
178
- K.value && K.value.disconnect();
179
- });
180
- const I = c(null), Qe = g(() => !!e.value.debug);
181
- function $e() {
182
- if (dt(C.dataset) && (yt({
183
- componentName: "VueUiHeatmap",
184
- type: "dataset",
185
- debug: Qe.value
186
- }), G.value = !1, _e.value = !0), dt(C.dataset) || (_e.value = e.value.loading), e.value.responsive) {
187
- const t = we(() => {
188
- const { width: a, height: o } = dl({
189
- chart: w.value,
190
- title: e.value.style.title.text ? Ee.value : null,
191
- // add legend hirizontal in legend attr
192
- // add legend vertical in some other attr and modify composable to subtract width
193
- source: Ue.value,
194
- noTitle: De.value
195
- });
196
- requestAnimationFrame(() => {
197
- ue.value = a, ie.value = o;
198
- });
199
- });
200
- I.value && (q.value && I.value.unobserve(q.value), I.value.disconnect()), I.value = new ResizeObserver(t), q.value = w.value.parentNode, I.value.observe(q.value);
201
- }
202
- Tt();
203
- }
204
- Fe(() => {
205
- I.value && (q.value && I.value.unobserve(q.value), I.value.disconnect());
206
- }), Yt(() => {
207
- $e();
208
- });
209
- const F = g(() => Math.max(...m.value.flatMap((t) => (t.values || []).length))), ue = c(e.value.style.layout.width), ie = c(e.value.style.layout.height), _ = g(() => ({
210
- width: Math.max(10, ue.value),
211
- height: Math.max(10, ie.value)
212
- })), ne = c(0), _t = we((t) => {
213
- ne.value = t;
214
- }, 100);
215
- Ne((t) => {
216
- const a = Ce.value;
217
- if (!a) return;
218
- const o = new ResizeObserver((s) => {
219
- _t(s[0].contentRect.height);
220
- });
221
- o.observe(a), t(() => o.disconnect());
222
- });
223
- const J = c(0), zt = we((t) => {
224
- J.value = t;
225
- }, 100);
226
- Ne((t) => {
227
- const a = Be.value;
228
- if (!a) return;
229
- const o = new ResizeObserver((s) => {
230
- zt(s[0].contentRect.width);
231
- });
232
- o.observe(a), t(() => o.disconnect());
233
- });
234
- const ge = c(0), St = we((t) => {
235
- ge.value = t;
236
- }, 100);
237
- Ne((t) => {
238
- const a = Te.value;
239
- if (!a) return;
240
- const o = new ResizeObserver((s) => {
241
- St(s[0].contentRect.height);
242
- });
243
- o.observe(a), t(() => o.disconnect());
244
- }), Fe(() => {
245
- ne.value = 0, J.value = 0, ge.value = 0;
246
- });
247
- const r = g(() => Math.min(_.value.height, _.value.width) / 1e3 * e.value.style.layout.cells.spacing), l = g(() => {
248
- let t = 0;
249
- e.value.style.legend.show && (t = e.value.style.legend.width);
250
- const a = e.value.style.layout.padding, o = e.value.style.layout.dataLabels.xAxis.fontSize / 3, s = e.value.style.layout.dataLabels.xAxis.fontSize / 2, d = _.value.height - a.top - a.bottom - ne.value - o, v = _.value.width / 60, x = {
251
- x: r.value * F.value,
252
- y: r.value * ((m.value || []).length + 1)
253
- }, N = _.value.width - a.left - a.right - x.x - v * 2 - 2 - t - J.value, y = d - v - x.y - ge.value - s - e.value.style.layout.cells.columnTotal.value.offsetY, A = {
254
- width: Math.max(3, N / F.value),
255
- height: Math.max(3, y / (m.value.length ?? 1))
256
- };
257
- return {
258
- top: a.top + ne.value + v + o,
259
- topLabelsHeight: ne.value,
260
- sumCellXHeight: v,
261
- height: y,
262
- left: a.left + J.value + v / 2,
263
- right: a.right - t,
264
- bottom: _.value.height - a.bottom - ge.value,
265
- width: N,
266
- cellSize: A
267
- };
268
- }), V = g(() => Math.max(...m.value.flatMap((t) => t.values))), re = g(() => Math.min(...m.value.flatMap((t) => t.values))), B = g(() => {
269
- const t = m.value.flatMap((o) => o.values);
270
- return t.reduce((o, s) => o + s, 0) / t.length;
271
- }), $t = g(() => pt({
272
- values: e.value.style.layout.dataLabels.yAxis.values.length ? e.value.style.layout.dataLabels.yAxis.values : m.value.map((t) => t.name),
273
- maxDatapoints: m.value.length,
274
- formatter: e.value.style.layout.dataLabels.yAxis.datetimeFormatter,
275
- start: 0,
276
- end: m.value.length
277
- })), Mt = g(() => pt({
278
- values: e.value.style.layout.dataLabels.xAxis.values,
279
- maxDatapoints: F.value,
280
- formatter: e.value.style.layout.dataLabels.xAxis.datetimeFormatter,
281
- start: 0,
282
- end: F.value
283
- })), f = g(() => {
284
- const t = $t.value.map((y) => y.text), a = Mt.value.map((y) => y.text), o = m.value.map((y) => y.values.reduce((A, Oe) => A + Oe, 0)), s = Math.max(...o), d = Math.min(...o), v = [];
285
- for (let y = 0; y < F.value; y += 1)
286
- v.push(m.value.map((A) => A.values[y] || 0).reduce((A, Oe) => A + Oe, 0));
287
- const x = Math.max(...v), N = Math.min(...v);
288
- return {
289
- yTotals: o.map((y) => {
290
- const A = isNaN(y / s) ? 0 : y / s;
291
- return {
292
- total: y,
293
- proportion: A,
294
- color: ye(e.value.style.layout.cells.colors.cold, e.value.style.layout.cells.colors.hot, d, s, y)
295
- };
296
- }),
297
- xTotals: v.map((y) => {
298
- const A = isNaN(y / x) ? 0 : y / x;
299
- return {
300
- total: y,
301
- proportion: A,
302
- color: ye(e.value.style.layout.cells.colors.cold, e.value.style.layout.cells.colors.hot, N, x, y)
303
- };
304
- }),
305
- yLabels: t,
306
- xLabels: a.slice(0, F.value)
307
- };
308
- }), U = g(() => (m.value.forEach((t, a) => {
309
- el({
310
- datasetObject: t,
311
- requiredAttributes: ["values"]
312
- }).forEach((o) => {
313
- yt({
314
- componentName: "VueUiHeatmap",
315
- type: "datasetSerieAttribute",
316
- property: "values",
317
- index: a,
318
- debug: Qe.value
319
- });
320
- });
321
- }), m.value.map((t, a) => ({
322
- ...t,
323
- temperatures: (t.values || []).map((o, s) => o >= B.value ? {
324
- side: "up",
325
- color: ye(e.value.style.layout.cells.colors.cold, e.value.style.layout.cells.colors.hot, re.value, V.value, o),
326
- ratio: Math.abs(Math.abs(o - B.value) / Math.abs(V.value - B.value)) > 1 ? 1 : Math.abs(Math.abs(o - B.value) / Math.abs(V.value - B.value)),
327
- value: o,
328
- yAxisName: f.value.yLabels[a],
329
- xAxisName: f.value.xLabels[s],
330
- id: `vue-data-ui-heatmap-cell-${Xe()}`
331
- } : {
332
- side: "down",
333
- ratio: Math.abs(1 - Math.abs(o) / Math.abs(B.value)) > 1 ? 1 : Math.abs(1 - Math.abs(o) / Math.abs(B.value)),
334
- color: ye(e.value.style.layout.cells.colors.cold, e.value.style.layout.cells.colors.hot, re.value, V.value, o),
335
- value: o,
336
- yAxisName: f.value.yLabels[a],
337
- xAxisName: f.value.xLabels[s],
338
- id: `vue-data-ui-heatmap-cell-${Xe()}`
339
- })
340
- })))), Ze = g(() => m.value.length), et = rt(Array(Ze.value * F.value || 1).fill(!1)), Ot = g(() => et.some((t) => t));
341
- function Rt(t, a) {
342
- et[t] = a;
343
- }
344
- const tt = rt(Array(Ze.value * F.value || 1).fill(!1)), Ft = g(() => tt.some((t) => t));
345
- function Nt(t, a) {
346
- tt[t] = a;
347
- }
348
- const M = c(null), be = c(null);
349
- function Ht(t, a, o, s) {
350
- e.value.events.datapointEnter && e.value.events.datapointEnter({ datapoint: t, seriesIndex: a }), se.value = { x: o, y: s };
351
- const { value: d, yAxisName: v, xAxisName: x, id: N } = t;
352
- oe.value = N, M.value = d, be.value = {
353
- datapoint: t,
354
- seriesIndex: a,
355
- series: U.value,
356
- config: e.value
357
- }, ae.value = !0;
358
- let y = "";
359
- const A = e.value.style.tooltip.customFormat;
360
- ol(A) && sl(() => A({
361
- datapoint: t,
362
- seriesIndex: a,
363
- series: U.value,
364
- config: e.value
365
- })) ? j.value = A({
366
- datapoint: t,
367
- seriesIndex: a,
368
- series: U.value,
369
- config: e.value
370
- }) : (y += `<div>${v} ${x ? v ? ` - ${x}` : `${x}` : ""}</div>`, y += `<div style="margin-top:6px;padding-top:6px;border-top:1px solid ${e.value.style.tooltip.borderColor};font-weight:bold;display:flex;flex-direction:row;gap:12px;align-items:center;justify-content:center"><span style="color:${ye(e.value.style.layout.cells.colors.cold, e.value.style.layout.cells.colors.hot, re.value, V.value, d)}">⬤</span><span>${isNaN(d) ? "-" : E(
371
- e.value.style.layout.cells.value.formatter,
372
- d,
373
- H({
374
- p: e.value.style.layout.dataLabels.prefix,
375
- v: d,
376
- s: e.value.style.layout.dataLabels.suffix,
377
- r: e.value.style.tooltip.roundingValue
378
- }),
379
- { datapoint: t, seriesIndex: a }
380
- )}</span></div>`, j.value = `<div style="font-size:${e.value.style.tooltip.fontSize}px">${y}</div>`);
381
- }
382
- function Xt({ datapoint: t, seriesIndex: a }) {
383
- e.value.events.datapointLeave && e.value.events.datapointLeave({ datapoint: t, seriesIndex: a }), ae.value = !1, oe.value = void 0, M.value = null, se.value = null;
384
- }
385
- function Pt(t) {
386
- return E(
387
- e.value.style.layout.cells.value.formatter,
388
- f.value.yTotals[t].total,
389
- H({
390
- p: e.value.style.layout.dataLabels.prefix,
391
- v: f.value.yTotals[t].total,
392
- s: e.value.style.layout.dataLabels.suffix,
393
- r: e.value.style.layout.cells.value.roundingValue
394
- }),
395
- { datapoint: f.value.yTotals[t], rowIndex: t }
396
- );
397
- }
398
- function It(t) {
399
- return E(
400
- e.value.style.layout.cells.value.formatter,
401
- f.value.xTotals[t].total,
402
- H({
403
- p: e.value.style.layout.dataLabels.prefix,
404
- v: f.value.xTotals[t].total,
405
- s: e.value.style.layout.dataLabels.suffix,
406
- r: e.value.style.layout.cells.value.roundingValue
407
- }),
408
- { datapoint: f.value.xTotals[t], colIndex: t }
409
- );
410
- }
411
- g(() => {
412
- const t = m.value.map((o) => ({
413
- name: o.name
414
- })), a = m.value.map((o) => o.values);
415
- return { head: t, body: a };
416
- });
417
- function lt(t = null) {
418
- qt(() => {
419
- const a = ["", ...m.value.map((v, x) => v.name)], o = [];
420
- for (let v = 0; v < f.value.xLabels.length; v += 1) {
421
- const x = [f.value.xLabels[v]];
422
- for (let N = 0; N < m.value.length; N += 1)
423
- x.push([m.value[N].values[v]]);
424
- o.push(x);
425
- }
426
- const s = [[e.value.style.title.text], [e.value.style.title.subtitle.text], [[""], [""], [""]]].concat([a]).concat(o), d = ll(s);
427
- t ? t(d) : al({ csvContent: d, title: e.value.style.title.text || "vue-ui-heatmap" });
428
- });
429
- }
430
- const Q = c(!1);
431
- function at(t) {
432
- Q.value = t, Pe.value += 1;
433
- }
434
- function ot() {
435
- S.value.showTable = !S.value.showTable;
436
- }
437
- function st() {
438
- S.value.showTooltip = !S.value.showTooltip;
439
- }
440
- const me = c(!1);
441
- function Me() {
442
- me.value = !me.value;
443
- }
444
- function Vt(t, a) {
445
- e.value.events.datapointClick && e.value.events.datapointClick({ datapoint: t, seriesIndex: a }), le("selectDatapoint", t);
446
- }
447
- function Et() {
448
- return U.value;
449
- }
450
- async function Dt({ scale: t = 2 } = {}) {
451
- if (!w.value) return;
452
- const { width: a, height: o } = w.value.getBoundingClientRect(), s = a / o, { imageUri: d, base64: v } = await cl({ domElement: w.value, base64: !0, img: !0, scale: t });
453
- return {
454
- imageUri: d,
455
- base64: v,
456
- title: e.value.style.title.text,
457
- width: a,
458
- height: o,
459
- aspectRatio: s
460
- };
461
- }
462
- const ut = g(() => ({
463
- start: 0,
464
- end: F.value
465
- })), it = g(() => f.value.xLabels);
466
- return ft({
467
- timeLabelsEls: Ce,
468
- timeLabels: it,
469
- slicer: ut,
470
- configRef: e,
471
- rotationPath: ["style", "layout", "dataLabels", "xAxis", "rotation"],
472
- autoRotatePath: ["style", "layout", "dataLabels", "xAxis", "autoRotate", "enable"],
473
- isAutoSize: !1,
474
- targetClass: ".vue-ui-heatmap-col-name",
475
- rotation: e.value.style.layout.dataLabels.xAxis.autoRotate.angle,
476
- width: ue,
477
- height: ie
478
- }), ft({
479
- timeLabelsEls: Te,
480
- timeLabels: it,
481
- slicer: ut,
482
- configRef: e,
483
- rotationPath: ["style", "layout", "cells", "columnTotal", "value", "rotation"],
484
- autoRotatePath: ["style", "layout", "cells", "columnTotal", "value", "autoRotate", "enable"],
485
- isAutoSize: !1,
486
- targetClass: ".vue-ui-heatmap-col-total",
487
- rotation: e.value.style.layout.cells.columnTotal.value.autoRotate.angle,
488
- width: ue,
489
- height: ie
490
- }), X({
491
- getData: Et,
492
- getImage: Dt,
493
- generatePdf: Ke,
494
- generateCsv: lt,
495
- generateImage: Je,
496
- toggleTable: ot,
497
- toggleTooltip: st,
498
- toggleAnnotator: Me,
499
- toggleFullscreen: at
500
- }), (t, a) => (u(), n("div", {
501
- ref_key: "heatmapChart",
502
- ref: w,
503
- class: ce(`vue-ui-heatmap ${Q.value ? "vue-data-ui-wrapper-fullscreen" : ""}`),
504
- style: k(`font-family:${e.value.style.fontFamily};width:100%;${e.value.responsive ? "height: 100%;" : ""} text-align:center;background:${e.value.style.backgroundColor}`),
505
- id: `heatmap__${W.value}`,
506
- onMouseenter: a[2] || (a[2] = () => We(!0)),
507
- onMouseleave: a[3] || (a[3] = () => We(!1))
508
- }, [
509
- e.value.userOptions.buttons.annotator ? (u(), de(i($), {
510
- key: 0,
511
- svgRef: i(Ge),
512
- backgroundColor: e.value.style.backgroundColor,
513
- color: e.value.style.color,
514
- active: me.value,
515
- onClose: Me
516
- }, null, 8, ["svgRef", "backgroundColor", "color", "active"])) : p("", !0),
517
- Lt.value ? (u(), n("div", {
518
- key: 1,
519
- ref_key: "noTitle",
520
- ref: De,
521
- class: "vue-data-ui-no-title-space",
522
- style: "height:36px; width: 100%;background:transparent"
523
- }, null, 512)) : p("", !0),
524
- e.value.style.title.text ? (u(), n("div", {
525
- key: 2,
526
- ref_key: "chartTitle",
527
- ref: Ee,
528
- style: "width:100%;background:transparent"
529
- }, [
530
- (u(), de(vl, {
531
- key: `title_${Ve.value}`,
532
- config: {
533
- title: {
534
- cy: "heatmap-div-title",
535
- ...e.value.style.title
536
- },
537
- subtitle: {
538
- cy: "heatmap-div-subtitle",
539
- ...e.value.style.title.subtitle
540
- }
541
- }
542
- }, null, 8, ["config"]))
543
- ], 512)) : p("", !0),
544
- e.value.userOptions.show && G.value && (i(Ye) || i(ze)) ? (u(), de(i(P), {
545
- ref_key: "details",
546
- ref: Ae,
547
- key: `user_options_${Pe.value}`,
548
- backgroundColor: e.value.style.backgroundColor,
549
- color: e.value.style.color,
550
- isImaging: i(qe),
551
- isPrinting: i(je),
552
- uid: W.value,
553
- hasTooltip: e.value.userOptions.buttons.tooltip && e.value.style.tooltip.show,
554
- hasPdf: e.value.userOptions.buttons.pdf,
555
- hasImg: e.value.userOptions.buttons.img,
556
- hasXls: e.value.userOptions.buttons.csv,
557
- hasTable: e.value.userOptions.buttons.table,
558
- hasFullscreen: e.value.userOptions.buttons.fullscreen,
559
- isFullscreen: Q.value,
560
- isTooltip: S.value.showTooltip,
561
- titles: { ...e.value.userOptions.buttonTitles },
562
- chartElement: w.value,
563
- position: e.value.userOptions.position,
564
- hasAnnotator: e.value.userOptions.buttons.annotator,
565
- isAnnotation: me.value,
566
- callbacks: e.value.userOptions.callbacks,
567
- printScale: e.value.userOptions.print.scale,
568
- onToggleFullscreen: at,
569
- onGeneratePdf: i(Ke),
570
- onGenerateCsv: lt,
571
- onGenerateImage: i(Je),
572
- onToggleTable: ot,
573
- onToggleTooltip: st,
574
- onToggleAnnotator: Me,
575
- style: k({
576
- visibility: i(Ye) ? i(ze) ? "visible" : "hidden" : "visible"
577
- })
578
- }, Gt({ _: 2 }, [
579
- t.$slots.menuIcon ? {
580
- name: "menuIcon",
581
- fn: O(({ isOpen: o, color: s }) => [
582
- T(t.$slots, "menuIcon", Z(ee({ isOpen: o, color: s })), void 0, !0)
583
- ]),
584
- key: "0"
585
- } : void 0,
586
- t.$slots.optionTooltip ? {
587
- name: "optionTooltip",
588
- fn: O(() => [
589
- T(t.$slots, "optionTooltip", {}, void 0, !0)
590
- ]),
591
- key: "1"
592
- } : void 0,
593
- t.$slots.optionPdf ? {
594
- name: "optionPdf",
595
- fn: O(() => [
596
- T(t.$slots, "optionPdf", {}, void 0, !0)
597
- ]),
598
- key: "2"
599
- } : void 0,
600
- t.$slots.optionCsv ? {
601
- name: "optionCsv",
602
- fn: O(() => [
603
- T(t.$slots, "optionCsv", {}, void 0, !0)
604
- ]),
605
- key: "3"
606
- } : void 0,
607
- t.$slots.optionImg ? {
608
- name: "optionImg",
609
- fn: O(() => [
610
- T(t.$slots, "optionImg", {}, void 0, !0)
611
- ]),
612
- key: "4"
613
- } : void 0,
614
- t.$slots.optionTable ? {
615
- name: "optionTable",
616
- fn: O(() => [
617
- T(t.$slots, "optionTable", {}, void 0, !0)
618
- ]),
619
- key: "5"
620
- } : void 0,
621
- t.$slots.optionFullscreen ? {
622
- name: "optionFullscreen",
623
- fn: O(({ toggleFullscreen: o, isFullscreen: s }) => [
624
- T(t.$slots, "optionFullscreen", Z(ee({ toggleFullscreen: o, isFullscreen: s })), void 0, !0)
625
- ]),
626
- key: "6"
627
- } : void 0,
628
- t.$slots.optionAnnotator ? {
629
- name: "optionAnnotator",
630
- fn: O(({ toggleAnnotator: o, isAnnotator: s }) => [
631
- T(t.$slots, "optionAnnotator", Z(ee({ toggleAnnotator: o, isAnnotator: s })), void 0, !0)
632
- ]),
633
- key: "7"
634
- } : void 0
635
- ]), 1032, ["backgroundColor", "color", "isImaging", "isPrinting", "uid", "hasTooltip", "hasPdf", "hasImg", "hasXls", "hasTable", "hasFullscreen", "isFullscreen", "isTooltip", "titles", "chartElement", "position", "hasAnnotator", "isAnnotation", "callbacks", "printScale", "onGeneratePdf", "onGenerateImage", "style"])) : p("", !0),
636
- h("div", {
637
- class: ce({
638
- "vue-ui-heatmap-chart-wrapper": !0,
639
- "vue-ui-heatmap-chart-wrapper-legend-right": e.value.style.legend.show
640
- })
641
- }, [
642
- (u(), n("svg", {
643
- ref_key: "svgRef",
644
- ref: Ge,
645
- xmlns: i(tl),
646
- class: ce({ "vue-data-ui-fullscreen--on": Q.value, "vue-data-ui-fulscreen--off": !Q.value }),
647
- viewBox: `0 0 ${_.value.width} ${_.value.height}`,
648
- width: "100%",
649
- style: k(`overflow: visible; background:transparent;color:${e.value.style.color}`),
650
- "aria-live": "polite",
651
- role: "img",
652
- preserveAspectRatio: "xMidYMid"
653
- }, [
654
- He(i(fe)),
655
- t.$slots["chart-background"] ? (u(), n("foreignObject", {
656
- key: 0,
657
- x: l.value.left,
658
- y: l.value.top,
659
- width: l.value.width,
660
- height: l.value.height,
661
- style: {
662
- pointerEvents: "none"
663
- }
664
- }, [
665
- T(t.$slots, "chart-background", {}, void 0, !0)
666
- ], 8, ml)) : p("", !0),
667
- e.value.style.layout.cells.columnTotal.color.show ? (u(), n("g", {
668
- key: 1,
669
- ref_key: "xAxisSumRects",
670
- ref: wt
671
- }, [
672
- (u(!0), n(L, null, R(f.value.xTotals, (o, s) => (u(), n("rect", {
673
- x: l.value.left + l.value.cellSize.width * s + r.value / 2 + l.value.sumCellXHeight,
674
- y: l.value.top - l.value.sumCellXHeight + r.value * (_.value.height / _.value.width),
675
- height: l.value.sumCellXHeight,
676
- width: l.value.cellSize.width - r.value,
677
- fill: e.value.style.layout.cells.colors.underlayer,
678
- stroke: e.value.style.backgroundColor,
679
- "stroke-width": r.value
680
- }, null, 8, xl))), 256)),
681
- (u(!0), n(L, null, R(f.value.xTotals, (o, s) => (u(), n("rect", {
682
- x: l.value.left + l.value.cellSize.width * s + r.value / 2 + l.value.sumCellXHeight,
683
- y: l.value.top - l.value.sumCellXHeight + r.value * (_.value.height / _.value.width),
684
- height: l.value.sumCellXHeight,
685
- width: l.value.cellSize.width - r.value,
686
- fill: o.color,
687
- stroke: e.value.style.backgroundColor,
688
- "stroke-width": r.value
689
- }, null, 8, wl))), 256))
690
- ], 512)) : p("", !0),
691
- h("g", {
692
- ref_key: "datapoints",
693
- ref: bt
694
- }, [
695
- (u(!0), n(L, null, R(U.value, (o, s) => (u(), n(L, null, [
696
- (u(!0), n(L, null, R(o.temperatures, (d, v) => (u(), n("g", null, [
697
- h("rect", {
698
- x: l.value.left + l.value.cellSize.width * v + r.value / 2 + l.value.sumCellXHeight,
699
- y: l.value.top + l.value.cellSize.height * s + r.value / 2,
700
- width: l.value.cellSize.width - r.value,
701
- height: l.value.cellSize.height - r.value,
702
- fill: e.value.style.layout.cells.colors.underlayer,
703
- stroke: e.value.style.backgroundColor,
704
- "stroke-width": r.value
705
- }, null, 8, kl),
706
- h("rect", {
707
- x: l.value.left + l.value.cellSize.width * v + r.value / 2 + l.value.sumCellXHeight,
708
- y: l.value.top + l.value.cellSize.height * s + r.value / 2,
709
- width: l.value.cellSize.width - r.value,
710
- height: l.value.cellSize.height - r.value,
711
- fill: d.color,
712
- stroke: e.value.style.backgroundColor,
713
- "stroke-width": r.value,
714
- onMouseover: (x) => Ht(d, s, l.value.left + l.value.cellSize.width * v, l.value.top + l.value.cellSize.height * s),
715
- onMouseout: () => Xt({ datapoint: d, seriesIndex: s }),
716
- onClick: () => Vt(d, s)
717
- }, null, 40, Al),
718
- e.value.style.layout.cells.value.show ? vt((u(), n("text", {
719
- key: 0,
720
- "text-anchor": "middle",
721
- "font-size": e.value.style.layout.cells.value.fontSize,
722
- "font-weight": e.value.style.layout.cells.value.bold ? "bold" : "normal",
723
- fill: i(xe)(d.color),
724
- x: l.value.left + l.value.cellSize.width * v + l.value.cellSize.width / 2 + l.value.sumCellXHeight,
725
- y: l.value.top + l.value.cellSize.height * s + l.value.cellSize.height / 2 + e.value.style.layout.cells.value.fontSize / 3,
726
- style: { pointerEvents: "none", userSelect: "none" }
727
- }, [
728
- ct(z(i(E)(
729
- e.value.style.layout.cells.value.formatter,
730
- d.value,
731
- i(H)({
732
- p: e.value.style.layout.dataLabels.prefix,
733
- v: d.value,
734
- s: e.value.style.layout.dataLabels.suffix,
735
- r: e.value.style.layout.cells.value.roundingValue
736
- }),
737
- { datapoint: d }
738
- )), 1)
739
- ], 8, Ll)), [
740
- [i(pl), {
741
- cellWidth: l.value.cellSize.width - r.value,
742
- cellHeight: l.value.cellSize.height - r.value,
743
- maxFontSize: e.value.style.layout.cells.value.fontSize,
744
- minFontSize: 10,
745
- index: s * F.value + v,
746
- reportHide: Nt,
747
- reportRotation: Rt,
748
- hideAll: Ft.value,
749
- rotateAll: Ot.value
750
- }]
751
- ]) : p("", !0)
752
- ]))), 256))
753
- ], 64))), 256))
754
- ], 512),
755
- e.value.style.layout.cells.rowTotal.color.show ? (u(), n("g", {
756
- key: 2,
757
- ref_key: "yAxisSumRects",
758
- ref: xt
759
- }, [
760
- (u(!0), n(L, null, R(U.value, (o, s) => (u(), n(L, null, [
761
- h("rect", {
762
- x: l.value.left,
763
- y: l.value.top + l.value.cellSize.height * s,
764
- width: l.value.sumCellXHeight,
765
- height: l.value.cellSize.height - r.value,
766
- fill: e.value.style.layout.cells.colors.underlayer,
767
- stroke: e.value.style.backgroundColor,
768
- "stroke-width": r.value
769
- }, null, 8, Cl),
770
- h("rect", {
771
- x: l.value.left,
772
- y: l.value.top + l.value.cellSize.height * s + r.value / 2,
773
- width: l.value.sumCellXHeight,
774
- height: l.value.cellSize.height - r.value,
775
- fill: f.value.yTotals[s].color,
776
- stroke: e.value.style.backgroundColor,
777
- "stroke-width": r.value
778
- }, null, 8, Tl)
779
- ], 64))), 256))
780
- ], 512)) : p("", !0),
781
- e.value.style.layout.dataLabels.yAxis.show ? (u(), n("g", {
782
- key: 3,
783
- ref_key: "yAxisLabels",
784
- ref: Be
785
- }, [
786
- (u(!0), n(L, null, R(U.value, (o, s) => (u(), n(L, null, [
787
- h("text", {
788
- class: "vue-ui-heatmap-row-name",
789
- "font-size": e.value.style.layout.dataLabels.yAxis.fontSize,
790
- fill: e.value.style.layout.dataLabels.yAxis.color,
791
- x: J.value,
792
- y: l.value.top + l.value.cellSize.height * s + l.value.cellSize.height / 2 + e.value.style.layout.dataLabels.yAxis.fontSize / 3 + e.value.style.layout.dataLabels.yAxis.offsetY - (e.value.style.layout.cells.rowTotal.value.show ? e.value.style.layout.dataLabels.yAxis.fontSize / 1.5 : 0),
793
- "text-anchor": "end",
794
- "font-weight": e.value.style.layout.dataLabels.yAxis.bold ? "bold" : "normal"
795
- }, z(f.value.yLabels[s]), 9, _l),
796
- e.value.style.layout.cells.rowTotal.value.show ? (u(), n("text", {
797
- key: 0,
798
- class: "vue-ui-heatmap-row-total",
799
- "font-size": e.value.style.layout.dataLabels.yAxis.fontSize,
800
- fill: e.value.style.layout.dataLabels.yAxis.color,
801
- x: J.value,
802
- y: l.value.top + l.value.cellSize.height * s + l.value.cellSize.height / 2 + e.value.style.layout.dataLabels.yAxis.fontSize + e.value.style.layout.dataLabels.yAxis.offsetY,
803
- "text-anchor": "end",
804
- "font-weight": e.value.style.layout.dataLabels.yAxis.bold ? "bold" : "normal"
805
- }, z(Pt(s)), 9, zl)) : p("", !0)
806
- ], 64))), 256))
807
- ], 512)) : p("", !0),
808
- e.value.style.layout.dataLabels.xAxis.show ? (u(), n("g", {
809
- key: 4,
810
- ref_key: "xAxisLabels",
811
- ref: Ce
812
- }, [
813
- (u(!0), n(L, null, R(f.value.xLabels, (o, s) => (u(), n(L, null, [
814
- !e.value.style.layout.dataLabels.xAxis.showOnlyAtModulo || e.value.style.layout.dataLabels.xAxis.showOnlyAtModulo && s % e.value.style.layout.dataLabels.xAxis.showOnlyAtModulo === 0 ? (u(), n("text", {
815
- key: 0,
816
- class: "vue-ui-heatmap-col-name",
817
- "text-anchor": e.value.style.layout.dataLabels.xAxis.rotation === 0 ? "middle" : e.value.style.layout.dataLabels.xAxis.rotation < 0 ? "start" : "end",
818
- "font-size": e.value.style.layout.dataLabels.xAxis.fontSize,
819
- fill: e.value.style.layout.dataLabels.xAxis.color,
820
- "font-weight": e.value.style.layout.dataLabels.xAxis.bold ? "bold" : "normal",
821
- transform: `translate(${l.value.left + l.value.cellSize.width / 2 + l.value.width / f.value.xLabels.length * s + e.value.style.layout.dataLabels.xAxis.offsetX + l.value.sumCellXHeight}, ${l.value.topLabelsHeight}), rotate(${e.value.style.layout.dataLabels.xAxis.rotation})`
822
- }, z(o), 9, Sl)) : p("", !0)
823
- ], 64))), 256))
824
- ], 512)) : p("", !0),
825
- e.value.style.layout.cells.columnTotal.value.show ? (u(), n("g", {
826
- key: 5,
827
- ref_key: "xAxisSums",
828
- ref: Te
829
- }, [
830
- (u(!0), n(L, null, R(f.value.xLabels, (o, s) => (u(), n("text", {
831
- class: "vue-ui-heatmap-col-total",
832
- "text-anchor": e.value.style.layout.cells.columnTotal.value.rotation === 0 ? "middle" : e.value.style.layout.cells.columnTotal.value.rotation < 0 ? "end" : "start",
833
- "font-size": e.value.style.layout.dataLabels.xAxis.fontSize,
834
- fill: e.value.style.layout.dataLabels.xAxis.color,
835
- "font-weight": e.value.style.layout.dataLabels.xAxis.bold ? "bold" : "normal",
836
- transform: `translate(${l.value.left + l.value.cellSize.width / 2 + l.value.width / f.value.xLabels.length * s + e.value.style.layout.dataLabels.xAxis.offsetX + e.value.style.layout.cells.columnTotal.value.offsetX + l.value.sumCellXHeight}, ${l.value.bottom + e.value.style.layout.dataLabels.xAxis.fontSize / 2}), rotate(${e.value.style.layout.cells.columnTotal.value.rotation})`
837
- }, z(It(s)), 9, $l))), 256))
838
- ], 512)) : p("", !0),
839
- se.value ? (u(), n("g", Ml, [
840
- h("rect", {
841
- style: { "pointer-events": "none" },
842
- x: se.value.x - e.value.style.layout.cells.selected.border / 2 + r.value + l.value.sumCellXHeight,
843
- y: se.value.y - e.value.style.layout.cells.selected.border / 2 + r.value,
844
- width: l.value.cellSize.width - r.value + e.value.style.layout.cells.selected.border - r.value,
845
- height: l.value.cellSize.height - r.value + e.value.style.layout.cells.selected.border - r.value,
846
- fill: "transparent",
847
- stroke: e.value.style.layout.cells.selected.color,
848
- "stroke-width": e.value.style.layout.cells.selected.border,
849
- rx: 1
850
- }, null, 8, Ol)
851
- ])) : p("", !0),
852
- T(t.$slots, "svg", { svg: _.value }, void 0, !0)
853
- ], 14, bl)),
854
- e.value.style.legend.show ? (u(), n("div", {
855
- key: 0,
856
- ref_key: "legendRight",
857
- ref: mt,
858
- class: "vue-ui-heatmap-legend-right",
859
- style: k({
860
- "--legend-width": e.value.style.legend.width + "px"
861
- })
862
- }, [
863
- i(pe) ? p("", !0) : (u(), n("div", {
864
- key: 0,
865
- class: "vue-ui-heatmap-legend-label-max",
866
- style: k({
867
- fontSize: e.value.style.legend.fontSize + "px",
868
- color: e.value.style.legend.color
869
- })
870
- }, z(i(E)(
871
- e.value.style.layout.cells.value.formatter,
872
- i(D)(V.value),
873
- i(H)({
874
- p: e.value.style.layout.dataLabels.prefix,
875
- v: i(D)(V.value),
876
- s: e.value.style.layout.dataLabels.suffix,
877
- r: e.value.style.legend.roundingValue
878
- })
879
- )), 5)),
880
- h("div", Rl, [
881
- h("div", {
882
- class: "vue-ui-heatmap-gauge",
883
- style: k({
884
- background: `linear-gradient(to bottom, ${e.value.style.layout.cells.colors.hot}, ${e.value.style.layout.cells.colors.cold})`
885
- })
886
- }, [
887
- vt(h("div", {
888
- class: "vue-ui-heatmap-gauge-indicator",
889
- "data-value": i(E)(
890
- e.value.style.layout.cells.value.formatter,
891
- i(D)(M.value),
892
- i(H)({
893
- p: e.value.style.layout.dataLabels.prefix,
894
- v: i(D)(M.value),
895
- s: e.value.style.layout.dataLabels.suffix,
896
- r: e.value.style.legend.roundingValue
897
- })
898
- ),
899
- style: k({
900
- position: "absolute",
901
- width: "100%",
902
- height: "2px",
903
- background: [void 0, null].includes(M.value) ? "transparent" : i(xe)(be.value.datapoint.color),
904
- top: `${[void 0, null].includes(M.value) ? 0 : (1 - M.value / V.value) * 100}%`,
905
- transition: "all 0.2s ease-in-out",
906
- "--background-color": e.value.style.backgroundColor,
907
- "--gauge-arrow-color": i(xe)(e.value.style.backgroundColor),
908
- "--gauge-arrow-text-color": i(xe)(e.value.style.backgroundColor),
909
- "--gauge-arrow-value": M.value,
910
- "--gauge-arrow-font-size": e.value.style.legend.fontSize + "px"
911
- })
912
- }, [
913
- h("div", Nl, z(i(E)(
914
- e.value.style.layout.cells.value.formatter,
915
- i(D)(M.value),
916
- i(H)({
917
- p: e.value.style.layout.dataLabels.prefix,
918
- v: i(D)(M.value),
919
- s: e.value.style.layout.dataLabels.suffix,
920
- r: e.value.style.legend.roundingValue
921
- })
922
- )), 1)
923
- ], 12, Fl), [
924
- [Wt, ![void 0, null].includes(M.value)]
925
- ])
926
- ], 4)
927
- ]),
928
- i(pe) ? p("", !0) : (u(), n("div", {
929
- key: 1,
930
- class: "vue-ui-heatmap-legend-label-min",
931
- style: k({
932
- fontSize: e.value.style.legend.fontSize + "px",
933
- color: e.value.style.legend.color
934
- })
935
- }, z(i(E)(
936
- e.value.style.layout.cells.value.formatter,
937
- i(D)(re.value),
938
- i(H)({
939
- p: e.value.style.layout.dataLabels.prefix,
940
- v: i(D)(re.value),
941
- s: e.value.style.layout.dataLabels.suffix,
942
- r: e.value.style.legend.roundingValue
943
- })
944
- )), 5))
945
- ], 4)) : p("", !0)
946
- ], 2),
947
- t.$slots.watermark ? (u(), n("div", Hl, [
948
- T(t.$slots, "watermark", Z(ee({ isPrinting: i(je) || i(qe) })), void 0, !0)
949
- ])) : p("", !0),
950
- t.$slots.source ? (u(), n("div", {
951
- key: 5,
952
- ref_key: "source",
953
- ref: Ue,
954
- dir: "auto"
955
- }, [
956
- T(t.$slots, "source", {}, void 0, !0)
957
- ], 512)) : p("", !0),
958
- He(i(te), {
959
- show: S.value.showTooltip && ae.value,
960
- backgroundColor: e.value.style.tooltip.backgroundColor,
961
- color: e.value.style.tooltip.color,
962
- borderRadius: e.value.style.tooltip.borderRadius,
963
- borderColor: e.value.style.tooltip.borderColor,
964
- borderWidth: e.value.style.tooltip.borderWidth,
965
- fontSize: e.value.style.tooltip.fontSize,
966
- backgroundOpacity: e.value.style.tooltip.backgroundOpacity,
967
- position: e.value.style.tooltip.position,
968
- offsetY: e.value.style.tooltip.offsetY,
969
- parent: w.value,
970
- content: j.value,
971
- isFullscreen: Q.value,
972
- isCustom: e.value.style.tooltip.customFormat && typeof e.value.style.tooltip.customFormat == "function",
973
- smooth: e.value.style.tooltip.smooth,
974
- backdropFilter: e.value.style.tooltip.backdropFilter
975
- }, {
976
- "tooltip-before": O(() => [
977
- T(t.$slots, "tooltip-before", Z(ee({ ...be.value })), void 0, !0)
978
- ]),
979
- "tooltip-after": O(() => [
980
- T(t.$slots, "tooltip-after", Z(ee({ ...be.value })), void 0, !0)
981
- ]),
982
- _: 3
983
- }, 8, ["show", "backgroundColor", "color", "borderRadius", "borderColor", "borderWidth", "fontSize", "backgroundOpacity", "position", "offsetY", "parent", "content", "isFullscreen", "isCustom", "smooth", "backdropFilter"]),
984
- G.value ? (u(), de(rl, {
985
- key: 6,
986
- hideDetails: "",
987
- config: {
988
- open: S.value.showTable,
989
- maxHeight: 1e4,
990
- body: {
991
- backgroundColor: e.value.style.backgroundColor,
992
- color: e.value.style.color
993
- },
994
- head: {
995
- backgroundColor: e.value.style.backgroundColor,
996
- color: e.value.style.color
997
- }
998
- }
999
- }, {
1000
- content: O(() => [
1001
- h("div", {
1002
- ref_key: "tableContainer",
1003
- ref: Le,
1004
- class: "vue-ui-heatmap-table atom-data-table"
1005
- }, [
1006
- h("div", {
1007
- style: "width:100%;overflow-x:auto;padding-top:36px;position:relative",
1008
- class: ce({ "vue-ui-responsive": Ie.value })
1009
- }, [
1010
- h("div", {
1011
- role: "button",
1012
- tabindex: "0",
1013
- style: k(`width:32px; position: absolute; top: 0; left:4px; padding: 0 0px; display: flex; align-items:center;justify-content:center;height: 36px; width: 32px; cursor:pointer; background:${e.value.table.th.backgroundColor};`),
1014
- onClick: a[0] || (a[0] = (o) => S.value.showTable = !1),
1015
- onKeypress: a[1] || (a[1] = jt((o) => S.value.showTable = !1, ["enter"]))
1016
- }, [
1017
- He(i(Y), {
1018
- name: "close",
1019
- stroke: e.value.table.th.color,
1020
- "stroke-width": 2
1021
- }, null, 8, ["stroke"])
1022
- ], 36),
1023
- h("table", Xl, [
1024
- h("caption", {
1025
- style: k(`backgroundColor:${e.value.table.th.backgroundColor};color:${e.value.table.th.color};outline:${e.value.table.th.outline}`)
1026
- }, [
1027
- ct(z(e.value.style.title.text) + " ", 1),
1028
- e.value.style.title.subtitle.text ? (u(), n("span", Pl, z(e.value.style.title.subtitle.text), 1)) : p("", !0)
1029
- ], 4),
1030
- h("thead", null, [
1031
- h("tr", {
1032
- role: "row",
1033
- style: k(`background:${e.value.table.th.backgroundColor};color:${e.value.table.th.color}`)
1034
- }, [
1035
- h("th", {
1036
- style: k(`outline:${e.value.table.th.outline};padding-right:6px`)
1037
- }, null, 4),
1038
- (u(!0), n(L, null, R(b.dataset, (o, s) => (u(), n("th", {
1039
- align: "right",
1040
- style: k(`outline:${e.value.table.th.outline};padding-right:6px`)
1041
- }, z(o.name), 5))), 256))
1042
- ], 4)
1043
- ]),
1044
- h("tbody", null, [
1045
- (u(!0), n(L, null, R(f.value.xLabels, (o, s) => (u(), n("tr", {
1046
- role: "row",
1047
- class: ce({ "vue-ui-data-table__tbody__row": !0, "vue-ui-data-table__tbody__row-even": s % 2 === 0, "vue-ui-data-table__tbody__row-odd": s % 2 !== 0 }),
1048
- style: k(`background:${e.value.table.td.backgroundColor};color:${e.value.table.td.color}`)
1049
- }, [
1050
- h("td", {
1051
- "data-cell": e.value.table.colNames.xAxis,
1052
- class: "vue-ui-data-table__tbody__td",
1053
- style: k(`outline:${e.value.table.td.outline}`)
1054
- }, [
1055
- h("div", Vl, z(o), 1)
1056
- ], 12, Il),
1057
- (u(!0), n(L, null, R(b.dataset, (d, v) => (u(), n("td", {
1058
- class: "vue-ui-data-table__tbody__td",
1059
- "data-cell": b.dataset[v].name,
1060
- style: k(`outline:${e.value.table.td.outline}`)
1061
- }, [
1062
- h("div", Dl, z(isNaN(d.values[s]) ? "-" : i(H)({ p: e.value.style.layout.dataLabels.prefix, v: d.values[s], s: e.value.style.layout.dataLabels.suffix, r: e.value.table.td.roundingValue })), 1)
1063
- ], 12, El))), 256))
1064
- ], 6))), 256))
1065
- ])
1066
- ])
1067
- ], 2)
1068
- ], 512)
1069
- ]),
1070
- _: 1
1071
- }, 8, ["config"])) : p("", !0),
1072
- i(pe) ? (u(), de(hl, { key: 7 })) : p("", !0)
1073
- ], 46, gl));
1074
- }
1075
- }, oa = /* @__PURE__ */ fl(Bl, [["__scopeId", "data-v-926264d5"]]);
1076
- export {
1077
- oa as default
1078
- };