@levi-gemcommerce/analytics 2.0.1-dev.1 → 2.0.3-dev.1

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 (138) hide show
  1. package/dist/esm/components/CardPathAnalysis/components/PathAnalysisChart.d.ts +0 -1
  2. package/dist/esm/index.js +23 -4
  3. package/dist/esm/index.mjs +23 -4
  4. package/dist/esm/providers/TimezoneProvider.d.ts +11 -0
  5. package/dist/esm/providers/index.d.ts +2 -0
  6. package/dist/esm/shared/charts/contexts/GChartProvider.d.ts +1 -1
  7. package/dist/esm/shared/components/GInlineCenter/GInlineCenter.d.ts +1 -1
  8. package/dist/style.css +1 -1
  9. package/dist/umd/esm/components/CardPathAnalysis/components/PathAnalysisChart.d.ts +0 -1
  10. package/dist/umd/esm/providers/TimezoneProvider.d.ts +11 -0
  11. package/dist/umd/esm/providers/index.d.ts +2 -0
  12. package/dist/umd/esm/shared/charts/contexts/GChartProvider.d.ts +1 -1
  13. package/dist/umd/esm/shared/components/GInlineCenter/GInlineCenter.d.ts +1 -1
  14. package/dist/umd/index.js +1 -1
  15. package/package.json +1 -1
  16. package/dist/esm/components/CardPathAnalysis/hooks/usePathAnalysisHeatmap.d.ts +0 -4
  17. package/dist/esm/components/GMultipleMetricChartCard/GMultipleMetricChartCard.d.ts +0 -14
  18. package/dist/esm/components/GMultipleMetricChartCard/MetricCard.d.ts +0 -10
  19. package/dist/esm/components/GMultipleMetricChartCard/MetricChart.d.ts +0 -12
  20. package/dist/esm/components/GMultipleMetricChartCard/index.d.ts +0 -2
  21. package/dist/esm/components/GSelectableMetricChartCard/MetricCard.d.ts +0 -10
  22. package/dist/esm/components/GSelectableMetricChartCard/MetricChart.d.ts +0 -12
  23. package/dist/esm/components/GSelectableMetricChartCard/MetricChartTabs.d.ts +0 -11
  24. package/dist/esm/components/GTooltipCard/GTooltipCard.d.ts +0 -32
  25. package/dist/esm/components/GTooltipCard/index.d.ts +0 -2
  26. package/dist/esm/components/PATrendBadge/PATrendBadge.d.ts +0 -7
  27. package/dist/esm/components/PATrendBadge/index.d.ts +0 -1
  28. package/dist/esm/components/common/chart/ChartSkeleton.d.ts +0 -1
  29. package/dist/esm/components/common/chart/MetricChartProvider.d.ts +0 -6
  30. package/dist/esm/components/common/chart/MetricTrend.d.ts +0 -5
  31. package/dist/esm/components/common/chart/PAMetricInfoSkeleton.d.ts +0 -4
  32. package/dist/esm/constants/g-multiple-metric-chart-card.d.ts +0 -13
  33. package/dist/esm/constants/g-selectable-metric-chart-card.d.ts +0 -13
  34. package/dist/esm/constants/pa-trend-badge.d.ts +0 -9
  35. package/dist/esm/core/gemxql/types/analytic-mode.d.ts +0 -5
  36. package/dist/esm/core/gemxql/types/breakdown-items.d.ts +0 -19
  37. package/dist/esm/core/gemxql/types/date-filter.d.ts +0 -10
  38. package/dist/esm/core/gemxql/utils/analytics.d.ts +0 -13
  39. package/dist/esm/core/gemxql/utils/dayjs.d.ts +0 -10
  40. package/dist/esm/hooks/useWindowSize.d.ts +0 -18
  41. package/dist/esm/modules/analytics/metric.d.ts +0 -26
  42. package/dist/esm/modules/analytics/types.d.ts +0 -41
  43. package/dist/esm/modules/apps/index.d.ts +0 -4
  44. package/dist/esm/modules/heatmap/hooks/useHeatmapModalMonitor.d.ts +0 -3
  45. package/dist/esm/modules/heatmap/index.d.ts +0 -7
  46. package/dist/esm/modules/heatmap/types/index.d.ts +0 -33
  47. package/dist/esm/modules/page-analytic/index.d.ts +0 -14
  48. package/dist/esm/modules/page-analytic/modules/analytic/index.d.ts +0 -3
  49. package/dist/esm/modules/shopify/index.d.ts +0 -6
  50. package/dist/esm/providers/PricingProvider.d.ts +0 -51
  51. package/dist/esm/providers/currencyRatesStore.d.ts +0 -7
  52. package/dist/esm/providers/useFetchCurrencyRates.d.ts +0 -1
  53. package/dist/esm/shared/components/GTimePicker/GTimePicker.d.ts +0 -17
  54. package/dist/esm/shared/components/GTimePicker/components/BaseTimePicker.d.ts +0 -10
  55. package/dist/esm/shared/components/GTimePicker/components/CompareTimePicker.d.ts +0 -5
  56. package/dist/esm/shared/components/GTimePicker/components/DateTimeFilterAddition.d.ts +0 -2
  57. package/dist/esm/shared/components/GTimePicker/components/DateTimeFilterInputs.d.ts +0 -9
  58. package/dist/esm/shared/components/GTimePicker/components/DateTimeFilters.d.ts +0 -15
  59. package/dist/esm/shared/components/GTimePicker/components/MainTimePicker.d.ts +0 -3
  60. package/dist/esm/shared/components/GTimePicker/components/index.d.ts +0 -2
  61. package/dist/esm/shared/components/GTimePicker/constants/compareDateTimePicker.d.ts +0 -12
  62. package/dist/esm/shared/components/GTimePicker/constants/datePicker.d.ts +0 -14
  63. package/dist/esm/shared/components/GTimePicker/constants/index.d.ts +0 -2
  64. package/dist/esm/shared/components/GTimePicker/constants/mainDataTimePicker.d.ts +0 -14
  65. package/dist/esm/shared/components/GTimePicker/contexts/DateTimePickerProvider.d.ts +0 -15
  66. package/dist/esm/shared/components/GTimePicker/contexts/index.d.ts +0 -1
  67. package/dist/esm/shared/components/GTimePicker/helpers/date-range-info.d.ts +0 -16
  68. package/dist/esm/shared/components/GTimePicker/helpers/index.d.ts +0 -4
  69. package/dist/esm/shared/components/GTimePicker/helpers/parse-date.d.ts +0 -24
  70. package/dist/esm/shared/components/GTimePicker/helpers/time-picker.d.ts +0 -76
  71. package/dist/esm/shared/components/GTimePicker/helpers/version.d.ts +0 -2
  72. package/dist/esm/shared/components/GTimePicker/hooks/index.d.ts +0 -3
  73. package/dist/esm/shared/components/GTimePicker/hooks/useCompareDateTimePicker.d.ts +0 -25
  74. package/dist/esm/shared/components/GTimePicker/hooks/useDateTimeFilter.d.ts +0 -18
  75. package/dist/esm/shared/components/GTimePicker/hooks/useDateTimePicker.d.ts +0 -30
  76. package/dist/esm/shared/components/GTimePicker/hooks/useVersionDateTimeFilters.d.ts +0 -9
  77. package/dist/esm/shared/components/GTimePicker/index.d.ts +0 -7
  78. package/dist/esm/shared/components/GTimePicker/types/index.d.ts +0 -38
  79. package/dist/umd/esm/components/CardPathAnalysis/hooks/usePathAnalysisHeatmap.d.ts +0 -4
  80. package/dist/umd/esm/components/GMultipleMetricChartCard/GMultipleMetricChartCard.d.ts +0 -14
  81. package/dist/umd/esm/components/GMultipleMetricChartCard/MetricCard.d.ts +0 -10
  82. package/dist/umd/esm/components/GMultipleMetricChartCard/MetricChart.d.ts +0 -12
  83. package/dist/umd/esm/components/GMultipleMetricChartCard/index.d.ts +0 -2
  84. package/dist/umd/esm/components/GSelectableMetricChartCard/MetricCard.d.ts +0 -10
  85. package/dist/umd/esm/components/GSelectableMetricChartCard/MetricChart.d.ts +0 -12
  86. package/dist/umd/esm/components/GTooltipCard/GTooltipCard.d.ts +0 -32
  87. package/dist/umd/esm/components/GTooltipCard/index.d.ts +0 -2
  88. package/dist/umd/esm/components/PATrendBadge/PATrendBadge.d.ts +0 -7
  89. package/dist/umd/esm/components/PATrendBadge/index.d.ts +0 -1
  90. package/dist/umd/esm/components/common/chart/MetricChartProvider.d.ts +0 -6
  91. package/dist/umd/esm/components/common/chart/MetricTrend.d.ts +0 -5
  92. package/dist/umd/esm/components/common/chart/PAMetricInfoSkeleton.d.ts +0 -4
  93. package/dist/umd/esm/constants/g-multiple-metric-chart-card.d.ts +0 -13
  94. package/dist/umd/esm/constants/g-selectable-metric-chart-card.d.ts +0 -12
  95. package/dist/umd/esm/constants/pa-trend-badge.d.ts +0 -9
  96. package/dist/umd/esm/core/gemxql/types/analytic-mode.d.ts +0 -5
  97. package/dist/umd/esm/core/gemxql/types/breakdown-items.d.ts +0 -19
  98. package/dist/umd/esm/core/gemxql/types/date-filter.d.ts +0 -10
  99. package/dist/umd/esm/core/gemxql/utils/analytics.d.ts +0 -13
  100. package/dist/umd/esm/core/gemxql/utils/dayjs.d.ts +0 -10
  101. package/dist/umd/esm/hooks/useWindowSize.d.ts +0 -18
  102. package/dist/umd/esm/modules/analytics/types.d.ts +0 -23
  103. package/dist/umd/esm/modules/apps/index.d.ts +0 -4
  104. package/dist/umd/esm/modules/heatmap/hooks/useHeatmapModalMonitor.d.ts +0 -3
  105. package/dist/umd/esm/modules/heatmap/index.d.ts +0 -7
  106. package/dist/umd/esm/modules/heatmap/types/index.d.ts +0 -33
  107. package/dist/umd/esm/modules/page-analytic/index.d.ts +0 -12
  108. package/dist/umd/esm/modules/page-analytic/modules/analytic/index.d.ts +0 -5
  109. package/dist/umd/esm/modules/shopify/index.d.ts +0 -6
  110. package/dist/umd/esm/providers/PricingProvider.d.ts +0 -51
  111. package/dist/umd/esm/providers/currencyRatesStore.d.ts +0 -7
  112. package/dist/umd/esm/providers/useFetchCurrencyRates.d.ts +0 -1
  113. package/dist/umd/esm/shared/components/GTimePicker/GTimePicker.d.ts +0 -17
  114. package/dist/umd/esm/shared/components/GTimePicker/components/BaseTimePicker.d.ts +0 -10
  115. package/dist/umd/esm/shared/components/GTimePicker/components/CompareTimePicker.d.ts +0 -5
  116. package/dist/umd/esm/shared/components/GTimePicker/components/DateTimeFilterAddition.d.ts +0 -2
  117. package/dist/umd/esm/shared/components/GTimePicker/components/DateTimeFilterInputs.d.ts +0 -9
  118. package/dist/umd/esm/shared/components/GTimePicker/components/DateTimeFilters.d.ts +0 -15
  119. package/dist/umd/esm/shared/components/GTimePicker/components/MainTimePicker.d.ts +0 -3
  120. package/dist/umd/esm/shared/components/GTimePicker/components/index.d.ts +0 -2
  121. package/dist/umd/esm/shared/components/GTimePicker/constants/compareDateTimePicker.d.ts +0 -12
  122. package/dist/umd/esm/shared/components/GTimePicker/constants/datePicker.d.ts +0 -14
  123. package/dist/umd/esm/shared/components/GTimePicker/constants/index.d.ts +0 -2
  124. package/dist/umd/esm/shared/components/GTimePicker/constants/mainDataTimePicker.d.ts +0 -14
  125. package/dist/umd/esm/shared/components/GTimePicker/contexts/DateTimePickerProvider.d.ts +0 -15
  126. package/dist/umd/esm/shared/components/GTimePicker/contexts/index.d.ts +0 -1
  127. package/dist/umd/esm/shared/components/GTimePicker/helpers/date-range-info.d.ts +0 -16
  128. package/dist/umd/esm/shared/components/GTimePicker/helpers/index.d.ts +0 -4
  129. package/dist/umd/esm/shared/components/GTimePicker/helpers/parse-date.d.ts +0 -24
  130. package/dist/umd/esm/shared/components/GTimePicker/helpers/time-picker.d.ts +0 -76
  131. package/dist/umd/esm/shared/components/GTimePicker/helpers/version.d.ts +0 -2
  132. package/dist/umd/esm/shared/components/GTimePicker/hooks/index.d.ts +0 -3
  133. package/dist/umd/esm/shared/components/GTimePicker/hooks/useCompareDateTimePicker.d.ts +0 -25
  134. package/dist/umd/esm/shared/components/GTimePicker/hooks/useDateTimeFilter.d.ts +0 -18
  135. package/dist/umd/esm/shared/components/GTimePicker/hooks/useDateTimePicker.d.ts +0 -30
  136. package/dist/umd/esm/shared/components/GTimePicker/hooks/useVersionDateTimeFilters.d.ts +0 -9
  137. package/dist/umd/esm/shared/components/GTimePicker/index.d.ts +0 -7
  138. package/dist/umd/esm/shared/components/GTimePicker/types/index.d.ts +0 -38
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@levi-gemcommerce/analytics",
3
- "version": "2.0.1-dev.1",
3
+ "version": "2.0.3-dev.1",
4
4
  "license": "MIT",
5
5
  "author": "gemx-dev",
6
6
  "sideEffects": [
@@ -1,4 +0,0 @@
1
- import type { IBasePathAnalyticPageWithChild } from '../types';
2
- export declare const usePathAnalysisHeatmap: () => {
3
- handleViewHeatmap: (level: number, pages: IBasePathAnalyticPageWithChild[]) => void;
4
- };
@@ -1,14 +0,0 @@
1
- import type { ReactElement } from 'react';
2
- import type { AllChartsDataMap, IMetricCardItem } from '../../types';
3
- export interface IProps {
4
- data: IMetricCardItem[];
5
- dataChart: AllChartsDataMap;
6
- defaultActiveTab?: string;
7
- isLoading?: boolean;
8
- isEmptyMetricData?: boolean;
9
- hideComparison?: boolean;
10
- currentPeriodLabel?: string;
11
- previousPeriodLabel?: string;
12
- onclickMetric?: (key: string) => void;
13
- }
14
- export declare const GMultipleMetricChartCard: ({ data, dataChart, defaultActiveTab, isLoading, isEmptyMetricData, hideComparison, currentPeriodLabel, previousPeriodLabel, }: IProps) => ReactElement;
@@ -1,10 +0,0 @@
1
- import type { IMetricCardItem } from '../../types';
2
- import type { ReactElement } from 'react';
3
- export interface IProps {
4
- item: IMetricCardItem;
5
- isActive: boolean;
6
- isLoading?: boolean;
7
- hideComparison?: boolean;
8
- onSelect: (key: string) => void;
9
- }
10
- export declare const MetricCard: ({ item, isActive, isLoading, hideComparison, onSelect }: IProps) => ReactElement;
@@ -1,12 +0,0 @@
1
- import type { ReactElement } from 'react';
2
- import type { AllChartsDataMap } from '../../types';
3
- export interface IProps {
4
- activeTab?: string;
5
- dataChart: AllChartsDataMap;
6
- isLoading?: boolean;
7
- isEmptyMetricData?: boolean;
8
- hideComparison?: boolean;
9
- currentPeriodLabel: string;
10
- previousPeriodLabel: string;
11
- }
12
- export declare const MetricChart: ({ activeTab, dataChart, isLoading, isEmptyMetricData, hideComparison, currentPeriodLabel, previousPeriodLabel, }: IProps) => ReactElement;
@@ -1,2 +0,0 @@
1
- export { GMultipleMetricChartCard } from './GMultipleMetricChartCard';
2
- export type { IProps as IGMultipleMetricChartCardProps } from './GMultipleMetricChartCard';
@@ -1,10 +0,0 @@
1
- import type { IMetricCardItem } from '../../types';
2
- import type { ReactElement } from 'react';
3
- export interface IProps {
4
- item: IMetricCardItem;
5
- isActive: boolean;
6
- isLoading?: boolean;
7
- hideComparison?: boolean;
8
- onSelect: (key: string) => void;
9
- }
10
- export declare const MetricCard: ({ item, isActive, isLoading, hideComparison, onSelect }: IProps) => ReactElement;
@@ -1,12 +0,0 @@
1
- import type { ReactElement } from 'react';
2
- import type { AllChartsDataMap } from '../../types';
3
- export interface IProps {
4
- activeTab?: string;
5
- dataChart: AllChartsDataMap;
6
- isLoading?: boolean;
7
- isEmptyMetricData?: boolean;
8
- hideComparison?: boolean;
9
- currentPeriodLabel: string;
10
- previousPeriodLabel: string;
11
- }
12
- export declare const MetricChart: ({ activeTab, dataChart, isLoading, isEmptyMetricData, hideComparison, currentPeriodLabel, previousPeriodLabel, }: IProps) => ReactElement;
@@ -1,11 +0,0 @@
1
- import type { ReactElement } from 'react';
2
- import type { IMetricCardItem } from '../../types';
3
- export interface IProps {
4
- item: IMetricCardItem;
5
- isActive: boolean;
6
- isLoading?: boolean;
7
- hideComparison?: boolean;
8
- onSelect: (key: string) => void;
9
- onClickTitle?: (key: string) => void;
10
- }
11
- export declare const MetricChartTabs: ({ item, isActive, isLoading, hideComparison, onSelect, onClickTitle, }: IProps) => ReactElement;
@@ -1,32 +0,0 @@
1
- import type { BoxProps } from '@shopify/polaris';
2
- type CloseTarget = 'activator' | 'next-node';
3
- export interface PopoverPublicAPI {
4
- forceUpdatePosition(): void;
5
- close(target?: CloseTarget): void;
6
- }
7
- export interface GTooltipCardPublicAPI {
8
- onClose(): void;
9
- }
10
- type Width = 'default' | 'wide' | 'large';
11
- export interface GTooltipCardData {
12
- title: string;
13
- content: string | TrustedHTML;
14
- formula?: React.ReactNode;
15
- contentList?: string[];
16
- width?: Width;
17
- }
18
- export interface IProps {
19
- children: React.ReactNode;
20
- delay?: number;
21
- tooltip?: GTooltipCardData;
22
- activatorProps?: BoxProps;
23
- wrapper?: 'span' | 'div';
24
- isHideBorder?: boolean;
25
- alignment?: 'start' | 'center' | 'end';
26
- textDecoration?: 'underline' | 'none';
27
- preferredAlignment?: 'left' | 'center' | 'right';
28
- popoverRef?: React.RefObject<PopoverPublicAPI>;
29
- showArrow?: boolean;
30
- }
31
- export declare const GTooltipCard: import("react").ForwardRefExoticComponent<IProps & import("react").RefAttributes<GTooltipCardPublicAPI>>;
32
- export {};
@@ -1,2 +0,0 @@
1
- export { GTooltipCard } from './GTooltipCard';
2
- export type { GTooltipCardData, GTooltipCardPublicAPI, IProps as IGTooltipCardProps, PopoverPublicAPI, } from './GTooltipCard';
@@ -1,7 +0,0 @@
1
- import { type ReactElement } from 'react';
2
- export interface IProps {
3
- label: string;
4
- value: string;
5
- changePercent?: number;
6
- }
7
- export declare const PATrendBadge: ({ label, value, changePercent }: IProps) => ReactElement;
@@ -1 +0,0 @@
1
- export * from './PATrendBadge';
@@ -1 +0,0 @@
1
- export declare const ChartSkeleton: () => import("react/jsx-runtime").JSX.Element;
@@ -1,6 +0,0 @@
1
- import type { ReactElement, ReactNode } from 'react';
2
- export interface IProps {
3
- children: ReactNode;
4
- minHeight?: number;
5
- }
6
- export declare const MetricChartProvider: ({ children, minHeight }: IProps) => ReactElement;
@@ -1,5 +0,0 @@
1
- import type { ReactElement } from 'react';
2
- export interface IProps {
3
- change: number | string;
4
- }
5
- export declare const MetricTrend: ({ change }: IProps) => ReactElement;
@@ -1,4 +0,0 @@
1
- export interface PAMetricInfoSkeletonProps {
2
- isShowOneLine?: boolean;
3
- }
4
- export declare const PAMetricInfoSkeleton: React.FC<PAMetricInfoSkeletonProps>;
@@ -1,13 +0,0 @@
1
- export declare const DEFAULT_CURRENT_PERIOD_LABEL = "Current";
2
- export declare const DEFAULT_PREVIOUS_PERIOD_LABEL = "Previous";
3
- export declare const CHART_MIN_HEIGHT = 228;
4
- export declare const SERIES_COLORS: {
5
- readonly current: "rgba(64, 176, 230, 1)";
6
- readonly comparison: "rgba(161, 202, 231, 1)";
7
- readonly all: readonly ["#2C7DFF", "#F34A70"];
8
- };
9
- export declare const TREND_TONE: {
10
- readonly POSITIVE: "#007F5F";
11
- readonly NEUTRAL: "#4A4A4A";
12
- };
13
- export declare const GRID_GAP = "16px";
@@ -1,13 +0,0 @@
1
- export declare const DEFAULT_CURRENT_PERIOD_LABEL = "Current";
2
- export declare const DEFAULT_PREVIOUS_PERIOD_LABEL = "Previous";
3
- export declare const CHART_MIN_HEIGHT = 228;
4
- export declare const SERIES_COLORS: {
5
- readonly current: "rgba(64, 176, 230, 1)";
6
- readonly comparison: "rgba(161, 202, 231, 1)";
7
- readonly all: readonly ["#2C7DFF", "#F34A70"];
8
- };
9
- export declare const TREND_TONE: {
10
- readonly POSITIVE: "#007F5F";
11
- readonly NEUTRAL: "#4A4A4A";
12
- };
13
- export declare const PLACEHOLDER_VALUE = "-";
@@ -1,9 +0,0 @@
1
- export declare const TREND_DIRECTION: {
2
- readonly UP: "up";
3
- readonly DOWN: "down";
4
- readonly NEUTRAL: "neutral";
5
- };
6
- export type ITrendDirection = (typeof TREND_DIRECTION)[keyof typeof TREND_DIRECTION];
7
- export declare const TREND_COLOR: Record<ITrendDirection, string>;
8
- export declare const TREND_SYMBOL: Record<ITrendDirection, string>;
9
- export declare const PERCENT_DECIMALS = 2;
@@ -1,5 +0,0 @@
1
- export declare enum EAnalyticMode {
2
- ALL_SESSION = "ALL_SESSION",
3
- FIRST_SESSION = "FIRST_SESSION",
4
- PAGE_ONLY = "PAGE_ONLY"
5
- }
@@ -1,19 +0,0 @@
1
- export declare enum EVisitorType {
2
- NEW = "new",
3
- RETURNING = "returning"
4
- }
5
- export declare enum EDeviceType {
6
- DESKTOP = "desktop",
7
- MOBILE = "mobile",
8
- TABLET = "tablet"
9
- }
10
- export declare enum ETrafficSourceType {
11
- DIRECT = "direct",
12
- EMAIL = "email",
13
- REFERRAL = "referral",
14
- ORGANIC_SOCIAL = "organic-social",
15
- ORGANIC_SEARCH = "organic-search",
16
- PAID_SOCIAL = "paid-social",
17
- PAID_SEARCH = "paid-search",
18
- SMS = "sms"
19
- }
@@ -1,10 +0,0 @@
1
- import type { Dayjs } from '../../../utils';
2
- export interface AnalyticDateFilter {
3
- versionId?: string;
4
- startDate: Dayjs | string;
5
- endDate: Dayjs | string;
6
- alias: string;
7
- since?: string | number;
8
- until?: string | number;
9
- title?: string;
10
- }
@@ -1,13 +0,0 @@
1
- export declare enum AnalyticInterval {
2
- DAY = "DAY",
3
- HOUR = "HOUR",
4
- MONTH = "MONTH",
5
- QUARTER = "QUARTER",
6
- WEEK = "WEEK",
7
- YEAR = "YEAR"
8
- }
9
- export declare function numberWithCommas(x: string): string;
10
- export declare const getTimeDurationLabel: (valueInSeconds: number) => string;
11
- export declare const getFormattedByInterval: (value: string | number | null, interval?: AnalyticInterval, options?: {
12
- isExpandDetail?: boolean;
13
- }) => string;
@@ -1,10 +0,0 @@
1
- import type { ConfigType, Dayjs } from 'dayjs';
2
- import dayjs from 'dayjs';
3
- export declare function getInitialTimezone(): string;
4
- export declare function setTz(value: string): void;
5
- export declare const dayjsTz: (date?: ConfigType) => Dayjs;
6
- export declare const convertDateToTz: (date?: ConfigType) => Dayjs;
7
- export declare const dayjsTzToLocalTZ: (date?: ConfigType) => Dayjs;
8
- export declare const dayjsTzToDate: (date?: ConfigType) => Date;
9
- export { dayjs };
10
- export type { Dayjs };
@@ -1,18 +0,0 @@
1
- export interface IWindowSize {
2
- width: number;
3
- height: number;
4
- }
5
- export interface IUseWindowSizeResult {
6
- windowSize: IWindowSize;
7
- windowWidth: {
8
- xs: boolean;
9
- md: boolean;
10
- lg: boolean;
11
- xsDown: boolean;
12
- '1200Down': boolean;
13
- '1040Down': boolean;
14
- };
15
- isMobileTabletView: boolean;
16
- isMobileView: boolean;
17
- }
18
- export declare const useWindowSize: () => IUseWindowSizeResult;
@@ -1,26 +0,0 @@
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,41 +0,0 @@
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;
@@ -1,4 +0,0 @@
1
- export declare const useFeatureFlagChecker: () => {
2
- isEnabledHeatmapV1: boolean;
3
- isEnabledHeatmapV2: boolean;
4
- };
@@ -1,3 +0,0 @@
1
- export declare const useHeatmapModalMonitor: () => {
2
- onOpenModal: (data: string) => void;
3
- };
@@ -1,7 +0,0 @@
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
- };
@@ -1,33 +0,0 @@
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
- }
@@ -1,14 +0,0 @@
1
- import type { IFunctionGetMetric } from '../analytics/types';
2
- import { IPAMetricKey } from '../analytics/types';
3
- export declare const SHOPIFY_PAGE_TYPE_KEY = "shopify_page_type";
4
- export declare const METRICS_COLUMNS: Record<IPAMetricKey, {
5
- label: string;
6
- }>;
7
- interface IPageAnalyticMappingItem {
8
- heading: {
9
- title: string;
10
- };
11
- getMetricValue: IFunctionGetMetric;
12
- }
13
- export declare const PAGE_ANALYTIC_MAPPING: Record<IPAMetricKey, IPageAnalyticMappingItem>;
14
- export {};
@@ -1,3 +0,0 @@
1
- import type { IBasePageAnalyticMetric } from '../../../../types/metric';
2
- import type { IDetectMetricResult, IPAMetricKey } from '../../../analytics/types';
3
- export declare const getPAMetricValueV2: (metric?: IBasePageAnalyticMetric, key?: IPAMetricKey) => IDetectMetricResult;
@@ -1,6 +0,0 @@
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
- };
@@ -1,51 +0,0 @@
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,7 +0,0 @@
1
- export type ICurrencyRates = Record<string, number>;
2
- interface ICurrencyRatesStore {
3
- currencyRates: ICurrencyRates | null;
4
- setCurrencyRates: (rates: ICurrencyRates) => void;
5
- }
6
- export declare const useCurrencyRatesStore: import("zustand").UseBoundStore<import("zustand").StoreApi<ICurrencyRatesStore>>;
7
- export {};
@@ -1 +0,0 @@
1
- export declare const useFetchCurrencyRates: () => void;
@@ -1,17 +0,0 @@
1
- import type { GButtonProps } from '../GButton';
2
- import type { ButtonProps, PopoverProps } from '@shopify/polaris';
3
- import type { IDateTimeFilterAddition } from './components';
4
- import type { DateTimeFilter } from './types';
5
- export interface GTimePickerProps {
6
- rangeAddition?: IDateTimeFilterAddition;
7
- popoverProps?: Partial<PopoverProps>;
8
- isCompare?: boolean;
9
- activator?: (props: {
10
- onClick: () => void;
11
- value?: string;
12
- }) => React.ReactElement;
13
- onApply?: (value: DateTimeFilter) => void;
14
- activatorProps?: Pick<ButtonProps, 'disabled' | 'loading' | 'size'>;
15
- actionProps?: GButtonProps;
16
- }
17
- export declare const GTimePicker: React.FC<GTimePickerProps>;
@@ -1,10 +0,0 @@
1
- import type { GTimePickerProps } from '../GTimePicker';
2
- import type { IDateTimeFilterAddition } from '../components';
3
- import type { DateTimeFilter } from '../types';
4
- export interface BaseTimePickerProps extends Omit<GTimePickerProps, 'isCompare'> {
5
- dateTimeFilters?: DateTimeFilter[];
6
- rangeAddition?: IDateTimeFilterAddition;
7
- isCompare?: boolean;
8
- buttonValue?: string;
9
- }
10
- export declare const BaseTimePicker: React.FC<BaseTimePickerProps>;
@@ -1,5 +0,0 @@
1
- import type { BaseTimePickerProps } from './BaseTimePicker';
2
- interface CompareTimePickerProps extends Pick<BaseTimePickerProps, 'rangeAddition' | 'popoverProps'> {
3
- }
4
- export declare const CompareTimePicker: React.FC<CompareTimePickerProps>;
5
- export {};
@@ -1,2 +0,0 @@
1
- import type { DateTimeFiltersProps } from './DateTimeFilters';
2
- export declare function DateTimeFilterAddition(props: DateTimeFiltersProps): import("react/jsx-runtime").JSX.Element | undefined;
@@ -1,9 +0,0 @@
1
- import type { IDateRangeState } from '../hooks';
2
- import type { DateTimeFilter } from '../types';
3
- interface DateTimeFilterInputsProps {
4
- onBlur?: () => void;
5
- dateRange: DateTimeFilter;
6
- setDateTimePicked: (value: IDateRangeState) => void;
7
- }
8
- export declare function DateTimeFilterInputs({ onBlur, dateRange, setDateTimePicked }: DateTimeFilterInputsProps): import("react/jsx-runtime").JSX.Element;
9
- export {};
@@ -1,15 +0,0 @@
1
- import type { IDateRangeState } from '../hooks';
2
- import type { DateTimeFilter } from '../types';
3
- export interface IDateTimeFilterAddition {
4
- title: string;
5
- initialPicked?: DateTimeFilter;
6
- rangers: DateTimeFilter[];
7
- }
8
- export interface DateTimeFiltersProps {
9
- setDateTimePicked: (value: IDateRangeState) => void;
10
- dateTimePicked: DateTimeFilter;
11
- allRanges: DateTimeFilter[];
12
- rangeAddition?: IDateTimeFilterAddition;
13
- isCompare?: boolean;
14
- }
15
- export declare function DateTimeFilters(props: DateTimeFiltersProps): import("react/jsx-runtime").JSX.Element;
@@ -1,3 +0,0 @@
1
- import type { GTimePickerProps } from '../GTimePicker';
2
- export type MainTimePickerProps = Omit<GTimePickerProps, 'isCompare'>;
3
- export declare const MainTimePicker: React.FC<MainTimePickerProps>;
@@ -1,2 +0,0 @@
1
- export * from './DateTimeFilterInputs';
2
- export * from './DateTimeFilters';
@@ -1,12 +0,0 @@
1
- import type { DateTimeFilter, IGetCompareDateByAlias } from '../types';
2
- export declare enum CompareDateTimePickerAlias {
3
- NO_COMPARISON = "noComparison",
4
- PREVIOUS_PERIOD = "previousPeriod",
5
- PREVIOUS_WEEK = "previousWeek",
6
- PREVIOUS_MONTH = "previousMonth",
7
- PREVIOUS_QUARTER = "previousQuarter",
8
- PREVIOUS_YEAR = "previousYear"
9
- }
10
- export declare const PREVIOUS_PERIOD_FILTER: DateTimeFilter;
11
- export declare const DATE_TIME_COMPARISON_FILTERS: DateTimeFilter[];
12
- export declare const COMPARE_DATE_TIME_FILTERS_MAP: Record<CompareDateTimePickerAlias, IGetCompareDateByAlias>;
@@ -1,14 +0,0 @@
1
- export declare const DATE_FORMAT: {
2
- YMD: string;
3
- MONTH_YEAR: string;
4
- FULL: string;
5
- FULL_WITH_TIME: string;
6
- SHORT: string;
7
- SHORT_NO_PAD: string;
8
- SHORT_WITH_TIME: string;
9
- MONTH_DAY: string;
10
- DAY_YEAR: string;
11
- TIME: string;
12
- MONTH_DAY_WITH_TIME: string;
13
- YEAR: string;
14
- };
@@ -1,2 +0,0 @@
1
- export * from './compareDateTimePicker';
2
- export * from './mainDataTimePicker';