vue-data-ui 3.27.0 → 3.27.1
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-C2W0uGrq.js +1 -0
- package/dist/BaseDraggableDialog-D_tuHEjO.js +1 -0
- package/dist/BaseIcon-DdIyewwY.js +1 -0
- package/dist/BaseLegendToggle-Bq5FjyuI.js +1 -0
- package/dist/BaseScanner-8NdoBs7B.js +1 -0
- package/dist/BaseZoomControls-DoYifY2y.js +1 -0
- package/dist/ColorPicker-MLwiwxl5.js +1 -0
- package/dist/DataTable-WNecJMcY.js +1 -0
- package/dist/DefGrad-DKMq1REY.js +1 -0
- package/dist/HillActions-CHg1AQ3p.js +1 -0
- package/dist/Legend-D8YoT1RJ.js +1 -0
- package/dist/NonSvgPenAndPaper-CqtJpZKh.js +1 -0
- package/dist/PackageVersion-CdkxOy58.js +1 -0
- package/dist/PenAndPaper-IMw576MC.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-Bp9YNtPc.js +1 -0
- package/dist/SlicerPreview-CNUciSbY.js +1 -0
- package/dist/SparkTooltip-C5JMcBXT.js +1 -0
- package/dist/Title-BGYFqulv.js +1 -0
- package/dist/Tooltip-Cus2-XNQ.js +1 -0
- package/dist/UserOptions-DTxMeZv3.js +1 -0
- package/dist/_plugin-vue_export-helper-BDNMzG2s.js +1 -0
- package/dist/annotationSlots-BRR85CqJ.js +1 -0
- package/dist/chartImage-CIvU_04o.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-D8t3Bm7s.js +3 -0
- package/dist/exposedLib-DHtyEc_G.js +1 -0
- package/dist/geoProjections-Bvj-eMvq.js +1 -0
- package/dist/img-DiT4ivZ5.js +1 -0
- package/dist/labelUtils-CG3uVXoZ.js +1 -0
- package/dist/lib-CV_IANZ6.js +12 -0
- package/dist/package-DE5cU1Rg.js +1 -0
- package/dist/patternUtils-_q3ArM3g.js +1 -0
- package/dist/pdf-BQSB1V3H.js +1 -0
- package/dist/render-common-BdZ5aRyn.js +1 -0
- package/dist/resolveChartConfig-DZg-korK.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 +17961 -17958
- 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 -130
- 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-CB186vF2.js +1 -0
- package/dist/useObjectBindings-Dse7YyAf.js +1 -0
- package/dist/usePanZoom-BdjP5Suc.js +1 -0
- package/dist/usePrefersMotion-XLHwega2.js +1 -0
- package/dist/usePrinter-hLW3cv4N.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-DyYgLIZN.js +1 -0
- package/dist/vue-data-ui.js +1 -79
- package/dist/vue-ui-3d-bar-BZAoyWkc.js +19 -0
- package/dist/vue-ui-accordion-BNvevckx.js +1 -0
- package/dist/vue-ui-age-pyramid-DkA6vpU3.js +1 -0
- package/dist/vue-ui-annotator-DuQME4Hh.js +331 -0
- package/dist/vue-ui-bullet-BVs8JX8S.js +34 -0
- package/dist/vue-ui-bump-DYdm3EvF.js +10 -0
- package/dist/vue-ui-candlestick-DZgxl4mW.js +22 -0
- package/dist/vue-ui-carousel-table-BB7DsTUt.js +1 -0
- package/dist/vue-ui-chestnut-Bo1h5rBt.js +1 -0
- package/dist/vue-ui-chord-B6_veyvO.js +21 -0
- package/dist/vue-ui-circle-pack-Bm7e2YNh.js +13 -0
- package/dist/vue-ui-cursor-TidZDuSh.js +1 -0
- package/dist/vue-ui-dag-BiN_AnLo.js +9 -0
- package/dist/vue-ui-dashboard-zepAVN_W.js +1 -0
- package/dist/vue-ui-digits-CXKKmfGj.js +42 -0
- package/dist/vue-ui-donut-CKkBtyPK.js +22 -0
- package/dist/vue-ui-donut-DLDUpjDU.js +47 -0
- package/dist/vue-ui-donut-evolution-BxMTdE5G.js +2 -0
- package/dist/vue-ui-dumbbell-C8rNwdz0.js +9 -0
- package/dist/vue-ui-flow-Dru76A2O.js +3 -0
- package/dist/vue-ui-funnel-D_u1h5S9.js +1 -0
- package/dist/vue-ui-galaxy-sBEH18Xj.js +1 -0
- package/dist/vue-ui-gauge-Do3RN8ne.js +1 -0
- package/dist/vue-ui-geo-DDbtx_iJ.js +1 -0
- package/dist/vue-ui-gizmo-eic6xLjB.js +1 -0
- package/dist/vue-ui-heatmap-DlmJRsM8.js +1 -0
- package/dist/vue-ui-hill-C5oiuIXh.js +1 -0
- package/dist/vue-ui-history-plot-BJjnkWcT.js +2 -0
- package/dist/vue-ui-horizontal-bar-BRDBJEl1.js +4 -0
- package/dist/vue-ui-kpi-C-eed3jO.js +1 -0
- package/dist/vue-ui-label-B4pkXBxc.js +7 -0
- package/dist/vue-ui-mini-loader-CElmv_iF.js +1 -0
- package/dist/vue-ui-molecule-BeyQWZU9.js +1 -0
- package/dist/vue-ui-mood-radar-Bh0kHfiZ.js +1 -0
- package/dist/vue-ui-nested-donuts-FlnJfDaF.js +19 -0
- package/dist/vue-ui-onion-BjhSpjtW.js +5 -0
- package/dist/vue-ui-parallel-coordinate-plot-CHV6XDti.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-BaKSTJDv.js +2 -0
- package/dist/vue-ui-quick-chart-Nc2mVlle.js +17 -0
- package/dist/vue-ui-radar-BzUfkLlC.js +1 -0
- package/dist/vue-ui-rating-BwWXvbAg.js +1 -0
- package/dist/vue-ui-relation-circle-nAZEg-BL.js +1 -0
- package/dist/vue-ui-ridgeline-DxLZg1E2.js +2 -0
- package/dist/vue-ui-rings-BOti0NGb.js +1 -0
- package/dist/vue-ui-scatter-CCNMggyo.js +9 -0
- package/dist/vue-ui-skeleton-DI7pcimU.js +41 -0
- package/dist/vue-ui-smiley-D70sJZWl.js +1 -0
- package/dist/vue-ui-spark-trend-BVtfEalS.js +1 -0
- package/dist/vue-ui-sparkbar-CdsLI7Ke.js +1 -0
- package/dist/vue-ui-sparkgauge-wmj5Wnnp.js +1 -0
- package/dist/vue-ui-sparkhistogram-D8S_P_P4.js +1 -0
- package/dist/vue-ui-sparkline-BjsJnS_9.js +1 -0
- package/dist/vue-ui-sparkstackbar-ZN8LXzoV.js +1 -0
- package/dist/vue-ui-stackbar-Dx_EN3pT.js +29 -0
- package/dist/vue-ui-stackline-DW-oxJvA.js +39 -0
- package/dist/vue-ui-strip-plot-D7kjJ3Qh.js +2 -0
- package/dist/vue-ui-table-CaFVLHxE.js +14 -0
- package/dist/vue-ui-table-heatmap-Ctf7Rhqo.js +1 -0
- package/dist/vue-ui-table-sparkline-C0I0cXBS.js +1 -0
- package/dist/vue-ui-thermometer-B6og15Al.js +1 -0
- package/dist/vue-ui-timer-DgXvO2Q7.js +64 -0
- package/dist/vue-ui-tiremarks-Dh6fZ454.js +1 -0
- package/dist/vue-ui-treemap-7JuvN6P_.js +1 -0
- package/dist/vue-ui-waffle-BqvGzfse.js +1 -0
- package/dist/vue-ui-wheel-SdwJqKA7.js +1 -0
- package/dist/vue-ui-word-cloud-1WVV_k12.js +4 -0
- package/dist/vue-ui-world-DjMy_utm.js +19 -0
- package/dist/vue-ui-xy-DaozHMfg.js +31 -0
- package/dist/vue-ui-xy-canvas-CegvS9RR.js +9 -0
- package/dist/vue-ui-xy-rGHSI1am.js +24 -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-CVoh3twl.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-BRfcRW6Z.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-DKO1l8oR.js +0 -116
- package/dist/BaseDraggableDialog-C50TEJFv.js +0 -272
- package/dist/BaseIcon-Cx9FD751.js +0 -484
- package/dist/BaseLegendToggle-CP3sddwv.js +0 -56
- package/dist/BaseScanner-Dzc8VT3j.js +0 -30
- package/dist/BaseZoomControls-vNi8YykO.js +0 -111
- package/dist/ColorPicker-hmC2bvwS.js +0 -257
- package/dist/DataTable-CjF_An2h.js +0 -150
- package/dist/DefGrad-DVBqDjhO.js +0 -48
- package/dist/HillActions-DqqGB33u.js +0 -187
- package/dist/Legend-CulFgjUY.js +0 -156
- package/dist/NonSvgPenAndPaper-BK1v_MfW.js +0 -577
- package/dist/PackageVersion-D7H9nfK0.js +0 -12
- package/dist/PenAndPaper-CNiuGw6k.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-DSwamtmO.js +0 -143
- package/dist/SlicerPreview-k5YerMA9.js +0 -1730
- package/dist/SparkTooltip-D35KVv6N.js +0 -93
- package/dist/Title-BMCuINbv.js +0 -87
- package/dist/Tooltip-C4ZTwkLF.js +0 -312
- package/dist/UserOptions-CORYQiif.js +0 -1412
- package/dist/_plugin-vue_export-helper-B3ysoDQm.js +0 -8
- package/dist/dom-to-png-CBusMkua.js +0 -237
- package/dist/exposedLib-UNxZlnAS.js +0 -28
- package/dist/geoProjections-BYthUA8l.js +0 -302
- package/dist/img-Bb5rHcpO.js +0 -129
- package/dist/labelUtils-Ccn9kK7T.js +0 -19
- package/dist/lib-D4wK6ljP.js +0 -2146
- package/dist/package-DmQufM0G.js +0 -4
- package/dist/patternUtils-CS7hn6at.js +0 -258
- package/dist/pdf-BzIQHx-F.js +0 -90
- package/dist/render-common-BtfjXdkJ.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-D_6ZrPMD.js +0 -8090
- package/dist/useFitSvgText-CXTzBplU.js +0 -65
- package/dist/useHints-Dq_w2E8B.js +0 -66
- package/dist/useNestedProp-DR_8JPol.js +0 -12
- package/dist/useObjectBindings-DvasYMGu.js +0 -191
- package/dist/usePanZoom-CYU3B4T3.js +0 -157
- package/dist/usePrefersMotion-BC-CsqR1.js +0 -15
- package/dist/usePrinter-DdW2GSm0.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-Df7WV80w.js +0 -191
- package/dist/vue-ui-3d-bar-CJjNPwhG.js +0 -1831
- package/dist/vue-ui-accordion-CaoNWreI.js +0 -81
- package/dist/vue-ui-age-pyramid-BYcM0uIP.js +0 -1305
- package/dist/vue-ui-annotator-BmqjDjRF.js +0 -3325
- package/dist/vue-ui-bullet-DBOAvpBB.js +0 -702
- package/dist/vue-ui-bump-rPYwDJ4o.js +0 -1242
- package/dist/vue-ui-candlestick-WQHIQNv_.js +0 -2144
- package/dist/vue-ui-carousel-table-Dojcvt49.js +0 -467
- package/dist/vue-ui-chestnut-BdhEByUf.js +0 -2016
- package/dist/vue-ui-chord-MF4xF5az.js +0 -1347
- package/dist/vue-ui-circle-pack-BwDim7G8.js +0 -1647
- package/dist/vue-ui-cursor-w_5cbpSb.js +0 -283
- package/dist/vue-ui-dag-D2EUqeDN.js +0 -2931
- package/dist/vue-ui-dashboard-BLnVXosj.js +0 -522
- package/dist/vue-ui-digits-zSqwYWHm.js +0 -217
- package/dist/vue-ui-donut-ZYZfqIhi.js +0 -974
- package/dist/vue-ui-donut-evolution-DtLbWi3h.js +0 -1869
- package/dist/vue-ui-donut-nLDLZwig.js +0 -2427
- package/dist/vue-ui-dumbbell-Qgn3wRyI.js +0 -1533
- package/dist/vue-ui-flow-iSH6dyGw.js +0 -1229
- package/dist/vue-ui-funnel-Cc2z2zS5.js +0 -749
- package/dist/vue-ui-galaxy-GhuBSU0o.js +0 -1097
- package/dist/vue-ui-gauge-BAjBO13a.js +0 -934
- package/dist/vue-ui-geo-mwTtvIHY.js +0 -1495
- package/dist/vue-ui-gizmo-B5vOOrZX.js +0 -238
- package/dist/vue-ui-heatmap-fimkY1nN.js +0 -1613
- package/dist/vue-ui-hill-DPfTt3UE.js +0 -1747
- package/dist/vue-ui-history-plot-B1WgzqTb.js +0 -1710
- package/dist/vue-ui-horizontal-bar-Bkp5HQdt.js +0 -1723
- package/dist/vue-ui-kpi-D-p0CSQh.js +0 -104
- package/dist/vue-ui-label-r3-QloJL.js +0 -1451
- package/dist/vue-ui-mini-loader-CnrBGAtM.js +0 -133
- package/dist/vue-ui-molecule-BhdAYX_H.js +0 -941
- package/dist/vue-ui-mood-radar-CdlnPrQf.js +0 -1111
- package/dist/vue-ui-nested-donuts-DceVEyUc.js +0 -1515
- package/dist/vue-ui-onion-_L0uEATI.js +0 -1247
- package/dist/vue-ui-parallel-coordinate-plot-CbXwIM47.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-CDDFLRcX.js +0 -1979
- package/dist/vue-ui-quick-chart-Dom257hl.js +0 -2775
- package/dist/vue-ui-radar-BLdri1bA.js +0 -1386
- package/dist/vue-ui-rating-C_iTttXB.js +0 -359
- package/dist/vue-ui-relation-circle-BmxTSgjd.js +0 -905
- package/dist/vue-ui-ridgeline-CsUrcVmL.js +0 -1630
- package/dist/vue-ui-rings-D_GPkgbD.js +0 -1264
- package/dist/vue-ui-scatter-D_C-IhnW.js +0 -2418
- package/dist/vue-ui-skeleton-t7e6KEZ2.js +0 -2567
- package/dist/vue-ui-smiley-Dl95YWVo.js +0 -376
- package/dist/vue-ui-spark-trend-pkZA7u5V.js +0 -457
- package/dist/vue-ui-sparkbar-Ds7OJjhG.js +0 -401
- package/dist/vue-ui-sparkgauge-US1M88qc.js +0 -268
- package/dist/vue-ui-sparkhistogram-FISVpSvv.js +0 -589
- package/dist/vue-ui-sparkline-DvE1dHcs.js +0 -2067
- package/dist/vue-ui-sparkstackbar-CWtF9eG-.js +0 -750
- package/dist/vue-ui-stackbar-fMgrHzZe.js +0 -3273
- package/dist/vue-ui-stackline-CSMuUup2.js +0 -2829
- package/dist/vue-ui-strip-plot-TGD2UFHS.js +0 -1752
- package/dist/vue-ui-table-BCEIbg8-.js +0 -1352
- package/dist/vue-ui-table-heatmap-CvUcFWMf.js +0 -363
- package/dist/vue-ui-table-sparkline-CoVQ1qGY.js +0 -738
- package/dist/vue-ui-thermometer-BYFAZCzh.js +0 -758
- package/dist/vue-ui-timer-BKr8RVnn.js +0 -451
- package/dist/vue-ui-tiremarks-BYu3cEoy.js +0 -540
- package/dist/vue-ui-treemap-BR3rX5_L.js +0 -1745
- package/dist/vue-ui-waffle-mP8g5aQk.js +0 -1633
- package/dist/vue-ui-wheel-CZsSO2R6.js +0 -873
- package/dist/vue-ui-word-cloud-CJ30onqy.js +0 -1723
- package/dist/vue-ui-world-BZ09DOiF.js +0 -3021
- package/dist/vue-ui-xy-C3h54loZ.js +0 -1387
- package/dist/vue-ui-xy-canvas-BwgK8drp.js +0 -2151
- package/dist/vue-ui-xy-jemv5dsf.js +0 -5777
- 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-yQyvT4Su.js +0 -537
- 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
|
@@ -1,803 +0,0 @@
|
|
|
1
|
-
import { isRef as e, nextTick as t, onMounted as n, ref as r, unref as i, watch as a } from "vue";
|
|
2
|
-
//#region src/useSvgExport.js
|
|
3
|
-
var o = "http://www.w3.org/2000/svg", s = "http://www.w3.org/1999/xlink", c = "system-ui, -apple-system, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, \"Noto Sans\", \"Liberation Sans\", sans-serif", l = /* @__PURE__ */ new WeakMap();
|
|
4
|
-
function u(e) {
|
|
5
|
-
let t = l.get(e);
|
|
6
|
-
return t || (t = getComputedStyle(e), l.set(e, t)), t;
|
|
7
|
-
}
|
|
8
|
-
function d() {
|
|
9
|
-
l = /* @__PURE__ */ new WeakMap();
|
|
10
|
-
}
|
|
11
|
-
function f(e) {
|
|
12
|
-
return document.createElementNS(o, e);
|
|
13
|
-
}
|
|
14
|
-
function p(e) {
|
|
15
|
-
return `${e}, ${c}`;
|
|
16
|
-
}
|
|
17
|
-
function m({ svg: c, title: l, legend: m, legendItems: _, backgroundColor: v, stretchTitle: y = !1, titleEmbedded: b = !1 }) {
|
|
18
|
-
let x = e(c) ? c : r(c), S = r(!1), C = /* @__PURE__ */ "fill.fill-opacity.stroke.stroke-width.stroke-opacity.opacity.color.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-dasharray.stroke-dashoffset.font-family.font-size.font-style.font-weight.font-variant.letter-spacing.word-spacing.text-anchor.dominant-baseline.shape-rendering.vector-effect.paint-order.mix-blend-mode.isolation.filter.clip-path.mask.transform.transform-origin.visibility.display".split("."), w = /* @__PURE__ */ new Set(["font-family"]);
|
|
19
|
-
async function T({ timeoutMs: e = 4e3, log: n = "warn" } = {}) {
|
|
20
|
-
if (typeof window > "u" || typeof document > "u") return console.warn("SVG export only works in the browser."), null;
|
|
21
|
-
let r = performance.now() + e, a = () => {
|
|
22
|
-
let e = i(x);
|
|
23
|
-
return e && document.contains(e) ? e : null;
|
|
24
|
-
}, o = a();
|
|
25
|
-
if (o) return o;
|
|
26
|
-
let s = !1, c = (e) => {
|
|
27
|
-
if (!s && e) try {
|
|
28
|
-
e.disconnect();
|
|
29
|
-
} catch {}
|
|
30
|
-
s = !0;
|
|
31
|
-
}, l, u = new Promise((e) => {
|
|
32
|
-
try {
|
|
33
|
-
l = new MutationObserver(() => {
|
|
34
|
-
let t = a();
|
|
35
|
-
t && (c(l), e(t));
|
|
36
|
-
}), l.observe(document.documentElement, {
|
|
37
|
-
childList: !0,
|
|
38
|
-
subtree: !0
|
|
39
|
-
});
|
|
40
|
-
} catch {
|
|
41
|
-
e(null);
|
|
42
|
-
}
|
|
43
|
-
});
|
|
44
|
-
for (; performance.now() < r;) {
|
|
45
|
-
let e = await Promise.race([u, new Promise((e) => requestAnimationFrame(e))]);
|
|
46
|
-
if (await t(), o = a() || e, o) return c(l), o;
|
|
47
|
-
}
|
|
48
|
-
return c(l), console.warn("SVG element not found or not mounted (timed out)."), null;
|
|
49
|
-
}
|
|
50
|
-
n(async () => {
|
|
51
|
-
try {
|
|
52
|
-
await T(), S.value = !0;
|
|
53
|
-
} catch {
|
|
54
|
-
S.value = !1;
|
|
55
|
-
}
|
|
56
|
-
}), a(x, async () => {
|
|
57
|
-
try {
|
|
58
|
-
await T(), S.value = !0;
|
|
59
|
-
} catch {
|
|
60
|
-
S.value = !1;
|
|
61
|
-
}
|
|
62
|
-
});
|
|
63
|
-
let E = /* @__PURE__ */ new Map();
|
|
64
|
-
function D(e) {
|
|
65
|
-
if (E.has(e)) return E.get(e);
|
|
66
|
-
let t = f("svg");
|
|
67
|
-
t.setAttribute("width", "0"), t.setAttribute("height", "0"), t.style.position = "absolute", t.style.left = "-99999px", t.style.top = "-99999px";
|
|
68
|
-
let n = f(e);
|
|
69
|
-
t.appendChild(n), document.body.appendChild(t);
|
|
70
|
-
let r = window.getComputedStyle(n), i = {};
|
|
71
|
-
for (let e of C) i[e] = r.getPropertyValue(e);
|
|
72
|
-
return document.body.removeChild(t), E.set(e, i), i;
|
|
73
|
-
}
|
|
74
|
-
function O(e) {
|
|
75
|
-
let t = u(e), n = D(e.tagName.toLowerCase()), r = [];
|
|
76
|
-
for (let e of C) {
|
|
77
|
-
let i = t.getPropertyValue(e) || "", a = n[e] || "";
|
|
78
|
-
if (w.has(e)) {
|
|
79
|
-
e === "font-family" && i && (i = p(i)), i && r.push(`${e}:${i};`);
|
|
80
|
-
continue;
|
|
81
|
-
}
|
|
82
|
-
i && i !== a && r.push(`${e}:${i};`);
|
|
83
|
-
}
|
|
84
|
-
return r.join("");
|
|
85
|
-
}
|
|
86
|
-
function k(e, t) {
|
|
87
|
-
e.getAttribute("width") && t.setAttribute("width", e.getAttribute("width")), e.getAttribute("height") && t.setAttribute("height", e.getAttribute("height")), e.getAttribute("viewBox") && t.setAttribute("viewBox", e.getAttribute("viewBox"));
|
|
88
|
-
let n = [e, ...Array.from(e.querySelectorAll("*"))], r = [t, ...Array.from(t.querySelectorAll("*"))];
|
|
89
|
-
for (let e = 0; e < n.length; e += 1) {
|
|
90
|
-
let t = n[e], i = r[e], a = O(t);
|
|
91
|
-
a && i.setAttribute("style", a), [
|
|
92
|
-
"fill",
|
|
93
|
-
"stroke",
|
|
94
|
-
"filter",
|
|
95
|
-
"clip-path",
|
|
96
|
-
"mask"
|
|
97
|
-
].forEach((e) => {
|
|
98
|
-
let n = t.getAttribute(e);
|
|
99
|
-
n && i.setAttribute(e, n);
|
|
100
|
-
});
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
function A(e) {
|
|
104
|
-
let t = e.getAttribute("viewBox");
|
|
105
|
-
if (!t) return null;
|
|
106
|
-
let [n, r, i, a] = t.split(/\s+|,/).map(Number);
|
|
107
|
-
return [
|
|
108
|
-
n,
|
|
109
|
-
r,
|
|
110
|
-
i,
|
|
111
|
-
a
|
|
112
|
-
].some((e) => Number.isNaN(e)) ? null : {
|
|
113
|
-
minX: n,
|
|
114
|
-
minY: r,
|
|
115
|
-
width: i,
|
|
116
|
-
height: a
|
|
117
|
-
};
|
|
118
|
-
}
|
|
119
|
-
function j(e) {
|
|
120
|
-
e.getAttribute("xmlns") || e.setAttribute("xmlns", o), e.getAttribute("xmlns:xlink") || e.setAttribute("xmlns:xlink", s), e.getAttribute("xml:space") || e.setAttribute("xml:space", "preserve");
|
|
121
|
-
}
|
|
122
|
-
function M(e) {
|
|
123
|
-
let t = document.createElement("div");
|
|
124
|
-
return t.style.position = "absolute", t.style.left = "-99999px", t.style.top = "-99999px", t.style.width = "0", t.style.height = "0", document.body.appendChild(t), t.appendChild(e), t;
|
|
125
|
-
}
|
|
126
|
-
function N(e) {
|
|
127
|
-
try {
|
|
128
|
-
e.remove();
|
|
129
|
-
} catch {}
|
|
130
|
-
}
|
|
131
|
-
function P(e, t, n, r, i) {
|
|
132
|
-
if (!l.value || !l.value.text) return 0;
|
|
133
|
-
let a = {
|
|
134
|
-
text: l.value.text || "",
|
|
135
|
-
color: l.value.color || "#111",
|
|
136
|
-
fontSize: l.value.fontSize || 20,
|
|
137
|
-
bold: !!l.value.bold,
|
|
138
|
-
textAlign: (l.value?.textAlign || "center").toLowerCase(),
|
|
139
|
-
paddingLeft: l.value.paddingLeft ?? 0,
|
|
140
|
-
paddingRight: l.value.paddingRight ?? 0,
|
|
141
|
-
subtitle: l.value.subtitle || null
|
|
142
|
-
}, o = f("g");
|
|
143
|
-
o.setAttribute("id", "__vdu_export_title"), e.appendChild(o);
|
|
144
|
-
let s = n + a.paddingLeft, c = n + t - (a.paddingRight || 0), u = n + t / 2, d = "start", p = s;
|
|
145
|
-
a.textAlign === "center" ? (d = "middle", p = u) : a.textAlign === "right" && (d = "end", p = c);
|
|
146
|
-
let m = r, h = Math.round(a.fontSize * .4), g = f("text");
|
|
147
|
-
g.setAttribute("x", String(p)), g.setAttribute("y", String(m + a.fontSize)), g.setAttribute("text-anchor", d), g.setAttribute("dominant-baseline", "ideographic"), g.setAttribute("style", `font-family:${i}; font-size:${a.fontSize}px; font-weight:${a.bold ? "700" : "400"}; fill:${a.color}; ${y ? "transform: scale(0.65, 1); transform-origin: center;" : ""}`), g.textContent = a.text, o.appendChild(g);
|
|
148
|
-
let _ = a.fontSize;
|
|
149
|
-
if (a.subtitle && a.subtitle.text) {
|
|
150
|
-
let e = {
|
|
151
|
-
color: a.subtitle.color || "#666",
|
|
152
|
-
text: a.subtitle.text,
|
|
153
|
-
fontSize: a.subtitle.fontSize || Math.max(12, Math.round(a.fontSize * .8)),
|
|
154
|
-
bold: !!a.subtitle.bold
|
|
155
|
-
}, t = f("text");
|
|
156
|
-
t.setAttribute("x", String(p)), t.setAttribute("y", String(m + a.fontSize + h + e.fontSize)), t.setAttribute("text-anchor", d), t.setAttribute("dominant-baseline", "ideographic"), t.setAttribute("style", `font-family:${i}; font-size:${e.fontSize}px; font-weight:${e.bold ? "600" : "400"}; fill:${e.color}; ${y ? "transform: scale(0.65, 1); transform-origin: center;" : ""}`), t.textContent = e.text, o.appendChild(t), _ += h + e.fontSize;
|
|
157
|
-
}
|
|
158
|
-
return _ + Math.round(a.fontSize * .4);
|
|
159
|
-
}
|
|
160
|
-
function F(e, t, n, r, i) {
|
|
161
|
-
if (!m.value || !m.value.show || !Array.isArray(_.value) || !_.value.length) return 0;
|
|
162
|
-
let a = {
|
|
163
|
-
bold: !!m.value.bold,
|
|
164
|
-
backgroundColor: m.value.backgroundColor || "transparent",
|
|
165
|
-
color: m.value.color || "#111",
|
|
166
|
-
fontSize: m.value.fontSize || 14,
|
|
167
|
-
paddingX: 14,
|
|
168
|
-
paddingY: 10,
|
|
169
|
-
itemGapX: 18,
|
|
170
|
-
itemGapY: 12,
|
|
171
|
-
markerSize: Math.max(8, Math.round((m.value.fontSize || 14) * .9)),
|
|
172
|
-
markerTextGap: 8,
|
|
173
|
-
lineHeight: Math.round((m.value.fontSize || 14) * 1.2),
|
|
174
|
-
maxWidth: t
|
|
175
|
-
}, o = f("g");
|
|
176
|
-
o.setAttribute("id", "__vdu_export_legend"), o.setAttribute("transform", `translate(${n}, ${r})`), e.appendChild(o);
|
|
177
|
-
let s = f("rect");
|
|
178
|
-
s.setAttribute("rx", "6"), s.setAttribute("ry", "6"), s.setAttribute("fill", a.backgroundColor), o.appendChild(s);
|
|
179
|
-
let c = f("g");
|
|
180
|
-
o.appendChild(c);
|
|
181
|
-
let l = f("text");
|
|
182
|
-
l.setAttribute("x", "0"), l.setAttribute("y", "0"), l.setAttribute("style", `font-family:${i}; font-size:${a.fontSize}px; font-weight:${a.bold ? "600" : "400"}; opacity:0;`), c.appendChild(l);
|
|
183
|
-
let u = (e) => (l.textContent = e || "", l.getComputedTextLength()), d = Math.max(1, a.maxWidth - a.paddingX * 2);
|
|
184
|
-
function p(e, t) {
|
|
185
|
-
let n = String(e || "").split(/\s+/).filter(Boolean), r = [];
|
|
186
|
-
if (!n.length) return [""];
|
|
187
|
-
let i = n.shift();
|
|
188
|
-
for (; n.length;) {
|
|
189
|
-
let e = `${i} ${n[0]}`;
|
|
190
|
-
if (u(e) <= t) i = e, n.shift();
|
|
191
|
-
else if (u(i) > t && i.length > 1) {
|
|
192
|
-
let e = "";
|
|
193
|
-
for (let n of i) {
|
|
194
|
-
let r = e + n;
|
|
195
|
-
if (u(r) <= t) e = r;
|
|
196
|
-
else break;
|
|
197
|
-
}
|
|
198
|
-
let a = i.slice(e.length);
|
|
199
|
-
r.push(e), i = a.length ? a : n.shift() || "";
|
|
200
|
-
} else r.push(i), i = n.shift() || "";
|
|
201
|
-
}
|
|
202
|
-
i && r.push(i);
|
|
203
|
-
let a = r[r.length - 1] || "";
|
|
204
|
-
if (u(a) > t && a.length > 1) {
|
|
205
|
-
let e = "";
|
|
206
|
-
for (let n of a) {
|
|
207
|
-
let r = e + n;
|
|
208
|
-
if (u(r) <= t) e = r;
|
|
209
|
-
else break;
|
|
210
|
-
}
|
|
211
|
-
let n = a.slice(e.length);
|
|
212
|
-
r[r.length - 1] = e, n && r.push(n);
|
|
213
|
-
}
|
|
214
|
-
return r;
|
|
215
|
-
}
|
|
216
|
-
let h = Math.PI / 180;
|
|
217
|
-
function g(e, t, n, r, i = -90) {
|
|
218
|
-
let a = i * h, o = "";
|
|
219
|
-
for (let i = 0; i < n; i += 1) {
|
|
220
|
-
let s = a + i * 2 * Math.PI / n, c = e + Math.cos(s) * r, l = t + Math.sin(s) * r;
|
|
221
|
-
o += (i === 0 ? "M" : "L") + c + "," + l;
|
|
222
|
-
}
|
|
223
|
-
return o + "Z";
|
|
224
|
-
}
|
|
225
|
-
function v(e, t, n = 5, r, i) {
|
|
226
|
-
let a = -90 * h, o = "";
|
|
227
|
-
for (let s = 0; s < n * 2; s += 1) {
|
|
228
|
-
let c = s % 2 == 0 ? r : i, l = a + s * Math.PI / n, u = e + Math.cos(l) * c, d = t + Math.sin(l) * c;
|
|
229
|
-
o += (s === 0 ? "M" : "L") + u + "," + d;
|
|
230
|
-
}
|
|
231
|
-
return o + "Z";
|
|
232
|
-
}
|
|
233
|
-
let y = _.value.map((e) => {
|
|
234
|
-
let t = Math.max(1, d - (a.markerSize + a.markerTextGap)), n = p(e.name || "", t), r = Math.max(...n.map(u), 0), i = a.markerSize + a.markerTextGap + r, o = Math.max(a.markerSize, n.length * a.lineHeight);
|
|
235
|
-
return {
|
|
236
|
-
...e,
|
|
237
|
-
lines: n,
|
|
238
|
-
itemW: i,
|
|
239
|
-
itemH: o
|
|
240
|
-
};
|
|
241
|
-
}), b = [], x = {
|
|
242
|
-
items: [],
|
|
243
|
-
width: 0,
|
|
244
|
-
height: 0
|
|
245
|
-
};
|
|
246
|
-
for (let e of y) {
|
|
247
|
-
let t = (x.items.length ? a.itemGapX : 0) + e.itemW;
|
|
248
|
-
x.items.length && x.width + t > d ? (b.push(x), x = {
|
|
249
|
-
items: [e],
|
|
250
|
-
width: e.itemW,
|
|
251
|
-
height: e.itemH
|
|
252
|
-
}) : (x.items.push(e), x.width += t, x.height = Math.max(x.height, e.itemH));
|
|
253
|
-
}
|
|
254
|
-
x.items.length && b.push(x);
|
|
255
|
-
let S = a.paddingY;
|
|
256
|
-
for (let e of b) {
|
|
257
|
-
let t = Math.max(a.paddingX, (a.maxWidth - e.width) / 2);
|
|
258
|
-
for (let n = 0; n < e.items.length; n += 1) {
|
|
259
|
-
let r = e.items[n], o = t + a.markerSize / 2, s = S + e.height / 2.5, l = a.markerSize / 2, u = String(r.shape || "rect").toLowerCase();
|
|
260
|
-
if (u === "circle") {
|
|
261
|
-
let e = f("circle");
|
|
262
|
-
e.setAttribute("cx", String(o)), e.setAttribute("cy", String(s)), e.setAttribute("r", String(l * .8)), e.setAttribute("fill", r.color || "#000"), c.appendChild(e);
|
|
263
|
-
} else if (u === "rect" || u === "square") {
|
|
264
|
-
let e = f("path");
|
|
265
|
-
e.setAttribute("d", g(o, s, 4, l, -45)), e.setAttribute("fill", r.color || "#000"), c.appendChild(e);
|
|
266
|
-
} else if (u === "diamond") {
|
|
267
|
-
let e = f("path");
|
|
268
|
-
e.setAttribute("d", g(o, s, 4, l, 45)), e.setAttribute("fill", r.color || "#000"), c.appendChild(e);
|
|
269
|
-
} else if (u === "triangle") {
|
|
270
|
-
let e = f("path");
|
|
271
|
-
e.setAttribute("d", g(o, s, 3, l, -90)), e.setAttribute("fill", r.color || "#000"), c.appendChild(e);
|
|
272
|
-
} else if (u === "pentagon") {
|
|
273
|
-
let e = f("path");
|
|
274
|
-
e.setAttribute("d", g(o, s, 5, l, -90)), e.setAttribute("fill", r.color || "#000"), c.appendChild(e);
|
|
275
|
-
} else if (u === "hexagon") {
|
|
276
|
-
let e = f("path");
|
|
277
|
-
e.setAttribute("d", g(o, s, 6, l, 0)), e.setAttribute("fill", r.color || "#000"), c.appendChild(e);
|
|
278
|
-
} else if (u === "star") {
|
|
279
|
-
let e = f("path"), t = l, n = l * .5;
|
|
280
|
-
e.setAttribute("d", v(o, s, 5, t, n)), e.setAttribute("fill", r.color || "#000"), c.appendChild(e);
|
|
281
|
-
} else {
|
|
282
|
-
let n = f("rect");
|
|
283
|
-
n.setAttribute("x", String(t)), n.setAttribute("y", String(S + (e.height - a.markerSize) / 2)), n.setAttribute("width", String(a.markerSize)), n.setAttribute("height", String(a.markerSize)), n.setAttribute("fill", r.color || "#000"), c.appendChild(n);
|
|
284
|
-
}
|
|
285
|
-
let d = t + a.markerSize + a.markerTextGap, p = S + (e.height - r.lines.length * a.lineHeight) / 2 + a.fontSize, m = f("text");
|
|
286
|
-
m.setAttribute("x", String(d)), m.setAttribute("y", String(p)), m.setAttribute("style", `font-family:${i}; font-size:${a.fontSize}px; font-weight:${a.bold ? "600" : "400"}; fill:${a.color};`), m.setAttribute("dominant-baseline", "ideographic");
|
|
287
|
-
let h = !0;
|
|
288
|
-
for (let e of r.lines) {
|
|
289
|
-
let t = f("tspan");
|
|
290
|
-
h || t.setAttribute("dy", String(a.lineHeight)), t.setAttribute("x", String(d)), t.textContent = e, m.appendChild(t), h = !1;
|
|
291
|
-
}
|
|
292
|
-
c.appendChild(m), t += r.itemW + (n < e.items.length - 1 ? a.itemGapX : 0);
|
|
293
|
-
}
|
|
294
|
-
S += e.height + a.itemGapY;
|
|
295
|
-
}
|
|
296
|
-
b.length && (S -= a.itemGapY);
|
|
297
|
-
let C = S + a.paddingY;
|
|
298
|
-
return s.setAttribute("x", "0"), s.setAttribute("y", "0"), s.setAttribute("width", String(a.maxWidth)), s.setAttribute("height", String(C)), l.remove(), C + Math.round(a.fontSize * .4);
|
|
299
|
-
}
|
|
300
|
-
function I(e) {
|
|
301
|
-
let t = e.cloneNode(!0);
|
|
302
|
-
return t.querySelectorAll("script").forEach((e) => e.remove()), k(e, t), j(t), t;
|
|
303
|
-
}
|
|
304
|
-
function L(e) {
|
|
305
|
-
let t = Array.from(e.childNodes).filter((e) => e.nodeType === 1 && e.nodeName.toLowerCase() === "defs"), n = Array.from(e.childNodes).filter((e) => e.nodeType !== 1 || e.nodeName.toLowerCase() !== "defs"), r = document.createElementNS(o, "g");
|
|
306
|
-
r.setAttribute("id", "__vdu_export_content");
|
|
307
|
-
for (let e of n) r.appendChild(e);
|
|
308
|
-
for (let n of t) e.appendChild(n);
|
|
309
|
-
return e.appendChild(r), r;
|
|
310
|
-
}
|
|
311
|
-
function R(e, t) {
|
|
312
|
-
t <= 0 || e.setAttribute("transform", `translate(0, ${t})`);
|
|
313
|
-
}
|
|
314
|
-
function z(e, t) {
|
|
315
|
-
if (t <= 0) return;
|
|
316
|
-
let n = A(e), r = e.getAttribute("height");
|
|
317
|
-
if (n) e.setAttribute("viewBox", `${n.minX} ${n.minY} ${n.width} ${n.height + t}`), r && e.setAttribute("height", String(Number(r) + t));
|
|
318
|
-
else if (r) e.setAttribute("height", String(Number(r) + t));
|
|
319
|
-
else {
|
|
320
|
-
let n = e.getBBox();
|
|
321
|
-
e.setAttribute("viewBox", `0 0 ${Math.max(1, n.width)} ${Math.max(1, n.height + t)}`);
|
|
322
|
-
}
|
|
323
|
-
}
|
|
324
|
-
function B(e) {
|
|
325
|
-
let t = A(e);
|
|
326
|
-
if (t) return t.width;
|
|
327
|
-
let n = Number(e.getAttribute("width"));
|
|
328
|
-
return !Number.isNaN(n) && n > 0 ? n : e.getBBox().width || 0;
|
|
329
|
-
}
|
|
330
|
-
function V(e) {
|
|
331
|
-
let t = A(e);
|
|
332
|
-
if (t) return t.height;
|
|
333
|
-
let n = Number(e.getAttribute("height"));
|
|
334
|
-
return !Number.isNaN(n) && n > 0 ? n : e.getBBox().height || 0;
|
|
335
|
-
}
|
|
336
|
-
async function H(e) {
|
|
337
|
-
let t = M(e);
|
|
338
|
-
d();
|
|
339
|
-
try {
|
|
340
|
-
if (document.fonts?.ready) try {
|
|
341
|
-
await Promise.race([document.fonts.ready, new Promise((e) => setTimeout(e, 4e3))]);
|
|
342
|
-
} catch {}
|
|
343
|
-
let t = L(e), n = A(e), r = n ? n.minX : 0, i = n ? n.minY : 0, a = Math.max(1, B(e)), o = Math.max(1, V(e)), s = p(u(e).getPropertyValue("font-family") || ""), c = (b ? null : P(e, a, r, i, s)) ?? 0, d = m && m.value && m.value.position ? String(m.value.position).toLowerCase() : "top";
|
|
344
|
-
m && m.value && m.value.show && d === "top" && (c += F(e, a, r, i + c, s)), R(t, c);
|
|
345
|
-
let f = 0;
|
|
346
|
-
m && m.value && m.value.show && d === "bottom" && (f += F(e, a, r, i + c + o, s)), z(e, c + f), e.style.backgroundColor = v.value ?? "#FFF", await g(e, { mode: "raster" }), h(e, l.value.text ? -6 : -48);
|
|
347
|
-
} finally {
|
|
348
|
-
N(t), d();
|
|
349
|
-
}
|
|
350
|
-
}
|
|
351
|
-
async function U() {
|
|
352
|
-
let e = I(await T());
|
|
353
|
-
await H(e);
|
|
354
|
-
let t = `<?xml version="1.0" standalone="no"?>\n${new XMLSerializer().serializeToString(e)}`, n = new Blob([t], { type: "image/svg+xml;charset=utf-8" });
|
|
355
|
-
return {
|
|
356
|
-
blob: n,
|
|
357
|
-
url: URL.createObjectURL(n),
|
|
358
|
-
text: t,
|
|
359
|
-
dataUrl: `data:image/svg+xml;charset=utf-8,${encodeURIComponent(t)}`
|
|
360
|
-
};
|
|
361
|
-
}
|
|
362
|
-
async function W(e) {
|
|
363
|
-
let { url: t } = await U(), n = e || l.value?.text || "chart", r = document.createElement("a");
|
|
364
|
-
r.href = t, r.download = n.endsWith(".svg") ? n : `${n}.svg`, document.body.appendChild(r), r.click(), document.body.removeChild(r), URL.revokeObjectURL(t);
|
|
365
|
-
}
|
|
366
|
-
return {
|
|
367
|
-
ready: S,
|
|
368
|
-
getSvg: U,
|
|
369
|
-
exportSvg: W
|
|
370
|
-
};
|
|
371
|
-
}
|
|
372
|
-
function h(e, t = -50) {
|
|
373
|
-
if (!t) return;
|
|
374
|
-
let n = e.getAttribute("viewBox"), r = (t) => {
|
|
375
|
-
if (!t) return;
|
|
376
|
-
let n = e.getAttribute("height");
|
|
377
|
-
if (!n) return;
|
|
378
|
-
let r = /^(\d+(\.\d+)?)(px)?$/.exec(n.trim());
|
|
379
|
-
if (!r) return;
|
|
380
|
-
let i = parseFloat(r[1]) || 0, a = Math.max(1, i + t);
|
|
381
|
-
e.setAttribute("height", String(a));
|
|
382
|
-
};
|
|
383
|
-
if (n) {
|
|
384
|
-
let i = n.trim().split(/\s+|,/).map(Number);
|
|
385
|
-
if (i.length !== 4 || i.some((e) => !Number.isFinite(e))) return;
|
|
386
|
-
let [a, o, s, c] = i, l = o + t, u = -t, d = Math.max(1, c + u);
|
|
387
|
-
e.setAttribute("viewBox", `${a} ${l} ${s} ${d}`), r(u);
|
|
388
|
-
return;
|
|
389
|
-
}
|
|
390
|
-
let i = Number(e.getAttribute("width")), a = Number(e.getAttribute("height"));
|
|
391
|
-
if (!(i > 0 && a > 0)) {
|
|
392
|
-
let t = e.getBBox();
|
|
393
|
-
i = Math.max(1, t.width || 1), a = Math.max(1, t.height || 1);
|
|
394
|
-
}
|
|
395
|
-
let o = t, s = -t, c = Math.max(1, a + s);
|
|
396
|
-
e.setAttribute("viewBox", `0 ${o} ${i} ${c}`), (function() {
|
|
397
|
-
let t = e.getAttribute("height");
|
|
398
|
-
if (!t) return;
|
|
399
|
-
let n = /^(\d+(\.\d+)?)(px)?$/.exec(t.trim());
|
|
400
|
-
if (!n) return;
|
|
401
|
-
let r = parseFloat(n[1]) || 0, i = Math.max(1, r + s);
|
|
402
|
-
e.setAttribute("height", String(i));
|
|
403
|
-
})();
|
|
404
|
-
}
|
|
405
|
-
async function g(e, { mode: t = "raster" } = {}) {
|
|
406
|
-
let n = Array.from(e.querySelectorAll("foreignObject"));
|
|
407
|
-
if (!n.length) return {
|
|
408
|
-
converted: 0,
|
|
409
|
-
rasterized: 0,
|
|
410
|
-
skipped: 0,
|
|
411
|
-
errors: 0
|
|
412
|
-
};
|
|
413
|
-
let r = 0, i = 0, a = 0, c = 0, l = (e) => [
|
|
414
|
-
"div",
|
|
415
|
-
"p",
|
|
416
|
-
"span",
|
|
417
|
-
"strong",
|
|
418
|
-
"em",
|
|
419
|
-
"b",
|
|
420
|
-
"i",
|
|
421
|
-
"br"
|
|
422
|
-
].includes(e), d = (e) => {
|
|
423
|
-
try {
|
|
424
|
-
let t = e.firstElementChild;
|
|
425
|
-
if (!t) return !1;
|
|
426
|
-
let n = [t];
|
|
427
|
-
for (; n.length;) {
|
|
428
|
-
let e = n.pop();
|
|
429
|
-
if (e.nodeType === 3) continue;
|
|
430
|
-
if (e.nodeType !== 1) return !1;
|
|
431
|
-
let t = (e.tagName || "").toLowerCase();
|
|
432
|
-
if (!l(t) || e.querySelector?.("img,svg,canvas,video,foreignObject")) return !1;
|
|
433
|
-
for (let t of Array.from(e.childNodes)) n.push(t);
|
|
434
|
-
}
|
|
435
|
-
return !0;
|
|
436
|
-
} catch {
|
|
437
|
-
return !1;
|
|
438
|
-
}
|
|
439
|
-
};
|
|
440
|
-
function f(e) {
|
|
441
|
-
try {
|
|
442
|
-
let t = e.firstElementChild;
|
|
443
|
-
if (!t) return null;
|
|
444
|
-
let n = (e, t = 0) => Number.isFinite(+e) ? +e : t, r = n(e.getAttribute("x"), 0), i = n(e.getAttribute("y"), 0), a = n(e.getAttribute("width"), NaN);
|
|
445
|
-
if (!Number.isFinite(a) || a <= 0) {
|
|
446
|
-
let t = e.getBBox?.();
|
|
447
|
-
a = Math.max(1, n(t?.width, 0));
|
|
448
|
-
}
|
|
449
|
-
let s = (e, t) => {
|
|
450
|
-
if (!e) return Math.round(t * 1.2);
|
|
451
|
-
let n = e.trim().toLowerCase();
|
|
452
|
-
if (n === "normal") return Math.round(t * 1.2);
|
|
453
|
-
if (n.endsWith("px")) return parseFloat(n) || Math.round(t * 1.2);
|
|
454
|
-
if (n.endsWith("%")) return parseFloat(n) / 100 * t || Math.round(t * 1.2);
|
|
455
|
-
if (n.endsWith("em")) return (parseFloat(n) || 1) * t;
|
|
456
|
-
if (n.endsWith("rem")) {
|
|
457
|
-
let e = parseFloat(getComputedStyle(document.documentElement).fontSize) || t;
|
|
458
|
-
return (parseFloat(n) || 1) * e;
|
|
459
|
-
}
|
|
460
|
-
let r = Number(n);
|
|
461
|
-
return Number.isFinite(r) ? r * t : Math.round(t * 1.2);
|
|
462
|
-
}, c = (e) => {
|
|
463
|
-
let t = (e || "").split(/\s+/).map((e) => {
|
|
464
|
-
let t = (e || "").trim().toLowerCase();
|
|
465
|
-
if (t.endsWith("px")) return parseFloat(t) || 0;
|
|
466
|
-
if (t.endsWith("rem")) {
|
|
467
|
-
let e = parseFloat(getComputedStyle(document.documentElement).fontSize) || 16;
|
|
468
|
-
return (parseFloat(t) || 0) * e;
|
|
469
|
-
}
|
|
470
|
-
if (t.endsWith("em")) {
|
|
471
|
-
let e = parseFloat(getComputedStyle(document.body).fontSize) || 16;
|
|
472
|
-
return (parseFloat(t) || 0) * e;
|
|
473
|
-
}
|
|
474
|
-
let n = Number(t);
|
|
475
|
-
return Number.isFinite(n) ? n : 0;
|
|
476
|
-
}).filter(Number.isFinite);
|
|
477
|
-
return t.length ? t.length === 1 ? [
|
|
478
|
-
t[0],
|
|
479
|
-
t[0],
|
|
480
|
-
t[0],
|
|
481
|
-
t[0]
|
|
482
|
-
] : t.length === 2 ? [
|
|
483
|
-
t[0],
|
|
484
|
-
t[1],
|
|
485
|
-
t[0],
|
|
486
|
-
t[1]
|
|
487
|
-
] : t.length === 3 ? [
|
|
488
|
-
t[0],
|
|
489
|
-
t[1],
|
|
490
|
-
t[2],
|
|
491
|
-
t[1]
|
|
492
|
-
] : [
|
|
493
|
-
t[0],
|
|
494
|
-
t[1],
|
|
495
|
-
t[2],
|
|
496
|
-
t[3]
|
|
497
|
-
] : [
|
|
498
|
-
0,
|
|
499
|
-
0,
|
|
500
|
-
0,
|
|
501
|
-
0
|
|
502
|
-
];
|
|
503
|
-
}, l = (e, t) => {
|
|
504
|
-
let n = u(e), r = n.getPropertyValue("font-family") || t?.ff || "system-ui";
|
|
505
|
-
r = p(r);
|
|
506
|
-
let i = parseFloat(n.getPropertyValue("font-size"));
|
|
507
|
-
Number.isFinite(i) || (i = t?.fs || 14);
|
|
508
|
-
let a = n.getPropertyValue("font-weight") || t?.fw || "400", o = n.getPropertyValue("font-style") || t?.fsty || "normal", l = n.getPropertyValue("font-stretch") || t?.fstc || "normal", d = n.getPropertyValue("letter-spacing") || t?.lsp || "normal", f = n.getPropertyValue("word-spacing") || t?.wsp || "0px", m = n.getPropertyValue("font-kerning") || t?.kern || "auto", h = n.getPropertyValue("font-variant-ligatures") || t?.liga || "normal", g = n.getPropertyValue("text-transform") || t?.ttfm || "none", _ = n.getPropertyValue("color") || t?.fill || "#000", v = n.getPropertyValue("line-height"), y = !v || v.trim().toLowerCase() === "normal" ? t?.lh ?? Math.round(i * 1.2) : s(v, i), b = (n.getPropertyValue("text-align") || t?.ta || "start").trim().toLowerCase(), x = parseFloat(n.getPropertyValue("padding-top")) || 0, S = parseFloat(n.getPropertyValue("padding-right")) || 0, C = parseFloat(n.getPropertyValue("padding-bottom")) || 0, w = parseFloat(n.getPropertyValue("padding-left")) || 0, T = n.getPropertyValue("padding");
|
|
509
|
-
if (T && x === 0 && S === 0 && C === 0 && w === 0) {
|
|
510
|
-
let [e, t, n, r] = c(T);
|
|
511
|
-
x = e, S = t, C = n, w = r;
|
|
512
|
-
}
|
|
513
|
-
let E = parseFloat(n.getPropertyValue("border-left-width")) || 0, D = parseFloat(n.getPropertyValue("border-right-width")) || 0, O = n.getPropertyValue("box-sizing") || "content-box";
|
|
514
|
-
return {
|
|
515
|
-
ff: r,
|
|
516
|
-
fs: i,
|
|
517
|
-
fw: a,
|
|
518
|
-
fsty: o,
|
|
519
|
-
fstc: l,
|
|
520
|
-
lsp: d,
|
|
521
|
-
wsp: f,
|
|
522
|
-
kern: m,
|
|
523
|
-
liga: h,
|
|
524
|
-
ttfm: g,
|
|
525
|
-
fill: _,
|
|
526
|
-
lh: y,
|
|
527
|
-
ta: b,
|
|
528
|
-
padL: w,
|
|
529
|
-
padR: S,
|
|
530
|
-
padT: x,
|
|
531
|
-
padB: C,
|
|
532
|
-
bL: E,
|
|
533
|
-
bR: D,
|
|
534
|
-
box: O
|
|
535
|
-
};
|
|
536
|
-
}, d = (e) => /^(div|p|section|article|ul|ol|li|h[1-6])$/.test(e), f = { __para__: !0 }, m = { __br__: !0 }, h = [], g = l(t), _ = (e, t, n) => {
|
|
537
|
-
if (e.nodeType === 3) {
|
|
538
|
-
let r = (e.nodeValue || "").replace(/\s+/g, " ").trim();
|
|
539
|
-
r && h.push({
|
|
540
|
-
text: r,
|
|
541
|
-
style: t,
|
|
542
|
-
path: n.slice()
|
|
543
|
-
});
|
|
544
|
-
return;
|
|
545
|
-
}
|
|
546
|
-
if (e.nodeType !== 1) return;
|
|
547
|
-
let r = e.tagName.toLowerCase();
|
|
548
|
-
if (r === "br") {
|
|
549
|
-
h.push({
|
|
550
|
-
...m,
|
|
551
|
-
path: n.slice()
|
|
552
|
-
});
|
|
553
|
-
return;
|
|
554
|
-
}
|
|
555
|
-
let i = l(e, t);
|
|
556
|
-
n.push(e);
|
|
557
|
-
for (let t of Array.from(e.childNodes)) _(t, i, n);
|
|
558
|
-
n.pop(), d(r) && h.push({
|
|
559
|
-
...f,
|
|
560
|
-
path: n.slice()
|
|
561
|
-
});
|
|
562
|
-
};
|
|
563
|
-
for (_(t, g, [t]); h.length && (h.at(-1).__para__ || h.at(-1).__br__);) h.pop();
|
|
564
|
-
if (!h.length) return null;
|
|
565
|
-
let v = h.filter((e) => !e.__para__ && !e.__br__), y = (() => {
|
|
566
|
-
if (!v.length) return [t];
|
|
567
|
-
let e = v.map((e) => e.path), n = Math.min(...e.map((e) => e.length)), r = 0;
|
|
568
|
-
for (; r < n;) {
|
|
569
|
-
let t = e[0][r];
|
|
570
|
-
if (e.every((e) => e[r] === t)) r += 1;
|
|
571
|
-
else break;
|
|
572
|
-
}
|
|
573
|
-
return e[0].slice(0, Math.max(1, r));
|
|
574
|
-
})(), b = l(y[y.length - 1] || t), x = 0, S = 0, C = 0;
|
|
575
|
-
for (let e of y) {
|
|
576
|
-
let t = l(e);
|
|
577
|
-
x += t.padL, S += t.padR, C += t.padT;
|
|
578
|
-
}
|
|
579
|
-
let w = [Math.max(1, a - x - S)];
|
|
580
|
-
for (let e of y) try {
|
|
581
|
-
let t = u(e);
|
|
582
|
-
if (e.clientWidth && e.clientWidth > 0) {
|
|
583
|
-
let n = parseFloat(t.paddingLeft) || 0, r = parseFloat(t.paddingRight) || 0, i = Math.max(1, e.clientWidth - n - r);
|
|
584
|
-
w.push(i);
|
|
585
|
-
}
|
|
586
|
-
let n = t.width, r = parseFloat(n);
|
|
587
|
-
if (Number.isFinite(r) && r > 0) {
|
|
588
|
-
let e = t.boxSizing || t.getPropertyValue("box-sizing") || "content-box", n = parseFloat(t.paddingLeft) || 0, i = parseFloat(t.paddingRight) || 0, a = parseFloat(t.borderLeftWidth) || 0, o = parseFloat(t.borderRightWidth) || 0, s = e === "border-box" ? Math.max(1, r - n - i - a - o) : Math.max(1, r);
|
|
589
|
-
w.push(s);
|
|
590
|
-
}
|
|
591
|
-
} catch {}
|
|
592
|
-
let T = Math.floor(Math.min(...w.filter(Number.isFinite))) - 1;
|
|
593
|
-
T > 0 || (T = 1);
|
|
594
|
-
let E = "start", D = r + x;
|
|
595
|
-
b.ta === "center" ? (E = "middle", D = r + x + T / 2) : (b.ta === "right" || b.ta === "end") && (E = "end", D = r + (a - S));
|
|
596
|
-
let O = e.ownerSVGElement || e.closest("svg"), k = document.createElementNS(o, "text");
|
|
597
|
-
k.setAttribute("x", String(D)), k.setAttribute("y", String(i + C)), k.setAttribute("text-anchor", E), k.setAttribute("dominant-baseline", "text-before-edge"), k.setAttribute("xml:space", "preserve");
|
|
598
|
-
let A = document.createElementNS(o, "text");
|
|
599
|
-
A.setAttribute("x", "0"), A.setAttribute("y", "0"), A.setAttribute("opacity", "0"), (O || e).appendChild(A);
|
|
600
|
-
let j = (e) => `font-family:${e.ff}; font-size:${e.fs}px; font-weight:${e.fw}; font-style:${e.fsty}; font-stretch:${e.fstc}; letter-spacing:${e.lsp}; word-spacing:${e.wsp}; font-kerning:${e.kern}; font-variant-ligatures:${e.liga}; text-transform:${e.ttfm};`, M = (e, t) => (A.textContent = e || "", A.setAttribute("style", j(t)), A.getComputedTextLength()), N = (e) => M(" ", e), P = [], F = [], I = 0, L = () => {
|
|
601
|
-
F.length && P.push({ segs: F.slice() }), F = [], I = 0;
|
|
602
|
-
}, R = (e, t, n) => {
|
|
603
|
-
let r = M(e, t);
|
|
604
|
-
if (n) {
|
|
605
|
-
let e = N(t);
|
|
606
|
-
r += e, F.push({
|
|
607
|
-
text: " ",
|
|
608
|
-
...t,
|
|
609
|
-
w: e,
|
|
610
|
-
isSpace: !0
|
|
611
|
-
});
|
|
612
|
-
}
|
|
613
|
-
F.push({
|
|
614
|
-
text: e,
|
|
615
|
-
...t,
|
|
616
|
-
w: r
|
|
617
|
-
}), I += r;
|
|
618
|
-
}, z = (e, t, n) => {
|
|
619
|
-
let r = "";
|
|
620
|
-
for (let i of e) {
|
|
621
|
-
let e = r + i;
|
|
622
|
-
if (M(e, t) <= n) r = e;
|
|
623
|
-
else break;
|
|
624
|
-
}
|
|
625
|
-
return r || e[0] || "";
|
|
626
|
-
};
|
|
627
|
-
for (let e of h) {
|
|
628
|
-
if (e.__para__ || e.__br__) {
|
|
629
|
-
L();
|
|
630
|
-
continue;
|
|
631
|
-
}
|
|
632
|
-
let t = e.style, n = e.text.split(/(\s+)/).filter((e) => e.length > 0), r = (e, n) => {
|
|
633
|
-
if (!e) return;
|
|
634
|
-
let r = Math.max(1, T), i = M(e, t) + (n ? N(t) : 0);
|
|
635
|
-
if (F.length === 0) {
|
|
636
|
-
if (i <= r) R(e, t, !1);
|
|
637
|
-
else {
|
|
638
|
-
let n = e;
|
|
639
|
-
for (; n;) {
|
|
640
|
-
let e = z(n, t, r);
|
|
641
|
-
R(e, t, !1), n = n.slice(e.length), n && L();
|
|
642
|
-
}
|
|
643
|
-
}
|
|
644
|
-
} else if (I + i <= r) R(e, t, n);
|
|
645
|
-
else if (L(), M(e, t) <= r) R(e, t, !1);
|
|
646
|
-
else {
|
|
647
|
-
let n = e;
|
|
648
|
-
for (; n;) {
|
|
649
|
-
let e = z(n, t, r);
|
|
650
|
-
R(e, t, !1), n = n.slice(e.length), n && L();
|
|
651
|
-
}
|
|
652
|
-
}
|
|
653
|
-
}, i = !1;
|
|
654
|
-
for (let e of n) {
|
|
655
|
-
if (/^\s+$/.test(e)) {
|
|
656
|
-
i = !0;
|
|
657
|
-
continue;
|
|
658
|
-
}
|
|
659
|
-
r(e, i), i = !1;
|
|
660
|
-
}
|
|
661
|
-
}
|
|
662
|
-
L();
|
|
663
|
-
for (let e = 0; e < P.length; e += 1) {
|
|
664
|
-
let t = P[e].segs, n = Math.max(...t.map((e) => e.fs || b.fs), b.fs), r = !0;
|
|
665
|
-
for (let i of t) {
|
|
666
|
-
let t = document.createElementNS(o, "tspan");
|
|
667
|
-
r &&= (t.setAttribute("x", String(D)), e > 0 && t.setAttribute("dy", String(n)), !1), t.setAttribute("style", `${j(i)} fill:${i.fill};`), t.textContent = i.text, k.appendChild(t);
|
|
668
|
-
}
|
|
669
|
-
if (!t.length && e > 0) {
|
|
670
|
-
let e = document.createElementNS(o, "tspan");
|
|
671
|
-
e.setAttribute("x", String(D)), e.setAttribute("dy", String(n)), e.textContent = "", k.appendChild(e);
|
|
672
|
-
}
|
|
673
|
-
}
|
|
674
|
-
try {
|
|
675
|
-
A.remove();
|
|
676
|
-
} catch {}
|
|
677
|
-
return k;
|
|
678
|
-
} catch {
|
|
679
|
-
return null;
|
|
680
|
-
}
|
|
681
|
-
}
|
|
682
|
-
let m = (e) => {
|
|
683
|
-
try {
|
|
684
|
-
let t = document.createElement("div");
|
|
685
|
-
t.style.position = "absolute", t.style.left = "-99999px", t.style.top = "-99999px", t.style.visibility = "hidden", t.style.pointerEvents = "none", t.style.width = "auto", t.style.height = "auto";
|
|
686
|
-
let n = e.cloneNode(!0);
|
|
687
|
-
n.style.width = "auto", n.style.height = "auto", n.style.display = "inline-block", n.style.maxWidth = "none", n.style.maxHeight = "none", n.style.boxSizing = "content-box", document.body.appendChild(t), t.appendChild(n);
|
|
688
|
-
let r = n.getBoundingClientRect(), i = Math.ceil(r.width || n.scrollWidth || 0), a = Math.ceil(r.height || n.scrollHeight || 0);
|
|
689
|
-
return t.remove(), {
|
|
690
|
-
w: Math.max(1, i),
|
|
691
|
-
h: Math.max(1, a)
|
|
692
|
-
};
|
|
693
|
-
} catch {
|
|
694
|
-
return {
|
|
695
|
-
w: 0,
|
|
696
|
-
h: 0
|
|
697
|
-
};
|
|
698
|
-
}
|
|
699
|
-
};
|
|
700
|
-
for (let e of n) try {
|
|
701
|
-
if (e.hasAttribute("data-no-svg-export")) {
|
|
702
|
-
e.remove(), a += 1;
|
|
703
|
-
continue;
|
|
704
|
-
}
|
|
705
|
-
if (d(e)) {
|
|
706
|
-
let t = f(e);
|
|
707
|
-
if (t) {
|
|
708
|
-
e.parentNode.replaceChild(t, e), r += 1;
|
|
709
|
-
continue;
|
|
710
|
-
}
|
|
711
|
-
}
|
|
712
|
-
a += 1;
|
|
713
|
-
} catch {
|
|
714
|
-
c += 1;
|
|
715
|
-
}
|
|
716
|
-
if (t === "raster") {
|
|
717
|
-
let t = Array.from(e.querySelectorAll("foreignObject"));
|
|
718
|
-
for (let e of t) try {
|
|
719
|
-
if (e.hasAttribute("data-no-svg-export")) {
|
|
720
|
-
e.remove(), a += 1;
|
|
721
|
-
continue;
|
|
722
|
-
}
|
|
723
|
-
await new Promise((e) => requestAnimationFrame(e));
|
|
724
|
-
let t = e.getBBox(), n = Math.max(1, Math.ceil(t.width)), r = Math.max(1, Math.ceil(t.height)), c = e.firstElementChild;
|
|
725
|
-
if (c) {
|
|
726
|
-
let t = m(c), i = parseFloat(e.getAttribute("width") || "0") || 0, a = parseFloat(e.getAttribute("height") || "0") || 0;
|
|
727
|
-
n = Math.max(n, i, t.w), r = Math.max(r, a, t.h);
|
|
728
|
-
}
|
|
729
|
-
if (!(n > 0 && r > 0)) {
|
|
730
|
-
a += 1;
|
|
731
|
-
continue;
|
|
732
|
-
}
|
|
733
|
-
let l = document.createElementNS(o, "svg");
|
|
734
|
-
l.setAttribute("xmlns", o), l.setAttribute("xmlns:xlink", s), l.setAttribute("width", String(n)), l.setAttribute("height", String(r)), l.setAttribute("viewBox", `0 0 ${n} ${r}`);
|
|
735
|
-
let u = e.cloneNode(!0);
|
|
736
|
-
u.setAttribute("x", "0"), u.setAttribute("y", "0"), u.setAttribute("width", String(n)), u.setAttribute("height", String(r)), l.appendChild(u);
|
|
737
|
-
let d = new XMLSerializer().serializeToString(l), f = "data:image/svg+xml;charset=utf-8," + encodeURIComponent(d), p = document.createElement("canvas");
|
|
738
|
-
p.width = Math.max(1, Math.floor(n * 2)), p.height = Math.max(1, Math.floor(r * 2));
|
|
739
|
-
let h = p.getContext("2d"), g = new Image();
|
|
740
|
-
g.decoding = "sync", g.crossOrigin = "anonymous", await new Promise((e, t) => {
|
|
741
|
-
g.onload = e, g.onerror = t, g.src = f;
|
|
742
|
-
}), h.drawImage(g, 0, 0, p.width, p.height);
|
|
743
|
-
let _ = p.toDataURL("image/png"), v = document.createElementNS(o, "image");
|
|
744
|
-
v.setAttributeNS(s, "href", _), v.setAttribute("href", _), v.setAttribute("x", e.getAttribute("x") || String(t.x)), v.setAttribute("y", e.getAttribute("y") || String(t.y)), v.setAttribute("width", String(n)), v.setAttribute("height", String(r)), e.parentNode.replaceChild(v, e), i += 1;
|
|
745
|
-
} catch {
|
|
746
|
-
c += 1;
|
|
747
|
-
}
|
|
748
|
-
}
|
|
749
|
-
return {
|
|
750
|
-
converted: r,
|
|
751
|
-
rasterized: i,
|
|
752
|
-
skipped: a,
|
|
753
|
-
errors: c
|
|
754
|
-
};
|
|
755
|
-
}
|
|
756
|
-
//#endregion
|
|
757
|
-
//#region src/useChartExport.js
|
|
758
|
-
function _({ svg: e, title: n, legend: i, legendItems: a, backgroundColor: o, getSvgCallback: s, generateImage: c, titleEmbedded: l = !1, stretchTitle: u = !1 }) {
|
|
759
|
-
let d = r(!1), f = r(!1), { exportSvg: p, getSvg: h } = m({
|
|
760
|
-
svg: e,
|
|
761
|
-
title: n,
|
|
762
|
-
legend: i,
|
|
763
|
-
legendItems: a,
|
|
764
|
-
backgroundColor: o,
|
|
765
|
-
titleEmbedded: l,
|
|
766
|
-
stretchTitle: u
|
|
767
|
-
});
|
|
768
|
-
async function g({ isCb: e }) {
|
|
769
|
-
f.value = !0, await t();
|
|
770
|
-
try {
|
|
771
|
-
if (e) {
|
|
772
|
-
let { blob: e, url: t, text: n, dataUrl: r } = await h();
|
|
773
|
-
await Promise.resolve(s()({
|
|
774
|
-
blob: e,
|
|
775
|
-
url: t,
|
|
776
|
-
text: n,
|
|
777
|
-
dataUrl: r
|
|
778
|
-
}));
|
|
779
|
-
} else await Promise.resolve(p());
|
|
780
|
-
} finally {
|
|
781
|
-
f.value = !1;
|
|
782
|
-
}
|
|
783
|
-
}
|
|
784
|
-
function _(e) {
|
|
785
|
-
if (e?.stage === "start") {
|
|
786
|
-
d.value = !0;
|
|
787
|
-
return;
|
|
788
|
-
}
|
|
789
|
-
if (e?.stage === "end") {
|
|
790
|
-
d.value = !1;
|
|
791
|
-
return;
|
|
792
|
-
}
|
|
793
|
-
c();
|
|
794
|
-
}
|
|
795
|
-
return {
|
|
796
|
-
isCallbackImaging: d,
|
|
797
|
-
isCallbackSvg: f,
|
|
798
|
-
generateSvg: g,
|
|
799
|
-
onGenerateImage: _
|
|
800
|
-
};
|
|
801
|
-
}
|
|
802
|
-
//#endregion
|
|
803
|
-
export { _ as t };
|