vue-data-ui 2.3.35 → 2.3.37
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Arrow-8mqCdt3k.js → Arrow-Bb6L1SdH.js} +1 -1
- package/dist/{Arrow-CpYzSez5.cjs → Arrow-D4_9ATE8.cjs} +1 -1
- package/dist/{BaseIcon-CMupjPIL.js → BaseIcon-BYikkWFZ.js} +1 -1
- package/dist/{BaseIcon-CT8Dwu1Z.cjs → BaseIcon-DZeqsESI.cjs} +1 -1
- package/dist/{DataTable-IBRk_0ke.cjs → DataTable-BWmxv2dU.cjs} +1 -1
- package/dist/{DataTable-B0X2-yfv.js → DataTable-CAXMjWn5.js} +2 -2
- package/dist/{Legend-BMIo55xY.js → Legend-CXJs07Ij.js} +1 -1
- package/dist/{Legend-D5SQLQPQ.cjs → Legend-Du9xqOk5.cjs} +1 -1
- package/dist/{Shape-Div8sUVU.cjs → Shape-CgkXbbSY.cjs} +1 -1
- package/dist/{Shape-DWqG6NGS.js → Shape-DLcI9AEd.js} +1 -1
- package/dist/{Slicer-C6j_cGIB.js → Slicer-BaraIN42.js} +1 -1
- package/dist/{Slicer-BWHj17lR.cjs → Slicer-CvOsHsE5.cjs} +1 -1
- package/dist/{Title-BZaey0z1.js → Title-C79SPRaJ.js} +1 -1
- package/dist/{Title-BwlieJ6b.cjs → Title-Cfhww4Z2.cjs} +1 -1
- package/dist/{Tooltip-DFVt2u4S.js → Tooltip-pL4iIflR.js} +1 -1
- package/dist/{Tooltip-B_KSfmzF.cjs → Tooltip-skDk7LoG.cjs} +1 -1
- package/dist/{index-C1b8nqw5.js → index-BzC4GFT4.js} +253 -226
- package/dist/index-C61CWbhi.cjs +4 -0
- package/dist/types/vue-data-ui.d.cts +82 -83
- package/dist/types/vue-data-ui.d.ts +82 -83
- package/dist/{useNestedProp-CldQcAqF.cjs → useNestedProp-CQPRjDbe.cjs} +1 -1
- package/dist/{useNestedProp-DWFoOtUE.js → useNestedProp-Ci4Xkt-B.js} +1 -1
- package/dist/{usePrinter-BybqrAuc.js → usePrinter-Cmb8gRBK.js} +1 -1
- package/dist/{usePrinter-vl8GTUI1.cjs → usePrinter-DMtrNmBj.cjs} +1 -1
- package/dist/{vue-data-ui-CZSymR0l.cjs → vue-data-ui-BdrRIy96.cjs} +1 -1
- package/dist/{vue-data-ui-BtPMbVu3.js → vue-data-ui-CvIKpEo1.js} +57 -57
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +1 -1
- package/dist/{vue-ui-3d-bar-DdhyR9Wb.cjs → vue-ui-3d-bar-Bow_nGLE.cjs} +1 -1
- package/dist/{vue-ui-3d-bar-B8rQ0lAY.js → vue-ui-3d-bar-Ct1B7bTl.js} +7 -7
- package/dist/{vue-ui-accordion-D3IGVPkU.js → vue-ui-accordion-Bgi-_3Lv.js} +3 -3
- package/dist/{vue-ui-accordion-pHjKfoj-.cjs → vue-ui-accordion-CvtrqT6u.cjs} +1 -1
- package/dist/{vue-ui-age-pyramid-eLidMfQN.cjs → vue-ui-age-pyramid-Cuz5tJDb.cjs} +1 -1
- package/dist/{vue-ui-age-pyramid-Cywqqfc3.js → vue-ui-age-pyramid-DGcbNNqc.js} +8 -8
- package/dist/{vue-ui-annotator-D57lLAem.cjs → vue-ui-annotator-BuiDubdn.cjs} +1 -1
- package/dist/{vue-ui-annotator-CqrAuL_M.js → vue-ui-annotator-DiS6L-Lo.js} +1 -1
- package/dist/{vue-ui-candlestick-D4FuLYqw.cjs → vue-ui-candlestick-BJRYzLGH.cjs} +1 -1
- package/dist/{vue-ui-candlestick-DRXwCvCo.js → vue-ui-candlestick-gYV7zNpb.js} +9 -9
- package/dist/{vue-ui-carousel-table-BXwWouA7.js → vue-ui-carousel-table-CZt3aUxS.js} +4 -4
- package/dist/{vue-ui-carousel-table-DPwQPTqc.cjs → vue-ui-carousel-table-Cb7Ue6WK.cjs} +1 -1
- package/dist/{vue-ui-chestnut-Bs9cWKvN.js → vue-ui-chestnut-Aw5UziyJ.js} +6 -6
- package/dist/{vue-ui-chestnut-Dt_4Ku_5.cjs → vue-ui-chestnut-CZu2zG44.cjs} +1 -1
- package/dist/{vue-ui-cursor-C7D7T4cV.cjs → vue-ui-cursor-B5yhZyFM.cjs} +1 -1
- package/dist/{vue-ui-cursor-CVDxh2hQ.js → vue-ui-cursor-nrSXxY9A.js} +2 -2
- package/dist/{vue-ui-dashboard-dKNKfVaD.cjs → vue-ui-dashboard-CVb-Gaop.cjs} +1 -1
- package/dist/{vue-ui-dashboard-O4PWcxcO.js → vue-ui-dashboard-Cfldt4f-.js} +2 -2
- package/dist/{vue-ui-digits-Bn9thyfC.js → vue-ui-digits-BOOnmm8f.js} +2 -2
- package/dist/{vue-ui-digits-BUO8leUF.cjs → vue-ui-digits-CTGE6aQS.cjs} +1 -1
- package/dist/{vue-ui-donut-CoM2pA0h.js → vue-ui-donut-BWbkX7xL.js} +9 -9
- package/dist/{vue-ui-donut-CK4zETSD.cjs → vue-ui-donut-CWu2l7lY.cjs} +1 -1
- package/dist/{vue-ui-donut-evolution-QlHzCBt6.cjs → vue-ui-donut-evolution-C0_LyjWv.cjs} +1 -1
- package/dist/{vue-ui-donut-evolution-BgctJPsh.js → vue-ui-donut-evolution-D2rDuoGB.js} +9 -9
- package/dist/{vue-ui-dumbbell-BsBRwkjn.cjs → vue-ui-dumbbell-BZQmwS6E.cjs} +1 -1
- package/dist/{vue-ui-dumbbell-CCjUOCny.js → vue-ui-dumbbell-CcJFLLxg.js} +8 -8
- package/dist/{vue-ui-flow-IWpQ2yIx.js → vue-ui-flow-DTXFQlVy.js} +7 -7
- package/dist/{vue-ui-flow-Cyj4gF4_.cjs → vue-ui-flow-uorZ0daM.cjs} +1 -1
- package/dist/{vue-ui-galaxy-OH5k24m1.cjs → vue-ui-galaxy-BcFN6ZAC.cjs} +1 -1
- package/dist/{vue-ui-galaxy-BqjZ5O_G.js → vue-ui-galaxy-Bn2EUZ_r.js} +9 -9
- package/dist/{vue-ui-gauge-NKRH7xOL.cjs → vue-ui-gauge-CzHZHaVd.cjs} +1 -1
- package/dist/{vue-ui-gauge-DGEDsld9.js → vue-ui-gauge-DLheQibb.js} +5 -5
- package/dist/{vue-ui-gizmo-D0jrhfvP.cjs → vue-ui-gizmo-BtIIZr2e.cjs} +1 -1
- package/dist/{vue-ui-gizmo-CQ7b55aB.js → vue-ui-gizmo-DPPQHFYy.js} +2 -2
- package/dist/{vue-ui-heatmap-3CMe6Xvv.js → vue-ui-heatmap-BmHxCDX3.js} +8 -8
- package/dist/{vue-ui-heatmap-BhrBnyya.cjs → vue-ui-heatmap-CZrslleT.cjs} +1 -1
- package/dist/{vue-ui-kpi-CvuUr6JL.cjs → vue-ui-kpi-DHPCOJJU.cjs} +1 -1
- package/dist/{vue-ui-kpi-D8OwtSaM.js → vue-ui-kpi-Dhq0sqmq.js} +3 -3
- package/dist/{vue-ui-mini-loader-DNYhW61O.cjs → vue-ui-mini-loader-Bsk1kmlJ.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-CnjS4H1I.js → vue-ui-mini-loader-CbubV2dS.js} +2 -2
- package/dist/{vue-ui-molecule-DvENXYGm.cjs → vue-ui-molecule-BS9maTXr.cjs} +1 -1
- package/dist/{vue-ui-molecule-UupWEM8q.js → vue-ui-molecule-DXr2S-4k.js} +9 -9
- package/dist/{vue-ui-mood-radar-Ch1LY_2R.js → vue-ui-mood-radar-B6f7vL8Z.js} +9 -9
- package/dist/{vue-ui-mood-radar-iI7kQOCM.cjs → vue-ui-mood-radar-D3DQfdlr.cjs} +1 -1
- package/dist/{vue-ui-nested-donuts-Bt2daMoY.cjs → vue-ui-nested-donuts-CCb2Pnsc.cjs} +1 -1
- package/dist/{vue-ui-nested-donuts-DynQLPxx.js → vue-ui-nested-donuts-D8r5m5dO.js} +9 -9
- package/dist/{vue-ui-onion-BnJaBXy_.js → vue-ui-onion-BYw8HmIk.js} +9 -9
- package/dist/{vue-ui-onion-DI3DC93j.cjs → vue-ui-onion-hevHDHWY.cjs} +1 -1
- package/dist/{vue-ui-parallel-coordinate-plot-CWbr51bP.cjs → vue-ui-parallel-coordinate-plot-B6Evq2Od.cjs} +1 -1
- package/dist/{vue-ui-parallel-coordinate-plot-BbOWs7gU.js → vue-ui-parallel-coordinate-plot-DB-LtRqE.js} +10 -10
- package/dist/{vue-ui-quadrant-_WYmC83u.js → vue-ui-quadrant-BNOBKlhX.js} +10 -10
- package/dist/{vue-ui-quadrant-B__i8zN8.cjs → vue-ui-quadrant-DxujW8z6.cjs} +1 -1
- package/dist/{vue-ui-quick-chart-DuTmiNVl.cjs → vue-ui-quick-chart-BfSzxmNc.cjs} +1 -1
- package/dist/{vue-ui-quick-chart-O5BxmqGL.js → vue-ui-quick-chart-rsZzpy0G.js} +6 -6
- package/dist/{vue-ui-radar-D1xXlbRY.js → vue-ui-radar-BG3L5IM2.js} +10 -10
- package/dist/{vue-ui-radar-D4JfJpT0.cjs → vue-ui-radar-Dr5wWnMj.cjs} +1 -1
- package/dist/{vue-ui-rating-Cq_B-J0t.js → vue-ui-rating-B0o8bqKW.js} +2 -2
- package/dist/{vue-ui-rating-CjkDBdXi.cjs → vue-ui-rating-CAvBCNS1.cjs} +1 -1
- package/dist/{vue-ui-relation-circle-BJtisZuH.cjs → vue-ui-relation-circle-BMqLTqQb.cjs} +1 -1
- package/dist/{vue-ui-relation-circle-BEB7dUJt.js → vue-ui-relation-circle-BqyeCd0n.js} +5 -5
- package/dist/{vue-ui-rings-CQFN4tDJ.js → vue-ui-rings-Ca-eFxZM.js} +9 -9
- package/dist/{vue-ui-rings-zzCgz61o.cjs → vue-ui-rings-uUzxyzTu.cjs} +1 -1
- package/dist/{vue-ui-scatter-D6Ccg9lj.js → vue-ui-scatter-CWo-w-9F.js} +10 -10
- package/dist/{vue-ui-scatter-B6Aen34S.cjs → vue-ui-scatter-Otkkooqz.cjs} +1 -1
- package/dist/{vue-ui-screenshot-Cou6ar8P.js → vue-ui-screenshot-B73dx0RL.js} +1 -1
- package/dist/{vue-ui-screenshot-Be-wyaXL.cjs → vue-ui-screenshot-QpgoV_tc.cjs} +1 -1
- package/dist/{vue-ui-skeleton-CO4XgI6H.js → vue-ui-skeleton-DCC5qNwg.js} +2 -2
- package/dist/{vue-ui-skeleton-Dhz5mOid.cjs → vue-ui-skeleton-DOB3BXPS.cjs} +1 -1
- package/dist/{vue-ui-smiley-DanzTsIi.cjs → vue-ui-smiley-Bov4viPa.cjs} +1 -1
- package/dist/{vue-ui-smiley-BoqrL2dw.js → vue-ui-smiley-DhNsQ3s9.js} +2 -2
- package/dist/{vue-ui-spark-trend-pprAlpta.js → vue-ui-spark-trend-D89B50VU.js} +4 -4
- package/dist/{vue-ui-spark-trend-D-4XItgb.cjs → vue-ui-spark-trend-DbjxuK7z.cjs} +1 -1
- package/dist/{vue-ui-sparkbar-b9TBD6ME.cjs → vue-ui-sparkbar-BZgNGMiI.cjs} +1 -1
- package/dist/{vue-ui-sparkbar-DY5lpe2E.js → vue-ui-sparkbar-CugUl2Ge.js} +3 -3
- package/dist/{vue-ui-sparkgauge-uZZuIBZc.cjs → vue-ui-sparkgauge-B8tauERd.cjs} +1 -1
- package/dist/{vue-ui-sparkgauge-DU7vOf8w.js → vue-ui-sparkgauge-E6ffgyZ7.js} +3 -3
- package/dist/{vue-ui-sparkhistogram-pqrfIaIb.cjs → vue-ui-sparkhistogram-BeKsPc3B.cjs} +1 -1
- package/dist/{vue-ui-sparkhistogram-D-P4UkpF.js → vue-ui-sparkhistogram-s5Brj3fs.js} +4 -4
- package/dist/{vue-ui-sparkline-BsIaCFy1.js → vue-ui-sparkline-BrTZ3RsA.js} +3 -3
- package/dist/{vue-ui-sparkline-D7BELix8.cjs → vue-ui-sparkline-oTMDHdy8.cjs} +1 -1
- package/dist/{vue-ui-sparkstackbar-BuZQ2cs9.js → vue-ui-sparkstackbar-BShlglvB.js} +3 -3
- package/dist/{vue-ui-sparkstackbar-CmVnVp7q.cjs → vue-ui-sparkstackbar-CIfL620D.cjs} +1 -1
- package/dist/{vue-ui-stackbar-BahuIAvI.cjs → vue-ui-stackbar-DBMbisOP.cjs} +1 -1
- package/dist/{vue-ui-stackbar-CN_hoCL5.js → vue-ui-stackbar-DpVf6ihy.js} +10 -10
- package/dist/{vue-ui-strip-plot-DgS4qRIF.js → vue-ui-strip-plot-BbdVUOC9.js} +9 -9
- package/dist/{vue-ui-strip-plot-BIJVVEGI.cjs → vue-ui-strip-plot-DM7xT5IU.cjs} +1 -1
- package/dist/{vue-ui-table-D9g4kreu.js → vue-ui-table-CWCMQ2os.js} +1 -1
- package/dist/{vue-ui-table-DNAY-7hO.cjs → vue-ui-table-D3ceAXMF.cjs} +1 -1
- package/dist/{vue-ui-table-heatmap-si6GWwDB.js → vue-ui-table-heatmap-B3Bg-XhY.js} +4 -4
- package/dist/{vue-ui-table-heatmap-oZ969HtE.cjs → vue-ui-table-heatmap-DA5Ne1R3.cjs} +1 -1
- package/dist/{vue-ui-table-sparkline-mx23kF7Q.cjs → vue-ui-table-sparkline-DrVVBI-I.cjs} +1 -1
- package/dist/{vue-ui-table-sparkline-L0PEi96u.js → vue-ui-table-sparkline-YXOKi_8R.js} +5 -5
- package/dist/{vue-ui-thermometer-BYpiXI-O.js → vue-ui-thermometer-CrJx6Sux.js} +5 -5
- package/dist/{vue-ui-thermometer-O13lyYgJ.cjs → vue-ui-thermometer-Lj4IWfmo.cjs} +1 -1
- package/dist/{vue-ui-timer-CNGVOOlg.cjs → vue-ui-timer-CbkaYjVH.cjs} +1 -1
- package/dist/{vue-ui-timer-CxS0w0W1.js → vue-ui-timer-uwwQ0iHa.js} +4 -4
- package/dist/{vue-ui-tiremarks-CEDUrZdW.js → vue-ui-tiremarks-C6UTRWU-.js} +5 -5
- package/dist/{vue-ui-tiremarks-9w3XQTZl.cjs → vue-ui-tiremarks-mgVRvszt.cjs} +1 -1
- package/dist/{vue-ui-treemap-CpzwXGl-.js → vue-ui-treemap-BZV954rU.js} +9 -9
- package/dist/{vue-ui-treemap-DxmvNbjK.cjs → vue-ui-treemap-D5vTiOnY.cjs} +1 -1
- package/dist/{vue-ui-vertical-bar-FHKCelQq.cjs → vue-ui-vertical-bar-BderaPsm.cjs} +1 -1
- package/dist/{vue-ui-vertical-bar-wmz-3uDj.js → vue-ui-vertical-bar-D7LDMhQh.js} +9 -9
- package/dist/{vue-ui-waffle-dqnW3nky.cjs → vue-ui-waffle-CJEmX3I4.cjs} +1 -1
- package/dist/{vue-ui-waffle-B2gdERdV.js → vue-ui-waffle-E4H7vTL6.js} +9 -9
- package/dist/{vue-ui-wheel-DTnMnqCr.cjs → vue-ui-wheel-BWuPdNXg.cjs} +1 -1
- package/dist/{vue-ui-wheel-BMAmf2-n.js → vue-ui-wheel-Bbm7l79E.js} +5 -5
- package/dist/{vue-ui-word-cloud-Diz06cxu.js → vue-ui-word-cloud-BMg_8Rnx.js} +7 -7
- package/dist/{vue-ui-word-cloud-DY2g14TK.cjs → vue-ui-word-cloud-Cm9iFLer.cjs} +1 -1
- package/dist/{vue-ui-xy-CeVuoNHk.js → vue-ui-xy-CZfhmpIO.js} +12 -12
- package/dist/{vue-ui-xy-canvas-3TdGIkyw.cjs → vue-ui-xy-canvas-BAgRNpy2.cjs} +1 -1
- package/dist/{vue-ui-xy-canvas-B4xf1eXm.js → vue-ui-xy-canvas-CsVqIcPg.js} +10 -10
- package/dist/{vue-ui-xy-C03TRyn_.cjs → vue-ui-xy-w5e977sw.cjs} +1 -1
- package/package.json +1 -1
- package/dist/index-DSa4xA3E.cjs +0 -4
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),l=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),l=require("./index-C61CWbhi.cjs"),$=require("./useNestedProp-CQPRjDbe.cjs"),S=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),i=y=>(e.pushScopeId("data-v-3e41118a"),y=y(),e.popScopeId(),y),w={key:0,class:"vue-ui-rating-title",style:{width:"100%"}},M=["xmlns","stroke"],B={id:"vueUiSmiley0"},C=["stop-color"],R=["stop-color"],H=i(()=>e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1)),X=["fill"],j=["stroke"],U=e.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-3e41118a></path><path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" data-v-3e41118a></path><path d="M9 10l.01 0" data-v-3e41118a></path><path d="M15 10l.01 0" data-v-3e41118a></path><path d="M9.5 15.25a3.5 3.5 0 0 1 5 0" data-v-3e41118a></path>',5),G=[U],L=["xmlns","viewBox","stroke"],A={id:"vueUiSmiley0"},D=["stop-color"],Y=["stop-color"],F=i(()=>e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1)),K=["fill"],I=["viewBox","stroke"],T=e.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-3e41118a></path><path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" data-v-3e41118a></path><path d="M9 10l.01 0" data-v-3e41118a></path><path d="M15 10l.01 0" data-v-3e41118a></path><path d="M9.5 15.25a3.5 3.5 0 0 1 5 0" data-v-3e41118a></path>',5),O=[T],q=["xmlns","stroke"],P={id:"vueUiSmiley1"},J=["stop-color"],Q=["stop-color"],W=i(()=>e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1)),Z=["fill"],ee=["xmlns","stroke"],te=e.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-3e41118a></path><path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" data-v-3e41118a></path><path d="M9 10l.01 0" data-v-3e41118a></path><path d="M15 10l.01 0" data-v-3e41118a></path><path d="M9 15l6 0" data-v-3e41118a></path>',5),oe=[te],le=["xmlns","viewBox","stroke"],ae={id:"vueUiSmiley1"},ne=["stop-color"],se=["stop-color"],ie=i(()=>e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1)),re=["fill"],de=["viewBox","stroke"],ue=e.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-3e41118a></path><path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" data-v-3e41118a></path><path d="M9 10l.01 0" data-v-3e41118a></path><path d="M15 10l.01 0" data-v-3e41118a></path><path d="M9 15l6 0" data-v-3e41118a></path>',5),ce=[ue],pe=["xmlns","stroke"],ve={id:"vueUiSmiley2"},ye=["stop-color"],me=["stop-color"],fe=i(()=>e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1)),he=["fill"],ke=["xmlns","stroke"],ge=i(()=>e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1)),xe=i(()=>e.createElementVNode("path",{d:"M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"},null,-1)),_e=i(()=>e.createElementVNode("path",{d:"M9 10l.01 0"},null,-1)),Ne=i(()=>e.createElementVNode("path",{d:"M15 10l.01 0"},null,-1)),ze=[ge,xe,_e,Ne],Ve=["xmlns","viewBox","stroke"],be=i(()=>e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1)),Ee={id:"vueUiSmiley2"},$e=["stop-color"],Se=["stop-color"],we=["fill"],Me=["xmlns","viewBox","stroke"],Be=i(()=>e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1)),Ce=i(()=>e.createElementVNode("path",{d:"M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"},null,-1)),Re=i(()=>e.createElementVNode("path",{d:"M9 10l.01 0"},null,-1)),He=i(()=>e.createElementVNode("path",{d:"M15 10l.01 0"},null,-1)),Xe=[Be,Ce,Re,He],je=["xmlns","stroke"],Ue={id:"vueUiSmiley3"},Ge=["stop-color"],Le=["stop-color"],Ae=i(()=>e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1)),De=["fill"],Ye=["xmlns","stroke"],Fe=e.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-3e41118a></path><path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" data-v-3e41118a></path><path d="M9 10l.01 0" data-v-3e41118a></path><path d="M15 10l.01 0" data-v-3e41118a></path><path d="M9.5 15a3.5 3.5 0 0 0 5 0" data-v-3e41118a></path>',5),Ke=[Fe],Ie=["xmlns","viewBox","stroke"],Te=i(()=>e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1)),Oe={id:"vueUiSmiley3"},qe=["stop-color"],Pe=["stop-color"],Je=["fill"],Qe=["xmlns","viewBox","stroke"],We=e.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-3e41118a></path><path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" data-v-3e41118a></path><path d="M9 10l.01 0" data-v-3e41118a></path><path d="M15 10l.01 0" data-v-3e41118a></path><path d="M9.5 15a3.5 3.5 0 0 0 5 0" data-v-3e41118a></path>',5),Ze=[We],et=["xmlns","stroke"],tt={id:"vueUiSmiley4"},ot=["stop-color"],lt=["stop-color"],at=i(()=>e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1)),nt=["fill"],st=["xmlns","stroke"],it=e.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-3e41118a></path><path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" data-v-3e41118a></path><path d="M9 9l.01 0" data-v-3e41118a></path><path d="M15 9l.01 0" data-v-3e41118a></path><path d="M8 13a4 4 0 1 0 8 0h-8" data-v-3e41118a></path>',5),rt=[it],dt=["xmlns","viewBox","stroke"],ut=i(()=>e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1)),ct={id:"vueUiSmiley4"},pt=["stop-color"],vt=["stop-color"],yt=["fill"],mt=["xmlns","viewBox","stroke"],ft=e.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-3e41118a></path><path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" data-v-3e41118a></path><path d="M9 9l.01 0" data-v-3e41118a></path><path d="M15 9l.01 0" data-v-3e41118a></path><path d="M8 13a4 4 0 1 0 8 0h-8" data-v-3e41118a></path>',5),ht=[ft],kt={__name:"vue-ui-smiley",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},emits:["rate"],setup(y,{expose:g,emit:x}){const c=y,{vue_ui_smiley:_}=l.useConfig();e.onMounted(()=>{l.objectIsEmpty(c.dataset)&&l.error({componentName:"VueUiSmiley",type:"dataset"})});const f=e.ref(!1),s=e.ref(void 0),t=e.computed(()=>$.useNestedProp({userConfig:c.config,defaultConfig:_})),N=e.computed(()=>typeof c.dataset.rating=="object"&&!Array.isArray(c.dataset.rating)?z(c.dataset.rating):c.dataset.rating||null),m=e.computed(()=>typeof c.dataset.rating=="object"&&!Array.isArray(c.dataset.rating)),r=e.ref(N.value),d=e.ref(t.value.readonly);function z(n){if(n===null)return null;let o=0,a=0;for(const h in n){const E=parseInt(h),k=n[h];o+=E*k,a+=k}return a===0?0:o/a}function p(n){const o=r.value-n,a=24;switch(!0){case o<0:return 0;case o>1:return 1*a;default:return o*a}}function v(n){d.value||(r.value=n,x("rate",n))}function V(){return r.value}function b(n=!0){d.value=n}g({getData:V,toggleReadonly:b});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,o)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle(`background:${t.value.style.backgroundColor};font-family:${t.value.style.fontFamily};width:100%;`),onMouseover:o[20]||(o[20]=a=>f.value=!0),onMouseleave:o[21]||(o[21]=a=>{f.value=!1,s.value=void 0})},[t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",w,[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(isNaN(r.value)?"":r.value.toFixed(t.value.style.rating.roundingValue)),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(isNaN(r.value)?"":r.value.toFixed(t.value.style.rating.roundingValue)),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:o[0]||(o[0]=a=>s.value=0),onMouseleave:o[1]||(o[1]=a=>s.value=void 0),onClick:o[2]||(o[2]=a=>v(1)),onKeyup:o[3]||(o[3]=e.withKeys(a=>v(1),["enter"]))},[t.value.style.tooltip.show&&m.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),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(c.dataset.rating[1]),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(l.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",B,[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(l.shiftHue)(t.value.style.colors.active[0],.05)},null,8,C),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.colors.active[0]},null,8,R)])]),H,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,X)],8,M)):(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"},G,8,j)),t.value.style.icons.filled&&d.value?(e.openBlock(),e.createElementBlock("svg",{key:3,xmlns:e.unref(l.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",A,[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(l.shiftHue)(t.value.style.colors.activeReadonly[0],.05)},null,8,D),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.colors.activeReadonly[0]},null,8,Y)])]),F,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,L)):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"},O,8,I)):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:o[4]||(o[4]=a=>s.value=1),onMouseleave:o[5]||(o[5]=a=>s.value=void 0),onClick:o[6]||(o[6]=a=>v(2)),onKeyup:o[7]||(o[7]=e.withKeys(a=>v(2),["enter"]))},[t.value.style.tooltip.show&&m.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),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(c.dataset.rating[2]),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(l.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",P,[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(l.shiftHue)(t.value.style.colors.active[1],.05)},null,8,J),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.colors.active[1]},null,8,Q)])]),W,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,Z)],8,q)):(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(l.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"},oe,8,ee)),t.value.style.icons.filled&&d.value?(e.openBlock(),e.createElementBlock("svg",{key:3,xmlns:e.unref(l.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",ae,[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(l.shiftHue)(t.value.style.colors.activeReadonly[1],.05)},null,8,ne),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.colors.activeReadonly[1]},null,8,se)])]),ie,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,re)],8,le)):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"},ce,8,de)):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:o[8]||(o[8]=a=>s.value=2),onMouseleave:o[9]||(o[9]=a=>s.value=void 0),onClick:o[10]||(o[10]=a=>v(3)),onKeyup:o[11]||(o[11]=e.withKeys(a=>v(3),["enter"]))},[t.value.style.tooltip.show&&m.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),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(c.dataset.rating[3]),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(l.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",ve,[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(l.shiftHue)(t.value.style.colors.activeReadonly[2],.05)},null,8,ye),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.colors.activeReadonly[2]},null,8,me)])]),fe,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,he)],8,pe)):(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(l.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"},ze,8,ke)),t.value.style.icons.filled&&d.value?(e.openBlock(),e.createElementBlock("svg",{key:3,xmlns:e.unref(l.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"},[be,e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",Ee,[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(l.shiftHue)(t.value.style.colors.activeReadonly[2],.05)},null,8,$e),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.colors.activeReadonly[2]},null,8,Se)])]),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,we)],8,Ve)):e.createCommentVNode("",!0),!t.value.style.icons.filled&&d.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(l.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"},Xe,8,Me)):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:o[12]||(o[12]=a=>s.value=3),onMouseleave:o[13]||(o[13]=a=>s.value=void 0),onClick:o[14]||(o[14]=a=>v(4)),onKeyup:o[15]||(o[15]=e.withKeys(a=>v(4),["enter"]))},[t.value.style.tooltip.show&&m.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),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(c.dataset.rating[4]),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(l.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",Ue,[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(l.shiftHue)(t.value.style.colors.activeReadonly[3],.95)},null,8,Ge),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.colors.activeReadonly[3]},null,8,Le)])]),Ae,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,De)],8,je)):(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(l.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"},Ke,8,Ye)),t.value.style.icons.filled&&d.value?(e.openBlock(),e.createElementBlock("svg",{key:3,xmlns:e.unref(l.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"},[Te,e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",Oe,[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(l.shiftHue)(t.value.style.colors.activeReadonly[3],.95)},null,8,qe),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.colors.activeReadonly[3]},null,8,Pe)])]),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,Je)],8,Ie)):e.createCommentVNode("",!0),!t.value.style.icons.filled&&d.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(l.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"},Ze,8,Qe)):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:o[16]||(o[16]=a=>s.value=4),onMouseleave:o[17]||(o[17]=a=>s.value=void 0),onClick:o[18]||(o[18]=a=>v(5)),onKeyup:o[19]||(o[19]=e.withKeys(a=>v(5),["enter"]))},[t.value.style.tooltip.show&&m.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),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(c.dataset.rating[5]),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(l.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",tt,[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(l.shiftHue)(t.value.style.colors.activeReadonly[4],.9)},null,8,ot),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.colors.activeReadonly[4]},null,8,lt)])]),at,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,nt)],8,et)):(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(l.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"},rt,8,st)),t.value.style.icons.filled&&d.value?(e.openBlock(),e.createElementBlock("svg",{key:3,xmlns:e.unref(l.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"},[ut,e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",ct,[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(l.shiftHue)(t.value.style.colors.activeReadonly[4],.9)},null,8,pt),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.colors.activeReadonly[4]},null,8,vt)])]),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,yt)],8,dt)):e.createCommentVNode("",!0),!t.value.style.icons.filled&&d.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(l.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"},ht,8,mt)):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(isNaN(r.value)?"":r.value.toFixed(t.value.style.rating.roundingValue)),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(isNaN(r.value)?"":r.value.toFixed(t.value.style.rating.roundingValue)),5)):e.createCommentVNode("",!0)],36))}},gt=S._export_sfc(kt,[["__scopeId","data-v-3e41118a"]]);exports.default=gt;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { onMounted as F, ref as S, computed as R, openBlock as s, createElementBlock as a, normalizeStyle as l, createElementVNode as e, toDisplayString as k, createCommentVNode as r, normalizeClass as w, withKeys as z, createTextVNode as M, unref as n, pushScopeId as I, popScopeId as K, createStaticVNode as _ } from "vue";
|
|
2
|
-
import { u as E, o as O, e as D, X as c, s as m } from "./index-
|
|
3
|
-
import { u as L } from "./useNestedProp-
|
|
2
|
+
import { u as E, o as O, e as D, X as c, s as m } from "./index-BzC4GFT4.js";
|
|
3
|
+
import { u as L } from "./useNestedProp-Ci4Xkt-B.js";
|
|
4
4
|
import { _ as T } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
5
5
|
const v = ($) => (I("data-v-3e41118a"), $ = $(), K(), $), P = {
|
|
6
6
|
key: 0,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { computed as u, ref as p, onMounted as W, openBlock as n, createElementBlock as i, normalizeStyle as j, createBlock as w, unref as y, createElementVNode as g, createCommentVNode as v, toDisplayString as A } from "vue";
|
|
2
|
-
import { u as X, c as Z, t as Q, o as R, e as H, Q as J, X as K, v as z, M as I, f as B, i as Y } from "./index-
|
|
3
|
-
import { u as D } from "./useNestedProp-
|
|
4
|
-
import M from "./BaseIcon-
|
|
5
|
-
import ee from "./vue-ui-skeleton-
|
|
2
|
+
import { u as X, c as Z, t as Q, o as R, e as H, Q as J, X as K, v as z, M as I, f as B, i as Y } from "./index-BzC4GFT4.js";
|
|
3
|
+
import { u as D } from "./useNestedProp-Ci4Xkt-B.js";
|
|
4
|
+
import M from "./BaseIcon-BYikkWFZ.js";
|
|
5
|
+
import ee from "./vue-ui-skeleton-DCC5qNwg.js";
|
|
6
6
|
import { _ as te } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
7
7
|
const le = ["id"], ae = ["xmlns", "viewBox"], ne = ["id"], oe = ["stop-color"], se = ["stop-color"], ue = { key: 0 }, re = ["d", "fill"], ie = ["d", "fill"], de = ["d", "stroke", "stroke-width", "stroke-linecap", "stroke-linejoin"], ve = ["d", "stroke", "stroke-width", "stroke-linecap", "stroke-linejoin"], ye = ["height", "width", "x"], ce = { style: { width: "100%" } }, he = ["x", "y", "fill", "font-size", "font-weight"], fe = ["stroke", "cx", "cy", "fill"], pe = ["x", "y", "font-size", "fill", "font-weight"], ge = {
|
|
8
8
|
__name: "vue-ui-spark-trend",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index-C61CWbhi.cjs"),L=require("./useNestedProp-CQPRjDbe.cjs"),x=require("./BaseIcon-DZeqsESI.cjs"),M=require("./vue-ui-skeleton-DOB3BXPS.cjs"),F=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),j=["id"],q=["xmlns","viewBox"],A=["id"],I=["stop-color"],D=["stop-color"],P={key:0},G=["d","fill"],O=["d","fill"],U=["d","stroke","stroke-width","stroke-linecap","stroke-linejoin"],W=["d","stroke","stroke-width","stroke-linecap","stroke-linejoin"],Z=["height","width","x"],H={style:{width:"100%"}},R=["x","y","fill","font-size","font-weight"],X=["stroke","cx","cy","fill"],J=["x","y","font-size","fill","font-weight"],K={__name:"vue-ui-spark-trend",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(N){const r=N,{vue_ui_spark_trend:$}=n.useConfig(),E=e.computed(()=>!!r.dataset&&r.dataset.length),y=e.ref(n.createUid()),t=e.computed(()=>{const l=L.useNestedProp({userConfig:r.config,defaultConfig:$});return l.theme?{...L.useNestedProp({userConfig:n.themes.vue_ui_spark_trend[l.theme]||r.config,defaultConfig:l})}:l});function k(l){return l.map(u=>[void 0].includes(u)?null:u)}const h=e.ref(r.dataset.map(l=>t.value.style.animation.show||[void 0].includes(l)?null:l)),v=e.ref(!1),g=e.ref(null);e.onMounted(()=>{n.objectIsEmpty(r.dataset)&&n.error({componentName:"VueUiTrendPill",type:"dataset"});let u=1e3/t.value.style.animation.animationFrames,i=performance.now();if(t.value.style.animation.show&&t.value.style.animation.animationFrames&&r.dataset.length>1){let b=function(){v.value=!0;let w=performance.now(),B=w-i;B>u?(i=w-B%u,c<r.dataset.length?(h.value.push(r.dataset[c]),c+=1,g.value=requestAnimationFrame(b)):(cancelAnimationFrame(g.value),h.value=k(r.dataset),v.value=!1)):g.value=requestAnimationFrame(b)};h.value=[];let c=0;b()}});const o=e.ref({height:80,width:300}),d=e.computed(()=>({top:t.value.style.padding.top,left:t.value.style.padding.left,right:o.value.width-t.value.style.padding.right,bottom:o.value.height-t.value.style.padding.bottom,height:o.value.height-(t.value.style.padding.top+t.value.style.padding.bottom)-(t.value.style.dataLabel.show?t.value.style.dataLabel.fontSize:0),width:o.value.width-(t.value.style.padding.left+t.value.style.padding.right)})),_=e.computed(()=>{const l=k(r.dataset);return{max:Math.max(...l),min:Math.min(...l)}}),p=e.computed(()=>{const l=_.value.min>=0?0:_.value.min;return Math.abs(l)}),V=e.computed(()=>_.value.max+p.value);function C(l){return l/V.value}const T=e.computed(()=>r.dataset.length),a=e.computed(()=>h.value.map((l,u)=>{const i=isNaN(l)||[void 0,null,"NaN",NaN,1/0,-1/0].includes(l)?0:l||0;return{value:l,absoluteValue:i,plotValue:i+p.value,toMax:C(i+p.value),x:d.value.left+u*(d.value.width/(T.value-1))-t.value.style.padding.right,y:d.value.bottom-d.value.height*C(i+p.value)}})),m=e.computed(()=>{const l=k(r.dataset);return t.value.style.trendLabel.trendType==="global"?n.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}),f=e.computed(()=>v.value||m.value===0?"neutral":m.value>0?"positive":"negative"),s=e.computed(()=>t.value.style.arrow.colors[f.value]),z=e.computed(()=>{const l={x:a.value[0].x,y:o.value.height-6},u={x:a.value[a.value.length-1].x,y:o.value.height-6},i=[];return a.value.forEach(c=>{i.push(`${c.x},${c.y} `)}),[l.x,l.y,...i,u.x,u.y].toString()}),S=e.computed(()=>{let l=[];return a.value.forEach(u=>{l.push(`${u.x},${u.y} `)}),`M ${l.toString()}`});return(l,u)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-spark-trend",id:y.value,style:e.normalizeStyle(`width:100%;font-family:${t.value.style.fontFamily};backgroundColor:${t.value.style.backgroundColor}`)},[E.value?(e.openBlock(),e.createElementBlock("svg",{key:1,xmlns:e.unref(n.XMLNS),viewBox:`0 0 ${o.value.width} ${o.value.height}`,style:e.normalizeStyle(`width:100%;background:${t.value.style.backgroundColor};overflow:visible`)},[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":(t.value.style.line.useColorTrend?s.value:t.value.style.line.stroke)+e.unref(n.opacity)[t.value.style.area.opacity]},null,8,I),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.backgroundColor},null,8,D)],8,A)]),t.value.style.area.show&&a.value[0]?(e.openBlock(),e.createElementBlock("g",P,[t.value.style.line.smooth?(e.openBlock(),e.createElementBlock("path",{key:0,d:`M ${a.value[0].x},${d.value.bottom} ${e.unref(n.createSmoothPath)(a.value)} L ${a.value.at(-1).x},${d.value.bottom} Z`,fill:t.value.style.area.useGradient?`url(#pill_gradient_${y.value})`:`${t.value.style.line.useColorTrend?s.value:t.value.style.line.stroke}${e.unref(n.opacity)[t.value.style.area.opacity]}`,stroke:"none"},null,8,G)):(e.openBlock(),e.createElementBlock("path",{key:1,d:`M${z.value}Z`,fill:t.value.style.area.useGradient?`url(#pill_gradient_${y.value})`:`${t.value.style.line.useColorTrend?s.value:t.value.style.line.stroke}${e.unref(n.opacity)[t.value.style.area.opacity]}`,stroke:"none"},null,8,O))])):e.createCommentVNode("",!0),t.value.style.line.smooth&&a.value.length?(e.openBlock(),e.createElementBlock("path",{key:1,d:`M ${e.unref(n.createSmoothPath)(a.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,U)):e.createCommentVNode("",!0),!t.value.style.line.smooth&&a.value.length?(e.openBlock(),e.createElementBlock("path",{key:2,d:S.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,W)):e.createCommentVNode("",!0),v.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("foreignObject",{key:3,height:o.value.height/2,width:o.value.height/2,x:o.value.height/5,y:8},[e.createElementVNode("div",H,[f.value==="positive"?(e.openBlock(),e.createBlock(x.default,{key:0,stroke:s.value,name:"arrowTop",size:o.value.height/2},null,8,["stroke","size"])):e.createCommentVNode("",!0),f.value==="negative"?(e.openBlock(),e.createBlock(x.default,{key:1,stroke:s.value,name:"arrowBottom",size:o.value.height/2},null,8,["stroke","size"])):e.createCommentVNode("",!0),f.value==="neutral"?(e.openBlock(),e.createBlock(x.default,{key:2,stroke:s.value,name:"arrowRight",size:o.value.height/2},null,8,["stroke","size"])):e.createCommentVNode("",!0)])],8,Z)),v.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("text",{key:4,x:o.value.height/2-o.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(n.dataLabel)({p:m.value>0?"+":"",v:m.value,s:"%",r:t.value.style.trendLabel.rounding})),9,R)),a.value.length&&a.value.at(-1).x!==void 0?(e.openBlock(),e.createElementBlock("circle",{key:5,stroke:t.value.style.backgroundColor,"stroke-width":2,cx:a.value.at(-1).x,cy:a.value.at(-1).y,r:4,fill:s.value},null,8,X)):e.createCommentVNode("",!0),a.value.length&&a.value.at(-1).x!==void 0&&t.value.style.dataLabel.show?(e.openBlock(),e.createElementBlock("text",{key:6,"text-anchor":"middle",x:a.value.at(-1).x,y:a.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(n.applyDataLabel)(t.value.style.dataLabel.formatter,a.value.at(-1).value,e.unref(n.dataLabel)({p:t.value.style.dataLabel.prefix,v:a.value.at(-1).value,s:t.value.style.dataLabel.suffix,r:t.value.style.dataLabel.rounding}),{datapoint:a.value.at(-1)})),9,J)):e.createCommentVNode("",!0)],12,q)):(e.openBlock(),e.createBlock(M.default,{key:0,config:{type:"sparkline",style:{backgroundColor:t.value.style.backgroundColor,sparkline:{color:"#CCCCCC"}}}},null,8,["config"]))],12,j))}},Q=F._export_sfc(K,[["__scopeId","data-v-e9fd1997"]]);exports.default=Q;
|
|
@@ -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-C61CWbhi.cjs"),x=require("./useNestedProp-CQPRjDbe.cjs"),E=require("./vue-ui-skeleton-DOB3BXPS.cjs"),V=["onClick"],$={key:1},D=["xmlns","viewBox"],z=["id"],L=["stop-color"],P=["stop-color"],A=["height","width","fill","rx"],F=["height","width","fill","rx"],I=["height","width","fill","rx"],T={__name:"vue-ui-sparkbar",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}},backgroundOpacity:{type:Number,default:100}},emits:["selectDatapoint"],setup(p,{emit:b}){const n=p,{vue_ui_sparkbar:C}=o.useConfig(),v=e.computed(()=>!!n.dataset&&n.dataset.length),y=e.ref(o.createUid()),t=e.computed(()=>{const l=x.useNestedProp({userConfig:n.config,defaultConfig:C});return l.theme?{...x.useNestedProp({userConfig:o.themes.vue_ui_sparkbar[l.theme]||n.config,defaultConfig:l}),customPalette:o.themePalettes[l.theme]||o.palette}:l}),S=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}))),f=e.ref(null);e.onMounted(async()=>{o.objectIsEmpty(n.dataset)&&o.error({componentName:"VueUiSparkbar",type:"dataset"}),g()});function g(){if(t.value.style.animation.show){let k=function(){s+=a/l,s<a?(c.value=c.value.map((u,m)=>({...u,value:u.value+=r[m]})),f.value=requestAnimationFrame(k)):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 s=0;k()}}e.watch(()=>n.dataset,async l=>{cancelAnimationFrame(f.value),c.value=n.dataset.map(r=>({...r,value:t.value.style.animation.show?0:r.value||0,formatter:r.formatter||null})),e.nextTick(g)},{deep:!0});const i=e.ref({width:500,height:16}),w=e.computed(()=>Math.max(...n.dataset.map(l=>l.value))),N=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)||S.value[r]||o.palette[r]||o.palette[r%o.palette.length]}))));function _(l){return l/w.value}function h(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:_(l.value)}function d(l){return t.value.style.layout.independant&&l.target||t.value.style.layout.target}function B(l,r){b("selectDatapoint",{datapoint:l,index:r})}return(l,r)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle({width:"100%",fontFamily:t.value.style.fontFamily,background:t.value.style.backgroundColor+e.unref(o.opacity)[n.backgroundOpacity]})},[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(N.value,(a,s)=>(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&&s!==p.dataset.length-1?"margin-bottom:6px":""}`),onClick:()=>B(a,s)},[e.renderSlot(l.$slots,"data-label",e.normalizeProps(e.guardReactiveProps({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:s}),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:s})}}))),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:s})),5)):e.createCommentVNode("",!0),t.value.style.layout.showTargetValue?(e.openBlock(),e.createElementBlock("span",$,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:s})),1)):e.createCommentVNode("",!0)],4)),(e.openBlock(),e.createElementBlock("svg",{xmlns:e.unref(o.XMLNS),viewBox:`0 0 ${i.value.width} ${i.value.height}`,width:"100%"},[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{x1:"0%",y1:"0%",x2:"100%",y2:"0%",id:`sparkbar_gradient_${s}_${y.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":`${e.unref(o.shiftHue)(a.color,.03)}${e.unref(o.opacity)[100-t.value.style.bar.gradient.intensity]}`},null,8,L),e.createElementVNode("stop",{offset:"100%","stop-color":a.color},null,8,P)],8,z)]),e.createElementVNode("rect",{height:i.value.height,width:i.value.width,x:0,y:0,fill:`${t.value.style.gutter.backgroundColor}${e.unref(o.opacity)[t.value.style.gutter.opacity]}`,rx:i.value.height/2},null,8,A),e.createElementVNode("rect",{height:i.value.height,width:i.value.width*h(a),x:0,y:0,fill:t.value.style.bar.gradient.underlayerColor,rx:i.value.height/2},null,8,F),e.createElementVNode("rect",{height:i.value.height,width:i.value.width*h(a),x:0,y:0,fill:t.value.style.bar.gradient.show?`url(#sparkbar_gradient_${s}_${y.value})`:a.color,rx:i.value.height/2},null,8,I)],8,D))],12,V)):e.createCommentVNode("",!0)],64))),256)),v.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(E.default,{key:2,config:{type:"sparkbar",style:{backgroundColor:t.value.style.backgroundColor,sparkbar:{color:"#CCCCCC"}}}},null,8,["config"]))],4))}};exports.default=T;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { computed as g, ref as x, onMounted as G, watch as W, nextTick as q, openBlock as r, createElementBlock as v, normalizeStyle as y, unref as s, renderSlot as I, normalizeProps as P, mergeProps as H, createCommentVNode as d, createElementVNode as c, toDisplayString as p, Fragment as z, renderList as X, guardReactiveProps as R, createBlock as J } from "vue";
|
|
2
|
-
import { u as K, c as Q, t as Y, a as Z, p as k, b as ee, o as te, e as L, g as le, d as ae, v as _, i as w, f as b, X as oe, s as se } from "./index-
|
|
3
|
-
import { u as T } from "./useNestedProp-
|
|
4
|
-
import ue from "./vue-ui-skeleton-
|
|
2
|
+
import { u as K, c as Q, t as Y, a as Z, p as k, b as ee, o as te, e as L, g as le, d as ae, v as _, i as w, f as b, X as oe, s as se } from "./index-BzC4GFT4.js";
|
|
3
|
+
import { u as T } from "./useNestedProp-Ci4Xkt-B.js";
|
|
4
|
+
import ue from "./vue-ui-skeleton-DCC5qNwg.js";
|
|
5
5
|
const ie = ["onClick"], ne = { key: 1 }, re = ["xmlns", "viewBox"], ve = ["id"], ce = ["stop-color"], de = ["stop-color"], ye = ["height", "width", "fill", "rx"], pe = ["height", "width", "fill", "rx"], fe = ["height", "width", "fill", "rx"], ke = {
|
|
6
6
|
__name: "vue-ui-sparkbar",
|
|
7
7
|
props: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("./index-C61CWbhi.cjs"),g=require("./useNestedProp-CQPRjDbe.cjs"),C=require("./vue-ui-skeleton-DOB3BXPS.cjs"),$=["xmlns","viewBox"],w=["id"],N=["stop-color"],S=["stop-color"],L=["d","stroke","stroke-linecap"],B=["d","stroke","stroke-linecap","stroke-dashoffset"],E=["x","y","font-size","fill","font-weight"],z={__name:"vue-ui-sparkgauge",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(k){const a=k,{vue_ui_sparkgauge:b}=u.useConfig(),c=e.computed(()=>!!a.dataset&&Object.keys(a.dataset).length);e.onMounted(()=>{u.objectIsEmpty(a.dataset)?u.error({componentName:"VueUiSparkgauge",type:"dataset"}):u.getMissingDatasetAttributes({datasetObject:a.dataset,requiredAttributes:["value","min","max"]}).forEach(s=>{u.error({componentName:"VueUiSparkgauge",type:"datasetAttribute",property:s})})});const v=e.ref(u.createUid()),t=e.computed(()=>{const s=g.useNestedProp({userConfig:a.config,defaultConfig:b});return s.theme?{...g.useNestedProp({userConfig:u.themes.vue_ui_sparkgauge[s.theme]||a.config,defaultConfig:s})}:s}),n=e.computed(()=>({height:t.value.style.height,width:128,base:t.value.style.basePosition})),l=e.computed(()=>{const s=a.dataset.min??0,i=a.dataset.max??0,_=i-s;return{min:s,max:i,diff:_}}),o=e.ref(t.value.style.animation.show?l.value.min:a.dataset.value);e.watch(()=>a.dataset.value,()=>{o.value=e.ref(t.value.style.animation.show?l.value.min:a.dataset.value),m()});const d=e.computed(()=>o.value>l.value.max?l.value.max:o.value<l.value.min?l.value.min:o.value),h=e.computed(()=>l.value.diff/t.value.style.animation.speedMs);e.onMounted(()=>{m()});function m(){function s(){o.value+=h.value,o.value<a.dataset.value?requestAnimationFrame(s):o.value=a.dataset.value}t.value.style.animation.show&&(o.value=l.value.min,s())}const r=e.computed(()=>a.dataset.title??""),y=e.computed(()=>o.value>=0?(d.value-l.value.min)/l.value.diff:(Math.abs(l.value.min)-Math.abs(d.value))/l.value.diff),f=e.computed(()=>u.interpolateColorHex(t.value.style.colors.min,t.value.style.colors.max,l.value.min,l.value.max,o.value)),p=e.computed(()=>t.value.style.dataLabel.autoColor?f.value:t.value.style.dataLabel.color),x=e.computed(()=>t.value.style.track.autoColor?f.value:t.value.style.track.color);return(s,i)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width: 100%; background:${t.value.style.background}`)},[t.value.style.title.show&&r.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(r.value),5)):e.createCommentVNode("",!0),c.value?(e.openBlock(),e.createElementBlock("svg",{key:1,xmlns:e.unref(u.XMLNS),viewBox:`0 0 ${n.value.width} ${n.value.height}`,style:e.normalizeStyle(`overflow: visible; background:${t.value.style.background}; width:100%;`)},[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,N),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.colors.max},null,8,S)],8,w)]),e.createElementVNode("path",{d:`M10 ${n.value.base} A 1 1 0 1 1 118 ${n.value.base}`,stroke:t.value.style.gutter.color,"stroke-width":8,"stroke-linecap":t.value.style.gutter.strokeLinecap,fill:"none"},null,8,L),y.value!==0?(e.openBlock(),e.createElementBlock("path",{key:0,d:`M10 ${n.value.base} A 1 1 0 1 1 118 ${n.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*y.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,B)):e.createCommentVNode("",!0),e.createElementVNode("text",{"text-anchor":"middle",x:n.value.width/2,y:n.value.base+6+t.value.style.dataLabel.offsetY,"font-size":t.value.style.dataLabel.fontSize,fill:p.value,"font-weight":t.value.style.dataLabel.bold?"bold":"normal"},e.toDisplayString(e.unref(u.applyDataLabel)(t.value.style.dataLabel.formatter,o.value,e.unref(u.dataLabel)({p:t.value.style.dataLabel.prefix,v:o.value,s:t.value.style.dataLabel.suffix,r:t.value.style.dataLabel.rounding}),{datapoint:o.value,color:p.value})),9,E)],12,$)):e.createCommentVNode("",!0),c.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(C.default,{key:2,config:{type:"gauge",style:{backgroundColor:t.value.style.background,gauge:{color:"#CCCCCC"}}}},null,8,["config"])),t.value.style.title.show&&r.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(r.value),5)):e.createCommentVNode("",!0)],4))}};exports.default=z;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { computed as s, onMounted as w, ref as m, watch as F, openBlock as n, createElementBlock as r, normalizeStyle as v, toDisplayString as y, createCommentVNode as c, unref as g, createElementVNode as i, normalizeClass as O, createBlock as j } from "vue";
|
|
2
|
-
import { u as B, o as D, e as C, g as E, c as I, t as G, I as U, X as V, i as q, f as P } from "./index-
|
|
3
|
-
import { u as L } from "./useNestedProp-
|
|
4
|
-
import T from "./vue-ui-skeleton-
|
|
2
|
+
import { u as B, o as D, e as C, g as E, c as I, t as G, I as U, X as V, i as q, f as P } from "./index-BzC4GFT4.js";
|
|
3
|
+
import { u as L } from "./useNestedProp-Ci4Xkt-B.js";
|
|
4
|
+
import T from "./vue-ui-skeleton-DCC5qNwg.js";
|
|
5
5
|
const X = ["xmlns", "viewBox"], H = ["id"], R = ["stop-color"], Y = ["stop-color"], J = ["d", "stroke", "stroke-linecap"], K = ["d", "stroke", "stroke-linecap", "stroke-dashoffset"], Q = ["x", "y", "font-size", "fill", "font-weight"], ae = {
|
|
6
6
|
__name: "vue-ui-sparkgauge",
|
|
7
7
|
props: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),a=require("./index-DSa4xA3E.cjs"),k=require("./useNestedProp-CldQcAqF.cjs"),z=require("./Shape-Div8sUVU.cjs"),D=require("./vue-ui-skeleton-Dhz5mOid.cjs"),F=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),M={key:0},A={key:1},H=["xmlns","viewBox"],q=["id"],I=["stop-color"],U=["stop-color"],W=["id"],O=["stop-color"],j=["stop-color"],P=["id"],G=["stop-color"],T=["stop-color"],X={key:0},Y=["x","y","height","width","fill","stroke","stroke-width","rx"],R={key:1},J=["x","y","font-size","font-weight","fill"],K=["x","y","font-size","fill"],Q=["x","y","font-size","fill"],Z=["height","width","x","onMouseover","stroke","stroke-width","rx","stroke-dasharray","onClick"],ee={__name:"vue-ui-sparkhistogram",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectDatapoint"],setup(b,{emit:_}){const u=b;e.useCssVars(o=>({"07c89730":w.value}));const{vue_ui_sparkhistogram:x}=a.useConfig(),f=e.computed(()=>!!u.dataset&&u.dataset.length);e.onMounted(()=>{a.objectIsEmpty(u.dataset)?a.error({componentName:"VueUiSparkHistogram",type:"dataset"}):u.dataset.forEach((o,n)=>{a.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["value"]}).forEach(l=>{a.error({componentName:"VueUiSparkHistogram",type:"datasetSerieAttribute",property:l,index:n})})})});const v=e.ref(a.createUid()),t=e.computed(()=>{const o=k.useNestedProp({userConfig:u.config,defaultConfig:x});return o.theme?{...k.useNestedProp({userConfig:a.themes.vue_ui_sparkhistogram[o.theme]||u.config,defaultConfig:o})}:o}),c=e.computed(()=>{const o=t.value.style.layout.height,n=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=n-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=n-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:n}}),B=e.computed(()=>Math.max(...u.dataset.map(o=>Math.abs(o.value||0))));function $(o){return Math.abs(o)/B.value}const i=e.computed(()=>u.dataset.map((o,n)=>{const l=$(o.value||0),s=c.value.drawingHeight*l,d=c.value.drawingWidth/u.dataset.length,y=d*(t.value.style.bars.gap/100),p=d-y,g=c.value.centerY-s/2,m=c.value.left+(y/2+n*d),S=c.value.left+n*d,h=typeof o.intensity>"u"?100:Math.round(o.intensity*100),C=o.color?o.color:o.value>=0?`${t.value.style.bars.colors.positive}${a.opacity[h]}`:`${t.value.style.bars.colors.negative}${a.opacity[h]}`,N=o.color?o.color:o.value>=0?t.value.style.bars.colors.positive:t.value.style.bars.colors.negative,L=o.color?`url(#gradient_datapoint_${n}_${v.value})`:o.value>=0?`url(#gradient_positive_${n}_${v.value})`:`url(#gradient_negative_${n}_${v.value})`,V=m+p/2;return{...o,color:C,gradient:L,height:s,intensity:h,proportion:l,stroke:N,textAnchor:V,trapX:S,unitWidth:d,width:p,x:m,y:g}})),r=e.ref(null);function E(o,n){_("selectDatapoint",{datapoint:o,index:n})}const w=e.computed(()=>`${t.value.style.animation.speedMs}ms`);return(o,n)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle(`width:100%;background:${t.value.style.backgroundColor};font-family:${t.value.style.fontFamily}`),onMouseleave:n[1]||(n[1]=l=>r.value=null)},[t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`width:calc(100% - 12px);background:${t.value.style.backgroundColor};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),r.value!==null?(e.openBlock(),e.createElementBlock("span",M,"- "+e.toDisplayString(i.value[r.value].timeLabel||"")+" "+e.toDisplayString(e.unref(a.applyDataLabel)(t.value.style.labels.value.formatter,i.value[r.value].value,e.unref(a.dataLabel)({p:t.value.style.labels.value.prefix,v:i.value[r.value].value,s:t.value.style.labels.value.suffix,r:t.value.style.labels.value.rounding}),{datapoint:i.value[r.value],seriesIndex:r.value})),1)):e.createCommentVNode("",!0),![void 0,null].includes(r.value)&&![null,void 0].includes(i.value[r.value].valueLabel)?(e.openBlock(),e.createElementBlock("span",A,"("+e.toDisplayString(i.value[r.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,xmlns:e.unref(a.XMLNS),viewBox:`0 0 ${c.value.width} ${c.value.height}`,style:{overflow:"visible"}},[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.shiftHue)(t.value.style.bars.colors.positive,.05)}${e.unref(a.opacity)[l.intensity]}`},null,8,I),e.createElementVNode("stop",{offset:"100%","stop-color":`${t.value.style.bars.colors.positive}${e.unref(a.opacity)[l.intensity]}`},null,8,U)],8,q))),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.shiftHue)(t.value.style.bars.colors.negative,.05)}${e.unref(a.opacity)[l.intensity]}`},null,8,O),e.createElementVNode("stop",{offset:"100%","stop-color":`${t.value.style.bars.colors.negative}${e.unref(a.opacity)[l.intensity]}`},null,8,j)],8,W))),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.shiftHue)(l.color,.05)}${e.unref(a.opacity)[l.intensity]}`},null,8,G),e.createElementVNode("stop",{offset:"100%","stop-color":`${l.color}${e.unref(a.opacity)[l.intensity]}`},null,8,T)],8,P))),256))]),!t.value.style.bars.shape||t.value.style.bars.shape==="square"?(e.openBlock(),e.createElementBlock("g",X,[(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,Y))),256))])):(e.openBlock(),e.createElementBlock("g",R,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(l,s)=>(e.openBlock(),e.createBlock(z._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(t.value.style.labels.value.prefix)+e.toDisplayString(isNaN(l.value)?"":Number(l.value.toFixed(t.value.style.labels.value.rounding)).toLocaleString())+e.toDisplayString(t.value.style.labels.value.suffix),9,J))),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,K)):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:c.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,Q)):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:c.value.height,width:l.unitWidth,fill:"transparent",x:l.trapX,y:0,onMouseover:d=>r.value=s,onMouseleave:n[0]||(n[0]=d=>r.value=null),stroke:r.value!==null&&r.value===s?t.value.style.selector.stroke:"","stroke-width":r.value!==null&&r.value===s?t.value.style.selector.strokeWidth:0,rx:t.value.style.selector.borderRadius,"stroke-dasharray":t.value.style.selector.strokeDasharray,onClick:()=>E(l,s)},null,40,Z)]))),256))],8,H)):e.createCommentVNode("",!0),f.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(D.default,{key:2,config:{type:"sparkHistogram",style:{backgroundColor:t.value.style.backgroundColor,sparkHistogram:{color:"#CCCCCC"}}}},null,8,["config"]))],36))}},te=F._export_sfc(ee,[["__scopeId","data-v-27ede5f8"]]);exports.default=te;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),a=require("./index-C61CWbhi.cjs"),k=require("./useNestedProp-CQPRjDbe.cjs"),z=require("./Shape-CgkXbbSY.cjs"),D=require("./vue-ui-skeleton-DOB3BXPS.cjs"),F=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),M={key:0},A={key:1},H=["xmlns","viewBox"],q=["id"],I=["stop-color"],U=["stop-color"],W=["id"],O=["stop-color"],j=["stop-color"],P=["id"],G=["stop-color"],T=["stop-color"],X={key:0},Y=["x","y","height","width","fill","stroke","stroke-width","rx"],R={key:1},J=["x","y","font-size","font-weight","fill"],K=["x","y","font-size","fill"],Q=["x","y","font-size","fill"],Z=["height","width","x","onMouseover","stroke","stroke-width","rx","stroke-dasharray","onClick"],ee={__name:"vue-ui-sparkhistogram",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectDatapoint"],setup(b,{emit:_}){const u=b;e.useCssVars(o=>({"07c89730":w.value}));const{vue_ui_sparkhistogram:x}=a.useConfig(),f=e.computed(()=>!!u.dataset&&u.dataset.length);e.onMounted(()=>{a.objectIsEmpty(u.dataset)?a.error({componentName:"VueUiSparkHistogram",type:"dataset"}):u.dataset.forEach((o,n)=>{a.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["value"]}).forEach(l=>{a.error({componentName:"VueUiSparkHistogram",type:"datasetSerieAttribute",property:l,index:n})})})});const v=e.ref(a.createUid()),t=e.computed(()=>{const o=k.useNestedProp({userConfig:u.config,defaultConfig:x});return o.theme?{...k.useNestedProp({userConfig:a.themes.vue_ui_sparkhistogram[o.theme]||u.config,defaultConfig:o})}:o}),c=e.computed(()=>{const o=t.value.style.layout.height,n=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=n-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=n-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:n}}),B=e.computed(()=>Math.max(...u.dataset.map(o=>Math.abs(o.value||0))));function $(o){return Math.abs(o)/B.value}const i=e.computed(()=>u.dataset.map((o,n)=>{const l=$(o.value||0),s=c.value.drawingHeight*l,d=c.value.drawingWidth/u.dataset.length,y=d*(t.value.style.bars.gap/100),p=d-y,g=c.value.centerY-s/2,m=c.value.left+(y/2+n*d),S=c.value.left+n*d,h=typeof o.intensity>"u"?100:Math.round(o.intensity*100),C=o.color?o.color:o.value>=0?`${t.value.style.bars.colors.positive}${a.opacity[h]}`:`${t.value.style.bars.colors.negative}${a.opacity[h]}`,N=o.color?o.color:o.value>=0?t.value.style.bars.colors.positive:t.value.style.bars.colors.negative,L=o.color?`url(#gradient_datapoint_${n}_${v.value})`:o.value>=0?`url(#gradient_positive_${n}_${v.value})`:`url(#gradient_negative_${n}_${v.value})`,V=m+p/2;return{...o,color:C,gradient:L,height:s,intensity:h,proportion:l,stroke:N,textAnchor:V,trapX:S,unitWidth:d,width:p,x:m,y:g}})),r=e.ref(null);function E(o,n){_("selectDatapoint",{datapoint:o,index:n})}const w=e.computed(()=>`${t.value.style.animation.speedMs}ms`);return(o,n)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle(`width:100%;background:${t.value.style.backgroundColor};font-family:${t.value.style.fontFamily}`),onMouseleave:n[1]||(n[1]=l=>r.value=null)},[t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`width:calc(100% - 12px);background:${t.value.style.backgroundColor};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),r.value!==null?(e.openBlock(),e.createElementBlock("span",M,"- "+e.toDisplayString(i.value[r.value].timeLabel||"")+" "+e.toDisplayString(e.unref(a.applyDataLabel)(t.value.style.labels.value.formatter,i.value[r.value].value,e.unref(a.dataLabel)({p:t.value.style.labels.value.prefix,v:i.value[r.value].value,s:t.value.style.labels.value.suffix,r:t.value.style.labels.value.rounding}),{datapoint:i.value[r.value],seriesIndex:r.value})),1)):e.createCommentVNode("",!0),![void 0,null].includes(r.value)&&![null,void 0].includes(i.value[r.value].valueLabel)?(e.openBlock(),e.createElementBlock("span",A,"("+e.toDisplayString(i.value[r.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,xmlns:e.unref(a.XMLNS),viewBox:`0 0 ${c.value.width} ${c.value.height}`,style:{overflow:"visible"}},[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.shiftHue)(t.value.style.bars.colors.positive,.05)}${e.unref(a.opacity)[l.intensity]}`},null,8,I),e.createElementVNode("stop",{offset:"100%","stop-color":`${t.value.style.bars.colors.positive}${e.unref(a.opacity)[l.intensity]}`},null,8,U)],8,q))),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.shiftHue)(t.value.style.bars.colors.negative,.05)}${e.unref(a.opacity)[l.intensity]}`},null,8,O),e.createElementVNode("stop",{offset:"100%","stop-color":`${t.value.style.bars.colors.negative}${e.unref(a.opacity)[l.intensity]}`},null,8,j)],8,W))),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.shiftHue)(l.color,.05)}${e.unref(a.opacity)[l.intensity]}`},null,8,G),e.createElementVNode("stop",{offset:"100%","stop-color":`${l.color}${e.unref(a.opacity)[l.intensity]}`},null,8,T)],8,P))),256))]),!t.value.style.bars.shape||t.value.style.bars.shape==="square"?(e.openBlock(),e.createElementBlock("g",X,[(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,Y))),256))])):(e.openBlock(),e.createElementBlock("g",R,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(l,s)=>(e.openBlock(),e.createBlock(z._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(t.value.style.labels.value.prefix)+e.toDisplayString(isNaN(l.value)?"":Number(l.value.toFixed(t.value.style.labels.value.rounding)).toLocaleString())+e.toDisplayString(t.value.style.labels.value.suffix),9,J))),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,K)):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:c.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,Q)):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:c.value.height,width:l.unitWidth,fill:"transparent",x:l.trapX,y:0,onMouseover:d=>r.value=s,onMouseleave:n[0]||(n[0]=d=>r.value=null),stroke:r.value!==null&&r.value===s?t.value.style.selector.stroke:"","stroke-width":r.value!==null&&r.value===s?t.value.style.selector.strokeWidth:0,rx:t.value.style.selector.borderRadius,"stroke-dasharray":t.value.style.selector.strokeDasharray,onClick:()=>E(l,s)},null,40,Z)]))),256))],8,H)):e.createCommentVNode("",!0),f.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(D.default,{key:2,config:{type:"sparkHistogram",style:{backgroundColor:t.value.style.backgroundColor,sparkHistogram:{color:"#CCCCCC"}}}},null,8,["config"]))],36))}},te=F._export_sfc(ee,[["__scopeId","data-v-27ede5f8"]]);exports.default=te;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { useCssVars as q, computed as _, onMounted as R, ref as M, openBlock as a, createElementBlock as o, normalizeStyle as w, createElementVNode as h, createTextVNode as T, toDisplayString as v, unref as r, createCommentVNode as p, Fragment as f, renderList as g, normalizeClass as N, createBlock as A } from "vue";
|
|
2
|
-
import { u as P, o as J, e as D, g as K, c as Q, t as Z, v as b, i as ee, f as te, X as le, s as z } from "./index-
|
|
3
|
-
import { u as F } from "./useNestedProp-
|
|
4
|
-
import { _ as ae } from "./Shape-
|
|
5
|
-
import oe from "./vue-ui-skeleton-
|
|
2
|
+
import { u as P, o as J, e as D, g as K, c as Q, t as Z, v as b, i as ee, f as te, X as le, s as z } from "./index-BzC4GFT4.js";
|
|
3
|
+
import { u as F } from "./useNestedProp-Ci4Xkt-B.js";
|
|
4
|
+
import { _ as ae } from "./Shape-DLcI9AEd.js";
|
|
5
|
+
import oe from "./vue-ui-skeleton-DCC5qNwg.js";
|
|
6
6
|
import { _ as se } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
7
7
|
const ue = { key: 0 }, ie = { key: 1 }, ne = ["xmlns", "viewBox"], re = ["id"], ve = ["stop-color"], de = ["stop-color"], ce = ["id"], ye = ["stop-color"], he = ["stop-color"], fe = ["id"], ge = ["stop-color"], pe = ["stop-color"], be = { key: 0 }, me = ["x", "y", "height", "width", "fill", "stroke", "stroke-width", "rx"], _e = { key: 1 }, xe = ["x", "y", "font-size", "font-weight", "fill"], ke = ["x", "y", "font-size", "fill"], $e = ["x", "y", "font-size", "fill"], we = ["height", "width", "x", "onMouseover", "stroke", "stroke-width", "rx", "stroke-dasharray", "onClick"], Ce = {
|
|
8
8
|
__name: "vue-ui-sparkhistogram",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { computed as d, ref as w, onMounted as J, openBlock as s, createElementBlock as n, normalizeStyle as N, renderSlot as F, normalizeProps as K, guardReactiveProps as Q, createElementVNode as f, toDisplayString as G, createCommentVNode as y, unref as v, Fragment as P, renderList as z, createBlock as ee } from "vue";
|
|
2
|
-
import { u as te, c as ae, t as le, o as ue, e as W, g as oe, s as I, R as se, S as ne, X as re, v as C, M as B, i as E, f as T } from "./index-
|
|
3
|
-
import { u as j } from "./useNestedProp-
|
|
4
|
-
import ie from "./vue-ui-skeleton-
|
|
2
|
+
import { u as te, c as ae, t as le, o as ue, e as W, g as oe, s as I, R as se, S as ne, X as re, v as C, M as B, i as E, f as T } from "./index-BzC4GFT4.js";
|
|
3
|
+
import { u as j } from "./useNestedProp-Ci4Xkt-B.js";
|
|
4
|
+
import ie from "./vue-ui-skeleton-DCC5qNwg.js";
|
|
5
5
|
import { _ as de } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
6
6
|
const ve = ["id"], ce = ["xmlns", "viewBox"], ye = ["id"], he = ["stop-color"], fe = ["stop-color"], pe = ["id"], ge = ["stop-color"], me = ["stop-color"], ke = ["id"], be = ["stop-color"], xe = ["stop-color"], _e = { key: 0 }, we = ["d", "fill"], $e = ["d", "fill"], Le = ["d", "stroke", "stroke-width"], Ne = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], Ie = ["x", "y", "width", "height", "fill", "rx"], Ce = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], Me = ["x1", "x2", "y1", "y2", "stroke", "stroke-dasharray", "stroke-width"], Se = ["cx", "cy", "r", "fill", "stroke", "stroke-width"], Ve = ["x", "y", "font-size", "font-weight", "fill"], Pe = ["x", "y", "height", "width", "onMouseenter", "onClick"], ze = {
|
|
7
7
|
__name: "vue-ui-sparkline",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("./index-DSa4xA3E.cjs"),L=require("./useNestedProp-CldQcAqF.cjs"),z=require("./vue-ui-skeleton-Dhz5mOid.cjs"),D=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),A=["id"],F=["xmlns","viewBox"],G=["id"],W=["stop-color"],q=["stop-color"],T=["id"],j=["stop-color"],H=["stop-color"],O=["id"],U=["stop-color"],X=["stop-color"],Z={key:0},R=["d","fill"],Y=["d","fill"],J=["d","stroke","stroke-width"],K=["x1","x2","y1","y2","stroke","stroke-width"],Q=["x","y","width","height","fill","rx"],ee=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],te=["x1","x2","y1","y2","stroke","stroke-dasharray","stroke-width"],le=["cx","cy","r","fill","stroke","stroke-width"],ae=["x","y","font-size","font-weight","fill"],oe=["x","y","height","width","onMouseenter","onClick"],ne={__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}},emits:["hoverIndex","selectDatapoint"],setup(p,{emit:x}){const i=p,{vue_ui_sparkline:$}=o.useConfig(),g=e.computed(()=>!!i.dataset&&i.dataset.length),v=e.ref(o.createUid()),t=e.computed(()=>{const l=L.useNestedProp({userConfig:i.config,defaultConfig:$});return l.theme?{...L.useNestedProp({userConfig:o.themes.vue_ui_sparkline[l.theme]||i.config,defaultConfig:l})}:l}),f=e.ref(i.dataset.map(l=>t.value.style.animation.show?{...l,value:null}:{...l,value:[void 0].includes(l.value)?null:l.value}));e.onMounted(()=>{if(o.objectIsEmpty(i.dataset)?o.error({componentName:"VueUiSparkline",type:"dataset"}):i.dataset.forEach((l,r)=>{o.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["period","value"]}).forEach(a=>{o.error({componentName:"VueUiSparkline",type:"datasetSerieAttribute",property:a,index:r})})}),t.value.style.animation.show&&i.dataset.length>1){let a=function(){r<i.dataset.length?(f.value.push(i.dataset[r]),setTimeout(()=>{requestAnimationFrame(a)},l)):f.value=i.dataset,r+=1};f.value=[];const l=t.value.style.animation.animationFrames/i.dataset.length;let r=0;a()}});const c=e.ref({height:80,width:500}),V=e.ref(6),n=e.computed(()=>({top:12,left:0,right:c.value.width,bottom:c.value.height-3,start:i.showInfo&&t.value.style.dataLabel.show&&t.value.style.dataLabel.position==="left"?c.value.width-t.value.style.chartWidth:30,width:i.showInfo&&t.value.style.dataLabel.show?t.value.style.chartWidth:c.value.width-30,height:c.value.height-12})),_=e.computed(()=>Math.min(...f.value.map(l=>isNaN(l.value)||[void 0,null,"NaN",NaN,1/0,-1/0].includes(l.value)?0:l.value||0))),E=e.computed(()=>Math.max(...f.value.map(l=>isNaN(l.value)||[void 0,null,"NaN",NaN,1/0,-1/0].includes(l.value)?0:l.value||0))),m=e.computed(()=>{const l=_.value>=0?0:_.value;return Math.abs(l)}),C=e.computed(()=>E.value+m.value+V.value),b=e.computed(()=>n.value.bottom-n.value.height*w(m.value));function w(l){return l/C.value}const y=e.computed(()=>i.dataset.length-1),u=e.computed(()=>f.value.map((l,r)=>{const a=isNaN(l.value)||[void 0,null,"NaN",NaN,1/0,-1/0].includes(l.value)?0:l.value||0;return{absoluteValue:a,period:l.period,plotValue:a+m.value,toMax:w(a+m.value),x:n.value.start+r*(n.value.width/(y.value+1)>30?30:n.value.width/(y.value+1)),y:n.value.bottom-n.value.height*w(a+m.value),id:`plot_${v.value}_${r}`,color:k.value?t.value.style.bar.color:t.value.style.area.useGradient?o.shiftHue(t.value.style.line.color,.05*(1-r/y.value)):t.value.style.line.color,width:n.value.width/(y.value+1)>30?30:n.value.width/(y.value+1)}})),I=e.computed(()=>{const l={x:u.value[0].x,y:c.value.height-6},r={x:u.value[u.value.length-1].x,y:c.value.height-6},a=[];return u.value.forEach(s=>{a.push(`${s.x},${s.y} `)}),[l.x,l.y,...a,r.x,r.y].toString()}),d=e.ref(void 0);function S(l,r){d.value=l,x("hoverIndex",{index:r})}function M(){d.value=void 0,x("hoverIndex",{index:void 0})}const h=e.computed(()=>{if(g.value){const l=u.value.map(a=>a.absoluteValue),r=l.reduce((a,s)=>a+s,0);return{latest:u.value[u.value.length-1].absoluteValue,sum:r,average:r/u.value.length,median:o.calcMedian(l),trend:o.calcLinearProgression(u.value.map(({x:a,y:s,absoluteValue:B})=>({x:a,y:s,value:B}))).trend}}else return{latest:null,sum:null,average:null,median:null,trend:null}}),N=e.computed(()=>g.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),k=e.computed(()=>t.value.type&&t.value.type==="bar");function P(l,r){x("selectDatapoint",{datapoint:l,index:r})}return(l,r)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-sparkline",id:v.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&&p.showInfo?(e.openBlock(),e.createElementBlock("div",{key:0,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),g.value?(e.openBlock(),e.createElementBlock("svg",{key:1,xmlns:e.unref(o.XMLNS),viewBox:`0 0 ${c.value.width} ${c.value.height}`,style:e.normalizeStyle(`background:${t.value.style.backgroundColor};overflow:visible`)},[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{x1:"0%",y1:"0%",x2:"100%",y2:"0%",id:`sparkline_gradient_${v.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":`${e.unref(o.shiftHue)(t.value.style.area.color,.05)}${e.unref(o.opacity)[t.value.style.area.opacity]}`},null,8,W),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.area.color+e.unref(o.opacity)[t.value.style.area.opacity]},null,8,q)],8,G),e.createElementVNode("linearGradient",{x2:"0%",y2:"100%",id:`sparkline_bar_gradient_pos_${v.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.bar.color},null,8,j),e.createElementVNode("stop",{offset:"100%","stop-color":`${e.unref(o.shiftHue)(t.value.style.bar.color,.05)}`},null,8,H)],8,T),e.createElementVNode("linearGradient",{x2:"0%",y2:"100%",id:`sparkline_bar_gradient_neg_${v.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":`${e.unref(o.shiftHue)(t.value.style.bar.color,.05)}`},null,8,U),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.bar.color},null,8,X)],8,O)]),t.value.style.area.show&&!k.value&&u.value[0]?(e.openBlock(),e.createElementBlock("g",Z,[t.value.style.line.smooth?(e.openBlock(),e.createElementBlock("path",{key:0,d:`M ${u.value[0].x},${n.value.bottom} ${e.unref(o.createSmoothPath)(u.value)} L ${u.value.at(-1).x},${n.value.bottom} Z`,fill:t.value.style.area.useGradient?`url(#sparkline_gradient_${v.value})`:`${t.value.style.area.color}${e.unref(o.opacity)[t.value.style.area.opacity]}`},null,8,R)):(e.openBlock(),e.createElementBlock("path",{key:1,d:`M${I.value}Z`,fill:t.value.style.area.useGradient?`url(#sparkline_gradient_${v.value})`:`${t.value.style.area.color}${e.unref(o.opacity)[t.value.style.area.opacity]}`},null,8,Y))])):e.createCommentVNode("",!0),t.value.style.line.smooth&&!k.value?(e.openBlock(),e.createElementBlock("path",{key:1,d:`M ${e.unref(o.createSmoothPath)(u.value)}`,stroke:t.value.style.line.color,fill:"none","stroke-width":t.value.style.line.strokeWidth,"stroke-linecap":"round"},null,8,J)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,(a,s)=>(e.openBlock(),e.createElementBlock("g",null,[s<u.value.length-1&&!t.value.style.line.smooth&&!k.value?(e.openBlock(),e.createElementBlock("line",{key:0,x1:a.x,x2:u.value[s+1].x,y1:a.y,y2:u.value[s+1].y,stroke:a.color,"stroke-width":t.value.style.line.strokeWidth,"stroke-linecap":"round","stroke-linejoin":"round","shape-rendering":"geometricPrecision"},null,8,K)):e.createCommentVNode("",!0),k.value?(e.openBlock(),e.createElementBlock("rect",{key:1,x:a.x-a.width/2,y:a.absoluteValue>0?a.y:b.value,width:a.width,height:Math.abs(a.y-b.value),fill:a.absoluteValue>0?`url(#sparkline_bar_gradient_pos_${v.value})`:`url(#sparkline_bar_gradient_neg_${v.value})`,rx:t.value.style.bar.borderRadius},null,8,Q)):e.createCommentVNode("",!0),t.value.style.verticalIndicator.show&&(d.value&&a.id===d.value.id||p.selectedIndex===s)?(e.openBlock(),e.createElementBlock("line",{key:2,x1:a.x,x2:a.x,y1:n.value.top-6,y2:n.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,ee)):e.createCommentVNode("",!0)]))),256)),_.value<0?(e.openBlock(),e.createElementBlock("line",{key:2,x1:n.value.start,x2:n.value.start+n.value.width-16,y1:b.value,y2:b.value,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,te)):e.createCommentVNode("",!0),t.value.style.plot.show?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:3},e.renderList(u.value,(a,s)=>(e.openBlock(),e.createElementBlock("g",null,[d.value&&a.id===d.value.id||p.selectedIndex===s?(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,le)):e.createCommentVNode("",!0)]))),256)):e.createCommentVNode("",!0),p.showInfo&&t.value.style.dataLabel.show?(e.openBlock(),e.createElementBlock("text",{key:4,x:t.value.style.dataLabel.position==="left"?12+t.value.style.dataLabel.offsetX:n.value.width+12+t.value.style.dataLabel.offsetX,y:c.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(o.applyDataLabel)(t.value.style.dataLabel.formatter,d.value.absoluteValue,e.unref(o.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(o.applyDataLabel)(t.value.style.dataLabel.formatter,N.value,e.unref(o.dataLabel)({p:t.value.style.dataLabel.prefix,v:N.value,s:t.value.style.dataLabel.suffix,r:t.value.style.dataLabel.roundingValue}))),9,ae)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,(a,s)=>(e.openBlock(),e.createElementBlock("rect",{x:a.x-(n.value.width/(y.value+1)>30?30:n.value.width/(y.value+1))/2,y:n.value.top-6,height:n.value.height+6,width:n.value.width/(y.value+1)>30?30:n.value.width/(y.value+1),fill:"transparent",onMouseenter:B=>S(a,s),onMouseleave:M,onClick:()=>P(a,s)},null,40,oe))),256)),e.renderSlot(l.$slots,"svg",{svg:c.value},void 0,!0)],12,F)):e.createCommentVNode("",!0),g.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(z.default,{key:2,config:{type:"sparkline",style:{backgroundColor:t.value.style.backgroundColor,sparkline:{color:"#CCCCCC"}}}},null,8,["config"]))],12,A))}},ue=D._export_sfc(ne,[["__scopeId","data-v-71dd1d7d"]]);exports.default=ue;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("./index-C61CWbhi.cjs"),L=require("./useNestedProp-CQPRjDbe.cjs"),z=require("./vue-ui-skeleton-DOB3BXPS.cjs"),D=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),A=["id"],F=["xmlns","viewBox"],G=["id"],W=["stop-color"],q=["stop-color"],T=["id"],j=["stop-color"],H=["stop-color"],O=["id"],U=["stop-color"],X=["stop-color"],Z={key:0},R=["d","fill"],Y=["d","fill"],J=["d","stroke","stroke-width"],K=["x1","x2","y1","y2","stroke","stroke-width"],Q=["x","y","width","height","fill","rx"],ee=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],te=["x1","x2","y1","y2","stroke","stroke-dasharray","stroke-width"],le=["cx","cy","r","fill","stroke","stroke-width"],ae=["x","y","font-size","font-weight","fill"],oe=["x","y","height","width","onMouseenter","onClick"],ne={__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}},emits:["hoverIndex","selectDatapoint"],setup(p,{emit:x}){const i=p,{vue_ui_sparkline:$}=o.useConfig(),g=e.computed(()=>!!i.dataset&&i.dataset.length),v=e.ref(o.createUid()),t=e.computed(()=>{const l=L.useNestedProp({userConfig:i.config,defaultConfig:$});return l.theme?{...L.useNestedProp({userConfig:o.themes.vue_ui_sparkline[l.theme]||i.config,defaultConfig:l})}:l}),f=e.ref(i.dataset.map(l=>t.value.style.animation.show?{...l,value:null}:{...l,value:[void 0].includes(l.value)?null:l.value}));e.onMounted(()=>{if(o.objectIsEmpty(i.dataset)?o.error({componentName:"VueUiSparkline",type:"dataset"}):i.dataset.forEach((l,r)=>{o.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["period","value"]}).forEach(a=>{o.error({componentName:"VueUiSparkline",type:"datasetSerieAttribute",property:a,index:r})})}),t.value.style.animation.show&&i.dataset.length>1){let a=function(){r<i.dataset.length?(f.value.push(i.dataset[r]),setTimeout(()=>{requestAnimationFrame(a)},l)):f.value=i.dataset,r+=1};f.value=[];const l=t.value.style.animation.animationFrames/i.dataset.length;let r=0;a()}});const c=e.ref({height:80,width:500}),V=e.ref(6),n=e.computed(()=>({top:12,left:0,right:c.value.width,bottom:c.value.height-3,start:i.showInfo&&t.value.style.dataLabel.show&&t.value.style.dataLabel.position==="left"?c.value.width-t.value.style.chartWidth:30,width:i.showInfo&&t.value.style.dataLabel.show?t.value.style.chartWidth:c.value.width-30,height:c.value.height-12})),_=e.computed(()=>Math.min(...f.value.map(l=>isNaN(l.value)||[void 0,null,"NaN",NaN,1/0,-1/0].includes(l.value)?0:l.value||0))),E=e.computed(()=>Math.max(...f.value.map(l=>isNaN(l.value)||[void 0,null,"NaN",NaN,1/0,-1/0].includes(l.value)?0:l.value||0))),m=e.computed(()=>{const l=_.value>=0?0:_.value;return Math.abs(l)}),C=e.computed(()=>E.value+m.value+V.value),b=e.computed(()=>n.value.bottom-n.value.height*w(m.value));function w(l){return l/C.value}const y=e.computed(()=>i.dataset.length-1),u=e.computed(()=>f.value.map((l,r)=>{const a=isNaN(l.value)||[void 0,null,"NaN",NaN,1/0,-1/0].includes(l.value)?0:l.value||0;return{absoluteValue:a,period:l.period,plotValue:a+m.value,toMax:w(a+m.value),x:n.value.start+r*(n.value.width/(y.value+1)>30?30:n.value.width/(y.value+1)),y:n.value.bottom-n.value.height*w(a+m.value),id:`plot_${v.value}_${r}`,color:k.value?t.value.style.bar.color:t.value.style.area.useGradient?o.shiftHue(t.value.style.line.color,.05*(1-r/y.value)):t.value.style.line.color,width:n.value.width/(y.value+1)>30?30:n.value.width/(y.value+1)}})),I=e.computed(()=>{const l={x:u.value[0].x,y:c.value.height-6},r={x:u.value[u.value.length-1].x,y:c.value.height-6},a=[];return u.value.forEach(s=>{a.push(`${s.x},${s.y} `)}),[l.x,l.y,...a,r.x,r.y].toString()}),d=e.ref(void 0);function S(l,r){d.value=l,x("hoverIndex",{index:r})}function M(){d.value=void 0,x("hoverIndex",{index:void 0})}const h=e.computed(()=>{if(g.value){const l=u.value.map(a=>a.absoluteValue),r=l.reduce((a,s)=>a+s,0);return{latest:u.value[u.value.length-1].absoluteValue,sum:r,average:r/u.value.length,median:o.calcMedian(l),trend:o.calcLinearProgression(u.value.map(({x:a,y:s,absoluteValue:B})=>({x:a,y:s,value:B}))).trend}}else return{latest:null,sum:null,average:null,median:null,trend:null}}),N=e.computed(()=>g.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),k=e.computed(()=>t.value.type&&t.value.type==="bar");function P(l,r){x("selectDatapoint",{datapoint:l,index:r})}return(l,r)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-sparkline",id:v.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&&p.showInfo?(e.openBlock(),e.createElementBlock("div",{key:0,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),g.value?(e.openBlock(),e.createElementBlock("svg",{key:1,xmlns:e.unref(o.XMLNS),viewBox:`0 0 ${c.value.width} ${c.value.height}`,style:e.normalizeStyle(`background:${t.value.style.backgroundColor};overflow:visible`)},[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{x1:"0%",y1:"0%",x2:"100%",y2:"0%",id:`sparkline_gradient_${v.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":`${e.unref(o.shiftHue)(t.value.style.area.color,.05)}${e.unref(o.opacity)[t.value.style.area.opacity]}`},null,8,W),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.area.color+e.unref(o.opacity)[t.value.style.area.opacity]},null,8,q)],8,G),e.createElementVNode("linearGradient",{x2:"0%",y2:"100%",id:`sparkline_bar_gradient_pos_${v.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.bar.color},null,8,j),e.createElementVNode("stop",{offset:"100%","stop-color":`${e.unref(o.shiftHue)(t.value.style.bar.color,.05)}`},null,8,H)],8,T),e.createElementVNode("linearGradient",{x2:"0%",y2:"100%",id:`sparkline_bar_gradient_neg_${v.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":`${e.unref(o.shiftHue)(t.value.style.bar.color,.05)}`},null,8,U),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.bar.color},null,8,X)],8,O)]),t.value.style.area.show&&!k.value&&u.value[0]?(e.openBlock(),e.createElementBlock("g",Z,[t.value.style.line.smooth?(e.openBlock(),e.createElementBlock("path",{key:0,d:`M ${u.value[0].x},${n.value.bottom} ${e.unref(o.createSmoothPath)(u.value)} L ${u.value.at(-1).x},${n.value.bottom} Z`,fill:t.value.style.area.useGradient?`url(#sparkline_gradient_${v.value})`:`${t.value.style.area.color}${e.unref(o.opacity)[t.value.style.area.opacity]}`},null,8,R)):(e.openBlock(),e.createElementBlock("path",{key:1,d:`M${I.value}Z`,fill:t.value.style.area.useGradient?`url(#sparkline_gradient_${v.value})`:`${t.value.style.area.color}${e.unref(o.opacity)[t.value.style.area.opacity]}`},null,8,Y))])):e.createCommentVNode("",!0),t.value.style.line.smooth&&!k.value?(e.openBlock(),e.createElementBlock("path",{key:1,d:`M ${e.unref(o.createSmoothPath)(u.value)}`,stroke:t.value.style.line.color,fill:"none","stroke-width":t.value.style.line.strokeWidth,"stroke-linecap":"round"},null,8,J)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,(a,s)=>(e.openBlock(),e.createElementBlock("g",null,[s<u.value.length-1&&!t.value.style.line.smooth&&!k.value?(e.openBlock(),e.createElementBlock("line",{key:0,x1:a.x,x2:u.value[s+1].x,y1:a.y,y2:u.value[s+1].y,stroke:a.color,"stroke-width":t.value.style.line.strokeWidth,"stroke-linecap":"round","stroke-linejoin":"round","shape-rendering":"geometricPrecision"},null,8,K)):e.createCommentVNode("",!0),k.value?(e.openBlock(),e.createElementBlock("rect",{key:1,x:a.x-a.width/2,y:a.absoluteValue>0?a.y:b.value,width:a.width,height:Math.abs(a.y-b.value),fill:a.absoluteValue>0?`url(#sparkline_bar_gradient_pos_${v.value})`:`url(#sparkline_bar_gradient_neg_${v.value})`,rx:t.value.style.bar.borderRadius},null,8,Q)):e.createCommentVNode("",!0),t.value.style.verticalIndicator.show&&(d.value&&a.id===d.value.id||p.selectedIndex===s)?(e.openBlock(),e.createElementBlock("line",{key:2,x1:a.x,x2:a.x,y1:n.value.top-6,y2:n.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,ee)):e.createCommentVNode("",!0)]))),256)),_.value<0?(e.openBlock(),e.createElementBlock("line",{key:2,x1:n.value.start,x2:n.value.start+n.value.width-16,y1:b.value,y2:b.value,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,te)):e.createCommentVNode("",!0),t.value.style.plot.show?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:3},e.renderList(u.value,(a,s)=>(e.openBlock(),e.createElementBlock("g",null,[d.value&&a.id===d.value.id||p.selectedIndex===s?(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,le)):e.createCommentVNode("",!0)]))),256)):e.createCommentVNode("",!0),p.showInfo&&t.value.style.dataLabel.show?(e.openBlock(),e.createElementBlock("text",{key:4,x:t.value.style.dataLabel.position==="left"?12+t.value.style.dataLabel.offsetX:n.value.width+12+t.value.style.dataLabel.offsetX,y:c.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(o.applyDataLabel)(t.value.style.dataLabel.formatter,d.value.absoluteValue,e.unref(o.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(o.applyDataLabel)(t.value.style.dataLabel.formatter,N.value,e.unref(o.dataLabel)({p:t.value.style.dataLabel.prefix,v:N.value,s:t.value.style.dataLabel.suffix,r:t.value.style.dataLabel.roundingValue}))),9,ae)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,(a,s)=>(e.openBlock(),e.createElementBlock("rect",{x:a.x-(n.value.width/(y.value+1)>30?30:n.value.width/(y.value+1))/2,y:n.value.top-6,height:n.value.height+6,width:n.value.width/(y.value+1)>30?30:n.value.width/(y.value+1),fill:"transparent",onMouseenter:B=>S(a,s),onMouseleave:M,onClick:()=>P(a,s)},null,40,oe))),256)),e.renderSlot(l.$slots,"svg",{svg:c.value},void 0,!0)],12,F)):e.createCommentVNode("",!0),g.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(z.default,{key:2,config:{type:"sparkline",style:{backgroundColor:t.value.style.backgroundColor,sparkline:{color:"#CCCCCC"}}}},null,8,["config"]))],12,A))}},ue=D._export_sfc(ne,[["__scopeId","data-v-71dd1d7d"]]);exports.default=ue;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { computed as p, ref as m, onMounted as T, openBlock as n, createElementBlock as r, normalizeStyle as g, createElementVNode as u, toDisplayString as k, createCommentVNode as h, unref as b, Fragment as D, renderList as z, normalizeClass as A, createBlock as q } from "vue";
|
|
2
|
-
import { u as H, c as j, t as X, a as J, p as d, b as K, d as P, o as Q, e as E, g as R, f as I, X as W, s as Y, v as Z, i as ee } from "./index-
|
|
3
|
-
import { u as U } from "./useNestedProp-
|
|
4
|
-
import te from "./vue-ui-skeleton-
|
|
2
|
+
import { u as H, c as j, t as X, a as J, p as d, b as K, d as P, o as Q, e as E, g as R, f as I, X as W, s as Y, v as Z, i as ee } from "./index-BzC4GFT4.js";
|
|
3
|
+
import { u as U } from "./useNestedProp-Ci4Xkt-B.js";
|
|
4
|
+
import te from "./vue-ui-skeleton-DCC5qNwg.js";
|
|
5
5
|
import { _ as le } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
6
6
|
const ae = ["xmlns", "viewBox"], oe = ["id"], se = ["stop-color"], ne = ["stop-color"], re = ["stop-color"], ue = {
|
|
7
7
|
id: "stackPill",
|
|
@@ -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-C61CWbhi.cjs"),C=require("./useNestedProp-CQPRjDbe.cjs"),E=require("./vue-ui-skeleton-DOB3BXPS.cjs"),N=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),V=["xmlns","viewBox"],z=["id"],D=["stop-color"],P=["stop-color"],L=["stop-color"],A={id:"stackPill",clipPathUnits:"objectBoundingBox"},F=["fill"],U={"clip-path":"url(#stackPill)"},j=["height","width","fill"],q=["onClick","x","width","height","fill","stroke"],I=["onClick"],T={style:{display:"flex","flex-direction":"row","align-items":"center",gap:"4px","justify-content":"center"}},H=["height","width"],O=["fill"],M={__name:"vue-ui-sparkstackbar",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectDatapoint"],setup(B,{emit:w}){const u=B,{vue_ui_sparkstackbar:$}=o.useConfig(),k=e.computed(()=>!!u.dataset&&u.dataset.length),b=e.ref(o.createUid()),t=e.computed(()=>{const l=C.useNestedProp({userConfig:u.config,defaultConfig:$});return l.theme?{...C.useNestedProp({userConfig:o.themes.vue_ui_sparkstackbar[l.theme]||u.config,defaultConfig:l}),customPalette:o.themePalettes[l.theme]||o.palette}:l}),m=e.computed(()=>o.convertCustomPalette(t.value.customPalette)),d=e.ref(u.dataset.map((l,n)=>({...l,value:t.value.style.animation.show?0:l.value||0,color:l.color?o.convertColorToHex(l.color):m.value[n]||o.palette[n]||o.palette[n%o.palette.length]}))),p=e.ref(!0);e.onMounted(()=>{if(o.objectIsEmpty(u.dataset)?o.error({componentName:"VueUiSparkStackbar",type:"dataset"}):u.dataset.forEach((l,n)=>{o.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","value"]}).forEach(a=>{o.error({componentName:"VueUiSparkStackbar",type:"datasetSerieAttribute",property:a,index:n})})}),t.value.style.animation.show){let h=function(){r+=a/l,r<a?(d.value=d.value.map((s,i)=>({...s,value:s.value+=n[i],color:s.color?o.convertColorToHex(s.color):m.value[i]||o.palette[i]||o.palette[i%o.palette.length]})),requestAnimationFrame(h)):(p.value=!1,d.value=u.dataset.map((s,i)=>({...s,value:s.value||0,color:s.color?o.convertColorToHex(s.color):m.value[i]||o.palette[i]||o.palette[i%o.palette.length],id:o.createUid()})))};const l=t.value.style.animation.animationFrames,n=u.dataset.map((s,i)=>s.value/l),a=u.dataset.map(s=>s.value||0).reduce((s,i)=>s+i,0);let r=0;p.value=!0,h()}});const v=e.ref({width:500,height:16}),c=e.ref([]),g=e.computed(()=>u.dataset.map(l=>l.value||0).filter((l,n)=>!c.value.includes(n)).reduce((l,n)=>l+n,0)),_=e.computed(()=>d.value.map((l,n)=>({...l,value:l.value||0,proportion:(l.value||0)/g.value,width:(l.value||0)/g.value*v.value.width,proportionLabel:o.dataLabel({v:(l.value||0)/g.value*100,s:"%",r:t.value.style.legend.percentage.rounding})}))),y=e.computed(()=>_.value.filter((l,n)=>!c.value.includes(n)));function S(l){c.value.includes(l)?c.value=c.value.filter(n=>n!==l):c.value.length<d.value.length-1&&c.value.push(l)}const f=e.computed(()=>{let l=0;const n=[];for(let a=0;a<y.value.length;a+=1)n.push({...y.value[a],start:l}),l+=y.value[a].width;return n});function x(l,n){w("selectDatapoint",{datapoint:l,index:n})}return(l,n)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle(`width:100%; background:${t.value.style.backgroundColor}`)},[t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`width:calc(100% - 12px);background:${t.value.style.backgroundColor};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.toDisplayString(t.value.style.title.text),5),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),k.value?(e.openBlock(),e.createElementBlock("svg",{key:1,xmlns:e.unref(o.XMLNS),width:"100%",viewBox:`0 0 ${v.value.width} ${v.value.height}`},[e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(a,r)=>(e.openBlock(),e.createElementBlock("linearGradient",{key:`stack_gradient_${r}`,gradientTransform:"rotate(90)",id:`stack_gradient_${r}_${b.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":a.color},null,8,D),e.createElementVNode("stop",{offset:"50%","stop-color":`${e.unref(o.shiftHue)(a.color,.05)}${e.unref(o.opacity)[100-t.value.style.bar.gradient.intensity]}`},null,8,P),e.createElementVNode("stop",{offset:"100%","stop-color":a.color},null,8,L)],8,z))),128)),e.createElementVNode("clipPath",A,[e.createElementVNode("rect",{x:"0.005",y:"-2",width:"0.99",height:"5",rx:"3",ry:"3",fill:t.value.style.backgroundColor},null,8,F)])]),e.createElementVNode("g",U,[e.createElementVNode("rect",{x:0,y:0,height:v.value.height,width:f.value.map(a=>a.width).reduce((a,r)=>a+r,0),fill:t.value.style.bar.gradient.underlayerColor,class:e.normalizeClass({animated:!p.value})},null,10,j),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(a,r)=>(e.openBlock(),e.createElementBlock("rect",{key:`stack_${r}`,onClick:()=>x(a,r),x:a.start,y:0,width:a.width,height:v.value.height,fill:t.value.style.bar.gradient.show?`url(#stack_gradient_${r}_${b.value})`:a.color,stroke:t.value.style.backgroundColor,"stroke-linecap":"round",class:e.normalizeClass({animated:!p.value})},null,10,q))),128))])],8,V)):e.createCommentVNode("",!0),k.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(E.default,{key:2,config:{type:"sparkStackbar",style:{backgroundColor:t.value.style.backgroundColor,sparkStackbar:{color:"#CCCCCC"}}}},null,8,["config"])),t.value.style.legend.show?(e.openBlock(),e.createElementBlock("div",{key:3,style:e.normalizeStyle(`background:${t.value.style.backgroundColor};margin:0 auto;margin:${t.value.style.legend.margin};justify-content:${t.value.style.legend.textAlign==="left"?"flex-start":t.value.style.legend.textAlign==="right"?"flex-end":"center"}`),class:"vue-ui-sparkstackbar-legend"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.value,(a,r)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle(`font-size:${t.value.style.legend.fontSize}px;`),class:e.normalizeClass({"vue-ui-sparkstackbar-legend-item":!0,"vue-ui-sparkstackbar-legend-item-unselected":c.value.includes(r)}),onClick:h=>{S(r),x(a,r)}},[e.createElementVNode("div",T,[(e.openBlock(),e.createElementBlock("svg",{height:`${t.value.style.legend.fontSize}px`,width:`${t.value.style.legend.fontSize}px`,viewBox:"0 0 10 10"},[e.createElementVNode("circle",{cx:5,cy:5,r:5,fill:a.color},null,8,O)],8,H)),e.createElementVNode("span",{style:e.normalizeStyle(`color:${t.value.style.legend.name.color}; font-weight:${t.value.style.legend.name.bold?"bold":"normal"}`)},e.toDisplayString(a.name),5),t.value.style.legend.percentage.show?(e.openBlock(),e.createElementBlock("span",{key:0,style:e.normalizeStyle(`font-weight:${t.value.style.legend.percentage.bold?"bold":"normal"};color:${t.value.style.legend.percentage.color}`)},e.toDisplayString(c.value.includes(r)?" - ":a.proportionLabel),5)):e.createCommentVNode("",!0),t.value.style.legend.value.show?(e.openBlock(),e.createElementBlock("span",{key:1,style:e.normalizeStyle(`font-weight:${t.value.style.legend.value.bold?"bold":"normal"};color:${t.value.style.legend.value.color}`)}," ("+e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.legend.value.formatter,a.value,e.unref(o.dataLabel)({p:t.value.style.legend.value.prefix,v:a.value,s:t.value.style.legend.value.suffix,r:t.value.style.legend.value.rounding}),{datapoint:a,seriesIndex:r}))+") ",5)):e.createCommentVNode("",!0)])],14,I))),256))],4)):e.createCommentVNode("",!0)],4))}},G=N._export_sfc(M,[["__scopeId","data-v-86f11bbc"]]);exports.default=G;
|