@levi-gemcommerce/analytics 1.0.0-dev.24 → 1.0.0-dev.26
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 +31 -32
- package/dist/esm/index.mjs +31 -32
- package/dist/esm/providers/MetricChartProvider.d.ts +1 -0
- package/dist/esm/shared/charts/contexts/GChartProvider.d.ts +1 -0
- package/dist/umd/esm/providers/MetricChartProvider.d.ts +1 -0
- package/dist/umd/esm/shared/charts/contexts/GChartProvider.d.ts +1 -0
- package/dist/umd/index.js +3 -3
- package/package.json +1 -1
package/dist/esm/index.js
CHANGED
|
@@ -12,10 +12,9 @@ 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
|
|
15
|
+
import '@shopify/polaris-viz/build/esm/styles.css';
|
|
16
16
|
import { unstable_batchedUpdates, createPortal } from 'react-dom';
|
|
17
17
|
import { t as t$1 } from 'i18next';
|
|
18
|
-
import IMAGE_ANALYTIC_EMPTY$1 from '~/modules/analytics/assets/img/analytic-empty.png';
|
|
19
18
|
|
|
20
19
|
var EMetricKey;
|
|
21
20
|
(function (EMetricKey) {
|
|
@@ -1252,19 +1251,19 @@ const LINE_SERIES_COLORS = {
|
|
|
1252
1251
|
all: [...SERIES_COLORS.all],
|
|
1253
1252
|
};
|
|
1254
1253
|
const MetricChartProvider = ({ children, minHeight = CHART_MIN_HEIGHT, seriesColors = LINE_SERIES_COLORS, }) => {
|
|
1255
|
-
return (
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
},
|
|
1265
|
-
seriesColors,
|
|
1254
|
+
return (jsx(Fragment, { children: jsx(PolarisVizProvider, { themes: {
|
|
1255
|
+
Light: {
|
|
1256
|
+
chartContainer: {
|
|
1257
|
+
minHeight,
|
|
1258
|
+
},
|
|
1259
|
+
grid: {
|
|
1260
|
+
horizontalOverflow: true,
|
|
1261
|
+
verticalOverflow: true,
|
|
1262
|
+
horizontalMargin: 0,
|
|
1266
1263
|
},
|
|
1267
|
-
|
|
1264
|
+
seriesColors,
|
|
1265
|
+
},
|
|
1266
|
+
}, children: children }) }));
|
|
1268
1267
|
};
|
|
1269
1268
|
|
|
1270
1269
|
const DEFAULT_PRICING_CONTEXT = {
|
|
@@ -24953,24 +24952,24 @@ const ChartContainerWrapper = ({ props, children, height, }) => {
|
|
|
24953
24952
|
};
|
|
24954
24953
|
|
|
24955
24954
|
const GChartProvider = ({ children, minHeight = 228, seriesColors, }) => {
|
|
24956
|
-
return (
|
|
24957
|
-
|
|
24958
|
-
|
|
24959
|
-
|
|
24960
|
-
|
|
24961
|
-
|
|
24962
|
-
|
|
24963
|
-
|
|
24964
|
-
|
|
24965
|
-
},
|
|
24966
|
-
seriesColors: {
|
|
24967
|
-
comparison: 'rgba(64, 176, 230, 1)',
|
|
24968
|
-
single: 'rgba(64, 176, 230, 1)',
|
|
24969
|
-
all: ['#2C7DFF', '#F34A70'],
|
|
24970
|
-
...seriesColors,
|
|
24971
|
-
},
|
|
24955
|
+
return (jsx(Fragment, { children: jsx(PolarisVizProvider, { themes: {
|
|
24956
|
+
Light: {
|
|
24957
|
+
chartContainer: {
|
|
24958
|
+
minHeight,
|
|
24959
|
+
},
|
|
24960
|
+
grid: {
|
|
24961
|
+
horizontalOverflow: true,
|
|
24962
|
+
verticalOverflow: true,
|
|
24963
|
+
horizontalMargin: 0,
|
|
24972
24964
|
},
|
|
24973
|
-
|
|
24965
|
+
seriesColors: {
|
|
24966
|
+
comparison: 'rgba(64, 176, 230, 1)',
|
|
24967
|
+
single: 'rgba(64, 176, 230, 1)',
|
|
24968
|
+
all: ['#2C7DFF', '#F34A70'],
|
|
24969
|
+
...seriesColors,
|
|
24970
|
+
},
|
|
24971
|
+
},
|
|
24972
|
+
}, children: children }) }));
|
|
24974
24973
|
};
|
|
24975
24974
|
|
|
24976
24975
|
const FunnelSelectionItem = ({ item, isSelected, isChangeFunnel, onSelectRow }) => {
|
|
@@ -25318,7 +25317,7 @@ const PathAnalysisChart = ({ funnelColors, isEnabled }) => {
|
|
|
25318
25317
|
const CardAnalyticEmpty = ({ boxProps, minHeight, description, title }) => {
|
|
25319
25318
|
const { t } = useTranslation();
|
|
25320
25319
|
const descriptionText = description || t('Data needs time to gather');
|
|
25321
|
-
return (jsx(Box, { minWidth: "100%", ...boxProps, children: jsx(GBlockCenter, { minHeight: minHeight, children: jsx(Box, { padding: '400', children: jsxs(BlockStack, { gap: "400", align: "center", inlineAlign: "center", children: [jsx("div", { className: "h-[80px] w-[80px]", children: jsx(GThumbnail, { source: IMAGE_ANALYTIC_EMPTY
|
|
25320
|
+
return (jsx(Box, { minWidth: "100%", ...boxProps, children: jsx(GBlockCenter, { minHeight: minHeight, children: jsx(Box, { padding: '400', children: jsxs(BlockStack, { gap: "400", align: "center", inlineAlign: "center", children: [jsx("div", { className: "h-[80px] w-[80px]", children: jsx(GThumbnail, { source: IMAGE_ANALYTIC_EMPTY, width: "80px", height: "80px", alt: t('No data yet'), classRemoved: true }) }), jsxs(BlockStack, { gap: "200", align: "center", inlineAlign: "center", children: [jsx(Text, { as: "h4", variant: "headingSm", fontWeight: "semibold", children: title || t('No data yet') }), jsx(Text, { as: "h4", variant: "bodyMd", tone: "subdued", children: descriptionText })] })] }) }) }) }));
|
|
25322
25321
|
};
|
|
25323
25322
|
|
|
25324
25323
|
const CardPathAnalysisEmpty = ({ funnelColors }) => {
|
package/dist/esm/index.mjs
CHANGED
|
@@ -12,10 +12,9 @@ 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
|
|
15
|
+
import '@shopify/polaris-viz/build/esm/styles.css';
|
|
16
16
|
import { unstable_batchedUpdates, createPortal } from 'react-dom';
|
|
17
17
|
import { t as t$1 } from 'i18next';
|
|
18
|
-
import IMAGE_ANALYTIC_EMPTY$1 from '~/modules/analytics/assets/img/analytic-empty.png';
|
|
19
18
|
|
|
20
19
|
var EMetricKey;
|
|
21
20
|
(function (EMetricKey) {
|
|
@@ -1252,19 +1251,19 @@ const LINE_SERIES_COLORS = {
|
|
|
1252
1251
|
all: [...SERIES_COLORS.all],
|
|
1253
1252
|
};
|
|
1254
1253
|
const MetricChartProvider = ({ children, minHeight = CHART_MIN_HEIGHT, seriesColors = LINE_SERIES_COLORS, }) => {
|
|
1255
|
-
return (
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
},
|
|
1265
|
-
seriesColors,
|
|
1254
|
+
return (jsx(Fragment, { children: jsx(PolarisVizProvider, { themes: {
|
|
1255
|
+
Light: {
|
|
1256
|
+
chartContainer: {
|
|
1257
|
+
minHeight,
|
|
1258
|
+
},
|
|
1259
|
+
grid: {
|
|
1260
|
+
horizontalOverflow: true,
|
|
1261
|
+
verticalOverflow: true,
|
|
1262
|
+
horizontalMargin: 0,
|
|
1266
1263
|
},
|
|
1267
|
-
|
|
1264
|
+
seriesColors,
|
|
1265
|
+
},
|
|
1266
|
+
}, children: children }) }));
|
|
1268
1267
|
};
|
|
1269
1268
|
|
|
1270
1269
|
const DEFAULT_PRICING_CONTEXT = {
|
|
@@ -24953,24 +24952,24 @@ const ChartContainerWrapper = ({ props, children, height, }) => {
|
|
|
24953
24952
|
};
|
|
24954
24953
|
|
|
24955
24954
|
const GChartProvider = ({ children, minHeight = 228, seriesColors, }) => {
|
|
24956
|
-
return (
|
|
24957
|
-
|
|
24958
|
-
|
|
24959
|
-
|
|
24960
|
-
|
|
24961
|
-
|
|
24962
|
-
|
|
24963
|
-
|
|
24964
|
-
|
|
24965
|
-
},
|
|
24966
|
-
seriesColors: {
|
|
24967
|
-
comparison: 'rgba(64, 176, 230, 1)',
|
|
24968
|
-
single: 'rgba(64, 176, 230, 1)',
|
|
24969
|
-
all: ['#2C7DFF', '#F34A70'],
|
|
24970
|
-
...seriesColors,
|
|
24971
|
-
},
|
|
24955
|
+
return (jsx(Fragment, { children: jsx(PolarisVizProvider, { themes: {
|
|
24956
|
+
Light: {
|
|
24957
|
+
chartContainer: {
|
|
24958
|
+
minHeight,
|
|
24959
|
+
},
|
|
24960
|
+
grid: {
|
|
24961
|
+
horizontalOverflow: true,
|
|
24962
|
+
verticalOverflow: true,
|
|
24963
|
+
horizontalMargin: 0,
|
|
24972
24964
|
},
|
|
24973
|
-
|
|
24965
|
+
seriesColors: {
|
|
24966
|
+
comparison: 'rgba(64, 176, 230, 1)',
|
|
24967
|
+
single: 'rgba(64, 176, 230, 1)',
|
|
24968
|
+
all: ['#2C7DFF', '#F34A70'],
|
|
24969
|
+
...seriesColors,
|
|
24970
|
+
},
|
|
24971
|
+
},
|
|
24972
|
+
}, children: children }) }));
|
|
24974
24973
|
};
|
|
24975
24974
|
|
|
24976
24975
|
const FunnelSelectionItem = ({ item, isSelected, isChangeFunnel, onSelectRow }) => {
|
|
@@ -25318,7 +25317,7 @@ const PathAnalysisChart = ({ funnelColors, isEnabled }) => {
|
|
|
25318
25317
|
const CardAnalyticEmpty = ({ boxProps, minHeight, description, title }) => {
|
|
25319
25318
|
const { t } = useTranslation();
|
|
25320
25319
|
const descriptionText = description || t('Data needs time to gather');
|
|
25321
|
-
return (jsx(Box, { minWidth: "100%", ...boxProps, children: jsx(GBlockCenter, { minHeight: minHeight, children: jsx(Box, { padding: '400', children: jsxs(BlockStack, { gap: "400", align: "center", inlineAlign: "center", children: [jsx("div", { className: "h-[80px] w-[80px]", children: jsx(GThumbnail, { source: IMAGE_ANALYTIC_EMPTY
|
|
25320
|
+
return (jsx(Box, { minWidth: "100%", ...boxProps, children: jsx(GBlockCenter, { minHeight: minHeight, children: jsx(Box, { padding: '400', children: jsxs(BlockStack, { gap: "400", align: "center", inlineAlign: "center", children: [jsx("div", { className: "h-[80px] w-[80px]", children: jsx(GThumbnail, { source: IMAGE_ANALYTIC_EMPTY, width: "80px", height: "80px", alt: t('No data yet'), classRemoved: true }) }), jsxs(BlockStack, { gap: "200", align: "center", inlineAlign: "center", children: [jsx(Text, { as: "h4", variant: "headingSm", fontWeight: "semibold", children: title || t('No data yet') }), jsx(Text, { as: "h4", variant: "bodyMd", tone: "subdued", children: descriptionText })] })] }) }) }) }));
|
|
25322
25321
|
};
|
|
25323
25322
|
|
|
25324
25323
|
const CardPathAnalysisEmpty = ({ funnelColors }) => {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { PartialTheme } from '@shopify/polaris-viz-core';
|
|
2
2
|
import type { ReactElement, ReactNode } from 'react';
|
|
3
|
+
import '@shopify/polaris-viz/build/esm/styles.css';
|
|
3
4
|
type ISeriesColors = PartialTheme['seriesColors'];
|
|
4
5
|
export interface IProps {
|
|
5
6
|
children: ReactNode;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { PartialTheme } from '@shopify/polaris-viz-core';
|
|
2
2
|
import type { ReactElement, ReactNode } from 'react';
|
|
3
|
+
import '@shopify/polaris-viz/build/esm/styles.css';
|
|
3
4
|
type ISeriesColors = PartialTheme['seriesColors'];
|
|
4
5
|
export interface IProps {
|
|
5
6
|
children: ReactNode;
|