@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
|
@@ -0,0 +1,261 @@
|
|
|
1
|
+
import { T as e, b as t, d as n, f as r, g as i, l as a, n as o, t as s, u as c, x as l } from "./useChartInteractivity-DygkiRA1.js";
|
|
2
|
+
import { t as u } from "./SChartLegend-dDqLhvIj.js";
|
|
3
|
+
import { t as d } from "./createChartCrosshairPlugin-EqMlaexu.js";
|
|
4
|
+
import { t as f } from "./buildMultiLineChartScales-Di-yTvEB.js";
|
|
5
|
+
import { computed as p, createElementBlock as m, createElementVNode as h, createVNode as g, defineComponent as _, normalizeClass as v, openBlock as y, unref as b, useTemplateRef as x, withCtx as S } from "vue";
|
|
6
|
+
//#region src/utils/chart/burnup/createBurnupTodayLinePlugin.ts
|
|
7
|
+
var C = (n, r) => ({
|
|
8
|
+
id: "sUiChartBurnupTodayLine",
|
|
9
|
+
beforeDatasetsDraw(i) {
|
|
10
|
+
if (n < 0) return;
|
|
11
|
+
let { ctx: a, chartArea: o } = i, s = i.scales.x;
|
|
12
|
+
if (!o || !s) return;
|
|
13
|
+
let c = t(e.burnupToday, r), l = s.getPixelForValue(n);
|
|
14
|
+
a.save(), a.beginPath(), a.moveTo(l, o.top), a.lineTo(l, o.bottom), a.lineWidth = 1, a.strokeStyle = c, a.stroke(), a.restore();
|
|
15
|
+
}
|
|
16
|
+
}), w = 8, T = 4, E = 5, D = 12, O = 12, k = 60, A = 12, j = (e) => {
|
|
17
|
+
if (typeof window > "u") return "500 10px sans-serif";
|
|
18
|
+
let t = e ?? document.documentElement;
|
|
19
|
+
return `500 10px ${getComputedStyle(t).getPropertyValue("--s-ui-font-family-label").trim() || "sans-serif"}`;
|
|
20
|
+
}, M = (e, t, n, r, i, a) => {
|
|
21
|
+
let o = Math.min(a, r / 2, i / 2);
|
|
22
|
+
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();
|
|
23
|
+
}, N = ({ tagLines: n, factDatasetIndex: r, todayIndex: i }, a) => ({
|
|
24
|
+
id: "sUiChartBurnupTag",
|
|
25
|
+
afterDatasetsDraw(o) {
|
|
26
|
+
if (i < 0 || n.length === 0) return;
|
|
27
|
+
let s = o.getDatasetMeta(r)?.data[i], { chartArea: c } = o;
|
|
28
|
+
if (!s || !c) return;
|
|
29
|
+
let l = t(e.burnupToday, a), u = t(e.burnupTagBackground, a), { ctx: d } = o;
|
|
30
|
+
d.save(), d.font = j(a), d.textAlign = "center", d.textBaseline = "middle";
|
|
31
|
+
let f = n.reduce((e, t) => Math.max(e, d.measureText(t).width), 0), p = Math.max(k, f + w * 2), m = n.length * O + T + E, h = Math.min(Math.max(s.x - p / 2, c.left), c.right - p), g = Math.max(s.y - A - m, c.top);
|
|
32
|
+
M(d, h, g, p, m, D), d.fillStyle = u, d.fill(), d.lineWidth = 1, d.strokeStyle = l, d.stroke(), d.fillStyle = l, n.forEach((e, t) => {
|
|
33
|
+
d.fillText(e, h + p / 2, g + T + O * (t + .5));
|
|
34
|
+
}), d.restore();
|
|
35
|
+
}
|
|
36
|
+
}), P = (e, t) => t >= 0 && e > t, F = ({ todayIndex: e, futureLabel: t, resolveTitle: n }) => ({
|
|
37
|
+
title: (t) => {
|
|
38
|
+
let r = t[0];
|
|
39
|
+
return !r || P(r.dataIndex, e) ? "" : n?.(r.dataIndex) ?? `${r.label}`;
|
|
40
|
+
},
|
|
41
|
+
label: (n) => P(n.dataIndex, e) ? t : `${n.dataset.label ?? ""}: ${n.parsed.y ?? 0}%`
|
|
42
|
+
}), I = (e) => (t) => !P(t.dataIndex, e) || t.datasetIndex === 0, L = 1, R = 1, z = 2, B = [8, 8], V = [9, 9], H = 2, U = 25, W = (e) => e.reduce((e, t, n) => t.fact === null ? e : n, -1), G = (e, t) => e.goal ?? t, K = (e, t, n) => {
|
|
43
|
+
let r = e.reduce((e, n) => Math.max(e, n.plan, n.fact ?? 0, G(n, t)), t);
|
|
44
|
+
return Math.ceil(r / n) * n;
|
|
45
|
+
}, q = (e, t) => t.some((e) => e.label === "") ? {
|
|
46
|
+
...e,
|
|
47
|
+
x: {
|
|
48
|
+
...e.x,
|
|
49
|
+
ticks: {
|
|
50
|
+
...e.x.ticks,
|
|
51
|
+
autoSkip: !1,
|
|
52
|
+
maxRotation: 0
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
} : e, J = ({ points: o, colorHostElement: s, goalValue: l = 100, goalLabel: u = "Цель", planLabel: p = "План", factLabel: m = "Факт", futureLabel: h = "Этот день ещё не наступил", yStep: g = U, mirrorYAxis: _ = !0, showTag: v = !0, skeleton: y = !1 }) => {
|
|
56
|
+
if (o.length === 0) return null;
|
|
57
|
+
let b = t(e.axisLabel, s), x = t(e.grid, s), S = t(e.tooltipBackground, s), w = t(e.tooltipText, s), T = t(e.skeletonSeries, s), E = y ? T : t(e.burnupGoal, s), D = y ? T : t(e.burnupPlan, s), O = y ? T : t(e.burnupFact, s), k = t(e.burnupFactFillStart, s), A = t(e.burnupFactFillEnd, s), j = W(o), M = j >= 0 ? o[j] : void 0, P = M ? [`${m.toLowerCase()} ${M.fact}%`, `${p.toLowerCase()} ${M.plan}%`] : [];
|
|
58
|
+
return {
|
|
59
|
+
type: "line",
|
|
60
|
+
data: {
|
|
61
|
+
labels: o.map((e) => e.label),
|
|
62
|
+
datasets: [
|
|
63
|
+
{
|
|
64
|
+
label: u,
|
|
65
|
+
data: o.map((e) => G(e, l)),
|
|
66
|
+
borderColor: E,
|
|
67
|
+
backgroundColor: E,
|
|
68
|
+
borderWidth: L,
|
|
69
|
+
borderDash: B,
|
|
70
|
+
fill: !1,
|
|
71
|
+
pointRadius: 0,
|
|
72
|
+
pointHoverRadius: 0,
|
|
73
|
+
tension: 0
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
label: p,
|
|
77
|
+
data: o.map((e) => e.plan),
|
|
78
|
+
borderColor: D,
|
|
79
|
+
backgroundColor: D,
|
|
80
|
+
borderWidth: R,
|
|
81
|
+
borderDash: V,
|
|
82
|
+
fill: !1,
|
|
83
|
+
pointRadius: 0,
|
|
84
|
+
pointHoverRadius: 0,
|
|
85
|
+
tension: .4
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
label: m,
|
|
89
|
+
data: o.map((e) => e.fact ?? null),
|
|
90
|
+
borderColor: O,
|
|
91
|
+
backgroundColor: y ? O : (e) => a(e, k, A),
|
|
92
|
+
borderWidth: z,
|
|
93
|
+
fill: !y,
|
|
94
|
+
spanGaps: !1,
|
|
95
|
+
pointRadius: 0,
|
|
96
|
+
pointHoverRadius: 4,
|
|
97
|
+
tension: .4
|
|
98
|
+
}
|
|
99
|
+
]
|
|
100
|
+
},
|
|
101
|
+
options: {
|
|
102
|
+
responsive: !0,
|
|
103
|
+
maintainAspectRatio: !1,
|
|
104
|
+
interaction: c(y, {
|
|
105
|
+
mode: "index",
|
|
106
|
+
intersect: !1
|
|
107
|
+
}),
|
|
108
|
+
plugins: {
|
|
109
|
+
legend: { display: !1 },
|
|
110
|
+
tooltip: {
|
|
111
|
+
enabled: n(y),
|
|
112
|
+
backgroundColor: S,
|
|
113
|
+
titleColor: w,
|
|
114
|
+
bodyColor: w,
|
|
115
|
+
displayColors: !1,
|
|
116
|
+
position: i,
|
|
117
|
+
yAlign: "bottom",
|
|
118
|
+
xAlign: "center",
|
|
119
|
+
caretPadding: 8,
|
|
120
|
+
filter: I(j),
|
|
121
|
+
callbacks: F({
|
|
122
|
+
todayIndex: j,
|
|
123
|
+
futureLabel: h,
|
|
124
|
+
resolveTitle: (e) => o[e]?.tooltipLabel
|
|
125
|
+
})
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
scales: q(f({
|
|
129
|
+
axisLabelColor: b,
|
|
130
|
+
gridColor: x,
|
|
131
|
+
yMin: 0,
|
|
132
|
+
yMax: K(o, l, g),
|
|
133
|
+
yStep: g,
|
|
134
|
+
mirrorYAxis: _,
|
|
135
|
+
formatYAxisTick: (e) => `${e}%`
|
|
136
|
+
}), o)
|
|
137
|
+
},
|
|
138
|
+
plugins: r(y, [
|
|
139
|
+
d(s),
|
|
140
|
+
C(j, s),
|
|
141
|
+
...v ? [N({
|
|
142
|
+
tagLines: P,
|
|
143
|
+
factDatasetIndex: H,
|
|
144
|
+
todayIndex: j
|
|
145
|
+
}, s)] : []
|
|
146
|
+
])
|
|
147
|
+
};
|
|
148
|
+
}, Y = [
|
|
149
|
+
8,
|
|
150
|
+
15,
|
|
151
|
+
23,
|
|
152
|
+
31,
|
|
153
|
+
38,
|
|
154
|
+
46,
|
|
155
|
+
54,
|
|
156
|
+
62,
|
|
157
|
+
69,
|
|
158
|
+
77,
|
|
159
|
+
85,
|
|
160
|
+
92,
|
|
161
|
+
96,
|
|
162
|
+
100
|
|
163
|
+
], X = [
|
|
164
|
+
5,
|
|
165
|
+
10,
|
|
166
|
+
16,
|
|
167
|
+
22,
|
|
168
|
+
28,
|
|
169
|
+
34,
|
|
170
|
+
40,
|
|
171
|
+
45,
|
|
172
|
+
50,
|
|
173
|
+
54,
|
|
174
|
+
57,
|
|
175
|
+
60,
|
|
176
|
+
null,
|
|
177
|
+
null
|
|
178
|
+
], Z = Y.map((e, t) => ({
|
|
179
|
+
label: `Д${t + 1}`,
|
|
180
|
+
plan: e,
|
|
181
|
+
fact: X[t]
|
|
182
|
+
})), Q = { class: "s-ui-chart-burnup__canvas-wrap" }, $ = /* @__PURE__ */ _({
|
|
183
|
+
__name: "SChartBurnup",
|
|
184
|
+
props: {
|
|
185
|
+
points: { default: () => [] },
|
|
186
|
+
loading: {
|
|
187
|
+
type: Boolean,
|
|
188
|
+
default: !1
|
|
189
|
+
},
|
|
190
|
+
goalValue: { default: 100 },
|
|
191
|
+
goalLabel: { default: "Цель" },
|
|
192
|
+
planLabel: { default: "План" },
|
|
193
|
+
factLabel: { default: "Факт" },
|
|
194
|
+
futureLabel: { default: "Этот день ещё не наступил" },
|
|
195
|
+
yStep: { default: 25 },
|
|
196
|
+
mirrorYAxis: {
|
|
197
|
+
type: Boolean,
|
|
198
|
+
default: !0
|
|
199
|
+
},
|
|
200
|
+
showTag: {
|
|
201
|
+
type: Boolean,
|
|
202
|
+
default: !0
|
|
203
|
+
}
|
|
204
|
+
},
|
|
205
|
+
setup(n, { expose: r }) {
|
|
206
|
+
let i = x("chartRootRef"), a = x("chartCanvasRef"), c = p(() => n.loading ? Z : n.points), d = p(() => !n.loading && n.points.length === 0 ? null : J({
|
|
207
|
+
points: c.value,
|
|
208
|
+
colorHostElement: i.value,
|
|
209
|
+
goalValue: n.goalValue,
|
|
210
|
+
goalLabel: n.goalLabel,
|
|
211
|
+
planLabel: n.planLabel,
|
|
212
|
+
factLabel: n.factLabel,
|
|
213
|
+
futureLabel: n.futureLabel,
|
|
214
|
+
yStep: n.yStep,
|
|
215
|
+
mirrorYAxis: n.mirrorYAxis,
|
|
216
|
+
showTag: n.showTag,
|
|
217
|
+
skeleton: n.loading
|
|
218
|
+
})), f = p(() => [
|
|
219
|
+
{
|
|
220
|
+
label: n.goalLabel,
|
|
221
|
+
cssVariable: e.burnupGoal
|
|
222
|
+
},
|
|
223
|
+
{
|
|
224
|
+
label: n.planLabel,
|
|
225
|
+
cssVariable: e.burnupPlan
|
|
226
|
+
},
|
|
227
|
+
{
|
|
228
|
+
label: n.factLabel,
|
|
229
|
+
cssVariable: e.burnupFact
|
|
230
|
+
}
|
|
231
|
+
].map((r) => ({
|
|
232
|
+
label: r.label.toLowerCase(),
|
|
233
|
+
color: t(n.loading ? e.skeletonSeries : r.cssVariable, i.value)
|
|
234
|
+
}))), { chartInstance: _ } = o({
|
|
235
|
+
canvasRef: a,
|
|
236
|
+
config: d,
|
|
237
|
+
enabled: p(() => n.loading || n.points.length > 0)
|
|
238
|
+
}), { exportImage: C } = s({
|
|
239
|
+
chartInstance: _,
|
|
240
|
+
canvasRef: a,
|
|
241
|
+
colorHostElement: i
|
|
242
|
+
});
|
|
243
|
+
return r({ exportImage: C }), (e, t) => (y(), m("div", {
|
|
244
|
+
ref_key: "chartRootRef",
|
|
245
|
+
ref: i,
|
|
246
|
+
class: v(["s-ui-chart-burnup", { "s-ui-chart-burnup--skeleton": n.loading }])
|
|
247
|
+
}, [h("div", Q, [g(b(l), { loading: n.loading }, {
|
|
248
|
+
default: S(() => [h("canvas", {
|
|
249
|
+
ref_key: "chartCanvasRef",
|
|
250
|
+
ref: a,
|
|
251
|
+
class: "s-ui-chart-burnup__canvas"
|
|
252
|
+
}, null, 512)]),
|
|
253
|
+
_: 1
|
|
254
|
+
}, 8, ["loading"])]), g(b(u), {
|
|
255
|
+
items: f.value,
|
|
256
|
+
disabled: n.loading
|
|
257
|
+
}, null, 8, ["items", "disabled"])], 2));
|
|
258
|
+
}
|
|
259
|
+
});
|
|
260
|
+
//#endregion
|
|
261
|
+
export { $ as t };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("./useChartInteractivity-CaZ37kX-.cjs"),t=require("./SChartLegend-D1gPKGm0.cjs"),n=require("./createChartCrosshairPlugin-BTPv09h4.cjs"),r=require("./buildMultiLineChartScales-lVP6h9H4.cjs");let i=require("vue");var a=(t,n)=>({id:`sUiChartBurnupTodayLine`,beforeDatasetsDraw(r){if(t<0)return;let{ctx:i,chartArea:a}=r,o=r.scales.x;if(!a||!o)return;let s=e.b(e.T.burnupToday,n),c=o.getPixelForValue(t);i.save(),i.beginPath(),i.moveTo(c,a.top),i.lineTo(c,a.bottom),i.lineWidth=1,i.strokeStyle=s,i.stroke(),i.restore()}}),o=8,s=4,c=5,l=12,u=12,d=60,f=12,p=e=>{if(typeof window>`u`)return`500 10px sans-serif`;let t=e??document.documentElement;return`500 10px ${getComputedStyle(t).getPropertyValue(`--s-ui-font-family-label`).trim()||`sans-serif`}`},m=(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()},h=({tagLines:t,factDatasetIndex:n,todayIndex:r},i)=>({id:`sUiChartBurnupTag`,afterDatasetsDraw(a){if(r<0||t.length===0)return;let h=a.getDatasetMeta(n)?.data[r],{chartArea:g}=a;if(!h||!g)return;let _=e.b(e.T.burnupToday,i),v=e.b(e.T.burnupTagBackground,i),{ctx:y}=a;y.save(),y.font=p(i),y.textAlign=`center`,y.textBaseline=`middle`;let b=t.reduce((e,t)=>Math.max(e,y.measureText(t).width),0),x=Math.max(d,b+o*2),S=t.length*u+s+c,C=Math.min(Math.max(h.x-x/2,g.left),g.right-x),w=Math.max(h.y-f-S,g.top);m(y,C,w,x,S,l),y.fillStyle=v,y.fill(),y.lineWidth=1,y.strokeStyle=_,y.stroke(),y.fillStyle=_,t.forEach((e,t)=>{y.fillText(e,C+x/2,w+s+u*(t+.5))}),y.restore()}}),g=(e,t)=>t>=0&&e>t,_=({todayIndex:e,futureLabel:t,resolveTitle:n})=>({title:t=>{let r=t[0];return!r||g(r.dataIndex,e)?``:n?.(r.dataIndex)??`${r.label}`},label:n=>g(n.dataIndex,e)?t:`${n.dataset.label??``}: ${n.parsed.y??0}%`}),v=e=>t=>!g(t.dataIndex,e)||t.datasetIndex===0,y=1,b=1,x=2,S=[8,8],C=[9,9],w=2,T=25,E=e=>e.reduce((e,t,n)=>t.fact===null?e:n,-1),D=(e,t)=>e.goal??t,O=(e,t,n)=>{let r=e.reduce((e,n)=>Math.max(e,n.plan,n.fact??0,D(n,t)),t);return Math.ceil(r/n)*n},k=(e,t)=>t.some(e=>e.label===``)?{...e,x:{...e.x,ticks:{...e.x.ticks,autoSkip:!1,maxRotation:0}}}:e,A=({points:t,colorHostElement:i,goalValue:o=100,goalLabel:s=`Цель`,planLabel:c=`План`,factLabel:l=`Факт`,futureLabel:u=`Этот день ещё не наступил`,yStep:d=T,mirrorYAxis:f=!0,showTag:p=!0,skeleton:m=!1})=>{if(t.length===0)return null;let g=e.b(e.T.axisLabel,i),A=e.b(e.T.grid,i),j=e.b(e.T.tooltipBackground,i),M=e.b(e.T.tooltipText,i),N=e.b(e.T.skeletonSeries,i),P=m?N:e.b(e.T.burnupGoal,i),F=m?N:e.b(e.T.burnupPlan,i),I=m?N:e.b(e.T.burnupFact,i),L=e.b(e.T.burnupFactFillStart,i),R=e.b(e.T.burnupFactFillEnd,i),z=E(t),B=z>=0?t[z]:void 0,V=B?[`${l.toLowerCase()} ${B.fact}%`,`${c.toLowerCase()} ${B.plan}%`]:[];return{type:`line`,data:{labels:t.map(e=>e.label),datasets:[{label:s,data:t.map(e=>D(e,o)),borderColor:P,backgroundColor:P,borderWidth:y,borderDash:S,fill:!1,pointRadius:0,pointHoverRadius:0,tension:0},{label:c,data:t.map(e=>e.plan),borderColor:F,backgroundColor:F,borderWidth:b,borderDash:C,fill:!1,pointRadius:0,pointHoverRadius:0,tension:.4},{label:l,data:t.map(e=>e.fact??null),borderColor:I,backgroundColor:m?I:t=>e.l(t,L,R),borderWidth:x,fill:!m,spanGaps:!1,pointRadius:0,pointHoverRadius:4,tension:.4}]},options:{responsive:!0,maintainAspectRatio:!1,interaction:e.u(m,{mode:`index`,intersect:!1}),plugins:{legend:{display:!1},tooltip:{enabled:e.d(m),backgroundColor:j,titleColor:M,bodyColor:M,displayColors:!1,position:e.g,yAlign:`bottom`,xAlign:`center`,caretPadding:8,filter:v(z),callbacks:_({todayIndex:z,futureLabel:u,resolveTitle:e=>t[e]?.tooltipLabel})}},scales:k(r.t({axisLabelColor:g,gridColor:A,yMin:0,yMax:O(t,o,d),yStep:d,mirrorYAxis:f,formatYAxisTick:e=>`${e}%`}),t)},plugins:e.f(m,[n.t(i),a(z,i),...p?[h({tagLines:V,factDatasetIndex:w,todayIndex:z},i)]:[]])}},j=[8,15,23,31,38,46,54,62,69,77,85,92,96,100],M=[5,10,16,22,28,34,40,45,50,54,57,60,null,null],N=j.map((e,t)=>({label:`Д${t+1}`,plan:e,fact:M[t]})),P={class:`s-ui-chart-burnup__canvas-wrap`},F=(0,i.defineComponent)({__name:`SChartBurnup`,props:{points:{default:()=>[]},loading:{type:Boolean,default:!1},goalValue:{default:100},goalLabel:{default:`Цель`},planLabel:{default:`План`},factLabel:{default:`Факт`},futureLabel:{default:`Этот день ещё не наступил`},yStep:{default:25},mirrorYAxis:{type:Boolean,default:!0},showTag:{type:Boolean,default:!0}},setup(n,{expose:r}){let a=(0,i.useTemplateRef)(`chartRootRef`),o=(0,i.useTemplateRef)(`chartCanvasRef`),s=(0,i.computed)(()=>n.loading?N:n.points),c=(0,i.computed)(()=>!n.loading&&n.points.length===0?null:A({points:s.value,colorHostElement:a.value,goalValue:n.goalValue,goalLabel:n.goalLabel,planLabel:n.planLabel,factLabel:n.factLabel,futureLabel:n.futureLabel,yStep:n.yStep,mirrorYAxis:n.mirrorYAxis,showTag:n.showTag,skeleton:n.loading})),l=(0,i.computed)(()=>[{label:n.goalLabel,cssVariable:e.T.burnupGoal},{label:n.planLabel,cssVariable:e.T.burnupPlan},{label:n.factLabel,cssVariable:e.T.burnupFact}].map(t=>({label:t.label.toLowerCase(),color:e.b(n.loading?e.T.skeletonSeries:t.cssVariable,a.value)}))),{chartInstance:u}=e.n({canvasRef:o,config:c,enabled:(0,i.computed)(()=>n.loading||n.points.length>0)}),{exportImage:d}=e.t({chartInstance:u,canvasRef:o,colorHostElement:a});return r({exportImage:d}),(r,s)=>((0,i.openBlock)(),(0,i.createElementBlock)(`div`,{ref_key:`chartRootRef`,ref:a,class:(0,i.normalizeClass)([`s-ui-chart-burnup`,{"s-ui-chart-burnup--skeleton":n.loading}])},[(0,i.createElementVNode)(`div`,P,[(0,i.createVNode)((0,i.unref)(e.x),{loading:n.loading},{default:(0,i.withCtx)(()=>[(0,i.createElementVNode)(`canvas`,{ref_key:`chartCanvasRef`,ref:o,class:`s-ui-chart-burnup__canvas`},null,512)]),_:1},8,[`loading`])]),(0,i.createVNode)((0,i.unref)(t.t),{items:l.value,disabled:n.loading},null,8,[`items`,`disabled`])],2))}});Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return F}});
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
import { T as e, b as t, d as n, n as r, r as i, t as a, u as o, x as s } from "./useChartInteractivity-DygkiRA1.js";
|
|
2
|
+
import { t as c } from "./resolveCssColorValue-DH_SEZj4.js";
|
|
3
|
+
import { t as l } from "./useHasListener-RSjlUyqH.js";
|
|
4
|
+
import { computed as u, createElementBlock as d, createElementVNode as f, createVNode as p, defineComponent as m, normalizeClass as h, openBlock as g, unref as _, useTemplateRef as v, withCtx as y } from "vue";
|
|
5
|
+
//#region src/utils/chart/horizontalBar/buildHorizontalBarChartScales.ts
|
|
6
|
+
var b = 10, x = 14, S = ({ axisLabelColor: e, categoryLabelColor: t, gridColor: n, xMin: r, xMax: i, xStep: a }) => ({
|
|
7
|
+
x: {
|
|
8
|
+
type: "linear",
|
|
9
|
+
min: r,
|
|
10
|
+
max: i,
|
|
11
|
+
border: { display: !1 },
|
|
12
|
+
grid: {
|
|
13
|
+
color: n,
|
|
14
|
+
drawTicks: !1
|
|
15
|
+
},
|
|
16
|
+
ticks: {
|
|
17
|
+
color: e,
|
|
18
|
+
stepSize: a,
|
|
19
|
+
font: {
|
|
20
|
+
size: b,
|
|
21
|
+
weight: 500
|
|
22
|
+
},
|
|
23
|
+
padding: 8
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
y: {
|
|
27
|
+
border: { display: !1 },
|
|
28
|
+
grid: { display: !1 },
|
|
29
|
+
ticks: {
|
|
30
|
+
color: t,
|
|
31
|
+
font: {
|
|
32
|
+
size: x,
|
|
33
|
+
weight: 400
|
|
34
|
+
},
|
|
35
|
+
padding: 8,
|
|
36
|
+
crossAlign: "far",
|
|
37
|
+
autoSkip: !1
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}), C = (n, r, i) => i ? t(e.barHorizontalSkeletonFill, r) : n ? c(n, r) : t(e.barHorizontalFillDefault, r), w = (e, t, n) => {
|
|
41
|
+
if (t) return t;
|
|
42
|
+
let r = 0;
|
|
43
|
+
for (let t of e) r = Math.max(r, t.value);
|
|
44
|
+
let i = Math.ceil(r / n) * n;
|
|
45
|
+
return i > 0 ? i : n * 6;
|
|
46
|
+
}, T = 10, E = 0, D = 36, O = 4, k = ({ items: r, colorHostElement: a, xMax: s, xMin: c = E, xStep: l = T, skeleton: u = !1, onBarClick: d }) => {
|
|
47
|
+
if (r.length === 0) return null;
|
|
48
|
+
let f = t(e.axisLabel, a), p = t(e.grid, a), m = t(e.tooltipBackground, a), h = t(e.tooltipText, a), g = t(u ? e.barHorizontalCategoryLabelSkeleton : e.barHorizontalCategoryLabel, a), _ = w(r, s, l), v = r.map((e) => C(e.color, a, u)), y = i({
|
|
49
|
+
kind: "element",
|
|
50
|
+
skeleton: u,
|
|
51
|
+
colorHostElement: a,
|
|
52
|
+
onIndexClick: d
|
|
53
|
+
});
|
|
54
|
+
return {
|
|
55
|
+
type: "bar",
|
|
56
|
+
data: {
|
|
57
|
+
labels: r.map((e) => e.label),
|
|
58
|
+
datasets: [{
|
|
59
|
+
data: r.map((e) => e.value),
|
|
60
|
+
backgroundColor: v,
|
|
61
|
+
hoverBackgroundColor: v,
|
|
62
|
+
borderWidth: 0,
|
|
63
|
+
hoverBorderWidth: 0,
|
|
64
|
+
barThickness: D,
|
|
65
|
+
borderRadius: {
|
|
66
|
+
topRight: O,
|
|
67
|
+
bottomRight: O
|
|
68
|
+
}
|
|
69
|
+
}]
|
|
70
|
+
},
|
|
71
|
+
options: {
|
|
72
|
+
indexAxis: "y",
|
|
73
|
+
responsive: !0,
|
|
74
|
+
maintainAspectRatio: !1,
|
|
75
|
+
onHover: y.onHover,
|
|
76
|
+
onClick: y.onClick,
|
|
77
|
+
interaction: o(u, {
|
|
78
|
+
mode: "index",
|
|
79
|
+
axis: "y",
|
|
80
|
+
intersect: !1
|
|
81
|
+
}),
|
|
82
|
+
plugins: {
|
|
83
|
+
legend: { display: !1 },
|
|
84
|
+
tooltip: {
|
|
85
|
+
enabled: n(u),
|
|
86
|
+
backgroundColor: m,
|
|
87
|
+
titleColor: h,
|
|
88
|
+
bodyColor: h
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
scales: S({
|
|
92
|
+
axisLabelColor: f,
|
|
93
|
+
categoryLabelColor: g,
|
|
94
|
+
gridColor: p,
|
|
95
|
+
xMin: c,
|
|
96
|
+
xMax: _,
|
|
97
|
+
xStep: l
|
|
98
|
+
})
|
|
99
|
+
},
|
|
100
|
+
plugins: y.plugins
|
|
101
|
+
};
|
|
102
|
+
}, A = (e) => k(e), j = [
|
|
103
|
+
{
|
|
104
|
+
label: "Открыта",
|
|
105
|
+
value: 48
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
label: "В процессе",
|
|
109
|
+
value: 32
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
label: "Ревью",
|
|
113
|
+
value: 53
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
label: "Готова для QA",
|
|
117
|
+
value: 18
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
label: "QA",
|
|
121
|
+
value: 25
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
label: "Готова",
|
|
125
|
+
value: 0
|
|
126
|
+
}
|
|
127
|
+
], M = { class: "s-ui-chart-horizontal-bar__canvas-wrap" }, N = /* @__PURE__ */ m({
|
|
128
|
+
__name: "SChartHorizontalBar",
|
|
129
|
+
props: {
|
|
130
|
+
items: { default: () => [] },
|
|
131
|
+
loading: {
|
|
132
|
+
type: Boolean,
|
|
133
|
+
default: !1
|
|
134
|
+
},
|
|
135
|
+
xMin: {},
|
|
136
|
+
xMax: {},
|
|
137
|
+
xStep: {}
|
|
138
|
+
},
|
|
139
|
+
emits: ["barClick"],
|
|
140
|
+
setup(e, { expose: t, emit: n }) {
|
|
141
|
+
let i = n, o = v("chartRootRef"), c = v("chartCanvasRef"), m = u(() => e.loading ? j : e.items), b = (t) => {
|
|
142
|
+
let n = e.items[t];
|
|
143
|
+
n && i("barClick", t, n);
|
|
144
|
+
}, x = l("onBarClick"), { chartInstance: S } = r({
|
|
145
|
+
canvasRef: c,
|
|
146
|
+
config: u(() => !e.loading && e.items.length === 0 ? null : A({
|
|
147
|
+
items: m.value,
|
|
148
|
+
colorHostElement: o.value,
|
|
149
|
+
xMax: e.loading ? 60 : e.xMax,
|
|
150
|
+
xMin: e.loading ? 0 : e.xMin,
|
|
151
|
+
xStep: e.loading ? 10 : e.xStep,
|
|
152
|
+
skeleton: e.loading,
|
|
153
|
+
onBarClick: x() ? b : void 0
|
|
154
|
+
})),
|
|
155
|
+
enabled: u(() => e.loading || e.items.length > 0)
|
|
156
|
+
}), { exportImage: C } = a({
|
|
157
|
+
chartInstance: S,
|
|
158
|
+
canvasRef: c,
|
|
159
|
+
colorHostElement: o
|
|
160
|
+
});
|
|
161
|
+
return t({ exportImage: C }), (t, n) => (g(), d("div", {
|
|
162
|
+
ref_key: "chartRootRef",
|
|
163
|
+
ref: o,
|
|
164
|
+
class: h(["s-ui-chart-horizontal-bar", { "s-ui-chart-horizontal-bar--skeleton": e.loading }])
|
|
165
|
+
}, [f("div", M, [p(_(s), { loading: e.loading }, {
|
|
166
|
+
default: y(() => [f("canvas", {
|
|
167
|
+
ref_key: "chartCanvasRef",
|
|
168
|
+
ref: c,
|
|
169
|
+
class: "s-ui-chart-horizontal-bar__canvas"
|
|
170
|
+
}, null, 512)]),
|
|
171
|
+
_: 1
|
|
172
|
+
}, 8, ["loading"])])], 2));
|
|
173
|
+
}
|
|
174
|
+
});
|
|
175
|
+
//#endregion
|
|
176
|
+
export { N as t };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("./useChartInteractivity-CaZ37kX-.cjs"),t=require("./resolveCssColorValue-BFMo08-w.cjs"),n=require("./useHasListener-BPgtbbo6.cjs");let r=require("vue");var i=10,a=14,o=({axisLabelColor:e,categoryLabelColor:t,gridColor:n,xMin:r,xMax:o,xStep:s})=>({x:{type:`linear`,min:r,max:o,border:{display:!1},grid:{color:n,drawTicks:!1},ticks:{color:e,stepSize:s,font:{size:i,weight:500},padding:8}},y:{border:{display:!1},grid:{display:!1},ticks:{color:t,font:{size:a,weight:400},padding:8,crossAlign:`far`,autoSkip:!1}}}),s=(n,r,i)=>i?e.b(e.T.barHorizontalSkeletonFill,r):n?t.t(n,r):e.b(e.T.barHorizontalFillDefault,r),c=(e,t,n)=>{if(t)return t;let r=0;for(let t of e)r=Math.max(r,t.value);let i=Math.ceil(r/n)*n;return i>0?i:n*6},l=10,u=0,d=36,f=4,p=({items:t,colorHostElement:n,xMax:r,xMin:i=u,xStep:a=l,skeleton:p=!1,onBarClick:m})=>{if(t.length===0)return null;let h=e.b(e.T.axisLabel,n),g=e.b(e.T.grid,n),_=e.b(e.T.tooltipBackground,n),v=e.b(e.T.tooltipText,n),y=e.b(p?e.T.barHorizontalCategoryLabelSkeleton:e.T.barHorizontalCategoryLabel,n),b=c(t,r,a),x=t.map(e=>s(e.color,n,p)),S=e.r({kind:`element`,skeleton:p,colorHostElement:n,onIndexClick:m});return{type:`bar`,data:{labels:t.map(e=>e.label),datasets:[{data:t.map(e=>e.value),backgroundColor:x,hoverBackgroundColor:x,borderWidth:0,hoverBorderWidth:0,barThickness:d,borderRadius:{topRight:f,bottomRight:f}}]},options:{indexAxis:`y`,responsive:!0,maintainAspectRatio:!1,onHover:S.onHover,onClick:S.onClick,interaction:e.u(p,{mode:`index`,axis:`y`,intersect:!1}),plugins:{legend:{display:!1},tooltip:{enabled:e.d(p),backgroundColor:_,titleColor:v,bodyColor:v}},scales:o({axisLabelColor:h,categoryLabelColor:y,gridColor:g,xMin:i,xMax:b,xStep:a})},plugins:S.plugins}},m=e=>p(e),h=[{label:`Открыта`,value:48},{label:`В процессе`,value:32},{label:`Ревью`,value:53},{label:`Готова для QA`,value:18},{label:`QA`,value:25},{label:`Готова`,value:0}],g={class:`s-ui-chart-horizontal-bar__canvas-wrap`},_=(0,r.defineComponent)({__name:`SChartHorizontalBar`,props:{items:{default:()=>[]},loading:{type:Boolean,default:!1},xMin:{},xMax:{},xStep:{}},emits:[`barClick`],setup(t,{expose:i,emit:a}){let o=a,s=(0,r.useTemplateRef)(`chartRootRef`),c=(0,r.useTemplateRef)(`chartCanvasRef`),l=(0,r.computed)(()=>t.loading?h:t.items),u=e=>{let n=t.items[e];n&&o(`barClick`,e,n)},d=n.t(`onBarClick`),{chartInstance:f}=e.n({canvasRef:c,config:(0,r.computed)(()=>!t.loading&&t.items.length===0?null:m({items:l.value,colorHostElement:s.value,xMax:t.loading?60:t.xMax,xMin:t.loading?0:t.xMin,xStep:t.loading?10:t.xStep,skeleton:t.loading,onBarClick:d()?u:void 0})),enabled:(0,r.computed)(()=>t.loading||t.items.length>0)}),{exportImage:p}=e.t({chartInstance:f,canvasRef:c,colorHostElement:s});return i({exportImage:p}),(n,i)=>((0,r.openBlock)(),(0,r.createElementBlock)(`div`,{ref_key:`chartRootRef`,ref:s,class:(0,r.normalizeClass)([`s-ui-chart-horizontal-bar`,{"s-ui-chart-horizontal-bar--skeleton":t.loading}])},[(0,r.createElementVNode)(`div`,g,[(0,r.createVNode)((0,r.unref)(e.x),{loading:t.loading},{default:(0,r.withCtx)(()=>[(0,r.createElementVNode)(`canvas`,{ref_key:`chartCanvasRef`,ref:c,class:`s-ui-chart-horizontal-bar__canvas`},null,512)]),_:1},8,[`loading`])])],2))}});Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return _}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("./useChartInteractivity-CaZ37kX-.cjs");let t=require("vue");var n=function(e){return e.SMALL=`small`,e.MEDIUM=`medium`,e}({}),r=[`onMouseenter`],i={class:`s-ui-chart-legend__swatch-slot`,"aria-hidden":`true`},a={class:`s-ui-chart-legend__label`},o=(0,t.defineComponent)({__name:`SChartLegend`,props:{items:{},disabled:{type:Boolean,default:!1},direction:{default:`row`},interactive:{type:Boolean,default:!1},size:{default:()=>n.SMALL},selectable:{type:Boolean,default:!1},activeIndex:{default:null},activeIndexes:{default:()=>[]}},emits:[`itemHover`,`itemClick`],setup(o,{emit:s}){let c=s,l=`var(${e.T.fillMuted})`,u=(0,t.computed)(()=>o.selectable?`button`:`span`),d=(0,t.computed)(()=>[`s-ui-chart-legend`,`s-ui-chart-legend--size-${o.size}`,{"s-ui-chart-legend--disabled":o.disabled,"s-ui-chart-legend--column":o.direction===`column`,"s-ui-chart-legend--selectable":o.selectable}]),f=(0,t.computed)(()=>o.items.map((e,t)=>{let r=o.activeIndex===t||o.activeIndexes.includes(t),i=(o.activeIndex!==null||o.activeIndexes.length>0)&&!r;return{index:t,label:e.label,text:o.size===n.SMALL?`— ${e.label}`:e.label,isActive:r,classes:[`s-ui-chart-legend__entry`,{"s-ui-chart-legend__entry--active":r,"s-ui-chart-legend__entry--muted":i}],swatchClasses:[`s-ui-chart-legend__swatch`,{"s-ui-chart-legend__swatch--line":e.marker===`line`}],swatchStyle:{backgroundColor:i?l:e.color}}})),p=e=>{o.interactive&&c(`itemHover`,e)},m=e=>{o.selectable&&!o.disabled&&c(`itemClick`,e)};return(e,n)=>((0,t.openBlock)(),(0,t.createElementBlock)(`ul`,{class:(0,t.normalizeClass)(d.value),onMouseleave:n[0]||=e=>p(null)},[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(f.value,e=>((0,t.openBlock)(),(0,t.createElementBlock)(`li`,{key:e.label,class:`s-ui-chart-legend__item`,onMouseenter:t=>p(e.index)},[((0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)(u.value),{class:(0,t.normalizeClass)(e.classes),type:o.selectable?`button`:void 0,disabled:o.selectable?o.disabled:void 0,"aria-pressed":o.selectable?e.isActive:void 0,onClick:t=>m(e.index)},{default:(0,t.withCtx)(()=>[(0,t.createElementVNode)(`span`,i,[(0,t.createElementVNode)(`span`,{class:(0,t.normalizeClass)(e.swatchClasses),style:(0,t.normalizeStyle)(e.swatchStyle)},null,6)]),(0,t.createElementVNode)(`span`,a,(0,t.toDisplayString)(e.text),1)]),_:2},1032,[`class`,`type`,`disabled`,`aria-pressed`,`onClick`]))],40,r))),128))],34))}});Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return n}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return o}});
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { T as e } from "./useChartInteractivity-DygkiRA1.js";
|
|
2
|
+
import { Fragment as t, computed as n, createBlock as r, createElementBlock as i, createElementVNode as a, defineComponent as o, normalizeClass as s, normalizeStyle as c, openBlock as l, renderList as u, resolveDynamicComponent as d, toDisplayString as f, withCtx as p } from "vue";
|
|
3
|
+
//#region src/components/SChartLegend/SChartLegend.types.ts
|
|
4
|
+
var m = /* @__PURE__ */ function(e) {
|
|
5
|
+
return e.SMALL = "small", e.MEDIUM = "medium", e;
|
|
6
|
+
}({}), h = ["onMouseenter"], g = {
|
|
7
|
+
class: "s-ui-chart-legend__swatch-slot",
|
|
8
|
+
"aria-hidden": "true"
|
|
9
|
+
}, _ = { class: "s-ui-chart-legend__label" }, v = /* @__PURE__ */ o({
|
|
10
|
+
__name: "SChartLegend",
|
|
11
|
+
props: {
|
|
12
|
+
items: {},
|
|
13
|
+
disabled: {
|
|
14
|
+
type: Boolean,
|
|
15
|
+
default: !1
|
|
16
|
+
},
|
|
17
|
+
direction: { default: "row" },
|
|
18
|
+
interactive: {
|
|
19
|
+
type: Boolean,
|
|
20
|
+
default: !1
|
|
21
|
+
},
|
|
22
|
+
size: { default: () => m.SMALL },
|
|
23
|
+
selectable: {
|
|
24
|
+
type: Boolean,
|
|
25
|
+
default: !1
|
|
26
|
+
},
|
|
27
|
+
activeIndex: { default: null },
|
|
28
|
+
activeIndexes: { default: () => [] }
|
|
29
|
+
},
|
|
30
|
+
emits: ["itemHover", "itemClick"],
|
|
31
|
+
setup(o, { emit: v }) {
|
|
32
|
+
let y = v, b = `var(${e.fillMuted})`, x = n(() => o.selectable ? "button" : "span"), S = n(() => [
|
|
33
|
+
"s-ui-chart-legend",
|
|
34
|
+
`s-ui-chart-legend--size-${o.size}`,
|
|
35
|
+
{
|
|
36
|
+
"s-ui-chart-legend--disabled": o.disabled,
|
|
37
|
+
"s-ui-chart-legend--column": o.direction === "column",
|
|
38
|
+
"s-ui-chart-legend--selectable": o.selectable
|
|
39
|
+
}
|
|
40
|
+
]), C = n(() => o.items.map((e, t) => {
|
|
41
|
+
let n = o.activeIndex === t || o.activeIndexes.includes(t), r = (o.activeIndex !== null || o.activeIndexes.length > 0) && !n;
|
|
42
|
+
return {
|
|
43
|
+
index: t,
|
|
44
|
+
label: e.label,
|
|
45
|
+
text: o.size === m.SMALL ? `— ${e.label}` : e.label,
|
|
46
|
+
isActive: n,
|
|
47
|
+
classes: ["s-ui-chart-legend__entry", {
|
|
48
|
+
"s-ui-chart-legend__entry--active": n,
|
|
49
|
+
"s-ui-chart-legend__entry--muted": r
|
|
50
|
+
}],
|
|
51
|
+
swatchClasses: ["s-ui-chart-legend__swatch", { "s-ui-chart-legend__swatch--line": e.marker === "line" }],
|
|
52
|
+
swatchStyle: { backgroundColor: r ? b : e.color }
|
|
53
|
+
};
|
|
54
|
+
})), w = (e) => {
|
|
55
|
+
o.interactive && y("itemHover", e);
|
|
56
|
+
}, T = (e) => {
|
|
57
|
+
o.selectable && !o.disabled && y("itemClick", e);
|
|
58
|
+
};
|
|
59
|
+
return (e, n) => (l(), i("ul", {
|
|
60
|
+
class: s(S.value),
|
|
61
|
+
onMouseleave: n[0] ||= (e) => w(null)
|
|
62
|
+
}, [(l(!0), i(t, null, u(C.value, (e) => (l(), i("li", {
|
|
63
|
+
key: e.label,
|
|
64
|
+
class: "s-ui-chart-legend__item",
|
|
65
|
+
onMouseenter: (t) => w(e.index)
|
|
66
|
+
}, [(l(), r(d(x.value), {
|
|
67
|
+
class: s(e.classes),
|
|
68
|
+
type: o.selectable ? "button" : void 0,
|
|
69
|
+
disabled: o.selectable ? o.disabled : void 0,
|
|
70
|
+
"aria-pressed": o.selectable ? e.isActive : void 0,
|
|
71
|
+
onClick: (t) => T(e.index)
|
|
72
|
+
}, {
|
|
73
|
+
default: p(() => [a("span", g, [a("span", {
|
|
74
|
+
class: s(e.swatchClasses),
|
|
75
|
+
style: c(e.swatchStyle)
|
|
76
|
+
}, null, 6)]), a("span", _, f(e.text), 1)]),
|
|
77
|
+
_: 2
|
|
78
|
+
}, 1032, [
|
|
79
|
+
"class",
|
|
80
|
+
"type",
|
|
81
|
+
"disabled",
|
|
82
|
+
"aria-pressed",
|
|
83
|
+
"onClick"
|
|
84
|
+
]))], 40, h))), 128))], 34));
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
//#endregion
|
|
88
|
+
export { m as n, v as t };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { T as e, b as t, d as n, f as r, l as i, n as a, t as o, u as s, x as c } from "./useChartInteractivity-DygkiRA1.js";
|
|
2
2
|
import { t as l } from "./buildCartesianChartScales-EofFq3ry.js";
|
|
3
3
|
import { t as u } from "./resolveChartValueRange-DZybnmaX.js";
|
|
4
|
-
import { n as d, t as f } from "./createChartMarkersPlugin-
|
|
4
|
+
import { n as d, t as f } from "./createChartMarkersPlugin-DPvfZp_e.js";
|
|
5
5
|
import { computed as p, createElementBlock as m, createElementVNode as h, createVNode as g, defineComponent as _, normalizeClass as v, normalizeStyle as y, openBlock as b, unref as x, useTemplateRef as S, withCtx as C } from "vue";
|
|
6
6
|
//#region src/utils/chart/css/readCssNumber.ts
|
|
7
7
|
var w = (e, t, n = 1) => {
|
|
@@ -18,18 +18,18 @@ var w = (e, t, n = 1) => {
|
|
|
18
18
|
yMax: n,
|
|
19
19
|
yStep: r
|
|
20
20
|
});
|
|
21
|
-
}, j = ({ points:
|
|
22
|
-
let b = t(
|
|
21
|
+
}, j = ({ points: a, seriesLabel: o, colorHostElement: c, yMax: u, yMin: p, yStep: m = E, area: h = !0, zeroLine: g = !1, dangerBelowZero: _ = !1, markers: v = [], skeleton: y = !1 }) => {
|
|
22
|
+
let b = t(e.axisLabel, c), x = t(e.grid, c), S = t(y ? e.skeletonSeries : e.seriesPrimary, c), C = t(y ? e.skeletonFillStart : e.seriesFillStart, c), j = t(y ? e.skeletonFillEnd : e.seriesFillEnd, c), M = t(O, c), N = t(e.tooltipBackground, c), P = t(e.tooltipText, c), F = w(y ? e.skeletonFillOpacity : e.seriesFillOpacity, c, .8), I = A(a, p, u, m, y), L = h || y, R = _ && !y, z = (e) => i(e, C, j, F), B = R ? {
|
|
23
23
|
target: { value: 0 },
|
|
24
24
|
below: M
|
|
25
25
|
} : L ? "origin" : !1;
|
|
26
26
|
return {
|
|
27
27
|
type: "line",
|
|
28
28
|
data: {
|
|
29
|
-
labels:
|
|
29
|
+
labels: a.map((e) => e.label),
|
|
30
30
|
datasets: [{
|
|
31
|
-
label:
|
|
32
|
-
data:
|
|
31
|
+
label: o,
|
|
32
|
+
data: a.map((e) => e.value),
|
|
33
33
|
borderColor: S,
|
|
34
34
|
backgroundColor: L ? z : "transparent",
|
|
35
35
|
pointBackgroundColor: S,
|
|
@@ -45,7 +45,7 @@ var w = (e, t, n = 1) => {
|
|
|
45
45
|
responsive: !0,
|
|
46
46
|
maintainAspectRatio: !1,
|
|
47
47
|
layout: { padding: { top: v.length > 0 ? D : 0 } },
|
|
48
|
-
interaction:
|
|
48
|
+
interaction: s(y, {
|
|
49
49
|
mode: "index",
|
|
50
50
|
intersect: !1
|
|
51
51
|
}),
|
|
@@ -68,7 +68,7 @@ var w = (e, t, n = 1) => {
|
|
|
68
68
|
...y ? { formatYAxisTick: k } : {}
|
|
69
69
|
})
|
|
70
70
|
},
|
|
71
|
-
plugins: r(y, [...g ? [d(
|
|
71
|
+
plugins: r(y, [...g ? [d(c)] : [], ...v.length > 0 ? [f({ markers: v }, c)] : []])
|
|
72
72
|
};
|
|
73
73
|
}, M = [
|
|
74
74
|
{
|
|
@@ -122,39 +122,39 @@ var w = (e, t, n = 1) => {
|
|
|
122
122
|
},
|
|
123
123
|
markers: { default: () => [] }
|
|
124
124
|
},
|
|
125
|
-
setup(
|
|
126
|
-
let
|
|
127
|
-
if (
|
|
128
|
-
}), { chartInstance: l } =
|
|
129
|
-
canvasRef:
|
|
130
|
-
config: p(() => !
|
|
131
|
-
points:
|
|
132
|
-
seriesLabel:
|
|
133
|
-
colorHostElement:
|
|
134
|
-
yMax:
|
|
135
|
-
yMin:
|
|
136
|
-
yStep:
|
|
137
|
-
area:
|
|
138
|
-
zeroLine:
|
|
139
|
-
dangerBelowZero:
|
|
140
|
-
markers:
|
|
141
|
-
skeleton:
|
|
125
|
+
setup(e, { expose: t }) {
|
|
126
|
+
let n = S("chartRootRef"), r = S("chartCanvasRef"), i = p(() => e.loading ? M : e.points), s = p(() => {
|
|
127
|
+
if (e.height !== void 0) return { "--s-ui-chart-line-viewport-height": typeof e.height == "number" ? `${e.height}px` : e.height };
|
|
128
|
+
}), { chartInstance: l } = a({
|
|
129
|
+
canvasRef: r,
|
|
130
|
+
config: p(() => !e.loading && e.points.length === 0 ? null : j({
|
|
131
|
+
points: i.value,
|
|
132
|
+
seriesLabel: e.seriesLabel,
|
|
133
|
+
colorHostElement: n.value,
|
|
134
|
+
yMax: e.loading ? 100 : e.yMax,
|
|
135
|
+
yMin: e.loading ? 50 : e.yMin,
|
|
136
|
+
yStep: e.loading ? 10 : e.yStep,
|
|
137
|
+
area: e.area,
|
|
138
|
+
zeroLine: e.zeroLine,
|
|
139
|
+
dangerBelowZero: e.dangerBelowZero,
|
|
140
|
+
markers: e.markers,
|
|
141
|
+
skeleton: e.loading
|
|
142
142
|
})),
|
|
143
|
-
enabled: p(() =>
|
|
144
|
-
}), { exportImage: u } =
|
|
143
|
+
enabled: p(() => e.loading || e.points.length > 0)
|
|
144
|
+
}), { exportImage: u } = o({
|
|
145
145
|
chartInstance: l,
|
|
146
|
-
canvasRef:
|
|
147
|
-
colorHostElement:
|
|
146
|
+
canvasRef: r,
|
|
147
|
+
colorHostElement: n
|
|
148
148
|
});
|
|
149
|
-
return
|
|
149
|
+
return t({ exportImage: u }), (t, i) => (b(), m("div", {
|
|
150
150
|
ref_key: "chartRootRef",
|
|
151
|
-
ref:
|
|
152
|
-
class: v(["s-ui-chart-line", { "s-ui-chart-line--skeleton":
|
|
153
|
-
style: y(
|
|
154
|
-
}, [h("div", N, [g(x(
|
|
151
|
+
ref: n,
|
|
152
|
+
class: v(["s-ui-chart-line", { "s-ui-chart-line--skeleton": e.loading }]),
|
|
153
|
+
style: y(s.value)
|
|
154
|
+
}, [h("div", N, [g(x(c), { loading: e.loading }, {
|
|
155
155
|
default: C(() => [h("canvas", {
|
|
156
156
|
ref_key: "chartCanvasRef",
|
|
157
|
-
ref:
|
|
157
|
+
ref: r,
|
|
158
158
|
class: "s-ui-chart-line__canvas"
|
|
159
159
|
}, null, 512)]),
|
|
160
160
|
_: 1
|