@levi-gemcommerce/analytics 1.0.0-dev.33 → 1.0.0-dev.35

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
@@ -12,6 +12,7 @@ import { useTranslation } from 'react-i18next';
12
12
  import { create } from 'zustand';
13
13
  import { useQuery } from '@tanstack/react-query';
14
14
  import { PolarisVizProvider, LineChart, DonutChart } from '@shopify/polaris-viz';
15
+ import chartStyle from '@shopify/polaris-viz/build/esm/styles.css?url';
15
16
  import { unstable_batchedUpdates, createPortal } from 'react-dom';
16
17
  import { t as t$1 } from 'i18next';
17
18
 
@@ -1250,19 +1251,19 @@ const LINE_SERIES_COLORS = {
1250
1251
  all: [...SERIES_COLORS.all],
1251
1252
  };
1252
1253
  const MetricChartProvider = ({ children, minHeight = CHART_MIN_HEIGHT, seriesColors = LINE_SERIES_COLORS, }) => {
1253
- return (jsx(Fragment, { children: jsx(PolarisVizProvider, { themes: {
1254
- Light: {
1255
- chartContainer: {
1256
- minHeight,
1257
- },
1258
- grid: {
1259
- horizontalOverflow: true,
1260
- verticalOverflow: true,
1261
- horizontalMargin: 0,
1254
+ return (jsxs(Fragment, { children: [jsx("link", { rel: "stylesheet", href: chartStyle }), jsx(PolarisVizProvider, { themes: {
1255
+ Light: {
1256
+ chartContainer: {
1257
+ minHeight,
1258
+ },
1259
+ grid: {
1260
+ horizontalOverflow: true,
1261
+ verticalOverflow: true,
1262
+ horizontalMargin: 0,
1263
+ },
1264
+ seriesColors,
1262
1265
  },
1263
- seriesColors,
1264
- },
1265
- }, children: children }) }));
1266
+ }, children: children })] }));
1266
1267
  };
1267
1268
 
1268
1269
  const DEFAULT_PRICING_CONTEXT = {
@@ -22742,7 +22743,7 @@ const ChartContainer = (props) => {
22742
22743
  characterWidths,
22743
22744
  characterWidthOffsets,
22744
22745
  theme: printFriendlyTheme,
22745
- isTouchDevice: isTouchDevice(),
22746
+ isTouchDevice: typeof window === 'undefined' ? false : isTouchDevice(),
22746
22747
  isPerformanceImpacted: dataTooBigToAnimate,
22747
22748
  scrollContainer: props.scrollContainer,
22748
22749
  containerBounds: containerBounds ?? EMPTY_BOUNDS,
@@ -23600,24 +23601,24 @@ const ChartContainerWrapper = ({ props, children, height, }) => {
23600
23601
  };
23601
23602
 
23602
23603
  const GChartProvider = ({ children, minHeight = 228, seriesColors, }) => {
23603
- return (jsx(Fragment, { children: jsx(PolarisVizProvider, { themes: {
23604
- Light: {
23605
- chartContainer: {
23606
- minHeight,
23607
- },
23608
- grid: {
23609
- horizontalOverflow: true,
23610
- verticalOverflow: true,
23611
- horizontalMargin: 0,
23612
- },
23613
- seriesColors: {
23614
- comparison: 'rgba(64, 176, 230, 1)',
23615
- single: 'rgba(64, 176, 230, 1)',
23616
- all: ['#2C7DFF', '#F34A70'],
23617
- ...seriesColors,
23604
+ return (jsxs(Fragment, { children: [jsx("link", { rel: "stylesheet", href: chartStyle }), jsx(PolarisVizProvider, { themes: {
23605
+ Light: {
23606
+ chartContainer: {
23607
+ minHeight,
23608
+ },
23609
+ grid: {
23610
+ horizontalOverflow: true,
23611
+ verticalOverflow: true,
23612
+ horizontalMargin: 0,
23613
+ },
23614
+ seriesColors: {
23615
+ comparison: 'rgba(64, 176, 230, 1)',
23616
+ single: 'rgba(64, 176, 230, 1)',
23617
+ all: ['#2C7DFF', '#F34A70'],
23618
+ ...seriesColors,
23619
+ },
23618
23620
  },
23619
- },
23620
- }, children: children }) }));
23621
+ }, children: children })] }));
23621
23622
  };
23622
23623
 
23623
23624
  const FunnelSelectionItem = ({ item, isSelected, isChangeFunnel, onSelectRow }) => {
@@ -12,6 +12,7 @@ import { useTranslation } from 'react-i18next';
12
12
  import { create } from 'zustand';
13
13
  import { useQuery } from '@tanstack/react-query';
14
14
  import { PolarisVizProvider, LineChart, DonutChart } from '@shopify/polaris-viz';
15
+ import chartStyle from '@shopify/polaris-viz/build/esm/styles.css?url';
15
16
  import { unstable_batchedUpdates, createPortal } from 'react-dom';
16
17
  import { t as t$1 } from 'i18next';
17
18
 
@@ -1250,19 +1251,19 @@ const LINE_SERIES_COLORS = {
1250
1251
  all: [...SERIES_COLORS.all],
1251
1252
  };
1252
1253
  const MetricChartProvider = ({ children, minHeight = CHART_MIN_HEIGHT, seriesColors = LINE_SERIES_COLORS, }) => {
1253
- return (jsx(Fragment, { children: jsx(PolarisVizProvider, { themes: {
1254
- Light: {
1255
- chartContainer: {
1256
- minHeight,
1257
- },
1258
- grid: {
1259
- horizontalOverflow: true,
1260
- verticalOverflow: true,
1261
- horizontalMargin: 0,
1254
+ return (jsxs(Fragment, { children: [jsx("link", { rel: "stylesheet", href: chartStyle }), jsx(PolarisVizProvider, { themes: {
1255
+ Light: {
1256
+ chartContainer: {
1257
+ minHeight,
1258
+ },
1259
+ grid: {
1260
+ horizontalOverflow: true,
1261
+ verticalOverflow: true,
1262
+ horizontalMargin: 0,
1263
+ },
1264
+ seriesColors,
1262
1265
  },
1263
- seriesColors,
1264
- },
1265
- }, children: children }) }));
1266
+ }, children: children })] }));
1266
1267
  };
1267
1268
 
1268
1269
  const DEFAULT_PRICING_CONTEXT = {
@@ -22742,7 +22743,7 @@ const ChartContainer = (props) => {
22742
22743
  characterWidths,
22743
22744
  characterWidthOffsets,
22744
22745
  theme: printFriendlyTheme,
22745
- isTouchDevice: isTouchDevice(),
22746
+ isTouchDevice: typeof window === 'undefined' ? false : isTouchDevice(),
22746
22747
  isPerformanceImpacted: dataTooBigToAnimate,
22747
22748
  scrollContainer: props.scrollContainer,
22748
22749
  containerBounds: containerBounds ?? EMPTY_BOUNDS,
@@ -23600,24 +23601,24 @@ const ChartContainerWrapper = ({ props, children, height, }) => {
23600
23601
  };
23601
23602
 
23602
23603
  const GChartProvider = ({ children, minHeight = 228, seriesColors, }) => {
23603
- return (jsx(Fragment, { children: jsx(PolarisVizProvider, { themes: {
23604
- Light: {
23605
- chartContainer: {
23606
- minHeight,
23607
- },
23608
- grid: {
23609
- horizontalOverflow: true,
23610
- verticalOverflow: true,
23611
- horizontalMargin: 0,
23612
- },
23613
- seriesColors: {
23614
- comparison: 'rgba(64, 176, 230, 1)',
23615
- single: 'rgba(64, 176, 230, 1)',
23616
- all: ['#2C7DFF', '#F34A70'],
23617
- ...seriesColors,
23604
+ return (jsxs(Fragment, { children: [jsx("link", { rel: "stylesheet", href: chartStyle }), jsx(PolarisVizProvider, { themes: {
23605
+ Light: {
23606
+ chartContainer: {
23607
+ minHeight,
23608
+ },
23609
+ grid: {
23610
+ horizontalOverflow: true,
23611
+ verticalOverflow: true,
23612
+ horizontalMargin: 0,
23613
+ },
23614
+ seriesColors: {
23615
+ comparison: 'rgba(64, 176, 230, 1)',
23616
+ single: 'rgba(64, 176, 230, 1)',
23617
+ all: ['#2C7DFF', '#F34A70'],
23618
+ ...seriesColors,
23619
+ },
23618
23620
  },
23619
- },
23620
- }, children: children }) }));
23621
+ }, children: children })] }));
23621
23622
  };
23622
23623
 
23623
23624
  const FunnelSelectionItem = ({ item, isSelected, isChangeFunnel, onSelectRow }) => {