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