@levi-gemcommerce/analytics 2.0.3-dev.1 → 2.0.5-dev.1
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/dist/esm/index.js
CHANGED
|
@@ -2460,6 +2460,10 @@ const LINE_SERIES_COLORS = {
|
|
|
2460
2460
|
all: [...SERIES_COLORS.all],
|
|
2461
2461
|
};
|
|
2462
2462
|
const MetricChartProvider = ({ children, minHeight = CHART_MIN_HEIGHT, seriesColors = LINE_SERIES_COLORS, }) => {
|
|
2463
|
+
const [mounted, setMounted] = useState(false);
|
|
2464
|
+
useEffect(() => setMounted(true), []);
|
|
2465
|
+
if (!mounted)
|
|
2466
|
+
return jsx(Fragment, {});
|
|
2463
2467
|
return (jsxs(Fragment, { children: [jsx("link", { rel: "stylesheet", href: chartStyle }), jsx(PolarisVizProvider, { themes: {
|
|
2464
2468
|
Light: {
|
|
2465
2469
|
chartContainer: {
|
package/dist/esm/index.mjs
CHANGED
|
@@ -2460,6 +2460,10 @@ const LINE_SERIES_COLORS = {
|
|
|
2460
2460
|
all: [...SERIES_COLORS.all],
|
|
2461
2461
|
};
|
|
2462
2462
|
const MetricChartProvider = ({ children, minHeight = CHART_MIN_HEIGHT, seriesColors = LINE_SERIES_COLORS, }) => {
|
|
2463
|
+
const [mounted, setMounted] = useState(false);
|
|
2464
|
+
useEffect(() => setMounted(true), []);
|
|
2465
|
+
if (!mounted)
|
|
2466
|
+
return jsx(Fragment, {});
|
|
2463
2467
|
return (jsxs(Fragment, { children: [jsx("link", { rel: "stylesheet", href: chartStyle }), jsx(PolarisVizProvider, { themes: {
|
|
2464
2468
|
Light: {
|
|
2465
2469
|
chartContainer: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { PartialTheme } from '@shopify/polaris-viz-core';
|
|
2
|
-
import type
|
|
2
|
+
import { type ReactElement, type ReactNode } from 'react';
|
|
3
3
|
type ISeriesColors = PartialTheme['seriesColors'];
|
|
4
4
|
export interface IProps {
|
|
5
5
|
children: ReactNode;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { PartialTheme } from '@shopify/polaris-viz-core';
|
|
2
|
-
import type
|
|
2
|
+
import { type ReactElement, type ReactNode } from 'react';
|
|
3
3
|
type ISeriesColors = PartialTheme['seriesColors'];
|
|
4
4
|
export interface IProps {
|
|
5
5
|
children: ReactNode;
|