@levi-gemcommerce/analytics 1.0.0-dev.20 → 1.0.0-dev.22

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 (125) hide show
  1. package/dist/esm/api/graphql/fragments/pathAnalytic.generated.d.ts +25 -0
  2. package/dist/esm/components/CardPathAnalysis/CardJourneyAnalysis.d.ts +7 -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 +7 -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/PathAnalysisProvider.d.ts +56 -0
  16. package/dist/esm/components/CardPathAnalysis/contexts/index.d.ts +1 -0
  17. package/dist/esm/components/CardPathAnalysis/helpers/index.d.ts +2 -0
  18. package/dist/esm/components/CardPathAnalysis/helpers/metricHelpers.d.ts +16 -0
  19. package/dist/esm/components/CardPathAnalysis/helpers/pathAnalysis.d.ts +12 -0
  20. package/dist/esm/components/CardPathAnalysis/helpers/pathAnalysisChart.d.ts +17 -0
  21. package/dist/esm/components/CardPathAnalysis/helpers/treeUtils.d.ts +7 -0
  22. package/dist/esm/components/CardPathAnalysis/hooks/usePathAnalysisChart.d.ts +15 -0
  23. package/dist/esm/components/CardPathAnalysis/hooks/usePathAnalysisFunnel.d.ts +21 -0
  24. package/dist/esm/components/CardPathAnalysis/hooks/usePathAnalysisHeatmap.d.ts +4 -0
  25. package/dist/esm/components/CardPathAnalysis/hooks/usePathAnalyticsMerger.d.ts +10 -0
  26. package/dist/esm/components/CardPathAnalysis/index.d.ts +4 -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/gemxql.js +63 -0
  34. package/dist/esm/gemxql.mjs +63 -0
  35. package/dist/esm/index.js +159 -14
  36. package/dist/esm/index.mjs +159 -14
  37. package/dist/esm/modules/analytics/index.d.ts +14 -0
  38. package/dist/esm/modules/analytics/types.d.ts +23 -0
  39. package/dist/esm/modules/apps/index.d.ts +4 -0
  40. package/dist/esm/modules/heatmap/hooks/useHeatmapModalMonitor.d.ts +3 -0
  41. package/dist/esm/modules/heatmap/index.d.ts +7 -0
  42. package/dist/esm/modules/heatmap/types/index.d.ts +33 -0
  43. package/dist/esm/modules/page-analytic/index.d.ts +13 -0
  44. package/dist/esm/modules/page-analytic/modules/analytic/index.d.ts +5 -0
  45. package/dist/esm/modules/shopify/index.d.ts +6 -0
  46. package/dist/esm/providers/PricingProvider.d.ts +51 -0
  47. package/dist/esm/providers/index.d.ts +2 -0
  48. package/dist/esm/shared/components/GBox/GBox.d.ts +9 -0
  49. package/dist/esm/shared/components/GBox/index.d.ts +1 -0
  50. package/dist/esm/shared/components/GFeatureLocked/GFeatureLocked.d.ts +14 -0
  51. package/dist/esm/shared/components/GFeatureLocked/constants.d.ts +3 -0
  52. package/dist/esm/shared/components/GFeatureLocked/index.d.ts +2 -0
  53. package/dist/esm/shared/components/GFeatureLocked/types.d.ts +15 -0
  54. package/dist/esm/shared/components/index.d.ts +2 -0
  55. package/dist/esm/types/index.d.ts +1 -0
  56. package/dist/esm/types/metric.d.ts +17 -1
  57. package/dist/esm/types/pricing.d.ts +33 -0
  58. package/dist/esm/types/template.d.ts +19 -0
  59. package/dist/esm/types.js +39 -1
  60. package/dist/esm/types.mjs +39 -1
  61. package/dist/esm/utils/deep-copy.d.ts +1 -0
  62. package/dist/esm/utils/index.d.ts +2 -0
  63. package/dist/esm/utils/template-type.d.ts +2 -0
  64. package/dist/style.css +1 -1
  65. package/dist/umd/esm/api/graphql/fragments/pathAnalytic.generated.d.ts +25 -0
  66. package/dist/umd/esm/components/CardPathAnalysis/CardJourneyAnalysis.d.ts +7 -0
  67. package/dist/umd/esm/components/CardPathAnalysis/components/CardPathAnalysis/CardAnalyticEmpty.d.ts +8 -0
  68. package/dist/umd/esm/components/CardPathAnalysis/components/CardPathAnalysis/CardPathAnalysis.d.ts +15 -0
  69. package/dist/umd/esm/components/CardPathAnalysis/components/CardPathAnalysis/CardPathAnalysisContent.d.ts +6 -0
  70. package/dist/umd/esm/components/CardPathAnalysis/components/CardPathAnalysis/CardPathAnalysisEmpty.d.ts +5 -0
  71. package/dist/umd/esm/components/CardPathAnalysis/components/CardPathAnalysis/CardPathAnalysisSkeleton.d.ts +1 -0
  72. package/dist/umd/esm/components/CardPathAnalysis/components/CardPathAnalysis/CardPathAnalysisWrapper.d.ts +13 -0
  73. package/dist/umd/esm/components/CardPathAnalysis/components/CardPathAnalysis/index.d.ts +1 -0
  74. package/dist/umd/esm/components/CardPathAnalysis/components/PathAnalysisChart.d.ts +7 -0
  75. package/dist/umd/esm/components/CardPathAnalysis/components/index.d.ts +1 -0
  76. package/dist/umd/esm/components/CardPathAnalysis/configs/index.d.ts +2 -0
  77. package/dist/umd/esm/components/CardPathAnalysis/constants/index.d.ts +1 -0
  78. package/dist/umd/esm/components/CardPathAnalysis/constants/path-analysis.d.ts +73 -0
  79. package/dist/umd/esm/components/CardPathAnalysis/contexts/PathAnalysisProvider.d.ts +56 -0
  80. package/dist/umd/esm/components/CardPathAnalysis/contexts/index.d.ts +1 -0
  81. package/dist/umd/esm/components/CardPathAnalysis/helpers/index.d.ts +2 -0
  82. package/dist/umd/esm/components/CardPathAnalysis/helpers/metricHelpers.d.ts +16 -0
  83. package/dist/umd/esm/components/CardPathAnalysis/helpers/pathAnalysis.d.ts +12 -0
  84. package/dist/umd/esm/components/CardPathAnalysis/helpers/pathAnalysisChart.d.ts +17 -0
  85. package/dist/umd/esm/components/CardPathAnalysis/helpers/treeUtils.d.ts +7 -0
  86. package/dist/umd/esm/components/CardPathAnalysis/hooks/usePathAnalysisChart.d.ts +15 -0
  87. package/dist/umd/esm/components/CardPathAnalysis/hooks/usePathAnalysisFunnel.d.ts +21 -0
  88. package/dist/umd/esm/components/CardPathAnalysis/hooks/usePathAnalysisHeatmap.d.ts +4 -0
  89. package/dist/umd/esm/components/CardPathAnalysis/hooks/usePathAnalyticsMerger.d.ts +10 -0
  90. package/dist/umd/esm/components/CardPathAnalysis/index.d.ts +4 -0
  91. package/dist/umd/esm/components/CardPathAnalysis/stores/funnel-chart.d.ts +12 -0
  92. package/dist/umd/esm/components/CardPathAnalysis/stores/index.d.ts +3 -0
  93. package/dist/umd/esm/components/CardPathAnalysis/stores/path-analysis-campaign.d.ts +10 -0
  94. package/dist/umd/esm/components/CardPathAnalysis/stores/path-analysis.d.ts +6 -0
  95. package/dist/umd/esm/components/CardPathAnalysis/types/index.d.ts +1 -0
  96. package/dist/umd/esm/components/CardPathAnalysis/types/path-analysis.d.ts +6 -0
  97. package/dist/umd/esm/modules/analytics/index.d.ts +14 -0
  98. package/dist/umd/esm/modules/analytics/types.d.ts +23 -0
  99. package/dist/umd/esm/modules/apps/index.d.ts +4 -0
  100. package/dist/umd/esm/modules/heatmap/hooks/useHeatmapModalMonitor.d.ts +3 -0
  101. package/dist/umd/esm/modules/heatmap/index.d.ts +7 -0
  102. package/dist/umd/esm/modules/heatmap/types/index.d.ts +33 -0
  103. package/dist/umd/esm/modules/page-analytic/index.d.ts +13 -0
  104. package/dist/umd/esm/modules/page-analytic/modules/analytic/index.d.ts +5 -0
  105. package/dist/umd/esm/modules/shopify/index.d.ts +6 -0
  106. package/dist/umd/esm/providers/PricingProvider.d.ts +51 -0
  107. package/dist/umd/esm/providers/index.d.ts +2 -0
  108. package/dist/umd/esm/shared/components/GBox/GBox.d.ts +9 -0
  109. package/dist/umd/esm/shared/components/GBox/index.d.ts +1 -0
  110. package/dist/umd/esm/shared/components/GFeatureLocked/GFeatureLocked.d.ts +14 -0
  111. package/dist/umd/esm/shared/components/GFeatureLocked/constants.d.ts +3 -0
  112. package/dist/umd/esm/shared/components/GFeatureLocked/index.d.ts +2 -0
  113. package/dist/umd/esm/shared/components/GFeatureLocked/types.d.ts +15 -0
  114. package/dist/umd/esm/shared/components/index.d.ts +2 -0
  115. package/dist/umd/esm/types/index.d.ts +1 -0
  116. package/dist/umd/esm/types/metric.d.ts +17 -1
  117. package/dist/umd/esm/types/pricing.d.ts +33 -0
  118. package/dist/umd/esm/types/template.d.ts +19 -0
  119. package/dist/umd/esm/utils/deep-copy.d.ts +1 -0
  120. package/dist/umd/esm/utils/index.d.ts +2 -0
  121. package/dist/umd/esm/utils/template-type.d.ts +2 -0
  122. package/dist/umd/gemxql.js +1 -1
  123. package/dist/umd/index.js +1 -1
  124. package/dist/umd/types.js +1 -1
  125. package/package.json +1 -1
@@ -0,0 +1,14 @@
1
+ import type { IGetTextPrice } from '../shopify';
2
+ import type { IPAMetricKey } from './types';
3
+ export * from './types';
4
+ export type IFormatMetricParams = {
5
+ value: number | string | undefined;
6
+ formatter: string;
7
+ getTextPrice: IGetTextPrice;
8
+ };
9
+ export declare const formatMetricByFormatter: (_params: IFormatMetricParams) => string;
10
+ export declare const PA_METRIC_TOOLTIP: Record<IPAMetricKey, unknown>;
11
+ export declare const useMetricsTimeFilter: () => {
12
+ dateTimePicked: unknown;
13
+ compareDateTimePicked: unknown;
14
+ };
@@ -0,0 +1,23 @@
1
+ export declare enum IPAMetricKey {
2
+ PAGE_SESSIONS = "PAGE_SESSIONS",
3
+ PAGE_BR = "PAGE_BOUNCE_RATE",
4
+ PAGE_CTR = "PAGE_CLICK_THROUGH_RATE",
5
+ PAGE_AVG_TIME = "PAGE_AVG_TIME",
6
+ PAGE_VIEWS = "PAGE_VIEWS",
7
+ PAGE_RPV = "PAGE_REVENUE_PER_VISITOR",
8
+ PAGE_REVENUE = "PAGE_REVENUE",
9
+ PAGE_NEW_RETURNING_CUSTOMER = "PAGE_NEW_RETURNING_CUSTOMER",
10
+ PAGE_SESSIONS_BY_VISITOR = "PAGE_SESSIONS_BY_VISITOR",
11
+ PAGE_SESSIONS_BY_DEVICE = "PAGE_SESSIONS_BY_DEVICE",
12
+ PAGE_SESSIONS_BY_TRAFFIC = "PAGE_SESSIONS_BY_TRAFFIC",
13
+ PAGE_PATH_ANALYSIS = "PAGE_PATH_ANALYSIS",
14
+ PAGE_CART_ADDITION = "PAGE_SESSION_WITH_CART_ADDITION",
15
+ PAGE_ADDED_TO_CART = "PAGE_ADDED_TO_CART",
16
+ PAGE_ADD_TO_CART_RATE = "ADD_TO_CART_RATE",
17
+ PAGE_REACHED_CHECKOUT = "PAGE_REACHED_CHECKOUT",
18
+ PAGE_COMPLETE_CHECKOUT = "PAGE_COMPLETE_CHECKOUT",
19
+ PAGE_ORDERS = "PAGE_ORDERS",
20
+ PAGE_CR = "PAGE_CONVERSION_RATE",
21
+ PAGE_AOV = "PAGE_AVERAGE_ORDER_VALUE",
22
+ PAGE_VISITORS = "PAGE_VISITORS"
23
+ }
@@ -0,0 +1,4 @@
1
+ export declare const useFeatureFlagChecker: () => {
2
+ isEnabledHeatmapV1: boolean;
3
+ isEnabledHeatmapV2: boolean;
4
+ };
@@ -0,0 +1,3 @@
1
+ export declare const useHeatmapModalMonitor: () => {
2
+ onOpenModal: (data: string) => void;
3
+ };
@@ -0,0 +1,7 @@
1
+ import type { EHeatmapBaseFilterType, EHeatmapFilterType } from './types';
2
+ export * from './types';
3
+ export declare const useHeatmapFilterBuildParams: () => {
4
+ buildSearchParams: (filters: Partial<Record<EHeatmapFilterType, unknown>>, baseFilters: Partial<Record<EHeatmapBaseFilterType, unknown>>) => {
5
+ toString: () => string;
6
+ };
7
+ };
@@ -0,0 +1,33 @@
1
+ export declare enum EHeatmapBaseFilterType {
2
+ DATE_RANGE = "date_range",
3
+ URL_PATH = "url_path",
4
+ ANALYTIC_MODE = "analytic_mode",
5
+ OPERATOR = "operator"
6
+ }
7
+ export declare enum EHeatmapFilterType {
8
+ VISITOR_JOURNEY = "visitor_journey",
9
+ MARKET = "market",
10
+ VISITOR_TYPE = "visitor_type",
11
+ TRAFFIC_SOURCE = "traffic_source",
12
+ PURCHASE_TYPE = "purchase_type",
13
+ TIME_ON_PAGE = "time_on_page",
14
+ ORDER_VALUE = "order_value",
15
+ CAMPAIGN = "campaign_id",
16
+ REFERRAL_SOURCE = "referral_source"
17
+ }
18
+ export interface IFilterVisitorJourneyValue {
19
+ id: string;
20
+ path: string;
21
+ level: number;
22
+ isHeatmap: boolean;
23
+ subFilter?: unknown;
24
+ }
25
+ export interface IFilterVisitorJourney {
26
+ value?: IFilterVisitorJourneyValue[];
27
+ }
28
+ export interface IFilterCampaignValue {
29
+ campaignId: string;
30
+ campaignGroupId?: string;
31
+ campaignVariantId: string;
32
+ campaignVariantType: string;
33
+ }
@@ -0,0 +1,13 @@
1
+ import type { IPAMetricKey } from '../analytics/types';
2
+ export declare const LOCATION_PATH_KEY = "location_path";
3
+ export declare const SHOPIFY_PAGE_TYPE_KEY = "shopify_page_type";
4
+ export declare const METRICS_COLUMNS: Record<IPAMetricKey, {
5
+ label: string;
6
+ }>;
7
+ export declare const PAGE_ANALYTIC_MAPPING: Record<IPAMetricKey, {
8
+ heading: {
9
+ title: string;
10
+ [key: string]: unknown;
11
+ };
12
+ [key: string]: unknown;
13
+ }>;
@@ -0,0 +1,5 @@
1
+ import type { IPAMetricKey } from '../../../analytics/types';
2
+ export declare const getPAMetricValueV2: (_metric?: unknown, _key?: IPAMetricKey) => {
3
+ value: number | undefined;
4
+ formatter: string;
5
+ };
@@ -0,0 +1,6 @@
1
+ export type IGetTextPrice = (price?: number | string | null, hasCurrency?: boolean, options?: {
2
+ compact?: boolean;
3
+ }) => string;
4
+ export declare const useConvertMoneyByCurrency: () => {
5
+ getTextPrice: IGetTextPrice;
6
+ };
@@ -0,0 +1,51 @@
1
+ import type { ReactNode } from 'react';
2
+ import { IPlanKey, IShopPlanState } from '@/types/pricing';
3
+ /**
4
+ * Pricing values the SDK needs from the host app.
5
+ *
6
+ * The host owns all pricing logic (plan state, limitations, modals). It computes
7
+ * these values with its own pricing hooks and injects them through
8
+ * `PricingProvider`. SDK components then read them via the context hooks below
9
+ * instead of importing `~/modules/pricing` directly.
10
+ */
11
+ export interface IPricingContextValue {
12
+ /** Whether the active plan is still being resolved. */
13
+ isLoading: boolean;
14
+ /** The shop's current active (paid) plan key. */
15
+ activePlanKey: IPlanKey;
16
+ /** Aggregated plan state, used to detect trial-expired and similar cases. */
17
+ shopPlanState: IShopPlanState;
18
+ /** Result of the host's path-analysis limitation check for the active plan. */
19
+ isPathAnalysisEnabled: boolean;
20
+ /** Opens the host's pricing modal (e.g. on an upgrade CTA). */
21
+ onOpenModalPricing: () => void;
22
+ }
23
+ export interface IPricingProviderProps extends IPricingContextValue {
24
+ children: ReactNode;
25
+ }
26
+ export declare const PricingProvider: ({ children, isLoading, activePlanKey, shopPlanState, isPathAnalysisEnabled, onOpenModalPricing, }: IPricingProviderProps) => import("react/jsx-runtime").JSX.Element;
27
+ export declare const usePricingContext: () => IPricingContextValue;
28
+ /**
29
+ * The hooks below mirror the host's `~/modules/pricing` API so existing SDK
30
+ * components only need to swap their import path. Each one reads from the
31
+ * injected `PricingContext`.
32
+ */
33
+ export declare const usePricingPlanActive: () => {
34
+ isLoading: boolean;
35
+ activePlanKey: IPlanKey;
36
+ };
37
+ export declare const usePricingPlanActiveState: () => {
38
+ shopPlanState: IShopPlanState;
39
+ };
40
+ /**
41
+ * `planKey` is kept for API compatibility with the host hook. The SDK only ever
42
+ * checks the active plan, so the enabled flag is taken straight from context.
43
+ */
44
+ export declare const useLimitPathAnalysis: (_props?: {
45
+ planKey?: IPlanKey;
46
+ }) => {
47
+ isEnabled: boolean;
48
+ };
49
+ export declare const usePricingModalMonitor: () => {
50
+ onOpenModalPricing: () => void;
51
+ };
@@ -1,3 +1,5 @@
1
1
  export { ConvertMoneyProvider, useConvertMoneyContext } from './ConvertMoneyProvider';
2
2
  export type { IProps as IConvertMoneyProviderProps } from './ConvertMoneyProvider';
3
3
  export { MetricChartProvider } from './MetricChartProvider';
4
+ export { PricingProvider, usePricingContext, usePricingPlanActive, usePricingPlanActiveState, useLimitPathAnalysis, usePricingModalMonitor, } from './PricingProvider';
5
+ export type { IPricingContextValue, IPricingProviderProps } from './PricingProvider';
@@ -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,18 @@ 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
+ }
@@ -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 `PricingProvider`,
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 `PricingProvider`,
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 `PricingProvider`,
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
+ .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,7 @@
1
+ import type { CardPathAnalysisProps } from './components';
2
+ import { EAnalyticMode } from '@/types';
3
+ interface IProps extends CardPathAnalysisProps {
4
+ analyticMode: EAnalyticMode;
5
+ }
6
+ export declare const CardJourneyAnalysis: ({ analyticMode, ...props }: IProps) => import("react/jsx-runtime").JSX.Element;
7
+ 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,7 @@
1
+ import type { IFunnelChartColors } from '@/shared/charts';
2
+ interface PathAnalysisChartProps {
3
+ funnelColors?: IFunnelChartColors;
4
+ isEnabled?: boolean;
5
+ }
6
+ export declare const PathAnalysisChart: React.FC<PathAnalysisChartProps>;
7
+ 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';