@shtabapp/ui-kit 1.74.0 → 1.76.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/CHANGELOG.md +26 -0
- package/dist/{SButton-CLTNdnCK.cjs → SButton-BCgdXE_B.cjs} +1 -1
- package/dist/{SButton-LAOBxpd4.js → SButton-DIWMMCSc.js} +1 -0
- package/dist/{SButtonGroup-DPq5g7bZ.js → SButtonGroup-BqW5Rz1p.js} +0 -2
- package/dist/{SButtonGroup-Co1AUbsm.cjs → SButtonGroup-DSi8mQSz.cjs} +1 -1
- package/dist/{SCard-DKZYyR5b.cjs → SCard-B210wsTH.cjs} +1 -1
- package/dist/{SCard-DgGxjBUV.js → SCard-DJuyINB7.js} +1 -1
- package/dist/SChartBar-BvytQ-2z.js +293 -0
- package/dist/SChartBar-BzCeNCsi.cjs +1 -0
- package/dist/SChartBurnup-BeQWgnGT.js +261 -0
- package/dist/SChartBurnup-joKIDLFb.cjs +1 -0
- package/dist/SChartHorizontalBar-C40Yroue.js +176 -0
- package/dist/SChartHorizontalBar-Dwln3uuE.cjs +1 -0
- package/dist/SChartLegend-D1gPKGm0.cjs +1 -0
- package/dist/SChartLegend-dDqLhvIj.js +88 -0
- package/dist/{SChartLine-v0tkmnN6.js → SChartLine-BV8Ytso5.js} +36 -36
- package/dist/{SChartLine-3l507dBg.cjs → SChartLine-DeJjaBmo.cjs} +1 -1
- package/dist/SChartMultiLine-7_HcvVEQ.js +279 -0
- package/dist/SChartMultiLine-Cl9Pf3Wp.cjs +1 -0
- package/dist/SChartPie-BiLoxutQ.js +267 -0
- package/dist/SChartPie-DccW5J0b.cjs +1 -0
- package/dist/{SChartProgress-9Zzy7E8K.cjs → SChartProgress-Cpdkad6Q.cjs} +1 -1
- package/dist/{SChartProgress-DUgSOdv7.js → SChartProgress-DSxJqRA0.js} +27 -27
- package/dist/{SChartStackedArea-Blpqa23h.js → SChartStackedArea-B28offwE.js} +44 -44
- package/dist/{SChartStackedArea-C3MezV9k.cjs → SChartStackedArea-Ce7xyhp1.cjs} +1 -1
- package/dist/{SChartStackedBar-CCxEXw1H.js → SChartStackedBar-C77FlKGS.js} +55 -55
- package/dist/{SChartStackedBar-CJ-UdOfv.cjs → SChartStackedBar-CqUDrFJ3.cjs} +1 -1
- package/dist/SCheckbox-Dkbk21Id.cjs +1 -0
- package/dist/SCheckbox-Dulusx5v.js +105 -0
- package/dist/{SChip-Dcvk3JI8.cjs → SChip-BCB1bvua.cjs} +1 -1
- package/dist/{SChip-NDTK29yq.js → SChip-C6d9oIYL.js} +1 -1
- package/dist/{SColorPicker-Ct8FVU0D.cjs → SColorPicker-CcPnyXE0.cjs} +1 -1
- package/dist/{SColorPicker-BjtlrGHZ.js → SColorPicker-XXyDOuDg.js} +2 -2
- package/dist/{SInput-D8NftspL.js → SInput-CGlUBCkW.js} +57 -54
- package/dist/SInput-fT-S-Tko.cjs +1 -0
- package/dist/SList-BuuCfuHg.js +471 -0
- package/dist/SList-Vg9nx1oe.cjs +1 -0
- package/dist/SListItem-CDlsjhA3.js +227 -0
- package/dist/SListItem-DMjtJXxV.cjs +1 -0
- package/dist/{SPhotoEdit-CShhPLJt.cjs → SPhotoEdit-B4ujF5Dh.cjs} +1 -1
- package/dist/{SPhotoEdit-r63G2NZI.js → SPhotoEdit-BxxycqvA.js} +1 -1
- package/dist/SRadio-B9qQ-PEk.cjs +1 -0
- package/dist/SRadio-BhoLtFUS.js +60 -0
- package/dist/SSelect-Bn4kifqp.js +666 -0
- package/dist/SSelect-DyngcoP9.cjs +1 -0
- package/dist/STab-BkQzKaLY.cjs +1 -0
- package/dist/STab-D7SATMfv.js +242 -0
- package/dist/{STable-CToIFCiU.js → STable-BVGHC_FJ.js} +193 -169
- package/dist/STable-QYXxMVAw.cjs +1 -0
- package/dist/STabs-BYbsRtvi.js +151 -0
- package/dist/STabs-DDP-2p6T.cjs +1 -0
- package/dist/{STag-C5KhPWjQ.js → STag-DWjv_Za8.js} +1 -1
- package/dist/{STag-ZPrc5q4N.cjs → STag-nqzlv8OZ.cjs} +1 -1
- package/dist/{STagGroup-ccEvIkK7.cjs → STagGroup-CYEI9OXO.cjs} +1 -1
- package/dist/{STagGroup-BGwvunuu.js → STagGroup-DEPpEU5C.js} +1 -1
- package/dist/SToggle-BNgLiIrQ.cjs +1 -0
- package/dist/SToggle-MSdprnRP.js +62 -0
- package/dist/applyChartHighlightedYTick-BHVwiljn.cjs +1 -0
- package/dist/applyChartHighlightedYTick-DmsstRVM.js +17 -0
- package/dist/buildMultiLineChartScales-Di-yTvEB.js +41 -0
- package/dist/buildMultiLineChartScales-lVP6h9H4.cjs +1 -0
- package/dist/components/SButton/SButton.vue.d.ts.map +1 -1
- package/dist/components/SButtonGroup/SButtonGroup.vue.d.ts.map +1 -1
- package/dist/components/SChartBar/SChartBar.types.d.ts +33 -4
- package/dist/components/SChartBar/SChartBar.types.d.ts.map +1 -1
- package/dist/components/SChartBar/SChartBar.vue.d.ts.map +1 -1
- package/dist/components/SChartBar/index.d.ts +1 -1
- package/dist/components/SChartBar/index.d.ts.map +1 -1
- package/dist/components/SChartBar/utils/buildBarChartConfig.d.ts +8 -2
- package/dist/components/SChartBar/utils/buildBarChartConfig.d.ts.map +1 -1
- package/dist/components/SChartBar/utils/createBarTargetLinePlugin.d.ts.map +1 -1
- package/dist/components/SChartBar/utils/createBarValueLabelPlugin.d.ts +7 -0
- package/dist/components/SChartBar/utils/createBarValueLabelPlugin.d.ts.map +1 -0
- package/dist/components/SChartBar/utils/demoBarSeries.d.ts +7 -1
- package/dist/components/SChartBar/utils/demoBarSeries.d.ts.map +1 -1
- package/dist/components/SChartBurnup/SChartBurnup.types.d.ts +8 -1
- package/dist/components/SChartBurnup/SChartBurnup.types.d.ts.map +1 -1
- package/dist/components/SChartBurnup/utils/buildBurnupChartConfig.d.ts.map +1 -1
- package/dist/components/SChartBurnup/utils/demoBurnupPoints.d.ts +1 -0
- package/dist/components/SChartBurnup/utils/demoBurnupPoints.d.ts.map +1 -1
- package/dist/components/SChartLegend/SChartLegend.types.d.ts +17 -0
- package/dist/components/SChartLegend/SChartLegend.types.d.ts.map +1 -1
- package/dist/components/SChartLegend/SChartLegend.vue.d.ts +3 -1
- package/dist/components/SChartLegend/SChartLegend.vue.d.ts.map +1 -1
- package/dist/components/SChartLegend/index.d.ts +1 -0
- package/dist/components/SChartLegend/index.d.ts.map +1 -1
- package/dist/components/SChartMultiLine/SChartMultiLine.types.d.ts +14 -2
- package/dist/components/SChartMultiLine/SChartMultiLine.types.d.ts.map +1 -1
- package/dist/components/SChartMultiLine/SChartMultiLine.vue.d.ts +3 -1
- package/dist/components/SChartMultiLine/SChartMultiLine.vue.d.ts.map +1 -1
- package/dist/components/SChartMultiLine/index.d.ts +1 -1
- package/dist/components/SChartMultiLine/index.d.ts.map +1 -1
- package/dist/components/SChartMultiLine/utils/buildMultiLineChartConfig.d.ts +9 -2
- package/dist/components/SChartMultiLine/utils/buildMultiLineChartConfig.d.ts.map +1 -1
- package/dist/components/SChartMultiLine/utils/demoMultiLineSeries.d.ts +4 -1
- package/dist/components/SChartMultiLine/utils/demoMultiLineSeries.d.ts.map +1 -1
- package/dist/components/SChartPie/SChartPie.types.d.ts +27 -1
- package/dist/components/SChartPie/SChartPie.types.d.ts.map +1 -1
- package/dist/components/SChartPie/SChartPie.vue.d.ts +16 -2
- package/dist/components/SChartPie/SChartPie.vue.d.ts.map +1 -1
- package/dist/components/SChartPie/index.d.ts +2 -1
- package/dist/components/SChartPie/index.d.ts.map +1 -1
- package/dist/components/SChartPie/utils/buildPieChartConfig.d.ts +3 -1
- package/dist/components/SChartPie/utils/buildPieChartConfig.d.ts.map +1 -1
- package/dist/components/SChartPie/utils/demoPieSlices.d.ts +1 -0
- package/dist/components/SChartPie/utils/demoPieSlices.d.ts.map +1 -1
- package/dist/components/SChartSegmentedBar/SChartSegmentedBar.types.d.ts +9 -0
- package/dist/components/SChartSegmentedBar/SChartSegmentedBar.types.d.ts.map +1 -1
- package/dist/components/SChartSegmentedBar/SChartSegmentedBar.vue.d.ts +14 -2
- package/dist/components/SChartSegmentedBar/SChartSegmentedBar.vue.d.ts.map +1 -1
- package/dist/components/SChartSegmentedBar/utils/buildSegmentedBarChartConfig.d.ts +4 -1
- package/dist/components/SChartSegmentedBar/utils/buildSegmentedBarChartConfig.d.ts.map +1 -1
- package/dist/components/SChartSegmentedBar/utils/createSegmentedBarBadgePlugin.d.ts.map +1 -1
- package/dist/components/SCheckbox/SCheckbox.vue.d.ts.map +1 -1
- package/dist/components/SInput/SInput.vue.d.ts.map +1 -1
- package/dist/components/SInput/utils/fieldLabelId.d.ts +6 -0
- package/dist/components/SInput/utils/fieldLabelId.d.ts.map +1 -0
- package/dist/components/SList/SList.vue.d.ts.map +1 -1
- package/dist/components/SList/utils/context.d.ts +3 -0
- package/dist/components/SList/utils/context.d.ts.map +1 -1
- package/dist/components/SList/utils/resolveListItemFields.d.ts +1 -1
- package/dist/components/SList/utils/resolveListItemFields.d.ts.map +1 -1
- package/dist/components/SListItem/SListItem.types.d.ts +22 -0
- package/dist/components/SListItem/SListItem.types.d.ts.map +1 -1
- package/dist/components/SListItem/SListItem.vue.d.ts.map +1 -1
- package/dist/components/SListItem/index.d.ts +2 -2
- package/dist/components/SListItem/index.d.ts.map +1 -1
- package/dist/components/SListItem/utils/listItemAria.d.ts +31 -0
- package/dist/components/SListItem/utils/listItemAria.d.ts.map +1 -0
- package/dist/components/SRadio/SRadio.vue.d.ts.map +1 -1
- package/dist/components/SRoadmap/SRoadmap.types.d.ts +47 -0
- package/dist/components/SRoadmap/SRoadmap.types.d.ts.map +1 -0
- package/dist/components/SRoadmap/SRoadmap.vue.d.ts +21 -0
- package/dist/components/SRoadmap/SRoadmap.vue.d.ts.map +1 -0
- package/dist/components/SRoadmap/index.d.ts +4 -0
- package/dist/components/SRoadmap/index.d.ts.map +1 -0
- package/dist/components/SRoadmap/utils/buildRoadmapRows.d.ts +19 -0
- package/dist/components/SRoadmap/utils/buildRoadmapRows.d.ts.map +1 -0
- package/dist/components/SRoadmap/utils/demoRoadmapItems.d.ts +5 -0
- package/dist/components/SRoadmap/utils/demoRoadmapItems.d.ts.map +1 -0
- package/dist/components/SRoadmap/utils/roadmapDate.d.ts +16 -0
- package/dist/components/SRoadmap/utils/roadmapDate.d.ts.map +1 -0
- package/dist/components/SSelect/SSelect.vue.d.ts.map +1 -1
- package/dist/components/STab/STab.types.d.ts +5 -0
- package/dist/components/STab/STab.types.d.ts.map +1 -1
- package/dist/components/STab/STab.vue.d.ts +2 -0
- package/dist/components/STab/STab.vue.d.ts.map +1 -1
- package/dist/components/STable/STable.vue.d.ts.map +1 -1
- package/dist/components/STable/parts/STableGroupRow.vue.d.ts +2 -0
- package/dist/components/STable/parts/STableGroupRow.vue.d.ts.map +1 -1
- package/dist/components/STable/parts/STableRow.vue.d.ts +2 -0
- package/dist/components/STable/parts/STableRow.vue.d.ts.map +1 -1
- package/dist/components/STable/utils/useTableRowHydration.d.ts +3 -1
- package/dist/components/STable/utils/useTableRowHydration.d.ts.map +1 -1
- package/dist/components/STabs/STabs.vue.d.ts.map +1 -1
- package/dist/components/SToggle/SToggle.vue.d.ts.map +1 -1
- package/dist/composables/useAriaAttrs.d.ts +21 -0
- package/dist/composables/useAriaAttrs.d.ts.map +1 -0
- package/dist/composables/useChartInteractivity.d.ts +2 -1
- package/dist/composables/useChartInteractivity.d.ts.map +1 -1
- package/dist/{createChartCrosshairPlugin-B4e8d8OF.cjs → createChartCrosshairPlugin-BTPv09h4.cjs} +1 -1
- package/dist/{createChartCrosshairPlugin-C2NUAO5s.js → createChartCrosshairPlugin-EqMlaexu.js} +2 -2
- package/dist/createChartMarkersPlugin-BKxLg4pL.cjs +1 -0
- package/dist/{createChartMarkersPlugin-DkXituwE.js → createChartMarkersPlugin-DPvfZp_e.js} +11 -11
- package/dist/entries/button-group.cjs +1 -1
- package/dist/entries/button-group.js +1 -1
- package/dist/entries/button.cjs +1 -1
- package/dist/entries/button.js +1 -1
- package/dist/entries/card.cjs +1 -1
- package/dist/entries/card.js +1 -1
- package/dist/entries/chart-bar.cjs +1 -1
- package/dist/entries/chart-bar.js +1 -1
- package/dist/entries/chart-burnup.cjs +1 -1
- package/dist/entries/chart-burnup.js +1 -1
- package/dist/entries/chart-horizontal-bar.cjs +1 -1
- package/dist/entries/chart-horizontal-bar.js +1 -1
- package/dist/entries/chart-line.cjs +1 -1
- package/dist/entries/chart-line.js +1 -1
- package/dist/entries/chart-multi-line.cjs +1 -1
- package/dist/entries/chart-multi-line.js +1 -1
- package/dist/entries/chart-pie.cjs +1 -1
- package/dist/entries/chart-pie.d.ts +2 -2
- package/dist/entries/chart-pie.d.ts.map +1 -1
- package/dist/entries/chart-pie.js +2 -2
- package/dist/entries/chart-progress.cjs +1 -1
- package/dist/entries/chart-progress.js +1 -1
- package/dist/entries/chart-stacked-area.cjs +1 -1
- package/dist/entries/chart-stacked-area.js +1 -1
- package/dist/entries/chart-stacked-bar.cjs +1 -1
- package/dist/entries/chart-stacked-bar.js +1 -1
- package/dist/entries/checkbox.cjs +1 -1
- package/dist/entries/checkbox.js +1 -1
- package/dist/entries/chip.cjs +1 -1
- package/dist/entries/chip.js +1 -1
- package/dist/entries/color-picker.cjs +1 -1
- package/dist/entries/color-picker.js +1 -1
- package/dist/entries/input.cjs +1 -1
- package/dist/entries/input.js +1 -1
- package/dist/entries/list-item.cjs +1 -1
- package/dist/entries/list-item.d.ts +2 -2
- package/dist/entries/list-item.d.ts.map +1 -1
- package/dist/entries/list-item.js +2 -2
- package/dist/entries/list.cjs +1 -1
- package/dist/entries/list.js +1 -1
- package/dist/entries/photo-edit.cjs +1 -1
- package/dist/entries/photo-edit.js +1 -1
- package/dist/entries/radio.cjs +1 -1
- package/dist/entries/radio.js +1 -1
- package/dist/entries/select.cjs +1 -1
- package/dist/entries/select.js +1 -1
- package/dist/entries/tab.cjs +1 -1
- package/dist/entries/tab.js +1 -1
- package/dist/entries/table.cjs +1 -1
- package/dist/entries/table.js +1 -1
- package/dist/entries/tabs.cjs +1 -1
- package/dist/entries/tabs.js +2 -2
- package/dist/entries/tag-group.cjs +1 -1
- package/dist/entries/tag-group.js +2 -2
- package/dist/entries/tag.cjs +1 -1
- package/dist/entries/tag.js +1 -1
- package/dist/entries/toggle.cjs +1 -1
- package/dist/entries/toggle.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +9 -7
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +568 -302
- package/dist/resolveBarStackedSeriesColor-CjwUxrUx.js +11 -0
- package/dist/resolveBarStackedSeriesColor-Czkj5bJY.cjs +1 -0
- package/dist/resolveCssColorValue-BFMo08-w.cjs +1 -0
- package/dist/resolveCssColorValue-DH_SEZj4.js +8 -0
- package/dist/resolveSeriesPaletteColor-BepW1gdW.cjs +1 -0
- package/dist/{resolveSeriesPaletteColor-B7wHDj1L.js → resolveSeriesPaletteColor-DoPeNP_F.js} +3 -2
- package/dist/{resolveStackedChartContext-DxJNWqwE.js → resolveStackedChartContext-BbCzct6O.js} +5 -5
- package/dist/{resolveStackedChartContext-Br3N7ISo.cjs → resolveStackedChartContext-D4tuSA6Z.cjs} +1 -1
- package/dist/splitChartAxisLabel-D-IFyucJ.js +4 -0
- package/dist/splitChartAxisLabel-DAmQOJn6.cjs +2 -0
- package/dist/uikit-components.css +1 -1
- package/dist/useAriaAttrs-CxGRTeye.js +15 -0
- package/dist/useAriaAttrs-D748yeJ_.cjs +1 -0
- package/dist/useChartInteractivity-CaZ37kX-.cjs +1 -0
- package/dist/{useChartInteractivity-Cl06JL4l.js → useChartInteractivity-DygkiRA1.js} +178 -144
- package/dist/utils/chart/burnup/createBurnupTooltipCallbacks.d.ts +3 -1
- package/dist/utils/chart/burnup/createBurnupTooltipCallbacks.d.ts.map +1 -1
- package/dist/utils/chart/chart.types.d.ts +10 -0
- package/dist/utils/chart/chart.types.d.ts.map +1 -1
- package/dist/utils/chart/core/applyChartHighlightedYTick.d.ts +19 -0
- package/dist/utils/chart/core/applyChartHighlightedYTick.d.ts.map +1 -0
- package/dist/utils/chart/core/chartCssVariables.d.ts +3 -0
- package/dist/utils/chart/core/chartCssVariables.d.ts.map +1 -1
- package/dist/utils/chart/core/chartInteractivity.d.ts +9 -2
- package/dist/utils/chart/core/chartInteractivity.d.ts.map +1 -1
- package/dist/utils/chart/core/createChartMarkersPlugin.d.ts.map +1 -1
- package/dist/utils/chart/core/resolveSeriesPaletteColor.d.ts.map +1 -1
- package/dist/utils/chart/core/splitChartAxisLabel.d.ts +2 -0
- package/dist/utils/chart/core/splitChartAxisLabel.d.ts.map +1 -0
- package/dist/utils/chart/css/resolveCssColorValue.d.ts +2 -0
- package/dist/utils/chart/css/resolveCssColorValue.d.ts.map +1 -0
- package/dist/utils/chart/horizontalBar/resolveHorizontalBarColor.d.ts.map +1 -1
- package/dist/utils/chart/index.d.ts +4 -1
- package/dist/utils/chart/index.d.ts.map +1 -1
- package/dist/utils/chart/multiLine/buildMultiLineChartScales.d.ts +119 -14
- package/dist/utils/chart/multiLine/buildMultiLineChartScales.d.ts.map +1 -1
- package/dist/utils/chart/multiLine/createMultiLineTooltipCallbacks.d.ts +7 -2
- package/dist/utils/chart/multiLine/createMultiLineTooltipCallbacks.d.ts.map +1 -1
- package/package.json +3 -3
- package/dist/SChartBar-CUAibXox.js +0 -215
- package/dist/SChartBar-xzw8oxXl.cjs +0 -1
- package/dist/SChartBurnup-C5Z7UDi-.js +0 -250
- package/dist/SChartBurnup-CWSJUoA_.cjs +0 -1
- package/dist/SChartHorizontalBar-0RpJa5EJ.cjs +0 -1
- package/dist/SChartHorizontalBar-B9SWFvdN.js +0 -175
- package/dist/SChartLegend-DGtjd6zV.cjs +0 -1
- package/dist/SChartLegend-oZoF8XK7.js +0 -42
- package/dist/SChartMultiLine-CG6dKmWm.js +0 -244
- package/dist/SChartMultiLine-vz7JdyA3.cjs +0 -1
- package/dist/SChartPie-0ugeo2fO.js +0 -182
- package/dist/SChartPie-QpnxLQYv.cjs +0 -1
- package/dist/SCheckbox-BMkOc5cn.js +0 -102
- package/dist/SCheckbox-DnnC5mOH.cjs +0 -1
- package/dist/SInput-B4So5LGW.cjs +0 -1
- package/dist/SList-BuXrkB03.js +0 -465
- package/dist/SList-CvP0U6U1.cjs +0 -1
- package/dist/SListItem-BOSQGRWA.js +0 -209
- package/dist/SListItem-BeaflFVf.cjs +0 -1
- package/dist/SRadio-D6_Pd6XX.js +0 -57
- package/dist/SRadio-DRo_GU5A.cjs +0 -1
- package/dist/SSelect-mnobObXO.cjs +0 -1
- package/dist/SSelect-rpJCD5PL.js +0 -652
- package/dist/STab-C06drUMG.cjs +0 -1
- package/dist/STab-ltjZBvbK.js +0 -218
- package/dist/STable-Ci_3UqBz.cjs +0 -1
- package/dist/STabs-BARXqgoB.js +0 -149
- package/dist/STabs-n5hMERTK.cjs +0 -1
- package/dist/SToggle-CGd0Mh0R.cjs +0 -1
- package/dist/SToggle-sGw-LSNd.js +0 -59
- package/dist/buildMultiLineChartScales-7mcIfRVG.cjs +0 -1
- package/dist/buildMultiLineChartScales-CFZ8YVeJ.js +0 -19
- package/dist/createChartMarkersPlugin-Cg1yGzxW.cjs +0 -1
- package/dist/resolveBarStackedSeriesColor-DM7Ax0-s.js +0 -11
- package/dist/resolveBarStackedSeriesColor-z3NP5vAS.cjs +0 -1
- package/dist/resolveSeriesPaletteColor-D0XlU5vT.cjs +0 -1
- package/dist/useChartInteractivity-LbJiqlvI.cjs +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("./useChartInteractivity-
|
|
1
|
+
const e=require("./useChartInteractivity-CaZ37kX-.cjs"),t=require("./buildCartesianChartScales-Dck5yBMo.cjs"),n=require("./resolveChartValueRange-DBCYLCXs.cjs"),r=require("./createChartMarkersPlugin-BKxLg4pL.cjs");let i=require("vue");var a=(e,t,n=1)=>{if(typeof window>`u`)return n;let r=t??document.documentElement,i=getComputedStyle(r).getPropertyValue(e).trim(),a=Number.parseFloat(i);return Number.isNaN(a)?n:a},o=5,s=5,c=16,l=`--s-ui-chart-line-danger-fill`,u=e=>typeof e==`number`?`${e}%`:e,d=(e,t,r,i,a)=>{let o=e.map(e=>e.value);return a?{min:t??0,max:r??n.t(o,{yStep:i}).max}:n.t(o,{yMin:t,yMax:r,yStep:i})},f=({points:n,seriesLabel:i,colorHostElement:f,yMax:p,yMin:m,yStep:h=s,area:g=!0,zeroLine:_=!1,dangerBelowZero:v=!1,markers:y=[],skeleton:b=!1})=>{let x=e.b(e.T.axisLabel,f),S=e.b(e.T.grid,f),C=e.b(b?e.T.skeletonSeries:e.T.seriesPrimary,f),w=e.b(b?e.T.skeletonFillStart:e.T.seriesFillStart,f),T=e.b(b?e.T.skeletonFillEnd:e.T.seriesFillEnd,f),E=e.b(l,f),D=e.b(e.T.tooltipBackground,f),O=e.b(e.T.tooltipText,f),k=a(b?e.T.skeletonFillOpacity:e.T.seriesFillOpacity,f,.8),A=d(n,m,p,h,b),j=g||b,M=v&&!b,N=t=>e.l(t,w,T,k),P=M?{target:{value:0},below:E}:j?`origin`:!1;return{type:`line`,data:{labels:n.map(e=>e.label),datasets:[{label:i,data:n.map(e=>e.value),borderColor:C,backgroundColor:j?N:`transparent`,pointBackgroundColor:C,pointHoverBackgroundColor:C,borderWidth:o,fill:P,pointRadius:0,pointHoverRadius:4,tension:.4}]},options:{responsive:!0,maintainAspectRatio:!1,layout:{padding:{top:y.length>0?c:0}},interaction:e.u(b,{mode:`index`,intersect:!1}),plugins:{legend:{display:!1},tooltip:{enabled:e.d(b),backgroundColor:D,titleColor:O,bodyColor:O,displayColors:!1}},scales:t.t({axisLabelColor:x,gridColor:S,yMin:A.min,yMax:A.max,yStep:h,...b?{formatYAxisTick:u}:{}})},plugins:e.f(b,[..._?[r.n(f)]:[],...y.length>0?[r.t({markers:y},f)]:[]])}},p=[{label:`ноябрь 2025`,value:63},{label:`декабрь 2025`,value:77},{label:`январь 2026`,value:75},{label:`февраль 2026`,value:81},{label:`март 2026`,value:91},{label:`апрель 2026`,value:87}],m={class:`s-ui-chart-line__canvas-wrap`},h=(0,i.defineComponent)({__name:`SChartLine`,props:{points:{default:()=>[]},seriesLabel:{default:`Series`},loading:{type:Boolean,default:!1},yMax:{},yMin:{},yStep:{},height:{},area:{type:Boolean,default:!0},zeroLine:{type:Boolean,default:!1},dangerBelowZero:{type:Boolean,default:!1},markers:{default:()=>[]}},setup(t,{expose:n}){let r=(0,i.useTemplateRef)(`chartRootRef`),a=(0,i.useTemplateRef)(`chartCanvasRef`),o=(0,i.computed)(()=>t.loading?p:t.points),s=(0,i.computed)(()=>{if(t.height!==void 0)return{"--s-ui-chart-line-viewport-height":typeof t.height==`number`?`${t.height}px`:t.height}}),{chartInstance:c}=e.n({canvasRef:a,config:(0,i.computed)(()=>!t.loading&&t.points.length===0?null:f({points:o.value,seriesLabel:t.seriesLabel,colorHostElement:r.value,yMax:t.loading?100:t.yMax,yMin:t.loading?50:t.yMin,yStep:t.loading?10:t.yStep,area:t.area,zeroLine:t.zeroLine,dangerBelowZero:t.dangerBelowZero,markers:t.markers,skeleton:t.loading})),enabled:(0,i.computed)(()=>t.loading||t.points.length>0)}),{exportImage:l}=e.t({chartInstance:c,canvasRef:a,colorHostElement:r});return n({exportImage:l}),(n,o)=>((0,i.openBlock)(),(0,i.createElementBlock)(`div`,{ref_key:`chartRootRef`,ref:r,class:(0,i.normalizeClass)([`s-ui-chart-line`,{"s-ui-chart-line--skeleton":t.loading}]),style:(0,i.normalizeStyle)(s.value)},[(0,i.createElementVNode)(`div`,m,[(0,i.createVNode)((0,i.unref)(e.x),{loading:t.loading},{default:(0,i.withCtx)(()=>[(0,i.createElementVNode)(`canvas`,{ref_key:`chartCanvasRef`,ref:a,class:`s-ui-chart-line__canvas`},null,512)]),_:1},8,[`loading`])])],6))}});Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return h}});
|
|
@@ -0,0 +1,279 @@
|
|
|
1
|
+
import { E as e, T as t, _ as n, b as r, c as i, d as a, f as o, g as s, k as c, l, n as u, r as d, s as f, t as p, u as m, x as h } from "./useChartInteractivity-DygkiRA1.js";
|
|
2
|
+
import { t as g } from "./SChartLegend-dDqLhvIj.js";
|
|
3
|
+
import { t as _ } from "./resolveChartValueRange-DZybnmaX.js";
|
|
4
|
+
import { n as v, t as y } from "./createChartMarkersPlugin-DPvfZp_e.js";
|
|
5
|
+
import { t as b } from "./areChartSeriesAligned-DjonrIMm.js";
|
|
6
|
+
import { t as x } from "./createChartCrosshairPlugin-EqMlaexu.js";
|
|
7
|
+
import { t as S } from "./resolveSeriesPaletteColor-DoPeNP_F.js";
|
|
8
|
+
import { t as ee } from "./buildMultiLineChartScales-Di-yTvEB.js";
|
|
9
|
+
import { t as C } from "./splitChartAxisLabel-D-IFyucJ.js";
|
|
10
|
+
import { n as w, t as T } from "./buildChartSeriesPoints-BTyOpkin.js";
|
|
11
|
+
import { t as E } from "./useHasListener-RSjlUyqH.js";
|
|
12
|
+
import { computed as D, createBlock as O, createCommentVNode as k, createElementBlock as A, createElementVNode as j, createVNode as M, defineComponent as N, normalizeClass as P, normalizeStyle as F, openBlock as I, unref as L, useTemplateRef as R, withCtx as z } from "vue";
|
|
13
|
+
//#region src/utils/chart/multiLine/resolveMultiLineSeriesColor.ts
|
|
14
|
+
var B = (n, r, i, a = !1) => S(n, r, i, a, {
|
|
15
|
+
palette: e,
|
|
16
|
+
paletteFallback: t.multiLinePalette1,
|
|
17
|
+
skeletonPalette: c,
|
|
18
|
+
skeletonFallback: t.skeletonPalette1
|
|
19
|
+
}), V = 3, te = .4, H = 4, U = 1.5, W = 5, G = [8, 8], K = 16, q = "--s-ui-chart-multi-line-danger-fill", J = (e, t, n, r, i) => {
|
|
20
|
+
let a = e.flatMap((e) => e.points.map((e) => e.value));
|
|
21
|
+
return i ? {
|
|
22
|
+
min: t ?? 0,
|
|
23
|
+
max: n ?? _(a, { yStep: r }).max
|
|
24
|
+
} : _(a, {
|
|
25
|
+
yMin: t,
|
|
26
|
+
yMax: n,
|
|
27
|
+
yStep: r
|
|
28
|
+
});
|
|
29
|
+
}, Y = (e, t, n) => t ? {
|
|
30
|
+
target: { value: 0 },
|
|
31
|
+
...e ? {} : { above: f },
|
|
32
|
+
below: n
|
|
33
|
+
} : e ? "origin" : !1, X = ({ seriesList: e, colorHostElement: c, yMax: u, yMin: p, yStep: h = W, mirrorYAxis: g = !0, straightSegments: _ = !1, zeroLine: S = !1, dangerBelowZero: w = !1, markers: T = [], skeleton: E = !1, thinLines: D = !1, verticalGrid: O = !1, xAxisOffset: k = !1, highlightedYTick: A, formatYTick: j, formatValue: M, onSeriesClick: N, onPointClick: P }) => {
|
|
34
|
+
if (!b(e)) return null;
|
|
35
|
+
let F = r(t.axisLabel, c), I = r(t.grid, c), L = r(q, c), R = r(t.tooltipBackground, c), z = r(t.tooltipText, c), X = J(e, p, u, h, E), Z = (e[0]?.points.map((e) => e.label) ?? []).map(C), Q = D ? U : H, $ = d({
|
|
36
|
+
kind: "series",
|
|
37
|
+
skeleton: E,
|
|
38
|
+
colorHostElement: c,
|
|
39
|
+
onIndexClick: N,
|
|
40
|
+
onElementIndexClick: P
|
|
41
|
+
});
|
|
42
|
+
return {
|
|
43
|
+
type: "line",
|
|
44
|
+
data: {
|
|
45
|
+
labels: Z,
|
|
46
|
+
datasets: e.map((e, t) => {
|
|
47
|
+
let n = B(t, c, e.fillColor, E), r = !!e.area && !E, a = w && t === 0 && !E, o = r ? (e) => l(e, n, f, i) : n;
|
|
48
|
+
return {
|
|
49
|
+
label: e.label,
|
|
50
|
+
data: e.points.map((e) => e.value),
|
|
51
|
+
borderColor: n,
|
|
52
|
+
backgroundColor: o,
|
|
53
|
+
pointBackgroundColor: n,
|
|
54
|
+
pointHoverBackgroundColor: n,
|
|
55
|
+
...E ? {} : {
|
|
56
|
+
hoverBorderColor: n,
|
|
57
|
+
hoverBackgroundColor: o
|
|
58
|
+
},
|
|
59
|
+
borderWidth: Q,
|
|
60
|
+
...e.dashed && !E ? { borderDash: G } : {},
|
|
61
|
+
fill: Y(r, a, L),
|
|
62
|
+
pointRadius: _ && !E ? V : 0,
|
|
63
|
+
pointHoverRadius: 4,
|
|
64
|
+
tension: _ ? 0 : te
|
|
65
|
+
};
|
|
66
|
+
})
|
|
67
|
+
},
|
|
68
|
+
options: {
|
|
69
|
+
responsive: !0,
|
|
70
|
+
maintainAspectRatio: !1,
|
|
71
|
+
layout: { padding: { top: T.length > 0 ? K : 0 } },
|
|
72
|
+
onHover: $.onHover,
|
|
73
|
+
onClick: $.onClick,
|
|
74
|
+
interaction: m(E, {
|
|
75
|
+
mode: "index",
|
|
76
|
+
intersect: !1
|
|
77
|
+
}),
|
|
78
|
+
hover: E ? void 0 : {
|
|
79
|
+
mode: "nearest",
|
|
80
|
+
intersect: !1
|
|
81
|
+
},
|
|
82
|
+
plugins: {
|
|
83
|
+
legend: { display: !1 },
|
|
84
|
+
tooltip: {
|
|
85
|
+
enabled: a(E),
|
|
86
|
+
backgroundColor: R,
|
|
87
|
+
titleColor: z,
|
|
88
|
+
bodyColor: z,
|
|
89
|
+
footerColor: z,
|
|
90
|
+
displayColors: !1,
|
|
91
|
+
position: s,
|
|
92
|
+
yAlign: "bottom",
|
|
93
|
+
xAlign: "center",
|
|
94
|
+
caretPadding: 8,
|
|
95
|
+
callbacks: n({
|
|
96
|
+
resolveTitle: (e) => Z[e],
|
|
97
|
+
formatValue: M
|
|
98
|
+
})
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
scales: ee({
|
|
102
|
+
axisLabelColor: F,
|
|
103
|
+
gridColor: I,
|
|
104
|
+
yMin: X.min,
|
|
105
|
+
yMax: X.max,
|
|
106
|
+
yStep: h,
|
|
107
|
+
mirrorYAxis: g,
|
|
108
|
+
verticalGrid: O,
|
|
109
|
+
xAxisOffset: k,
|
|
110
|
+
highlightedYTick: E ? void 0 : A,
|
|
111
|
+
colorHostElement: c,
|
|
112
|
+
...j ? { formatYAxisTick: (e) => typeof e == "number" ? j(e) : e } : {}
|
|
113
|
+
})
|
|
114
|
+
},
|
|
115
|
+
plugins: o(E, [
|
|
116
|
+
...S ? [v(c)] : [],
|
|
117
|
+
x(c),
|
|
118
|
+
...T.length > 0 ? [y({ markers: T }, c)] : [],
|
|
119
|
+
...$.plugins
|
|
120
|
+
])
|
|
121
|
+
};
|
|
122
|
+
}, Z = [
|
|
123
|
+
"26.01",
|
|
124
|
+
"2.02",
|
|
125
|
+
"9.02",
|
|
126
|
+
"16.02",
|
|
127
|
+
"23.02",
|
|
128
|
+
"2.03",
|
|
129
|
+
"9.03",
|
|
130
|
+
"16.03",
|
|
131
|
+
"23.03",
|
|
132
|
+
"30.03",
|
|
133
|
+
"6.04"
|
|
134
|
+
], Q = [{
|
|
135
|
+
label: "Series 1",
|
|
136
|
+
points: T(Z, [
|
|
137
|
+
30,
|
|
138
|
+
34,
|
|
139
|
+
38,
|
|
140
|
+
44,
|
|
141
|
+
46,
|
|
142
|
+
50,
|
|
143
|
+
54,
|
|
144
|
+
56,
|
|
145
|
+
58,
|
|
146
|
+
60,
|
|
147
|
+
62
|
|
148
|
+
])
|
|
149
|
+
}, {
|
|
150
|
+
label: "Series 2",
|
|
151
|
+
points: T(Z, [
|
|
152
|
+
22,
|
|
153
|
+
24,
|
|
154
|
+
26,
|
|
155
|
+
28,
|
|
156
|
+
30,
|
|
157
|
+
32,
|
|
158
|
+
33,
|
|
159
|
+
35,
|
|
160
|
+
36,
|
|
161
|
+
38,
|
|
162
|
+
40
|
|
163
|
+
])
|
|
164
|
+
}], $ = { class: "s-ui-chart-multi-line__canvas-wrap" }, ne = /* @__PURE__ */ N({
|
|
165
|
+
__name: "SChartMultiLine",
|
|
166
|
+
props: {
|
|
167
|
+
series: { default: () => [] },
|
|
168
|
+
loading: {
|
|
169
|
+
type: Boolean,
|
|
170
|
+
default: !1
|
|
171
|
+
},
|
|
172
|
+
yMax: {},
|
|
173
|
+
yMin: {},
|
|
174
|
+
yStep: {},
|
|
175
|
+
mirrorYAxis: {
|
|
176
|
+
type: Boolean,
|
|
177
|
+
default: !0
|
|
178
|
+
},
|
|
179
|
+
straightSegments: {
|
|
180
|
+
type: Boolean,
|
|
181
|
+
default: !1
|
|
182
|
+
},
|
|
183
|
+
zeroLine: {
|
|
184
|
+
type: Boolean,
|
|
185
|
+
default: !1
|
|
186
|
+
},
|
|
187
|
+
dangerBelowZero: {
|
|
188
|
+
type: Boolean,
|
|
189
|
+
default: !1
|
|
190
|
+
},
|
|
191
|
+
markers: { default: () => [] },
|
|
192
|
+
showLegend: {
|
|
193
|
+
type: Boolean,
|
|
194
|
+
default: !0
|
|
195
|
+
},
|
|
196
|
+
height: {},
|
|
197
|
+
thinLines: {
|
|
198
|
+
type: Boolean,
|
|
199
|
+
default: !1
|
|
200
|
+
},
|
|
201
|
+
verticalGrid: {
|
|
202
|
+
type: Boolean,
|
|
203
|
+
default: !1
|
|
204
|
+
},
|
|
205
|
+
xAxisOffset: {
|
|
206
|
+
type: Boolean,
|
|
207
|
+
default: !1
|
|
208
|
+
},
|
|
209
|
+
highlightedYTick: {},
|
|
210
|
+
formatYTick: { type: Function },
|
|
211
|
+
formatValue: { type: Function }
|
|
212
|
+
},
|
|
213
|
+
emits: ["seriesClick", "pointClick"],
|
|
214
|
+
setup(e, { expose: t, emit: n }) {
|
|
215
|
+
let r = n, i = R("chartRootRef"), a = R("chartCanvasRef"), o = D(() => e.loading ? Q : e.series), s = (t) => {
|
|
216
|
+
let n = e.series[t];
|
|
217
|
+
n && r("seriesClick", t, n);
|
|
218
|
+
}, c = E("onSeriesClick"), l = (t, n) => {
|
|
219
|
+
let i = e.series[n], a = i?.points[t];
|
|
220
|
+
i && a && r("pointClick", t, n, a, i);
|
|
221
|
+
}, d = E("onPointClick"), f = D(() => {
|
|
222
|
+
if (e.height !== void 0) return { "--s-ui-chart-multi-line-viewport-height": typeof e.height == "number" ? `${e.height}px` : e.height };
|
|
223
|
+
}), m = D(() => !e.loading && e.series.length === 0 ? null : X({
|
|
224
|
+
seriesList: o.value,
|
|
225
|
+
colorHostElement: i.value,
|
|
226
|
+
yMax: e.yMax,
|
|
227
|
+
yMin: e.yMin,
|
|
228
|
+
yStep: e.yStep,
|
|
229
|
+
mirrorYAxis: e.mirrorYAxis,
|
|
230
|
+
straightSegments: e.straightSegments,
|
|
231
|
+
zeroLine: e.zeroLine,
|
|
232
|
+
dangerBelowZero: e.dangerBelowZero,
|
|
233
|
+
markers: e.markers,
|
|
234
|
+
skeleton: e.loading,
|
|
235
|
+
thinLines: e.thinLines,
|
|
236
|
+
verticalGrid: e.verticalGrid,
|
|
237
|
+
xAxisOffset: e.xAxisOffset,
|
|
238
|
+
highlightedYTick: e.highlightedYTick,
|
|
239
|
+
formatYTick: e.formatYTick,
|
|
240
|
+
formatValue: e.formatValue,
|
|
241
|
+
onSeriesClick: c() ? s : void 0,
|
|
242
|
+
onPointClick: d() ? l : void 0
|
|
243
|
+
})), _ = D(() => w(o.value, (t, n) => B(t, i.value, n, e.loading))), { chartInstance: v } = u({
|
|
244
|
+
canvasRef: a,
|
|
245
|
+
config: m,
|
|
246
|
+
enabled: D(() => e.loading || e.series.length > 0)
|
|
247
|
+
}), { exportImage: y, handleLegendItemHover: b } = p({
|
|
248
|
+
chartInstance: v,
|
|
249
|
+
canvasRef: a,
|
|
250
|
+
colorHostElement: i
|
|
251
|
+
});
|
|
252
|
+
return t({ exportImage: y }), (t, n) => (I(), A("div", {
|
|
253
|
+
ref_key: "chartRootRef",
|
|
254
|
+
ref: i,
|
|
255
|
+
class: P(["s-ui-chart-multi-line", { "s-ui-chart-multi-line--skeleton": e.loading }]),
|
|
256
|
+
style: F(f.value)
|
|
257
|
+
}, [j("div", $, [M(L(h), { loading: e.loading }, {
|
|
258
|
+
default: z(() => [j("canvas", {
|
|
259
|
+
ref_key: "chartCanvasRef",
|
|
260
|
+
ref: a,
|
|
261
|
+
class: "s-ui-chart-multi-line__canvas"
|
|
262
|
+
}, null, 512)]),
|
|
263
|
+
_: 1
|
|
264
|
+
}, 8, ["loading"])]), e.showLegend && _.value.length ? (I(), O(L(g), {
|
|
265
|
+
key: 0,
|
|
266
|
+
items: _.value,
|
|
267
|
+
disabled: e.loading,
|
|
268
|
+
interactive: !e.loading,
|
|
269
|
+
onItemHover: L(b)
|
|
270
|
+
}, null, 8, [
|
|
271
|
+
"items",
|
|
272
|
+
"disabled",
|
|
273
|
+
"interactive",
|
|
274
|
+
"onItemHover"
|
|
275
|
+
])) : k("", !0)], 6));
|
|
276
|
+
}
|
|
277
|
+
});
|
|
278
|
+
//#endregion
|
|
279
|
+
export { ne as t };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("./useChartInteractivity-CaZ37kX-.cjs"),t=require("./SChartLegend-D1gPKGm0.cjs"),n=require("./resolveChartValueRange-DBCYLCXs.cjs"),r=require("./createChartMarkersPlugin-BKxLg4pL.cjs"),i=require("./areChartSeriesAligned-DiBX3TTk.cjs"),a=require("./createChartCrosshairPlugin-BTPv09h4.cjs"),o=require("./resolveSeriesPaletteColor-BepW1gdW.cjs"),s=require("./buildMultiLineChartScales-lVP6h9H4.cjs"),c=require("./splitChartAxisLabel-DAmQOJn6.cjs"),l=require("./buildChartSeriesPoints-Cqo2ed-n.cjs"),u=require("./useHasListener-BPgtbbo6.cjs");let d=require("vue");var f=(t,n,r,i=!1)=>o.t(t,n,r,i,{palette:e.E,paletteFallback:e.T.multiLinePalette1,skeletonPalette:e.k,skeletonFallback:e.T.skeletonPalette1}),p=3,m=.4,h=4,g=1.5,_=5,v=[8,8],y=16,b=`--s-ui-chart-multi-line-danger-fill`,x=(e,t,r,i,a)=>{let o=e.flatMap(e=>e.points.map(e=>e.value));return a?{min:t??0,max:r??n.t(o,{yStep:i}).max}:n.t(o,{yMin:t,yMax:r,yStep:i})},S=(t,n,r)=>n?{target:{value:0},...t?{}:{above:e.s},below:r}:t?`origin`:!1,C=({seriesList:t,colorHostElement:n,yMax:o,yMin:l,yStep:u=_,mirrorYAxis:d=!0,straightSegments:C=!1,zeroLine:w=!1,dangerBelowZero:T=!1,markers:E=[],skeleton:D=!1,thinLines:O=!1,verticalGrid:k=!1,xAxisOffset:A=!1,highlightedYTick:j,formatYTick:M,formatValue:N,onSeriesClick:P,onPointClick:F})=>{if(!i.t(t))return null;let I=e.b(e.T.axisLabel,n),L=e.b(e.T.grid,n),R=e.b(b,n),z=e.b(e.T.tooltipBackground,n),B=e.b(e.T.tooltipText,n),V=x(t,l,o,u,D),H=(t[0]?.points.map(e=>e.label)??[]).map(c.t),U=O?g:h,W=e.r({kind:`series`,skeleton:D,colorHostElement:n,onIndexClick:P,onElementIndexClick:F});return{type:`line`,data:{labels:H,datasets:t.map((t,r)=>{let i=f(r,n,t.fillColor,D),a=!!t.area&&!D,o=T&&r===0&&!D,s=a?t=>e.l(t,i,e.s,e.c):i;return{label:t.label,data:t.points.map(e=>e.value),borderColor:i,backgroundColor:s,pointBackgroundColor:i,pointHoverBackgroundColor:i,...D?{}:{hoverBorderColor:i,hoverBackgroundColor:s},borderWidth:U,...t.dashed&&!D?{borderDash:v}:{},fill:S(a,o,R),pointRadius:C&&!D?p:0,pointHoverRadius:4,tension:C?0:m}})},options:{responsive:!0,maintainAspectRatio:!1,layout:{padding:{top:E.length>0?y:0}},onHover:W.onHover,onClick:W.onClick,interaction:e.u(D,{mode:`index`,intersect:!1}),hover:D?void 0:{mode:`nearest`,intersect:!1},plugins:{legend:{display:!1},tooltip:{enabled:e.d(D),backgroundColor:z,titleColor:B,bodyColor:B,footerColor:B,displayColors:!1,position:e.g,yAlign:`bottom`,xAlign:`center`,caretPadding:8,callbacks:e._({resolveTitle:e=>H[e],formatValue:N})}},scales:s.t({axisLabelColor:I,gridColor:L,yMin:V.min,yMax:V.max,yStep:u,mirrorYAxis:d,verticalGrid:k,xAxisOffset:A,highlightedYTick:D?void 0:j,colorHostElement:n,...M?{formatYAxisTick:e=>typeof e==`number`?M(e):e}:{}})},plugins:e.f(D,[...w?[r.n(n)]:[],a.t(n),...E.length>0?[r.t({markers:E},n)]:[],...W.plugins])}},w=[`26.01`,`2.02`,`9.02`,`16.02`,`23.02`,`2.03`,`9.03`,`16.03`,`23.03`,`30.03`,`6.04`],T=[{label:`Series 1`,points:l.t(w,[30,34,38,44,46,50,54,56,58,60,62])},{label:`Series 2`,points:l.t(w,[22,24,26,28,30,32,33,35,36,38,40])}],E={class:`s-ui-chart-multi-line__canvas-wrap`},D=(0,d.defineComponent)({__name:`SChartMultiLine`,props:{series:{default:()=>[]},loading:{type:Boolean,default:!1},yMax:{},yMin:{},yStep:{},mirrorYAxis:{type:Boolean,default:!0},straightSegments:{type:Boolean,default:!1},zeroLine:{type:Boolean,default:!1},dangerBelowZero:{type:Boolean,default:!1},markers:{default:()=>[]},showLegend:{type:Boolean,default:!0},height:{},thinLines:{type:Boolean,default:!1},verticalGrid:{type:Boolean,default:!1},xAxisOffset:{type:Boolean,default:!1},highlightedYTick:{},formatYTick:{type:Function},formatValue:{type:Function}},emits:[`seriesClick`,`pointClick`],setup(n,{expose:r,emit:i}){let a=i,o=(0,d.useTemplateRef)(`chartRootRef`),s=(0,d.useTemplateRef)(`chartCanvasRef`),c=(0,d.computed)(()=>n.loading?T:n.series),p=e=>{let t=n.series[e];t&&a(`seriesClick`,e,t)},m=u.t(`onSeriesClick`),h=(e,t)=>{let r=n.series[t],i=r?.points[e];r&&i&&a(`pointClick`,e,t,i,r)},g=u.t(`onPointClick`),_=(0,d.computed)(()=>{if(n.height!==void 0)return{"--s-ui-chart-multi-line-viewport-height":typeof n.height==`number`?`${n.height}px`:n.height}}),v=(0,d.computed)(()=>!n.loading&&n.series.length===0?null:C({seriesList:c.value,colorHostElement:o.value,yMax:n.yMax,yMin:n.yMin,yStep:n.yStep,mirrorYAxis:n.mirrorYAxis,straightSegments:n.straightSegments,zeroLine:n.zeroLine,dangerBelowZero:n.dangerBelowZero,markers:n.markers,skeleton:n.loading,thinLines:n.thinLines,verticalGrid:n.verticalGrid,xAxisOffset:n.xAxisOffset,highlightedYTick:n.highlightedYTick,formatYTick:n.formatYTick,formatValue:n.formatValue,onSeriesClick:m()?p:void 0,onPointClick:g()?h:void 0})),y=(0,d.computed)(()=>l.n(c.value,(e,t)=>f(e,o.value,t,n.loading))),{chartInstance:b}=e.n({canvasRef:s,config:v,enabled:(0,d.computed)(()=>n.loading||n.series.length>0)}),{exportImage:x,handleLegendItemHover:S}=e.t({chartInstance:b,canvasRef:s,colorHostElement:o});return r({exportImage:x}),(r,i)=>((0,d.openBlock)(),(0,d.createElementBlock)(`div`,{ref_key:`chartRootRef`,ref:o,class:(0,d.normalizeClass)([`s-ui-chart-multi-line`,{"s-ui-chart-multi-line--skeleton":n.loading}]),style:(0,d.normalizeStyle)(_.value)},[(0,d.createElementVNode)(`div`,E,[(0,d.createVNode)((0,d.unref)(e.x),{loading:n.loading},{default:(0,d.withCtx)(()=>[(0,d.createElementVNode)(`canvas`,{ref_key:`chartCanvasRef`,ref:s,class:`s-ui-chart-multi-line__canvas`},null,512)]),_:1},8,[`loading`])]),n.showLegend&&y.value.length?((0,d.openBlock)(),(0,d.createBlock)((0,d.unref)(t.t),{key:0,items:y.value,disabled:n.loading,interactive:!n.loading,onItemHover:(0,d.unref)(S)},null,8,[`items`,`disabled`,`interactive`,`onItemHover`])):(0,d.createCommentVNode)(``,!0)],6))}});Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return D}});
|
|
@@ -0,0 +1,267 @@
|
|
|
1
|
+
import { D as e, O as t, S as n, T as r, b as i, d as a, f as o, n as s, r as c, t as l, u, x as d } from "./useChartInteractivity-DygkiRA1.js";
|
|
2
|
+
import { t as f } from "./SChartLegend-dDqLhvIj.js";
|
|
3
|
+
import { t as p } from "./resolveSeriesPaletteColor-DoPeNP_F.js";
|
|
4
|
+
import { t as m } from "./useHasListener-RSjlUyqH.js";
|
|
5
|
+
import { Fragment as h, computed as g, createBlock as _, createCommentVNode as v, createElementBlock as y, createElementVNode as b, createTextVNode as x, createVNode as S, defineComponent as C, guardReactiveProps as ee, mergeProps as w, normalizeClass as T, normalizeProps as te, normalizeStyle as E, openBlock as D, ref as O, renderList as k, renderSlot as A, toDisplayString as j, unref as M, useSlots as ne, useTemplateRef as N, withCtx as P, withKeys as F } from "vue";
|
|
6
|
+
//#region src/utils/chart/pie/resolvePieSliceColor.ts
|
|
7
|
+
var I = (n, i, a, o = !1) => p(n, i, a, o, {
|
|
8
|
+
palette: t,
|
|
9
|
+
paletteFallback: r.piePalette1,
|
|
10
|
+
skeletonPalette: e,
|
|
11
|
+
skeletonFallback: r.pieSkeletonPalette1
|
|
12
|
+
}), L = (e) => ({
|
|
13
|
+
title: () => "",
|
|
14
|
+
label: (t) => {
|
|
15
|
+
let n = t.label ?? "", r = t.parsed ?? 0;
|
|
16
|
+
return `${n} – ${e ? e(r) : `${r}`}`;
|
|
17
|
+
}
|
|
18
|
+
}), R = 4, z = 4, B = 1, V = "400 12px var(--s-ui-font-family-label)", H = (e, t, n, r, i, a) => {
|
|
19
|
+
let o = Math.min(a, r / 2, i / 2);
|
|
20
|
+
e.beginPath(), e.moveTo(t + o, n), e.lineTo(t + r - o, n), e.arcTo(t + r, n, t + r, n + o, o), e.lineTo(t + r, n + i - o), e.arcTo(t + r, n + i, t + r - o, n + i, o), e.lineTo(t + o, n + i), e.arcTo(t, n + i, t, n + i - o, o), e.lineTo(t, n + o), e.arcTo(t, n, t + o, n, o), e.closePath();
|
|
21
|
+
}, U = (e) => !("getCenterPoint" in e) || typeof e.getCenterPoint != "function" ? null : e.getCenterPoint(!1), W = (e, t) => ({
|
|
22
|
+
id: "pieSegmentBadge",
|
|
23
|
+
afterDatasetsDraw(n) {
|
|
24
|
+
let a = n.getDatasetMeta(0);
|
|
25
|
+
if (!a) return;
|
|
26
|
+
let o = i(r.pieBadgeBackground, e), s = i(r.pieBadgeBorder, e), c = i(r.pieBadgeText, e), { ctx: l } = n;
|
|
27
|
+
l.save(), l.font = V, l.textAlign = "center", l.textBaseline = "middle";
|
|
28
|
+
for (let e = 0; e < a.data.length; e += 1) {
|
|
29
|
+
let r = a.data[e], i = n.data.datasets[0]?.data[e], u = r ? U(r) : null;
|
|
30
|
+
if (r && typeof i == "number" && i > 0 && u) {
|
|
31
|
+
let e = t ? t(i) : `${i}`, n = l.measureText(e).width + R * 2;
|
|
32
|
+
H(l, u.x - n / 2, u.y - 20 / 2, n, 20, z), l.fillStyle = o, l.fill(), l.lineWidth = B, l.strokeStyle = s, l.stroke(), l.fillStyle = c, l.fillText(e, u.x, u.y);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
l.restore();
|
|
36
|
+
}
|
|
37
|
+
}), G = /* @__PURE__ */ function(e) {
|
|
38
|
+
return e.COMPACT = "compact", e.LIST = "list", e;
|
|
39
|
+
}({}), K = ({ sliceList: e, colorHostElement: t, skeleton: n = !1, formatValue: s, formatBadge: l, showBadges: d = !0, onSliceClick: f, onSliceHover: p }) => {
|
|
40
|
+
if (e.length === 0) return null;
|
|
41
|
+
let m = i(r.pieSegmentBorder, t), h = i(r.tooltipBackground, t), g = i(r.tooltipText, t), _ = e.map((e, r) => I(r, t, e.fillColor, n)), v = c({
|
|
42
|
+
kind: "element",
|
|
43
|
+
skeleton: n,
|
|
44
|
+
colorHostElement: t,
|
|
45
|
+
onIndexClick: f,
|
|
46
|
+
onHoverIndexChange: p
|
|
47
|
+
});
|
|
48
|
+
return {
|
|
49
|
+
type: "pie",
|
|
50
|
+
data: {
|
|
51
|
+
labels: e.map((e) => e.label),
|
|
52
|
+
datasets: [{
|
|
53
|
+
data: e.map((e) => e.value),
|
|
54
|
+
backgroundColor: _,
|
|
55
|
+
hoverBackgroundColor: _,
|
|
56
|
+
borderColor: m,
|
|
57
|
+
hoverBorderColor: m,
|
|
58
|
+
borderWidth: 4,
|
|
59
|
+
hoverBorderWidth: 4,
|
|
60
|
+
hoverOffset: 26,
|
|
61
|
+
spacing: 0,
|
|
62
|
+
borderRadius: 8
|
|
63
|
+
}]
|
|
64
|
+
},
|
|
65
|
+
options: {
|
|
66
|
+
responsive: !0,
|
|
67
|
+
maintainAspectRatio: !0,
|
|
68
|
+
cutout: "58%",
|
|
69
|
+
rotation: 115,
|
|
70
|
+
layout: { padding: 26 },
|
|
71
|
+
onHover: v.onHover,
|
|
72
|
+
onClick: v.onClick,
|
|
73
|
+
interaction: u(n, {
|
|
74
|
+
mode: "nearest",
|
|
75
|
+
intersect: !0
|
|
76
|
+
}),
|
|
77
|
+
plugins: {
|
|
78
|
+
legend: { display: !1 },
|
|
79
|
+
tooltip: {
|
|
80
|
+
enabled: a(n),
|
|
81
|
+
backgroundColor: h,
|
|
82
|
+
titleColor: g,
|
|
83
|
+
bodyColor: g,
|
|
84
|
+
displayColors: !1,
|
|
85
|
+
callbacks: L(s)
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
plugins: o(n, [...d ? [W(t, l ?? s)] : [], ...v.plugins])
|
|
90
|
+
};
|
|
91
|
+
}, q = [
|
|
92
|
+
"Series 1",
|
|
93
|
+
"Series 2",
|
|
94
|
+
"Series 3",
|
|
95
|
+
"Series 4",
|
|
96
|
+
"Series 5",
|
|
97
|
+
"Series 6",
|
|
98
|
+
"Series 7",
|
|
99
|
+
"Series 8"
|
|
100
|
+
], J = [
|
|
101
|
+
4,
|
|
102
|
+
1,
|
|
103
|
+
1,
|
|
104
|
+
1,
|
|
105
|
+
1,
|
|
106
|
+
1,
|
|
107
|
+
1,
|
|
108
|
+
1
|
|
109
|
+
], Y = q.map((e, t) => ({
|
|
110
|
+
label: e,
|
|
111
|
+
value: J[t] ?? 1
|
|
112
|
+
})), X = {
|
|
113
|
+
key: 0,
|
|
114
|
+
class: "s-ui-chart-pie__center"
|
|
115
|
+
}, re = [
|
|
116
|
+
"role",
|
|
117
|
+
"tabindex",
|
|
118
|
+
"onMouseenter",
|
|
119
|
+
"onClick",
|
|
120
|
+
"onKeydown"
|
|
121
|
+
], ie = {
|
|
122
|
+
class: "s-ui-chart-pie__legend-swatch-slot",
|
|
123
|
+
"aria-hidden": "true"
|
|
124
|
+
}, ae = { class: "s-ui-chart-pie__legend-label" }, oe = { class: "s-ui-chart-pie__legend-value" }, se = {
|
|
125
|
+
key: 0,
|
|
126
|
+
class: "s-ui-chart-pie__legend-toggle-row"
|
|
127
|
+
}, ce = ["aria-expanded"], Z = /* @__PURE__ */ C({
|
|
128
|
+
__name: "SChartPie",
|
|
129
|
+
props: {
|
|
130
|
+
slices: { default: () => [] },
|
|
131
|
+
loading: {
|
|
132
|
+
type: Boolean,
|
|
133
|
+
default: !1
|
|
134
|
+
},
|
|
135
|
+
showLegend: {
|
|
136
|
+
type: Boolean,
|
|
137
|
+
default: !0
|
|
138
|
+
},
|
|
139
|
+
legendView: { default: () => G.COMPACT },
|
|
140
|
+
formatValue: { type: Function },
|
|
141
|
+
showBadges: {
|
|
142
|
+
type: Boolean,
|
|
143
|
+
default: !0
|
|
144
|
+
},
|
|
145
|
+
formatBadge: { type: Function },
|
|
146
|
+
legendLimit: {}
|
|
147
|
+
},
|
|
148
|
+
emits: ["sliceClick"],
|
|
149
|
+
setup(e, { expose: t, emit: i }) {
|
|
150
|
+
let a = i, o = ne(), c = `var(${r.fillMuted})`, u = n, p = N("chartRootRef"), C = N("chartCanvasRef"), L = O(null), R = O(!1), z = g(() => e.legendView === G.LIST && !e.loading), B = g(() => ["s-ui-chart-pie", {
|
|
151
|
+
"s-ui-chart-pie--skeleton": e.loading,
|
|
152
|
+
"s-ui-chart-pie--legend-list": z.value
|
|
153
|
+
}]), V = g(() => e.loading ? Y : e.slices), H = (t) => {
|
|
154
|
+
let n = e.slices[t];
|
|
155
|
+
n && a("sliceClick", t, n);
|
|
156
|
+
}, U = (e) => {
|
|
157
|
+
L.value = e;
|
|
158
|
+
}, W = m("onSliceClick"), q = (e) => {
|
|
159
|
+
W() && H(e);
|
|
160
|
+
}, J = g(() => !e.loading && e.slices.length === 0 ? null : K({
|
|
161
|
+
sliceList: V.value,
|
|
162
|
+
colorHostElement: p.value,
|
|
163
|
+
skeleton: e.loading,
|
|
164
|
+
formatValue: e.formatValue,
|
|
165
|
+
formatBadge: e.formatBadge,
|
|
166
|
+
showBadges: e.showBadges,
|
|
167
|
+
onSliceClick: W() ? H : void 0,
|
|
168
|
+
onSliceHover: z.value ? U : void 0
|
|
169
|
+
})), Z = g(() => V.value.map((t, n) => ({
|
|
170
|
+
label: t.label,
|
|
171
|
+
color: I(n, p.value, t.fillColor, e.loading)
|
|
172
|
+
}))), Q = g(() => e.legendLimit === void 0 ? 0 : Math.max(e.slices.length - e.legendLimit, 0)), le = g(() => R.value || e.legendLimit === void 0 ? e.slices : e.slices.slice(0, e.legendLimit)), ue = g(() => ({
|
|
173
|
+
expanded: R.value,
|
|
174
|
+
hiddenCount: Q.value
|
|
175
|
+
})), de = g(() => R.value ? "−" : `+${Q.value}`), fe = () => {
|
|
176
|
+
R.value = !R.value;
|
|
177
|
+
}, pe = g(() => le.value.map((t, n) => {
|
|
178
|
+
let r = L.value === n, i = L.value !== null && !r, a = {
|
|
179
|
+
slice: t,
|
|
180
|
+
index: n,
|
|
181
|
+
active: r,
|
|
182
|
+
muted: i
|
|
183
|
+
};
|
|
184
|
+
return {
|
|
185
|
+
key: `${n}-${t.label}`,
|
|
186
|
+
index: n,
|
|
187
|
+
label: t.label,
|
|
188
|
+
valueText: e.formatValue ? e.formatValue(t.value) : String(t.value),
|
|
189
|
+
slotProps: a,
|
|
190
|
+
role: W() ? "button" : void 0,
|
|
191
|
+
tabindex: W() ? 0 : void 0,
|
|
192
|
+
classes: ["s-ui-chart-pie__legend-row", {
|
|
193
|
+
"s-ui-chart-pie__legend-row--active": r,
|
|
194
|
+
"s-ui-chart-pie__legend-row--muted": i,
|
|
195
|
+
"s-ui-chart-pie__legend-row--clickable": W()
|
|
196
|
+
}],
|
|
197
|
+
swatchStyle: { backgroundColor: i ? c : Z.value[n]?.color }
|
|
198
|
+
};
|
|
199
|
+
})), { chartInstance: me } = s({
|
|
200
|
+
canvasRef: C,
|
|
201
|
+
config: J,
|
|
202
|
+
enabled: g(() => e.loading || e.slices.length > 0)
|
|
203
|
+
}), { exportImage: he, handleLegendItemHover: ge } = l({
|
|
204
|
+
chartInstance: me,
|
|
205
|
+
canvasRef: C,
|
|
206
|
+
colorHostElement: p,
|
|
207
|
+
legendDimKind: "element"
|
|
208
|
+
}), $ = (e) => {
|
|
209
|
+
z.value && (L.value = e), ge(e);
|
|
210
|
+
};
|
|
211
|
+
return t({ exportImage: he }), (t, n) => (D(), y("div", {
|
|
212
|
+
ref_key: "chartRootRef",
|
|
213
|
+
ref: p,
|
|
214
|
+
class: T(B.value)
|
|
215
|
+
}, [b("div", {
|
|
216
|
+
class: "s-ui-chart-pie__canvas-wrap",
|
|
217
|
+
onMouseleave: n[0] ||= (e) => U(null)
|
|
218
|
+
}, [S(M(d), {
|
|
219
|
+
loading: e.loading,
|
|
220
|
+
type: M(u).PIE
|
|
221
|
+
}, {
|
|
222
|
+
default: P(() => [b("canvas", {
|
|
223
|
+
ref_key: "chartCanvasRef",
|
|
224
|
+
ref: C,
|
|
225
|
+
class: "s-ui-chart-pie__canvas"
|
|
226
|
+
}, null, 512)]),
|
|
227
|
+
_: 1
|
|
228
|
+
}, 8, ["loading", "type"]), M(o).center && !e.loading ? (D(), y("div", X, [A(t.$slots, "center")])) : v("", !0)], 32), e.showLegend && Z.value.length ? (D(), y(h, { key: 0 }, [z.value ? (D(), y("ul", {
|
|
229
|
+
key: 0,
|
|
230
|
+
class: "s-ui-chart-pie__legend-list",
|
|
231
|
+
onMouseleave: n[1] ||= (e) => $(null)
|
|
232
|
+
}, [(D(!0), y(h, null, k(pe.value, (e) => (D(), y("li", {
|
|
233
|
+
key: e.key,
|
|
234
|
+
class: T(e.classes),
|
|
235
|
+
role: e.role,
|
|
236
|
+
tabindex: e.tabindex,
|
|
237
|
+
onMouseenter: (t) => $(e.index),
|
|
238
|
+
onClick: (t) => q(e.index),
|
|
239
|
+
onKeydown: F((t) => q(e.index), ["enter"])
|
|
240
|
+
}, [
|
|
241
|
+
b("span", ie, [b("span", {
|
|
242
|
+
class: "s-ui-chart-pie__legend-swatch",
|
|
243
|
+
style: E(e.swatchStyle)
|
|
244
|
+
}, null, 4)]),
|
|
245
|
+
b("span", ae, [A(t.$slots, "legend-label", w({ ref_for: !0 }, e.slotProps), () => [x(j(e.label), 1)])]),
|
|
246
|
+
b("span", oe, j(e.valueText), 1)
|
|
247
|
+
], 42, re))), 128)), Q.value > 0 ? (D(), y("li", se, [b("button", {
|
|
248
|
+
type: "button",
|
|
249
|
+
class: "s-ui-chart-pie__legend-toggle",
|
|
250
|
+
"aria-expanded": R.value,
|
|
251
|
+
onClick: fe
|
|
252
|
+
}, [A(t.$slots, "legend-toggle", te(ee(ue.value)), () => [x(j(de.value), 1)])], 8, ce)])) : v("", !0)], 32)) : (D(), _(M(f), {
|
|
253
|
+
key: 1,
|
|
254
|
+
items: Z.value,
|
|
255
|
+
disabled: e.loading,
|
|
256
|
+
interactive: !e.loading,
|
|
257
|
+
direction: "column",
|
|
258
|
+
onItemHover: $
|
|
259
|
+
}, null, 8, [
|
|
260
|
+
"items",
|
|
261
|
+
"disabled",
|
|
262
|
+
"interactive"
|
|
263
|
+
]))], 64)) : v("", !0)], 2));
|
|
264
|
+
}
|
|
265
|
+
});
|
|
266
|
+
//#endregion
|
|
267
|
+
export { G as n, Z as t };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("./useChartInteractivity-CaZ37kX-.cjs"),t=require("./SChartLegend-D1gPKGm0.cjs"),n=require("./resolveSeriesPaletteColor-BepW1gdW.cjs"),r=require("./useHasListener-BPgtbbo6.cjs");let i=require("vue");var a=(t,r,i,a=!1)=>n.t(t,r,i,a,{palette:e.O,paletteFallback:e.T.piePalette1,skeletonPalette:e.D,skeletonFallback:e.T.pieSkeletonPalette1}),o=e=>({title:()=>``,label:t=>{let n=t.label??``,r=t.parsed??0;return`${n} – ${e?e(r):`${r}`}`}}),s=4,c=4,l=1,u=`400 12px var(--s-ui-font-family-label)`,d=(e,t,n,r,i,a)=>{let o=Math.min(a,r/2,i/2);e.beginPath(),e.moveTo(t+o,n),e.lineTo(t+r-o,n),e.arcTo(t+r,n,t+r,n+o,o),e.lineTo(t+r,n+i-o),e.arcTo(t+r,n+i,t+r-o,n+i,o),e.lineTo(t+o,n+i),e.arcTo(t,n+i,t,n+i-o,o),e.lineTo(t,n+o),e.arcTo(t,n,t+o,n,o),e.closePath()},f=e=>!(`getCenterPoint`in e)||typeof e.getCenterPoint!=`function`?null:e.getCenterPoint(!1),p=(t,n)=>({id:`pieSegmentBadge`,afterDatasetsDraw(r){let i=r.getDatasetMeta(0);if(!i)return;let a=e.b(e.T.pieBadgeBackground,t),o=e.b(e.T.pieBadgeBorder,t),p=e.b(e.T.pieBadgeText,t),{ctx:m}=r;m.save(),m.font=u,m.textAlign=`center`,m.textBaseline=`middle`;for(let e=0;e<i.data.length;e+=1){let t=i.data[e],u=r.data.datasets[0]?.data[e],h=t?f(t):null;if(t&&typeof u==`number`&&u>0&&h){let e=n?n(u):`${u}`,t=m.measureText(e).width+s*2;d(m,h.x-t/2,h.y-20/2,t,20,c),m.fillStyle=a,m.fill(),m.lineWidth=l,m.strokeStyle=o,m.stroke(),m.fillStyle=p,m.fillText(e,h.x,h.y)}}m.restore()}}),m=function(e){return e.COMPACT=`compact`,e.LIST=`list`,e}({}),h=({sliceList:t,colorHostElement:n,skeleton:r=!1,formatValue:i,formatBadge:s,showBadges:c=!0,onSliceClick:l,onSliceHover:u})=>{if(t.length===0)return null;let d=e.b(e.T.pieSegmentBorder,n),f=e.b(e.T.tooltipBackground,n),m=e.b(e.T.tooltipText,n),h=t.map((e,t)=>a(t,n,e.fillColor,r)),g=e.r({kind:`element`,skeleton:r,colorHostElement:n,onIndexClick:l,onHoverIndexChange:u});return{type:`pie`,data:{labels:t.map(e=>e.label),datasets:[{data:t.map(e=>e.value),backgroundColor:h,hoverBackgroundColor:h,borderColor:d,hoverBorderColor:d,borderWidth:4,hoverBorderWidth:4,hoverOffset:26,spacing:0,borderRadius:8}]},options:{responsive:!0,maintainAspectRatio:!0,cutout:`58%`,rotation:115,layout:{padding:26},onHover:g.onHover,onClick:g.onClick,interaction:e.u(r,{mode:`nearest`,intersect:!0}),plugins:{legend:{display:!1},tooltip:{enabled:e.d(r),backgroundColor:f,titleColor:m,bodyColor:m,displayColors:!1,callbacks:o(i)}}},plugins:e.f(r,[...c?[p(n,s??i)]:[],...g.plugins])}},g=[`Series 1`,`Series 2`,`Series 3`,`Series 4`,`Series 5`,`Series 6`,`Series 7`,`Series 8`],_=[4,1,1,1,1,1,1,1],v=g.map((e,t)=>({label:e,value:_[t]??1})),y={key:0,class:`s-ui-chart-pie__center`},b=[`role`,`tabindex`,`onMouseenter`,`onClick`,`onKeydown`],x={class:`s-ui-chart-pie__legend-swatch-slot`,"aria-hidden":`true`},S={class:`s-ui-chart-pie__legend-label`},C={class:`s-ui-chart-pie__legend-value`},w={key:0,class:`s-ui-chart-pie__legend-toggle-row`},T=[`aria-expanded`],E=(0,i.defineComponent)({__name:`SChartPie`,props:{slices:{default:()=>[]},loading:{type:Boolean,default:!1},showLegend:{type:Boolean,default:!0},legendView:{default:()=>m.COMPACT},formatValue:{type:Function},showBadges:{type:Boolean,default:!0},formatBadge:{type:Function},legendLimit:{}},emits:[`sliceClick`],setup(n,{expose:o,emit:s}){let c=s,l=(0,i.useSlots)(),u=`var(${e.T.fillMuted})`,d=e.S,f=(0,i.useTemplateRef)(`chartRootRef`),p=(0,i.useTemplateRef)(`chartCanvasRef`),g=(0,i.ref)(null),_=(0,i.ref)(!1),E=(0,i.computed)(()=>n.legendView===m.LIST&&!n.loading),D=(0,i.computed)(()=>[`s-ui-chart-pie`,{"s-ui-chart-pie--skeleton":n.loading,"s-ui-chart-pie--legend-list":E.value}]),O=(0,i.computed)(()=>n.loading?v:n.slices),k=e=>{let t=n.slices[e];t&&c(`sliceClick`,e,t)},A=e=>{g.value=e},j=r.t(`onSliceClick`),M=e=>{j()&&k(e)},N=(0,i.computed)(()=>!n.loading&&n.slices.length===0?null:h({sliceList:O.value,colorHostElement:f.value,skeleton:n.loading,formatValue:n.formatValue,formatBadge:n.formatBadge,showBadges:n.showBadges,onSliceClick:j()?k:void 0,onSliceHover:E.value?A:void 0})),P=(0,i.computed)(()=>O.value.map((e,t)=>({label:e.label,color:a(t,f.value,e.fillColor,n.loading)}))),F=(0,i.computed)(()=>n.legendLimit===void 0?0:Math.max(n.slices.length-n.legendLimit,0)),I=(0,i.computed)(()=>_.value||n.legendLimit===void 0?n.slices:n.slices.slice(0,n.legendLimit)),L=(0,i.computed)(()=>({expanded:_.value,hiddenCount:F.value})),R=(0,i.computed)(()=>_.value?`−`:`+${F.value}`),z=()=>{_.value=!_.value},B=(0,i.computed)(()=>I.value.map((e,t)=>{let r=g.value===t,i=g.value!==null&&!r,a={slice:e,index:t,active:r,muted:i};return{key:`${t}-${e.label}`,index:t,label:e.label,valueText:n.formatValue?n.formatValue(e.value):String(e.value),slotProps:a,role:j()?`button`:void 0,tabindex:j()?0:void 0,classes:[`s-ui-chart-pie__legend-row`,{"s-ui-chart-pie__legend-row--active":r,"s-ui-chart-pie__legend-row--muted":i,"s-ui-chart-pie__legend-row--clickable":j()}],swatchStyle:{backgroundColor:i?u:P.value[t]?.color}}})),{chartInstance:V}=e.n({canvasRef:p,config:N,enabled:(0,i.computed)(()=>n.loading||n.slices.length>0)}),{exportImage:H,handleLegendItemHover:U}=e.t({chartInstance:V,canvasRef:p,colorHostElement:f,legendDimKind:`element`}),W=e=>{E.value&&(g.value=e),U(e)};return o({exportImage:H}),(r,a)=>((0,i.openBlock)(),(0,i.createElementBlock)(`div`,{ref_key:`chartRootRef`,ref:f,class:(0,i.normalizeClass)(D.value)},[(0,i.createElementVNode)(`div`,{class:`s-ui-chart-pie__canvas-wrap`,onMouseleave:a[0]||=e=>A(null)},[(0,i.createVNode)((0,i.unref)(e.x),{loading:n.loading,type:(0,i.unref)(d).PIE},{default:(0,i.withCtx)(()=>[(0,i.createElementVNode)(`canvas`,{ref_key:`chartCanvasRef`,ref:p,class:`s-ui-chart-pie__canvas`},null,512)]),_:1},8,[`loading`,`type`]),(0,i.unref)(l).center&&!n.loading?((0,i.openBlock)(),(0,i.createElementBlock)(`div`,y,[(0,i.renderSlot)(r.$slots,`center`)])):(0,i.createCommentVNode)(``,!0)],32),n.showLegend&&P.value.length?((0,i.openBlock)(),(0,i.createElementBlock)(i.Fragment,{key:0},[E.value?((0,i.openBlock)(),(0,i.createElementBlock)(`ul`,{key:0,class:`s-ui-chart-pie__legend-list`,onMouseleave:a[1]||=e=>W(null)},[((0,i.openBlock)(!0),(0,i.createElementBlock)(i.Fragment,null,(0,i.renderList)(B.value,e=>((0,i.openBlock)(),(0,i.createElementBlock)(`li`,{key:e.key,class:(0,i.normalizeClass)(e.classes),role:e.role,tabindex:e.tabindex,onMouseenter:t=>W(e.index),onClick:t=>M(e.index),onKeydown:(0,i.withKeys)(t=>M(e.index),[`enter`])},[(0,i.createElementVNode)(`span`,x,[(0,i.createElementVNode)(`span`,{class:`s-ui-chart-pie__legend-swatch`,style:(0,i.normalizeStyle)(e.swatchStyle)},null,4)]),(0,i.createElementVNode)(`span`,S,[(0,i.renderSlot)(r.$slots,`legend-label`,(0,i.mergeProps)({ref_for:!0},e.slotProps),()=>[(0,i.createTextVNode)((0,i.toDisplayString)(e.label),1)])]),(0,i.createElementVNode)(`span`,C,(0,i.toDisplayString)(e.valueText),1)],42,b))),128)),F.value>0?((0,i.openBlock)(),(0,i.createElementBlock)(`li`,w,[(0,i.createElementVNode)(`button`,{type:`button`,class:`s-ui-chart-pie__legend-toggle`,"aria-expanded":_.value,onClick:z},[(0,i.renderSlot)(r.$slots,`legend-toggle`,(0,i.normalizeProps)((0,i.guardReactiveProps)(L.value)),()=>[(0,i.createTextVNode)((0,i.toDisplayString)(R.value),1)])],8,T)])):(0,i.createCommentVNode)(``,!0)],32)):((0,i.openBlock)(),(0,i.createBlock)((0,i.unref)(t.t),{key:1,items:P.value,disabled:n.loading,interactive:!n.loading,direction:`column`,onItemHover:W},null,8,[`items`,`disabled`,`interactive`]))],64)):(0,i.createCommentVNode)(``,!0)],2))}});Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return m}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return E}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("./useChartInteractivity-
|
|
1
|
+
const e=require("./useChartInteractivity-CaZ37kX-.cjs");let t=require("vue");var n=4,r=12,i=24,a=e=>{let t=e<=15;return{pointRadius:t?n:0,pointHoverRadius:n,pointHitRadius:t?r:i}},o=e=>e<=15?{mode:`nearest`,intersect:!0}:{mode:`nearest`,axis:`x`,intersect:!1},s=.3,c=1,l=({labels:t,progressValues:n,referenceValues:r,seriesLabel:i,valuePrefix:l,minValue:u,maxValue:d,stepSize:f,progressSnapshotCount:p,colorHostElement:m,skeleton:h=!1})=>{let g=e.b(e.T.axisLabel,m),_=e.b(e.T.grid,m),v=e.b(h?e.T.skeletonSeries:e.T.progressLine,m),y=e.b(h?e.T.skeletonFillStart:e.T.referenceFill,m),b=e.b(e.T.tooltipBackground,m),x=e.b(e.T.tooltipText,m),S=s,C=a(p),w=o(p);return{type:`line`,data:{labels:t,datasets:[{data:r,borderColor:`transparent`,backgroundColor:y,pointRadius:0,pointHoverRadius:0,pointHitRadius:0,fill:`start`,order:0},{label:i,data:n,borderColor:v,backgroundColor:v,tension:S,pointRadius:C.pointRadius,pointHoverRadius:C.pointHoverRadius,pointHitRadius:C.pointHitRadius,pointBackgroundColor:v,pointBorderColor:v,fill:!1,order:1}]},options:{responsive:!0,maintainAspectRatio:!1,interaction:e.u(h,w),plugins:{legend:{display:!1},tooltip:{enabled:e.d(h),backgroundColor:b,titleColor:x,bodyColor:x,position:e.h,filter:e=>e.datasetIndex===c,callbacks:{label:e=>{let t=e.parsed.y;return t===null?``:`${t}${l}`}}}},scales:{x:{type:`category`,border:{display:!1},grid:{color:_,drawTicks:!0},ticks:{color:g,font:{family:`var(--s-ui-font-family-label)`,size:10,weight:500},padding:8}},y:{type:`linear`,min:u,max:d,border:{display:!1},grid:{color:_,drawTicks:!0},ticks:{color:g,stepSize:f,callback:e=>`${e}${l}`,font:{family:`var(--s-ui-font-family-label)`,size:10,weight:500},padding:8}}}}}},u=e=>{let t=e.match(/^(\d{4})-(\d{2})-(\d{2})/);return t?`${t[3]}.${t[2]}.${t[1]}`:e},d=e=>Math.round(e*10)/10,f=({progressSnapshots:e,deadline:t=null,minValue:n=0,maxValue:r=100})=>{let i=e.map(e=>u(e.date)),a=e.map(e=>e.progress),o=t?u(t):null,s=a.length===1?[``,i[0]??``,``]:o?[...i,o]:i,c=a.length===1?[null,a[0]??null,null]:o?[...a,null]:a,l=s.length;return{labels:s,progressValues:c,referenceValues:l===0?[]:l===1?[n]:Array.from({length:l},(e,t)=>d(n+t*((r-n)/(l-1)))),minValue:n,maxValue:r,stepSize:d((r-n)/4),progressSnapshotCount:e.length}},p=[{date:`2025-11-01`,progress:20},{date:`2025-12-01`,progress:35},{date:`2026-01-01`,progress:42},{date:`2026-02-01`,progress:58},{date:`2026-03-01`,progress:71},{date:`2026-04-01`,progress:84}],m={class:`s-ui-chart-progress__canvas-wrap`},h=(0,t.defineComponent)({__name:`SChartProgress`,props:{progressSnapshots:{default:()=>[]},deadline:{default:null},minValue:{},maxValue:{},prefix:{},seriesLabel:{default:`Progress`},loading:{type:Boolean,default:!1}},setup(n,{expose:r}){let i=(0,t.useTemplateRef)(`chartRootRef`),a=(0,t.useTemplateRef)(`chartCanvasRef`),o=(0,t.computed)(()=>n.minValue??0),s=(0,t.computed)(()=>n.maxValue??100),c=(0,t.computed)(()=>n.prefix??`%`),u=(0,t.computed)(()=>n.loading?p:n.progressSnapshots),d=(0,t.computed)(()=>f({progressSnapshots:u.value,deadline:n.loading?`2026-06-28`:n.deadline,minValue:n.loading?0:o.value,maxValue:n.loading?100:s.value})),{chartInstance:h}=e.n({canvasRef:a,config:(0,t.computed)(()=>!n.loading&&n.progressSnapshots.length===0?null:l({labels:d.value.labels,progressValues:d.value.progressValues,referenceValues:d.value.referenceValues,seriesLabel:n.seriesLabel,valuePrefix:c.value,minValue:d.value.minValue,maxValue:d.value.maxValue,stepSize:n.loading?25:d.value.stepSize,progressSnapshotCount:d.value.progressSnapshotCount,colorHostElement:i.value,skeleton:n.loading})),enabled:(0,t.computed)(()=>n.loading||n.progressSnapshots.length>0)}),{exportImage:g}=e.t({chartInstance:h,canvasRef:a,colorHostElement:i});return r({exportImage:g}),(r,o)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{ref_key:`chartRootRef`,ref:i,class:(0,t.normalizeClass)([`s-ui-chart-progress`,{"s-ui-chart-progress--skeleton":n.loading}])},[(0,t.createElementVNode)(`div`,m,[(0,t.createVNode)((0,t.unref)(e.x),{loading:n.loading},{default:(0,t.withCtx)(()=>[(0,t.createElementVNode)(`canvas`,{ref_key:`chartCanvasRef`,ref:a,class:`s-ui-chart-progress__canvas`},null,512)]),_:1},8,[`loading`])])],2))}});Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return h}});
|