vue-data-ui 2.4.36 → 2.4.37
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/dist/{Arrow-Bpy87-5A.js → Arrow-BGF8U6eG.js} +1 -1
- package/dist/{Arrow-DvVfffCn.cjs → Arrow-CfkM1E1N.cjs} +1 -1
- package/dist/{BaseIcon-Ba0OA9UK.cjs → BaseIcon-COvAfeHZ.cjs} +1 -1
- package/dist/{BaseIcon-CK7TNglK.js → BaseIcon-Cg2KVd6O.js} +1 -1
- package/dist/{DataTable-Dgokkc7A.cjs → DataTable-CLPX5K7F.cjs} +1 -1
- package/dist/{DataTable-Chl6EuoM.js → DataTable-D0IyDPph.js} +2 -2
- package/dist/{Legend-D1D1r0MW.cjs → Legend-DJIHgsqI.cjs} +1 -1
- package/dist/{Legend-BJNfeJUD.js → Legend-DvDyG-kQ.js} +1 -1
- package/dist/{PackageVersion-D7UEx2nV.cjs → PackageVersion-DhLEKNrl.cjs} +1 -1
- package/dist/{PackageVersion-tBXJRRcv.js → PackageVersion-tmu5-NHl.js} +1 -1
- package/dist/{PenAndPaper-C1dGfWPA.cjs → PenAndPaper-BskrQncj.cjs} +1 -1
- package/dist/{PenAndPaper-VhfbqYdY.js → PenAndPaper-CrjOn4pS.js} +3 -3
- package/dist/{Shape-COkmGii0.cjs → Shape-DJ-coLZ8.cjs} +1 -1
- package/dist/{Shape-Bx_JPN24.js → Shape-NkoEh9kv.js} +1 -1
- package/dist/{Slicer-C-vVh0yP.js → Slicer-CL9fhSLe.js} +2 -2
- package/dist/{Slicer-LsepvzYE.cjs → Slicer-C_h8-xdX.cjs} +1 -1
- package/dist/{Title-B5wIQ3bR.js → Title-BiNqHwMI.js} +1 -1
- package/dist/{Title-0iC4gElN.cjs → Title-s1XIylbt.cjs} +1 -1
- package/dist/{Tooltip-DxlT2AdY.js → Tooltip-Dy0SDLjh.js} +1 -1
- package/dist/{Tooltip-BphIe1nr.cjs → Tooltip-u2_YtUgL.cjs} +1 -1
- package/dist/{index-DT2Q6wHA.js → index-BEYHUDwM.js} +5 -1
- package/dist/index-K3fZ-qvU.cjs +9 -0
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.cts +4 -0
- package/dist/types/vue-data-ui.d.ts +4 -0
- package/dist/{useNestedProp-C01Nxqp-.cjs → useNestedProp-DjDulDmU.cjs} +1 -1
- package/dist/{useNestedProp-mBik37PJ.js → useNestedProp-DnO1-IHr.js} +1 -1
- package/dist/{usePrinter-Bu3_FFNh.js → usePrinter-CyU3evgB.js} +1 -1
- package/dist/{usePrinter-IEjSf9Zq.cjs → usePrinter-D9B7AJ0m.cjs} +1 -1
- package/dist/{vue-data-ui-BD904qyk.js → vue-data-ui-CYnalD0u.js} +60 -60
- package/dist/{vue-data-ui-B1vvdA7U.cjs → vue-data-ui-Ifu4wSoK.cjs} +1 -1
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +1 -1
- package/dist/{vue-ui-3d-bar-C39JngPT.cjs → vue-ui-3d-bar-CkV_-4wp.cjs} +1 -1
- package/dist/{vue-ui-3d-bar-DNJURkin.js → vue-ui-3d-bar-CyDnQq4n.js} +9 -9
- package/dist/{vue-ui-accordion-De-_FuTd.cjs → vue-ui-accordion-CoIA-DHp.cjs} +1 -1
- package/dist/{vue-ui-accordion-Y-KIir2-.js → vue-ui-accordion-DoZLY0TK.js} +3 -3
- package/dist/{vue-ui-age-pyramid-Blocfen4.js → vue-ui-age-pyramid-DfQv1HqM.js} +10 -10
- package/dist/{vue-ui-age-pyramid-CBSJ767r.cjs → vue-ui-age-pyramid-DilteakF.cjs} +1 -1
- package/dist/{vue-ui-annotator-CWhQkyiF.cjs → vue-ui-annotator-C7ey3g5F.cjs} +1 -1
- package/dist/{vue-ui-annotator-ls11X0Ep.js → vue-ui-annotator-DXw8ylKz.js} +1 -1
- package/dist/{vue-ui-bullet-6faS2xkX.cjs → vue-ui-bullet-BIrklyam.cjs} +1 -1
- package/dist/{vue-ui-bullet-ClNhNLlo.js → vue-ui-bullet-CSPIKN7v.js} +8 -8
- package/dist/{vue-ui-candlestick-D91rCN1k.cjs → vue-ui-candlestick-COTax-Tc.cjs} +1 -1
- package/dist/{vue-ui-candlestick-BDVfGF2v.js → vue-ui-candlestick-llMkHT2g.js} +11 -11
- package/dist/{vue-ui-carousel-table-XMxSoSdl.js → vue-ui-carousel-table-D1O91JP1.js} +4 -4
- package/dist/{vue-ui-carousel-table-B3ORmOjO.cjs → vue-ui-carousel-table-ZkvM2RRn.cjs} +1 -1
- package/dist/{vue-ui-chestnut-DhBTx9ih.cjs → vue-ui-chestnut-CvTTb78g.cjs} +1 -1
- package/dist/{vue-ui-chestnut-mqKL0lHf.js → vue-ui-chestnut-Qrwya0x2.js} +8 -8
- package/dist/{vue-ui-cursor-DBSD1ccp.cjs → vue-ui-cursor-BwzWF2xM.cjs} +1 -1
- package/dist/{vue-ui-cursor-U60m7Ha6.js → vue-ui-cursor-CwTEmWiM.js} +2 -2
- package/dist/{vue-ui-dashboard-u7bkCHjF.cjs → vue-ui-dashboard-BWUu0wun.cjs} +1 -1
- package/dist/{vue-ui-dashboard-D5vUSSBx.js → vue-ui-dashboard-DT-vCcr3.js} +2 -2
- package/dist/{vue-ui-digits-BwZJZe3M.js → vue-ui-digits-BGjqbax9.js} +2 -2
- package/dist/{vue-ui-digits-BQdRQ0xO.cjs → vue-ui-digits-q-tKy2OA.cjs} +1 -1
- package/dist/{vue-ui-donut-rDPyaNUq.js → vue-ui-donut-CTGf7J58.js} +11 -11
- package/dist/{vue-ui-donut-sZhaN0en.cjs → vue-ui-donut-CZUb9poB.cjs} +1 -1
- package/dist/{vue-ui-donut-evolution-BSt9xbcl.js → vue-ui-donut-evolution-CS8kc1BP.js} +11 -11
- package/dist/{vue-ui-donut-evolution-BbsK84kI.cjs → vue-ui-donut-evolution-ubNF3gIH.cjs} +1 -1
- package/dist/{vue-ui-dumbbell-DOQpwxOf.cjs → vue-ui-dumbbell-BVAkiH10.cjs} +1 -1
- package/dist/{vue-ui-dumbbell-BWJieeJq.js → vue-ui-dumbbell-DD3LhAB9.js} +10 -10
- package/dist/{vue-ui-flow-C4xrv2sT.cjs → vue-ui-flow-CnDxZWUv.cjs} +1 -1
- package/dist/{vue-ui-flow-DGpXI3bk.js → vue-ui-flow-RTrzZxBO.js} +9 -9
- package/dist/{vue-ui-funnel-BU-dX1be.cjs → vue-ui-funnel-DS1xOoas.cjs} +1 -1
- package/dist/{vue-ui-funnel-BX727iqg.js → vue-ui-funnel-DoF96cMS.js} +8 -8
- package/dist/{vue-ui-galaxy-YOnLDzLn.js → vue-ui-galaxy-BMczpQ7H.js} +11 -11
- package/dist/{vue-ui-galaxy-BEPUwSGn.cjs → vue-ui-galaxy-DffqE3Mm.cjs} +1 -1
- package/dist/{vue-ui-gauge-B4R-7QaH.js → vue-ui-gauge-BHCKWyxf.js} +7 -7
- package/dist/{vue-ui-gauge-SmYMqHtg.cjs → vue-ui-gauge-Dng1f8RS.cjs} +1 -1
- package/dist/{vue-ui-gizmo-d0iCnrE5.js → vue-ui-gizmo-C1CoCZPv.js} +3 -3
- package/dist/{vue-ui-gizmo-C6WHIvls.cjs → vue-ui-gizmo-CEbfHLnJ.cjs} +1 -1
- package/dist/{vue-ui-heatmap-BcoK1MFo.cjs → vue-ui-heatmap-Cqzk2b4x.cjs} +1 -1
- package/dist/{vue-ui-heatmap-Do3SwP1y.js → vue-ui-heatmap-wZmZWste.js} +10 -10
- package/dist/{vue-ui-history-plot-C7Tl3J6I.cjs → vue-ui-history-plot-D5x9vJ2h.cjs} +1 -1
- package/dist/{vue-ui-history-plot-CeyQvxiu.js → vue-ui-history-plot-D92lpCD5.js} +11 -11
- package/dist/{vue-ui-kpi-zCeUtmhG.js → vue-ui-kpi-C0n1Uh2K.js} +3 -3
- package/dist/{vue-ui-kpi-C6fzXZvG.cjs → vue-ui-kpi-DmIkkOhw.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-DA2rFFM-.cjs → vue-ui-mini-loader-BsxHefEW.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-C6e8w8Pj.js → vue-ui-mini-loader-CKHysxy8.js} +2 -2
- package/dist/{vue-ui-molecule-By3e76zL.cjs → vue-ui-molecule-BBk3jKAG.cjs} +1 -1
- package/dist/{vue-ui-molecule-B7pqKZ6Q.js → vue-ui-molecule-Clv9Alk2.js} +11 -11
- package/dist/{vue-ui-mood-radar-Ch3yfUsb.cjs → vue-ui-mood-radar-CDQcxOWS.cjs} +1 -1
- package/dist/{vue-ui-mood-radar-DEjAMbvz.js → vue-ui-mood-radar-lYap9MTW.js} +11 -11
- package/dist/{vue-ui-nested-donuts-BXul72Pg.cjs → vue-ui-nested-donuts-DmMAZSrm.cjs} +1 -1
- package/dist/{vue-ui-nested-donuts-BYUHWwAG.js → vue-ui-nested-donuts-Xt-kLVKN.js} +11 -11
- package/dist/{vue-ui-onion-Di-_exOm.cjs → vue-ui-onion-Bxu84Bee.cjs} +1 -1
- package/dist/{vue-ui-onion-BTQj76EU.js → vue-ui-onion-CefkKMvu.js} +11 -11
- package/dist/{vue-ui-parallel-coordinate-plot-B6OQiz_w.cjs → vue-ui-parallel-coordinate-plot-B9M48QNK.cjs} +1 -1
- package/dist/{vue-ui-parallel-coordinate-plot-BaYu4ces.js → vue-ui-parallel-coordinate-plot-CQ8ij0ux.js} +12 -12
- package/dist/{vue-ui-quadrant-LdkWJ4bO.js → vue-ui-quadrant-BNcQwAc2.js} +12 -12
- package/dist/{vue-ui-quadrant-Tv2JUmD2.cjs → vue-ui-quadrant-Cltltuyt.cjs} +1 -1
- package/dist/{vue-ui-quick-chart-B8tYrd7n.js → vue-ui-quick-chart-B4KNoKaE.js} +9 -9
- package/dist/{vue-ui-quick-chart-enp44IMM.cjs → vue-ui-quick-chart-dIcI2Yhx.cjs} +1 -1
- package/dist/{vue-ui-radar-CdQ3ZZnc.js → vue-ui-radar-BIUt5GH9.js} +12 -12
- package/dist/{vue-ui-radar-Dw0mtHHQ.cjs → vue-ui-radar-CMul0aXt.cjs} +1 -1
- package/dist/{vue-ui-rating-CgbhHqLS.cjs → vue-ui-rating-BS11k97D.cjs} +1 -1
- package/dist/{vue-ui-rating-iL7BC7v-.js → vue-ui-rating-DNoF2nzF.js} +2 -2
- package/dist/{vue-ui-relation-circle-xL3OCDO2.cjs → vue-ui-relation-circle-Bp65xdDJ.cjs} +1 -1
- package/dist/{vue-ui-relation-circle-CoNB6PQ2.js → vue-ui-relation-circle-DImNes6p.js} +7 -7
- package/dist/{vue-ui-rings-Cs4jVChn.js → vue-ui-rings-2D_FdMmO.js} +11 -11
- package/dist/{vue-ui-rings-BNmLppA8.cjs → vue-ui-rings-Cdd1hLAS.cjs} +1 -1
- package/dist/{vue-ui-scatter-BvUVkiSM.js → vue-ui-scatter-BS2rEr0x.js} +12 -12
- package/dist/{vue-ui-scatter-DVKpfEr4.cjs → vue-ui-scatter-C7GxINX0.cjs} +1 -1
- package/dist/{vue-ui-screenshot-Bw3Vkosw.cjs → vue-ui-screenshot-BJ5d31Kx.cjs} +1 -1
- package/dist/{vue-ui-screenshot-Tkspb4Gy.js → vue-ui-screenshot-BPAXEKs-.js} +1 -1
- package/dist/{vue-ui-skeleton-D2ANHIIV.cjs → vue-ui-skeleton-Ce7sIvSp.cjs} +1 -1
- package/dist/{vue-ui-skeleton-D9lIs0pC.js → vue-ui-skeleton-Ml2uW_C4.js} +3 -3
- package/dist/{vue-ui-smiley-C18DtSwE.cjs → vue-ui-smiley-9qjWT77x.cjs} +1 -1
- package/dist/{vue-ui-smiley-CZmxJR1p.js → vue-ui-smiley-B93uKBOf.js} +2 -2
- package/dist/{vue-ui-spark-trend-CP2rAw9u.js → vue-ui-spark-trend-DKcLj-Xs.js} +5 -5
- package/dist/{vue-ui-spark-trend-DAD9EW5F.cjs → vue-ui-spark-trend-qHJPxvpa.cjs} +1 -1
- package/dist/{vue-ui-sparkbar-Ebg2bwSr.js → vue-ui-sparkbar-DtMNnTRW.js} +4 -4
- package/dist/{vue-ui-sparkbar-CK_sJkSI.cjs → vue-ui-sparkbar-e0eBDpdh.cjs} +1 -1
- package/dist/{vue-ui-sparkgauge-CkhqBiO0.js → vue-ui-sparkgauge-3nX3hNGr.js} +4 -4
- package/dist/{vue-ui-sparkgauge-DRc4NqXv.cjs → vue-ui-sparkgauge-BXLoqF-k.cjs} +1 -1
- package/dist/{vue-ui-sparkhistogram-By027HfM.js → vue-ui-sparkhistogram-BQb4xlej.js} +5 -5
- package/dist/{vue-ui-sparkhistogram-CFwcK9dP.cjs → vue-ui-sparkhistogram-CwQbHrPZ.cjs} +1 -1
- package/dist/{vue-ui-sparkline-j2oC5gBh.js → vue-ui-sparkline-BRU28ghj.js} +58 -50
- package/dist/vue-ui-sparkline-CxuCns3k.cjs +1 -0
- package/dist/{vue-ui-sparkstackbar-Bil9rW48.js → vue-ui-sparkstackbar-B2Ci2Wp3.js} +5 -5
- package/dist/{vue-ui-sparkstackbar-CIImFRNj.cjs → vue-ui-sparkstackbar-CAUBm8gX.cjs} +1 -1
- package/dist/{vue-ui-stackbar-BN22b1v_.cjs → vue-ui-stackbar-CfH_FYcQ.cjs} +1 -1
- package/dist/{vue-ui-stackbar-BtN-dlcj.js → vue-ui-stackbar-D07KTrTY.js} +12 -12
- package/dist/{vue-ui-strip-plot-DZWB-w56.js → vue-ui-strip-plot-D9XErnIo.js} +11 -11
- package/dist/{vue-ui-strip-plot-D9L8r-Qd.cjs → vue-ui-strip-plot-TnFwGVMG.cjs} +1 -1
- package/dist/{vue-ui-table-D8e6SX0d.cjs → vue-ui-table-Br8Fgl01.cjs} +1 -1
- package/dist/{vue-ui-table-miQfZhdG.js → vue-ui-table-DtmGi42Y.js} +1 -1
- package/dist/{vue-ui-table-heatmap-8uW1Gc3l.cjs → vue-ui-table-heatmap-C1yRiDQ4.cjs} +1 -1
- package/dist/{vue-ui-table-heatmap-m3Fkpx9y.js → vue-ui-table-heatmap-Z6LkbbaX.js} +4 -4
- package/dist/vue-ui-table-sparkline-CtE0VsBK.cjs +1 -0
- package/dist/{vue-ui-table-sparkline-DltQKhPy.js → vue-ui-table-sparkline-Cughw_0R.js} +64 -62
- package/dist/{vue-ui-thermometer-Bdy_jYI1.cjs → vue-ui-thermometer-BpaueZV9.cjs} +1 -1
- package/dist/{vue-ui-thermometer-ceqnJJgt.js → vue-ui-thermometer-CRic8-jW.js} +7 -7
- package/dist/{vue-ui-timer-CM2i7679.cjs → vue-ui-timer-C2nft2Jh.cjs} +1 -1
- package/dist/{vue-ui-timer-B9uwiDwB.js → vue-ui-timer-CoMcIX9Y.js} +5 -5
- package/dist/{vue-ui-tiremarks-CbjA0LAa.js → vue-ui-tiremarks-DHcytF1m.js} +7 -7
- package/dist/{vue-ui-tiremarks-6S2fApFV.cjs → vue-ui-tiremarks-IBB1oCet.cjs} +1 -1
- package/dist/{vue-ui-treemap-Dorwv25m.cjs → vue-ui-treemap-CX2BicDf.cjs} +1 -1
- package/dist/{vue-ui-treemap-CozGHw4b.js → vue-ui-treemap-tbw1hYRS.js} +11 -11
- package/dist/{vue-ui-vertical-bar-B3mUU17x.cjs → vue-ui-vertical-bar-5OlCohV8.cjs} +1 -1
- package/dist/{vue-ui-vertical-bar--ilwk-0L.js → vue-ui-vertical-bar-CB7Mc0tA.js} +11 -11
- package/dist/{vue-ui-waffle-DXaAloSi.js → vue-ui-waffle-CaB5Y3ez.js} +11 -11
- package/dist/{vue-ui-waffle-BEa1YJLV.cjs → vue-ui-waffle-UHqWhmTG.cjs} +1 -1
- package/dist/{vue-ui-wheel-C2wDyBoN.cjs → vue-ui-wheel-CrUFm7QE.cjs} +1 -1
- package/dist/{vue-ui-wheel-BU2OITMK.js → vue-ui-wheel-nel7CvgK.js} +7 -7
- package/dist/{vue-ui-word-cloud-E7BNcpiF.js → vue-ui-word-cloud-Dkv7h46K.js} +10 -10
- package/dist/{vue-ui-word-cloud-DaokdBId.cjs → vue-ui-word-cloud-DyqJG1fh.cjs} +1 -1
- package/dist/{vue-ui-xy-BSOYHk-G.cjs → vue-ui-xy-CRreEB5P.cjs} +1 -1
- package/dist/{vue-ui-xy-DHJUsPhx.js → vue-ui-xy-JIUJuMLX.js} +14 -14
- package/dist/{vue-ui-xy-canvas-CvOJifne.cjs → vue-ui-xy-canvas-Cy0cNKQP.cjs} +1 -1
- package/dist/{vue-ui-xy-canvas-DmBKepV0.js → vue-ui-xy-canvas-E8R9WuYE.js} +11 -11
- package/package.json +1 -1
- package/dist/index-kERGTkcX.cjs +0 -9
- package/dist/vue-ui-sparkline-CEmqDTG_.cjs +0 -1
- package/dist/vue-ui-table-sparkline-DDGpViuj.cjs +0 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { useCssVars as fe, ref as d, computed as h, watch as ee, onMounted as pe, openBlock as
|
|
2
|
-
import { u as ke, c as _e, t as xe, a as Ce, p as $, b as
|
|
3
|
-
import { u as ae } from "./useNestedProp-
|
|
4
|
-
import Oe from "./vue-ui-sparkline-
|
|
5
|
-
import Fe from "./BaseIcon-
|
|
6
|
-
import { u as Ne, U as De, v as We } from "./usePrinter-
|
|
1
|
+
import { useCssVars as fe, ref as d, computed as h, watch as ee, onMounted as pe, openBlock as u, createElementBlock as i, normalizeClass as V, createElementVNode as c, normalizeStyle as r, toDisplayString as b, createCommentVNode as p, withDirectives as be, Fragment as E, renderList as G, createBlock as R, unref as v, createSlots as ge, withCtx as A, renderSlot as C, normalizeProps as me, guardReactiveProps as he, nextTick as ye } from "vue";
|
|
2
|
+
import { u as ke, c as _e, t as xe, a as Ce, p as $, b as we, o as Ie, e as te, g as Se, d as Ae, $ as $e, i as P, f as z, q as Pe, r as ze } from "./index-BEYHUDwM.js";
|
|
3
|
+
import { u as ae } from "./useNestedProp-DnO1-IHr.js";
|
|
4
|
+
import Oe from "./vue-ui-sparkline-BRU28ghj.js";
|
|
5
|
+
import Fe from "./BaseIcon-Cg2KVd6O.js";
|
|
6
|
+
import { u as Ne, U as De, v as We } from "./usePrinter-CyU3evgB.js";
|
|
7
7
|
import { _ as Te } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
8
|
-
const Me = ["id"], Ve = { style: { "z-index": "1", "padding-right": "24px" } }, Ee = ["onClick"], Ge = ["data-cell"],
|
|
8
|
+
const Me = ["id"], Ve = { style: { "z-index": "1", "padding-right": "24px" } }, Ee = ["onClick"], Ge = ["data-cell"], Re = ["data-cell", "onPointerenter"], Le = ["data-cell"], Be = ["data-cell"], Ue = ["data-cell"], He = ["data-cell"], qe = {
|
|
9
9
|
key: 0,
|
|
10
10
|
ref: "source",
|
|
11
11
|
dir: "auto"
|
|
@@ -28,9 +28,9 @@ const Me = ["id"], Ve = { style: { "z-index": "1", "padding-right": "24px" } },
|
|
|
28
28
|
setup(le, { expose: oe }) {
|
|
29
29
|
const g = le;
|
|
30
30
|
fe((t) => ({
|
|
31
|
-
"
|
|
31
|
+
"1f14fe1a": t.tdo
|
|
32
32
|
}));
|
|
33
|
-
const { vue_ui_table_sparkline: ne } = ke(), O = d(_e()),
|
|
33
|
+
const { vue_ui_table_sparkline: ne } = ke(), O = d(_e()), L = d(0), w = d(0), F = d(null), e = h({
|
|
34
34
|
get: () => B(),
|
|
35
35
|
set: (t) => t
|
|
36
36
|
});
|
|
@@ -48,29 +48,29 @@ const Me = ["id"], Ve = { style: { "z-index": "1", "padding-right": "24px" } },
|
|
|
48
48
|
} : t;
|
|
49
49
|
}
|
|
50
50
|
ee(() => g.config, (t) => {
|
|
51
|
-
e.value = B(), J(),
|
|
51
|
+
e.value = B(), J(), w.value += 1;
|
|
52
52
|
}, { deep: !0 }), ee(() => g.dataset, (t) => {
|
|
53
|
-
_.value = y.value,
|
|
53
|
+
_.value = y.value, w.value += 1;
|
|
54
54
|
}, { deep: !0 });
|
|
55
55
|
const { isPrinting: U, isImaging: H, generatePdf: q, generateImage: X } = Ne({
|
|
56
56
|
elementId: `table_${O.value}`,
|
|
57
57
|
fileName: e.value.title.text || "vue-ui-table-sparkline"
|
|
58
|
-
}),
|
|
58
|
+
}), se = h(() => we(e.value.customPalette)), I = d(null), N = d(!1), ue = h(() => e.value.responsiveBreakpoint);
|
|
59
59
|
pe(() => {
|
|
60
60
|
J();
|
|
61
61
|
});
|
|
62
62
|
const D = d(e.value.colNames);
|
|
63
63
|
function J() {
|
|
64
|
-
|
|
64
|
+
Ie(g.dataset) && te({
|
|
65
65
|
componentName: "VueUiTableSparkline",
|
|
66
66
|
type: "dataset"
|
|
67
67
|
});
|
|
68
68
|
const t = new ResizeObserver((o) => {
|
|
69
69
|
o.forEach((a) => {
|
|
70
|
-
N.value = a.contentRect.width <
|
|
70
|
+
N.value = a.contentRect.width < ue.value;
|
|
71
71
|
});
|
|
72
72
|
});
|
|
73
|
-
|
|
73
|
+
I.value && t.observe(I.value), D.value = [];
|
|
74
74
|
for (let o = 0; o < Y.value; o += 1)
|
|
75
75
|
D.value.push(e.value.colNames[o] || `col ${o}`);
|
|
76
76
|
}
|
|
@@ -87,29 +87,29 @@ const Me = ["id"], Ve = { style: { "z-index": "1", "padding-right": "24px" } },
|
|
|
87
87
|
});
|
|
88
88
|
});
|
|
89
89
|
}), g.dataset.map((t, o) => {
|
|
90
|
-
const a = (t.values || []).map((
|
|
90
|
+
const a = (t.values || []).map((s) => isNaN(s) ? 0 : s ?? 0), n = a.reduce((s, l) => s + l, 0);
|
|
91
91
|
return {
|
|
92
92
|
...t,
|
|
93
93
|
values: t.values || [],
|
|
94
|
-
color: Ae(t.color) ||
|
|
94
|
+
color: Ae(t.color) || se.value[o] || $[o] || $[o % $.length],
|
|
95
95
|
sum: n,
|
|
96
96
|
average: n / a.length,
|
|
97
97
|
median: $e(a),
|
|
98
|
-
sparklineDataset: a.map((
|
|
98
|
+
sparklineDataset: a.map((s, l) => ({
|
|
99
99
|
period: e.value.colNames[l] || `col ${l}`,
|
|
100
|
-
value:
|
|
100
|
+
value: s || 0
|
|
101
101
|
}))
|
|
102
102
|
};
|
|
103
103
|
})));
|
|
104
104
|
function re(t) {
|
|
105
105
|
const a = (t[0].values || []).map(
|
|
106
|
-
(
|
|
106
|
+
(s, l) => t.map((f) => f.values[l] || [])
|
|
107
107
|
).map(
|
|
108
|
-
(
|
|
108
|
+
(s) => s.map((l, f) => [l, f]).sort((l, f) => f[0] - l[0]).map((l) => l[1])
|
|
109
109
|
);
|
|
110
|
-
return t.map((
|
|
111
|
-
...
|
|
112
|
-
values:
|
|
110
|
+
return t.map((s, l) => ({
|
|
111
|
+
...s,
|
|
112
|
+
values: s.values || [],
|
|
113
113
|
orders: a[l]
|
|
114
114
|
}));
|
|
115
115
|
}
|
|
@@ -121,8 +121,8 @@ const Me = ["id"], Ve = { style: { "z-index": "1", "padding-right": "24px" } },
|
|
|
121
121
|
W.value = !0, T.value = t;
|
|
122
122
|
const o = y.value.map((l) => l.values[t] || []), a = S.value === t ? 1 : -1;
|
|
123
123
|
M.value = a, t === S.value ? S.value = void 0 : S.value = t;
|
|
124
|
-
const
|
|
125
|
-
_.value =
|
|
124
|
+
const s = o.map((l, f) => [f, l]).sort((l, f) => a * (f[1] - l[1])).map((l) => l[0]).map((l) => y.value[l]);
|
|
125
|
+
_.value = s, w.value += 1;
|
|
126
126
|
}
|
|
127
127
|
const Y = h(() => Math.max(...g.dataset.map((t) => (t.values || []).length))), k = h(() => {
|
|
128
128
|
let t = D.value;
|
|
@@ -142,16 +142,16 @@ const Me = ["id"], Ve = { style: { "z-index": "1", "padding-right": "24px" } },
|
|
|
142
142
|
}
|
|
143
143
|
const Z = d(!1);
|
|
144
144
|
function ce(t) {
|
|
145
|
-
Z.value = t,
|
|
145
|
+
Z.value = t, L.value += 1;
|
|
146
146
|
}
|
|
147
147
|
function j() {
|
|
148
148
|
ye(() => {
|
|
149
|
-
const t = [e.value.translations.serie].concat(k.value), o = K.value.map((
|
|
150
|
-
[
|
|
151
|
-
|
|
152
|
-
[
|
|
153
|
-
[
|
|
154
|
-
[
|
|
149
|
+
const t = [e.value.translations.serie].concat(k.value), o = K.value.map((s, l) => [
|
|
150
|
+
[s.name],
|
|
151
|
+
s.values,
|
|
152
|
+
[s.sum],
|
|
153
|
+
[s.average],
|
|
154
|
+
[s.median]
|
|
155
155
|
]), a = [t].concat(o), n = Pe(a);
|
|
156
156
|
ze({
|
|
157
157
|
csvContent: n,
|
|
@@ -164,9 +164,9 @@ const Me = ["id"], Ve = { style: { "z-index": "1", "padding-right": "24px" } },
|
|
|
164
164
|
generateImage: X,
|
|
165
165
|
generateCsv: j,
|
|
166
166
|
restoreOrder: Q
|
|
167
|
-
}), (t, o) => (
|
|
167
|
+
}), (t, o) => (u(), i("div", {
|
|
168
168
|
ref_key: "tableContainer",
|
|
169
|
-
ref:
|
|
169
|
+
ref: I,
|
|
170
170
|
class: V({ "vue-ui-responsive": N.value }),
|
|
171
171
|
style: { overflow: "hidden" },
|
|
172
172
|
id: `table_${O.value}`
|
|
@@ -181,7 +181,7 @@ const Me = ["id"], Ve = { style: { "z-index": "1", "padding-right": "24px" } },
|
|
|
181
181
|
class: "vue-ui-data-table",
|
|
182
182
|
style: r({ fontFamily: e.value.fontFamily, position: "relative" })
|
|
183
183
|
}, [
|
|
184
|
-
e.value.title.text ? (
|
|
184
|
+
e.value.title.text ? (u(), i("caption", {
|
|
185
185
|
key: 0,
|
|
186
186
|
style: r({ backgroundColor: e.value.title.backgroundColor })
|
|
187
187
|
}, [
|
|
@@ -193,7 +193,7 @@ const Me = ["id"], Ve = { style: { "z-index": "1", "padding-right": "24px" } },
|
|
|
193
193
|
textAlign: e.value.title.textAlign
|
|
194
194
|
})
|
|
195
195
|
}, b(e.value.title.text), 5),
|
|
196
|
-
e.value.title.subtitle.text ? (
|
|
196
|
+
e.value.title.subtitle.text ? (u(), i("div", {
|
|
197
197
|
key: 0,
|
|
198
198
|
style: r({
|
|
199
199
|
fontSize: `${e.value.title.subtitle.fontSize}px`,
|
|
@@ -204,7 +204,7 @@ const Me = ["id"], Ve = { style: { "z-index": "1", "padding-right": "24px" } },
|
|
|
204
204
|
}, b(e.value.title.subtitle.text), 5)) : p("", !0)
|
|
205
205
|
], 4)) : p("", !0),
|
|
206
206
|
c("thead", Ve, [
|
|
207
|
-
be((
|
|
207
|
+
be((u(), i("tr", {
|
|
208
208
|
role: "row",
|
|
209
209
|
class: "vue-ui-data-table__thead-row",
|
|
210
210
|
style: r({
|
|
@@ -222,14 +222,14 @@ const Me = ["id"], Ve = { style: { "z-index": "1", "padding-right": "24px" } },
|
|
|
222
222
|
}),
|
|
223
223
|
class: "sticky-col-first"
|
|
224
224
|
}, b(e.value.translations.serie), 5),
|
|
225
|
-
(
|
|
225
|
+
(u(!0), i(E, null, G(k.value, (a, n) => (u(), i("th", {
|
|
226
226
|
role: "cell",
|
|
227
227
|
style: r({
|
|
228
228
|
background: e.value.thead.backgroundColor,
|
|
229
229
|
border: e.value.thead.outline,
|
|
230
230
|
textAlign: e.value.thead.textAlign,
|
|
231
231
|
fontWeight: e.value.thead.bold ? "bold" : "normal",
|
|
232
|
-
minWidth: n === k.value.length - 1 ?
|
|
232
|
+
minWidth: n === k.value.length - 1 ? `${e.value.sparkline.dimensions.width}px` : "48px",
|
|
233
233
|
cursor: y.value[0].values[n] !== void 0 ? "pointer" : "default",
|
|
234
234
|
paddingRight: n === k.value.length - 1 && e.value.userOptions.show ? "36px" : ""
|
|
235
235
|
}),
|
|
@@ -246,17 +246,17 @@ const Me = ["id"], Ve = { style: { "z-index": "1", "padding-right": "24px" } },
|
|
|
246
246
|
})
|
|
247
247
|
}, [
|
|
248
248
|
c("span", null, b(a), 1),
|
|
249
|
-
W.value && n === T.value && y.value[0].values[n] !== void 0 ? (
|
|
249
|
+
W.value && n === T.value && y.value[0].values[n] !== void 0 ? (u(), R(Fe, {
|
|
250
250
|
key: 0,
|
|
251
251
|
size: 18,
|
|
252
252
|
name: M.value === 1 ? "sort" : "sortReverse",
|
|
253
253
|
stroke: e.value.thead.color
|
|
254
254
|
}, null, 8, ["name", "stroke"])) : p("", !0)
|
|
255
255
|
], 4),
|
|
256
|
-
e.value.userOptions.show && n === k.value.length - 1 ? (
|
|
256
|
+
e.value.userOptions.show && n === k.value.length - 1 ? (u(), R(De, {
|
|
257
257
|
ref_for: !0,
|
|
258
258
|
ref: "details",
|
|
259
|
-
key: `user_option_${
|
|
259
|
+
key: `user_option_${L.value}`,
|
|
260
260
|
backgroundColor: e.value.thead.backgroundColor,
|
|
261
261
|
color: e.value.thead.color,
|
|
262
262
|
isPrinting: v(U),
|
|
@@ -268,7 +268,7 @@ const Me = ["id"], Ve = { style: { "z-index": "1", "padding-right": "24px" } },
|
|
|
268
268
|
hasFullscreen: e.value.userOptions.buttons.fullscreen,
|
|
269
269
|
isFullscreen: Z.value,
|
|
270
270
|
titles: { ...e.value.userOptions.buttonTitles },
|
|
271
|
-
chartElement:
|
|
271
|
+
chartElement: I.value,
|
|
272
272
|
position: e.value.userOptions.position,
|
|
273
273
|
onToggleFullscreen: ce,
|
|
274
274
|
onGeneratePdf: v(q),
|
|
@@ -298,8 +298,8 @@ const Me = ["id"], Ve = { style: { "z-index": "1", "padding-right": "24px" } },
|
|
|
298
298
|
} : void 0,
|
|
299
299
|
t.$slots.optionFullscreen ? {
|
|
300
300
|
name: "optionFullscreen",
|
|
301
|
-
fn: A(({ toggleFullscreen:
|
|
302
|
-
C(t.$slots, "optionFullscreen", me(he({ toggleFullscreen:
|
|
301
|
+
fn: A(({ toggleFullscreen: s, isFullscreen: l }) => [
|
|
302
|
+
C(t.$slots, "optionFullscreen", me(he({ toggleFullscreen: s, isFullscreen: l })), void 0, !0)
|
|
303
303
|
]),
|
|
304
304
|
key: "3"
|
|
305
305
|
} : void 0
|
|
@@ -310,7 +310,7 @@ const Me = ["id"], Ve = { style: { "z-index": "1", "padding-right": "24px" } },
|
|
|
310
310
|
])
|
|
311
311
|
]),
|
|
312
312
|
c("tbody", null, [
|
|
313
|
-
(
|
|
313
|
+
(u(!0), i(E, null, G(_.value, (a, n) => (u(), i("tr", {
|
|
314
314
|
role: "row",
|
|
315
315
|
style: r({
|
|
316
316
|
backgroundColor: e.value.tbody.backgroundColor,
|
|
@@ -340,14 +340,14 @@ const Me = ["id"], Ve = { style: { "z-index": "1", "padding-right": "24px" } },
|
|
|
340
340
|
justifyContent: e.value.tbody.textAlign
|
|
341
341
|
})
|
|
342
342
|
}, [
|
|
343
|
-
e.value.tbody.showColorMarker ? (
|
|
343
|
+
e.value.tbody.showColorMarker ? (u(), i("span", {
|
|
344
344
|
key: 0,
|
|
345
345
|
style: r({ color: a.color })
|
|
346
346
|
}, "⬤", 4)) : p("", !0),
|
|
347
347
|
c("span", null, b(a.name ?? "-"), 1)
|
|
348
348
|
], 4)
|
|
349
349
|
], 12, Ge),
|
|
350
|
-
(
|
|
350
|
+
(u(!0), i(E, null, G(ie.value, (s, l) => (u(), i("td", {
|
|
351
351
|
dir: "auto",
|
|
352
352
|
role: "cell",
|
|
353
353
|
ref_for: !0,
|
|
@@ -376,8 +376,8 @@ const Me = ["id"], Ve = { style: { "z-index": "1", "padding-right": "24px" } },
|
|
|
376
376
|
r: e.value.roundingValues
|
|
377
377
|
}),
|
|
378
378
|
{ datapoint: a, seriesIndex: n, datapointIndex: l }
|
|
379
|
-
)), 45,
|
|
380
|
-
e.value.showTotal ? (
|
|
379
|
+
)), 45, Re))), 256)),
|
|
380
|
+
e.value.showTotal ? (u(), i("td", {
|
|
381
381
|
key: 0,
|
|
382
382
|
dir: "auto",
|
|
383
383
|
role: "cell",
|
|
@@ -399,8 +399,8 @@ const Me = ["id"], Ve = { style: { "z-index": "1", "padding-right": "24px" } },
|
|
|
399
399
|
r: e.value.roundingTotal
|
|
400
400
|
}),
|
|
401
401
|
{ datapoint: a.sum, seriesIndex: n }
|
|
402
|
-
)), 13,
|
|
403
|
-
e.value.showAverage ? (
|
|
402
|
+
)), 13, Le)) : p("", !0),
|
|
403
|
+
e.value.showAverage ? (u(), i("td", {
|
|
404
404
|
key: 1,
|
|
405
405
|
dir: "auto",
|
|
406
406
|
role: "cell",
|
|
@@ -423,7 +423,7 @@ const Me = ["id"], Ve = { style: { "z-index": "1", "padding-right": "24px" } },
|
|
|
423
423
|
}),
|
|
424
424
|
{ datapoint: a.average, seriesIndex: n }
|
|
425
425
|
)), 13, Be)) : p("", !0),
|
|
426
|
-
e.value.showMedian ? (
|
|
426
|
+
e.value.showMedian ? (u(), i("td", {
|
|
427
427
|
key: 2,
|
|
428
428
|
dir: "auto",
|
|
429
429
|
role: "cell",
|
|
@@ -446,7 +446,7 @@ const Me = ["id"], Ve = { style: { "z-index": "1", "padding-right": "24px" } },
|
|
|
446
446
|
}),
|
|
447
447
|
{ datapoint: a.median, seriesIndex: n }
|
|
448
448
|
)), 13, Ue)) : p("", !0),
|
|
449
|
-
e.value.showSparklines ? (
|
|
449
|
+
e.value.showSparklines ? (u(), i("td", {
|
|
450
450
|
key: 3,
|
|
451
451
|
role: "cell",
|
|
452
452
|
"data-cell": e.value.translations.chart,
|
|
@@ -460,16 +460,18 @@ const Me = ["id"], Ve = { style: { "z-index": "1", "padding-right": "24px" } },
|
|
|
460
460
|
}),
|
|
461
461
|
class: "vue-ui-data-table__tbody__td sticky-col"
|
|
462
462
|
}, [
|
|
463
|
-
(
|
|
464
|
-
key: `sparkline_${n}_${
|
|
465
|
-
onHoverIndex: ({ index:
|
|
463
|
+
(u(), R(Oe, {
|
|
464
|
+
key: `sparkline_${n}_${w.value}`,
|
|
465
|
+
onHoverIndex: ({ index: s }) => ve({ dataIndex: s, serieIndex: n }),
|
|
466
|
+
"height-ratio": e.value.sparkline.dimensions.heightRatio,
|
|
467
|
+
"forced-padding": 30,
|
|
466
468
|
dataset: a.sparklineDataset,
|
|
467
469
|
showInfo: !1,
|
|
468
470
|
selectedIndex: m.value,
|
|
469
471
|
config: {
|
|
470
472
|
type: e.value.sparkline.type,
|
|
471
473
|
style: {
|
|
472
|
-
backgroundColor:
|
|
474
|
+
backgroundColor: "transparent",
|
|
473
475
|
animation: {
|
|
474
476
|
show: e.value.sparkline.animation.show && !v(U) && !v(H),
|
|
475
477
|
animationFrames: e.value.sparkline.animation.animationFrames
|
|
@@ -497,18 +499,18 @@ const Me = ["id"], Ve = { style: { "z-index": "1", "padding-right": "24px" } },
|
|
|
497
499
|
}
|
|
498
500
|
}
|
|
499
501
|
}
|
|
500
|
-
}, null, 8, ["onHoverIndex", "dataset", "selectedIndex", "config"]))
|
|
502
|
+
}, null, 8, ["onHoverIndex", "height-ratio", "dataset", "selectedIndex", "config"]))
|
|
501
503
|
], 12, He)) : p("", !0)
|
|
502
504
|
], 6))), 256))
|
|
503
505
|
])
|
|
504
506
|
], 4)
|
|
505
507
|
], 32),
|
|
506
|
-
t.$slots.source ? (
|
|
508
|
+
t.$slots.source ? (u(), i("div", qe, [
|
|
507
509
|
C(t.$slots, "source", {}, void 0, !0)
|
|
508
510
|
], 512)) : p("", !0)
|
|
509
511
|
], 10, Me));
|
|
510
512
|
}
|
|
511
|
-
}, tt = /* @__PURE__ */ Te(Xe, [["__scopeId", "data-v-
|
|
513
|
+
}, tt = /* @__PURE__ */ Te(Xe, [["__scopeId", "data-v-df1c4c1d"]]);
|
|
512
514
|
export {
|
|
513
515
|
tt as default
|
|
514
516
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-kERGTkcX.cjs"),Q=require("./Title-0iC4gElN.cjs"),A=require("./usePrinter-IEjSf9Zq.cjs"),Z=require("./vue-ui-skeleton-D2ANHIIV.cjs"),T=require("./useNestedProp-C01Nxqp-.cjs"),ee=require("./PackageVersion-D7UEx2nV.cjs"),te=require("./PenAndPaper-C1dGfWPA.cjs"),oe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),le=["id"],re={key:1,ref:"noTitle",class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},ae={key:2,style:"width:100%"},se=["xmlns","viewBox"],ne={id:"vueUiPill",clipPathUnits:"objectBoundingBox"},ue=["fill"],ce=["id"],ie=["stop-color"],de=["stop-color"],he=["stop-color"],ve={"clip-path":"url(#vueUiPill)"},me=["x","y","height","width"],pe=["x","y","height","width","fill"],ye=["x1","x2","y1","y2","stroke-width","stroke"],fe=["x1","x2","y1","y2","stroke-width","stroke"],ke=["x1","x2","y1","y2","stroke-width","stroke"],ge=["x1","x2","y1","y2","stroke-width","stroke"],xe=["x1","x2","y1","y2","stroke-width","stroke"],be=["x1","x2","y1","y2","stroke-width","stroke"],_e=["x1","x2","y1","y2","stroke-width","stroke"],Ce=["x1","x2","y1","y2","stroke-width","stroke"],we=["x","y","height","width"],Ne=["y","x","fill","font-size","font-weight"],Be={key:5,class:"vue-data-ui-watermark"},Pe={key:6,ref:"source",dir:"auto"},Ve={__name:"vue-ui-thermometer",props:{dataset:{type:Object,default(){return{}}},config:{type:Object,default(){return{}}}},setup(m,{expose:Y}){const s=m;e.useCssVars(l=>({"000db494":H.value,"2865ccd0":W.value,10843485:G.value}));const{vue_ui_thermometer:M}=r.useConfig(),k=e.computed(()=>!!s.dataset&&Object.keys(s.dataset).length);e.onMounted(()=>{B()});function B(){r.objectIsEmpty(s.dataset)?r.error({componentName:"VueUiThermometer",type:"dataset"}):r.getMissingDatasetAttributes({datasetObject:s.dataset,requiredAttributes:["value","from","to"]}).forEach(l=>{r.error({componentName:"VueUiThermometer",type:"datasetAttribute",property:l})})}const d=e.ref(r.createUid()),g=e.ref(null),P=e.ref(0),V=e.ref(0),t=e.computed({get:()=>E(),set:l=>l});function E(){const l=T.useNestedProp({userConfig:s.config,defaultConfig:M});return l.theme?{...T.useNestedProp({userConfig:r.themes.vue_ui_thermometer[l.theme]||s.config,defaultConfig:l}),customPalette:r.themePalettes[l.theme]||r.palette}:l}e.watch(()=>s.config,l=>{t.value=E(),B(),V.value+=1},{deep:!0});const{isPrinting:$,isImaging:F,generatePdf:I,generateImage:q}=A.usePrinter({elementId:`thermometer__${d.value}`,fileName:t.value.style.title.text||"vue-ui-thermometer"}),z=e.computed(()=>t.value.userOptions.show&&!t.value.style.title.text),p=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),L=e.computed(()=>t.value.style.chart.thermometer.width),i=e.computed(()=>s.dataset.steps||10),c=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,u,o){const n=[],w=S(l),N=S(u);for(let v=0;v<o;v++){const R=x(w.red,N.red,v,o),X=x(w.green,N.green,v,o),J=x(w.blue,N.blue,v,o),K=`#${b(R)}${b(X)}${b(J)}`;n.push(K)}return n}function S(l){const u=l.slice(1);return{red:parseInt(u.slice(0,2),16),green:parseInt(u.slice(2,4),16),blue:parseInt(u.slice(4,6),16)}}function x(l,u,o,n){return Math.round(l+(u-l)*o/n)}function b(l){return l.toString(16).padStart(2,"0")}const a=e.computed(()=>{const l=L.value+c.value.left+c.value.right,u=t.value.style.chart.height;return{width:l,left:c.value.left,right:l-c.value.right,top:c.value.top,bottom:u-c.value.bottom,height:u}}),U=e.computed(()=>a.value),_=e.computed(()=>{const l=r.checkNaN(s.dataset.from)<0?Math.abs(r.checkNaN(s.dataset.from)):r.checkNaN(s.dataset.from),u=r.checkNaN(s.dataset.to)<0?Math.abs(r.checkNaN(s.dataset.to)):r.checkNaN(s.dataset.to);let o=0;return r.checkNaN(s.dataset.to)>0?o=l+u:l>u?o=l-u:o=u-l,(1-(Math.abs(r.checkNaN(s.dataset.from))+r.checkNaN(s.dataset.value))/o)*(a.value.height-c.value.top-c.value.bottom)}),G=e.computed(()=>`${_.value}px`),W=e.computed(()=>`${a.value.height-t.value.style.chart.padding.bottom-c.value.top}px`),H=e.computed(()=>`${t.value.style.chart.animation.speedMs}ms`),j=e.computed(()=>{if(s.dataset.colors){if(!s.dataset.colors.from)return y(p.value[0]||r.palette[0],r.convertColorToHex(s.dataset.colors.to),i.value||10);if(!s.dataset.colors.to)return y(r.convertColorToHex(s.dataset.colors.from),p.value[1]||r.palette[1],i.value||10)}else return y(p.value[1]||r.palette[1],p.value[0]||r.palette[0],i.value||10);return y(r.convertColorToHex(s.dataset.colors.from),r.convertColorToHex(s.dataset.colors.to),i.value||10)}),O=e.computed(()=>{const l=[];let u=0;const o=a.value.height-c.value.top-c.value.bottom;for(let n=0;n<o-1;n+=o/i.value)l.push({x:a.value.left,y:a.value.top+n,qYLess:a.value.top+n+o/i.value/4,halfY:a.value.top+n+o/i.value/2,qYMore:a.value.top+n+o/i.value/4*3,color:j.value[u],height:o/i.value}),u+=1;return l}),h=e.ref(!1);function D(l){h.value=l,P.value+=1}const f=e.ref(!1);function C(){f.value=!f.value}return Y({generatePdf:I,generateImage:q,toggleAnnotator:C}),(l,u)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"thermoChart",ref:g,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}`},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(te.PenAndPaper,{key:0,parent:g.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:f.value,onClose:C},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),z.value?(e.openBlock(),e.createElementBlock("div",re,null,512)):e.createCommentVNode("",!0),t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",ae,[(e.openBlock(),e.createBlock(Q._sfc_main,{key:`title_${V.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&&k.value?(e.openBlock(),e.createBlock(A.UserOptions,{ref:"details",key:`user_options_${P.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isImaging:e.unref(F),isPrinting:e.unref($),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:g.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:f.value,onToggleFullscreen:D,onGeneratePdf:e.unref(I),onGenerateImage:e.unref(q),onToggleAnnotator:C},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:n})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:n})),void 0,!0)]),key:"2"}:void 0,l.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:o,isAnnotator:n})=>[e.renderSlot(l.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:o,isAnnotator:n})),void 0,!0)]),key:"3"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasPdf","hasImg","hasFullscreen","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),k.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(r.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":h.value,"vue-data-ui-fulscreen--off":!h.value}),width:"100%",viewBox:`0 0 ${a.value.width} ${a.value.height}`,style:"background:transparent"},[e.createVNode(ee._sfc_main),e.createElementVNode("defs",null,[e.createElementVNode("clipPath",ne,[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,ue)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(O.value,(o,n)=>(e.openBlock(),e.createElementBlock("linearGradient",{id:`vueUiThermometerGradient_${n}_${d.value}`,x1:"0%",y1:"0%",x2:"100%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":o.color},null,8,ie),e.createElementVNode("stop",{offset:"50%","stop-color":e.unref(r.setOpacity)(o.color,100-t.value.style.chart.graduations.gradient.intensity)},null,8,de),e.createElementVNode("stop",{offset:"100%","stop-color":o.color},null,8,he)],8,ce))),256))]),e.createElementVNode("g",ve,[e.createElementVNode("rect",{x:a.value.left,y:a.value.top,height:a.value.height-c.value.top-c.value.bottom,width:a.value.width-c.value.left-c.value.right,fill:"#FFFFFF"},null,8,me),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(O.value,(o,n)=>(e.openBlock(),e.createElementBlock("g",{key:`graduation_${n}`},[e.createElementVNode("rect",{x:o.x,y:o.y,height:o.height,width:a.value.width-t.value.style.chart.padding.left-t.value.style.chart.padding.right,fill:t.value.style.chart.graduations.gradient.show?`url(#vueUiThermometerGradient_${n}_${d.value})`:o.color,"shape-rendering":"crispEdges"},null,8,pe),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,ye)):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,fe)):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,ke)):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,ge)):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:a.value.right,x2:a.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,xe)):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:a.value.right,x2:a.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:a.value.right,x2:a.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,_e)):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:a.value.right,x2:a.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,Ce)):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:a.value.left,y:a.value.top,height:_.value,width:a.value.width-t.value.style.chart.padding.left-t.value.style.chart.padding.right,fill:"#FFFFFF66"},null,10,we)]),e.createElementVNode("text",{class:e.normalizeClass({"vue-ui-thermometer-temperature-value":t.value.style.chart.animation.use}),y:_.value+a.value.top+t.value.style.chart.label.fontSize/3,x:a.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(r.applyDataLabel)(t.value.style.chart.label.formatter,m.dataset.value,e.unref(r.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,Ne),e.renderSlot(l.$slots,"svg",{svg:U.value},void 0,!0)],10,se)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Be,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref($)||e.unref(F)})),void 0,!0)])):e.createCommentVNode("",!0),l.$slots.source?(e.openBlock(),e.createElementBlock("div",Pe,[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),k.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Z.default,{key:7,config:{type:"thermometer",style:{backgroundColor:t.value.style.chart.backgroundColor,thermometer:{color:"#CCCCCC"}}}},null,8,["config"]))],14,le))}},Ee=oe._export_sfc(Ve,[["__scopeId","data-v-8a73571f"]]);exports.default=Ee;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-K3fZ-qvU.cjs"),Q=require("./Title-s1XIylbt.cjs"),A=require("./usePrinter-D9B7AJ0m.cjs"),Z=require("./vue-ui-skeleton-Ce7sIvSp.cjs"),T=require("./useNestedProp-DjDulDmU.cjs"),ee=require("./PackageVersion-DhLEKNrl.cjs"),te=require("./PenAndPaper-BskrQncj.cjs"),oe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),le=["id"],re={key:1,ref:"noTitle",class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},ae={key:2,style:"width:100%"},se=["xmlns","viewBox"],ne={id:"vueUiPill",clipPathUnits:"objectBoundingBox"},ue=["fill"],ce=["id"],ie=["stop-color"],de=["stop-color"],he=["stop-color"],ve={"clip-path":"url(#vueUiPill)"},me=["x","y","height","width"],pe=["x","y","height","width","fill"],ye=["x1","x2","y1","y2","stroke-width","stroke"],fe=["x1","x2","y1","y2","stroke-width","stroke"],ke=["x1","x2","y1","y2","stroke-width","stroke"],ge=["x1","x2","y1","y2","stroke-width","stroke"],xe=["x1","x2","y1","y2","stroke-width","stroke"],be=["x1","x2","y1","y2","stroke-width","stroke"],_e=["x1","x2","y1","y2","stroke-width","stroke"],Ce=["x1","x2","y1","y2","stroke-width","stroke"],we=["x","y","height","width"],Ne=["y","x","fill","font-size","font-weight"],Be={key:5,class:"vue-data-ui-watermark"},Pe={key:6,ref:"source",dir:"auto"},Ve={__name:"vue-ui-thermometer",props:{dataset:{type:Object,default(){return{}}},config:{type:Object,default(){return{}}}},setup(m,{expose:Y}){const s=m;e.useCssVars(l=>({"000db494":H.value,"2865ccd0":W.value,10843485:G.value}));const{vue_ui_thermometer:M}=r.useConfig(),k=e.computed(()=>!!s.dataset&&Object.keys(s.dataset).length);e.onMounted(()=>{B()});function B(){r.objectIsEmpty(s.dataset)?r.error({componentName:"VueUiThermometer",type:"dataset"}):r.getMissingDatasetAttributes({datasetObject:s.dataset,requiredAttributes:["value","from","to"]}).forEach(l=>{r.error({componentName:"VueUiThermometer",type:"datasetAttribute",property:l})})}const d=e.ref(r.createUid()),g=e.ref(null),P=e.ref(0),V=e.ref(0),t=e.computed({get:()=>E(),set:l=>l});function E(){const l=T.useNestedProp({userConfig:s.config,defaultConfig:M});return l.theme?{...T.useNestedProp({userConfig:r.themes.vue_ui_thermometer[l.theme]||s.config,defaultConfig:l}),customPalette:r.themePalettes[l.theme]||r.palette}:l}e.watch(()=>s.config,l=>{t.value=E(),B(),V.value+=1},{deep:!0});const{isPrinting:$,isImaging:F,generatePdf:I,generateImage:q}=A.usePrinter({elementId:`thermometer__${d.value}`,fileName:t.value.style.title.text||"vue-ui-thermometer"}),z=e.computed(()=>t.value.userOptions.show&&!t.value.style.title.text),p=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),L=e.computed(()=>t.value.style.chart.thermometer.width),i=e.computed(()=>s.dataset.steps||10),c=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,u,o){const n=[],w=S(l),N=S(u);for(let v=0;v<o;v++){const R=x(w.red,N.red,v,o),X=x(w.green,N.green,v,o),J=x(w.blue,N.blue,v,o),K=`#${b(R)}${b(X)}${b(J)}`;n.push(K)}return n}function S(l){const u=l.slice(1);return{red:parseInt(u.slice(0,2),16),green:parseInt(u.slice(2,4),16),blue:parseInt(u.slice(4,6),16)}}function x(l,u,o,n){return Math.round(l+(u-l)*o/n)}function b(l){return l.toString(16).padStart(2,"0")}const a=e.computed(()=>{const l=L.value+c.value.left+c.value.right,u=t.value.style.chart.height;return{width:l,left:c.value.left,right:l-c.value.right,top:c.value.top,bottom:u-c.value.bottom,height:u}}),U=e.computed(()=>a.value),_=e.computed(()=>{const l=r.checkNaN(s.dataset.from)<0?Math.abs(r.checkNaN(s.dataset.from)):r.checkNaN(s.dataset.from),u=r.checkNaN(s.dataset.to)<0?Math.abs(r.checkNaN(s.dataset.to)):r.checkNaN(s.dataset.to);let o=0;return r.checkNaN(s.dataset.to)>0?o=l+u:l>u?o=l-u:o=u-l,(1-(Math.abs(r.checkNaN(s.dataset.from))+r.checkNaN(s.dataset.value))/o)*(a.value.height-c.value.top-c.value.bottom)}),G=e.computed(()=>`${_.value}px`),W=e.computed(()=>`${a.value.height-t.value.style.chart.padding.bottom-c.value.top}px`),H=e.computed(()=>`${t.value.style.chart.animation.speedMs}ms`),j=e.computed(()=>{if(s.dataset.colors){if(!s.dataset.colors.from)return y(p.value[0]||r.palette[0],r.convertColorToHex(s.dataset.colors.to),i.value||10);if(!s.dataset.colors.to)return y(r.convertColorToHex(s.dataset.colors.from),p.value[1]||r.palette[1],i.value||10)}else return y(p.value[1]||r.palette[1],p.value[0]||r.palette[0],i.value||10);return y(r.convertColorToHex(s.dataset.colors.from),r.convertColorToHex(s.dataset.colors.to),i.value||10)}),O=e.computed(()=>{const l=[];let u=0;const o=a.value.height-c.value.top-c.value.bottom;for(let n=0;n<o-1;n+=o/i.value)l.push({x:a.value.left,y:a.value.top+n,qYLess:a.value.top+n+o/i.value/4,halfY:a.value.top+n+o/i.value/2,qYMore:a.value.top+n+o/i.value/4*3,color:j.value[u],height:o/i.value}),u+=1;return l}),h=e.ref(!1);function D(l){h.value=l,P.value+=1}const f=e.ref(!1);function C(){f.value=!f.value}return Y({generatePdf:I,generateImage:q,toggleAnnotator:C}),(l,u)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"thermoChart",ref:g,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}`},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(te.PenAndPaper,{key:0,parent:g.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:f.value,onClose:C},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),z.value?(e.openBlock(),e.createElementBlock("div",re,null,512)):e.createCommentVNode("",!0),t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",ae,[(e.openBlock(),e.createBlock(Q._sfc_main,{key:`title_${V.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&&k.value?(e.openBlock(),e.createBlock(A.UserOptions,{ref:"details",key:`user_options_${P.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isImaging:e.unref(F),isPrinting:e.unref($),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:g.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:f.value,onToggleFullscreen:D,onGeneratePdf:e.unref(I),onGenerateImage:e.unref(q),onToggleAnnotator:C},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:n})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:n})),void 0,!0)]),key:"2"}:void 0,l.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:o,isAnnotator:n})=>[e.renderSlot(l.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:o,isAnnotator:n})),void 0,!0)]),key:"3"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasPdf","hasImg","hasFullscreen","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),k.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(r.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":h.value,"vue-data-ui-fulscreen--off":!h.value}),width:"100%",viewBox:`0 0 ${a.value.width} ${a.value.height}`,style:"background:transparent"},[e.createVNode(ee._sfc_main),e.createElementVNode("defs",null,[e.createElementVNode("clipPath",ne,[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,ue)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(O.value,(o,n)=>(e.openBlock(),e.createElementBlock("linearGradient",{id:`vueUiThermometerGradient_${n}_${d.value}`,x1:"0%",y1:"0%",x2:"100%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":o.color},null,8,ie),e.createElementVNode("stop",{offset:"50%","stop-color":e.unref(r.setOpacity)(o.color,100-t.value.style.chart.graduations.gradient.intensity)},null,8,de),e.createElementVNode("stop",{offset:"100%","stop-color":o.color},null,8,he)],8,ce))),256))]),e.createElementVNode("g",ve,[e.createElementVNode("rect",{x:a.value.left,y:a.value.top,height:a.value.height-c.value.top-c.value.bottom,width:a.value.width-c.value.left-c.value.right,fill:"#FFFFFF"},null,8,me),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(O.value,(o,n)=>(e.openBlock(),e.createElementBlock("g",{key:`graduation_${n}`},[e.createElementVNode("rect",{x:o.x,y:o.y,height:o.height,width:a.value.width-t.value.style.chart.padding.left-t.value.style.chart.padding.right,fill:t.value.style.chart.graduations.gradient.show?`url(#vueUiThermometerGradient_${n}_${d.value})`:o.color,"shape-rendering":"crispEdges"},null,8,pe),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,ye)):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,fe)):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,ke)):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,ge)):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:a.value.right,x2:a.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,xe)):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:a.value.right,x2:a.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:a.value.right,x2:a.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,_e)):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:a.value.right,x2:a.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,Ce)):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:a.value.left,y:a.value.top,height:_.value,width:a.value.width-t.value.style.chart.padding.left-t.value.style.chart.padding.right,fill:"#FFFFFF66"},null,10,we)]),e.createElementVNode("text",{class:e.normalizeClass({"vue-ui-thermometer-temperature-value":t.value.style.chart.animation.use}),y:_.value+a.value.top+t.value.style.chart.label.fontSize/3,x:a.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(r.applyDataLabel)(t.value.style.chart.label.formatter,m.dataset.value,e.unref(r.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,Ne),e.renderSlot(l.$slots,"svg",{svg:U.value},void 0,!0)],10,se)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Be,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref($)||e.unref(F)})),void 0,!0)])):e.createCommentVNode("",!0),l.$slots.source?(e.openBlock(),e.createElementBlock("div",Pe,[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),k.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Z.default,{key:7,config:{type:"thermometer",style:{backgroundColor:t.value.style.chart.backgroundColor,thermometer:{color:"#CCCCCC"}}}},null,8,["config"]))],14,le))}},Ee=oe._export_sfc(Ve,[["__scopeId","data-v-8a73571f"]]);exports.default=Ee;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { useCssVars as ye, computed as h, onMounted as fe, ref as g, watch as ge, openBlock as l, createElementBlock as u, normalizeClass as P, normalizeStyle as me, createBlock as F, createCommentVNode as i, unref as v, createSlots as pe, withCtx as I, renderSlot as m, normalizeProps as G, guardReactiveProps as V, createVNode as ke, createElementVNode as d, Fragment as O, renderList as K, toDisplayString as be } from "vue";
|
|
2
|
-
import { u as _e, o as xe, e as Q, g as we, c as Ce, t as $e, a as Pe, p as _, b as Fe, v as f, d as A, X as Ie, s as Oe, i as Ae, f as Ye } from "./index-
|
|
3
|
-
import { _ as Ne } from "./Title-
|
|
4
|
-
import { u as Me, U as Te } from "./usePrinter-
|
|
5
|
-
import Se from "./vue-ui-skeleton-
|
|
6
|
-
import { u as Z } from "./useNestedProp-
|
|
7
|
-
import { _ as Ue } from "./PackageVersion-
|
|
8
|
-
import { P as qe } from "./PenAndPaper-
|
|
2
|
+
import { u as _e, o as xe, e as Q, g as we, c as Ce, t as $e, a as Pe, p as _, b as Fe, v as f, d as A, X as Ie, s as Oe, i as Ae, f as Ye } from "./index-BEYHUDwM.js";
|
|
3
|
+
import { _ as Ne } from "./Title-BiNqHwMI.js";
|
|
4
|
+
import { u as Me, U as Te } from "./usePrinter-CyU3evgB.js";
|
|
5
|
+
import Se from "./vue-ui-skeleton-Ml2uW_C4.js";
|
|
6
|
+
import { u as Z } from "./useNestedProp-DnO1-IHr.js";
|
|
7
|
+
import { _ as Ue } from "./PackageVersion-tmu5-NHl.js";
|
|
8
|
+
import { P as qe } from "./PenAndPaper-CrjOn4pS.js";
|
|
9
9
|
import { _ as Le } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
10
10
|
const Ge = ["id"], Ve = {
|
|
11
11
|
key: 1,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),L=require("./useNestedProp-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),L=require("./useNestedProp-DjDulDmU.cjs"),g=require("./index-K3fZ-qvU.cjs"),$=require("./useResponsive-BJ7DTGpm.cjs"),B=require("./BaseIcon-COvAfeHZ.cjs"),j=require("./Title-s1XIylbt.cjs"),q=require("./PackageVersion-DhLEKNrl.cjs"),O=require("./_plugin-vue_export-helper-BHFhmbuH.cjs");class U{constructor(T,v,y,E=!0,b=!0){this.interval=v,this.elapsed=0,this.isPaused=!1;const S=`
|
|
2
2
|
let interval;
|
|
3
3
|
let elapsed = 0;
|
|
4
4
|
let paused = false;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { ref as n, onMounted as Q, onBeforeUnmount as Y, computed as z, watch as Z, openBlock as l, createElementBlock as r, normalizeStyle as f, createBlock as ee, createCommentVNode as v, unref as te, createVNode as M, createElementVNode as C, mergeProps as V, renderSlot as E, normalizeProps as O, guardReactiveProps as U, toDisplayString as ae } from "vue";
|
|
2
|
-
import { u as se } from "./useNestedProp-
|
|
3
|
-
import { u as le, c as oe, X as re, E as W } from "./index-
|
|
2
|
+
import { u as se } from "./useNestedProp-DnO1-IHr.js";
|
|
3
|
+
import { u as le, c as oe, X as re, E as W } from "./index-BEYHUDwM.js";
|
|
4
4
|
import { t as ue, u as ie } from "./useResponsive-CoxXLe23.js";
|
|
5
|
-
import P from "./BaseIcon-
|
|
6
|
-
import { _ as ne } from "./Title-
|
|
7
|
-
import { _ as ce } from "./PackageVersion-
|
|
5
|
+
import P from "./BaseIcon-Cg2KVd6O.js";
|
|
6
|
+
import { _ as ne } from "./Title-BiNqHwMI.js";
|
|
7
|
+
import { _ as ce } from "./PackageVersion-tmu5-NHl.js";
|
|
8
8
|
import { _ as de } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
9
9
|
class he {
|
|
10
10
|
constructor(A, k, T, H = !0, x = !0) {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { computed as v, ref as p, watch as J, onMounted as ne, openBlock as r, createElementBlock as u, normalizeClass as G, normalizeStyle as K, createBlock as O, createCommentVNode as g, unref as d, createSlots as ue, withCtx as F, renderSlot as _, normalizeProps as L, guardReactiveProps as M, createVNode as ie, Fragment as Q, renderList as V, toDisplayString as ce } from "vue";
|
|
2
|
-
import { u as W } from "./useNestedProp-
|
|
3
|
-
import { u as ve, c as he, t as de, v as fe, o as pe, e as ge, w as Z, X as me, i as ye, f as ke } from "./index-
|
|
4
|
-
import { _ as _e } from "./Title-
|
|
5
|
-
import { u as be, U as Ce } from "./usePrinter-
|
|
6
|
-
import $e from "./vue-ui-skeleton-
|
|
7
|
-
import { _ as we } from "./PackageVersion-
|
|
8
|
-
import { P as xe } from "./PenAndPaper-
|
|
2
|
+
import { u as W } from "./useNestedProp-DnO1-IHr.js";
|
|
3
|
+
import { u as ve, c as he, t as de, v as fe, o as pe, e as ge, w as Z, X as me, i as ye, f as ke } from "./index-BEYHUDwM.js";
|
|
4
|
+
import { _ as _e } from "./Title-BiNqHwMI.js";
|
|
5
|
+
import { u as be, U as Ce } from "./usePrinter-CyU3evgB.js";
|
|
6
|
+
import $e from "./vue-ui-skeleton-Ml2uW_C4.js";
|
|
7
|
+
import { _ as we } from "./PackageVersion-tmu5-NHl.js";
|
|
8
|
+
import { P as xe } from "./PenAndPaper-CrjOn4pS.js";
|
|
9
9
|
import { _ as Pe } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
10
10
|
const Ae = ["id"], Ie = {
|
|
11
11
|
key: 2,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),V=require("./useNestedProp-C01Nxqp-.cjs"),c=require("./index-kERGTkcX.cjs"),X=require("./Title-0iC4gElN.cjs"),L=require("./usePrinter-IEjSf9Zq.cjs"),Y=require("./vue-ui-skeleton-D2ANHIIV.cjs"),J=require("./PackageVersion-D7UEx2nV.cjs"),K=require("./PenAndPaper-C1dGfWPA.cjs"),Q=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),W=["id"],Z={key:2,style:"width:100%;background:transparent;padding-bottom:12px"},ee=["xmlns","viewBox"],te={key:0},ae=["d","stroke-width","stroke"],oe={key:1},le=["x1","y1","x2","y2","stroke-width","stroke"],re=["x","y","font-size","fill","font-weight","text-anchor"],ne={key:5,class:"vue-data-ui-watermark"},se={key:6,ref:"source",dir:"auto"},ue={__name:"vue-ui-tiremarks",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(M,{expose:G}){const v=M,{vue_ui_tiremarks:j}=c.useConfig(),P=e.computed(()=>!!v.dataset&&Object.keys(v.dataset).length),$=e.ref(c.createUid()),B=e.ref(null),U=e.ref(null),A=e.ref(0),N=e.ref(0),t=e.computed({get:()=>S(),set:a=>a});function S(){const a=V.useNestedProp({userConfig:v.config,defaultConfig:j});return a.theme?{...V.useNestedProp({userConfig:c.themes.vue_ui_tiremarks[a.theme]||v.config,defaultConfig:a})}:a}e.watch(()=>v.config,a=>{t.value=S(),T(),N.value+=1},{deep:!0});const{isPrinting:z,isImaging:I,generatePdf:O,generateImage:F}=L.usePrinter({elementId:$.value,fileName:t.value.style.chart.title.text||"vue-ui-tiremarks"}),H=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),n=e.ref(t.value.style.chart.animation.use?0:c.checkNaN(v.dataset.percentage));e.watch(()=>v.dataset,a=>{t.value.style.chart.animation.use?E(a.percentage):n.value=a.percentage||0},{deep:!0}),e.onMounted(()=>{T()});function E(a){let u=t.value.style.chart.animation.speed;const o=Math.abs(a-n.value)/(u*120);function r(){n.value<a?n.value=Math.min(n.value+o,a):n.value>a&&(n.value=Math.max(n.value-o,a)),n.value!==a&&requestAnimationFrame(r)}r()}function T(){c.objectIsEmpty(v.dataset)&&c.error({componentName:"VueUiTiremarks",type:"dataset"}),E(v.dataset.percentage||0)}const f=e.computed(()=>t.value.style.chart.layout.display==="vertical"),s=e.computed(()=>{const a={top:48,left:64,right:64,bottom:48};return f.value?{top:t.value.style.chart.percentage.verticalPosition==="top"?a.top:3,left:3,right:3,bottom:t.value.style.chart.percentage.verticalPosition==="bottom"?a.bottom:3}:{top:0,bottom:0,left:t.value.style.chart.percentage.horizontalPosition==="left"?a.left:3,right:t.value.style.chart.percentage.horizontalPosition==="right"?a.right:10}}),b=e.computed(()=>Object.values(s.value).reduce((a,u)=>a+u,0)),l=e.computed(()=>({height:f.value?312:56,width:f.value?56:312})),D=e.ref(100);e.computed(()=>v.dataset.percentage/D.value);const i=e.computed(()=>f.value?{mark:(l.value.height-b.value)/100*.5,space:(l.value.height-b.value)/100*.5}:{mark:(l.value.width-b.value)/100*.5,space:(l.value.width-b.value)/100*.5}),q=e.computed(()=>{const a=[];for(let o=0;o<100;o+=1){const r=t.value.style.chart.layout.ticks.gradient.show?c.shiftHue(t.value.style.chart.layout.activeColor,o/100*(t.value.style.chart.layout.ticks.gradient.shiftHueIntensity/100)):t.value.style.chart.layout.activeColor;if(f.value){const y=t.value.style.chart.layout.crescendo?(100-o)*(l.value.width-s.value.left-s.value.right)/100/3:0,d=s.value.left+4+y,h=l.value.width-s.value.right-4-y,p=l.value.height-s.value.bottom-o*i.value.mark-o*i.value.space-i.value.mark,m=l.value.height-s.value.bottom-o*i.value.mark-o*i.value.space-i.value.mark,k=(h-d)/t.value.style.chart.layout.curveAngleX,C=t.value.style.chart.layout.curveAngleY*((1+o)/100);a.push({x1:d,x2:h,y1:p,y2:m,curve:`M ${d} ${p} C ${d+k} ${p-C}, ${h-k} ${m-C}, ${h} ${m}`,color:r})}else{const y=t.value.style.chart.layout.crescendo?(100-o)*(l.value.height-s.value.top-s.value.bottom)/100/3:0,d=s.value.left+o*i.value.mark+o*i.value.space-i.value.mark,h=d,p=s.value.top+4+y,m=l.value.height-s.value.bottom-4-y,k=t.value.style.chart.layout.curveAngleY*((1+o)/100),C=(m-p)/t.value.style.chart.layout.curveAngleX;a.push({x1:d,x2:h,y1:p,y2:m,curve:`M ${d} ${p} C ${d+k} ${p+C}, ${h+k} ${m-C}, ${h} ${m}`,color:r})}}return a}),g=e.computed(()=>{let a,u,o;const r=t.value.style.chart.percentage.fontSize/3;return f.value?t.value.style.chart.percentage.verticalPosition==="top"?(a=l.value.width/2,u=s.value.top/2,o="middle"):t.value.style.chart.percentage.verticalPosition==="bottom"&&(a=l.value.width/2,u=l.value.height-s.value.bottom/2+r,o="middle"):t.value.style.chart.percentage.horizontalPosition==="left"?(a=4,u=l.value.height/2+r,o="start"):t.value.style.chart.percentage.horizontalPosition==="right"&&(a=l.value.width-s.value.right+8,u=l.value.height/2+r,o="start"),{x:a,y:u,textAnchor:o,bold:t.value.style.chart.percentage.bold,fontSize:t.value.style.chart.percentage.fontSize,fill:t.value.style.chart.percentage.color}}),_=e.ref(!1);function R(a){_.value=a,A.value+=1}const w=e.ref(!1);function x(){w.value=!w.value}return G({generatePdf:O,generateImage:F,toggleAnnotator:x}),(a,u)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"tiremarksChart",ref:B,class:e.normalizeClass(`vue-ui-tiremarks ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.chart.backgroundColor}`),id:$.value},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(K.PenAndPaper,{key:0,parent:B.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:w.value,onClose:x},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),H.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:U,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",Z,[(e.openBlock(),e.createBlock(X._sfc_main,{key:`title_${N.value}`,config:{title:{cy:"wheel-title",...t.value.style.chart.title},subtitle:{cy:"wheel-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))])):e.createCommentVNode("",!0),t.value.userOptions.show&&P.value?(e.openBlock(),e.createBlock(L.UserOptions,{ref:"details",key:`user_options_${A.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(z),isImaging:e.unref(I),uid:$.value,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasFullscreen:t.value.userOptions.buttons.fullscreen,hasXls:!1,isFullscreen:_.value,titles:{...t.value.userOptions.buttonTitles},chartElement:B.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:w.value,onToggleFullscreen:R,onGeneratePdf:e.unref(O),onGenerateImage:e.unref(F),onToggleAnnotator:x},e.createSlots({_:2},[a.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,a.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionImg",{},void 0,!0)]),key:"1"}:void 0,a.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:r})=>[e.renderSlot(a.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:r})),void 0,!0)]),key:"2"}:void 0,a.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:o,isAnnotator:r})=>[e.renderSlot(a.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:o,isAnnotator:r})),void 0,!0)]),key:"3"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasFullscreen","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),P.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(c.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":_.value,"vue-data-ui-fulscreen--off":!_.value}),viewBox:`0 0 ${l.value.width} ${l.value.height}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(J._sfc_main),t.value.style.chart.layout.curved?(e.openBlock(),e.createElementBlock("g",te,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(q.value,(o,r)=>(e.openBlock(),e.createElementBlock("path",{d:o.curve,"stroke-width":i.value.mark,stroke:n.value>=r?o.color:t.value.style.chart.layout.inactiveColor,"stroke-linecap":"round",fill:"none",class:e.normalizeClass({"vue-ui-tick-animated":t.value.style.chart.animation.use&&r<=n.value})},null,10,ae))),256))])):(e.openBlock(),e.createElementBlock("g",oe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(q.value,(o,r)=>(e.openBlock(),e.createElementBlock("line",{x1:o.x1,y1:o.y1,x2:o.x2,y2:o.y2,"stroke-width":i.value.mark,stroke:n.value>=r?o.color:t.value.style.chart.layout.inactiveColor,"stroke-linecap":"round"},null,8,le))),256))])),t.value.style.chart.percentage.show?(e.openBlock(),e.createElementBlock("text",{key:2,x:g.value.x,y:g.value.y,"font-size":g.value.fontSize,fill:t.value.style.chart.layout.ticks.gradient.show&&t.value.style.chart.percentage.useGradientColor?e.unref(c.shiftHue)(t.value.style.chart.layout.activeColor,n.value/100*(t.value.style.chart.layout.ticks.gradient.shiftHueIntensity/100)):t.value.style.chart.percentage.color,"font-weight":g.value.bold?"bold":"normal","text-anchor":g.value.textAnchor},e.toDisplayString(e.unref(c.applyDataLabel)(t.value.style.chart.percentage.formatter,n.value,e.unref(c.dataLabel)({v:n.value,s:"%",r:t.value.style.chart.percentage.rounding}))),9,re)):e.createCommentVNode("",!0),e.renderSlot(a.$slots,"svg",{svg:l.value},void 0,!0)],14,ee)):e.createCommentVNode("",!0),a.$slots.watermark?(e.openBlock(),e.createElementBlock("div",ne,[e.renderSlot(a.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(z)||e.unref(I)})),void 0,!0)])):e.createCommentVNode("",!0),a.$slots.source?(e.openBlock(),e.createElementBlock("div",se,[e.renderSlot(a.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),P.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Y.default,{key:7,config:{type:"tiremarks",style:{backgroundColor:t.value.style.chart.backgroundColor,tiremarks:{color:"#CCCCCC"}}}},null,8,["config"]))],14,W))}},ie=Q._export_sfc(ue,[["__scopeId","data-v-93332410"]]);exports.default=ie;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),V=require("./useNestedProp-DjDulDmU.cjs"),c=require("./index-K3fZ-qvU.cjs"),X=require("./Title-s1XIylbt.cjs"),L=require("./usePrinter-D9B7AJ0m.cjs"),Y=require("./vue-ui-skeleton-Ce7sIvSp.cjs"),J=require("./PackageVersion-DhLEKNrl.cjs"),K=require("./PenAndPaper-BskrQncj.cjs"),Q=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),W=["id"],Z={key:2,style:"width:100%;background:transparent;padding-bottom:12px"},ee=["xmlns","viewBox"],te={key:0},ae=["d","stroke-width","stroke"],oe={key:1},le=["x1","y1","x2","y2","stroke-width","stroke"],re=["x","y","font-size","fill","font-weight","text-anchor"],ne={key:5,class:"vue-data-ui-watermark"},se={key:6,ref:"source",dir:"auto"},ue={__name:"vue-ui-tiremarks",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(M,{expose:G}){const v=M,{vue_ui_tiremarks:j}=c.useConfig(),P=e.computed(()=>!!v.dataset&&Object.keys(v.dataset).length),$=e.ref(c.createUid()),B=e.ref(null),U=e.ref(null),A=e.ref(0),N=e.ref(0),t=e.computed({get:()=>S(),set:a=>a});function S(){const a=V.useNestedProp({userConfig:v.config,defaultConfig:j});return a.theme?{...V.useNestedProp({userConfig:c.themes.vue_ui_tiremarks[a.theme]||v.config,defaultConfig:a})}:a}e.watch(()=>v.config,a=>{t.value=S(),T(),N.value+=1},{deep:!0});const{isPrinting:z,isImaging:I,generatePdf:O,generateImage:F}=L.usePrinter({elementId:$.value,fileName:t.value.style.chart.title.text||"vue-ui-tiremarks"}),H=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),n=e.ref(t.value.style.chart.animation.use?0:c.checkNaN(v.dataset.percentage));e.watch(()=>v.dataset,a=>{t.value.style.chart.animation.use?E(a.percentage):n.value=a.percentage||0},{deep:!0}),e.onMounted(()=>{T()});function E(a){let u=t.value.style.chart.animation.speed;const o=Math.abs(a-n.value)/(u*120);function r(){n.value<a?n.value=Math.min(n.value+o,a):n.value>a&&(n.value=Math.max(n.value-o,a)),n.value!==a&&requestAnimationFrame(r)}r()}function T(){c.objectIsEmpty(v.dataset)&&c.error({componentName:"VueUiTiremarks",type:"dataset"}),E(v.dataset.percentage||0)}const f=e.computed(()=>t.value.style.chart.layout.display==="vertical"),s=e.computed(()=>{const a={top:48,left:64,right:64,bottom:48};return f.value?{top:t.value.style.chart.percentage.verticalPosition==="top"?a.top:3,left:3,right:3,bottom:t.value.style.chart.percentage.verticalPosition==="bottom"?a.bottom:3}:{top:0,bottom:0,left:t.value.style.chart.percentage.horizontalPosition==="left"?a.left:3,right:t.value.style.chart.percentage.horizontalPosition==="right"?a.right:10}}),b=e.computed(()=>Object.values(s.value).reduce((a,u)=>a+u,0)),l=e.computed(()=>({height:f.value?312:56,width:f.value?56:312})),D=e.ref(100);e.computed(()=>v.dataset.percentage/D.value);const i=e.computed(()=>f.value?{mark:(l.value.height-b.value)/100*.5,space:(l.value.height-b.value)/100*.5}:{mark:(l.value.width-b.value)/100*.5,space:(l.value.width-b.value)/100*.5}),q=e.computed(()=>{const a=[];for(let o=0;o<100;o+=1){const r=t.value.style.chart.layout.ticks.gradient.show?c.shiftHue(t.value.style.chart.layout.activeColor,o/100*(t.value.style.chart.layout.ticks.gradient.shiftHueIntensity/100)):t.value.style.chart.layout.activeColor;if(f.value){const y=t.value.style.chart.layout.crescendo?(100-o)*(l.value.width-s.value.left-s.value.right)/100/3:0,d=s.value.left+4+y,h=l.value.width-s.value.right-4-y,p=l.value.height-s.value.bottom-o*i.value.mark-o*i.value.space-i.value.mark,m=l.value.height-s.value.bottom-o*i.value.mark-o*i.value.space-i.value.mark,k=(h-d)/t.value.style.chart.layout.curveAngleX,C=t.value.style.chart.layout.curveAngleY*((1+o)/100);a.push({x1:d,x2:h,y1:p,y2:m,curve:`M ${d} ${p} C ${d+k} ${p-C}, ${h-k} ${m-C}, ${h} ${m}`,color:r})}else{const y=t.value.style.chart.layout.crescendo?(100-o)*(l.value.height-s.value.top-s.value.bottom)/100/3:0,d=s.value.left+o*i.value.mark+o*i.value.space-i.value.mark,h=d,p=s.value.top+4+y,m=l.value.height-s.value.bottom-4-y,k=t.value.style.chart.layout.curveAngleY*((1+o)/100),C=(m-p)/t.value.style.chart.layout.curveAngleX;a.push({x1:d,x2:h,y1:p,y2:m,curve:`M ${d} ${p} C ${d+k} ${p+C}, ${h+k} ${m-C}, ${h} ${m}`,color:r})}}return a}),g=e.computed(()=>{let a,u,o;const r=t.value.style.chart.percentage.fontSize/3;return f.value?t.value.style.chart.percentage.verticalPosition==="top"?(a=l.value.width/2,u=s.value.top/2,o="middle"):t.value.style.chart.percentage.verticalPosition==="bottom"&&(a=l.value.width/2,u=l.value.height-s.value.bottom/2+r,o="middle"):t.value.style.chart.percentage.horizontalPosition==="left"?(a=4,u=l.value.height/2+r,o="start"):t.value.style.chart.percentage.horizontalPosition==="right"&&(a=l.value.width-s.value.right+8,u=l.value.height/2+r,o="start"),{x:a,y:u,textAnchor:o,bold:t.value.style.chart.percentage.bold,fontSize:t.value.style.chart.percentage.fontSize,fill:t.value.style.chart.percentage.color}}),_=e.ref(!1);function R(a){_.value=a,A.value+=1}const w=e.ref(!1);function x(){w.value=!w.value}return G({generatePdf:O,generateImage:F,toggleAnnotator:x}),(a,u)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"tiremarksChart",ref:B,class:e.normalizeClass(`vue-ui-tiremarks ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.chart.backgroundColor}`),id:$.value},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(K.PenAndPaper,{key:0,parent:B.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:w.value,onClose:x},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),H.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:U,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",Z,[(e.openBlock(),e.createBlock(X._sfc_main,{key:`title_${N.value}`,config:{title:{cy:"wheel-title",...t.value.style.chart.title},subtitle:{cy:"wheel-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))])):e.createCommentVNode("",!0),t.value.userOptions.show&&P.value?(e.openBlock(),e.createBlock(L.UserOptions,{ref:"details",key:`user_options_${A.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(z),isImaging:e.unref(I),uid:$.value,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasFullscreen:t.value.userOptions.buttons.fullscreen,hasXls:!1,isFullscreen:_.value,titles:{...t.value.userOptions.buttonTitles},chartElement:B.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:w.value,onToggleFullscreen:R,onGeneratePdf:e.unref(O),onGenerateImage:e.unref(F),onToggleAnnotator:x},e.createSlots({_:2},[a.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,a.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionImg",{},void 0,!0)]),key:"1"}:void 0,a.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:r})=>[e.renderSlot(a.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:r})),void 0,!0)]),key:"2"}:void 0,a.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:o,isAnnotator:r})=>[e.renderSlot(a.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:o,isAnnotator:r})),void 0,!0)]),key:"3"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasFullscreen","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),P.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(c.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":_.value,"vue-data-ui-fulscreen--off":!_.value}),viewBox:`0 0 ${l.value.width} ${l.value.height}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(J._sfc_main),t.value.style.chart.layout.curved?(e.openBlock(),e.createElementBlock("g",te,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(q.value,(o,r)=>(e.openBlock(),e.createElementBlock("path",{d:o.curve,"stroke-width":i.value.mark,stroke:n.value>=r?o.color:t.value.style.chart.layout.inactiveColor,"stroke-linecap":"round",fill:"none",class:e.normalizeClass({"vue-ui-tick-animated":t.value.style.chart.animation.use&&r<=n.value})},null,10,ae))),256))])):(e.openBlock(),e.createElementBlock("g",oe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(q.value,(o,r)=>(e.openBlock(),e.createElementBlock("line",{x1:o.x1,y1:o.y1,x2:o.x2,y2:o.y2,"stroke-width":i.value.mark,stroke:n.value>=r?o.color:t.value.style.chart.layout.inactiveColor,"stroke-linecap":"round"},null,8,le))),256))])),t.value.style.chart.percentage.show?(e.openBlock(),e.createElementBlock("text",{key:2,x:g.value.x,y:g.value.y,"font-size":g.value.fontSize,fill:t.value.style.chart.layout.ticks.gradient.show&&t.value.style.chart.percentage.useGradientColor?e.unref(c.shiftHue)(t.value.style.chart.layout.activeColor,n.value/100*(t.value.style.chart.layout.ticks.gradient.shiftHueIntensity/100)):t.value.style.chart.percentage.color,"font-weight":g.value.bold?"bold":"normal","text-anchor":g.value.textAnchor},e.toDisplayString(e.unref(c.applyDataLabel)(t.value.style.chart.percentage.formatter,n.value,e.unref(c.dataLabel)({v:n.value,s:"%",r:t.value.style.chart.percentage.rounding}))),9,re)):e.createCommentVNode("",!0),e.renderSlot(a.$slots,"svg",{svg:l.value},void 0,!0)],14,ee)):e.createCommentVNode("",!0),a.$slots.watermark?(e.openBlock(),e.createElementBlock("div",ne,[e.renderSlot(a.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(z)||e.unref(I)})),void 0,!0)])):e.createCommentVNode("",!0),a.$slots.source?(e.openBlock(),e.createElementBlock("div",se,[e.renderSlot(a.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),P.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Y.default,{key:7,config:{type:"tiremarks",style:{backgroundColor:t.value.style.chart.backgroundColor,tiremarks:{color:"#CCCCCC"}}}},null,8,["config"]))],14,W))}},ie=Q._export_sfc(ue,[["__scopeId","data-v-93332410"]]);exports.default=ie;
|