vue-data-ui 2.10.6 → 2.10.8
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 +2 -2
- package/dist/{Arrow-Cl3tB80E.cjs → Arrow-NnfTvwbg.cjs} +1 -1
- package/dist/{Arrow-rRiIHng2.js → Arrow-aCcBx0NS.js} +1 -1
- package/dist/{BaseIcon-COlnFbOq.js → BaseIcon-DTt4YbQE.js} +1 -1
- package/dist/{BaseIcon-CiINppo2.cjs → BaseIcon-DmfPEj6j.cjs} +1 -1
- package/dist/{ColorPicker-UNzkvlGG.js → ColorPicker-DrovFYIL.js} +3 -3
- package/dist/{ColorPicker-9QCAgrqp.cjs → ColorPicker-DsEujcIN.cjs} +1 -1
- package/dist/{DataTable-CXbN2mJi.js → DataTable-CX-Ynkp4.js} +2 -2
- package/dist/{DataTable-DOiZOQ3J.cjs → DataTable-zSU-0X__.cjs} +1 -1
- package/dist/{Legend-BU9C5fBQ.js → Legend-BTvPguV6.js} +2 -2
- package/dist/{Legend-CFqKBI0j.cjs → Legend-DFQ4iWI3.cjs} +1 -1
- package/dist/{PackageVersion-0Lu6RIig.js → PackageVersion-CkUbRQrt.js} +1 -1
- package/dist/{PackageVersion-BMNt7NsQ.cjs → PackageVersion-DxR-fKLM.cjs} +1 -1
- package/dist/{PenAndPaper-D4Uu-GqW.js → PenAndPaper-Br3OdauM.js} +3 -3
- package/dist/{PenAndPaper-BUwLP3Wx.cjs → PenAndPaper-CG9o3ymS.cjs} +1 -1
- package/dist/{Shape-2NRWULE_.cjs → Shape-D9l3WJGO.cjs} +1 -1
- package/dist/{Shape-BavMx2aa.js → Shape-Y1FgLdPz.js} +1 -1
- package/dist/{Slicer-Ct8BAk8F.cjs → Slicer-B7FJCuCB.cjs} +1 -1
- package/dist/{Slicer-B_qJHvNR.js → Slicer-C2GR76As.js} +2 -2
- package/dist/{Title-BkfQdTEX.cjs → Title-CEZO2hzQ.cjs} +1 -1
- package/dist/{Title-DrVDm1wy.js → Title-tlFeM12I.js} +1 -1
- package/dist/{Tooltip-BFT6mZ5a.js → Tooltip-BCtHh3BT.js} +1 -1
- package/dist/{Tooltip-BK88meti.cjs → Tooltip-BZa-QzER.cjs} +1 -1
- package/dist/documentation/installation.md +1 -1
- package/dist/{dom-to-png-0WSGIcUV.js → dom-to-png-CjxHTZgX.js} +1 -1
- package/dist/{dom-to-png-CyVwBzNm.cjs → dom-to-png-fAhFmKHV.cjs} +1 -1
- package/dist/{img-DqK-SXIP.cjs → img-Ds_hWTTu.cjs} +1 -1
- package/dist/{img-BT-UmGcu.js → img-w_iFTYRY.js} +1 -1
- package/dist/{index-hMo72hAq.js → index-Co5UfCMK.js} +275 -257
- package/dist/index-Dy2-pNb6.cjs +9 -0
- package/dist/{pdf-G7o-GM_m.js → pdf-BfkOvZWw.js} +1 -1
- package/dist/{pdf-DY3kwqSx.cjs → pdf-CCdcXY_7.cjs} +1 -1
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.cts +54 -0
- package/dist/types/vue-data-ui.d.ts +54 -0
- package/dist/{useNestedProp-DhEaBTgF.js → useNestedProp-C22WP03t.js} +1 -1
- package/dist/{useNestedProp-DcWhlk8h.cjs → useNestedProp-DQ8Jt3-Y.cjs} +1 -1
- package/dist/{usePrinter-B4ojFS2B.cjs → usePrinter-BQEYwy4a.cjs} +1 -1
- package/dist/{usePrinter-D2z-bUtX.js → usePrinter-D_wgo-7k.js} +3 -3
- package/dist/{vue-data-ui-BTkU5knB.js → vue-data-ui-C18HDIa2.js} +62 -62
- package/dist/{vue-data-ui-BR4hs3ky.cjs → vue-data-ui-zmg06AF1.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-Cx2zND3j.cjs → vue-ui-3d-bar-C_gJuhTV.cjs} +1 -1
- package/dist/{vue-ui-3d-bar-DD3_LLbq.js → vue-ui-3d-bar-SB6p5amV.js} +9 -9
- package/dist/{vue-ui-accordion-CHMdpjnX.js → vue-ui-accordion-CfB_jW1X.js} +3 -3
- package/dist/{vue-ui-accordion-DUGBjyB1.cjs → vue-ui-accordion-dVGUWjXH.cjs} +1 -1
- package/dist/{vue-ui-age-pyramid-WpMKbqUM.cjs → vue-ui-age-pyramid-DZ_ajGY_.cjs} +1 -1
- package/dist/{vue-ui-age-pyramid-CUS2cIAl.js → vue-ui-age-pyramid-G8ggvkGU.js} +10 -10
- package/dist/{vue-ui-annotator-B5VYzARK.cjs → vue-ui-annotator-BkZat_7T.cjs} +1 -1
- package/dist/{vue-ui-annotator-Ckyjvy1h.js → vue-ui-annotator-DeoWv4A3.js} +2 -2
- package/dist/{vue-ui-bullet-i97qMAx7.js → vue-ui-bullet-CvjS0_Pz.js} +8 -8
- package/dist/{vue-ui-bullet-Clccjys0.cjs → vue-ui-bullet-D9jaszdm.cjs} +1 -1
- package/dist/{vue-ui-candlestick-B35fn-Jo.cjs → vue-ui-candlestick-gnsNiFI3.cjs} +1 -1
- package/dist/{vue-ui-candlestick-Dmu21ktX.js → vue-ui-candlestick-xBYW3oOn.js} +11 -11
- package/dist/{vue-ui-carousel-table-cvW3wpY7.js → vue-ui-carousel-table-BKQIWhzt.js} +4 -4
- package/dist/{vue-ui-carousel-table-23ggTo5D.cjs → vue-ui-carousel-table-DNW8HJNv.cjs} +1 -1
- package/dist/{vue-ui-chestnut-CZpShJyS.js → vue-ui-chestnut-C5RprHfl.js} +8 -8
- package/dist/{vue-ui-chestnut-CkuDV8dp.cjs → vue-ui-chestnut-D9UKh8la.cjs} +1 -1
- package/dist/{vue-ui-circle-pack-B6d9PjE2.js → vue-ui-circle-pack-Cx4gGG1K.js} +9 -9
- package/dist/{vue-ui-circle-pack-C2IQV5_6.cjs → vue-ui-circle-pack-OTXbeD89.cjs} +1 -1
- package/dist/{vue-ui-cursor-CZBmEqOC.cjs → vue-ui-cursor-BuEDX1kV.cjs} +1 -1
- package/dist/{vue-ui-cursor-CG4bTWjj.js → vue-ui-cursor-Cdvi-0lD.js} +2 -2
- package/dist/{vue-ui-dashboard-D-95GOHa.cjs → vue-ui-dashboard-BAPaHtqr.cjs} +1 -1
- package/dist/{vue-ui-dashboard-DqM_deY-.js → vue-ui-dashboard-BLHl6FJI.js} +62 -62
- package/dist/{vue-ui-digits-CKpey7p1.js → vue-ui-digits-CCAt8_aJ.js} +2 -2
- package/dist/{vue-ui-digits-Cdauuy8X.cjs → vue-ui-digits-YV4qxb86.cjs} +1 -1
- package/dist/{vue-ui-donut-j519aqqU.cjs → vue-ui-donut-BvjPFjpd.cjs} +1 -1
- package/dist/{vue-ui-donut-Dp2Yy4fh.js → vue-ui-donut-CNZIha3Z.js} +12 -12
- package/dist/{vue-ui-donut-evolution-ClL_5jhm.js → vue-ui-donut-evolution-DNhwy9qU.js} +11 -11
- package/dist/{vue-ui-donut-evolution-Cg1VnagT.cjs → vue-ui-donut-evolution-Dxx5Psl4.cjs} +1 -1
- package/dist/{vue-ui-dumbbell-C8tOQUbs.js → vue-ui-dumbbell-BmRkAtBK.js} +10 -10
- package/dist/{vue-ui-dumbbell-CNJ9en-A.cjs → vue-ui-dumbbell-MGMSs7vG.cjs} +1 -1
- package/dist/vue-ui-flow-B3t_sNr4.cjs +3 -0
- package/dist/vue-ui-flow-CxhJwDZa.js +767 -0
- package/dist/{vue-ui-funnel-CfxmaNEA.js → vue-ui-funnel-CJHKcUDg.js} +9 -9
- package/dist/{vue-ui-funnel-DbVCaDxm.cjs → vue-ui-funnel-twMmn36_.cjs} +1 -1
- package/dist/{vue-ui-galaxy-zBDItFVz.cjs → vue-ui-galaxy-BjBTNZ6j.cjs} +1 -1
- package/dist/{vue-ui-galaxy-dm_p5xAR.js → vue-ui-galaxy-CDonLoXv.js} +11 -11
- package/dist/{vue-ui-gauge-DwwvbGca.js → vue-ui-gauge-C7L0uVvx.js} +7 -7
- package/dist/{vue-ui-gauge-Dr-7ojj9.cjs → vue-ui-gauge-DXadxMZn.cjs} +1 -1
- package/dist/{vue-ui-gizmo-Cq0SpTfm.js → vue-ui-gizmo-C9JuTLL-.js} +3 -3
- package/dist/{vue-ui-gizmo-CB5NfNit.cjs → vue-ui-gizmo-u7ypeW6n.cjs} +1 -1
- package/dist/{vue-ui-heatmap-DtRSx7DO.cjs → vue-ui-heatmap-Cjckqsrg.cjs} +1 -1
- package/dist/{vue-ui-heatmap-DNSOppoO.js → vue-ui-heatmap-DaAgigHH.js} +10 -10
- package/dist/{vue-ui-history-plot-r9eLYJCe.js → vue-ui-history-plot-KoGpnC64.js} +11 -11
- package/dist/{vue-ui-history-plot-BvC3L9g3.cjs → vue-ui-history-plot-YLMX8PqM.cjs} +1 -1
- package/dist/{vue-ui-kpi-BBpxo07S.js → vue-ui-kpi-DNUDGlWM.js} +3 -3
- package/dist/{vue-ui-kpi-raHWFHjI.cjs → vue-ui-kpi-GZlFX5zg.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-CGtQXPzk.js → vue-ui-mini-loader-9YvdM0_A.js} +2 -2
- package/dist/{vue-ui-mini-loader-STx0NSvX.cjs → vue-ui-mini-loader-D1HhmCbC.cjs} +1 -1
- package/dist/{vue-ui-molecule-EYSvyl-h.js → vue-ui-molecule-B71fJREj.js} +11 -11
- package/dist/{vue-ui-molecule-B4WJo2V5.cjs → vue-ui-molecule-DDsKb9re.cjs} +1 -1
- package/dist/{vue-ui-mood-radar-CfHUyyMY.cjs → vue-ui-mood-radar-BO4yaBxo.cjs} +1 -1
- package/dist/{vue-ui-mood-radar-Crk-XB3O.js → vue-ui-mood-radar-DH4RYmdT.js} +11 -11
- package/dist/{vue-ui-nested-donuts-DRJZT5Bv.cjs → vue-ui-nested-donuts-BlxuqLPb.cjs} +2 -2
- package/dist/{vue-ui-nested-donuts-Rm4P3uEP.js → vue-ui-nested-donuts-bOXvQ01U.js} +12 -12
- package/dist/{vue-ui-onion-Bgvs96ms.cjs → vue-ui-onion-BugH4ThJ.cjs} +1 -1
- package/dist/{vue-ui-onion-Dzl_kjlE.js → vue-ui-onion-D7VhEicc.js} +11 -11
- package/dist/{vue-ui-parallel-coordinate-plot-98c0XRsu.js → vue-ui-parallel-coordinate-plot-Bc5Yr0Yr.js} +12 -12
- package/dist/{vue-ui-parallel-coordinate-plot-YuLiWTox.cjs → vue-ui-parallel-coordinate-plot-DjTMM1Zt.cjs} +1 -1
- package/dist/{vue-ui-quadrant-CiqJKJu1.cjs → vue-ui-quadrant-Dni5Lkhg.cjs} +1 -1
- package/dist/{vue-ui-quadrant-Dd1ryxBx.js → vue-ui-quadrant-PrjG5beo.js} +12 -12
- package/dist/{vue-ui-quick-chart-CTsvK-CY.js → vue-ui-quick-chart-C46V8Ffa.js} +9 -9
- package/dist/{vue-ui-quick-chart-DMceIo39.cjs → vue-ui-quick-chart-LuGKbIvU.cjs} +1 -1
- package/dist/{vue-ui-radar-CHYpedpk.js → vue-ui-radar-05pd47HM.js} +12 -12
- package/dist/{vue-ui-radar-Dp8-SmYd.cjs → vue-ui-radar-j2Vgot8p.cjs} +1 -1
- package/dist/{vue-ui-rating-DSsm92zG.js → vue-ui-rating-Bl_q3TYs.js} +2 -2
- package/dist/{vue-ui-rating-uVphq_sK.cjs → vue-ui-rating-ClxiMhPq.cjs} +1 -1
- package/dist/{vue-ui-relation-circle-BPVBRieo.js → vue-ui-relation-circle-Bu5eYbEg.js} +7 -7
- package/dist/{vue-ui-relation-circle-46wKUZTv.cjs → vue-ui-relation-circle-BuoQTWw_.cjs} +1 -1
- package/dist/{vue-ui-ridgeline-B6GA2tXb.js → vue-ui-ridgeline-D4ot7MF8.js} +12 -12
- package/dist/{vue-ui-ridgeline-OULIMr6I.cjs → vue-ui-ridgeline-ESRn_Q1y.cjs} +1 -1
- package/dist/{vue-ui-rings-HVHIYYrh.cjs → vue-ui-rings-D7o_vleu.cjs} +1 -1
- package/dist/{vue-ui-rings-Cl-607b8.js → vue-ui-rings-Dyl5VV9I.js} +12 -12
- package/dist/{vue-ui-scatter-BZ4DPyoL.cjs → vue-ui-scatter-B31kZz0w.cjs} +1 -1
- package/dist/{vue-ui-scatter-ClYbim5F.js → vue-ui-scatter-njuULIsD.js} +12 -12
- package/dist/{vue-ui-skeleton-C3t9bL6f.js → vue-ui-skeleton-BSlYUHZA.js} +3 -3
- package/dist/{vue-ui-skeleton-C954hFY-.cjs → vue-ui-skeleton-Db7PiDqL.cjs} +1 -1
- package/dist/{vue-ui-smiley-DsKnKBFv.js → vue-ui-smiley-BmNRkSub.js} +2 -2
- package/dist/{vue-ui-smiley-BBGCa2S0.cjs → vue-ui-smiley-CfdbRWq6.cjs} +1 -1
- package/dist/{vue-ui-spark-trend-Da-HE7x2.js → vue-ui-spark-trend-B0Xvu1YP.js} +5 -5
- package/dist/{vue-ui-spark-trend-CBa0FhIy.cjs → vue-ui-spark-trend-CwtYlUEX.cjs} +1 -1
- package/dist/{vue-ui-sparkbar-CUul3e3U.cjs → vue-ui-sparkbar-Xy7idkhv.cjs} +1 -1
- package/dist/{vue-ui-sparkbar-DgQxbUeJ.js → vue-ui-sparkbar-e2-8wHQH.js} +4 -4
- package/dist/{vue-ui-sparkgauge-BKA5GnGO.js → vue-ui-sparkgauge-_cMBBl3V.js} +4 -4
- package/dist/{vue-ui-sparkgauge-DYPVqz6I.cjs → vue-ui-sparkgauge-vjcDqzGe.cjs} +1 -1
- package/dist/{vue-ui-sparkhistogram-CNN9tXh1.cjs → vue-ui-sparkhistogram-BpD6XxfA.cjs} +1 -1
- package/dist/{vue-ui-sparkhistogram-CdZy4SfH.js → vue-ui-sparkhistogram-DUyGQgqZ.js} +5 -5
- package/dist/{vue-ui-sparkline-DCNNoruu.js → vue-ui-sparkline-D1wfG3Yw.js} +4 -4
- package/dist/{vue-ui-sparkline-BCP4gyTp.cjs → vue-ui-sparkline-cPPxz94c.cjs} +1 -1
- package/dist/{vue-ui-sparkstackbar-BAXGFcPk.js → vue-ui-sparkstackbar-BCTx016Z.js} +5 -5
- package/dist/{vue-ui-sparkstackbar-sgehFSit.cjs → vue-ui-sparkstackbar-iRVpx_xT.cjs} +1 -1
- package/dist/{vue-ui-stackbar-Cto9A9WG.js → vue-ui-stackbar--QKW68d6.js} +13 -13
- package/dist/{vue-ui-stackbar-87l909wS.cjs → vue-ui-stackbar-DCotybpB.cjs} +1 -1
- package/dist/{vue-ui-strip-plot-C0F8_S_g.js → vue-ui-strip-plot-BhLBOV7s.js} +11 -11
- package/dist/{vue-ui-strip-plot-Deegqmms.cjs → vue-ui-strip-plot-CdceC4jP.cjs} +1 -1
- package/dist/{vue-ui-table-BUxFdYM7.cjs → vue-ui-table-Cd9UeZXy.cjs} +1 -1
- package/dist/{vue-ui-table-1vUkkwSp.js → vue-ui-table-DjDENKmJ.js} +3 -3
- package/dist/{vue-ui-table-heatmap-PPGfjMxh.js → vue-ui-table-heatmap-CZdiE-l3.js} +4 -4
- package/dist/{vue-ui-table-heatmap-uDH3owRO.cjs → vue-ui-table-heatmap-gbdWhEG_.cjs} +1 -1
- package/dist/{vue-ui-table-sparkline-CPSlJVB1.cjs → vue-ui-table-sparkline-BFQ4DQRu.cjs} +1 -1
- package/dist/{vue-ui-table-sparkline-D9LEgrxj.js → vue-ui-table-sparkline-zGotm14D.js} +5 -5
- package/dist/{vue-ui-thermometer-D8P88pea.cjs → vue-ui-thermometer-CRhrvWm0.cjs} +1 -1
- package/dist/{vue-ui-thermometer-BxngpuEZ.js → vue-ui-thermometer-DA3KgSw1.js} +7 -7
- package/dist/{vue-ui-timer-B_dh6otW.cjs → vue-ui-timer-DnXYrfrB.cjs} +1 -1
- package/dist/{vue-ui-timer-C3dxY--Q.js → vue-ui-timer-ult9htF3.js} +5 -5
- package/dist/{vue-ui-tiremarks-_oZ6wL6K.js → vue-ui-tiremarks-CRXtVmEM.js} +7 -7
- package/dist/{vue-ui-tiremarks-mISKtpmD.cjs → vue-ui-tiremarks-Dht-uT9E.cjs} +1 -1
- package/dist/{vue-ui-treemap-D5Dcd84h.js → vue-ui-treemap-Ck5tHVnE.js} +12 -12
- package/dist/{vue-ui-treemap-CZZXcX0f.cjs → vue-ui-treemap-pbhS4FfC.cjs} +1 -1
- package/dist/{vue-ui-vertical-bar-C-KAVKXj.cjs → vue-ui-vertical-bar-BZjsolLB.cjs} +1 -1
- package/dist/{vue-ui-vertical-bar-CtWXk6co.js → vue-ui-vertical-bar-egz76l34.js} +12 -12
- package/dist/{vue-ui-waffle-C9qyTIzz.cjs → vue-ui-waffle-C7za7d0u.cjs} +1 -1
- package/dist/{vue-ui-waffle-BD2GnRkO.js → vue-ui-waffle-CrMkCjJJ.js} +12 -12
- package/dist/{vue-ui-wheel-CKfr_7kH.cjs → vue-ui-wheel-DIgPyNrB.cjs} +1 -1
- package/dist/{vue-ui-wheel-HydW49fo.js → vue-ui-wheel-DzMpr4xY.js} +7 -7
- package/dist/{vue-ui-word-cloud-C4ISeFpy.cjs → vue-ui-word-cloud-CNqAz548.cjs} +1 -1
- package/dist/{vue-ui-word-cloud-C9Pbi6ey.js → vue-ui-word-cloud-TS3az-LK.js} +10 -10
- package/dist/{vue-ui-world-D-AsGwlW.js → vue-ui-world-D3X01xYB.js} +11 -11
- package/dist/{vue-ui-world-BlAD3UPb.cjs → vue-ui-world-DMdqTY5G.cjs} +1 -1
- package/dist/{vue-ui-xy-CS-xjZVI.cjs → vue-ui-xy-CF87Afh2.cjs} +2 -2
- package/dist/{vue-ui-xy-canvas-Dd7IFwSK.cjs → vue-ui-xy-canvas-2IL8lPL4.cjs} +1 -1
- package/dist/{vue-ui-xy-canvas-DtKI-IQA.js → vue-ui-xy-canvas-BHeV-3t9.js} +12 -12
- package/dist/{vue-ui-xy-CMw6P4C0.js → vue-ui-xy-tIBPr8r8.js} +16 -16
- package/package.json +1 -1
- package/dist/index-Cai0fWP7.cjs +0 -9
- package/dist/vue-ui-flow-BYypzs-j.cjs +0 -1
- package/dist/vue-ui-flow-Ouw_lvpb.js +0 -550
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("./index-Dy2-pNb6.cjs"),B=require("./useNestedProp-DQ8Jt3-Y.cjs"),C=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),_={key:0,class:"vue-ui-rating-title",style:{width:"100%"}},R=["xmlns","stroke"],L={id:"vueUiSmiley0"},H=["stop-color"],X=["stop-color"],j=["fill"],D=["stroke"],U=["xmlns","viewBox","stroke"],G={id:"vueUiSmiley0"},A=["stop-color"],Y=["stop-color"],K=["fill"],T=["viewBox","stroke"],O=["xmlns","stroke"],F={id:"vueUiSmiley1"},I=["stop-color"],q=["stop-color"],P=["fill"],J=["xmlns","stroke"],Q=["xmlns","viewBox","stroke"],W={id:"vueUiSmiley1"},Z=["stop-color"],ee=["stop-color"],te=["fill"],le=["viewBox","stroke"],oe=["xmlns","stroke"],ae={id:"vueUiSmiley2"},ne=["stop-color"],ie=["stop-color"],se=["fill"],re=["xmlns","stroke"],de=["xmlns","viewBox","stroke"],ue={id:"vueUiSmiley2"},pe=["stop-color"],ve=["stop-color"],ye=["fill"],ce=["xmlns","viewBox","stroke"],fe=["xmlns","stroke"],me={id:"vueUiSmiley3"},he=["stop-color"],ke=["stop-color"],ge=["fill"],be=["xmlns","stroke"],xe=["xmlns","viewBox","stroke"],Ne={id:"vueUiSmiley3"},Ve=["stop-color"],ze=["stop-color"],Ee=["fill"],$e=["xmlns","viewBox","stroke"],Se=["xmlns","stroke"],we={id:"vueUiSmiley4"},Me=["stop-color"],Be=["stop-color"],Ce=["fill"],_e=["xmlns","stroke"],Re=["xmlns","viewBox","stroke"],Le={id:"vueUiSmiley4"},He=["stop-color"],Xe=["stop-color"],je=["fill"],De=["xmlns","viewBox","stroke"],Ue={__name:"vue-ui-smiley",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},emits:["rate"],setup(g,{expose:b,emit:x}){const{vue_ui_smiley:N}=o.useConfig(),i=g,V=e.useSlots();e.onMounted(()=>{V["chart-background"]&&console.warn("VueUiSmiley does not support the #chart-background slot.")}),e.onMounted(()=>{c()});function c(){(!Object.hasOwn(i.dataset,"rating")||o.objectIsEmpty(i.dataset))&&o.error({componentName:"VueUiSmiley",type:"datasetAttribute",property:"rating"})}const f=e.ref(!1),s=e.ref(void 0),z=x,t=e.computed({get:()=>m(),set:n=>n});function m(){return B.useNestedProp({userConfig:i.config,defaultConfig:N})}e.watch(()=>i.config,n=>{t.value=m(),c()},{deep:!0});const E=e.computed(()=>typeof i.dataset.rating=="object"&&!Array.isArray(i.dataset.rating)?$(i.dataset.rating):i.dataset.rating||null),y=e.computed(()=>typeof i.dataset.rating=="object"&&!Array.isArray(i.dataset.rating)),r=e.ref(E.value),d=e.computed(()=>t.value.readonly);function $(n){if(n===null)return null;let l=0,a=0;for(const h in n){const M=parseInt(h),k=n[h];l+=M*k,a+=k}return a===0?0:l/a}function p(n){const l=r.value-n,a=24;switch(!0){case l<0:return 0;case l>1:return 1*a;default:return l*a}}function v(n){d.value||(r.value=n,z("rate",n))}function S(){return r.value}function w(n=!0){d.value=n}b({getData:S,toggleReadonly:w});function u(n){return t.value.readonly?t.value.style.colors.inactive[n]:r.value===n+1?t.value.style.icons.useGradient&&t.value.style.icons.filled?`url(#vueUiSmiley${n})`:t.value.style.colors.active[n]:s.value!==void 0&&s.value===n?t.value.style.icons.useGradient&&t.value.style.icons.filled?`url(#vueUiSmiley${n})`:t.value.style.colors.active[n]:t.value.style.colors.inactive[n]}return(n,l)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-smiley",style:e.normalizeStyle(`background:${t.value.style.backgroundColor};font-family:${t.value.style.fontFamily};width:100%;`),onMouseover:l[20]||(l[20]=a=>f.value=!0),onMouseleave:l[21]||(l[21]=a=>{f.value=!1,s.value=void 0})},[t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",_,[e.createElementVNode("div",{style:e.normalizeStyle(`color:${t.value.style.title.color};font-weight:${t.value.style.title.bold?"bold":"normal"};text-align:${t.value.style.title.textAlign};margin-bottom:${t.value.style.title.offsetY}px;font-size:${t.value.style.title.fontSize}px`)},e.toDisplayString(t.value.style.title.text),5),t.value.style.title.subtitle.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`color:${t.value.style.title.subtitle.color};font-size:${t.value.style.title.subtitle.fontSize}px;text-align:${t.value.style.title.textAlign};margin-bottom:${t.value.style.title.subtitle.offsetY}px;font-weight:${t.value.style.title.subtitle.bold?"bold":"normal"}`)},e.toDisplayString(t.value.style.title.subtitle.text),5)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.value.style.rating.show&&t.value.style.rating.position==="top"?(e.openBlock(),e.createElementBlock("div",{key:1,style:e.normalizeStyle(`width:100%;text-align:center;margin-bottom:${t.value.style.rating.offsetY}px;font-size:${t.value.style.rating.fontSize}px;font-weight:${t.value.style.rating.bold?"bold":"normal"};margin-left:${t.value.style.rating.offsetX}px`)},e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.rating.formatter,r.value,e.unref(o.dataLabel)({v:r.value,r:t.value.style.rating.roundingValue}),t.value)),5)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"vue-ui-smiley-wrapper",style:e.normalizeStyle(`overflow:visible;height:${t.value.style.itemSize}px;width:fit-content;margin:0 auto;display:flex;align-items:center;justify-content:center;`)},[t.value.style.rating.show&&t.value.style.rating.position==="left"?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`width:fit-content;text-align:center;margin-bottom:${t.value.style.rating.offsetY}px;font-size:${t.value.style.rating.fontSize}px;font-weight:${t.value.style.rating.bold?"bold":"normal"};padding-right:${t.value.style.rating.offsetX}px`)},e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.rating.formatter,r.value,e.unref(o.dataLabel)({v:r.value,r:t.value.style.rating.roundingValue}),t.value)),5)):e.createCommentVNode("",!0),e.createElementVNode("div",{tabindex:"0",class:e.normalizeClass({"vue-ui-smiley-rated":!t.value.readonly&&r.value===1}),style:e.normalizeStyle(`cursor:${t.value.readonly?"default":"pointer"};height:${t.value.style.itemSize}px;aspect-ratio:1/1;
|
|
2
2
|
position:relative`),onMouseenter:l[0]||(l[0]=a=>s.value=0),onMouseleave:l[1]||(l[1]=a=>s.value=void 0),onClick:l[2]||(l[2]=a=>v(1)),onKeyup:l[3]||(l[3]=e.withKeys(a=>v(1),["enter"]))},[t.value.style.tooltip.show&&y.value&&d.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"vue-ui-rating-tooltip",style:e.normalizeStyle(`border:1px solid ${t.value.style.tooltip.borderColor};position:absolute;top:${-48+t.value.style.tooltip.offsetY}px;left:50%;transform:translateX(-50%);width:fit-content;text-align:center;background:${t.value.style.tooltip.backgroundColor};display:${s.value===0?"block":"none"};padding:2px 12px;border-radius:${t.value.style.tooltip.borderRadius}px;box-shadow:${t.value.style.tooltip.boxShadow}`)},[e.createElementVNode("div",{style:e.normalizeStyle(`width:100%;display:flex;flex-direction:row;gap:6px;position:relative;text-align:center;color:${t.value.style.tooltip.color}`)},[e.createElementVNode("span",{style:e.normalizeStyle(`font-size:${t.value.style.tooltip.fontSize}px`)},"1:",4),l[22]||(l[22]=e.createTextVNode()),e.createElementVNode("span",{style:e.normalizeStyle(`font-weight:${t.value.style.tooltip.bold?"bold":"normal"};font-size:${t.value.style.tooltip.fontSize}px`)},e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.tooltip.formatter,i.dataset.rating[1],e.unref(o.dataLabel)({v:i.dataset.rating[1],r:t.value.style.tooltip.roundingValue}),t.value)),5),e.createElementVNode("div",{style:e.normalizeStyle(`font-family:Arial !important;position:absolute;top:calc(100% - 4px);left:50%;transform:translateX(-50%);color:${t.value.style.tooltip.borderColor}`)}," ▼ ",4)],4)],4)):e.createCommentVNode("",!0),t.value.style.icons.filled?(e.openBlock(),e.createElementBlock("svg",{key:1,xmlns:e.unref(o.XMLNS),style:{transition:"all 0.1s ease-in-out",position:"absolute",top:"0",left:"0"},height:"100%",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:u(0),fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",L,[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(o.shiftHue)(t.value.style.colors.active[0],.05)},null,8,H),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.colors.active[0]},null,8,X)])]),l[23]||(l[23]=e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1)),e.createElementVNode("path",{d:"M17 3.34a10 10 0 1 1 -14.995 8.984l-.005 -.324l.005 -.324a10 10 0 0 1 14.995 -8.336zm-5 9.86a4.5 4.5 0 0 0 -3.214 1.35a1 1 0 1 0 1.428 1.4a2.5 2.5 0 0 1 3.572 0a1 1 0 0 0 1.428 -1.4a4.5 4.5 0 0 0 -3.214 -1.35zm-2.99 -4.2l-.127 .007a1 1 0 0 0 0 1.986l.117 .007l.127 -.007a1 1 0 0 0 0 -1.986l-.117 -.007zm6 0l-.127 .007a1 1 0 0 0 0 1.986l.117 .007l.127 -.007a1 1 0 0 0 0 -1.986l-.117 -.007z","stroke-width":"0",fill:u(0)},null,8,j)],8,R)):(e.openBlock(),e.createElementBlock("svg",{key:2,style:{position:"absolute",top:"0",left:"0",transition:"all 0.1s ease-in-out"},height:"100%",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:u(0),fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},l[24]||(l[24]=[e.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-dabd0325></path><path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" data-v-dabd0325></path><path d="M9 10l.01 0" data-v-dabd0325></path><path d="M15 10l.01 0" data-v-dabd0325></path><path d="M9.5 15.25a3.5 3.5 0 0 1 5 0" data-v-dabd0325></path>',5)]),8,D)),t.value.style.icons.filled&&d.value?(e.openBlock(),e.createElementBlock("svg",{key:3,xmlns:e.unref(o.XMLNS),style:{transition:"all 0.1s ease-in-out",position:"absolute",top:"0",left:"0"},height:"100%",viewBox:`0 0 ${p(0)} 24`,"stroke-width":"1.5",stroke:t.value.style.colors.activeReadonly[0],fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",G,[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(o.shiftHue)(t.value.style.colors.activeReadonly[0],.05)},null,8,A),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.colors.activeReadonly[0]},null,8,Y)])]),l[25]||(l[25]=e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1)),e.createElementVNode("path",{d:"M17 3.34a10 10 0 1 1 -14.995 8.984l-.005 -.324l.005 -.324a10 10 0 0 1 14.995 -8.336zm-5 9.86a4.5 4.5 0 0 0 -3.214 1.35a1 1 0 1 0 1.428 1.4a2.5 2.5 0 0 1 3.572 0a1 1 0 0 0 1.428 -1.4a4.5 4.5 0 0 0 -3.214 -1.35zm-2.99 -4.2l-.127 .007a1 1 0 0 0 0 1.986l.117 .007l.127 -.007a1 1 0 0 0 0 -1.986l-.117 -.007zm6 0l-.127 .007a1 1 0 0 0 0 1.986l.117 .007l.127 -.007a1 1 0 0 0 0 -1.986l-.117 -.007z","stroke-width":"0",fill:t.value.style.icons.useGradient?"url(#vueUiSmiley0)":t.value.style.colors.activeReadonly[0]},null,8,K)],8,U)):e.createCommentVNode("",!0),!t.value.style.icons.filled&&d.value?(e.openBlock(),e.createElementBlock("svg",{key:4,style:{position:"absolute",top:"0",left:"0",transition:"all 0.1s ease-in-out"},height:"100%",viewBox:`0 0 ${p(0)} 24`,"stroke-width":"1.5",stroke:t.value.style.colors.activeReadonly[0],fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},l[26]||(l[26]=[e.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-dabd0325></path><path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" data-v-dabd0325></path><path d="M9 10l.01 0" data-v-dabd0325></path><path d="M15 10l.01 0" data-v-dabd0325></path><path d="M9.5 15.25a3.5 3.5 0 0 1 5 0" data-v-dabd0325></path>',5)]),8,T)):e.createCommentVNode("",!0)],38),e.createElementVNode("div",{tabindex:"0",class:e.normalizeClass({"vue-ui-smiley-rated":!t.value.readonly&&r.value===2}),style:e.normalizeStyle(`cursor:${t.value.readonly?"default":"pointer"};height:${t.value.style.itemSize}px;aspect-ratio:1/1;position:relative`),onMouseenter:l[4]||(l[4]=a=>s.value=1),onMouseleave:l[5]||(l[5]=a=>s.value=void 0),onClick:l[6]||(l[6]=a=>v(2)),onKeyup:l[7]||(l[7]=e.withKeys(a=>v(2),["enter"]))},[t.value.style.tooltip.show&&y.value&&d.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"vue-ui-rating-tooltip",style:e.normalizeStyle(`border:1px solid ${t.value.style.tooltip.borderColor};position:absolute;top:${-48+t.value.style.tooltip.offsetY}px;left:50%;transform:translateX(-50%);width:fit-content;text-align:center;background:${t.value.style.tooltip.backgroundColor};display:${s.value===1?"block":"none"};padding:2px 12px;border-radius:${t.value.style.tooltip.borderRadius}px;box-shadow:${t.value.style.tooltip.boxShadow}`)},[e.createElementVNode("div",{style:e.normalizeStyle(`width:100%;display:flex;flex-direction:row;gap:6px;position:relative;text-align:center;color:${t.value.style.tooltip.color}`)},[e.createElementVNode("span",{style:e.normalizeStyle(`font-size:${t.value.style.tooltip.fontSize}px`)},"2:",4),l[27]||(l[27]=e.createTextVNode()),e.createElementVNode("span",{style:e.normalizeStyle(`font-weight:${t.value.style.tooltip.bold?"bold":"normal"};font-size:${t.value.style.tooltip.fontSize}px`)},e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.tooltip.formatter,i.dataset.rating[2],e.unref(o.dataLabel)({v:i.dataset.rating[2],r:t.value.style.tooltip.roundingValue}),t.value)),5),e.createElementVNode("div",{style:e.normalizeStyle(`font-family:Arial !important;position:absolute;top:calc(100% - 4px);left:50%;transform:translateX(-50%);color:${t.value.style.tooltip.borderColor}`)}," ▼ ",4)],4)],4)):e.createCommentVNode("",!0),t.value.style.icons.filled?(e.openBlock(),e.createElementBlock("svg",{key:1,xmlns:e.unref(o.XMLNS),style:{position:"absolute",top:"0",left:"0",transition:"all 0.1s ease-in-out"},height:"100%",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:u(1),fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",F,[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(o.shiftHue)(t.value.style.colors.active[1],.05)},null,8,I),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.colors.active[1]},null,8,q)])]),l[28]||(l[28]=e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1)),e.createElementVNode("path",{d:"M17 3.34a10 10 0 1 1 -14.995 8.984l-.005 -.324l.005 -.324a10 10 0 0 1 14.995 -8.336zm-2 10.66h-6l-.117 .007a1 1 0 0 0 0 1.986l.117 .007h6l.117 -.007a1 1 0 0 0 0 -1.986l-.117 -.007zm-5.99 -5l-.127 .007a1 1 0 0 0 0 1.986l.117 .007l.127 -.007a1 1 0 0 0 0 -1.986l-.117 -.007zm6 0l-.127 .007a1 1 0 0 0 0 1.986l.117 .007l.127 -.007a1 1 0 0 0 0 -1.986l-.117 -.007z","stroke-width":"0",fill:u(1)},null,8,P)],8,O)):(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(o.XMLNS),style:{position:"absolute",top:"0",left:"0",transition:"all 0.1s ease-in-out"},height:"100%",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:u(1),fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},l[29]||(l[29]=[e.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-dabd0325></path><path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" data-v-dabd0325></path><path d="M9 10l.01 0" data-v-dabd0325></path><path d="M15 10l.01 0" data-v-dabd0325></path><path d="M9 15l6 0" data-v-dabd0325></path>',5)]),8,J)),t.value.style.icons.filled&&d.value?(e.openBlock(),e.createElementBlock("svg",{key:3,xmlns:e.unref(o.XMLNS),style:{position:"absolute",top:"0",left:"0",transition:"all 0.1s ease-in-out"},height:"100%",viewBox:`0 0 ${p(1)} 24`,"stroke-width":"1.5",stroke:t.value.style.colors.activeReadonly[1],fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",W,[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(o.shiftHue)(t.value.style.colors.activeReadonly[1],.05)},null,8,Z),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.colors.activeReadonly[1]},null,8,ee)])]),l[30]||(l[30]=e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1)),e.createElementVNode("path",{d:"M17 3.34a10 10 0 1 1 -14.995 8.984l-.005 -.324l.005 -.324a10 10 0 0 1 14.995 -8.336zm-2 10.66h-6l-.117 .007a1 1 0 0 0 0 1.986l.117 .007h6l.117 -.007a1 1 0 0 0 0 -1.986l-.117 -.007zm-5.99 -5l-.127 .007a1 1 0 0 0 0 1.986l.117 .007l.127 -.007a1 1 0 0 0 0 -1.986l-.117 -.007zm6 0l-.127 .007a1 1 0 0 0 0 1.986l.117 .007l.127 -.007a1 1 0 0 0 0 -1.986l-.117 -.007z","stroke-width":"0",fill:t.value.style.icons.useGradient?"url(#vueUiSmiley1)":t.value.style.colors.activeReadonly[1]},null,8,te)],8,Q)):e.createCommentVNode("",!0),!t.value.style.icons.filled&&d.value?(e.openBlock(),e.createElementBlock("svg",{key:4,style:{position:"absolute",top:"0",left:"0",transition:"all 0.1s ease-in-out"},height:"100%",viewBox:`0 0 ${p(1)} 24`,"stroke-width":"1.5",stroke:t.value.style.colors.activeReadonly[1],fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},l[31]||(l[31]=[e.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-dabd0325></path><path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" data-v-dabd0325></path><path d="M9 10l.01 0" data-v-dabd0325></path><path d="M15 10l.01 0" data-v-dabd0325></path><path d="M9 15l6 0" data-v-dabd0325></path>',5)]),8,le)):e.createCommentVNode("",!0)],38),e.createElementVNode("div",{tabindex:"0",class:e.normalizeClass({"vue-ui-smiley-rated":!t.value.readonly&&r.value===3}),style:e.normalizeStyle(`cursor:${t.value.readonly?"default":"pointer"};height:${t.value.style.itemSize}px;aspect-ratio:1/1;position:relative`),onMouseenter:l[8]||(l[8]=a=>s.value=2),onMouseleave:l[9]||(l[9]=a=>s.value=void 0),onClick:l[10]||(l[10]=a=>v(3)),onKeyup:l[11]||(l[11]=e.withKeys(a=>v(3),["enter"]))},[t.value.style.tooltip.show&&y.value&&d.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"vue-ui-rating-tooltip",style:e.normalizeStyle(`border:1px solid ${t.value.style.tooltip.borderColor};position:absolute;top:${-48+t.value.style.tooltip.offsetY}px;left:50%;transform:translateX(-50%);width:fit-content;text-align:center;background:${t.value.style.tooltip.backgroundColor};display:${s.value===2?"block":"none"};padding:2px 12px;border-radius:${t.value.style.tooltip.borderRadius}px;box-shadow:${t.value.style.tooltip.boxShadow}`)},[e.createElementVNode("div",{style:e.normalizeStyle(`width:100%;display:flex;flex-direction:row;gap:6px;position:relative;text-align:center;color:${t.value.style.tooltip.color}`)},[e.createElementVNode("span",{style:e.normalizeStyle(`font-size:${t.value.style.tooltip.fontSize}px`)},"3:",4),l[32]||(l[32]=e.createTextVNode()),e.createElementVNode("span",{style:e.normalizeStyle(`font-weight:${t.value.style.tooltip.bold?"bold":"normal"};font-size:${t.value.style.tooltip.fontSize}px`)},e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.tooltip.formatter,i.dataset.rating[3],e.unref(o.dataLabel)({v:i.dataset.rating[3],r:t.value.style.tooltip.roundingValue}),t.value)),5),e.createElementVNode("div",{style:e.normalizeStyle(`font-family:Arial !important;position:absolute;top:calc(100% - 4px);left:50%;transform:translateX(-50%);color:${t.value.style.tooltip.borderColor}`)}," ▼ ",4)],4)],4)):e.createCommentVNode("",!0),t.value.style.icons.filled?(e.openBlock(),e.createElementBlock("svg",{key:1,xmlns:e.unref(o.XMLNS),style:{position:"absolute",top:"0",left:"0",transition:"all 0.1s ease-in-out"},height:"100%",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:u(2),fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",ae,[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(o.shiftHue)(t.value.style.colors.activeReadonly[2],.05)},null,8,ne),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.colors.activeReadonly[2]},null,8,ie)])]),l[33]||(l[33]=e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1)),e.createElementVNode("path",{d:"M17 3.34a10 10 0 1 1 -14.995 8.984l-.005 -.324l.005 -.324a10 10 0 0 1 14.995 -8.336zm-7.99 5.66l-.127 .007a1 1 0 0 0 0 1.986l.117 .007l.127 -.007a1 1 0 0 0 0 -1.986l-.117 -.007zm6 0l-.127 .007a1 1 0 0 0 0 1.986l.117 .007l.127 -.007a1 1 0 0 0 0 -1.986l-.117 -.007z","stroke-width":"0",fill:u(2)},null,8,se)],8,oe)):(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(o.XMLNS),style:{position:"absolute",top:"0",left:"0",transition:"all 0.1s ease-in-out"},height:"100%",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:u(2),fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},l[34]||(l[34]=[e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),e.createElementVNode("path",{d:"M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"},null,-1),e.createElementVNode("path",{d:"M9 10l.01 0"},null,-1),e.createElementVNode("path",{d:"M15 10l.01 0"},null,-1)]),8,re)),t.value.style.icons.filled&&d.value?(e.openBlock(),e.createElementBlock("svg",{key:3,xmlns:e.unref(o.XMLNS),style:{position:"absolute",top:"0",left:"0",transition:"all 0.1s ease-in-out"},height:"100%",viewBox:`0 0 ${p(2)} 24`,"stroke-width":"1.5",stroke:t.value.style.colors.activeReadonly[2],fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[l[35]||(l[35]=e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1)),e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",ue,[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(o.shiftHue)(t.value.style.colors.activeReadonly[2],.05)},null,8,pe),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.colors.activeReadonly[2]},null,8,ve)])]),e.createElementVNode("path",{d:"M17 3.34a10 10 0 1 1 -14.995 8.984l-.005 -.324l.005 -.324a10 10 0 0 1 14.995 -8.336zm-7.99 5.66l-.127 .007a1 1 0 0 0 0 1.986l.117 .007l.127 -.007a1 1 0 0 0 0 -1.986l-.117 -.007zm6 0l-.127 .007a1 1 0 0 0 0 1.986l.117 .007l.127 -.007a1 1 0 0 0 0 -1.986l-.117 -.007z","stroke-width":"0",fill:t.value.style.icons.useGradient?"url(#vueUiSmiley2)":t.value.style.colors.activeReadonly[2]},null,8,ye)],8,de)):e.createCommentVNode("",!0),!t.value.style.icons.filled&&d.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(o.XMLNS),style:{position:"absolute",top:"0",left:"0",transition:"all 0.1s ease-in-out"},height:"100%",viewBox:`0 0 ${p(2)} 24`,"stroke-width":"1.5",stroke:t.value.style.colors.activeReadonly[2],fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},l[36]||(l[36]=[e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),e.createElementVNode("path",{d:"M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"},null,-1),e.createElementVNode("path",{d:"M9 10l.01 0"},null,-1),e.createElementVNode("path",{d:"M15 10l.01 0"},null,-1)]),8,ce)):e.createCommentVNode("",!0)],38),e.createElementVNode("div",{tabindex:"0",class:e.normalizeClass({"vue-ui-smiley-rated":!t.value.readonly&&r.value===4}),style:e.normalizeStyle(`cursor:${t.value.readonly?"default":"pointer"};height:${t.value.style.itemSize}px;aspect-ratio:1/1;position:relative`),onMouseenter:l[12]||(l[12]=a=>s.value=3),onMouseleave:l[13]||(l[13]=a=>s.value=void 0),onClick:l[14]||(l[14]=a=>v(4)),onKeyup:l[15]||(l[15]=e.withKeys(a=>v(4),["enter"]))},[t.value.style.tooltip.show&&y.value&&d.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"vue-ui-rating-tooltip",style:e.normalizeStyle(`border:1px solid ${t.value.style.tooltip.borderColor};position:absolute;top:${-48+t.value.style.tooltip.offsetY}px;left:50%;transform:translateX(-50%);width:fit-content;text-align:center;background:${t.value.style.tooltip.backgroundColor};display:${s.value===3?"block":"none"};padding:2px 12px;border-radius:${t.value.style.tooltip.borderRadius}px;box-shadow:${t.value.style.tooltip.boxShadow}`)},[e.createElementVNode("div",{style:e.normalizeStyle(`width:100%;display:flex;flex-direction:row;gap:6px;position:relative;text-align:center;color:${t.value.style.tooltip.color}`)},[e.createElementVNode("span",{style:e.normalizeStyle(`font-size:${t.value.style.tooltip.fontSize}px`)},"4:",4),l[37]||(l[37]=e.createTextVNode()),e.createElementVNode("span",{style:e.normalizeStyle(`font-weight:${t.value.style.tooltip.bold?"bold":"normal"};font-size:${t.value.style.tooltip.fontSize}px`)},e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.tooltip.formatter,i.dataset.rating[4],e.unref(o.dataLabel)({v:i.dataset.rating[4],r:t.value.style.tooltip.roundingValue}),t.value)),5),e.createElementVNode("div",{style:e.normalizeStyle(`font-family:Arial !important;position:absolute;top:calc(100% - 4px);left:50%;transform:translateX(-50%);color:${t.value.style.tooltip.borderColor}`)}," ▼ ",4)],4)],4)):e.createCommentVNode("",!0),t.value.style.icons.filled?(e.openBlock(),e.createElementBlock("svg",{key:1,xmlns:e.unref(o.XMLNS),style:{position:"absolute",top:"0",left:"0",transition:"all 0.1s ease-in-out"},height:"100%",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:u(3),fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",me,[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(o.shiftHue)(t.value.style.colors.activeReadonly[3],.95)},null,8,he),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.colors.activeReadonly[3]},null,8,ke)])]),l[38]||(l[38]=e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1)),e.createElementVNode("path",{d:"M17 3.34a10 10 0 1 1 -14.995 8.984l-.005 -.324l.005 -.324a10 10 0 0 1 14.995 -8.336zm-1.8 10.946a1 1 0 0 0 -1.414 .014a2.5 2.5 0 0 1 -3.572 0a1 1 0 0 0 -1.428 1.4a4.5 4.5 0 0 0 6.428 0a1 1 0 0 0 -.014 -1.414zm-6.19 -5.286l-.127 .007a1 1 0 0 0 .117 1.993l.127 -.007a1 1 0 0 0 -.117 -1.993zm6 0l-.127 .007a1 1 0 0 0 .117 1.993l.127 -.007a1 1 0 0 0 -.117 -1.993z","stroke-width":"0",fill:u(3)},null,8,ge)],8,fe)):(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(o.XMLNS),style:{position:"absolute",top:"0",left:"0",transition:"all 0.1s ease-in-out"},height:"100%",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:u(3),fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},l[39]||(l[39]=[e.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-dabd0325></path><path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" data-v-dabd0325></path><path d="M9 10l.01 0" data-v-dabd0325></path><path d="M15 10l.01 0" data-v-dabd0325></path><path d="M9.5 15a3.5 3.5 0 0 0 5 0" data-v-dabd0325></path>',5)]),8,be)),t.value.style.icons.filled&&d.value?(e.openBlock(),e.createElementBlock("svg",{key:3,xmlns:e.unref(o.XMLNS),style:{position:"absolute",top:"0",left:"0",transition:"all 0.1s ease-in-out"},height:"100%",viewBox:`0 0 ${p(3)} 24`,"stroke-width":"1.5",stroke:t.value.style.colors.activeReadonly[3],fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[l[40]||(l[40]=e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1)),e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",Ne,[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(o.shiftHue)(t.value.style.colors.activeReadonly[3],.95)},null,8,Ve),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.colors.activeReadonly[3]},null,8,ze)])]),e.createElementVNode("path",{d:"M17 3.34a10 10 0 1 1 -14.995 8.984l-.005 -.324l.005 -.324a10 10 0 0 1 14.995 -8.336zm-1.8 10.946a1 1 0 0 0 -1.414 .014a2.5 2.5 0 0 1 -3.572 0a1 1 0 0 0 -1.428 1.4a4.5 4.5 0 0 0 6.428 0a1 1 0 0 0 -.014 -1.414zm-6.19 -5.286l-.127 .007a1 1 0 0 0 .117 1.993l.127 -.007a1 1 0 0 0 -.117 -1.993zm6 0l-.127 .007a1 1 0 0 0 .117 1.993l.127 -.007a1 1 0 0 0 -.117 -1.993z","stroke-width":"0",fill:t.value.style.icons.useGradient?"url(#vueUiSmiley3)":t.value.style.colors.activeReadonly[3]},null,8,Ee)],8,xe)):e.createCommentVNode("",!0),!t.value.style.icons.filled&&d.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(o.XMLNS),style:{position:"absolute",top:"0",left:"0",transition:"all 0.1s ease-in-out"},height:"100%",viewBox:`0 0 ${p(3)} 24`,"stroke-width":"1.5",stroke:t.value.style.colors.activeReadonly[3],fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},l[41]||(l[41]=[e.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-dabd0325></path><path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" data-v-dabd0325></path><path d="M9 10l.01 0" data-v-dabd0325></path><path d="M15 10l.01 0" data-v-dabd0325></path><path d="M9.5 15a3.5 3.5 0 0 0 5 0" data-v-dabd0325></path>',5)]),8,$e)):e.createCommentVNode("",!0)],38),e.createElementVNode("div",{tabindex:"0",class:e.normalizeClass({"vue-ui-smiley-rated":!t.value.readonly&&r.value===5}),style:e.normalizeStyle(`cursor:${t.value.readonly?"default":"pointer"};height:${t.value.style.itemSize}px;aspect-ratio:1/1;position:relative`),onMouseenter:l[16]||(l[16]=a=>s.value=4),onMouseleave:l[17]||(l[17]=a=>s.value=void 0),onClick:l[18]||(l[18]=a=>v(5)),onKeyup:l[19]||(l[19]=e.withKeys(a=>v(5),["enter"]))},[t.value.style.tooltip.show&&y.value&&d.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"vue-ui-rating-tooltip",style:e.normalizeStyle(`border:1px solid ${t.value.style.tooltip.borderColor};position:absolute;top:${-48+t.value.style.tooltip.offsetY}px;left:50%;transform:translateX(-50%);width:fit-content;text-align:center;background:${t.value.style.tooltip.backgroundColor};display:${s.value===4?"block":"none"};padding:2px 12px;border-radius:${t.value.style.tooltip.borderRadius}px;box-shadow:${t.value.style.tooltip.boxShadow}`)},[e.createElementVNode("div",{style:e.normalizeStyle(`width:100%;display:flex;flex-direction:row;gap:6px;position:relative;text-align:center;color:${t.value.style.tooltip.color}`)},[e.createElementVNode("span",{style:e.normalizeStyle(`font-size:${t.value.style.tooltip.fontSize}px`)},"5:",4),l[42]||(l[42]=e.createTextVNode()),e.createElementVNode("span",{style:e.normalizeStyle(`font-weight:${t.value.style.tooltip.bold?"bold":"normal"};font-size:${t.value.style.tooltip.fontSize}px`)},e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.tooltip.formatter,i.dataset.rating[5],e.unref(o.dataLabel)({v:i.dataset.rating[5],r:t.value.style.tooltip.roundingValue}),t.value)),5),e.createElementVNode("div",{style:e.normalizeStyle(`font-family:Arial !important;position:absolute;top:calc(100% - 4px);left:50%;transform:translateX(-50%);color:${t.value.style.tooltip.borderColor}`)}," ▼ ",4)],4)],4)):e.createCommentVNode("",!0),t.value.style.icons.filled?(e.openBlock(),e.createElementBlock("svg",{key:1,xmlns:e.unref(o.XMLNS),style:{position:"absolute",top:"0",left:"0",transition:"all 0.1s ease-in-out"},height:"100%",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:u(4),fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",we,[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(o.shiftHue)(t.value.style.colors.activeReadonly[4],.9)},null,8,Me),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.colors.activeReadonly[4]},null,8,Be)])]),l[43]||(l[43]=e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1)),e.createElementVNode("path",{d:"M17 3.34a10 10 0 1 1 -14.995 8.984l-.005 -.324l.005 -.324a10 10 0 0 1 14.995 -8.336zm-2 9.66h-6a1 1 0 0 0 -1 1v.05a3.975 3.975 0 0 0 3.777 3.97l.227 .005a4.026 4.026 0 0 0 3.99 -3.79l.006 -.206a1 1 0 0 0 -1 -1.029zm-5.99 -5l-.127 .007a1 1 0 0 0 .117 1.993l.127 -.007a1 1 0 0 0 -.117 -1.993zm6 0l-.127 .007a1 1 0 0 0 .117 1.993l.127 -.007a1 1 0 0 0 -.117 -1.993z","stroke-width":"0",fill:u(4)},null,8,Ce)],8,Se)):(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(o.XMLNS),style:{position:"absolute",top:"0",left:"0",transition:"all 0.1s ease-in-out"},height:"100%",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:u(4),fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},l[44]||(l[44]=[e.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-dabd0325></path><path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" data-v-dabd0325></path><path d="M9 9l.01 0" data-v-dabd0325></path><path d="M15 9l.01 0" data-v-dabd0325></path><path d="M8 13a4 4 0 1 0 8 0h-8" data-v-dabd0325></path>',5)]),8,_e)),t.value.style.icons.filled&&d.value?(e.openBlock(),e.createElementBlock("svg",{key:3,xmlns:e.unref(o.XMLNS),style:{position:"absolute",top:"0",left:"0",transition:"all 0.1s ease-in-out"},height:"100%",viewBox:`0 0 ${p(4)} 24`,"stroke-width":"1.5",stroke:t.value.style.colors.activeReadonly[4],fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[l[45]||(l[45]=e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1)),e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",Le,[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(o.shiftHue)(t.value.style.colors.activeReadonly[4],.9)},null,8,He),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.colors.activeReadonly[4]},null,8,Xe)])]),e.createElementVNode("path",{d:"M17 3.34a10 10 0 1 1 -14.995 8.984l-.005 -.324l.005 -.324a10 10 0 0 1 14.995 -8.336zm-2 9.66h-6a1 1 0 0 0 -1 1v.05a3.975 3.975 0 0 0 3.777 3.97l.227 .005a4.026 4.026 0 0 0 3.99 -3.79l.006 -.206a1 1 0 0 0 -1 -1.029zm-5.99 -5l-.127 .007a1 1 0 0 0 .117 1.993l.127 -.007a1 1 0 0 0 -.117 -1.993zm6 0l-.127 .007a1 1 0 0 0 .117 1.993l.127 -.007a1 1 0 0 0 -.117 -1.993z","stroke-width":"0",fill:t.value.style.icons.useGradient?"url(#vueUiSmiley4)":t.value.style.colors.activeReadonly[4]},null,8,je)],8,Re)):e.createCommentVNode("",!0),!t.value.style.icons.filled&&d.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(o.XMLNS),style:{position:"absolute",top:"0",left:"0",transition:"all 0.1s ease-in-out"},height:"100%",viewBox:`0 0 ${p(4)} 24`,"stroke-width":"1.5",stroke:t.value.style.colors.activeReadonly[4],fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},l[46]||(l[46]=[e.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-dabd0325></path><path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" data-v-dabd0325></path><path d="M9 9l.01 0" data-v-dabd0325></path><path d="M15 9l.01 0" data-v-dabd0325></path><path d="M8 13a4 4 0 1 0 8 0h-8" data-v-dabd0325></path>',5)]),8,De)):e.createCommentVNode("",!0)],38),t.value.style.rating.show&&t.value.style.rating.position==="right"?(e.openBlock(),e.createElementBlock("div",{key:1,style:e.normalizeStyle(`width:fit-content;text-align:center;margin-bottom:${t.value.style.rating.offsetY}px;font-size:${t.value.style.rating.fontSize}px;font-weight:${t.value.style.rating.bold?"bold":"normal"};padding-left:${t.value.style.rating.offsetX}px`)},e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.rating.formatter,r.value,e.unref(o.dataLabel)({v:r.value,r:t.value.style.rating.roundingValue}),t.value)),5)):e.createCommentVNode("",!0)],4),t.value.style.rating.show&&t.value.style.rating.position==="bottom"?(e.openBlock(),e.createElementBlock("div",{key:2,style:e.normalizeStyle(`width:100%;text-align:center;margin-top:${t.value.style.rating.offsetY}px;font-size:${t.value.style.rating.fontSize}px;font-weight:${t.value.style.rating.bold?"bold":"normal"};margin-left:${t.value.style.rating.offsetX}px`)},e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.rating.formatter,r.value,e.unref(o.dataLabel)({v:r.value,r:t.value.style.rating.roundingValue}),t.value)),5)):e.createCommentVNode("",!0)],36))}},Ge=C._export_sfc(Ue,[["__scopeId","data-v-dabd0325"]]);exports.default=Ge;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { computed as s, ref as k, watch as E, onMounted as K, createElementBlock as u, openBlock as o, normalizeStyle as Q, createBlock as L, createCommentVNode as r, unref as h, createVNode as Y, createElementVNode as _, renderSlot as D, toDisplayString as O } from "vue";
|
|
2
|
-
import { u as ee, c as te, a as ae, a0 as S, o as le, e as ne, v as c, a1 as oe, X as se, s as M, T as G, f as U, i as ue } from "./index-
|
|
3
|
-
import { u as q } from "./useNestedProp-
|
|
4
|
-
import I from "./BaseIcon-
|
|
5
|
-
import re from "./vue-ui-skeleton-
|
|
6
|
-
import { _ as ie } from "./PackageVersion-
|
|
2
|
+
import { u as ee, c as te, a as ae, a0 as S, o as le, e as ne, v as c, a1 as oe, X as se, s as M, T as G, f as U, i as ue } from "./index-Co5UfCMK.js";
|
|
3
|
+
import { u as q } from "./useNestedProp-C22WP03t.js";
|
|
4
|
+
import I from "./BaseIcon-DTt4YbQE.js";
|
|
5
|
+
import re from "./vue-ui-skeleton-BSlYUHZA.js";
|
|
6
|
+
import { _ as ie } from "./PackageVersion-CkUbRQrt.js";
|
|
7
7
|
import { _ as de } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
8
8
|
const ve = ["id"], he = ["xmlns", "viewBox"], ce = ["width", "height"], ye = ["id"], fe = ["stop-color"], pe = ["stop-color"], ge = { key: 1 }, me = ["d", "fill"], ke = ["d", "fill"], _e = ["d", "stroke", "stroke-width", "stroke-linecap", "stroke-linejoin"], be = ["d", "stroke", "stroke-width", "stroke-linecap", "stroke-linejoin"], we = ["height", "width", "x"], xe = { style: { width: "100%" } }, Ce = ["x", "y", "fill", "font-size", "font-weight"], Le = ["stroke", "cx", "cy", "fill"], $e = ["x", "y", "font-size", "fill", "font-weight"], Ne = {
|
|
9
9
|
key: 2,
|
|
@@ -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-Dy2-pNb6.cjs"),T=require("./useNestedProp-DQ8Jt3-Y.cjs"),w=require("./BaseIcon-DmfPEj6j.cjs"),A=require("./vue-ui-skeleton-Db7PiDqL.cjs"),F=require("./PackageVersion-DxR-fKLM.cjs"),q=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),O=["id"],D=["xmlns","viewBox"],P=["width","height"],G=["id"],U=["stop-color"],W=["stop-color"],Z={key:1},H=["d","fill"],R=["d","fill"],X=["d","stroke","stroke-width","stroke-linecap","stroke-linejoin"],J=["d","stroke","stroke-width","stroke-linecap","stroke-linejoin"],K=["height","width","x"],Q={style:{width:"100%"}},Y=["x","y","fill","font-size","font-weight"],ee=["stroke","cx","cy","fill"],te=["x","y","font-size","fill","font-weight"],le={key:2,ref:"source",dir:"auto"},ae={__name:"vue-ui-spark-trend",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(E){const{vue_ui_spark_trend:$}=a.useConfig(),u=E,S=e.computed(()=>!!u.dataset&&u.dataset.length),y=e.ref(a.createUid()),t=e.computed({get:()=>x(),set:l=>l});function x(){const l=T.useNestedProp({userConfig:u.config,defaultConfig:$});return l.theme?{...T.useNestedProp({userConfig:a.themes.vue_ui_spark_trend[l.theme]||u.config,defaultConfig:l})}:l}const c=e.computed(()=>a.largestTriangleThreeBucketsArray({data:u.dataset,threshold:t.value.downsample.threshold}));e.watch(()=>u.config,l=>{t.value=x(),C()},{deep:!0}),e.watch(()=>u.dataset,l=>{h.value=a.largestTriangleThreeBucketsArray({data:u.dataset,threshold:t.value.downsample.threshold}).map(r=>[void 0,1/0,-1/0,null,NaN].includes(r)?null:r)},{deep:!0});function g(l){return l.map(r=>a.checkNaN(r))}const h=e.ref(a.largestTriangleThreeBucketsArray({data:u.dataset,threshold:t.value.downsample.threshold}).map(l=>t.value.style.animation.show||[void 0,1/0,-1/0,null,NaN].includes(l)?null:l)),p=e.ref(!1),_=e.ref(null);e.onMounted(()=>{C();let r=1e3/t.value.style.animation.animationFrames,i=performance.now();if(t.value.style.animation.show&&t.value.style.animation.animationFrames&&u.dataset.length>1){let N=function(){p.value=!0;let L=performance.now(),V=L-i;V>r?(i=L-V%r,v<c.value.length?(h.value.push(c.value[v]),v+=1,_.value=requestAnimationFrame(N)):(cancelAnimationFrame(_.value),h.value=g(c.value),p.value=!1)):_.value=requestAnimationFrame(N)};h.value=[];let v=0;N()}});function C(){a.objectIsEmpty(u.dataset)&&a.error({componentName:"VueUiSparkTrend",type:"dataset"})}const n=e.ref({height:80,width:300}),d=e.computed(()=>({top:t.value.style.padding.top,left:t.value.style.padding.left,right:n.value.width-t.value.style.padding.right,bottom:n.value.height-t.value.style.padding.bottom,height:n.value.height-(t.value.style.padding.top+t.value.style.padding.bottom)-(t.value.style.dataLabel.show?t.value.style.dataLabel.fontSize:0),width:n.value.width-(t.value.style.padding.left+t.value.style.padding.right)})),b=e.computed(()=>{const l=g(c.value);return{max:Math.max(...l.map(r=>a.checkNaN(r))),min:Math.min(...l.map(r=>a.checkNaN(r)))}}),m=e.computed(()=>{const l=b.value.min>=0?0:b.value.min;return Math.abs(l)}),z=e.computed(()=>b.value.max+m.value);function B(l){return l/z.value}const M=e.computed(()=>c.value.length),o=e.computed(()=>h.value.map((l,r)=>{const i=isNaN(l)||[void 0,null,"NaN",NaN,1/0,-1/0].includes(l)?0:l||0;return{value:a.checkNaN(l),absoluteValue:a.checkNaN(i),plotValue:a.checkNaN(i+m.value),toMax:B(i+m.value),x:d.value.left+a.checkNaN(r*(d.value.width/(M.value-1)))-t.value.style.padding.right,y:d.value.bottom-a.checkNaN(d.value.height*B(i+m.value))}})),f=e.computed(()=>{const l=g(c.value);return t.value.style.trendLabel.trendType==="global"?a.calcTrend(l):t.value.style.trendLabel.trendType==="n-1"&&l.length>1?(l.at(-1)/l.at(-2)-1)*100:t.value.style.trendLabel.trendType==="lastToFirst"?(l.at(-1)/l[0]-1)*100:0}),k=e.computed(()=>p.value||f.value===0?"neutral":f.value>0?"positive":"negative"),s=e.computed(()=>t.value.style.arrow.colors[k.value]),I=e.computed(()=>{const l={x:o.value[0].x,y:n.value.height-6},r={x:o.value[o.value.length-1].x,y:n.value.height-6},i=[];return o.value.forEach(v=>{i.push(`${v.x},${v.y} `)}),[l.x,l.y,...i,r.x,r.y].toString()}),j=e.computed(()=>{let l=[];return o.value.forEach(r=>{l.push(`${r.x},${r.y} `)}),`M ${l.toString()}`});return(l,r)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-spark-trend",id:y.value,style:e.normalizeStyle(`width:100%;font-family:${t.value.style.fontFamily};background:${t.value.style.backgroundColor}`)},[S.value?(e.openBlock(),e.createElementBlock("svg",{key:1,xmlns:e.unref(a.XMLNS),viewBox:`0 0 ${n.value.width} ${n.value.height}`,style:"width:100%;background:transparent;overflow:visible"},[e.createVNode(F._sfc_main),l.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:n.value.width<=0?10:n.value.width,height:n.value.height<=0?10:n.value.height,style:{pointerEvents:"none"}},[e.renderSlot(l.$slots,"chart-background",{},void 0,!0)],8,P)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{x1:"0%",y1:"0%",x2:"0%",y2:"100%",id:`pill_gradient_${y.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(a.setOpacity)(t.value.style.line.useColorTrend?s.value:t.value.style.line.stroke,t.value.style.area.opacity)},null,8,U),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.backgroundColor},null,8,W)],8,G)]),t.value.style.area.show&&o.value[0]?(e.openBlock(),e.createElementBlock("g",Z,[t.value.style.line.smooth?(e.openBlock(),e.createElementBlock("path",{key:0,d:`M ${o.value[0].x},${d.value.bottom} ${e.unref(a.createSmoothPath)(o.value)} L ${o.value.at(-1).x},${d.value.bottom} Z`,fill:t.value.style.area.useGradient?`url(#pill_gradient_${y.value})`:e.unref(a.setOpacity)(t.value.style.line.useColorTrend?s.value:t.value.style.line.stroke,t.value.style.area.opacity),stroke:"none"},null,8,H)):(e.openBlock(),e.createElementBlock("path",{key:1,d:`M${I.value}Z`,fill:t.value.style.area.useGradient?`url(#pill_gradient_${y.value})`:e.unref(a.setOpacity)(t.value.style.line.useColorTrend?s.value:t.value.style.line.stroke,t.value.style.area.opacity),stroke:"none"},null,8,R))])):e.createCommentVNode("",!0),t.value.style.line.smooth&&o.value.length?(e.openBlock(),e.createElementBlock("path",{key:2,d:`M ${e.unref(a.createSmoothPath)(o.value)}`,stroke:t.value.style.line.useColorTrend?s.value:t.value.style.line.stroke,fill:"none","stroke-width":t.value.style.line.strokeWidth,"stroke-linecap":t.value.style.line.strokeLinecap,"stroke-linejoin":t.value.style.line.strokeLinejoin},null,8,X)):e.createCommentVNode("",!0),!t.value.style.line.smooth&&o.value.length?(e.openBlock(),e.createElementBlock("path",{key:3,d:j.value,stroke:t.value.style.line.useColorTrend?s.value:t.value.style.line.stroke,fill:"none","stroke-width":t.value.style.line.strokeWidth,"stroke-linecap":t.value.style.line.strokeLinecap,"stroke-linejoin":t.value.style.line.strokeLinejoin},null,8,J)):e.createCommentVNode("",!0),p.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("foreignObject",{key:4,height:n.value.height/2,width:n.value.height/2,x:n.value.height/5,y:8},[e.createElementVNode("div",Q,[k.value==="positive"?(e.openBlock(),e.createBlock(w.default,{key:0,stroke:s.value,name:"arrowTop",size:n.value.height/2},null,8,["stroke","size"])):e.createCommentVNode("",!0),k.value==="negative"?(e.openBlock(),e.createBlock(w.default,{key:1,stroke:s.value,name:"arrowBottom",size:n.value.height/2},null,8,["stroke","size"])):e.createCommentVNode("",!0),k.value==="neutral"?(e.openBlock(),e.createBlock(w.default,{key:2,stroke:s.value,name:"arrowRight",size:n.value.height/2},null,8,["stroke","size"])):e.createCommentVNode("",!0)])],8,K)),p.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("text",{key:5,x:n.value.height/2-n.value.height/20,y:d.value.bottom,"text-anchor":"middle",fill:t.value.style.trendLabel.useColorTrend?s.value:t.value.style.trendLabel.color,"font-size":t.value.style.trendLabel.fontSize,"font-weight":t.value.style.trendLabel.bold?"bold":"normal"},e.toDisplayString(e.unref(a.dataLabel)({p:f.value>0?"+":"",v:f.value,s:"%",r:t.value.style.trendLabel.rounding})),9,Y)),o.value.length&&o.value.at(-1).x!==void 0?(e.openBlock(),e.createElementBlock("circle",{key:6,stroke:t.value.style.backgroundColor,"stroke-width":2,cx:o.value.at(-1).x,cy:o.value.at(-1).y,r:4,fill:s.value},null,8,ee)):e.createCommentVNode("",!0),o.value.length&&o.value.at(-1).x!==void 0&&t.value.style.dataLabel.show?(e.openBlock(),e.createElementBlock("text",{key:7,"text-anchor":"middle",x:o.value.at(-1).x,y:o.value.at(-1).y-t.value.style.dataLabel.fontSize/1.5,"font-size":t.value.style.dataLabel.fontSize,fill:t.value.style.dataLabel.useColorTrend?s.value:t.value.style.dataLabel.color,"font-weight":t.value.style.dataLabel.bold?"bold":"normal"},e.toDisplayString(e.unref(a.applyDataLabel)(t.value.style.dataLabel.formatter,o.value.at(-1).value,e.unref(a.dataLabel)({p:t.value.style.dataLabel.prefix,v:o.value.at(-1).value,s:t.value.style.dataLabel.suffix,r:t.value.style.dataLabel.rounding}),{datapoint:o.value.at(-1)})),9,te)):e.createCommentVNode("",!0)],8,D)):(e.openBlock(),e.createBlock(A.default,{key:0,config:{type:"sparkline",style:{backgroundColor:t.value.style.backgroundColor,sparkline:{color:"#CCCCCC"}}}},null,8,["config"])),l.$slots.source?(e.openBlock(),e.createElementBlock("div",le,[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0)],12,O))}},oe=q._export_sfc(ae,[["__scopeId","data-v-38d02804"]]);exports.default=oe;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("./index-Dy2-pNb6.cjs"),b=require("./useNestedProp-DQ8Jt3-Y.cjs"),$=require("./vue-ui-skeleton-Db7PiDqL.cjs"),z=require("./PackageVersion-DxR-fKLM.cjs"),L=["onClick"],P={key:1},A=["xmlns","viewBox"],F=["id"],O=["stop-color"],I=["stop-color"],T=["height","width","fill","rx"],q=["height","width","fill","rx"],M=["height","width","fill","rx"],U={key:2,ref:"source",dir:"auto"},j={__name:"vue-ui-sparkbar",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}},backgroundOpacity:{type:Number,default:null}},emits:["selectDatapoint"],setup(p,{emit:C}){const{vue_ui_sparkbar:S}=o.useConfig(),n=p,w=e.useSlots();e.onMounted(()=>{w["chart-background"]&&console.warn("VueUiSparkbar does not support the #chart-background slot.")});const v=e.computed(()=>!!n.dataset&&n.dataset.length),y=e.ref(o.createUid()),t=e.computed({get:()=>f(),set:l=>l});function f(){const l=b.useNestedProp({userConfig:n.config,defaultConfig:S});return l.theme?{...b.useNestedProp({userConfig:o.themes.vue_ui_sparkbar[l.theme]||n.config,defaultConfig:l}),customPalette:o.themePalettes[l.theme]||o.palette}:l}e.watch(()=>n.config,l=>{t.value=f()},{deep:!0});const _=e.computed(()=>o.convertCustomPalette(t.value.customPalette)),c=e.ref(n.dataset.map(l=>({...l,value:t.value.style.animation.show?0:l.value||0,formatter:l.formatter||null}))),g=e.ref(null);e.onMounted(async()=>{o.objectIsEmpty(n.dataset)&&o.error({componentName:"VueUiSparkbar",type:"dataset"}),h()});function h(){if(t.value.style.animation.show){let x=function(){i+=a/l,i<a?(c.value=c.value.map((u,m)=>({...u,value:u.value+=r[m]})),g.value=requestAnimationFrame(x)):c.value=n.dataset.map(u=>({...u,value:u.value||0,formatter:u.formatter||null}))};const l=t.value.style.animation.animationFrames,r=n.dataset.map((u,m)=>u.value/l),a=n.dataset.map(u=>u.value||0).reduce((u,m)=>u+m,0);let i=0;x()}}e.watch(()=>n.dataset,async l=>{cancelAnimationFrame(g.value),c.value=n.dataset.map(r=>({...r,value:t.value.style.animation.show?0:r.value||0,formatter:r.formatter||null})),e.nextTick(h)},{deep:!0});const s=e.ref({width:500,height:16}),N=e.computed(()=>Math.max(...n.dataset.map(l=>l.value))),B=e.computed(()=>(n.dataset.forEach((l,r)=>{o.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","value"]}).forEach(a=>{o.error({componentName:"VueUiSparkbar",type:"datasetSerieAttribute",property:a,index:r})})}),c.value.map((l,r)=>({...l,value:l.value||0,color:o.convertColorToHex(l.color)||_.value[r]||o.palette[r]||o.palette[r%o.palette.length]}))));function V(l){return l/N.value}function k(l){return t.value.style.layout.independant?l.target?l.value/l.target:t.value.style.layout.percentage?l.value>100?1:l.value/100:t.value.style.layout.target===0?1:l.value/t.value.style.layout.target:V(l.value)}function d(l){return t.value.style.layout.independant&&l.target||t.value.style.layout.target}const E=C;function D(l,r){E("selectDatapoint",{datapoint:l,index:r})}return(l,r)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-sparkbar",style:e.normalizeStyle({width:"100%",fontFamily:t.value.style.fontFamily,background:n.backgroundOpacity!==null?e.unref(o.setOpacity)(t.value.style.backgroundColor,n.backgroundOpacity):t.value.style.backgroundColor})},[l.$slots.title?e.renderSlot(l.$slots,"title",e.normalizeProps(e.mergeProps({key:0},{title:{...l.title,title:t.value.style.title.text,subtitle:t.value.style.title.subtitle.text}}))):e.createCommentVNode("",!0),!l.$slots.title&&t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",{key:1,class:"vue-ui-sparkbar-title-container",style:e.normalizeStyle({background:t.value.style.title.backgroundColor,margin:t.value.style.title.margin,textAlign:t.value.style.title.textAlign})},[e.createElementVNode("div",{class:"vue-ui-sparkbar-title",style:e.normalizeStyle({fontSize:t.value.style.title.fontSize+"px",color:t.value.style.title.color,fontWeight:t.value.style.title.bold?"bold":"normal"})},e.toDisplayString(t.value.style.title.text),5),t.value.style.title.subtitle.text?(e.openBlock(),e.createElementBlock("div",{key:0,class:"vue-ui-sparkbar-subtitle",style:e.normalizeStyle({fontSize:t.value.style.title.subtitle.fontSize+"px",color:t.value.style.title.subtitle.color,fontWeight:t.value.style.title.subtitle.bold?"bold":"normal"})},e.toDisplayString(t.value.style.title.subtitle.text),5)):e.createCommentVNode("",!0)],4)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B.value,(a,i)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[v.value?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`display:flex !important;${["left","right"].includes(t.value.style.labels.name.position)?`flex-direction: ${t.value.style.labels.name.position==="right"?"row-reverse":"row"} !important`:"flex-direction:column !important"};gap:${t.value.style.gap}px !important;align-items:center;${p.dataset.length>0&&i!==p.dataset.length-1?"margin-bottom:6px":""}`),onClick:()=>D(a,i)},[e.renderSlot(l.$slots,"data-label",e.mergeProps({ref_for:!0},{bar:{...a,target:d(a),valueLabel:e.unref(o.applyDataLabel)(a.formatter,a.value,e.unref(o.dataLabel)({p:a.prefix||"",v:a.value,s:a.suffix||"",r:a.rounding||0}),{datapoint:a,seriesIndex:i}),targetLabel:e.unref(o.applyDataLabel)(a.formatter,d(a),e.unref(o.dataLabel)({p:a.prefix||"",v:d(a),s:a.suffix||"",r:a.rounding||0}),{datapoint:a,seriesIndex:i})}})),l.$slots["data-label"]?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle({width:t.value.style.labels.name.width,color:t.value.style.labels.name.color,fontSize:t.value.style.labels.fontSize+"px",fontWeight:t.value.style.labels.name.bold?"bold":"normal",textAlign:["left","right"].includes(t.value.style.labels.name.position)||["top","top-left"].includes(t.value.style.labels.name.position)?"left":t.value.style.labels.name.position==="top-center"?"center":"right"})},[e.createElementVNode("span",null,e.toDisplayString(a.name),1),t.value.style.labels.value.show?(e.openBlock(),e.createElementBlock("span",{key:0,style:e.normalizeStyle(`font-weight:${t.value.style.labels.value.bold?"bold":"normal"}`)},": "+e.toDisplayString(e.unref(o.applyDataLabel)(a.formatter,a.value,e.unref(o.dataLabel)({p:a.prefix||"",v:a.value,s:a.suffix||"",r:a.rounding||0}),{datapoint:a,seriesIndex:i})),5)):e.createCommentVNode("",!0),t.value.style.layout.showTargetValue?(e.openBlock(),e.createElementBlock("span",P,e.toDisplayString(" "+t.value.style.layout.targetValueText)+" "+e.toDisplayString(e.unref(o.applyDataLabel)(a.formatter,d(a),e.unref(o.dataLabel)({p:a.prefix||"",v:d(a),s:a.suffix||"",r:a.rounding||0}),{datapoint:a,seriesIndex:i})),1)):e.createCommentVNode("",!0)],4)),(e.openBlock(),e.createElementBlock("svg",{xmlns:e.unref(o.XMLNS),viewBox:`0 0 ${s.value.width} ${s.value.height}`,width:"100%"},[e.createVNode(z._sfc_main),e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{x1:"0%",y1:"0%",x2:"100%",y2:"0%",id:`sparkbar_gradient_${i}_${y.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(o.setOpacity)(e.unref(o.shiftHue)(a.color,.03),100-t.value.style.bar.gradient.intensity)},null,8,O),e.createElementVNode("stop",{offset:"100%","stop-color":a.color},null,8,I)],8,F)]),e.createElementVNode("rect",{height:s.value.height,width:s.value.width,x:0,y:0,fill:e.unref(o.setOpacity)(t.value.style.gutter.backgroundColor,t.value.style.gutter.opacity),rx:s.value.height/2},null,8,T),e.createElementVNode("rect",{height:s.value.height,width:s.value.width*k(a),x:0,y:0,fill:t.value.style.bar.gradient.underlayerColor,rx:s.value.height/2},null,8,q),e.createElementVNode("rect",{height:s.value.height,width:s.value.width*k(a),x:0,y:0,fill:t.value.style.bar.gradient.show?`url(#sparkbar_gradient_${i}_${y.value})`:a.color,rx:s.value.height/2},null,8,M)],8,A))],12,L)):e.createCommentVNode("",!0)],64))),256)),l.$slots.source?(e.openBlock(),e.createElementBlock("div",U,[e.renderSlot(l.$slots,"source")],512)):e.createCommentVNode("",!0),v.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock($.default,{key:3,config:{type:"sparkbar",style:{backgroundColor:t.value.style.backgroundColor,sparkbar:{color:"#CCCCCC"}}}},null,8,["config"]))],4))}};exports.default=j;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { useSlots as J, onMounted as L, computed as g, ref as k, watch as O, nextTick as K, createElementBlock as c, openBlock as r, normalizeStyle as f, unref as s, renderSlot as C, createCommentVNode as v, createBlock as Q, normalizeProps as R, mergeProps as P, createElementVNode as d, toDisplayString as p, Fragment as T, renderList as Y, createVNode as Z } from "vue";
|
|
2
|
-
import { u as ee, c as te, t as le, p as x, a as ae, b as oe, o as se, e as V, g as ue, d as re, s as $, i as b, f as w, X as ne, w as ie } from "./index-
|
|
3
|
-
import { u as E } from "./useNestedProp-
|
|
4
|
-
import ce from "./vue-ui-skeleton-
|
|
5
|
-
import { _ as ve } from "./PackageVersion-
|
|
2
|
+
import { u as ee, c as te, t as le, p as x, a as ae, b as oe, o as se, e as V, g as ue, d as re, s as $, i as b, f as w, X as ne, w as ie } from "./index-Co5UfCMK.js";
|
|
3
|
+
import { u as E } from "./useNestedProp-C22WP03t.js";
|
|
4
|
+
import ce from "./vue-ui-skeleton-BSlYUHZA.js";
|
|
5
|
+
import { _ as ve } from "./PackageVersion-CkUbRQrt.js";
|
|
6
6
|
const de = ["onClick"], fe = { key: 1 }, pe = ["xmlns", "viewBox"], ye = ["id"], me = ["stop-color"], ge = ["stop-color"], he = ["height", "width", "fill", "rx"], ke = ["height", "width", "fill", "rx"], xe = ["height", "width", "fill", "rx"], be = {
|
|
7
7
|
key: 2,
|
|
8
8
|
ref: "source",
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { computed as s, onMounted as N, ref as A, watch as M, createElementBlock as n, openBlock as i, normalizeStyle as m, createCommentVNode as r, createBlock as G, toDisplayString as y, unref as c, createVNode as I, createElementVNode as d, renderSlot as S, normalizeClass as R } from "vue";
|
|
2
|
-
import { u as U, o as q, e as z, g as P, c as T, a as X, N as H, X as V, i as Y, v as g, f as J } from "./index-
|
|
3
|
-
import { u as O } from "./useNestedProp-
|
|
4
|
-
import K from "./vue-ui-skeleton-
|
|
5
|
-
import { _ as Q } from "./PackageVersion-
|
|
2
|
+
import { u as U, o as q, e as z, g as P, c as T, a as X, N as H, X as V, i as Y, v as g, f as J } from "./index-Co5UfCMK.js";
|
|
3
|
+
import { u as O } from "./useNestedProp-C22WP03t.js";
|
|
4
|
+
import K from "./vue-ui-skeleton-BSlYUHZA.js";
|
|
5
|
+
import { _ as Q } from "./PackageVersion-CkUbRQrt.js";
|
|
6
6
|
import { u as W } from "./useChartAccessibility-BWojgys7.js";
|
|
7
7
|
const Z = ["xmlns", "viewBox"], ee = ["width", "height"], te = ["id"], ae = ["stop-color"], le = ["stop-color"], oe = ["d", "stroke", "stroke-linecap"], se = ["d", "stroke", "stroke-linecap", "stroke-dashoffset"], ue = ["x", "y", "font-size", "fill", "font-weight"], ie = {
|
|
8
8
|
key: 4,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-Dy2-pNb6.cjs"),b=require("./useNestedProp-DQ8Jt3-Y.cjs"),w=require("./vue-ui-skeleton-Db7PiDqL.cjs"),S=require("./PackageVersion-DxR-fKLM.cjs"),B=require("./useChartAccessibility-Cm7nkzTG.cjs"),E=["xmlns","viewBox"],L=["width","height"],A=["id"],M=["stop-color"],V=["stop-color"],z=["d","stroke","stroke-linecap"],q=["d","stroke","stroke-linecap","stroke-dashoffset"],O=["x","y","font-size","fill","font-weight"],j={key:4,ref:"source",dir:"auto"},D={__name:"vue-ui-sparkgauge",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(C){const{vue_ui_sparkgauge:_}=s.useConfig(),l=C,c=e.computed(()=>!!l.dataset&&Object.keys(l.dataset).length);e.onMounted(()=>{d()});function d(){s.objectIsEmpty(l.dataset)?s.error({componentName:"VueUiSparkgauge",type:"dataset"}):s.getMissingDatasetAttributes({datasetObject:l.dataset,requiredAttributes:["value","min","max"]}).forEach(a=>{s.error({componentName:"VueUiSparkgauge",type:"datasetAttribute",property:a})})}const v=e.ref(s.createUid()),t=e.computed({get:()=>m(),set:a=>a}),{svgRef:N}=B.useChartAccessibility({config:{text:l.dataset.title}});function m(){const a=b.useNestedProp({userConfig:l.config,defaultConfig:_});return a.theme?{...b.useNestedProp({userConfig:s.themes.vue_ui_sparkgauge[a.theme]||l.config,defaultConfig:a})}:a}e.watch(()=>l.config,a=>{t.value=m(),d()},{deep:!0});const u=e.computed(()=>({height:t.value.style.height,width:128,base:t.value.style.basePosition})),n=e.computed(()=>{const a=l.dataset.min??0,r=l.dataset.max??0,$=r-a;return{min:a,max:r,diff:$}}),o=e.ref(t.value.style.animation.show?n.value.min:l.dataset.value);e.watch(()=>l.dataset.value,()=>{y(l.dataset.value||0)});const f=e.computed(()=>o.value>n.value.max?n.value.max:o.value<n.value.min?n.value.min:o.value),p=e.computed(()=>n.value.diff/t.value.style.animation.speedMs);e.onMounted(()=>{y(l.dataset.value||0)});function y(a){function r(){o.value<a?o.value=Math.min(o.value+p.value,a):o.value>a&&(o.value=Math.max(o.value-p.value,a)),o.value!==a&&requestAnimationFrame(r)}r()}const i=e.computed(()=>l.dataset.title??""),g=e.computed(()=>o.value>=0?(f.value-n.value.min)/n.value.diff:(Math.abs(n.value.min)-Math.abs(f.value))/n.value.diff),h=e.computed(()=>s.interpolateColorHex(t.value.style.colors.min,t.value.style.colors.max,n.value.min,n.value.max,o.value)),k=e.computed(()=>t.value.style.dataLabel.autoColor?h.value:t.value.style.dataLabel.color),x=e.computed(()=>t.value.style.track.autoColor?h.value:t.value.style.track.color);return(a,r)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-sparkgauge",style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width: 100%; background:${t.value.style.background}`)},[t.value.style.title.show&&i.value&&t.value.style.title.position==="top"?(e.openBlock(),e.createElementBlock("div",{key:0,class:"vue-data-ui-sparkgauge-label",style:e.normalizeStyle(`font-size:${t.value.style.title.fontSize}px;text-align:${t.value.style.title.textAlign};font-weight:${t.value.style.title.bold?"bold":"normal"};color:${t.value.style.title.color}`)},e.toDisplayString(i.value),5)):e.createCommentVNode("",!0),c.value?(e.openBlock(),e.createElementBlock("svg",{key:1,ref_key:"svgRef",ref:N,xmlns:e.unref(s.XMLNS),viewBox:`0 0 ${u.value.width} ${u.value.height}`,style:"overflow: visible; background:transparent; width:100%;"},[e.createVNode(S._sfc_main),a.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:u.value.width,height:u.value.height,style:{pointerEvents:"none"}},[e.renderSlot(a.$slots,"chart-background")],8,L)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{id:`gradient_${v.value}`,x1:"-10%",y1:"100%",x2:"110%",y2:"100%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.colors.min},null,8,M),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.colors.max},null,8,V)],8,A)]),e.createElementVNode("path",{d:`M10 ${u.value.base} A 1 1 0 1 1 118 ${u.value.base}`,stroke:t.value.style.gutter.color,"stroke-width":8,"stroke-linecap":t.value.style.gutter.strokeLinecap,fill:"none"},null,8,z),g.value!==0?(e.openBlock(),e.createElementBlock("path",{key:1,d:`M10 ${u.value.base} A 1 1 0 1 1 118 ${u.value.base}`,stroke:t.value.style.colors.showGradient?`url(#gradient_${v.value})`:x.value,"stroke-width":8,"stroke-linecap":t.value.style.track.strokeLinecap,fill:"none","stroke-dasharray":169.5,"stroke-dashoffset":169.5-169.5*g.value,class:e.normalizeClass({"vue-ui-sparkgauge-track":t.value.style.animation.show}),style:e.normalizeStyle(t.value.style.animation.show?`animation: vue-ui-sparkgauge-animation ${t.value.style.animation.speedMs}ms ease-in;`:"")},null,14,q)):e.createCommentVNode("",!0),e.createElementVNode("text",{"text-anchor":"middle",x:u.value.width/2,y:u.value.base+6+t.value.style.dataLabel.offsetY,"font-size":t.value.style.dataLabel.fontSize,fill:k.value,"font-weight":t.value.style.dataLabel.bold?"bold":"normal"},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.dataLabel.formatter,e.unref(s.checkNaN)(o.value),e.unref(s.dataLabel)({p:t.value.style.dataLabel.prefix,v:e.unref(s.checkNaN)(o.value),s:t.value.style.dataLabel.suffix,r:t.value.style.dataLabel.rounding}),{datapoint:e.unref(s.checkNaN)(o.value),color:k.value})),9,O)],8,E)):e.createCommentVNode("",!0),c.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(w.default,{key:2,config:{type:"gauge",style:{backgroundColor:t.value.style.background,gauge:{color:"#CCCCCC"}}}},null,8,["config"])),t.value.style.title.show&&i.value&&t.value.style.title.position==="bottom"?(e.openBlock(),e.createElementBlock("div",{key:3,class:"vue-data-ui-sparkgauge-label",style:e.normalizeStyle(`font-size:${t.value.style.title.fontSize}px;text-align:${t.value.style.title.textAlign};font-weight:${t.value.style.title.bold?"bold":"normal"};font-weight:${t.value.style.title.bold?"bold":"normal"};color:${t.value.style.title.color}`)},e.toDisplayString(i.value),5)):e.createCommentVNode("",!0),a.$slots.source?(e.openBlock(),e.createElementBlock("div",j,[e.renderSlot(a.$slots,"source")],512)):e.createCommentVNode("",!0)],4))}};exports.default=D;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),a=require("./index-Cai0fWP7.cjs"),_=require("./useNestedProp-DcWhlk8h.cjs"),M=require("./Shape-2NRWULE_.cjs"),O=require("./vue-ui-skeleton-C954hFY-.cjs"),q=require("./PackageVersion-BMNt7NsQ.cjs"),H=require("./useChartAccessibility-Cm7nkzTG.cjs"),I=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),U={key:0},W={key:1},j=["xmlns","viewBox"],P=["width","height"],R=["id"],G=["stop-color"],T=["stop-color"],X=["id"],Y=["stop-color"],J=["stop-color"],K=["id"],Q=["stop-color"],Z=["stop-color"],ee={key:1},te=["x","y","height","width","fill","stroke","stroke-width","rx"],le={key:2},oe=["x","y","font-size","font-weight","fill"],ae=["x","y","font-size","fill"],se=["x","y","font-size","fill"],ne=["height","width","x","onMouseover","stroke","stroke-width","rx","stroke-dasharray","onClick"],re={key:2,ref:"source",dir:"auto"},ie={__name:"vue-ui-sparkhistogram",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectDatapoint"],setup(B,{emit:x}){e.useCssVars(o=>({"40b52890":L.value}));const{vue_ui_sparkhistogram:E}=a.useConfig(),c=B,f=e.computed(()=>!!c.dataset&&c.dataset.length);e.onMounted(()=>{k()});function k(){a.objectIsEmpty(c.dataset)?a.error({componentName:"VueUiSparkHistogram",type:"dataset"}):c.dataset.forEach((o,r)=>{a.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["value"]}).forEach(l=>{a.error({componentName:"VueUiSparkHistogram",type:"datasetSerieAttribute",property:l,index:r})})})}const v=e.ref(a.createUid()),t=e.computed({get:()=>b(),set:o=>o}),{svgRef:w}=H.useChartAccessibility({config:t.value.style.title});function b(){const o=_.useNestedProp({userConfig:c.config,defaultConfig:E});return o.theme?{..._.useNestedProp({userConfig:a.themes.vue_ui_sparkhistogram[o.theme]||c.config,defaultConfig:o})}:o}e.watch(()=>c.config,o=>{t.value=b(),k()},{deep:!0});const u=e.computed(()=>{const o=t.value.style.layout.height,r=t.value.style.layout.width,l=t.value.style.layout.padding.top,s=o-t.value.style.layout.padding.bottom,d=t.value.style.layout.padding.left,y=r-t.value.style.layout.padding.right,p=l+(o-l-t.value.style.layout.padding.bottom)/2,g=o-t.value.style.layout.padding.top-t.value.style.layout.padding.bottom,m=r-t.value.style.layout.padding.left-t.value.style.layout.padding.right;return{bottom:s,centerY:p,drawingHeight:g,drawingWidth:m,height:o,left:d,right:y,top:l,width:r}}),C=e.computed(()=>Math.max(...c.dataset.map(o=>Math.abs(o.value||0))));function $(o){return Math.abs(o)/C.value}const i=e.computed(()=>c.dataset.map((o,r)=>{const l=$(o.value||0),s=u.value.drawingHeight*l,d=u.value.drawingWidth/c.dataset.length,y=d*(t.value.style.bars.gap/100),p=d-y,g=u.value.centerY-s/2,m=u.value.left+(y/2+r*d),V=u.value.left+r*d,h=typeof o.intensity>"u"?100:Math.round(o.intensity*100),z=o.color?o.color:o.value>=0?a.setOpacity(t.value.style.bars.colors.positive,h):a.setOpacity(t.value.style.bars.colors.negative,h),D=o.color?o.color:o.value>=0?t.value.style.bars.colors.positive:t.value.style.bars.colors.negative,A=o.color?`url(#gradient_datapoint_${r}_${v.value})`:o.value>=0?`url(#gradient_positive_${r}_${v.value})`:`url(#gradient_negative_${r}_${v.value})`,F=m+p/2;return{...o,color:z,gradient:A,height:s,intensity:h,proportion:l,stroke:D,textAnchor:F,trapX:V,unitWidth:d,width:p,x:m,y:g}})),n=e.ref(null),S=x;function N(o,r){S("selectDatapoint",{datapoint:o,index:r})}const L=e.computed(()=>`${t.value.style.animation.speedMs}ms`);return(o,r)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-spark-histogram",style:e.normalizeStyle(`width:100%;background:${t.value.style.backgroundColor};font-family:${t.value.style.fontFamily}`),onMouseleave:r[1]||(r[1]=l=>n.value=null)},[t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`width:calc(100% - 12px);background:transparent;margin:0 auto;margin:${t.value.style.title.margin};padding: 0 6px;text-align:${t.value.style.title.textAlign}`)},[e.createElementVNode("div",{style:e.normalizeStyle(`font-size:${t.value.style.title.fontSize}px;color:${t.value.style.title.color};font-weight:${t.value.style.title.bold?"bold":"normal"}`)},[e.createTextVNode(e.toDisplayString(t.value.style.title.text)+" ",1),n.value!==null?(e.openBlock(),e.createElementBlock("span",U,"- "+e.toDisplayString(i.value[n.value].timeLabel||"")+" "+e.toDisplayString(e.unref(a.applyDataLabel)(t.value.style.labels.value.formatter,i.value[n.value].value,e.unref(a.dataLabel)({p:t.value.style.labels.value.prefix,v:i.value[n.value].value,s:t.value.style.labels.value.suffix,r:t.value.style.labels.value.rounding}),{datapoint:i.value[n.value],seriesIndex:n.value})),1)):e.createCommentVNode("",!0),![void 0,null].includes(n.value)&&![null,void 0].includes(i.value[n.value].valueLabel)?(e.openBlock(),e.createElementBlock("span",W,"("+e.toDisplayString(i.value[n.value].valueLabel||0)+")",1)):e.createCommentVNode("",!0)],4),t.value.style.title.subtitle.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`font-size:${t.value.style.title.subtitle.fontSize}px;color:${t.value.style.title.subtitle.color};font-weight:${t.value.style.title.subtitle.bold?"bold":"normal"}`)},e.toDisplayString(t.value.style.title.subtitle.text),5)):e.createCommentVNode("",!0)],4)):e.createCommentVNode("",!0),f.value?(e.openBlock(),e.createElementBlock("svg",{key:1,ref_key:"svgRef",ref:w,xmlns:e.unref(a.XMLNS),viewBox:`0 0 ${u.value.width} ${u.value.height}`,style:{overflow:"visible"}},[e.createVNode(q._sfc_main),o.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:u.value.width,height:u.value.height,style:{pointerEvents:"none"}},[e.renderSlot(o.$slots,"chart-background",{},void 0,!0)],8,P)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(l,s)=>(e.openBlock(),e.createElementBlock("radialGradient",{id:`gradient_positive_${s}_${v.value}`,cy:"50%",cx:"50%",r:"50%",fx:"50%",fy:"50%"},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(a.setOpacity)(e.unref(a.shiftHue)(t.value.style.bars.colors.positive,.05),l.intensity)},null,8,G),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(a.setOpacity)(t.value.style.bars.colors.positive,l.intensity)},null,8,T)],8,R))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(l,s)=>(e.openBlock(),e.createElementBlock("radialGradient",{id:`gradient_negative_${s}_${v.value}`,cy:"50%",cx:"50%",r:"50%",fx:"50%",fy:"50%"},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(a.setOpacity)(e.unref(a.shiftHue)(t.value.style.bars.colors.negative,.05),l.intensity)},null,8,Y),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(a.setOpacity)(t.value.style.bars.colors.negative,l.intensity)},null,8,J)],8,X))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(l,s)=>(e.openBlock(),e.createElementBlock("radialGradient",{id:`gradient_datapoint_${s}_${v.value}`,cy:"50%",cx:"50%",r:"50%",fx:"50%",fy:"50%"},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(a.setOpacity)(e.unref(a.shiftHue)(l.color,.05),l.intensity)},null,8,Q),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(a.setOpacity)(l.color,l.intensity)},null,8,Z)],8,K))),256))]),!t.value.style.bars.shape||t.value.style.bars.shape==="square"?(e.openBlock(),e.createElementBlock("g",ee,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(l,s)=>(e.openBlock(),e.createElementBlock("rect",{x:l.x,y:l.y,height:l.height,width:l.width,fill:t.value.style.bars.colors.gradient.show?l.gradient:l.color,stroke:l.stroke,"stroke-width":t.value.style.bars.strokeWidth,rx:`${t.value.style.bars.borderRadius*l.proportion/12}%`,class:e.normalizeClass({"vue-ui-sparkhistogram-shape":t.value.style.animation.show})},null,10,te))),256))])):(e.openBlock(),e.createElementBlock("g",le,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(l,s)=>(e.openBlock(),e.createBlock(M._sfc_main,{plot:{x:l.x+l.width/2,y:l.y+l.height/2},color:t.value.style.bars.colors.gradient.show?l.gradient:l.color,shape:t.value.style.bars.shape,radius:l.height*.4,class:e.normalizeClass({"vue-ui-sparkhistogram-shape":t.value.style.animation.show})},null,8,["plot","color","shape","radius","class"]))),256))])),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(l,s)=>(e.openBlock(),e.createElementBlock("text",{"text-anchor":"middle",x:l.textAnchor,y:l.y-t.value.style.labels.value.fontSize/3+t.value.style.labels.value.offsetY,"font-size":t.value.style.labels.value.fontSize,"font-weight":t.value.style.labels.value.bold?"bold":"normal",fill:t.value.style.labels.value.color},e.toDisplayString(e.unref(a.applyDataLabel)(t.value.style.labels.value.formatter,l.value,e.unref(a.dataLabel)({p:t.value.style.labels.value.prefix,v:l.value,s:t.value.style.labels.value.suffix,r:t.value.style.labels.value.rounding}),{datapoint:i.value[n.value],seriesIndex:n.value})),9,oe))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(l,s)=>(e.openBlock(),e.createElementBlock("g",null,[l.valueLabel?(e.openBlock(),e.createElementBlock("text",{key:0,x:l.textAnchor,y:l.y+l.height+t.value.style.labels.valueLabel.fontSize,"font-size":t.value.style.labels.valueLabel.fontSize,"text-anchor":"middle",fill:t.value.style.labels.valueLabel.color},e.toDisplayString(l.valueLabel),9,ae)):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(l,s)=>(e.openBlock(),e.createElementBlock("g",null,[l.timeLabel?(e.openBlock(),e.createElementBlock("text",{key:0,x:l.textAnchor,y:u.value.height-t.value.style.labels.timeLabel.fontSize/2,"font-size":t.value.style.labels.timeLabel.fontSize,fill:t.value.style.labels.timeLabel.color,"text-anchor":"middle"},e.toDisplayString(l.timeLabel),9,se)):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(l,s)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{height:u.value.height,width:l.unitWidth,fill:"transparent",x:l.trapX,y:0,onMouseover:d=>n.value=s,onMouseleave:r[0]||(r[0]=d=>n.value=null),stroke:n.value!==null&&n.value===s?t.value.style.selector.stroke:"","stroke-width":n.value!==null&&n.value===s?t.value.style.selector.strokeWidth:0,rx:t.value.style.selector.borderRadius,"stroke-dasharray":t.value.style.selector.strokeDasharray,onClick:()=>N(l,s)},null,40,ne)]))),256))],8,j)):e.createCommentVNode("",!0),o.$slots.source?(e.openBlock(),e.createElementBlock("div",re,[e.renderSlot(o.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),f.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(O.default,{key:3,config:{type:"sparkHistogram",style:{backgroundColor:t.value.style.backgroundColor,sparkHistogram:{color:"#CCCCCC"}}}},null,8,["config"]))],36))}},ue=I._export_sfc(ie,[["__scopeId","data-v-c92ac914"]]);exports.default=ue;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),a=require("./index-Dy2-pNb6.cjs"),_=require("./useNestedProp-DQ8Jt3-Y.cjs"),M=require("./Shape-D9l3WJGO.cjs"),O=require("./vue-ui-skeleton-Db7PiDqL.cjs"),q=require("./PackageVersion-DxR-fKLM.cjs"),H=require("./useChartAccessibility-Cm7nkzTG.cjs"),I=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),U={key:0},W={key:1},j=["xmlns","viewBox"],P=["width","height"],R=["id"],G=["stop-color"],T=["stop-color"],X=["id"],Y=["stop-color"],J=["stop-color"],K=["id"],Q=["stop-color"],Z=["stop-color"],ee={key:1},te=["x","y","height","width","fill","stroke","stroke-width","rx"],le={key:2},oe=["x","y","font-size","font-weight","fill"],ae=["x","y","font-size","fill"],se=["x","y","font-size","fill"],ne=["height","width","x","onMouseover","stroke","stroke-width","rx","stroke-dasharray","onClick"],re={key:2,ref:"source",dir:"auto"},ie={__name:"vue-ui-sparkhistogram",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectDatapoint"],setup(B,{emit:x}){e.useCssVars(o=>({"40b52890":L.value}));const{vue_ui_sparkhistogram:E}=a.useConfig(),c=B,f=e.computed(()=>!!c.dataset&&c.dataset.length);e.onMounted(()=>{k()});function k(){a.objectIsEmpty(c.dataset)?a.error({componentName:"VueUiSparkHistogram",type:"dataset"}):c.dataset.forEach((o,r)=>{a.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["value"]}).forEach(l=>{a.error({componentName:"VueUiSparkHistogram",type:"datasetSerieAttribute",property:l,index:r})})})}const v=e.ref(a.createUid()),t=e.computed({get:()=>b(),set:o=>o}),{svgRef:w}=H.useChartAccessibility({config:t.value.style.title});function b(){const o=_.useNestedProp({userConfig:c.config,defaultConfig:E});return o.theme?{..._.useNestedProp({userConfig:a.themes.vue_ui_sparkhistogram[o.theme]||c.config,defaultConfig:o})}:o}e.watch(()=>c.config,o=>{t.value=b(),k()},{deep:!0});const u=e.computed(()=>{const o=t.value.style.layout.height,r=t.value.style.layout.width,l=t.value.style.layout.padding.top,s=o-t.value.style.layout.padding.bottom,d=t.value.style.layout.padding.left,y=r-t.value.style.layout.padding.right,p=l+(o-l-t.value.style.layout.padding.bottom)/2,g=o-t.value.style.layout.padding.top-t.value.style.layout.padding.bottom,m=r-t.value.style.layout.padding.left-t.value.style.layout.padding.right;return{bottom:s,centerY:p,drawingHeight:g,drawingWidth:m,height:o,left:d,right:y,top:l,width:r}}),C=e.computed(()=>Math.max(...c.dataset.map(o=>Math.abs(o.value||0))));function $(o){return Math.abs(o)/C.value}const i=e.computed(()=>c.dataset.map((o,r)=>{const l=$(o.value||0),s=u.value.drawingHeight*l,d=u.value.drawingWidth/c.dataset.length,y=d*(t.value.style.bars.gap/100),p=d-y,g=u.value.centerY-s/2,m=u.value.left+(y/2+r*d),V=u.value.left+r*d,h=typeof o.intensity>"u"?100:Math.round(o.intensity*100),z=o.color?o.color:o.value>=0?a.setOpacity(t.value.style.bars.colors.positive,h):a.setOpacity(t.value.style.bars.colors.negative,h),D=o.color?o.color:o.value>=0?t.value.style.bars.colors.positive:t.value.style.bars.colors.negative,A=o.color?`url(#gradient_datapoint_${r}_${v.value})`:o.value>=0?`url(#gradient_positive_${r}_${v.value})`:`url(#gradient_negative_${r}_${v.value})`,F=m+p/2;return{...o,color:z,gradient:A,height:s,intensity:h,proportion:l,stroke:D,textAnchor:F,trapX:V,unitWidth:d,width:p,x:m,y:g}})),n=e.ref(null),S=x;function N(o,r){S("selectDatapoint",{datapoint:o,index:r})}const L=e.computed(()=>`${t.value.style.animation.speedMs}ms`);return(o,r)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-spark-histogram",style:e.normalizeStyle(`width:100%;background:${t.value.style.backgroundColor};font-family:${t.value.style.fontFamily}`),onMouseleave:r[1]||(r[1]=l=>n.value=null)},[t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`width:calc(100% - 12px);background:transparent;margin:0 auto;margin:${t.value.style.title.margin};padding: 0 6px;text-align:${t.value.style.title.textAlign}`)},[e.createElementVNode("div",{style:e.normalizeStyle(`font-size:${t.value.style.title.fontSize}px;color:${t.value.style.title.color};font-weight:${t.value.style.title.bold?"bold":"normal"}`)},[e.createTextVNode(e.toDisplayString(t.value.style.title.text)+" ",1),n.value!==null?(e.openBlock(),e.createElementBlock("span",U,"- "+e.toDisplayString(i.value[n.value].timeLabel||"")+" "+e.toDisplayString(e.unref(a.applyDataLabel)(t.value.style.labels.value.formatter,i.value[n.value].value,e.unref(a.dataLabel)({p:t.value.style.labels.value.prefix,v:i.value[n.value].value,s:t.value.style.labels.value.suffix,r:t.value.style.labels.value.rounding}),{datapoint:i.value[n.value],seriesIndex:n.value})),1)):e.createCommentVNode("",!0),![void 0,null].includes(n.value)&&![null,void 0].includes(i.value[n.value].valueLabel)?(e.openBlock(),e.createElementBlock("span",W,"("+e.toDisplayString(i.value[n.value].valueLabel||0)+")",1)):e.createCommentVNode("",!0)],4),t.value.style.title.subtitle.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`font-size:${t.value.style.title.subtitle.fontSize}px;color:${t.value.style.title.subtitle.color};font-weight:${t.value.style.title.subtitle.bold?"bold":"normal"}`)},e.toDisplayString(t.value.style.title.subtitle.text),5)):e.createCommentVNode("",!0)],4)):e.createCommentVNode("",!0),f.value?(e.openBlock(),e.createElementBlock("svg",{key:1,ref_key:"svgRef",ref:w,xmlns:e.unref(a.XMLNS),viewBox:`0 0 ${u.value.width} ${u.value.height}`,style:{overflow:"visible"}},[e.createVNode(q._sfc_main),o.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:u.value.width,height:u.value.height,style:{pointerEvents:"none"}},[e.renderSlot(o.$slots,"chart-background",{},void 0,!0)],8,P)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(l,s)=>(e.openBlock(),e.createElementBlock("radialGradient",{id:`gradient_positive_${s}_${v.value}`,cy:"50%",cx:"50%",r:"50%",fx:"50%",fy:"50%"},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(a.setOpacity)(e.unref(a.shiftHue)(t.value.style.bars.colors.positive,.05),l.intensity)},null,8,G),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(a.setOpacity)(t.value.style.bars.colors.positive,l.intensity)},null,8,T)],8,R))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(l,s)=>(e.openBlock(),e.createElementBlock("radialGradient",{id:`gradient_negative_${s}_${v.value}`,cy:"50%",cx:"50%",r:"50%",fx:"50%",fy:"50%"},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(a.setOpacity)(e.unref(a.shiftHue)(t.value.style.bars.colors.negative,.05),l.intensity)},null,8,Y),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(a.setOpacity)(t.value.style.bars.colors.negative,l.intensity)},null,8,J)],8,X))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(l,s)=>(e.openBlock(),e.createElementBlock("radialGradient",{id:`gradient_datapoint_${s}_${v.value}`,cy:"50%",cx:"50%",r:"50%",fx:"50%",fy:"50%"},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(a.setOpacity)(e.unref(a.shiftHue)(l.color,.05),l.intensity)},null,8,Q),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(a.setOpacity)(l.color,l.intensity)},null,8,Z)],8,K))),256))]),!t.value.style.bars.shape||t.value.style.bars.shape==="square"?(e.openBlock(),e.createElementBlock("g",ee,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(l,s)=>(e.openBlock(),e.createElementBlock("rect",{x:l.x,y:l.y,height:l.height,width:l.width,fill:t.value.style.bars.colors.gradient.show?l.gradient:l.color,stroke:l.stroke,"stroke-width":t.value.style.bars.strokeWidth,rx:`${t.value.style.bars.borderRadius*l.proportion/12}%`,class:e.normalizeClass({"vue-ui-sparkhistogram-shape":t.value.style.animation.show})},null,10,te))),256))])):(e.openBlock(),e.createElementBlock("g",le,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(l,s)=>(e.openBlock(),e.createBlock(M._sfc_main,{plot:{x:l.x+l.width/2,y:l.y+l.height/2},color:t.value.style.bars.colors.gradient.show?l.gradient:l.color,shape:t.value.style.bars.shape,radius:l.height*.4,class:e.normalizeClass({"vue-ui-sparkhistogram-shape":t.value.style.animation.show})},null,8,["plot","color","shape","radius","class"]))),256))])),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(l,s)=>(e.openBlock(),e.createElementBlock("text",{"text-anchor":"middle",x:l.textAnchor,y:l.y-t.value.style.labels.value.fontSize/3+t.value.style.labels.value.offsetY,"font-size":t.value.style.labels.value.fontSize,"font-weight":t.value.style.labels.value.bold?"bold":"normal",fill:t.value.style.labels.value.color},e.toDisplayString(e.unref(a.applyDataLabel)(t.value.style.labels.value.formatter,l.value,e.unref(a.dataLabel)({p:t.value.style.labels.value.prefix,v:l.value,s:t.value.style.labels.value.suffix,r:t.value.style.labels.value.rounding}),{datapoint:i.value[n.value],seriesIndex:n.value})),9,oe))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(l,s)=>(e.openBlock(),e.createElementBlock("g",null,[l.valueLabel?(e.openBlock(),e.createElementBlock("text",{key:0,x:l.textAnchor,y:l.y+l.height+t.value.style.labels.valueLabel.fontSize,"font-size":t.value.style.labels.valueLabel.fontSize,"text-anchor":"middle",fill:t.value.style.labels.valueLabel.color},e.toDisplayString(l.valueLabel),9,ae)):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(l,s)=>(e.openBlock(),e.createElementBlock("g",null,[l.timeLabel?(e.openBlock(),e.createElementBlock("text",{key:0,x:l.textAnchor,y:u.value.height-t.value.style.labels.timeLabel.fontSize/2,"font-size":t.value.style.labels.timeLabel.fontSize,fill:t.value.style.labels.timeLabel.color,"text-anchor":"middle"},e.toDisplayString(l.timeLabel),9,se)):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(l,s)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{height:u.value.height,width:l.unitWidth,fill:"transparent",x:l.trapX,y:0,onMouseover:d=>n.value=s,onMouseleave:r[0]||(r[0]=d=>n.value=null),stroke:n.value!==null&&n.value===s?t.value.style.selector.stroke:"","stroke-width":n.value!==null&&n.value===s?t.value.style.selector.strokeWidth:0,rx:t.value.style.selector.borderRadius,"stroke-dasharray":t.value.style.selector.strokeDasharray,onClick:()=>N(l,s)},null,40,ne)]))),256))],8,j)):e.createCommentVNode("",!0),o.$slots.source?(e.openBlock(),e.createElementBlock("div",re,[e.renderSlot(o.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),f.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(O.default,{key:3,config:{type:"sparkHistogram",style:{backgroundColor:t.value.style.backgroundColor,sparkHistogram:{color:"#CCCCCC"}}}},null,8,["config"]))],36))}},ue=I._export_sfc(ie,[["__scopeId","data-v-c92ac914"]]);exports.default=ue;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { useCssVars as Z, computed as _, onMounted as ee, ref as N, watch as te, createElementBlock as s, openBlock as a, normalizeStyle as $, createCommentVNode as c, createBlock as D, createElementVNode as h, createTextVNode as le, toDisplayString as p, unref as n, createVNode as ae, renderSlot as I, Fragment as f, renderList as g, normalizeClass as V } from "vue";
|
|
2
|
-
import { u as se, o as oe, e as E, g as ue, c as ie, a as re, s as m, i as H, f as F, X as ne, w as z } from "./index-
|
|
3
|
-
import { u as O } from "./useNestedProp-
|
|
4
|
-
import { _ as ve } from "./Shape-
|
|
5
|
-
import de from "./vue-ui-skeleton-
|
|
6
|
-
import { _ as ce } from "./PackageVersion-
|
|
2
|
+
import { u as se, o as oe, e as E, g as ue, c as ie, a as re, s as m, i as H, f as F, X as ne, w as z } from "./index-Co5UfCMK.js";
|
|
3
|
+
import { u as O } from "./useNestedProp-C22WP03t.js";
|
|
4
|
+
import { _ as ve } from "./Shape-Y1FgLdPz.js";
|
|
5
|
+
import de from "./vue-ui-skeleton-BSlYUHZA.js";
|
|
6
|
+
import { _ as ce } from "./PackageVersion-CkUbRQrt.js";
|
|
7
7
|
import { u as ye } from "./useChartAccessibility-BWojgys7.js";
|
|
8
8
|
import { _ as he } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
9
9
|
const fe = { key: 0 }, ge = { key: 1 }, pe = ["xmlns", "viewBox"], me = ["width", "height"], be = ["id"], _e = ["stop-color"], xe = ["stop-color"], ke = ["id"], we = ["stop-color"], $e = ["stop-color"], Ce = ["id"], Le = ["stop-color"], ze = ["stop-color"], Se = { key: 1 }, Ae = ["x", "y", "height", "width", "fill", "stroke", "stroke-width", "rx"], Me = { key: 2 }, Ne = ["x", "y", "font-size", "font-weight", "fill"], De = ["x", "y", "font-size", "fill"], Ie = ["x", "y", "font-size", "fill"], Ve = ["height", "width", "x", "onMouseover", "stroke", "stroke-width", "rx", "stroke-dasharray", "onClick"], Ee = {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { toRef as ge, ref as g, computed as f, onMounted as ie, watch as q, createElementBlock as d, openBlock as n, normalizeStyle as z, renderSlot as M, nextTick as be, createCommentVNode as h, createBlock as ee, normalizeProps as te, guardReactiveProps as ae, createElementVNode as b, toDisplayString as P, unref as c, createVNode as me, Fragment as E, renderList as B, withCtx as ke, createTextVNode as xe } from "vue";
|
|
2
|
-
import { s as W, a2 as le, u as _e, c as we, a as $e, C as oe, a3 as G, o as Ne, e as ue, g as Le, w as F, a4 as Ce, a5 as Me, X as Se, T as se, S as Ie, a6 as re, i as X, f as j } from "./index-
|
|
3
|
-
import { u as ne } from "./useNestedProp-
|
|
4
|
-
import Ve from "./vue-ui-skeleton-
|
|
2
|
+
import { s as W, a2 as le, u as _e, c as we, a as $e, C as oe, a3 as G, o as Ne, e as ue, g as Le, w as F, a4 as Ce, a5 as Me, X as Se, T as se, S as Ie, a6 as re, i as X, f as j } from "./index-Co5UfCMK.js";
|
|
3
|
+
import { u as ne } from "./useNestedProp-C22WP03t.js";
|
|
4
|
+
import Ve from "./vue-ui-skeleton-BSlYUHZA.js";
|
|
5
5
|
import { t as Re, u as ze } from "./useResponsive-Cw4oZ8sQ.js";
|
|
6
|
-
import { _ as We } from "./PackageVersion-
|
|
6
|
+
import { _ as We } from "./PackageVersion-CkUbRQrt.js";
|
|
7
7
|
import { u as Ae } from "./useChartAccessibility-BWojgys7.js";
|
|
8
8
|
import { _ as de } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
9
9
|
const Te = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-Cai0fWP7.cjs"),A=require("./useNestedProp-DcWhlk8h.cjs"),X=require("./vue-ui-skeleton-C954hFY-.cjs"),O=require("./useResponsive-DQmBAoBf.cjs"),H=require("./PackageVersion-BMNt7NsQ.cjs"),U=require("./useChartAccessibility-Cm7nkzTG.cjs"),D=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Z={__name:"SparkTooltip",props:{svgRef:{type:Object},x:{type:Number,required:!0},y:{type:Number,required:!0},prevX:{type:Number,required:!0},prevY:{type:Number,required:!0},offsetY:{type:Number,default:0},background:{type:String},backgroundOpacity:{type:Number,default:100},borderRadius:{type:Number,default:2},borderWidth:{type:Number,default:0},borderColor:{type:String,default:"#FFFFFF"},color:{type:String},fontSize:{type:Number}},setup(f){const c=f,w=e.toRef(c.svgRef),u=e.ref(null),y=e.ref(0),p=e.ref(0),m=e.ref(!1),V=e.computed(()=>r.setOpacity(c.background,c.backgroundOpacity)),N=async()=>{if(!w.value||!u.value)return;const t=r.placeHTMLElementAtSVGCoordinates({svgElement:w.value,element:u.value,x:c.x,y:c.y,offsetY:c.offsetY}),g=r.placeHTMLElementAtSVGCoordinates({svgElement:w.value,element:u.value,x:c.prevX,y:c.prevY,offsetY:c.offsetY});!t||!g||(m.value=!1,y.value=g.top,p.value=g.left,await e.nextTick(),setTimeout(()=>{m.value=!0,y.value=t.top,p.value=t.left},50))};return e.onMounted(N),e.watch(()=>[c.x,c.y,c.prevX,c.prevY],()=>N(),{immediate:!0}),(t,g)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"tooltipRef",ref:u,class:"vue-data-ui-spark-tooltip",style:e.normalizeStyle({position:"fixed",top:`${y.value}px`,left:`${p.value}px`,pointerEvents:"none",background:V.value,color:c.color,fontSize:`${c.fontSize}px`,borderRadius:`${c.borderRadius}px`,border:`${c.borderWidth}px solid ${c.borderColor}`,transition:m.value?"top 0.3s ease-out, left 0.3s ease-out":"none"})},[e.renderSlot(t.$slots,"default",{},void 0,!0)],4))}},J=D._export_sfc(Z,[["__scopeId","data-v-c8e27542"]]),K=["id"],Q=["xmlns","viewBox"],ee=["width","height"],te=["id"],le=["stop-color"],ae=["stop-color"],oe=["id"],re=["stop-color"],ue=["stop-color"],ne=["id"],se=["stop-color"],ie=["stop-color"],de={key:1},ce=["d","fill"],ve=["d","fill"],pe=["d","stroke","stroke-width"],fe=["d","stroke","stroke-width"],ye=["x","y","width","height","fill","rx"],he=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],me=["x1","x2","y1","y2","stroke","stroke-dasharray","stroke-width"],ge=["cx","cy","r","fill","stroke","stroke-width"],ke=["x","y","font-size","font-weight","fill"],be=["x","y","height","width","onMouseenter","onClick"],xe={__name:"vue-ui-sparkline",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}},showInfo:{type:Boolean,default:!0},selectedIndex:{type:Number,default:void 0},heightRatio:{type:Number,default:1},forcedPadding:{type:Number,default:30}},emits:["hoverIndex","selectDatapoint"],setup(f,{emit:c}){const{vue_ui_sparkline:w}=r.useConfig(),u=f,y=e.computed(()=>Array.isArray(u.dataset)&&u.dataset.length>0),p=e.ref(r.createUid()),m=e.ref(null),V=e.ref(null),N=e.ref(null),t=e.computed({get:()=>M(),set:l=>l}),{svgRef:g}=U.useChartAccessibility({config:t.value.style.title});function M(){const l=A.useNestedProp({userConfig:u.config,defaultConfig:w});let o={};return l.theme?o={...A.useNestedProp({userConfig:r.themes.vue_ui_sparkline[l.theme]||u.config,defaultConfig:l})}:o=l,u.config&&r.hasDeepProperty(u.config,"style.scaleMin")?o.style.scaleMin=u.config.style.scaleMin:o.style.scaleMin=null,u.config&&r.hasDeepProperty(u.config,"style.scaleMax")?o.style.scaleMax=u.config.style.scaleMax:o.style.scaleMax=null,o}const L=e.computed(()=>r.largestTriangleThreeBucketsArrayObjects({data:u.dataset,threshold:t.value.downsample.threshold}));e.watch(()=>u.config,l=>{t.value=M(),z(),n.value.chartWidth=t.value.style.chartWidth},{deep:!0}),e.watch(()=>u.dataset,l=>{k.value=r.largestTriangleThreeBucketsArrayObjects({data:u.dataset.map(o=>({...o,value:[void 0].includes(o.value)?null:o.value})),threshold:t.value.downsample.threshold})},{deep:!0});const k=e.ref(W());function W(){return r.largestTriangleThreeBucketsArrayObjects({data:u.dataset.map(l=>t.value.style.animation.show&&u.dataset.length>1?{...l,value:null}:{...l,value:[void 0].includes(l.value)?null:l.value}),threshold:t.value.downsample.threshold})}const I=e.ref(null);e.onMounted(()=>{if(z(),t.value.style.animation.show&&u.dataset.length>1){let a=function(){o<L.value.length?(k.value.push(L.value[o]),setTimeout(()=>{requestAnimationFrame(a)},l)):k.value=L.value,o+=1};k.value=[];const l=t.value.style.animation.animationFrames/u.dataset.length;let o=0;a()}});function z(){if(r.objectIsEmpty(u.dataset)?r.error({componentName:"VueUiSparkline",type:"dataset"}):u.dataset.forEach((l,o)=>{r.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["period","value"]}).forEach(a=>{r.error({componentName:"VueUiSparkline",type:"datasetSerieAttribute",property:a,index:o})})}),t.value.responsive){const l=O.throttle(()=>{const{width:o,height:a}=O.useResponsive({chart:m.value,title:t.value.style.title.show&&u.showInfo?V.value:null,source:N.value});requestAnimationFrame(()=>{n.value.width=o,n.value.height=a,n.value.chartWidth=t.value.style.chartWidth/500*o,n.value.padding=u.forcedPadding/500*o})});I.value=new ResizeObserver(l),I.value.observe(m.value.parentNode)}}const n=e.ref({height:80*u.heightRatio,width:500,chartWidth:t.value.style.chartWidth,padding:u.forcedPadding}),$=c,s=e.computed(()=>{const{top:l,right:o,bottom:a,left:i}=t.value.style.padding;return{top:l,left:i,right:n.value.width-o,bottom:n.value.height-a,start:u.showInfo&&t.value.style.dataLabel.show&&t.value.style.dataLabel.position==="left"?n.value.width-n.value.chartWidth+i:n.value.padding+i,width:u.showInfo&&t.value.style.dataLabel.show?n.value.chartWidth-i-o:n.value.width-n.value.padding-i-o,height:n.value.height-l-a}}),E=e.computed(()=>[null,void 0].includes(t.value.style.scaleMin)?Math.min(...k.value.map(l=>isNaN(l.value)||[void 0,null,"NaN",NaN,1/0,-1/0].includes(l.value)?0:l.value||0)):t.value.style.scaleMin),F=e.computed(()=>[null,void 0].includes(t.value.style.scaleMax)?Math.max(...k.value.map(l=>isNaN(l.value)||[void 0,null,"NaN",NaN,1/0,-1/0].includes(l.value)?0:l.value||0)):t.value.style.scaleMax),B=e.computed(()=>{const l=E.value>=0?0:E.value;return Math.abs(l)}),P=e.computed(()=>F.value+B.value),x=e.computed(()=>s.value.bottom-s.value.height*S(B.value));function S(l){return isNaN(l/P.value)?0:l/P.value}const b=e.computed(()=>L.value.length-1),v=e.computed(()=>k.value.map((l,o)=>{const a=isNaN(l.value)||[void 0,null,"NaN",NaN,1/0,-1/0].includes(l.value)?0:l.value||0,i=s.value.width/(b.value+1)>n.padding?n.padding:s.value.width/(b.value+1);return{absoluteValue:a,period:l.period,plotValue:a+B.value,toMax:S(a+B.value),x:s.value.start+o*(i>s.value.width/12?s.value.width/12:i),y:s.value.bottom-s.value.height*S(a+B.value),id:`plot_${p.value}_${o}`,color:C.value?t.value.style.bar.color:t.value.style.area.useGradient?r.shiftHue(t.value.style.line.color,.05*(1-o/b.value)):t.value.style.line.color,width:i>s.value.width/12?s.value.width/12:i}})),q=e.computed(()=>{const l={x:v.value[0].x||0,y:(n.value.height||0)-6},o={x:v.value[v.value.length-1].x||0,y:(n.value.height||0)-6},a=[];return v.value.forEach(i=>{a.push(`${i.x||0},${i.y||0} `)}),[l.x,l.y,...a,o.x,o.y].toString()}),d=e.ref(void 0),_=e.ref(void 0);function Y(l,o){d.value=l,_.value||(_.value=l),$("hoverIndex",{index:o})}function j(){_.value=d.value,d.value=void 0,$("hoverIndex",{index:void 0})}const h=e.computed(()=>{if(y.value){const l=v.value.map(a=>a.absoluteValue),o=l.reduce((a,i)=>a+i,0);return{latest:v.value[v.value.length-1].absoluteValue,sum:o,average:o/v.value.length,median:r.calcMedian(l),trend:r.calcLinearProgression(v.value.map(({x:a,y:i,absoluteValue:T})=>({x:a,y:i,value:T}))).trend}}else return{latest:null,sum:null,average:null,median:null,trend:null}}),R=e.computed(()=>y.value?t.value.style.dataLabel.valueType==="latest"?h.value.latest:t.value.style.dataLabel.valueType==="sum"?h.value.sum:t.value.style.dataLabel.valueType==="average"?h.value.average:0:0),C=e.computed(()=>t.value.type&&t.value.type==="bar");function G(l,o){$("selectDatapoint",{datapoint:l,index:o})}return(l,o)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"sparklineChart",ref:m,class:"vue-ui-sparkline",id:p.value,style:e.normalizeStyle(`width:100%;font-family:${t.value.style.fontFamily};`)},[e.renderSlot(l.$slots,"before",e.normalizeProps(e.guardReactiveProps({selected:d.value,latest:h.value.latest,sum:h.value.sum,average:h.value.average,median:h.value.median,trend:h.value.trend})),void 0,!0),t.value.style.title.show&&f.showInfo?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:V,class:"vue-ui-sparkline-title",style:e.normalizeStyle(`display:flex;align-items:center;width:100%;color:${t.value.style.title.color};background:${t.value.style.backgroundColor};justify-content:${t.value.style.title.textAlign==="left"?"flex-start":t.value.style.title.textAlign==="right"?"flex-end":"center"};height:${t.value.style.title.fontSize*2}px;font-size:${t.value.style.title.fontSize}px;font-weight:${t.value.style.title.bold?"bold":"normal"};`)},[e.createElementVNode("span",{style:e.normalizeStyle(`padding:${t.value.style.title.textAlign==="left"?"0 0 0 12px":t.value.style.title.textAlign==="right"?"0 12px 0 0":"0"}`)},e.toDisplayString(d.value?d.value.period:t.value.style.title.text),5)],4)):e.createCommentVNode("",!0),y.value?(e.openBlock(),e.createElementBlock("svg",{key:1,ref_key:"svgRef",ref:g,xmlns:e.unref(r.XMLNS),viewBox:`0 0 ${n.value.width} ${n.value.height}`,style:e.normalizeStyle(`background:${t.value.style.backgroundColor};overflow:visible`),onMouseleave:o[0]||(o[0]=a=>_.value=void 0)},[e.createVNode(H._sfc_main),l.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:n.value.width<=0?10:n.value.width,height:n.value.height<=0?10:n.value.height,style:{pointerEvents:"none"}},[e.renderSlot(l.$slots,"chart-background",{},void 0,!0)],8,ee)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{x1:"0%",y1:"0%",x2:"100%",y2:"0%",id:`sparkline_gradient_${p.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(r.setOpacity)(e.unref(r.shiftHue)(t.value.style.area.color,.05),t.value.style.area.opacity)},null,8,le),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(r.setOpacity)(t.value.style.area.color,t.value.style.area.opacity)},null,8,ae)],8,te),e.createElementVNode("linearGradient",{x2:"0%",y2:"100%",id:`sparkline_bar_gradient_pos_${p.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.bar.color},null,8,re),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(r.shiftHue)(t.value.style.bar.color,.05)},null,8,ue)],8,oe),e.createElementVNode("linearGradient",{x2:"0%",y2:"100%",id:`sparkline_bar_gradient_neg_${p.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(r.shiftHue)(t.value.style.bar.color,.05)},null,8,se),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.bar.color},null,8,ie)],8,ne)]),t.value.style.area.show&&!C.value&&v.value[0]?(e.openBlock(),e.createElementBlock("g",de,[t.value.style.line.smooth?(e.openBlock(),e.createElementBlock("path",{key:0,d:`M ${v.value[0].x},${s.value.bottom} ${e.unref(r.createSmoothPath)(v.value)} L ${v.value.at(-1).x},${s.value.bottom} Z`,fill:t.value.style.area.useGradient?`url(#sparkline_gradient_${p.value})`:e.unref(r.setOpacity)(t.value.style.area.color,t.value.style.area.opacity)},null,8,ce)):(e.openBlock(),e.createElementBlock("path",{key:1,d:`M${q.value}Z`,fill:t.value.style.area.useGradient?`url(#sparkline_gradient_${p.value})`:e.unref(r.setOpacity)(t.value.style.area.color,t.value.style.area.opacity)},null,8,ve))])):e.createCommentVNode("",!0),t.value.style.line.smooth&&!C.value?(e.openBlock(),e.createElementBlock("path",{key:2,d:`M ${e.unref(r.createSmoothPath)(v.value)}`,stroke:t.value.style.line.color,fill:"none","stroke-width":t.value.style.line.strokeWidth,"stroke-linecap":"round"},null,8,pe)):e.createCommentVNode("",!0),!t.value.style.line.smooth&&!C.value?(e.openBlock(),e.createElementBlock("path",{key:3,d:`M ${e.unref(r.createStraightPath)(v.value)}`,stroke:t.value.style.line.color,fill:"none","stroke-width":t.value.style.line.strokeWidth,"stroke-linecap":"round"},null,8,fe)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(a,i)=>(e.openBlock(),e.createElementBlock("g",null,[C.value?(e.openBlock(),e.createElementBlock("rect",{key:0,x:a.x-a.width/2,y:isNaN(a.absoluteValue>0?a.y:x.value)?0:a.absoluteValue>0?a.y:x.value,width:a.width,height:isNaN(Math.abs(a.y-x.value))?0:Math.abs(a.y-x.value),fill:a.absoluteValue>0?`url(#sparkline_bar_gradient_pos_${p.value})`:`url(#sparkline_bar_gradient_neg_${p.value})`,rx:t.value.style.bar.borderRadius},null,8,ye)):e.createCommentVNode("",!0),t.value.style.verticalIndicator.show&&(d.value&&a.id===d.value.id||f.selectedIndex===i)?(e.openBlock(),e.createElementBlock("line",{key:1,x1:a.x,x2:a.x,y1:s.value.top-6,y2:s.value.bottom,stroke:t.value.style.verticalIndicator.color||a.color,"stroke-width":t.value.style.verticalIndicator.strokeWidth,"stroke-linecap":"round","stroke-dasharray":t.value.style.verticalIndicator.strokeDasharray||0},null,8,he)):e.createCommentVNode("",!0)]))),256)),E.value<0?(e.openBlock(),e.createElementBlock("line",{key:4,x1:s.value.start,x2:s.value.start+s.value.width-16,y1:e.unref(r.forceValidValue)(x.value,s.value.bottom),y2:e.unref(r.forceValidValue)(x.value,s.value.bottom),stroke:t.value.style.zeroLine.color,"stroke-dasharray":t.value.style.zeroLine.strokeWidth*2,"stroke-width":t.value.style.zeroLine.strokeWidth,"stroke-linecap":"round"},null,8,me)):e.createCommentVNode("",!0),t.value.style.plot.show?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:5},e.renderList(v.value,(a,i)=>(e.openBlock(),e.createElementBlock("g",null,[d.value&&a.id===d.value.id||f.selectedIndex===i||f.dataset.length===1?(e.openBlock(),e.createElementBlock("circle",{key:0,cx:a.x,cy:a.y,r:t.value.style.plot.radius,fill:a.color,stroke:t.value.style.plot.stroke,"stroke-width":t.value.style.plot.strokeWidth},null,8,ge)):e.createCommentVNode("",!0)]))),256)):e.createCommentVNode("",!0),f.showInfo&&t.value.style.dataLabel.show?(e.openBlock(),e.createElementBlock("text",{key:6,x:t.value.style.dataLabel.position==="left"?12+t.value.style.dataLabel.offsetX:s.value.width+12+t.value.style.dataLabel.offsetX,y:n.value.height/2+t.value.style.dataLabel.fontSize/2.5+t.value.style.dataLabel.offsetY,"font-size":t.value.style.dataLabel.fontSize,"font-weight":t.value.style.dataLabel.bold?"bold":"normal",fill:t.value.style.dataLabel.color},e.toDisplayString(d.value?e.unref(r.applyDataLabel)(t.value.style.dataLabel.formatter,d.value.absoluteValue,e.unref(r.dataLabel)({p:t.value.style.dataLabel.prefix,v:d.value.absoluteValue,s:t.value.style.dataLabel.suffix,r:t.value.style.dataLabel.roundingValue}),{datapoint:d.value}):e.unref(r.applyDataLabel)(t.value.style.dataLabel.formatter,R.value,e.unref(r.dataLabel)({p:t.value.style.dataLabel.prefix,v:R.value,s:t.value.style.dataLabel.suffix,r:t.value.style.dataLabel.roundingValue}))),9,ke)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(a,i)=>(e.openBlock(),e.createElementBlock("rect",{x:a.x-(s.value.width/(b.value+1)>n.value.padding?n.value.padding:s.value.width/(b.value+1))/2,y:s.value.top-6,height:s.value.height+6,width:s.value.width/(b.value+1)>n.value.padding?n.value.padding:s.value.width/(b.value+1),fill:"transparent",onMouseenter:T=>Y(a,i),onMouseleave:j,onClick:()=>G(a,i)},null,40,be))),256)),e.renderSlot(l.$slots,"svg",{svg:n.value},void 0,!0)],44,Q)):e.createCommentVNode("",!0),d.value&&t.value.style.tooltip.show?(e.openBlock(),e.createBlock(J,{key:2,x:d.value.x,y:d.value.y,prevX:_.value.x,prevY:_.value.y,offsetY:t.value.style.plot.radius*3+t.value.style.tooltip.offsetY,svgRef:e.unref(g),background:t.value.style.tooltip.backgroundColor,color:t.value.style.tooltip.color,fontSize:t.value.style.tooltip.fontSize,borderWidth:t.value.style.tooltip.borderWidth,borderColor:t.value.style.tooltip.borderColor,borderRadius:t.value.style.tooltip.borderRadius,backgroundOpacity:t.value.style.tooltip.backgroundOpacity},{default:e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip",e.normalizeProps(e.guardReactiveProps({...d.value})),()=>[e.createTextVNode(e.toDisplayString(d.value.period)+": "+e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.dataLabel.formatter,d.value.absoluteValue,e.unref(r.dataLabel)({p:t.value.style.dataLabel.prefix,v:d.value.absoluteValue,s:t.value.style.dataLabel.suffix,r:t.value.style.dataLabel.roundingValue}),{datapoint:d.value})),1)],!0)]),_:3},8,["x","y","prevX","prevY","offsetY","svgRef","background","color","fontSize","borderWidth","borderColor","borderRadius","backgroundOpacity"])):e.createCommentVNode("",!0),l.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:3,ref_key:"source",ref:N,dir:"auto"},[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),y.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(X.default,{key:4,config:{type:"sparkline",style:{backgroundColor:t.value.style.backgroundColor,sparkline:{color:"#CCCCCC"}}}},null,8,["config"]))],12,K))}},_e=D._export_sfc(xe,[["__scopeId","data-v-246ce941"]]);exports.default=_e;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-Dy2-pNb6.cjs"),A=require("./useNestedProp-DQ8Jt3-Y.cjs"),X=require("./vue-ui-skeleton-Db7PiDqL.cjs"),O=require("./useResponsive-DQmBAoBf.cjs"),H=require("./PackageVersion-DxR-fKLM.cjs"),U=require("./useChartAccessibility-Cm7nkzTG.cjs"),D=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Z={__name:"SparkTooltip",props:{svgRef:{type:Object},x:{type:Number,required:!0},y:{type:Number,required:!0},prevX:{type:Number,required:!0},prevY:{type:Number,required:!0},offsetY:{type:Number,default:0},background:{type:String},backgroundOpacity:{type:Number,default:100},borderRadius:{type:Number,default:2},borderWidth:{type:Number,default:0},borderColor:{type:String,default:"#FFFFFF"},color:{type:String},fontSize:{type:Number}},setup(f){const c=f,w=e.toRef(c.svgRef),u=e.ref(null),y=e.ref(0),p=e.ref(0),m=e.ref(!1),V=e.computed(()=>r.setOpacity(c.background,c.backgroundOpacity)),N=async()=>{if(!w.value||!u.value)return;const t=r.placeHTMLElementAtSVGCoordinates({svgElement:w.value,element:u.value,x:c.x,y:c.y,offsetY:c.offsetY}),g=r.placeHTMLElementAtSVGCoordinates({svgElement:w.value,element:u.value,x:c.prevX,y:c.prevY,offsetY:c.offsetY});!t||!g||(m.value=!1,y.value=g.top,p.value=g.left,await e.nextTick(),setTimeout(()=>{m.value=!0,y.value=t.top,p.value=t.left},50))};return e.onMounted(N),e.watch(()=>[c.x,c.y,c.prevX,c.prevY],()=>N(),{immediate:!0}),(t,g)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"tooltipRef",ref:u,class:"vue-data-ui-spark-tooltip",style:e.normalizeStyle({position:"fixed",top:`${y.value}px`,left:`${p.value}px`,pointerEvents:"none",background:V.value,color:c.color,fontSize:`${c.fontSize}px`,borderRadius:`${c.borderRadius}px`,border:`${c.borderWidth}px solid ${c.borderColor}`,transition:m.value?"top 0.3s ease-out, left 0.3s ease-out":"none"})},[e.renderSlot(t.$slots,"default",{},void 0,!0)],4))}},J=D._export_sfc(Z,[["__scopeId","data-v-c8e27542"]]),K=["id"],Q=["xmlns","viewBox"],ee=["width","height"],te=["id"],le=["stop-color"],ae=["stop-color"],oe=["id"],re=["stop-color"],ue=["stop-color"],ne=["id"],se=["stop-color"],ie=["stop-color"],de={key:1},ce=["d","fill"],ve=["d","fill"],pe=["d","stroke","stroke-width"],fe=["d","stroke","stroke-width"],ye=["x","y","width","height","fill","rx"],he=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],me=["x1","x2","y1","y2","stroke","stroke-dasharray","stroke-width"],ge=["cx","cy","r","fill","stroke","stroke-width"],ke=["x","y","font-size","font-weight","fill"],be=["x","y","height","width","onMouseenter","onClick"],xe={__name:"vue-ui-sparkline",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}},showInfo:{type:Boolean,default:!0},selectedIndex:{type:Number,default:void 0},heightRatio:{type:Number,default:1},forcedPadding:{type:Number,default:30}},emits:["hoverIndex","selectDatapoint"],setup(f,{emit:c}){const{vue_ui_sparkline:w}=r.useConfig(),u=f,y=e.computed(()=>Array.isArray(u.dataset)&&u.dataset.length>0),p=e.ref(r.createUid()),m=e.ref(null),V=e.ref(null),N=e.ref(null),t=e.computed({get:()=>M(),set:l=>l}),{svgRef:g}=U.useChartAccessibility({config:t.value.style.title});function M(){const l=A.useNestedProp({userConfig:u.config,defaultConfig:w});let o={};return l.theme?o={...A.useNestedProp({userConfig:r.themes.vue_ui_sparkline[l.theme]||u.config,defaultConfig:l})}:o=l,u.config&&r.hasDeepProperty(u.config,"style.scaleMin")?o.style.scaleMin=u.config.style.scaleMin:o.style.scaleMin=null,u.config&&r.hasDeepProperty(u.config,"style.scaleMax")?o.style.scaleMax=u.config.style.scaleMax:o.style.scaleMax=null,o}const L=e.computed(()=>r.largestTriangleThreeBucketsArrayObjects({data:u.dataset,threshold:t.value.downsample.threshold}));e.watch(()=>u.config,l=>{t.value=M(),z(),n.value.chartWidth=t.value.style.chartWidth},{deep:!0}),e.watch(()=>u.dataset,l=>{k.value=r.largestTriangleThreeBucketsArrayObjects({data:u.dataset.map(o=>({...o,value:[void 0].includes(o.value)?null:o.value})),threshold:t.value.downsample.threshold})},{deep:!0});const k=e.ref(W());function W(){return r.largestTriangleThreeBucketsArrayObjects({data:u.dataset.map(l=>t.value.style.animation.show&&u.dataset.length>1?{...l,value:null}:{...l,value:[void 0].includes(l.value)?null:l.value}),threshold:t.value.downsample.threshold})}const I=e.ref(null);e.onMounted(()=>{if(z(),t.value.style.animation.show&&u.dataset.length>1){let a=function(){o<L.value.length?(k.value.push(L.value[o]),setTimeout(()=>{requestAnimationFrame(a)},l)):k.value=L.value,o+=1};k.value=[];const l=t.value.style.animation.animationFrames/u.dataset.length;let o=0;a()}});function z(){if(r.objectIsEmpty(u.dataset)?r.error({componentName:"VueUiSparkline",type:"dataset"}):u.dataset.forEach((l,o)=>{r.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["period","value"]}).forEach(a=>{r.error({componentName:"VueUiSparkline",type:"datasetSerieAttribute",property:a,index:o})})}),t.value.responsive){const l=O.throttle(()=>{const{width:o,height:a}=O.useResponsive({chart:m.value,title:t.value.style.title.show&&u.showInfo?V.value:null,source:N.value});requestAnimationFrame(()=>{n.value.width=o,n.value.height=a,n.value.chartWidth=t.value.style.chartWidth/500*o,n.value.padding=u.forcedPadding/500*o})});I.value=new ResizeObserver(l),I.value.observe(m.value.parentNode)}}const n=e.ref({height:80*u.heightRatio,width:500,chartWidth:t.value.style.chartWidth,padding:u.forcedPadding}),$=c,s=e.computed(()=>{const{top:l,right:o,bottom:a,left:i}=t.value.style.padding;return{top:l,left:i,right:n.value.width-o,bottom:n.value.height-a,start:u.showInfo&&t.value.style.dataLabel.show&&t.value.style.dataLabel.position==="left"?n.value.width-n.value.chartWidth+i:n.value.padding+i,width:u.showInfo&&t.value.style.dataLabel.show?n.value.chartWidth-i-o:n.value.width-n.value.padding-i-o,height:n.value.height-l-a}}),E=e.computed(()=>[null,void 0].includes(t.value.style.scaleMin)?Math.min(...k.value.map(l=>isNaN(l.value)||[void 0,null,"NaN",NaN,1/0,-1/0].includes(l.value)?0:l.value||0)):t.value.style.scaleMin),F=e.computed(()=>[null,void 0].includes(t.value.style.scaleMax)?Math.max(...k.value.map(l=>isNaN(l.value)||[void 0,null,"NaN",NaN,1/0,-1/0].includes(l.value)?0:l.value||0)):t.value.style.scaleMax),B=e.computed(()=>{const l=E.value>=0?0:E.value;return Math.abs(l)}),P=e.computed(()=>F.value+B.value),x=e.computed(()=>s.value.bottom-s.value.height*S(B.value));function S(l){return isNaN(l/P.value)?0:l/P.value}const b=e.computed(()=>L.value.length-1),v=e.computed(()=>k.value.map((l,o)=>{const a=isNaN(l.value)||[void 0,null,"NaN",NaN,1/0,-1/0].includes(l.value)?0:l.value||0,i=s.value.width/(b.value+1)>n.padding?n.padding:s.value.width/(b.value+1);return{absoluteValue:a,period:l.period,plotValue:a+B.value,toMax:S(a+B.value),x:s.value.start+o*(i>s.value.width/12?s.value.width/12:i),y:s.value.bottom-s.value.height*S(a+B.value),id:`plot_${p.value}_${o}`,color:C.value?t.value.style.bar.color:t.value.style.area.useGradient?r.shiftHue(t.value.style.line.color,.05*(1-o/b.value)):t.value.style.line.color,width:i>s.value.width/12?s.value.width/12:i}})),q=e.computed(()=>{const l={x:v.value[0].x||0,y:(n.value.height||0)-6},o={x:v.value[v.value.length-1].x||0,y:(n.value.height||0)-6},a=[];return v.value.forEach(i=>{a.push(`${i.x||0},${i.y||0} `)}),[l.x,l.y,...a,o.x,o.y].toString()}),d=e.ref(void 0),_=e.ref(void 0);function Y(l,o){d.value=l,_.value||(_.value=l),$("hoverIndex",{index:o})}function j(){_.value=d.value,d.value=void 0,$("hoverIndex",{index:void 0})}const h=e.computed(()=>{if(y.value){const l=v.value.map(a=>a.absoluteValue),o=l.reduce((a,i)=>a+i,0);return{latest:v.value[v.value.length-1].absoluteValue,sum:o,average:o/v.value.length,median:r.calcMedian(l),trend:r.calcLinearProgression(v.value.map(({x:a,y:i,absoluteValue:T})=>({x:a,y:i,value:T}))).trend}}else return{latest:null,sum:null,average:null,median:null,trend:null}}),R=e.computed(()=>y.value?t.value.style.dataLabel.valueType==="latest"?h.value.latest:t.value.style.dataLabel.valueType==="sum"?h.value.sum:t.value.style.dataLabel.valueType==="average"?h.value.average:0:0),C=e.computed(()=>t.value.type&&t.value.type==="bar");function G(l,o){$("selectDatapoint",{datapoint:l,index:o})}return(l,o)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"sparklineChart",ref:m,class:"vue-ui-sparkline",id:p.value,style:e.normalizeStyle(`width:100%;font-family:${t.value.style.fontFamily};`)},[e.renderSlot(l.$slots,"before",e.normalizeProps(e.guardReactiveProps({selected:d.value,latest:h.value.latest,sum:h.value.sum,average:h.value.average,median:h.value.median,trend:h.value.trend})),void 0,!0),t.value.style.title.show&&f.showInfo?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:V,class:"vue-ui-sparkline-title",style:e.normalizeStyle(`display:flex;align-items:center;width:100%;color:${t.value.style.title.color};background:${t.value.style.backgroundColor};justify-content:${t.value.style.title.textAlign==="left"?"flex-start":t.value.style.title.textAlign==="right"?"flex-end":"center"};height:${t.value.style.title.fontSize*2}px;font-size:${t.value.style.title.fontSize}px;font-weight:${t.value.style.title.bold?"bold":"normal"};`)},[e.createElementVNode("span",{style:e.normalizeStyle(`padding:${t.value.style.title.textAlign==="left"?"0 0 0 12px":t.value.style.title.textAlign==="right"?"0 12px 0 0":"0"}`)},e.toDisplayString(d.value?d.value.period:t.value.style.title.text),5)],4)):e.createCommentVNode("",!0),y.value?(e.openBlock(),e.createElementBlock("svg",{key:1,ref_key:"svgRef",ref:g,xmlns:e.unref(r.XMLNS),viewBox:`0 0 ${n.value.width} ${n.value.height}`,style:e.normalizeStyle(`background:${t.value.style.backgroundColor};overflow:visible`),onMouseleave:o[0]||(o[0]=a=>_.value=void 0)},[e.createVNode(H._sfc_main),l.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:n.value.width<=0?10:n.value.width,height:n.value.height<=0?10:n.value.height,style:{pointerEvents:"none"}},[e.renderSlot(l.$slots,"chart-background",{},void 0,!0)],8,ee)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{x1:"0%",y1:"0%",x2:"100%",y2:"0%",id:`sparkline_gradient_${p.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(r.setOpacity)(e.unref(r.shiftHue)(t.value.style.area.color,.05),t.value.style.area.opacity)},null,8,le),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(r.setOpacity)(t.value.style.area.color,t.value.style.area.opacity)},null,8,ae)],8,te),e.createElementVNode("linearGradient",{x2:"0%",y2:"100%",id:`sparkline_bar_gradient_pos_${p.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.bar.color},null,8,re),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(r.shiftHue)(t.value.style.bar.color,.05)},null,8,ue)],8,oe),e.createElementVNode("linearGradient",{x2:"0%",y2:"100%",id:`sparkline_bar_gradient_neg_${p.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(r.shiftHue)(t.value.style.bar.color,.05)},null,8,se),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.bar.color},null,8,ie)],8,ne)]),t.value.style.area.show&&!C.value&&v.value[0]?(e.openBlock(),e.createElementBlock("g",de,[t.value.style.line.smooth?(e.openBlock(),e.createElementBlock("path",{key:0,d:`M ${v.value[0].x},${s.value.bottom} ${e.unref(r.createSmoothPath)(v.value)} L ${v.value.at(-1).x},${s.value.bottom} Z`,fill:t.value.style.area.useGradient?`url(#sparkline_gradient_${p.value})`:e.unref(r.setOpacity)(t.value.style.area.color,t.value.style.area.opacity)},null,8,ce)):(e.openBlock(),e.createElementBlock("path",{key:1,d:`M${q.value}Z`,fill:t.value.style.area.useGradient?`url(#sparkline_gradient_${p.value})`:e.unref(r.setOpacity)(t.value.style.area.color,t.value.style.area.opacity)},null,8,ve))])):e.createCommentVNode("",!0),t.value.style.line.smooth&&!C.value?(e.openBlock(),e.createElementBlock("path",{key:2,d:`M ${e.unref(r.createSmoothPath)(v.value)}`,stroke:t.value.style.line.color,fill:"none","stroke-width":t.value.style.line.strokeWidth,"stroke-linecap":"round"},null,8,pe)):e.createCommentVNode("",!0),!t.value.style.line.smooth&&!C.value?(e.openBlock(),e.createElementBlock("path",{key:3,d:`M ${e.unref(r.createStraightPath)(v.value)}`,stroke:t.value.style.line.color,fill:"none","stroke-width":t.value.style.line.strokeWidth,"stroke-linecap":"round"},null,8,fe)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(a,i)=>(e.openBlock(),e.createElementBlock("g",null,[C.value?(e.openBlock(),e.createElementBlock("rect",{key:0,x:a.x-a.width/2,y:isNaN(a.absoluteValue>0?a.y:x.value)?0:a.absoluteValue>0?a.y:x.value,width:a.width,height:isNaN(Math.abs(a.y-x.value))?0:Math.abs(a.y-x.value),fill:a.absoluteValue>0?`url(#sparkline_bar_gradient_pos_${p.value})`:`url(#sparkline_bar_gradient_neg_${p.value})`,rx:t.value.style.bar.borderRadius},null,8,ye)):e.createCommentVNode("",!0),t.value.style.verticalIndicator.show&&(d.value&&a.id===d.value.id||f.selectedIndex===i)?(e.openBlock(),e.createElementBlock("line",{key:1,x1:a.x,x2:a.x,y1:s.value.top-6,y2:s.value.bottom,stroke:t.value.style.verticalIndicator.color||a.color,"stroke-width":t.value.style.verticalIndicator.strokeWidth,"stroke-linecap":"round","stroke-dasharray":t.value.style.verticalIndicator.strokeDasharray||0},null,8,he)):e.createCommentVNode("",!0)]))),256)),E.value<0?(e.openBlock(),e.createElementBlock("line",{key:4,x1:s.value.start,x2:s.value.start+s.value.width-16,y1:e.unref(r.forceValidValue)(x.value,s.value.bottom),y2:e.unref(r.forceValidValue)(x.value,s.value.bottom),stroke:t.value.style.zeroLine.color,"stroke-dasharray":t.value.style.zeroLine.strokeWidth*2,"stroke-width":t.value.style.zeroLine.strokeWidth,"stroke-linecap":"round"},null,8,me)):e.createCommentVNode("",!0),t.value.style.plot.show?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:5},e.renderList(v.value,(a,i)=>(e.openBlock(),e.createElementBlock("g",null,[d.value&&a.id===d.value.id||f.selectedIndex===i||f.dataset.length===1?(e.openBlock(),e.createElementBlock("circle",{key:0,cx:a.x,cy:a.y,r:t.value.style.plot.radius,fill:a.color,stroke:t.value.style.plot.stroke,"stroke-width":t.value.style.plot.strokeWidth},null,8,ge)):e.createCommentVNode("",!0)]))),256)):e.createCommentVNode("",!0),f.showInfo&&t.value.style.dataLabel.show?(e.openBlock(),e.createElementBlock("text",{key:6,x:t.value.style.dataLabel.position==="left"?12+t.value.style.dataLabel.offsetX:s.value.width+12+t.value.style.dataLabel.offsetX,y:n.value.height/2+t.value.style.dataLabel.fontSize/2.5+t.value.style.dataLabel.offsetY,"font-size":t.value.style.dataLabel.fontSize,"font-weight":t.value.style.dataLabel.bold?"bold":"normal",fill:t.value.style.dataLabel.color},e.toDisplayString(d.value?e.unref(r.applyDataLabel)(t.value.style.dataLabel.formatter,d.value.absoluteValue,e.unref(r.dataLabel)({p:t.value.style.dataLabel.prefix,v:d.value.absoluteValue,s:t.value.style.dataLabel.suffix,r:t.value.style.dataLabel.roundingValue}),{datapoint:d.value}):e.unref(r.applyDataLabel)(t.value.style.dataLabel.formatter,R.value,e.unref(r.dataLabel)({p:t.value.style.dataLabel.prefix,v:R.value,s:t.value.style.dataLabel.suffix,r:t.value.style.dataLabel.roundingValue}))),9,ke)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(a,i)=>(e.openBlock(),e.createElementBlock("rect",{x:a.x-(s.value.width/(b.value+1)>n.value.padding?n.value.padding:s.value.width/(b.value+1))/2,y:s.value.top-6,height:s.value.height+6,width:s.value.width/(b.value+1)>n.value.padding?n.value.padding:s.value.width/(b.value+1),fill:"transparent",onMouseenter:T=>Y(a,i),onMouseleave:j,onClick:()=>G(a,i)},null,40,be))),256)),e.renderSlot(l.$slots,"svg",{svg:n.value},void 0,!0)],44,Q)):e.createCommentVNode("",!0),d.value&&t.value.style.tooltip.show?(e.openBlock(),e.createBlock(J,{key:2,x:d.value.x,y:d.value.y,prevX:_.value.x,prevY:_.value.y,offsetY:t.value.style.plot.radius*3+t.value.style.tooltip.offsetY,svgRef:e.unref(g),background:t.value.style.tooltip.backgroundColor,color:t.value.style.tooltip.color,fontSize:t.value.style.tooltip.fontSize,borderWidth:t.value.style.tooltip.borderWidth,borderColor:t.value.style.tooltip.borderColor,borderRadius:t.value.style.tooltip.borderRadius,backgroundOpacity:t.value.style.tooltip.backgroundOpacity},{default:e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip",e.normalizeProps(e.guardReactiveProps({...d.value})),()=>[e.createTextVNode(e.toDisplayString(d.value.period)+": "+e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.dataLabel.formatter,d.value.absoluteValue,e.unref(r.dataLabel)({p:t.value.style.dataLabel.prefix,v:d.value.absoluteValue,s:t.value.style.dataLabel.suffix,r:t.value.style.dataLabel.roundingValue}),{datapoint:d.value})),1)],!0)]),_:3},8,["x","y","prevX","prevY","offsetY","svgRef","background","color","fontSize","borderWidth","borderColor","borderRadius","backgroundOpacity"])):e.createCommentVNode("",!0),l.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:3,ref_key:"source",ref:N,dir:"auto"},[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),y.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(X.default,{key:4,config:{type:"sparkline",style:{backgroundColor:t.value.style.backgroundColor,sparkline:{color:"#CCCCCC"}}}},null,8,["config"]))],12,K))}},_e=D._export_sfc(xe,[["__scopeId","data-v-246ce941"]]);exports.default=_e;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { useSlots as ie, onMounted as Y, computed as m, ref as d, watch as G, createElementBlock as r, openBlock as s, normalizeStyle as v, createCommentVNode as y, createBlock as ce, createVNode as q, createElementVNode as p, toDisplayString as w, unref as C, Fragment as x, renderList as $, normalizeClass as F, withCtx as H, renderSlot as U, normalizeProps as X, guardReactiveProps as J } from "vue";
|
|
2
|
-
import { u as de, c as K, t as ve, p as i, a as pe, d as N, b as ge, o as fe, e as Q, g as he, f as V, X as ye, s as me, w as ke, i as Z, x as be } from "./index-
|
|
3
|
-
import { u as ee } from "./useNestedProp-
|
|
4
|
-
import _e from "./vue-ui-skeleton-
|
|
5
|
-
import { _ as we } from "./PackageVersion-
|
|
6
|
-
import { _ as Ce } from "./Tooltip-
|
|
2
|
+
import { u as de, c as K, t as ve, p as i, a as pe, d as N, b as ge, o as fe, e as Q, g as he, f as V, X as ye, s as me, w as ke, i as Z, x as be } from "./index-Co5UfCMK.js";
|
|
3
|
+
import { u as ee } from "./useNestedProp-C22WP03t.js";
|
|
4
|
+
import _e from "./vue-ui-skeleton-BSlYUHZA.js";
|
|
5
|
+
import { _ as we } from "./PackageVersion-CkUbRQrt.js";
|
|
6
|
+
import { _ as Ce } from "./Tooltip-BCtHh3BT.js";
|
|
7
7
|
import { u as xe } from "./useChartAccessibility-BWojgys7.js";
|
|
8
8
|
import { _ as $e } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
9
9
|
const Se = ["xmlns", "viewBox"], ze = ["id"], Pe = ["stop-color"], De = ["stop-color"], Fe = ["stop-color"], Ne = {
|