vue-data-ui 2.4.57 → 2.4.59
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +82 -51
- package/dist/{Arrow-BhwhLRcU.cjs → Arrow-Dudbi6k5.cjs} +1 -1
- package/dist/{Arrow-DelnKkT1.js → Arrow-DzS4HIXj.js} +1 -1
- package/dist/{BaseIcon-9gdEHMWK.js → BaseIcon-BbU81zOd.js} +1 -1
- package/dist/{BaseIcon-DujPvdJ_.cjs → BaseIcon-DD3GLrhS.cjs} +1 -1
- package/dist/{DataTable-BUflha5V.cjs → DataTable-BHCbVv8x.cjs} +1 -1
- package/dist/{DataTable-DgbrnD__.js → DataTable-CFUKU8PU.js} +2 -2
- package/dist/{Legend-V3K-4ipN.cjs → Legend-BYngLoV6.cjs} +1 -1
- package/dist/{Legend-HooNAKB_.js → Legend-f52bnttJ.js} +1 -1
- package/dist/{PackageVersion-S3SzpuwC.js → PackageVersion-C_FFs0BP.js} +1 -1
- package/dist/{PackageVersion-dQYEsTLp.cjs → PackageVersion-nr7f_VNw.cjs} +1 -1
- package/dist/{PenAndPaper-1h87IVla.cjs → PenAndPaper-C9v0NXEg.cjs} +1 -1
- package/dist/{PenAndPaper-v846FwcH.js → PenAndPaper-Dx24BtRW.js} +3 -3
- package/dist/{Shape-D7aacHaz.js → Shape-Ct2x6qZx.js} +1 -1
- package/dist/{Shape-DV5sH0dX.cjs → Shape-Dkt-vkTl.cjs} +1 -1
- package/dist/{Slicer-BRxR5OYL.cjs → Slicer-C0cvEMOy.cjs} +1 -1
- package/dist/{Slicer-BXCORSCz.js → Slicer-Duke9qno.js} +2 -2
- package/dist/{Title-B-EsW0Q2.cjs → Title-CpfNWbUc.cjs} +1 -1
- package/dist/{Title-DLjHHdyq.js → Title-zZtEcB9F.js} +1 -1
- package/dist/{Tooltip-BDaa-67h.js → Tooltip-DDJ2Wvjy.js} +1 -1
- package/dist/{Tooltip-B7gYRLGN.cjs → Tooltip-DZuVxmLc.cjs} +1 -1
- package/dist/documentation/installation.md +48 -48
- package/dist/{index-CI-N9klv.js → index-B9RAElpI.js} +2 -2
- package/dist/index-DaDv7p0W.cjs +9 -0
- package/dist/style.css +1 -1
- package/dist/{useNestedProp-D-zaZbSR.cjs → useNestedProp-DkpuL8Iv.cjs} +1 -1
- package/dist/{useNestedProp-D1eJ0dvv.js → useNestedProp-DuruL3Nt.js} +1 -1
- package/dist/{usePrinter-H2UFIe6n.cjs → usePrinter-BIHu0O5X.cjs} +1 -1
- package/dist/{usePrinter-CXc8xCKk.js → usePrinter-CwTAwqtF.js} +1 -1
- package/dist/{vue-data-ui-CvfX2D1d.cjs → vue-data-ui-BXCJgMfu.cjs} +1 -1
- package/dist/{vue-data-ui-DuXblXhF.js → vue-data-ui-yknmkfFy.js} +60 -60
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +1 -1
- package/dist/{vue-ui-3d-bar-fvTVGk8O.js → vue-ui-3d-bar-BkbLoUhP.js} +170 -158
- package/dist/vue-ui-3d-bar-CHnh8ZH_.cjs +19 -0
- package/dist/{vue-ui-accordion-paZXh-GD.cjs → vue-ui-accordion-6Clt339w.cjs} +1 -1
- package/dist/{vue-ui-accordion-CYLks1fW.js → vue-ui-accordion-rNA598L6.js} +3 -3
- package/dist/{vue-ui-age-pyramid-Ch3nY1Dx.js → vue-ui-age-pyramid-C3o5HfRK.js} +176 -164
- package/dist/vue-ui-age-pyramid-CKDDaRj_.cjs +1 -0
- package/dist/{vue-ui-annotator-BXbLcJ1L.cjs → vue-ui-annotator-BLilhXfT.cjs} +1 -1
- package/dist/{vue-ui-annotator-DGupSF-o.js → vue-ui-annotator-huMOA-QF.js} +1 -1
- package/dist/{vue-ui-bullet-BSRXabBe.js → vue-ui-bullet-DxYdog9c.js} +155 -143
- package/dist/vue-ui-bullet-yTpejKsw.cjs +34 -0
- package/dist/{vue-ui-candlestick-Dww4XHwQ.js → vue-ui-candlestick-3lCgRxr0.js} +96 -84
- package/dist/vue-ui-candlestick-CmD40PpS.cjs +2 -0
- package/dist/vue-ui-carousel-table-BU8oAq6b.cjs +1 -0
- package/dist/{vue-ui-carousel-table-BZs-sxxu.js → vue-ui-carousel-table-D3JIrHMF.js} +97 -95
- package/dist/vue-ui-chestnut-BWRUxwWm.cjs +6 -0
- package/dist/{vue-ui-chestnut-CnupXXAM.js → vue-ui-chestnut-cWFqbqSU.js} +160 -148
- package/dist/{vue-ui-cursor-oqfOA98Q.js → vue-ui-cursor-DjWkFQEI.js} +2 -2
- package/dist/{vue-ui-cursor-smlBNiGG.cjs → vue-ui-cursor-DzJmB5h9.cjs} +1 -1
- package/dist/{vue-ui-dashboard-BNu7yNYm.js → vue-ui-dashboard-1dycrMNM.js} +2 -2
- package/dist/{vue-ui-dashboard-Dw_90R29.cjs → vue-ui-dashboard-BOjdgUEm.cjs} +1 -1
- package/dist/{vue-ui-digits-_8FbgFrI.cjs → vue-ui-digits-B8TVsqsB.cjs} +1 -1
- package/dist/{vue-ui-digits-qztPrOEN.js → vue-ui-digits-C4NWhIjg.js} +2 -2
- package/dist/vue-ui-donut-BPz8gXi5.cjs +1 -0
- package/dist/{vue-ui-donut-CK9dINFS.js → vue-ui-donut-CXBxDUoh.js} +291 -279
- package/dist/{vue-ui-donut-evolution-DpDpYw3f.js → vue-ui-donut-evolution-BgD7rCFk.js} +285 -273
- package/dist/vue-ui-donut-evolution-h3ZgYI48.cjs +1 -0
- package/dist/vue-ui-dumbbell-BCyFd1Lf.cjs +9 -0
- package/dist/{vue-ui-dumbbell-Dx1I89N9.js → vue-ui-dumbbell-DMp-Waih.js} +159 -147
- package/dist/{vue-ui-flow-DJNqydD1.js → vue-ui-flow-D-XBMcpC.js} +162 -150
- package/dist/vue-ui-flow-DB3_5wEr.cjs +1 -0
- package/dist/vue-ui-funnel-DJVmn_pN.cjs +1 -0
- package/dist/{vue-ui-funnel-mP8ftcS5.js → vue-ui-funnel-Dxb6o97C.js} +229 -215
- package/dist/{vue-ui-galaxy-3cOLS6lh.js → vue-ui-galaxy-C2eHqbLw.js} +148 -136
- package/dist/vue-ui-galaxy-CIBBO623.cjs +1 -0
- package/dist/{vue-ui-gauge-CN_zo833.js → vue-ui-gauge-B9M8ICMX.js} +199 -185
- package/dist/vue-ui-gauge-C_JArbcd.cjs +1 -0
- package/dist/vue-ui-gizmo-ETKRu3P5.cjs +1 -0
- package/dist/{vue-ui-gizmo-akkNcCWf.js → vue-ui-gizmo-OGIvFCA4.js} +45 -43
- package/dist/{vue-ui-heatmap-B3ClLioV.js → vue-ui-heatmap-C2BobYAF.js} +138 -126
- package/dist/vue-ui-heatmap-mPZepJ4V.cjs +1 -0
- package/dist/{vue-ui-history-plot-C-EqVFW-.js → vue-ui-history-plot-BtBDW5ha.js} +127 -115
- package/dist/vue-ui-history-plot-DgEFbRv3.cjs +1 -0
- package/dist/{vue-ui-kpi-C-axCKZx.js → vue-ui-kpi-BCwmp6i5.js} +36 -33
- package/dist/vue-ui-kpi-DZGoUp6y.cjs +1 -0
- package/dist/{vue-ui-mini-loader-Cal5W_q6.cjs → vue-ui-mini-loader-B_I1k10C.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-CsZ1zxJz.js → vue-ui-mini-loader-DWQfo-Ey.js} +2 -2
- package/dist/{vue-ui-molecule-BvNh7REY.js → vue-ui-molecule-CpWWvLlc.js} +212 -200
- package/dist/vue-ui-molecule-CqHsa4N7.cjs +1 -0
- package/dist/{vue-ui-mood-radar-C7v4dBNw.js → vue-ui-mood-radar-B4-AQAyE.js} +123 -111
- package/dist/vue-ui-mood-radar-Dx6ICJkv.cjs +1 -0
- package/dist/{vue-ui-nested-donuts-C08kpvMd.js → vue-ui-nested-donuts-C-afzEvx.js} +156 -144
- package/dist/vue-ui-nested-donuts-C8LG5ony.cjs +17 -0
- package/dist/vue-ui-onion-KC_zqQyz.cjs +5 -0
- package/dist/{vue-ui-onion-CTLBemDj.js → vue-ui-onion-wBz5dln6.js} +125 -113
- package/dist/vue-ui-parallel-coordinate-plot-BK1sUOyd.cjs +8 -0
- package/dist/{vue-ui-parallel-coordinate-plot-H1FdP6AE.js → vue-ui-parallel-coordinate-plot-BoiKoaod.js} +159 -147
- package/dist/vue-ui-quadrant-BJ3gSVgF.cjs +1 -0
- package/dist/{vue-ui-quadrant-Dd-LDy4T.js → vue-ui-quadrant-DY6yUyOl.js} +211 -199
- package/dist/{vue-ui-quick-chart-BeNivWrg.js → vue-ui-quick-chart-DBH9CgBI.js} +576 -540
- package/dist/vue-ui-quick-chart-OHwPApk1.cjs +15 -0
- package/dist/{vue-ui-radar-D9U_vOad.js → vue-ui-radar-DYnmlHtt.js} +183 -171
- package/dist/vue-ui-radar-nhy4Pqtc.cjs +1 -0
- package/dist/{vue-ui-rating-B7AlAqCY.js → vue-ui-rating-3LUgui--.js} +102 -98
- package/dist/vue-ui-rating-wl5jkxb5.cjs +1 -0
- package/dist/vue-ui-relation-circle-CGkAsJl8.cjs +1 -0
- package/dist/{vue-ui-relation-circle-CT23BNcW.js → vue-ui-relation-circle-Da09K_Ce.js} +129 -117
- package/dist/{vue-ui-rings-BZ7FYYxr.js → vue-ui-rings-BuVPBXNc.js} +150 -138
- package/dist/vue-ui-rings-DZfhibc4.cjs +2 -0
- package/dist/{vue-ui-scatter-DMr8OrC3.js → vue-ui-scatter-Bee79rib.js} +320 -308
- package/dist/vue-ui-scatter-ChYAlXb_.cjs +1 -0
- package/dist/{vue-ui-screenshot-BFV1qEsF.cjs → vue-ui-screenshot-Blz4fiO2.cjs} +1 -1
- package/dist/{vue-ui-screenshot-DHiX35pR.js → vue-ui-screenshot-CCnAaGB3.js} +1 -1
- package/dist/{vue-ui-skeleton-BIWgLDDf.cjs → vue-ui-skeleton-B24XJJ2p.cjs} +1 -1
- package/dist/{vue-ui-skeleton-owIhXtQF.js → vue-ui-skeleton-DVYD_VSe.js} +3 -3
- package/dist/vue-ui-smiley-CXOuAdIj.cjs +2 -0
- package/dist/{vue-ui-smiley-CCOQ6zjo.js → vue-ui-smiley-CdrTI5Rh.js} +208 -206
- package/dist/vue-ui-spark-trend-B08HYMm5.cjs +1 -0
- package/dist/{vue-ui-spark-trend-B56DI3Mc.js → vue-ui-spark-trend-Pd3JNy4G.js} +124 -112
- package/dist/{vue-ui-sparkbar-CMkozDkx.js → vue-ui-sparkbar-CTDWiUid.js} +100 -96
- package/dist/vue-ui-sparkbar-Dq1hwL7i.cjs +1 -0
- package/dist/{vue-ui-sparkgauge-De06LRPj.js → vue-ui-sparkgauge-g0C7wuIH.js} +60 -48
- package/dist/vue-ui-sparkgauge-il4rmDdv.cjs +1 -0
- package/dist/vue-ui-sparkhistogram-CoRPiLpB.cjs +1 -0
- package/dist/{vue-ui-sparkhistogram-CBDd7jIn.js → vue-ui-sparkhistogram-Dk8IYZGB.js} +116 -104
- package/dist/vue-ui-sparkline-B_1J2ft2.cjs +1 -0
- package/dist/{vue-ui-sparkline-BJejWvTN.js → vue-ui-sparkline-Ca1ai-Mq.js} +124 -112
- package/dist/{vue-ui-sparkstackbar-DlnmPom2.js → vue-ui-sparkstackbar-CRGrf5y2.js} +85 -81
- package/dist/vue-ui-sparkstackbar-tkiKbZHo.cjs +1 -0
- package/dist/{vue-ui-stackbar-19XdLQXB.js → vue-ui-stackbar-QaavE5-F.js} +219 -207
- package/dist/vue-ui-stackbar-zk1K5gP3.cjs +6 -0
- package/dist/vue-ui-strip-plot-8Ksp5AzD.cjs +1 -0
- package/dist/{vue-ui-strip-plot-Bly8GoNP.js → vue-ui-strip-plot-gm_lr5A9.js} +113 -101
- package/dist/{vue-ui-table-BisPh85-.cjs → vue-ui-table-CPLd7hXM.cjs} +1 -1
- package/dist/{vue-ui-table-BUF6Pyfp.js → vue-ui-table-ceYZ6Wzd.js} +1 -1
- package/dist/vue-ui-table-heatmap-CSsYOFf7.cjs +1 -0
- package/dist/{vue-ui-table-heatmap-By-MmFiq.js → vue-ui-table-heatmap-CWQIOR58.js} +82 -78
- package/dist/{vue-ui-table-sparkline-DG70UNkU.js → vue-ui-table-sparkline-BHkqm0Sf.js} +78 -74
- package/dist/vue-ui-table-sparkline-hyL_92AC.cjs +1 -0
- package/dist/vue-ui-thermometer-CKiohIHn.cjs +1 -0
- package/dist/{vue-ui-thermometer-Vr2IP_p0.js → vue-ui-thermometer-Dvk3S7jR.js} +132 -120
- package/dist/vue-ui-timer-BUuk2p4C.cjs +64 -0
- package/dist/{vue-ui-timer-CD7gFOjN.js → vue-ui-timer-D0tGj6hK.js} +94 -82
- package/dist/{vue-ui-tiremarks-44pO3jx1.js → vue-ui-tiremarks-C2G0Sem6.js} +104 -94
- package/dist/vue-ui-tiremarks-Csng3xWI.cjs +1 -0
- package/dist/{vue-ui-treemap-CyOUM3-P.js → vue-ui-treemap-3iutCx61.js} +336 -332
- package/dist/vue-ui-treemap-CJjATl47.cjs +1 -0
- package/dist/{vue-ui-vertical-bar-wngOp0Zc.js → vue-ui-vertical-bar-DZz_tUTV.js} +188 -176
- package/dist/vue-ui-vertical-bar-DtuEIajX.cjs +4 -0
- package/dist/vue-ui-waffle-B-Uf38ml.cjs +1 -0
- package/dist/{vue-ui-waffle-CuN7i0ci.js → vue-ui-waffle-Cr4FGNwb.js} +140 -136
- package/dist/vue-ui-wheel-Bijmdum9.cjs +1 -0
- package/dist/{vue-ui-wheel-B_gLugLx.js → vue-ui-wheel-Da4DH062.js} +100 -88
- package/dist/{vue-ui-word-cloud-DKHGS0my.js → vue-ui-word-cloud-C3o4JBD2.js} +132 -120
- package/dist/vue-ui-word-cloud-Cjyh1I0J.cjs +1 -0
- package/dist/{vue-ui-xy-BK9R8MrJ.js → vue-ui-xy-BX_3ddck.js} +139 -127
- package/dist/{vue-ui-xy-canvas-DaT4HoWD.js → vue-ui-xy-canvas-DqzVCtbZ.js} +231 -227
- package/dist/{vue-ui-xy-canvas-gDaRsnBI.cjs → vue-ui-xy-canvas-ObtOgMlV.cjs} +2 -2
- package/dist/vue-ui-xy-gClSSwyU.cjs +3 -0
- package/package.json +1 -1
- package/dist/index-o6tXRhOr.cjs +0 -9
- package/dist/vue-ui-3d-bar-zKUnnMOY.cjs +0 -19
- package/dist/vue-ui-age-pyramid-Bg8Bexac.cjs +0 -1
- package/dist/vue-ui-bullet-DqM9h81O.cjs +0 -34
- package/dist/vue-ui-candlestick-C0PkovyK.cjs +0 -2
- package/dist/vue-ui-carousel-table-DbXCpYUm.cjs +0 -1
- package/dist/vue-ui-chestnut-Be4Lagdr.cjs +0 -6
- package/dist/vue-ui-donut-B7orj3vV.cjs +0 -1
- package/dist/vue-ui-donut-evolution-BmTzjKlH.cjs +0 -1
- package/dist/vue-ui-dumbbell-5yfcA-Of.cjs +0 -9
- package/dist/vue-ui-flow-Bar7LG9t.cjs +0 -1
- package/dist/vue-ui-funnel-lxHehCUr.cjs +0 -1
- package/dist/vue-ui-galaxy-B8zbGikp.cjs +0 -1
- package/dist/vue-ui-gauge-Bz1nzveF.cjs +0 -1
- package/dist/vue-ui-gizmo-C9XQ-7Sj.cjs +0 -1
- package/dist/vue-ui-heatmap-BW6dmp8j.cjs +0 -1
- package/dist/vue-ui-history-plot-Mp0zDeR-.cjs +0 -1
- package/dist/vue-ui-kpi-D8hh3p8f.cjs +0 -1
- package/dist/vue-ui-molecule-RkdIX-iW.cjs +0 -1
- package/dist/vue-ui-mood-radar-DLpDoq0G.cjs +0 -1
- package/dist/vue-ui-nested-donuts-BO249_PV.cjs +0 -17
- package/dist/vue-ui-onion-BjNQgHPX.cjs +0 -5
- package/dist/vue-ui-parallel-coordinate-plot-CoeVi-98.cjs +0 -8
- package/dist/vue-ui-quadrant-D701bdNz.cjs +0 -1
- package/dist/vue-ui-quick-chart-CRNEkxoM.cjs +0 -15
- package/dist/vue-ui-radar-3W9NRklj.cjs +0 -1
- package/dist/vue-ui-rating-DeuaL_cU.cjs +0 -1
- package/dist/vue-ui-relation-circle-B8JtK-JM.cjs +0 -1
- package/dist/vue-ui-rings-CZCTLghE.cjs +0 -2
- package/dist/vue-ui-scatter-DlA0xU5U.cjs +0 -1
- package/dist/vue-ui-smiley-BISneB7t.cjs +0 -2
- package/dist/vue-ui-spark-trend-lMzod-5S.cjs +0 -1
- package/dist/vue-ui-sparkbar-DcdDLl8l.cjs +0 -1
- package/dist/vue-ui-sparkgauge-BhwNRzrD.cjs +0 -1
- package/dist/vue-ui-sparkhistogram-D00ahrgs.cjs +0 -1
- package/dist/vue-ui-sparkline-CY92qVz0.cjs +0 -1
- package/dist/vue-ui-sparkstackbar-BjKL_6dq.cjs +0 -1
- package/dist/vue-ui-stackbar-T4VBFpDo.cjs +0 -6
- package/dist/vue-ui-strip-plot-CtjbMamo.cjs +0 -1
- package/dist/vue-ui-table-heatmap-CPn-jC0n.cjs +0 -1
- package/dist/vue-ui-table-sparkline-CIDuWZZs.cjs +0 -1
- package/dist/vue-ui-thermometer-CMvk1D7J.cjs +0 -1
- package/dist/vue-ui-timer-CUHgN89f.cjs +0 -64
- package/dist/vue-ui-tiremarks-w_gxHFeB.cjs +0 -1
- package/dist/vue-ui-treemap-CFhTEaxa.cjs +0 -1
- package/dist/vue-ui-vertical-bar-C51RKLB8.cjs +0 -4
- package/dist/vue-ui-waffle-CXZc4t27.cjs +0 -1
- package/dist/vue-ui-wheel-u9Vc7ZTZ.cjs +0 -1
- package/dist/vue-ui-word-cloud-tSXyXvd6.cjs +0 -1
- package/dist/vue-ui-xy-bX3g4COC.cjs +0 -3
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
import { useCssVars as
|
|
2
|
-
import { u as
|
|
3
|
-
import { u as
|
|
4
|
-
import
|
|
5
|
-
import W from "./BaseIcon-
|
|
6
|
-
import { u as
|
|
7
|
-
import { u as
|
|
8
|
-
import { _ as
|
|
9
|
-
const
|
|
1
|
+
import { useCssVars as $e, ref as p, useSlots as ze, onMounted as pe, computed as _, watch as fe, openBlock as d, createElementBlock as c, normalizeClass as X, unref as i, normalizeStyle as s, createElementVNode as f, toDisplayString as C, createCommentVNode as b, withDirectives as Pe, createVNode as $, Fragment as J, renderList as K, createBlock as De, createSlots as Ne, withCtx as N, renderSlot as z, normalizeProps as Fe, guardReactiveProps as Ve, nextTick as Te } from "vue";
|
|
2
|
+
import { u as We, c as Me, t as Ee, a as Ue, p as F, b as Be, o as Ge, e as me, g as Le, $ as Re, d as He, i as V, f as T, q as qe, r as Xe } from "./index-B9RAElpI.js";
|
|
3
|
+
import { u as ge } from "./useNestedProp-DuruL3Nt.js";
|
|
4
|
+
import Je from "./vue-ui-sparkline-Ca1ai-Mq.js";
|
|
5
|
+
import W from "./BaseIcon-BbU81zOd.js";
|
|
6
|
+
import { u as Ke, U as Qe, v as Ye } from "./usePrinter-CwTAwqtF.js";
|
|
7
|
+
import { u as Ze } from "./useUserOptionState-BIvW1Kz7.js";
|
|
8
|
+
import { _ as je } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
9
|
+
const et = ["id"], tt = { style: { "z-index": "1", "padding-right": "24px" } }, at = {
|
|
10
10
|
key: 0,
|
|
11
11
|
style: {
|
|
12
12
|
display: "flex",
|
|
13
13
|
flexDirection: "row",
|
|
14
14
|
alignItems: "center"
|
|
15
15
|
}
|
|
16
|
-
},
|
|
16
|
+
}, lt = {
|
|
17
17
|
key: 0,
|
|
18
18
|
style: {
|
|
19
19
|
display: "flex",
|
|
20
20
|
flexDirection: "row",
|
|
21
21
|
alignItems: "center"
|
|
22
22
|
}
|
|
23
|
-
},
|
|
23
|
+
}, ot = ["onClick"], nt = ["onClick"], ut = ["data-cell"], st = ["data-cell", "onPointerenter"], rt = ["data-cell"], it = ["data-cell"], dt = ["data-cell"], vt = ["data-cell"], ct = {
|
|
24
24
|
key: 1,
|
|
25
25
|
ref: "source",
|
|
26
26
|
dir: "auto"
|
|
27
|
-
},
|
|
27
|
+
}, pt = {
|
|
28
28
|
__name: "vue-ui-table-sparkline",
|
|
29
29
|
props: {
|
|
30
30
|
config: {
|
|
@@ -40,49 +40,53 @@ const Ze = ["id"], je = { style: { "z-index": "1", "padding-right": "24px" } },
|
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
42
|
},
|
|
43
|
-
setup(
|
|
44
|
-
const x =
|
|
45
|
-
|
|
46
|
-
|
|
43
|
+
setup(be, { expose: ye }) {
|
|
44
|
+
const x = be;
|
|
45
|
+
$e((t) => ({
|
|
46
|
+
eeaf54cc: t.tdo
|
|
47
47
|
}));
|
|
48
|
-
const { vue_ui_table_sparkline:
|
|
48
|
+
const { vue_ui_table_sparkline: he } = We(), M = p(Me()), Q = p(0), E = p(0), U = p(null), ke = ze();
|
|
49
|
+
pe(() => {
|
|
50
|
+
ke["chart-background"] && console.warn("VueUiTableSparkline does not support the #chart-background slot.");
|
|
51
|
+
});
|
|
52
|
+
const e = _({
|
|
49
53
|
get: () => j(),
|
|
50
54
|
set: (t) => t
|
|
51
|
-
}), { userOptionsVisible:
|
|
55
|
+
}), { userOptionsVisible: B, setUserOptionsVisibility: Y, keepUserOptionState: Z } = Ze({ config: e.value });
|
|
52
56
|
function j() {
|
|
53
|
-
const t =
|
|
57
|
+
const t = ge({
|
|
54
58
|
userConfig: x.config,
|
|
55
|
-
defaultConfig:
|
|
59
|
+
defaultConfig: he
|
|
56
60
|
});
|
|
57
61
|
return t.theme ? {
|
|
58
|
-
...
|
|
59
|
-
userConfig:
|
|
62
|
+
...ge({
|
|
63
|
+
userConfig: Ee.vue_ui_table_sparkline[t.theme] || x.config,
|
|
60
64
|
defaultConfig: t
|
|
61
65
|
}),
|
|
62
|
-
customPalette:
|
|
66
|
+
customPalette: Ue[t.theme] || F
|
|
63
67
|
} : t;
|
|
64
68
|
}
|
|
65
|
-
|
|
66
|
-
e.value = j(),
|
|
67
|
-
}, { deep: !0 }),
|
|
69
|
+
fe(() => x.config, (t) => {
|
|
70
|
+
e.value = j(), B.value = !e.value.showOnChartHover, oe(), E.value += 1;
|
|
71
|
+
}, { deep: !0 }), fe(() => x.dataset, (t) => {
|
|
68
72
|
m.value = A.value, E.value += 1;
|
|
69
73
|
}, { deep: !0 });
|
|
70
|
-
const { isPrinting: ee, isImaging: te, generatePdf: ae, generateImage: le } =
|
|
74
|
+
const { isPrinting: ee, isImaging: te, generatePdf: ae, generateImage: le } = Ke({
|
|
71
75
|
elementId: `table_${M.value}`,
|
|
72
76
|
fileName: e.value.title.text || "vue-ui-table-sparkline"
|
|
73
|
-
}),
|
|
74
|
-
|
|
77
|
+
}), _e = _(() => Be(e.value.customPalette)), P = p(null), G = p(!1), Ce = _(() => e.value.responsiveBreakpoint);
|
|
78
|
+
pe(() => {
|
|
75
79
|
oe();
|
|
76
80
|
});
|
|
77
81
|
const L = p(e.value.colNames);
|
|
78
82
|
function oe() {
|
|
79
|
-
|
|
83
|
+
Ge(x.dataset) && me({
|
|
80
84
|
componentName: "VueUiTableSparkline",
|
|
81
85
|
type: "dataset"
|
|
82
86
|
});
|
|
83
87
|
const t = new ResizeObserver((l) => {
|
|
84
88
|
l.forEach((a) => {
|
|
85
|
-
|
|
89
|
+
G.value = a.contentRect.width < Ce.value;
|
|
86
90
|
});
|
|
87
91
|
});
|
|
88
92
|
P.value && t.observe(P.value), L.value = [];
|
|
@@ -90,11 +94,11 @@ const Ze = ["id"], je = { style: { "z-index": "1", "padding-right": "24px" } },
|
|
|
90
94
|
L.value.push(e.value.colNames[l] || `col ${l}`);
|
|
91
95
|
}
|
|
92
96
|
const ne = _(() => (x.dataset.forEach((t, l) => {
|
|
93
|
-
|
|
97
|
+
Le({
|
|
94
98
|
datasetObject: t,
|
|
95
99
|
requiredAttributes: ["name", "values"]
|
|
96
100
|
}).forEach((a) => {
|
|
97
|
-
|
|
101
|
+
me({
|
|
98
102
|
componentName: "VueUiTableSparkline",
|
|
99
103
|
type: "datasetSerieAttribute",
|
|
100
104
|
property: a,
|
|
@@ -102,11 +106,11 @@ const Ze = ["id"], je = { style: { "z-index": "1", "padding-right": "24px" } },
|
|
|
102
106
|
});
|
|
103
107
|
});
|
|
104
108
|
}), x.dataset.map((t, l) => {
|
|
105
|
-
const a = (t.values || []).map((v) => isNaN(v) ? 0 : v ?? 0), o = a.reduce((v, r) => v + r, 0), u = o / a.length, n =
|
|
109
|
+
const a = (t.values || []).map((v) => isNaN(v) ? 0 : v ?? 0), o = a.reduce((v, r) => v + r, 0), u = o / a.length, n = Re(a);
|
|
106
110
|
return {
|
|
107
111
|
...t,
|
|
108
112
|
values: t.values || [],
|
|
109
|
-
color:
|
|
113
|
+
color: He(t.color) || _e.value[l] || F[l] || F[l % F.length],
|
|
110
114
|
sum: o,
|
|
111
115
|
average: u,
|
|
112
116
|
median: n,
|
|
@@ -116,7 +120,7 @@ const Ze = ["id"], je = { style: { "z-index": "1", "padding-right": "24px" } },
|
|
|
116
120
|
}))
|
|
117
121
|
};
|
|
118
122
|
})));
|
|
119
|
-
function
|
|
123
|
+
function xe(t) {
|
|
120
124
|
const a = (t[0].values || []).map(
|
|
121
125
|
(u, n) => t.map((v) => v.values[n] || [])
|
|
122
126
|
).map(
|
|
@@ -128,7 +132,7 @@ const Ze = ["id"], je = { style: { "z-index": "1", "padding-right": "24px" } },
|
|
|
128
132
|
orders: a[n]
|
|
129
133
|
}));
|
|
130
134
|
}
|
|
131
|
-
const A = _(() =>
|
|
135
|
+
const A = _(() => xe(ne.value)), m = p(A.value), we = _(() => Math.max(...m.value.map((t) => (t.values || []).length))), R = p(void 0), H = p(!1), g = p(void 0), ue = p(1);
|
|
132
136
|
function I() {
|
|
133
137
|
H.value = !1, g.value = void 0, y.value = void 0, ue.value = 1, O.value.forEach((t) => t.state = 1), w.value = {
|
|
134
138
|
name: 1,
|
|
@@ -139,7 +143,7 @@ const Ze = ["id"], je = { style: { "z-index": "1", "padding-right": "24px" } },
|
|
|
139
143
|
}
|
|
140
144
|
function D(t, l, a) {
|
|
141
145
|
if (["name", "sum", "average", "median"].includes(t.type)) {
|
|
142
|
-
|
|
146
|
+
Se(t.type, l, a);
|
|
143
147
|
return;
|
|
144
148
|
}
|
|
145
149
|
if (!de(l)) return;
|
|
@@ -174,7 +178,7 @@ const Ze = ["id"], je = { style: { "z-index": "1", "padding-right": "24px" } },
|
|
|
174
178
|
average: 1,
|
|
175
179
|
median: 1
|
|
176
180
|
}), y = p(void 0);
|
|
177
|
-
function
|
|
181
|
+
function Se(t, l, a) {
|
|
178
182
|
if (!m.value || m.value.length === 0 || !ve(t)) return;
|
|
179
183
|
if (y.value !== t && (y.value = void 0), ![null, void 0].includes(g.value) && l !== g.value && I(), g.value = void 0, w.value[t] === a && y.value) {
|
|
180
184
|
y.value = void 0, I();
|
|
@@ -188,23 +192,23 @@ const Ze = ["id"], je = { style: { "z-index": "1", "padding-right": "24px" } },
|
|
|
188
192
|
m.value = u;
|
|
189
193
|
}
|
|
190
194
|
const S = p(void 0), q = p(void 0);
|
|
191
|
-
function
|
|
192
|
-
S.value = t, q.value = l,
|
|
195
|
+
function Ie({ dataIndex: t, serieIndex: l }) {
|
|
196
|
+
S.value = t, q.value = l, U.value[t] && !G.value && U.value[t].scrollIntoView({ behavior: "smooth", block: "nearest", inline: "center" });
|
|
193
197
|
}
|
|
194
198
|
const re = p(!1);
|
|
195
|
-
function
|
|
199
|
+
function Ae(t) {
|
|
196
200
|
re.value = t, Q.value += 1;
|
|
197
201
|
}
|
|
198
202
|
function ie() {
|
|
199
|
-
|
|
203
|
+
Te(() => {
|
|
200
204
|
const t = [e.value.translations.serie].concat(k.value), l = ne.value.map((u, n) => [
|
|
201
205
|
[u.name],
|
|
202
206
|
u.values,
|
|
203
207
|
[u.sum],
|
|
204
208
|
[u.average],
|
|
205
209
|
[u.median]
|
|
206
|
-
]), a = [t].concat(l), o =
|
|
207
|
-
|
|
210
|
+
]), a = [t].concat(l), o = qe(a);
|
|
211
|
+
Xe({
|
|
208
212
|
csvContent: o,
|
|
209
213
|
title: e.value.title.text || "vue-ui-table-sparkline"
|
|
210
214
|
});
|
|
@@ -219,14 +223,14 @@ const Ze = ["id"], je = { style: { "z-index": "1", "padding-right": "24px" } },
|
|
|
219
223
|
function ce(t, l, a) {
|
|
220
224
|
return ["sum", "average", "median"].includes(l.type) ? y.value === l.type && w.value[l.type] === a ? 1 : 0.3 : t === g.value && O.value[t].state === a ? 1 : 0.3;
|
|
221
225
|
}
|
|
222
|
-
function
|
|
226
|
+
function Oe() {
|
|
223
227
|
e.value.resetSortOnClickOutside && I();
|
|
224
228
|
}
|
|
225
229
|
const O = _({
|
|
226
230
|
get: () => k.value.map((t) => ({ state: 1 })),
|
|
227
231
|
set: (t) => t
|
|
228
232
|
});
|
|
229
|
-
return
|
|
233
|
+
return ye({
|
|
230
234
|
generatePdf: ae,
|
|
231
235
|
generateImage: le,
|
|
232
236
|
generateCsv: ie,
|
|
@@ -234,7 +238,7 @@ const Ze = ["id"], je = { style: { "z-index": "1", "padding-right": "24px" } },
|
|
|
234
238
|
}), (t, l) => (d(), c("div", {
|
|
235
239
|
ref_key: "tableContainer",
|
|
236
240
|
ref: P,
|
|
237
|
-
class: X({ "vue-ui-responsive":
|
|
241
|
+
class: X({ "vue-ui-responsive": G.value }),
|
|
238
242
|
style: { overflow: "hidden" },
|
|
239
243
|
id: `table_${M.value}`,
|
|
240
244
|
onMouseenter: l[3] || (l[3] = () => i(Y)(!0)),
|
|
@@ -273,8 +277,8 @@ const Ze = ["id"], je = { style: { "z-index": "1", "padding-right": "24px" } },
|
|
|
273
277
|
class: "vue-ui-data-table",
|
|
274
278
|
style: s({ fontFamily: e.value.fontFamily, position: "relative" })
|
|
275
279
|
}, [
|
|
276
|
-
f("thead",
|
|
277
|
-
|
|
280
|
+
f("thead", tt, [
|
|
281
|
+
Pe((d(), c("tr", {
|
|
278
282
|
role: "row",
|
|
279
283
|
class: "vue-ui-data-table__thead-row",
|
|
280
284
|
style: s({
|
|
@@ -302,7 +306,7 @@ const Ze = ["id"], je = { style: { "z-index": "1", "padding-right": "24px" } },
|
|
|
302
306
|
})
|
|
303
307
|
}, [
|
|
304
308
|
f("span", null, C(e.value.translations.serie), 1),
|
|
305
|
-
m.value.length > 1 && e.value.sortedSeriesName ? (d(), c("div",
|
|
309
|
+
m.value.length > 1 && e.value.sortedSeriesName ? (d(), c("div", at, [
|
|
306
310
|
f("button", {
|
|
307
311
|
class: "vue-ui-table-sparkline-sorting-button vue-ui-table-sparkline-sorting-button-down",
|
|
308
312
|
onClick: l[0] || (l[0] = (a) => D({ type: "name" }, null, -1))
|
|
@@ -354,7 +358,7 @@ const Ze = ["id"], je = { style: { "z-index": "1", "padding-right": "24px" } },
|
|
|
354
358
|
})
|
|
355
359
|
}, [
|
|
356
360
|
f("span", null, C(a.value), 1),
|
|
357
|
-
m.value.length > 1 && (de(o) || ve(a)) ? (d(), c("div",
|
|
361
|
+
m.value.length > 1 && (de(o) || ve(a)) ? (d(), c("div", lt, [
|
|
358
362
|
f("button", {
|
|
359
363
|
class: "vue-ui-table-sparkline-sorting-button vue-ui-table-sparkline-sorting-button-down",
|
|
360
364
|
onClick: () => D(a, o, -1)
|
|
@@ -367,7 +371,7 @@ const Ze = ["id"], je = { style: { "z-index": "1", "padding-right": "24px" } },
|
|
|
367
371
|
opacity: ce(o, a, -1)
|
|
368
372
|
})
|
|
369
373
|
}, null, 8, ["stroke", "style"])
|
|
370
|
-
], 8,
|
|
374
|
+
], 8, ot),
|
|
371
375
|
f("button", {
|
|
372
376
|
class: "vue-ui-table-sparkline-sorting-button vue-ui-table-sparkline-sorting-button-up",
|
|
373
377
|
onClick: () => D(a, o, 1)
|
|
@@ -380,10 +384,10 @@ const Ze = ["id"], je = { style: { "z-index": "1", "padding-right": "24px" } },
|
|
|
380
384
|
opacity: ce(o, a, 1)
|
|
381
385
|
})
|
|
382
386
|
}, null, 8, ["stroke", "style"])
|
|
383
|
-
], 8,
|
|
387
|
+
], 8, nt)
|
|
384
388
|
])) : b("", !0)
|
|
385
389
|
], 4),
|
|
386
|
-
e.value.userOptions.show && o === k.value.length - 1 && (i(Z) || i(
|
|
390
|
+
e.value.userOptions.show && o === k.value.length - 1 && (i(Z) || i(B)) ? (d(), De(Qe, {
|
|
387
391
|
ref_for: !0,
|
|
388
392
|
ref: "details",
|
|
389
393
|
key: `user_option_${Q.value}`,
|
|
@@ -400,14 +404,14 @@ const Ze = ["id"], je = { style: { "z-index": "1", "padding-right": "24px" } },
|
|
|
400
404
|
titles: { ...e.value.userOptions.buttonTitles },
|
|
401
405
|
chartElement: P.value,
|
|
402
406
|
position: e.value.userOptions.position,
|
|
403
|
-
onToggleFullscreen:
|
|
407
|
+
onToggleFullscreen: Ae,
|
|
404
408
|
onGeneratePdf: i(ae),
|
|
405
409
|
onGenerateImage: i(le),
|
|
406
410
|
onGenerateCsv: ie,
|
|
407
411
|
style: s({
|
|
408
|
-
visibility: i(Z) ? i(
|
|
412
|
+
visibility: i(Z) ? i(B) ? "visible" : "hidden" : "visible"
|
|
409
413
|
})
|
|
410
|
-
},
|
|
414
|
+
}, Ne({ _: 2 }, [
|
|
411
415
|
t.$slots.optionPdf ? {
|
|
412
416
|
name: "optionPdf",
|
|
413
417
|
fn: N(() => [
|
|
@@ -432,14 +436,14 @@ const Ze = ["id"], je = { style: { "z-index": "1", "padding-right": "24px" } },
|
|
|
432
436
|
t.$slots.optionFullscreen ? {
|
|
433
437
|
name: "optionFullscreen",
|
|
434
438
|
fn: N(({ toggleFullscreen: u, isFullscreen: n }) => [
|
|
435
|
-
z(t.$slots, "optionFullscreen",
|
|
439
|
+
z(t.$slots, "optionFullscreen", Fe(Ve({ toggleFullscreen: u, isFullscreen: n })), void 0, !0)
|
|
436
440
|
]),
|
|
437
441
|
key: "3"
|
|
438
442
|
} : void 0
|
|
439
443
|
]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasPdf", "hasXls", "hasImg", "hasFullscreen", "isFullscreen", "titles", "chartElement", "position", "onGeneratePdf", "onGenerateImage", "style"])) : b("", !0)
|
|
440
444
|
], 6))), 256))
|
|
441
445
|
], 4)), [
|
|
442
|
-
[i(
|
|
446
|
+
[i(Ye), Oe]
|
|
443
447
|
])
|
|
444
448
|
]),
|
|
445
449
|
f("tbody", null, [
|
|
@@ -479,13 +483,13 @@ const Ze = ["id"], je = { style: { "z-index": "1", "padding-right": "24px" } },
|
|
|
479
483
|
}, "⬤", 4)) : b("", !0),
|
|
480
484
|
f("span", null, C(a.name ?? "-"), 1)
|
|
481
485
|
], 4)
|
|
482
|
-
], 12,
|
|
483
|
-
(d(!0), c(J, null, K(
|
|
486
|
+
], 12, ut),
|
|
487
|
+
(d(!0), c(J, null, K(we.value, (u, n) => (d(), c("td", {
|
|
484
488
|
dir: "auto",
|
|
485
489
|
role: "cell",
|
|
486
490
|
ref_for: !0,
|
|
487
491
|
ref_key: "TD",
|
|
488
|
-
ref:
|
|
492
|
+
ref: U,
|
|
489
493
|
style: s({
|
|
490
494
|
border: e.value.tbody.outline,
|
|
491
495
|
fontSize: `${e.value.tbody.fontSize}px`,
|
|
@@ -508,7 +512,7 @@ const Ze = ["id"], je = { style: { "z-index": "1", "padding-right": "24px" } },
|
|
|
508
512
|
r: e.value.roundingValues
|
|
509
513
|
}),
|
|
510
514
|
{ datapoint: a, seriesIndex: o, datapointIndex: n }
|
|
511
|
-
)), 45,
|
|
515
|
+
)), 45, st))), 256)),
|
|
512
516
|
e.value.showTotal ? (d(), c("td", {
|
|
513
517
|
key: 0,
|
|
514
518
|
dir: "auto",
|
|
@@ -531,7 +535,7 @@ const Ze = ["id"], je = { style: { "z-index": "1", "padding-right": "24px" } },
|
|
|
531
535
|
r: e.value.roundingTotal
|
|
532
536
|
}),
|
|
533
537
|
{ datapoint: a.sum, seriesIndex: o }
|
|
534
|
-
)), 13,
|
|
538
|
+
)), 13, rt)) : b("", !0),
|
|
535
539
|
e.value.showAverage ? (d(), c("td", {
|
|
536
540
|
key: 1,
|
|
537
541
|
dir: "auto",
|
|
@@ -554,7 +558,7 @@ const Ze = ["id"], je = { style: { "z-index": "1", "padding-right": "24px" } },
|
|
|
554
558
|
r: e.value.roundingAverage
|
|
555
559
|
}),
|
|
556
560
|
{ datapoint: a.average, seriesIndex: o }
|
|
557
|
-
)), 13,
|
|
561
|
+
)), 13, it)) : b("", !0),
|
|
558
562
|
e.value.showMedian ? (d(), c("td", {
|
|
559
563
|
key: 2,
|
|
560
564
|
dir: "auto",
|
|
@@ -577,7 +581,7 @@ const Ze = ["id"], je = { style: { "z-index": "1", "padding-right": "24px" } },
|
|
|
577
581
|
r: e.value.roundingMedian
|
|
578
582
|
}),
|
|
579
583
|
{ datapoint: a.median, seriesIndex: o }
|
|
580
|
-
)), 13,
|
|
584
|
+
)), 13, dt)) : b("", !0),
|
|
581
585
|
e.value.showSparklines ? (d(), c("td", {
|
|
582
586
|
key: 3,
|
|
583
587
|
role: "cell",
|
|
@@ -592,8 +596,8 @@ const Ze = ["id"], je = { style: { "z-index": "1", "padding-right": "24px" } },
|
|
|
592
596
|
}),
|
|
593
597
|
class: "vue-ui-data-table__tbody__td sticky-col"
|
|
594
598
|
}, [
|
|
595
|
-
$(
|
|
596
|
-
onHoverIndex: ({ index: u }) =>
|
|
599
|
+
$(Je, {
|
|
600
|
+
onHoverIndex: ({ index: u }) => Ie({ dataIndex: u, serieIndex: o }),
|
|
597
601
|
"height-ratio": e.value.sparkline.dimensions.heightRatio,
|
|
598
602
|
"forced-padding": 30,
|
|
599
603
|
dataset: a.sparklineDataset,
|
|
@@ -631,17 +635,17 @@ const Ze = ["id"], je = { style: { "z-index": "1", "padding-right": "24px" } },
|
|
|
631
635
|
}
|
|
632
636
|
}
|
|
633
637
|
}, null, 8, ["onHoverIndex", "height-ratio", "dataset", "selectedIndex", "config"])
|
|
634
|
-
], 12,
|
|
638
|
+
], 12, vt)) : b("", !0)
|
|
635
639
|
], 6))), 256))
|
|
636
640
|
])
|
|
637
641
|
], 4)
|
|
638
642
|
], 32),
|
|
639
|
-
t.$slots.source ? (d(), c("div",
|
|
643
|
+
t.$slots.source ? (d(), c("div", ct, [
|
|
640
644
|
z(t.$slots, "source", {}, void 0, !0)
|
|
641
645
|
], 512)) : b("", !0)
|
|
642
|
-
], 42,
|
|
646
|
+
], 42, et));
|
|
643
647
|
}
|
|
644
|
-
},
|
|
648
|
+
}, Ct = /* @__PURE__ */ je(pt, [["__scopeId", "data-v-4ee38c49"]]);
|
|
645
649
|
export {
|
|
646
|
-
|
|
650
|
+
Ct as default
|
|
647
651
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("./index-DaDv7p0W.cjs"),Y=require("./useNestedProp-DkpuL8Iv.cjs"),ce=require("./vue-ui-sparkline-B_1J2ft2.cjs"),x=require("./BaseIcon-DD3GLrhS.cjs"),D=require("./usePrinter-BIHu0O5X.cjs"),ve=require("./useUserOptionState-BgepsfED.cjs"),pe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),me=["id"],fe={style:{"z-index":"1","padding-right":"24px"}},ye={key:0,style:{display:"flex",flexDirection:"row",alignItems:"center"}},ge={key:0,style:{display:"flex",flexDirection:"row",alignItems:"center"}},be=["onClick"],ke=["onClick"],he=["data-cell"],Se=["data-cell","onPointerenter"],Ce=["data-cell"],_e=["data-cell"],xe=["data-cell"],we=["data-cell"],Ne={key:1,ref:"source",dir:"auto"},ze={__name:"vue-ui-table-sparkline",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(Z,{expose:ee}){const y=Z;e.useCssVars(l=>({eeaf54cc:l.tdo}));const{vue_ui_table_sparkline:te}=u.useConfig(),w=e.ref(u.createUid()),$=e.ref(0),N=e.ref(0),z=e.ref(null),le=e.useSlots();e.onMounted(()=>{le["chart-background"]&&console.warn("VueUiTableSparkline does not support the #chart-background slot.")});const t=e.computed({get:()=>T(),set:l=>l}),{userOptionsVisible:V,setUserOptionsVisibility:P,keepUserOptionState:F}=ve.useUserOptionState({config:t.value});function T(){const l=Y.useNestedProp({userConfig:y.config,defaultConfig:te});return l.theme?{...Y.useNestedProp({userConfig:u.themes.vue_ui_table_sparkline[l.theme]||y.config,defaultConfig:l}),customPalette:u.themePalettes[l.theme]||u.palette}:l}e.watch(()=>y.config,l=>{t.value=T(),V.value=!t.value.showOnChartHover,q(),N.value+=1},{deep:!0}),e.watch(()=>y.dataset,l=>{c.value=h.value,N.value+=1},{deep:!0});const{isPrinting:M,isImaging:W,generatePdf:L,generateImage:U}=D.usePrinter({elementId:`table_${w.value}`,fileName:t.value.title.text||"vue-ui-table-sparkline"}),ae=e.computed(()=>u.convertCustomPalette(t.value.customPalette)),C=e.ref(null),B=e.ref(!1),oe=e.computed(()=>t.value.responsiveBreakpoint);e.onMounted(()=>{q()});const E=e.ref(t.value.colNames);function q(){u.objectIsEmpty(y.dataset)&&u.error({componentName:"VueUiTableSparkline",type:"dataset"});const l=new ResizeObserver(o=>{o.forEach(a=>{B.value=a.contentRect.width<oe.value})});C.value&&l.observe(C.value),E.value=[];for(let o=0;o<H.value;o+=1)E.value.push(t.value.colNames[o]||`col ${o}`)}const G=e.computed(()=>(y.dataset.forEach((l,o)=>{u.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","values"]}).forEach(a=>{u.error({componentName:"VueUiTableSparkline",type:"datasetSerieAttribute",property:a,index:o})})}),y.dataset.map((l,o)=>{const a=(l.values||[]).map(d=>isNaN(d)?0:d??0),n=a.reduce((d,i)=>d+i,0),s=n/a.length,r=u.calcMedian(a);return{...l,values:l.values||[],color:u.convertColorToHex(l.color)||ae.value[o]||u.palette[o]||u.palette[o%u.palette.length],sum:n,average:s,median:r,sparklineDataset:a.map((d,i)=>({period:t.value.colNames[i]||`col ${i}`,value:d||0}))}})));function ne(l){const a=(l[0].values||[]).map((s,r)=>l.map(d=>d.values[r]||[])).map(s=>s.map((r,d)=>[r,d]).sort((r,d)=>d[0]-r[0]).map(r=>r[1]));return l.map((s,r)=>({...s,values:s.values||[],orders:a[r]}))}const h=e.computed(()=>ne(G.value)),c=e.ref(h.value),re=e.computed(()=>Math.max(...c.value.map(l=>(l.values||[]).length))),I=e.ref(void 0),A=e.ref(!1),v=e.ref(void 0),R=e.ref(1);function k(){A.value=!1,v.value=void 0,p.value=void 0,R.value=1,S.value.forEach(l=>l.state=1),g.value={name:1,sum:1,average:1,median:1},c.value=h.value}function _(l,o,a){if(["name","sum","average","median"].includes(l.type)){ue(l.type,o,a);return}if(!J(o))return;if(b.value=o,p.value=void 0,![null,void 0].includes(v.value)&&o!==v.value&&(v.value=void 0,k()),S.value[o].state===a&&v.value===o){v.value=void 0,k();return}A.value=!0,v.value=o;const n=h.value.map(i=>i.values[o]||[]),s=a;S.value[o].state=s,R.value=s,o===I.value?I.value=void 0:I.value=o;const d=n.map((i,m)=>[m,i]).sort((i,m)=>s*(m[1]-i[1])).map(i=>i[0]).map(i=>h.value[i]);c.value=d,N.value+=1}const H=e.computed(()=>Math.max(...y.dataset.map(l=>(l.values||[]).length))),f=e.computed(()=>{let l=E.value.map(a=>({type:"reg",value:a}));if(!l.length)for(let a=0;a<H.value;a+=1)l.push({type:"reg",value:`col ${a+1}`});t.value.showTotal&&(l=[...l,{type:"sum",value:t.value.translations.total}]);let o;return t.value.showAverage&&t.value.showMedian?o=[...l,{type:"average",value:t.value.translations.average},{type:"median",value:t.value.translations.median}]:t.value.showAverage&&!t.value.showMedian?o=[...l,{type:"average",value:t.value.translations.average}]:!t.value.showAverage&&t.value.showMedian?o=[...l,{type:"median",value:t.value.translations.median}]:o=l,t.value.showSparklines?[...o,{type:"chart",value:t.value.translations.chart}]:o}),g=e.ref({name:1,sum:1,average:1,median:1}),p=e.ref(void 0);function ue(l,o,a){if(!c.value||c.value.length===0||!K(l))return;if(p.value!==l&&(p.value=void 0),![null,void 0].includes(v.value)&&o!==v.value&&k(),v.value=void 0,g.value[l]===a&&p.value){p.value=void 0,k();return}p.value=l,A.value=!0,g.value[l]=a,[null,void 0].includes(o)||(S.value[o].state=g.value[l]);const n=g.value[l],s=[...c.value].sort((r,d)=>{const i=r[l]??(typeof r[l]=="number"?0:""),m=d[l]??(typeof d[l]=="number"?0:"");return typeof i=="string"&&typeof m=="string"?n===-1?i.localeCompare(m):m.localeCompare(i):typeof i=="number"&&typeof m=="number"?n===-1?i-m:m-i:0});c.value=s}const b=e.ref(void 0),O=e.ref(void 0);function se({dataIndex:l,serieIndex:o}){b.value=l,O.value=o,z.value[l]&&!B.value&&z.value[l].scrollIntoView({behavior:"smooth",block:"nearest",inline:"center"})}const X=e.ref(!1);function ie(l){X.value=l,$.value+=1}function j(){e.nextTick(()=>{const l=[t.value.translations.serie].concat(f.value),o=G.value.map((s,r)=>[[s.name],s.values,[s.sum],[s.average],[s.median]]),a=[l].concat(o),n=u.createCsvContent(a);u.downloadCsv({csvContent:n,title:t.value.title.text||"vue-ui-table-sparkline"})})}function J(l){return t.value.sortedDataColumnIndices.includes(l)}function K(l){return l.type==="name"||l==="name"?t.value.sortedSeriesName:l.type==="sum"||l==="sum"?t.value.sortedSum:l.type==="average"||l==="average"?t.value.sortedAverage:l.type==="median"||l==="median"?t.value.sortedMedian:!1}function Q(l,o,a){return["sum","average","median"].includes(o.type)?p.value===o.type&&g.value[o.type]===a?1:.3:l===v.value&&S.value[l].state===a?1:.3}function de(){t.value.resetSortOnClickOutside&&k()}const S=e.computed({get:()=>f.value.map(l=>({state:1})),set:l=>l});return ee({generatePdf:L,generateImage:U,generateCsv:j,restoreOrder:k}),(l,o)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"tableContainer",ref:C,class:e.normalizeClass({"vue-ui-responsive":B.value}),style:{overflow:"hidden"},id:`table_${w.value}`,onMouseenter:o[3]||(o[3]=()=>e.unref(P)(!0)),onMouseleave:o[4]||(o[4]=()=>e.unref(P)(!1))},[t.value.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,class:"vue-ui-table-sparkline-caption",style:e.normalizeStyle({backgroundColor:t.value.title.backgroundColor})},[e.createElementVNode("div",{style:e.normalizeStyle({fontSize:`${t.value.title.fontSize}px`,fontWeight:t.value.title.bold?"bold":"normal",color:t.value.title.color,textAlign:t.value.title.textAlign})},e.toDisplayString(t.value.title.text),5),t.value.title.subtitle.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle({fontSize:`${t.value.title.subtitle.fontSize}px`,fontWeight:t.value.title.subtitle.bold?"bold":"normal",color:t.value.title.subtitle.color,textAlign:t.value.title.textAlign})},e.toDisplayString(t.value.title.subtitle.text),5)):e.createCommentVNode("",!0)],4)):e.createCommentVNode("",!0),e.createElementVNode("div",{style:{overflow:"auto"},onPointerleave:o[2]||(o[2]=a=>{O.value=void 0,b.value=void 0})},[e.createElementVNode("table",{class:"vue-ui-data-table",style:e.normalizeStyle({fontFamily:t.value.fontFamily,position:"relative"})},[e.createElementVNode("thead",fe,[e.withDirectives((e.openBlock(),e.createElementBlock("tr",{role:"row",class:"vue-ui-data-table__thead-row",style:e.normalizeStyle({backgroundColor:t.value.thead.backgroundColor,color:t.value.thead.color})},[e.createElementVNode("th",{role:"cell",style:e.normalizeStyle({backgroundColor:t.value.thead.backgroundColor,border:t.value.thead.outline,textAlign:t.value.thead.textAlign,fontWeight:t.value.thead.bold?"bold":"normal"}),class:"sticky-col-first"},[e.createElementVNode("div",{style:e.normalizeStyle({display:"flex",flexDirection:"row",alignItems:"center",gap:"3px",justifyContent:t.value.thead.textAlign})},[e.createElementVNode("span",null,e.toDisplayString(t.value.translations.serie),1),c.value.length>1&&t.value.sortedSeriesName?(e.openBlock(),e.createElementBlock("div",ye,[e.createElementVNode("button",{class:"vue-ui-table-sparkline-sorting-button vue-ui-table-sparkline-sorting-button-down",onClick:o[0]||(o[0]=a=>_({type:"name"},null,-1))},[e.createVNode(x.default,{size:12,name:"arrowBottom",stroke:t.value.thead.color,style:e.normalizeStyle({opacity:p.value==="name"&&g.value.name===-1?1:.3})},null,8,["stroke","style"])]),e.createElementVNode("button",{class:"vue-ui-table-sparkline-sorting-button vue-ui-table-sparkline-sorting-button-up",onClick:o[1]||(o[1]=a=>_({type:"name"},null,1))},[e.createVNode(x.default,{size:12,name:"arrowTop",stroke:t.value.thead.color,style:e.normalizeStyle({opacity:p.value==="name"&&g.value.name===1?1:.3})},null,8,["stroke","style"])])])):e.createCommentVNode("",!0)],4)],4),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(a,n)=>(e.openBlock(),e.createElementBlock("th",{role:"cell",style:e.normalizeStyle({background:t.value.thead.backgroundColor,border:t.value.thead.outline,textAlign:t.value.thead.textAlign,fontWeight:t.value.thead.bold?"bold":"normal",minWidth:n===f.value.length-1?`${t.value.sparkline.dimensions.width}px`:"48px",paddingRight:n===f.value.length-1&&t.value.userOptions.show?"36px":""}),class:e.normalizeClass({"sticky-col":n===f.value.length-1&&t.value.showSparklines})},[e.createElementVNode("div",{style:e.normalizeStyle({display:"flex",flexDirection:"row",alignItems:"center",gap:"3px",justifyContent:t.value.thead.textAlign})},[e.createElementVNode("span",null,e.toDisplayString(a.value),1),c.value.length>1&&(J(n)||K(a))?(e.openBlock(),e.createElementBlock("div",ge,[e.createElementVNode("button",{class:"vue-ui-table-sparkline-sorting-button vue-ui-table-sparkline-sorting-button-down",onClick:()=>_(a,n,-1)},[e.createVNode(x.default,{size:12,name:"arrowBottom",stroke:t.value.thead.color,style:e.normalizeStyle({opacity:Q(n,a,-1)})},null,8,["stroke","style"])],8,be),e.createElementVNode("button",{class:"vue-ui-table-sparkline-sorting-button vue-ui-table-sparkline-sorting-button-up",onClick:()=>_(a,n,1)},[e.createVNode(x.default,{size:12,name:"arrowTop",stroke:t.value.thead.color,style:e.normalizeStyle({opacity:Q(n,a,1)})},null,8,["stroke","style"])],8,ke)])):e.createCommentVNode("",!0)],4),t.value.userOptions.show&&n===f.value.length-1&&(e.unref(F)||e.unref(V))?(e.openBlock(),e.createBlock(D.UserOptions,{ref_for:!0,ref:"details",key:`user_option_${$.value}`,backgroundColor:t.value.thead.backgroundColor,color:t.value.thead.color,isPrinting:e.unref(M),isImaging:e.unref(W),uid:w.value,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:X.value,titles:{...t.value.userOptions.buttonTitles},chartElement:C.value,position:t.value.userOptions.position,onToggleFullscreen:ie,onGeneratePdf:e.unref(L),onGenerateImage:e.unref(U),onGenerateCsv:j,style:e.normalizeStyle({visibility:e.unref(F)?e.unref(V)?"visible":"hidden":"visible"})},e.createSlots({_:2},[l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:s,isFullscreen:r})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:s,isFullscreen:r})),void 0,!0)]),key:"3"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasXls","hasImg","hasFullscreen","isFullscreen","titles","chartElement","position","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0)],6))),256))],4)),[[e.unref(D.vClickOutside),de]])]),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(a,n)=>(e.openBlock(),e.createElementBlock("tr",{role:"row",style:e.normalizeStyle({backgroundColor:t.value.tbody.backgroundColor,color:t.value.tbody.color}),class:e.normalizeClass({"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})},[e.createElementVNode("td",{role:"cell",style:e.normalizeStyle({backgroundColor:t.value.tbody.backgroundColor,border:t.value.tbody.outline,fontSize:`${t.value.tbody.fontSize}px`,fontWeight:t.value.tbody.bold?"bold":"normal",textAlign:t.value.tbody.textAlign}),"data-cell":t.value.translations.serie,class:"vue-ui-data-table__tbody__td sticky-col-first"},[e.createElementVNode("div",{dir:"auto",style:e.normalizeStyle({display:"flex",flexDirection:"row",alignItems:"center",gap:"6px",justifyContent:t.value.tbody.textAlign})},[t.value.tbody.showColorMarker?(e.openBlock(),e.createElementBlock("span",{key:0,style:e.normalizeStyle({color:a.color})},"⬤",4)):e.createCommentVNode("",!0),e.createElementVNode("span",null,e.toDisplayString(a.name??"-"),1)],4)],12,he),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(re.value,(s,r)=>(e.openBlock(),e.createElementBlock("td",{dir:"auto",role:"cell",ref_for:!0,ref_key:"TD",ref:z,style:e.normalizeStyle({border:t.value.tbody.outline,fontSize:`${t.value.tbody.fontSize}px`,fontWeight:t.value.tbody.bold?"bold":"normal",textAlign:t.value.tbody.textAlign,background:b.value!==void 0&&r===b.value?t.value.tbody.selectedColor.useSerieColor?`${a.color.length>7?a.color.slice(0,-2):a.color}33`:t.value.tbody.selectedColor.fallback:""}),"data-cell":f.value[r]?f.value[r].value:"",class:"vue-ui-data-table__tbody__td",onPointerenter:d=>{O.value=n,b.value=r}},e.toDisplayString([null,void 0].includes(a.values[r])?"-":e.unref(u.applyDataLabel)(t.value.formatter,Number(a.values[r]),e.unref(u.dataLabel)({p:t.value.prefix,v:Number(a.values[r]),s:t.value.suffix,r:t.value.roundingValues}),{datapoint:a,seriesIndex:n,datapointIndex:r})),45,Se))),256)),t.value.showTotal?(e.openBlock(),e.createElementBlock("td",{key:0,dir:"auto",role:"cell",style:e.normalizeStyle({border:t.value.tbody.outline,fontSize:`${t.value.tbody.fontSize}px`,fontWeight:t.value.tbody.bold?"bold":"normal",textAlign:t.value.tbody.textAlign}),"data-cell":t.value.translations.total,class:"vue-ui-data-table__tbody__td"},e.toDisplayString(e.unref(u.applyDataLabel)(t.value.formatter,a.sum,e.unref(u.dataLabel)({p:t.value.prefix,v:a.sum,s:t.value.suffix,r:t.value.roundingTotal}),{datapoint:a.sum,seriesIndex:n})),13,Ce)):e.createCommentVNode("",!0),t.value.showAverage?(e.openBlock(),e.createElementBlock("td",{key:1,dir:"auto",role:"cell",style:e.normalizeStyle({border:t.value.tbody.outline,fontSize:`${t.value.tbody.fontSize}px`,fontWeight:t.value.tbody.bold?"bold":"normal",textAlign:t.value.tbody.textAlign}),"data-cell":t.value.translations.average,class:"vue-ui-data-table__tbody__td"},e.toDisplayString(e.unref(u.applyDataLabel)(t.value.formatter,a.average,e.unref(u.dataLabel)({p:t.value.prefix,v:a.average,s:t.value.suffix,r:t.value.roundingAverage}),{datapoint:a.average,seriesIndex:n})),13,_e)):e.createCommentVNode("",!0),t.value.showMedian?(e.openBlock(),e.createElementBlock("td",{key:2,dir:"auto",role:"cell",style:e.normalizeStyle({border:t.value.tbody.outline,fontSize:`${t.value.tbody.fontSize}px`,fontWeight:t.value.tbody.bold?"bold":"normal",textAlign:t.value.tbody.textAlign}),"data-cell":t.value.translations.median,class:"vue-ui-data-table__tbody__td"},e.toDisplayString(e.unref(u.applyDataLabel)(t.value.formatter,a.median,e.unref(u.dataLabel)({p:t.value.prefix,v:a.median,s:t.value.suffix,r:t.value.roundingMedian}),{datapoint:a.median,seriesIndex:n})),13,xe)):e.createCommentVNode("",!0),t.value.showSparklines?(e.openBlock(),e.createElementBlock("td",{key:3,role:"cell","data-cell":t.value.translations.chart,style:e.normalizeStyle({border:t.value.tbody.outline,fontSize:`${t.value.tbody.fontSize}px`,fontWeight:t.value.tbody.bold?"bold":"normal",textAlign:t.value.tbody.textAlign,backgroundColor:t.value.tbody.backgroundColor,padding:"0"}),class:"vue-ui-data-table__tbody__td sticky-col"},[e.createVNode(ce.default,{onHoverIndex:({index:s})=>se({dataIndex:s,serieIndex:n}),"height-ratio":t.value.sparkline.dimensions.heightRatio,"forced-padding":30,dataset:a.sparklineDataset,showInfo:!1,selectedIndex:b.value,config:{type:t.value.sparkline.type,style:{backgroundColor:"transparent",animation:{show:t.value.sparkline.animation.show&&!e.unref(M)&&!e.unref(W),animationFrames:t.value.sparkline.animation.animationFrames},line:{color:a.color,smooth:t.value.sparkline.smooth,strokeWidth:t.value.sparkline.strokeWidth},bar:{color:a.color},area:{color:a.color,opacity:t.value.sparkline.showArea?16:0,useGradient:t.value.sparkline.useGradient},verticalIndicator:{color:a.color},plot:{radius:9,stroke:t.value.tbody.backgroundColor,strokeWidth:3}}}},null,8,["onHoverIndex","height-ratio","dataset","selectedIndex","config"])],12,we)):e.createCommentVNode("",!0)],6))),256))])],4)],32),l.$slots.source?(e.openBlock(),e.createElementBlock("div",Ne,[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0)],42,me))}},Ve=pe._export_sfc(ze,[["__scopeId","data-v-4ee38c49"]]);exports.default=Ve;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),a=require("./index-DaDv7p0W.cjs"),te=require("./Title-CpfNWbUc.cjs"),U=require("./usePrinter-BIHu0O5X.cjs"),oe=require("./vue-ui-skeleton-B24XJJ2p.cjs"),Y=require("./useNestedProp-DkpuL8Iv.cjs"),le=require("./PackageVersion-nr7f_VNw.cjs"),re=require("./PenAndPaper-C9v0NXEg.cjs"),ae=require("./useUserOptionState-BgepsfED.cjs"),se=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ne=["id"],ue={key:1,ref:"noTitle",class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},ie={key:2,style:"width:100%"},ce=["xmlns","viewBox"],de=["width","height"],he={id:"vueUiPill",clipPathUnits:"objectBoundingBox"},ve=["fill"],me=["id"],pe=["stop-color"],ye=["stop-color"],fe=["stop-color"],ge={"clip-path":"url(#vueUiPill)"},ke=["x","y","height","width"],be=["x","y","height","width","fill"],xe=["x1","x2","y1","y2","stroke-width","stroke"],Ce=["x1","x2","y1","y2","stroke-width","stroke"],we=["x1","x2","y1","y2","stroke-width","stroke"],_e=["x1","x2","y1","y2","stroke-width","stroke"],Ne=["x1","x2","y1","y2","stroke-width","stroke"],Be=["x1","x2","y1","y2","stroke-width","stroke"],Ve=["x1","x2","y1","y2","stroke-width","stroke"],Ee=["x1","x2","y1","y2","stroke-width","stroke"],Pe=["x","y","height","width"],$e=["y","x","fill","font-size","font-weight"],Fe={key:5,class:"vue-data-ui-watermark"},Oe={key:6,ref:"source",dir:"auto"},Se={__name:"vue-ui-thermometer",props:{dataset:{type:Object,default(){return{}}},config:{type:Object,default(){return{}}}},setup(m,{expose:z}){const s=m;e.useCssVars(l=>({"7f5072bd":R.value,"575f6d71":D.value,"041baa9e":j.value}));const{vue_ui_thermometer:L}=a.useConfig(),g=e.computed(()=>!!s.dataset&&Object.keys(s.dataset).length);e.onMounted(()=>{V()});function V(){a.objectIsEmpty(s.dataset)?a.error({componentName:"VueUiThermometer",type:"dataset"}):a.getMissingDatasetAttributes({datasetObject:s.dataset,requiredAttributes:["value","from","to"]}).forEach(l=>{a.error({componentName:"VueUiThermometer",type:"datasetAttribute",property:l})})}const d=e.ref(a.createUid()),k=e.ref(null),E=e.ref(0),P=e.ref(0),t=e.computed({get:()=>O(),set:l=>l}),{userOptionsVisible:b,setUserOptionsVisibility:$,keepUserOptionState:F}=ae.useUserOptionState({config:t.value});function O(){const l=Y.useNestedProp({userConfig:s.config,defaultConfig:L});return l.theme?{...Y.useNestedProp({userConfig:a.themes.vue_ui_thermometer[l.theme]||s.config,defaultConfig:l}),customPalette:a.themePalettes[l.theme]||a.palette}:l}e.watch(()=>s.config,l=>{t.value=O(),b.value=!t.value.showOnChartHover,V(),P.value+=1},{deep:!0});const{isPrinting:S,isImaging:I,generatePdf:q,generateImage:A}=U.usePrinter({elementId:`thermometer__${d.value}`,fileName:t.value.style.title.text||"vue-ui-thermometer"}),G=e.computed(()=>t.value.userOptions.show&&!t.value.style.title.text),p=e.computed(()=>a.convertCustomPalette(t.value.customPalette)),H=e.computed(()=>t.value.style.chart.thermometer.width),c=e.computed(()=>s.dataset.steps||10),i=e.ref({top:t.value.style.chart.padding.top,left:t.value.style.chart.padding.left,right:t.value.style.chart.padding.right,bottom:t.value.style.chart.padding.bottom});function y(l,n,o){const u=[],N=T(l),B=T(n);for(let v=0;v<o;v++){const K=x(N.red,B.red,v,o),Q=x(N.green,B.green,v,o),Z=x(N.blue,B.blue,v,o),ee=`#${C(K)}${C(Q)}${C(Z)}`;u.push(ee)}return u}function T(l){const n=l.slice(1);return{red:parseInt(n.slice(0,2),16),green:parseInt(n.slice(2,4),16),blue:parseInt(n.slice(4,6),16)}}function x(l,n,o,u){return Math.round(l+(n-l)*o/u)}function C(l){return l.toString(16).padStart(2,"0")}const r=e.computed(()=>{const l=H.value+i.value.left+i.value.right,n=t.value.style.chart.height;return{width:l,left:i.value.left,right:l-i.value.right,top:i.value.top,bottom:n-i.value.bottom,height:n}}),W=e.computed(()=>r.value),w=e.computed(()=>{const l=a.checkNaN(s.dataset.from)<0?Math.abs(a.checkNaN(s.dataset.from)):a.checkNaN(s.dataset.from),n=a.checkNaN(s.dataset.to)<0?Math.abs(a.checkNaN(s.dataset.to)):a.checkNaN(s.dataset.to);let o=0;return a.checkNaN(s.dataset.to)>0?o=l+n:l>n?o=l-n:o=n-l,(1-(Math.abs(a.checkNaN(s.dataset.from))+a.checkNaN(s.dataset.value))/o)*(r.value.height-i.value.top-i.value.bottom)}),j=e.computed(()=>`${w.value}px`),D=e.computed(()=>`${r.value.height-t.value.style.chart.padding.bottom-i.value.top}px`),R=e.computed(()=>`${t.value.style.chart.animation.speedMs}ms`),X=e.computed(()=>{if(s.dataset.colors){if(!s.dataset.colors.from)return y(p.value[0]||a.palette[0],a.convertColorToHex(s.dataset.colors.to),c.value||10);if(!s.dataset.colors.to)return y(a.convertColorToHex(s.dataset.colors.from),p.value[1]||a.palette[1],c.value||10)}else return y(p.value[1]||a.palette[1],p.value[0]||a.palette[0],c.value||10);return y(a.convertColorToHex(s.dataset.colors.from),a.convertColorToHex(s.dataset.colors.to),c.value||10)}),M=e.computed(()=>{const l=[];let n=0;const o=r.value.height-i.value.top-i.value.bottom;for(let u=0;u<o-1;u+=o/c.value)l.push({x:r.value.left,y:r.value.top+u,qYLess:r.value.top+u+o/c.value/4,halfY:r.value.top+u+o/c.value/2,qYMore:r.value.top+u+o/c.value/4*3,color:X.value[n],height:o/c.value}),n+=1;return l}),h=e.ref(!1);function J(l){h.value=l,E.value+=1}const f=e.ref(!1);function _(){f.value=!f.value}return z({generatePdf:q,generateImage:A,toggleAnnotator:_}),(l,n)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"thermoChart",ref:k,class:e.normalizeClass(`vue-ui-thermometer ${h.value?"vue-data-ui-wrapper-fullscreen":""}`),style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color};font-family:${t.value.style.fontFamily}`),id:`thermometer__${d.value}`,onMouseenter:n[0]||(n[0]=()=>e.unref($)(!0)),onMouseleave:n[1]||(n[1]=()=>e.unref($)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(re.PenAndPaper,{key:0,parent:k.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:f.value,onClose:_},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),G.value?(e.openBlock(),e.createElementBlock("div",ue,null,512)):e.createCommentVNode("",!0),t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",ie,[(e.openBlock(),e.createBlock(te._sfc_main,{key:`title_${P.value}`,config:{title:{cy:"thermometer-div-title",...t.value.style.title},subtitle:{cy:"thermometer-div-subtitle",...t.value.style.title.subtitle}}},null,8,["config"]))])):e.createCommentVNode("",!0),t.value.userOptions.show&&g.value&&(e.unref(F)||e.unref(b))?(e.openBlock(),e.createBlock(U.UserOptions,{ref:"details",key:`user_options_${E.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isImaging:e.unref(I),isPrinting:e.unref(S),uid:d.value,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasFullscreen:t.value.userOptions.buttons.fullscreen,hasXls:!1,isFullscreen:h.value,titles:{...t.value.userOptions.buttonTitles},chartElement:k.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:f.value,onToggleFullscreen:J,onGeneratePdf:e.unref(q),onGenerateImage:e.unref(A),onToggleAnnotator:_,style:e.normalizeStyle({visibility:e.unref(F)?e.unref(b)?"visible":"hidden":"visible"})},e.createSlots({_:2},[l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:u})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:u})),void 0,!0)]),key:"2"}:void 0,l.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:o,isAnnotator:u})=>[e.renderSlot(l.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:o,isAnnotator:u})),void 0,!0)]),key:"3"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasPdf","hasImg","hasFullscreen","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),g.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(a.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":h.value,"vue-data-ui-fulscreen--off":!h.value}),width:"100%",viewBox:`0 0 ${r.value.width} ${r.value.height}`,style:"background:transparent"},[e.createVNode(le._sfc_main),l.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:r.value.width,height:r.value.height,style:{pointerEvents:"none"}},[e.renderSlot(l.$slots,"chart-background",{},void 0,!0)],8,de)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[e.createElementVNode("clipPath",he,[e.createElementVNode("rect",{x:"0",y:"0",width:"1",height:"1",rx:"0.5",ry:"0.07",fill:t.value.style.chart.backgroundColor},null,8,ve)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(M.value,(o,u)=>(e.openBlock(),e.createElementBlock("linearGradient",{id:`vueUiThermometerGradient_${u}_${d.value}`,x1:"0%",y1:"0%",x2:"100%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":o.color},null,8,pe),e.createElementVNode("stop",{offset:"50%","stop-color":e.unref(a.setOpacity)(o.color,100-t.value.style.chart.graduations.gradient.intensity)},null,8,ye),e.createElementVNode("stop",{offset:"100%","stop-color":o.color},null,8,fe)],8,me))),256))]),e.createElementVNode("g",ge,[e.createElementVNode("rect",{x:r.value.left,y:r.value.top,height:r.value.height-i.value.top-i.value.bottom,width:r.value.width-i.value.left-i.value.right,fill:"#FFFFFF"},null,8,ke),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(M.value,(o,u)=>(e.openBlock(),e.createElementBlock("g",{key:`graduation_${u}`},[e.createElementVNode("rect",{x:o.x,y:o.y,height:o.height,width:r.value.width-t.value.style.chart.padding.left-t.value.style.chart.padding.right,fill:t.value.style.chart.graduations.gradient.show?`url(#vueUiThermometerGradient_${u}_${d.value})`:o.color,"shape-rendering":"crispEdges"},null,8,be),t.value.style.chart.graduations.show&&["both","left"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:0,x1:o.x,x2:o.x+10,y1:o.y,y2:o.y,"stroke-width":t.value.style.chart.graduations.strokeWidth,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,xe)):e.createCommentVNode("",!0),t.value.style.chart.graduations.showIntermediate?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[t.value.style.chart.graduations.show&&["both","left"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:0,x1:o.x,x2:o.x+5,y1:o.halfY,y2:o.halfY,"stroke-width":t.value.style.chart.graduations.strokeWidth/2,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,Ce)):e.createCommentVNode("",!0),t.value.style.chart.graduations.show&&["both","left"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:1,x1:o.x,x2:o.x+2.5,y1:o.qYLess,y2:o.qYLess,"stroke-width":t.value.style.chart.graduations.strokeWidth/2,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,we)):e.createCommentVNode("",!0),t.value.style.chart.graduations.show&&["both","left"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:2,x1:o.x,x2:o.x+2.5,y1:o.qYMore,y2:o.qYMore,"stroke-width":t.value.style.chart.graduations.strokeWidth/2,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,_e)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),t.value.style.chart.graduations.show&&["both","right"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:2,x1:r.value.right,x2:r.value.right-10,y1:o.y,y2:o.y,"stroke-width":t.value.style.chart.graduations.strokeWidth,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,Ne)):e.createCommentVNode("",!0),t.value.style.chart.graduations.showIntermediate?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[t.value.style.chart.graduations.show&&["both","right"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:0,x1:r.value.right,x2:r.value.right-5,y1:o.halfY,y2:o.halfY,"stroke-width":t.value.style.chart.graduations.strokeWidth/2,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,Be)):e.createCommentVNode("",!0),t.value.style.chart.graduations.show&&["both","right"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:1,x1:r.value.right,x2:r.value.right-2.5,y1:o.qYLess,y2:o.qYLess,"stroke-width":t.value.style.chart.graduations.strokeWidth/2,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,Ve)):e.createCommentVNode("",!0),t.value.style.chart.graduations.show&&["both","right"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:2,x1:r.value.right,x2:r.value.right-2.5,y1:o.qYMore,y2:o.qYMore,"stroke-width":t.value.style.chart.graduations.strokeWidth/2,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,Ee)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)]))),128)),e.createElementVNode("rect",{class:e.normalizeClass({"vue-ui-thermometer-temperature":t.value.style.chart.animation.use}),x:r.value.left,y:r.value.top,height:w.value,width:r.value.width-t.value.style.chart.padding.left-t.value.style.chart.padding.right,fill:"#FFFFFF66"},null,10,Pe)]),e.createElementVNode("text",{class:e.normalizeClass({"vue-ui-thermometer-temperature-value":t.value.style.chart.animation.use}),y:w.value+r.value.top+t.value.style.chart.label.fontSize/3,x:r.value.left-10,"text-anchor":"end",fill:t.value.style.chart.label.color,"font-size":t.value.style.chart.label.fontSize,"font-weight":t.value.style.chart.label.bold?"bold":"normal"},e.toDisplayString(e.unref(a.applyDataLabel)(t.value.style.chart.label.formatter,m.dataset.value,e.unref(a.dataLabel)({p:t.value.style.chart.label.prefix,v:m.dataset.value,s:t.value.style.chart.label.suffix,r:t.value.style.chart.label.rounding}),{datapoint:m.dataset})),11,$e),e.renderSlot(l.$slots,"svg",{svg:W.value},void 0,!0)],10,ce)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Fe,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(S)||e.unref(I)})),void 0,!0)])):e.createCommentVNode("",!0),l.$slots.source?(e.openBlock(),e.createElementBlock("div",Oe,[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),g.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(oe.default,{key:7,config:{type:"thermometer",style:{backgroundColor:t.value.style.chart.backgroundColor,thermometer:{color:"#CCCCCC"}}}},null,8,["config"]))],46,ne))}},Ie=se._export_sfc(Se,[["__scopeId","data-v-f7910f15"]]);exports.default=Ie;
|