@levi-gemcommerce/analytics 1.0.0-dev.23 → 1.0.0-dev.25

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.
@@ -1,3 +1,4 @@
1
+ export * from './CardJourneyAnalysis';
1
2
  export * from './components';
2
3
  export * from './contexts';
3
4
  export * from './constants';
package/dist/esm/index.js CHANGED
@@ -15,7 +15,6 @@ import { PolarisVizProvider, LineChart, DonutChart } from '@shopify/polaris-viz'
15
15
  import chartStyle from '@shopify/polaris-viz/build/esm/styles.css?url';
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) {
@@ -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$1, 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 })] })] }) }) }) }));
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 }) => {
@@ -25373,6 +25372,11 @@ const CardPathAnalysis = (props) => {
25373
25372
  return (jsxs(CardPathAnalysisWrapper, { campaignID: campaignID, campaignGroupID: campaignGroupID, campaignVariantID: campaignVariantID, analyticMode: analyticMode, campaignPathsData: campaignPathsData, campaignVersionID: campaignVersionID, analyticsData: analyticsData, children: [jsx(Box, { children: children }), jsx(CardPathAnalysisContent, { ...props })] }));
25374
25373
  };
25375
25374
 
25375
+ const CardJourneyAnalysis = ({ analyticMode, ...props }) => {
25376
+ const { t } = useTranslation();
25377
+ return (jsx(CardPathAnalysis, { analyticMode: analyticMode || EAnalyticMode.ALL_SESSION, ...props, children: jsx(InlineStack, { gap: "200", children: jsx(GTooltipCard, { tooltip: ANALYTICS_METRIC_TOOLTIP[EMetricKey.PAGE_PATH_ANALYSIS], children: jsx(Text, { as: "h3", variant: "headingMd", children: t('Journey analysis') }) }) }) }));
25378
+ };
25379
+
25376
25380
  function isBrowser() {
25377
25381
  return typeof window !== 'undefined';
25378
25382
  }
@@ -25416,4 +25420,4 @@ const useStickyFilterBoxProps = ({ id }) => {
25416
25420
  };
25417
25421
  };
25418
25422
 
25419
- export { ANALYTICS_METRIC_TOOLTIP, AnalyticModeSelector, CAMPAIGN_BACKGROUND_MAIN, CHART_MIN_HEIGHT, COMPARE_DATE_TIME_FILTERS_MAP, CardPathAnalysis, CompareDateTimePickerAlias, ConvertMoneyProvider, CurrencySelector, DATE_TIME_COMPARISON_FILTERS, DEFAULT_CURRENCY_ANALYTIC, DEFAULT_CURRENT_PERIOD_LABEL, DEFAULT_PREVIOUS_PERIOD_LABEL, DateTimeFilterInputs, DateTimeFilters, DateTimePickerContext, DateTimePickerProvider, FUNNEL_POPOVER_KEY, GSelectableMetricChartCard, GTimePicker, IVariantType, MOCK_DATA_PATH_ANALYSIS, MainDateTimePickerAlias, MetricChartProvider, MetricDonutChartCard, PLACEHOLDER_VALUE$1 as PLACEHOLDER_VALUE, PREVIOUS_PERIOD_FILTER, PathAnalysisContext, PathAnalysisProvider, PricingProvider, SERIES_COLORS, SingleMetricChartCard, TARGET_CHANNEL, TARGET_DEVICES, TARGET_VISITOR, THUMB_PRODUCT_DEFAULT, TREND_TONE, convertDateToTz, convertToDateTimeFilters, createLastDaysRange, dayjsTz, dayjsTzToDate, dayjsTzToLocalTZ, formatDate, formatDateTimeRange, formatDayjs, formatMs, formatTime, formatTimeRange, getDateRangeTitle, getDateTimeFilterBase, getDateTimeFilterByAlias, getDateTimeFilterMapping, getEndOfDayBy, getInitialTimezone, getLast12Months, getLast30Days, getLast365Days, getLast7Days, getLast90Days, getLastMonth, getLastYear, getMonthAndYearByDateFilter, getNoComparison, getPreviousMonth, getPreviousPeriod, getPreviousQuarter, getPreviousWeek, getPreviousYear, getToday, getVersionDateDescription, getVersionDateRangeTitle, getYesterday, isDate, isMidnight, isSameDayTimestamp, isValidDate, isValidYearMonthDayDateString, parseYearMonthDayDateString, setTz, useConvertMoneyContext, useCurrencyRatesStore, useDateTimeFilter, useDateTimePicker, useDateTimePickerContext, useFunnelChartStore, useIsStickyById, useLimitPathAnalysis, usePathAnalysisCampaignStore, usePathAnalysisContext, usePathAnalysisStore, usePricingContext, usePricingModalMonitor, usePricingPlanActive, usePricingPlanActiveState, useStickyFilterBoxProps, useVersionDateTimeFilters };
25423
+ export { ANALYTICS_METRIC_TOOLTIP, AnalyticModeSelector, CAMPAIGN_BACKGROUND_MAIN, CHART_MIN_HEIGHT, COMPARE_DATE_TIME_FILTERS_MAP, CardJourneyAnalysis, CardPathAnalysis, CompareDateTimePickerAlias, ConvertMoneyProvider, CurrencySelector, DATE_TIME_COMPARISON_FILTERS, DEFAULT_CURRENCY_ANALYTIC, DEFAULT_CURRENT_PERIOD_LABEL, DEFAULT_PREVIOUS_PERIOD_LABEL, DateTimeFilterInputs, DateTimeFilters, DateTimePickerContext, DateTimePickerProvider, FUNNEL_POPOVER_KEY, GSelectableMetricChartCard, GTimePicker, IVariantType, MOCK_DATA_PATH_ANALYSIS, MainDateTimePickerAlias, MetricChartProvider, MetricDonutChartCard, PLACEHOLDER_VALUE$1 as PLACEHOLDER_VALUE, PREVIOUS_PERIOD_FILTER, PathAnalysisContext, PathAnalysisProvider, PricingProvider, SERIES_COLORS, SingleMetricChartCard, TARGET_CHANNEL, TARGET_DEVICES, TARGET_VISITOR, THUMB_PRODUCT_DEFAULT, TREND_TONE, convertDateToTz, convertToDateTimeFilters, createLastDaysRange, dayjsTz, dayjsTzToDate, dayjsTzToLocalTZ, formatDate, formatDateTimeRange, formatDayjs, formatMs, formatTime, formatTimeRange, getDateRangeTitle, getDateTimeFilterBase, getDateTimeFilterByAlias, getDateTimeFilterMapping, getEndOfDayBy, getInitialTimezone, getLast12Months, getLast30Days, getLast365Days, getLast7Days, getLast90Days, getLastMonth, getLastYear, getMonthAndYearByDateFilter, getNoComparison, getPreviousMonth, getPreviousPeriod, getPreviousQuarter, getPreviousWeek, getPreviousYear, getToday, getVersionDateDescription, getVersionDateRangeTitle, getYesterday, isDate, isMidnight, isSameDayTimestamp, isValidDate, isValidYearMonthDayDateString, parseYearMonthDayDateString, setTz, useConvertMoneyContext, useCurrencyRatesStore, useDateTimeFilter, useDateTimePicker, useDateTimePickerContext, useFunnelChartStore, useIsStickyById, useLimitPathAnalysis, usePathAnalysisCampaignStore, usePathAnalysisContext, usePathAnalysisStore, usePricingContext, usePricingModalMonitor, usePricingPlanActive, usePricingPlanActiveState, useStickyFilterBoxProps, useVersionDateTimeFilters };
@@ -15,7 +15,6 @@ import { PolarisVizProvider, LineChart, DonutChart } from '@shopify/polaris-viz'
15
15
  import chartStyle from '@shopify/polaris-viz/build/esm/styles.css?url';
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) {
@@ -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$1, 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 })] })] }) }) }) }));
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 }) => {
@@ -25373,6 +25372,11 @@ const CardPathAnalysis = (props) => {
25373
25372
  return (jsxs(CardPathAnalysisWrapper, { campaignID: campaignID, campaignGroupID: campaignGroupID, campaignVariantID: campaignVariantID, analyticMode: analyticMode, campaignPathsData: campaignPathsData, campaignVersionID: campaignVersionID, analyticsData: analyticsData, children: [jsx(Box, { children: children }), jsx(CardPathAnalysisContent, { ...props })] }));
25374
25373
  };
25375
25374
 
25375
+ const CardJourneyAnalysis = ({ analyticMode, ...props }) => {
25376
+ const { t } = useTranslation();
25377
+ return (jsx(CardPathAnalysis, { analyticMode: analyticMode || EAnalyticMode.ALL_SESSION, ...props, children: jsx(InlineStack, { gap: "200", children: jsx(GTooltipCard, { tooltip: ANALYTICS_METRIC_TOOLTIP[EMetricKey.PAGE_PATH_ANALYSIS], children: jsx(Text, { as: "h3", variant: "headingMd", children: t('Journey analysis') }) }) }) }));
25378
+ };
25379
+
25376
25380
  function isBrowser() {
25377
25381
  return typeof window !== 'undefined';
25378
25382
  }
@@ -25416,4 +25420,4 @@ const useStickyFilterBoxProps = ({ id }) => {
25416
25420
  };
25417
25421
  };
25418
25422
 
25419
- export { ANALYTICS_METRIC_TOOLTIP, AnalyticModeSelector, CAMPAIGN_BACKGROUND_MAIN, CHART_MIN_HEIGHT, COMPARE_DATE_TIME_FILTERS_MAP, CardPathAnalysis, CompareDateTimePickerAlias, ConvertMoneyProvider, CurrencySelector, DATE_TIME_COMPARISON_FILTERS, DEFAULT_CURRENCY_ANALYTIC, DEFAULT_CURRENT_PERIOD_LABEL, DEFAULT_PREVIOUS_PERIOD_LABEL, DateTimeFilterInputs, DateTimeFilters, DateTimePickerContext, DateTimePickerProvider, FUNNEL_POPOVER_KEY, GSelectableMetricChartCard, GTimePicker, IVariantType, MOCK_DATA_PATH_ANALYSIS, MainDateTimePickerAlias, MetricChartProvider, MetricDonutChartCard, PLACEHOLDER_VALUE$1 as PLACEHOLDER_VALUE, PREVIOUS_PERIOD_FILTER, PathAnalysisContext, PathAnalysisProvider, PricingProvider, SERIES_COLORS, SingleMetricChartCard, TARGET_CHANNEL, TARGET_DEVICES, TARGET_VISITOR, THUMB_PRODUCT_DEFAULT, TREND_TONE, convertDateToTz, convertToDateTimeFilters, createLastDaysRange, dayjsTz, dayjsTzToDate, dayjsTzToLocalTZ, formatDate, formatDateTimeRange, formatDayjs, formatMs, formatTime, formatTimeRange, getDateRangeTitle, getDateTimeFilterBase, getDateTimeFilterByAlias, getDateTimeFilterMapping, getEndOfDayBy, getInitialTimezone, getLast12Months, getLast30Days, getLast365Days, getLast7Days, getLast90Days, getLastMonth, getLastYear, getMonthAndYearByDateFilter, getNoComparison, getPreviousMonth, getPreviousPeriod, getPreviousQuarter, getPreviousWeek, getPreviousYear, getToday, getVersionDateDescription, getVersionDateRangeTitle, getYesterday, isDate, isMidnight, isSameDayTimestamp, isValidDate, isValidYearMonthDayDateString, parseYearMonthDayDateString, setTz, useConvertMoneyContext, useCurrencyRatesStore, useDateTimeFilter, useDateTimePicker, useDateTimePickerContext, useFunnelChartStore, useIsStickyById, useLimitPathAnalysis, usePathAnalysisCampaignStore, usePathAnalysisContext, usePathAnalysisStore, usePricingContext, usePricingModalMonitor, usePricingPlanActive, usePricingPlanActiveState, useStickyFilterBoxProps, useVersionDateTimeFilters };
25423
+ export { ANALYTICS_METRIC_TOOLTIP, AnalyticModeSelector, CAMPAIGN_BACKGROUND_MAIN, CHART_MIN_HEIGHT, COMPARE_DATE_TIME_FILTERS_MAP, CardJourneyAnalysis, CardPathAnalysis, CompareDateTimePickerAlias, ConvertMoneyProvider, CurrencySelector, DATE_TIME_COMPARISON_FILTERS, DEFAULT_CURRENCY_ANALYTIC, DEFAULT_CURRENT_PERIOD_LABEL, DEFAULT_PREVIOUS_PERIOD_LABEL, DateTimeFilterInputs, DateTimeFilters, DateTimePickerContext, DateTimePickerProvider, FUNNEL_POPOVER_KEY, GSelectableMetricChartCard, GTimePicker, IVariantType, MOCK_DATA_PATH_ANALYSIS, MainDateTimePickerAlias, MetricChartProvider, MetricDonutChartCard, PLACEHOLDER_VALUE$1 as PLACEHOLDER_VALUE, PREVIOUS_PERIOD_FILTER, PathAnalysisContext, PathAnalysisProvider, PricingProvider, SERIES_COLORS, SingleMetricChartCard, TARGET_CHANNEL, TARGET_DEVICES, TARGET_VISITOR, THUMB_PRODUCT_DEFAULT, TREND_TONE, convertDateToTz, convertToDateTimeFilters, createLastDaysRange, dayjsTz, dayjsTzToDate, dayjsTzToLocalTZ, formatDate, formatDateTimeRange, formatDayjs, formatMs, formatTime, formatTimeRange, getDateRangeTitle, getDateTimeFilterBase, getDateTimeFilterByAlias, getDateTimeFilterMapping, getEndOfDayBy, getInitialTimezone, getLast12Months, getLast30Days, getLast365Days, getLast7Days, getLast90Days, getLastMonth, getLastYear, getMonthAndYearByDateFilter, getNoComparison, getPreviousMonth, getPreviousPeriod, getPreviousQuarter, getPreviousWeek, getPreviousYear, getToday, getVersionDateDescription, getVersionDateRangeTitle, getYesterday, isDate, isMidnight, isSameDayTimestamp, isValidDate, isValidYearMonthDayDateString, parseYearMonthDayDateString, setTz, useConvertMoneyContext, useCurrencyRatesStore, useDateTimeFilter, useDateTimePicker, useDateTimePickerContext, useFunnelChartStore, useIsStickyById, useLimitPathAnalysis, usePathAnalysisCampaignStore, usePathAnalysisContext, usePathAnalysisStore, usePricingContext, usePricingModalMonitor, usePricingPlanActive, usePricingPlanActiveState, useStickyFilterBoxProps, useVersionDateTimeFilters };
@@ -1,3 +1,4 @@
1
+ export * from './CardJourneyAnalysis';
1
2
  export * from './components';
2
3
  export * from './contexts';
3
4
  export * from './constants';