vue-data-ui 2.10.3-beta.3 → 2.10.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/{Arrow-ClADeuRV.cjs → Arrow-D5FZABKM.cjs} +1 -1
- package/dist/{Arrow-CsFRQWgn.js → Arrow-rShoZLPF.js} +1 -1
- package/dist/{BaseIcon-DuZmhYGx.js → BaseIcon-DOAYHMqC.js} +1 -1
- package/dist/{BaseIcon-BZiTtIp-.cjs → BaseIcon-YEUagT3T.cjs} +1 -1
- package/dist/{ColorPicker-ajFBO-uj.cjs → ColorPicker-BvmBswSD.cjs} +1 -1
- package/dist/{ColorPicker-CWTWiV6N.js → ColorPicker-C2sp7L2o.js} +3 -3
- package/dist/{DataTable-D8vcDzp3.js → DataTable-BcZpw2Di.js} +2 -2
- package/dist/{DataTable-D8eve3Rv.cjs → DataTable-xRbw3M1w.cjs} +1 -1
- package/dist/{Legend-C-9Va34F.cjs → Legend-BgW2m6h5.cjs} +1 -1
- package/dist/{Legend-BXkorlVx.js → Legend-BkMSze3l.js} +2 -2
- package/dist/PackageVersion-DMBva7ES.cjs +1 -0
- package/dist/{PackageVersion-Cwa-KDYy.js → PackageVersion-DfvwvFMQ.js} +3 -3
- package/dist/{PenAndPaper-mD8Ft9s0.cjs → PenAndPaper-C4nRoDeG.cjs} +1 -1
- package/dist/{PenAndPaper-bYremuGq.js → PenAndPaper-Hpxqpf-9.js} +3 -3
- package/dist/{Shape-C-MjxBzW.cjs → Shape-Bo-gVwFn.cjs} +1 -1
- package/dist/{Shape-BKl_8fSs.js → Shape-DSzj99gT.js} +1 -1
- package/dist/{Slicer-D-8HCnPl.js → Slicer-DTzGSpQM.js} +2 -2
- package/dist/{Slicer-BbnCHEKM.cjs → Slicer-TTZu2wl_.cjs} +1 -1
- package/dist/{Title-g0Df2kQZ.cjs → Title-D5Q-MAw-.cjs} +1 -1
- package/dist/{Title-A3qdvX3g.js → Title-DmYM5yAv.js} +1 -1
- package/dist/{Tooltip-CzFLZsDA.cjs → Tooltip-BHaUk1Am.cjs} +1 -1
- package/dist/{Tooltip-C3RycjbN.js → Tooltip-jO3E09l_.js} +1 -1
- package/dist/documentation/installation.md +1 -1
- package/dist/{dom-to-png-BycXzYPI.js → dom-to-png-BXOrDSxu.js} +1 -1
- package/dist/{dom-to-png-CDJbBbow.cjs → dom-to-png-BvQvLpA3.cjs} +1 -1
- package/dist/{img-Daf6wWtq.cjs → img-BtrW_ClW.cjs} +1 -1
- package/dist/{img-BCG9afle.js → img-Buxs9IJl.js} +1 -1
- package/dist/{index-CLiv4lWF.cjs → index-C992Ntxe.cjs} +1 -1
- package/dist/{index-DO87eA2V.js → index-gaj0gmhW.js} +1 -1
- package/dist/{pdf-BO4SP770.cjs → pdf-Bk3zFpjP.cjs} +1 -1
- package/dist/{pdf-CUKGQwXz.js → pdf-U6PPEV5v.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/{useNestedProp-DWYmdrE5.cjs → useNestedProp-BItlw8tg.cjs} +1 -1
- package/dist/{useNestedProp-fOy4tvij.js → useNestedProp-R77oENB4.js} +1 -1
- package/dist/{usePrinter-BjvSt_Yu.js → usePrinter-BAF6jSop.js} +3 -3
- package/dist/{usePrinter-sfF-cTSO.cjs → usePrinter-C-PBqYFC.cjs} +1 -1
- package/dist/{vue-data-ui-BnXm4F7y.js → vue-data-ui-7sxceCOs.js} +62 -62
- package/dist/{vue-data-ui-BGjhB0IM.cjs → vue-data-ui-cxE28JIm.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-B_iIJS6A.js → vue-ui-3d-bar-DYgZ1gpv.js} +9 -9
- package/dist/{vue-ui-3d-bar-eQPQ37P9.cjs → vue-ui-3d-bar-WgsqJXq8.cjs} +1 -1
- package/dist/{vue-ui-accordion-DQ-y4bL8.cjs → vue-ui-accordion-DPRiCTQ4.cjs} +1 -1
- package/dist/{vue-ui-accordion-CMJOxHWq.js → vue-ui-accordion-DiPdvaEC.js} +3 -3
- package/dist/{vue-ui-age-pyramid-BKcb5h0_.cjs → vue-ui-age-pyramid-Bwb1ij77.cjs} +1 -1
- package/dist/{vue-ui-age-pyramid-DSelZbfg.js → vue-ui-age-pyramid-VH8hdgnJ.js} +10 -10
- package/dist/{vue-ui-annotator-BnfB4-1v.cjs → vue-ui-annotator-CDnvUWKy.cjs} +1 -1
- package/dist/{vue-ui-annotator-Ae8rLlRh.js → vue-ui-annotator-CH5MDZDG.js} +2 -2
- package/dist/{vue-ui-bullet-CV7t3yQK.js → vue-ui-bullet-DVd_q5Un.js} +8 -8
- package/dist/{vue-ui-bullet-D3wD3j73.cjs → vue-ui-bullet-Dd3zjxP1.cjs} +1 -1
- package/dist/{vue-ui-candlestick-ylYUQUkS.js → vue-ui-candlestick-CxP2KPB8.js} +11 -11
- package/dist/{vue-ui-candlestick-CP-TFhQo.cjs → vue-ui-candlestick-DlXoO49B.cjs} +1 -1
- package/dist/{vue-ui-carousel-table-B5FwZhGC.cjs → vue-ui-carousel-table-CNbutc12.cjs} +1 -1
- package/dist/{vue-ui-carousel-table-B8Yes-sQ.js → vue-ui-carousel-table-DOnU2A0U.js} +4 -4
- package/dist/{vue-ui-chestnut-De2g4Q2p.cjs → vue-ui-chestnut-DhqbQ1sS.cjs} +1 -1
- package/dist/{vue-ui-chestnut-DAskg0cX.js → vue-ui-chestnut-p9hkQsyK.js} +8 -8
- package/dist/{vue-ui-circle-pack-BlKPb01P.js → vue-ui-circle-pack---RzxPp6.js} +9 -9
- package/dist/{vue-ui-circle-pack-BRLoGdmB.cjs → vue-ui-circle-pack-B3W2Y1t8.cjs} +1 -1
- package/dist/{vue-ui-cursor-3vZlEDs4.cjs → vue-ui-cursor-5dWqpQFo.cjs} +1 -1
- package/dist/{vue-ui-cursor-Fw7eOKi1.js → vue-ui-cursor-CglmYKER.js} +2 -2
- package/dist/{vue-ui-dashboard-B_02OPVe.cjs → vue-ui-dashboard-BWOv55Rq.cjs} +1 -1
- package/dist/{vue-ui-dashboard-jeg6HmFh.js → vue-ui-dashboard-Dl0OuKWA.js} +62 -62
- package/dist/{vue-ui-digits-D9COqRtQ.cjs → vue-ui-digits-BOvznf5b.cjs} +1 -1
- package/dist/{vue-ui-digits-1inXKiGc.js → vue-ui-digits-JrJAbiv1.js} +2 -2
- package/dist/{vue-ui-donut-evolution-CwGD6UCG.js → vue-ui-donut-evolution-BeFnRUkD.js} +11 -11
- package/dist/{vue-ui-donut-evolution-t8NE1QRt.cjs → vue-ui-donut-evolution-C01vP_bJ.cjs} +1 -1
- package/dist/{vue-ui-donut-B4HiTFOD.js → vue-ui-donut-l56OERlb.js} +12 -12
- package/dist/{vue-ui-donut-snJ23_B8.cjs → vue-ui-donut-sN_2gTJP.cjs} +1 -1
- package/dist/{vue-ui-dumbbell-DdFlUsZF.js → vue-ui-dumbbell-6i03Kc-b.js} +10 -10
- package/dist/{vue-ui-dumbbell-BItso2iE.cjs → vue-ui-dumbbell-CUe41gOr.cjs} +1 -1
- package/dist/{vue-ui-flow-CR-74ZdV.js → vue-ui-flow-CbufmJJA.js} +9 -9
- package/dist/{vue-ui-flow-DZrVpkqa.cjs → vue-ui-flow-Ck5SOd1u.cjs} +1 -1
- package/dist/{vue-ui-funnel-P6dph9rO.cjs → vue-ui-funnel-GFfZuzKx.cjs} +1 -1
- package/dist/{vue-ui-funnel-C6Q9kDZj.js → vue-ui-funnel-hwI_EP3E.js} +9 -9
- package/dist/{vue-ui-galaxy-BzfQwtb7.cjs → vue-ui-galaxy-CZLFsZ-H.cjs} +1 -1
- package/dist/{vue-ui-galaxy-CRvj8ew8.js → vue-ui-galaxy-D53mRATC.js} +11 -11
- package/dist/{vue-ui-gauge-CrrDIYlt.js → vue-ui-gauge-CGYibwq2.js} +7 -7
- package/dist/{vue-ui-gauge-BOmHo3_2.cjs → vue-ui-gauge-DQkS_KRm.cjs} +1 -1
- package/dist/{vue-ui-gizmo-CdBHJhKH.cjs → vue-ui-gizmo-BjqQd4dy.cjs} +1 -1
- package/dist/{vue-ui-gizmo-BjKqctlX.js → vue-ui-gizmo-DSackCMx.js} +3 -3
- package/dist/vue-ui-heatmap-C0A7hdO3.cjs +1 -0
- package/dist/{vue-ui-heatmap-DQZsO55U.js → vue-ui-heatmap-dP-JR5__.js} +195 -190
- package/dist/{vue-ui-history-plot-BwmxWdM2.cjs → vue-ui-history-plot-CiGA7yW6.cjs} +1 -1
- package/dist/{vue-ui-history-plot-DR6KcO-n.js → vue-ui-history-plot-tmASFo_J.js} +11 -11
- package/dist/{vue-ui-kpi-CL1YEty9.cjs → vue-ui-kpi-CIs7-KON.cjs} +1 -1
- package/dist/{vue-ui-kpi-DPbpUZ9S.js → vue-ui-kpi-DRvyo41m.js} +3 -3
- package/dist/{vue-ui-mini-loader-DH6ZNRTg.js → vue-ui-mini-loader-DG07RzCx.js} +2 -2
- package/dist/{vue-ui-mini-loader-sEeyMkrd.cjs → vue-ui-mini-loader-DWqpp3i2.cjs} +1 -1
- package/dist/{vue-ui-molecule-CRnMyuuZ.cjs → vue-ui-molecule-Du_Xk6K3.cjs} +1 -1
- package/dist/{vue-ui-molecule-DLK2q-Oq.js → vue-ui-molecule-Tfp48uxj.js} +11 -11
- package/dist/{vue-ui-mood-radar-W5IVToCL.js → vue-ui-mood-radar-Bk9g5Nb7.js} +11 -11
- package/dist/{vue-ui-mood-radar-lnAFfrjE.cjs → vue-ui-mood-radar-HHIsYVgB.cjs} +1 -1
- package/dist/{vue-ui-nested-donuts-DtgPU-KX.js → vue-ui-nested-donuts-C4bZMsu7.js} +11 -11
- package/dist/{vue-ui-nested-donuts-CeuU6oEJ.cjs → vue-ui-nested-donuts-CmPyTnt9.cjs} +1 -1
- package/dist/{vue-ui-onion-BeNPgG7G.js → vue-ui-onion-B4sfUuJR.js} +11 -11
- package/dist/{vue-ui-onion-WwdP8EpV.cjs → vue-ui-onion-CAJFRvBG.cjs} +1 -1
- package/dist/{vue-ui-parallel-coordinate-plot-Cv68PCn5.cjs → vue-ui-parallel-coordinate-plot-DWjcM8x6.cjs} +1 -1
- package/dist/{vue-ui-parallel-coordinate-plot-Ck3SJsIG.js → vue-ui-parallel-coordinate-plot-PoPTvKXt.js} +12 -12
- package/dist/{vue-ui-quadrant-DZ6ybcaY.cjs → vue-ui-quadrant-DNVWkP6Q.cjs} +1 -1
- package/dist/{vue-ui-quadrant-CMkw88lO.js → vue-ui-quadrant-DyWGltEe.js} +12 -12
- package/dist/{vue-ui-quick-chart-Cl6gJp5T.js → vue-ui-quick-chart-DpFle9Th.js} +9 -9
- package/dist/{vue-ui-quick-chart-DJa7vHnr.cjs → vue-ui-quick-chart-jrs7sM-L.cjs} +1 -1
- package/dist/{vue-ui-radar-DJQ9V5u3.cjs → vue-ui-radar-DlJcEKBT.cjs} +1 -1
- package/dist/{vue-ui-radar-D18-CVYt.js → vue-ui-radar-uGd1724l.js} +12 -12
- package/dist/{vue-ui-rating-DJ8riM4Y.cjs → vue-ui-rating-DyT2cuTa.cjs} +1 -1
- package/dist/{vue-ui-rating-4aeU2wx4.js → vue-ui-rating-zlL_fohp.js} +2 -2
- package/dist/{vue-ui-relation-circle-D5fbkhA5.js → vue-ui-relation-circle-BSJWSSj3.js} +7 -7
- package/dist/{vue-ui-relation-circle-CNmTYbJn.cjs → vue-ui-relation-circle-C_mwuWBA.cjs} +1 -1
- package/dist/{vue-ui-ridgeline-DcP5wra6.cjs → vue-ui-ridgeline-Itzed46M.cjs} +1 -1
- package/dist/{vue-ui-ridgeline-DYu8Ye38.js → vue-ui-ridgeline-huB4GUmG.js} +12 -12
- package/dist/{vue-ui-rings-BVR1q--q.js → vue-ui-rings-DdxMJYrC.js} +12 -12
- package/dist/{vue-ui-rings-CLex25i0.cjs → vue-ui-rings-OmEU3StJ.cjs} +1 -1
- package/dist/{vue-ui-scatter-1nnDmU8p.js → vue-ui-scatter-BMr3eo6N.js} +12 -12
- package/dist/{vue-ui-scatter-CSsBerNk.cjs → vue-ui-scatter-vvzbobaJ.cjs} +1 -1
- package/dist/{vue-ui-skeleton-3odYNTi5.cjs → vue-ui-skeleton-DO7G5Y5g.cjs} +1 -1
- package/dist/{vue-ui-skeleton-BTg31tSs.js → vue-ui-skeleton-JA0W8tXn.js} +3 -3
- package/dist/{vue-ui-smiley-DAbOc9Sm.cjs → vue-ui-smiley-BO0MFGFu.cjs} +1 -1
- package/dist/{vue-ui-smiley-BIzjWlLm.js → vue-ui-smiley-CIw8667G.js} +2 -2
- package/dist/{vue-ui-spark-trend-CFYnfyEb.js → vue-ui-spark-trend-C1DXyadL.js} +5 -5
- package/dist/{vue-ui-spark-trend-CRKk0fMc.cjs → vue-ui-spark-trend-CuQH76Jo.cjs} +1 -1
- package/dist/{vue-ui-sparkbar-V1FyDpDn.js → vue-ui-sparkbar-BmhE-99J.js} +4 -4
- package/dist/{vue-ui-sparkbar-CCZDQYle.cjs → vue-ui-sparkbar-kvbWgfWC.cjs} +1 -1
- package/dist/{vue-ui-sparkgauge-CrirH2LX.cjs → vue-ui-sparkgauge-BbxVytfF.cjs} +1 -1
- package/dist/{vue-ui-sparkgauge-MgywKNqC.js → vue-ui-sparkgauge-CYJpGB9W.js} +4 -4
- package/dist/{vue-ui-sparkhistogram-U__aSGYT.cjs → vue-ui-sparkhistogram-DPwQshte.cjs} +1 -1
- package/dist/{vue-ui-sparkhistogram-CwBviGI7.js → vue-ui-sparkhistogram-jt13-xyA.js} +5 -5
- package/dist/{vue-ui-sparkline-BHiVgcfL.cjs → vue-ui-sparkline-DzFmdpXy.cjs} +1 -1
- package/dist/{vue-ui-sparkline-D3v5ydDD.js → vue-ui-sparkline-EaNvjpb9.js} +4 -4
- package/dist/{vue-ui-sparkstackbar-BrBQ2Vby.cjs → vue-ui-sparkstackbar-BIfIWVD6.cjs} +1 -1
- package/dist/{vue-ui-sparkstackbar--tnnBrOu.js → vue-ui-sparkstackbar-D20-H_RH.js} +5 -5
- package/dist/{vue-ui-stackbar-D7htqdCz.cjs → vue-ui-stackbar-BlQFS50f.cjs} +1 -1
- package/dist/{vue-ui-stackbar-C-dJRiXT.js → vue-ui-stackbar-IfVjvxly.js} +13 -13
- package/dist/{vue-ui-strip-plot-B-Mc-qGK.js → vue-ui-strip-plot-C0JJwLZs.js} +11 -11
- package/dist/{vue-ui-strip-plot-hNrBW3SU.cjs → vue-ui-strip-plot-Cj7pyIjv.cjs} +1 -1
- package/dist/{vue-ui-table-ByDKzqNM.cjs → vue-ui-table-DtRcQV5j.cjs} +1 -1
- package/dist/{vue-ui-table-CQp16PNe.js → vue-ui-table-Dv15sJ0a.js} +3 -3
- package/dist/{vue-ui-table-heatmap-BNl4iQhq.js → vue-ui-table-heatmap-2yiRD9Ye.js} +4 -4
- package/dist/{vue-ui-table-heatmap-DaEPU0kc.cjs → vue-ui-table-heatmap-BPbQGrNC.cjs} +1 -1
- package/dist/{vue-ui-table-sparkline-lTHfuO-u.js → vue-ui-table-sparkline-DLmFiLHF.js} +5 -5
- package/dist/{vue-ui-table-sparkline-BgV9zEpQ.cjs → vue-ui-table-sparkline-DYRqyIVx.cjs} +1 -1
- package/dist/{vue-ui-thermometer-BN6Hyr3r.js → vue-ui-thermometer-DLCjJe6v.js} +7 -7
- package/dist/{vue-ui-thermometer-HB6BdSZ7.cjs → vue-ui-thermometer-gL74aWA3.cjs} +1 -1
- package/dist/{vue-ui-timer-6NZga1VA.cjs → vue-ui-timer-BIk_79G3.cjs} +1 -1
- package/dist/{vue-ui-timer-DpIbKhWx.js → vue-ui-timer-C7-qvY5L.js} +5 -5
- package/dist/{vue-ui-tiremarks-Bssfpj2T.cjs → vue-ui-tiremarks-1_fqbLdG.cjs} +1 -1
- package/dist/{vue-ui-tiremarks-BDlFLwmy.js → vue-ui-tiremarks-BxAQR-XE.js} +7 -7
- package/dist/{vue-ui-treemap-CSEqsnF6.js → vue-ui-treemap-DQD2Xuuh.js} +12 -12
- package/dist/{vue-ui-treemap-X9VKUYSw.cjs → vue-ui-treemap-DRyEb-BU.cjs} +1 -1
- package/dist/{vue-ui-vertical-bar-Bv35bg1C.cjs → vue-ui-vertical-bar-BJel3_6V.cjs} +1 -1
- package/dist/{vue-ui-vertical-bar-SgM2OnqX.js → vue-ui-vertical-bar-BaIRmMNm.js} +12 -12
- package/dist/{vue-ui-waffle-C1L34KiX.cjs → vue-ui-waffle-DeOPUPQx.cjs} +1 -1
- package/dist/{vue-ui-waffle-CPwuaVId.js → vue-ui-waffle-DkvyTGgQ.js} +12 -12
- package/dist/{vue-ui-wheel-D2HqXb2O.cjs → vue-ui-wheel-CG5T2hIG.cjs} +1 -1
- package/dist/{vue-ui-wheel-DbNXTA9I.js → vue-ui-wheel-YF9GWFaZ.js} +7 -7
- package/dist/{vue-ui-word-cloud-Cmm3wp39.cjs → vue-ui-word-cloud-BuZu35M3.cjs} +1 -1
- package/dist/{vue-ui-word-cloud-B7VTWsl2.js → vue-ui-word-cloud-_D3SXGDc.js} +10 -10
- package/dist/{vue-ui-world-51vUWrqr.js → vue-ui-world-DZED00QY.js} +11 -11
- package/dist/{vue-ui-world-Bi32aYtK.cjs → vue-ui-world-Dfe3q7_e.cjs} +1 -1
- package/dist/{vue-ui-xy-BxJgh4xL.cjs → vue-ui-xy-BWkU6RgD.cjs} +2 -2
- package/dist/{vue-ui-xy-canvas-DsZxaeOo.js → vue-ui-xy-canvas-CQaxl6Cr.js} +12 -12
- package/dist/{vue-ui-xy-canvas-DbS90DFy.cjs → vue-ui-xy-canvas-OMHgq4d8.cjs} +1 -1
- package/dist/{vue-ui-xy-D1O0m03x.js → vue-ui-xy-g8d2AKdu.js} +16 -16
- package/package.json +1 -1
- package/dist/PackageVersion-B6hD3Tku.cjs +0 -1
- package/dist/vue-ui-heatmap-CfeV2PVZ.cjs +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a4 as z, A as P, l as T, r as U, f as V, h as X, q as j, z as Y, d as W, G as J, u as K, p as Z } from "./index-
|
|
2
|
-
import q from "./vue-ui-xy-
|
|
3
|
-
import Q from "./vue-ui-donut-
|
|
1
|
+
import { a4 as z, A as P, l as T, r as U, f as V, h as X, q as j, z as Y, d as W, G as J, u as K, p as Z } from "./index-gaj0gmhW.js";
|
|
2
|
+
import q from "./vue-ui-xy-g8d2AKdu.js";
|
|
3
|
+
import Q from "./vue-ui-donut-l56OERlb.js";
|
|
4
4
|
import { resolveComponent as x, createElementBlock as u, openBlock as c, normalizeStyle as g, createElementVNode as a, createCommentVNode as b, toDisplayString as d, Fragment as I, renderList as _, normalizeClass as p, createTextVNode as w, withDirectives as O, vModelText as S, withKeys as L, withModifiers as A, vModelSelect as $, createBlock as E, createVNode as ee } from "vue";
|
|
5
5
|
import { _ as te } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
6
6
|
const se = {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { useCssVars as te, computed as v, ref as h, useSlots as ae, onMounted as z, watch as oe, createElementBlock as l, openBlock as n, unref as u, normalizeClass as E, normalizeStyle as C, createBlock as se, createCommentVNode as c, createElementVNode as g, createSlots as ne, withCtx as b, renderSlot as r, normalizeProps as G, guardReactiveProps as B, Fragment as k, renderList as w, mergeProps as f, createVNode as le, nextTick as re } from "vue";
|
|
2
|
-
import { u as ue, c as H, a as ie, o as de, e as pe, a5 as ve, G as ce, N as me, q as fe, r as he } from "./index-
|
|
3
|
-
import { u as A } from "./useNestedProp-
|
|
4
|
-
import { u as ge, U as be } from "./usePrinter-
|
|
5
|
-
import { _ as ye } from "./Shape-
|
|
2
|
+
import { u as ue, c as H, a as ie, o as de, e as pe, a5 as ve, G as ce, N as me, q as fe, r as he } from "./index-gaj0gmhW.js";
|
|
3
|
+
import { u as A } from "./useNestedProp-R77oENB4.js";
|
|
4
|
+
import { u as ge, U as be } from "./usePrinter-BAF6jSop.js";
|
|
5
|
+
import { _ as ye } from "./Shape-DSzj99gT.js";
|
|
6
6
|
import { u as Ce } from "./useUserOptionState-BIvW1Kz7.js";
|
|
7
7
|
import { _ as ke } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
8
8
|
const _e = ["id"], Ie = { role: "cell" }, $e = { role: "row" }, we = ["data-cell"], Oe = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),a=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),a=require("./index-C992Ntxe.cjs"),$=require("./useNestedProp-BItlw8tg.cjs"),w=require("./usePrinter-C-PBqYFC.cjs"),q=require("./Shape-Bo-gVwFn.cjs"),G=require("./useUserOptionState-BgepsfED.cjs"),H=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),L=["id"],A={role:"cell"},D={role:"row"},X=["data-cell"],W={key:0,style:{display:"flex","flex-direction":"row",gap:"2px","align-items":"center"}},J=["height","width"],K={key:0,role:"cell","data-cell":"sum"},Q={key:1,role:"cell","data-cell":"average"},Y={key:2,role:"cell","data-cell":"median"},Z={key:1,ref:"source",dir:"auto"},j={__name:"vue-ui-table-heatmap",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(P,{expose:N}){e.useCssVars(t=>({"1e8210e3":T.value,"7fb93384":R.value}));const{vue_ui_table_heatmap:E}=a.useConfig(),d=P,p=e.ref(a.createUid()),s=e.ref(!1),c=e.ref(null),m=e.ref(!1),f=e.ref(0),V=e.useSlots();e.onMounted(()=>{V["chart-background"]&&console.warn("VueUiTableHeatmap does not support the #chart-background slot.")});const o=e.computed({get:()=>y(),set:t=>t}),{userOptionsVisible:v,setUserOptionsVisibility:g,keepUserOptionState:h}=G.useUserOptionState({config:o.value});function y(){const t=$.useNestedProp({userConfig:d.config,defaultConfig:E});return t.theme?{...$.useNestedProp({userConfig:a.themes.vue_ui_table_heatmap[t.theme]||d.config,defaultConfig:t})}:t}e.watch(()=>d.config,t=>{o.value=y(),v.value=!o.value.userOptions.showOnChartHover,C()},{deep:!0});const{isPrinting:O,isImaging:x,generatePdf:k,generateImage:b}=w.usePrinter({elementId:`table_heatmap_${p.value}`,fileName:"vue-ui-table-heatmap",options:o.value.userOptions.print}),F=e.computed(()=>o.value.table.responsiveBreakpoint),z=e.computed(()=>!!d.dataset&&d.dataset.length);e.onMounted(()=>{C()});function C(){a.objectIsEmpty(d.dataset)&&a.error({componentName:"VueUiTableHeatmap",type:"dataset"});const t=new ResizeObserver(r=>{r.forEach(n=>{s.value=n.contentRect.width<F.value})});c.value&&t.observe(c.value)}const _=e.computed(()=>d.dataset.map(t=>{const r=t.values.map(l=>isNaN(l)?0:l),n=r.reduce((l,i)=>l+i,0);return{...t,values:r,serieExtremes:{max:Math.max(...r),min:Math.min(...r)},sum:n,average:n/r.length,median:a.calcMedian(r),displayValues:[t.name,...t.values],id:a.createUid()}})),B=e.computed(()=>{const t=_.value.flatMap(r=>r.values);return{min:Math.min(...t),max:Math.max(...t)}});function M(t,r){const n=o.value.style.heatmapColors.useIndividualScale;return a.interpolateColorHex(o.value.style.heatmapColors.min,o.value.style.heatmapColors.max,n?r.min:B.value.min,n?r.max:B.value.max,t)}const I=e.computed(()=>_.value.map(t=>({...t,colors:t.displayValues.map(r=>isNaN(r)?o.value.style.backgroundColor:M(r,t.serieExtremes))}))),R=e.computed(()=>o.value.style.backgroundColor),T=e.computed(()=>`${o.value.table.borderWidth}px`);function S(){e.nextTick(()=>{const t=I.value.map(l=>[[l.name],l.displayValues,[l.sum],[l.average],[l.median]]),r=[[[""],o.value.table.head.values,["sum"],["average"],["median"]]].concat(t),n=a.createCsvContent(r);a.downloadCsv({csvContent:n,title:"vue-ui-table-heatmap"})})}function U(t){m.value=t,f.value+=1}return N({generatePdf:k,generateCsv:S,generateImage:b}),(t,r)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"tableContainer",ref:c,style:e.normalizeStyle(`width:100%; overflow-x:auto; container-type: inline-size;padding-top:${o.value.userOptions.show?"36px":""}; ${m.value?"vue-data-ui-wrapper-fullscreen":""}; position:relative;`),class:e.normalizeClass({"vue-ui-responsive":s.value}),id:`table_heatmap_${p.value}`,onMouseenter:r[0]||(r[0]=()=>e.unref(g)(!0)),onMouseleave:r[1]||(r[1]=()=>e.unref(g)(!1))},[o.value.userOptions.show&&z.value&&(e.unref(h)||e.unref(v))?(e.openBlock(),e.createBlock(w.UserOptions,{ref:"details",key:`user_option_${f.value}`,backgroundColor:o.value.style.backgroundColor,color:o.value.style.color,isPrinting:e.unref(O),isImaging:e.unref(x),uid:p.value,hasPdf:o.value.userOptions.buttons.pdf,hasXls:o.value.userOptions.buttons.csv,hasImg:o.value.userOptions.buttons.img,hasFullscreen:o.value.userOptions.buttons.fullscreen,isFullscreen:m.value,titles:{...o.value.userOptions.buttonTitles},chartElement:c.value,position:o.value.userOptions.position,onToggleFullscreen:U,onGeneratePdf:e.unref(k),onGenerateCsv:S,onGenerateImage:e.unref(b),style:e.normalizeStyle({visibility:e.unref(h)?e.unref(v)?"visible":"hidden":"visible"})},e.createSlots({_:2},[t.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:n,color:l})=>[e.renderSlot(t.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:n,color:l})),void 0,!0)]),key:"0"}:void 0,t.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,t.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,t.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,t.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:n,isFullscreen:l})=>[e.renderSlot(t.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:n,isFullscreen:l})),void 0,!0)]),key:"4"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasXls","hasImg","hasFullscreen","isFullscreen","titles","chartElement","position","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),e.createElementVNode("table",{class:e.normalizeClass({"vue-ui-table-heatmap":!0}),style:e.normalizeStyle(`width:100%;font-family:${o.value.style.fontFamily};background:${o.value.style.backgroundColor};`)},[e.createElementVNode("caption",null,[e.renderSlot(t.$slots,"caption",{},void 0,!0)]),e.createElementVNode("thead",null,[e.createElementVNode("tr",{role:"row",style:e.normalizeStyle(`background:${o.value.table.head.backgroundColor};color:${o.value.table.head.color}`)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value.table.head.values,(n,l)=>(e.openBlock(),e.createElementBlock("th",A,[e.renderSlot(t.$slots,"head",e.mergeProps({ref_for:!0},{value:n,rowIndex:l,type:typeof n,isResponsive:s.value}),void 0,!0)]))),256))],4)]),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(I.value,(n,l)=>(e.openBlock(),e.createElementBlock("tr",D,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.displayValues,(i,u)=>(e.openBlock(),e.createElementBlock("td",{role:"cell","data-cell":o.value.table.head.values[u]},[n.color&&u===0?(e.openBlock(),e.createElementBlock("div",W,[n.color?(e.openBlock(),e.createElementBlock("svg",{key:0,height:o.value.style.shapeSize,width:o.value.style.shapeSize,viewBox:"0 0 20 20",style:{background:"none",overflow:"visible"}},[e.createVNode(q._sfc_main,{plot:{x:10,y:10},color:n.color,radius:9,shape:n.shape||"circle"},null,8,["color","shape"])],8,J)):e.createCommentVNode("",!0),e.renderSlot(t.$slots,"rowTitle",e.mergeProps({ref_for:!0},{value:i,rowIndex:l,colIndex:u,type:typeof i,isResponsive:s.value}),void 0,!0)])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[u===0?e.renderSlot(t.$slots,"rowTitle",e.mergeProps({key:0,ref_for:!0},{value:i,rowIndex:l,colIndex:u,type:typeof i,isResponsive:s.value}),void 0,!0):e.createCommentVNode("",!0),u>0?e.renderSlot(t.$slots,"cell",e.mergeProps({key:1,ref_for:!0},{value:i,rowIndex:l,colIndex:u,type:typeof i,isResponsive:s.value,color:n.colors[u],textColor:e.unref(a.adaptColorToBackground)(n.colors[u])}),void 0,!0):e.createCommentVNode("",!0)],64))],8,X))),256)),o.value.table.showSum?(e.openBlock(),e.createElementBlock("td",K,[e.renderSlot(t.$slots,"sum",e.mergeProps({ref_for:!0},{value:n.sum,rowIndex:l,isResponsive:s.value}),void 0,!0)])):e.createCommentVNode("",!0),o.value.table.showAverage?(e.openBlock(),e.createElementBlock("td",Q,[e.renderSlot(t.$slots,"average",e.mergeProps({ref_for:!0},{value:n.average,rowIndex:l,isResponsive:s.value}),void 0,!0)])):e.createCommentVNode("",!0),o.value.table.showMedian?(e.openBlock(),e.createElementBlock("td",Y,[e.renderSlot(t.$slots,"median",e.mergeProps({ref_for:!0},{value:n.median,rowIndex:l,isResponsive:s.value}),void 0,!0)])):e.createCommentVNode("",!0)]))),256))])],4),t.$slots.source?(e.openBlock(),e.createElementBlock("div",Z,[e.renderSlot(t.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0)],46,L))}},ee=H._export_sfc(j,[["__scopeId","data-v-dd493d6a"]]);exports.default=ee;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { useCssVars as ze, ref as p, useSlots as De, onMounted as pe, computed as _, watch as fe, createElementBlock as c, openBlock as d, unref as i, normalizeClass as X, createCommentVNode as g, createElementVNode as f, normalizeStyle as s, toDisplayString as C, withDirectives as Pe, createVNode as z, Fragment as J, renderList as K, createBlock as Ne, createSlots as Fe, withCtx as D, renderSlot as A, mergeProps as me, nextTick as Ve } from "vue";
|
|
2
|
-
import { u as Te, c as We, t as Me, p as F, a as Ee, b as Ue, o as Be, e as be, g as Ge, a5 as Le, d as Re, i as V, f as T, q as He, r as qe } from "./index-
|
|
3
|
-
import { u as ge } from "./useNestedProp-
|
|
4
|
-
import Xe from "./vue-ui-sparkline-
|
|
5
|
-
import W from "./BaseIcon-
|
|
6
|
-
import { u as Je, U as Ke, v as Qe } from "./usePrinter-
|
|
2
|
+
import { u as Te, c as We, t as Me, p as F, a as Ee, b as Ue, o as Be, e as be, g as Ge, a5 as Le, d as Re, i as V, f as T, q as He, r as qe } from "./index-gaj0gmhW.js";
|
|
3
|
+
import { u as ge } from "./useNestedProp-R77oENB4.js";
|
|
4
|
+
import Xe from "./vue-ui-sparkline-EaNvjpb9.js";
|
|
5
|
+
import W from "./BaseIcon-DOAYHMqC.js";
|
|
6
|
+
import { u as Je, U as Ke, v as Qe } from "./usePrinter-BAF6jSop.js";
|
|
7
7
|
import { u as Ye } from "./useUserOptionState-BIvW1Kz7.js";
|
|
8
8
|
import { _ as Ze } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
9
9
|
const je = ["id"], et = { style: { "z-index": "1", "padding-right": "24px" } }, tt = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-CLiv4lWF.cjs"),Y=require("./useNestedProp-DWYmdrE5.cjs"),ce=require("./vue-ui-sparkline-BHiVgcfL.cjs"),x=require("./BaseIcon-BZiTtIp-.cjs"),D=require("./usePrinter-sfF-cTSO.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}){e.useCssVars(l=>({"8765d8b0":l.tdo}));const{vue_ui_table_sparkline:te}=s.useConfig(),y=Z,w=e.ref(s.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:s.themes.vue_ui_table_sparkline[l.theme]||y.config,defaultConfig:l}),customPalette:s.themePalettes[l.theme]||s.palette}:l}e.watch(()=>y.config,l=>{t.value=T(),V.value=!t.value.userOptions.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",options:t.value.userOptions.print}),ae=e.computed(()=>s.convertCustomPalette(t.value.customPalette)),C=e.ref(null),I=e.ref(!1),oe=e.computed(()=>t.value.responsiveBreakpoint);e.onMounted(()=>{q()});const B=e.ref(t.value.colNames);function q(){s.objectIsEmpty(y.dataset)&&s.error({componentName:"VueUiTableSparkline",type:"dataset"});const l=new ResizeObserver(o=>{o.forEach(a=>{I.value=a.contentRect.width<oe.value})});C.value&&l.observe(C.value),B.value=[];for(let o=0;o<R.value;o+=1)B.value.push(t.value.colNames[o]||`col ${o}`)}const G=e.computed(()=>(y.dataset.forEach((l,o)=>{s.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","values"]}).forEach(a=>{s.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),u=n/a.length,r=s.calcMedian(a);return{...l,values:l.values||[],color:s.convertColorToHex(l.color)||ae.value[o]||s.palette[o]||s.palette[o%s.palette.length],sum:n,average:u,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((u,r)=>l.map(d=>d.values[r]||[])).map(u=>u.map((r,d)=>[r,d]).sort((r,d)=>d[0]-r[0]).map(r=>r[1]));return l.map((u,r)=>({...u,values:u.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))),E=e.ref(void 0),A=e.ref(!1),v=e.ref(void 0),H=e.ref(1);function k(){A.value=!1,v.value=void 0,p.value=void 0,H.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]||[]),u=a;S.value[o].state=u,H.value=u,o===E.value?E.value=void 0:E.value=o;const d=n.map((i,m)=>[m,i]).sort((i,m)=>u*(m[1]-i[1])).map(i=>i[0]).map(i=>h.value[i]);c.value=d,N.value+=1}const R=e.computed(()=>Math.max(...y.dataset.map(l=>(l.values||[]).length))),f=e.computed(()=>{let l=B.value.map(a=>({type:"reg",value:a}));if(!l.length)for(let a=0;a<R.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],u=[...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=u}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]&&!I.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((u,r)=>[[u.name],u.values,[u.sum],[u.average],[u.median]]),a=[l].concat(o),n=s.createCsvContent(a);s.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-table-sparkline":!0,"vue-ui-responsive":I.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",{class:"atom-title",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,class:"atom-subtitle",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.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:u,color:r})=>[e.renderSlot(l.$slots,"menuIcon",e.mergeProps({ref_for:!0},{isOpen:u,color:r}),void 0,!0)]),key:"0"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:u,isFullscreen:r})=>[e.renderSlot(l.$slots,"optionFullscreen",e.mergeProps({ref_for:!0},{toggleFullscreen:u,isFullscreen:r}),void 0,!0)]),key:"4"}: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,(u,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(s.applyDataLabel)(t.value.formatter,Number(a.values[r]),e.unref(s.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(s.applyDataLabel)(t.value.formatter,a.sum,e.unref(s.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(s.applyDataLabel)(t.value.formatter,a.average,e.unref(s.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(s.applyDataLabel)(t.value.formatter,a.median,e.unref(s.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:u})=>se({dataIndex:u,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-6ebcec2e"]]);exports.default=Ve;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-C992Ntxe.cjs"),Y=require("./useNestedProp-BItlw8tg.cjs"),ce=require("./vue-ui-sparkline-DzFmdpXy.cjs"),x=require("./BaseIcon-YEUagT3T.cjs"),D=require("./usePrinter-C-PBqYFC.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}){e.useCssVars(l=>({"8765d8b0":l.tdo}));const{vue_ui_table_sparkline:te}=s.useConfig(),y=Z,w=e.ref(s.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:s.themes.vue_ui_table_sparkline[l.theme]||y.config,defaultConfig:l}),customPalette:s.themePalettes[l.theme]||s.palette}:l}e.watch(()=>y.config,l=>{t.value=T(),V.value=!t.value.userOptions.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",options:t.value.userOptions.print}),ae=e.computed(()=>s.convertCustomPalette(t.value.customPalette)),C=e.ref(null),I=e.ref(!1),oe=e.computed(()=>t.value.responsiveBreakpoint);e.onMounted(()=>{q()});const B=e.ref(t.value.colNames);function q(){s.objectIsEmpty(y.dataset)&&s.error({componentName:"VueUiTableSparkline",type:"dataset"});const l=new ResizeObserver(o=>{o.forEach(a=>{I.value=a.contentRect.width<oe.value})});C.value&&l.observe(C.value),B.value=[];for(let o=0;o<R.value;o+=1)B.value.push(t.value.colNames[o]||`col ${o}`)}const G=e.computed(()=>(y.dataset.forEach((l,o)=>{s.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","values"]}).forEach(a=>{s.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),u=n/a.length,r=s.calcMedian(a);return{...l,values:l.values||[],color:s.convertColorToHex(l.color)||ae.value[o]||s.palette[o]||s.palette[o%s.palette.length],sum:n,average:u,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((u,r)=>l.map(d=>d.values[r]||[])).map(u=>u.map((r,d)=>[r,d]).sort((r,d)=>d[0]-r[0]).map(r=>r[1]));return l.map((u,r)=>({...u,values:u.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))),E=e.ref(void 0),A=e.ref(!1),v=e.ref(void 0),H=e.ref(1);function k(){A.value=!1,v.value=void 0,p.value=void 0,H.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]||[]),u=a;S.value[o].state=u,H.value=u,o===E.value?E.value=void 0:E.value=o;const d=n.map((i,m)=>[m,i]).sort((i,m)=>u*(m[1]-i[1])).map(i=>i[0]).map(i=>h.value[i]);c.value=d,N.value+=1}const R=e.computed(()=>Math.max(...y.dataset.map(l=>(l.values||[]).length))),f=e.computed(()=>{let l=B.value.map(a=>({type:"reg",value:a}));if(!l.length)for(let a=0;a<R.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],u=[...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=u}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]&&!I.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((u,r)=>[[u.name],u.values,[u.sum],[u.average],[u.median]]),a=[l].concat(o),n=s.createCsvContent(a);s.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-table-sparkline":!0,"vue-ui-responsive":I.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",{class:"atom-title",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,class:"atom-subtitle",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.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:u,color:r})=>[e.renderSlot(l.$slots,"menuIcon",e.mergeProps({ref_for:!0},{isOpen:u,color:r}),void 0,!0)]),key:"0"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:u,isFullscreen:r})=>[e.renderSlot(l.$slots,"optionFullscreen",e.mergeProps({ref_for:!0},{toggleFullscreen:u,isFullscreen:r}),void 0,!0)]),key:"4"}: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,(u,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(s.applyDataLabel)(t.value.formatter,Number(a.values[r]),e.unref(s.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(s.applyDataLabel)(t.value.formatter,a.sum,e.unref(s.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(s.applyDataLabel)(t.value.formatter,a.average,e.unref(s.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(s.applyDataLabel)(t.value.formatter,a.median,e.unref(s.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:u})=>se({dataIndex:u,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-6ebcec2e"]]);exports.default=Ve;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { useCssVars as ke, computed as d, onMounted as be, ref as m, watch as _e, createElementBlock as u, openBlock as l, unref as h, normalizeStyle as te, normalizeClass as I, createBlock as O, createCommentVNode as i, createSlots as xe, withCtx as _, renderSlot as f, normalizeProps as P, guardReactiveProps as A, createVNode as we, createElementVNode as v, Fragment as M, renderList as se, toDisplayString as Ce } from "vue";
|
|
2
|
-
import { u as $e, o as Fe, e as oe, g as Ie, c as Oe, t as Pe, p as x, a as Ae, b as Me, v as g, d as U, X as Ue, s as Ye, i as Ne, f as Se } from "./index-
|
|
3
|
-
import { _ as Te } from "./Title-
|
|
4
|
-
import { u as qe, U as Le } from "./usePrinter-
|
|
5
|
-
import Ve from "./vue-ui-skeleton-
|
|
6
|
-
import { u as le } from "./useNestedProp-
|
|
7
|
-
import { _ as Ee } from "./PackageVersion-
|
|
8
|
-
import { _ as Ge } from "./PenAndPaper-
|
|
2
|
+
import { u as $e, o as Fe, e as oe, g as Ie, c as Oe, t as Pe, p as x, a as Ae, b as Me, v as g, d as U, X as Ue, s as Ye, i as Ne, f as Se } from "./index-gaj0gmhW.js";
|
|
3
|
+
import { _ as Te } from "./Title-DmYM5yAv.js";
|
|
4
|
+
import { u as qe, U as Le } from "./usePrinter-BAF6jSop.js";
|
|
5
|
+
import Ve from "./vue-ui-skeleton-JA0W8tXn.js";
|
|
6
|
+
import { u as le } from "./useNestedProp-R77oENB4.js";
|
|
7
|
+
import { _ as Ee } from "./PackageVersion-DfvwvFMQ.js";
|
|
8
|
+
import { _ as Ge } from "./PenAndPaper-Hpxqpf-9.js";
|
|
9
9
|
import { u as We } from "./useUserOptionState-BIvW1Kz7.js";
|
|
10
10
|
import { u as je } from "./useChartAccessibility-BWojgys7.js";
|
|
11
11
|
import { _ as ze } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),a=require("./index-CLiv4lWF.cjs"),oe=require("./Title-g0Df2kQZ.cjs"),Y=require("./usePrinter-sfF-cTSO.cjs"),re=require("./vue-ui-skeleton-3odYNTi5.cjs"),z=require("./useNestedProp-DWYmdrE5.cjs"),le=require("./PackageVersion-B6hD3Tku.cjs"),ae=require("./PenAndPaper-mD8Ft9s0.cjs"),se=require("./useUserOptionState-BgepsfED.cjs"),ne=require("./useChartAccessibility-Cm7nkzTG.cjs"),ue=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ie=["id"],ce={key:1,ref:"noTitle",class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},de={key:2,style:"width:100%"},he=["xmlns","viewBox"],ve=["width","height"],me={id:"vueUiPill",clipPathUnits:"objectBoundingBox"},pe=["fill"],fe=["id"],ye=["stop-color"],ge=["stop-color"],ke=["stop-color"],be={"clip-path":"url(#vueUiPill)"},xe=["x","y","height","width"],Ce=["x","y","height","width","fill"],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=["x1","x2","y1","y2","stroke-width","stroke"],$e=["x1","x2","y1","y2","stroke-width","stroke"],Fe=["x","y","height","width"],Oe=["y","x","fill","font-size","font-weight"],Ie={key:5,class:"vue-data-ui-watermark"},Se={key:6,ref:"source",dir:"auto"},qe={__name:"vue-ui-thermometer",props:{dataset:{type:Object,default(){return{}}},config:{type:Object,default(){return{}}}},setup(m,{expose:L}){e.useCssVars(r=>({"3272b184":X.value,"0885078a":D.value,"09e2f6f7":j.value}));const{vue_ui_thermometer:G}=a.useConfig(),s=m,g=e.computed(()=>!!s.dataset&&Object.keys(s.dataset).length);e.onMounted(()=>{B()});function B(){a.objectIsEmpty(s.dataset)?a.error({componentName:"VueUiThermometer",type:"dataset"}):a.getMissingDatasetAttributes({datasetObject:s.dataset,requiredAttributes:["value","from","to"]}).forEach(r=>{a.error({componentName:"VueUiThermometer",type:"datasetAttribute",property:r})})}const d=e.ref(a.createUid()),V=e.ref(null),E=e.ref(0),P=e.ref(0),t=e.computed({get:()=>I(),set:r=>r}),{userOptionsVisible:k,setUserOptionsVisibility:$,keepUserOptionState:F}=se.useUserOptionState({config:t.value}),{svgRef:O}=ne.useChartAccessibility({config:t.value.style.title});function I(){const r=z.useNestedProp({userConfig:s.config,defaultConfig:G});return r.theme?{...z.useNestedProp({userConfig:a.themes.vue_ui_thermometer[r.theme]||s.config,defaultConfig:r}),customPalette:a.themePalettes[r.theme]||a.palette}:r}e.watch(()=>s.config,r=>{t.value=I(),k.value=!t.value.userOptions.showOnChartHover,B(),P.value+=1},{deep:!0});const{isPrinting:S,isImaging:q,generatePdf:A,generateImage:T}=Y.usePrinter({elementId:`thermometer__${d.value}`,fileName:t.value.style.title.text||"vue-ui-thermometer",options:t.value.userOptions.print}),H=e.computed(()=>t.value.userOptions.show&&!t.value.style.title.text),p=e.computed(()=>a.convertCustomPalette(t.value.customPalette)),R=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 f(r,n,o){const u=[],_=M(r),N=M(n);for(let v=0;v<o;v++){const Q=b(_.red,N.red,v,o),Z=b(_.green,N.green,v,o),ee=b(_.blue,N.blue,v,o),te=`#${x(Q)}${x(Z)}${x(ee)}`;u.push(te)}return u}function M(r){const n=r.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 b(r,n,o,u){return Math.round(r+(n-r)*o/u)}function x(r){return r.toString(16).padStart(2,"0")}const l=e.computed(()=>{const r=R.value+i.value.left+i.value.right,n=t.value.style.chart.height;return{width:r,left:i.value.left,right:r-i.value.right,top:i.value.top,bottom:n-i.value.bottom,height:n}}),W=e.computed(()=>l.value),C=e.computed(()=>{const r=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=r+n:r>n?o=r-n:o=n-r,(1-(Math.abs(a.checkNaN(s.dataset.from))+a.checkNaN(s.dataset.value))/o)*(l.value.height-i.value.top-i.value.bottom)}),j=e.computed(()=>`${C.value}px`),D=e.computed(()=>`${l.value.height-t.value.style.chart.padding.bottom-i.value.top}px`),X=e.computed(()=>`${t.value.style.chart.animation.speedMs}ms`),J=e.computed(()=>{if(s.dataset.colors){if(!s.dataset.colors.from)return f(p.value[0]||a.palette[0],a.convertColorToHex(s.dataset.colors.to),c.value||10);if(!s.dataset.colors.to)return f(a.convertColorToHex(s.dataset.colors.from),p.value[1]||a.palette[1],c.value||10)}else return f(p.value[1]||a.palette[1],p.value[0]||a.palette[0],c.value||10);return f(a.convertColorToHex(s.dataset.colors.from),a.convertColorToHex(s.dataset.colors.to),c.value||10)}),U=e.computed(()=>{const r=[];let n=0;const o=l.value.height-i.value.top-i.value.bottom;for(let u=0;u<o-1;u+=o/c.value)r.push({x:l.value.left,y:l.value.top+u,qYLess:l.value.top+u+o/c.value/4,halfY:l.value.top+u+o/c.value/2,qYMore:l.value.top+u+o/c.value/4*3,color:J.value[n],height:o/c.value}),n+=1;return r}),h=e.ref(!1);function K(r){h.value=r,E.value+=1}const y=e.ref(!1);function w(){y.value=!y.value}return L({generatePdf:A,generateImage:T,toggleAnnotator:w}),(r,n)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"thermoChart",ref:V,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(ae._sfc_main,{key:0,svgRef:e.unref(O),backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:y.value,onClose:w},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),H.value?(e.openBlock(),e.createElementBlock("div",ce,null,512)):e.createCommentVNode("",!0),t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",de,[(e.openBlock(),e.createBlock(oe._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(k))?(e.openBlock(),e.createBlock(Y.UserOptions,{ref:"details",key:`user_options_${E.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isImaging:e.unref(q),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:V.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:y.value,onToggleFullscreen:K,onGeneratePdf:e.unref(A),onGenerateImage:e.unref(T),onToggleAnnotator:w,style:e.normalizeStyle({visibility:e.unref(F)?e.unref(k)?"visible":"hidden":"visible"})},e.createSlots({_:2},[r.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:o,color:u})=>[e.renderSlot(r.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:o,color:u})),void 0,!0)]),key:"0"}:void 0,r.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(r.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,r.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(r.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,r.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:u})=>[e.renderSlot(r.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:u})),void 0,!0)]),key:"3"}:void 0,r.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:o,isAnnotator:u})=>[e.renderSlot(r.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:o,isAnnotator:u})),void 0,!0)]),key:"4"}: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,ref_key:"svgRef",ref:O,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 ${l.value.width} ${l.value.height}`,style:"background:transparent"},[e.createVNode(le._sfc_main),r.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:l.value.width,height:l.value.height,style:{pointerEvents:"none"}},[e.renderSlot(r.$slots,"chart-background",{},void 0,!0)],8,ve)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[e.createElementVNode("clipPath",me,[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,pe)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(U.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,ye),e.createElementVNode("stop",{offset:"50%","stop-color":e.unref(a.setOpacity)(o.color,100-t.value.style.chart.graduations.gradient.intensity)},null,8,ge),e.createElementVNode("stop",{offset:"100%","stop-color":o.color},null,8,ke)],8,fe))),256))]),e.createElementVNode("g",be,[e.createElementVNode("rect",{x:l.value.left,y:l.value.top,height:l.value.height-i.value.top-i.value.bottom,width:l.value.width-i.value.left-i.value.right,fill:"#FFFFFF"},null,8,xe),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(U.value,(o,u)=>(e.openBlock(),e.createElementBlock("g",{key:`graduation_${u}`},[e.createElementVNode("rect",{x:o.x,y:o.y,height:o.height,width:l.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,Ce),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,we)):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,_e)):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,Ne)):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,Be)):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:l.value.right,x2:l.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,Ve)):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:l.value.right,x2:l.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,Ee)):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:l.value.right,x2:l.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,Pe)):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:l.value.right,x2:l.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,$e)):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:l.value.left,y:l.value.top,height:C.value,width:l.value.width-t.value.style.chart.padding.left-t.value.style.chart.padding.right,fill:"#FFFFFF66"},null,10,Fe)]),e.createElementVNode("text",{class:e.normalizeClass({"vue-ui-thermometer-temperature-value":t.value.style.chart.animation.use}),y:C.value+l.value.top+t.value.style.chart.label.fontSize/3,x:l.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,Oe),e.renderSlot(r.$slots,"svg",{svg:W.value},void 0,!0)],10,he)):e.createCommentVNode("",!0),r.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ie,[e.renderSlot(r.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(S)||e.unref(q)})),void 0,!0)])):e.createCommentVNode("",!0),r.$slots.source?(e.openBlock(),e.createElementBlock("div",Se,[e.renderSlot(r.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),g.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(re.default,{key:7,config:{type:"thermometer",style:{backgroundColor:t.value.style.chart.backgroundColor,thermometer:{color:"#CCCCCC"}}}},null,8,["config"]))],46,ie))}},Ae=ue._export_sfc(qe,[["__scopeId","data-v-b0579fd1"]]);exports.default=Ae;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),a=require("./index-C992Ntxe.cjs"),oe=require("./Title-D5Q-MAw-.cjs"),Y=require("./usePrinter-C-PBqYFC.cjs"),re=require("./vue-ui-skeleton-DO7G5Y5g.cjs"),z=require("./useNestedProp-BItlw8tg.cjs"),le=require("./PackageVersion-DMBva7ES.cjs"),ae=require("./PenAndPaper-C4nRoDeG.cjs"),se=require("./useUserOptionState-BgepsfED.cjs"),ne=require("./useChartAccessibility-Cm7nkzTG.cjs"),ue=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ie=["id"],ce={key:1,ref:"noTitle",class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},de={key:2,style:"width:100%"},he=["xmlns","viewBox"],ve=["width","height"],me={id:"vueUiPill",clipPathUnits:"objectBoundingBox"},pe=["fill"],fe=["id"],ye=["stop-color"],ge=["stop-color"],ke=["stop-color"],be={"clip-path":"url(#vueUiPill)"},xe=["x","y","height","width"],Ce=["x","y","height","width","fill"],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=["x1","x2","y1","y2","stroke-width","stroke"],$e=["x1","x2","y1","y2","stroke-width","stroke"],Fe=["x","y","height","width"],Oe=["y","x","fill","font-size","font-weight"],Ie={key:5,class:"vue-data-ui-watermark"},Se={key:6,ref:"source",dir:"auto"},qe={__name:"vue-ui-thermometer",props:{dataset:{type:Object,default(){return{}}},config:{type:Object,default(){return{}}}},setup(m,{expose:L}){e.useCssVars(r=>({"3272b184":X.value,"0885078a":D.value,"09e2f6f7":j.value}));const{vue_ui_thermometer:G}=a.useConfig(),s=m,g=e.computed(()=>!!s.dataset&&Object.keys(s.dataset).length);e.onMounted(()=>{B()});function B(){a.objectIsEmpty(s.dataset)?a.error({componentName:"VueUiThermometer",type:"dataset"}):a.getMissingDatasetAttributes({datasetObject:s.dataset,requiredAttributes:["value","from","to"]}).forEach(r=>{a.error({componentName:"VueUiThermometer",type:"datasetAttribute",property:r})})}const d=e.ref(a.createUid()),V=e.ref(null),E=e.ref(0),P=e.ref(0),t=e.computed({get:()=>I(),set:r=>r}),{userOptionsVisible:k,setUserOptionsVisibility:$,keepUserOptionState:F}=se.useUserOptionState({config:t.value}),{svgRef:O}=ne.useChartAccessibility({config:t.value.style.title});function I(){const r=z.useNestedProp({userConfig:s.config,defaultConfig:G});return r.theme?{...z.useNestedProp({userConfig:a.themes.vue_ui_thermometer[r.theme]||s.config,defaultConfig:r}),customPalette:a.themePalettes[r.theme]||a.palette}:r}e.watch(()=>s.config,r=>{t.value=I(),k.value=!t.value.userOptions.showOnChartHover,B(),P.value+=1},{deep:!0});const{isPrinting:S,isImaging:q,generatePdf:A,generateImage:T}=Y.usePrinter({elementId:`thermometer__${d.value}`,fileName:t.value.style.title.text||"vue-ui-thermometer",options:t.value.userOptions.print}),H=e.computed(()=>t.value.userOptions.show&&!t.value.style.title.text),p=e.computed(()=>a.convertCustomPalette(t.value.customPalette)),R=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 f(r,n,o){const u=[],_=M(r),N=M(n);for(let v=0;v<o;v++){const Q=b(_.red,N.red,v,o),Z=b(_.green,N.green,v,o),ee=b(_.blue,N.blue,v,o),te=`#${x(Q)}${x(Z)}${x(ee)}`;u.push(te)}return u}function M(r){const n=r.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 b(r,n,o,u){return Math.round(r+(n-r)*o/u)}function x(r){return r.toString(16).padStart(2,"0")}const l=e.computed(()=>{const r=R.value+i.value.left+i.value.right,n=t.value.style.chart.height;return{width:r,left:i.value.left,right:r-i.value.right,top:i.value.top,bottom:n-i.value.bottom,height:n}}),W=e.computed(()=>l.value),C=e.computed(()=>{const r=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=r+n:r>n?o=r-n:o=n-r,(1-(Math.abs(a.checkNaN(s.dataset.from))+a.checkNaN(s.dataset.value))/o)*(l.value.height-i.value.top-i.value.bottom)}),j=e.computed(()=>`${C.value}px`),D=e.computed(()=>`${l.value.height-t.value.style.chart.padding.bottom-i.value.top}px`),X=e.computed(()=>`${t.value.style.chart.animation.speedMs}ms`),J=e.computed(()=>{if(s.dataset.colors){if(!s.dataset.colors.from)return f(p.value[0]||a.palette[0],a.convertColorToHex(s.dataset.colors.to),c.value||10);if(!s.dataset.colors.to)return f(a.convertColorToHex(s.dataset.colors.from),p.value[1]||a.palette[1],c.value||10)}else return f(p.value[1]||a.palette[1],p.value[0]||a.palette[0],c.value||10);return f(a.convertColorToHex(s.dataset.colors.from),a.convertColorToHex(s.dataset.colors.to),c.value||10)}),U=e.computed(()=>{const r=[];let n=0;const o=l.value.height-i.value.top-i.value.bottom;for(let u=0;u<o-1;u+=o/c.value)r.push({x:l.value.left,y:l.value.top+u,qYLess:l.value.top+u+o/c.value/4,halfY:l.value.top+u+o/c.value/2,qYMore:l.value.top+u+o/c.value/4*3,color:J.value[n],height:o/c.value}),n+=1;return r}),h=e.ref(!1);function K(r){h.value=r,E.value+=1}const y=e.ref(!1);function w(){y.value=!y.value}return L({generatePdf:A,generateImage:T,toggleAnnotator:w}),(r,n)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"thermoChart",ref:V,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(ae._sfc_main,{key:0,svgRef:e.unref(O),backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:y.value,onClose:w},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),H.value?(e.openBlock(),e.createElementBlock("div",ce,null,512)):e.createCommentVNode("",!0),t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",de,[(e.openBlock(),e.createBlock(oe._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(k))?(e.openBlock(),e.createBlock(Y.UserOptions,{ref:"details",key:`user_options_${E.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isImaging:e.unref(q),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:V.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:y.value,onToggleFullscreen:K,onGeneratePdf:e.unref(A),onGenerateImage:e.unref(T),onToggleAnnotator:w,style:e.normalizeStyle({visibility:e.unref(F)?e.unref(k)?"visible":"hidden":"visible"})},e.createSlots({_:2},[r.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:o,color:u})=>[e.renderSlot(r.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:o,color:u})),void 0,!0)]),key:"0"}:void 0,r.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(r.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,r.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(r.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,r.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:u})=>[e.renderSlot(r.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:u})),void 0,!0)]),key:"3"}:void 0,r.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:o,isAnnotator:u})=>[e.renderSlot(r.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:o,isAnnotator:u})),void 0,!0)]),key:"4"}: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,ref_key:"svgRef",ref:O,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 ${l.value.width} ${l.value.height}`,style:"background:transparent"},[e.createVNode(le._sfc_main),r.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:l.value.width,height:l.value.height,style:{pointerEvents:"none"}},[e.renderSlot(r.$slots,"chart-background",{},void 0,!0)],8,ve)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[e.createElementVNode("clipPath",me,[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,pe)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(U.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,ye),e.createElementVNode("stop",{offset:"50%","stop-color":e.unref(a.setOpacity)(o.color,100-t.value.style.chart.graduations.gradient.intensity)},null,8,ge),e.createElementVNode("stop",{offset:"100%","stop-color":o.color},null,8,ke)],8,fe))),256))]),e.createElementVNode("g",be,[e.createElementVNode("rect",{x:l.value.left,y:l.value.top,height:l.value.height-i.value.top-i.value.bottom,width:l.value.width-i.value.left-i.value.right,fill:"#FFFFFF"},null,8,xe),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(U.value,(o,u)=>(e.openBlock(),e.createElementBlock("g",{key:`graduation_${u}`},[e.createElementVNode("rect",{x:o.x,y:o.y,height:o.height,width:l.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,Ce),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,we)):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,_e)):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,Ne)):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,Be)):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:l.value.right,x2:l.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,Ve)):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:l.value.right,x2:l.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,Ee)):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:l.value.right,x2:l.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,Pe)):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:l.value.right,x2:l.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,$e)):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:l.value.left,y:l.value.top,height:C.value,width:l.value.width-t.value.style.chart.padding.left-t.value.style.chart.padding.right,fill:"#FFFFFF66"},null,10,Fe)]),e.createElementVNode("text",{class:e.normalizeClass({"vue-ui-thermometer-temperature-value":t.value.style.chart.animation.use}),y:C.value+l.value.top+t.value.style.chart.label.fontSize/3,x:l.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,Oe),e.renderSlot(r.$slots,"svg",{svg:W.value},void 0,!0)],10,he)):e.createCommentVNode("",!0),r.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ie,[e.renderSlot(r.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(S)||e.unref(q)})),void 0,!0)])):e.createCommentVNode("",!0),r.$slots.source?(e.openBlock(),e.createElementBlock("div",Se,[e.renderSlot(r.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),g.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(re.default,{key:7,config:{type:"thermometer",style:{backgroundColor:t.value.style.chart.backgroundColor,thermometer:{color:"#CCCCCC"}}}},null,8,["config"]))],46,ie))}},Ae=ue._export_sfc(qe,[["__scopeId","data-v-b0579fd1"]]);exports.default=Ae;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),j=require("./useNestedProp-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),j=require("./useNestedProp-BItlw8tg.cjs"),w=require("./index-C992Ntxe.cjs"),D=require("./useResponsive-DQmBAoBf.cjs"),B=require("./BaseIcon-YEUagT3T.cjs"),O=require("./Title-D5Q-MAw-.cjs"),U=require("./PackageVersion-DMBva7ES.cjs"),W=require("./useChartAccessibility-Cm7nkzTG.cjs"),G=require("./_plugin-vue_export-helper-BHFhmbuH.cjs");class X{constructor(T,V,S,M=!0,h=!0){this.interval=V,this.elapsed=0,this.isPaused=!1;const g=`
|
|
2
2
|
let interval;
|
|
3
3
|
let elapsed = 0;
|
|
4
4
|
let paused = false;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { ref as i, onMounted as Z, computed as z, onBeforeUnmount as ee, watch as te, createElementBlock as o, openBlock as l, normalizeStyle as p, createCommentVNode as d, createElementVNode as _, createBlock as ae, unref as se, createVNode as C, renderSlot as H, mergeProps as q, normalizeProps as W, guardReactiveProps as G, toDisplayString as le } from "vue";
|
|
2
|
-
import { u as oe } from "./useNestedProp-
|
|
3
|
-
import { u as re, c as ue, X as ie, F as V } from "./index-
|
|
2
|
+
import { u as oe } from "./useNestedProp-R77oENB4.js";
|
|
3
|
+
import { u as re, c as ue, X as ie, F as V } from "./index-gaj0gmhW.js";
|
|
4
4
|
import { t as ne, u as ce } from "./useResponsive-Cw4oZ8sQ.js";
|
|
5
|
-
import R from "./BaseIcon-
|
|
6
|
-
import { _ as de } from "./Title-
|
|
7
|
-
import { _ as he } from "./PackageVersion-
|
|
5
|
+
import R from "./BaseIcon-DOAYHMqC.js";
|
|
6
|
+
import { _ as de } from "./Title-DmYM5yAv.js";
|
|
7
|
+
import { _ as he } from "./PackageVersion-DfvwvFMQ.js";
|
|
8
8
|
import { u as ve } from "./useChartAccessibility-BWojgys7.js";
|
|
9
9
|
import { _ as pe } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
10
10
|
class fe {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),L=require("./useNestedProp-DWYmdrE5.cjs"),c=require("./index-CLiv4lWF.cjs"),K=require("./Title-g0Df2kQZ.cjs"),j=require("./usePrinter-sfF-cTSO.cjs"),Q=require("./vue-ui-skeleton-3odYNTi5.cjs"),W=require("./PackageVersion-B6hD3Tku.cjs"),Z=require("./PenAndPaper-mD8Ft9s0.cjs"),ee=require("./useUserOptionState-BgepsfED.cjs"),te=require("./useChartAccessibility-Cm7nkzTG.cjs"),oe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ae=["id"],le={key:2,style:"width:100%;background:transparent;padding-bottom:12px"},re=["xmlns","viewBox"],ne=["width","height"],se={key:1},ue=["d","stroke-width","stroke"],ie={key:2},ce=["x1","y1","x2","y2","stroke-width","stroke"],ve=["x","y","font-size","fill","font-weight","text-anchor"],de={key:5,class:"vue-data-ui-watermark"},he={key:6,ref:"source",dir:"auto"},pe={__name:"vue-ui-tiremarks",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(G,{expose:H}){const{vue_ui_tiremarks:D}=c.useConfig(),v=G,$=e.computed(()=>!!v.dataset&&Object.keys(v.dataset).length),B=e.ref(c.createUid()),O=e.ref(null),X=e.ref(null),S=e.ref(0),A=e.ref(0),t=e.computed({get:()=>E(),set:o=>o}),{userOptionsVisible:P,setUserOptionsVisibility:z,keepUserOptionState:N}=ee.useUserOptionState({config:t.value}),{svgRef:I}=te.useChartAccessibility({config:t.value.style.chart.title});function E(){const o=L.useNestedProp({userConfig:v.config,defaultConfig:D});return o.theme?{...L.useNestedProp({userConfig:c.themes.vue_ui_tiremarks[o.theme]||v.config,defaultConfig:o})}:o}e.watch(()=>v.config,o=>{t.value=E(),P.value=!t.value.userOptions.showOnChartHover,U(),A.value+=1},{deep:!0});const{isPrinting:F,isImaging:V,generatePdf:q,generateImage:T}=j.usePrinter({elementId:B.value,fileName:t.value.style.chart.title.text||"vue-ui-tiremarks",options:t.value.userOptions.print}),Y=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),s=e.ref(t.value.style.chart.animation.use?0:c.checkNaN(v.dataset.percentage));e.watch(()=>v.dataset,o=>{t.value.style.chart.animation.use?M(o.percentage):s.value=o.percentage||0},{deep:!0}),e.onMounted(()=>{U()});function M(o){let n=t.value.style.chart.animation.speed;const a=Math.abs(o-s.value)/(n*120);function r(){s.value<o?s.value=Math.min(s.value+a,o):s.value>o&&(s.value=Math.max(s.value-a,o)),s.value!==o&&requestAnimationFrame(r)}r()}function U(){c.objectIsEmpty(v.dataset)&&c.error({componentName:"VueUiTiremarks",type:"dataset"}),M(v.dataset.percentage||0)}const m=e.computed(()=>t.value.style.chart.layout.display==="vertical"),u=e.computed(()=>{const o={top:48,left:64,right:64,bottom:48};return m.value?{top:t.value.style.chart.percentage.verticalPosition==="top"?o.top:3,left:3,right:3,bottom:t.value.style.chart.percentage.verticalPosition==="bottom"?o.bottom:3}:{top:0,bottom:0,left:t.value.style.chart.percentage.horizontalPosition==="left"?o.left:3,right:t.value.style.chart.percentage.horizontalPosition==="right"?o.right:10}}),C=e.computed(()=>Object.values(u.value).reduce((o,n)=>o+n,0)),l=e.computed(()=>({height:m.value?312:56,width:m.value?56:312})),i=e.computed(()=>m.value?{mark:(l.value.height-C.value)/100*.5,space:(l.value.height-C.value)/100*.5}:{mark:(l.value.width-C.value)/100*.5,space:(l.value.width-C.value)/100*.5}),R=e.computed(()=>{const o=[];for(let a=0;a<100;a+=1){const r=t.value.style.chart.layout.ticks.gradient.show?c.shiftHue(t.value.style.chart.layout.activeColor,a/100*(t.value.style.chart.layout.ticks.gradient.shiftHueIntensity/100)):t.value.style.chart.layout.activeColor;if(m.value){const y=t.value.style.chart.layout.crescendo?(100-a)*(l.value.width-u.value.left-u.value.right)/100/3:0,d=u.value.left+4+y,h=l.value.width-u.value.right-4-y,p=l.value.height-u.value.bottom-a*i.value.mark-a*i.value.space-i.value.mark,f=l.value.height-u.value.bottom-a*i.value.mark-a*i.value.space-i.value.mark,k=(h-d)/t.value.style.chart.layout.curveAngleX,b=t.value.style.chart.layout.curveAngleY*((1+a)/100);o.push({x1:d,x2:h,y1:p,y2:f,curve:`M ${d} ${p} C ${d+k} ${p-b}, ${h-k} ${f-b}, ${h} ${f}`,color:r})}else{const y=t.value.style.chart.layout.crescendo?(100-a)*(l.value.height-u.value.top-u.value.bottom)/100/3:0,d=u.value.left+a*i.value.mark+a*i.value.space-i.value.mark,h=d,p=u.value.top+4+y,f=l.value.height-u.value.bottom-4-y,k=t.value.style.chart.layout.curveAngleY*((1+a)/100),b=(f-p)/t.value.style.chart.layout.curveAngleX;o.push({x1:d,x2:h,y1:p,y2:f,curve:`M ${d} ${p} C ${d+k} ${p+b}, ${h+k} ${f-b}, ${h} ${f}`,color:r})}}return o}),g=e.computed(()=>{let o,n,a;const r=t.value.style.chart.percentage.fontSize/3;return m.value?t.value.style.chart.percentage.verticalPosition==="top"?(o=l.value.width/2,n=u.value.top/2,a="middle"):t.value.style.chart.percentage.verticalPosition==="bottom"&&(o=l.value.width/2,n=l.value.height-u.value.bottom/2+r,a="middle"):t.value.style.chart.percentage.horizontalPosition==="left"?(o=4,n=l.value.height/2+r,a="start"):t.value.style.chart.percentage.horizontalPosition==="right"&&(o=l.value.width-u.value.right+8,n=l.value.height/2+r,a="start"),{x:o,y:n,textAnchor:a,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 J(o){_.value=o,S.value+=1}const w=e.ref(!1);function x(){w.value=!w.value}return H({generatePdf:q,generateImage:T,toggleAnnotator:x}),(o,n)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"tiremarksChart",ref:O,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:B.value,onMouseenter:n[0]||(n[0]=()=>e.unref(z)(!0)),onMouseleave:n[1]||(n[1]=()=>e.unref(z)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Z._sfc_main,{key:0,svgRef:e.unref(I),backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:w.value,onClose:x},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),Y.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:X,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",le,[(e.openBlock(),e.createBlock(K._sfc_main,{key:`title_${A.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&&$.value&&(e.unref(N)||e.unref(P))?(e.openBlock(),e.createBlock(j.UserOptions,{ref:"details",key:`user_options_${S.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(F),isImaging:e.unref(V),uid:B.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:O.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:w.value,onToggleFullscreen:J,onGeneratePdf:e.unref(q),onGenerateImage:e.unref(T),onToggleAnnotator:x,style:e.normalizeStyle({visibility:e.unref(N)?e.unref(P)?"visible":"hidden":"visible"})},e.createSlots({_:2},[o.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:a,color:r})=>[e.renderSlot(o.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:a,color:r})),void 0,!0)]),key:"0"}:void 0,o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:a,isFullscreen:r})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:a,isFullscreen:r})),void 0,!0)]),key:"3"}:void 0,o.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:a,isAnnotator:r})=>[e.renderSlot(o.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:a,isAnnotator:r})),void 0,!0)]),key:"4"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasFullscreen","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),$.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:I,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(W._sfc_main),o.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:l.value.width,height:l.value.height,style:{pointerEvents:"none"}},[e.renderSlot(o.$slots,"chart-background",{},void 0,!0)],8,ne)):e.createCommentVNode("",!0),t.value.style.chart.layout.curved?(e.openBlock(),e.createElementBlock("g",se,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(R.value,(a,r)=>(e.openBlock(),e.createElementBlock("path",{d:a.curve,"stroke-width":i.value.mark,stroke:s.value>=r?a.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<=s.value})},null,10,ue))),256))])):(e.openBlock(),e.createElementBlock("g",ie,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(R.value,(a,r)=>(e.openBlock(),e.createElementBlock("line",{x1:a.x1,y1:a.y1,x2:a.x2,y2:a.y2,"stroke-width":i.value.mark,stroke:s.value>=r?a.color:t.value.style.chart.layout.inactiveColor,"stroke-linecap":"round"},null,8,ce))),256))])),t.value.style.chart.percentage.show?(e.openBlock(),e.createElementBlock("text",{key:3,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,s.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,s.value,e.unref(c.dataLabel)({v:s.value,s:"%",r:t.value.style.chart.percentage.rounding}))),9,ve)):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"svg",{svg:l.value},void 0,!0)],14,re)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",de,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(F)||e.unref(V)})),void 0,!0)])):e.createCommentVNode("",!0),o.$slots.source?(e.openBlock(),e.createElementBlock("div",he,[e.renderSlot(o.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),$.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Q.default,{key:7,config:{type:"tiremarks",style:{backgroundColor:t.value.style.chart.backgroundColor,tiremarks:{color:"#CCCCCC"}}}},null,8,["config"]))],46,ae))}},fe=oe._export_sfc(pe,[["__scopeId","data-v-fac4c918"]]);exports.default=fe;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),L=require("./useNestedProp-BItlw8tg.cjs"),c=require("./index-C992Ntxe.cjs"),K=require("./Title-D5Q-MAw-.cjs"),j=require("./usePrinter-C-PBqYFC.cjs"),Q=require("./vue-ui-skeleton-DO7G5Y5g.cjs"),W=require("./PackageVersion-DMBva7ES.cjs"),Z=require("./PenAndPaper-C4nRoDeG.cjs"),ee=require("./useUserOptionState-BgepsfED.cjs"),te=require("./useChartAccessibility-Cm7nkzTG.cjs"),oe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ae=["id"],le={key:2,style:"width:100%;background:transparent;padding-bottom:12px"},re=["xmlns","viewBox"],ne=["width","height"],se={key:1},ue=["d","stroke-width","stroke"],ie={key:2},ce=["x1","y1","x2","y2","stroke-width","stroke"],ve=["x","y","font-size","fill","font-weight","text-anchor"],de={key:5,class:"vue-data-ui-watermark"},he={key:6,ref:"source",dir:"auto"},pe={__name:"vue-ui-tiremarks",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(G,{expose:H}){const{vue_ui_tiremarks:D}=c.useConfig(),v=G,$=e.computed(()=>!!v.dataset&&Object.keys(v.dataset).length),B=e.ref(c.createUid()),O=e.ref(null),X=e.ref(null),S=e.ref(0),A=e.ref(0),t=e.computed({get:()=>E(),set:o=>o}),{userOptionsVisible:P,setUserOptionsVisibility:z,keepUserOptionState:N}=ee.useUserOptionState({config:t.value}),{svgRef:I}=te.useChartAccessibility({config:t.value.style.chart.title});function E(){const o=L.useNestedProp({userConfig:v.config,defaultConfig:D});return o.theme?{...L.useNestedProp({userConfig:c.themes.vue_ui_tiremarks[o.theme]||v.config,defaultConfig:o})}:o}e.watch(()=>v.config,o=>{t.value=E(),P.value=!t.value.userOptions.showOnChartHover,U(),A.value+=1},{deep:!0});const{isPrinting:F,isImaging:V,generatePdf:q,generateImage:T}=j.usePrinter({elementId:B.value,fileName:t.value.style.chart.title.text||"vue-ui-tiremarks",options:t.value.userOptions.print}),Y=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),s=e.ref(t.value.style.chart.animation.use?0:c.checkNaN(v.dataset.percentage));e.watch(()=>v.dataset,o=>{t.value.style.chart.animation.use?M(o.percentage):s.value=o.percentage||0},{deep:!0}),e.onMounted(()=>{U()});function M(o){let n=t.value.style.chart.animation.speed;const a=Math.abs(o-s.value)/(n*120);function r(){s.value<o?s.value=Math.min(s.value+a,o):s.value>o&&(s.value=Math.max(s.value-a,o)),s.value!==o&&requestAnimationFrame(r)}r()}function U(){c.objectIsEmpty(v.dataset)&&c.error({componentName:"VueUiTiremarks",type:"dataset"}),M(v.dataset.percentage||0)}const m=e.computed(()=>t.value.style.chart.layout.display==="vertical"),u=e.computed(()=>{const o={top:48,left:64,right:64,bottom:48};return m.value?{top:t.value.style.chart.percentage.verticalPosition==="top"?o.top:3,left:3,right:3,bottom:t.value.style.chart.percentage.verticalPosition==="bottom"?o.bottom:3}:{top:0,bottom:0,left:t.value.style.chart.percentage.horizontalPosition==="left"?o.left:3,right:t.value.style.chart.percentage.horizontalPosition==="right"?o.right:10}}),C=e.computed(()=>Object.values(u.value).reduce((o,n)=>o+n,0)),l=e.computed(()=>({height:m.value?312:56,width:m.value?56:312})),i=e.computed(()=>m.value?{mark:(l.value.height-C.value)/100*.5,space:(l.value.height-C.value)/100*.5}:{mark:(l.value.width-C.value)/100*.5,space:(l.value.width-C.value)/100*.5}),R=e.computed(()=>{const o=[];for(let a=0;a<100;a+=1){const r=t.value.style.chart.layout.ticks.gradient.show?c.shiftHue(t.value.style.chart.layout.activeColor,a/100*(t.value.style.chart.layout.ticks.gradient.shiftHueIntensity/100)):t.value.style.chart.layout.activeColor;if(m.value){const y=t.value.style.chart.layout.crescendo?(100-a)*(l.value.width-u.value.left-u.value.right)/100/3:0,d=u.value.left+4+y,h=l.value.width-u.value.right-4-y,p=l.value.height-u.value.bottom-a*i.value.mark-a*i.value.space-i.value.mark,f=l.value.height-u.value.bottom-a*i.value.mark-a*i.value.space-i.value.mark,k=(h-d)/t.value.style.chart.layout.curveAngleX,b=t.value.style.chart.layout.curveAngleY*((1+a)/100);o.push({x1:d,x2:h,y1:p,y2:f,curve:`M ${d} ${p} C ${d+k} ${p-b}, ${h-k} ${f-b}, ${h} ${f}`,color:r})}else{const y=t.value.style.chart.layout.crescendo?(100-a)*(l.value.height-u.value.top-u.value.bottom)/100/3:0,d=u.value.left+a*i.value.mark+a*i.value.space-i.value.mark,h=d,p=u.value.top+4+y,f=l.value.height-u.value.bottom-4-y,k=t.value.style.chart.layout.curveAngleY*((1+a)/100),b=(f-p)/t.value.style.chart.layout.curveAngleX;o.push({x1:d,x2:h,y1:p,y2:f,curve:`M ${d} ${p} C ${d+k} ${p+b}, ${h+k} ${f-b}, ${h} ${f}`,color:r})}}return o}),g=e.computed(()=>{let o,n,a;const r=t.value.style.chart.percentage.fontSize/3;return m.value?t.value.style.chart.percentage.verticalPosition==="top"?(o=l.value.width/2,n=u.value.top/2,a="middle"):t.value.style.chart.percentage.verticalPosition==="bottom"&&(o=l.value.width/2,n=l.value.height-u.value.bottom/2+r,a="middle"):t.value.style.chart.percentage.horizontalPosition==="left"?(o=4,n=l.value.height/2+r,a="start"):t.value.style.chart.percentage.horizontalPosition==="right"&&(o=l.value.width-u.value.right+8,n=l.value.height/2+r,a="start"),{x:o,y:n,textAnchor:a,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 J(o){_.value=o,S.value+=1}const w=e.ref(!1);function x(){w.value=!w.value}return H({generatePdf:q,generateImage:T,toggleAnnotator:x}),(o,n)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"tiremarksChart",ref:O,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:B.value,onMouseenter:n[0]||(n[0]=()=>e.unref(z)(!0)),onMouseleave:n[1]||(n[1]=()=>e.unref(z)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Z._sfc_main,{key:0,svgRef:e.unref(I),backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:w.value,onClose:x},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),Y.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:X,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",le,[(e.openBlock(),e.createBlock(K._sfc_main,{key:`title_${A.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&&$.value&&(e.unref(N)||e.unref(P))?(e.openBlock(),e.createBlock(j.UserOptions,{ref:"details",key:`user_options_${S.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(F),isImaging:e.unref(V),uid:B.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:O.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:w.value,onToggleFullscreen:J,onGeneratePdf:e.unref(q),onGenerateImage:e.unref(T),onToggleAnnotator:x,style:e.normalizeStyle({visibility:e.unref(N)?e.unref(P)?"visible":"hidden":"visible"})},e.createSlots({_:2},[o.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:a,color:r})=>[e.renderSlot(o.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:a,color:r})),void 0,!0)]),key:"0"}:void 0,o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:a,isFullscreen:r})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:a,isFullscreen:r})),void 0,!0)]),key:"3"}:void 0,o.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:a,isAnnotator:r})=>[e.renderSlot(o.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:a,isAnnotator:r})),void 0,!0)]),key:"4"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasFullscreen","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),$.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:I,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(W._sfc_main),o.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:l.value.width,height:l.value.height,style:{pointerEvents:"none"}},[e.renderSlot(o.$slots,"chart-background",{},void 0,!0)],8,ne)):e.createCommentVNode("",!0),t.value.style.chart.layout.curved?(e.openBlock(),e.createElementBlock("g",se,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(R.value,(a,r)=>(e.openBlock(),e.createElementBlock("path",{d:a.curve,"stroke-width":i.value.mark,stroke:s.value>=r?a.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<=s.value})},null,10,ue))),256))])):(e.openBlock(),e.createElementBlock("g",ie,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(R.value,(a,r)=>(e.openBlock(),e.createElementBlock("line",{x1:a.x1,y1:a.y1,x2:a.x2,y2:a.y2,"stroke-width":i.value.mark,stroke:s.value>=r?a.color:t.value.style.chart.layout.inactiveColor,"stroke-linecap":"round"},null,8,ce))),256))])),t.value.style.chart.percentage.show?(e.openBlock(),e.createElementBlock("text",{key:3,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,s.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,s.value,e.unref(c.dataLabel)({v:s.value,s:"%",r:t.value.style.chart.percentage.rounding}))),9,ve)):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"svg",{svg:l.value},void 0,!0)],14,re)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",de,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(F)||e.unref(V)})),void 0,!0)])):e.createCommentVNode("",!0),o.$slots.source?(e.openBlock(),e.createElementBlock("div",he,[e.renderSlot(o.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),$.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Q.default,{key:7,config:{type:"tiremarks",style:{backgroundColor:t.value.style.chart.backgroundColor,tiremarks:{color:"#CCCCCC"}}}},null,8,["config"]))],46,ae))}},fe=oe._export_sfc(pe,[["__scopeId","data-v-fac4c918"]]);exports.default=fe;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { computed as h, ref as b, watch as Z, onMounted as ce, createElementBlock as c, openBlock as s, unref as r, normalizeStyle as G, normalizeClass as L, createBlock as F, createCommentVNode as d, createSlots as ve, withCtx as O, renderSlot as y, normalizeProps as z, guardReactiveProps as S, createVNode as he, Fragment as ee, renderList as te, toDisplayString as de } from "vue";
|
|
2
|
-
import { u as ae } from "./useNestedProp-
|
|
3
|
-
import { u as fe, c as ge, a as ye, v as pe, o as me, e as ke, w as oe, X as be, i as _e, f as Ce } from "./index-
|
|
4
|
-
import { _ as $e } from "./Title-
|
|
5
|
-
import { u as we, U as xe } from "./usePrinter-
|
|
6
|
-
import Oe from "./vue-ui-skeleton-
|
|
7
|
-
import { _ as Pe } from "./PackageVersion-
|
|
8
|
-
import { _ as Ae } from "./PenAndPaper-
|
|
2
|
+
import { u as ae } from "./useNestedProp-R77oENB4.js";
|
|
3
|
+
import { u as fe, c as ge, a as ye, v as pe, o as me, e as ke, w as oe, X as be, i as _e, f as Ce } from "./index-gaj0gmhW.js";
|
|
4
|
+
import { _ as $e } from "./Title-DmYM5yAv.js";
|
|
5
|
+
import { u as we, U as xe } from "./usePrinter-BAF6jSop.js";
|
|
6
|
+
import Oe from "./vue-ui-skeleton-JA0W8tXn.js";
|
|
7
|
+
import { _ as Pe } from "./PackageVersion-DfvwvFMQ.js";
|
|
8
|
+
import { _ as Ae } from "./PenAndPaper-Hpxqpf-9.js";
|
|
9
9
|
import { u as Ie } from "./useUserOptionState-BIvW1Kz7.js";
|
|
10
10
|
import { u as Fe } from "./useChartAccessibility-BWojgys7.js";
|
|
11
11
|
import { _ as ze } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { useSlots as pt, onMounted as je, computed as C, ref as g, watch as gt, onBeforeUnmount as mt, createElementBlock as y, openBlock as v, unref as m, normalizeStyle as L, normalizeClass as me, createBlock as X, createCommentVNode as _, createElementVNode as O, createVNode as ye, createSlots as yt, withCtx as x, renderSlot as $, normalizeProps as j, guardReactiveProps as Y, Fragment as ce, renderList as be, withKeys as Ye, withModifiers as ke, mergeProps as Ke, createTextVNode as de, toDisplayString as K, nextTick as bt } from "vue";
|
|
2
|
-
import { u as kt, c as Ze, t as wt, p as S, a as Ct, b as $t, o as xt, e as Tt, d as ve, i as he, f as oe, X as _t, l as Je, G as Qe, x as et, q as Ot, r as St, y as It } from "./index-
|
|
3
|
-
import { _ as Nt } from "./Title-
|
|
4
|
-
import { u as zt, U as Ft } from "./usePrinter-
|
|
5
|
-
import { _ as At } from "./Tooltip-
|
|
6
|
-
import { L as Pt } from "./Legend-
|
|
7
|
-
import Rt from "./vue-ui-skeleton-
|
|
8
|
-
import { D as Lt } from "./DataTable-
|
|
9
|
-
import Dt from "./vue-ui-accordion-
|
|
2
|
+
import { u as kt, c as Ze, t as wt, p as S, a as Ct, b as $t, o as xt, e as Tt, d as ve, i as he, f as oe, X as _t, l as Je, G as Qe, x as et, q as Ot, r as St, y as It } from "./index-gaj0gmhW.js";
|
|
3
|
+
import { _ as Nt } from "./Title-DmYM5yAv.js";
|
|
4
|
+
import { u as zt, U as Ft } from "./usePrinter-BAF6jSop.js";
|
|
5
|
+
import { _ as At } from "./Tooltip-jO3E09l_.js";
|
|
6
|
+
import { L as Pt } from "./Legend-BkMSze3l.js";
|
|
7
|
+
import Rt from "./vue-ui-skeleton-JA0W8tXn.js";
|
|
8
|
+
import { D as Lt } from "./DataTable-BcZpw2Di.js";
|
|
9
|
+
import Dt from "./vue-ui-accordion-DiPdvaEC.js";
|
|
10
10
|
import { t as Mt, u as Vt } from "./useResponsive-Cw4oZ8sQ.js";
|
|
11
|
-
import { u as tt } from "./useNestedProp-
|
|
12
|
-
import { _ as Bt } from "./PackageVersion-
|
|
13
|
-
import { _ as Ht } from "./PenAndPaper-
|
|
11
|
+
import { u as tt } from "./useNestedProp-R77oENB4.js";
|
|
12
|
+
import { _ as Bt } from "./PackageVersion-DfvwvFMQ.js";
|
|
13
|
+
import { _ as Ht } from "./PenAndPaper-Hpxqpf-9.js";
|
|
14
14
|
import { u as Ut } from "./useUserOptionState-BIvW1Kz7.js";
|
|
15
15
|
import { u as Wt } from "./useChartAccessibility-BWojgys7.js";
|
|
16
|
-
import Et from "./BaseIcon-
|
|
16
|
+
import Et from "./BaseIcon-DOAYHMqC.js";
|
|
17
17
|
import { _ as Gt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
18
18
|
function ot(n, r) {
|
|
19
19
|
const u = n.length;
|