@gravity-ui/chartkit 8.11.0 → 9.0.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/LICENSE +1 -0
- package/README.md +47 -11
- package/build/cjs/components/ChartKit.css +31 -0
- package/build/cjs/components/ChartKit.d.ts +11 -0
- package/build/cjs/components/ChartKit.js +43 -0
- package/build/cjs/components/ChartKit.js.map +1 -0
- package/build/cjs/components/ErrorBoundary/ErrorBoundary.d.ts +23 -0
- package/build/cjs/components/ErrorBoundary/ErrorBoundary.js +53 -0
- package/build/cjs/components/ErrorBoundary/ErrorBoundary.js.map +1 -0
- package/build/cjs/components/Loader/Loader.d.ts +9 -0
- package/build/cjs/components/Loader/Loader.js +20 -0
- package/build/cjs/components/Loader/Loader.js.map +1 -0
- package/build/cjs/components/SplitPane/Pane.d.ts +14 -0
- package/build/cjs/components/SplitPane/Pane.js +32 -0
- package/build/cjs/components/SplitPane/Pane.js.map +1 -0
- package/build/cjs/components/SplitPane/Resizer.d.ts +18 -0
- package/build/cjs/components/SplitPane/Resizer.js +32 -0
- package/build/cjs/components/SplitPane/Resizer.js.map +1 -0
- package/build/cjs/components/SplitPane/SplitPane.d.ts +60 -0
- package/build/cjs/components/SplitPane/SplitPane.js +259 -0
- package/build/cjs/components/SplitPane/SplitPane.js.map +1 -0
- package/build/cjs/components/SplitPane/StyledSplitPane.css +45 -0
- package/build/cjs/components/SplitPane/StyledSplitPane.d.ts +9 -0
- package/build/cjs/components/SplitPane/StyledSplitPane.js +35 -0
- package/build/cjs/components/SplitPane/StyledSplitPane.js.map +1 -0
- package/build/cjs/components/SplitPane/constants.js +8 -0
- package/build/cjs/components/SplitPane/constants.js.map +1 -0
- package/build/cjs/components/SplitPane/index.d.ts +8 -0
- package/build/cjs/components/SplitPane/index.js +25 -0
- package/build/cjs/components/SplitPane/index.js.map +1 -0
- package/build/cjs/components/SplitPane/types.d.ts +2 -0
- package/build/cjs/components/SplitPane/types.js +3 -0
- package/build/cjs/components/SplitPane/types.js.map +1 -0
- package/build/cjs/components/SplitTooltip/SplitTooltip.d.ts +63 -0
- package/build/cjs/components/SplitTooltip/SplitTooltip.js +141 -0
- package/build/cjs/components/SplitTooltip/SplitTooltip.js.map +1 -0
- package/build/cjs/components/SplitTooltip/index.d.ts +2 -0
- package/build/cjs/components/SplitTooltip/index.js +7 -0
- package/build/cjs/components/SplitTooltip/index.js.map +1 -0
- package/build/cjs/constants/common.js +6 -0
- package/build/cjs/constants/common.js.map +1 -0
- package/build/cjs/constants/index.d.ts +3 -0
- package/build/cjs/constants/index.js +9 -0
- package/build/cjs/constants/index.js.map +1 -0
- package/build/cjs/constants/misc.js +23 -0
- package/build/cjs/constants/misc.js.map +1 -0
- package/build/cjs/constants/widget-data.js +51 -0
- package/build/cjs/constants/widget-data.js.map +1 -0
- package/build/cjs/hooks/index.d.ts +1 -0
- package/build/cjs/hooks/index.js +5 -0
- package/build/cjs/hooks/index.js.map +1 -0
- package/build/cjs/hooks/misc.js +13 -0
- package/build/cjs/hooks/misc.js.map +1 -0
- package/build/cjs/i18n/index.d.ts +79 -0
- package/build/cjs/i18n/index.js +22 -0
- package/build/cjs/i18n/index.js.map +1 -0
- package/build/cjs/index.d.ts +8 -0
- package/build/cjs/index.js +13 -0
- package/build/cjs/index.js.map +1 -0
- package/build/cjs/libs/chartkit-error/chartkit-error.js +28 -0
- package/build/cjs/libs/chartkit-error/chartkit-error.js.map +1 -0
- package/build/cjs/libs/index.d.ts +3 -0
- package/build/cjs/libs/index.js +10 -0
- package/build/cjs/libs/index.js.map +1 -0
- package/build/cjs/libs/settings/eventEmitter.js +28 -0
- package/build/cjs/libs/settings/eventEmitter.js.map +1 -0
- package/build/cjs/libs/settings/mergeSettingStrategy.js +35 -0
- package/build/cjs/libs/settings/mergeSettingStrategy.js.map +1 -0
- package/build/cjs/libs/settings/settings.d.ts +22 -0
- package/build/cjs/libs/settings/settings.js +46 -0
- package/build/cjs/libs/settings/settings.js.map +1 -0
- package/build/cjs/package.json +1 -0
- package/build/cjs/plugins/gravity-charts/index.d.ts +5 -0
- package/build/cjs/plugins/gravity-charts/index.js +19 -0
- package/build/cjs/plugins/gravity-charts/index.js.map +1 -0
- package/build/cjs/plugins/gravity-charts/renderer/GravityChartsWidget.d.ts +21 -0
- package/build/cjs/plugins/gravity-charts/renderer/GravityChartsWidget.js +72 -0
- package/build/cjs/plugins/gravity-charts/renderer/GravityChartsWidget.js.map +1 -0
- package/build/cjs/plugins/gravity-charts/renderer/utils.d.ts +2 -0
- package/build/cjs/plugins/gravity-charts/renderer/utils.js +20 -0
- package/build/cjs/plugins/gravity-charts/renderer/utils.js.map +1 -0
- package/build/cjs/plugins/gravity-charts/renderer/withSplitPane/TooltipContent.js +17 -0
- package/build/cjs/plugins/gravity-charts/renderer/withSplitPane/TooltipContent.js.map +1 -0
- package/build/cjs/plugins/gravity-charts/renderer/withSplitPane/useViewportSplitTooltipLayout.d.ts +3 -0
- package/build/cjs/plugins/gravity-charts/renderer/withSplitPane/useViewportSplitTooltipLayout.js +35 -0
- package/build/cjs/plugins/gravity-charts/renderer/withSplitPane/useViewportSplitTooltipLayout.js.map +1 -0
- package/build/cjs/plugins/gravity-charts/renderer/withSplitPane/withSplitPane.d.ts +8 -0
- package/build/cjs/plugins/gravity-charts/renderer/withSplitPane/withSplitPane.js +75 -0
- package/build/cjs/plugins/gravity-charts/renderer/withSplitPane/withSplitPane.js.map +1 -0
- package/build/cjs/plugins/gravity-charts/types.d.ts +6 -0
- package/build/cjs/plugins/gravity-charts/types.js +3 -0
- package/build/cjs/plugins/gravity-charts/types.js.map +1 -0
- package/build/cjs/plugins/highcharts/index.d.ts +4 -0
- package/build/cjs/plugins/highcharts/index.js +15 -0
- package/build/cjs/plugins/highcharts/index.js.map +1 -0
- package/build/cjs/plugins/highcharts/renderer/HighchartsWidget.d.ts +31 -0
- package/build/cjs/plugins/highcharts/renderer/HighchartsWidget.js +10 -0
- package/build/cjs/plugins/highcharts/renderer/HighchartsWidget.js.map +1 -0
- package/build/cjs/plugins/highcharts/renderer/components/HighchartsComponent.d.ts +579 -0
- package/build/cjs/plugins/highcharts/renderer/components/HighchartsComponent.js +157 -0
- package/build/cjs/plugins/highcharts/renderer/components/HighchartsComponent.js.map +1 -0
- package/build/cjs/plugins/highcharts/renderer/components/HighchartsReact.d.ts +20 -0
- package/build/cjs/plugins/highcharts/renderer/components/HighchartsReact.js +78 -0
- package/build/cjs/plugins/highcharts/renderer/components/HighchartsReact.js.map +1 -0
- package/build/cjs/plugins/highcharts/renderer/components/useElementSize.js +55 -0
- package/build/cjs/plugins/highcharts/renderer/components/useElementSize.js.map +1 -0
- package/build/cjs/plugins/highcharts/renderer/components/withSplitPane/withSplitPane.d.ts +18 -0
- package/build/cjs/plugins/highcharts/renderer/components/withSplitPane/withSplitPane.js +221 -0
- package/build/cjs/plugins/highcharts/renderer/components/withSplitPane/withSplitPane.js.map +1 -0
- package/build/cjs/plugins/highcharts/renderer/helpers/add-holidays.d.ts +3 -0
- package/build/cjs/plugins/highcharts/renderer/helpers/add-holidays.js +47 -0
- package/build/cjs/plugins/highcharts/renderer/helpers/add-holidays.js.map +1 -0
- package/build/cjs/plugins/highcharts/renderer/helpers/comments/drawing.js +577 -0
- package/build/cjs/plugins/highcharts/renderer/helpers/comments/drawing.js.map +1 -0
- package/build/cjs/plugins/highcharts/renderer/helpers/config/config.js +1579 -0
- package/build/cjs/plugins/highcharts/renderer/helpers/config/config.js.map +1 -0
- package/build/cjs/plugins/highcharts/renderer/helpers/config/handleLegendItemClick.js +81 -0
- package/build/cjs/plugins/highcharts/renderer/helpers/config/handleLegendItemClick.js.map +1 -0
- package/build/cjs/plugins/highcharts/renderer/helpers/config/options.js +351 -0
- package/build/cjs/plugins/highcharts/renderer/helpers/config/options.js.map +1 -0
- package/build/cjs/plugins/highcharts/renderer/helpers/config/types.js +3 -0
- package/build/cjs/plugins/highcharts/renderer/helpers/config/types.js.map +1 -0
- package/build/cjs/plugins/highcharts/renderer/helpers/config/utils/addShowInNavigatorToSeries.d.ts +10 -0
- package/build/cjs/plugins/highcharts/renderer/helpers/config/utils/addShowInNavigatorToSeries.js +47 -0
- package/build/cjs/plugins/highcharts/renderer/helpers/config/utils/addShowInNavigatorToSeries.js.map +1 -0
- package/build/cjs/plugins/highcharts/renderer/helpers/config/utils/buildNavigatorFallback.js +22 -0
- package/build/cjs/plugins/highcharts/renderer/helpers/config/utils/buildNavigatorFallback.js.map +1 -0
- package/build/cjs/plugins/highcharts/renderer/helpers/config/utils/calculatePrecision.js +26 -0
- package/build/cjs/plugins/highcharts/renderer/helpers/config/utils/calculatePrecision.js.map +1 -0
- package/build/cjs/plugins/highcharts/renderer/helpers/config/utils/concatStrings.js +6 -0
- package/build/cjs/plugins/highcharts/renderer/helpers/config/utils/concatStrings.js.map +1 -0
- package/build/cjs/plugins/highcharts/renderer/helpers/config/utils/getChartKitFormattedValue.d.ts +2 -0
- package/build/cjs/plugins/highcharts/renderer/helpers/config/utils/getChartKitFormattedValue.js +20 -0
- package/build/cjs/plugins/highcharts/renderer/helpers/config/utils/getChartKitFormattedValue.js.map +1 -0
- package/build/cjs/plugins/highcharts/renderer/helpers/config/utils/getFormatOptionsFromLine.d.ts +3 -0
- package/build/cjs/plugins/highcharts/renderer/helpers/config/utils/getFormatOptionsFromLine.js +20 -0
- package/build/cjs/plugins/highcharts/renderer/helpers/config/utils/getFormatOptionsFromLine.js.map +1 -0
- package/build/cjs/plugins/highcharts/renderer/helpers/config/utils/getXAxisThresholdValue.js +25 -0
- package/build/cjs/plugins/highcharts/renderer/helpers/config/utils/getXAxisThresholdValue.js.map +1 -0
- package/build/cjs/plugins/highcharts/renderer/helpers/config/utils/index.d.ts +78 -0
- package/build/cjs/plugins/highcharts/renderer/helpers/config/utils/index.js +39 -0
- package/build/cjs/plugins/highcharts/renderer/helpers/config/utils/index.js.map +1 -0
- package/build/cjs/plugins/highcharts/renderer/helpers/config/utils/isNavigatorSeries.d.ts +2 -0
- package/build/cjs/plugins/highcharts/renderer/helpers/config/utils/isNavigatorSeries.js +8 -0
- package/build/cjs/plugins/highcharts/renderer/helpers/config/utils/isNavigatorSeries.js.map +1 -0
- package/build/cjs/plugins/highcharts/renderer/helpers/config/utils/isSafari.js +16 -0
- package/build/cjs/plugins/highcharts/renderer/helpers/config/utils/isSafari.js.map +1 -0
- package/build/cjs/plugins/highcharts/renderer/helpers/config/utils/localStorage.js +26 -0
- package/build/cjs/plugins/highcharts/renderer/helpers/config/utils/localStorage.js.map +1 -0
- package/build/cjs/plugins/highcharts/renderer/helpers/config/utils/mergeArrayWithObject.js +15 -0
- package/build/cjs/plugins/highcharts/renderer/helpers/config/utils/mergeArrayWithObject.js.map +1 -0
- package/build/cjs/plugins/highcharts/renderer/helpers/config/utils/numberFormat.d.ts +2 -0
- package/build/cjs/plugins/highcharts/renderer/helpers/config/utils/numberFormat.js +33 -0
- package/build/cjs/plugins/highcharts/renderer/helpers/config/utils/numberFormat.js.map +1 -0
- package/build/cjs/plugins/highcharts/renderer/helpers/config/utils/setNavigatorDefaultPeriod.d.ts +13 -0
- package/build/cjs/plugins/highcharts/renderer/helpers/config/utils/setNavigatorDefaultPeriod.js +33 -0
- package/build/cjs/plugins/highcharts/renderer/helpers/config/utils/setNavigatorDefaultPeriod.js.map +1 -0
- package/build/cjs/plugins/highcharts/renderer/helpers/config/utils/tooltip.d.ts +7 -0
- package/build/cjs/plugins/highcharts/renderer/helpers/config/utils/tooltip.js +30 -0
- package/build/cjs/plugins/highcharts/renderer/helpers/config/utils/tooltip.js.map +1 -0
- package/build/cjs/plugins/highcharts/renderer/helpers/constants.js +35 -0
- package/build/cjs/plugins/highcharts/renderer/helpers/constants.js.map +1 -0
- package/build/cjs/plugins/highcharts/renderer/helpers/graph.css +82 -0
- package/build/cjs/plugins/highcharts/renderer/helpers/graph.d.ts +553 -0
- package/build/cjs/plugins/highcharts/renderer/helpers/graph.js +94 -0
- package/build/cjs/plugins/highcharts/renderer/helpers/graph.js.map +1 -0
- package/build/cjs/plugins/highcharts/renderer/helpers/highcharts/colors.js +20 -0
- package/build/cjs/plugins/highcharts/renderer/helpers/highcharts/colors.js.map +1 -0
- package/build/cjs/plugins/highcharts/renderer/helpers/highcharts/highcharts.js +376 -0
- package/build/cjs/plugins/highcharts/renderer/helpers/highcharts/highcharts.js.map +1 -0
- package/build/cjs/plugins/highcharts/renderer/helpers/highcharts/utils/calcucalteClosestPointManually.js +23 -0
- package/build/cjs/plugins/highcharts/renderer/helpers/highcharts/utils/calcucalteClosestPointManually.js.map +1 -0
- package/build/cjs/plugins/highcharts/renderer/helpers/highcharts/utils/index.d.ts +1 -0
- package/build/cjs/plugins/highcharts/renderer/helpers/highcharts/utils/index.js +6 -0
- package/build/cjs/plugins/highcharts/renderer/helpers/highcharts/utils/index.js.map +1 -0
- package/build/cjs/plugins/highcharts/renderer/helpers/prepare-data.js +186 -0
- package/build/cjs/plugins/highcharts/renderer/helpers/prepare-data.js.map +1 -0
- package/build/cjs/plugins/highcharts/renderer/helpers/tooltip/constants.js +18 -0
- package/build/cjs/plugins/highcharts/renderer/helpers/tooltip/constants.js.map +1 -0
- package/build/cjs/plugins/highcharts/renderer/helpers/tooltip/helpers.js +10 -0
- package/build/cjs/plugins/highcharts/renderer/helpers/tooltip/helpers.js.map +1 -0
- package/build/cjs/plugins/highcharts/renderer/helpers/tooltip/index.d.ts +13 -0
- package/build/cjs/plugins/highcharts/renderer/helpers/tooltip/index.js +274 -0
- package/build/cjs/plugins/highcharts/renderer/helpers/tooltip/index.js.map +1 -0
- package/build/cjs/plugins/highcharts/renderer/helpers/tooltip/render-shape-icon/index.d.ts +6 -0
- package/build/cjs/plugins/highcharts/renderer/helpers/tooltip/render-shape-icon/index.js +27 -0
- package/build/cjs/plugins/highcharts/renderer/helpers/tooltip/render-shape-icon/index.js.map +1 -0
- package/build/cjs/plugins/highcharts/renderer/helpers/tooltip/render-shape-icon/template-icons/DashDotLineIcon.d.ts +2 -0
- package/build/cjs/plugins/highcharts/renderer/helpers/tooltip/render-shape-icon/template-icons/DashDotLineIcon.js +25 -0
- package/build/cjs/plugins/highcharts/renderer/helpers/tooltip/render-shape-icon/template-icons/DashDotLineIcon.js.map +1 -0
- package/build/cjs/plugins/highcharts/renderer/helpers/tooltip/render-shape-icon/template-icons/DashLineIcon.d.ts +2 -0
- package/build/cjs/plugins/highcharts/renderer/helpers/tooltip/render-shape-icon/template-icons/DashLineIcon.js +30 -0
- package/build/cjs/plugins/highcharts/renderer/helpers/tooltip/render-shape-icon/template-icons/DashLineIcon.js.map +1 -0
- package/build/cjs/plugins/highcharts/renderer/helpers/tooltip/render-shape-icon/template-icons/DotLineIcon.d.ts +2 -0
- package/build/cjs/plugins/highcharts/renderer/helpers/tooltip/render-shape-icon/template-icons/DotLineIcon.js +25 -0
- package/build/cjs/plugins/highcharts/renderer/helpers/tooltip/render-shape-icon/template-icons/DotLineIcon.js.map +1 -0
- package/build/cjs/plugins/highcharts/renderer/helpers/tooltip/render-shape-icon/template-icons/LongDashDotDotLineIcon.d.ts +2 -0
- package/build/cjs/plugins/highcharts/renderer/helpers/tooltip/render-shape-icon/template-icons/LongDashDotDotLineIcon.js +23 -0
- package/build/cjs/plugins/highcharts/renderer/helpers/tooltip/render-shape-icon/template-icons/LongDashDotDotLineIcon.js.map +1 -0
- package/build/cjs/plugins/highcharts/renderer/helpers/tooltip/render-shape-icon/template-icons/LongDashDotLineIcon.d.ts +2 -0
- package/build/cjs/plugins/highcharts/renderer/helpers/tooltip/render-shape-icon/template-icons/LongDashDotLineIcon.js +23 -0
- package/build/cjs/plugins/highcharts/renderer/helpers/tooltip/render-shape-icon/template-icons/LongDashDotLineIcon.js.map +1 -0
- package/build/cjs/plugins/highcharts/renderer/helpers/tooltip/render-shape-icon/template-icons/LongDashLineIcon.d.ts +2 -0
- package/build/cjs/plugins/highcharts/renderer/helpers/tooltip/render-shape-icon/template-icons/LongDashLineIcon.js +20 -0
- package/build/cjs/plugins/highcharts/renderer/helpers/tooltip/render-shape-icon/template-icons/LongDashLineIcon.js.map +1 -0
- package/build/cjs/plugins/highcharts/renderer/helpers/tooltip/render-shape-icon/template-icons/ShortDashDotDotLineIcon.d.ts +2 -0
- package/build/cjs/plugins/highcharts/renderer/helpers/tooltip/render-shape-icon/template-icons/ShortDashDotDotLineIcon.js +23 -0
- package/build/cjs/plugins/highcharts/renderer/helpers/tooltip/render-shape-icon/template-icons/ShortDashDotDotLineIcon.js.map +1 -0
- package/build/cjs/plugins/highcharts/renderer/helpers/tooltip/render-shape-icon/template-icons/ShortDashDotLineIcon.d.ts +2 -0
- package/build/cjs/plugins/highcharts/renderer/helpers/tooltip/render-shape-icon/template-icons/ShortDashDotLineIcon.js +23 -0
- package/build/cjs/plugins/highcharts/renderer/helpers/tooltip/render-shape-icon/template-icons/ShortDashDotLineIcon.js.map +1 -0
- package/build/cjs/plugins/highcharts/renderer/helpers/tooltip/render-shape-icon/template-icons/ShortDashLineIcon.d.ts +2 -0
- package/build/cjs/plugins/highcharts/renderer/helpers/tooltip/render-shape-icon/template-icons/ShortDashLineIcon.js +23 -0
- package/build/cjs/plugins/highcharts/renderer/helpers/tooltip/render-shape-icon/template-icons/ShortDashLineIcon.js.map +1 -0
- package/build/cjs/plugins/highcharts/renderer/helpers/tooltip/render-shape-icon/template-icons/ShortDotLineIcon.d.ts +2 -0
- package/build/cjs/plugins/highcharts/renderer/helpers/tooltip/render-shape-icon/template-icons/ShortDotLineIcon.js +25 -0
- package/build/cjs/plugins/highcharts/renderer/helpers/tooltip/render-shape-icon/template-icons/ShortDotLineIcon.js.map +1 -0
- package/build/cjs/plugins/highcharts/renderer/helpers/tooltip/render-shape-icon/template-icons/SolidLineIcon.d.ts +2 -0
- package/build/cjs/plugins/highcharts/renderer/helpers/tooltip/render-shape-icon/template-icons/SolidLineIcon.js +18 -0
- package/build/cjs/plugins/highcharts/renderer/helpers/tooltip/render-shape-icon/template-icons/SolidLineIcon.js.map +1 -0
- package/build/cjs/plugins/highcharts/renderer/helpers/tooltip/render-shape-icon/template-icons/index.d.ts +11 -0
- package/build/cjs/plugins/highcharts/renderer/helpers/tooltip/render-shape-icon/template-icons/index.js +26 -0
- package/build/cjs/plugins/highcharts/renderer/helpers/tooltip/render-shape-icon/template-icons/index.js.map +1 -0
- package/build/cjs/plugins/highcharts/renderer/helpers/tooltip/render-shape-icon/types.js +3 -0
- package/build/cjs/plugins/highcharts/renderer/helpers/tooltip/render-shape-icon/types.js.map +1 -0
- package/build/cjs/plugins/highcharts/renderer/helpers/tooltip/render-shape-icon/utils.js +10 -0
- package/build/cjs/plugins/highcharts/renderer/helpers/tooltip/render-shape-icon/utils.js.map +1 -0
- package/build/cjs/plugins/highcharts/renderer/helpers/tooltip/tooltip.css +313 -0
- package/build/cjs/plugins/highcharts/renderer/helpers/tooltip/types.d.ts +88 -0
- package/build/cjs/plugins/highcharts/renderer/helpers/tooltip/types.js +3 -0
- package/build/cjs/plugins/highcharts/renderer/helpers/tooltip/types.js.map +1 -0
- package/build/cjs/plugins/highcharts/renderer/helpers/types.d.ts +22 -0
- package/build/cjs/plugins/highcharts/renderer/helpers/types.js +3 -0
- package/build/cjs/plugins/highcharts/renderer/helpers/types.js.map +1 -0
- package/build/cjs/plugins/highcharts/types/comments.js +3 -0
- package/build/cjs/plugins/highcharts/types/comments.js.map +1 -0
- package/build/cjs/plugins/highcharts/types/index.d.ts +4 -0
- package/build/cjs/plugins/highcharts/types/index.js +3 -0
- package/build/cjs/plugins/highcharts/types/index.js.map +1 -0
- package/build/cjs/plugins/highcharts/types/lib.js +6 -0
- package/build/cjs/plugins/highcharts/types/lib.js.map +1 -0
- package/build/cjs/plugins/highcharts/types/misc.d.ts +22 -0
- package/build/cjs/plugins/highcharts/types/misc.js +3 -0
- package/build/cjs/plugins/highcharts/types/misc.js.map +1 -0
- package/build/cjs/plugins/highcharts/types/widget.d.ts +117 -0
- package/build/cjs/plugins/highcharts/types/widget.js +3 -0
- package/build/cjs/plugins/highcharts/types/widget.js.map +1 -0
- package/build/cjs/plugins/indicator/index.d.ts +3 -0
- package/build/cjs/plugins/indicator/index.js +13 -0
- package/build/cjs/plugins/indicator/index.js.map +1 -0
- package/build/cjs/plugins/indicator/renderer/IndicatorItem.d.ts +7 -0
- package/build/cjs/plugins/indicator/renderer/IndicatorItem.js +21 -0
- package/build/cjs/plugins/indicator/renderer/IndicatorItem.js.map +1 -0
- package/build/cjs/plugins/indicator/renderer/IndicatorWidget.css +51 -0
- package/build/cjs/plugins/indicator/renderer/IndicatorWidget.d.ts +20 -0
- package/build/cjs/plugins/indicator/renderer/IndicatorWidget.js +38 -0
- package/build/cjs/plugins/indicator/renderer/IndicatorWidget.js.map +1 -0
- package/build/cjs/plugins/indicator/types.js +3 -0
- package/build/cjs/plugins/indicator/types.js.map +1 -0
- package/build/cjs/plugins/shared/format-number/format-number.d.ts +5 -0
- package/build/cjs/plugins/shared/format-number/format-number.js +97 -0
- package/build/cjs/plugins/shared/format-number/format-number.js.map +1 -0
- package/build/cjs/plugins/shared/format-number/i18n/i18n.js +13 -0
- package/build/cjs/plugins/shared/format-number/i18n/i18n.js.map +1 -0
- package/build/cjs/plugins/shared/format-number/types.js +3 -0
- package/build/cjs/plugins/shared/format-number/types.js.map +1 -0
- package/build/cjs/plugins/shared/index.d.ts +2 -0
- package/build/cjs/plugins/shared/index.js +6 -0
- package/build/cjs/plugins/shared/index.js.map +1 -0
- package/build/cjs/plugins/yagr/index.d.ts +3 -0
- package/build/cjs/plugins/yagr/index.js +11 -0
- package/build/cjs/plugins/yagr/index.js.map +1 -0
- package/build/cjs/plugins/yagr/renderer/YagrWidget.d.ts +24 -0
- package/build/cjs/plugins/yagr/renderer/YagrWidget.js +82 -0
- package/build/cjs/plugins/yagr/renderer/YagrWidget.js.map +1 -0
- package/build/cjs/plugins/yagr/renderer/polyfills.js +17 -0
- package/build/cjs/plugins/yagr/renderer/polyfills.js.map +1 -0
- package/build/cjs/plugins/yagr/renderer/tooltip/helpers/escapeHTML.js +9 -0
- package/build/cjs/plugins/yagr/renderer/tooltip/helpers/escapeHTML.js.map +1 -0
- package/build/cjs/plugins/yagr/renderer/tooltip/index.d.ts +1 -0
- package/build/cjs/plugins/yagr/renderer/tooltip/index.js +6 -0
- package/build/cjs/plugins/yagr/renderer/tooltip/index.js.map +1 -0
- package/build/cjs/plugins/yagr/renderer/tooltip/renderTooltip.d.ts +2 -0
- package/build/cjs/plugins/yagr/renderer/tooltip/renderTooltip.js +72 -0
- package/build/cjs/plugins/yagr/renderer/tooltip/renderTooltip.js.map +1 -0
- package/build/cjs/plugins/yagr/renderer/tooltip/tooltip.css +306 -0
- package/build/cjs/plugins/yagr/renderer/tooltip/tooltip.d.ts +3 -0
- package/build/cjs/plugins/yagr/renderer/tooltip/tooltip.js +241 -0
- package/build/cjs/plugins/yagr/renderer/tooltip/tooltip.js.map +1 -0
- package/build/cjs/plugins/yagr/renderer/tooltip/types.js +3 -0
- package/build/cjs/plugins/yagr/renderer/tooltip/types.js.map +1 -0
- package/build/cjs/plugins/yagr/renderer/useWidgetData.d.ts +6 -0
- package/build/cjs/plugins/yagr/renderer/useWidgetData.js +31 -0
- package/build/cjs/plugins/yagr/renderer/useWidgetData.js.map +1 -0
- package/build/cjs/plugins/yagr/renderer/utils.d.ts +29 -0
- package/build/cjs/plugins/yagr/renderer/utils.js +154 -0
- package/build/cjs/plugins/yagr/renderer/utils.js.map +1 -0
- package/build/cjs/plugins/yagr/types.d.ts +32 -0
- package/build/cjs/plugins/yagr/types.js +3 -0
- package/build/cjs/plugins/yagr/types.js.map +1 -0
- package/build/cjs/types/index.d.ts +75 -0
- package/build/cjs/types/index.js +3 -0
- package/build/cjs/types/index.js.map +1 -0
- package/build/cjs/types/misc.js +3 -0
- package/build/cjs/types/misc.js.map +1 -0
- package/build/cjs/types/widget.d.ts +41 -0
- package/build/cjs/types/widget.js +3 -0
- package/build/cjs/types/widget.js.map +1 -0
- package/build/cjs/utils/cn.js +8 -0
- package/build/cjs/utils/cn.js.map +1 -0
- package/build/cjs/utils/common.js +14 -0
- package/build/cjs/utils/common.js.map +1 -0
- package/build/cjs/utils/getErrorMessage.d.ts +2 -0
- package/build/cjs/utils/getErrorMessage.js +9 -0
- package/build/cjs/utils/getErrorMessage.js.map +1 -0
- package/build/cjs/utils/index.d.ts +4 -0
- package/build/cjs/utils/index.js +12 -0
- package/build/cjs/utils/index.js.map +1 -0
- package/build/cjs/utils/merge.d.ts +19 -0
- package/build/cjs/utils/merge.js +154 -0
- package/build/cjs/utils/merge.js.map +1 -0
- package/build/cjs/utils/misc.d.ts +2 -0
- package/build/cjs/utils/misc.js +11 -0
- package/build/cjs/utils/misc.js.map +1 -0
- package/build/cjs/utils/performance.js +27 -0
- package/build/cjs/utils/performance.js.map +1 -0
- package/build/cjs/utils/react.js +9 -0
- package/build/cjs/utils/react.js.map +1 -0
- package/build/cjs/utils/throttle.d.ts +13 -0
- package/build/cjs/utils/throttle.js +47 -0
- package/build/cjs/utils/throttle.js.map +1 -0
- package/build/docs/INDEX.md +35 -9
- package/build/docs/guides/migration-to-v9.md +52 -0
- package/build/docs/guides/testing.md +12 -11
- package/build/esm/components/ChartKit.css +31 -0
- package/build/esm/components/ChartKit.d.ts +11 -0
- package/build/esm/components/ChartKit.js +39 -0
- package/build/esm/components/ChartKit.js.map +1 -0
- package/build/esm/components/ErrorBoundary/ErrorBoundary.d.ts +23 -0
- package/build/esm/components/ErrorBoundary/ErrorBoundary.js +48 -0
- package/build/esm/components/ErrorBoundary/ErrorBoundary.js.map +1 -0
- package/build/esm/components/Loader/Loader.css +7 -0
- package/build/esm/components/Loader/Loader.d.ts +9 -0
- package/build/esm/components/Loader/Loader.js +15 -0
- package/build/esm/components/Loader/Loader.js.map +1 -0
- package/build/esm/components/SplitPane/Pane.d.ts +14 -0
- package/build/esm/components/SplitPane/Pane.js +27 -0
- package/build/esm/components/SplitPane/Pane.js.map +1 -0
- package/build/esm/components/SplitPane/Resizer.d.ts +18 -0
- package/build/esm/components/SplitPane/Resizer.js +27 -0
- package/build/esm/components/SplitPane/Resizer.js.map +1 -0
- package/build/esm/components/SplitPane/SplitPane.d.ts +60 -0
- package/build/esm/components/SplitPane/SplitPane.js +254 -0
- package/build/esm/components/SplitPane/SplitPane.js.map +1 -0
- package/build/esm/components/SplitPane/StyledSplitPane.css +45 -0
- package/build/esm/components/SplitPane/StyledSplitPane.d.ts +9 -0
- package/build/esm/components/SplitPane/StyledSplitPane.js +30 -0
- package/build/esm/components/SplitPane/StyledSplitPane.js.map +1 -0
- package/build/esm/components/SplitPane/constants.d.ts +4 -0
- package/build/esm/components/SplitPane/constants.js +5 -0
- package/build/esm/components/SplitPane/constants.js.map +1 -0
- package/build/esm/components/SplitPane/index.d.ts +8 -0
- package/build/esm/components/SplitPane/index.js +19 -0
- package/build/esm/components/SplitPane/index.js.map +1 -0
- package/build/esm/components/SplitPane/types.d.ts +2 -0
- package/build/esm/components/SplitPane/types.js +2 -0
- package/build/esm/components/SplitPane/types.js.map +1 -0
- package/build/esm/components/SplitTooltip/SplitTooltip.d.ts +63 -0
- package/build/esm/components/SplitTooltip/SplitTooltip.js +133 -0
- package/build/esm/components/SplitTooltip/SplitTooltip.js.map +1 -0
- package/build/esm/components/SplitTooltip/index.d.ts +2 -0
- package/build/esm/components/SplitTooltip/index.js +2 -0
- package/build/esm/components/SplitTooltip/index.js.map +1 -0
- package/build/esm/constants/common.d.ts +1 -0
- package/build/esm/constants/common.js +3 -0
- package/build/esm/constants/common.js.map +1 -0
- package/build/esm/constants/index.d.ts +3 -0
- package/build/esm/constants/index.js +4 -0
- package/build/esm/constants/index.js.map +1 -0
- package/build/esm/constants/misc.d.ts +10 -0
- package/build/esm/constants/misc.js +20 -0
- package/build/esm/constants/misc.js.map +1 -0
- package/build/esm/constants/widget-data.d.ts +43 -0
- package/build/esm/constants/widget-data.js +48 -0
- package/build/esm/constants/widget-data.js.map +1 -0
- package/build/esm/hooks/index.d.ts +1 -0
- package/build/esm/hooks/index.js +2 -0
- package/build/esm/hooks/index.js.map +1 -0
- package/build/esm/hooks/misc.d.ts +1 -0
- package/build/esm/hooks/misc.js +9 -0
- package/build/esm/hooks/misc.js.map +1 -0
- package/build/esm/i18n/index.d.ts +79 -0
- package/build/esm/i18n/index.js +17 -0
- package/build/esm/i18n/index.js.map +1 -0
- package/build/esm/i18n/keysets/en.json +80 -0
- package/build/esm/i18n/keysets/ru.json +79 -0
- package/build/esm/index.d.ts +8 -0
- package/build/esm/index.js +7 -0
- package/build/esm/index.js.map +1 -0
- package/build/esm/libs/chartkit-error/chartkit-error.d.ts +18 -0
- package/build/esm/libs/chartkit-error/chartkit-error.js +23 -0
- package/build/esm/libs/chartkit-error/chartkit-error.js.map +1 -0
- package/build/esm/libs/index.d.ts +3 -0
- package/build/esm/libs/index.js +3 -0
- package/build/esm/libs/index.js.map +1 -0
- package/build/esm/libs/settings/eventEmitter.d.ts +11 -0
- package/build/esm/libs/settings/eventEmitter.js +24 -0
- package/build/esm/libs/settings/eventEmitter.js.map +1 -0
- package/build/esm/libs/settings/mergeSettingStrategy.d.ts +1 -0
- package/build/esm/libs/settings/mergeSettingStrategy.js +31 -0
- package/build/esm/libs/settings/mergeSettingStrategy.js.map +1 -0
- package/build/esm/libs/settings/settings.d.ts +22 -0
- package/build/esm/libs/settings/settings.js +42 -0
- package/build/esm/libs/settings/settings.js.map +1 -0
- package/build/esm/package.json +1 -0
- package/build/esm/plugins/gravity-charts/index.d.ts +5 -0
- package/build/esm/plugins/gravity-charts/index.js +11 -0
- package/build/esm/plugins/gravity-charts/index.js.map +1 -0
- package/build/esm/plugins/gravity-charts/renderer/GravityChartsWidget.d.ts +21 -0
- package/build/esm/plugins/gravity-charts/renderer/GravityChartsWidget.js +68 -0
- package/build/esm/plugins/gravity-charts/renderer/GravityChartsWidget.js.map +1 -0
- package/build/esm/plugins/gravity-charts/renderer/utils.d.ts +2 -0
- package/build/esm/plugins/gravity-charts/renderer/utils.js +17 -0
- package/build/esm/plugins/gravity-charts/renderer/utils.js.map +1 -0
- package/build/esm/plugins/gravity-charts/renderer/withSplitPane/TooltipContent.d.ts +8 -0
- package/build/esm/plugins/gravity-charts/renderer/withSplitPane/TooltipContent.js +13 -0
- package/build/esm/plugins/gravity-charts/renderer/withSplitPane/TooltipContent.js.map +1 -0
- package/build/esm/plugins/gravity-charts/renderer/withSplitPane/useViewportSplitTooltipLayout.d.ts +3 -0
- package/build/esm/plugins/gravity-charts/renderer/withSplitPane/useViewportSplitTooltipLayout.js +30 -0
- package/build/esm/plugins/gravity-charts/renderer/withSplitPane/useViewportSplitTooltipLayout.js.map +1 -0
- package/build/esm/plugins/gravity-charts/renderer/withSplitPane/withSplitPane.d.ts +8 -0
- package/build/esm/plugins/gravity-charts/renderer/withSplitPane/withSplitPane.js +71 -0
- package/build/esm/plugins/gravity-charts/renderer/withSplitPane/withSplitPane.js.map +1 -0
- package/build/esm/plugins/gravity-charts/types.d.ts +6 -0
- package/build/esm/plugins/gravity-charts/types.js +2 -0
- package/build/esm/plugins/gravity-charts/types.js.map +1 -0
- package/build/esm/plugins/highcharts/index.d.ts +4 -0
- package/build/esm/plugins/highcharts/index.js +10 -0
- package/build/esm/plugins/highcharts/index.js.map +1 -0
- package/build/esm/plugins/highcharts/renderer/HighchartsWidget.d.ts +31 -0
- package/build/esm/plugins/highcharts/renderer/HighchartsWidget.js +6 -0
- package/build/esm/plugins/highcharts/renderer/HighchartsWidget.js.map +1 -0
- package/build/esm/plugins/highcharts/renderer/components/HighchartsComponent.css +4 -0
- package/build/esm/plugins/highcharts/renderer/components/HighchartsComponent.d.ts +579 -0
- package/build/esm/plugins/highcharts/renderer/components/HighchartsComponent.js +152 -0
- package/build/esm/plugins/highcharts/renderer/components/HighchartsComponent.js.map +1 -0
- package/build/esm/plugins/highcharts/renderer/components/HighchartsReact.d.ts +20 -0
- package/build/esm/plugins/highcharts/renderer/components/HighchartsReact.js +74 -0
- package/build/esm/plugins/highcharts/renderer/components/HighchartsReact.js.map +1 -0
- package/build/esm/plugins/highcharts/renderer/components/useElementSize.d.ts +6 -0
- package/build/esm/plugins/highcharts/renderer/components/useElementSize.js +51 -0
- package/build/esm/plugins/highcharts/renderer/components/useElementSize.js.map +1 -0
- package/build/esm/plugins/highcharts/renderer/components/withSplitPane/WithSplitPane.css +4 -0
- package/build/esm/plugins/highcharts/renderer/components/withSplitPane/withSplitPane.d.ts +18 -0
- package/build/esm/plugins/highcharts/renderer/components/withSplitPane/withSplitPane.js +216 -0
- package/build/esm/plugins/highcharts/renderer/components/withSplitPane/withSplitPane.js.map +1 -0
- package/build/esm/plugins/highcharts/renderer/helpers/add-holidays.d.ts +3 -0
- package/build/esm/plugins/highcharts/renderer/helpers/add-holidays.js +44 -0
- package/build/esm/plugins/highcharts/renderer/helpers/add-holidays.js.map +1 -0
- package/build/esm/plugins/highcharts/renderer/helpers/comments/drawing.d.ts +11 -0
- package/build/esm/plugins/highcharts/renderer/helpers/comments/drawing.js +570 -0
- package/build/esm/plugins/highcharts/renderer/helpers/comments/drawing.js.map +1 -0
- package/build/esm/plugins/highcharts/renderer/helpers/config/config.d.ts +582 -0
- package/build/esm/plugins/highcharts/renderer/helpers/config/config.js +1565 -0
- package/build/esm/plugins/highcharts/renderer/helpers/config/config.js.map +1 -0
- package/build/esm/plugins/highcharts/renderer/helpers/config/handleLegendItemClick.d.ts +2 -0
- package/build/esm/plugins/highcharts/renderer/helpers/config/handleLegendItemClick.js +76 -0
- package/build/esm/plugins/highcharts/renderer/helpers/config/handleLegendItemClick.js.map +1 -0
- package/build/esm/plugins/highcharts/renderer/helpers/config/options.d.ts +468 -0
- package/build/esm/plugins/highcharts/renderer/helpers/config/options.js +348 -0
- package/build/esm/plugins/highcharts/renderer/helpers/config/options.js.map +1 -0
- package/build/esm/plugins/highcharts/renderer/helpers/config/types.d.ts +6 -0
- package/build/esm/plugins/highcharts/renderer/helpers/config/types.js +2 -0
- package/build/esm/plugins/highcharts/renderer/helpers/config/types.js.map +1 -0
- package/build/esm/plugins/highcharts/renderer/helpers/config/utils/addShowInNavigatorToSeries.d.ts +10 -0
- package/build/esm/plugins/highcharts/renderer/helpers/config/utils/addShowInNavigatorToSeries.js +43 -0
- package/build/esm/plugins/highcharts/renderer/helpers/config/utils/addShowInNavigatorToSeries.js.map +1 -0
- package/build/esm/plugins/highcharts/renderer/helpers/config/utils/buildNavigatorFallback.d.ts +1 -0
- package/build/esm/plugins/highcharts/renderer/helpers/config/utils/buildNavigatorFallback.js +18 -0
- package/build/esm/plugins/highcharts/renderer/helpers/config/utils/buildNavigatorFallback.js.map +1 -0
- package/build/esm/plugins/highcharts/renderer/helpers/config/utils/calculatePrecision.d.ts +5 -0
- package/build/esm/plugins/highcharts/renderer/helpers/config/utils/calculatePrecision.js +21 -0
- package/build/esm/plugins/highcharts/renderer/helpers/config/utils/calculatePrecision.js.map +1 -0
- package/build/esm/plugins/highcharts/renderer/helpers/config/utils/concatStrings.d.ts +1 -0
- package/build/esm/plugins/highcharts/renderer/helpers/config/utils/concatStrings.js +2 -0
- package/build/esm/plugins/highcharts/renderer/helpers/config/utils/concatStrings.js.map +1 -0
- package/build/esm/plugins/highcharts/renderer/helpers/config/utils/getChartKitFormattedValue.d.ts +2 -0
- package/build/esm/plugins/highcharts/renderer/helpers/config/utils/getChartKitFormattedValue.js +16 -0
- package/build/esm/plugins/highcharts/renderer/helpers/config/utils/getChartKitFormattedValue.js.map +1 -0
- package/build/esm/plugins/highcharts/renderer/helpers/config/utils/getFormatOptionsFromLine.d.ts +3 -0
- package/build/esm/plugins/highcharts/renderer/helpers/config/utils/getFormatOptionsFromLine.js +16 -0
- package/build/esm/plugins/highcharts/renderer/helpers/config/utils/getFormatOptionsFromLine.js.map +1 -0
- package/build/esm/plugins/highcharts/renderer/helpers/config/utils/getXAxisThresholdValue.d.ts +1 -0
- package/build/esm/plugins/highcharts/renderer/helpers/config/utils/getXAxisThresholdValue.js +21 -0
- package/build/esm/plugins/highcharts/renderer/helpers/config/utils/getXAxisThresholdValue.js.map +1 -0
- package/build/esm/plugins/highcharts/renderer/helpers/config/utils/index.d.ts +78 -0
- package/build/esm/plugins/highcharts/renderer/helpers/config/utils/index.js +22 -0
- package/build/esm/plugins/highcharts/renderer/helpers/config/utils/index.js.map +1 -0
- package/build/esm/plugins/highcharts/renderer/helpers/config/utils/isNavigatorSeries.d.ts +2 -0
- package/build/esm/plugins/highcharts/renderer/helpers/config/utils/isNavigatorSeries.js +4 -0
- package/build/esm/plugins/highcharts/renderer/helpers/config/utils/isNavigatorSeries.js.map +1 -0
- package/build/esm/plugins/highcharts/renderer/helpers/config/utils/isSafari.d.ts +1 -0
- package/build/esm/plugins/highcharts/renderer/helpers/config/utils/isSafari.js +13 -0
- package/build/esm/plugins/highcharts/renderer/helpers/config/utils/isSafari.js.map +1 -0
- package/build/esm/plugins/highcharts/renderer/helpers/config/utils/localStorage.d.ts +5 -0
- package/build/esm/plugins/highcharts/renderer/helpers/config/utils/localStorage.js +24 -0
- package/build/esm/plugins/highcharts/renderer/helpers/config/utils/localStorage.js.map +1 -0
- package/build/esm/plugins/highcharts/renderer/helpers/config/utils/mergeArrayWithObject.d.ts +1 -0
- package/build/esm/plugins/highcharts/renderer/helpers/config/utils/mergeArrayWithObject.js +11 -0
- package/build/esm/plugins/highcharts/renderer/helpers/config/utils/mergeArrayWithObject.js.map +1 -0
- package/build/esm/plugins/highcharts/renderer/helpers/config/utils/numberFormat.d.ts +2 -0
- package/build/esm/plugins/highcharts/renderer/helpers/config/utils/numberFormat.js +29 -0
- package/build/esm/plugins/highcharts/renderer/helpers/config/utils/numberFormat.js.map +1 -0
- package/build/esm/plugins/highcharts/renderer/helpers/config/utils/setNavigatorDefaultPeriod.d.ts +13 -0
- package/build/esm/plugins/highcharts/renderer/helpers/config/utils/setNavigatorDefaultPeriod.js +28 -0
- package/build/esm/plugins/highcharts/renderer/helpers/config/utils/setNavigatorDefaultPeriod.js.map +1 -0
- package/build/esm/plugins/highcharts/renderer/helpers/config/utils/tooltip.d.ts +7 -0
- package/build/esm/plugins/highcharts/renderer/helpers/config/utils/tooltip.js +25 -0
- package/build/esm/plugins/highcharts/renderer/helpers/config/utils/tooltip.js.map +1 -0
- package/build/esm/plugins/highcharts/renderer/helpers/constants.d.ts +29 -0
- package/build/esm/plugins/highcharts/renderer/helpers/constants.js +32 -0
- package/build/esm/plugins/highcharts/renderer/helpers/constants.js.map +1 -0
- package/build/esm/plugins/highcharts/renderer/helpers/graph.css +82 -0
- package/build/esm/plugins/highcharts/renderer/helpers/graph.d.ts +553 -0
- package/build/esm/plugins/highcharts/renderer/helpers/graph.js +92 -0
- package/build/esm/plugins/highcharts/renderer/helpers/graph.js.map +1 -0
- package/build/esm/plugins/highcharts/renderer/helpers/highcharts/colors.d.ts +2 -0
- package/build/esm/plugins/highcharts/renderer/helpers/highcharts/colors.js +18 -0
- package/build/esm/plugins/highcharts/renderer/helpers/highcharts/colors.js.map +1 -0
- package/build/esm/plugins/highcharts/renderer/helpers/highcharts/highcharts.d.ts +5 -0
- package/build/esm/plugins/highcharts/renderer/helpers/highcharts/highcharts.js +371 -0
- package/build/esm/plugins/highcharts/renderer/helpers/highcharts/highcharts.js.map +1 -0
- package/build/esm/plugins/highcharts/renderer/helpers/highcharts/utils/calcucalteClosestPointManually.d.ts +1 -0
- package/build/esm/plugins/highcharts/renderer/helpers/highcharts/utils/calcucalteClosestPointManually.js +20 -0
- package/build/esm/plugins/highcharts/renderer/helpers/highcharts/utils/calcucalteClosestPointManually.js.map +1 -0
- package/build/esm/plugins/highcharts/renderer/helpers/highcharts/utils/index.d.ts +1 -0
- package/build/esm/plugins/highcharts/renderer/helpers/highcharts/utils/index.js +2 -0
- package/build/esm/plugins/highcharts/renderer/helpers/highcharts/utils/index.js.map +1 -0
- package/build/esm/plugins/highcharts/renderer/helpers/prepare-data.d.ts +1 -0
- package/build/esm/plugins/highcharts/renderer/helpers/prepare-data.js +182 -0
- package/build/esm/plugins/highcharts/renderer/helpers/prepare-data.js.map +1 -0
- package/build/esm/plugins/highcharts/renderer/helpers/tooltip/constants.d.ts +13 -0
- package/build/esm/plugins/highcharts/renderer/helpers/tooltip/constants.js +15 -0
- package/build/esm/plugins/highcharts/renderer/helpers/tooltip/constants.js.map +1 -0
- package/build/esm/plugins/highcharts/renderer/helpers/tooltip/helpers.d.ts +1 -0
- package/build/esm/plugins/highcharts/renderer/helpers/tooltip/helpers.js +6 -0
- package/build/esm/plugins/highcharts/renderer/helpers/tooltip/helpers.js.map +1 -0
- package/build/esm/plugins/highcharts/renderer/helpers/tooltip/index.d.ts +13 -0
- package/build/esm/plugins/highcharts/renderer/helpers/tooltip/index.js +269 -0
- package/build/esm/plugins/highcharts/renderer/helpers/tooltip/index.js.map +1 -0
- package/build/esm/plugins/highcharts/renderer/helpers/tooltip/render-shape-icon/index.d.ts +6 -0
- package/build/esm/plugins/highcharts/renderer/helpers/tooltip/render-shape-icon/index.js +23 -0
- package/build/esm/plugins/highcharts/renderer/helpers/tooltip/render-shape-icon/index.js.map +1 -0
- package/build/esm/plugins/highcharts/renderer/helpers/tooltip/render-shape-icon/template-icons/DashDotLineIcon.d.ts +2 -0
- package/build/esm/plugins/highcharts/renderer/helpers/tooltip/render-shape-icon/template-icons/DashDotLineIcon.js +21 -0
- package/build/esm/plugins/highcharts/renderer/helpers/tooltip/render-shape-icon/template-icons/DashDotLineIcon.js.map +1 -0
- package/build/esm/plugins/highcharts/renderer/helpers/tooltip/render-shape-icon/template-icons/DashLineIcon.d.ts +2 -0
- package/build/esm/plugins/highcharts/renderer/helpers/tooltip/render-shape-icon/template-icons/DashLineIcon.js +26 -0
- package/build/esm/plugins/highcharts/renderer/helpers/tooltip/render-shape-icon/template-icons/DashLineIcon.js.map +1 -0
- package/build/esm/plugins/highcharts/renderer/helpers/tooltip/render-shape-icon/template-icons/DotLineIcon.d.ts +2 -0
- package/build/esm/plugins/highcharts/renderer/helpers/tooltip/render-shape-icon/template-icons/DotLineIcon.js +21 -0
- package/build/esm/plugins/highcharts/renderer/helpers/tooltip/render-shape-icon/template-icons/DotLineIcon.js.map +1 -0
- package/build/esm/plugins/highcharts/renderer/helpers/tooltip/render-shape-icon/template-icons/LongDashDotDotLineIcon.d.ts +2 -0
- package/build/esm/plugins/highcharts/renderer/helpers/tooltip/render-shape-icon/template-icons/LongDashDotDotLineIcon.js +19 -0
- package/build/esm/plugins/highcharts/renderer/helpers/tooltip/render-shape-icon/template-icons/LongDashDotDotLineIcon.js.map +1 -0
- package/build/esm/plugins/highcharts/renderer/helpers/tooltip/render-shape-icon/template-icons/LongDashDotLineIcon.d.ts +2 -0
- package/build/esm/plugins/highcharts/renderer/helpers/tooltip/render-shape-icon/template-icons/LongDashDotLineIcon.js +19 -0
- package/build/esm/plugins/highcharts/renderer/helpers/tooltip/render-shape-icon/template-icons/LongDashDotLineIcon.js.map +1 -0
- package/build/esm/plugins/highcharts/renderer/helpers/tooltip/render-shape-icon/template-icons/LongDashLineIcon.d.ts +2 -0
- package/build/esm/plugins/highcharts/renderer/helpers/tooltip/render-shape-icon/template-icons/LongDashLineIcon.js +16 -0
- package/build/esm/plugins/highcharts/renderer/helpers/tooltip/render-shape-icon/template-icons/LongDashLineIcon.js.map +1 -0
- package/build/esm/plugins/highcharts/renderer/helpers/tooltip/render-shape-icon/template-icons/ShortDashDotDotLineIcon.d.ts +2 -0
- package/build/esm/plugins/highcharts/renderer/helpers/tooltip/render-shape-icon/template-icons/ShortDashDotDotLineIcon.js +19 -0
- package/build/esm/plugins/highcharts/renderer/helpers/tooltip/render-shape-icon/template-icons/ShortDashDotDotLineIcon.js.map +1 -0
- package/build/esm/plugins/highcharts/renderer/helpers/tooltip/render-shape-icon/template-icons/ShortDashDotLineIcon.d.ts +2 -0
- package/build/esm/plugins/highcharts/renderer/helpers/tooltip/render-shape-icon/template-icons/ShortDashDotLineIcon.js +19 -0
- package/build/esm/plugins/highcharts/renderer/helpers/tooltip/render-shape-icon/template-icons/ShortDashDotLineIcon.js.map +1 -0
- package/build/esm/plugins/highcharts/renderer/helpers/tooltip/render-shape-icon/template-icons/ShortDashLineIcon.d.ts +2 -0
- package/build/esm/plugins/highcharts/renderer/helpers/tooltip/render-shape-icon/template-icons/ShortDashLineIcon.js +19 -0
- package/build/esm/plugins/highcharts/renderer/helpers/tooltip/render-shape-icon/template-icons/ShortDashLineIcon.js.map +1 -0
- package/build/esm/plugins/highcharts/renderer/helpers/tooltip/render-shape-icon/template-icons/ShortDotLineIcon.d.ts +2 -0
- package/build/esm/plugins/highcharts/renderer/helpers/tooltip/render-shape-icon/template-icons/ShortDotLineIcon.js +21 -0
- package/build/esm/plugins/highcharts/renderer/helpers/tooltip/render-shape-icon/template-icons/ShortDotLineIcon.js.map +1 -0
- package/build/esm/plugins/highcharts/renderer/helpers/tooltip/render-shape-icon/template-icons/SolidLineIcon.d.ts +2 -0
- package/build/esm/plugins/highcharts/renderer/helpers/tooltip/render-shape-icon/template-icons/SolidLineIcon.js +14 -0
- package/build/esm/plugins/highcharts/renderer/helpers/tooltip/render-shape-icon/template-icons/SolidLineIcon.js.map +1 -0
- package/build/esm/plugins/highcharts/renderer/helpers/tooltip/render-shape-icon/template-icons/index.d.ts +11 -0
- package/build/esm/plugins/highcharts/renderer/helpers/tooltip/render-shape-icon/template-icons/index.js +12 -0
- package/build/esm/plugins/highcharts/renderer/helpers/tooltip/render-shape-icon/template-icons/index.js.map +1 -0
- package/build/esm/plugins/highcharts/renderer/helpers/tooltip/render-shape-icon/types.d.ts +4 -0
- package/build/esm/plugins/highcharts/renderer/helpers/tooltip/render-shape-icon/types.js +2 -0
- package/build/esm/plugins/highcharts/renderer/helpers/tooltip/render-shape-icon/types.js.map +1 -0
- package/build/esm/plugins/highcharts/renderer/helpers/tooltip/render-shape-icon/utils.d.ts +7 -0
- package/build/esm/plugins/highcharts/renderer/helpers/tooltip/render-shape-icon/utils.js +6 -0
- package/build/esm/plugins/highcharts/renderer/helpers/tooltip/render-shape-icon/utils.js.map +1 -0
- package/build/esm/plugins/highcharts/renderer/helpers/tooltip/tooltip.css +313 -0
- package/build/esm/plugins/highcharts/renderer/helpers/tooltip/types.d.ts +88 -0
- package/build/esm/plugins/highcharts/renderer/helpers/tooltip/types.js +2 -0
- package/build/esm/plugins/highcharts/renderer/helpers/tooltip/types.js.map +1 -0
- package/build/esm/plugins/highcharts/renderer/helpers/types.d.ts +22 -0
- package/build/esm/plugins/highcharts/renderer/helpers/types.js +2 -0
- package/build/esm/plugins/highcharts/renderer/helpers/types.js.map +1 -0
- package/build/esm/plugins/highcharts/types/comments.d.ts +51 -0
- package/build/esm/plugins/highcharts/types/comments.js +2 -0
- package/build/esm/plugins/highcharts/types/comments.js.map +1 -0
- package/build/esm/plugins/highcharts/types/highcharts-extends.d.ts +53 -0
- package/build/esm/plugins/highcharts/types/index.d.ts +4 -0
- package/build/esm/plugins/highcharts/types/index.js +2 -0
- package/build/esm/plugins/highcharts/types/index.js.map +1 -0
- package/build/esm/plugins/highcharts/types/lib.js +2 -0
- package/build/esm/plugins/highcharts/types/lib.js.map +1 -0
- package/build/esm/plugins/highcharts/types/misc.d.ts +22 -0
- package/build/esm/plugins/highcharts/types/misc.js +2 -0
- package/build/esm/plugins/highcharts/types/misc.js.map +1 -0
- package/build/esm/plugins/highcharts/types/widget.d.ts +117 -0
- package/build/esm/plugins/highcharts/types/widget.js +2 -0
- package/build/esm/plugins/highcharts/types/widget.js.map +1 -0
- package/build/esm/plugins/indicator/index.d.ts +3 -0
- package/build/esm/plugins/indicator/index.js +9 -0
- package/build/esm/plugins/indicator/index.js.map +1 -0
- package/build/esm/plugins/indicator/renderer/IndicatorItem.d.ts +7 -0
- package/build/esm/plugins/indicator/renderer/IndicatorItem.js +16 -0
- package/build/esm/plugins/indicator/renderer/IndicatorItem.js.map +1 -0
- package/build/esm/plugins/indicator/renderer/IndicatorWidget.css +51 -0
- package/build/esm/plugins/indicator/renderer/IndicatorWidget.d.ts +20 -0
- package/build/esm/plugins/indicator/renderer/IndicatorWidget.js +34 -0
- package/build/esm/plugins/indicator/renderer/IndicatorWidget.js.map +1 -0
- package/build/esm/plugins/indicator/types.d.ts +15 -0
- package/build/esm/plugins/indicator/types.js +2 -0
- package/build/esm/plugins/indicator/types.js.map +1 -0
- package/build/esm/plugins/shared/format-number/format-number.d.ts +5 -0
- package/build/esm/plugins/shared/format-number/format-number.js +91 -0
- package/build/esm/plugins/shared/format-number/format-number.js.map +1 -0
- package/build/esm/plugins/shared/format-number/i18n/en.json +17 -0
- package/build/esm/plugins/shared/format-number/i18n/i18n.d.ts +5 -0
- package/build/esm/plugins/shared/format-number/i18n/i18n.js +9 -0
- package/build/esm/plugins/shared/format-number/i18n/i18n.js.map +1 -0
- package/build/esm/plugins/shared/format-number/i18n/ru.json +17 -0
- package/build/esm/plugins/shared/format-number/types.d.ts +14 -0
- package/build/esm/plugins/shared/format-number/types.js +2 -0
- package/build/esm/plugins/shared/format-number/types.js.map +1 -0
- package/build/esm/plugins/shared/index.d.ts +2 -0
- package/build/esm/plugins/shared/index.js +2 -0
- package/build/esm/plugins/shared/index.js.map +1 -0
- package/build/esm/plugins/yagr/index.d.ts +3 -0
- package/build/esm/plugins/yagr/index.js +7 -0
- package/build/esm/plugins/yagr/index.js.map +1 -0
- package/build/esm/plugins/yagr/renderer/YagrWidget.css +4 -0
- package/build/esm/plugins/yagr/renderer/YagrWidget.d.ts +24 -0
- package/build/esm/plugins/yagr/renderer/YagrWidget.js +78 -0
- package/build/esm/plugins/yagr/renderer/YagrWidget.js.map +1 -0
- package/build/esm/plugins/yagr/renderer/polyfills.js +16 -0
- package/build/esm/plugins/yagr/renderer/polyfills.js.map +1 -0
- package/build/esm/plugins/yagr/renderer/tooltip/helpers/escapeHTML.d.ts +1 -0
- package/build/esm/plugins/yagr/renderer/tooltip/helpers/escapeHTML.js +6 -0
- package/build/esm/plugins/yagr/renderer/tooltip/helpers/escapeHTML.js.map +1 -0
- package/build/esm/plugins/yagr/renderer/tooltip/index.d.ts +1 -0
- package/build/esm/plugins/yagr/renderer/tooltip/index.js +2 -0
- package/build/esm/plugins/yagr/renderer/tooltip/index.js.map +1 -0
- package/build/esm/plugins/yagr/renderer/tooltip/renderTooltip.d.ts +2 -0
- package/build/esm/plugins/yagr/renderer/tooltip/renderTooltip.js +68 -0
- package/build/esm/plugins/yagr/renderer/tooltip/renderTooltip.js.map +1 -0
- package/build/esm/plugins/yagr/renderer/tooltip/tooltip.css +306 -0
- package/build/esm/plugins/yagr/renderer/tooltip/tooltip.d.ts +3 -0
- package/build/esm/plugins/yagr/renderer/tooltip/tooltip.js +237 -0
- package/build/esm/plugins/yagr/renderer/tooltip/tooltip.js.map +1 -0
- package/build/esm/plugins/yagr/renderer/tooltip/types.d.ts +74 -0
- package/build/esm/plugins/yagr/renderer/tooltip/types.js +2 -0
- package/build/esm/plugins/yagr/renderer/tooltip/types.js.map +1 -0
- package/build/esm/plugins/yagr/renderer/useWidgetData.d.ts +6 -0
- package/build/esm/plugins/yagr/renderer/useWidgetData.js +26 -0
- package/build/esm/plugins/yagr/renderer/useWidgetData.js.map +1 -0
- package/build/esm/plugins/yagr/renderer/utils.d.ts +29 -0
- package/build/esm/plugins/yagr/renderer/utils.js +146 -0
- package/build/esm/plugins/yagr/renderer/utils.js.map +1 -0
- package/build/esm/plugins/yagr/types.d.ts +32 -0
- package/build/esm/plugins/yagr/types.js +2 -0
- package/build/esm/plugins/yagr/types.js.map +1 -0
- package/build/esm/types/index.d.ts +75 -0
- package/build/esm/types/index.js +2 -0
- package/build/esm/types/index.js.map +1 -0
- package/build/esm/types/misc.d.ts +4 -0
- package/build/esm/types/misc.js +2 -0
- package/build/esm/types/misc.js.map +1 -0
- package/build/esm/types/widget.d.ts +41 -0
- package/build/esm/types/widget.js +2 -0
- package/build/esm/types/widget.js.map +1 -0
- package/build/esm/utils/cn.d.ts +3 -0
- package/build/esm/utils/cn.js +5 -0
- package/build/esm/utils/cn.js.map +1 -0
- package/build/esm/utils/common.d.ts +2 -0
- package/build/esm/utils/common.js +9 -0
- package/build/esm/utils/common.js.map +1 -0
- package/build/esm/utils/getErrorMessage.d.ts +2 -0
- package/build/esm/utils/getErrorMessage.js +6 -0
- package/build/esm/utils/getErrorMessage.js.map +1 -0
- package/build/esm/utils/index.d.ts +4 -0
- package/build/esm/utils/index.js +5 -0
- package/build/esm/utils/index.js.map +1 -0
- package/build/esm/utils/merge.d.ts +19 -0
- package/build/esm/utils/merge.js +149 -0
- package/build/esm/utils/merge.js.map +1 -0
- package/build/esm/utils/misc.d.ts +2 -0
- package/build/esm/utils/misc.js +8 -0
- package/build/esm/utils/misc.js.map +1 -0
- package/build/esm/utils/performance.d.ts +5 -0
- package/build/esm/utils/performance.js +21 -0
- package/build/esm/utils/performance.js.map +1 -0
- package/build/esm/utils/react.d.ts +1 -0
- package/build/esm/utils/react.js +5 -0
- package/build/esm/utils/react.js.map +1 -0
- package/build/esm/utils/throttle.d.ts +13 -0
- package/build/esm/utils/throttle.js +44 -0
- package/build/esm/utils/throttle.js.map +1 -0
- package/package.json +85 -25
- package/build/components/ChartKit.css +0 -32
- package/build/components/ChartKit.d.ts +0 -11
- package/build/components/ChartKit.js +0 -42
- package/build/components/ErrorBoundary/ErrorBoundary.d.ts +0 -23
- package/build/components/ErrorBoundary/ErrorBoundary.js +0 -51
- package/build/components/Loader/Loader.d.ts +0 -9
- package/build/components/Loader/Loader.js +0 -16
- package/build/components/SplitPane/Pane.d.ts +0 -14
- package/build/components/SplitPane/Pane.js +0 -26
- package/build/components/SplitPane/Resizer.d.ts +0 -18
- package/build/components/SplitPane/Resizer.js +0 -26
- package/build/components/SplitPane/SplitPane.d.ts +0 -59
- package/build/components/SplitPane/SplitPane.js +0 -235
- package/build/components/SplitPane/StyledSplitPane.css +0 -52
- package/build/components/SplitPane/StyledSplitPane.d.ts +0 -9
- package/build/components/SplitPane/StyledSplitPane.js +0 -32
- package/build/components/SplitPane/constants.js +0 -4
- package/build/components/SplitPane/index.d.ts +0 -8
- package/build/components/SplitPane/index.js +0 -18
- package/build/components/SplitPane/types.d.ts +0 -2
- package/build/components/SplitTooltip/SplitTooltip.d.ts +0 -49
- package/build/components/SplitTooltip/SplitTooltip.js +0 -122
- package/build/components/SplitTooltip/index.d.ts +0 -2
- package/build/components/SplitTooltip/index.js +0 -1
- package/build/constants/common.js +0 -2
- package/build/constants/index.d.ts +0 -3
- package/build/constants/index.js +0 -3
- package/build/constants/misc.js +0 -19
- package/build/constants/widget-data.js +0 -47
- package/build/hooks/index.d.ts +0 -1
- package/build/hooks/index.js +0 -1
- package/build/hooks/misc.js +0 -8
- package/build/i18n/index.d.ts +0 -7
- package/build/i18n/index.js +0 -10
- package/build/index.d.ts +0 -8
- package/build/index.js +0 -6
- package/build/libs/chartkit-error/chartkit-error.js +0 -21
- package/build/libs/index.d.ts +0 -3
- package/build/libs/index.js +0 -2
- package/build/libs/settings/eventEmitter.js +0 -25
- package/build/libs/settings/mergeSettingStrategy.js +0 -31
- package/build/libs/settings/settings.d.ts +0 -22
- package/build/libs/settings/settings.js +0 -41
- package/build/plugins/gravity-charts/index.d.ts +0 -4
- package/build/plugins/gravity-charts/index.js +0 -7
- package/build/plugins/gravity-charts/renderer/GravityChartsWidget.d.ts +0 -22
- package/build/plugins/gravity-charts/renderer/GravityChartsWidget.js +0 -45
- package/build/plugins/gravity-charts/renderer/utils.d.ts +0 -2
- package/build/plugins/gravity-charts/renderer/utils.js +0 -18
- package/build/plugins/gravity-charts/renderer/withSplitPane/TooltipContent.js +0 -13
- package/build/plugins/gravity-charts/renderer/withSplitPane/useViewportSplitTooltipLayout.d.ts +0 -3
- package/build/plugins/gravity-charts/renderer/withSplitPane/useViewportSplitTooltipLayout.js +0 -29
- package/build/plugins/gravity-charts/renderer/withSplitPane/withSplitPane.d.ts +0 -4
- package/build/plugins/gravity-charts/renderer/withSplitPane/withSplitPane.js +0 -48
- package/build/plugins/gravity-charts/types.d.ts +0 -5
- package/build/plugins/gravity-charts/types.js +0 -1
- package/build/plugins/highcharts/index.d.ts +0 -4
- package/build/plugins/highcharts/index.js +0 -7
- package/build/plugins/highcharts/renderer/HighchartsWidget.d.ts +0 -32
- package/build/plugins/highcharts/renderer/HighchartsWidget.js +0 -6
- package/build/plugins/highcharts/renderer/components/HighchartsComponent.d.ts +0 -579
- package/build/plugins/highcharts/renderer/components/HighchartsComponent.js +0 -155
- package/build/plugins/highcharts/renderer/components/HighchartsReact.d.ts +0 -20
- package/build/plugins/highcharts/renderer/components/HighchartsReact.js +0 -74
- package/build/plugins/highcharts/renderer/components/useElementSize.js +0 -50
- package/build/plugins/highcharts/renderer/components/withSplitPane/withSplitPane.d.ts +0 -18
- package/build/plugins/highcharts/renderer/components/withSplitPane/withSplitPane.js +0 -217
- package/build/plugins/highcharts/renderer/helpers/add-holidays.d.ts +0 -3
- package/build/plugins/highcharts/renderer/helpers/add-holidays.js +0 -43
- package/build/plugins/highcharts/renderer/helpers/comments/drawing.js +0 -571
- package/build/plugins/highcharts/renderer/helpers/config/config.js +0 -1515
- package/build/plugins/highcharts/renderer/helpers/config/handleLegendItemClick.js +0 -75
- package/build/plugins/highcharts/renderer/helpers/config/options.js +0 -350
- package/build/plugins/highcharts/renderer/helpers/config/types.js +0 -1
- package/build/plugins/highcharts/renderer/helpers/config/utils/addShowInNavigatorToSeries.d.ts +0 -10
- package/build/plugins/highcharts/renderer/helpers/config/utils/addShowInNavigatorToSeries.js +0 -42
- package/build/plugins/highcharts/renderer/helpers/config/utils/buildNavigatorFallback.js +0 -17
- package/build/plugins/highcharts/renderer/helpers/config/utils/calculatePrecision.js +0 -20
- package/build/plugins/highcharts/renderer/helpers/config/utils/concatStrings.js +0 -1
- package/build/plugins/highcharts/renderer/helpers/config/utils/getChartKitFormattedValue.d.ts +0 -2
- package/build/plugins/highcharts/renderer/helpers/config/utils/getChartKitFormattedValue.js +0 -15
- package/build/plugins/highcharts/renderer/helpers/config/utils/getFormatOptionsFromLine.d.ts +0 -3
- package/build/plugins/highcharts/renderer/helpers/config/utils/getFormatOptionsFromLine.js +0 -15
- package/build/plugins/highcharts/renderer/helpers/config/utils/getXAxisThresholdValue.js +0 -20
- package/build/plugins/highcharts/renderer/helpers/config/utils/index.d.ts +0 -78
- package/build/plugins/highcharts/renderer/helpers/config/utils/index.js +0 -21
- package/build/plugins/highcharts/renderer/helpers/config/utils/isNavigatorSeries.d.ts +0 -2
- package/build/plugins/highcharts/renderer/helpers/config/utils/isNavigatorSeries.js +0 -3
- package/build/plugins/highcharts/renderer/helpers/config/utils/isSafari.js +0 -12
- package/build/plugins/highcharts/renderer/helpers/config/utils/localStorage.js +0 -23
- package/build/plugins/highcharts/renderer/helpers/config/utils/mergeArrayWithObject.js +0 -10
- package/build/plugins/highcharts/renderer/helpers/config/utils/numberFormat.d.ts +0 -2
- package/build/plugins/highcharts/renderer/helpers/config/utils/numberFormat.js +0 -19
- package/build/plugins/highcharts/renderer/helpers/config/utils/setNavigatorDefaultPeriod.d.ts +0 -13
- package/build/plugins/highcharts/renderer/helpers/config/utils/setNavigatorDefaultPeriod.js +0 -27
- package/build/plugins/highcharts/renderer/helpers/config/utils/tooltip.d.ts +0 -7
- package/build/plugins/highcharts/renderer/helpers/config/utils/tooltip.js +0 -25
- package/build/plugins/highcharts/renderer/helpers/constants.js +0 -31
- package/build/plugins/highcharts/renderer/helpers/graph.css +0 -98
- package/build/plugins/highcharts/renderer/helpers/graph.d.ts +0 -553
- package/build/plugins/highcharts/renderer/helpers/graph.js +0 -88
- package/build/plugins/highcharts/renderer/helpers/highcharts/colors.js +0 -17
- package/build/plugins/highcharts/renderer/helpers/highcharts/highcharts.js +0 -370
- package/build/plugins/highcharts/renderer/helpers/highcharts/utils/calcucalteClosestPointManually.js +0 -19
- package/build/plugins/highcharts/renderer/helpers/highcharts/utils/index.d.ts +0 -1
- package/build/plugins/highcharts/renderer/helpers/highcharts/utils/index.js +0 -1
- package/build/plugins/highcharts/renderer/helpers/prepare-data.js +0 -181
- package/build/plugins/highcharts/renderer/helpers/tooltip/constants.js +0 -14
- package/build/plugins/highcharts/renderer/helpers/tooltip/helpers.js +0 -5
- package/build/plugins/highcharts/renderer/helpers/tooltip/index.d.ts +0 -13
- package/build/plugins/highcharts/renderer/helpers/tooltip/index.js +0 -263
- package/build/plugins/highcharts/renderer/helpers/tooltip/render-shape-icon/index.d.ts +0 -6
- package/build/plugins/highcharts/renderer/helpers/tooltip/render-shape-icon/index.js +0 -22
- package/build/plugins/highcharts/renderer/helpers/tooltip/render-shape-icon/template-icons/DashDotLineIcon.d.ts +0 -2
- package/build/plugins/highcharts/renderer/helpers/tooltip/render-shape-icon/template-icons/DashDotLineIcon.js +0 -20
- package/build/plugins/highcharts/renderer/helpers/tooltip/render-shape-icon/template-icons/DashLineIcon.d.ts +0 -2
- package/build/plugins/highcharts/renderer/helpers/tooltip/render-shape-icon/template-icons/DashLineIcon.js +0 -25
- package/build/plugins/highcharts/renderer/helpers/tooltip/render-shape-icon/template-icons/DotLineIcon.d.ts +0 -2
- package/build/plugins/highcharts/renderer/helpers/tooltip/render-shape-icon/template-icons/DotLineIcon.js +0 -20
- package/build/plugins/highcharts/renderer/helpers/tooltip/render-shape-icon/template-icons/LongDashDotDotLineIcon.d.ts +0 -2
- package/build/plugins/highcharts/renderer/helpers/tooltip/render-shape-icon/template-icons/LongDashDotDotLineIcon.js +0 -18
- package/build/plugins/highcharts/renderer/helpers/tooltip/render-shape-icon/template-icons/LongDashDotLineIcon.d.ts +0 -2
- package/build/plugins/highcharts/renderer/helpers/tooltip/render-shape-icon/template-icons/LongDashDotLineIcon.js +0 -18
- package/build/plugins/highcharts/renderer/helpers/tooltip/render-shape-icon/template-icons/LongDashLineIcon.d.ts +0 -2
- package/build/plugins/highcharts/renderer/helpers/tooltip/render-shape-icon/template-icons/LongDashLineIcon.js +0 -15
- package/build/plugins/highcharts/renderer/helpers/tooltip/render-shape-icon/template-icons/ShortDashDotDotLineIcon.d.ts +0 -2
- package/build/plugins/highcharts/renderer/helpers/tooltip/render-shape-icon/template-icons/ShortDashDotDotLineIcon.js +0 -18
- package/build/plugins/highcharts/renderer/helpers/tooltip/render-shape-icon/template-icons/ShortDashDotLineIcon.d.ts +0 -2
- package/build/plugins/highcharts/renderer/helpers/tooltip/render-shape-icon/template-icons/ShortDashDotLineIcon.js +0 -18
- package/build/plugins/highcharts/renderer/helpers/tooltip/render-shape-icon/template-icons/ShortDashLineIcon.d.ts +0 -2
- package/build/plugins/highcharts/renderer/helpers/tooltip/render-shape-icon/template-icons/ShortDashLineIcon.js +0 -18
- package/build/plugins/highcharts/renderer/helpers/tooltip/render-shape-icon/template-icons/ShortDotLineIcon.d.ts +0 -2
- package/build/plugins/highcharts/renderer/helpers/tooltip/render-shape-icon/template-icons/ShortDotLineIcon.js +0 -20
- package/build/plugins/highcharts/renderer/helpers/tooltip/render-shape-icon/template-icons/SolidLineIcon.d.ts +0 -2
- package/build/plugins/highcharts/renderer/helpers/tooltip/render-shape-icon/template-icons/SolidLineIcon.js +0 -13
- package/build/plugins/highcharts/renderer/helpers/tooltip/render-shape-icon/template-icons/index.d.ts +0 -11
- package/build/plugins/highcharts/renderer/helpers/tooltip/render-shape-icon/template-icons/index.js +0 -11
- package/build/plugins/highcharts/renderer/helpers/tooltip/render-shape-icon/types.js +0 -1
- package/build/plugins/highcharts/renderer/helpers/tooltip/render-shape-icon/utils.js +0 -5
- package/build/plugins/highcharts/renderer/helpers/tooltip/tooltip.css +0 -370
- package/build/plugins/highcharts/renderer/helpers/tooltip/types.d.ts +0 -88
- package/build/plugins/highcharts/renderer/helpers/tooltip/types.js +0 -1
- package/build/plugins/highcharts/renderer/helpers/types.d.ts +0 -22
- package/build/plugins/highcharts/renderer/helpers/types.js +0 -1
- package/build/plugins/highcharts/types/comments.js +0 -1
- package/build/plugins/highcharts/types/index.d.ts +0 -4
- package/build/plugins/highcharts/types/index.js +0 -1
- package/build/plugins/highcharts/types/misc.d.ts +0 -22
- package/build/plugins/highcharts/types/misc.js +0 -1
- package/build/plugins/highcharts/types/widget.d.ts +0 -117
- package/build/plugins/highcharts/types/widget.js +0 -1
- package/build/plugins/indicator/index.d.ts +0 -3
- package/build/plugins/indicator/index.js +0 -6
- package/build/plugins/indicator/renderer/IndicatorItem.d.ts +0 -7
- package/build/plugins/indicator/renderer/IndicatorItem.js +0 -15
- package/build/plugins/indicator/renderer/IndicatorWidget.css +0 -62
- package/build/plugins/indicator/renderer/IndicatorWidget.d.ts +0 -21
- package/build/plugins/indicator/renderer/IndicatorWidget.js +0 -34
- package/build/plugins/indicator/types.js +0 -1
- package/build/plugins/shared/format-number/format-number.d.ts +0 -5
- package/build/plugins/shared/format-number/format-number.js +0 -87
- package/build/plugins/shared/format-number/i18n/i18n.js +0 -8
- package/build/plugins/shared/format-number/types.js +0 -1
- package/build/plugins/shared/index.d.ts +0 -2
- package/build/plugins/shared/index.js +0 -1
- package/build/plugins/yagr/index.d.ts +0 -3
- package/build/plugins/yagr/index.js +0 -6
- package/build/plugins/yagr/renderer/YagrWidget.d.ts +0 -25
- package/build/plugins/yagr/renderer/YagrWidget.js +0 -79
- package/build/plugins/yagr/renderer/polyfills.js +0 -15
- package/build/plugins/yagr/renderer/tooltip/helpers/escapeHTML.js +0 -5
- package/build/plugins/yagr/renderer/tooltip/index.d.ts +0 -1
- package/build/plugins/yagr/renderer/tooltip/index.js +0 -1
- package/build/plugins/yagr/renderer/tooltip/renderTooltip.d.ts +0 -2
- package/build/plugins/yagr/renderer/tooltip/renderTooltip.js +0 -60
- package/build/plugins/yagr/renderer/tooltip/tooltip.css +0 -371
- package/build/plugins/yagr/renderer/tooltip/tooltip.d.ts +0 -3
- package/build/plugins/yagr/renderer/tooltip/tooltip.js +0 -230
- package/build/plugins/yagr/renderer/tooltip/types.js +0 -1
- package/build/plugins/yagr/renderer/useWidgetData.d.ts +0 -6
- package/build/plugins/yagr/renderer/useWidgetData.js +0 -26
- package/build/plugins/yagr/renderer/utils.d.ts +0 -29
- package/build/plugins/yagr/renderer/utils.js +0 -141
- package/build/plugins/yagr/types.d.ts +0 -32
- package/build/plugins/yagr/types.js +0 -1
- package/build/types/index.d.ts +0 -67
- package/build/types/index.js +0 -1
- package/build/types/misc.js +0 -1
- package/build/types/widget.d.ts +0 -41
- package/build/types/widget.js +0 -1
- package/build/utils/cn.js +0 -4
- package/build/utils/common.js +0 -8
- package/build/utils/getErrorMessage.d.ts +0 -2
- package/build/utils/getErrorMessage.js +0 -5
- package/build/utils/index.d.ts +0 -4
- package/build/utils/index.js +0 -4
- package/build/utils/misc.d.ts +0 -2
- package/build/utils/misc.js +0 -7
- package/build/utils/performance.js +0 -20
- package/build/utils/react.js +0 -4
- /package/build/{components → cjs/components}/Loader/Loader.css +0 -0
- /package/build/{components → cjs/components}/SplitPane/constants.d.ts +0 -0
- /package/build/{constants → cjs/constants}/common.d.ts +0 -0
- /package/build/{constants → cjs/constants}/misc.d.ts +0 -0
- /package/build/{constants → cjs/constants}/widget-data.d.ts +0 -0
- /package/build/{hooks → cjs/hooks}/misc.d.ts +0 -0
- /package/build/{i18n → cjs/i18n}/keysets/en.json +0 -0
- /package/build/{i18n → cjs/i18n}/keysets/ru.json +0 -0
- /package/build/{libs → cjs/libs}/chartkit-error/chartkit-error.d.ts +0 -0
- /package/build/{libs → cjs/libs}/settings/eventEmitter.d.ts +0 -0
- /package/build/{libs → cjs/libs}/settings/mergeSettingStrategy.d.ts +0 -0
- /package/build/{plugins → cjs/plugins}/gravity-charts/renderer/withSplitPane/TooltipContent.d.ts +0 -0
- /package/build/{plugins → cjs/plugins}/highcharts/renderer/components/HighchartsComponent.css +0 -0
- /package/build/{plugins → cjs/plugins}/highcharts/renderer/components/useElementSize.d.ts +0 -0
- /package/build/{plugins → cjs/plugins}/highcharts/renderer/components/withSplitPane/WithSplitPane.css +0 -0
- /package/build/{plugins → cjs/plugins}/highcharts/renderer/helpers/comments/drawing.d.ts +0 -0
- /package/build/{plugins → cjs/plugins}/highcharts/renderer/helpers/config/config.d.ts +0 -0
- /package/build/{plugins → cjs/plugins}/highcharts/renderer/helpers/config/handleLegendItemClick.d.ts +0 -0
- /package/build/{plugins → cjs/plugins}/highcharts/renderer/helpers/config/options.d.ts +0 -0
- /package/build/{plugins → cjs/plugins}/highcharts/renderer/helpers/config/types.d.ts +0 -0
- /package/build/{plugins → cjs/plugins}/highcharts/renderer/helpers/config/utils/buildNavigatorFallback.d.ts +0 -0
- /package/build/{plugins → cjs/plugins}/highcharts/renderer/helpers/config/utils/calculatePrecision.d.ts +0 -0
- /package/build/{plugins → cjs/plugins}/highcharts/renderer/helpers/config/utils/concatStrings.d.ts +0 -0
- /package/build/{plugins → cjs/plugins}/highcharts/renderer/helpers/config/utils/getXAxisThresholdValue.d.ts +0 -0
- /package/build/{plugins → cjs/plugins}/highcharts/renderer/helpers/config/utils/isSafari.d.ts +0 -0
- /package/build/{plugins → cjs/plugins}/highcharts/renderer/helpers/config/utils/localStorage.d.ts +0 -0
- /package/build/{plugins → cjs/plugins}/highcharts/renderer/helpers/config/utils/mergeArrayWithObject.d.ts +0 -0
- /package/build/{plugins → cjs/plugins}/highcharts/renderer/helpers/constants.d.ts +0 -0
- /package/build/{plugins → cjs/plugins}/highcharts/renderer/helpers/highcharts/colors.d.ts +0 -0
- /package/build/{plugins → cjs/plugins}/highcharts/renderer/helpers/highcharts/highcharts.d.ts +0 -0
- /package/build/{plugins → cjs/plugins}/highcharts/renderer/helpers/highcharts/utils/calcucalteClosestPointManually.d.ts +0 -0
- /package/build/{plugins → cjs/plugins}/highcharts/renderer/helpers/prepare-data.d.ts +0 -0
- /package/build/{plugins → cjs/plugins}/highcharts/renderer/helpers/tooltip/constants.d.ts +0 -0
- /package/build/{plugins → cjs/plugins}/highcharts/renderer/helpers/tooltip/helpers.d.ts +0 -0
- /package/build/{plugins → cjs/plugins}/highcharts/renderer/helpers/tooltip/render-shape-icon/types.d.ts +0 -0
- /package/build/{plugins → cjs/plugins}/highcharts/renderer/helpers/tooltip/render-shape-icon/utils.d.ts +0 -0
- /package/build/{plugins → cjs/plugins}/highcharts/types/comments.d.ts +0 -0
- /package/build/{plugins → cjs/plugins}/highcharts/types/highcharts-extends.d.ts +0 -0
- /package/build/{plugins → cjs/plugins}/highcharts/types/lib.d.ts +0 -0
- /package/build/{plugins → cjs/plugins}/indicator/types.d.ts +0 -0
- /package/build/{plugins → cjs/plugins}/shared/format-number/i18n/en.json +0 -0
- /package/build/{plugins → cjs/plugins}/shared/format-number/i18n/i18n.d.ts +0 -0
- /package/build/{plugins → cjs/plugins}/shared/format-number/i18n/ru.json +0 -0
- /package/build/{plugins → cjs/plugins}/shared/format-number/types.d.ts +0 -0
- /package/build/{plugins → cjs/plugins}/yagr/renderer/YagrWidget.css +0 -0
- /package/build/{components/SplitPane/types.js → cjs/plugins/yagr/renderer/polyfills.d.ts} +0 -0
- /package/build/{plugins → cjs/plugins}/yagr/renderer/tooltip/helpers/escapeHTML.d.ts +0 -0
- /package/build/{plugins → cjs/plugins}/yagr/renderer/tooltip/types.d.ts +0 -0
- /package/build/{types → cjs/types}/misc.d.ts +0 -0
- /package/build/{utils → cjs/utils}/cn.d.ts +0 -0
- /package/build/{utils → cjs/utils}/common.d.ts +0 -0
- /package/build/{utils → cjs/utils}/performance.d.ts +0 -0
- /package/build/{utils → cjs/utils}/react.d.ts +0 -0
- /package/build/{plugins/highcharts/types/lib.js → esm/plugins/highcharts/types/lib.d.ts} +0 -0
- /package/build/{plugins → esm/plugins}/yagr/renderer/polyfills.d.ts +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"../../../../../../src","sources":["plugins/yagr/renderer/tooltip/types.ts"],"names":[],"mappings":"","sourcesContent":["export type TooltipData = {\n /** Tooltip lines data */\n lines: Array<TooltipLine>;\n /** Tooltip comments */\n xComments?: Array<{\n text: string;\n color: string;\n }>;\n commentDateText?: string;\n /**\n * Indicating that active line duplicated by displaying it on top of the main list\n * default behavior - the active line is displayed on top of the main list only if it\"does not fit\" in the tooltip\n */\n activeRowAlwaysFirstInTooltip?: boolean;\n /** Indicating that the chart is displayed in \"split tooltip\" mode */\n splitTooltip?: boolean;\n /** Text of the header of the tooltip */\n tooltipHeader?: string;\n /** Indicating that a column with the line name is displayed in the tooltip */\n shared?: boolean;\n /** Indicating that a column with a percentage value is displayed in the tooltip */\n withPercent?: boolean;\n /** Indicating that a column with a diff is displayed in the tooltip */\n useCompareFrom?: boolean;\n /** Indicating that the tooltip displays a block with information about the holiday */\n holiday?: boolean;\n /** Name of the holiday */\n holidayText?: string;\n /** Region for which the holiday is relevant */\n region?: string;\n /** Sum of the values of the rows displayed in the tooltip */\n sum?: number | string;\n /** Number of hidden lines \"not fit\" in the tooltip */\n hiddenRowsNumber: number;\n /** Sum of the values of the hidden (\"not fit\" in the tooltip) rows */\n hiddenRowsSum?: number | string;\n};\n\nexport type TooltipExtraData = {\n lastVisibleRowIndex: number;\n};\n\nexport type TooltipLine = {\n /** Color displayed in a separate cell */\n seriesColor: string;\n /** Series name */\n seriesName: string;\n /** Series index */\n seriesIdx?: number;\n /** Indicating whether the series name should be displayed */\n hideSeriesName?: boolean;\n /** Percentage value displayed in a separate cell */\n percentValue?: number | string;\n /** Diff value displayed in the separate cell */\n diff?: string;\n /** Formatted numeric value for the current series displayed in a separate cell */\n value: string;\n /** Comment to the line (displayed under the corresponding line), set via manageTooltipConfig */\n commentText?: string;\n /** Comment to the line (displayed under the corresponding line) */\n xyCommentText?: string;\n /** Indicating that line is active */\n selectedSeries?: boolean;\n /** Custom renderer of the line (a string with text or html markup) */\n customRender?: string;\n replaceCellAt?: Record<number, (line: TooltipLine) => string>;\n insertCellAt?: Record<number, (line: TooltipLine) => string>;\n};\n\nexport type RowRenderingConfig = {\n cellsRenderers: Array<(line: TooltipLine) => string>;\n isSelectedLine?: boolean;\n allowComment?: boolean;\n withDarkBackground?: boolean;\n isSingleLine?: boolean;\n rowIndex?: number;\n};\n"]}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { YagrChartProps } from '@gravity-ui/yagr/react';
|
|
2
|
+
import type { MinimalValidConfig, YagrWidgetProps } from "../types.js";
|
|
3
|
+
export declare const useWidgetData: (props: YagrWidgetProps, id: string) => {
|
|
4
|
+
config: MinimalValidConfig;
|
|
5
|
+
debug: YagrChartProps["debug"];
|
|
6
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { useThemeValue } from '@gravity-ui/uikit';
|
|
3
|
+
import { shapeYagrConfig } from "./utils.js";
|
|
4
|
+
export const useWidgetData = (props, id) => {
|
|
5
|
+
const { data, sources, libraryConfig } = props.data;
|
|
6
|
+
const theme = useThemeValue();
|
|
7
|
+
const config = React.useMemo(() => shapeYagrConfig({
|
|
8
|
+
data,
|
|
9
|
+
libraryConfig,
|
|
10
|
+
theme,
|
|
11
|
+
customTooltip: Boolean(props.tooltip),
|
|
12
|
+
}), [data, libraryConfig, theme, props.tooltip]);
|
|
13
|
+
const debug = React.useMemo(() => {
|
|
14
|
+
const filename = sources
|
|
15
|
+
? Object.values(sources)
|
|
16
|
+
.map((source) => {
|
|
17
|
+
return source?.data?.program;
|
|
18
|
+
})
|
|
19
|
+
.filter(Boolean)
|
|
20
|
+
.join(', ') || id
|
|
21
|
+
: id;
|
|
22
|
+
return { filename };
|
|
23
|
+
}, [id, sources]);
|
|
24
|
+
return { config, debug };
|
|
25
|
+
};
|
|
26
|
+
//# sourceMappingURL=useWidgetData.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useWidgetData.js","sourceRoot":"../../../../../src","sources":["plugins/yagr/renderer/useWidgetData.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAC,aAAa,EAAC,MAAM,mBAAmB,CAAC;AAKhD,OAAO,EAAC,eAAe,EAAC,mBAAgB;AAExC,MAAM,CAAC,MAAM,aAAa,GAAG,CACzB,KAAsB,EACtB,EAAU,EACkD,EAAE;IAC9D,MAAM,EAAC,IAAI,EAAE,OAAO,EAAE,aAAa,EAAC,GAAG,KAAK,CAAC,IAAI,CAAC;IAClD,MAAM,KAAK,GAAG,aAAa,EAAe,CAAC;IAC3C,MAAM,MAAM,GAAuB,KAAK,CAAC,OAAO,CAC5C,GAAG,EAAE,CACD,eAAe,CAAC;QACZ,IAAI;QACJ,aAAa;QACb,KAAK;QACL,aAAa,EAAE,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC;KACxC,CAAC,EACN,CAAC,IAAI,EAAE,aAAa,EAAE,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,CAC9C,CAAC;IACF,MAAM,KAAK,GAA4B,KAAK,CAAC,OAAO,CAAC,GAAG,EAAE;QACtD,MAAM,QAAQ,GAAG,OAAO;YACpB,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC;iBACjB,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE;gBACZ,OAAO,MAAM,EAAE,IAAI,EAAE,OAAO,CAAC;YACjC,CAAC,CAAC;iBACD,MAAM,CAAC,OAAO,CAAC;iBACf,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE;YACvB,CAAC,CAAC,EAAE,CAAC;QACT,OAAO,EAAC,QAAQ,EAAC,CAAC;IACtB,CAAC,EAAE,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC,CAAC;IAElB,OAAO,EAAC,MAAM,EAAE,KAAK,EAAC,CAAC;AAC3B,CAAC,CAAC","sourcesContent":["import React from 'react';\n\nimport {useThemeValue} from '@gravity-ui/uikit';\nimport type {YagrChartProps} from '@gravity-ui/yagr/react';\n\nimport type {MinimalValidConfig, YagrTheme, YagrWidgetProps} from '../types';\n\nimport {shapeYagrConfig} from './utils';\n\nexport const useWidgetData = (\n props: YagrWidgetProps,\n id: string,\n): {config: MinimalValidConfig; debug: YagrChartProps['debug']} => {\n const {data, sources, libraryConfig} = props.data;\n const theme = useThemeValue() as YagrTheme;\n const config: MinimalValidConfig = React.useMemo(\n () =>\n shapeYagrConfig({\n data,\n libraryConfig,\n theme,\n customTooltip: Boolean(props.tooltip),\n }),\n [data, libraryConfig, theme, props.tooltip],\n );\n const debug: YagrChartProps['debug'] = React.useMemo(() => {\n const filename = sources\n ? Object.values(sources)\n .map((source) => {\n return source?.data?.program;\n })\n .filter(Boolean)\n .join(', ') || id\n : id;\n return {filename};\n }, [id, sources]);\n\n return {config, debug};\n};\n"]}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { MinimalValidConfig, Yagr, YagrChartOptions, YagrTheme, YagrWidgetData } from "../types.js";
|
|
2
|
+
type ShapeYagrConfigArgs = {
|
|
3
|
+
data: YagrWidgetData['data'];
|
|
4
|
+
libraryConfig: YagrWidgetData['libraryConfig'];
|
|
5
|
+
theme: YagrTheme;
|
|
6
|
+
customTooltip?: boolean;
|
|
7
|
+
};
|
|
8
|
+
export declare const synchronizeTooltipTablesCellsWidth: (tooltipContainer: HTMLElement) => void;
|
|
9
|
+
export declare const checkFocus: (args: {
|
|
10
|
+
tooltip: HTMLElement;
|
|
11
|
+
yagr?: Yagr;
|
|
12
|
+
}) => (event: MouseEvent) => void;
|
|
13
|
+
export declare const detectClickOutside: (args: {
|
|
14
|
+
tooltip: HTMLElement;
|
|
15
|
+
actions: {
|
|
16
|
+
pin: (state: boolean) => void;
|
|
17
|
+
hide: () => void;
|
|
18
|
+
};
|
|
19
|
+
yagr?: Yagr;
|
|
20
|
+
}) => (event: MouseEvent) => void;
|
|
21
|
+
/**
|
|
22
|
+
* This function needs to align timezone that uplot is processing.
|
|
23
|
+
* Uplot uses simple new Date() when [processing ticks](https://github.com/leeoniya/uPlot/blob/master/src/opts.js#L177) on axis.
|
|
24
|
+
* It leads that timestamp will be converted to user browser timezone.
|
|
25
|
+
* In this function we artificially add shift diff between browser timezone and user timeozne to reset new Date() affects.
|
|
26
|
+
*/
|
|
27
|
+
export declare const getUplotTimezoneAligner: (chart?: YagrChartOptions, timeZone?: string) => (ts: number) => Date;
|
|
28
|
+
export declare const shapeYagrConfig: (args: ShapeYagrConfigArgs) => MinimalValidConfig;
|
|
29
|
+
export {};
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
import { dateTime } from '@gravity-ui/date-utils';
|
|
2
|
+
import { defaults } from '@gravity-ui/yagr';
|
|
3
|
+
import { settings } from "../../../libs/index.js";
|
|
4
|
+
import { merge } from "../../../utils/merge.js";
|
|
5
|
+
import { getRenderTooltip } from "./tooltip/index.js";
|
|
6
|
+
const TOOLTIP_HEADER_CLASS_NAME = '_tooltip-header';
|
|
7
|
+
const TOOLTIP_LIST_CLASS_NAME = '_tooltip-list';
|
|
8
|
+
export const synchronizeTooltipTablesCellsWidth = (tooltipContainer) => {
|
|
9
|
+
const tHeadNode = tooltipContainer.querySelector(`.${TOOLTIP_HEADER_CLASS_NAME}`);
|
|
10
|
+
const tBodyNode = tooltipContainer.querySelector(`.${TOOLTIP_LIST_CLASS_NAME}`);
|
|
11
|
+
if (!tHeadNode || !tBodyNode || !tHeadNode.children.length) {
|
|
12
|
+
return;
|
|
13
|
+
}
|
|
14
|
+
const tHeadNodeFirstRow = tHeadNode.children[0];
|
|
15
|
+
for (let j = 0; j < tHeadNodeFirstRow.children.length; j++) {
|
|
16
|
+
const cell = tHeadNodeFirstRow.children[j];
|
|
17
|
+
cell.removeAttribute('style');
|
|
18
|
+
if (tBodyNode?.children.length === 1) {
|
|
19
|
+
cell.innerHTML = ' ';
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
const tBodyNodeFirstRow = tBodyNode.children[0];
|
|
23
|
+
for (let j = 0; j < tBodyNodeFirstRow.children.length; j++) {
|
|
24
|
+
const cell = tBodyNodeFirstRow.children[j];
|
|
25
|
+
cell.removeAttribute('style');
|
|
26
|
+
}
|
|
27
|
+
const tHeadRowsWidth = tHeadNode.children[0].getBoundingClientRect().width;
|
|
28
|
+
const tBodyRowsWidth = tBodyNode.children[0].getBoundingClientRect().width;
|
|
29
|
+
const nodeWithWidesRows = tHeadRowsWidth > tBodyRowsWidth ? tHeadNode : tBodyNode;
|
|
30
|
+
const nodeWithWidesRowsCellsWidth = Array.prototype.reduce.call(nodeWithWidesRows.children[0].children, (accum, cellNode) => {
|
|
31
|
+
accum.push(cellNode.getBoundingClientRect().width);
|
|
32
|
+
return accum;
|
|
33
|
+
}, []);
|
|
34
|
+
const nodeToSetCellsWidth = nodeWithWidesRows === tHeadNode ? tBodyNode : tHeadNode;
|
|
35
|
+
const nodeToSetCellsWidthFirstRow = nodeToSetCellsWidth.children[0];
|
|
36
|
+
for (let j = 0; j < nodeToSetCellsWidthFirstRow.children.length; j++) {
|
|
37
|
+
const cell = nodeToSetCellsWidthFirstRow.children[j];
|
|
38
|
+
cell.setAttribute('style', `width: ${nodeWithWidesRowsCellsWidth[j]}px`);
|
|
39
|
+
}
|
|
40
|
+
if (tBodyNode.children.length === 1) {
|
|
41
|
+
for (const cell of tHeadNodeFirstRow.children) {
|
|
42
|
+
cell.innerHTML = '';
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
export const checkFocus = (args) => (event) => {
|
|
47
|
+
const { tooltip, yagr } = args;
|
|
48
|
+
if (!yagr) {
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
const target = event.target;
|
|
52
|
+
const seriesIdx = target && tooltip.contains(target) && target.tagName === 'TD'
|
|
53
|
+
? target.parentElement?.dataset['seriesIdx']
|
|
54
|
+
: undefined;
|
|
55
|
+
const serie = seriesIdx ? yagr.uplot.series[Number(seriesIdx)] : null;
|
|
56
|
+
yagr.setFocus(serie ? serie.id : null, true);
|
|
57
|
+
};
|
|
58
|
+
export const detectClickOutside = (args) => (event) => {
|
|
59
|
+
const { tooltip, actions, yagr } = args;
|
|
60
|
+
if (!yagr) {
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
const target = event.target;
|
|
64
|
+
if (target instanceof Element) {
|
|
65
|
+
const isClickInsideTooltip = target && tooltip.contains(target);
|
|
66
|
+
const isClickOnUplotOver = target && yagr.root.querySelector('.u-over')?.contains(target);
|
|
67
|
+
if (!isClickInsideTooltip && !isClickOnUplotOver) {
|
|
68
|
+
actions.pin(false);
|
|
69
|
+
actions.hide();
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
};
|
|
73
|
+
const getXAxisFormatter = (msm = 1, timeZone) => (_, ticks) => {
|
|
74
|
+
const range = (ticks[ticks.length - 1] - ticks[0]) / msm;
|
|
75
|
+
return ticks.map((rawValue) => {
|
|
76
|
+
const d = dateTime({ input: rawValue / msm, timeZone });
|
|
77
|
+
if (d.hour() === 0 && d.minute() === 0 && d.second() === 0) {
|
|
78
|
+
return d.format('DD.MM.YY');
|
|
79
|
+
}
|
|
80
|
+
return d.format(range < 300 ? 'HH:mm:ss' : 'HH:mm');
|
|
81
|
+
});
|
|
82
|
+
};
|
|
83
|
+
/**
|
|
84
|
+
* This function needs to align timezone that uplot is processing.
|
|
85
|
+
* Uplot uses simple new Date() when [processing ticks](https://github.com/leeoniya/uPlot/blob/master/src/opts.js#L177) on axis.
|
|
86
|
+
* It leads that timestamp will be converted to user browser timezone.
|
|
87
|
+
* In this function we artificially add shift diff between browser timezone and user timeozne to reset new Date() affects.
|
|
88
|
+
*/
|
|
89
|
+
export const getUplotTimezoneAligner = (chart, timeZone) => (ts) => {
|
|
90
|
+
const dt = ts / (chart?.timeMultiplier || 1);
|
|
91
|
+
const browserDate = dateTime({ input: dt });
|
|
92
|
+
const browserTimezone = browserDate.utcOffset();
|
|
93
|
+
const timestampRealTimezone = dateTime({ input: dt, timeZone }).utcOffset();
|
|
94
|
+
const uPlotOffset = (browserTimezone - timestampRealTimezone) * 60 * 1000;
|
|
95
|
+
return new Date(browserDate.valueOf() - uPlotOffset);
|
|
96
|
+
};
|
|
97
|
+
export const shapeYagrConfig = (args) => {
|
|
98
|
+
const { data, libraryConfig, theme } = args;
|
|
99
|
+
const config = {
|
|
100
|
+
...libraryConfig,
|
|
101
|
+
timeline: data.timeline,
|
|
102
|
+
series: data.graphs,
|
|
103
|
+
};
|
|
104
|
+
const { timeZone } = data;
|
|
105
|
+
const chart = {
|
|
106
|
+
appearance: {
|
|
107
|
+
locale: settings.get('lang'),
|
|
108
|
+
theme,
|
|
109
|
+
},
|
|
110
|
+
};
|
|
111
|
+
merge(chart, config.chart);
|
|
112
|
+
config.chart = chart;
|
|
113
|
+
if (config.tooltip?.show) {
|
|
114
|
+
config.tooltip = config.tooltip || {};
|
|
115
|
+
config.tooltip.render = config.tooltip?.render || getRenderTooltip(data);
|
|
116
|
+
if (!config.tooltip.className) {
|
|
117
|
+
// "className" property prevent default yagr styles adding
|
|
118
|
+
config.tooltip.className = 'chartkit-yagr-tooltip';
|
|
119
|
+
}
|
|
120
|
+
if (args.customTooltip) {
|
|
121
|
+
config.tooltip.virtual = true;
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* @todo remove this on next chartkit major release
|
|
125
|
+
* This added to prevent breaking changes in chartkit, while updating yagr@4 which
|
|
126
|
+
* has fixed tooltip sorting (@see https://github.com/gravity-ui/yagr/issues/149)
|
|
127
|
+
*/
|
|
128
|
+
config.tooltip.sort = config.tooltip.sort || ((a, b) => b.rowIdx - a.rowIdx);
|
|
129
|
+
}
|
|
130
|
+
config.axes = config.axes || {};
|
|
131
|
+
const xAxis = config.axes[defaults.DEFAULT_X_SCALE];
|
|
132
|
+
config.editUplotOptions = (opts) => ({
|
|
133
|
+
...opts,
|
|
134
|
+
tzDate: timeZone ? getUplotTimezoneAligner(config.chart, timeZone) : undefined,
|
|
135
|
+
});
|
|
136
|
+
if (xAxis && !xAxis.values) {
|
|
137
|
+
xAxis.values = getXAxisFormatter(config.chart.timeMultiplier, timeZone);
|
|
138
|
+
}
|
|
139
|
+
if (!xAxis) {
|
|
140
|
+
config.axes[defaults.DEFAULT_X_SCALE] = {
|
|
141
|
+
values: getXAxisFormatter(config.chart.timeMultiplier, timeZone),
|
|
142
|
+
};
|
|
143
|
+
}
|
|
144
|
+
return config;
|
|
145
|
+
};
|
|
146
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"../../../../../src","sources":["plugins/yagr/renderer/utils.ts"],"names":[],"mappings":"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","sourcesContent":["import {dateTime} from '@gravity-ui/date-utils';\nimport {defaults} from '@gravity-ui/yagr';\n\nimport {settings} from '../../../libs';\nimport {merge} from '../../../utils/merge';\nimport type {MinimalValidConfig, Yagr, YagrChartOptions, YagrTheme, YagrWidgetData} from '../types';\n\nimport {getRenderTooltip} from './tooltip';\n\nconst TOOLTIP_HEADER_CLASS_NAME = '_tooltip-header';\nconst TOOLTIP_LIST_CLASS_NAME = '_tooltip-list';\n\ntype ShapeYagrConfigArgs = {\n data: YagrWidgetData['data'];\n libraryConfig: YagrWidgetData['libraryConfig'];\n theme: YagrTheme;\n customTooltip?: boolean;\n};\n\nexport const synchronizeTooltipTablesCellsWidth = (tooltipContainer: HTMLElement) => {\n const tHeadNode = tooltipContainer.querySelector(`.${TOOLTIP_HEADER_CLASS_NAME}`);\n const tBodyNode = tooltipContainer.querySelector(`.${TOOLTIP_LIST_CLASS_NAME}`);\n\n if (!tHeadNode || !tBodyNode || !tHeadNode.children.length) {\n return;\n }\n\n const tHeadNodeFirstRow = tHeadNode.children[0];\n\n for (let j = 0; j < tHeadNodeFirstRow.children.length; j++) {\n const cell = tHeadNodeFirstRow.children[j];\n cell.removeAttribute('style');\n if (tBodyNode?.children.length === 1) {\n cell.innerHTML = ' ';\n }\n }\n\n const tBodyNodeFirstRow = tBodyNode.children[0];\n\n for (let j = 0; j < tBodyNodeFirstRow.children.length; j++) {\n const cell = tBodyNodeFirstRow.children[j];\n cell.removeAttribute('style');\n }\n\n const tHeadRowsWidth = tHeadNode.children[0].getBoundingClientRect().width;\n const tBodyRowsWidth = tBodyNode.children[0].getBoundingClientRect().width;\n\n const nodeWithWidesRows = tHeadRowsWidth > tBodyRowsWidth ? tHeadNode : tBodyNode;\n const nodeWithWidesRowsCellsWidth = Array.prototype.reduce.call(\n nodeWithWidesRows.children[0].children,\n (accum, cellNode) => {\n (accum as number[]).push(cellNode.getBoundingClientRect().width);\n return accum;\n },\n [],\n ) as number[];\n\n const nodeToSetCellsWidth = nodeWithWidesRows === tHeadNode ? tBodyNode : tHeadNode;\n const nodeToSetCellsWidthFirstRow = nodeToSetCellsWidth.children[0];\n\n for (let j = 0; j < nodeToSetCellsWidthFirstRow.children.length; j++) {\n const cell = nodeToSetCellsWidthFirstRow.children[j];\n cell.setAttribute('style', `width: ${nodeWithWidesRowsCellsWidth[j]}px`);\n }\n\n if (tBodyNode.children.length === 1) {\n for (const cell of tHeadNodeFirstRow.children) {\n cell.innerHTML = '';\n }\n }\n};\n\nexport const checkFocus = (args: {tooltip: HTMLElement; yagr?: Yagr}) => (event: MouseEvent) => {\n const {tooltip, yagr} = args;\n\n if (!yagr) {\n return;\n }\n\n const target = event.target as HTMLElement | null;\n const seriesIdx =\n target && tooltip.contains(target) && target.tagName === 'TD'\n ? target.parentElement?.dataset['seriesIdx']\n : undefined;\n\n const serie = seriesIdx ? yagr.uplot.series[Number(seriesIdx)] : null;\n\n yagr.setFocus(serie ? serie.id : null, true);\n};\n\nexport const detectClickOutside =\n (args: {\n tooltip: HTMLElement;\n actions: {\n pin: (state: boolean) => void;\n hide: () => void;\n };\n yagr?: Yagr;\n }) =>\n (event: MouseEvent) => {\n const {tooltip, actions, yagr} = args;\n\n if (!yagr) {\n return;\n }\n\n const target = event.target;\n\n if (target instanceof Element) {\n const isClickInsideTooltip = target && tooltip.contains(target);\n const isClickOnUplotOver =\n target && yagr.root.querySelector('.u-over')?.contains(target);\n\n if (!isClickInsideTooltip && !isClickOnUplotOver) {\n actions.pin(false);\n actions.hide();\n }\n }\n };\n\nconst getXAxisFormatter =\n (msm = 1, timeZone?: string) =>\n (_: unknown, ticks: number[]) => {\n const range = (ticks[ticks.length - 1] - ticks[0]) / msm;\n return ticks.map((rawValue) => {\n const d = dateTime({input: rawValue / msm, timeZone});\n\n if (d.hour() === 0 && d.minute() === 0 && d.second() === 0) {\n return d.format('DD.MM.YY');\n }\n\n return d.format(range < 300 ? 'HH:mm:ss' : 'HH:mm');\n });\n };\n\n/**\n * This function needs to align timezone that uplot is processing.\n * Uplot uses simple new Date() when [processing ticks](https://github.com/leeoniya/uPlot/blob/master/src/opts.js#L177) on axis.\n * It leads that timestamp will be converted to user browser timezone.\n * In this function we artificially add shift diff between browser timezone and user timeozne to reset new Date() affects.\n */\nexport const getUplotTimezoneAligner =\n (chart?: YagrChartOptions, timeZone?: string) => (ts: number) => {\n const dt = ts / (chart?.timeMultiplier || 1);\n const browserDate = dateTime({input: dt});\n const browserTimezone = browserDate.utcOffset();\n const timestampRealTimezone = dateTime({input: dt, timeZone}).utcOffset();\n\n const uPlotOffset = (browserTimezone - timestampRealTimezone) * 60 * 1000;\n\n return new Date(browserDate.valueOf() - uPlotOffset);\n };\n\nexport const shapeYagrConfig = (args: ShapeYagrConfigArgs): MinimalValidConfig => {\n const {data, libraryConfig, theme} = args;\n const config: MinimalValidConfig = {\n ...libraryConfig,\n timeline: data.timeline,\n series: data.graphs,\n };\n\n const {timeZone} = data;\n\n const chart: YagrChartOptions = {\n appearance: {\n locale: settings.get('lang'),\n theme,\n },\n };\n\n merge(chart, config.chart);\n\n config.chart = chart;\n\n if (config.tooltip?.show) {\n config.tooltip = config.tooltip || {};\n config.tooltip.render = config.tooltip?.render || getRenderTooltip(data);\n\n if (!config.tooltip.className) {\n // \"className\" property prevent default yagr styles adding\n config.tooltip.className = 'chartkit-yagr-tooltip';\n }\n\n if (args.customTooltip) {\n config.tooltip.virtual = true;\n }\n\n /**\n * @todo remove this on next chartkit major release\n * This added to prevent breaking changes in chartkit, while updating yagr@4 which\n * has fixed tooltip sorting (@see https://github.com/gravity-ui/yagr/issues/149)\n */\n config.tooltip.sort = config.tooltip.sort || ((a, b) => b.rowIdx - a.rowIdx);\n }\n\n config.axes = config.axes || {};\n const xAxis = config.axes[defaults.DEFAULT_X_SCALE];\n\n config.editUplotOptions = (opts) => ({\n ...opts,\n tzDate: timeZone ? getUplotTimezoneAligner(config.chart, timeZone) : undefined,\n });\n\n if (xAxis && !xAxis.values) {\n xAxis.values = getXAxisFormatter(config.chart.timeMultiplier, timeZone);\n }\n\n if (!xAxis) {\n config.axes[defaults.DEFAULT_X_SCALE] = {\n values: getXAxisFormatter(config.chart.timeMultiplier, timeZone),\n };\n }\n\n return config;\n};\n"]}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { RawSerieData, YagrConfig } from '@gravity-ui/yagr';
|
|
2
|
+
import type { YagrReactRef } from '@gravity-ui/yagr/react';
|
|
3
|
+
import type { ChartKitProps } from "../../types/index.js";
|
|
4
|
+
export type * from '@gravity-ui/yagr';
|
|
5
|
+
export type { YagrReactRef } from '@gravity-ui/yagr/react';
|
|
6
|
+
export type Yagr = NonNullable<ReturnType<YagrReactRef['yagr']>>;
|
|
7
|
+
export interface CustomTooltipProps {
|
|
8
|
+
yagr: Yagr | undefined;
|
|
9
|
+
}
|
|
10
|
+
export type YagrWidgetProps = ChartKitProps<'yagr'> & {
|
|
11
|
+
id: string;
|
|
12
|
+
};
|
|
13
|
+
export type YagrWidgetData = {
|
|
14
|
+
data: {
|
|
15
|
+
graphs: RawSerieData[];
|
|
16
|
+
timeline: number[];
|
|
17
|
+
/**
|
|
18
|
+
* Allow to setup timezone for X axis and tooltip's header.
|
|
19
|
+
*
|
|
20
|
+
* Format example: "UTC", "Europe/Moscow".
|
|
21
|
+
*
|
|
22
|
+
* For more examples check [wiki](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List)
|
|
23
|
+
*/
|
|
24
|
+
timeZone?: string;
|
|
25
|
+
};
|
|
26
|
+
libraryConfig: Partial<YagrConfig>;
|
|
27
|
+
sources?: Record<number, {
|
|
28
|
+
data: {
|
|
29
|
+
program: string;
|
|
30
|
+
};
|
|
31
|
+
}>;
|
|
32
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"../../../../src","sources":["plugins/yagr/types.ts"],"names":[],"mappings":"","sourcesContent":["import type {RawSerieData, YagrConfig} from '@gravity-ui/yagr';\nimport type {YagrReactRef} from '@gravity-ui/yagr/react';\n\nimport type {ChartKitProps} from '../../types';\n\nexport type * from '@gravity-ui/yagr';\nexport type {YagrReactRef} from '@gravity-ui/yagr/react';\n\n// The chart instance type, taken from a named export. @gravity-ui/yagr exposes the class only as\n// its default export, and a default import of that CommonJS-typed package from the ESM\n// declarations resolves to the module namespace under `moduleResolution: nodenext` (TS2709).\nexport type Yagr = NonNullable<ReturnType<YagrReactRef['yagr']>>;\n\nexport interface CustomTooltipProps {\n yagr: Yagr | undefined;\n}\n\nexport type YagrWidgetProps = ChartKitProps<'yagr'> & {\n id: string;\n};\n\nexport type YagrWidgetData = {\n data: {\n graphs: RawSerieData[];\n timeline: number[];\n /**\n * Allow to setup timezone for X axis and tooltip's header.\n *\n * Format example: \"UTC\", \"Europe/Moscow\".\n *\n * For more examples check [wiki](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List)\n */\n timeZone?: string;\n };\n libraryConfig: Partial<YagrConfig>;\n sources?: Record<\n number,\n {\n data: {\n program: string;\n };\n }\n >;\n};\n"]}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ChartKitError } from "../libs/index.js";
|
|
3
|
+
import type { ChartKitWidget } from "./widget.js";
|
|
4
|
+
export type { ChartKitHolidays } from "./misc.js";
|
|
5
|
+
export type ChartKitLang = 'ru' | 'en';
|
|
6
|
+
export type ChartKitType = keyof ChartKitWidget;
|
|
7
|
+
export type ChartKitRef = {
|
|
8
|
+
/**
|
|
9
|
+
* Renderers may return a promise that completes when the resized chart is ready.
|
|
10
|
+
* `undefined` means no completion signal is available, including while the widget is loading.
|
|
11
|
+
* It does not guarantee that the chart is ready. Awaiting callers must handle rejection.
|
|
12
|
+
* Gravity Charts also reports preparation failures through onError/renderError;
|
|
13
|
+
* unavailable-host, zero-size and unmount cancellations only reject the promise.
|
|
14
|
+
* For Gravity Charts, pass `{immediate: true}` to skip the resize debounce.
|
|
15
|
+
*/
|
|
16
|
+
reflow: (details?: unknown) => void | Promise<void>;
|
|
17
|
+
};
|
|
18
|
+
export type ChartKitWidgetRef = {
|
|
19
|
+
reflow?: ChartKitRef['reflow'];
|
|
20
|
+
};
|
|
21
|
+
export type ChartKitOnLoadData<T extends ChartKitType> = {
|
|
22
|
+
widget?: ChartKitWidget[T]['widget'];
|
|
23
|
+
widgetRendering?: number;
|
|
24
|
+
};
|
|
25
|
+
export type ChartKitOnRenderData = {
|
|
26
|
+
renderTime?: number;
|
|
27
|
+
};
|
|
28
|
+
export type ChartKitOnChartLoad<T extends ChartKitType> = {
|
|
29
|
+
widget?: ChartKitWidget[T]['widget'] | null;
|
|
30
|
+
};
|
|
31
|
+
export type ChartKitOnError = (data: {
|
|
32
|
+
error: any;
|
|
33
|
+
}) => void;
|
|
34
|
+
export type ChartKitRenderPluginLoader = () => React.ReactNode;
|
|
35
|
+
export type ChartKitProps<T extends ChartKitType> = {
|
|
36
|
+
type: T;
|
|
37
|
+
data: ChartKitWidget[T]['data'];
|
|
38
|
+
id?: string;
|
|
39
|
+
isMobile?: boolean;
|
|
40
|
+
onLoad?: (data?: ChartKitOnLoadData<T>) => void;
|
|
41
|
+
/** Fires on each chartkit plugin's component render */
|
|
42
|
+
onRender?: (data: ChartKitOnRenderData) => void;
|
|
43
|
+
/** Fires on chartkit plugin's component mount */
|
|
44
|
+
onChartLoad?: (data: ChartKitOnChartLoad<T>) => void;
|
|
45
|
+
/** Fires in case of unhandled plugin's exception */
|
|
46
|
+
onError?: ChartKitOnError;
|
|
47
|
+
/** Used to render user's error component */
|
|
48
|
+
renderError?: RenderError;
|
|
49
|
+
/** Used to render user's plugin loader component */
|
|
50
|
+
renderPluginLoader?: ChartKitRenderPluginLoader;
|
|
51
|
+
validation?: {
|
|
52
|
+
/**
|
|
53
|
+
* Series count limit.
|
|
54
|
+
*
|
|
55
|
+
* If you have series more than limit, your chart will throw an error `'ERR.CK.TOO_MANY_LINES'`.
|
|
56
|
+
*
|
|
57
|
+
* - This setting applies only when provided
|
|
58
|
+
* - Supported only for the `gravity-charts` plugin
|
|
59
|
+
*/
|
|
60
|
+
seriesCountLimit?: number;
|
|
61
|
+
};
|
|
62
|
+
} & {
|
|
63
|
+
[key in keyof Omit<ChartKitWidget[T], 'data' | 'widget'>]: ChartKitWidget[T][key];
|
|
64
|
+
};
|
|
65
|
+
export type ChartKitPlugin = {
|
|
66
|
+
type: ChartKitType;
|
|
67
|
+
renderer: React.LazyExoticComponent<React.ComponentType<any>>;
|
|
68
|
+
};
|
|
69
|
+
export type RenderErrorOpts = {
|
|
70
|
+
message: string;
|
|
71
|
+
error: ChartKitError | Error;
|
|
72
|
+
resetError: () => void;
|
|
73
|
+
};
|
|
74
|
+
export type RenderError = (opts: RenderErrorOpts) => React.ReactNode;
|
|
75
|
+
export type { ChartKitWidget };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"../../../src","sources":["types/index.ts"],"names":[],"mappings":"","sourcesContent":["import React from 'react';\n\nimport {ChartKitError} from '../libs';\n\nimport type {ChartKitWidget} from './widget';\n\nexport type {ChartKitHolidays} from './misc';\n\nexport type ChartKitLang = 'ru' | 'en';\n\nexport type ChartKitType = keyof ChartKitWidget;\n\nexport type ChartKitRef = {\n /**\n * Renderers may return a promise that completes when the resized chart is ready.\n * `undefined` means no completion signal is available, including while the widget is loading.\n * It does not guarantee that the chart is ready. Awaiting callers must handle rejection.\n * Gravity Charts also reports preparation failures through onError/renderError;\n * unavailable-host, zero-size and unmount cancellations only reject the promise.\n * For Gravity Charts, pass `{immediate: true}` to skip the resize debounce.\n */\n reflow: (details?: unknown) => void | Promise<void>;\n};\n\nexport type ChartKitWidgetRef = {\n reflow?: ChartKitRef['reflow'];\n};\n\nexport type ChartKitOnLoadData<T extends ChartKitType> = {\n widget?: ChartKitWidget[T]['widget'];\n widgetRendering?: number;\n};\n\nexport type ChartKitOnRenderData = {\n renderTime?: number;\n};\n\nexport type ChartKitOnChartLoad<T extends ChartKitType> = {\n widget?: ChartKitWidget[T]['widget'] | null;\n};\n\nexport type ChartKitOnError = (data: {error: any}) => void;\n\nexport type ChartKitRenderPluginLoader = () => React.ReactNode;\n\nexport type ChartKitProps<T extends ChartKitType> = {\n type: T;\n data: ChartKitWidget[T]['data'];\n id?: string;\n isMobile?: boolean;\n onLoad?: (data?: ChartKitOnLoadData<T>) => void;\n /** Fires on each chartkit plugin's component render */\n onRender?: (data: ChartKitOnRenderData) => void;\n /** Fires on chartkit plugin's component mount */\n onChartLoad?: (data: ChartKitOnChartLoad<T>) => void;\n /** Fires in case of unhandled plugin's exception */\n onError?: ChartKitOnError;\n /** Used to render user's error component */\n renderError?: RenderError;\n /** Used to render user's plugin loader component */\n renderPluginLoader?: ChartKitRenderPluginLoader;\n validation?: {\n /**\n * Series count limit.\n *\n * If you have series more than limit, your chart will throw an error `'ERR.CK.TOO_MANY_LINES'`.\n *\n * - This setting applies only when provided\n * - Supported only for the `gravity-charts` plugin\n */\n seriesCountLimit?: number;\n };\n} & {\n [key in keyof Omit<ChartKitWidget[T], 'data' | 'widget'>]: ChartKitWidget[T][key];\n};\n\nexport type ChartKitPlugin = {\n type: ChartKitType;\n renderer: React.LazyExoticComponent<React.ComponentType<any>>;\n};\n\nexport type RenderErrorOpts = {\n message: string;\n error: ChartKitError | Error;\n resetError: () => void;\n};\n\nexport type RenderError = (opts: RenderErrorOpts) => React.ReactNode;\n\nexport type {ChartKitWidget};\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"misc.js","sourceRoot":"../../../src","sources":["types/misc.ts"],"names":[],"mappings":"","sourcesContent":["export type ChartKitHolidays = {\n holiday: Record<string, Record<string, string>>;\n weekend: Record<string, Record<string, string>>;\n};\n"]}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { ChartData } from '@gravity-ui/charts';
|
|
2
|
+
import type { SplitLayoutType } from "../components/SplitPane/types.js";
|
|
3
|
+
import type { Highcharts, HighchartsWidgetData, StringParams } from "../plugins/highcharts/types/index.js";
|
|
4
|
+
import type { IndicatorWidgetData } from "../plugins/indicator/types.js";
|
|
5
|
+
import type { CustomTooltipProps, Yagr, YagrWidgetData } from "../plugins/yagr/types.js";
|
|
6
|
+
export interface ChartKitWidget {
|
|
7
|
+
yagr: {
|
|
8
|
+
data: YagrWidgetData;
|
|
9
|
+
widget: Yagr;
|
|
10
|
+
tooltip?: <T extends CustomTooltipProps = CustomTooltipProps>(props: T) => React.ReactNode;
|
|
11
|
+
};
|
|
12
|
+
indicator: {
|
|
13
|
+
data: IndicatorWidgetData;
|
|
14
|
+
widget: never;
|
|
15
|
+
formatNumber?: <T = any>(value: number, options?: T) => string;
|
|
16
|
+
};
|
|
17
|
+
highcharts: {
|
|
18
|
+
data: HighchartsWidgetData;
|
|
19
|
+
widget: Highcharts.Chart | null;
|
|
20
|
+
hoistConfigError?: boolean;
|
|
21
|
+
nonBodyScroll?: boolean;
|
|
22
|
+
splitTooltip?: boolean;
|
|
23
|
+
paneSplitOrientation?: SplitLayoutType;
|
|
24
|
+
onSplitPaneOrientationChange?: (orientation: SplitLayoutType) => void;
|
|
25
|
+
onChange?: (data: {
|
|
26
|
+
type: 'PARAMS_CHANGED';
|
|
27
|
+
data: {
|
|
28
|
+
params: StringParams;
|
|
29
|
+
};
|
|
30
|
+
}, state: {
|
|
31
|
+
forceUpdate: boolean;
|
|
32
|
+
}, callExternalOnChange?: boolean) => void;
|
|
33
|
+
};
|
|
34
|
+
'gravity-charts': {
|
|
35
|
+
data: ChartData;
|
|
36
|
+
widget: never;
|
|
37
|
+
tooltip?: {
|
|
38
|
+
splitted?: boolean;
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"widget.js","sourceRoot":"../../../src","sources":["types/widget.ts"],"names":[],"mappings":"","sourcesContent":["import type {ChartData} from '@gravity-ui/charts';\n\nimport type {SplitLayoutType} from '../components/SplitPane/types';\nimport type {Highcharts, HighchartsWidgetData, StringParams} from '../plugins/highcharts/types';\nimport type {IndicatorWidgetData} from '../plugins/indicator/types';\nimport type {CustomTooltipProps, Yagr, YagrWidgetData} from '../plugins/yagr/types';\n\nexport interface ChartKitWidget {\n yagr: {\n data: YagrWidgetData;\n widget: Yagr;\n tooltip?: <T extends CustomTooltipProps = CustomTooltipProps>(props: T) => React.ReactNode;\n };\n indicator: {\n data: IndicatorWidgetData;\n widget: never;\n formatNumber?: <T = any>(value: number, options?: T) => string;\n };\n highcharts: {\n data: HighchartsWidgetData;\n widget: Highcharts.Chart | null;\n hoistConfigError?: boolean;\n nonBodyScroll?: boolean;\n splitTooltip?: boolean;\n paneSplitOrientation?: SplitLayoutType;\n onSplitPaneOrientationChange?: (orientation: SplitLayoutType) => void;\n onChange?: (\n data: {type: 'PARAMS_CHANGED'; data: {params: StringParams}},\n state: {forceUpdate: boolean},\n callExternalOnChange?: boolean,\n ) => void;\n };\n 'gravity-charts': {\n data: ChartData;\n widget: never;\n tooltip?: {\n splitted?: boolean;\n };\n };\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cn.js","sourceRoot":"../../../src","sources":["utils/cn.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAC,MAAM,sBAAsB,CAAC;AAEhD,MAAM,CAAC,MAAM,SAAS,GAAG,WAAW,CAAC;AAErC,MAAM,CAAC,MAAM,EAAE,GAAG,UAAU,CAAC,EAAC,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,GAAG,EAAC,CAAC,CAAC;AAChD,MAAM,CAAC,MAAM,KAAK,GAAG,UAAU,CAAC,EAAC,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,GAAG,EAAC,CAAC,CAAC","sourcesContent":["import {withNaming} from '@bem-react/classname';\n\nexport const NAMESPACE = 'chartkit-';\n\nexport const cn = withNaming({e: '__', m: '_'});\nexport const block = withNaming({n: NAMESPACE, e: '__', m: '_'});\n"]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export const randomString = (length, chars) => {
|
|
2
|
+
let result = '';
|
|
3
|
+
for (let i = length; i > 0; --i) {
|
|
4
|
+
result += chars[Math.floor(Math.random() * chars.length)];
|
|
5
|
+
}
|
|
6
|
+
return result;
|
|
7
|
+
};
|
|
8
|
+
export const getRandomCKId = () => `ck.${randomString(10, '0123456789abcdefghijklmnopqrstuvwxyz')}`;
|
|
9
|
+
//# sourceMappingURL=common.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"common.js","sourceRoot":"../../../src","sources":["utils/common.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,MAAc,EAAE,KAAa,EAAE,EAAE;IAC1D,IAAI,MAAM,GAAG,EAAE,CAAC;IAChB,KAAK,IAAI,CAAC,GAAG,MAAM,EAAE,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,EAAE,CAAC;QAC9B,MAAM,IAAI,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;IAC9D,CAAC;IACD,OAAO,MAAM,CAAC;AAClB,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAAG,GAAG,EAAE,CAAC,MAAM,YAAY,CAAC,EAAE,EAAE,sCAAsC,CAAC,EAAE,CAAC","sourcesContent":["export const randomString = (length: number, chars: string) => {\n let result = '';\n for (let i = length; i > 0; --i) {\n result += chars[Math.floor(Math.random() * chars.length)];\n }\n return result;\n};\n\nexport const getRandomCKId = () => `ck.${randomString(10, '0123456789abcdefghijklmnopqrstuvwxyz')}`;\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getErrorMessage.js","sourceRoot":"../../../src","sources":["utils/getErrorMessage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,IAAI,EAAC,yBAAgB;AAG7B,MAAM,UAAU,eAAe,CAAC,KAA4B;IACxD,MAAM,IAAI,GAAG,MAAM,IAAI,KAAK,IAAI,KAAK,CAAC,IAAI,CAAC;IAC3C,OAAO,CAAC,KAAK,CAAC,OAAO,IAAI,IAAI,IAAI,IAAI,CAAC,OAAO,EAAE,qBAAqB,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC;AACtF,CAAC","sourcesContent":["import {i18n} from '../i18n';\nimport type {ChartKitError} from '../libs';\n\nexport function getErrorMessage(error: ChartKitError | Error) {\n const code = 'code' in error && error.code;\n return (error.message || code || i18n('error', 'label_unknown-error')).toString();\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"../../../src","sources":["utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,aAAa,EAAE,YAAY,EAAC,oBAAiB;AACrD,OAAO,EAAC,SAAS,EAAC,mBAAgB;AAClC,iCAA8B;AAC9B,0BAAuB","sourcesContent":["export {getRandomCKId, randomString} from './common';\nexport {typedMemo} from './react';\nexport * from './performance';\nexport * from './misc';\n"]}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export type MergeCustomizer = (objValue: unknown, srcValue: unknown, key: string, object: unknown, source: unknown) => unknown;
|
|
2
|
+
/**
|
|
3
|
+
* es-toolkit's merge from the compat layer, for user options. When one object of a source sits at
|
|
4
|
+
* several paths, es-toolkit merges it once and reuses that result for the other paths: a default
|
|
5
|
+
* shared by two series types would get the user options of the first type. Such a source is copied
|
|
6
|
+
* first, so every path is merged on its own, as lodash did. Dates, class instances and other
|
|
7
|
+
* non-plain objects of a source replace the target value, typed arrays are copied, a source object
|
|
8
|
+
* that replaces a function or a primitive is copied, and a cycle points to the merged ancestor, also
|
|
9
|
+
* as in lodash.
|
|
10
|
+
*/
|
|
11
|
+
export declare function merge<T, U>(object: T, source: U): T & U;
|
|
12
|
+
export declare function merge<T, U, V>(object: T, source1: U, source2: V): T & U & V;
|
|
13
|
+
export declare function merge<T, U, V, W>(object: T, source1: U, source2: V, source3: W): T & U & V & W;
|
|
14
|
+
/**
|
|
15
|
+
* merge with a customizer, as lodash's mergeWith: the customizer gets the target value itself and
|
|
16
|
+
* decides first; where it returns undefined, the values are merged as by merge.
|
|
17
|
+
*/
|
|
18
|
+
export declare function mergeWith<T, U>(object: T, source: U, customizer: MergeCustomizer): T & U;
|
|
19
|
+
export declare function mergeWith<T, U, V>(object: T, source1: U, source2: V, customizer: MergeCustomizer): T & U & V;
|