vue-data-ui 3.26.5 → 3.27.1-beta.0
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/A11yDataTable-DWNlWXzs.js +1 -0
- package/dist/Arrow-CJeSufxg.js +1 -0
- package/dist/BaseDraggableDialog-T1gEsQid.js +1 -0
- package/dist/BaseIcon-Cz30ODFA.js +1 -0
- package/dist/BaseLegendToggle-Dn_tNvn4.js +1 -0
- package/dist/BaseScanner-8NdoBs7B.js +1 -0
- package/dist/BaseZoomControls-xq3tWD3j.js +1 -0
- package/dist/ColorPicker-CUjEw53A.js +1 -0
- package/dist/DataTable-DSUA5M9p.js +1 -0
- package/dist/DefGrad-DKMq1REY.js +1 -0
- package/dist/HillActions-DdvXld3a.js +1 -0
- package/dist/Legend-DokTll4u.js +1 -0
- package/dist/NonSvgPenAndPaper-BLzQuIm6.js +1 -0
- package/dist/PackageVersion-D6pKL176.js +1 -0
- package/dist/PenAndPaper-DvJJaeU2.js +1 -0
- package/dist/RecursiveCircles-BftI1kwF.js +1 -0
- package/dist/RecursiveLabels-B0d04xSj.js +1 -0
- package/dist/RecursiveLinks-CZtG6uWg.js +1 -0
- package/dist/Shape-tkp65OcG.js +1 -0
- package/dist/SlicerPreview-GFRs2EWB.js +1 -0
- package/dist/SparkTooltip-BlJLvizH.js +1 -0
- package/dist/Title-BRAjxtjG.js +1 -0
- package/dist/Tooltip-BUXB0i6z.js +1 -0
- package/dist/UserOptions-D65t74CM.js +1 -0
- package/dist/_plugin-vue_export-helper-BDNMzG2s.js +1 -0
- package/dist/annotationSlots-BRR85CqJ.js +1 -0
- package/dist/chartImage-NwZO-elv.js +1 -0
- package/dist/components/arrow.js +1 -2
- package/dist/components/vue-ui-3d-bar.js +1 -2
- package/dist/components/vue-ui-accordion.js +1 -2
- package/dist/components/vue-ui-age-pyramid.js +1 -2
- package/dist/components/vue-ui-annotator.js +1 -2
- package/dist/components/vue-ui-bullet.js +1 -2
- package/dist/components/vue-ui-bump.js +1 -2
- package/dist/components/vue-ui-candlestick.js +1 -2
- package/dist/components/vue-ui-carousel-table.js +1 -2
- package/dist/components/vue-ui-chestnut.js +1 -2
- package/dist/components/vue-ui-chord.js +1 -2
- package/dist/components/vue-ui-circle-pack.js +1 -2
- package/dist/components/vue-ui-cursor.js +1 -2
- package/dist/components/vue-ui-dag.js +1 -2
- package/dist/components/vue-ui-dashboard.js +1 -2
- package/dist/components/vue-ui-digits.js +1 -2
- package/dist/components/vue-ui-donut-evolution.js +1 -2
- package/dist/components/vue-ui-donut.js +1 -2
- package/dist/components/vue-ui-dumbbell.js +1 -2
- package/dist/components/vue-ui-flow.js +1 -2
- package/dist/components/vue-ui-funnel.js +1 -2
- package/dist/components/vue-ui-galaxy.js +1 -2
- package/dist/components/vue-ui-gauge.js +1 -2
- package/dist/components/vue-ui-geo.js +1 -2
- package/dist/components/vue-ui-gizmo.js +1 -2
- package/dist/components/vue-ui-heatmap.js +1 -2
- package/dist/components/vue-ui-hill.js +1 -2
- package/dist/components/vue-ui-history-plot.js +1 -2
- package/dist/components/vue-ui-horizontal-bar.js +1 -2
- package/dist/components/vue-ui-icon.js +1 -2
- package/dist/components/vue-ui-kpi.js +1 -2
- package/dist/components/vue-ui-label.js +1 -2
- package/dist/components/vue-ui-mini-loader.js +1 -2
- package/dist/components/vue-ui-molecule.js +1 -2
- package/dist/components/vue-ui-mood-radar.js +1 -2
- package/dist/components/vue-ui-nested-donuts.js +1 -2
- package/dist/components/vue-ui-onion.js +1 -2
- package/dist/components/vue-ui-parallel-coordinate-plot.js +1 -2
- package/dist/components/vue-ui-pattern-seed.js +1 -2
- package/dist/components/vue-ui-pattern.js +1 -2
- package/dist/components/vue-ui-quadrant.js +1 -2
- package/dist/components/vue-ui-quick-chart.js +1 -2
- package/dist/components/vue-ui-radar.js +1 -2
- package/dist/components/vue-ui-rating.js +1 -2
- package/dist/components/vue-ui-relation-circle.js +1 -2
- package/dist/components/vue-ui-ridgeline.js +1 -2
- package/dist/components/vue-ui-rings.js +1 -2
- package/dist/components/vue-ui-scatter.js +1 -2
- package/dist/components/vue-ui-skeleton.js +1 -2
- package/dist/components/vue-ui-smiley.js +1 -2
- package/dist/components/vue-ui-spark-trend.js +1 -2
- package/dist/components/vue-ui-sparkbar.js +1 -2
- package/dist/components/vue-ui-sparkgauge.js +1 -2
- package/dist/components/vue-ui-sparkhistogram.js +1 -2
- package/dist/components/vue-ui-sparkline.js +1 -2
- package/dist/components/vue-ui-sparkstackbar.js +1 -2
- package/dist/components/vue-ui-stackbar.js +1 -2
- package/dist/components/vue-ui-stackline.js +1 -2
- package/dist/components/vue-ui-strip-plot.js +1 -2
- package/dist/components/vue-ui-table-heatmap.js +1 -2
- package/dist/components/vue-ui-table-sparkline.js +1 -2
- package/dist/components/vue-ui-table.js +1 -2
- package/dist/components/vue-ui-thermometer.js +1 -2
- package/dist/components/vue-ui-timer.js +1 -2
- package/dist/components/vue-ui-tiremarks.js +1 -2
- package/dist/components/vue-ui-treemap.js +1 -2
- package/dist/components/vue-ui-vertical-bar.js +1 -2
- package/dist/components/vue-ui-waffle.js +1 -2
- package/dist/components/vue-ui-wheel.js +1 -2
- package/dist/components/vue-ui-word-cloud.js +1 -2
- package/dist/components/vue-ui-world.js +1 -2
- package/dist/components/vue-ui-xy-canvas.js +1 -2
- package/dist/components/vue-ui-xy.js +1 -2
- package/dist/composables.js +1 -5
- package/dist/dom-to-png-Cp3WLHmJ.js +3 -0
- package/dist/exposedLib-CMTeSmyW.js +1 -0
- package/dist/geoProjections-Bvj-eMvq.js +1 -0
- package/dist/img-8sM3sVWU.js +1 -0
- package/dist/labelUtils-Djp5nJtN.js +1 -0
- package/dist/lib-zDxoqrgo.js +12 -0
- package/dist/package-DIR2F6AE.js +1 -0
- package/dist/patternUtils-_q3ArM3g.js +1 -0
- package/dist/pdf-Dlv_ks7R.js +1 -0
- package/dist/render-common-DOYi0f4Z.js +1 -0
- package/dist/resolveChartConfig-BSo1Oe9n.js +1 -0
- package/dist/rolldown-runtime-DK3Fl9T5.js +1 -0
- package/dist/ssr/vue-ui-donut.js +1 -2
- package/dist/ssr/vue-ui-xy.js +1 -2
- package/dist/ssr.js +1 -3
- package/dist/style.css +1 -1
- package/dist/tableIntegration-CNoJ1CIY.js +1 -0
- package/dist/types/composables.d.ts +12 -12
- package/dist/types/ssr.d.ts +84 -84
- package/dist/types/utils.d.ts +82 -73
- package/dist/types/vue-data-ui.d.ts +17969 -17813
- package/dist/types/vue-ui-3d-bar.d.ts +24 -91
- package/dist/types/vue-ui-accordion.d.ts +2 -10
- package/dist/types/vue-ui-age-pyramid.d.ts +27 -106
- package/dist/types/vue-ui-annotator.d.ts +12 -88
- package/dist/types/vue-ui-bullet.d.ts +21 -83
- package/dist/types/vue-ui-bump.d.ts +23 -90
- package/dist/types/vue-ui-candlestick.d.ts +27 -108
- package/dist/types/vue-ui-carousel-table.d.ts +11 -57
- package/dist/types/vue-ui-chestnut.d.ts +27 -96
- package/dist/types/vue-ui-chord.d.ts +31 -108
- package/dist/types/vue-ui-circle-pack.d.ts +30 -124
- package/dist/types/vue-ui-cursor.d.ts +2 -8
- package/dist/types/vue-ui-dag.d.ts +35 -125
- package/dist/types/vue-ui-dashboard.d.ts +18 -66
- package/dist/types/vue-ui-digits.d.ts +2 -11
- package/dist/types/vue-ui-donut-evolution.d.ts +31 -100
- package/dist/types/vue-ui-donut.d.ts +31 -121
- package/dist/types/vue-ui-dumbbell.d.ts +24 -92
- package/dist/types/vue-ui-flow.d.ts +28 -104
- package/dist/types/vue-ui-funnel.d.ts +18 -77
- package/dist/types/vue-ui-galaxy.d.ts +30 -112
- package/dist/types/vue-ui-gauge.d.ts +22 -87
- package/dist/types/vue-ui-geo.d.ts +22 -92
- package/dist/types/vue-ui-gizmo.d.ts +5 -20
- package/dist/types/vue-ui-heatmap.d.ts +25 -101
- package/dist/types/vue-ui-hill.d.ts +22 -88
- package/dist/types/vue-ui-history-plot.d.ts +30 -112
- package/dist/types/vue-ui-horizontal-bar.d.ts +30 -114
- package/dist/types/vue-ui-icon.d.ts +1 -13
- package/dist/types/vue-ui-kpi.d.ts +5 -23
- package/dist/types/vue-ui-label.d.ts +11 -48
- package/dist/types/vue-ui-mini-loader.d.ts +4 -13
- package/dist/types/vue-ui-molecule.d.ts +27 -110
- package/dist/types/vue-ui-mood-radar.d.ts +23 -90
- package/dist/types/vue-ui-nested-donuts.d.ts +28 -109
- package/dist/types/vue-ui-onion.d.ts +26 -104
- package/dist/types/vue-ui-parallel-coordinate-plot.d.ts +34 -123
- package/dist/types/vue-ui-pattern-seed.d.ts +1 -14
- package/dist/types/vue-ui-pattern.d.ts +1 -13
- package/dist/types/vue-ui-quadrant.d.ts +33 -123
- package/dist/types/vue-ui-quick-chart.d.ts +30 -110
- package/dist/types/vue-ui-radar.d.ts +31 -114
- package/dist/types/vue-ui-rating.d.ts +8 -40
- package/dist/types/vue-ui-relation-circle.d.ts +26 -90
- package/dist/types/vue-ui-ridgeline.d.ts +27 -104
- package/dist/types/vue-ui-rings.d.ts +21 -96
- package/dist/types/vue-ui-scatter.d.ts +22 -95
- package/dist/types/vue-ui-skeleton.d.ts +2 -10
- package/dist/types/vue-ui-smiley.d.ts +6 -26
- package/dist/types/vue-ui-spark-trend.d.ts +2 -18
- package/dist/types/vue-ui-sparkbar.d.ts +10 -47
- package/dist/types/vue-ui-sparkgauge.d.ts +5 -26
- package/dist/types/vue-ui-sparkhistogram.d.ts +12 -44
- package/dist/types/vue-ui-sparkline.d.ts +16 -61
- package/dist/types/vue-ui-sparkstackbar.d.ts +13 -58
- package/dist/types/vue-ui-stackbar.d.ts +36 -120
- package/dist/types/vue-ui-stackline.d.ts +29 -116
- package/dist/types/vue-ui-strip-plot.d.ts +22 -96
- package/dist/types/vue-ui-table-heatmap.d.ts +14 -60
- package/dist/types/vue-ui-table-sparkline.d.ts +12 -51
- package/dist/types/vue-ui-table.d.ts +9 -36
- package/dist/types/vue-ui-thermometer.d.ts +14 -68
- package/dist/types/vue-ui-timer.d.ts +10 -47
- package/dist/types/vue-ui-tiremarks.d.ts +14 -68
- package/dist/types/vue-ui-treemap.d.ts +26 -105
- package/dist/types/vue-ui-vertical-bar.d.ts +8 -19
- package/dist/types/vue-ui-waffle.d.ts +23 -99
- package/dist/types/vue-ui-wheel.d.ts +14 -68
- package/dist/types/vue-ui-word-cloud.d.ts +20 -95
- package/dist/types/vue-ui-world.d.ts +22 -96
- package/dist/types/vue-ui-xy-canvas.d.ts +24 -101
- package/dist/types/vue-ui-xy.d.ts +42 -146
- package/dist/unpackTheme-CNsFKCeq.js +1 -0
- package/dist/useAutoSizeLabelsInsideViewbox-AIRF0PlD.js +1 -0
- package/dist/useChartAccessibility-DOMuYJfm.js +1 -0
- package/dist/useChartExport-DtPNpc9M.js +1 -0
- package/dist/useConfig-CKdzPrcf.js +1 -0
- package/dist/useFitSvgText-C1QC4P5G.js +1 -0
- package/dist/useHints-BH9r_0Vd.js +6 -0
- package/dist/useNestedProp-CT9phgWx.js +1 -0
- package/dist/useObjectBindings-DM3xDKV3.js +1 -0
- package/dist/usePanZoom-BdjP5Suc.js +1 -0
- package/dist/usePrefersMotion-XLHwega2.js +1 -0
- package/dist/usePrinter-CnyKPIFM.js +1 -0
- package/dist/useResponsive-D2CPcpda.js +1 -0
- package/dist/useStableElementSize-CegFbRlF.js +1 -0
- package/dist/useTableResponsive-uSz_qZOB.js +1 -0
- package/dist/useThemeCheck-BKNRbGeC.js +1 -0
- package/dist/useTimeLabelCollider-XQf_S7-z.js +1 -0
- package/dist/useTimeLabels-Das5O74F.js +1 -0
- package/dist/useTooltipPosition-aoV8pZZ9.js +1 -0
- package/dist/useTransitions-DfSHzsdz.js +1 -0
- package/dist/useUserOptionState-CXlFnwPv.js +1 -0
- package/dist/userOptionsSlots-DYuo-E5m.js +1 -0
- package/dist/utils.js +1 -30
- package/dist/vClickOutside-BxNzkY17.js +1 -0
- package/dist/vue-data-ui-BG41UScx.js +1 -0
- package/dist/vue-data-ui.js +1 -79
- package/dist/vue-ui-3d-bar-DiaiNy-k.js +19 -0
- package/dist/vue-ui-accordion-Dy5OVFKr.js +1 -0
- package/dist/vue-ui-age-pyramid-OeUr1yxi.js +1 -0
- package/dist/vue-ui-annotator-DA_xAFql.js +331 -0
- package/dist/vue-ui-bullet-B9lcCTVb.js +34 -0
- package/dist/vue-ui-bump-DYajIrva.js +10 -0
- package/dist/vue-ui-candlestick-CdAZuNxo.js +22 -0
- package/dist/vue-ui-carousel-table-ihGH0LDH.js +1 -0
- package/dist/vue-ui-chestnut-B2aNXFNO.js +1 -0
- package/dist/vue-ui-chord-fAckHfOW.js +21 -0
- package/dist/vue-ui-circle-pack-BWHVImkS.js +13 -0
- package/dist/vue-ui-cursor-DdXKXmhr.js +1 -0
- package/dist/vue-ui-dag-a0fNoIcJ.js +9 -0
- package/dist/vue-ui-dashboard-DkdYMB7n.js +1 -0
- package/dist/vue-ui-digits-CL9SuIEI.js +42 -0
- package/dist/vue-ui-donut-BaEodt-3.js +22 -0
- package/dist/vue-ui-donut-DaYxdQmP.js +47 -0
- package/dist/vue-ui-donut-evolution-T8cRXKRQ.js +2 -0
- package/dist/vue-ui-dumbbell-B6HJxEZp.js +9 -0
- package/dist/vue-ui-flow-BlTCVFr3.js +3 -0
- package/dist/vue-ui-funnel-WgLFJadZ.js +1 -0
- package/dist/vue-ui-galaxy-B3nuI6E8.js +1 -0
- package/dist/vue-ui-gauge-BwTP65O4.js +1 -0
- package/dist/vue-ui-geo-CX3yH18H.js +1 -0
- package/dist/vue-ui-gizmo-CNHcBsku.js +1 -0
- package/dist/vue-ui-heatmap-CTdeoar7.js +1 -0
- package/dist/vue-ui-hill-DR5k8GWZ.js +1 -0
- package/dist/vue-ui-history-plot-C-9uH-Uj.js +2 -0
- package/dist/vue-ui-horizontal-bar-qqF7pL7U.js +4 -0
- package/dist/vue-ui-kpi-DVcLXGqG.js +1 -0
- package/dist/vue-ui-label-D1Aog-zO.js +7 -0
- package/dist/vue-ui-mini-loader-CX0Dx9tT.js +1 -0
- package/dist/vue-ui-molecule-B13qVX71.js +1 -0
- package/dist/vue-ui-mood-radar-C1BtB8lg.js +1 -0
- package/dist/vue-ui-nested-donuts-B90yrlJG.js +19 -0
- package/dist/vue-ui-onion-UMVO2DE_.js +5 -0
- package/dist/vue-ui-parallel-coordinate-plot-C0ofFivm.js +9 -0
- package/dist/vue-ui-pattern-DrPCu32G.js +1 -0
- package/dist/vue-ui-pattern-seed-B8YjAAEH.js +1 -0
- package/dist/vue-ui-quadrant-CPG6yAiu.js +2 -0
- package/dist/vue-ui-quick-chart-BTPb-Iz8.js +17 -0
- package/dist/vue-ui-radar-Hd-pE9ih.js +1 -0
- package/dist/vue-ui-rating-C_YxQYa_.js +1 -0
- package/dist/vue-ui-relation-circle-CHYG7ZJl.js +1 -0
- package/dist/vue-ui-ridgeline-DS1Gvljt.js +2 -0
- package/dist/vue-ui-rings-B-Hb13Uu.js +1 -0
- package/dist/vue-ui-scatter-BTgvOmuo.js +9 -0
- package/dist/vue-ui-skeleton-B-Acw3CC.js +41 -0
- package/dist/vue-ui-smiley-Ciwqt6ek.js +1 -0
- package/dist/vue-ui-spark-trend-CYqy6c0S.js +1 -0
- package/dist/vue-ui-sparkbar-CTXIgjmP.js +1 -0
- package/dist/vue-ui-sparkgauge-CObOL6s2.js +1 -0
- package/dist/vue-ui-sparkhistogram-ClFyDez-.js +1 -0
- package/dist/vue-ui-sparkline-DP_nYlW8.js +1 -0
- package/dist/vue-ui-sparkstackbar-B2f0ePMg.js +1 -0
- package/dist/vue-ui-stackbar-nMWHZ-f0.js +29 -0
- package/dist/vue-ui-stackline-B95y6Zc5.js +39 -0
- package/dist/vue-ui-strip-plot-gFNC4r-X.js +2 -0
- package/dist/vue-ui-table-Br2JgD_L.js +14 -0
- package/dist/vue-ui-table-heatmap-Btu2ejF4.js +1 -0
- package/dist/vue-ui-table-sparkline-B9mYHAxp.js +1 -0
- package/dist/vue-ui-thermometer-C6u1eLfo.js +1 -0
- package/dist/vue-ui-timer-DLgsfB1U.js +64 -0
- package/dist/vue-ui-tiremarks-8B9uE1Bx.js +1 -0
- package/dist/vue-ui-treemap-C4Mot-Os.js +1 -0
- package/dist/vue-ui-waffle-BwcwNpf7.js +1 -0
- package/dist/vue-ui-wheel-B3OGCXg7.js +1 -0
- package/dist/vue-ui-word-cloud-BPIyMBXq.js +4 -0
- package/dist/vue-ui-world-Cp0DeauH.js +19 -0
- package/dist/vue-ui-xy-BOE1jvUS.js +31 -0
- package/dist/vue-ui-xy-DSyKSn4L.js +24 -0
- package/dist/vue-ui-xy-canvas-CaxxiKSa.js +9 -0
- package/dist/vue_ui_3d_bar-DmAve5Ri.js +1 -0
- package/dist/vue_ui_age_pyramid-CL0Ef8Ov.js +1 -0
- package/dist/vue_ui_bullet-CwVYkpjd.js +1 -0
- package/dist/vue_ui_bump-KJL9GYr4.js +1 -0
- package/dist/vue_ui_candlestick-DKvha_Ab.js +1 -0
- package/dist/vue_ui_chestnut-BxxivKN7.js +1 -0
- package/dist/vue_ui_chord-Fq6VBRT1.js +1 -0
- package/dist/vue_ui_circle_pack-CfXkXi7v.js +1 -0
- package/dist/vue_ui_dag-1b_dLSym.js +1 -0
- package/dist/vue_ui_donut-T5PeOqvf.js +1 -0
- package/dist/vue_ui_donut_evolution-nzVwNQYv.js +1 -0
- package/dist/vue_ui_dumbbell-BMcxK0N3.js +1 -0
- package/dist/vue_ui_flow-kvV56Es9.js +1 -0
- package/dist/vue_ui_funnel-CaEV5hG7.js +1 -0
- package/dist/vue_ui_galaxy-B94QInxc.js +1 -0
- package/dist/vue_ui_gauge-BJhb6yqE.js +1 -0
- package/dist/vue_ui_geo-DL1SMQHp.js +1 -0
- package/dist/vue_ui_heatmap-kh5NMmwf.js +1 -0
- package/dist/vue_ui_hill-DQi4pQCG.js +1 -0
- package/dist/vue_ui_history_plot-soyqUW4Y.js +1 -0
- package/dist/vue_ui_horizontal_bar-C4ulIxeT.js +1 -0
- package/dist/vue_ui_label-dtPqyFsj.js +1 -0
- package/dist/vue_ui_molecule-Bw1UW1Na.js +1 -0
- package/dist/vue_ui_mood_radar-CXaBdJnv.js +1 -0
- package/dist/vue_ui_nested_donuts-CRtGsJcz.js +1 -0
- package/dist/vue_ui_onion-C9BedU_-.js +1 -0
- package/dist/vue_ui_parallel_coordinate_plot-Cs_xXAG5.js +1 -0
- package/dist/vue_ui_quadrant-BUv-SqzP.js +1 -0
- package/dist/vue_ui_quick_chart-Da1GwklM.js +1 -0
- package/dist/vue_ui_radar-68iK9Fam.js +1 -0
- package/dist/vue_ui_relation_circle-Dkv-cSB6.js +1 -0
- package/dist/vue_ui_ridgeline-Di26JtQu.js +1 -0
- package/dist/vue_ui_rings-BcDDXHpQ.js +1 -0
- package/dist/vue_ui_scatter-C50uFYQL.js +1 -0
- package/dist/vue_ui_spark_trend-BOM3zo64.js +1 -0
- package/dist/vue_ui_sparkbar-Bpx7QrFq.js +1 -0
- package/dist/vue_ui_sparkgauge-D2Hk6bvS.js +1 -0
- package/dist/vue_ui_sparkhistogram-ChwOkoMb.js +1 -0
- package/dist/vue_ui_sparkline-CvL_e9L8.js +1 -0
- package/dist/vue_ui_sparkstackbar-Chtog7hC.js +1 -0
- package/dist/vue_ui_stackbar-BkBIi_bL.js +1 -0
- package/dist/vue_ui_stackline-D7b63K84.js +1 -0
- package/dist/vue_ui_strip_plot-CwMowrhT.js +1 -0
- package/dist/vue_ui_table_heatmap-vfeY6r97.js +1 -0
- package/dist/vue_ui_table_sparkline-Dlfbza49.js +1 -0
- package/dist/vue_ui_thermometer-CRijq6H6.js +1 -0
- package/dist/vue_ui_tiremarks-8HFfABNF.js +1 -0
- package/dist/vue_ui_treemap-Bv4Rdl5_.js +1 -0
- package/dist/vue_ui_vertical_bar-BLyflvlz.js +1 -0
- package/dist/vue_ui_waffle-BbBLSluB.js +1 -0
- package/dist/vue_ui_wheel-C-479bvJ.js +1 -0
- package/dist/vue_ui_word_cloud-DBiJtSyL.js +1 -0
- package/dist/vue_ui_xy-CJBM9F6W.js +1 -0
- package/dist/vue_ui_xy_canvas-CT-FN9rU.js +1 -0
- package/package.json +2 -2
- package/dist/A11yDataTable-DdRsVULz.js +0 -45
- package/dist/Arrow-BQbcOtfC.js +0 -116
- package/dist/BaseDraggableDialog-BCFCiP_6.js +0 -272
- package/dist/BaseIcon-CIK6Sqo3.js +0 -484
- package/dist/BaseLegendToggle-Doa5rYP2.js +0 -56
- package/dist/BaseScanner-Dzc8VT3j.js +0 -30
- package/dist/BaseZoomControls-BGQM8B5F.js +0 -111
- package/dist/ColorPicker-Cb7qpvFt.js +0 -257
- package/dist/DataTable-B6LDCXBz.js +0 -150
- package/dist/DefGrad-DVBqDjhO.js +0 -48
- package/dist/HillActions-CwdgCb7Q.js +0 -187
- package/dist/Legend-D9FGXIbQ.js +0 -156
- package/dist/NonSvgPenAndPaper-9T4MSwXC.js +0 -577
- package/dist/PackageVersion-CslTvFsC.js +0 -12
- package/dist/PenAndPaper-C1EcBgJW.js +0 -906
- package/dist/RecursiveCircles-D6aDPmoe.js +0 -117
- package/dist/RecursiveLabels-D9rfID6q.js +0 -56
- package/dist/RecursiveLinks-BygcpDiT.js +0 -78
- package/dist/Shape-BZgQLgu5.js +0 -143
- package/dist/SlicerPreview-DyYv_G-_.js +0 -1730
- package/dist/SparkTooltip-D4cRlyuq.js +0 -93
- package/dist/Title-Bd98RysU.js +0 -87
- package/dist/Tooltip-DmQeI5WE.js +0 -312
- package/dist/UserOptions-B_yBcZ1-.js +0 -1412
- package/dist/_plugin-vue_export-helper-B3ysoDQm.js +0 -8
- package/dist/dom-to-png-B_RJohlM.js +0 -237
- package/dist/exposedLib-C-JlvWAt.js +0 -28
- package/dist/geoProjections-BYthUA8l.js +0 -302
- package/dist/img-KURaWjZI.js +0 -129
- package/dist/labelUtils-DShv2Mbg.js +0 -19
- package/dist/lib-TWIH5fGr.js +0 -2152
- package/dist/package-DbTqd5lc.js +0 -4
- package/dist/patternUtils-CS7hn6at.js +0 -258
- package/dist/pdf-CLl24Afl.js +0 -90
- package/dist/render-common-CKv-jztN.js +0 -152
- package/dist/rolldown-runtime-Dy4uBu1J.js +0 -11
- package/dist/useAutoSizeLabelsInsideViewbox-DvDwcwi_.js +0 -122
- package/dist/useChartAccessibility-DYqac8yF.js +0 -12
- package/dist/useChartExport-iwOqiIWX.js +0 -803
- package/dist/useConfig-DObkR9Aa.js +0 -8008
- package/dist/useFitSvgText-CXTzBplU.js +0 -65
- package/dist/useHints-Dq_w2E8B.js +0 -66
- package/dist/useNestedProp-BxOdWM0c.js +0 -12
- package/dist/useObjectBindings-CPmyIJxB.js +0 -191
- package/dist/usePanZoom-CYU3B4T3.js +0 -157
- package/dist/usePrefersMotion-BC-CsqR1.js +0 -15
- package/dist/usePrinter-8Y1Rju0Y.js +0 -49
- package/dist/useResponsive-ZtArZtUf.js +0 -97
- package/dist/useStableElementSize-C7KADDKj.js +0 -77
- package/dist/useTableResponsive-BAqJPR68.js +0 -25
- package/dist/useThemeCheck-C43Tcqmk.js +0 -24
- package/dist/useTimeLabelCollider-AEcY4Ioe.js +0 -57
- package/dist/useTimeLabels-d2f-W1L4.js +0 -270
- package/dist/useTooltipPosition-BCrtQa9H.js +0 -189
- package/dist/useTransitions-g_zBREk2.js +0 -39
- package/dist/useUserOptionState-DK-_1ddE.js +0 -15
- package/dist/vClickOutside-DUrZWttG.js +0 -13
- package/dist/vue-data-ui-C3G5Zdl5.js +0 -191
- package/dist/vue-ui-3d-bar-Cl6-fBV8.js +0 -1831
- package/dist/vue-ui-accordion-AyyZDab3.js +0 -81
- package/dist/vue-ui-age-pyramid-DOtWAL8s.js +0 -1305
- package/dist/vue-ui-annotator-BCVjlojM.js +0 -3325
- package/dist/vue-ui-bullet-B_1Ctjvq.js +0 -702
- package/dist/vue-ui-bump-kOK6x4al.js +0 -1242
- package/dist/vue-ui-candlestick-KvhjbAxt.js +0 -2144
- package/dist/vue-ui-carousel-table-ArMiO0cG.js +0 -467
- package/dist/vue-ui-chestnut-DSM0U27X.js +0 -2016
- package/dist/vue-ui-chord-64akfaem.js +0 -1347
- package/dist/vue-ui-circle-pack-CaR_aNEh.js +0 -1647
- package/dist/vue-ui-cursor-DCgqYZiz.js +0 -283
- package/dist/vue-ui-dag-8uKK0Rlp.js +0 -2931
- package/dist/vue-ui-dashboard-DeccYtSY.js +0 -522
- package/dist/vue-ui-digits-BvK7bVuJ.js +0 -217
- package/dist/vue-ui-donut-8joMj08Z.js +0 -974
- package/dist/vue-ui-donut-CvbfzzdT.js +0 -2427
- package/dist/vue-ui-donut-evolution-DgITf95R.js +0 -1869
- package/dist/vue-ui-dumbbell-U2L4ZYhB.js +0 -1533
- package/dist/vue-ui-flow-DD20fJu_.js +0 -1229
- package/dist/vue-ui-funnel-Cx8hVlZV.js +0 -749
- package/dist/vue-ui-galaxy-VZFZnHPv.js +0 -1097
- package/dist/vue-ui-gauge-Copa7G58.js +0 -934
- package/dist/vue-ui-geo-DeDQ6ubl.js +0 -1495
- package/dist/vue-ui-gizmo-D5oUKIsP.js +0 -238
- package/dist/vue-ui-heatmap-BukWtNsd.js +0 -1613
- package/dist/vue-ui-hill-DONFacXR.js +0 -1747
- package/dist/vue-ui-history-plot-BMy_y9S6.js +0 -1710
- package/dist/vue-ui-horizontal-bar-bcPSs999.js +0 -1723
- package/dist/vue-ui-kpi-Bol0OWs3.js +0 -104
- package/dist/vue-ui-label-cwjXaEDQ.js +0 -1451
- package/dist/vue-ui-mini-loader-kdpasmXb.js +0 -133
- package/dist/vue-ui-molecule-BiAI5lbh.js +0 -941
- package/dist/vue-ui-mood-radar-f4xXkiBs.js +0 -1111
- package/dist/vue-ui-nested-donuts-ZmGGEvRk.js +0 -1515
- package/dist/vue-ui-onion-D6IKPpL-.js +0 -1247
- package/dist/vue-ui-parallel-coordinate-plot-BbfModz3.js +0 -1444
- package/dist/vue-ui-pattern-DKozfnVn.js +0 -154
- package/dist/vue-ui-pattern-seed-BB1honLm.js +0 -61
- package/dist/vue-ui-quadrant-CueHa1Pm.js +0 -1979
- package/dist/vue-ui-quick-chart-C8ZxX1Zw.js +0 -2775
- package/dist/vue-ui-radar-BcD7Zqvb.js +0 -1386
- package/dist/vue-ui-rating-V_OnJN9Y.js +0 -359
- package/dist/vue-ui-relation-circle-DlN4r83K.js +0 -905
- package/dist/vue-ui-ridgeline-BlQnTWXi.js +0 -1630
- package/dist/vue-ui-rings-Bf9IKwDr.js +0 -1264
- package/dist/vue-ui-scatter-arPbS9MH.js +0 -2418
- package/dist/vue-ui-skeleton-dyXWT6JX.js +0 -2567
- package/dist/vue-ui-smiley-w6nH1I0E.js +0 -376
- package/dist/vue-ui-spark-trend-Bso9bwmY.js +0 -457
- package/dist/vue-ui-sparkbar-CL06Yt56.js +0 -401
- package/dist/vue-ui-sparkgauge-BHDM5Hbr.js +0 -268
- package/dist/vue-ui-sparkhistogram-3Tw8PEms.js +0 -589
- package/dist/vue-ui-sparkline-znaswFQj.js +0 -2067
- package/dist/vue-ui-sparkstackbar-BOzVoWoa.js +0 -750
- package/dist/vue-ui-stackbar-BTOvMsP8.js +0 -2755
- package/dist/vue-ui-stackline-qcLrNL09.js +0 -2829
- package/dist/vue-ui-strip-plot-BLNaCPm8.js +0 -1752
- package/dist/vue-ui-table-D295mJIf.js +0 -1352
- package/dist/vue-ui-table-heatmap-CXeMKqKz.js +0 -363
- package/dist/vue-ui-table-sparkline-BYuwQrwA.js +0 -738
- package/dist/vue-ui-thermometer-BwJ0oF-H.js +0 -758
- package/dist/vue-ui-timer-BULpjYiI.js +0 -451
- package/dist/vue-ui-tiremarks-B7bTeU8h.js +0 -540
- package/dist/vue-ui-treemap-DkqDz9W4.js +0 -1745
- package/dist/vue-ui-waffle-Cn7WBzqh.js +0 -1633
- package/dist/vue-ui-wheel-Cy7kBvEx.js +0 -873
- package/dist/vue-ui-word-cloud-tRqc2ZMR.js +0 -1723
- package/dist/vue-ui-world-B755-zji.js +0 -3021
- package/dist/vue-ui-xy-BiHIJ7rK.js +0 -1387
- package/dist/vue-ui-xy-DWYTZz_v.js +0 -5777
- package/dist/vue-ui-xy-canvas-DGuMC_Rf.js +0 -2151
- package/dist/vue_ui_3d_bar-C4R7o-yX.js +0 -185
- package/dist/vue_ui_age_pyramid-B2R66DgQ.js +0 -310
- package/dist/vue_ui_bullet-ClzdLoOv.js +0 -186
- package/dist/vue_ui_bump-Vl-zYAtG.js +0 -201
- package/dist/vue_ui_candlestick-BXSQY82k.js +0 -461
- package/dist/vue_ui_chestnut-D2oUhad6.js +0 -305
- package/dist/vue_ui_chord-DPfS1Umc.js +0 -275
- package/dist/vue_ui_circle_pack-DZC_rdfn.js +0 -172
- package/dist/vue_ui_dag-TsJ_azQq.js +0 -258
- package/dist/vue_ui_donut-BDGqG07h.js +0 -358
- package/dist/vue_ui_donut_evolution-C6951a2f.js +0 -745
- package/dist/vue_ui_dumbbell-Bfe_jFyi.js +0 -304
- package/dist/vue_ui_flow-BewZjjKG.js +0 -238
- package/dist/vue_ui_funnel-_Og4EEkO.js +0 -234
- package/dist/vue_ui_galaxy-Ig0cc1_h.js +0 -265
- package/dist/vue_ui_gauge-Cf1RZc9q.js +0 -178
- package/dist/vue_ui_geo-B8TODs-G.js +0 -248
- package/dist/vue_ui_heatmap-B2BBBSWG.js +0 -319
- package/dist/vue_ui_hill-dnltu0L-.js +0 -368
- package/dist/vue_ui_history_plot-CuN63VEc.js +0 -413
- package/dist/vue_ui_horizontal_bar-C4J4QzXf.js +0 -341
- package/dist/vue_ui_label-B0QoxQrJ.js +0 -115
- package/dist/vue_ui_molecule-CO9L59SF.js +0 -231
- package/dist/vue_ui_mood_radar-BA6LAKhk.js +0 -281
- package/dist/vue_ui_nested_donuts-B8csIoVO.js +0 -273
- package/dist/vue_ui_onion-1FTFFS46.js +0 -293
- package/dist/vue_ui_parallel_coordinate_plot-CBiOBira.js +0 -278
- package/dist/vue_ui_quadrant-CDSTKTJz.js +0 -428
- package/dist/vue_ui_quick_chart-DByCqSYE.js +0 -180
- package/dist/vue_ui_radar-jafTED5j.js +0 -306
- package/dist/vue_ui_relation_circle-D0p4mXmv.js +0 -98
- package/dist/vue_ui_ridgeline-VM8_mx4J.js +0 -767
- package/dist/vue_ui_rings-BVgD2aMn.js +0 -320
- package/dist/vue_ui_scatter-I0POnicu.js +0 -479
- package/dist/vue_ui_spark_trend-DxVmpkmC.js +0 -82
- package/dist/vue_ui_sparkbar-z6qO--Kf.js +0 -64
- package/dist/vue_ui_sparkgauge-BX1MS3bA.js +0 -90
- package/dist/vue_ui_sparkhistogram-BRgvKUH6.js +0 -123
- package/dist/vue_ui_sparkline-b9pEUyGF.js +0 -183
- package/dist/vue_ui_sparkstackbar-BOjuQnZd.js +0 -175
- package/dist/vue_ui_stackbar-DdjDL6aq.js +0 -491
- package/dist/vue_ui_stackline-Bh0RuInt.js +0 -539
- package/dist/vue_ui_strip_plot-BaHbnnwN.js +0 -308
- package/dist/vue_ui_table_heatmap-w8vx5k6f.js +0 -80
- package/dist/vue_ui_table_sparkline-DAbkUrNz.js +0 -124
- package/dist/vue_ui_thermometer-DxgqWKlE.js +0 -123
- package/dist/vue_ui_tiremarks-CdEPieWV.js +0 -122
- package/dist/vue_ui_treemap-DoEtkRN6.js +0 -328
- package/dist/vue_ui_vertical_bar-CP-MKz1j.js +0 -247
- package/dist/vue_ui_waffle-DE_DiSVP.js +0 -299
- package/dist/vue_ui_wheel-DZ_nR--t.js +0 -133
- package/dist/vue_ui_word_cloud-C-qIMNLu.js +0 -254
- package/dist/vue_ui_xy-CcJADijP.js +0 -614
- package/dist/vue_ui_xy_canvas-DrNSzYWq.js +0 -487
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{n as t,t as n}from"./tableIntegration-CNoJ1CIY.js";import{n as r,t as i}from"./annotationSlots-BRR85CqJ.js";import{n as a,t as o}from"./userOptionsSlots-DYuo-E5m.js";import{$ as s,D as c,Dt as l,Ft as ee,Ht as u,J as te,Q as ne,S as re,X as ie,Zt as ae,_ as oe,at as se,b as ce,i as le,in as ue,nt as de,pt as fe,rn as pe,sn as me,t as he,v as ge,w as _e,x as ve,yt as ye,zt as be}from"./lib-zDxoqrgo.js";import{n as xe,t as Se}from"./useHints-BH9r_0Vd.js";import{t as Ce}from"./useConfig-CKdzPrcf.js";import{t as we}from"./usePrinter-CnyKPIFM.js";import{n as Te,t as Ee}from"./BaseScanner-8NdoBs7B.js";import{t as De}from"./useChartExport-DtPNpc9M.js";import{t as Oe}from"./useTransitions-DfSHzsdz.js";import{t as ke}from"./useTimeLabelCollider-XQf_S7-z.js";import{n as Ae}from"./Title-BRAjxtjG.js";import{t as je}from"./Shape-tkp65OcG.js";import{t as Me}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{l as Ne,t as Pe}from"./useResponsive-D2CPcpda.js";import{t as Fe}from"./DefGrad-DKMq1REY.js";import{t as Ie}from"./A11yDataTable-DWNlWXzs.js";import{n as Le}from"./resolveChartConfig-BSo1Oe9n.js";import{t as Re}from"./useUserOptionState-CXlFnwPv.js";import{t as ze}from"./useChartAccessibility-DOMuYJfm.js";import{t as Be}from"./chartImage-NwZO-elv.js";import{t as Ve}from"./vue_ui_strip_plot-CwMowrhT.js";import{Fragment as d,computed as f,createBlock as p,createCommentVNode as m,createElementBlock as h,createElementVNode as g,createSlots as He,createTextVNode as Ue,createVNode as We,defineAsyncComponent as _,guardReactiveProps as v,mergeProps as Ge,nextTick as Ke,normalizeClass as qe,normalizeProps as y,normalizeStyle as b,onBeforeUnmount as Je,onMounted as Ye,openBlock as x,ref as S,renderList as C,renderSlot as w,resolveDynamicComponent as Xe,shallowRef as Ze,toDisplayString as T,toRefs as Qe,unref as E,watch as $e,watchEffect as et,withCtx as D}from"vue";var tt=/* @__PURE__ */ e({default:()=>Nt}),nt=[`id`],rt=[`id`],it={style:{position:`relative`}},at=[`xmlns`,`viewBox`,`aria-describedby`],ot=[`x`,`y`,`width`,`height`],st={key:1},ct={key:0},lt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`,`stroke-dasharray`],ut={key:1},dt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`,`stroke-dasharray`],ft=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],pt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],mt=[`transform`,`fill`,`font-size`],ht=[`transform`,`font-size`,`fill`,`text-anchor`],gt=[`transform`,`font-size`,`fill`,`text-anchor`,`innerHTML`],_t=[`fill`,`font-size`,`transform`],vt=[`fill`,`font-size`,`x`,`y`],yt=[`x1`,`x2`,`y1`,`y2`,`stroke`],bt=[`cx`,`cy`,`fill`],xt=[`cx`,`cy`,`fill`],St=[`d`,`fill`,`stroke`,`fill-opacity`,`stroke-opacity`,`stroke-width`,`onMouseenter`],Ct=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-opacity`,`stroke-width`],wt=[`onMouseenter`],Tt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],Et=[`x`,`y`,`width`,`height`,`fill`,`stroke`,`stroke-width`,`rx`],Dt=[`cx`,`cy`,`r`,`fill`,`stroke`],Ot={key:1},kt=[`x`,`y`,`font-size`,`fill`],At={key:0,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},jt={key:5,class:`vue-data-ui-watermark`},Mt={style:{display:`flex`,"align-items":`center`}},Nt=/*#__PURE__*/ Me({__name:`vue-ui-strip-plot`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:[`selectDatapoint`,`copyAlt`],setup(e,{expose:Me,emit:tt}){let Nt=_(()=>import(`./Tooltip-BUXB0i6z.js`)),Pt=_(()=>import(`./BaseIcon-Cz30ODFA.js`).then(e=>e.n)),Ft=_(()=>import(`./vue-ui-accordion-Dy5OVFKr.js`).then(e=>e.n)),It=_(()=>import(`./DataTable-DSUA5M9p.js`)),Lt=_(()=>import(`./UserOptions-D65t74CM.js`).then(e=>e.n)),Rt=_(()=>import(`./PenAndPaper-DvJJaeU2.js`).then(e=>e.t)),zt=_(()=>import(`./PackageVersion-D6pKL176.js`).then(e=>e.t)),Bt=_(()=>import(`./BaseDraggableDialog-T1gEsQid.js`).then(e=>e.n)),Vt=[`classic`,`scatter`,`violin`],{vue_ui_strip_plot:Ht}=Ce(),O=e,Ut=tt,Wt=f({get(){return!!O.dataset&&O.dataset.length},set(e){return e}}),Gt=S(ie()),Kt=S(0),qt=S(!1),Jt=S(``),k=S(null),Yt=S(null),Xt=S(null),Zt=S(null),Qt=S(!1),$t=S(0),en=S(0),tn=S(null),nn=S(null),rn=S(null),an=S(null),on=S(null),sn=S(null),cn=S(null),ln=S(null),A=S(`pointer`),un=S({x:0,y:0}),dn=S(!1),j=S(xn()),M=f(()=>j.value.userOptions),N=f(()=>j.value.style.chart.tooltip),P=f(()=>j.value.style.chart.labels),F=f(()=>j.value.style.chart.violin),I=f(()=>j.value.style.chart.grid),L=f(()=>j.value.style.chart);xe({config:()=>j.value,dataset:()=>O.dataset,component:`VueUiStripPlot`,rules:[Se.emptyArray,{test:e=>e.length>12,message:[`👀 The number of series is > 12. Consider:`,``,`▶️ Using filters to let users choose a maximum number of series to display.`,``,`▶️ Using multiple instances of the chart to display related series.`]}]});let{transitionEnabled:fn}=Oe({config:()=>j.value.transitions,dataset:()=>O.dataset}),pn=f(()=>Sn(j.value.type)),R=f(()=>j.value.userOptions.useCursorPointer),mn=f(()=>ue({defaultConfig:{userOptions:{show:!1},table:{show:!1},style:{chart:{backgroundColor:`#99999930`,padding:{top:24,left:24,right:24,bottom:24},grid:{stroke:`#6A6A6A`,horizontalGrid:{stroke:`#6A6A6A`},verticalGrid:{stroke:`#6A6A6A`}},plots:{stroke:`#6A6A6A`},labels:{bestPlotLabel:{show:!1},axis:{xLabel:``,yLabel:``},xAxisLabels:{show:!1},yAxisLabels:{show:!1}}}}},userConfig:j.value.skeletonConfig??{}})),{loading:hn,FINAL_DATASET:gn,manualLoading:_n}=Te({...Qe(O),FINAL_CONFIG:j,prepareConfig:xn,skeletonDataset:O.config?.skeletonDataset??[{name:`_`,color:`#DBDBDB`,plots:[{name:`_`,value:1},{name:`_`,value:2},{name:`_`,value:3}]},{name:`_`,color:`#C4C4C4`,plots:[{name:`_`,value:3},{name:`_`,value:5},{name:`_`,value:8}]},{name:`_`,color:`#ADADAD`,plots:[{name:`_`,value:8},{name:`_`,value:13},{name:`_`,value:21}]},{name:`_`,color:`#969696`,plots:[{name:`_`,value:21},{name:`_`,value:34},{name:`_`,value:55}]},{name:`_`,color:`#808080`,plots:[{name:`_`,value:55},{name:`_`,value:89},{name:`_`,value:144}]}],skeletonConfig:ue({defaultConfig:j.value,userConfig:mn.value})}),{userOptionsVisible:vn,setUserOptionsVisibility:yn,keepUserOptionState:bn}=Re({config:j.value}),{svgRef:z}=ze({config:L.value.title});function xn(){return Le(O.config,Ht,Ve)}function Sn(e){return Vt.includes(e)?e:`classic`}let Cn=ae(O.config);$e(()=>O.config,async(e,t)=>{let n=ae(e),r=n!==Cn;Cn=n;let i=xn();if(!r){j.value.style.chart.tooltip=i.style.chart.tooltip,U.value.showTooltip=j.value.style.chart.tooltip.show;return}hn.value||(j.value=i),vn.value=!j.value.userOptions.showOnChartHover,En(),$t.value+=1,en.value+=1,U.value.dataLabels.show=P.value.bestPlotLabel.show,U.value.showTable=j.value.table.show,U.value.showTooltip=N.value.show,V.value=L.value.width,H.value=L.value.height,In.value=L.value.plots.radius},{deep:!0}),$e(()=>O.dataset,e=>{Array.isArray(e)&&e.length>0&&(_n.value=!1)},{deep:!0});let B=Ze(null),wn=Ze(null);Ye(()=>{En()});let Tn=f(()=>j.value.debug);function En(){if(be(O.dataset)?(se({componentName:`VueUiStripPlot`,type:`dataset`,debug:Tn.value}),_n.value=!0):O.dataset.forEach((e,t)=>{ye({datasetObject:e,requiredAttributes:[`name`,`plots`]}).forEach(e=>{Wt.value=!1,se({componentName:`VueUiStripPlot`,type:`datasetSerieAttribute`,property:e,index:t,debug:Tn.value})}),e.plots&&e.plots.forEach((e,n)=>{ye({datasetObject:e,requiredAttributes:[`name`,`value`]}).forEach(e=>{Wt.value=!1,se({componentName:`VueUiStripPlot`,type:`datasetSerieAttribute`,property:e,index:`${t},${n}`,debug:Tn.value})})})}),be(O.dataset)||(_n.value=j.value.loading),j.value.responsive){let e=Ne(()=>{let{width:e,height:t}=Pe({chart:k.value,title:L.value.title.text?Yt.value:null,source:Xt.value,noTitle:Zt.value});requestAnimationFrame(()=>{Fn.value=t,V.value=Math.max(.1,e),H.value=Math.max(.1,t-12),j.value.responsiveProportionalSizing?In.value=pe({relator:Math.min(t,e),adjuster:600,source:L.value.plots.radius,threshold:6,fallback:6}):In.value=L.value.plots.radius})});B.value&&(wn.value&&B.value.unobserve(wn.value),B.value.disconnect()),B.value=new ResizeObserver(e),wn.value=k.value.parentNode,B.value.observe(wn.value)}Qt.value=!0,setTimeout(()=>{Nn.value=!1},Wn.value*50)}Je(()=>{B.value&&(wn.value&&B.value.unobserve(wn.value),B.value.disconnect())});let{isPrinting:Dn,isImaging:On,generatePdf:kn,generateImage:An}=we({elementId:`strip-plot_${Gt.value}`,fileName:L.value.title.text||`vue-ui-strip-plot`,options:j.value.userOptions.print}),jn=f(()=>j.value.userOptions.show&&!L.value.title.text),Mn=f(()=>_e(j.value.customPalette)),Nn=S(j.value.useCssAnimation),Pn=S({top:L.value.padding.top,bottom:L.value.padding.bottom,left:L.value.padding.left,right:L.value.padding.right}),V=S(L.value.width),H=S(L.value.height),Fn=S(L.value.height),In=S(L.value.plots.radius),U=S({showTable:j.value.table.show,dataLabels:{show:P.value.bestPlotLabel.show},showTooltip:N.value.show});$e(j,()=>{U.value={showTable:j.value.table.show,dataLabels:{show:P.value.bestPlotLabel.show},showTooltip:N.value.show},V.value=L.value.width,H.value=L.value.height,In.value=L.value.plots.radius},{immediate:!0});let W=f(()=>Math.min(In.value,K.value.stripWidth/2*.9));function G(e){return Number.isFinite(e)?Number(e.toFixed(2)):0}function Ln(){return Math.max(0,(K.value.stripWidth/2-W.value*1.8)*.86)*Math.min(1,F.value.widthRatio)}function Rn(){let e=0;sn.value&&(e=Array.from(sn.value.querySelectorAll(`text`)).reduce((e,t)=>{let n=t.getComputedTextLength();return n>e?n:e},0));let t=an.value?an.value.getBoundingClientRect().width:0;return e+t+(t?24:0)}let zn=S(0),Bn=Ne(e=>{zn.value=e},100);et(e=>{let t=on.value;if(!t)return;let n=new ResizeObserver(e=>{Bn(e[0].contentRect.height)});n.observe(t),e(()=>n.disconnect())}),Je(()=>{zn.value=0});let Vn=f(()=>{let e=0;rn.value&&(e=rn.value.getBBox().height+P.value.axis.fontSize/3+12+P.value.axis.xLabelOffsetY);let t=0;return on.value&&(t=zn.value+12),e+t}),K=f(()=>{let e=Rn(),t=Pn.value.left+e+P.value.axis.yLabelOffsetX+5,n=V.value-Pn.value.right,r=Math.max(0,n-t),i=Pn.value.top+L.value.plots.radius+P.value.bestPlotLabel.fontSize,a=H.value-Pn.value.bottom-Vn.value,o=Math.max(0,a-i),s=Array.isArray(gn.value)?gn.value.length:0;return{left:t,right:n,top:i,bottom:a,width:r,height:o,stripWidth:s>0?r/s:0,absoluteHeight:H.value}});function Hn(e){return K.value.left+(e+1)*K.value.stripWidth-K.value.stripWidth/2}let Un=f(()=>gn.value.map((e,t)=>{let n=ie();return{...e,id:n,color:e.color?re(e.color):Mn.value[t]||u[t]||u[t%u.length],plots:e.plots.map((r,i)=>({...r,value:ce(r.value),parentId:n,parentName:e.name,parentIndex:t,plotIndex:i,color:e.color?re(e.color):Mn.value[t]||u[t]||u[t%u.length],id:ie()})).sort((e,t)=>e.value-t.value)}})),q=f(()=>(Un.value||[]).map((e,t)=>({...e,plots:e.plots.map(e=>({...e,x:Hn(t)}))}))),Wn=f(()=>Math.max(...q.value.map(e=>e.plots.length))),Gn=f(()=>{let e=q.value.flatMap(e=>e.plots.map(e=>e.value));return{max:Math.max(...e),min:Math.min(...e)}}),Kn=f(()=>{let e=I.value.scaleMin,t=I.value.scaleMax,n=Math.max(2,I.value.scaleSteps),r=Gn.value.min<0?Gn.value.min:0,i=Gn.value.max;if(e===null&&t===null)return oe(r,i,n);if(e!==null&&t!==null)return ge(e,t,n);let a=oe(e===null?r:e,t===null?i:t,n);return ge(e===null?a.min:e,t===null?a.max:t,n)});function J(e){let t=Kn.value.max-Kn.value.min;return t?K.value.bottom-(e-Kn.value.min)/t*K.value.height:K.value.bottom}let Y=f(()=>(q.value||[]).map((e,t)=>{let n=e.plots.map(e=>({...e,y:J(e.value)})),r=pn.value===`classic`?n.map(()=>0):Zn(n);return{...e,plots:n.map((e,t)=>({...e,x:e.x+r[t]}))}})),X=f(()=>pn.value===`violin`&&!!F.value?.boxPlot?.show);function qn(e,t){if(!e.length)return 0;if(e.length===1)return e[0];let n=(e.length-1)*t,r=Math.floor(n),i=n-r,a=e[r+1];return a===void 0?e[r]:e[r]+i*(a-e[r])}let Jn=f(()=>X.value?Y.value.map((e,t)=>{let n=e.plots.map(e=>e.value).sort((e,t)=>e-t),r=qn(n,.25),i=qn(n,.5),a=qn(n,.75),o=a-r,s=r-o*1.5,c=a+o*1.5,l=n.find(e=>e>=s),ee=n.slice().reverse().find(e=>e<=c),u=Hn(t),te=Math.max(W.value*2.8,Math.min(Ln()*.32,K.value.stripWidth*.12))*Math.min(1.5,F.value.boxPlot.widthRatio);return{id:e.id,boxPlotColor:F.value.boxPlot.useSerieColor?e.color:F.value.boxPlot.color,color:e.color,name:e.name,count:n.length,lowerAdjacent:l??n[0],q1:r,median:i,q3:a,upperAdjacent:ee??n[n.length-1],iqr:o,lowerFence:s,upperFence:c,centerX:u,boxLeft:u-te/2,boxWidth:te,q1Y:J(r),medianY:J(i),q3Y:J(a),lowerY:J(l??n[0]),upperY:J(ee??n[n.length-1])}}):[]),Yn=f(()=>[j.value.table.columnNames.series,F.value.tooltipLabels.lowerAdjacent,F.value.tooltipLabels.q1,F.value.tooltipLabels.median,F.value.tooltipLabels.q3,F.value.tooltipLabels.upperAdjacent,F.value.tooltipLabels.iqr,F.value.tooltipLabels.count]);function Xn(e){return s({p:P.value.prefix,v:e,s:P.value.suffix,r:j.value.table.td.roundingValue})}function Zn(e){let t=pn.value===`violin`?Math.max(0,Ln()-W.value*1.15):Math.max(0,K.value.stripWidth/2-W.value*1.5);if(!e.length||!t)return e.map(()=>0);let n=e.map(()=>0),r=W.value*2.1,i=Math.min(t,r),a=[0];for(let e=i;e<=t+i/2;e+=i)a.push(-Math.min(e,t)),a.push(Math.min(e,t));let o=[];return e.forEach((e,t)=>{let i=a.find(t=>o.every(n=>{let i=t-n.offset,a=e.y-n.y;return Math.hypot(i,a)>=r}))??0;n[t]=i,o.push({y:e.y,offset:i})}),n}let Qn=f(()=>pn.value===`violin`?Y.value.map((e,t)=>({id:e.id,color:F.value.useSerieColor?e.color:F.value.stroke,fill:F.value.useSerieColor?e.color:F.value.fill,path:$n(e.plots,t),connectors:er(e.plots,t)})):[]);function $n(e,t){let n=Ln();if(!e.length||!K.value.height||!n)return``;let r=Hn(t),i=e.map(e=>e.y),a=Z(i),o=nr({yValues:i,bandwidth:a});return o.length>1?o.map(e=>ir({yValues:e,centerX:r,maxWidth:tr({clusterLength:e.length,totalLength:i.length,maxWidth:n}),bandwidth:Z(e)})).join(` `):ir({yValues:i,centerX:r,maxWidth:n,bandwidth:a})}function er(e,t){if(!e.length)return[];let n=Hn(t),r=e.map(e=>e.y),i=nr({yValues:r,bandwidth:Z(r)});return i.length<2?[]:i.slice(1).map((e,t)=>{let r=i[t],a=Z(r),o=Z(e),s=ve(Math.max(...r)+a*2.35,K.value.top,K.value.bottom),c=ve(Math.min(...e)-o*2.35,K.value.top,K.value.bottom);return{x:G(n),y1:G(s),y2:G(c)}})}function tr({clusterLength:e,totalLength:t,maxWidth:n}){let r=(e/t)**.6,i=e<=2?.72:1;return Math.max(W.value*2.2,n*ve(r*i,.18,1))}function Z(e){let t=e.reduce((e,t)=>e+t,0)/Math.max(1,e.length),n=e.reduce((e,n)=>e+(n-t)**2,0)/Math.max(1,e.length),r=Math.sqrt(n),i=e.length<2?Math.max(W.value*2.6,K.value.height/48):W.value*2.1;return ve(1.06*r*e.length**-.2,i,K.value.height/5)}function nr({yValues:e,bandwidth:t}){if(e.length<2)return[e];let n=[...e].sort((e,t)=>e-t),r=Math.max(t*1.45,W.value*5),i=[],a=[n[0]];for(let e=1;e<n.length;e+=1)Math.abs(n[e]-n[e-1])>r?(i.push(a),a=[n[e]]):a.push(n[e]);return i.push(a),rr(i)}function rr(e){return e.reduce((e,t)=>{let n=e[e.length-1];if(!n)return e.push(t),e;let r=Z(n),i=Z(t);return Math.max(...n)+r*2.35>=Math.min(...t)-i*2.35?n.push(...t):e.push(t),e},[])}function ir({yValues:e,centerX:t,maxWidth:n,bandwidth:r}){let i=ve(Math.min(...e)-r*2.35,K.value.top,K.value.bottom),a=ve(Math.max(...e)+r*2.35,K.value.top,K.value.bottom),o=Math.max(48,Math.min(120,Math.round((a-i)/Math.max(1,r/4)))),s=Array.from({length:o},(t,n)=>{let s=i+(a-i)*n/Math.max(1,o-1);return{y:s,density:e.reduce((e,t)=>{let n=(s-t)/r;return e+Math.exp(-.5*n*n)},0)}}),c=Math.max(...s.map(e=>e.density));if(!c)return``;let l=s.map((e,t)=>{let r=t===0||t===s.length-1?0:e.density/c*n;return{y:G(e.y),width:G(r)}}),ee=l.map(e=>({x:G(t-e.width),y:e.y})),u=l.slice(0,-1).reverse().map(e=>({x:G(t+e.width),y:e.y}));return`${ar([...ee,...u])} Z`}function ar(e){if(!e.length)return``;if(e.length===1)return`M ${e[0].x} ${e[0].y}`;let t=`M ${e[0].x} ${e[0].y}`;for(let n=1;n<e.length-1;n+=1){let r=e[n],i=e[n+1],a=G((r.x+i.x)/2),o=G((r.y+i.y)/2);t+=` Q ${r.x} ${r.y} ${a} ${o}`}let n=e[e.length-1];return`${t} L ${n.x} ${n.y}`}let or=f(()=>Kn.value.ticks.map(e=>({y:J(e),x1:K.value.left,x2:K.value.right,value:e}))),sr=S(null),Q=S(null);function cr({datapoint:e,seriesIndex:t}){A.value!==`keyboard`&&(qt.value=!1,Q.value=null,j.value.events.datapointLeave&&j.value.events.datapointLeave({datapoint:e,seriesIndex:t}))}function lr({datapoint:e,seriesIndex:t}){Ut(`selectDatapoint`,e),j.value.events.datapointClick&&j.value.events.datapointClick({datapoint:e,seriesIndex:t})}function ur(e,t={}){return le(P.value.formatter,e,s({p:P.value.prefix,v:e,s:P.value.suffix,r:N.value.roundingValue}),t)}function dr({datapoint:e,seriesIndex:t,triggerMode:n=`pointer`}){j.value.events.datapointEnter&&j.value.events.datapointEnter({datapoint:e,seriesIndex:t}),A.value=n,sr.value={datapoint:e,seriesIndex:t,config:j.value,series:Un.value},qt.value=!0,Q.value=e;let r=N.value.customFormat;if(l(r)&&fe(()=>r({seriesIndex:t,datapoint:e,series:Un.value,config:j.value})))Jt.value=r({seriesIndex:t,datapoint:e,series:Un.value,config:j.value});else{let n=``;n+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="none" fill="${L.value.plots.gradient.show?`url(#${e.parentId})`:e.color}"/></svg>${e.name}</div>`,n+=`<div>${ur(e.value,{datapoint:e,seriesIndex:t})}</div>`,Jt.value=`<div>${n}</div>`}}function fr(){A.value!==`keyboard`&&(qt.value=!1,Q.value=null)}function pr({boxPlot:e,seriesIndex:t,triggerMode:n=`pointer`}){A.value=n,Q.value=null,qt.value=!0,sr.value={boxPlot:e,seriesIndex:t,config:j.value,series:Un.value};let r=N.value.customFormat;if(l(r))try{let n={boxPlot:e,seriesIndex:t,series:Un.value,config:j.value};if(fe(()=>r(n))){Jt.value=r(n);return}}catch{}let i=[[F.value.tooltipLabels.upperAdjacent,e.upperAdjacent],[F.value.tooltipLabels.q3,e.q3],[F.value.tooltipLabels.median,e.median],[F.value.tooltipLabels.q1,e.q1],[F.value.tooltipLabels.lowerAdjacent,e.lowerAdjacent],[F.value.tooltipLabels.iqr,e.iqr]],a=`<svg viewBox="0 0 12 12" height="14" width="14"><rect x="1" y="1" width="10" height="10" rx="2" stroke="none" fill="${e.color}"/></svg>`,o=i.map(([n,r])=>`<div style="display:flex;flex-direction:row;gap:12px;align-items:center;justify-content:space-between;"><span>${n}</span><b>${ur(r,{boxPlot:e,seriesIndex:t})}</b></div>`).join(``);Jt.value=`<div style="min-width:160px;"><div style="display:flex;flex-direction:row;gap:6px;align-items:center;margin-bottom:6px;">${a}${e.name}</div>`+o+`<div style="display:flex;flex-direction:row;gap:12px;align-items:center;justify-content:space-between;margin-top:6px;"><span>${F.value.tooltipLabels.count}</span><b>${e.count}</b></div></div>`}let mr=f(()=>({head:q.value.flatMap(e=>JSON.parse(JSON.stringify(e.plots)).sort((e,t)=>t.value-e.value).map(t=>({name:`${e.name} - ${t.name}`,color:t.color}))),body:q.value.flatMap(e=>JSON.parse(JSON.stringify(e.plots)).sort((e,t)=>t.value-e.value).map(e=>e.value))}));function hr(e=null){Ke(()=>{let t=[],n=[j.value.table.columnNames.series,j.value.table.columnNames.value];X.value?(n=Yn.value,t=Jn.value.map(e=>[[e.name],[e.lowerAdjacent],[e.q1],[e.median],[e.q3],[e.upperAdjacent],[e.iqr],[e.count]])):t=mr.value.head.map((e,t)=>[[e.name],[mr.value.body[t]]]);let r=[[L.value.title.text],[L.value.title.subtitle.text],n.map(e=>[e])].concat(t),i=c(r);e?e(i):de({csvContent:i,title:L.value.title.text||`vue-ui-strip-plot`})})}let gr=f(()=>{if(X.value){let e=Yn.value;return{colNames:e,head:e,body:Jn.value.map(e=>[{color:e.color,name:e.name},Xn(e.lowerAdjacent),Xn(e.q1),Xn(e.median),Xn(e.q3),Xn(e.upperAdjacent),Xn(e.iqr),e.count]),config:{th:{backgroundColor:j.value.table.th.backgroundColor,color:j.value.table.th.color,outline:j.value.table.th.outline},td:{backgroundColor:j.value.table.td.backgroundColor,color:j.value.table.td.color,outline:j.value.table.td.outline},breakpoint:j.value.table.responsiveBreakpoint}}}let e=[j.value.table.columnNames.series,j.value.table.columnNames.value],t=mr.value.head.map((e,t)=>{let n=s({p:P.value.prefix,v:mr.value.body[t],s:P.value.suffix,r:j.value.table.td.roundingValue});return[{color:e.color,name:e.name},n]}),n={th:{backgroundColor:j.value.table.th.backgroundColor,color:j.value.table.th.color,outline:j.value.table.th.outline},td:{backgroundColor:j.value.table.td.backgroundColor,color:j.value.table.td.color,outline:j.value.table.td.outline},breakpoint:j.value.table.responsiveBreakpoint};return{colNames:[j.value.table.columnNames.series,j.value.table.columnNames.value],head:e,body:t,config:n}}),$=S(!1);function _r(e){$.value=e,Kt.value+=1}function vr(){return q.value}function yr(){U.value.showTable=!U.value.showTable}function br(){U.value.dataLabels.show=!U.value.dataLabels.show}function xr(){U.value.showTooltip=!U.value.showTooltip}let Sr=S(!1);function Cr(){Sr.value=!Sr.value}let wr=Be(k,()=>L.value.title.text),Tr=f(()=>q.value.map(e=>e.name)),Er=S({start:0,end:q.value.length});ke({timeLabelsEls:on,timeLabels:Tr,slicer:Er,configRef:j,rotationPath:[`style`,`chart`,`labels`,`xAxisLabels`,`rotation`],autoRotatePath:[`style`,`chart`,`labels`,`xAxisLabels`,`autoRotate`,`enable`],isAutoSize:!1,width:V,height:H,targetClass:`.vue-ui-strip-plot-category-name`,rotation:P.value.xAxisLabels.autoRotate.angle});let Dr=f(()=>n({config:j,style:L,mutableConfig:U,dialog:Bt,accordion:Ft,isFullscreen:$,parent:k,maxWidth:800,isCursorPointer:R}));$e(()=>U.value.showTable,e=>t(e,j,tn));function Or(){U.value.showTable=!1,nn.value&&nn.value.setTableIconState(!1)}let kr=f(()=>L.value.backgroundColor),Ar=f(()=>L.value.title),{isCallbackImaging:jr,isCallbackSvg:Mr,generateSvg:Nr,onGenerateImage:Pr}=De({svg:z,title:Ar,legend:null,legendItems:null,backgroundColor:kr,getSvgCallback:()=>j.value.userOptions.callbacks.svg,generateImage:An});async function Fr(){if(Ut(`copyAlt`,{config:j.value,dataset:Y.value}),!j.value.userOptions.callbacks.altCopy){console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.");return}await Promise.resolve(j.value.userOptions.callbacks.altCopy({config:j.value,dataset:Y.value}))}function Ir(){return Y.value.length}function Lr(e){return Y.value[e]?.plots??[]}function Rr(e=cn.value,t=ln.value){return!Number.isInteger(e)||!Number.isInteger(t)?null:Lr(e)[t]??null}function zr(){cn.value=null,ln.value=null,A.value=`pointer`,qt.value=!1,Q.value=null}function Br(e){if(!e||!z.value)return;let t=z.value.getBoundingClientRect();un.value={x:t.left+e.x/V.value*t.width,y:t.top+e.y/H.value*t.height}}function Vr(e,t){let n=Rr(e,t);n&&(cn.value=e,ln.value=t,A.value=`keyboard`,Br(n),dr({datapoint:n,seriesIndex:e,triggerMode:`keyboard`}))}function Hr(){dn.value=!0,cn.value=null,ln.value=null}function Ur(){dn.value=!1,zr()}function Wr(e){if(!z.value||Sr.value||document.activeElement!==z.value||!Ir())return;let t=e.key===`ArrowLeft`,n=e.key===`ArrowRight`,r=e.key===`ArrowUp`,i=e.key===`ArrowDown`,a=e.key===`Enter`||e.key===` `,o=e.key===`Escape`;if(!t&&!n&&!r&&!i&&!a&&!o)return;if(e.preventDefault(),e.stopPropagation(),o){zr();return}let s=cn.value,c=ln.value;if(s===null||c===null)s=0,c=0;else if(t||n){let e=Ir();s=n?(s+1)%e:(s-1+e)%e;let t=Lr(s);if(!t.length)return;c=Math.min(c,t.length-1)}else if(r||i){let e=Lr(s);if(!e.length)return;c=r?(c+1)%e.length:(c-1+e.length)%e.length}if(a){let e=Rr();if(!e)return;lr({datapoint:e,seriesIndex:cn.value});return}Vr(s,c)}let Gr=f(()=>({headers:gr.value?.colNames??[],rows:gr.value?.body?.map(e=>e.map(e=>e&&typeof e==`object`&&`name`in e?e.name:e))??[]}));return Me({getData:vr,getImage:wr,generatePdf:kn,generateCsv:hr,generateImage:An,generateSvg:Nr,toggleTable:yr,toggleLabels:br,toggleTooltip:xr,toggleAnnotator:Cr,toggleFullscreen:_r,copyAlt:Fr}),(e,t)=>(x(),h(`div`,{ref_key:`stripPlotChart`,ref:k,class:qe(`vue-data-ui-component vue-ui-strip-plot ${$.value?`vue-data-ui-wrapper-fullscreen`:``} ${j.value.useCssAnimation?``:`vue-ui-dna`}`),style:b(`font-family:${j.value.style.fontFamily};width:100%; text-align:center;background:${L.value.backgroundColor};${j.value.responsive?`height:100%`:``}`),id:`strip-plot_${Gt.value}`,onMouseenter:t[2]||=()=>E(yn)(!0),onMouseleave:t[3]||=()=>E(yn)(!1)},[g(`div`,{id:`chart-instructions-${Gt.value}`,class:`sr-only`},[g(`p`,null,T(j.value.a11y.translations.keyboardNavigation),1)],8,rt),Gr.value?.rows?.length?(x(),p(Ie,{key:0,uid:Gt.value,head:Gr.value.headers,body:Gr.value.rows,notice:j.value.a11y.translations.tableAvailable,caption:j.value.a11y.translations.tableCaption},null,8,[`uid`,`head`,`body`,`notice`,`caption`])):m(``,!0),M.value.buttons.annotator?(x(),p(E(Rt),{key:1,svgRef:E(z),backgroundColor:L.value.backgroundColor,color:L.value.color,active:Sr.value,isCursorPointer:R.value,palette:M.value.annotatorPalette,onClose:Cr},He({_:2},[C(E(i),t=>({name:t,fn:D(n=>[w(e.$slots,t,y(v(E(r)(t,n))),void 0,!0)])}))]),1032,[`svgRef`,`backgroundColor`,`color`,`active`,`isCursorPointer`,`palette`])):m(``,!0),jn.value?(x(),h(`div`,{key:2,ref_key:`noTitle`,ref:Zt,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},null,512)):m(``,!0),L.value.title.text?(x(),h(`div`,{key:3,ref_key:`chartTitle`,ref:Yt,style:`width:100%;background:transparent;padding-bottom:24px`},[(x(),p(Ae,{key:`title_${$t.value}`,config:{title:{cy:`donut-div-title`,...L.value.title},subtitle:{cy:`donut-div-subtitle`,...L.value.title.subtitle}}},null,8,[`config`]))],512)):m(``,!0),M.value.show&&Wt.value&&(E(bn)||E(vn))?(x(),p(E(Lt),{ref_key:`userOptionsRef`,ref:nn,key:`user_option_${Kt.value}`,backgroundColor:L.value.backgroundColor,color:L.value.color,isPrinting:E(Dn),isImaging:E(On),uid:Gt.value,hasTooltip:M.value.buttons.tooltip&&N.value.show,hasPdf:M.value.buttons.pdf,hasXls:M.value.buttons.csv,hasImg:M.value.buttons.img,hasSvg:M.value.buttons.svg,hasTable:M.value.buttons.table,hasLabel:M.value.buttons.labels&&j.value.type!==`violin`,hasFullscreen:M.value.buttons.fullscreen,hasAltCopy:M.value.buttons.altCopy,isTooltip:U.value.showTooltip,isFullscreen:$.value,titles:{...M.value.buttonTitles},chartElement:k.value,position:M.value.position,hasAnnotator:M.value.buttons.annotator,isAnnotation:Sr.value,callbacks:M.value.callbacks,printScale:M.value.print.scale,tableDialog:j.value.table.useDialog,isCursorPointer:R.value,onToggleFullscreen:_r,onGeneratePdf:E(kn),onGenerateCsv:hr,onGenerateImage:E(Pr),onGenerateSvg:E(Nr),onToggleTable:yr,onToggleLabels:br,onToggleTooltip:xr,onToggleAnnotator:Cr,onCopyAlt:Fr,style:b({visibility:E(bn)?E(vn)?`visible`:`hidden`:`visible`})},He({_:2},[C(E(a)(e.$slots,`menuIcon optionTooltip optionPdf optionCsv optionImg optionSvg optionTable optionLabels optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:D(n=>[w(e.$slots,t,y(v(E(o)(t,n))),void 0,!0)])}))]),1032,/* @__PURE__ */ `backgroundColor.color.isPrinting.isImaging.uid.hasTooltip.hasPdf.hasXls.hasImg.hasSvg.hasTable.hasLabel.hasFullscreen.hasAltCopy.isTooltip.isFullscreen.titles.chartElement.position.hasAnnotator.isAnnotation.callbacks.printScale.tableDialog.isCursorPointer.onGeneratePdf.onGenerateImage.onGenerateSvg.style`.split(`.`))):m(``,!0),g(`div`,it,[(x(),h(`svg`,{ref_key:`svgRef`,ref:z,xmlns:E(he),class:qe({"vue-data-ui-fullscreen--on":$.value,"vue-data-ui-fulscreen--off":!$.value,"vue-data-ui-no-transition":!E(fn)}),viewBox:`0 0 ${V.value} ${H.value}`,style:b(`max-width:100%; overflow: visible; background:transparent;color:${L.value.color};`),"aria-describedby":`chart-instructions-${Gt.value}`,tabindex:`0`,onFocus:Hr,onBlur:Ur,onKeydown:Wr},[We(E(zt)),e.$slots[`chart-background`]?(x(),h(`foreignObject`,{key:0,x:K.value.left,y:K.value.top,width:Math.max(.1,K.value.width),height:Math.max(.1,K.value.height),style:{pointerEvents:`none`}},[w(e.$slots,`chart-background`,{},void 0,!0)],8,ot)):m(``,!0),I.value.show?(x(),h(`g`,st,[I.value.horizontalGrid.show?(x(),h(`g`,ct,[(x(!0),h(d,null,C(or.value,e=>(x(),h(`line`,{x1:e.x1,x2:e.x2,y1:e.y,y2:e.y,stroke:I.value.horizontalGrid.stroke,"stroke-width":I.value.horizontalGrid.strokeWidth,"stroke-dasharray":I.value.horizontalGrid.strokeDasharray,"stroke-linecap":`round`},null,8,lt))),256))])):m(``,!0),I.value.verticalGrid.show?(x(),h(`g`,ut,[(x(!0),h(d,null,C(q.value,(e,t)=>(x(),h(`line`,{x1:K.value.left+(t+1)*K.value.stripWidth,x2:K.value.left+(t+1)*K.value.stripWidth,y1:K.value.top,y2:K.value.bottom,stroke:I.value.verticalGrid.stroke,"stroke-width":I.value.verticalGrid.strokeWidth,"stroke-dasharray":I.value.verticalGrid.strokeDasharray,"stroke-linecap":`round`},null,8,dt))),256))])):m(``,!0),g(`line`,{x1:K.value.left,x2:K.value.left,y1:K.value.top,y2:K.value.bottom,stroke:I.value.stroke,"stroke-width":I.value.strokeWidth,"stroke-linecap":`round`},null,8,ft),g(`line`,{x1:K.value.left,x2:K.value.right,y1:K.value.bottom,y2:K.value.bottom,stroke:I.value.stroke,"stroke-width":I.value.strokeWidth,"stroke-linecap":`round`},null,8,pt)])):m(``,!0),P.value.yAxisLabels.show?(x(),h(`g`,{key:2,ref_key:`scaleLabels`,ref:sn},[(x(!0),h(d,null,C(or.value,(e,t)=>(x(),h(`text`,{class:qe({"vue-data-ui-transition":E(fn)}),key:`sl_${t}`,transform:`translate(${e.x1+P.value.yAxisLabels.offsetX-5}, ${e.y+P.value.yAxisLabels.fontSize/3})`,fill:P.value.yAxisLabels.color,"font-size":P.value.yAxisLabels.fontSize,"text-anchor":`end`},T(E(le)(P.value.formatter,e.value,E(s)({p:P.value.prefix,v:e.value,s:P.value.suffix,r:P.value.yAxisLabels.rounding}),{datapoint:e,seriesIndex:t})),11,mt))),128))],512)):m(``,!0),P.value.xAxisLabels.show?(x(),h(`g`,{key:3,ref_key:`timeLabelsEls`,ref:on},[(x(!0),h(d,null,C(Tr.value,(e,t)=>(x(),h(`g`,null,[String(e).includes(`
|
|
2
|
+
`)?(x(),h(`text`,{key:1,class:`vue-ui-strip-plot-category-name`,transform:`translate(${K.value.left+(t+1)*K.value.stripWidth-K.value.stripWidth/2}, ${K.value.bottom+P.value.xAxisLabels.fontSize*2+P.value.xAxisLabels.offsetY}), rotate(${P.value.xAxisLabels.rotation})`,"font-size":P.value.xAxisLabels.fontSize,fill:P.value.xAxisLabels.color,"text-anchor":P.value.xAxisLabels.rotation>0?`start`:P.value.xAxisLabels.rotation<0?`end`:`middle`,innerHTML:E(te)({content:E(me)(String(e)),fontSize:P.value.xAxisLabels.fontSize,fill:P.value.xAxisLabels.color,x:0,y:0})},null,8,gt)):(x(),h(`text`,{key:0,class:`vue-ui-strip-plot-category-name`,transform:`translate(${K.value.left+(t+1)*K.value.stripWidth-K.value.stripWidth/2}, ${K.value.bottom+P.value.xAxisLabels.fontSize*2+P.value.xAxisLabels.offsetY}), rotate(${P.value.xAxisLabels.rotation})`,"font-size":P.value.xAxisLabels.fontSize,fill:P.value.xAxisLabels.color,"text-anchor":P.value.xAxisLabels.rotation>0?`start`:P.value.xAxisLabels.rotation<0?`end`:`middle`},T(String(e)),9,ht))]))),256))],512)):m(``,!0),P.value.axis.yLabel?(x(),h(`text`,{key:4,ref_key:`yAxisLabel`,ref:an,fill:P.value.axis.color,"font-size":P.value.axis.fontSize,transform:`translate(${P.value.axis.fontSize}, ${K.value.top+K.value.height/2}) rotate(-90)`,"text-anchor":`middle`},T(P.value.axis.yLabel),9,_t)):m(``,!0),P.value.axis.xLabel?(x(),h(`text`,{key:5,ref_key:`xAxisLabel`,ref:rn,fill:P.value.axis.color,"font-size":P.value.axis.fontSize,x:K.value.left+K.value.width/2,y:H.value-P.value.axis.fontSize/3,"text-anchor":`middle`},T(P.value.axis.xLabel),9,vt)):m(``,!0),Q.value?(x(),h(d,{key:6},[g(`line`,{x1:K.value.left,x2:K.value.right,y1:Q.value.y,y2:Q.value.y,stroke:Q.value.color,"stroke-width":1,class:qe({"select-circle":j.value.useCssAnimation})},null,10,yt),g(`circle`,{cx:K.value.left,cy:Q.value.y,r:3,fill:Q.value.color,class:qe({"select-circle":j.value.useCssAnimation})},null,10,bt),g(`circle`,{cx:K.value.right,cy:Q.value.y,r:3,fill:Q.value.color,class:qe({"select-circle":j.value.useCssAnimation})},null,10,xt)],64)):m(``,!0),g(`defs`,null,[(x(!0),h(d,null,C(q.value,e=>(x(),p(Fe,{t:`radial`,id:e.id,key:`r_${e.id}`,fy:`30%`,stops:[[`10%`,E(ee)(e.color,L.value.plots.gradient.intensity/100),1],[`90%`,E(ne)(e.color,.1),1],[`100%`,e.color,1]]},null,8,[`id`,`stops`]))),128))]),(x(!0),h(d,null,C(Qn.value,(e,n)=>(x(),h(d,{key:e.id},[e.path?(x(),h(`path`,{key:0,d:e.path,fill:e.fill,stroke:e.color,"fill-opacity":F.value.opacity,"stroke-opacity":F.value.strokeOpacity,"stroke-width":F.value.strokeWidth,style:b({pointerEvents:X.value?`auto`:`none`,cursor:X.value&&R.value?`pointer`:`default`}),onMouseenter:e=>X.value&&Jn.value[n]&&pr({boxPlot:Jn.value[n],seriesIndex:n,triggerMode:`pointer`}),onMouseleave:t[0]||=e=>X.value&&fr()},null,44,St)):m(``,!0),(x(!0),h(d,null,C(e.connectors,(t,n)=>(x(),h(`line`,{key:`violin_connector_${e.id}_${n}`,x1:t.x,x2:t.x,y1:t.y1,y2:t.y2,stroke:e.color,"stroke-opacity":F.value.strokeOpacity,"stroke-width":F.value.strokeWidth,"stroke-linecap":`round`,style:{"pointer-events":`none`}},null,8,Ct))),128))],64))),128)),(x(!0),h(d,null,C(Jn.value,(e,t)=>(x(),h(`g`,{key:`boxplot_${e.id}`,style:b({cursor:R.value?`pointer`:`default`}),onMouseenter:n=>pr({boxPlot:e,seriesIndex:t,triggerMode:`pointer`}),onMouseleave:fr},[g(`line`,{x1:e.centerX,x2:e.centerX,y1:e.upperY,y2:e.lowerY,stroke:E(ne)(e.boxPlotColor,.2),"stroke-width":Math.max(1,F.value.strokeWidth),"stroke-linecap":`round`},null,8,Tt),g(`rect`,{x:e.boxLeft,y:Math.min(e.q1Y,e.q3Y),width:e.boxWidth,height:Math.max(1,Math.abs(e.q3Y-e.q1Y)),fill:e.boxPlotColor,stroke:E(ne)(e.boxPlotColor,.2),"stroke-width":Math.max(1,F.value.strokeWidth),rx:e.boxWidth/20},null,8,Et),g(`circle`,{cx:e.boxLeft+e.boxWidth/2,cy:e.medianY,r:e.boxWidth/3*Math.min(1,F.value.boxPlot.medianCircleRadiusRatio),fill:F.value.boxPlot.medianCircleFill,stroke:E(ne)(e.boxPlotColor,.2)},null,8,Dt)],44,wt))),128)),(x(!0),h(d,null,C(Y.value,(t,n)=>(x(),h(d,null,[X.value?m(``,!0):(x(!0),h(d,{key:0},C(t.plots,(n,r)=>(x(),p(je,Ge({ref_for:!0},e.$attrs,{plot:{x:n.x,y:Qt.value?n.y:K.value.top},radius:Q.value&&Q.value.id===n.id?W.value*1.5:W.value,shape:L.value.plots.shape,stroke:L.value.plots.stroke,strokeWidth:L.value.plots.strokeWidth,color:L.value.plots.gradient.show?`url(#${t.id})`:t.color,style:`transition: all 0.2s ease-in-out; opacity:${Q.value?Q.value.id===n.id?1:.2:L.value.plots.opacity};${Nn.value?`transition-delay:${r*50}ms`:``}`,class:{"vue-ui-strip-plot-animated":j.value.useCssAnimation&&Nn.value&&!E(hn),"vue-ui-strip-plot-select-circle":j.value.useCssAnimation&&!Nn.value},onMouseenter:e=>dr({datapoint:n,seriesIndex:r,triggerMode:`pointer`}),onMouseleave:e=>cr({datapoint:n,seriesIndex:r}),onClick:e=>lr({datapoint:n,seriesIndex:r})}),null,16,[`plot`,`radius`,`shape`,`stroke`,`strokeWidth`,`color`,`style`,`class`,`onMouseenter`,`onMouseleave`,`onClick`]))),256)),U.value.dataLabels.show&&!X.value?(x(),h(`g`,Ot,[(x(!0),h(d,null,C(t.plots,(e,n)=>(x(),h(d,null,[n===t.plots.length-1||Q.value&&Q.value.id===e.id&&!U.value.showTooltip?(x(),h(`text`,{key:0,x:e.x,y:e.y+P.value.bestPlotLabel.offsetY-W.value*(Q.value&&Q.value.id===e.id&&!U.value.showTooltip?2:1.5),"font-size":P.value.bestPlotLabel.fontSize,fill:P.value.bestPlotLabel.color,"text-anchor":`middle`,style:b(`opacity:${j.value.useCssAnimation?+!Nn.value:1};transition:opacity 0.2s ease-in;`)},T(e.name)+` `+T(P.value.bestPlotLabel.showValue?E(le)(P.value.formatter,e.value,E(s)({p:`(${P.value.prefix}`,v:e.value,s:`${P.value.suffix})`,r:L.value.labels.bestPlotLabel.rounding}),{datapoint:e,seriesIndex:n}):``),13,kt)):m(``,!0)],64))),256))])):m(``,!0)],64))),256)),w(e.$slots,`svg`,{svg:{...K.value,isPrintingImg:E(Dn)||E(On)||E(jr),isPrintingSvg:E(Mr),boxPlotSummaries:Jn.value,series:q.value}},void 0,!0)],46,at)),e.$slots.hint?(x(),h(`div`,At,[w(e.$slots,`hint`,y(v({hint:j.value.a11y.translations.keyboardNavigation,isVisible:dn.value})),void 0,!0)])):m(``,!0)]),e.$slots.watermark?(x(),h(`div`,jt,[w(e.$slots,`watermark`,y(v({isPrinting:E(Dn)||E(On)||E(jr)||E(Mr)})),void 0,!0)])):m(``,!0),e.$slots.source?(x(),h(`div`,{key:6,ref_key:`source`,ref:Xt,dir:`auto`},[w(e.$slots,`source`,{},void 0,!0)],512)):m(``,!0),We(E(Nt),{teleportTo:N.value.teleportTo,show:U.value.showTooltip&&qt.value,backgroundColor:N.value.backgroundColor,color:N.value.color,borderRadius:N.value.borderRadius,borderColor:N.value.borderColor,borderWidth:N.value.borderWidth,fontSize:N.value.fontSize,backgroundOpacity:N.value.backgroundOpacity,position:N.value.position,offsetX:N.value.offsetX,offsetY:N.value.offsetY,parent:k.value,content:Jt.value,isFullscreen:$.value,isCustom:E(l)(N.value.customFormat),smooth:N.value.smooth,backdropFilter:N.value.backdropFilter,smoothForce:N.value.smoothForce,smoothSnapThreshold:N.value.smoothSnapThreshold,isA11yMode:A.value===`keyboard`,a11yPosition:un.value},{"tooltip-before":D(()=>[w(e.$slots,`tooltip-before`,y(v({...sr.value})),void 0,!0)]),tooltip:D(()=>[w(e.$slots,`tooltip`,y(v({...sr.value})),void 0,!0)]),"tooltip-after":D(()=>[w(e.$slots,`tooltip-after`,y(v({...sr.value})),void 0,!0)]),_:3},8,[`teleportTo`,`show`,`backgroundColor`,`color`,`borderRadius`,`borderColor`,`borderWidth`,`fontSize`,`backgroundOpacity`,`position`,`offsetX`,`offsetY`,`parent`,`content`,`isFullscreen`,`isCustom`,`smooth`,`backdropFilter`,`smoothForce`,`smoothSnapThreshold`,`isA11yMode`,`a11yPosition`]),Wt.value&&M.value.buttons.table?(x(),p(Xe(Dr.value.component),Ge({key:7},Dr.value.props,{ref_key:`tableUnit`,ref:tn,onClose:Or}),He({content:D(()=>[(x(),p(E(It),{key:`table_${en.value}`,colNames:gr.value.colNames,head:gr.value.head,body:gr.value.body,config:gr.value.config,title:j.value.table.useDialog?``:Dr.value.title,withCloseButton:!j.value.table.useDialog,isCursorPointer:R.value,onClose:Or},{th:D(({th:e})=>[g(`div`,Mt,T(e),1)]),td:D(({td:e})=>[Ue(T(e.name||e),1)]),_:1},8,[`colNames`,`head`,`body`,`config`,`title`,`withCloseButton`,`isCursorPointer`]))]),_:2},[j.value.table.useDialog?{name:`title`,fn:D(()=>[Ue(T(Dr.value.title),1)]),key:`0`}:void 0,j.value.table.useDialog?{name:`actions`,fn:D(()=>[g(`button`,{tabindex:`0`,class:`vue-ui-user-options-button`,onClick:t[1]||=e=>hr(M.value.callbacks.csv),style:b({cursor:R.value?`pointer`:`default`})},[We(E(Pt),{name:`fileCsv`,stroke:Dr.value.props.color},null,8,[`stroke`])],4)]),key:`1`}:void 0]),1040)):m(``,!0),w(e.$slots,`skeleton`,{},()=>[E(hn)?(x(),p(Ee,{key:0})):m(``,!0)],!0)],46,nt))}},[[`__scopeId`,`data-v-a25ce40e`]]);export{tt as n,Nt as t};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{$ as t,C as n,D as r,Ft as i,Ht as a,Jt as o,X as ee,d as te,in as s,nt as ne,r as re}from"./lib-zDxoqrgo.js";import{t as ie}from"./vue-ui-xy-DSyKSn4L.js";import{n as ae,t as oe}from"./useHints-BH9r_0Vd.js";import{t as se}from"./useConfig-CKdzPrcf.js";import{t as c}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{t as l}from"./BaseIcon-Cz30ODFA.js";import{t as ce}from"./vue-ui-donut-DaYxdQmP.js";import{Fragment as u,computed as d,createBlock as le,createCommentVNode as f,createElementBlock as p,createElementVNode as m,createTextVNode as h,createVNode as ue,defineAsyncComponent as de,nextTick as fe,normalizeClass as g,normalizeStyle as _,onMounted as pe,openBlock as v,ref as y,renderList as b,toDisplayString as x,unref as S,useCssVars as me,vModelSelect as he,vModelText as ge,watch as _e,withCtx as ve,withDirectives as ye,withKeys as be,withModifiers as xe}from"vue";var Se=/* @__PURE__ */ e({default:()=>dn}),Ce=[`innerHTML`],we=[`data-is-open`],Te={class:`vue-ui-table-export-hub-options`},Ee={class:`vue-ui-table-export-hub-option-wrapper`},De={class:`label`},Oe=[`innerHTML`],ke={class:`vue-ui-table-export-hub-option-wrapper`},Ae={class:`label`},je=[`innerHTML`],Me={class:`vue-ui-table-dialog-field`},Ne={class:`label vue-ui-table-dialog-input-label`,style:{width:`100%`}},Pe={style:{width:`fit-content`}},Fe={class:`vue-ui-table`},Ie={key:0},Le={key:0},Re={key:1},ze={key:0,style:{display:`flex`,"align-items":`center`,"justify-content":`flex-end`}},Be=[`innerHTML`],Ve={key:0,style:{"margin-left":`3px`}},He={key:0},Ue={class:`th-filter`},We={key:0,class:`th-date`},Ge={class:`date-wrapper--inputs`},Ke={class:`date-fieldset`},qe=[`for`],Je=[`id`,`onUpdate:modelValue`,`onInput`],Ye={class:`date-fieldset`},Xe=[`for`],Ze=[`id`,`onUpdate:modelValue`,`onInput`],Qe={class:`date-wrapper--button`},$e=[`onClick`],et=[`innerHTML`],tt=[`innerHTML`],nt=[`innerHTML`],rt=[`onClick`,`disabled`],it=[`placeholder`,`onUpdate:modelValue`,`name`],at=[`onClick`],ot=[`innerHTML`],st=[`innerHTML`],ct=[`innerHTML`],lt=[`onClick`,`innerHTML`],ut=[`innerHTML`],dt={key:5,class:`th-range-filter`},ft=[`for`],pt=[`id`,`max`,`min`,`onUpdate:modelValue`],mt=[`id`,`max`,`min`,`onUpdate:modelValue`],ht=[`for`],gt=[`onClick`,`disabled`],_t=[`id`],vt=[`onClick`],yt=[`onClick`,`onKeyup`],bt=[`innerHTML`,`onClick`,`onKeyup`],xt=[`data-row`],St=[`data-row`],Ct=[`data-row`,`onClick`,`onKeyup`,`id`],wt=[`innerHTML`],Tt={key:1},Et={key:2},Dt={key:5},Ot=[`innerHTML`],kt={key:0},At={style:{"margin-left":`12px`}},jt={class:`format-num`},Mt={style:{"margin-left":`12px`}},Nt={key:0,class:`format-num`},Pt={key:1,class:`format-num`},Ft={key:2},It={style:{"margin-left":`12px`}},Lt={key:0,class:`format-num`},Rt={key:1,class:`format-num`},zt={key:2},Bt={key:1,class:`vue-ui-table-paginator format-num`},Vt={key:2,class:`vue-ui-table-size-warning`},Ht=[`innerHTML`],Ut={key:4,class:`vue-ui-table-pagination format-num`},Wt=[`innerHTML`,`disabled`],Gt=[`disabled`],Kt={for:`pageScroller`,style:{"font-size":`14px`}},qt=[`max`,`value`],Jt={key:1},Yt=[`disabled`],Xt=[`innerHTML`,`disabled`],Zt={class:`vue-ui-table-chart-modal-options`},Qt=[`innerHTML`],$t=[`innerHTML`],en=[`innerHTML`],tn={style:{width:`100%`,height:`fit-content`}},nn={class:`vue-ui-table-fieldset`},rn={class:`vue-ui-table-fieldset-wrapper`},an=[`name`,`id`,`checked`,`onInput`],on=[`for`],sn=[`disabled`],cn=[`innerHTML`],ln={style:{width:`100%`,"margin-bottom":`12px`}},un={key:2,style:{width:`100%`,"margin-bottom":`32px`}},dn=/*#__PURE__*/ c({__name:`vue-ui-table`,props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},emits:[`page-change`],setup(e,{expose:c,emit:Se}){me(e=>({v6b779b9d:Ln.value,v71f90aa0:Rn.value,v82bf5584:Hn.value,bc0e3a90:zn.value,v4bc5be6a:Un.value,v542dfbf0:Wn.value,v5935dfae:Bn.value,v23648322:Vn.value,v98d33e98:Gn.value}));let dn=de(()=>import(`./BaseDraggableDialog-T1gEsQid.js`).then(e=>e.n)),C=e,fn=Se,{vue_ui_table:pn}=se(),mn=ee();y(null);let hn=y(null),gn=y(null),w=y({height:316,type:`bar`,width:512}),T=y({ASC:1,BAR:`bar`,DATE:`date`,DESC:-1,DONUT:`donut`,LINE:`line`,NUMERIC:`numeric`,PERCENTAGE:`percentage`,TEXT:`text`}),_n=y(100),vn=y(100);y(0),y(0),y(400),y(200);let yn=y({CELL:`smart-td-selected`,FIRST_TD:`smart-td-selected-first`,LAST_TD:`smart-td-selected-last`,ROW:`smart-td-selected-neighbor`}),bn=y(void 0),xn=y(void 0),E=y({col:void 0,rows:[]}),D=y(0),O=y(20),Sn=y(!1),Cn=y(!1),k=y({}),A=y({}),wn=y({}),j=y({}),M=y({}),N=y({}),P=y({}),F=y({}),I=y({}),Tn=y(C.config.rowsPerPage?C.config.rowsPerPage:25),En=y([.../* @__PURE__ */ new Set([10,25,50,100,250,500,C.config.rowsPerPage?C.config.rowsPerPage:25,C.dataset.body.length])].sort((e,t)=>e-t)),Dn=y(void 0),L=y(void 0),On=y(void 0),R=y(!1),kn=y(0),An=y(``),jn=y(``),z=y(!1),B=y(JSON.parse(JSON.stringify(C.dataset.body)).map((e,t)=>({...e,absoluteIndex:t}))),Mn=y(JSON.parse(JSON.stringify(C.dataset.body)).map((e,t)=>({...e,absoluteIndex:t}))),V=y(JSON.parse(JSON.stringify(C.dataset.header)).map((e,t)=>({average:Object.hasOwn(e,`average`)?e.average:!1,decimals:Object.hasOwn(e,`decimals`)?e.decimals:0,isMultiselect:Object.hasOwn(e,`isMultiselect`)?e.isMultiselect:!1,isPercentage:Object.hasOwn(e,`isPercentage`)?e.isPercentage:!1,isSearch:Object.hasOwn(e,`isSearch`)?e.isSearch:!1,isSort:Object.hasOwn(e,`isSort`)?e.isSort:!1,name:e.name,percentageTo:Object.hasOwn(e,`percentageTo`)?e.percentageTo:void 0,prefix:Object.hasOwn(e,`prefix`)?e.prefix:``,rangeFilter:Object.hasOwn(e,`rangeFilter`)?e.rangeFilter:!1,suffix:Object.hasOwn(e,`suffix`)?e.suffix:``,sum:Object.hasOwn(e,`sum`)?e.sum:!1,type:e.type,index:t}))),Nn=d(()=>hn.value?hn.value.getBoundingClientRect().height+3:3),H=d(()=>{if(!Object.keys(C.config||{}).length)return pn;let e=s({defaultConfig:pn,userConfig:C.config});return n(e)}),U=d(()=>H.value.style.exportMenu),W=d(()=>H.value.style.title),G=d(()=>H.value.style.th),K=d(()=>H.value.style.inputs),Pn=d(()=>H.value.style.dropdowns),Fn=d(()=>H.value.style.closeButtons),q=d(()=>H.value.style.rows),J=d(()=>H.value.style.pagination),Y=d(()=>H.value.style.chart),In=d(()=>H.value.style);ae({config:()=>H.value,dataset:()=>C.dataset,component:`VueUiTable`,rules:[oe.noHint]});let X=d(()=>H.value.useCursorPointer),Ln=d(()=>G.value.buttons.cancel.inactive.backgroundColor),Rn=d(()=>G.value.buttons.cancel.inactive.color),zn=d(()=>G.value.buttons.cancel.active.backgroundColor),Bn=d(()=>G.value.buttons.filter.active.backgroundColor),Vn=d(()=>G.value.buttons.filter.active.color),Hn=d(()=>i(zn.value,.33)),Un=d(()=>o(zn.value,33)),Wn=d(()=>i(Bn.value,.33)),Gn=d(()=>o(Bn,33)),Kn=d(()=>[...V.value].filter(e=>e.type===T.value.DATE)),qn=d(()=>[``,...Kn.value.map(e=>e.name)]),Jn=d(()=>{let e=Kn.value.find(e=>e.name===An.value);return e?e.index:null}),Z=d(()=>{let e=[];if(B.value.length)for(let t=0;t<B.value.length;t+=Tn.value)e.push(B.value.slice(t,t+Tn.value));return e}),Yn=d(()=>Z.value[D.value]),Xn=d(()=>Jn.value==null?[]:Yn.value.map(e=>e.td[Jn.value])),Zn=d(()=>Object.keys(M.value).map(e=>({index:e,name:C.dataset.header[e].name,options:M.value[e]}))),Qn=d(()=>H.value.useChart&&E.value.rows.length>1),$n=d(()=>C.dataset.header.map(e=>e.type).includes(T.value.NUMERIC)),Q=d(()=>({arrowSort:`<svg xmlns="http://www.w3.org/2000/svg" width="${O.value}" height="${O.value}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M3 9l4 -4l4 4m-4 -4v14" /><path d="M21 15l-4 4l-4 -4m4 4v-14" /></svg>`,bar:`<svg xmlns="http://www.w3.org/2000/svg" width="${O.value}" height="${O.value}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M3 12m0 1a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v6a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1z" /><path d="M9 8m0 1a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v10a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1z" /><path d="M15 4m0 1a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v14a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1z" /><path d="M4 20l14 0" /></svg>`,chart:`<svg xmlns="http://www.w3.org/2000/svg" width="${O.value}" height="${O.value}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 19l16 0" /><path d="M4 15l4 -6l4 2l4 -5l4 4" /></svg>`,chevronDown:`<svg xmlns="http://www.w3.org/2000/svg" width="${O.value}" height="${O.value}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M6 9l6 6l6 -6" /></svg>`,chevronLeft:`<svg xmlns="http://www.w3.org/2000/svg" width="${O.value*1.6}" height="${O.value*1.6}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M15 6l-6 6l6 6" /></svg>`,chevronRight:`<svg xmlns="http://www.w3.org/2000/svg" width="${O.value*1.6}" height="${O.value*1.6}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M9 6l6 6l-6 6" /></svg>`,donut:`<svg xmlns="http://www.w3.org/2000/svg" width="${O.value*.8}" height="${O.value*.8}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M12 3v5m4 4h5" /><path d="M8.929 14.582l-3.429 2.918" /><path d="M12 12m-4 0a4 4 0 1 0 8 0a4 4 0 1 0 -8 0" /><path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" /></svg>`,export:`<svg xmlns="http://www.w3.org/2000/svg" width="${O.value}" height="${O.value}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M12.5 21h-7.5a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v7.5" /><path d="M3 10h18" /><path d="M10 3v18" /><path d="M16 19h6" /><path d="M19 16l3 3l-3 3" /></svg>`,fileDownload:`<svg xmlns="http://www.w3.org/2000/svg" width="${O.value}" height="${O.value}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M14 3v4a1 1 0 0 0 1 1h4" /><path d="M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z" /><path d="M12 17v-6" /><path d="M9.5 14.5l2.5 2.5l2.5 -2.5" /></svg>`,filter:`<svg xmlns="http://www.w3.org/2000/svg" width="${O.value}" height="${O.value}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 4h16v2.172a2 2 0 0 1 -.586 1.414l-4.414 4.414v7l-6 2v-8.5l-4.48 -4.928a2 2 0 0 1 -.52 -1.345v-2.227z" /></svg>`,move:`<svg xmlns="http://www.w3.org/2000/svg" width="${O.value}" height="${O.value}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 9l3 3l-3 3" /><path d="M15 12h6" /><path d="M6 9l-3 3l3 3" /><path d="M3 12h6" /><path d="M9 18l3 3l3 -3" /><path d="M12 15v6" /><path d="M15 6l-3 -3l-3 3" /><path d="M12 3v6" /></svg>`,sort09:`<svg xmlns="http://www.w3.org/2000/svg" width="${O.value}" height="${O.value}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 15l3 3l3 -3" /><path d="M7 6v12" /><path d="M17 3a2 2 0 0 1 2 2v3a2 2 0 1 1 -4 0v-3a2 2 0 0 1 2 -2z" /><path d="M17 16m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0" /><path d="M19 16v3a2 2 0 0 1 -2 2h-1.5" /></svg>`,sort90:`<svg xmlns="http://www.w3.org/2000/svg" width="${O.value}" height="${O.value}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 15l3 3l3 -3" /><path d="M7 6v12" /><path d="M17 14a2 2 0 0 1 2 2v3a2 2 0 1 1 -4 0v-3a2 2 0 0 1 2 -2z" /><path d="M17 5m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0" /><path d="M19 5v3a2 2 0 0 1 -2 2h-1.5" /></svg>`,sortAZ:`<svg xmlns="http://www.w3.org/2000/svg" width="${O.value}" height="${O.value}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M15 10v-5c0 -1.38 .62 -2 2 -2s2 .62 2 2v5m0 -3h-4" /><path d="M19 21h-4l4 -7h-4" /><path d="M4 15l3 3l3 -3" /><path d="M7 6v12" /></svg>`,sortZA:`<svg xmlns="http://www.w3.org/2000/svg" width="${O.value}" height="${O.value}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M15 21v-5c0 -1.38 .62 -2 2 -2s2 .62 2 2v5m0 -3h-4" /><path d="M19 10h-4l4 -7h-4" /><path d="M4 15l3 3l3 -3" /><path d="M7 6v12" /></svg>`,sum:`<svg xmlns="http://www.w3.org/2000/svg" width="${O.value}" height="${O.value}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2" /></svg>`,table:`<svg xmlns="http://www.w3.org/2000/svg" width="${O.value}" height="${O.value}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" fill="white" d="M 10 2, 21 2, 21 21, 10 21Z"/><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M3 5a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-14z" /><path d="M3 10h18" /><path d="M10 3v18" /></svg>`,warning:`<svg xmlns="http://www.w3.org/2000/svg" width="${O.value*.8}" height="${O.value*.8}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M10.24 3.957l-8.422 14.06a1.989 1.989 0 0 0 1.7 2.983h16.845a1.989 1.989 0 0 0 1.7 -2.983l-8.423 -14.06a1.989 1.989 0 0 0 -3.4 0z" /><path d="M12 9v4" /><path d="M12 17h.01" /></svg>`,grip:`<svg xmlns="http://www.w3.org/2000/svg" width="${O.value}" height="${O.value}" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round"><path d="M5 9m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" /><path d="M5 15m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" /><path d="M12 9m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" /><path d="M12 15m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" /><path d="M19 9m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" /><path d="M19 15m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" /></svg>`})),er=d(()=>B.value.map(e=>e.td)),tr=d(()=>({sumPercentage:Number((E.value.rows.map(e=>e.value).reduce((e,t)=>e+t,0)*100).toFixed(C.dataset.header[E.value.col].decimals)).toLocaleString(),sumRegular:Number(E.value.rows.map(e=>e.value).reduce((e,t)=>e+t,0).toFixed(C.dataset.header[E.value.col].decimals)).toLocaleString(),averagePercentage:Number((E.value.rows.map(e=>e.value).reduce((e,t)=>e+t,0)/E.value.rows.length*100).toFixed(C.dataset.header[E.value.col].decimals)).toLocaleString(),averageRegular:Number((E.value.rows.map(e=>e.value).reduce((e,t)=>e+t,0)/E.value.rows.length).toFixed(C.dataset.header[E.value.col].decimals)).toLocaleString()})),nr=y({width:1e3,height:500});function rr({width:e,height:t}){nr.value={width:e,height:t}}let ir=d(()=>{if(!Qn.value)return[];let e=nr.value.height,t=nr.value.width,n=t/E.value.rows.length,r=Math.max(...E.value.rows.map(e=>e.value)),a=Math.min(...E.value.rows.map(e=>e.value)),o=C.dataset.header[E.value.col].isPercentage&&C.dataset.header[E.value.col].percentageTo,ee=w.value.type===T.value.DONUT&&L.value&&L.value.name,s=C.dataset.header[E.value.col].name+(o?` / ${C.dataset.header[N.value[E.value.col].referenceIndex].name}`:``)+(ee?` ${H.value.translations.by} ${L.value.name}`:``),ne=C.dataset.header[E.value.col].prefix,ie=C.dataset.header[E.value.col].suffix,ae=[{name:s,series:E.value.rows.map(e=>e.value),type:`line`,useProgression:!0,smooth:Y.value.layout.line.smooth,color:Y.value.layout.line.stroke,useArea:Y.value.layout.line.useArea}],oe=[{name:s,series:E.value.rows.map(e=>e.value),type:`bar`,useProgression:!0,color:Y.value.layout.bar.fill}],se=Y.value.modal.backgroundColor,c=re(se),l=C.dataset.header[E.value.col].decimals,ce={useCssAnimation:!1,chart:{width:t,height:e-250,backgroundColor:se,color:c,labels:{fontSize:18,prefix:ne,suffix:ie},grid:{stroke:i(c,.5),labels:{color:c,xAxisLabels:{color:c,show:Xn.value.length,values:Xn.value,datetimeFormatter:Y.value.layout.datetimeFormatter,showOnlyAtModulo:Y.value.layout.timeLabels.showOnlyAtModulo,modulo:Y.value.layout.timeLabels.modulo}}},highlighter:{color:c},legend:{color:c,show:!1},title:{text:s,color:c,textAlign:`center`,fontSize:18},tooltip:{showTimeLabel:Xn.value.length,backgroundOpacity:30,color:c,backgroundColor:se,showPercentage:!1,roundingValue:l},userOptions:{buttons:{pdf:!1,csv:!1,table:!1,annotator:!1}},zoom:{show:Y.value.layout.zoom.show,autoFit:Y.value.layout.zoom.autoFit,focusOnDrag:!0,minimap:{show:!0}}},line:{labels:{show:!0,color:c,rounding:l},dot:{useSerieColor:!1,fill:Y.value.layout.line.plot.fill,strokeWidth:Y.value.layout.line.plot.strokeWidth}},bar:{useGradient:!1,border:{useSerieColor:!1,stroke:Y.value.layout.bar.stroke,strokeWidth:Y.value.layout.bar.strokeWidth},labels:{show:!0,color:c,rounding:l}}},u=a>=0?0:Math.abs(a),d=r+u,le=C.dataset.header[E.value.col].isPercentage,f=E.value.rows.map((t,r)=>({x:n*r+n/2,y:(1-(t.value+u)/d)*e,value:le?t.value*100:t.value,suffix:le?`%`:C.dataset.header[E.value.col].suffix?C.dataset.header[E.value.col].suffix:``,prefix:C.dataset.header[E.value.col].prefix?C.dataset.header[E.value.col].prefix:``,index:t.index,absoluteValue:le?Math.abs(t.value)*100:Math.abs(t.value)}));return{donutConfig:{useCssAnimation:!1,userOptions:{position:`left`,buttons:{pdf:!1,csv:!1,table:!1,annotator:!1}},style:{chart:{backgroundColor:se,color:c,layout:{curvedMarkers:!0,donut:{strokeWidth:64},labels:{dataLabels:{suffix:le?`%`:``,prefix:ne},value:{rounding:l},percentage:{color:c,rounding:l},name:{color:c},hollow:{average:{color:c,text:H.value.translations.average,value:{color:c}},total:{color:c,offsetY:-12,text:H.value.translations.total,value:{color:c,offsetY:-12}}}}},legend:{backgroundColor:se,color:c,roundingValue:l,roundingPercentage:l},padding:{left:12,right:12},title:{text:s,color:c,fontSize:18},tooltip:{backgroundOpacity:30,color:c,backgroundColor:se,roundingValue:l,roundingValue:l}}}},xyConfig:ce,xyDatasetLine:ae,xyDatasetBar:oe,progression:f.length>=2&&te(f)}});function ar(){let e=L.value.options.map((e,t)=>({name:e,color:a[t]||a[t%a.length],values:[Yn.value.filter((t,n)=>t.td[L.value.index]===e&&E.value.rows.map(e=>e.index).includes(n)).map(e=>e.td[E.value.col]).reduce((e,t)=>Math.abs(e)+Math.abs(t),0)],absoluteValue:Yn.value.filter((t,n)=>t.td[L.value.index]===e&&E.value.rows.map(e=>e.index).includes(n)).map(e=>e.td[E.value.col]).reduce((e,t)=>e+t,0)})).sort((e,t)=>t.value-e.value);bn.value=e,fe(()=>{w.value.type=T.value.DONUT,z.value=!1})}function or(e,t){return!A.value[e]&&(t.isSort||t.isSearch||t.isMultiselect||t.rangeFilter)&&![T.value.DATE].includes(t.type)}function sr(e=`all`){let t=C.dataset.header.map(e=>e.name),n=e===`all`?B.value.map(e=>e.td):Yn.value.map(e=>e.td),i=[t].concat(n),a=r(i);ne({csvContent:a,title:jn.value})}function cr(){let e=document.getElementsByClassName(`th-dropdown`);e.length&&Array.from(e).forEach(e=>{e.dataset.isOpen=!1})}function lr(e,t){let n;clearTimeout(n),n=setTimeout(e,t)}function ur(){let e=document.getElementsByClassName(`tr_${mn}`);Array.from(e).forEach(e=>{Array.from(e.getElementsByTagName(`td`)).forEach(e=>{e.dataset.row===`even`?(e.style.background=q.value.even.backgroundColor,e.style.color=q.value.even.color):(e.style.background=q.value.odd.backgroundColor,e.style.color=q.value.odd.color)})}),Array.from(e).forEach(e=>e.dataset.selected=`false`),D.value>Z.value.length-1&&(D.value=Z.value.length-1),R.value=!1,bn.value=void 0,Dn.value=void 0,w.value.type=T.value.BAR,E.value={col:void 0,rows:[]},_n.value=100,vn.value=100}function dr(e,t){B.value=e.filter(e=>e.td[t]>=P.value[t].min&&e[t]<=P.value[t].max)}function fr(e,t){if(I.value[t]===T.value.ASC&&(e=e.sort((e,n)=>e[t]-n[t])),I.value[t]===T.value.DESC)e=e.sort((e,n)=>n[t]-e[t]);else return 0}function pr(){ur(),Object.keys(P.value).forEach(e=>{dr(B.value,e)}),Object.keys(I.value).forEach(e=>{fr(B.value,e)}),xn.value!==void 0&&fr(B.value,xn.value),C.dataset.header.forEach((e,t)=>{if(e.isPercentage){let e=N.value[t].referenceIndex,n=B.value.map(t=>t.td[e]).reduce((e,t)=>e+t,0);B.value.forEach(r=>{r.td[t]=r.td[e]/n})}}),D.value>Z.value.length-1&&(D.value=Z.value.length-1),[-1].includes(D.value)&&(D.value=0)}function mr(){B.value=Mn.value.filter(e=>{for(let t in F.value)if(!e.td[t].toUpperCase().includes(F.value[t].toUpperCase()))return!1;for(let t in M.value)if(!M.value[t].some(n=>n===e.td[t]))return!1;for(let t in k.value){let n=new Date(e.td[t]),r=new Date(k.value[t].from),i=new Date(k.value[t].to);if(n<r||n>i)return!1}return!0}),pr()}function hr(e){return er.value.map(t=>t[e]).map(e=>isNaN(Number(e))?0:e).reduce((e,t)=>e+t,0)/B.value.length}function gr(e){let t=C.dataset.body.map(t=>new Date(t.td[e])),n=new Date(Math.min(...t)),r=new Date(Math.max(...t)),i=n.getFullYear(),a=r.getFullYear(),o=String(n.getMonth()+1).padStart(2,`0`),ee=String(r.getMonth()+1).padStart(2,`0`),te=String(n.getDate()).padStart(2,`0`),s=String(r.getDate()).padStart(2,`0`);return{from:`${i}-${o}-${te}`,to:`${a}-${ee}-${s}`}}function $(e){return[...new Set(C.dataset.body.map(t=>t.td[e]))]}function _r(e){return er.value.map(t=>t[e]).map(e=>isNaN(Number(e))?0:e).reduce((e,t)=>e+t,0)}function vr(e){return e.includes(NaN)}function yr(e,t){return!M.value[t]||M.value[t].includes(e)}function br(e){return!isNaN(Number(String(e).replaceAll(`%`,``)))}function xr(e,t){let n=t.isSort,r=t.isSearch,i=t.isMultiselect&&M.value[e],a=t.rangeFilter,o=e=>{if(a&&P.value[e])return Math.round(P.value[e].min)===j.value[e].min&&Math.round(P.value[e].max)===j.value[e].max};if(n&&r&&i&&a)return[``,void 0].includes(F.value[e])&&[void 0].includes(I.value[e])&&M.value[e].length===$(e).length&&o(e);if(n&&r&&i)return[``,void 0].includes(F.value[e])&&[void 0].includes(I.value[e])&&M.value[e].length===$(e).length;if(n&&r&&a)return[``,void 0].includes(F.value[e])&&[void 0].includes(I.value[e])&&o(e);if(n&&r)return[``,void 0].includes(F.value[e])&&[void 0].includes(I.value[e]);if(n&&i&&a)return[void 0].includes(I.value[e])&&M.value[e].length===$(e).length&&o(e);if(n&&i)return[void 0].includes(I.value[e])&&M.value[e].length===$(e).length;if(r&&i&&a)return[``,void 0].includes(F.value[e])&&M.value[e].length===$(e).length&&o(e);if(r&&i)return[``,void 0].includes(F.value[e])&&M.value[e].length===$(e).length;if(r&&a)return[``,void 0].includes(F.value[e])&&o(e);if(r)return[``,void 0].includes(F.value[e]);if(n&&a)return[void 0].includes(I.value[e])&&o(e);if(n)return[void 0].includes(I.value[e]);if(i&&a)return M.value[e].length===$(e).length&&o(e);if(i)return M.value[e].length===$(e).length}function Sr(){return{totalPages:Z.value.length,itemsPerPage:Tn.value,currentPage:D.value,currentPageData:Yn.value.map(e=>e.td)}}c({getCurrentPageData:Sr});function Cr(){fn(`page-change`,Sr())}let wr=y(null);function Tr(e){if(ur(),e===`next`&&D.value<Z.value.length){if(D.value+1>Z.value.length-1)return;D.value+=1}else if(e===`previous`&&D.value>=1)--D.value;else{if(e-1<0||e>Z.value.length||e===`previous`)return;D.value=e-1}Cr(),wr.value&&wr.value.scrollTo({top:0,left:0,behavior:`smooth`})}function Er(e){e.preventDefault();let t=e.keyCode;if(![38,40,37,39].includes(t))return;let n=e.target.id.match(/cell_(\d+)_(\d+)_([0-9a-fA-F-]{36})/),r=parseInt(n[1]),i=parseInt(n[2]),a=document.getElementById(`cell_${r}_${i+1}_${mn}`),o=document.getElementById(`cell_${r}_${i-1}_${mn}`),ee=document.getElementById(`cell_${r+1}_${i}_${mn}`),te=document.getElementById(`cell_${r-1}_${i}_${mn}`),s;switch(!0){case t===39:s=a;break;case t===37:s=o;break;case t===38:s=te;break;case t===40:s=ee;break;default:return}s&&(s.focus(),s.scrollIntoView({behavior:`smooth`,block:`center`}))}function Dr(e){let t=0;for(let n=0;n<e.length;n+=1)t+=e.charCodeAt(n);return t}async function Or(){return new Promise(e=>{let t=[];V.value.forEach((e,n)=>{if(e.isSearch&&Object.assign(F.value,{[n]:``}),e.isMultiselect&&Object.assign(M.value,{[n]:$(n)}),e.type===T.value.DATE&&(Object.assign(k.value,{[n]:gr(n)}),Object.assign(wn.value,{[n]:!1})),(e.isPercentage||e.percentageTo)&&Object.assign(N.value,{[n]:{reference:e.percentageTo,referenceIndex:C.dataset.header.map(e=>e.name).indexOf(e.percentageTo)}}),e.rangeFilter&&(Object.assign(P.value,{[n]:{min:Math.round(Math.min(...C.dataset.body.map(e=>e.td).map(e=>e[n]))),max:Math.round(Math.max(...C.dataset.body.map(e=>e.td).map(e=>e[n])))}}),Object.assign(j.value,{[n]:{min:Math.round(Math.min(...C.dataset.body.map(e=>e.td).map(e=>e[n]))),max:Math.round(Math.max(...C.dataset.body.map(e=>e.td).map(e=>e[n])))}})),e.isPercentage){let r=C.dataset.header.map(e=>e.name).indexOf(e.percentageTo),i=C.dataset.body.map(e=>e.td[r]).reduce((e,t)=>e+t,0);t.push([n,r,i])}e.type===T.value.NUMERIC&&!e.isPercentage&&Object.assign(A.value,{[n]:vr(C.dataset.body.map(e=>Number(e.td[n])))})}),B.value.forEach((e,n)=>{t.map(t=>{let[n,r,i]=t;e.td[n]=e.td[r]/i}),e.td.forEach((t,r)=>{C.dataset.header[r].type===T.value.TEXT&&C.dataset.header[r].isSearch&&(e[r]=Dr(t)),C.dataset.header[r].type===T.value.DATE&&(e[r]=new Date(t).getTime()),C.dataset.header[r].type===T.value.NUMERIC&&(e[r]=isNaN(Number(t))?r:t),Mn.value[n][r]=e[r]})}),e(!0)})}function kr(e,t){return new Promise((n,r)=>{e().then(e=>{try{n(t(e))}catch(e){r(e)}}).catch(e=>{r(e)})})}async function Ar(e){k.value[e]={from:gr(e).from,to:gr(e).to},wn.value[e]=!1,await fe(),mr()}function jr(e,t,n){let r=n.currentTarget;clearTimeout(gn.value),r.classList.add(`clicked`),gn.value=setTimeout(()=>{r.classList.remove(`clicked`)},200),xn.value=void 0,t.rangeFilter&&(P.value[e].min=j.value[e].min,P.value[e].max=j.value[e].max),t.isMultiselect?(M.value[e]=$(e),t.type===T.value.TEXT&&(I.value[e]=void 0),t.isSearch&&(F.value[e]=``)):t.type===T.value.NUMERIC?I.value[e]=void 0:t.type===T.value.TEXT?(I.value[e]=void 0,F.value[e]=``):t.type===T.value.DATE&&(I.value[e]=void 0),mr()}function Mr({td:e,rowIndex:t,colIndex:n,headerType:r,event:i}){if(r!==T.value.NUMERIC||isNaN(Number(e))){ur();return}E.value.col!==n&&ur();let a=i.currentTarget.parentNode;E.value.col=n,E.value.rows.map(e=>e.index).includes(t)?(a.dataset.selected=`false`,E.value.rows=E.value.rows.filter(e=>e.index!==t),i.currentTarget.classList.remove(yn.value.CELL),Array.from(a.children).forEach((e,t)=>{e.dataset.row===`even`?(e.style.background=q.value.even.backgroundColor,e.style.color=q.value.even.olor):(e.style.background=q.value.odd.backgroundColor,e.style.color=q.value.odd.color)}),i.currentTarget.dataset.row===`even`?(i.currentTarget.style.background=q.value.even.backgroundColor,i.currentTarget.style.color=q.value.even.color):(i.currentTarget.style.background=q.value.odd.backgroundColor,i.currentTarget.style.color=q.value.odd.color)):(a.dataset.selected=`true`,E.value.rows.push({index:t,value:e}),Array.from(a.children).forEach((e,t)=>{e.dataset.row===`even`?(e.style.background=q.value.even.selectedNeighbors.backgroundColor,e.style.color=q.value.even.selectedNeighbors.color):(e.style.background=q.value.odd.selectedNeighbors.backgroundColor,e.style.color=q.value.odd.selectedNeighbors.color)}),i.currentTarget.dataset.row===`odd`?(i.currentTarget.style.background=q.value.odd.selectedCell.backgroundColor,i.currentTarget.style.color=q.value.odd.selectedCell.color):(i.currentTarget.style.background=q.value.even.selectedCell.backgroundColor,i.currentTarget.style.color=q.value.even.selectedCell.color)),E.value.rows=E.value.rows.sort((e,t)=>e.index-t.index),w.value.type===T.value.DONUT&&E.value.rows.length>0&&ar()}function Nr(e){E.value.col===e?(Dn.value=void 0,ur()):(Yn.value.forEach((t,n)=>{Mr({td:t.td[e],rowIndex:n,colIndex:e,headerType:T.value.NUMERIC,event:{currentTarget:document.getElementById(`cell_${n}_${e}_${mn}`)}})}),Dn.value=e)}async function Pr(e,t){M.value[t].includes(e)?M.value[t]=M.value[t].filter(t=>t!==e):M.value[t].push(e),await fe(),mr()}function Fr(e){wn.value[e]=gr(e).from!==k.value[e].from||gr(e).to!==k.value[e].to}function Ir(e,t){xn.value=e;let n=t.currentTarget;clearTimeout(gn.value),n.classList.add(`clicked`),gn.value=setTimeout(()=>{n.classList.remove(`clicked`)},200),I.value[e]===1?I.value[e]=T.value.DESC:I.value[e]=T.value.ASC,pr()}function Lr(e,t,n){let r=n.currentTarget;clearTimeout(gn.value),r.classList.add(`clicked`),gn.value=setTimeout(()=>{r.classList.remove(`clicked`)},200);let i=document.getElementById(`th_dropdown_${e}`);i.dataset.isOpen===`false`?i.dataset.isOpen=`true`:i.dataset.isOpen=`false`}function Rr(e){ur(),!e||!e.target.value?D.value=0:D.value=Number(e.target.value),Cr()}let zr=y(null);pe(()=>{if(C.dataset.header.length===0)throw Error(`vue-ui-table error: missing header data.
|
|
2
|
+
Provide an array of objects of type:
|
|
3
|
+
{
|
|
4
|
+
name: string;
|
|
5
|
+
type: string; ('text' | 'numeric' | 'date')
|
|
6
|
+
average: boolean;
|
|
7
|
+
decimals: number | undefined;
|
|
8
|
+
sum: boolean;
|
|
9
|
+
isSort:boolean;
|
|
10
|
+
isSearch: boolean;
|
|
11
|
+
isMultiselect: boolean;
|
|
12
|
+
isPercentage: boolean;
|
|
13
|
+
percentageTo: string; (or '')
|
|
14
|
+
}`);if(C.dataset.body.length===0)throw Error(`vue-ui-table error: missing body data`);Cn.value=!0,kr(Or,async()=>{await fe(),Cn.value=!1}),document.addEventListener(`keydown`,e=>{let t=document.activeElement;(t&&Array.from(t.classList).includes(`td-focusable`)&&e.key.includes(`Arrow`)||e.code===`Space`)&&e.preventDefault()}),jn.value=U.value.filename,An.value=Kn.value[0]?.name??``}),_e(()=>C.dataset,e=>{Cn.value=!0,B.value=JSON.parse(JSON.stringify(e.body)).map((e,t)=>({...e,absoluteIndex:t})),Mn.value=JSON.parse(JSON.stringify(e.body)).map((e,t)=>({...e,absoluteIndex:t})),V.value=JSON.parse(JSON.stringify(e.header)).map((e,t)=>({average:Object.hasOwn(e,`average`)?e.average:!1,decimals:Object.hasOwn(e,`decimals`)?e.decimals:0,isMultiselect:Object.hasOwn(e,`isMultiselect`)?e.isMultiselect:!1,isPercentage:Object.hasOwn(e,`isPercentage`)?e.isPercentage:!1,isSearch:Object.hasOwn(e,`isSearch`)?e.isSearch:!1,isSort:Object.hasOwn(e,`isSort`)?e.isSort:!1,name:e.name,percentageTo:Object.hasOwn(e,`percentageTo`)?e.percentageTo:void 0,prefix:Object.hasOwn(e,`prefix`)?e.prefix:``,rangeFilter:Object.hasOwn(e,`rangeFilter`)?e.rangeFilter:!1,suffix:Object.hasOwn(e,`suffix`)?e.suffix:``,sum:Object.hasOwn(e,`sum`)?e.sum:!1,type:e.type,index:t})),E.value={col:void 0,rows:[]},Dn.value=void 0,Tn.value=C.config.rowsPerPage?C.config.rowsPerPage:25,N.value={},k.value={},wn.value={},A.value={},j.value={},P.value={},M.value={},F.value={},I.value={},R.value=!1,bn.value=void 0,L.value=void 0,On.value=void 0,z.value=!1,E.value.col=void 0,E.value.rows=[],kr(Or,async()=>{Rr(),await fe(),Cn.value=!1})},{immediate:!0,deep:!0});let Br=y(null);return _e(Sn,e=>{e&&Br.value&&Br.value.focus()}),_e(R,e=>{e?zr.value&&zr.value.open():zr.value&&zr.value.close()}),(n,r)=>(v(),p(`div`,{class:`vue-data-ui-component vue-ui-table-main`,style:_(`font-family: ${H.value.fontFamily}`)},[U.value.show?(v(),p(`div`,{key:0,class:`vue-ui-table-export-hub`,style:_({top:Nn.value+`px`})},[m(`button`,{onClick:r[0]||=e=>Sn.value=!Sn.value,innerHTML:Q.value.export,style:_(`background:${U.value.backgroundColor};color:${U.value.color};cursor:${X.value?`pointer`:`default`}`)},null,12,Ce),m(`div`,{class:`vue-ui-table-export-hub-dropdown`,"data-is-open":Sn.value||`false`,style:_(`background:${U.value.backgroundColor};color:${U.value.color}`)},[r[24]||=m(`b`,{class:`vue-ui-table-export-hub-title`},` Export `,-1),m(`button`,{class:`close-dropdown`,onClick:r[1]||=e=>Sn.value=!1,style:_(`background:${Fn.value.backgroundColor};color:${Fn.value.color};border-radius:${Fn.value.borderRadius}`)},` ✖ `,4),m(`div`,Te,[m(`div`,Ee,[m(`div`,De,x(H.value.translations.exportAllLabel)+` (`+x(B.value.length)+`) `,1),m(`button`,{id:`exportAll`,onClick:r[2]||=e=>sr(`all`),style:_(`background:${U.value.buttons.backgroundColor};color:${U.value.buttons.color};cursor:${X.value?`pointer`:`default`}`)},[m(`div`,{innerHTML:Q.value.fileDownload},null,8,Oe),m(`span`,null,x(H.value.translations.exportAllButton),1)],4)]),m(`div`,ke,[m(`div`,Ae,x(H.value.translations.exportPageLabel),1),m(`button`,{id:`exportPage`,onClick:r[3]||=e=>sr(`page`),style:_(`background:${U.value.buttons.backgroundColor};color:${U.value.buttons.color};cursor:${X.value?`pointer`:`default`}`)},[m(`div`,{innerHTML:Q.value.fileDownload},null,8,je),m(`span`,null,x(H.value.translations.exportPageButton),1)],4)]),m(`div`,Me,[m(`label`,Ne,[m(`span`,Pe,x(H.value.translations.filename),1),ye(m(`input`,{name:`filename`,ref_key:`filenameInputRef`,ref:Br,onKeydown:r[4]||=be(xe(()=>{},[`stop`]),[`space`]),pattern:`.*`,class:`vue-ui-table-dialog-input`,type:`text`,"onUpdate:modelValue":r[5]||=e=>jn.value=e},null,544),[[ge,jn.value]])]),jn.value?(v(),p(`button`,{key:0,class:`vue-ui-table-dialog-field-button`,onClick:r[6]||=e=>jn.value=``,style:_({cursor:X.value?`pointer`:`default`})},[ue(l,{name:`close`,stroke:U.value.color,size:18},null,8,[`stroke`])],4)):f(``,!0)])])],12,we)],4)):f(``,!0),m(`div`,{class:`vue-ui-table__wrapper`,style:_(`max-height:${H.value.maxHeight}px`),ref_key:`tableWrapper`,ref:wr},[m(`table`,Fe,[W.value.text?(v(),p(`caption`,{key:0,class:`vue-ui-table__caption`,ref_key:`tableCaption`,ref:hn,style:_({textAlign:W.value.textAlign,paddingLeft:W.value.paddingLeft+`px`,paddingRight:W.value.paddingRight+`px`,backgroundColor:W.value.backgroundColor,boxShadow:`${W.value.backgroundColor} -1px 0px 0px 0px`})},[m(`span`,{style:_({fontSize:W.value.fontSize+`px`,fontWeight:W.value.bold?`bold`:`normal`,color:W.value.color})},x(W.value.text),5),W.value.subtitle.text?(v(),p(u,{key:0},[r[25]||=m(`br`,null,null,-1),m(`span`,{style:_({fontSize:W.value.subtitle.fontSize,fontWeight:W.value.subtitle.bold?`bold`:`normal`,color:W.value.subtitle.color})},x(W.value.subtitle.text),5)],64)):f(``,!0)],4)):f(``,!0),m(`thead`,{id:`tableHead`,class:`vue-ui-table__head`,style:_({background:G.value.backgroundColor,boxShadow:`-1px 0 0 ${G.value.backgroundColor}`,top:Nn.value-3+`px`})},[m(`tr`,null,[r[26]||=m(`th`,{class:`invisible-cell`},null,-1),(v(!0),p(u,null,b(V.value,(e,t)=>(v(),p(`th`,{key:`thead_${t}`,style:_(`overflow: visible;background:${G.value.backgroundColor};color:${G.value.color};outline:${G.value.outline}`),class:g({"th-has-nan":A.value[t]})},[$n.value&&([T.value.TEXT,T.value.DATE].includes(e.type)||e.isPercentage)?(v(),p(`span`,Ie,[h(x(e.name)+` `,1),e.isPercentage?(v(),p(`span`,Le,` / `+x(e.percentageTo),1)):f(``,!0)])):(v(),p(`span`,Re,x(e.name),1))],6))),128))]),$n.value?(v(),p(u,{key:0},[m(`tr`,null,[r[27]||=m(`th`,{class:`invisible-cell`},null,-1),(v(!0),p(u,null,b(V.value,(e,n)=>(v(),p(`th`,{key:`thead_${n}`,class:g({"th-numeric":!0,"th-has-nan":A.value[n]}),style:_(`background:${G.value.backgroundColor};color:${G.value.color};outline:${G.value.outline}`)},[e.sum&&!A.value[n]?(v(),p(`span`,ze,[m(`span`,{innerHTML:Q.value.sum,style:{"margin-bottom":`-4px`,"margin-right":`3px`}},null,8,Be),h(` `+x(S(t)({p:e.prefix,v:Number(_r(n)),s:e.suffix,r:e.decimals}))+` `,1),N.value[n]&&e.percentageTo&&!e.isPercentage?(v(),p(`span`,Ve,` (`+x(isNaN(_r(n)/_r(N.value[n].referenceIndex))?`-`:S(t)({v:_r(n)/_r(N.value[n].referenceIndex)*100,s:`%`,r:e.decimals}))+`) `,1)):f(``,!0)])):f(``,!0)],6))),128))]),m(`tr`,null,[r[28]||=m(`th`,{class:`invisible-cell`},null,-1),(v(!0),p(u,null,b(V.value,(e,n)=>(v(),p(`th`,{key:`thead_${n}`,class:g({"th-numeric":!0,"th-has-nan":A.value[n]}),style:_(`background:${G.value.backgroundColor};color:${G.value.color};outline:${G.value.outline}`)},[e.average&&!A.value[n]?(v(),p(`span`,He,` ~ `+x(isNaN(hr(n))?``:S(t)({p:e.prefix,v:Number(hr(n)),s:e.suffix,r:e.decimals})),1)):f(``,!0)],6))),128))]),m(`tr`,null,[r[31]||=m(`th`,{class:`invisible-cell`},null,-1),(v(!0),p(u,null,b(V.value,(e,t)=>(v(),p(`th`,{key:`thead_${t}`,class:g({"th-has-nan":A.value[t]}),style:_(`background:${G.value.backgroundColor};color:${G.value.color};outline:${G.value.outline}`)},[m(`div`,Ue,[e.type===T.value.DATE&&k.value[t]?(v(),p(`div`,We,[m(`div`,Ge,[m(`div`,Ke,[m(`label`,{for:`from_${t}`},x(H.value.translations.from),9,qe),ye(m(`input`,{id:`from_${t}`,type:`date`,"onUpdate:modelValue":e=>k.value[t].from=e,onInput:e=>{mr(),Fr(t)},style:_(`background:${K.value.backgroundColor};color:${K.value.color};border:${K.value.border}`)},null,44,Je),[[ge,k.value[t].from]])]),m(`div`,Ye,[m(`label`,{for:`to_${t}`},x(H.value.translations.to),9,Xe),ye(m(`input`,{id:`to_${t}`,type:`date`,"onUpdate:modelValue":e=>k.value[t].to=e,onInput:e=>{mr(),Fr(t)},style:_(`background:${K.value.backgroundColor};color:${K.value.color};border:${K.value.border}`)},null,44,Ze),[[ge,k.value[t].to]])])]),m(`div`,Qe,[e.isSort?(v(),p(`button`,{key:0,onClick:e=>Ir(t,e),class:g({"th-button-active":[T.value.DESC,T.value.ASC].includes(I.value[t])}),style:_(`cursor:${X.value?`pointer`:`default`}; background:${[T.value.DESC,T.value.ASC].includes(I.value[t])?``:G.value.buttons.filter.inactive.backgroundColor};color:${[T.value.DESC,T.value.ASC].includes(I.value[t])?``:G.value.buttons.filter.inactive.color}`)},[I.value[t]===T.value.ASC?(v(),p(`span`,{key:0,innerHTML:[T.value.DATE].includes(e.type)?Q.value.sort09:Q.value.sortAZ},null,8,et)):I.value[t]===T.value.DESC?(v(),p(`span`,{key:1,innerHTML:[T.value.DATE].includes(e.type)?Q.value.sort90:Q.value.sortZA},null,8,tt)):(v(),p(`span`,{key:2,innerHTML:Q.value.arrowSort},null,8,nt))],14,$e)):f(``,!0),m(`button`,{onClick:n=>{Ar(t),jr(t,e,n)},disabled:!wn.value[t]&&xr(t,e),class:`th-reset`,style:_({cursor:X.value?`pointer`:`default`})},` ✖ `,12,rt)])])):f(``,!0),e.isSearch?ye((v(),p(`input`,{key:1,placeholder:H.value.translations.inputPlaceholder,"onUpdate:modelValue":e=>F.value[t]=e,onInput:r[7]||=e=>lr(mr,400),name:`search_${t}`,style:_(`background:${K.value.backgroundColor};color:${K.value.color};border:${K.value.border}`)},null,44,it)),[[ge,F.value[t]]]):f(``,!0),!A.value[t]&&e.isSort&&e.type!==T.value.DATE?(v(),p(`button`,{key:2,onClick:e=>Ir(t,e),class:g({"th-button-active":[T.value.DESC,T.value.ASC].includes(I.value[t])}),style:_(`cursor:${X.value?`pointer`:`default`};background:${[T.value.DESC,T.value.ASC].includes(I.value[t])?``:G.value.buttons.filter.inactive.backgroundColor};color:${[T.value.DESC,T.value.ASC].includes(I.value[t])?``:G.value.buttons.filter.inactive.color}`)},[I.value[t]===T.value.ASC?(v(),p(`span`,{key:0,innerHTML:[T.value.NUMERIC].includes(e.type)?Q.value.sort09:Q.value.sortZA},null,8,ot)):I.value[t]===T.value.DESC?(v(),p(`span`,{key:1,innerHTML:[T.value.NUMERIC].includes(e.type)?Q.value.sort90:Q.value.sortAZ},null,8,st)):(v(),p(`span`,{key:2,innerHTML:Q.value.arrowSort},null,8,ct))],14,at)):f(``,!0),e.isMultiselect?(v(),p(`button`,{key:3,onClick:n=>Lr(t,e,n),innerHTML:Q.value.filter,class:g({"th-button-active":M.value[t]&&M.value[t].length!==$(t).length}),style:_(`cursor:${X.value?`pointer`:`default`};background:${M.value[t]&&M.value[t].length!==$(t).length?``:G.value.buttons.filter.inactive.backgroundColor};color:${M.value[t]&&M.value[t].length!==$(t).length?``:G.value.buttons.filter.inactive.color}`)},null,14,lt)):f(``,!0),E.value.col===t&&Qn.value?(v(),p(`button`,{key:4,onClick:r[8]||=e=>R.value=!R.value,innerHTML:Q.value.chart,class:g({"th-button-active":R.value}),style:_(`cursor:${X.value?`pointer`:`default`};background:${R.value?``:G.value.buttons.filter.inactive.backgroundColor};color:${R.value?``:G.value.buttons.filter.inactive.color}`)},null,14,ut)):f(``,!0),e.rangeFilter&&P.value[t]&&!A.value[t]?(v(),p(`div`,dt,[m(`label`,{for:`rangeMin${t}`},[...r[29]||=[m(`span`,{style:{color:`grey`}},`ᒥ`,-1),h(` min `,-1),m(`span`,{style:{color:`grey`}},`ᒣ`,-1)]],8,ft),ye(m(`input`,{type:`number`,id:`rangeMin${t}`,max:j.value[t].max,min:j.value[t].min,"onUpdate:modelValue":e=>P.value[t].min=e,onInput:r[9]||=e=>lr(mr,400),style:_(`background:${K.value.backgroundColor};color:${K.value.color};border:${K.value.border}`)},null,44,pt),[[ge,P.value[t].min,void 0,{number:!0}]]),ye(m(`input`,{type:`number`,id:`rangeMax${t}`,max:j.value[t].max,min:j.value[t].min,"onUpdate:modelValue":e=>P.value[t].max=e,onInput:r[10]||=e=>lr(mr,400),style:_(`background:${K.value.backgroundColor};color:${K.value.color};border:${K.value.border}`)},null,44,mt),[[ge,P.value[t].max,void 0,{number:!0}]]),m(`label`,{for:`rangeMax${t}`},[...r[30]||=[m(`span`,{style:{color:`grey`}},`ᒪ`,-1),h(` max `,-1),m(`span`,{style:{color:`grey`}},`ᒧ`,-1)]],8,ht)])):f(``,!0),or(t,e)?(v(),p(`button`,{key:6,onClick:n=>jr(t,e,n),disabled:xr(t,e),class:`th-reset`,style:_({cursor:X.value?`pointer`:`default`})},` ✖ `,12,gt)):f(``,!0),e.isMultiselect?(v(),p(`div`,{key:7,class:`th-dropdown`,"data-is-open":`false`,id:`th_dropdown_${t}`,style:_(`background:${Pn.value.backgroundColor};color:${Pn.value.color}`)},[m(`button`,{class:`close-dropdown`,onClick:n=>Lr(t,e,n),style:_(`cursor:${X.value?`pointer`:`default`};background:${Fn.value.backgroundColor};color:${Fn.value.color}`)},` ✖ `,12,vt),(v(!0),p(u,null,b($(t),(e,n)=>(v(),p(`span`,{class:`th-option`,key:`th_option_${t}_${n}`,onClick:n=>Pr(e,t),onKeyup:[be(n=>Pr(e,t),[`enter`]),be(n=>Pr(e,t),[`space`])],style:_(`opacity:${yr(e,t)?1:.5}`),tabindex:`0`},[yr(e,t)?(v(),p(`span`,{key:0,style:_(`color:${Pn.value.icons.selected.color};margin-right:5px`),class:`th-icon-green`},x(Pn.value.icons.selected.unicode),5)):(v(),p(`span`,{key:1,style:_(`color:${Pn.value.icons.unselected.color};margin-right:5px`),class:`th-icon-red`},x(Pn.value.icons.unselected.unicode),5)),m(`span`,null,x(e),1)],44,yt))),128))],12,_t)):f(``,!0)])],6))),128))])],64)):f(``,!0),m(`tr`,null,[r[32]||=m(`th`,{class:`invisible-cell`},null,-1),(v(!0),p(u,null,b(V.value,(e,t)=>(v(),p(`th`,{key:`col_selector_${t}`,class:g({"vue-ui-table-col-selector":!A.value[t],"th-has-nan":A.value[t]}),style:_(`background:${t===Dn.value&&!A.value[t]?G.value.selected.backgroundColor:G.value.backgroundColor};color:${t===Dn.value&&!A.value[t]?G.value.selected.color:G.value.color};outline:${G.value.outline}`)},[A.value[t]?f(``,!0):(v(),p(`div`,{key:0,innerHTML:V.value[t].type===T.value.NUMERIC?Q.value.chevronDown:``,class:g({"col-selector":V.value[t].type===T.value.NUMERIC}),tabindex:`0`,style:_({cursor:X.value?`pointer`:`default`}),onClick:xe(e=>Nr(t),[`stop`]),onKeyup:be(e=>Nr(t),[`enter`])},null,46,bt))],6))),128))])],4),m(`tbody`,{onClick:cr,onKeydown:r[11]||=e=>Er(e)},[(v(!0),p(u,null,b(Yn.value,(n,r)=>(v(),p(`tr`,{key:`tbody_${r}`,"data-row":r%2==0?`odd`:`even`,class:g(`tr_${S(mn)}`),style:_(`${r%2==0?`background:${q.value.odd.backgroundColor};color:${q.value.odd.color}`:`background:${q.value.even.backgroundColor};color:${q.value.even.color}`}`)},[m(`td`,{class:`vue-ui-table-td-iteration`,"data-row":r%2==0?`odd`:`even`,style:_({outline:q.value.outline})},x(n.absoluteIndex+1),13,St),(v(!0),p(u,null,b(n.td,(i,a)=>(v(),p(`td`,{"data-row":r%2==0?`odd`:`even`,key:`td_${r}_${a}`,style:_(br(i)||e.dataset.header[a].type===T.value.DATE?`text-align:right;font-variant-numeric: tabular-nums;outline:${q.value.outline}`:`outline:${q.value.outline}`),onClick:t=>Mr({td:i,rowIndex:r,colIndex:a,headerType:e.dataset.header[a].type,event:t}),onKeyup:[be(t=>Mr({td:i,rowIndex:r,colIndex:a,headerType:e.dataset.header[a].type,event:t}),[`enter`]),be(t=>Mr({td:i,rowIndex:r,colIndex:a,headerType:e.dataset.header[a].type,event:t}),[`space`])],class:g({"td-numeric":e.dataset.header[a].type===T.value.NUMERIC,"td-focusable":!0,"td-has-nan":A.value[a]}),id:`cell_${r}_${a}_${S(mn)}`,tabindex:`0`},[n.meta&&n.meta.markerIndices.includes(a)&&n.meta.unicodeIcon?(v(),p(`span`,{key:0,style:_(`color:${n.meta.color};margin-right:3px`),innerHTML:n.meta.unicodeIcon},null,12,wt)):f(``,!0),e.dataset.header[a].type===T.value.DATE?(v(),p(`span`,Tt,x(e.dataset.header[a].prefix)+` `+x(new Date(i).toLocaleString().slice(0,10))+` `+x(e.dataset.header[a].suffix),1)):e.dataset.header[a].isPercentage?(v(),p(`span`,Et,x(S(t)({v:Number(i*100),s:`%`,r:e.dataset.header[a].decimals})),1)):N.value[a]&&e.dataset.header[a].percentageTo&&!e.dataset.header[a].isPercentage?(v(),p(`span`,{key:3,class:g({"td-nan":isNaN(Number(i))})},x(isNaN(Number(i))?`${i} is not ${T.value.NUMERIC}`:S(t)({p:e.dataset.header[a].prefix,v:Number(i),s:e.dataset.header[a].suffix,r:e.dataset.header[a].decimals}))+` (`+x(isNaN(Number(i))?``:S(t)({v:Number(i/_r(N.value[a].referenceIndex)*100),s:`%`,r:e.dataset.header[a].decimals}))+`) `,3)):e.dataset.header[a].type===T.value.NUMERIC?(v(),p(`span`,{key:4,class:g({"td-nan":isNaN(Number(i))})},x(isNaN(Number(i))?`${i} is not ${T.value.NUMERIC}`:S(t)({p:e.dataset.header[a].prefix,v:Number(i.toFixed(e.dataset.header[a].decimals)),s:e.dataset.header[a].suffix,r:e.dataset.header[a].decimals})),3)):(v(),p(`span`,Dt,x(e.dataset.header[a].prefix)+` `+x(i)+` `+x(e.dataset.header[a].suffix),1))],46,Ct))),128))],14,xt))),128))],32)])],4),m(`div`,{class:g({"td-selector-info":!0,"td-selector-info--active":E.value.col!==void 0&&E.value.rows.length}),style:_(`background:${In.value.infoBar.backgroundColor};color:${In.value.infoBar.color}`)},[E.value.col!==void 0&&E.value.rows.length?(v(),p(u,{key:0},[m(`div`,{innerHTML:Q.value.table,class:`td-selector-icon`},null,8,Ot),m(`span`,null,[m(`b`,null,[h(x(e.dataset.header[E.value.col].name)+` `,1),e.dataset.header[E.value.col].isPercentage?(v(),p(`span`,kt,` / `+x(e.dataset.header[N.value[E.value.col].referenceIndex].name),1)):f(``,!0)]),m(`span`,At,[h(x(H.value.translations.nb)+` : `,1),m(`b`,jt,x(E.value.rows.length),1)]),m(`span`,Mt,[h(x(H.value.translations.sum)+` : `,1),e.dataset.header[E.value.col].isPercentage?(v(),p(`b`,Nt,x(tr.value.sumPercentage),1)):(v(),p(`b`,Pt,x(e.dataset.header[E.value.col].prefix)+` `+x(tr.value.sumRegular)+` `+x(e.dataset.header[E.value.col].suffix),1)),e.dataset.header[E.value.col].isPercentage?(v(),p(`b`,Ft,`%`)):f(``,!0)]),m(`span`,It,[h(x(H.value.translations.average)+` : `,1),e.dataset.header[E.value.col].isPercentage?(v(),p(`b`,Lt,x(tr.value.averagePercentage),1)):(v(),p(`b`,Rt,x(e.dataset.header[E.value.col].prefix)+` `+x(tr.value.averageRegular)+` `+x(e.dataset.header[E.value.col].suffix),1)),e.dataset.header[E.value.col].isPercentage?(v(),p(`b`,zt,`%`)):f(``,!0)])]),m(`button`,{onClick:ur,class:`td-selector-info-reset`,style:_(`cursor:${X.value?`pointer`:`default`};background:${Fn.value.backgroundColor};color:${Fn.value.color};border-radius:${Fn.value.borderRadius}`)},` ✖ `,4)],64)):f(``,!0)],6),B.value.length>10?(v(),p(`div`,Bt,[h(x(H.value.translations.totalRows)+` : `+x(e.dataset.body.length)+` | `+x(H.value.translations.paginatorLabel)+` : `,1),B.value.length>10?ye((v(),p(`select`,{key:0,id:`paginatorSelector`,"onUpdate:modelValue":r[12]||=e=>Tn.value=e,onChange:r[13]||=e=>{ur(),Cr()},style:_(`background:${K.value.backgroundColor};color:${K.value.color};border:${K.value.border}`)},[(v(!0),p(u,null,b(En.value,(t,n)=>(v(),p(u,null,[B.value.length>t||e.dataset.body.length===t?(v(),p(`option`,{key:`paginator_option_${n}`},x(t),1)):f(``,!0)],64))),256))],36)),[[he,Tn.value,void 0,{number:!0}]]):f(``,!0)])):f(``,!0),Tn.value>=250?(v(),p(`div`,Vt,[m(`span`,{innerHTML:Q.value.warning},null,8,Ht),h(x(H.value.translations.sizeWarning),1)])):f(``,!0),Z.value.length>1&&Z.value.length<=10?(v(),p(`div`,{key:3,class:`vue-ui-table-navigation-indicator`,style:_(`background:${J.value.navigationIndicator.backgroundColor};width:calc(${D.value/(Z.value.length-1)*100}%)`)},null,4)):f(``,!0),Z.value.length>1?(v(),p(`div`,Ut,[m(`button`,{class:`vue-ui-table-navigation`,onClick:r[14]||=xe(e=>Tr(`previous`),[`stop`]),innerHTML:Q.value.chevronLeft,disabled:D.value===0,style:_(`cursor:${X.value?`pointer`:`default`};background:${J.value.buttons.backgroundColor};color:${J.value.buttons.color};opacity:${D.value===0?J.value.buttons.opacityDisabled:1}`)},null,12,Wt),Z.value.length>3?(v(),p(u,{key:0},[m(`button`,{class:`vue-ui-table-navigation`,onClick:r[15]||=xe(e=>Tr(1),[`stop`]),disabled:D.value===0,style:_(`cursor:${X.value?`pointer`:`default`};background:${J.value.buttons.backgroundColor};color:${J.value.buttons.color};opacity:${D.value===0?J.value.buttons.opacityDisabled:1}`)},` 1 `,12,Gt),Z.value.length>10?(v(),p(`div`,{key:0,class:`vue-ui-table-page-scroller-wrapper`,style:_({cursor:X.value?`pointer`:`default`})},[m(`label`,Kt,x(H.value.translations.page)+` `+x(D.value+1)+` / `+x(Z.value.length),1),m(`input`,{class:`vue-ui-table-page-scroller`,id:`pageScroller`,type:`range`,step:`1`,min:0,max:Z.value.length-1,onInput:r[16]||=e=>Rr(e),value:D.value,style:_(`background:${K.value.backgroundColor};color:${K.value.color};border:${K.value.border};accent-color:${K.value.accentColor}`)},null,44,qt)],4)):(v(),p(`span`,Jt,x(H.value.translations.page)+` `+x(D.value+1)+` / `+x(Z.value.length),1)),m(`button`,{class:`vue-ui-table-navigation`,onClick:r[17]||=xe(e=>Tr(Z.value.length),[`stop`]),disabled:D.value===Z.value.length-1,style:_(`cursor:${X.value?`pointer`:`default`};background:${J.value.buttons.backgroundColor};color:${J.value.buttons.color};opacity:${D.value===Z.value.length-1?J.value.buttons.opacityDisabled:1}`)},x(Z.value.length),13,Yt)],64)):(v(),p(u,{key:1},[h(x(H.value.translations.page)+` `+x(D.value+1)+` / `+x(Z.value.length),1)],64)),m(`button`,{class:`vue-ui-table-navigation`,onClick:r[18]||=xe(e=>Tr(`next`),[`stop`]),innerHTML:Q.value.chevronRight,disabled:D.value===Z.value.length-1,style:_(`cursor:${X.value?`pointer`:`default`};background:${J.value.buttons.backgroundColor};color:${J.value.buttons.color};opacity:${D.value===Z.value.length-1?J.value.buttons.opacityDisabled:1}`)},null,12,Xt)])):f(``,!0),ue(S(dn),{ref_key:`chartModal`,ref:zr,backgroundColor:Y.value.modal.backgroundColor,headerColor:Y.value.modal.color,color:Y.value.modal.color,forcedHeight:500,isCursorPointer:X.value,withPadding:``,withFullWidth:``,noLayerUpdate:``,onClose:r[23]||=e=>R.value=!1,onSize:rr},{before:ve(()=>[m(`div`,Zt,[Zn.value.length?(v(),p(`button`,{key:0,onClick:r[19]||=e=>z.value=!0,innerHTML:Q.value.donut,class:g({"is-active-chart":w.value.type===T.value.DONUT||z.value}),style:_(`cursor:${X.value?`pointer`:`default`};background:${w.value.type===T.value.DONUT||z.value?Y.value.modal.buttons.selected.backgroundColor:Y.value.modal.buttons.unselected.backgroundColor};color:${w.value.type===T.value.DONUT||z.value?Y.value.modal.buttons.selected.color:Y.value.modal.buttons.unselected.color}`)},null,14,Qt)):f(``,!0),m(`button`,{onClick:r[20]||=e=>{w.value.type=T.value.LINE,z.value=!1},innerHTML:Q.value.chart,class:g({"is-active-chart":w.value.type===T.value.LINE&&!z.value}),style:_(`cursor:${X.value?`pointer`:`default`};background:${w.value.type===T.value.LINE&&!z.value?Y.value.modal.buttons.selected.backgroundColor:Y.value.modal.buttons.unselected.backgroundColor};color:${w.value.type===T.value.LINE&&!z.value?Y.value.modal.buttons.selected.color:Y.value.modal.buttons.unselected.color}`)},null,14,$t),m(`button`,{onClick:r[21]||=e=>{w.value.type=T.value.BAR,z.value=!1},innerHTML:Q.value.bar,class:g({"is-active-chart":w.value.type===T.value.BAR&&!z.value}),style:_(`cursor:${X.value?`pointer`:`default`};background:${w.value.type===T.value.BAR&&!z.value?Y.value.modal.buttons.selected.backgroundColor:Y.value.modal.buttons.unselected.backgroundColor};color:${w.value.type===T.value.BAR&&!z.value?Y.value.modal.buttons.selected.color:Y.value.modal.buttons.unselected.color}`)},null,14,en)])]),content:ve(()=>[m(`div`,tn,[z.value&&Zn.value.length?(v(),p(`div`,{key:0,style:_(`background:${Y.value.modal.backgroundColor};color:${Y.value.modal.color}`)},[m(`fieldset`,nn,[m(`legend`,null,x(H.value.translations.chooseCategoryColumn),1),m(`div`,rn,[(v(!0),p(u,null,b(Zn.value,(e,t)=>(v(),p(`div`,{key:`donut_radio_${t}`,class:`vue-ui-table-fieldset-option`},[m(`input`,{type:`radio`,name:e.name,id:e.name,checked:L.value&&e.name===L.value.name,onInput:e=>L.value=Zn.value[t],style:_(`background:${K.value.backgroundColor};color:${K.value.color};border:${K.value.border};accent-color:${K.value.accentColor}`)},null,44,an),m(`label`,{for:e.name},x(e.name),9,on)]))),128))]),m(`button`,{class:`vue-ui-table-generate-donut`,disabled:!L.value,onClick:ar,style:_(`cursor:${X.value?`pointer`:`default`};background:${Y.value.modal.buttons.selected.backgroundColor};color:${Y.value.modal.buttons.selected.color}`)},[m(`div`,{style:{"margin-bottom":`-3px`},innerHTML:Q.value.donut},null,8,cn),h(` `+x(H.value.translations.makeDonut),1)],12,sn)])],4)):f(``,!0),[T.value.BAR,T.value.LINE].includes(w.value.type)&&!z.value?(v(),p(u,{key:1},[qn.value.length>1?(v(),p(`label`,{key:0,style:_({color:Y.value.modal.color})},[h(x(H.value.translations.xAxisLabels)+` `,1),ye(m(`select`,{"onUpdate:modelValue":r[22]||=e=>An.value=e},[(v(!0),p(u,null,b(qn.value,e=>(v(),p(`option`,null,x(e),1))),256))],512),[[he,An.value]])],4)):f(``,!0),m(`div`,ln,[w.value.type===T.value.LINE?(v(),le(ie,{key:`chart_line_${kn.value}`,dataset:ir.value.xyDatasetLine,config:ir.value.xyConfig},null,8,[`dataset`,`config`])):f(``,!0),w.value.type===T.value.BAR?(v(),le(ie,{key:`chart_bar_${kn.value}`,dataset:ir.value.xyDatasetBar,config:ir.value.xyConfig},null,8,[`dataset`,`config`])):f(``,!0)]),E.value.rows.length>=2?(v(),p(`div`,{key:1,class:`chart-trend`,style:_(`color:${Y.value.modal.color}`)},[r[33]||=m(`span`,null,`---`,-1),h(` Trend: `+x(S(t)({v:ir.value.progression.trend*100,s:`%`,r:1})),1)],4)):f(``,!0)],64)):f(``,!0),[T.value.DONUT].includes(w.value.type)&&!z.value?(v(),p(`div`,un,[ue(ce,{dataset:bn.value,config:ir.value.donutConfig},null,8,[`dataset`,`config`])])):f(``,!0)])]),_:1},8,[`backgroundColor`,`headerColor`,`color`,`isCursorPointer`])],4))}},[[`__scopeId`,`data-v-f35b07e9`]]);export{Se as n,dn as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{n as t,t as n}from"./userOptionsSlots-DYuo-E5m.js";import{D as r,Tt as i,X as a,at as ee,m as te,nt as o,r as ne,zt as re}from"./lib-zDxoqrgo.js";import{n as ie,t as ae}from"./useHints-BH9r_0Vd.js";import{t as oe}from"./useConfig-CKdzPrcf.js";import{t as se}from"./usePrinter-CnyKPIFM.js";import{t as ce}from"./Shape-tkp65OcG.js";import{t as s}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{t as le}from"./resolveChartConfig-BSo1Oe9n.js";import{t as ue}from"./useUserOptionState-CXlFnwPv.js";import{t as de}from"./vue_ui_table_heatmap-vfeY6r97.js";import{Fragment as c,computed as l,createBlock as fe,createCommentVNode as u,createElementBlock as d,createElementVNode as f,createSlots as pe,createVNode as me,defineAsyncComponent as he,guardReactiveProps as ge,mergeProps as p,nextTick as _e,normalizeClass as m,normalizeProps as ve,normalizeStyle as h,onMounted as g,openBlock as _,ref as v,renderList as y,renderSlot as b,unref as x,useCssVars as ye,useSlots as be,watch as xe,withCtx as S}from"vue";var C=/* @__PURE__ */ e({default:()=>N}),w=[`id`],T={role:`cell`},E={role:`row`},D=[`data-cell`],O={key:0,style:{display:`flex`,"flex-direction":`row`,gap:`2px`,"align-items":`center`}},k=[`height`,`width`],A={key:0,role:`cell`,"data-cell":`sum`},j={key:1,role:`cell`,"data-cell":`average`},M={key:2,role:`cell`,"data-cell":`median`},Se={key:1,ref:`source`,dir:`auto`},N=/*#__PURE__*/ s({__name:`vue-ui-table-heatmap`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(e,{expose:s}){ye(e=>({v63f427d8:ke.value,v4016fab3:Oe.value}));let C=he(()=>import(`./UserOptions-D65t74CM.js`).then(e=>e.n)),{vue_ui_table_heatmap:N}=oe(),P=e,F=v(a()),I=v(!1),L=v(null),R=v(!1),z=v(0),Ce=be(),B=l({get:()=>G(),set:e=>e}),V=l(()=>B.value.debug);g(()=>{Ce[`chart-background`]&&V.value&&console.warn(`VueUiTableHeatmap does not support the #chart-background slot.`)}),ie({config:()=>B.value,dataset:()=>P.dataset,component:`VueUiTableHeatmap`,rules:[ae.emptyArray,{test:e=>e.length>31,message:[`👀 The number of series is > 31. Consider:`,``,`▶️ Using filters to let users choose a maximum number of series to display.`]},{test:e=>e.some(e=>e?.values&&e?.values.length>31),message:[`👀 Some series have a number of data points > 31. Consider:`,``,`▶️ Using filters to let users choose a maximum number of data points to display.`]}]});let{userOptionsVisible:H,setUserOptionsVisibility:U,keepUserOptionState:W}=ue({config:B.value});function G(){return le(P.config,N,de)}xe(()=>P.config,e=>{B.value=G(),H.value=!B.value.userOptions.showOnChartHover,Y()},{deep:!0});let{isPrinting:we,isImaging:Te,generatePdf:K,generateImage:q}=se({elementId:`table_heatmap_${F.value}`,fileName:`vue-ui-table-heatmap`,options:B.value.userOptions.print}),J=l(()=>B.value.table.responsiveBreakpoint),Ee=l(()=>!!P.dataset&&P.dataset.length);g(()=>{Y()});function Y(){re(P.dataset)&&ee({componentName:`VueUiTableHeatmap`,type:`dataset`,debug:V.value});let e=new ResizeObserver(e=>{e.forEach(e=>{I.value=e.contentRect.width<J.value})});L.value&&e.observe(L.value)}let X=l(()=>P.dataset.map(e=>{let t=e.values.map(e=>isNaN(e)?0:e),n=t.reduce((e,t)=>e+t,0);return{...e,values:t,serieExtremes:{max:Math.max(...t),min:Math.min(...t)},sum:n,average:n/t.length,median:te(t),displayValues:[e.name,...e.values],id:a()}})),Z=l(()=>{let e=X.value.flatMap(e=>e.values);return{min:Math.min(...e),max:Math.max(...e)}});function De(e,t){let n=B.value.style.heatmapColors.useIndividualScale;return i(B.value.style.heatmapColors.min,B.value.style.heatmapColors.max,n?t.min:Z.value.min,n?t.max:Z.value.max,e)}let Q=l(()=>X.value.map(e=>({...e,colors:e.displayValues.map(t=>isNaN(t)?B.value.style.backgroundColor:De(t,e.serieExtremes))}))),Oe=l(()=>B.value.style.backgroundColor),ke=l(()=>`${B.value.table.borderWidth}px`);function $(e=null){_e(()=>{let t=Q.value.map(e=>[[e.name],e.displayValues,[e.sum],[e.average],[e.median]]),n=[[[``],B.value.table.head.values,[`sum`],[`average`],[`median`]]].concat(t),i=r(n);e?e(i):o({csvContent:i,title:`vue-ui-table-heatmap`})})}function Ae(e){R.value=e,z.value+=1}return s({generatePdf:K,generateCsv:$,generateImage:q}),(e,r)=>(_(),d(`div`,{ref_key:`tableContainer`,ref:L,style:h(`width:100%; overflow-x:auto; container-type: inline-size;padding-top:${B.value.userOptions.show?`36px`:``}; ${R.value?`vue-data-ui-wrapper-fullscreen`:``}; position:relative;`),class:m({"vue-data-ui-component":!0,"vue-ui-responsive":I.value}),id:`table_heatmap_${F.value}`,onMouseenter:r[0]||=()=>x(U)(!0),onMouseleave:r[1]||=()=>x(U)(!1)},[B.value.userOptions.show&&Ee.value&&(x(W)||x(H))?(_(),fe(x(C),{ref:`details`,key:`user_option_${z.value}`,backgroundColor:B.value.style.backgroundColor,color:B.value.style.color,isPrinting:x(we),isImaging:x(Te),uid:F.value,hasPdf:B.value.userOptions.buttons.pdf,hasXls:B.value.userOptions.buttons.csv,hasImg:B.value.userOptions.buttons.img,hasFullscreen:B.value.userOptions.buttons.fullscreen,isFullscreen:R.value,titles:{...B.value.userOptions.buttonTitles},chartElement:L.value,position:B.value.userOptions.position,callbacks:B.value.userOptions.callbacks,printScale:B.value.userOptions.print.scale,onToggleFullscreen:Ae,onGeneratePdf:x(K),onGenerateCsv:$,onGenerateImage:x(q),style:h({visibility:x(W)?x(H)?`visible`:`hidden`:`visible`})},pe({_:2},[y(x(t)(e.$slots,`menuIcon optionPdf optionCsv optionImg optionFullscreen custom-menu-before custom-menu-after`),t=>({name:t,fn:S(r=>[b(e.$slots,t,ve(ge(x(n)(t,r))),void 0,!0)])}))]),1032,[`backgroundColor`,`color`,`isPrinting`,`isImaging`,`uid`,`hasPdf`,`hasXls`,`hasImg`,`hasFullscreen`,`isFullscreen`,`titles`,`chartElement`,`position`,`callbacks`,`printScale`,`onGeneratePdf`,`onGenerateImage`,`style`])):u(``,!0),f(`table`,{class:m({"vue-ui-table-heatmap":!0}),style:h(`width:100%;font-family:${B.value.style.fontFamily};background:${B.value.style.backgroundColor};`)},[f(`caption`,null,[b(e.$slots,`caption`,{},void 0,!0)]),f(`thead`,null,[f(`tr`,{role:`row`,style:h(`background:${B.value.table.head.backgroundColor};color:${B.value.table.head.color}`)},[(_(!0),d(c,null,y(B.value.table.head.values,(t,n)=>(_(),d(`th`,T,[b(e.$slots,`head`,p({ref_for:!0},{value:t,rowIndex:n,type:typeof t,isResponsive:I.value}),void 0,!0)]))),256))],4)]),f(`tbody`,null,[(_(!0),d(c,null,y(Q.value,(t,n)=>(_(),d(`tr`,E,[(_(!0),d(c,null,y(t.displayValues,(r,i)=>(_(),d(`td`,{role:`cell`,"data-cell":B.value.table.head.values[i]},[t.color&&i===0?(_(),d(`div`,O,[t.color?(_(),d(`svg`,{key:0,height:B.value.style.shapeSize,width:B.value.style.shapeSize,viewBox:`0 0 20 20`,style:{background:`none`,overflow:`visible`}},[me(ce,{plot:{x:10,y:10},color:t.color,radius:9,shape:t.shape||`circle`},null,8,[`color`,`shape`])],8,k)):u(``,!0),b(e.$slots,`rowTitle`,p({ref_for:!0},{value:r,rowIndex:n,colIndex:i,type:typeof r,isResponsive:I.value}),void 0,!0)])):(_(),d(c,{key:1},[i===0?b(e.$slots,`rowTitle`,p({ref_for:!0},{value:r,rowIndex:n,colIndex:i,type:typeof r,isResponsive:I.value}),void 0,!0,0):u(``,!0),i>0?b(e.$slots,`cell`,p({ref_for:!0},{value:r,rowIndex:n,colIndex:i,type:typeof r,isResponsive:I.value,color:t.colors[i],textColor:x(ne)(t.colors[i])}),void 0,!0,1):u(``,!0)],64))],8,D))),256)),B.value.table.showSum?(_(),d(`td`,A,[b(e.$slots,`sum`,p({ref_for:!0},{value:t.sum,rowIndex:n,isResponsive:I.value}),void 0,!0)])):u(``,!0),B.value.table.showAverage?(_(),d(`td`,j,[b(e.$slots,`average`,p({ref_for:!0},{value:t.average,rowIndex:n,isResponsive:I.value}),void 0,!0)])):u(``,!0),B.value.table.showMedian?(_(),d(`td`,M,[b(e.$slots,`median`,p({ref_for:!0},{value:t.median,rowIndex:n,isResponsive:I.value}),void 0,!0)])):u(``,!0)]))),256))])],4),e.$slots.source?(_(),d(`div`,Se,[b(e.$slots,`source`,{},void 0,!0)],512)):u(``,!0)],46,w))}},[[`__scopeId`,`data-v-89cef7a9`]]);export{C as n,N as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{n as t,t as n}from"./userOptionsSlots-DYuo-E5m.js";import{$ as r,D as i,Ht as a,S as o,X as ee,at as te,i as ne,m as re,nt as ie,w as ae,yt as oe,zt as se}from"./lib-zDxoqrgo.js";import{n as ce,t as le}from"./useHints-BH9r_0Vd.js";import{t as ue}from"./useConfig-CKdzPrcf.js";import{t as de}from"./usePrinter-CnyKPIFM.js";import{t as fe}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{n as pe}from"./resolveChartConfig-BSo1Oe9n.js";import{t as me}from"./useUserOptionState-CXlFnwPv.js";import{t as he}from"./vClickOutside-BxNzkY17.js";import{t as ge}from"./vue_ui_table_sparkline-Dlfbza49.js";import{Fragment as s,computed as c,createBlock as _e,createCommentVNode as l,createElementBlock as u,createElementVNode as d,createSlots as ve,createVNode as f,defineAsyncComponent as ye,mergeProps as be,nextTick as xe,normalizeClass as p,normalizeStyle as m,onBeforeUnmount as Se,onMounted as Ce,openBlock as h,ref as g,renderList as _,renderSlot as we,shallowRef as Te,toDisplayString as v,unref as y,useCssVars as Ee,useSlots as De,watch as Oe,withCtx as ke,withDirectives as Ae}from"vue";var je=/* @__PURE__ */ e({default:()=>b}),Me=[`id`],Ne={style:{"z-index":`1`,"padding-right":`24px`}},Pe={key:0,style:{display:`flex`,flexDirection:`row`,alignItems:`center`}},Fe={key:0,style:{display:`flex`,flexDirection:`row`,alignItems:`center`}},Ie=[`onClick`],Le=[`onClick`],Re=[`data-cell`],ze=[`data-cell`,`onPointerenter`],Be=[`data-cell`],Ve=[`data-cell`],He=[`data-cell`],Ue=[`data-cell`],We={key:1,ref:`source`,dir:`auto`},b=/*#__PURE__*/ fe({__name:`vue-ui-table-sparkline`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:[`copyAlt`],setup(e,{expose:fe,emit:je}){Ee(e=>({v6a200610:e.tdo}));let b=ye(()=>import(`./vue-ui-sparkline-DP_nYlW8.js`).then(e=>e.n)),x=ye(()=>import(`./BaseIcon-Cz30ODFA.js`).then(e=>e.n)),Ge=ye(()=>import(`./UserOptions-D65t74CM.js`).then(e=>e.n)),{vue_ui_table_sparkline:Ke}=ue(),S=e,qe=je,C=g(ee()),Je=g(0),w=g(0),Ye=g(null),Xe=De(),Ze=g(!1),T=c({get:()=>et(),set:e=>e}),E=c(()=>T.value.userOptions),D=c(()=>T.value.sparkline),O=c(()=>T.value.thead),k=c(()=>T.value.tbody),A=c(()=>T.value.title);Ce(()=>{Xe[`chart-background`]&&T.value.debug&&console.warn(`VueUiTableSparkline does not support the #chart-background slot.`)}),ce({config:()=>T.value,dataset:()=>S.dataset,component:`VueUiTableSparkline`,rules:[le.emptyArray,{test:e=>e.some(e=>e?.values&&e.values.length>500),message:[`👀 One or more series have > 500 datapoints. Consider if you really need this level of detail.`,``,`▶️ Use larger time scales, or aggregated values`]},{test:e=>e.some(e=>e?.values&&e.values.length>1095),message:[`👀 One or more series have > 1095 datapoints. Above this threshold, the dataset is computed through an LTTB algorithm, to preserve the shape of the data without increasing the number of datapoints.`,``,`▶️ If you need this level of detail, you can change config.downsample.threshold and set a higher value. Note that performance will be impacted.`]}]});let j=c(()=>T.value.userOptions.useCursorPointer),{userOptionsVisible:M,setUserOptionsVisibility:Qe,keepUserOptionState:$e}=me({config:T.value});function et(){return pe(S.config,Ke,ge)}Oe(()=>S.config,e=>{T.value=et(),M.value=!T.value.userOptions.showOnChartHover,st(),w.value+=1},{deep:!0}),Oe(()=>S.dataset,e=>{U.value=H.value,w.value+=1},{deep:!0});let{isPrinting:tt,isImaging:nt,generatePdf:rt,generateImage:it}=de({elementId:`table_${C.value}`,fileName:A.value.text||`vue-ui-table-sparkline`,options:T.value.userOptions.print}),at=c(()=>ae(T.value.customPalette)),N=g(null),P=g(!1),ot=c(()=>T.value.responsiveBreakpoint);Ce(()=>{st()});let F=g(T.value.colNames),I=Te(null);function st(){se(S.dataset)&&te({componentName:`VueUiTableSparkline`,type:`dataset`}),I.value&&I.value.disconnect(),I.value=new ResizeObserver(e=>{e.forEach(e=>{P.value=e.contentRect.width<ot.value})}),N.value&&I.value.observe(N.value),F.value=[];for(let e=0;e<ft.value;e+=1)F.value.push(T.value.colNames[e]||`col ${e}`)}Se(()=>{I.value&&I.value.disconnect()});function L(e){if([null,void 0].includes(e))return null;let t=Number(e);return Number.isFinite(t)?t:null}function R(e){return typeof e==`number`&&Number.isFinite(e)}function ct(e=[]){return e.map(L).filter(R)}function z(e,t,n){let r=L(e),i=L(t),a=R(r),o=R(i);return a&&o?n===-1?r-i:i-r:a?-1:+!!o}function B(e,t,n={}){let i=L(e);return i===null?`-`:ne(T.value.formatter,i,r({p:T.value.prefix,v:i,s:T.value.suffix,r:t}),n)}let V=c(()=>(S.dataset.forEach((e,t)=>{oe({datasetObject:e,requiredAttributes:[`name`,`values`]}).forEach(e=>{te({componentName:`VueUiTableSparkline`,type:`datasetSerieAttribute`,property:e,index:t})})}),S.dataset.map((e,t)=>{let n=e.values||[],r=ct(n),i=r.length?r.reduce((e,t)=>e+t,0):null,ee=r.length?i/r.length:null,te=r.length?re(r):null;return{...e,values:n,color:o(e.color)||at.value[t]||a[t]||a[t%a.length],sum:i,average:ee,median:te,sparklineDataset:n.map((e,t)=>({period:T.value.colNames[t]||`col ${t}`,value:L(e)}))}})));function lt(e){let t=(e[0]?.values||[]).map((t,n)=>e.map(e=>e?.values?.[n]??null)).map(e=>e.map((e,t)=>[e,t]).sort((e,t)=>z(e[0],t[0],1)).map(e=>e[1]));return e.map((e,n)=>({...e,values:e.values||[],orders:t[n]}))}let H=c(()=>lt(V.value)),U=g(H.value),ut=c(()=>Math.max(...U.value.map(e=>(e.values||[]).length))),W=g(void 0),G=g(!1),K=g(void 0),dt=g(1);function q(){G.value=!1,K.value=void 0,Z.value=void 0,dt.value=1,$.value.forEach(e=>e.state=1),X.value={name:1,sum:1,average:1,median:1},U.value=H.value}function J(e,t,n){if([`name`,`sum`,`average`,`median`].includes(e.type)){pt(e.type,t,n);return}if(!yt(t))return;if(Q.value=t,Z.value=void 0,![null,void 0].includes(K.value)&&t!==K.value&&(K.value=void 0,q()),$.value[t].state===n&&K.value===t){K.value=void 0,q();return}G.value=!0,K.value=t;let r=H.value.map(e=>e.values?.[t]??null),i=n;$.value[t].state=i,dt.value=i,t===W.value?W.value=void 0:W.value=t;let a=r.map((e,t)=>[t,e]).sort((e,t)=>z(e[1],t[1],i)).map(e=>e[0]).map(e=>H.value[e]);U.value=a,w.value+=1}let ft=c(()=>Math.max(...S.dataset.map(e=>(e.values||[]).length))),Y=c(()=>{let e=F.value.map(e=>({type:`reg`,value:e}));if(!e.length)for(let t=0;t<ft.value;t+=1)e.push({type:`reg`,value:`col ${t+1}`});T.value.showTotal&&(e=[...e,{type:`sum`,value:T.value.translations.total}]);let t;return t=T.value.showAverage&&T.value.showMedian?[...e,{type:`average`,value:T.value.translations.average},{type:`median`,value:T.value.translations.median}]:T.value.showAverage&&!T.value.showMedian?[...e,{type:`average`,value:T.value.translations.average}]:!T.value.showAverage&&T.value.showMedian?[...e,{type:`median`,value:T.value.translations.median}]:e,T.value.showSparklines?[...t,{type:`chart`,value:T.value.translations.chart}]:t}),X=g({name:1,sum:1,average:1,median:1}),Z=g(void 0);function pt(e,t,n){if(!U.value||U.value.length===0||!bt(e))return;if(Z.value!==e&&(Z.value=void 0),![null,void 0].includes(K.value)&&t!==K.value&&q(),K.value=void 0,X.value[e]===n&&Z.value){Z.value=void 0,q();return}Z.value=e,G.value=!0,X.value[e]=n,[null,void 0].includes(t)||($.value[t].state=X.value[e]);let r=X.value[e],i=[...U.value].sort((t,n)=>{let i=t[e],a=n[e];return typeof i==`string`&&typeof a==`string`?r===-1?i.localeCompare(a):a.localeCompare(i):z(i,a,r)});U.value=i}let Q=g(void 0),mt=g(void 0);function ht({dataIndex:e,serieIndex:t}){Q.value=e,mt.value=t,Ye.value[e]&&!P.value&&Ye.value[e].scrollIntoView({behavior:`smooth`,block:`nearest`,inline:`center`})}let gt=g(!1);function _t(e){gt.value=e,Je.value+=1}function vt(e=null){xe(()=>{let t=[T.value.translations.serie].concat(Y.value),n=V.value.map((e,t)=>[[e.name],e.values,[e.sum],[e.average],[e.median]]),r=[t].concat(n),a=i(r);e?e(a):ie({csvContent:a,title:A.value.text||`vue-ui-table-sparkline`})})}function yt(e){return T.value.sortedDataColumnIndices.includes(e)}function bt(e){return e.type===`name`||e===`name`?T.value.sortedSeriesName:e.type===`sum`||e===`sum`?T.value.sortedSum:e.type===`average`||e===`average`?T.value.sortedAverage:e.type===`median`||e===`median`?T.value.sortedMedian:!1}function xt(e,t,n){return[`sum`,`average`,`median`].includes(t.type)?Z.value===t.type&&X.value[t.type]===n?1:.3:e===K.value&&$.value[e].state===n?1:.3}function St(){T.value.resetSortOnClickOutside&&q()}let $=c({get:()=>Y.value.map(e=>({state:1})),set:e=>e});function Ct(e){if(e?.stage===`start`){Ze.value=!0;return}if(e?.stage===`end`){Ze.value=!1;return}it()}async function wt(){if(qe(`copyAlt`,{config:T.value,dataset:V.value}),!T.value.userOptions.callbacks.altCopy){console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.");return}await Promise.resolve(T.value.userOptions.callbacks.altCopy({config:T.value,dataset:V.value}))}return fe({generatePdf:rt,generateImage:it,generateCsv:vt,restoreOrder:q,copyAlt:wt}),(e,r)=>(h(),u(`div`,{ref_key:`tableContainer`,ref:N,class:p({"vue-data-ui-component":!0,"vue-ui-table-sparkline":!0,"vue-ui-responsive":P.value}),style:{overflow:`hidden`},id:`table_${C.value}`,onMouseenter:r[3]||=()=>y(Qe)(!0),onMouseleave:r[4]||=()=>y(Qe)(!1)},[A.value.text?(h(),u(`div`,{key:0,class:`vue-ui-table-sparkline-caption`,style:m({backgroundColor:A.value.backgroundColor})},[d(`div`,{class:`atom-title`,style:m({fontSize:`${A.value.fontSize}px`,fontWeight:A.value.bold?`bold`:`normal`,color:A.value.color,textAlign:A.value.textAlign})},v(A.value.text),5),A.value.subtitle.text?(h(),u(`div`,{key:0,class:`atom-subtitle`,style:m({fontSize:`${A.value.subtitle.fontSize}px`,fontWeight:A.value.subtitle.bold?`bold`:`normal`,color:A.value.subtitle.color,textAlign:A.value.textAlign})},v(A.value.subtitle.text),5)):l(``,!0)],4)):l(``,!0),d(`div`,{style:{overflow:`auto`},onPointerleave:r[2]||=e=>{mt.value=void 0,Q.value=void 0}},[d(`table`,{class:`vue-ui-data-table`,style:m({fontFamily:T.value.fontFamily,position:`relative`})},[d(`thead`,Ne,[Ae((h(),u(`tr`,{role:`row`,class:`vue-ui-data-table__thead-row`,style:m({backgroundColor:O.value.backgroundColor,color:O.value.color})},[d(`th`,{role:`cell`,style:m({backgroundColor:O.value.backgroundColor,border:O.value.outline,textAlign:O.value.textAlign,fontWeight:O.value.bold?`bold`:`normal`}),class:`sticky-col-first`},[d(`div`,{style:m({display:`flex`,flexDirection:`row`,alignItems:`center`,gap:`3px`,justifyContent:O.value.textAlign})},[d(`span`,null,v(T.value.translations.serie),1),U.value.length>1&&T.value.sortedSeriesName?(h(),u(`div`,Pe,[d(`button`,{class:`vue-ui-table-sparkline-sorting-button vue-ui-table-sparkline-sorting-button-down`,onClick:r[0]||=e=>J({type:`name`},null,-1),style:m({cursor:j.value?`pointer`:`default`})},[f(y(x),{size:12,name:`arrowBottom`,stroke:O.value.color,style:m({opacity:Z.value===`name`&&X.value.name===-1?1:.3})},null,8,[`stroke`,`style`])],4),d(`button`,{class:`vue-ui-table-sparkline-sorting-button vue-ui-table-sparkline-sorting-button-up`,onClick:r[1]||=e=>J({type:`name`},null,1),style:m({cursor:j.value?`pointer`:`default`})},[f(y(x),{size:12,name:`arrowTop`,stroke:O.value.color,style:m({opacity:Z.value===`name`&&X.value.name===1?1:.3})},null,8,[`stroke`,`style`])],4)])):l(``,!0)],4)],4),(h(!0),u(s,null,_(Y.value,(r,i)=>(h(),u(`th`,{role:`cell`,style:m({background:O.value.backgroundColor,border:O.value.outline,textAlign:O.value.textAlign,fontWeight:O.value.bold?`bold`:`normal`,minWidth:i===Y.value.length-1?`${D.value.dimensions.width}px`:`48px`,paddingRight:i===Y.value.length-1&&E.value.show?`36px`:``}),class:p({"sticky-col":i===Y.value.length-1&&T.value.showSparklines})},[d(`div`,{style:m({display:`flex`,flexDirection:`row`,alignItems:`center`,gap:`3px`,justifyContent:O.value.textAlign})},[d(`span`,null,v(r.value),1),U.value.length>1&&(yt(i)||bt(r))?(h(),u(`div`,Fe,[d(`button`,{class:`vue-ui-table-sparkline-sorting-button vue-ui-table-sparkline-sorting-button-down`,onClick:()=>J(r,i,-1),style:m({cursor:j.value?`pointer`:`default`})},[f(y(x),{size:12,name:`arrowBottom`,stroke:O.value.color,style:m({opacity:xt(i,r,-1)})},null,8,[`stroke`,`style`])],12,Ie),d(`button`,{class:`vue-ui-table-sparkline-sorting-button vue-ui-table-sparkline-sorting-button-up`,onClick:()=>J(r,i,1),style:m({cursor:j.value?`pointer`:`default`})},[f(y(x),{size:12,name:`arrowTop`,stroke:O.value.color,style:m({opacity:xt(i,r,1)})},null,8,[`stroke`,`style`])],12,Le)])):l(``,!0)],4),E.value.show&&i===Y.value.length-1&&(y($e)||y(M))?(h(),_e(y(Ge),{ref_for:!0,ref:`details`,key:`user_option_${Je.value}`,backgroundColor:O.value.backgroundColor,color:O.value.color,isPrinting:y(tt),isImaging:y(nt),uid:C.value,hasPdf:E.value.buttons.pdf,hasXls:E.value.buttons.csv,hasImg:E.value.buttons.img,hasFullscreen:E.value.buttons.fullscreen,hasAltCopy:E.value.buttons.altCopy,isFullscreen:gt.value,titles:{...E.value.buttonTitles},chartElement:N.value,position:E.value.position,callbacks:E.value.callbacks,printScale:E.value.print.scale,isCursorPointer:j.value,onToggleFullscreen:_t,onGeneratePdf:y(rt),onGenerateImage:Ct,onGenerateCsv:vt,onCopyAlt:wt,style:m({visibility:y($e)?y(M)?`visible`:`hidden`:`visible`})},ve({_:2},[_(y(t)(e.$slots,`menuIcon optionPdf optionCsv optionImg optionFullscreen optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:ke(r=>[we(e.$slots,t,be({ref_for:!0},y(n)(t,r)),void 0,!0)])}))]),1032,[`backgroundColor`,`color`,`isPrinting`,`isImaging`,`uid`,`hasPdf`,`hasXls`,`hasImg`,`hasFullscreen`,`hasAltCopy`,`isFullscreen`,`titles`,`chartElement`,`position`,`callbacks`,`printScale`,`isCursorPointer`,`onGeneratePdf`,`style`])):l(``,!0)],6))),256))],4)),[[y(he),St]])]),d(`tbody`,null,[(h(!0),u(s,null,_(U.value,(e,t)=>(h(),u(`tr`,{role:`row`,style:m({backgroundColor:k.value.backgroundColor,color:k.value.color}),class:p({"vue-ui-data-table__tbody__row":!0,"vue-ui-data-table__tbody__row-even":t%2==0,"vue-ui-data-table__tbody__row-odd":t%2!=0})},[d(`td`,{role:`cell`,style:m({backgroundColor:k.value.backgroundColor,border:k.value.outline,fontSize:`${k.value.fontSize}px`,fontWeight:k.value.bold?`bold`:`normal`,textAlign:k.value.textAlign}),"data-cell":T.value.translations.serie,class:`vue-ui-data-table__tbody__td sticky-col-first`},[d(`div`,{dir:`auto`,style:m({display:`flex`,flexDirection:`row`,alignItems:`center`,gap:`6px`,justifyContent:k.value.textAlign})},[k.value.showColorMarker?(h(),u(`span`,{key:0,style:m({color:e.color})},`⬤`,4)):l(``,!0),d(`span`,null,v(e.name??`-`),1)],4)],12,Re),(h(!0),u(s,null,_(ut.value,(n,r)=>(h(),u(`td`,{dir:`auto`,role:`cell`,ref_for:!0,ref_key:`TD`,ref:Ye,style:m({border:k.value.outline,fontSize:`${k.value.fontSize}px`,fontWeight:k.value.bold?`bold`:`normal`,textAlign:k.value.textAlign,background:Q.value!==void 0&&r===Q.value?k.value.selectedColor.useSerieColor?`${e.color.length>7?e.color.slice(0,-2):e.color}33`:k.value.selectedColor.fallback:``}),"data-cell":Y.value[r]?Y.value[r].value:``,class:`vue-ui-data-table__tbody__td`,onPointerenter:e=>{mt.value=t,Q.value=r}},v(B(e.values[r],T.value.roundingValues,{datapoint:e,seriesIndex:t,datapointIndex:r})),45,ze))),256)),T.value.showTotal?(h(),u(`td`,{key:0,dir:`auto`,role:`cell`,style:m({border:k.value.outline,fontSize:`${k.value.fontSize}px`,fontWeight:k.value.bold?`bold`:`normal`,textAlign:k.value.textAlign}),"data-cell":T.value.translations.total,class:`vue-ui-data-table__tbody__td`},v(B(e.sum,T.value.roundingTotal,{datapoint:e.sum,seriesIndex:t})),13,Be)):l(``,!0),T.value.showAverage?(h(),u(`td`,{key:1,dir:`auto`,role:`cell`,style:m({border:k.value.outline,fontSize:`${k.value.fontSize}px`,fontWeight:k.value.bold?`bold`:`normal`,textAlign:k.value.textAlign}),"data-cell":T.value.translations.average,class:`vue-ui-data-table__tbody__td`},v(B(e.average,T.value.roundingAverage,{datapoint:e.average,seriesIndex:t})),13,Ve)):l(``,!0),T.value.showMedian?(h(),u(`td`,{key:2,dir:`auto`,role:`cell`,style:m({border:k.value.outline,fontSize:`${k.value.fontSize}px`,fontWeight:k.value.bold?`bold`:`normal`,textAlign:k.value.textAlign}),"data-cell":T.value.translations.median,class:`vue-ui-data-table__tbody__td`},v(B(e.median,T.value.roundingMedian,{datapoint:e.median,seriesIndex:t})),13,He)):l(``,!0),T.value.showSparklines?(h(),u(`td`,{key:3,role:`cell`,"data-cell":T.value.translations.chart,style:m({border:k.value.outline,fontSize:`${k.value.fontSize}px`,fontWeight:k.value.bold?`bold`:`normal`,textAlign:k.value.textAlign,backgroundColor:k.value.backgroundColor,padding:`0`}),class:`vue-ui-data-table__tbody__td sticky-col`},[f(y(b),{onHoverIndex:({index:e})=>ht({dataIndex:e,serieIndex:t}),"height-ratio":D.value.dimensions.heightRatio,"forced-padding":30,dataset:e.sparklineDataset,showInfo:!1,selectedIndex:Q.value,config:{type:D.value.type,style:{backgroundColor:`transparent`,animation:{show:D.value.animation.show&&!y(tt)&&!y(nt),animationFrames:D.value.animation.animationFrames},padding:{right:12},line:{color:e.color,smooth:D.value.smooth,cutNullValues:D.value.cutNullValues,strokeWidth:D.value.strokeWidth},bar:{color:e.color},area:{color:e.color,opacity:D.value.showArea?16:0,useGradient:D.value.useGradient},verticalIndicator:{color:e.color},plot:{radius:9,stroke:k.value.backgroundColor,strokeWidth:3}}}},null,8,[`onHoverIndex`,`height-ratio`,`dataset`,`selectedIndex`,`config`])],12,Ue)):l(``,!0)],6))),256))])],4)],32),e.$slots.source?(h(),u(`div`,We,[we(e.$slots,`source`,{},void 0,!0)],512)):l(``,!0)],42,Me))}},[[`__scopeId`,`data-v-81726e6d`]]);export{je as n,b as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{n as t,t as n}from"./annotationSlots-BRR85CqJ.js";import{n as r,t as i}from"./userOptionsSlots-DYuo-E5m.js";import{$ as a,Ht as o,Jt as ee,S as s,X as te,at as ne,b as c,i as re,in as ie,t as ae,w as oe,yt as se,zt as ce}from"./lib-zDxoqrgo.js";import{n as le,t as ue}from"./useHints-BH9r_0Vd.js";import{t as de}from"./useConfig-CKdzPrcf.js";import{t as fe}from"./usePrinter-CnyKPIFM.js";import{n as pe,t as me}from"./BaseScanner-8NdoBs7B.js";import{t as he}from"./useChartExport-DtPNpc9M.js";import{t as ge}from"./img-8sM3sVWU.js";import{n as _e}from"./Title-BRAjxtjG.js";import{t as ve}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{l as ye,t as be}from"./useResponsive-D2CPcpda.js";import{t as xe}from"./DefGrad-DKMq1REY.js";import{n as Se}from"./resolveChartConfig-BSo1Oe9n.js";import{t as Ce}from"./useUserOptionState-CXlFnwPv.js";import{t as we}from"./useChartAccessibility-DOMuYJfm.js";import{t as Te}from"./usePrefersMotion-XLHwega2.js";import{t as Ee}from"./useAutoSizeLabelsInsideViewbox-AIRF0PlD.js";import{t as De}from"./vue_ui_thermometer-CRijq6H6.js";import{Fragment as l,computed as u,createBlock as d,createCommentVNode as f,createElementBlock as p,createElementVNode as m,createSlots as Oe,createVNode as ke,defineAsyncComponent as Ae,guardReactiveProps as h,normalizeClass as g,normalizeProps as je,normalizeStyle as Me,onMounted as Ne,openBlock as _,ref as v,renderList as y,renderSlot as b,toDisplayString as x,toRefs as Pe,unref as S,useCssVars as Fe,watch as Ie,withCtx as Le}from"vue";var Re=/* @__PURE__ */ e({default:()=>C}),ze=[`id`],Be={key:1,ref:`noTitle`,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},Ve=[`xmlns`,`viewBox`,`aria-labelledby`,`aria-describedby`],He=[`id`],Ue=[`id`],We=[`width`,`height`],Ge=[`id`],Ke=[`x`,`y`,`width`,`height`,`rx`,`ry`],qe=[`clip-path`],Je=[`x`,`y`,`height`,`width`],Ye=[`x`,`y`,`height`,`width`,`fill`],Xe=[`x1`,`x2`,`y1`,`y2`,`stroke-width`,`stroke`],Ze=[`x1`,`x2`,`y1`,`y2`,`stroke-width`,`stroke`],Qe=[`x1`,`x2`,`y1`,`y2`,`stroke-width`,`stroke`],$e=[`x1`,`x2`,`y1`,`y2`,`stroke-width`,`stroke`],et=[`x1`,`x2`,`y1`,`y2`,`stroke-width`,`stroke`],tt=[`x1`,`x2`,`y1`,`y2`,`stroke-width`,`stroke`],nt=[`x1`,`x2`,`y1`,`y2`,`stroke-width`,`stroke`],rt=[`x1`,`x2`,`y1`,`y2`,`stroke-width`,`stroke`],it=[`x`,`y`,`height`,`width`],at=[`aria-label`],ot=[`x`,`y`,`height`],st=[`y`,`x`,`fill`,`font-size`,`font-weight`],ct={key:4,class:`vue-data-ui-watermark`},C=/*#__PURE__*/ ve({__name:`vue-ui-thermometer`,props:{dataset:{type:Object,default(){return{}}},config:{type:Object,default(){return{}}}},emits:[`copyAlt`],setup(e,{expose:ve,emit:Re}){Fe(e=>({v593c4b2a:Nt.value,f50a08fa:Mt.value,v44f0d5a0:jt.value}));let C=Ae(()=>import(`./PackageVersion-D6pKL176.js`).then(e=>e.t)),lt=Ae(()=>import(`./PenAndPaper-DvJJaeU2.js`).then(e=>e.t)),ut=Ae(()=>import(`./UserOptions-D65t74CM.js`).then(e=>e.n)),{vue_ui_thermometer:dt}=de(),ft=Te(),w=e,pt=Re,T=v(te()),E=v(null),mt=v(0),ht=v(0),gt=v(null),_t=v(null),D=v(null),O=v(null),vt=u(()=>!!w.dataset&&Object.keys(w.dataset).length);Ne(()=>{Ct()});let k=v(z()),A=u(()=>k.value.userOptions),j=u(()=>k.value.style.chart.graduations),M=u(()=>k.value.style.chart);le({config:()=>k.value,dataset:()=>w.dataset,component:`VueUiThermometer`,rules:[ue.noHint]});let yt=v(M.value.thermometer.width),N=v(M.value.height),P=v(M.value.width),bt=u(()=>k.value.userOptions.useCursorPointer),xt=u(()=>ie({defaultConfig:{userOptions:{show:!1},style:{chart:{animation:{use:!1},backgroundColor:`#99999930`,graduations:{stroke:`#6A6A6A`}}}},userConfig:k.value.skeletonConfig??{}})),{loading:F,FINAL_DATASET:I}=pe({...Pe(w),FINAL_CONFIG:k,prepareConfig:z,skeletonDataset:w.config?.skeletonDataset??{value:0,from:-100,to:100,steps:20,colors:{from:`#A1A1A1`,to:`#CACACA`}},skeletonConfig:ie({defaultConfig:k.value,userConfig:xt.value})}),St=u(()=>k.value.debug);function Ct(){if(ce(w.dataset)?ne({componentName:`VueUiThermometer`,type:`dataset`,debug:St.value}):se({datasetObject:w.dataset,requiredAttributes:[`value`,`from`,`to`]}).forEach(e=>{ne({componentName:`VueUiThermometer`,type:`datasetAttribute`,property:e,debug:St.value})}),k.value.responsive){let e=ye(()=>{let{width:e,height:t}=be({chart:E.value,title:k.value.style.title.text?gt.value:null,source:_t.value});requestAnimationFrame(()=>{N.value=Math.max(.1,t-12),P.value=e,Rt()})});D.value&&(O.value&&D.value.unobserve(O.value),D.value.disconnect()),D.value=new ResizeObserver(e),O.value=E.value,D.value.observe(O.value)}Rt()}let{userOptionsVisible:L,setUserOptionsVisibility:wt,keepUserOptionState:Tt}=Ce({config:k.value}),{svgRef:R}=we({config:k.value.style.title});function z(){return Se(w.config,dt,De)}Ie(()=>w.config,e=>{k.value=z(),L.value=!k.value.userOptions.showOnChartHover,yt.value=M.value.thermometer.width,N.value=M.value.height,P.value=M.value.width,Ct(),ht.value+=1},{deep:!0});let{isPrinting:B,isImaging:V,generatePdf:Et,generateImage:Dt}=fe({elementId:`thermometer__${T.value}`,fileName:k.value.style.title.text||`vue-ui-thermometer`,options:k.value.userOptions.print}),Ot=u(()=>k.value.userOptions.show&&!k.value.style.title.text),H=u(()=>oe(k.value.customPalette)),U=u(()=>I.value.steps||10);function W(e,t,n){let r=[],i=kt(e),a=kt(t);for(let e=0;e<n;e+=1){let t=G(i.red,a.red,e,n),o=G(i.green,a.green,e,n),ee=G(i.blue,a.blue,e,n),s=`#${K(t)}${K(o)}${K(ee)}`;r.push(s)}return r}function kt(e){let t=e.slice(1);return{red:parseInt(t.slice(0,2),16),green:parseInt(t.slice(2,4),16),blue:parseInt(t.slice(4,6),16)}}function G(e,t,n,r){return Math.round(e+(t-e)*n/r)}function K(e){return e.toString(16).padStart(2,`0`)}let q=u(()=>{let e=Math.max(.1,P.value),t=Math.max(.1,N.value),n=M.value.padding;return{width:e,left:e/2-M.value.thermometer.width/2,right:e/2+M.value.thermometer.width/2,top:n.top,bottom:t-n.bottom-n.top,height:t,thermoHeight:t-n.top-n.bottom,thermoWidth:M.value.thermometer.width}}),At=u(()=>q.value),J=u(()=>{let e=c(I.value.from)<0?Math.abs(c(I.value.from)):c(I.value.from),t=c(I.value.to)<0?Math.abs(c(I.value.to)):c(I.value.to),n=0;return n=c(I.value.to)>0?e+t:e>t?e-t:t-e,(1-(Math.abs(c(I.value.from))+c(I.value.value))/n)*q.value.thermoHeight}),jt=u(()=>`${J.value}px`),Mt=u(()=>`${q.value.thermoHeight}px`),Nt=u(()=>ft.value?`0ms`:`${M.value.animation.speedMs}ms`),Pt=u(()=>{if(I.value.colors){if(!I.value.colors.from)return W(H.value[0]||o[0],s(I.value.colors.to),U.value||10);if(!I.value.colors.to)return W(s(I.value.colors.from),H.value[1]||o[1],U.value||10)}else return W(H.value[1]||o[1],H.value[0]||o[0],U.value||10);return W(s(I.value.colors.from),s(I.value.colors.to),U.value||10)}),Ft=u(()=>{let e=[],t=0,n=q.value.thermoHeight;for(let r=0;r<n-1;r+=n/U.value)e.push({x:q.value.left,y:q.value.top+r,qYLess:q.value.top+r+n/U.value/4,halfY:q.value.top+r+n/U.value/2,qYMore:q.value.top+r+n/U.value/4*3,color:Pt.value[t],height:Math.max(.1,n/U.value)}),t+=1;return e}),Y=v(!1);function It(e){Y.value=e,mt.value+=1}let X=v(!1);function Z(){X.value=!X.value}async function Lt({scale:e=2}={}){if(!E.value)return;let{width:t,height:n}=E.value.getBoundingClientRect(),r=t/n,{imageUri:i,base64:a}=await ge({domElement:E.value,base64:!0,img:!0,scale:e});return{imageUri:i,base64:a,title:k.value.style.title.text,width:t,height:n,aspectRatio:r}}let Q=u({get:()=>M.value.label.fontSize,set:e=>e}),{autoSizeLabels:Rt}=Ee({svgRef:R,fontSize:M.value.label.fontSize,minFontSize:M.value.label.minFontSize,sizeRef:Q,labelClass:`.vue-ui-thermometer-label`}),zt=u(()=>M.value.backgroundColor),Bt=u(()=>k.value.style.title),{isCallbackImaging:Vt,isCallbackSvg:Ht,generateSvg:Ut,onGenerateImage:Wt}=he({svg:R,title:Bt,legend:null,legendItems:null,backgroundColor:zt,getSvgCallback:()=>k.value.userOptions.callbacks.svg,generateImage:Dt});async function Gt(){if(pt(`copyAlt`,{config:k.value,dataset:I.value}),!k.value.userOptions.callbacks.altCopy){console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.");return}await Promise.resolve(k.value.userOptions.callbacks.altCopy({config:k.value,dataset:I.value}))}let Kt=u(()=>`${T.value}-title`),qt=u(()=>`${T.value}-desc`),$=u(()=>re(M.value.label.formatter,I.value.value,a({p:M.value.label.prefix,v:I.value.value,s:M.value.label.suffix,r:M.value.label.rounding}),{datapoint:I.value})),Jt=u(()=>k.value.style.title.text||``),Yt=u(()=>{if(F.value)return`...`;let e=c(I.value.from),t=c(I.value.to);return`Thermometer value: ${$.value}. Range: ${e} to ${t}.`});return ve({getImage:Lt,generatePdf:Et,generateImage:Dt,generateSvg:Ut,toggleAnnotator:Z,toggleFullscreen:It,copyAlt:Gt}),(e,a)=>(_(),p(`div`,{ref_key:`thermoChart`,ref:E,class:g(`vue-data-ui-component vue-ui-thermometer ${Y.value?`vue-data-ui-wrapper-fullscreen`:``}`),style:Me(`width:100%;background:${M.value.backgroundColor};color:${M.value.color};font-family:${k.value.style.fontFamily}`),id:`thermometer__${T.value}`,onMouseenter:a[0]||=()=>S(wt)(!0),onMouseleave:a[1]||=()=>S(wt)(!1)},[A.value.buttons.annotator?(_(),d(S(lt),{key:0,svgRef:S(R),backgroundColor:M.value.backgroundColor,color:M.value.color,active:X.value,isCursorPointer:bt.value,palette:A.value.annotatorPalette,onClose:Z},Oe({_:2},[y(S(n),n=>({name:n,fn:Le(r=>[b(e.$slots,n,je(h(S(t)(n,r))),void 0,!0)])}))]),1032,[`svgRef`,`backgroundColor`,`color`,`active`,`isCursorPointer`,`palette`])):f(``,!0),Ot.value?(_(),p(`div`,Be,null,512)):f(``,!0),k.value.style.title.text?(_(),p(`div`,{key:2,ref_key:`chartTitle`,ref:gt,style:`width:100%`},[(_(),d(_e,{key:`title_${ht.value}`,config:{title:{cy:`thermometer-div-title`,...k.value.style.title},subtitle:{cy:`thermometer-div-subtitle`,...k.value.style.title.subtitle}}},null,8,[`config`]))],512)):f(``,!0),A.value.show&&vt.value&&(S(Tt)||S(L))?(_(),d(S(ut),{ref:`details`,key:`user_options_${mt.value}`,backgroundColor:M.value.backgroundColor,color:M.value.color,isImaging:S(V),isPrinting:S(B),uid:T.value,hasPdf:A.value.buttons.pdf,hasImg:A.value.buttons.img,hasSvg:A.value.buttons.svg,hasFullscreen:A.value.buttons.fullscreen,hasAltCopy:A.value.buttons.altCopy,hasXls:!1,isFullscreen:Y.value,titles:{...A.value.buttonTitles},chartElement:E.value,position:A.value.position,hasAnnotator:A.value.buttons.annotator,isAnnotation:X.value,callbacks:A.value.callbacks,printScale:A.value.print.scale,isCursorPointer:bt.value,onToggleFullscreen:It,onGeneratePdf:S(Et),onGenerateImage:S(Wt),onGenerateSvg:S(Ut),onToggleAnnotator:Z,onCopyAlt:Gt,style:Me({visibility:S(Tt)?S(L)?`visible`:`hidden`:`visible`})},Oe({_:2},[y(S(r)(e.$slots,`menuIcon optionPdf optionImg optionSvg optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:Le(n=>[b(e.$slots,t,je(h(S(i)(t,n))),void 0,!0)])}))]),1032,[`backgroundColor`,`color`,`isImaging`,`isPrinting`,`uid`,`hasPdf`,`hasImg`,`hasSvg`,`hasFullscreen`,`hasAltCopy`,`isFullscreen`,`titles`,`chartElement`,`position`,`hasAnnotator`,`isAnnotation`,`callbacks`,`printScale`,`isCursorPointer`,`onGeneratePdf`,`onGenerateImage`,`onGenerateSvg`,`style`])):f(``,!0),(_(),p(`svg`,{ref_key:`svgRef`,ref:R,xmlns:S(ae),class:g({"vue-data-ui-fullscreen--on":Y.value,"vue-data-ui-fulscreen--off":!Y.value}),width:`100%`,viewBox:`0 0 ${q.value.width} ${q.value.height}`,style:`background:transparent`,"aria-labelledby":Kt.value,"aria-describedby":qt.value},[m(`title`,{id:Kt.value},x(Jt.value),9,He),m(`desc`,{id:qt.value},x(Yt.value),9,Ue),ke(S(C)),e.$slots[`chart-background`]?(_(),p(`foreignObject`,{key:0,x:0,y:0,width:q.value.width,height:q.value.height,style:{pointerEvents:`none`}},[b(e.$slots,`chart-background`,{},void 0,!0)],8,We)):f(``,!0),m(`defs`,null,[m(`clipPath`,{id:`vueUiPill-${T.value}`,clipPathUnits:`userSpaceOnUse`},[m(`rect`,{x:q.value.left,y:q.value.top,width:q.value.thermoWidth,height:q.value.thermoHeight,rx:q.value.thermoWidth/2,ry:q.value.thermoWidth/2},null,8,Ke)],8,Ge),(_(!0),p(l,null,y(Ft.value,(e,t)=>(_(),d(xe,{t:`linear`,id:`vueUiThermometerGradient_${t}_${T.value}`,key:`t_${t}_${T.value}`,x1:`0%`,y1:`0%`,x2:`100%`,y2:`0%`,stops:[[`0%`,e.color,1],[`50%`,S(ee)(e.color,100-j.value.gradient.intensity),1],[`100%`,e.color,1]]},null,8,[`id`,`stops`]))),128))]),m(`g`,{"clip-path":`url(#vueUiPill-${T.value})`},[m(`rect`,{x:q.value.left,y:q.value.top,height:q.value.thermoHeight,width:q.value.thermoWidth,fill:`#FFFFFF`},null,8,Je),(_(!0),p(l,null,y(Ft.value,(e,t)=>(_(),p(`g`,{key:`graduation_${t}`},[m(`rect`,{x:e.x,y:e.y,height:e.height,width:q.value.thermoWidth,fill:j.value.gradient.show?`url(#vueUiThermometerGradient_${t}_${T.value})`:e.color,"shape-rendering":`crispEdges`},null,8,Ye),j.value.show&&[`both`,`left`].includes(j.value.sides)?(_(),p(`line`,{key:0,x1:e.x,x2:e.x+10,y1:e.y,y2:e.y,"stroke-width":j.value.strokeWidth,stroke:j.value.stroke,"stroke-linecap":`round`},null,8,Xe)):f(``,!0),j.value.showIntermediate?(_(),p(l,{key:1},[j.value.show&&[`both`,`left`].includes(j.value.sides)?(_(),p(`line`,{key:0,x1:e.x,x2:e.x+5,y1:e.halfY,y2:e.halfY,"stroke-width":j.value.strokeWidth/2,stroke:j.value.stroke,"stroke-linecap":`round`},null,8,Ze)):f(``,!0),j.value.show&&[`both`,`left`].includes(j.value.sides)?(_(),p(`line`,{key:1,x1:e.x,x2:e.x+2.5,y1:e.qYLess,y2:e.qYLess,"stroke-width":j.value.strokeWidth/2,stroke:j.value.stroke,"stroke-linecap":`round`},null,8,Qe)):f(``,!0),j.value.show&&[`both`,`left`].includes(j.value.sides)?(_(),p(`line`,{key:2,x1:e.x,x2:e.x+2.5,y1:e.qYMore,y2:e.qYMore,"stroke-width":j.value.strokeWidth/2,stroke:j.value.stroke,"stroke-linecap":`round`},null,8,$e)):f(``,!0)],64)):f(``,!0),j.value.show&&[`both`,`right`].includes(j.value.sides)?(_(),p(`line`,{key:2,x1:q.value.right,x2:q.value.right-10,y1:e.y,y2:e.y,"stroke-width":j.value.strokeWidth,stroke:j.value.stroke,"stroke-linecap":`round`},null,8,et)):f(``,!0),j.value.showIntermediate?(_(),p(l,{key:3},[j.value.show&&[`both`,`right`].includes(j.value.sides)?(_(),p(`line`,{key:0,x1:q.value.right,x2:q.value.right-5,y1:e.halfY,y2:e.halfY,"stroke-width":j.value.strokeWidth/2,stroke:j.value.stroke,"stroke-linecap":`round`},null,8,tt)):f(``,!0),j.value.show&&[`both`,`right`].includes(j.value.sides)?(_(),p(`line`,{key:1,x1:q.value.right,x2:q.value.right-2.5,y1:e.qYLess,y2:e.qYLess,"stroke-width":j.value.strokeWidth/2,stroke:j.value.stroke,"stroke-linecap":`round`},null,8,nt)):f(``,!0),j.value.show&&[`both`,`right`].includes(j.value.sides)?(_(),p(`line`,{key:2,x1:q.value.right,x2:q.value.right-2.5,y1:e.qYMore,y2:e.qYMore,"stroke-width":j.value.strokeWidth/2,stroke:j.value.stroke,"stroke-linecap":`round`},null,8,rt)):f(``,!0)],64)):f(``,!0)]))),128)),m(`rect`,{class:g({"vue-ui-thermometer-temperature":M.value.animation.use}),x:q.value.left,y:q.value.top,height:J.value,width:q.value.thermoWidth,fill:`#FFFFFF66`},null,10,it)],8,qe),M.value.label.show?(_(),p(`g`,{key:1,role:`status`,"aria-live":`polite`,"aria-label":S(F)?`Loading data`:$.value},[S(F)?(_(),p(`rect`,{key:0,x:q.value.left-60,y:J.value+q.value.top-Q.value/2,width:50,height:Q.value,fill:`#6A6A6A40`,rx:`3`},null,8,ot)):(_(),p(`text`,{key:1,"aria-hidden":`true`,class:g({"vue-ui-thermometer-temperature-value":M.value.animation.use,"vue-ui-thermometer-label":!0}),y:J.value+q.value.top+Q.value/3,x:q.value.left-10,"text-anchor":`end`,fill:M.value.label.color,"font-size":Q.value,"font-weight":M.value.label.bold?`bold`:`normal`},x($.value),11,st))],8,at)):f(``,!0),b(e.$slots,`svg`,{svg:{...At.value,isPrintingImg:S(B)||S(V)||S(Vt),isPrintingSvg:S(Ht)}},void 0,!0)],10,Ve)),e.$slots.watermark?(_(),p(`div`,ct,[b(e.$slots,`watermark`,je(h({isPrinting:S(B)||S(V)||S(Vt)||S(Ht)})),void 0,!0)])):f(``,!0),e.$slots.source?(_(),p(`div`,{key:5,ref_key:`source`,ref:_t,dir:`auto`},[b(e.$slots,`source`,{},void 0,!0)],512)):f(``,!0),b(e.$slots,`skeleton`,{},()=>[S(F)?(_(),d(me,{key:0})):f(``,!0)],!0)],46,ze))}},[[`__scopeId`,`data-v-fe907101`]]);export{Re as n,C as t};
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{X as t,rn as n,t as r}from"./lib-zDxoqrgo.js";import{n as i,t as a}from"./useHints-BH9r_0Vd.js";import{t as o}from"./useConfig-CKdzPrcf.js";import{t as s}from"./useNestedProp-CT9phgWx.js";import{n as c}from"./Title-BRAjxtjG.js";import{t as l}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{l as ee,t as te}from"./useResponsive-D2CPcpda.js";import{t as u}from"./BaseIcon-Cz30ODFA.js";import{t as ne}from"./DefGrad-DKMq1REY.js";import{t as re}from"./useChartAccessibility-DOMuYJfm.js";import{computed as d,createBlock as ie,createCommentVNode as f,createElementBlock as p,createElementVNode as m,createVNode as h,defineAsyncComponent as ae,guardReactiveProps as g,mergeProps as oe,normalizeProps as _,normalizeStyle as v,onBeforeUnmount as se,onMounted as ce,openBlock as y,ref as b,renderSlot as x,shallowRef as le,toDisplayString as ue,unref as S,watch as de}from"vue";var fe=class{constructor(e,t,n,r=!0,i=!0){this.interval=t,this.elapsed=0,this.isPaused=!1;let a=new Blob([`
|
|
2
|
+
let interval;
|
|
3
|
+
let elapsed = 0;
|
|
4
|
+
let paused = false;
|
|
5
|
+
let startTime;
|
|
6
|
+
let tickInterval;
|
|
7
|
+
|
|
8
|
+
onmessage = function(e) {
|
|
9
|
+
const { action, data } = e.data;
|
|
10
|
+
|
|
11
|
+
switch(action) {
|
|
12
|
+
case 'start':
|
|
13
|
+
startTime = Date.now();
|
|
14
|
+
tickInterval = data.interval;
|
|
15
|
+
elapsed = 0;
|
|
16
|
+
paused = false;
|
|
17
|
+
interval = setInterval(() => {
|
|
18
|
+
elapsed += tickInterval;
|
|
19
|
+
postMessage({ elapsed, timestamp: Date.now() });
|
|
20
|
+
}, tickInterval);
|
|
21
|
+
break;
|
|
22
|
+
|
|
23
|
+
case 'pause':
|
|
24
|
+
paused = true;
|
|
25
|
+
clearInterval(interval);
|
|
26
|
+
elapsed = Date.now() - startTime;
|
|
27
|
+
break;
|
|
28
|
+
|
|
29
|
+
case 'resume':
|
|
30
|
+
if (paused) {
|
|
31
|
+
startTime = Date.now() - elapsed;
|
|
32
|
+
interval = setInterval(() => {
|
|
33
|
+
elapsed += tickInterval;
|
|
34
|
+
postMessage({ elapsed, timestamp: Date.now() });
|
|
35
|
+
}, tickInterval);
|
|
36
|
+
}
|
|
37
|
+
paused = false;
|
|
38
|
+
break;
|
|
39
|
+
|
|
40
|
+
case 'stop':
|
|
41
|
+
clearInterval(interval);
|
|
42
|
+
elapsed = 0;
|
|
43
|
+
postMessage({ elapsed });
|
|
44
|
+
break;
|
|
45
|
+
|
|
46
|
+
case 'reset':
|
|
47
|
+
elapsed = 0;
|
|
48
|
+
clearInterval(interval);
|
|
49
|
+
postMessage({ elapsed });
|
|
50
|
+
break;
|
|
51
|
+
|
|
52
|
+
case 'lap':
|
|
53
|
+
postMessage({
|
|
54
|
+
elapsed,
|
|
55
|
+
timestamp: Date.now(),
|
|
56
|
+
action: 'lap'
|
|
57
|
+
});
|
|
58
|
+
break;
|
|
59
|
+
|
|
60
|
+
default:
|
|
61
|
+
break;
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
`],{type:`application/javascript`}),o=URL.createObjectURL(a),s=new Worker(o);function c(e){let t=Math.floor(e/1e3),n=Math.floor(e%1e3/10),a=Math.floor(t/3600),o=Math.floor(t%3600/60),s=t%60,c=``;return i&&(c+=String(a).padStart(2,`0`)+`:`),c+=String(o).padStart(2,`0`)+`:`,c+=String(s).padStart(2,`0`),r&&(c+=`.`+String(n).padStart(2,`0`)),c}this.start=()=>{this.isPaused=!1,s.postMessage({action:`start`,data:{interval:this.interval}})},this.pause=()=>{this.isPaused?this.resume():(this.isPaused=!0,s.postMessage({action:`pause`}))},this.resume=()=>{this.isPaused&&=(s.postMessage({action:`resume`}),!1)},this.stop=()=>{s.postMessage({action:`stop`}),this.isPaused=!1},this.reset=()=>{s.postMessage({action:`reset`}),this.elapsed=0,this.isPaused=!1},this.restart=()=>{this.stop(),this.start()},this.lap=()=>new Promise(e=>{s.postMessage({action:`lap`}),s.addEventListener(`message`,t=>{let{elapsed:n,timestamp:r,action:i}=t.data;if(i===`lap`){let t=c(n);e({timestamp:r||0,elapsed:n,formatted:t})}},{once:!0})}),s.onmessage=t=>{let{elapsed:n,timestamp:r}=t.data;this.elapsed=n,e({timestamp:r||0,elapsed:this.elapsed,formatted:c(this.elapsed)})},s.onerror=e=>{n&&n(e)}}},C=/* @__PURE__ */ e({default:()=>w}),pe=[`xmlns`,`viewBox`],me=[`width`,`height`],he={key:1},ge=[`cx`,`cy`,`r`,`fill`,`stroke`,`stroke-width`],_e=[`d`,`stroke`,`stroke-width`],ve=[`r`,`fill`,`stroke`,`stroke-width`],ye=[`r`,`fill`,`stroke`,`stroke-width`],be=[`x`,`y`],xe={key:5},Se=[`x`,`y`,`font-size`,`fill`,`font-weight`],Ce={key:0,class:`vue-ui-timer-controls`},we=[`title`],Te=[`title`],Ee=[`title`],De=[`title`],Oe=[`title`],w=/*#__PURE__*/ l({__name:`vue-ui-timer`,props:{config:{type:Object,default(){return{}}}},emits:[`start`,`pause`,`reset`,`restart`,`lap`],setup(e,{expose:l,emit:C}){let w=ae(()=>import(`./PackageVersion-D6pKL176.js`).then(e=>e.t)),{vue_ui_timer:ke}=o(),T=e,E=C,D=b(null),O=b(null),k=b(null),A=le(null),j=le(null),M=b(t()),N=b(0);ce(()=>{P()});function P(){if(F.value.responsive){let e=ee(()=>{let{width:e,height:t}=te({chart:D.value,title:F.value.style.title.text?O.value:null,legend:k.value});requestAnimationFrame(()=>{B.value.width=e,B.value.height=t,F.value.responsiveProportionalSizing?(B.value.tracker.core=n({relator:Math.min(e,t),adjuster:F.value.style.width,source:6*L.value.radiusRatio,threshold:1,fallback:1}),B.value.tracker.aura=n({relator:Math.min(e,t),adjuster:F.value.style.width,source:12*L.value.aura.radiusRatio,threshold:1,fallback:1}),B.value.label=n({relator:Math.min(e,t),adjuster:F.value.style.width,source:I.value.label.fontSize,threshold:10,fallback:10})):B.value.label=I.value.label.fontSize})});A.value&&(j.value&&A.value.unobserve(j.value),A.value.disconnect()),A.value=new ResizeObserver(e),j.value=D.value.parentNode,A.value.observe(j.value)}}se(()=>{A.value&&(j.value&&A.value.unobserve(j.value),A.value.disconnect())});let F=d({get:()=>je(),set:e=>e}),I=d(()=>F.value.stopwatch),L=d(()=>F.value.stopwatch.tracker),R=d(()=>F.value.stopwatch.legend);i({config:()=>F.value,dataset:()=>[],component:`VueUiTimer`,rules:[a.noHint]});let z=d(()=>F.value.useCursorPointer),{svgRef:Ae}=re({config:F.value.style.title});function je(){return s({userConfig:T.config,defaultConfig:ke})}de(()=>T.config,e=>{F.value=je(),P(),N.value+=1},{deep:!0});let Me=d(()=>{if(I.value.showHours&&I.value.showHundredth)return`00:00:00.00`;if(I.value.showHours&&!I.value.showHundredth)return`00:00:00`;if(!I.value.showHours&&I.value.showHundredth)return`00:00.00`;if(!I.value.showHours&&!I.value.showHundredth)return`00:00`}),B=b({height:F.value.style.height,width:F.value.style.width,tracker:{core:6*L.value.radiusRatio,aura:12*L.value.aura.radiusRatio},label:I.value.label.fontSize}),V=b(0),H=new fe(e=>Ne(e),10,``,I.value.showHundredth,I.value.showHours),U=b(!0),W=b(!1),G=b(!1);function K(){E(`start`),U.value&&H.start(),U.value=!1,W.value=!0}function q(){W.value&&=(E(`reset`),H.stop(),X.value=[],U.value=!0,!1)}function J(){G.value=!G.value,E(`pause`,V.value),H.pause()}function Y(){W.value&&(G.value=!1,E(`restart`),X.value=[],H.restart())}let X=b([]);async function Z(){if(!W.value||G.value)return;let e=await H.lap();e&&(X.value.push(e),E(`lap`,X.value))}function Ne({timestamp:e,elapsed:t,formatted:n}){V.value={timestamp:e,elapsed:t,formatted:n}}let Q=d(()=>Math.min(B.value.width,B.value.height)/2.5*I.value.track.radiusRatio);function Pe(e,t){return e*(360/(t*1e3))%360}function Fe(e){let t=Math.PI/180*e;return{cx:B.value.width/2+Q.value*Math.cos(t),cy:B.value.height/2+Q.value*Math.sin(t)}}let $=d(()=>{let e=Pe(V.value.elapsed,I.value.cycleSeconds),{cx:t,cy:n}=Fe(e-90),r=+(e>180);return{cx:t||B.value.width/2,cy:n||B.value.height/2-Q.value,largeArcFlag:r,sweepFlag:1}});return l({start:K,pause:J,reset:q,restart:Y,lap:Z}),(e,t)=>(y(),p(`div`,{ref_key:`timerChart`,ref:D,class:`vue-data-ui-component vue-ui-timer`,style:v({fontFamily:F.value.style.fontFamily,width:`100%`,height:F.value.responsive?`100%`:`auto`,textAlign:`center`})},[F.value.style.title.text?(y(),p(`div`,{key:0,ref_key:`chartTitle`,ref:O,style:v({width:`100%`,background:F.value.style.backgroundColor})},[(y(),ie(c,{key:`title_${N.value}`,config:{title:{cy:`title`,...F.value.style.title},subtitle:{cy:`subtitle`,...F.value.style.title.subtitle}}},null,8,[`config`]))],4)):f(``,!0),(y(),p(`svg`,{ref_key:`svgRef`,ref:Ae,xmlns:S(r),viewBox:`0 0 ${B.value.width<=0?10:B.value.width} ${B.value.height<=0?10:B.value.height}`,style:v({maxWidth:`100%`,overflow:`visible`,background:F.value.style.backgroundColor})},[h(S(w)),e.$slots[`chart-background`]?(y(),p(`foreignObject`,{key:0,x:0,y:0,width:B.value.width<=0?10:B.value.width,height:B.value.height<=0?10:B.value.height,style:{pointerEvents:`none`}},[x(e.$slots,`chart-background`,{},void 0,!0)],8,me)):f(``,!0),L.value.gradient.show?(y(),p(`defs`,he,[h(ne,{t:`radial`,id:`tracker_gradient_${M.value}`,cx:`50%`,cy:`50%`,r:`50%`,fx:`50%`,fy:`50%`,stops:[[`0%`,L.value.gradient.color,1],[`100%`,L.value.fill,1]]},null,8,[`id`,`stops`])])):f(``,!0),m(`circle`,{cx:B.value.width/2,cy:B.value.height/2,r:Q.value,fill:I.value.track.fill,stroke:I.value.track.stroke,"stroke-width":I.value.track.strokeWidth},null,8,ge),I.value.cycleTrack.show?(y(),p(`path`,{key:2,d:`M ${B.value.width/2},${B.value.height/2-Q.value} A ${Q.value},${Q.value} 0 ${$.value.largeArcFlag},${$.value.sweepFlag} ${$.value.cx},${$.value.cy}`,stroke:I.value.cycleTrack.stroke,"stroke-width":I.value.cycleTrack.strokeWidth,"stroke-linecap":`round`,fill:`none`},null,8,_e)):f(``,!0),m(`circle`,oe($.value,{r:B.value.tracker.core,fill:L.value.gradient.show?`url(#tracker_gradient_${M.value})`:L.value.fill,stroke:L.value.stroke,"stroke-width":L.value.strokeWidth}),null,16,ve),L.value.aura.show?(y(),p(`circle`,oe({key:3},$.value,{r:B.value.tracker.aura,fill:`${L.value.aura.fill}20`,stroke:L.value.aura.stroke,"stroke-width":L.value.aura.strokeWidth}),null,16,ye)):f(``,!0),e.$slots.time?(y(),p(`foreignObject`,{key:4,x:B.value.width/2,y:B.value.height/2,height:`0.1`,width:`0.1`,style:{overflow:`visible`}},[x(e.$slots,`time`,_(g({...V.value,...B.value})),void 0,!0)],8,be)):e.$slots.timeSvg?(y(),p(`g`,xe,[x(e.$slots,`timeSvg`,_(g({...V.value,...B.value})),void 0,!0)])):(y(),p(`text`,{key:6,x:B.value.width/2,y:B.value.height/2+B.value.label/4,"font-size":B.value.label,"text-anchor":`middle`,fill:I.value.label.color,"font-weight":I.value.label.bold?`bold`:`normal`,style:{"font-variant-numeric":`tabular-nums !important`}},ue(V.value.formatted||Me.value),9,Se))],12,pe)),m(`div`,{ref_key:`chartLegend`,ref:k,style:v({width:`100%`,backgroundColor:R.value.backgroundColor})},[e.$slots.controls?f(``,!0):(y(),p(`div`,Ce,[R.value.buttons.start?(y(),p(`button`,{key:0,title:R.value.buttonTitles.start,onClick:K,class:`vue-ui-timer-button`,style:v({opacity:W.value?.2:1,cursor:W.value?`default`:z.value?`pointer`:`default`})},[h(u,{name:`play`,stroke:R.value.buttons.iconColor},null,8,[`stroke`])],12,we)):f(``,!0),R.value.buttons.pause?(y(),p(`button`,{key:1,title:G.value?R.value.buttonTitles.resume:R.value.buttonTitles.pause,onClick:J,class:`vue-ui-timer-button`,style:v({opacity:W.value?1:.2,cursor:W.value&&z.value?`pointer`:`default`})},[h(u,{name:`pause`,stroke:R.value.buttons.iconColor},null,8,[`stroke`])],12,Te)):f(``,!0),R.value.buttons.reset?(y(),p(`button`,{key:2,title:R.value.buttonTitles.reset,onClick:q,class:`vue-ui-timer-button`,style:v({opacity:W.value?1:.2,cursor:W.value&&z.value?`pointer`:`default`})},[h(u,{name:`stop`,stroke:R.value.buttons.iconColor},null,8,[`stroke`])],12,Ee)):f(``,!0),R.value.buttons.restart?(y(),p(`button`,{key:3,title:R.value.buttonTitles.restart,onClick:Y,class:`vue-ui-timer-button`,style:v({opacity:W.value?1:.2,cursor:W.value&&z.value?`pointer`:`default`})},[h(u,{name:`restart`,stroke:R.value.buttons.iconColor},null,8,[`stroke`])],12,De)):f(``,!0),R.value.buttons.lap?(y(),p(`button`,{key:4,title:R.value.buttonTitles.lap,onClick:Z,class:`vue-ui-timer-button`,style:v({opacity:W.value&&!G.value?1:.2,cursor:W.value&&!G.value&&z.value?`pointer`:`default`})},[h(u,{name:`lap`,stroke:R.value.buttons.iconColor},null,8,[`stroke`])],12,Oe)):f(``,!0)])),x(e.$slots,`controls`,_(g({start:K,pause:J,reset:q,restart:Y,lap:Z,laps:X.value,isRunning:W.value,isPaused:G.value,...V.value})),void 0,!0),x(e.$slots,`laps`,_(g({laps:X.value,lap:Z,isRunning:W.value,isPaused:G.value,...V.value})),void 0,!0)],4)],4))}},[[`__scopeId`,`data-v-2ce4581a`]]);export{C as n,w as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{n as t,t as n}from"./annotationSlots-BRR85CqJ.js";import{n as r,t as i}from"./userOptionsSlots-DYuo-E5m.js";import{$ as a,X as o,Yt as s,at as c,b as l,i as ee,in as te,t as ne,zt as re}from"./lib-zDxoqrgo.js";import{n as ie,t as ae}from"./useHints-BH9r_0Vd.js";import{t as oe}from"./useConfig-CKdzPrcf.js";import{t as se}from"./usePrinter-CnyKPIFM.js";import{n as ce,t as le}from"./BaseScanner-8NdoBs7B.js";import{t as ue}from"./useChartExport-DtPNpc9M.js";import{n as de}from"./Title-BRAjxtjG.js";import{t as fe}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{l as pe,t as me}from"./useResponsive-D2CPcpda.js";import{t as he}from"./resolveChartConfig-BSo1Oe9n.js";import{t as ge}from"./useUserOptionState-CXlFnwPv.js";import{t as _e}from"./useChartAccessibility-DOMuYJfm.js";import{t as ve}from"./chartImage-NwZO-elv.js";import{t as ye}from"./usePrefersMotion-XLHwega2.js";import{t as be}from"./vue_ui_tiremarks-8HFfABNF.js";import{Fragment as xe,computed as u,createBlock as d,createCommentVNode as f,createElementBlock as p,createElementVNode as Se,createSlots as Ce,createVNode as we,defineAsyncComponent as m,guardReactiveProps as h,normalizeClass as g,normalizeProps as Te,normalizeStyle as _,onMounted as Ee,openBlock as v,ref as y,renderList as b,renderSlot as x,toDisplayString as S,toRefs as De,unref as C,watch as Oe,withCtx as ke}from"vue";var Ae=/* @__PURE__ */ e({default:()=>w}),je=[`id`],Me=[`xmlns`,`viewBox`,`aria-labelledby`,`aria-describedby`],Ne=[`id`],Pe=[`id`],Fe=[`width`,`height`],Ie={key:1},Le=[`d`,`stroke-width`,`stroke`],Re={key:2},ze=[`x1`,`y1`,`x2`,`y2`,`stroke-width`,`stroke`],Be=[`aria-label`],Ve=[`x`,`y`,`height`],He=[`x`,`y`,`font-size`,`fill`,`font-weight`,`text-anchor`],Ue={key:4,class:`vue-data-ui-watermark`},w=/*#__PURE__*/ fe({__name:`vue-ui-tiremarks`,props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},emits:[`copyAlt`],setup(e,{expose:fe,emit:Ae}){let w=m(()=>import(`./PenAndPaper-DvJJaeU2.js`).then(e=>e.t)),We=m(()=>import(`./UserOptions-D65t74CM.js`).then(e=>e.n)),Ge=m(()=>import(`./PackageVersion-D6pKL176.js`).then(e=>e.t)),{vue_ui_tiremarks:Ke}=oe(),T=ye(),E=e,qe=Ae,Je=u(()=>!!E.dataset&&Object.keys(E.dataset).length),D=y(o()),O=y(null),Ye=y(null),Xe=y(null),Ze=y(null),Qe=y(0),$e=y(0),k=y(null),A=y(null),j=y(z()),M=u(()=>j.value.userOptions),N=u(()=>j.value.style.chart.layout),P=u(()=>j.value.style.chart);ie({config:()=>j.value,dataset:()=>E.dataset,component:`VueUiTiremarks`,rules:[ae.noHint]});let et=u(()=>j.value.userOptions.useCursorPointer),tt=u(()=>te({defaultConfig:{userOptions:{show:!1},style:{chart:{backgroundColor:`#99999930`,animation:{use:!1},layout:{activeColor:`#6A6A6A80`,inactiveColor:`#CACACA80`,ticks:{gradient:{show:!1}}}}}},userConfig:j.value.skeletonConfig??{}})),{loading:F,FINAL_DATASET:I}=ce({...De(E),FINAL_CONFIG:j,prepareConfig:z,skeletonDataset:E.config?.skeletonDataset??{percentage:50},skeletonConfig:te({defaultConfig:j.value,userConfig:tt.value})}),{userOptionsVisible:L,setUserOptionsVisibility:nt,keepUserOptionState:rt}=ge({config:j.value}),{svgRef:R}=_e({config:P.value.title});function z(){return he(E.config,Ke,be)}Oe(()=>E.config,e=>{j.value=z(),L.value=!j.value.userOptions.showOnChartHover,K.value=P.value.width,q.value=P.value.height,lt(),$e.value+=1},{deep:!0});let{isPrinting:B,isImaging:V,generatePdf:it,generateImage:at}=se({elementId:D.value,fileName:P.value.title.text||`vue-ui-tiremarks`,options:j.value.userOptions.print}),ot=u(()=>j.value.userOptions.show&&!P.value.title.text),H=y(P.value.animation.use&&!T.value?0:l(I.value.percentage));Oe(()=>I.value,e=>{P.value.animation.use&&!T.value?st(e.percentage):H.value=e.percentage||0},{deep:!0}),Ee(()=>{lt()});function st(e){let t=P.value.animation.speed,n=Math.abs(e-H.value)/(t*120);function r(){H.value<e?H.value=Math.min(H.value+n,e):H.value>e&&(H.value=Math.max(H.value-n,e)),H.value!==e&&requestAnimationFrame(r)}r()}let ct=u(()=>j.value.debug);function lt(){if(re(E.dataset)&&c({componentName:`VueUiTiremarks`,type:`dataset`,debug:ct.value}),j.value.responsive){let e=pe(()=>{let{width:e,height:t}=me({chart:O.value,title:P.value.title.text?Xe.value:null,source:Ze.value});requestAnimationFrame(()=>{K.value=Math.max(.1,e),q.value=Math.max(.1,t-12)})});k.value&&(A.value&&k.value.unobserve(A.value),k.value.disconnect()),k.value=new ResizeObserver(e),A.value=O.value.parentNode,k.value.observe(A.value)}st(I.value.percentage||0)}let U=u(()=>N.value.display===`vertical`),W=u(()=>{let e=P.value.percentage.show,t={top:e?48:12,left:e?64:16,right:e?64:16,bottom:e?48:12};return U.value?{top:P.value.percentage.verticalPosition===`top`?t.top:3,left:3,right:3,bottom:P.value.percentage.verticalPosition===`bottom`?t.bottom:3}:{top:0,bottom:0,left:P.value.percentage.horizontalPosition===`left`?t.left:16,right:P.value.percentage.horizontalPosition===`right`?t.right:10}}),G=u(()=>Object.values(W.value).reduce((e,t)=>e+t,0)),K=y(P.value.width),q=y(P.value.height),J=u(()=>({height:q.value,width:K.value})),ut=u(()=>({horizontal:{x:X.value.x+(P.value.percentage.horizontalPosition===`left`?6:3),y:J.value.height/2-X.value.fontSize/2},vertical:{x:J.value.width/2-20,y:X.value.y-X.value.fontSize/2}})[N.value.display]),Y=u(()=>U.value?{mark:(J.value.height-G.value)/100*.5,space:(J.value.height-G.value)/100*.5}:{mark:(J.value.width-G.value)/100*.5,space:(J.value.width-G.value)/100*.5}),dt=u(()=>{let e=[];for(let t=0;t<100;t+=1){let n=N.value.ticks.gradient.show?s(N.value.activeColor,t/100*(N.value.ticks.gradient.shiftHueIntensity/100)):N.value.activeColor;if(U.value){let r=N.value.crescendo?(100-t)*(J.value.width-W.value.left-W.value.right)/100/3:0,i=W.value.left+4+r,a=J.value.width-W.value.right-4-r,o=J.value.height-W.value.bottom-t*Y.value.mark-t*Y.value.space-Y.value.mark,s=J.value.height-W.value.bottom-t*Y.value.mark-t*Y.value.space-Y.value.mark,c=(a-i)/N.value.curveAngleX,l=N.value.curveAngleY*((1+t)/100);e.push({x1:i,x2:a,y1:o,y2:s,curve:`M ${i} ${o} C ${i+c} ${o-l}, ${a-c} ${s-l}, ${a} ${s}`,color:n})}else{let r=N.value.crescendo?(100-t)*(J.value.height-W.value.top-W.value.bottom)/100/3:0,i=W.value.left+t*Y.value.mark+t*Y.value.space-Y.value.mark,a=i,o=W.value.top+4+r,s=J.value.height-W.value.bottom-4-r,c=N.value.curveAngleY*((1+t)/100),l=(s-o)/N.value.curveAngleX;e.push({x1:i,x2:a,y1:o,y2:s,curve:`M ${i} ${o} C ${i+c} ${o+l}, ${a+c} ${s-l}, ${a} ${s}`,color:n})}}return e}),X=u(()=>{let e,t,n,r=P.value.percentage.fontSize/3;return U.value?P.value.percentage.verticalPosition===`top`?(e=J.value.width/2,t=W.value.top/2,n=`middle`):P.value.percentage.verticalPosition===`bottom`&&(e=J.value.width/2,t=J.value.height-W.value.bottom/2+r,n=`middle`):P.value.percentage.horizontalPosition===`left`?(e=4,t=J.value.height/2+r,n=`start`):P.value.percentage.horizontalPosition===`right`&&(e=J.value.width-W.value.right+8,t=J.value.height/2+r,n=`start`),{x:e,y:t,textAnchor:n,bold:P.value.percentage.bold,fontSize:P.value.percentage.fontSize,fill:P.value.percentage.color}}),Z=y(!1);function ft(e){Z.value=e,Qe.value+=1}let Q=y(!1);function $(){Q.value=!Q.value}let pt=ve(O,()=>P.value.title.text),mt=u(()=>P.value.backgroundColor),ht=u(()=>P.value.title),{isCallbackImaging:gt,isCallbackSvg:_t,generateSvg:vt,onGenerateImage:yt}=ue({svg:R,title:ht,legend:null,legendItems:null,backgroundColor:mt,getSvgCallback:()=>j.value.userOptions.callbacks.svg,generateImage:at});async function bt(){if(qe(`copyAlt`,{config:j.value,dataset:I.value}),!j.value.userOptions.callbacks.altCopy){console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.");return}await Promise.resolve(j.value.userOptions.callbacks.altCopy({config:j.value,dataset:I.value}))}let xt=u(()=>`${D.value}-title`),St=u(()=>`${D.value}-desc`),Ct=u(()=>ee(P.value.percentage.formatter,H.value,a({v:H.value,s:`%`,r:P.value.percentage.rounding}))),wt=u(()=>P.value.title.text||``),Tt=u(()=>F.value?`Loading data`:`Value: ${Ct.value}`);return fe({getImage:pt,generatePdf:it,generateImage:at,generateSvg:vt,toggleAnnotator:$,toggleFullscreen:ft,copyAlt:bt}),(e,a)=>(v(),p(`div`,{ref_key:`tiremarksChart`,ref:O,class:g(`vue-data-ui-component vue-ui-tiremarks ${j.value.useCssAnimation?``:`vue-ui-dna`}`),style:_(`font-family:${j.value.style.fontFamily};width:100%; text-align:center;background:${P.value.backgroundColor}`),id:D.value,onMouseenter:a[0]||=()=>C(nt)(!0),onMouseleave:a[1]||=()=>C(nt)(!1)},[M.value.buttons.annotator?(v(),d(C(w),{key:0,svgRef:C(R),backgroundColor:P.value.backgroundColor,color:P.value.color,active:Q.value,isCursorPointer:et.value,palette:M.value.annotatorPalette,onClose:$},Ce({_:2},[b(C(n),n=>({name:n,fn:ke(r=>[x(e.$slots,n,Te(h(C(t)(n,r))),void 0,!0)])}))]),1032,[`svgRef`,`backgroundColor`,`color`,`active`,`isCursorPointer`,`palette`])):f(``,!0),ot.value?(v(),p(`div`,{key:1,ref_key:`noTitle`,ref:Ye,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},null,512)):f(``,!0),P.value.title.text?(v(),p(`div`,{key:2,ref_key:`chartTitle`,ref:Xe,style:`width:100%;background:transparent;padding-bottom:12px`},[(v(),d(de,{key:`title_${$e.value}`,config:{title:{cy:`wheel-title`,...P.value.title},subtitle:{cy:`wheel-subtitle`,...P.value.title.subtitle}}},null,8,[`config`]))],512)):f(``,!0),M.value.show&&Je.value&&(C(rt)||C(L))?(v(),d(C(We),{ref:`details`,key:`user_options_${Qe.value}`,backgroundColor:P.value.backgroundColor,color:P.value.color,isPrinting:C(B),isImaging:C(V),uid:D.value,hasPdf:M.value.buttons.pdf,hasImg:M.value.buttons.img,hasSvg:M.value.buttons.svg,hasFullscreen:M.value.buttons.fullscreen,hasAltCopy:M.value.buttons.altCopy,hasXls:!1,isFullscreen:Z.value,titles:{...M.value.buttonTitles},chartElement:O.value,position:M.value.position,hasAnnotator:M.value.buttons.annotator,isAnnotation:Q.value,callbacks:M.value.callbacks,printScale:M.value.print.scale,isCursorPointer:et.value,onToggleFullscreen:ft,onGeneratePdf:C(it),onGenerateImage:C(yt),onGenerateSvg:C(vt),onToggleAnnotator:$,onCopyAlt:bt,style:_({visibility:C(rt)?C(L)?`visible`:`hidden`:`visible`})},Ce({_:2},[b(C(r)(e.$slots,`menuIcon optionPdf optionImg optionSvg optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:ke(n=>[x(e.$slots,t,Te(h(C(i)(t,n))),void 0,!0)])}))]),1032,[`backgroundColor`,`color`,`isPrinting`,`isImaging`,`uid`,`hasPdf`,`hasImg`,`hasSvg`,`hasFullscreen`,`hasAltCopy`,`isFullscreen`,`titles`,`chartElement`,`position`,`hasAnnotator`,`isAnnotation`,`callbacks`,`printScale`,`isCursorPointer`,`onGeneratePdf`,`onGenerateImage`,`onGenerateSvg`,`style`])):f(``,!0),(v(),p(`svg`,{ref_key:`svgRef`,ref:R,xmlns:C(ne),class:g({"vue-data-ui-fullscreen--on":Z.value,"vue-data-ui-fulscreen--off":!Z.value}),viewBox:`0 0 ${K.value} ${q.value}`,style:_(`max-width:100%; overflow: visible; background:transparent;color:${P.value.color}`),role:`img`,"aria-labelledby":xt.value,"aria-describedby":St.value},[Se(`title`,{id:xt.value},S(wt.value),9,Ne),Se(`desc`,{id:St.value},S(Tt.value),9,Pe),we(C(Ge)),e.$slots[`chart-background`]?(v(),p(`foreignObject`,{key:0,x:0,y:0,width:J.value.width,height:J.value.height,style:{pointerEvents:`none`}},[x(e.$slots,`chart-background`,{},void 0,!0)],8,Fe)):f(``,!0),N.value.curved?(v(),p(`g`,Ie,[(v(!0),p(xe,null,b(dt.value,(e,t)=>(v(),p(`path`,{d:e.curve,"stroke-width":Y.value.mark,stroke:H.value>=t?e.color:N.value.inactiveColor,"stroke-linecap":`round`,fill:`none`,class:g({"vue-ui-tick-animated":P.value.animation.use&&!C(T)&&t<=H.value})},null,10,Le))),256))])):(v(),p(`g`,Re,[(v(!0),p(xe,null,b(dt.value,(e,t)=>(v(),p(`line`,{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2,"stroke-width":Y.value.mark,stroke:H.value>=t?e.color:N.value.inactiveColor,"stroke-linecap":`round`},null,8,ze))),256))])),P.value.percentage.show?(v(),p(`g`,{key:3,role:`status`,"aria-live":`polite`,"aria-label":C(F)?`...`:`${Ct.value}`},[C(F)?(v(),p(`rect`,{key:0,x:ut.value.x,y:ut.value.y,width:40,height:X.value.fontSize,fill:`#6A6A6A80`,rx:3},null,8,Ve)):(v(),p(`text`,{key:1,"aria-hidden":`true`,x:X.value.x,y:X.value.y,"font-size":X.value.fontSize,fill:N.value.ticks.gradient.show&&P.value.percentage.useGradientColor?C(s)(N.value.activeColor,H.value/100*(N.value.ticks.gradient.shiftHueIntensity/100)):P.value.percentage.color,"font-weight":X.value.bold?`bold`:`normal`,"text-anchor":X.value.textAnchor},S(Ct.value),9,He))],8,Be)):f(``,!0),x(e.$slots,`svg`,{svg:{...J.value,isPrintingImg:C(B)||C(V)||C(gt),isPrintingSvg:C(_t)}},void 0,!0)],14,Me)),e.$slots.watermark?(v(),p(`div`,Ue,[x(e.$slots,`watermark`,Te(h({isPrinting:C(B)||C(V)||C(gt)||C(_t)})),void 0,!0)])):f(``,!0),e.$slots.source?(v(),p(`div`,{key:5,ref_key:`source`,ref:Ze,dir:`auto`},[x(e.$slots,`source`,{},void 0,!0)],512)):f(``,!0),x(e.$slots,`skeleton`,{},()=>[C(F)?(v(),d(le,{key:0})):f(``,!0)],!0)],46,je))}},[[`__scopeId`,`data-v-260aecce`]]);export{Ae as n,w as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{n as t,t as n}from"./tableIntegration-CNoJ1CIY.js";import{n as r,t as i}from"./annotationSlots-BRR85CqJ.js";import{n as a,t as o}from"./userOptionsSlots-DYuo-E5m.js";import{$ as s,D as c,Dt as l,Ft as u,Ht as d,S as f,X as ee,Zt as te,at as ne,et as re,i as ie,in as ae,nt as oe,pt as se,r as ce,t as le,w as ue,zt as de}from"./lib-zDxoqrgo.js";import{n as fe,t as pe}from"./useHints-BH9r_0Vd.js";import{t as me}from"./useConfig-CKdzPrcf.js";import{t as he}from"./usePrinter-CnyKPIFM.js";import{n as ge,t as _e}from"./BaseScanner-8NdoBs7B.js";import{t as ve}from"./useChartExport-DtPNpc9M.js";import{t as ye}from"./useTransitions-DfSHzsdz.js";import{n as be}from"./Title-BRAjxtjG.js";import{t as xe}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{l as Se,t as Ce}from"./useResponsive-D2CPcpda.js";import{t as we}from"./BaseIcon-Cz30ODFA.js";import{t as Te}from"./DefGrad-DKMq1REY.js";import{t as Ee}from"./BaseLegendToggle-Dn_tNvn4.js";import{t as De}from"./A11yDataTable-DWNlWXzs.js";import{n as Oe}from"./resolveChartConfig-BSo1Oe9n.js";import{t as ke}from"./useUserOptionState-CXlFnwPv.js";import{t as Ae}from"./useChartAccessibility-DOMuYJfm.js";import{t as je}from"./chartImage-NwZO-elv.js";import{t as Me}from"./Legend-DokTll4u.js";import{t as Ne}from"./usePanZoom-BdjP5Suc.js";import{t as Pe}from"./vue_ui_treemap-Bv4Rdl5_.js";import{Fragment as Fe,Teleport as Ie,computed as p,createBlock as m,createCommentVNode as h,createElementBlock as g,createElementVNode as _,createSlots as Le,createTextVNode as Re,createVNode as ze,defineAsyncComponent as Be,guardReactiveProps as v,mergeProps as Ve,nextTick as He,normalizeClass as Ue,normalizeProps as We,normalizeStyle as y,onBeforeUnmount as Ge,onMounted as Ke,openBlock as b,ref as x,renderList as qe,renderSlot as S,resolveDynamicComponent as Je,shallowRef as C,toDisplayString as Ye,toRefs as Xe,unref as w,useCssVars as Ze,useSlots as Qe,watch as $e,withCtx as T,withKeys as et,withModifiers as tt}from"vue";function nt(e,t){let n=e.length;if(n===0)throw Error(`Max aspect ratio cannot be computed: ${e} is an empty array`);{let r=1/0,i=-1/0,a=0;for(let t=0;t<n;t+=1){let n=e[t].normalizedValue;n<r&&(r=n),n>i&&(i=n),a+=n}return Math.max(t**2*i/a**2,a**2/(t**2*r))}}function rt(e){let{xOffset:t,yOffset:n,width:r,height:i}=e;return{x0:t,y0:n,x1:t+r,y1:n+i}}function it(e,t,n){if(e.length===0)return!0;{let r=e.concat(t);return nt(e,n)>=nt(r,n)}}function at(e){let t=[],n=e.length;for(let r=0;r<n;r+=1){let n=e[r],i=n.length;for(let e=0;e<i;e+=1)t.push(n[e])}return t}function ot(e,t){return ft({...t,children:e})}function st(e){return(e.x1-e.x0)*(e.y1-e.y0)}function ct(e,t){let{width:n,height:r,xOffset:i,yOffset:a}=dt(t),o=e.length,s=e.map(e=>e.normalizedValue||0).reduce((e,t)=>e+t,0),c=s/r,l=s/n,u=i,d=a,f=[];if(n>=r){for(let t=0;t<o;t+=1){let n=e[t],r=d+n.normalizedValue/c,i={x0:u,y0:d,x1:u+c,y1:r},a=Object.assign({},n,i);d=r,f.push(a)}return f}for(let t=0;t<o;t+=1){let n=e[t],r=u+n.normalizedValue/l,i={x0:u,y0:d,x1:r,y1:d+l},a=Object.assign({},n,i);u=r,f.push(a)}return f}function lt(e){let t=dt(e),n=t.width,r=t.height;return Math.min(n,r)}function ut(e,t){let n=e.length,r=t/e.map(e=>e.value??0).reduce((e,t)=>e+t,0),i=[],a,o;for(let t=0;t<n;t+=1)o=e[t],a=Object.assign({},o,{normalizedValue:o.value*(r||0)}),i.push(a);return i}function dt(e){let{x0:t,y0:n,x1:r,y1:i}=e;return{xOffset:t,yOffset:n,width:r-t,height:i-n}}function E(e,t,n,r){let i=e,a=t,o=n,s=r;for(;;){let e=i.length;if(e===0){let e=ct(a,o);return s.concat(e)}let t=lt(o),n=i[0],r=i.slice(1,e);if(it(a,n,t)){let e=a.concat(n);i=r,a=e,o=o,s=s}else{let e=a.length,t=0;for(let n=0;n<e;n+=1)t+=a[n].normalizedValue;let n=pt(o,t),r=ct(a,o),c=s.concat(r);i=i,a=[],o=n,s=c}}}function ft(e){if(e.children===void 0||!e.children.length)return[e];{let t=E(ut(e.children,st(e)),[],e,[]),n=t.length,r=[];for(let e=0;e<n;e+=1)r.push(ft(t[e]));return at(r)}}function pt(e,t){let{width:n,height:r,xOffset:i,yOffset:a}=dt(e);if(n>=r){let e=t/r,o=n-e;return rt({xOffset:i+e,yOffset:a,width:o,height:r})}{let e=t/n,o=r-e;return rt({xOffset:i,yOffset:a+e,width:n,height:o})}}var mt=/* @__PURE__ */ e({default:()=>Ut}),ht=[`id`],gt=[`id`],_t=[`id`],vt=[`tabindex`,`onClick`,`onKeydown`,`data-last-crumb`,`onMouseenter`,`onFocus`],yt={class:`vue-ui-treemap-crumb-unit`},bt={class:`vue-ui-treemap-crumb-unit-label`},xt={key:0,style:{width:`24px`,display:`flex`,"align-items":`center`}},St={key:0,class:`vue-ui-treemap-crumb-unit-arrow`},Ct={style:{position:`relative`}},wt=[`xmlns`,`aria-describedby`,`viewBox`],Tt={key:0},Et=[`x`,`y`,`height`,`width`,`fill`,`rx`,`stroke`,`stroke-width`,`onClick`,`onMouseenter`,`onMouseleave`],Dt=[`id`],Ot=[`x`,`y`,`width`,`height`],kt=[`clip-path`],At=[`transform`],jt=[`transform`],Mt=[`x`,`y`,`fill`,`font-size`,`font-family`,`font-weight`],Nt={key:0},Pt=[`x`,`y`,`height`,`width`],Ft={style:{width:`100%`,height:`100%`,overflow:`hidden`},class:`vue-ui-treemap-cell`},It={key:0,"data-dom-to-png-ignore":``,class:`reset-wrapper`},Lt={key:1,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},Rt={key:6,class:`vue-data-ui-watermark`},zt=[`id`],Bt=[`onClick`],Vt={style:{display:`flex`,"align-items":`center`}},Ht=4,Ut=/*#__PURE__*/ xe({__name:`vue-ui-treemap`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:[`selectLegend`,`selectDatapoint`,`copyAlt`],setup(e,{expose:xe,emit:nt}){Ze(e=>({v30f17a15:Di.value}));let rt=Be(()=>import(`./DataTable-DSUA5M9p.js`)),it=Be(()=>import(`./PenAndPaper-DvJJaeU2.js`).then(e=>e.t)),at=Be(()=>import(`./vue-ui-accordion-Dy5OVFKr.js`).then(e=>e.n)),st=Be(()=>import(`./Tooltip-BUXB0i6z.js`)),ct=Be(()=>import(`./UserOptions-D65t74CM.js`).then(e=>e.n)),lt=Be(()=>import(`./PackageVersion-D6pKL176.js`).then(e=>e.t)),ut=Be(()=>import(`./BaseDraggableDialog-T1gEsQid.js`).then(e=>e.n)),{vue_ui_treemap:dt}=me(),E=e,ft=nt,pt=Qe(),mt=p(()=>!!E.dataset&&E.dataset.length),Ut=p(()=>/^((?!chrome|android).)*safari/i.test(navigator.userAgent)),D=x(ee()),Wt=x(!1),Gt=x(``),Kt=x(!1),qt=x(0),O=x([]),k=C(null),Jt=C(null),Yt=C(null),Xt=C(null),Zt=C(null),Qt=x(0),$t=x(0),en=x(0),A=x([]),tn=x(null),nn=x(!1),rn=x(null),an=x(null),on=x(null),sn=x(/* @__PURE__ */ new Map),j=x(null),cn=x({x:0,y:0}),ln=x(`pointer`),un=x(!1),M=x(yn()),N=p(()=>M.value.userOptions),P=p(()=>M.value.style.chart.tooltip),F=p(()=>M.value.style.chart.legend),I=p(()=>M.value.style.chart.layout.labels),L=p(()=>M.value.style.chart.layout),R=p(()=>M.value.style.chart);fe({config:()=>M.value,dataset:()=>E.dataset,component:`VueUiTreemap`,rules:[pe.emptyArray,{test:e=>e.length===1&&e[0]?.children&&e[0].children.length<6&&e[0].children.length>0||e.flatMap(e=>e?.children?.length??0).reduce((e,t)=>e+t,0)<6,message:[`👀 The number of data points is < 6. Consider:`,``,`▶️ Using another type of chart instead to better show proportions: VueUiDonut, VueUiWaffle`]},{test:e=>e.length===1&&e[0]?.children&&e[0].children.length===0,message:[`👀 There is a series defined in the dataset but it has no children items.`,``,`▶️ Add children items to your series.`]}]});let{transitionEnabled:dn}=ye({config:()=>M.value.transitions,dataset:()=>E.dataset}),z=p(()=>M.value.userOptions.useCursorPointer),fn=p(()=>ae({defaultConfig:{userOptions:{show:!1},style:{chart:{backgroundColor:`#999999`,layout:{labels:{showDefaultLabels:!1},rects:{stroke:`#6A6A6A`}},legend:{backgroundColor:`transparent`}}}},userConfig:M.value.skeletonConfig??{}})),{loading:pn,FINAL_DATASET:mn,manualLoading:hn}=ge({...Xe(E),FINAL_CONFIG:M,prepareConfig:yn,skeletonDataset:E.config?.skeletonDataset??[{name:`_`,value:53,color:`#CACACA90`,children:[{name:`_`,value:21},{name:`_`,value:13},{name:`_`,value:8},{name:`_`,value:5},{name:`_`,value:3},{name:`_`,value:2},{name:`_`,value:1}]}],skeletonConfig:ae({defaultConfig:M.value,userConfig:fn.value})}),{userOptionsVisible:gn,setUserOptionsVisibility:_n,keepUserOptionState:vn}=ke({config:M.value}),{svgRef:B}=Ae({config:R.value.title});function yn(){return Oe(E.config,dt,Pe)}let bn=te(E.config);$e(()=>E.config,(e,t)=>{let n=te(e),r=n!==bn;bn=n;let i=yn();if(!r){M.value.style.chart.tooltip=i.style.chart.tooltip,V.value.showTooltip=M.value.style.chart.tooltip.show;return}pn.value||(M.value=i),gn.value=!M.value.userOptions.showOnChartHover,Qt.value+=1,$t.value+=1,en.value+=1,V.value.showTable=M.value.table.show,V.value.showTooltip=P.value.show,V.value.showZoom=R.value.zoom?.show??!1},{deep:!0});let{isPrinting:xn,isImaging:Sn,generatePdf:Cn,generateImage:wn}=he({elementId:`treemap_${D.value}`,fileName:R.value.title.text||`vue-ui-treemap`,options:M.value.userOptions.print}),Tn=p(()=>M.value.userOptions.show&&!R.value.title.text),En=p(()=>ue(M.value.customPalette)),V=x({showTable:M.value.table.show,showTooltip:P.value.show,showZoom:R.value.zoom?.show??!1});$e(M,()=>{V.value={showTable:M.value.table.show,showTooltip:P.value.show,showZoom:R.value.zoom?.show??!1}},{immediate:!0});let Dn=x({height:R.value.height,width:R.value.width});function On(e){let t=k.value,n=Dn.value.height;return!t||!n?e:e*(n/t.getBoundingClientRect().height)}function kn(){if(!tn.value||X.value.length<=1)return 0;let e=tn.value,t=getComputedStyle(e);return On(e.offsetHeight+parseFloat(t.marginTop||`0`)+parseFloat(t.marginBottom||`0`)+parseFloat(t.paddingTop||`0`)+parseFloat(t.paddingBottom||`0`))}let H=p(()=>{let e=R.value.padding,t=Dn.value.width,n=Dn.value.height,r=kn(),i=e.left,a=t-e.right,o=e.top,s=n-e.bottom-r;return{left:i,top:o,right:a,bottom:s,width:a-i,height:Math.max(0,s-o),vbWidth:t,vbHeight:n-r,offsetY:r}}),U=x(re(mn.value)),W=x(U.value),An=C(/* @__PURE__ */ new Map);$e([U,()=>M.value],()=>{on.value=null,sn.value=/* @__PURE__ */ new Map},{deep:!0}),$e(()=>O.value,()=>{on.value=null,sn.value=/* @__PURE__ */ new Map,Pn(),en.value+=1,$t.value+=1},{deep:!0}),$e([()=>Dn.value.width,()=>Dn.value.height],()=>{sn.value=/* @__PURE__ */ new Map});function jn(e){Array.isArray(e)&&e.forEach((e,t)=>{e.id||=ee(),e.sourceColor===void 0&&(e.sourceColor=f(e.color)||null);let n=e.sourceColor||An.value.get(e.id)||En.value[t]||d[t]||d[t%d.length];n=f(n),An.value.set(e.id,n),e.color=n,Mn(e,n)})}function Mn(e,t){Array.isArray(e.children)&&e.children.forEach(n=>{n.id||=ee(),n.parentId=e.id,n.sourceColor===void 0&&(n.sourceColor=f(n.color)||null);let r=n.sourceColor||t;n.color=r,Mn(n,r)})}function Nn(e){let t=Y(e);for(;t?.parentId;)t=Y(t.parentId);return t?.id??null}function Pn(){let e=U.value.filter(e=>!O.value.includes(e.id));if(!A.value.length){W.value=e;return}let t=A.value[A.value.length-1],n=Y(t);if(!n){A.value=[],W.value=e;return}let r=Nn(n.id);if(r&&O.value.includes(r)){A.value=[],W.value=e;return}W.value=[n]}$e(()=>mn.value,()=>{U.value=re(mn.value),jn(U.value),Pn(),en.value+=1,$t.value+=1},{deep:!0,immediate:!0,flush:`post`});let Fn=C(null),In=C(null);Ke(()=>{nn.value=!0,Rn()});let Ln=p(()=>M.value.debug);Ke(()=>{pt[`chart-background`]&&Ln.value&&console.warn(`VueUiTreemap does not support the #chart-background slot.`)});function Rn(){if(de(E.dataset)&&ne({componentName:`VueUiTreemap`,type:`dataset`,debug:Ln.value}),jn(U.value),de(E.dataset)||(hn.value=M.value.loading),M.value.responsive){let e=Se(()=>{let{width:e,height:t}=Ce({chart:k.value,title:R.value.title.text?Jt.value:null,legend:F.value.show?Yt.value:null,source:Xt.value,noTitle:Zt.value});requestAnimationFrame(()=>{Dn.value.width=e,Dn.value.height=t-12})});Fn.value&&(In.value&&Fn.value.unobserve(In.value),Fn.value.disconnect()),Fn.value=new ResizeObserver(e),In.value=k.value.parentNode,Fn.value.observe(In.value)}}Ge(()=>{Fn.value&&(In.value&&Fn.value.unobserve(In.value),Fn.value.disconnect())});let zn=p(()=>W.value.map((e,t)=>({...e,color:f(e.color)||En.value[t]||d[t]||d[t%d.length]})).filter(e=>!O.value.includes(e.id))),Bn=p(()=>U.value.filter(e=>!O.value.includes(e.id)).map(e=>e.value||0).reduce((e,t)=>e+t,0)),Vn=p({get(){let e=[...zn.value];return L.value.sorted&&(e=[...zn.value].sort((e,t)=>t.value-e.value)),e.map(e=>({...e}))},set(e){return e}});function Hn(e,t){return e.value/t}function Un(e,t,n){let r=L.value.rects.colorRatio-Hn(t,n);return u(e,r<0?0:r)}function Wn(e){return Array.isArray(e.children)&&e.children.length>0}function Gn(e){return[...e].sort((e,t)=>{let n=Wn(e),r=Wn(t);if(n!==r)return n-r;let i=Number(e.value)||0;return(Number(t.value)||0)-i})}function Kn(e,t,n,r,i){return Gn(e).map((e,a)=>{let o=e.sourceColor||f(e.color)||f(t)||En.value[a]||d[a]||d[a%d.length],s=e.sourceColor?e.sourceColor:Un(o,e,r),c=Hn(e,r),l=i??e.parentId??e.id,u=Array.isArray(e.children)&&e.children.length&&e.children.reduce((e,t)=>e+(Number(t.value)||0),0)||1;return{...e,color:s,proportion:c,parentName:n,rootId:l,children:Array.isArray(e.children)&&e.children.length?Kn(e.children,o,e.name,u,l):void 0}})}function qn(e){let t=or(e),n=Jn(e),r=t*.55,i=t*.55,a=t*1.05,o=t*1.05,s=t*.35,c=n?a+o+s:t*.45,l=e.x0+r,u=e.x1-r,d=e.y0+c,f=e.y1-i;return u<=l||f<=d?null:{x0:l,y0:d,x1:u,y1:f}}function Jn(e){return I.value.hideUnderProportion===0||Yn(e)}function Yn(e){let t=Number(I.value.hideUnderProportion);return!Number.isFinite(t)||t<=0||e.proportion>t}function Xn(e,t,n=0,r=null){if(!Array.isArray(e)||!e.length)return[];let i=e.map(e=>{let{children:t,...n}=e;return{...n}}),a=new Map(e.map(e=>[e.id,Array.isArray(e.children)?e.children:[]])),o=new Map(e.map(e=>[e.id,e])),s=ot(i,t),c=[];for(let e of s){let t=a.get(e.id)||[],i=o.get(e.id),s={...e,depth:n,parentId:r??e.parentId??null,color:i?.color??e.color??null,children:t,isVisibleNode:!0,showLabel:Jn(e)};if(c.push(s),t.length){let r=qn(s);r&&c.push(...Xn(t,r,n+1,e.id))}}return c}let Zn=p(()=>{let e=W.value.length?W.value:Vn.value,t=e.map(e=>Number(e.value)||0).reduce((e,t)=>e+t,0)||1;return Xn(e.map((e,n)=>{let r=e.children?e.children.reduce((e,t)=>e+(Number(t.value)||0),0):e.value,{children:i,...a}=e,o=e.sourceColor||f(e.color)||An.value.get(e.id)||En.value[n]||d[n]||d[n%d.length],s=e.sourceColor?e.sourceColor:Un(o,e,t);return{...a,id:e.id||ee(),parentId:e.parentId??null,name:e.name,value:e.value,color:s,proportion:(Number(e.value)||0)/t,children:Array.isArray(e.children)&&e.children.length?Kn(e.children,o,e.name,r||1):void 0}}),{x0:H.value.left,y0:H.value.top,x1:H.value.left+H.value.width,y1:H.value.top+H.value.height})}),G=p(()=>Zn.value);function Qn(e){return(Z.value&&Z.value.id===e.id?L.value.rects.selected.strokeWidth:L.value.rects.strokeWidth)*Hr.value}function K({y0:e,y1:t}){return t-e<=0?1e-4:Math.round((t-e)*1e4)/1e4}function q({x0:e,x1:t}){return t-e<=0?1e-4:Math.round((t-e)*1e4)/1e4}function $n(){let e=I.value,t=Number(e.minFontSize),n=Number(e.fontSize),r=Math.max(0,Math.min(Number.isFinite(t)?t:0,Number.isFinite(n)?n:0));return{lowerBound:r,upperBound:Math.max(r,Number.isFinite(n)?n:r)}}function er(e){let t=Math.min(4,Math.max(e*.25,.5));return{paddingX:t,paddingTop:t}}function tr(e,t){let{paddingX:n,paddingTop:r}=er(t),i=t*1.1;return{x:e.x0+n,y:e.y0+r,width:Math.max(q(e)-n*2,0),height:Math.max(K(e)-r*2,0),lineHeight:i}}function nr(e,t){return ie(I.value.formatter,e.value,s({p:I.value.prefix,v:e.value,s:I.value.suffix,r:P.value.roundingValue}),{datapoint:e,seriesIndex:t})}function rr(e,t){let n=nr(e,t);return Array.isArray(e.children)&&e.children.length?[`${e.name} (${n})`]:[`${e.name}`,n].filter(e=>`${e}`.length)}function ir(e,t,n){let r=rr(e,n),i=tr(e,t);return!r.length||i.width<=0||i.height<=0||r.length*i.lineHeight>i.height?!1:r.every((e,n)=>yi(e,t,n===0?500:400)<=i.width)}function ar(e,t,n,r){let i=rr(e,t),a=Math.max(1,...i.map(e=>String(e).length)),o=Math.min(18,Math.max(10,Math.ceil(a*.7))),s=Math.max(1,i.length),c=Math.max(q(e)-1,1e-4),l=Math.max(K(e)-1,1e-4),u=c/(o*.58),d=l/(s*1.35);return Math.max(n,Math.min(r,u,d))}function or(e,t){let{lowerBound:n,upperBound:r}=$n(),i=Math.max(1e-4,Math.min(q(e),K(e))),a=Math.max(n,Math.min(r,i*.9)),o=Math.min(a,ar(e,t,n,r));if(ir(e,o,t)||!ir(e,n,t))return o;let s=n,c=o,l=n;for(let n=0;n<8;n+=1){let n=(s+c)/2;ir(e,n,t)?(l=n,s=n):c=n}let u=Math.max(n,o*.7);return l>=u?l:o}function sr(e){Kt.value=e,qt.value+=1}let J=p(()=>({x:0,y:0,width:H.value.vbWidth,height:H.value.vbHeight}));function Y(e,t=U.value){for(let n of t){if(n.id===e)return n;if(n.children){let t=Y(e,n.children);if(t)return t}}return null}function cr(e){let t=[],n=Y(e);for(;n&&n.parentId;){let e=Y(n.parentId);if(!e)break;t.unshift(e.id),n=e}return t}let lr=p(()=>A.value.length>0);function ur(){W.value=U.value.slice(),A.value=[],ft(`selectDatapoint`,void 0)}function dr(){return A.value[A.value.length-1]??null}function fr(e,t,n){A.value=[...cr(e.id),e.id],W.value=[e],M.value.events.datapointClick&&M.value.events.datapointClick({datapoint:t??e,seriesIndex:n}),ft(`selectDatapoint`,t??e)}function pr(e,t){let n=dr();if(!n){ur();return}let r=Y(n);if(!r?.parentId){M.value.events.datapointClick&&M.value.events.datapointClick({datapoint:e,seriesIndex:t}),ur();return}let i=Y(r.parentId);if(!i){ur();return}A.value=[...cr(i.id),i.id],W.value=[i],M.value.events.datapointClick&&M.value.events.datapointClick({datapoint:e,seriesIndex:t}),ft(`selectDatapoint`,e)}function mr(e,t){if(!e){ur();return}let n=Y(e.id);if(n){if(dr()===n.id){pr(e,t);return}fr(n,e,t)}}function hr(e){return e?dr()===e.id:!1}let X=p(()=>{let e=[{id:null,label:`All`}];if(A.value.length>0){let t=Y(A.value[A.value.length-1]),n=[];for(;t;)n.unshift(t),t=t.parentId?Y(t.parentId):null;for(let t of n)e.push({id:t.id,label:t.name,node:t})}return e}),Z=C(null),gr=p(()=>U.value.map((e,t)=>({...e,color:f(e.color)||En.value[t]||d[t]||d[t%d.length],shape:`square`})).sort((e,t)=>t.value-e.value).map((e,t)=>{let n=e.value/U.value.map(e=>e.value).reduce((e,t)=>e+t,0);return{...e,proportion:n,isSegregated:O.value.includes(e.id),segregate:()=>br(e),opacity:O.value.includes(e.id)?.5:1,display:`${e.name}${F.value.showPercentage||F.value.showValue?`: `:``}${F.value.showValue?ie(I.value.formatter,e.value,s({p:I.value.prefix,v:e.value,s:I.value.suffix,r:F.value.roundingValue}),{datapoint:e}):``}${F.value.showPercentage?O.value.includes(e.id)?`${F.value.showValue?` (`:``}- %${F.value.showValue?`)`:``}`:`${F.value.showValue?` (`:``}${isNaN(e.value/Bn.value)?`-`:(e.value/Bn.value*100).toFixed(F.value.roundingPercentage)}%${F.value.showValue?`)`:``}`:``}`}})),_r=p(()=>({cy:`treemap-div-legend`,backgroundColor:F.value.backgroundColor,color:F.value.color,fontSize:F.value.fontSize,paddingBottom:12,fontWeight:F.value.bold?`bold`:``})),vr=p(()=>O.value.length===gr.value.length);function yr(){O.value.length?O.value=[]:gr.value.forEach(e=>{O.value.push(e.id)}),ft(`selectLegend`,U.value.filter(e=>!O.value.includes(e.id)))}function br(e){Z.value=null,O.value.includes(e.id)?O.value=O.value.filter(t=>t!==e.id):O.value.length<E.dataset.length-1&&O.value.push(e.id),ft(`selectLegend`,U.value.filter(e=>!O.value.includes(e.id)))}function xr(e){return U.value.length?U.value.find(t=>t.name===e)||(Ln.value&&console.warn(`VueUiTreemap - Series name not found "${e}"`),null):(Ln.value&&console.warn(`VueUiTreemap - There are no series to show.`),null)}function Sr(e){let t=xr(e);t!==null&&O.value.includes(t.id)&&br({id:t.id})}function Cr(e){let t=xr(e);t!==null&&(O.value.includes(t.id)||br({id:t.id}))}function wr({datapoint:e,seriesIndex:t}){Z.value=null,Wt.value=!1,j.value=null,ln.value=`pointer`,M.value.events.datapointLeave&&M.value.events.datapointLeave({datapoint:e,seriesIndex:t})}let Tr=x(null);function Er({datapoint:e,seriesIndex:t,triggerMode:n=`pointer`}){if(vr.value||n===`pointer`&&Ir.value)return;M.value.events.datapointEnter&&M.value.events.datapointEnter({datapoint:e,seriesIndex:t}),j.value=t,ln.value=n,Z.value=e,Tr.value={datapoint:e,seriesIndex:t,config:M.value,series:zn.value};let r=P.value.customFormat;if(l(r)&&se(()=>r({seriesIndex:t,datapoint:e,series:zn.value,config:M.value})))Gt.value=r({seriesIndex:t,datapoint:e,series:zn.value,config:M.value});else{let n=``;n+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${P.value.borderColor};padding-bottom:6px;margin-bottom:3px;">${e.name}</div>`,n+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 12 12" height="14" width="14"><rect x="0" y="0" height="12" width="12" stroke="none" fill="${e.color}"/></svg>`,n+=`<b>${ie(I.value.formatter,e.value,s({p:I.value.prefix,v:e.value,s:I.value.suffix,r:P.value.roundingValue}),{datapoint:e,seriesIndex:t})}</b>`,Gt.value=`<div>${n}</div>`}Wt.value=!0}let Q=p(()=>({head:G.value.map(e=>({name:e.name,color:e.color})),body:G.value.map(e=>e.value)}));function Dr(e=null){He(()=>{let t=Q.value.head.map((e,t)=>[[e.name],[Q.value.body[t]],[isNaN(Q.value.body[t]/Bn.value)?`-`:Q.value.body[t]/Bn.value*100]]),n=[[R.value.title.text],[R.value.title.subtitle.text],[[``],[`val`],[`%`]]].concat(t),r=c(n);e?e(r):oe({csvContent:r,title:R.value.title.text||`vue-ui-treemap`})})}let Or=p(()=>{let e=[M.value.table.columnNames.series,M.value.table.columnNames.value,M.value.table.columnNames.percentage],t=Q.value.head.map((e,t)=>{let n=ie(I.value.formatter,Q.value.body[t],s({p:I.value.prefix,v:Q.value.body[t],s:I.value.suffix,r:M.value.table.td.roundingValue}));return[{color:e.color,name:e.name,shape:`square`},n,isNaN(Q.value.body[t]/Bn.value)?`-`:s({v:Q.value.body[t]/Bn.value*100,s:`%`,r:M.value.table.td.roundingPercentage})]}),n={th:{backgroundColor:M.value.table.th.backgroundColor,color:M.value.table.th.color,outline:M.value.table.th.outline},td:{backgroundColor:M.value.table.td.backgroundColor,color:M.value.table.td.color,outline:M.value.table.td.outline},breakpoint:M.value.table.responsiveBreakpoint};return{colNames:[M.value.table.columnNames.series,M.value.table.columnNames.value],head:e,body:t,config:n}});function kr(){return G.value}function Ar(){V.value.showTable=!V.value.showTable}function jr(){V.value.showTooltip=!V.value.showTooltip}function Mr(){V.value.showZoom=!V.value.showZoom}let Nr=x(!1);function Pr(){Nr.value=!Nr.value}let Fr=p(()=>!Nr.value&&V.value.showZoom),Ir=x(null),Lr=x(!1),{viewBox:$,resetZoom:Rr,isZoom:zr,setInitialViewBox:Br,scale:Vr}=Ne(B,{x:J.value.x,y:J.value.y,width:Math.max(10,J.value.width),height:Math.max(10,J.value.height)},1,Fr),Hr=p(()=>1/Vr.value),Ur=p(()=>Math.min(1,I.value.fontSizeZoomFactor/Math.max(Vr.value,1e-4))),Wr=p(()=>`scale(${Ur.value})`),Gr=p(()=>V.value.showZoom||zr.value);$e([()=>J.value.x,()=>J.value.y,()=>J.value.width,()=>J.value.height],()=>{He(()=>{Br({x:J.value.x,y:J.value.y,width:Math.max(10,J.value.width),height:Math.max(10,J.value.height)})})},{immediate:!0});function Kr(e){Fr.value&&(e.button===void 0||e.button===0)&&(Ir.value={x:e.clientX,y:e.clientY},Lr.value=!1)}function qr(e){if(!Fr.value||!Ir.value)return;let t=e.clientX-Ir.value.x,n=e.clientY-Ir.value.y;Math.hypot(t,n)>Ht&&(Lr.value=!0)}function Jr(){Ir.value=null,Lr.value&&window.setTimeout(()=>{Lr.value=!1},0)}function Yr(e,t){Lr.value||mr(e,t)}let Xr=x(null);function Zr(e){Xr.value=e}function Qr(){Xr.value=null}let $r=je(k,()=>R.value.title.text),ei=p(()=>n({config:M,style:R,mutableConfig:V,dialog:ut,accordion:at,isFullscreen:Kt,parent:k,maxWidth:800,isCursorPointer:z}));$e(()=>V.value.showTable,e=>t(e,M,rn));function ti(){V.value.showTable=!1,an.value&&an.value.setTableIconState(!1)}let ni=p(()=>gr.value.map(e=>({...e,name:e.display}))),ri=p(()=>R.value.backgroundColor),ii=p(()=>R.value.title),{isCallbackImaging:ai,isCallbackSvg:oi,generateSvg:si,onGenerateImage:ci}=ve({svg:B,title:ii,legend:F,legendItems:ni,backgroundColor:ri,getSvgCallback:()=>M.value.userOptions.callbacks.svg,generateImage:wn});function li(e,t){let n=or(e,t),{paddingX:r,paddingTop:i}=er(n);return{fontSize:n,paddingX:r,paddingTop:i,lineHeight:n*1.1}}function ui(e){return ce(e.color??R.value.backgroundColor)}function di({availableHeight:e,lineHeight:t,lineIndex:n}){if(n===0)return 1/0;let r=e/(n+1);return r<1e-4?-1/0:t<=0?1/0:r/t}function fi(){return Number(I.value.hideUnderProportion)===0}function pi(e){let t=Ur.value;return e.alwaysShowAllLines?`scale(${Math.min(t,e.allLinesScaleCap)})`:Wr.value}function mi({rect:e,seriesIndex:t}){if(!e||!I.value.showDefaultLabels||!Jn(e))return null;let{fontSize:n,paddingX:r,paddingTop:i,lineHeight:a}=li(e,t),o=ui(e),s=rr(e,t).map(e=>String(e??``)),c=tr(e,n);if(!s.some(Boolean)||c.width<=0||c.height<=0)return null;let l=fi(),u=l?Math.max(1e-4,Math.min(1,c.height/Math.max(s.length*a,1e-4))):1,d=`treemap_clip_${D.value}_${e.id}`,f=e.x0,ee=e.y0,te=Math.max(q(e),0),ne=Math.max(K(e),0);return{key:hi(e),clipId:d,clipX:f,clipY:ee,clipWidth:te,clipHeight:ne,translate:`translate(${e.x0}, ${e.y0})`,alwaysShowAllLines:l,allLinesScaleCap:u,lines:s.map((t,s)=>({key:`${e.id}_${s}`,text:t,x:r,y:i+a*s,maxZoomFactor:di({availableHeight:c.height,lineHeight:a,lineIndex:s}),fill:o,fontSize:n,fontFamily:M.value.style.fontFamily,fontWeight:s===0?500:400}))}}function hi(e){return`${e.id}`}let gi=p(()=>pt.rect||pn.value||!I.value.showDefaultLabels||vr.value?[]:G.value.map((e,t)=>e.showLabel?mi({rect:e,seriesIndex:t}):null).filter(Boolean)),_i;function vi(){return typeof document>`u`?null:(_i||=document.createElement(`canvas`),_i.getContext(`2d`))}function yi(e,t,n=400){let r=vi();return r?(r.font=`${n} ${t}px ${M.value.style.fontFamily}`,r.measureText(String(e)).width):e.length*t*.6}function bi(e){let t=L.value.rects.borderRadius,n=q(e),r=K(e);return Math.min(t,Math.min(n,r)/6)}async function xi(){if(ft(`copyAlt`,{config:M.value,dataset:G.value}),!M.value.userOptions.callbacks.altCopy){console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.");return}await Promise.resolve(M.value.userOptions.callbacks.altCopy({config:M.value,dataset:G.value}))}function Si(){j.value=null,un.value=!0}function Ci(){j.value=null,ln.value=`pointer`,Wt.value=!1,Z.value=null,un.value=!1}function wi(e){if(!B.value||Nr.value||document.activeElement!==B.value||!G.value.length||vr.value)return;let t=[`ArrowLeft`,`ArrowUp`].includes(e.key),n=[`ArrowRight`,`ArrowDown`].includes(e.key),r=e.key===`Enter`||e.key===` `,i=e.key===`Escape`;if(!t&&!n&&!r&&!i)return;if(e.preventDefault(),e.stopPropagation(),i){j.value=null,ln.value=`pointer`,Wt.value=!1,Z.value=null;return}if(r){if(j.value===null)return;let e=G.value[j.value];if(!e)return;mr(e,j.value);return}let a=j.value,o=Z.value?G.value.findIndex(e=>e.id===Z.value.id):null,s=a!==null&&a>=0&&a<G.value.length,c=o!==null&&o>=0&&o<G.value.length;s?n?(a+=1,a>=G.value.length&&(a=0)):t&&(--a,a<0&&(a=G.value.length-1)):c?(a=n?o+1:o-1,a>=G.value.length&&(a=0),a<0&&(a=G.value.length-1)):a=n?0:G.value.length-1;let l=G.value[a];l&&(Ti(a),Er({datapoint:l,seriesIndex:a,triggerMode:`keyboard`}))}function Ti(e){if(!Number.isFinite(e)||!B.value)return;let t=G.value[e];if(!t)return;let n=t.x0+q(t)/2,r=t.y0+K(t)/2,i=B.value.getBoundingClientRect();cn.value={x:i.left+(n-$.value.x)/$.value.width*i.width,y:i.top+(r-$.value.y)/$.value.height*i.height}}let Ei=p(()=>({headers:Or.value?.colNames??[],rows:Or.value?.body??[]})),Di=p(()=>R.value.color);return xe({getData:kr,getImage:$r,generateCsv:Dr,generateImage:wn,generateSvg:si,generatePdf:Cn,hideSeries:Cr,showSeries:Sr,toggleTable:Ar,toggleTooltip:jr,toggleZoom:Mr,toggleAnnotator:Pr,toggleFullscreen:sr,resetZoom:Rr,copyAlt:xi}),(e,t)=>(b(),g(`div`,{ref_key:`treemapChart`,ref:k,class:Ue(`vue-data-ui-component vue-ui-treemap ${Kt.value?`vue-data-ui-wrapper-fullscreen`:``} ${M.value.useCssAnimation?``:`vue-ui-dna`}`),style:y(`font-family:${M.value.style.fontFamily};width:100%; ${M.value.responsive?`height: 100%;`:``} text-align:center;background:${R.value.backgroundColor}`),id:`treemap_${D.value}`,onMouseenter:t[3]||=()=>w(_n)(!0),onMouseleave:t[4]||=()=>w(_n)(!1)},[_(`div`,{id:`chart-instructions-${D.value}`,class:`sr-only`},[_(`p`,null,Ye(M.value.a11y.translations.keyboardNavigation),1)],8,gt),Ei.value?.rows?.length?(b(),m(De,{key:0,uid:D.value,head:Ei.value.headers,body:Ei.value.rows,notice:M.value.a11y.translations.tableAvailable,caption:M.value.a11y.translations.tableCaption},null,8,[`uid`,`head`,`body`,`notice`,`caption`])):h(``,!0),N.value.buttons.annotator?(b(),m(w(it),{key:1,svgRef:w(B),backgroundColor:R.value.backgroundColor,color:R.value.color,active:Nr.value,isCursorPointer:z.value,palette:N.value.annotatorPalette,onClose:Pr},Le({_:2},[qe(w(i),t=>({name:t,fn:T(n=>[S(e.$slots,t,We(v(w(r)(t,n))),void 0,!0)])}))]),1032,[`svgRef`,`backgroundColor`,`color`,`active`,`isCursorPointer`,`palette`])):h(``,!0),Tn.value?(b(),g(`div`,{key:2,ref_key:`noTitle`,ref:Zt,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},null,512)):h(``,!0),R.value.title.text?(b(),g(`div`,{key:3,ref_key:`chartTitle`,ref:Jt,style:y(`width:100%;background:${R.value.backgroundColor};padding-bottom:6px`)},[(b(),m(be,{key:`title_${Qt.value}`,config:{title:{cy:`treemap-div-title`,...R.value.title},subtitle:{cy:`treemap-div-subtitle`,...R.value.title.subtitle}}},null,8,[`config`]))],4)):h(``,!0),_(`div`,{id:`legend-top-${D.value}`},null,8,_t),N.value.show&&mt.value&&(w(vn)||w(gn))?(b(),m(w(ct),{ref_key:`userOptionsRef`,ref:an,key:`user_option_${qt.value}`,backgroundColor:R.value.backgroundColor,color:R.value.color,isPrinting:w(xn),isImaging:w(Sn),uid:D.value,hasTooltip:N.value.buttons.tooltip&&P.value.show,hasPdf:N.value.buttons.pdf,hasXls:N.value.buttons.csv,hasImg:N.value.buttons.img,hasSvg:N.value.buttons.svg,hasTable:N.value.buttons.table,hasFullscreen:N.value.buttons.fullscreen,hasAltCopy:N.value.buttons.altCopy,isFullscreen:Kt.value,isTooltip:V.value.showTooltip,titles:{...N.value.buttonTitles},chartElement:k.value,position:N.value.position,hasAnnotator:N.value.buttons.annotator,isAnnotation:Nr.value,callbacks:N.value.callbacks,printScale:N.value.print.scale,tableDialog:M.value.table.useDialog,isCursorPointer:z.value,hasZoom:N.value.buttons.zoom,isZoom:V.value.showZoom,onToggleFullscreen:sr,onGeneratePdf:w(Cn),onGenerateCsv:Dr,onGenerateImage:w(ci),onGenerateSvg:w(si),onToggleTable:Ar,onToggleTooltip:jr,onToggleAnnotator:Pr,onToggleZoom:Mr,onCopyAlt:xi,style:y({visibility:w(vn)?w(gn)?`visible`:`hidden`:`visible`})},Le({_:2},[qe(w(a)(e.$slots,`menuIcon optionTooltip optionPdf optionCsv optionImg optionSvg optionTable optionFullscreen optionAnnotator optionZoom optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:T(n=>[S(e.$slots,t,We(v(w(o)(t,n))),void 0,!0)])}))]),1032,/* @__PURE__ */ `backgroundColor.color.isPrinting.isImaging.uid.hasTooltip.hasPdf.hasXls.hasImg.hasSvg.hasTable.hasFullscreen.hasAltCopy.isFullscreen.isTooltip.titles.chartElement.position.hasAnnotator.isAnnotation.callbacks.printScale.tableDialog.isCursorPointer.hasZoom.isZoom.onGeneratePdf.onGenerateImage.onGenerateSvg.style`.split(`.`))):h(``,!0),X.value.length>1?(b(),g(`nav`,{key:5,class:`vue-ui-treemap-breadcrumbs`,"data-dom-to-png-ignore":``,ref_key:`breadcrumbsNav`,ref:tn},[(b(!0),g(Fe,null,qe(X.value,(n,r)=>(b(),g(`span`,{role:`button`,tabindex:r<X.value.length-1?0:void 0,key:n.id||`root`,onClick:e=>r===X.value.length-1?()=>{}:mr(n.node),onKeydown:[et(tt(e=>r===X.value.length-1?void 0:mr(n.node),[`prevent`]),[`enter`]),et(tt(e=>r===X.value.length-1?void 0:mr(n.node),[`prevent`]),[`space`])],class:`vue-ui-treemap-crumb`,"data-last-crumb":r===X.value.length-1,style:y({color:R.value.color,cursor:z.value?`pointer`:`default`}),onMouseenter:e=>Zr(r),onMouseleave:Qr,onFocus:e=>Zr(r),onBlur:Qr},[_(`span`,yt,[_(`span`,bt,[S(e.$slots,`breadcrumb-label`,Ve({ref_for:!0},{crumb:n,isRoot:r===0,isFocus:Xr.value===r}),()=>[r===0?(b(),g(`div`,xt,[ze(we,{name:Xr.value===0?`homeFilled`:`home`,stroke:R.value.color},null,8,[`name`,`stroke`])])):(b(),g(Fe,{key:1},[Re(Ye(n.label),1)],64))],!0)]),r<X.value.length-1?(b(),g(`span`,St,[S(e.$slots,`breadcrumb-arrow`,{},()=>[t[5]||=Re(` › `,-1)],!0)])):h(``,!0)])],44,vt))),128))],512)):h(``,!0),_(`div`,Ct,[(b(),g(`svg`,{ref_key:`svgRef`,ref:B,xmlns:w(le),"aria-describedby":`chart-instructions-${D.value}`,class:Ue({"vue-data-ui-fullscreen--on":Kt.value,"vue-data-ui-fulscreen--off":!Kt.value,"vue-data-ui-zoom-plus":!lr.value,"vue-data-ui-zoom-minus":lr.value,"vue-data-ui-no-transition":!w(dn),loading:w(pn)}),viewBox:`${w($).x} ${w($).y} ${w($).width<=0?10:w($).width} ${w($).height<=0?10:w($).height}`,style:y(`max-width:100%; overflow:${Gr.value?`hidden`:`visible`}; background:transparent;color:${R.value.color}`),tabindex:`0`,onFocus:Si,onBlur:Ci,onKeydown:wi,onPointerdown:Kr,onPointermove:qr,onPointerup:Jr,onPointercancel:Jr,onPointerleave:Jr},[ze(w(lt)),(b(!0),g(Fe,null,qe(G.value,(e,t)=>(b(),g(`g`,{key:`tgrad_${e.id}`},[L.value.rects.gradient.show?(b(),g(`defs`,Tt,[ze(Te,{t:`radial`,id:`tgrad_${e.id}`,gradientTransform:`translate(-1, -1.000001) scale(2, 2)`,stops:[[`18%`,e.color,1],[`100%`,w(u)(e.color,L.value.rects.gradient.intensity/100),1]]},null,8,[`id`,`stops`])])):h(``,!0)]))),128)),_(`g`,null,[(b(!0),g(Fe,null,qe(G.value,(e,t)=>(b(),g(`g`,{key:`rect_${e.id}_${e.depth}`},[_(`rect`,{x:e.x0,y:e.y0,height:K(e),width:q(e),fill:Ut.value?e.color??R.value.backgroundColor:L.value.rects.gradient.show?vr.value?R.value.backgroundColor:`url(#tgrad_${e.id})`:e.color??R.value.backgroundColor,rx:w(Vr)>1?bi(e)*Hr.value:bi(e),stroke:Z.value&&Z.value.id===e.id?L.value.rects.selected.stroke:L.value.rects.stroke,"stroke-width":Qn(e),onClick:tt(n=>Yr(e,t),[`stop`]),onMouseenter:()=>Er({datapoint:e,seriesIndex:t,triggerMode:`pointer`}),onMouseleave:n=>wr({datapoint:e,seriesIndex:t}),style:y(`opacity:${Z.value?Z.value.id===e.id?1:L.value.rects.selected.unselectedOpacity:1}`),class:Ue([`vue-ui-treemap-rect`,w(dn)?`vue-data-ui-transition`:``,hr(e)?`vue-data-ui-zoom-minus`:`vue-data-ui-zoom-plus`])},null,46,Et)]))),128)),(b(!0),g(Fe,null,qe(gi.value,e=>(b(),g(`g`,{key:e.key,style:{"pointer-events":`none`}},[_(`defs`,null,[_(`clipPath`,{id:e.clipId,clipPathUnits:`userSpaceOnUse`},[_(`rect`,{class:Ue({"vue-data-ui-transition":w(dn)}),x:e.clipX,y:e.clipY,width:e.clipWidth,height:e.clipHeight},null,10,Ot)],8,Dt)]),_(`g`,{"clip-path":`url(#${e.clipId})`},[_(`g`,{transform:e.translate},[_(`g`,{class:Ue({"vue-data-ui-transition":w(dn)}),transform:pi(e)},[(b(!0),g(Fe,null,qe(e.lines,t=>(b(),g(Fe,{key:t.key},[t.text&&(e.alwaysShowAllLines||Ur.value<=t.maxZoomFactor)?(b(),g(`text`,{key:0,x:t.x,y:t.y,fill:t.fill,"font-size":t.fontSize,"font-family":t.fontFamily,"font-weight":t.fontWeight,class:Ue({"vue-data-ui-transition":w(dn)}),"text-anchor":`start`,"dominant-baseline":`text-before-edge`},Ye(t.text),11,Mt)):h(``,!0)],64))),128))],10,jt)],8,At)],8,kt)]))),128)),e.$slots.rect?(b(),g(`g`,Nt,[(b(!0),g(Fe,null,qe(G.value,(t,n)=>(b(),g(`g`,{key:`slot_${t.id}_${t.depth}`},[(b(),g(`foreignObject`,{x:t.x0,y:t.y0,height:K(t),width:q(t),class:`vue-ui-treemap-cell-foreignObject`,style:{"pointer-events":`none`,overflow:`hidden`}},[_(`div`,Ft,[w(pn)?h(``,!0):S(e.$slots,`rect`,Ve({ref_for:!0},{rect:{...t,height:K(t),width:q(t),isSelected:!Z.value||Z.value.id===t.id},shouldShow:Yn(t)||lr.value,fontSize:or(t,n),isZoom:lr.value,textColor:w(ce)(t.color)}),void 0,!0,0)])],8,Pt))]))),128))])):h(``,!0)]),S(e.$slots,`svg`,We(v({svg:H.value,isZoom:lr.value,rect:Z.value,config:M.value,isPrintingImg:w(xn)||w(Sn)||w(ai),isPrintingSvg:w(oi)})),void 0,!0)],46,wt)),w(zr)?(b(),g(`div`,It,[S(e.$slots,`reset-action`,{reset:w(Rr)},()=>[_(`button`,{"data-cy-reset":``,tabindex:`0`,role:`button`,class:`vue-data-ui-refresh-button`,style:y({background:R.value.backgroundColor,cursor:z.value?`pointer`:`default`}),onClick:t[0]||=e=>w(Rr)(!0)},[ze(we,{name:`refresh`,stroke:R.value.color},null,8,[`stroke`])],4)],!0)])):h(``,!0),e.$slots.hint?(b(),g(`div`,Lt,[S(e.$slots,`hint`,We(v({hint:M.value.a11y.translations.keyboardNavigation,isVisible:un.value})),void 0,!0)])):h(``,!0)]),e.$slots.watermark?(b(),g(`div`,Rt,[S(e.$slots,`watermark`,We(v({isPrinting:w(xn)||w(Sn)||w(ai)||w(oi)})),void 0,!0)])):h(``,!0),_(`div`,{id:`legend-bottom-${D.value}`},null,8,zt),nn.value&&(F.value.show||e.$slots.legend)?(b(),m(Ie,{key:7,to:F.value.position===`top`?`#legend-top-${D.value}`:`#legend-bottom-${D.value}`},[_(`div`,{ref_key:`chartLegend`,ref:Yt},[S(e.$slots,`legend`,{legend:gr.value},()=>[F.value.show?(b(),m(Me,{key:`legend_${en.value}`,legendSet:gr.value,config:_r.value,id:`treemap_legend_${D.value}`,isCursorPointer:z.value,onClickMarker:t[1]||=({legend:e})=>br(e)},{item:T(({legend:e,index:t})=>[w(pn)?h(``,!0):(b(),g(`div`,{key:0,onClick:t=>br(e),style:y(`opacity:${O.value.includes(e.id)?.5:1}`)},Ye(e.display),13,Bt))]),legendToggle:T(()=>[gr.value.length>2&&F.value.selectAllToggle.show&&!w(pn)?(b(),m(Ee,{key:0,backgroundColor:F.value.selectAllToggle.backgroundColor,color:F.value.selectAllToggle.color,fontSize:F.value.fontSize,checked:O.value.length>0,isCursorPointer:z.value,onToggle:yr},null,8,[`backgroundColor`,`color`,`fontSize`,`checked`,`isCursorPointer`])):h(``,!0)]),_:1},8,[`legendSet`,`config`,`id`,`isCursorPointer`])):h(``,!0)],!0)],512)],8,[`to`])):h(``,!0),e.$slots.source?(b(),g(`div`,{key:8,ref_key:`source`,ref:Xt,dir:`auto`},[S(e.$slots,`source`,{},void 0,!0)],512)):h(``,!0),ze(w(st),{teleportTo:P.value.teleportTo,show:V.value.showTooltip&&Wt.value,backgroundColor:P.value.backgroundColor,color:P.value.color,fontSize:P.value.fontSize,borderRadius:P.value.borderRadius,borderColor:P.value.borderColor,borderWidth:P.value.borderWidth,backgroundOpacity:P.value.backgroundOpacity,position:P.value.position,offsetX:P.value.offsetX,offsetY:P.value.offsetY,parent:k.value,content:Gt.value,isFullscreen:Kt.value,isCustom:w(l)(P.value.customFormat),smooth:P.value.smooth,backdropFilter:P.value.backdropFilter,smoothForce:P.value.smoothForce,smoothSnapThreshold:P.value.smoothSnapThreshold,isA11yMode:ln.value===`keyboard`,a11yPosition:cn.value},{"tooltip-before":T(()=>[S(e.$slots,`tooltip-before`,We(v({...Tr.value})),void 0,!0)]),tooltip:T(()=>[S(e.$slots,`tooltip`,We(v({...Tr.value})),void 0,!0)]),"tooltip-after":T(()=>[S(e.$slots,`tooltip-after`,We(v({...Tr.value})),void 0,!0)]),_:3},8,[`teleportTo`,`show`,`backgroundColor`,`color`,`fontSize`,`borderRadius`,`borderColor`,`borderWidth`,`backgroundOpacity`,`position`,`offsetX`,`offsetY`,`parent`,`content`,`isFullscreen`,`isCustom`,`smooth`,`backdropFilter`,`smoothForce`,`smoothSnapThreshold`,`isA11yMode`,`a11yPosition`]),mt.value&&N.value.buttons.table?(b(),m(Je(ei.value.component),Ve({key:9},ei.value.props,{ref_key:`tableUnit`,ref:rn,onClose:ti}),Le({content:T(()=>[(b(),m(w(rt),{key:`table_${$t.value}`,colNames:Or.value.colNames,head:Or.value.head,body:Or.value.body,config:Or.value.config,title:M.value.table.useDialog?``:ei.value.title,withCloseButton:!M.value.table.useDialog,isCursorPointer:z.value,onClose:ti},{th:T(({th:e})=>[_(`div`,Vt,Ye(e),1)]),td:T(({td:e})=>[Re(Ye(e.name||e),1)]),_:1},8,[`colNames`,`head`,`body`,`config`,`title`,`withCloseButton`,`isCursorPointer`]))]),_:2},[M.value.table.useDialog?{name:`title`,fn:T(()=>[Re(Ye(ei.value.title),1)]),key:`0`}:void 0,M.value.table.useDialog?{name:`actions`,fn:T(()=>[_(`button`,{tabindex:`0`,class:`vue-ui-user-options-button`,onClick:t[2]||=e=>Dr(N.value.callbacks.csv),style:y({cursor:z.value?`pointer`:`default`})},[ze(we,{name:`fileCsv`,stroke:ei.value.props.color},null,8,[`stroke`])],4)]),key:`1`}:void 0]),1040)):h(``,!0),S(e.$slots,`skeleton`,{},()=>[w(pn)?(b(),m(_e,{key:0})):h(``,!0)],!0)],46,ht))}},[[`__scopeId`,`data-v-064d7161`]]);export{mt as n,Ut as t};
|