@gem-sdk/analytics 1.0.0-dev.21 → 1.0.0-dev.41

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.
Files changed (127) hide show
  1. package/dist/esm/api/graphql/fragments/pathAnalytic.generated.d.ts +25 -0
  2. package/dist/esm/components/CardPathAnalysis/CardJourneyAnalysis.d.ts +9 -0
  3. package/dist/esm/components/CardPathAnalysis/components/CardPathAnalysis/CardAnalyticEmpty.d.ts +8 -0
  4. package/dist/esm/components/CardPathAnalysis/components/CardPathAnalysis/CardPathAnalysis.d.ts +15 -0
  5. package/dist/esm/components/CardPathAnalysis/components/CardPathAnalysis/CardPathAnalysisContent.d.ts +6 -0
  6. package/dist/esm/components/CardPathAnalysis/components/CardPathAnalysis/CardPathAnalysisEmpty.d.ts +5 -0
  7. package/dist/esm/components/CardPathAnalysis/components/CardPathAnalysis/CardPathAnalysisSkeleton.d.ts +1 -0
  8. package/dist/esm/components/CardPathAnalysis/components/CardPathAnalysis/CardPathAnalysisWrapper.d.ts +13 -0
  9. package/dist/esm/components/CardPathAnalysis/components/CardPathAnalysis/index.d.ts +1 -0
  10. package/dist/esm/components/CardPathAnalysis/components/PathAnalysisChart.d.ts +8 -0
  11. package/dist/esm/components/CardPathAnalysis/components/index.d.ts +1 -0
  12. package/dist/esm/components/CardPathAnalysis/configs/index.d.ts +2 -0
  13. package/dist/esm/components/CardPathAnalysis/constants/index.d.ts +1 -0
  14. package/dist/esm/components/CardPathAnalysis/constants/path-analysis.d.ts +73 -0
  15. package/dist/esm/components/CardPathAnalysis/contexts/PathAnalysisConfigProvider.d.ts +23 -0
  16. package/dist/esm/components/CardPathAnalysis/contexts/PathAnalysisProvider.d.ts +59 -0
  17. package/dist/esm/components/CardPathAnalysis/contexts/index.d.ts +2 -0
  18. package/dist/esm/components/CardPathAnalysis/helpers/index.d.ts +2 -0
  19. package/dist/esm/components/CardPathAnalysis/helpers/metricHelpers.d.ts +16 -0
  20. package/dist/esm/components/CardPathAnalysis/helpers/pathAnalysis.d.ts +12 -0
  21. package/dist/esm/components/CardPathAnalysis/helpers/pathAnalysisChart.d.ts +17 -0
  22. package/dist/esm/components/CardPathAnalysis/helpers/treeUtils.d.ts +7 -0
  23. package/dist/esm/components/CardPathAnalysis/hooks/usePathAnalysisChart.d.ts +15 -0
  24. package/dist/esm/components/CardPathAnalysis/hooks/usePathAnalysisFunnel.d.ts +22 -0
  25. package/dist/esm/components/CardPathAnalysis/hooks/usePathAnalyticsMerger.d.ts +10 -0
  26. package/dist/esm/components/CardPathAnalysis/index.d.ts +5 -0
  27. package/dist/esm/components/CardPathAnalysis/stores/funnel-chart.d.ts +12 -0
  28. package/dist/esm/components/CardPathAnalysis/stores/index.d.ts +3 -0
  29. package/dist/esm/components/CardPathAnalysis/stores/path-analysis-campaign.d.ts +10 -0
  30. package/dist/esm/components/CardPathAnalysis/stores/path-analysis.d.ts +6 -0
  31. package/dist/esm/components/CardPathAnalysis/types/index.d.ts +1 -0
  32. package/dist/esm/components/CardPathAnalysis/types/path-analysis.d.ts +6 -0
  33. package/dist/esm/components/index.d.ts +1 -0
  34. package/dist/esm/gemxql.js +64 -1
  35. package/dist/esm/gemxql.mjs +64 -1
  36. package/dist/esm/hooks/useSearchParams.d.ts +1 -0
  37. package/dist/esm/index.js +21622 -108
  38. package/dist/esm/index.mjs +21622 -108
  39. package/dist/esm/modules/analytics/constants/index.d.ts +15 -0
  40. package/dist/esm/modules/analytics/index.d.ts +3 -0
  41. package/dist/esm/modules/analytics/types/index.d.ts +41 -0
  42. package/dist/esm/modules/analytics/utils/formatMetric.d.ts +8 -0
  43. package/dist/esm/modules/analytics/utils/getPAMetricValue.d.ts +3 -0
  44. package/dist/esm/modules/analytics/utils/index.d.ts +3 -0
  45. package/dist/esm/modules/analytics/utils/metric.d.ts +26 -0
  46. package/dist/esm/providers/ConvertMoneyProvider.d.ts +1 -1
  47. package/dist/esm/shared/charts/components/GPolarisViz/components/FunnelChartNext/components/TooltipWithPortal.d.ts +1 -1
  48. package/dist/esm/shared/charts/components/GPolarisViz/hooks/useRootContainer.d.ts +1 -1
  49. package/dist/esm/shared/components/GBox/GBox.d.ts +9 -0
  50. package/dist/esm/shared/components/GBox/index.d.ts +1 -0
  51. package/dist/esm/shared/components/GFeatureLocked/GFeatureLocked.d.ts +14 -0
  52. package/dist/esm/shared/components/GFeatureLocked/constants.d.ts +3 -0
  53. package/dist/esm/shared/components/GFeatureLocked/index.d.ts +2 -0
  54. package/dist/esm/shared/components/GFeatureLocked/types.d.ts +15 -0
  55. package/dist/esm/shared/components/index.d.ts +2 -0
  56. package/dist/esm/types/index.d.ts +1 -0
  57. package/dist/esm/types/metric.d.ts +20 -1
  58. package/dist/esm/types/pricing.d.ts +33 -0
  59. package/dist/esm/types/template.d.ts +19 -0
  60. package/dist/esm/types.js +39 -1
  61. package/dist/esm/types.mjs +39 -1
  62. package/dist/esm/utils/deep-copy.d.ts +1 -0
  63. package/dist/esm/utils/index.d.ts +2 -0
  64. package/dist/esm/utils/template-type.d.ts +2 -0
  65. package/dist/style.css +1 -1
  66. package/dist/umd/esm/api/graphql/fragments/pathAnalytic.generated.d.ts +25 -0
  67. package/dist/umd/esm/components/CardPathAnalysis/CardJourneyAnalysis.d.ts +9 -0
  68. package/dist/umd/esm/components/CardPathAnalysis/components/CardPathAnalysis/CardAnalyticEmpty.d.ts +8 -0
  69. package/dist/umd/esm/components/CardPathAnalysis/components/CardPathAnalysis/CardPathAnalysis.d.ts +15 -0
  70. package/dist/umd/esm/components/CardPathAnalysis/components/CardPathAnalysis/CardPathAnalysisContent.d.ts +6 -0
  71. package/dist/umd/esm/components/CardPathAnalysis/components/CardPathAnalysis/CardPathAnalysisEmpty.d.ts +5 -0
  72. package/dist/umd/esm/components/CardPathAnalysis/components/CardPathAnalysis/CardPathAnalysisSkeleton.d.ts +1 -0
  73. package/dist/umd/esm/components/CardPathAnalysis/components/CardPathAnalysis/CardPathAnalysisWrapper.d.ts +13 -0
  74. package/dist/umd/esm/components/CardPathAnalysis/components/CardPathAnalysis/index.d.ts +1 -0
  75. package/dist/umd/esm/components/CardPathAnalysis/components/PathAnalysisChart.d.ts +8 -0
  76. package/dist/umd/esm/components/CardPathAnalysis/components/index.d.ts +1 -0
  77. package/dist/umd/esm/components/CardPathAnalysis/configs/index.d.ts +2 -0
  78. package/dist/umd/esm/components/CardPathAnalysis/constants/index.d.ts +1 -0
  79. package/dist/umd/esm/components/CardPathAnalysis/constants/path-analysis.d.ts +73 -0
  80. package/dist/umd/esm/components/CardPathAnalysis/contexts/PathAnalysisConfigProvider.d.ts +23 -0
  81. package/dist/umd/esm/components/CardPathAnalysis/contexts/PathAnalysisProvider.d.ts +59 -0
  82. package/dist/umd/esm/components/CardPathAnalysis/contexts/index.d.ts +2 -0
  83. package/dist/umd/esm/components/CardPathAnalysis/helpers/index.d.ts +2 -0
  84. package/dist/umd/esm/components/CardPathAnalysis/helpers/metricHelpers.d.ts +16 -0
  85. package/dist/umd/esm/components/CardPathAnalysis/helpers/pathAnalysis.d.ts +12 -0
  86. package/dist/umd/esm/components/CardPathAnalysis/helpers/pathAnalysisChart.d.ts +17 -0
  87. package/dist/umd/esm/components/CardPathAnalysis/helpers/treeUtils.d.ts +7 -0
  88. package/dist/umd/esm/components/CardPathAnalysis/hooks/usePathAnalysisChart.d.ts +15 -0
  89. package/dist/umd/esm/components/CardPathAnalysis/hooks/usePathAnalysisFunnel.d.ts +22 -0
  90. package/dist/umd/esm/components/CardPathAnalysis/hooks/usePathAnalyticsMerger.d.ts +10 -0
  91. package/dist/umd/esm/components/CardPathAnalysis/index.d.ts +5 -0
  92. package/dist/umd/esm/components/CardPathAnalysis/stores/funnel-chart.d.ts +12 -0
  93. package/dist/umd/esm/components/CardPathAnalysis/stores/index.d.ts +3 -0
  94. package/dist/umd/esm/components/CardPathAnalysis/stores/path-analysis-campaign.d.ts +10 -0
  95. package/dist/umd/esm/components/CardPathAnalysis/stores/path-analysis.d.ts +6 -0
  96. package/dist/umd/esm/components/CardPathAnalysis/types/index.d.ts +1 -0
  97. package/dist/umd/esm/components/CardPathAnalysis/types/path-analysis.d.ts +6 -0
  98. package/dist/umd/esm/components/index.d.ts +1 -0
  99. package/dist/umd/esm/hooks/useSearchParams.d.ts +1 -0
  100. package/dist/umd/esm/modules/analytics/constants/index.d.ts +15 -0
  101. package/dist/umd/esm/modules/analytics/index.d.ts +3 -0
  102. package/dist/umd/esm/modules/analytics/types/index.d.ts +41 -0
  103. package/dist/umd/esm/modules/analytics/utils/formatMetric.d.ts +8 -0
  104. package/dist/umd/esm/modules/analytics/utils/getPAMetricValue.d.ts +3 -0
  105. package/dist/umd/esm/modules/analytics/utils/index.d.ts +3 -0
  106. package/dist/umd/esm/modules/analytics/utils/metric.d.ts +26 -0
  107. package/dist/umd/esm/providers/ConvertMoneyProvider.d.ts +1 -1
  108. package/dist/umd/esm/shared/charts/components/GPolarisViz/components/FunnelChartNext/components/TooltipWithPortal.d.ts +1 -1
  109. package/dist/umd/esm/shared/charts/components/GPolarisViz/hooks/useRootContainer.d.ts +1 -1
  110. package/dist/umd/esm/shared/components/GBox/GBox.d.ts +9 -0
  111. package/dist/umd/esm/shared/components/GBox/index.d.ts +1 -0
  112. package/dist/umd/esm/shared/components/GFeatureLocked/GFeatureLocked.d.ts +14 -0
  113. package/dist/umd/esm/shared/components/GFeatureLocked/constants.d.ts +3 -0
  114. package/dist/umd/esm/shared/components/GFeatureLocked/index.d.ts +2 -0
  115. package/dist/umd/esm/shared/components/GFeatureLocked/types.d.ts +15 -0
  116. package/dist/umd/esm/shared/components/index.d.ts +2 -0
  117. package/dist/umd/esm/types/index.d.ts +1 -0
  118. package/dist/umd/esm/types/metric.d.ts +20 -1
  119. package/dist/umd/esm/types/pricing.d.ts +33 -0
  120. package/dist/umd/esm/types/template.d.ts +19 -0
  121. package/dist/umd/esm/utils/deep-copy.d.ts +1 -0
  122. package/dist/umd/esm/utils/index.d.ts +2 -0
  123. package/dist/umd/esm/utils/template-type.d.ts +2 -0
  124. package/dist/umd/gemxql.js +1 -1
  125. package/dist/umd/index.js +1 -1
  126. package/dist/umd/types.js +1 -1
  127. package/package.json +5 -3
@@ -0,0 +1,15 @@
1
+ import type { IFunctionGetMetric } from '../types';
2
+ import { IPAMetricKey } from '../types';
3
+ interface IPageAnalyticMappingItem {
4
+ heading: {
5
+ title: string;
6
+ };
7
+ getMetricValue: IFunctionGetMetric;
8
+ }
9
+ export declare const PA_METRIC_TOOLTIP: Record<IPAMetricKey, unknown>;
10
+ export declare const SHOPIFY_PAGE_TYPE_KEY = "shopify_page_type";
11
+ export declare const METRICS_COLUMNS: Record<IPAMetricKey, {
12
+ label: string;
13
+ }>;
14
+ export declare const PAGE_ANALYTIC_MAPPING: Record<IPAMetricKey, IPageAnalyticMappingItem>;
15
+ export {};
@@ -0,0 +1,3 @@
1
+ export * from './constants';
2
+ export * from './types';
3
+ export * from './utils';
@@ -0,0 +1,41 @@
1
+ import type { IBasePageAnalyticMetric } from '@/types/metric';
2
+ export declare enum IPAMetricKey {
3
+ PAGE_SESSIONS = "PAGE_SESSIONS",
4
+ PAGE_BR = "PAGE_BOUNCE_RATE",
5
+ PAGE_CTR = "PAGE_CLICK_THROUGH_RATE",
6
+ PAGE_AVG_TIME = "PAGE_AVG_TIME",
7
+ PAGE_VIEWS = "PAGE_VIEWS",
8
+ PAGE_RPV = "PAGE_REVENUE_PER_VISITOR",
9
+ PAGE_REVENUE = "PAGE_REVENUE",
10
+ PAGE_NEW_RETURNING_CUSTOMER = "PAGE_NEW_RETURNING_CUSTOMER",
11
+ PAGE_SESSIONS_BY_VISITOR = "PAGE_SESSIONS_BY_VISITOR",
12
+ PAGE_SESSIONS_BY_DEVICE = "PAGE_SESSIONS_BY_DEVICE",
13
+ PAGE_SESSIONS_BY_TRAFFIC = "PAGE_SESSIONS_BY_TRAFFIC",
14
+ PAGE_PATH_ANALYSIS = "PAGE_PATH_ANALYSIS",
15
+ PAGE_CART_ADDITION = "PAGE_SESSION_WITH_CART_ADDITION",
16
+ PAGE_ADDED_TO_CART = "PAGE_ADDED_TO_CART",
17
+ PAGE_ADD_TO_CART_RATE = "ADD_TO_CART_RATE",
18
+ PAGE_REACHED_CHECKOUT = "PAGE_REACHED_CHECKOUT",
19
+ PAGE_COMPLETE_CHECKOUT = "PAGE_COMPLETE_CHECKOUT",
20
+ PAGE_ORDERS = "PAGE_ORDERS",
21
+ PAGE_CR = "PAGE_CONVERSION_RATE",
22
+ PAGE_AOV = "PAGE_AVERAGE_ORDER_VALUE",
23
+ PAGE_VISITORS = "PAGE_VISITORS"
24
+ }
25
+ export declare enum IMetricFormatter {
26
+ PERCENTAGE_STRING = "PERCENTAGE_STRING",
27
+ CURRENCY = "CURRENCY",
28
+ DURATION = "DURATION",
29
+ DURATION_MS = "DURATION_MS",
30
+ MILLISECONDS = "MILLISECONDS",
31
+ NORMAL = "NORMAL",
32
+ NUMBER_COMMAS = "NUMBER_COMMAS",
33
+ NUMBER_COMMAS_LEAN = "NUMBER_COMMAS_LEAN"
34
+ }
35
+ export interface IDetectMetricResult<K = number | undefined> {
36
+ formatter: IMetricFormatter;
37
+ value: K;
38
+ }
39
+ export type IFunctionGetMetric<T = IBasePageAnalyticMetric> = (props: {
40
+ metric?: T;
41
+ }) => IDetectMetricResult;
@@ -0,0 +1,8 @@
1
+ import type { IGetTextPrice } from '@/core/gemxql';
2
+ export type IFormatMetricParams = {
3
+ value: number | string | undefined;
4
+ formatter: string;
5
+ getTextPrice: IGetTextPrice;
6
+ compact?: boolean;
7
+ };
8
+ export declare const formatMetricByFormatter: ({ value, formatter, getTextPrice, compact }: IFormatMetricParams) => string;
@@ -0,0 +1,3 @@
1
+ import type { IBasePageAnalyticMetric } from '@/types/metric';
2
+ import type { IDetectMetricResult, IPAMetricKey } from '../types';
3
+ export declare const getPAMetricValueV2: (metric?: IBasePageAnalyticMetric, key?: IPAMetricKey) => IDetectMetricResult;
@@ -0,0 +1,3 @@
1
+ export * from './formatMetric';
2
+ export * from './getPAMetricValue';
3
+ export * from './metric';
@@ -0,0 +1,26 @@
1
+ import type { IDetectMetricResult, IFunctionGetMetric } from '../types';
2
+ import { IMetricFormatter } from '../types';
3
+ export declare const detectDataV2By: <T>({ data, formatter, extractValue, }: {
4
+ data: T | undefined;
5
+ formatter: IMetricFormatter;
6
+ extractValue: (value: T | undefined) => number | undefined;
7
+ }) => IDetectMetricResult;
8
+ export declare const getTotalSessionMetric: IFunctionGetMetric;
9
+ export declare const getTotalVisitorMetric: IFunctionGetMetric;
10
+ export declare const getTotalOrderMetric: IFunctionGetMetric;
11
+ export declare const getTotalPageViewMetric: IFunctionGetMetric;
12
+ export declare const getTotalRevenueMetric: IFunctionGetMetric;
13
+ export declare const getBounceRateMetric: IFunctionGetMetric;
14
+ export declare const getLinkCtrMetric: IFunctionGetMetric;
15
+ export declare const getConversionRateMetric: IFunctionGetMetric;
16
+ export declare const getAddToCartRateMetric: IFunctionGetMetric;
17
+ export declare const getAverageTimeOnPageMetric: IFunctionGetMetric;
18
+ export declare const getRevenuePerVisitorMetric: IFunctionGetMetric;
19
+ export declare const getAverageOrderValueMetric: IFunctionGetMetric;
20
+ export declare const getTotalATCMetric: IFunctionGetMetric;
21
+ export declare const getTotalSessionWithCartAdditionMetric: IFunctionGetMetric;
22
+ export declare const getTotalSessionReachedCheckoutMetric: IFunctionGetMetric;
23
+ export declare const getTotalSessionCompletedCheckoutMetric: IFunctionGetMetric;
24
+ export declare const getPathAnalysisMetric: IFunctionGetMetric;
25
+ export declare const getTotalSessionByDeviceMetric: IFunctionGetMetric;
26
+ export declare const getNewReturningCustomerMetric: IFunctionGetMetric;
@@ -1,5 +1,5 @@
1
1
  import type { ReactNode } from 'react';
2
- import type { IGetTextPrice } from '@/core/gemxql/helpers/formatAnalyticData';
2
+ import type { IGetTextPrice } from '@/core/gemxql';
3
3
  interface IConvertMoneyContext {
4
4
  getTextPrice: IGetTextPrice;
5
5
  }
@@ -1,4 +1,4 @@
1
1
  import type { ReactNode } from 'react';
2
2
  export declare function TooltipWithPortal({ children }: {
3
3
  children: ReactNode;
4
- }): import("react").ReactPortal;
4
+ }): import("react").ReactPortal | null;
@@ -1 +1 @@
1
- export declare const useRootContainer: (id: string) => HTMLElement;
1
+ export declare const useRootContainer: (id: string) => HTMLElement | null;
@@ -0,0 +1,9 @@
1
+ import type { BoxProps } from '@shopify/polaris';
2
+ type AriaShadowType = 'shadow-outset-200' | 'shadow-drop-outset-100' | 'shadow-top-100' | 'shadow-bottom-100';
3
+ type AriaHeightType = 'height-full';
4
+ export interface GBoxProps extends BoxProps {
5
+ ariaShadow?: AriaShadowType;
6
+ ariaHeight?: AriaHeightType;
7
+ }
8
+ export declare const GBox: (props: GBoxProps) => import("react/jsx-runtime").JSX.Element;
9
+ export {};
@@ -0,0 +1 @@
1
+ export * from './GBox';
@@ -0,0 +1,14 @@
1
+ import type { BlockStackProps, ButtonProps } from '@shopify/polaris';
2
+ import type { IGFeatureLocked } from './types';
3
+ import { type GBoxProps } from '../GBox';
4
+ interface GFeatureLockedProps {
5
+ title?: string;
6
+ description?: string;
7
+ type: IGFeatureLocked;
8
+ buttonProps?: Partial<ButtonProps>;
9
+ inlineAlign?: BlockStackProps['inlineAlign'];
10
+ boxProps?: GBoxProps;
11
+ boxContentProps?: GBoxProps;
12
+ }
13
+ export declare const GFeatureLocked: ({ title, description, type, buttonProps, boxProps, boxContentProps, inlineAlign, }: GFeatureLockedProps) => import("react/jsx-runtime").JSX.Element;
14
+ export {};
@@ -0,0 +1,3 @@
1
+ import type { IGFeatureLockedData } from './types';
2
+ import { IGFeatureLocked } from './types';
3
+ export declare const G_FEATURE_LOCKED_DATA: Record<IGFeatureLocked, IGFeatureLockedData>;
@@ -0,0 +1,2 @@
1
+ export * from './GFeatureLocked';
2
+ export * from './types';
@@ -0,0 +1,15 @@
1
+ export declare enum IGFeatureLocked {
2
+ CampaignGroupTemplate = "CampaignGroupTemplate",
3
+ PageListing = "PageListing",
4
+ Analytics = "Analytics",
5
+ PathAnalysis = "PathAnalysis"
6
+ }
7
+ export interface IGFeatureLockedData {
8
+ background?: string;
9
+ backgroundColor?: string;
10
+ illustration?: string;
11
+ aspectRatio?: number;
12
+ backdropFilter?: number;
13
+ maxDescriptionWidth?: string;
14
+ gradientBackground?: string;
15
+ }
@@ -14,3 +14,5 @@ export * from './GTooltip';
14
14
  export * from './GTooltipCard';
15
15
  export * from './GViewBySelector';
16
16
  export * from './GChoice';
17
+ export * from './GBox';
18
+ export * from './GFeatureLocked';
@@ -3,3 +3,4 @@ export * from './metric';
3
3
  export * from './analytic-mode';
4
4
  export * from './currency';
5
5
  export * from './breakdown-items';
6
+ export * from './pricing';
@@ -17,7 +17,8 @@ export declare enum EMetricKey {
17
17
  RPV = "revenue_per_visitor",
18
18
  VISITOR_ITEMS = "visitor_items",
19
19
  DEVICE_ITEMS = "device_items",
20
- TRAFFIC_SOURCE_ITEMS = "traffic_source_items"
20
+ TRAFFIC_SOURCE_ITEMS = "traffic_source_items",
21
+ PAGE_PATH_ANALYSIS = "PAGE_PATH_ANALYSIS"
21
22
  }
22
23
  export interface IMetricControl {
23
24
  value: string | number | null;
@@ -55,3 +56,21 @@ export interface IAnalyticMetric {
55
56
  visitors?: Array<IAnalyticStat | null> | null;
56
57
  variantKey?: string;
57
58
  }
59
+ export interface IBasePageAnalyticMetric {
60
+ totalPageViewed?: number | null;
61
+ totalVisitors?: number | null;
62
+ totalClicked?: number | null;
63
+ totalAddedToCart?: number | null;
64
+ totalReachedCheckout?: number | null;
65
+ totalOrders?: number | null;
66
+ totalSessions?: number | null;
67
+ totalSessionsThatCompletedCheckout?: number | null;
68
+ totalSessionsThatReachedCheckout?: number | null;
69
+ totalSessionsWithCartAdditions?: number | null;
70
+ totalClickedHasHref?: number | null;
71
+ totalSessionsWithoutAction?: number | null;
72
+ totalContinuationSession?: number | null;
73
+ totalRevenue?: number | null;
74
+ totalTimeOnPage?: number | null;
75
+ totalPageViewedHaveTimeOnPage?: number | null;
76
+ }
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Pricing enums mirrored from the host app (`~/modules/pricing/types`).
3
+ *
4
+ * They are duplicated here so the SDK no longer needs to import the host's
5
+ * pricing module directly. The host can import these enums back from
6
+ * `@gem-sdk/analytics/types` to build the value passed to `PathAnalysisConfigProvider`,
7
+ * which guarantees the string values stay in sync on both sides.
8
+ */
9
+ export declare enum IPlanKey {
10
+ /**
11
+ * @deprecated This plan is available for users installed before release 1.3.0.
12
+ */
13
+ CONTENT_TESTING = "content-testing",
14
+ PAGE_OPT = "page-optimize",
15
+ FUNNEL_OPT = "funnel-optimize",
16
+ PROFIT_OPT = "profit-optimize",
17
+ TRIAL_PAGE_OPT = "trial-page-optimize",
18
+ TRIAL_FUNNEL_OPT = "trial-funnel-optimize",
19
+ TRIAL_PROFIT_OPT = "trial-profit-optimize"
20
+ }
21
+ export declare enum IShopPlanState {
22
+ TRIAL_PAGE_OPT = "TRIAL_PAGE_OPT",
23
+ TRIAL_FUNNEL_OPT = "TRIAL_FUNNEL_OPT",
24
+ TRIAL_PROFIT_OPT = "TRIAL_PROFIT_OPT",
25
+ ACTIVE_PAGE_OPT = "ACTIVE_PAGE_OPT",
26
+ ACTIVE_FUNNEL_OPT = "ACTIVE_FUNNEL_OPT",
27
+ ACTIVE_PROFIT_OPT = "ACTIVE_PROFIT_OPT",
28
+ LOADING_PLAN = "LOADING_PLAN",
29
+ TRIAL_EXPIRED = "TRIAL_EXPIRED",
30
+ ACTIVE_PAGE_OPT_AND_TRIAL_PAGE_OPT = "ACTIVE_PAGE_OPT_AND_TRIAL_PAGE_OPT",
31
+ ACTIVE_PAGE_OPT_AND_TRIAL_FUNNEL_OPT = "ACTIVE_PAGE_OPT_AND_TRIAL_FUNNEL_OPT",
32
+ ACTIVE_FUNNEL_OPT_AND_TRIAL_FUNNEL_OPT = "ACTIVE_FUNNEL_OPT_AND_TRIAL_FUNNEL_OPT"
33
+ }
@@ -0,0 +1,19 @@
1
+ export declare enum TemplateType {
2
+ ALL = "all",
3
+ HOME = "index",
4
+ COLLECTION = "collection",
5
+ COLLECTION_LIST = "collection-list",
6
+ PRODUCT = "product",
7
+ ARTICLE = "article",
8
+ PAGE = "page",
9
+ CART = "cart",
10
+ SEARCH = "search",
11
+ NOT_FOUND = "404",
12
+ BLOG = "blog",
13
+ PASSWORD = "password",
14
+ CONTACT = "contact",
15
+ GIF_CART = "gif-cart",
16
+ ACCOUNT = "account",
17
+ CHECKOUT = "checkout",
18
+ GIFT_CARD = "gift-card"
19
+ }
package/dist/esm/types.js CHANGED
@@ -19,6 +19,7 @@ var EMetricKey;
19
19
  EMetricKey["VISITOR_ITEMS"] = "visitor_items";
20
20
  EMetricKey["DEVICE_ITEMS"] = "device_items";
21
21
  EMetricKey["TRAFFIC_SOURCE_ITEMS"] = "traffic_source_items";
22
+ EMetricKey["PAGE_PATH_ANALYSIS"] = "PAGE_PATH_ANALYSIS";
22
23
  })(EMetricKey || (EMetricKey = {}));
23
24
 
24
25
  var EAnalyticMode;
@@ -51,4 +52,41 @@ var ETrafficSourceType;
51
52
  ETrafficSourceType["SMS"] = "sms";
52
53
  })(ETrafficSourceType || (ETrafficSourceType = {}));
53
54
 
54
- export { EAnalyticMode, EDeviceType, EMetricKey, ETrafficSourceType, EVisitorType };
55
+ /**
56
+ * Pricing enums mirrored from the host app (`~/modules/pricing/types`).
57
+ *
58
+ * They are duplicated here so the SDK no longer needs to import the host's
59
+ * pricing module directly. The host can import these enums back from
60
+ * `@gem-sdk/analytics/types` to build the value passed to `PathAnalysisConfigProvider`,
61
+ * which guarantees the string values stay in sync on both sides.
62
+ */
63
+ var IPlanKey;
64
+ (function (IPlanKey) {
65
+ /**
66
+ * @deprecated This plan is available for users installed before release 1.3.0.
67
+ */
68
+ IPlanKey["CONTENT_TESTING"] = "content-testing";
69
+ IPlanKey["PAGE_OPT"] = "page-optimize";
70
+ IPlanKey["FUNNEL_OPT"] = "funnel-optimize";
71
+ IPlanKey["PROFIT_OPT"] = "profit-optimize";
72
+ // Trial plans
73
+ IPlanKey["TRIAL_PAGE_OPT"] = "trial-page-optimize";
74
+ IPlanKey["TRIAL_FUNNEL_OPT"] = "trial-funnel-optimize";
75
+ IPlanKey["TRIAL_PROFIT_OPT"] = "trial-profit-optimize";
76
+ })(IPlanKey || (IPlanKey = {}));
77
+ var IShopPlanState;
78
+ (function (IShopPlanState) {
79
+ IShopPlanState["TRIAL_PAGE_OPT"] = "TRIAL_PAGE_OPT";
80
+ IShopPlanState["TRIAL_FUNNEL_OPT"] = "TRIAL_FUNNEL_OPT";
81
+ IShopPlanState["TRIAL_PROFIT_OPT"] = "TRIAL_PROFIT_OPT";
82
+ IShopPlanState["ACTIVE_PAGE_OPT"] = "ACTIVE_PAGE_OPT";
83
+ IShopPlanState["ACTIVE_FUNNEL_OPT"] = "ACTIVE_FUNNEL_OPT";
84
+ IShopPlanState["ACTIVE_PROFIT_OPT"] = "ACTIVE_PROFIT_OPT";
85
+ IShopPlanState["LOADING_PLAN"] = "LOADING_PLAN";
86
+ IShopPlanState["TRIAL_EXPIRED"] = "TRIAL_EXPIRED";
87
+ IShopPlanState["ACTIVE_PAGE_OPT_AND_TRIAL_PAGE_OPT"] = "ACTIVE_PAGE_OPT_AND_TRIAL_PAGE_OPT";
88
+ IShopPlanState["ACTIVE_PAGE_OPT_AND_TRIAL_FUNNEL_OPT"] = "ACTIVE_PAGE_OPT_AND_TRIAL_FUNNEL_OPT";
89
+ IShopPlanState["ACTIVE_FUNNEL_OPT_AND_TRIAL_FUNNEL_OPT"] = "ACTIVE_FUNNEL_OPT_AND_TRIAL_FUNNEL_OPT";
90
+ })(IShopPlanState || (IShopPlanState = {}));
91
+
92
+ export { EAnalyticMode, EDeviceType, EMetricKey, ETrafficSourceType, EVisitorType, IPlanKey, IShopPlanState };
@@ -19,6 +19,7 @@ var EMetricKey;
19
19
  EMetricKey["VISITOR_ITEMS"] = "visitor_items";
20
20
  EMetricKey["DEVICE_ITEMS"] = "device_items";
21
21
  EMetricKey["TRAFFIC_SOURCE_ITEMS"] = "traffic_source_items";
22
+ EMetricKey["PAGE_PATH_ANALYSIS"] = "PAGE_PATH_ANALYSIS";
22
23
  })(EMetricKey || (EMetricKey = {}));
23
24
 
24
25
  var EAnalyticMode;
@@ -51,4 +52,41 @@ var ETrafficSourceType;
51
52
  ETrafficSourceType["SMS"] = "sms";
52
53
  })(ETrafficSourceType || (ETrafficSourceType = {}));
53
54
 
54
- export { EAnalyticMode, EDeviceType, EMetricKey, ETrafficSourceType, EVisitorType };
55
+ /**
56
+ * Pricing enums mirrored from the host app (`~/modules/pricing/types`).
57
+ *
58
+ * They are duplicated here so the SDK no longer needs to import the host's
59
+ * pricing module directly. The host can import these enums back from
60
+ * `@gem-sdk/analytics/types` to build the value passed to `PathAnalysisConfigProvider`,
61
+ * which guarantees the string values stay in sync on both sides.
62
+ */
63
+ var IPlanKey;
64
+ (function (IPlanKey) {
65
+ /**
66
+ * @deprecated This plan is available for users installed before release 1.3.0.
67
+ */
68
+ IPlanKey["CONTENT_TESTING"] = "content-testing";
69
+ IPlanKey["PAGE_OPT"] = "page-optimize";
70
+ IPlanKey["FUNNEL_OPT"] = "funnel-optimize";
71
+ IPlanKey["PROFIT_OPT"] = "profit-optimize";
72
+ // Trial plans
73
+ IPlanKey["TRIAL_PAGE_OPT"] = "trial-page-optimize";
74
+ IPlanKey["TRIAL_FUNNEL_OPT"] = "trial-funnel-optimize";
75
+ IPlanKey["TRIAL_PROFIT_OPT"] = "trial-profit-optimize";
76
+ })(IPlanKey || (IPlanKey = {}));
77
+ var IShopPlanState;
78
+ (function (IShopPlanState) {
79
+ IShopPlanState["TRIAL_PAGE_OPT"] = "TRIAL_PAGE_OPT";
80
+ IShopPlanState["TRIAL_FUNNEL_OPT"] = "TRIAL_FUNNEL_OPT";
81
+ IShopPlanState["TRIAL_PROFIT_OPT"] = "TRIAL_PROFIT_OPT";
82
+ IShopPlanState["ACTIVE_PAGE_OPT"] = "ACTIVE_PAGE_OPT";
83
+ IShopPlanState["ACTIVE_FUNNEL_OPT"] = "ACTIVE_FUNNEL_OPT";
84
+ IShopPlanState["ACTIVE_PROFIT_OPT"] = "ACTIVE_PROFIT_OPT";
85
+ IShopPlanState["LOADING_PLAN"] = "LOADING_PLAN";
86
+ IShopPlanState["TRIAL_EXPIRED"] = "TRIAL_EXPIRED";
87
+ IShopPlanState["ACTIVE_PAGE_OPT_AND_TRIAL_PAGE_OPT"] = "ACTIVE_PAGE_OPT_AND_TRIAL_PAGE_OPT";
88
+ IShopPlanState["ACTIVE_PAGE_OPT_AND_TRIAL_FUNNEL_OPT"] = "ACTIVE_PAGE_OPT_AND_TRIAL_FUNNEL_OPT";
89
+ IShopPlanState["ACTIVE_FUNNEL_OPT_AND_TRIAL_FUNNEL_OPT"] = "ACTIVE_FUNNEL_OPT_AND_TRIAL_FUNNEL_OPT";
90
+ })(IShopPlanState || (IShopPlanState = {}));
91
+
92
+ export { EAnalyticMode, EDeviceType, EMetricKey, ETrafficSourceType, EVisitorType, IPlanKey, IShopPlanState };
@@ -0,0 +1 @@
1
+ export declare const deepCopy: <T>(obj: T) => T;
@@ -4,3 +4,5 @@ export * from './cls';
4
4
  export * from './sort';
5
5
  export * from './dayjs';
6
6
  export * from './analytics';
7
+ export * from './deep-copy';
8
+ export * from './template-type';
@@ -0,0 +1,2 @@
1
+ import { TemplateType } from '@/types/template';
2
+ export declare const parseTemplateType: (templateType?: TemplateType | string) => string;
package/dist/style.css CHANGED
@@ -1 +1 @@
1
- .visible{visibility:visible}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.\!grid{display:grid!important}.grid{display:grid}.hidden{display:none}.h-7{height:1.75rem}.h-\[20px\]{height:20px}.h-\[2px\]{height:2px}.h-\[80px\]{height:80px}.h-\[8px\]{height:8px}.h-\[92px\]{height:92px}.h-full{height:100%}.max-h-\[250px\]{max-height:250px}.w-\[12px\]{width:12px}.w-\[20px\]{width:20px}.w-\[210px\]{width:210px}.w-\[320px\]{width:320px}.w-\[328px\]{width:328px}.w-\[50px\]{width:50px}.w-\[80px\]{width:80px}.w-\[8px\]{width:8px}.w-fit{width:-moz-fit-content;width:fit-content}.w-full{width:100%}.min-w-0{min-width:0}.min-w-\[175px\]{min-width:175px}.min-w-\[184px\]{min-width:184px}.max-w-\[100\%\]{max-width:100%}.flex-1{flex:1 1 0%}.flex-shrink-0{flex-shrink:0}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.cursor-default{cursor:default}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.resize{resize:both}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-\[2px\]{gap:2px}.overflow-hidden,.truncate{overflow:hidden}.truncate{text-overflow:ellipsis;white-space:nowrap}.rounded-\[10px\]{border-radius:10px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.border{border-width:1px}.border-dashed{border-style:dashed}.border-\[\#A1CAE7\]{--tw-border-opacity:1;border-color:rgb(161 202 231/var(--tw-border-opacity))}.bg-\[\#4FA9EA\]{--tw-bg-opacity:1;background-color:rgb(79 169 234/var(--tw-bg-opacity))}.bg-\[\#F1F1F1\]{--tw-bg-opacity:1;background-color:rgb(241 241 241/var(--tw-bg-opacity))}.bg-\[\#f7f7f7\]{--tw-bg-opacity:1;background-color:rgb(247 247 247/var(--tw-bg-opacity))}.object-contain{-o-object-fit:contain;object-fit:contain}.p-1{padding:.25rem}.p-1\.5{padding:.375rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-3{padding-left:.75rem;padding-right:.75rem}.py-2{padding-bottom:.5rem;padding-top:.5rem}.py-2\.5{padding-bottom:.625rem;padding-top:.625rem}.pl-4{padding-left:1rem}.pr-\[5px\]{padding-right:5px}.text-right{text-align:right}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.capitalize{text-transform:capitalize}.text-\[var\(--p-color-text\)\]{color:var(--p-color-text)}.text-\[var\(--p-color-text-disabled\)\]{color:var(--p-color-text-disabled)}.text-\[var\(--p-color-text-subdued\)\]{color:var(--p-color-text-subdued)}.underline{text-decoration-line:underline}.opacity-0{opacity:0}.opacity-100{opacity:1}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.outline{outline-style:solid}.drop-shadow{--tw-drop-shadow:drop-shadow(0 1px 2px rgba(0,0,0,.1)) drop-shadow(0 1px 1px rgba(0,0,0,.06))}.drop-shadow,.grayscale{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.grayscale{--tw-grayscale:grayscale(100%)}.invert{--tw-invert:invert(100%)}.filter,.invert{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.hover\:cursor-pointer:hover{cursor:pointer}.hover\:bg-\[\#F1F1F1\]:hover{--tw-bg-opacity:1;background-color:rgb(241 241 241/var(--tw-bg-opacity))}.hover\:text-\[--p-color-text-link-hover\]:hover{color:var(--p-color-text-link-hover)}
1
+ .GPathSelectionItem{cursor:pointer;padding:8px 12px 12px;transition:background-color .2s ease}.GPathSelectionItem--selected{background-color:#f7f7f7}.GPathSelectionItem .GPathSelectionItem__view-icon{background-color:#ebebeb;border-radius:8px;display:none;margin-left:8px;padding:4px}.GPathSelectionItem:hover{background-color:#f7f7f7}.GPathSelectionItem:hover .GPathSelectionItem__percentage{display:none}.GPathSelectionItem:hover .GPathSelectionItem__view-icon{display:block}.GFunnelChartNextTooltip-container{left:0;max-width:300px;pointer-events:auto;position:absolute;top:0;z-index:520}.GFunnelChartNextTooltip-rows{display:flex;flex-direction:column;gap:8px}.GFunnelChartNextTooltip-rows>:not(:last-child):after{background:#e3e3e3;content:"";display:block;grid-column:1/-1;height:1px;margin:8px 0 0}.GFunnelChartNextTooltip-row{align-items:center;color:#616161;-moz-column-gap:4px;column-gap:4px;display:grid;font-size:12px;grid-template-columns:8px auto;line-height:16px}.GFunnelChartNextTooltip-keys{align-items:center;display:grid;grid-column:1/-1;grid-template-columns:subgrid}.GFunnelChartNextTooltip-values{align-items:flex-start;display:flex;font-weight:600;gap:8px;grid-column:2;padding-top:2px}.GFunnelChartNextTooltip-values>span{flex:0 0 auto}.GFunnelChartNextTooltip-values .GFunnelChartNextTooltip-trendIndicator{margin-left:auto}.GFunnelChartNextTooltip-values strong{color:#1f2124;font-weight:500}.visible{visibility:visible}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.z-\[1000\]{z-index:1000}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.\!grid{display:grid!important}.grid{display:grid}.hidden{display:none}.h-7{height:1.75rem}.h-\[20px\]{height:20px}.h-\[2px\]{height:2px}.h-\[80px\]{height:80px}.h-\[8px\]{height:8px}.h-\[92px\]{height:92px}.h-full{height:100%}.max-h-\[250px\]{max-height:250px}.w-\[12px\]{width:12px}.w-\[20px\]{width:20px}.w-\[210px\]{width:210px}.w-\[320px\]{width:320px}.w-\[328px\]{width:328px}.w-\[50px\]{width:50px}.w-\[80px\]{width:80px}.w-\[8px\]{width:8px}.w-fit{width:-moz-fit-content;width:fit-content}.w-full{width:100%}.min-w-0{min-width:0}.min-w-\[175px\]{min-width:175px}.min-w-\[184px\]{min-width:184px}.max-w-\[100\%\]{max-width:100%}.flex-1{flex:1 1 0%}.flex-shrink-0{flex-shrink:0}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.cursor-default{cursor:default}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.resize{resize:both}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-\[2px\]{gap:2px}.overflow-hidden,.truncate{overflow:hidden}.truncate{text-overflow:ellipsis;white-space:nowrap}.rounded-\[10px\]{border-radius:10px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.border{border-width:1px}.border-dashed{border-style:dashed}.border-\[\#A1CAE7\]{--tw-border-opacity:1;border-color:rgb(161 202 231/var(--tw-border-opacity))}.bg-\[\#4FA9EA\]{--tw-bg-opacity:1;background-color:rgb(79 169 234/var(--tw-bg-opacity))}.bg-\[\#F1F1F1\]{--tw-bg-opacity:1;background-color:rgb(241 241 241/var(--tw-bg-opacity))}.bg-\[\#f7f7f7\]{--tw-bg-opacity:1;background-color:rgb(247 247 247/var(--tw-bg-opacity))}.object-contain{-o-object-fit:contain;object-fit:contain}.p-1{padding:.25rem}.p-1\.5{padding:.375rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-3{padding-left:.75rem;padding-right:.75rem}.py-2{padding-bottom:.5rem;padding-top:.5rem}.py-2\.5{padding-bottom:.625rem;padding-top:.625rem}.pl-4{padding-left:1rem}.pr-1{padding-right:.25rem}.pr-\[5px\]{padding-right:5px}.text-right{text-align:right}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.capitalize{text-transform:capitalize}.text-\[var\(--p-color-text\)\]{color:var(--p-color-text)}.text-\[var\(--p-color-text-disabled\)\]{color:var(--p-color-text-disabled)}.text-\[var\(--p-color-text-subdued\)\]{color:var(--p-color-text-subdued)}.underline{text-decoration-line:underline}.opacity-0{opacity:0}.opacity-100{opacity:1}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.outline{outline-style:solid}.blur{--tw-blur:blur(8px)}.blur,.drop-shadow{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.drop-shadow{--tw-drop-shadow:drop-shadow(0 1px 2px rgba(0,0,0,.1)) drop-shadow(0 1px 1px rgba(0,0,0,.06))}.grayscale{--tw-grayscale:grayscale(100%)}.grayscale,.invert{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.invert{--tw-invert:invert(100%)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.hover\:cursor-pointer:hover{cursor:pointer}.hover\:bg-\[\#F1F1F1\]:hover{--tw-bg-opacity:1;background-color:rgb(241 241 241/var(--tw-bg-opacity))}.hover\:text-\[--p-color-text-link-hover\]:hover{color:var(--p-color-text-link-hover)}
@@ -0,0 +1,25 @@
1
+ export type PathAnalyticMetricSelectFragment = {
2
+ totalPageViewed?: number | null;
3
+ totalVisitors?: number | null;
4
+ totalClicked?: number | null;
5
+ totalAddedToCart?: number | null;
6
+ totalReachedCheckout?: number | null;
7
+ totalOrders?: number | null;
8
+ totalSessions?: number | null;
9
+ totalSessionsThatCompletedCheckout?: number | null;
10
+ totalSessionsThatReachedCheckout?: number | null;
11
+ totalSessionsWithCartAdditions?: number | null;
12
+ totalClickedHasHref?: number | null;
13
+ totalSessionsWithoutAction?: number | null;
14
+ totalContinuationSession?: number | null;
15
+ };
16
+ export type PathAnalyticPageSelectFragment = {
17
+ level?: number | null;
18
+ locationPath?: string | null;
19
+ id: string;
20
+ parentID: string;
21
+ pageType?: string | null;
22
+ shopifyPageID?: string | null;
23
+ pageTitle?: string | null;
24
+ metric?: PathAnalyticMetricSelectFragment | null;
25
+ };
@@ -0,0 +1,9 @@
1
+ import type { CardPathAnalysisProps } from './components';
2
+ import type { IPathAnalysisConfig } from './contexts/PathAnalysisConfigProvider';
3
+ import { EAnalyticMode } from '@/types';
4
+ interface IProps extends CardPathAnalysisProps {
5
+ analyticMode: EAnalyticMode;
6
+ config: IPathAnalysisConfig;
7
+ }
8
+ export declare const CardJourneyAnalysis: ({ analyticMode, config, ...props }: IProps) => import("react/jsx-runtime").JSX.Element;
9
+ export {};
@@ -0,0 +1,8 @@
1
+ import type { BoxProps } from '@shopify/polaris';
2
+ export interface CardAnalyticEmptyProps {
3
+ boxProps?: BoxProps;
4
+ minHeight?: string;
5
+ description?: string;
6
+ title?: string;
7
+ }
8
+ export declare const CardAnalyticEmpty: React.FC<CardAnalyticEmptyProps>;
@@ -0,0 +1,15 @@
1
+ import type { IFunnelChartColors } from '@/shared/charts';
2
+ import type { EAnalyticMode } from '@/types';
3
+ import type { IAnalyticsData, ICampaignPathsData } from '../../contexts';
4
+ export interface CardPathAnalysisProps {
5
+ analyticMode: EAnalyticMode;
6
+ funnelColors?: IFunnelChartColors;
7
+ children?: React.ReactNode;
8
+ campaignID?: string;
9
+ campaignGroupID?: string;
10
+ campaignVariantID?: string;
11
+ campaignVersionID?: string;
12
+ campaignPathsData?: ICampaignPathsData;
13
+ analyticsData?: IAnalyticsData;
14
+ }
15
+ export declare const CardPathAnalysis: React.FC<CardPathAnalysisProps>;
@@ -0,0 +1,6 @@
1
+ import type { IFunnelChartColors } from '@/shared/charts';
2
+ export interface PathAnalysisContentProps {
3
+ funnelColors?: IFunnelChartColors;
4
+ showBadge?: boolean;
5
+ }
6
+ export declare const CardPathAnalysisContent: React.FC<PathAnalysisContentProps>;
@@ -0,0 +1,5 @@
1
+ import type { IFunnelChartColors } from '@/shared/charts';
2
+ export interface CardPathAnalysisEmptyProps {
3
+ funnelColors?: IFunnelChartColors;
4
+ }
5
+ export declare const CardPathAnalysisEmpty: React.FC<CardPathAnalysisEmptyProps>;
@@ -0,0 +1 @@
1
+ export declare const CardPathAnalysisSkeleton: React.FC;
@@ -0,0 +1,13 @@
1
+ import type { EAnalyticMode } from '@/types';
2
+ import type { IAnalyticsData, ICampaignPathsData } from '../../contexts';
3
+ export interface CardPathAnalysisWrapperProps {
4
+ children: React.ReactNode;
5
+ campaignID?: string;
6
+ campaignGroupID?: string;
7
+ campaignVariantID?: string;
8
+ campaignVersionID?: string;
9
+ analyticMode: EAnalyticMode;
10
+ campaignPathsData?: ICampaignPathsData;
11
+ analyticsData?: IAnalyticsData;
12
+ }
13
+ export declare const CardPathAnalysisWrapper: React.FC<CardPathAnalysisWrapperProps>;
@@ -0,0 +1 @@
1
+ export * from './CardPathAnalysis';
@@ -0,0 +1,8 @@
1
+ import type { IFunnelChartColors } from '@/shared/charts';
2
+ import '../assets/styles/PathAnalysis.scss';
3
+ interface PathAnalysisChartProps {
4
+ funnelColors?: IFunnelChartColors;
5
+ isEnabled?: boolean;
6
+ }
7
+ export declare const PathAnalysisChart: React.FC<PathAnalysisChartProps>;
8
+ export {};
@@ -0,0 +1 @@
1
+ export * from './CardPathAnalysis';
@@ -0,0 +1,2 @@
1
+ export declare const MAX_FUNNEL_ADDITIONAL_LEVEL = 3;
2
+ export declare const FINAL_FUNNEL_FIXED_LEVEL = 3;
@@ -0,0 +1 @@
1
+ export * from './path-analysis';
@@ -0,0 +1,73 @@
1
+ export declare const FUNNEL_POPOVER_KEY: {
2
+ readonly LEVEL_1: "LEVEL_1";
3
+ readonly LEVEL_2: "LEVEL_2";
4
+ readonly LEVEL_3: "LEVEL_3";
5
+ readonly LEVEL_4: "LEVEL_4";
6
+ readonly LEVEL_5: "LEVEL_5";
7
+ readonly LEVEL_6: "LEVEL_6";
8
+ readonly LEVEL_7: "LEVEL_7";
9
+ readonly ADD_LEVEL: "ADD_LEVEL";
10
+ };
11
+ export declare const MOCK_DATA_PATH_ANALYSIS: ({
12
+ data: ({
13
+ value: number;
14
+ key: string;
15
+ id: string;
16
+ chartTooltip: {
17
+ key: string;
18
+ value: string;
19
+ }[];
20
+ labelTooltip?: undefined;
21
+ } | {
22
+ value: number;
23
+ key: string;
24
+ labelTooltip: {
25
+ title: string;
26
+ content: string;
27
+ };
28
+ id?: undefined;
29
+ chartTooltip?: undefined;
30
+ })[];
31
+ name: string;
32
+ metadata: {
33
+ trends: {
34
+ '0': {
35
+ value: string;
36
+ trend: string;
37
+ direction: string;
38
+ };
39
+ '1': {
40
+ value: string;
41
+ trend: string;
42
+ direction: string;
43
+ };
44
+ '2': {
45
+ value: string;
46
+ trend: string;
47
+ direction: string;
48
+ };
49
+ '3': {
50
+ value: string;
51
+ trend: string;
52
+ direction: string;
53
+ };
54
+ };
55
+ };
56
+ isComparison?: undefined;
57
+ } | {
58
+ name: string;
59
+ data: ({
60
+ value: number;
61
+ key: string;
62
+ labelTooltip?: undefined;
63
+ } | {
64
+ value: number;
65
+ key: string;
66
+ labelTooltip: {
67
+ title: string;
68
+ content: string;
69
+ };
70
+ })[];
71
+ isComparison: boolean;
72
+ metadata?: undefined;
73
+ })[];