@alfalab/core-components 20.3.2 → 20.4.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/calendar/Component.js +1 -1
- package/calendar/components/days-table/Component.js +1 -1
- package/calendar/components/days-table/index.js +1 -1
- package/calendar/components/header/Component.js +1 -1
- package/calendar/components/header/index.js +1 -1
- package/calendar/components/months-table/Component.js +1 -1
- package/calendar/components/months-table/index.js +1 -1
- package/calendar/components/select-button/Component.js +1 -1
- package/calendar/components/select-button/index.js +1 -1
- package/calendar/components/years-table/Component.js +1 -1
- package/calendar/components/years-table/index.js +1 -1
- package/calendar/esm/Component.js +1 -1
- package/calendar/esm/components/days-table/Component.js +1 -1
- package/calendar/esm/components/days-table/index.js +1 -1
- package/calendar/esm/components/header/Component.js +1 -1
- package/calendar/esm/components/header/index.js +1 -1
- package/calendar/esm/components/months-table/Component.js +1 -1
- package/calendar/esm/components/months-table/index.js +1 -1
- package/calendar/esm/components/select-button/Component.js +1 -1
- package/calendar/esm/components/select-button/index.js +1 -1
- package/calendar/esm/components/years-table/Component.js +1 -1
- package/calendar/esm/components/years-table/index.js +1 -1
- package/calendar/esm/index.js +1 -1
- package/calendar/esm/{tslib.es6-4c746bb4.d.ts → tslib.es6-decc30d3.d.ts} +0 -0
- package/calendar/esm/{tslib.es6-4c746bb4.js → tslib.es6-decc30d3.js} +0 -0
- package/calendar/index.js +1 -1
- package/calendar/{tslib.es6-7c2dd368.d.ts → tslib.es6-af3fab91.d.ts} +0 -0
- package/calendar/{tslib.es6-7c2dd368.js → tslib.es6-af3fab91.js} +0 -0
- package/chart/Component.d.ts +5 -0
- package/chart/Component.js +269 -0
- package/chart/components/Dot/index.css +23 -0
- package/chart/components/Dot/index.d.ts +5 -0
- package/chart/components/Dot/index.js +53 -0
- package/chart/components/Legends/index.css +40 -0
- package/chart/components/Legends/index.d.ts +14 -0
- package/chart/components/Legends/index.js +46 -0
- package/chart/components/LinearGradient.d.ts +5 -0
- package/chart/components/LinearGradient.js +14 -0
- package/chart/components/Tick/index.css +27 -0
- package/chart/components/Tick/index.d.ts +4 -0
- package/chart/components/Tick/index.js +28 -0
- package/chart/components/TooltipContent/index.css +65 -0
- package/chart/components/TooltipContent/index.d.ts +10 -0
- package/chart/components/TooltipContent/index.js +36 -0
- package/chart/cssm/Component.d.ts +5 -0
- package/chart/cssm/Component.js +272 -0
- package/chart/cssm/components/Dot/index.d.ts +5 -0
- package/chart/cssm/components/Dot/index.js +52 -0
- package/chart/cssm/components/Dot/index.module.css +22 -0
- package/chart/cssm/components/Legends/index.d.ts +14 -0
- package/chart/cssm/components/Legends/index.js +45 -0
- package/chart/cssm/components/Legends/index.module.css +39 -0
- package/chart/cssm/components/LinearGradient.d.ts +5 -0
- package/chart/cssm/components/LinearGradient.js +14 -0
- package/chart/cssm/components/Tick/index.d.ts +4 -0
- package/chart/cssm/components/Tick/index.js +27 -0
- package/chart/cssm/components/Tick/index.module.css +26 -0
- package/chart/cssm/components/TooltipContent/index.d.ts +10 -0
- package/chart/cssm/components/TooltipContent/index.js +35 -0
- package/chart/cssm/components/TooltipContent/index.module.css +64 -0
- package/chart/cssm/hooks/useSettings/index.d.ts +16 -0
- package/chart/cssm/hooks/useSettings/index.js +47 -0
- package/chart/cssm/hooks/useSettings/utils/setComposedChartsMargin.d.ts +12 -0
- package/chart/cssm/hooks/useSettings/utils/setComposedChartsMargin.js +17 -0
- package/chart/cssm/hooks/useSettings/utils/setDatas.d.ts +6 -0
- package/chart/cssm/hooks/useSettings/utils/setDatas.js +39 -0
- package/chart/cssm/hooks/useSettings/utils/setGradientCharts.d.ts +3 -0
- package/chart/cssm/hooks/useSettings/utils/setGradientCharts.js +27 -0
- package/chart/cssm/hooks/useSettings/utils/setLegendMargin.d.ts +4 -0
- package/chart/cssm/hooks/useSettings/utils/setLegendMargin.js +16 -0
- package/chart/cssm/hooks/useSettings/utils/sortByIndex.d.ts +3 -0
- package/chart/cssm/hooks/useSettings/utils/sortByIndex.js +12 -0
- package/chart/cssm/icons/Circle.d.ts +7 -0
- package/chart/cssm/icons/Circle.js +15 -0
- package/chart/cssm/icons/CircleLine.d.ts +8 -0
- package/chart/cssm/icons/CircleLine.js +16 -0
- package/chart/cssm/icons/FilledCircle.d.ts +7 -0
- package/chart/cssm/icons/FilledCircle.js +19 -0
- package/chart/cssm/icons/Point.d.ts +7 -0
- package/chart/cssm/icons/Point.js +16 -0
- package/chart/cssm/icons/StrokeCircle.d.ts +7 -0
- package/chart/cssm/icons/StrokeCircle.js +15 -0
- package/chart/cssm/index.d.ts +1 -0
- package/chart/cssm/index.js +27 -0
- package/chart/cssm/index.module.css +25 -0
- package/{gallery/esm/tslib.es6-76ecfd4c.d.ts → chart/cssm/tslib.es6-2be2aee7.d.ts} +0 -0
- package/chart/cssm/tslib.es6-2be2aee7.js +26 -0
- package/chart/cssm/types/brush.types.d.ts +41 -0
- package/chart/cssm/types/brush.types.js +1 -0
- package/chart/cssm/types/cartesianGrid.types.d.ts +23 -0
- package/chart/cssm/types/cartesianGrid.types.js +1 -0
- package/chart/cssm/types/chart.types.d.ts +61 -0
- package/chart/cssm/types/chart.types.js +1 -0
- package/chart/cssm/types/composedChart.types.d.ts +33 -0
- package/chart/cssm/types/composedChart.types.js +1 -0
- package/chart/cssm/types/legend.types.d.ts +30 -0
- package/chart/cssm/types/legend.types.js +1 -0
- package/chart/cssm/types/options.types.d.ts +59 -0
- package/chart/cssm/types/options.types.js +1 -0
- package/chart/cssm/types/payload.types.d.ts +29 -0
- package/chart/cssm/types/payload.types.js +1 -0
- package/chart/cssm/types/responsiveContainer.types.d.ts +10 -0
- package/chart/cssm/types/responsiveContainer.types.js +1 -0
- package/chart/cssm/types/seria.types.d.ts +59 -0
- package/chart/cssm/types/seria.types.js +1 -0
- package/chart/cssm/types/tooltip.types.d.ts +70 -0
- package/chart/cssm/types/tooltip.types.js +1 -0
- package/chart/cssm/types/utils/axis.types.d.ts +68 -0
- package/chart/cssm/types/utils/axis.types.js +1 -0
- package/chart/cssm/types/utils/coordinates.types.d.ts +11 -0
- package/chart/cssm/types/utils/coordinates.types.js +1 -0
- package/chart/cssm/types/utils/data.types.d.ts +17 -0
- package/chart/cssm/types/utils/data.types.js +1 -0
- package/chart/cssm/types/utils/dot.types.d.ts +73 -0
- package/chart/cssm/types/utils/dot.types.js +1 -0
- package/chart/cssm/types/utils/gradient.types.d.ts +29 -0
- package/chart/cssm/types/utils/gradient.types.js +1 -0
- package/chart/cssm/types/utils/tick.types.d.ts +19 -0
- package/chart/cssm/types/utils/tick.types.js +1 -0
- package/chart/cssm/types/xAxis.types.d.ts +16 -0
- package/chart/cssm/types/xAxis.types.js +1 -0
- package/chart/cssm/types/yAxis.types.d.ts +8 -0
- package/chart/cssm/types/yAxis.types.js +1 -0
- package/chart/esm/Component.d.ts +5 -0
- package/chart/esm/Component.js +264 -0
- package/chart/esm/components/Dot/index.css +23 -0
- package/chart/esm/components/Dot/index.d.ts +5 -0
- package/chart/esm/components/Dot/index.js +46 -0
- package/chart/esm/components/Legends/index.css +40 -0
- package/chart/esm/components/Legends/index.d.ts +14 -0
- package/chart/esm/components/Legends/index.js +39 -0
- package/chart/esm/components/LinearGradient.d.ts +5 -0
- package/chart/esm/components/LinearGradient.js +8 -0
- package/chart/esm/components/Tick/index.css +27 -0
- package/chart/esm/components/Tick/index.d.ts +4 -0
- package/chart/esm/components/Tick/index.js +21 -0
- package/chart/esm/components/TooltipContent/index.css +65 -0
- package/chart/esm/components/TooltipContent/index.d.ts +10 -0
- package/chart/esm/components/TooltipContent/index.js +29 -0
- package/chart/esm/hooks/useSettings/index.d.ts +16 -0
- package/chart/esm/hooks/useSettings/index.js +45 -0
- package/chart/esm/hooks/useSettings/utils/setComposedChartsMargin.d.ts +12 -0
- package/chart/esm/hooks/useSettings/utils/setComposedChartsMargin.js +15 -0
- package/chart/esm/hooks/useSettings/utils/setDatas.d.ts +6 -0
- package/chart/esm/hooks/useSettings/utils/setDatas.js +37 -0
- package/chart/esm/hooks/useSettings/utils/setGradientCharts.d.ts +3 -0
- package/chart/esm/hooks/useSettings/utils/setGradientCharts.js +25 -0
- package/chart/esm/hooks/useSettings/utils/setLegendMargin.d.ts +4 -0
- package/chart/esm/hooks/useSettings/utils/setLegendMargin.js +14 -0
- package/chart/esm/hooks/useSettings/utils/sortByIndex.d.ts +3 -0
- package/chart/esm/hooks/useSettings/utils/sortByIndex.js +10 -0
- package/chart/esm/icons/Circle.d.ts +7 -0
- package/chart/esm/icons/Circle.js +9 -0
- package/chart/esm/icons/CircleLine.d.ts +8 -0
- package/chart/esm/icons/CircleLine.js +10 -0
- package/chart/esm/icons/FilledCircle.d.ts +7 -0
- package/chart/esm/icons/FilledCircle.js +13 -0
- package/chart/esm/icons/Point.d.ts +7 -0
- package/chart/esm/icons/Point.js +10 -0
- package/chart/esm/icons/StrokeCircle.d.ts +7 -0
- package/chart/esm/icons/StrokeCircle.js +9 -0
- package/chart/esm/index.css +15 -0
- package/chart/esm/index.d.ts +1 -0
- package/chart/esm/index.js +22 -0
- package/{gallery/tslib.es6-d8fd377b.d.ts → chart/esm/tslib.es6-defbba9d.d.ts} +0 -0
- package/chart/esm/tslib.es6-defbba9d.js +28 -0
- package/chart/esm/types/brush.types.d.ts +41 -0
- package/chart/esm/types/brush.types.js +1 -0
- package/chart/esm/types/cartesianGrid.types.d.ts +23 -0
- package/chart/esm/types/cartesianGrid.types.js +1 -0
- package/chart/esm/types/chart.types.d.ts +61 -0
- package/chart/esm/types/chart.types.js +1 -0
- package/chart/esm/types/composedChart.types.d.ts +33 -0
- package/chart/esm/types/composedChart.types.js +1 -0
- package/chart/esm/types/legend.types.d.ts +30 -0
- package/chart/esm/types/legend.types.js +1 -0
- package/chart/esm/types/options.types.d.ts +59 -0
- package/chart/esm/types/options.types.js +1 -0
- package/chart/esm/types/payload.types.d.ts +29 -0
- package/chart/esm/types/payload.types.js +1 -0
- package/chart/esm/types/responsiveContainer.types.d.ts +10 -0
- package/chart/esm/types/responsiveContainer.types.js +1 -0
- package/chart/esm/types/seria.types.d.ts +59 -0
- package/chart/esm/types/seria.types.js +1 -0
- package/chart/esm/types/tooltip.types.d.ts +70 -0
- package/chart/esm/types/tooltip.types.js +1 -0
- package/chart/esm/types/utils/axis.types.d.ts +68 -0
- package/chart/esm/types/utils/axis.types.js +1 -0
- package/chart/esm/types/utils/coordinates.types.d.ts +11 -0
- package/chart/esm/types/utils/coordinates.types.js +1 -0
- package/chart/esm/types/utils/data.types.d.ts +17 -0
- package/chart/esm/types/utils/data.types.js +1 -0
- package/chart/esm/types/utils/dot.types.d.ts +73 -0
- package/chart/esm/types/utils/dot.types.js +1 -0
- package/chart/esm/types/utils/gradient.types.d.ts +29 -0
- package/chart/esm/types/utils/gradient.types.js +1 -0
- package/chart/esm/types/utils/tick.types.d.ts +19 -0
- package/chart/esm/types/utils/tick.types.js +1 -0
- package/chart/esm/types/xAxis.types.d.ts +16 -0
- package/chart/esm/types/xAxis.types.js +1 -0
- package/chart/esm/types/yAxis.types.d.ts +8 -0
- package/chart/esm/types/yAxis.types.js +1 -0
- package/chart/hooks/useSettings/index.d.ts +16 -0
- package/chart/hooks/useSettings/index.js +47 -0
- package/chart/hooks/useSettings/utils/setComposedChartsMargin.d.ts +12 -0
- package/chart/hooks/useSettings/utils/setComposedChartsMargin.js +17 -0
- package/chart/hooks/useSettings/utils/setDatas.d.ts +6 -0
- package/chart/hooks/useSettings/utils/setDatas.js +39 -0
- package/chart/hooks/useSettings/utils/setGradientCharts.d.ts +3 -0
- package/chart/hooks/useSettings/utils/setGradientCharts.js +27 -0
- package/chart/hooks/useSettings/utils/setLegendMargin.d.ts +4 -0
- package/chart/hooks/useSettings/utils/setLegendMargin.js +16 -0
- package/chart/hooks/useSettings/utils/sortByIndex.d.ts +3 -0
- package/chart/hooks/useSettings/utils/sortByIndex.js +12 -0
- package/chart/icons/Circle.d.ts +7 -0
- package/chart/icons/Circle.js +15 -0
- package/chart/icons/CircleLine.d.ts +8 -0
- package/chart/icons/CircleLine.js +16 -0
- package/chart/icons/FilledCircle.d.ts +7 -0
- package/chart/icons/FilledCircle.js +19 -0
- package/chart/icons/Point.d.ts +7 -0
- package/chart/icons/Point.js +16 -0
- package/chart/icons/StrokeCircle.d.ts +7 -0
- package/chart/icons/StrokeCircle.js +15 -0
- package/chart/index.css +15 -0
- package/chart/index.d.ts +1 -0
- package/chart/index.js +22 -0
- package/chart/modern/Component.d.ts +5 -0
- package/chart/modern/Component.js +258 -0
- package/chart/modern/components/Dot/index.css +23 -0
- package/chart/modern/components/Dot/index.d.ts +5 -0
- package/chart/modern/components/Dot/index.js +45 -0
- package/chart/modern/components/Legends/index.css +40 -0
- package/chart/modern/components/Legends/index.d.ts +14 -0
- package/chart/modern/components/Legends/index.js +38 -0
- package/chart/modern/components/LinearGradient.d.ts +5 -0
- package/chart/modern/components/LinearGradient.js +7 -0
- package/chart/modern/components/Tick/index.css +27 -0
- package/chart/modern/components/Tick/index.d.ts +4 -0
- package/chart/modern/components/Tick/index.js +20 -0
- package/chart/modern/components/TooltipContent/index.css +65 -0
- package/chart/modern/components/TooltipContent/index.d.ts +10 -0
- package/chart/modern/components/TooltipContent/index.js +28 -0
- package/chart/modern/hooks/useSettings/index.d.ts +16 -0
- package/chart/modern/hooks/useSettings/index.js +43 -0
- package/chart/modern/hooks/useSettings/utils/setComposedChartsMargin.d.ts +12 -0
- package/chart/modern/hooks/useSettings/utils/setComposedChartsMargin.js +14 -0
- package/chart/modern/hooks/useSettings/utils/setDatas.d.ts +6 -0
- package/chart/modern/hooks/useSettings/utils/setDatas.js +32 -0
- package/chart/modern/hooks/useSettings/utils/setGradientCharts.d.ts +3 -0
- package/chart/modern/hooks/useSettings/utils/setGradientCharts.js +35 -0
- package/chart/modern/hooks/useSettings/utils/setLegendMargin.d.ts +4 -0
- package/chart/modern/hooks/useSettings/utils/setLegendMargin.js +14 -0
- package/chart/modern/hooks/useSettings/utils/sortByIndex.d.ts +3 -0
- package/chart/modern/hooks/useSettings/utils/sortByIndex.js +10 -0
- package/chart/modern/icons/Circle.d.ts +7 -0
- package/chart/modern/icons/Circle.js +8 -0
- package/chart/modern/icons/CircleLine.d.ts +8 -0
- package/chart/modern/icons/CircleLine.js +9 -0
- package/chart/modern/icons/FilledCircle.d.ts +7 -0
- package/chart/modern/icons/FilledCircle.js +12 -0
- package/chart/modern/icons/Point.d.ts +7 -0
- package/chart/modern/icons/Point.js +7 -0
- package/chart/modern/icons/StrokeCircle.d.ts +7 -0
- package/chart/modern/icons/StrokeCircle.js +8 -0
- package/chart/modern/index.css +15 -0
- package/chart/modern/index.d.ts +1 -0
- package/chart/modern/index.js +21 -0
- package/chart/modern/types/brush.types.d.ts +41 -0
- package/chart/modern/types/brush.types.js +1 -0
- package/chart/modern/types/cartesianGrid.types.d.ts +23 -0
- package/chart/modern/types/cartesianGrid.types.js +1 -0
- package/chart/modern/types/chart.types.d.ts +61 -0
- package/chart/modern/types/chart.types.js +1 -0
- package/chart/modern/types/composedChart.types.d.ts +33 -0
- package/chart/modern/types/composedChart.types.js +1 -0
- package/chart/modern/types/legend.types.d.ts +30 -0
- package/chart/modern/types/legend.types.js +1 -0
- package/chart/modern/types/options.types.d.ts +59 -0
- package/chart/modern/types/options.types.js +1 -0
- package/chart/modern/types/payload.types.d.ts +29 -0
- package/chart/modern/types/payload.types.js +1 -0
- package/chart/modern/types/responsiveContainer.types.d.ts +10 -0
- package/chart/modern/types/responsiveContainer.types.js +1 -0
- package/chart/modern/types/seria.types.d.ts +59 -0
- package/chart/modern/types/seria.types.js +1 -0
- package/chart/modern/types/tooltip.types.d.ts +70 -0
- package/chart/modern/types/tooltip.types.js +1 -0
- package/chart/modern/types/utils/axis.types.d.ts +68 -0
- package/chart/modern/types/utils/axis.types.js +1 -0
- package/chart/modern/types/utils/coordinates.types.d.ts +11 -0
- package/chart/modern/types/utils/coordinates.types.js +1 -0
- package/chart/modern/types/utils/data.types.d.ts +17 -0
- package/chart/modern/types/utils/data.types.js +1 -0
- package/chart/modern/types/utils/dot.types.d.ts +73 -0
- package/chart/modern/types/utils/dot.types.js +1 -0
- package/chart/modern/types/utils/gradient.types.d.ts +29 -0
- package/chart/modern/types/utils/gradient.types.js +1 -0
- package/chart/modern/types/utils/tick.types.d.ts +19 -0
- package/chart/modern/types/utils/tick.types.js +1 -0
- package/chart/modern/types/xAxis.types.d.ts +16 -0
- package/chart/modern/types/xAxis.types.js +1 -0
- package/chart/modern/types/yAxis.types.d.ts +8 -0
- package/chart/modern/types/yAxis.types.js +1 -0
- package/chart/package.json +3 -0
- package/chart/send-stats.js +82 -0
- package/{modal/esm/tslib.es6-aaad616c.d.ts → chart/tslib.es6-62c2b032.d.ts} +0 -0
- package/chart/tslib.es6-62c2b032.js +26 -0
- package/chart/types/brush.types.d.ts +41 -0
- package/chart/types/brush.types.js +1 -0
- package/chart/types/cartesianGrid.types.d.ts +23 -0
- package/chart/types/cartesianGrid.types.js +1 -0
- package/chart/types/chart.types.d.ts +61 -0
- package/chart/types/chart.types.js +1 -0
- package/chart/types/composedChart.types.d.ts +33 -0
- package/chart/types/composedChart.types.js +1 -0
- package/chart/types/legend.types.d.ts +30 -0
- package/chart/types/legend.types.js +1 -0
- package/chart/types/options.types.d.ts +59 -0
- package/chart/types/options.types.js +1 -0
- package/chart/types/payload.types.d.ts +29 -0
- package/chart/types/payload.types.js +1 -0
- package/chart/types/responsiveContainer.types.d.ts +10 -0
- package/chart/types/responsiveContainer.types.js +1 -0
- package/chart/types/seria.types.d.ts +59 -0
- package/chart/types/seria.types.js +1 -0
- package/chart/types/tooltip.types.d.ts +70 -0
- package/chart/types/tooltip.types.js +1 -0
- package/chart/types/utils/axis.types.d.ts +68 -0
- package/chart/types/utils/axis.types.js +1 -0
- package/chart/types/utils/coordinates.types.d.ts +11 -0
- package/chart/types/utils/coordinates.types.js +1 -0
- package/chart/types/utils/data.types.d.ts +17 -0
- package/chart/types/utils/data.types.js +1 -0
- package/chart/types/utils/dot.types.d.ts +73 -0
- package/chart/types/utils/dot.types.js +1 -0
- package/chart/types/utils/gradient.types.d.ts +29 -0
- package/chart/types/utils/gradient.types.js +1 -0
- package/chart/types/utils/tick.types.d.ts +19 -0
- package/chart/types/utils/tick.types.js +1 -0
- package/chart/types/xAxis.types.d.ts +16 -0
- package/chart/types/xAxis.types.js +1 -0
- package/chart/types/yAxis.types.d.ts +8 -0
- package/chart/types/yAxis.types.js +1 -0
- package/gallery/Component.js +2 -2
- package/gallery/components/header/Component.js +1 -1
- package/gallery/components/header/buttons.js +1 -1
- package/gallery/components/header/index.js +1 -1
- package/gallery/components/image-viewer/component.js +2 -2
- package/gallery/components/image-viewer/index.js +2 -2
- package/gallery/components/image-viewer/slide.js +1 -1
- package/gallery/components/index.js +2 -2
- package/gallery/esm/Component.js +2 -2
- package/gallery/esm/components/header/Component.js +1 -1
- package/gallery/esm/components/header/buttons.js +1 -1
- package/gallery/esm/components/header/index.js +1 -1
- package/gallery/esm/components/image-viewer/component.js +2 -2
- package/gallery/esm/components/image-viewer/index.js +2 -2
- package/gallery/esm/components/image-viewer/slide.js +1 -1
- package/gallery/esm/components/index.js +2 -2
- package/gallery/esm/index.js +2 -2
- package/gallery/esm/{slide-87570b70.d.ts → slide-2c5303bf.d.ts} +0 -0
- package/gallery/esm/{slide-87570b70.js → slide-2c5303bf.js} +0 -0
- package/{modal/tslib.es6-39c837a9.d.ts → gallery/esm/tslib.es6-e5bfa024.d.ts} +0 -0
- package/gallery/esm/{tslib.es6-76ecfd4c.js → tslib.es6-e5bfa024.js} +0 -0
- package/gallery/index.js +2 -2
- package/gallery/modern/Component.js +1 -1
- package/gallery/modern/components/image-viewer/component.js +1 -1
- package/gallery/modern/components/image-viewer/index.js +1 -1
- package/gallery/modern/components/image-viewer/slide.js +1 -1
- package/gallery/modern/components/index.js +1 -1
- package/gallery/modern/index.js +1 -1
- package/gallery/modern/{slide-d973cd14.d.ts → slide-31efe610.d.ts} +0 -0
- package/gallery/modern/{slide-d973cd14.js → slide-31efe610.js} +0 -0
- package/gallery/{slide-4c7a53b7.d.ts → slide-5f9593b7.d.ts} +0 -0
- package/gallery/{slide-4c7a53b7.js → slide-5f9593b7.js} +0 -0
- package/{select/esm/tslib.es6-c18e9eca.d.ts → gallery/tslib.es6-d5e3524f.d.ts} +0 -0
- package/gallery/{tslib.es6-d8fd377b.js → tslib.es6-d5e3524f.js} +0 -0
- package/intl-phone-input/{component-b2d27dfb.d.ts → component-2901b48c.d.ts} +0 -0
- package/intl-phone-input/{component-b2d27dfb.js → component-2901b48c.js} +1 -1
- package/intl-phone-input/component.js +3 -3
- package/intl-phone-input/components/flag-icon/component.js +1 -1
- package/intl-phone-input/components/flag-icon/index.css +784 -784
- package/intl-phone-input/components/index.js +1 -1
- package/intl-phone-input/components/select/component.js +2 -2
- package/intl-phone-input/components/select/index.css +6 -6
- package/intl-phone-input/components/select/index.js +1 -1
- package/intl-phone-input/components/select-field/component.js +1 -1
- package/intl-phone-input/components/select-field/index.css +8 -8
- package/intl-phone-input/components/select-field/index.d.ts +1 -1
- package/intl-phone-input/components/select-field/index.js +1 -1
- package/intl-phone-input/esm/{component-087d1771.d.ts → component-b0494269.d.ts} +0 -0
- package/intl-phone-input/esm/{component-087d1771.js → component-b0494269.js} +1 -1
- package/intl-phone-input/esm/component.js +3 -3
- package/intl-phone-input/esm/components/flag-icon/component.js +1 -1
- package/intl-phone-input/esm/components/flag-icon/index.css +784 -784
- package/intl-phone-input/esm/components/index.js +1 -1
- package/intl-phone-input/esm/components/select/component.js +2 -2
- package/intl-phone-input/esm/components/select/index.css +6 -6
- package/intl-phone-input/esm/components/select/index.js +1 -1
- package/intl-phone-input/esm/components/select-field/component.js +1 -1
- package/intl-phone-input/esm/components/select-field/index.css +8 -8
- package/intl-phone-input/esm/components/select-field/index.d.ts +1 -1
- package/intl-phone-input/esm/components/select-field/index.js +1 -1
- package/intl-phone-input/esm/index.css +3 -3
- package/intl-phone-input/esm/index.js +1 -1
- package/intl-phone-input/esm/{libphonenumber-js.min-bc9d0c29.d.ts → libphonenumber-js.min-4d9b997b.d.ts} +0 -0
- package/intl-phone-input/esm/{libphonenumber-js.min-bc9d0c29.js → libphonenumber-js.min-4d9b997b.js} +0 -0
- package/intl-phone-input/index.css +3 -3
- package/intl-phone-input/index.js +1 -1
- package/intl-phone-input/{libphonenumber-js.min-7e154139.d.ts → libphonenumber-js.min-893b6a4c.d.ts} +0 -0
- package/intl-phone-input/{libphonenumber-js.min-7e154139.js → libphonenumber-js.min-893b6a4c.js} +0 -0
- package/intl-phone-input/modern/component.js +2 -2
- package/intl-phone-input/modern/components/flag-icon/component.js +1 -1
- package/intl-phone-input/modern/components/flag-icon/index.css +784 -784
- package/intl-phone-input/modern/components/select/component.js +1 -1
- package/intl-phone-input/modern/components/select/index.css +6 -6
- package/intl-phone-input/modern/components/select-field/component.js +1 -1
- package/intl-phone-input/modern/components/select-field/index.css +8 -8
- package/intl-phone-input/modern/index.css +3 -3
- package/intl-phone-input/modern/{libphonenumber-js.min-bc9d0c29.d.ts → libphonenumber-js.min-4d9b997b.d.ts} +0 -0
- package/intl-phone-input/modern/{libphonenumber-js.min-bc9d0c29.js → libphonenumber-js.min-4d9b997b.js} +0 -0
- package/modal/Component.desktop.js +2 -2
- package/modal/Component.mobile.js +2 -2
- package/modal/Component.responsive.js +2 -2
- package/modal/components/closer/Component.js +1 -1
- package/modal/components/content/Component.desktop.js +1 -1
- package/modal/components/content/Component.mobile.js +1 -1
- package/modal/components/footer/Component.desktop.js +1 -1
- package/modal/components/footer/Component.mobile.js +1 -1
- package/modal/components/header/Component.desktop.js +1 -1
- package/modal/components/header/Component.js +1 -1
- package/modal/components/header/Component.mobile.js +1 -1
- package/modal/desktop.js +2 -2
- package/modal/esm/Component.desktop.js +2 -2
- package/modal/esm/Component.mobile.js +2 -2
- package/modal/esm/Component.responsive.js +2 -2
- package/modal/esm/components/closer/Component.js +1 -1
- package/modal/esm/components/content/Component.desktop.js +1 -1
- package/modal/esm/components/content/Component.mobile.js +1 -1
- package/modal/esm/components/footer/Component.desktop.js +1 -1
- package/modal/esm/components/footer/Component.mobile.js +1 -1
- package/modal/esm/components/header/Component.desktop.js +1 -1
- package/modal/esm/components/header/Component.js +1 -1
- package/modal/esm/components/header/Component.mobile.js +1 -1
- package/modal/esm/desktop.js +2 -2
- package/modal/esm/index.js +2 -2
- package/modal/esm/mobile.js +2 -2
- package/modal/esm/responsive.js +2 -2
- package/modal/esm/{transitions.module-e77b5169.js → transitions.module-45fbb621.js} +0 -0
- package/{select/tslib.es6-507b73eb.d.ts → modal/esm/tslib.es6-4214739e.d.ts} +0 -0
- package/modal/esm/{tslib.es6-aaad616c.js → tslib.es6-4214739e.js} +0 -0
- package/modal/index.js +2 -2
- package/modal/mobile.js +2 -2
- package/modal/modern/Component.desktop.js +1 -1
- package/modal/modern/Component.mobile.js +1 -1
- package/modal/modern/Component.responsive.js +1 -1
- package/modal/modern/desktop.js +1 -1
- package/modal/modern/index.js +1 -1
- package/modal/modern/mobile.js +1 -1
- package/modal/modern/responsive.js +1 -1
- package/modal/modern/{transitions.module-e77b5169.js → transitions.module-45fbb621.js} +0 -0
- package/modal/responsive.js +2 -2
- package/modal/{transitions.module-ffa09972.js → transitions.module-b67d0f1c.js} +0 -0
- package/{tabs/esm/tslib.es6-8f0739df.d.ts → modal/tslib.es6-ccd35f7f.d.ts} +0 -0
- package/modal/{tslib.es6-39c837a9.js → tslib.es6-ccd35f7f.js} +0 -0
- package/package.json +9 -1
- package/select/Component.js +1 -1
- package/select/components/base-select/Component.js +1 -1
- package/select/components/base-select/index.js +1 -1
- package/select/components/field/Component.js +1 -1
- package/select/components/field/index.js +1 -1
- package/select/components/index.js +1 -1
- package/select/components/native-select/Component.js +1 -1
- package/select/components/native-select/index.js +1 -1
- package/select/components/option/Component.js +1 -1
- package/select/components/option/index.js +1 -1
- package/select/esm/Component.js +1 -1
- package/select/esm/components/base-select/Component.js +1 -1
- package/select/esm/components/base-select/index.js +1 -1
- package/select/esm/components/field/Component.js +1 -1
- package/select/esm/components/field/index.js +1 -1
- package/select/esm/components/index.js +1 -1
- package/select/esm/components/native-select/Component.js +1 -1
- package/select/esm/components/native-select/index.js +1 -1
- package/select/esm/components/option/Component.js +1 -1
- package/select/esm/components/option/index.js +1 -1
- package/select/esm/index.js +1 -1
- package/select/esm/presets/index.js +1 -1
- package/select/esm/presets/useLazyLoading/hook.js +1 -1
- package/select/esm/presets/useSelectWithLoading/hook.js +1 -1
- package/{tabs/tslib.es6-7078bc0a.d.ts → select/esm/tslib.es6-abde084a.d.ts} +0 -0
- package/select/esm/{tslib.es6-c18e9eca.js → tslib.es6-abde084a.js} +0 -0
- package/select/index.js +1 -1
- package/select/presets/index.js +1 -1
- package/select/presets/useLazyLoading/hook.js +1 -1
- package/select/presets/useSelectWithLoading/hook.js +1 -1
- package/{typography/colors.module-ded492e1.d.ts → select/tslib.es6-0f234b35.d.ts} +0 -0
- package/select/{tslib.es6-507b73eb.js → tslib.es6-0f234b35.js} +0 -0
- package/tabs/components/primary-tablist/Component.desktop.js +2 -2
- package/tabs/components/primary-tablist/Component.js +1 -1
- package/tabs/components/primary-tablist/Component.mobile.js +2 -2
- package/tabs/components/primary-tablist/Component.responsive.js +2 -2
- package/tabs/components/secondary-tablist/Component.desktop.js +2 -2
- package/tabs/components/secondary-tablist/Component.js +1 -1
- package/tabs/components/secondary-tablist/Component.mobile.js +2 -2
- package/tabs/components/secondary-tablist/Component.responsive.js +2 -2
- package/tabs/components/tabs/Component.desktop.js +3 -3
- package/tabs/components/tabs/Component.mobile.js +3 -3
- package/tabs/components/tabs/Component.responsive.js +3 -3
- package/tabs/desktop.js +3 -3
- package/tabs/esm/components/primary-tablist/Component.desktop.js +2 -2
- package/tabs/esm/components/primary-tablist/Component.js +1 -1
- package/tabs/esm/components/primary-tablist/Component.mobile.js +2 -2
- package/tabs/esm/components/primary-tablist/Component.responsive.js +2 -2
- package/tabs/esm/components/secondary-tablist/Component.desktop.js +2 -2
- package/tabs/esm/components/secondary-tablist/Component.js +1 -1
- package/tabs/esm/components/secondary-tablist/Component.mobile.js +2 -2
- package/tabs/esm/components/secondary-tablist/Component.responsive.js +2 -2
- package/tabs/esm/components/tabs/Component.desktop.js +3 -3
- package/tabs/esm/components/tabs/Component.mobile.js +3 -3
- package/tabs/esm/components/tabs/Component.responsive.js +3 -3
- package/tabs/esm/desktop.js +3 -3
- package/tabs/esm/index.js +3 -3
- package/tabs/esm/{index.module-2eb64cb0.js → index.module-c8448fef.js} +0 -0
- package/tabs/esm/{index.module-878a7a87.js → index.module-fbbc84ff.js} +0 -0
- package/tabs/esm/mobile.js +3 -3
- package/tabs/esm/responsive.js +3 -3
- package/{typography/esm/colors.module-d21f47ee.d.ts → tabs/esm/tslib.es6-787ef7a5.d.ts} +0 -0
- package/tabs/esm/{tslib.es6-8f0739df.js → tslib.es6-787ef7a5.js} +0 -0
- package/tabs/index.js +3 -3
- package/tabs/{index.module-278c87fb.js → index.module-91539407.js} +0 -0
- package/tabs/{index.module-adf99814.js → index.module-95d8761b.js} +0 -0
- package/tabs/mobile.js +3 -3
- package/tabs/modern/components/primary-tablist/Component.desktop.js +1 -1
- package/tabs/modern/components/primary-tablist/Component.mobile.js +1 -1
- package/tabs/modern/components/primary-tablist/Component.responsive.js +1 -1
- package/tabs/modern/components/secondary-tablist/Component.desktop.js +1 -1
- package/tabs/modern/components/secondary-tablist/Component.mobile.js +1 -1
- package/tabs/modern/components/secondary-tablist/Component.responsive.js +1 -1
- package/tabs/modern/components/tabs/Component.desktop.js +2 -2
- package/tabs/modern/components/tabs/Component.mobile.js +2 -2
- package/tabs/modern/components/tabs/Component.responsive.js +2 -2
- package/tabs/modern/desktop.js +2 -2
- package/tabs/modern/index.js +2 -2
- package/tabs/modern/{index.module-2eb64cb0.js → index.module-c8448fef.js} +0 -0
- package/tabs/modern/{index.module-878a7a87.js → index.module-fbbc84ff.js} +0 -0
- package/tabs/modern/mobile.js +2 -2
- package/tabs/modern/responsive.js +2 -2
- package/tabs/responsive.js +3 -3
- package/tabs/tslib.es6-da6ab86a.d.ts +32 -0
- package/tabs/{tslib.es6-7078bc0a.js → tslib.es6-da6ab86a.js} +0 -0
- package/themes/compiled/mobile-dark-bluetint.css +2 -2
- package/themes/dist/compiled/mobile-dark-bluetint.css +96 -70
- package/typography/colors.module-b49182a7.d.ts +32 -0
- package/typography/{colors.module-ded492e1.js → colors.module-b49182a7.js} +0 -0
- package/typography/{common.module-1de331b9.js → common.module-263677ac.js} +0 -0
- package/typography/component.js +2 -2
- package/typography/esm/colors.module-509f4855.d.ts +32 -0
- package/typography/esm/{colors.module-d21f47ee.js → colors.module-509f4855.js} +0 -0
- package/typography/esm/{common.module-9782b936.js → common.module-961ee2a7.js} +0 -0
- package/typography/esm/component.js +2 -2
- package/typography/esm/index.js +2 -2
- package/typography/esm/text/component.js +1 -1
- package/typography/esm/text/index.js +1 -1
- package/typography/esm/title/component.js +1 -1
- package/typography/esm/title/index.js +2 -2
- package/typography/esm/title-responsive/component.js +2 -2
- package/typography/esm/title-responsive/index.js +2 -2
- package/typography/index.js +2 -2
- package/typography/modern/{colors.module-5a6490a8.js → colors.module-07a98532.js} +0 -0
- package/typography/modern/{common.module-9782b936.js → common.module-961ee2a7.js} +0 -0
- package/typography/modern/component.js +2 -2
- package/typography/modern/index.js +2 -2
- package/typography/modern/text/component.js +1 -1
- package/typography/modern/text/index.js +1 -1
- package/typography/modern/title/component.js +1 -1
- package/typography/modern/title/index.js +2 -2
- package/typography/modern/title-responsive/component.js +2 -2
- package/typography/modern/title-responsive/index.js +2 -2
- package/typography/text/component.js +1 -1
- package/typography/text/index.js +1 -1
- package/typography/title/component.js +1 -1
- package/typography/title/index.js +2 -2
- package/typography/title-responsive/component.js +2 -2
- package/typography/title-responsive/index.js +2 -2
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2
|
+
|
|
3
|
+
require('../../tslib.es6-62c2b032.js');
|
|
4
|
+
var React = require('react');
|
|
5
|
+
var hooks_useSettings_utils_setComposedChartsMargin = require('./utils/setComposedChartsMargin.js');
|
|
6
|
+
var hooks_useSettings_utils_setDatas = require('./utils/setDatas.js');
|
|
7
|
+
var hooks_useSettings_utils_setGradientCharts = require('./utils/setGradientCharts.js');
|
|
8
|
+
var hooks_useSettings_utils_setLegendMargin = require('./utils/setLegendMargin.js');
|
|
9
|
+
var hooks_useSettings_utils_sortByIndex = require('./utils/sortByIndex.js');
|
|
10
|
+
|
|
11
|
+
var useSettings = function (options) {
|
|
12
|
+
var _a = React.useState(null), state = _a[0], setState = _a[1];
|
|
13
|
+
var _b = React.useState({}), charts = _b[0], setCharts = _b[1];
|
|
14
|
+
var _c = React.useState([]), data = _c[0], setData = _c[1];
|
|
15
|
+
var _d = React.useState(0), filterCount = _d[0], setFilterCount = _d[1];
|
|
16
|
+
React.useEffect(function () {
|
|
17
|
+
var _a;
|
|
18
|
+
var settings = JSON.parse(JSON.stringify(options));
|
|
19
|
+
var brush = settings.brush, legend = settings.legend, series = settings.series, labels = settings.labels, composeChart = settings.composeChart, xAxis = settings.xAxis;
|
|
20
|
+
if (((_a = settings.legend) === null || _a === void 0 ? void 0 : _a.margin) && brush && legend)
|
|
21
|
+
settings.legend.margin.top = hooks_useSettings_utils_setLegendMargin.setLegendMargin(brush, legend);
|
|
22
|
+
settings.series = hooks_useSettings_utils_setGradientCharts.setGradientCharts(series);
|
|
23
|
+
var _b = hooks_useSettings_utils_setDatas.setDatas(settings.series, labels), initData = _b[0], chartsNames = _b[1], count = _b[2];
|
|
24
|
+
settings.composeChart.margin = hooks_useSettings_utils_setComposedChartsMargin.setComposedChartsMargin(composeChart, legend, brush, xAxis);
|
|
25
|
+
settings.series = hooks_useSettings_utils_sortByIndex.sortByIndex(settings.series);
|
|
26
|
+
setState(settings);
|
|
27
|
+
setData(initData);
|
|
28
|
+
setCharts(chartsNames);
|
|
29
|
+
setFilterCount(count);
|
|
30
|
+
}, [options]);
|
|
31
|
+
return [
|
|
32
|
+
{
|
|
33
|
+
state: state,
|
|
34
|
+
data: data,
|
|
35
|
+
charts: charts,
|
|
36
|
+
filterCount: filterCount,
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
setState: setState,
|
|
40
|
+
setData: setData,
|
|
41
|
+
setCharts: setCharts,
|
|
42
|
+
setFilterCount: setFilterCount,
|
|
43
|
+
},
|
|
44
|
+
];
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
exports.useSettings = useSettings;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { XAxisProps } from "../../../types/xAxis.types";
|
|
2
|
+
import { BrushProps } from "../../../types/brush.types";
|
|
3
|
+
import { LegendProps } from "../../../types/legend.types";
|
|
4
|
+
import { ComposedChartProps } from "../../../types/composedChart.types";
|
|
5
|
+
type ComposedChartsMarginResultProps = {
|
|
6
|
+
top: number;
|
|
7
|
+
bottom: number;
|
|
8
|
+
left: number;
|
|
9
|
+
right: number;
|
|
10
|
+
};
|
|
11
|
+
declare const setComposedChartsMargin: (composeChart: ComposedChartProps, legend: LegendProps | undefined, brush: BrushProps | undefined, xAxis: XAxisProps) => ComposedChartsMarginResultProps;
|
|
12
|
+
export { setComposedChartsMargin };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2
|
+
|
|
3
|
+
var setComposedChartsMargin = function (composeChart, legend, brush, xAxis) {
|
|
4
|
+
var _a, _b, _c, _d;
|
|
5
|
+
return {
|
|
6
|
+
top: (((_a = composeChart === null || composeChart === void 0 ? void 0 : composeChart.initMargin) === null || _a === void 0 ? void 0 : _a.top) || 0) +
|
|
7
|
+
((legend === null || legend === void 0 ? void 0 : legend.verticalAlign) === 'top' && (legend === null || legend === void 0 ? void 0 : legend.marginTop) ? Math.abs(legend.marginTop) : 0),
|
|
8
|
+
bottom: (((_b = composeChart === null || composeChart === void 0 ? void 0 : composeChart.initMargin) === null || _b === void 0 ? void 0 : _b.bottom) || 0) +
|
|
9
|
+
((xAxis === null || xAxis === void 0 ? void 0 : xAxis.tickMargin) || 0) +
|
|
10
|
+
((brush === null || brush === void 0 ? void 0 : brush.brushMargin) || 0) +
|
|
11
|
+
((legend === null || legend === void 0 ? void 0 : legend.verticalAlign) !== 'top' && (legend === null || legend === void 0 ? void 0 : legend.marginTop) ? legend.marginTop : 0),
|
|
12
|
+
left: ((_c = composeChart === null || composeChart === void 0 ? void 0 : composeChart.initMargin) === null || _c === void 0 ? void 0 : _c.left) || 0,
|
|
13
|
+
right: ((_d = composeChart === null || composeChart === void 0 ? void 0 : composeChart.initMargin) === null || _d === void 0 ? void 0 : _d.right) || 0,
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
exports.setComposedChartsMargin = setComposedChartsMargin;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { DataDynamicBooleanProps, DataDynamicProps } from "../../../types/utils/data.types";
|
|
3
|
+
import { SeriaProps } from "../../../types/seria.types";
|
|
4
|
+
type DatasResultProps = [DataDynamicProps[], DataDynamicBooleanProps, number];
|
|
5
|
+
declare const setDatas: (series: SeriaProps[], labels: import("react").Key[]) => DatasResultProps;
|
|
6
|
+
export { setDatas };
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2
|
+
|
|
3
|
+
var tslib_es6 = require('../../../tslib.es6-62c2b032.js');
|
|
4
|
+
|
|
5
|
+
var setDatas = function (series, labels) {
|
|
6
|
+
var initData = [];
|
|
7
|
+
var chartsNames = {};
|
|
8
|
+
var count = 0;
|
|
9
|
+
var _loop_1 = function (i) {
|
|
10
|
+
var _a = series[i], _b = _a.properties, _c = (_b === void 0 ? {} : _b).dataKey, dataKey = _c === void 0 ? '' : _c, _d = _a.data, seriaData = _d === void 0 ? [] : _d, hideLegend = _a.hideLegend, hide = _a.hide;
|
|
11
|
+
if (!hideLegend && !hide)
|
|
12
|
+
count += 1;
|
|
13
|
+
labels.map(function (label) {
|
|
14
|
+
var item = seriaData.find(function (d) { return d.label === label; });
|
|
15
|
+
if (item) {
|
|
16
|
+
var obj = {
|
|
17
|
+
label: label,
|
|
18
|
+
};
|
|
19
|
+
obj["" + dataKey] = item.value;
|
|
20
|
+
if (!chartsNames["" + dataKey])
|
|
21
|
+
chartsNames["" + dataKey] = true;
|
|
22
|
+
var index = initData
|
|
23
|
+
.map(function (dataItem) { return dataItem.label; })
|
|
24
|
+
.indexOf(label);
|
|
25
|
+
if (index === -1)
|
|
26
|
+
initData.push(obj);
|
|
27
|
+
else
|
|
28
|
+
initData[index] = tslib_es6.__assign(tslib_es6.__assign({}, initData[index]), obj);
|
|
29
|
+
}
|
|
30
|
+
return null;
|
|
31
|
+
});
|
|
32
|
+
};
|
|
33
|
+
for (var i = 0; i < series.length; i++) {
|
|
34
|
+
_loop_1(i);
|
|
35
|
+
}
|
|
36
|
+
return [initData, chartsNames, count];
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
exports.setDatas = setDatas;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2
|
+
|
|
3
|
+
var tslib_es6 = require('../../../tslib.es6-62c2b032.js');
|
|
4
|
+
|
|
5
|
+
var setGradientCharts = function (series) {
|
|
6
|
+
var filterSeries = series.filter(function (item) { return item.chart !== 'gradient'; });
|
|
7
|
+
return filterSeries.reduce(function (accum, item) {
|
|
8
|
+
var chart = item.chart, dataSeria = item.data, offset = item.offset, fill = item.fill;
|
|
9
|
+
if (chart === 'area') {
|
|
10
|
+
var newData = null;
|
|
11
|
+
if (offset) {
|
|
12
|
+
newData = dataSeria.map(function (d) {
|
|
13
|
+
var label = d.label, value = d.value;
|
|
14
|
+
return {
|
|
15
|
+
label: label,
|
|
16
|
+
value: Math.ceil(value - value * offset),
|
|
17
|
+
};
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
accum.push(tslib_es6.__assign(tslib_es6.__assign({}, item), { zIndex: -100, chart: 'gradient', hideLegend: true, hideTooltip: true, properties: tslib_es6.__assign(tslib_es6.__assign({}, item.properties), { dataKey: item.properties.dataKey + "-gradient", fill: fill }), data: newData || item.data }));
|
|
21
|
+
}
|
|
22
|
+
accum.push(item);
|
|
23
|
+
return accum;
|
|
24
|
+
}, []);
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
exports.setGradientCharts = setGradientCharts;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2
|
+
|
|
3
|
+
var setLegendMargin = function (brush, legend) {
|
|
4
|
+
var top = 0;
|
|
5
|
+
if (typeof (brush === null || brush === void 0 ? void 0 : brush.brushMargin) !== 'number' || !(legend === null || legend === void 0 ? void 0 : legend.verticalAlign))
|
|
6
|
+
return top;
|
|
7
|
+
if (legend.verticalAlign === 'top') {
|
|
8
|
+
top = legend.marginTop ? Number(legend.marginTop * -1) : 0;
|
|
9
|
+
}
|
|
10
|
+
else {
|
|
11
|
+
top = (legend === null || legend === void 0 ? void 0 : legend.marginTop) ? legend.marginTop + ((brush === null || brush === void 0 ? void 0 : brush.brushMargin) || 0) : brush === null || brush === void 0 ? void 0 : brush.brushMargin;
|
|
12
|
+
}
|
|
13
|
+
return top;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
exports.setLegendMargin = setLegendMargin;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2
|
+
|
|
3
|
+
var sortByIndex = function (series) {
|
|
4
|
+
return series.sort(function (a, b) {
|
|
5
|
+
if ((a === null || a === void 0 ? void 0 : a.zIndex) && (b === null || b === void 0 ? void 0 : b.zIndex) && (a === null || a === void 0 ? void 0 : a.zIndex) > (b === null || b === void 0 ? void 0 : b.zIndex)) {
|
|
6
|
+
return 1;
|
|
7
|
+
}
|
|
8
|
+
return -1;
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
exports.sortByIndex = sortByIndex;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2
|
+
|
|
3
|
+
var React = require('react');
|
|
4
|
+
|
|
5
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
6
|
+
|
|
7
|
+
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
8
|
+
|
|
9
|
+
var CircleIcon = function (_a) {
|
|
10
|
+
var _b = _a.fill, fill = _b === void 0 ? '#FF5C5C' : _b, _c = _a.height, height = _c === void 0 ? 16 : _c;
|
|
11
|
+
return (React__default['default'].createElement("svg", { xmlns: 'http://www.w3.org/2000/svg', width: 'auto', height: height, viewBox: '0 0 16 16', fill: 'none' },
|
|
12
|
+
React__default['default'].createElement("circle", { cx: '8', cy: '8', r: '8', fill: fill })));
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
exports.CircleIcon = CircleIcon;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import React from 'react';
|
|
3
|
+
type Props = {
|
|
4
|
+
fill?: string;
|
|
5
|
+
height?: number;
|
|
6
|
+
};
|
|
7
|
+
declare const CircleLineIcon: ({ fill, height }: Props) => React.ReactElement<any, string | ((props: any) => React.ReactElement<any, string | any | (new (props: any) => React.Component<any, any, any>)> | null) | (new (props: any) => React.Component<any, any, any>)>;
|
|
8
|
+
export { CircleLineIcon };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2
|
+
|
|
3
|
+
var React = require('react');
|
|
4
|
+
|
|
5
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
6
|
+
|
|
7
|
+
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
8
|
+
|
|
9
|
+
var CircleLineIcon = function (_a) {
|
|
10
|
+
var _b = _a.fill, fill = _b === void 0 ? '#FF5C5C' : _b, _c = _a.height, height = _c === void 0 ? 16 : _c;
|
|
11
|
+
return (React__default['default'].createElement("svg", { xmlns: 'http://www.w3.org/2000/svg', width: 'auto', height: height, viewBox: '0 0 22 12', fill: 'none' },
|
|
12
|
+
React__default['default'].createElement("circle", { cx: '11', cy: '6', r: '6', fill: fill }),
|
|
13
|
+
React__default['default'].createElement("rect", { y: '5', width: '22', height: '2', fill: fill })));
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
exports.CircleLineIcon = CircleLineIcon;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2
|
+
|
|
3
|
+
var React = require('react');
|
|
4
|
+
|
|
5
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
6
|
+
|
|
7
|
+
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
8
|
+
|
|
9
|
+
var FilledCircleIcon = function (_a) {
|
|
10
|
+
var _b = _a.fill, fill = _b === void 0 ? '#5A8ECF' : _b, _c = _a.height, height = _c === void 0 ? 16 : _c;
|
|
11
|
+
return (React__default['default'].createElement("svg", { xmlns: 'http://www.w3.org/2000/svg', height: height, viewBox: '0 0 22 22', fill: 'none' },
|
|
12
|
+
React__default['default'].createElement("circle", { cx: '11', cy: '11', r: '10', fill: 'url(#paint0_linear)', stroke: fill, strokeWidth: '2' }),
|
|
13
|
+
React__default['default'].createElement("defs", null,
|
|
14
|
+
React__default['default'].createElement("linearGradient", { id: 'paint0_linear', x1: '11', y1: '1', x2: '11', y2: '21', gradientUnits: 'userSpaceOnUse' },
|
|
15
|
+
React__default['default'].createElement("stop", { stopColor: fill, stopOpacity: '0.2' }),
|
|
16
|
+
React__default['default'].createElement("stop", { offset: '1', stopColor: fill, stopOpacity: '0' })))));
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
exports.FilledCircleIcon = FilledCircleIcon;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2
|
+
|
|
3
|
+
var React = require('react');
|
|
4
|
+
|
|
5
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
6
|
+
|
|
7
|
+
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
8
|
+
|
|
9
|
+
var PointIcon = function (_a) {
|
|
10
|
+
var _b = _a.fill, fill = _b === void 0 ? '#5A8ECF' : _b, _c = _a.height, height = _c === void 0 ? 16 : _c;
|
|
11
|
+
return (React__default['default'].createElement("svg", { height: height, viewBox: '0 0 18 18' },
|
|
12
|
+
React__default['default'].createElement("circle", { cx: '9', cy: '9', r: '9', strokeWidth: '1', fill: fill, fillOpacity: '0.4' }),
|
|
13
|
+
React__default['default'].createElement("circle", { cx: '9', cy: '9', r: '3', strokeWidth: '2', stroke: '#fff', fill: fill })));
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
exports.PointIcon = PointIcon;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2
|
+
|
|
3
|
+
var React = require('react');
|
|
4
|
+
|
|
5
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
6
|
+
|
|
7
|
+
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
8
|
+
|
|
9
|
+
var StrokeCircleIcon = function (_a) {
|
|
10
|
+
var _b = _a.fill, fill = _b === void 0 ? '#5A8ECF' : _b, _c = _a.height, height = _c === void 0 ? 16 : _c;
|
|
11
|
+
return (React__default['default'].createElement("svg", { xmlns: 'http://www.w3.org/2000/svg', width: 'auto', height: height, viewBox: '0 0 22 22', fill: 'none' },
|
|
12
|
+
React__default['default'].createElement("circle", { cx: '11', cy: '11', r: '10', stroke: fill, strokeWidth: '2', strokeDasharray: '8 8' })));
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
exports.StrokeCircleIcon = StrokeCircleIcon;
|
package/chart/index.css
ADDED
package/chart/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Component";
|
package/chart/index.js
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
require('./tslib.es6-62c2b032.js');
|
|
2
|
+
require('react');
|
|
3
|
+
require('classnames');
|
|
4
|
+
require('recharts');
|
|
5
|
+
require('./Component.js');
|
|
6
|
+
require('./components/LinearGradient.js');
|
|
7
|
+
require('../typography');
|
|
8
|
+
require('./icons/Circle.js');
|
|
9
|
+
require('./icons/CircleLine.js');
|
|
10
|
+
require('./icons/FilledCircle.js');
|
|
11
|
+
require('./icons/StrokeCircle.js');
|
|
12
|
+
require('./components/Legends/index.js');
|
|
13
|
+
require('./icons/Point.js');
|
|
14
|
+
require('./components/Dot/index.js');
|
|
15
|
+
require('./hooks/useSettings/utils/setComposedChartsMargin.js');
|
|
16
|
+
require('./hooks/useSettings/utils/setDatas.js');
|
|
17
|
+
require('./hooks/useSettings/utils/setGradientCharts.js');
|
|
18
|
+
require('./hooks/useSettings/utils/setLegendMargin.js');
|
|
19
|
+
require('./hooks/useSettings/utils/sortByIndex.js');
|
|
20
|
+
require('./hooks/useSettings/index.js');
|
|
21
|
+
require('./components/Tick/index.js');
|
|
22
|
+
require('./components/TooltipContent/index.js');
|
|
@@ -0,0 +1,258 @@
|
|
|
1
|
+
import React, { useState, useRef, useMemo, useCallback, useEffect } from 'react';
|
|
2
|
+
import cn from 'classnames';
|
|
3
|
+
import { Legend, CartesianGrid, XAxis, YAxis, Brush, Tooltip, Area, Line, Bar, Cell, ResponsiveContainer, ComposedChart } from 'recharts';
|
|
4
|
+
import { LinearGradient } from './components/LinearGradient.js';
|
|
5
|
+
import '../../typography/modern';
|
|
6
|
+
import './icons/Circle.js';
|
|
7
|
+
import './icons/CircleLine.js';
|
|
8
|
+
import './icons/FilledCircle.js';
|
|
9
|
+
import './icons/StrokeCircle.js';
|
|
10
|
+
import { Legends } from './components/Legends/index.js';
|
|
11
|
+
import './icons/Point.js';
|
|
12
|
+
import { Dot } from './components/Dot/index.js';
|
|
13
|
+
import './hooks/useSettings/utils/setComposedChartsMargin.js';
|
|
14
|
+
import './hooks/useSettings/utils/setDatas.js';
|
|
15
|
+
import './hooks/useSettings/utils/setGradientCharts.js';
|
|
16
|
+
import './hooks/useSettings/utils/setLegendMargin.js';
|
|
17
|
+
import './hooks/useSettings/utils/sortByIndex.js';
|
|
18
|
+
import { useSettings } from './hooks/useSettings/index.js';
|
|
19
|
+
import { Tick } from './components/Tick/index.js';
|
|
20
|
+
import { TooltipContent } from './components/TooltipContent/index.js';
|
|
21
|
+
|
|
22
|
+
const CustomizedHOC = (Component, options) => {
|
|
23
|
+
const NewComponent = props => {
|
|
24
|
+
return React.createElement(Component, Object.assign({}, props, options));
|
|
25
|
+
};
|
|
26
|
+
return NewComponent;
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
var styles = {"coreChart":"chart__coreChart_y5qhn","bar":"chart__bar_y5qhn","unfocused":"chart__unfocused_y5qhn"};
|
|
30
|
+
require('./index.css');
|
|
31
|
+
|
|
32
|
+
const Chart = (props) => {
|
|
33
|
+
const [{ state, data, charts, filterCount }, { setCharts, setFilterCount }] = useSettings(props);
|
|
34
|
+
const [activeDotsState, setActiveDotsState] = useState({
|
|
35
|
+
prev: null,
|
|
36
|
+
active: null,
|
|
37
|
+
});
|
|
38
|
+
const [yBrush, setYBrush] = useState(null);
|
|
39
|
+
const [tooltipArrowSide, setTooltipArrowSide] = useState(null);
|
|
40
|
+
const [heightLegend, setHeightLegend] = useState(0);
|
|
41
|
+
const svgRef = useRef(null);
|
|
42
|
+
const tooltipRef = useRef(null);
|
|
43
|
+
const renderGradient = useMemo(() => {
|
|
44
|
+
if (!state)
|
|
45
|
+
return null;
|
|
46
|
+
return state.series.map((item) => {
|
|
47
|
+
const { chart, gradient } = item;
|
|
48
|
+
if (chart !== 'gradient' || !gradient)
|
|
49
|
+
return null;
|
|
50
|
+
const { gid, points } = gradient;
|
|
51
|
+
return (React.createElement(LinearGradient, { key: `${state.id}-${gid}`, id: state.id, gid: gid, points: points }));
|
|
52
|
+
});
|
|
53
|
+
}, [state]);
|
|
54
|
+
const toggleChart = useCallback((item) => {
|
|
55
|
+
const { chart, properties: { dataKey }, } = item;
|
|
56
|
+
const withGrad = chart === 'area';
|
|
57
|
+
let changed = false;
|
|
58
|
+
if (charts[`${dataKey}`] && filterCount > 1) {
|
|
59
|
+
changed = true;
|
|
60
|
+
setFilterCount(prev => prev - 1);
|
|
61
|
+
}
|
|
62
|
+
if (!charts[`${dataKey}`]) {
|
|
63
|
+
changed = true;
|
|
64
|
+
setFilterCount(prev => prev + 1);
|
|
65
|
+
}
|
|
66
|
+
if (!changed)
|
|
67
|
+
return;
|
|
68
|
+
setCharts((prev) => {
|
|
69
|
+
const newState = { ...prev };
|
|
70
|
+
newState[`${dataKey}`] = !newState[`${dataKey}`];
|
|
71
|
+
if (withGrad)
|
|
72
|
+
newState[`${dataKey}-gradient`] = !newState[`${dataKey}-gradient`];
|
|
73
|
+
return newState;
|
|
74
|
+
});
|
|
75
|
+
}, [charts, filterCount, setCharts, setFilterCount]);
|
|
76
|
+
const legendRef = useCallback((node) => {
|
|
77
|
+
if (node !== null) {
|
|
78
|
+
setTimeout(() => {
|
|
79
|
+
const { height } = node.getBoundingClientRect();
|
|
80
|
+
setHeightLegend(height);
|
|
81
|
+
}, 0);
|
|
82
|
+
}
|
|
83
|
+
}, []);
|
|
84
|
+
const renderLegend = useMemo(() => {
|
|
85
|
+
if (!state?.legend)
|
|
86
|
+
return null;
|
|
87
|
+
const translate = state?.xAxis?.tickMargin && state?.legend?.verticalAlign !== 'top'
|
|
88
|
+
? state.xAxis.tickMargin + (state?.brush?.brushMargin || 0)
|
|
89
|
+
: 0;
|
|
90
|
+
return (React.createElement(Legend, Object.assign({}, (state.legend || null), { content: React.createElement(Legends, { legend: state.legend, series: state.series, id: state.id, toggleChart: toggleChart, ref: legendRef, charts: charts }), wrapperStyle: {
|
|
91
|
+
transform: `translateY(${translate}px)`,
|
|
92
|
+
} })));
|
|
93
|
+
}, [state, charts, toggleChart, legendRef]);
|
|
94
|
+
const renderCartesianGrid = useMemo(() => {
|
|
95
|
+
if (!state?.cartesianGrid)
|
|
96
|
+
return null;
|
|
97
|
+
return React.createElement(CartesianGrid, Object.assign({}, state.cartesianGrid));
|
|
98
|
+
}, [state]);
|
|
99
|
+
const renderXAxis = useMemo(() => {
|
|
100
|
+
if (!state?.xAxis)
|
|
101
|
+
return null;
|
|
102
|
+
let tick;
|
|
103
|
+
if (state?.xAxis?.tickType === 'point') {
|
|
104
|
+
tick = CustomizedHOC(Tick, { xAxis: state.xAxis });
|
|
105
|
+
}
|
|
106
|
+
else if (typeof state.xAxis.tick === 'boolean') {
|
|
107
|
+
tick = state.xAxis.tick;
|
|
108
|
+
}
|
|
109
|
+
else {
|
|
110
|
+
tick = true;
|
|
111
|
+
}
|
|
112
|
+
return React.createElement(XAxis, Object.assign({}, state.xAxis, { tick: tick }));
|
|
113
|
+
}, [state]);
|
|
114
|
+
const renderYAxis = useMemo(() => {
|
|
115
|
+
if (!state?.yAxis)
|
|
116
|
+
return null;
|
|
117
|
+
let tick;
|
|
118
|
+
if (state?.yAxis?.tick) {
|
|
119
|
+
tick = CustomizedHOC(state.yAxis.tick, { state });
|
|
120
|
+
}
|
|
121
|
+
else if (typeof state.yAxis.tick === 'boolean') {
|
|
122
|
+
tick = state.yAxis.tick;
|
|
123
|
+
}
|
|
124
|
+
else {
|
|
125
|
+
tick = true;
|
|
126
|
+
}
|
|
127
|
+
return React.createElement(YAxis, Object.assign({}, state.yAxis, { tick: tick }));
|
|
128
|
+
}, [state]);
|
|
129
|
+
const renderBrush = useMemo(() => {
|
|
130
|
+
if (!state?.brush)
|
|
131
|
+
return null;
|
|
132
|
+
return React.createElement(Brush, Object.assign({ y: typeof yBrush === 'number' ? yBrush : 0 }, state.brush));
|
|
133
|
+
}, [state, yBrush]);
|
|
134
|
+
const renderTooltip = useMemo(() => {
|
|
135
|
+
if (!state?.tooltip)
|
|
136
|
+
return null;
|
|
137
|
+
return (React.createElement(Tooltip, Object.assign({ ref: tooltipRef }, state.tooltip, { content: CustomizedHOC(TooltipContent, { series: state.series, tooltipArrowSide }) })));
|
|
138
|
+
}, [state, tooltipArrowSide]);
|
|
139
|
+
const renderChartsItems = useMemo(() => {
|
|
140
|
+
if (!state || !charts)
|
|
141
|
+
return null;
|
|
142
|
+
return state.series.map((item) => {
|
|
143
|
+
const { chart, properties } = item;
|
|
144
|
+
const show = charts[`${properties.dataKey}`];
|
|
145
|
+
switch (chart) {
|
|
146
|
+
case 'bar':
|
|
147
|
+
return show && !item?.hide ? (React.createElement(Bar, Object.assign({ key: `${state.id}-${properties.dataKey}` }, properties), data.map((_, index) => {
|
|
148
|
+
const key = `${state.id}-${properties.dataKey}-${index}`;
|
|
149
|
+
return (React.createElement(Cell, { key: key, className: cn(styles.bar, typeof activeDotsState.active === 'number' &&
|
|
150
|
+
activeDotsState.active !== index
|
|
151
|
+
? styles.unfocused
|
|
152
|
+
: '') }));
|
|
153
|
+
}))) : null;
|
|
154
|
+
case 'area':
|
|
155
|
+
case 'line':
|
|
156
|
+
return show && !item?.hide ? (React.createElement(Line, Object.assign({ key: `${state.id}-${properties.dataKey}` }, properties, { dot: properties.dot && properties.dotSettings
|
|
157
|
+
? CustomizedHOC(Dot, {
|
|
158
|
+
activeDot: activeDotsState.active,
|
|
159
|
+
dotSettings: properties.dotSettings,
|
|
160
|
+
inherit: properties?.inheritStroke
|
|
161
|
+
? properties.inheritStroke
|
|
162
|
+
: false,
|
|
163
|
+
})
|
|
164
|
+
: false, activeDot: false }))) : null;
|
|
165
|
+
case 'gradient':
|
|
166
|
+
return show && !item?.hide ? (React.createElement(Area, Object.assign({}, item.properties, { key: `${state.id}-${item.properties.dataKey}`, dataKey: `${item.properties.dataKey}`, stroke: 'transparent', fill: item.gradient.gid
|
|
167
|
+
? `url(#${state.id}-${item.gradient.gid})`
|
|
168
|
+
: item.properties.fill, dot: false, activeDot: false }))) : null;
|
|
169
|
+
default:
|
|
170
|
+
return null;
|
|
171
|
+
}
|
|
172
|
+
});
|
|
173
|
+
}, [charts, state, activeDotsState, data]);
|
|
174
|
+
// Позиционирование brush
|
|
175
|
+
useEffect(() => {
|
|
176
|
+
if (!state || !state.brush)
|
|
177
|
+
return;
|
|
178
|
+
if (!heightLegend || heightLegend === 0)
|
|
179
|
+
return;
|
|
180
|
+
const align = state?.legend?.verticalAlign;
|
|
181
|
+
const legendHeight = align === 'top' ? 0 : heightLegend;
|
|
182
|
+
const marginTick = state?.xAxis?.tickMargin ? state?.xAxis?.tickMargin : 0;
|
|
183
|
+
const brushY = (svgRef.current?.clientHeight ? svgRef.current.clientHeight : 0) -
|
|
184
|
+
legendHeight -
|
|
185
|
+
state.brush.height -
|
|
186
|
+
(state?.composeChart?.margin?.bottom ? state.composeChart.margin.bottom : 0) +
|
|
187
|
+
marginTick +
|
|
188
|
+
(state.brush?.brushMargin ? state.brush.brushMargin : 0);
|
|
189
|
+
setYBrush(brushY);
|
|
190
|
+
}, [heightLegend, state]);
|
|
191
|
+
const leaveEvent = (isTooltipActive) => {
|
|
192
|
+
if (isTooltipActive)
|
|
193
|
+
return;
|
|
194
|
+
if (typeof activeDotsState.prev !== 'number' || typeof activeDotsState.active !== 'number')
|
|
195
|
+
return;
|
|
196
|
+
setActiveDotsState({
|
|
197
|
+
prev: null,
|
|
198
|
+
active: null,
|
|
199
|
+
});
|
|
200
|
+
};
|
|
201
|
+
const arrowTooltipEvent = (activeCoordinate) => {
|
|
202
|
+
if (!state?.tooltip?.arrow)
|
|
203
|
+
return;
|
|
204
|
+
if (state?.tooltip?.arrow && activeCoordinate?.x) {
|
|
205
|
+
const side = (svgRef?.current?.clientWidth || 0) -
|
|
206
|
+
(state?.composeChart?.margin?.right || 0) -
|
|
207
|
+
activeCoordinate.x -
|
|
208
|
+
(tooltipRef.current?.state?.boxWidth || 0) >
|
|
209
|
+
20;
|
|
210
|
+
setTooltipArrowSide(side);
|
|
211
|
+
}
|
|
212
|
+
};
|
|
213
|
+
const hoverEvent = (isTooltipActive, activeTooltipIndex) => {
|
|
214
|
+
if (!isTooltipActive)
|
|
215
|
+
return;
|
|
216
|
+
if (typeof activeDotsState.active === 'number' &&
|
|
217
|
+
activeTooltipIndex === activeDotsState.active)
|
|
218
|
+
return;
|
|
219
|
+
if (typeof activeTooltipIndex === 'number' && typeof activeDotsState.active !== 'number') {
|
|
220
|
+
setActiveDotsState({
|
|
221
|
+
prev: activeTooltipIndex,
|
|
222
|
+
active: activeTooltipIndex,
|
|
223
|
+
});
|
|
224
|
+
}
|
|
225
|
+
if (typeof activeTooltipIndex === 'number' && typeof activeDotsState.prev === 'number') {
|
|
226
|
+
setActiveDotsState((prev) => {
|
|
227
|
+
return {
|
|
228
|
+
prev: prev.active,
|
|
229
|
+
active: activeTooltipIndex,
|
|
230
|
+
};
|
|
231
|
+
});
|
|
232
|
+
}
|
|
233
|
+
};
|
|
234
|
+
const mouseMove = (e) => {
|
|
235
|
+
arrowTooltipEvent(e.activeCoordinate);
|
|
236
|
+
hoverEvent(e.isTooltipActive, e.activeTooltipIndex);
|
|
237
|
+
leaveEvent(e.isTooltipActive);
|
|
238
|
+
};
|
|
239
|
+
const mouseLeave = (e) => {
|
|
240
|
+
leaveEvent(e.isTooltipActive);
|
|
241
|
+
};
|
|
242
|
+
if (!data || !charts || !state)
|
|
243
|
+
return null;
|
|
244
|
+
return (React.createElement("div", { className: styles.coreChart, ref: svgRef, id: state?.id || '', style: { width: '100%', height: '100%' } },
|
|
245
|
+
React.createElement(ResponsiveContainer, { debounce: state?.responsiveContainer?.debounce ? state.responsiveContainer.debounce : 0, width: '100%' },
|
|
246
|
+
React.createElement(ComposedChart, Object.assign({}, state?.composeChart, { onMouseMove: mouseMove, onMouseLeave: mouseLeave, data: data }),
|
|
247
|
+
React.createElement("defs", null, renderGradient),
|
|
248
|
+
state.cartesianGrid && renderCartesianGrid,
|
|
249
|
+
state.xAxis && renderXAxis,
|
|
250
|
+
state.yAxis && renderYAxis,
|
|
251
|
+
renderChartsItems,
|
|
252
|
+
state.tooltip && renderTooltip,
|
|
253
|
+
state.brush && renderBrush,
|
|
254
|
+
state.legend && renderLegend))));
|
|
255
|
+
};
|
|
256
|
+
var Component = React.memo(Chart);
|
|
257
|
+
|
|
258
|
+
export default Component;
|