@gem-sdk/analytics 2.0.0-dev.1 → 2.0.0

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 (211) hide show
  1. package/dist/esm/components/CardPathAnalysis/components/PathAnalysisChart.d.ts +0 -1
  2. package/dist/esm/components/CardPathAnalysis/contexts/PathAnalysisConfigProvider.d.ts +8 -1
  3. package/dist/esm/components/CardPathAnalysis/hooks/usePathAnalysisChart.d.ts +1 -0
  4. package/dist/esm/components/CardPathAnalysis/hooks/usePathAnalysisFunnel.d.ts +2 -1
  5. package/dist/esm/components/GModalOrderJourney/GModalOrderJourney.d.ts +20 -0
  6. package/dist/esm/components/GModalOrderJourney/components/OrderJourneySkeleton.d.ts +1 -0
  7. package/dist/esm/components/GModalOrderJourney/components/index.d.ts +1 -0
  8. package/dist/esm/components/GModalOrderJourney/context/OrderJourneyContext.d.ts +6 -0
  9. package/dist/esm/components/GModalOrderJourney/context/index.d.ts +1 -0
  10. package/dist/esm/components/GModalOrderJourney/hooks/index.d.ts +1 -0
  11. package/dist/esm/components/GModalOrderJourney/hooks/useGModalOrderJourney.d.ts +7 -0
  12. package/dist/esm/components/GModalOrderJourney/index.d.ts +4 -0
  13. package/dist/esm/components/GModalOrderJourney/types/index.d.ts +4 -0
  14. package/dist/esm/components/GModalOrderJourney/utils/index.d.ts +28 -0
  15. package/dist/esm/components/GSelectableMetricChartCard/GSelectableMetricChartCard.d.ts +2 -1
  16. package/dist/esm/components/GSelectableMetricChartCard/MetricChartTab.d.ts +2 -1
  17. package/dist/esm/components/MetricDonutChartCard/MetricDonutChartCard.d.ts +2 -1
  18. package/dist/esm/components/OrderAnalytic/OrderListingLatestTable.d.ts +2 -1
  19. package/dist/esm/components/OrderAnalytic/components/OrderListing/OrderListingTable.d.ts +2 -1
  20. package/dist/esm/components/OrderAnalytic/stores/order-columns-selector.d.ts +0 -2
  21. package/dist/esm/components/OrderAnalytic/types/order.d.ts +32 -0
  22. package/dist/esm/components/SingleMetricChartCard/SingleMetricChartCard.d.ts +2 -1
  23. package/dist/esm/components/common/chart/MetricInfoBlock.d.ts +2 -1
  24. package/dist/esm/components/index.d.ts +1 -0
  25. package/dist/esm/gemxql.js +67 -32
  26. package/dist/esm/gemxql.mjs +67 -32
  27. package/dist/esm/hooks/index.d.ts +1 -0
  28. package/dist/esm/hooks/useFetchCurrencyRates.d.ts +4 -1
  29. package/dist/esm/hooks/usePreventBodyScroll.d.ts +3 -0
  30. package/dist/esm/index.js +1080 -1941
  31. package/dist/esm/index.mjs +1080 -1941
  32. package/dist/esm/providers/TimezoneProvider.d.ts +11 -0
  33. package/dist/esm/providers/index.d.ts +2 -0
  34. package/dist/esm/shared/charts/components/GFunnelChart/components/types.d.ts +1 -0
  35. package/dist/esm/shared/charts/contexts/GChartProvider.d.ts +1 -1
  36. package/dist/esm/shared/components/GDotInline/GDotInline.d.ts +5 -0
  37. package/dist/esm/shared/components/GDotInline/index.d.ts +1 -0
  38. package/dist/esm/shared/components/GInlineCenter/GInlineCenter.d.ts +1 -1
  39. package/dist/esm/shared/components/GMockDataTooltip/GMockDataTooltip.d.ts +12 -0
  40. package/dist/esm/shared/components/GMockDataTooltip/index.d.ts +1 -0
  41. package/dist/esm/shared/components/GModal/GModal.d.ts +14 -0
  42. package/dist/esm/shared/components/GModal/index.d.ts +1 -0
  43. package/dist/esm/shared/components/GSpinner/GSpinner.d.ts +5 -0
  44. package/dist/esm/shared/components/GSpinner/index.d.ts +1 -0
  45. package/dist/esm/shared/components/index.d.ts +4 -0
  46. package/dist/esm/shared/journey/common/JourneyContainer/components/JourneyContainer.d.ts +10 -0
  47. package/dist/esm/shared/journey/common/JourneyContainer/components/JourneyTimeline.d.ts +1 -0
  48. package/dist/esm/shared/journey/common/JourneyContainer/components/index.d.ts +2 -0
  49. package/dist/esm/shared/journey/common/JourneyContainer/index.d.ts +1 -0
  50. package/dist/esm/shared/journey/common/index.d.ts +1 -0
  51. package/dist/esm/shared/journey/index.d.ts +2 -0
  52. package/dist/esm/shared/journey/ui/JourneyEvents/components/AcceptedPostPurchaseOffer/AcceptedPostPurchaseOffer.d.ts +10 -0
  53. package/dist/esm/shared/journey/ui/JourneyEvents/components/AcceptedPostPurchaseOffer/index.d.ts +1 -0
  54. package/dist/esm/shared/journey/ui/JourneyEvents/components/CheckoutCompleted/CheckoutCompleted.d.ts +9 -0
  55. package/dist/esm/shared/journey/ui/JourneyEvents/components/CheckoutCompleted/index.d.ts +1 -0
  56. package/dist/esm/shared/journey/ui/JourneyEvents/components/CheckoutItems.d.ts +6 -0
  57. package/dist/esm/shared/journey/ui/JourneyEvents/components/CheckoutStarted/CheckoutStarted.d.ts +10 -0
  58. package/dist/esm/shared/journey/ui/JourneyEvents/components/CheckoutStarted/CheckoutStartedDetail.d.ts +8 -0
  59. package/dist/esm/shared/journey/ui/JourneyEvents/components/CheckoutStarted/index.d.ts +2 -0
  60. package/dist/esm/shared/journey/ui/JourneyEvents/components/PageViewed/PageViewed.d.ts +9 -0
  61. package/dist/esm/shared/journey/ui/JourneyEvents/components/PageViewed/index.d.ts +1 -0
  62. package/dist/esm/shared/journey/ui/JourneyEvents/components/ProductAddedToCart/ProductAddedToCart.d.ts +10 -0
  63. package/dist/esm/shared/journey/ui/JourneyEvents/components/ProductAddedToCart/index.d.ts +1 -0
  64. package/dist/esm/shared/journey/ui/JourneyEvents/components/ProductQuantity/ProductQuantity.d.ts +6 -0
  65. package/dist/esm/shared/journey/ui/JourneyEvents/components/ProductQuantity/index.d.ts +1 -0
  66. package/dist/esm/shared/journey/ui/JourneyEvents/components/ProductRemovedFromCart/ProductRemovedFromCart.d.ts +10 -0
  67. package/dist/esm/shared/journey/ui/JourneyEvents/components/ProductRemovedFromCart/index.d.ts +1 -0
  68. package/dist/esm/shared/journey/ui/JourneyEvents/components/index.d.ts +6 -0
  69. package/dist/esm/shared/journey/ui/JourneyEvents/constants/event.d.ts +13 -0
  70. package/dist/esm/shared/journey/ui/JourneyEvents/constants/index.d.ts +1 -0
  71. package/dist/esm/shared/journey/ui/JourneyEvents/index.d.ts +2 -0
  72. package/dist/esm/shared/journey/ui/JourneyEvents/types.d.ts +2 -0
  73. package/dist/esm/shared/journey/ui/JourneyGroup/JourneyGroup.d.ts +7 -0
  74. package/dist/esm/shared/journey/ui/JourneyGroup/index.d.ts +1 -0
  75. package/dist/esm/shared/journey/ui/JourneyItem/components/EventMarkerIcon.d.ts +2 -0
  76. package/dist/esm/shared/journey/ui/JourneyItem/components/JourneyDetail.d.ts +5 -0
  77. package/dist/esm/shared/journey/ui/JourneyItem/components/JourneyItem.d.ts +9 -0
  78. package/dist/esm/shared/journey/ui/JourneyItem/components/JourneyTime.d.ts +9 -0
  79. package/dist/esm/shared/journey/ui/JourneyItem/components/QuantityWrapper.d.ts +5 -0
  80. package/dist/esm/shared/journey/ui/JourneyItem/components/index.d.ts +3 -0
  81. package/dist/esm/shared/journey/ui/JourneyItem/index.d.ts +2 -0
  82. package/dist/esm/shared/journey/ui/JourneyItem/types/events.d.ts +18 -0
  83. package/dist/esm/shared/journey/ui/JourneyItem/types/index.d.ts +1 -0
  84. package/dist/esm/shared/journey/ui/JourneyTitle/components/JourneyDateBadge.d.ts +5 -0
  85. package/dist/esm/shared/journey/ui/JourneyTitle/components/JourneyIdBadge.d.ts +6 -0
  86. package/dist/esm/shared/journey/ui/JourneyTitle/components/JourneyLoadMore.d.ts +6 -0
  87. package/dist/esm/shared/journey/ui/JourneyTitle/components/JourneyTitle.d.ts +9 -0
  88. package/dist/esm/shared/journey/ui/JourneyTitle/components/index.d.ts +1 -0
  89. package/dist/esm/shared/journey/ui/JourneyTitle/index.d.ts +1 -0
  90. package/dist/esm/shared/journey/ui/index.d.ts +3 -0
  91. package/dist/esm/shared/journey/ui/type.d.ts +2 -0
  92. package/dist/esm/shared/reports/ui/ReportTable/ReportTable.d.ts +2 -1
  93. package/dist/esm/shared/reports/ui/ReportTable/components/Body/Cell/Cell.d.ts +2 -1
  94. package/dist/esm/shared/reports/ui/ReportTable/components/Body/Cell/OrderCell/OrderCellContainer.d.ts +1 -1
  95. package/dist/esm/shared/reports/ui/ReportTable/components/Body/Cell/OrderIdCell.d.ts +1 -1
  96. package/dist/esm/shared/reports/ui/ReportTable/components/Body/Cell/type.d.ts +1 -0
  97. package/dist/esm/shared/reports/ui/ReportTable/components/Body/Row.d.ts +2 -1
  98. package/dist/esm/shared/reports/ui/ReportTable/components/Footer/Pagination.d.ts +2 -1
  99. package/dist/esm/shared/reports/ui/ReportTable/components/Footer/WrapperFooter.d.ts +2 -1
  100. package/dist/esm/types/campaign.d.ts +4 -0
  101. package/dist/esm/types.js +6 -1
  102. package/dist/esm/types.mjs +6 -1
  103. package/dist/esm/utils/array.d.ts +1 -0
  104. package/dist/esm/utils/date-time.d.ts +1 -0
  105. package/dist/esm/utils/index.d.ts +3 -0
  106. package/dist/esm/utils/is-browser.d.ts +1 -0
  107. package/dist/style.css +1 -1
  108. package/dist/umd/esm/components/CardPathAnalysis/components/PathAnalysisChart.d.ts +0 -1
  109. package/dist/umd/esm/components/CardPathAnalysis/contexts/PathAnalysisConfigProvider.d.ts +8 -1
  110. package/dist/umd/esm/components/CardPathAnalysis/hooks/usePathAnalysisChart.d.ts +1 -0
  111. package/dist/umd/esm/components/CardPathAnalysis/hooks/usePathAnalysisFunnel.d.ts +2 -1
  112. package/dist/umd/esm/components/GModalOrderJourney/GModalOrderJourney.d.ts +20 -0
  113. package/dist/umd/esm/components/GModalOrderJourney/components/OrderJourneySkeleton.d.ts +1 -0
  114. package/dist/umd/esm/components/GModalOrderJourney/components/index.d.ts +1 -0
  115. package/dist/umd/esm/components/GModalOrderJourney/context/OrderJourneyContext.d.ts +6 -0
  116. package/dist/umd/esm/components/GModalOrderJourney/context/index.d.ts +1 -0
  117. package/dist/umd/esm/components/GModalOrderJourney/hooks/index.d.ts +1 -0
  118. package/dist/umd/esm/components/GModalOrderJourney/hooks/useGModalOrderJourney.d.ts +7 -0
  119. package/dist/umd/esm/components/GModalOrderJourney/index.d.ts +4 -0
  120. package/dist/umd/esm/components/GModalOrderJourney/types/index.d.ts +4 -0
  121. package/dist/umd/esm/components/GModalOrderJourney/utils/index.d.ts +28 -0
  122. package/dist/umd/esm/components/GSelectableMetricChartCard/GSelectableMetricChartCard.d.ts +2 -1
  123. package/dist/umd/esm/components/GSelectableMetricChartCard/MetricChartTab.d.ts +2 -1
  124. package/dist/umd/esm/components/MetricDonutChartCard/MetricDonutChartCard.d.ts +2 -1
  125. package/dist/umd/esm/components/OrderAnalytic/OrderListingLatestTable.d.ts +2 -1
  126. package/dist/umd/esm/components/OrderAnalytic/components/OrderListing/OrderListingTable.d.ts +2 -1
  127. package/dist/umd/esm/components/OrderAnalytic/stores/order-columns-selector.d.ts +0 -2
  128. package/dist/umd/esm/components/OrderAnalytic/types/order.d.ts +32 -0
  129. package/dist/umd/esm/components/SingleMetricChartCard/SingleMetricChartCard.d.ts +2 -1
  130. package/dist/umd/esm/components/common/chart/MetricInfoBlock.d.ts +2 -1
  131. package/dist/umd/esm/components/index.d.ts +1 -0
  132. package/dist/umd/esm/hooks/index.d.ts +1 -0
  133. package/dist/umd/esm/hooks/useFetchCurrencyRates.d.ts +4 -1
  134. package/dist/umd/esm/hooks/usePreventBodyScroll.d.ts +3 -0
  135. package/dist/umd/esm/providers/TimezoneProvider.d.ts +11 -0
  136. package/dist/umd/esm/providers/index.d.ts +2 -0
  137. package/dist/umd/esm/shared/charts/components/GFunnelChart/components/types.d.ts +1 -0
  138. package/dist/umd/esm/shared/charts/contexts/GChartProvider.d.ts +1 -1
  139. package/dist/umd/esm/shared/components/GDotInline/GDotInline.d.ts +5 -0
  140. package/dist/umd/esm/shared/components/GDotInline/index.d.ts +1 -0
  141. package/dist/umd/esm/shared/components/GInlineCenter/GInlineCenter.d.ts +1 -1
  142. package/dist/umd/esm/shared/components/GMockDataTooltip/GMockDataTooltip.d.ts +12 -0
  143. package/dist/umd/esm/shared/components/GMockDataTooltip/index.d.ts +1 -0
  144. package/dist/umd/esm/shared/components/GModal/GModal.d.ts +14 -0
  145. package/dist/umd/esm/shared/components/GModal/index.d.ts +1 -0
  146. package/dist/umd/esm/shared/components/GSpinner/GSpinner.d.ts +5 -0
  147. package/dist/umd/esm/shared/components/GSpinner/index.d.ts +1 -0
  148. package/dist/umd/esm/shared/components/index.d.ts +4 -0
  149. package/dist/umd/esm/shared/journey/common/JourneyContainer/components/JourneyContainer.d.ts +10 -0
  150. package/dist/umd/esm/shared/journey/common/JourneyContainer/components/JourneyTimeline.d.ts +1 -0
  151. package/dist/umd/esm/shared/journey/common/JourneyContainer/components/index.d.ts +2 -0
  152. package/dist/umd/esm/shared/journey/common/JourneyContainer/index.d.ts +1 -0
  153. package/dist/umd/esm/shared/journey/common/index.d.ts +1 -0
  154. package/dist/umd/esm/shared/journey/index.d.ts +2 -0
  155. package/dist/umd/esm/shared/journey/ui/JourneyEvents/components/AcceptedPostPurchaseOffer/AcceptedPostPurchaseOffer.d.ts +10 -0
  156. package/dist/umd/esm/shared/journey/ui/JourneyEvents/components/AcceptedPostPurchaseOffer/index.d.ts +1 -0
  157. package/dist/umd/esm/shared/journey/ui/JourneyEvents/components/CheckoutCompleted/CheckoutCompleted.d.ts +9 -0
  158. package/dist/umd/esm/shared/journey/ui/JourneyEvents/components/CheckoutCompleted/index.d.ts +1 -0
  159. package/dist/umd/esm/shared/journey/ui/JourneyEvents/components/CheckoutItems.d.ts +6 -0
  160. package/dist/umd/esm/shared/journey/ui/JourneyEvents/components/CheckoutStarted/CheckoutStarted.d.ts +10 -0
  161. package/dist/umd/esm/shared/journey/ui/JourneyEvents/components/CheckoutStarted/CheckoutStartedDetail.d.ts +8 -0
  162. package/dist/umd/esm/shared/journey/ui/JourneyEvents/components/CheckoutStarted/index.d.ts +2 -0
  163. package/dist/umd/esm/shared/journey/ui/JourneyEvents/components/PageViewed/PageViewed.d.ts +9 -0
  164. package/dist/umd/esm/shared/journey/ui/JourneyEvents/components/PageViewed/index.d.ts +1 -0
  165. package/dist/umd/esm/shared/journey/ui/JourneyEvents/components/ProductAddedToCart/ProductAddedToCart.d.ts +10 -0
  166. package/dist/umd/esm/shared/journey/ui/JourneyEvents/components/ProductAddedToCart/index.d.ts +1 -0
  167. package/dist/umd/esm/shared/journey/ui/JourneyEvents/components/ProductQuantity/ProductQuantity.d.ts +6 -0
  168. package/dist/umd/esm/shared/journey/ui/JourneyEvents/components/ProductQuantity/index.d.ts +1 -0
  169. package/dist/umd/esm/shared/journey/ui/JourneyEvents/components/ProductRemovedFromCart/ProductRemovedFromCart.d.ts +10 -0
  170. package/dist/umd/esm/shared/journey/ui/JourneyEvents/components/ProductRemovedFromCart/index.d.ts +1 -0
  171. package/dist/umd/esm/shared/journey/ui/JourneyEvents/components/index.d.ts +6 -0
  172. package/dist/umd/esm/shared/journey/ui/JourneyEvents/constants/event.d.ts +13 -0
  173. package/dist/umd/esm/shared/journey/ui/JourneyEvents/constants/index.d.ts +1 -0
  174. package/dist/umd/esm/shared/journey/ui/JourneyEvents/index.d.ts +2 -0
  175. package/dist/umd/esm/shared/journey/ui/JourneyEvents/types.d.ts +2 -0
  176. package/dist/umd/esm/shared/journey/ui/JourneyGroup/JourneyGroup.d.ts +7 -0
  177. package/dist/umd/esm/shared/journey/ui/JourneyGroup/index.d.ts +1 -0
  178. package/dist/umd/esm/shared/journey/ui/JourneyItem/components/EventMarkerIcon.d.ts +2 -0
  179. package/dist/umd/esm/shared/journey/ui/JourneyItem/components/JourneyDetail.d.ts +5 -0
  180. package/dist/umd/esm/shared/journey/ui/JourneyItem/components/JourneyItem.d.ts +9 -0
  181. package/dist/umd/esm/shared/journey/ui/JourneyItem/components/JourneyTime.d.ts +9 -0
  182. package/dist/umd/esm/shared/journey/ui/JourneyItem/components/QuantityWrapper.d.ts +5 -0
  183. package/dist/umd/esm/shared/journey/ui/JourneyItem/components/index.d.ts +3 -0
  184. package/dist/umd/esm/shared/journey/ui/JourneyItem/index.d.ts +2 -0
  185. package/dist/umd/esm/shared/journey/ui/JourneyItem/types/events.d.ts +18 -0
  186. package/dist/umd/esm/shared/journey/ui/JourneyItem/types/index.d.ts +1 -0
  187. package/dist/umd/esm/shared/journey/ui/JourneyTitle/components/JourneyDateBadge.d.ts +5 -0
  188. package/dist/umd/esm/shared/journey/ui/JourneyTitle/components/JourneyIdBadge.d.ts +6 -0
  189. package/dist/umd/esm/shared/journey/ui/JourneyTitle/components/JourneyLoadMore.d.ts +6 -0
  190. package/dist/umd/esm/shared/journey/ui/JourneyTitle/components/JourneyTitle.d.ts +9 -0
  191. package/dist/umd/esm/shared/journey/ui/JourneyTitle/components/index.d.ts +1 -0
  192. package/dist/umd/esm/shared/journey/ui/JourneyTitle/index.d.ts +1 -0
  193. package/dist/umd/esm/shared/journey/ui/index.d.ts +3 -0
  194. package/dist/umd/esm/shared/journey/ui/type.d.ts +2 -0
  195. package/dist/umd/esm/shared/reports/ui/ReportTable/ReportTable.d.ts +2 -1
  196. package/dist/umd/esm/shared/reports/ui/ReportTable/components/Body/Cell/Cell.d.ts +2 -1
  197. package/dist/umd/esm/shared/reports/ui/ReportTable/components/Body/Cell/OrderCell/OrderCellContainer.d.ts +1 -1
  198. package/dist/umd/esm/shared/reports/ui/ReportTable/components/Body/Cell/OrderIdCell.d.ts +1 -1
  199. package/dist/umd/esm/shared/reports/ui/ReportTable/components/Body/Cell/type.d.ts +1 -0
  200. package/dist/umd/esm/shared/reports/ui/ReportTable/components/Body/Row.d.ts +2 -1
  201. package/dist/umd/esm/shared/reports/ui/ReportTable/components/Footer/Pagination.d.ts +2 -1
  202. package/dist/umd/esm/shared/reports/ui/ReportTable/components/Footer/WrapperFooter.d.ts +2 -1
  203. package/dist/umd/esm/types/campaign.d.ts +4 -0
  204. package/dist/umd/esm/utils/array.d.ts +1 -0
  205. package/dist/umd/esm/utils/date-time.d.ts +1 -0
  206. package/dist/umd/esm/utils/index.d.ts +3 -0
  207. package/dist/umd/esm/utils/is-browser.d.ts +1 -0
  208. package/dist/umd/gemxql.js +1 -1
  209. package/dist/umd/index.js +1 -1
  210. package/dist/umd/types.js +1 -1
  211. package/package.json +6 -1
@@ -1,5 +1,4 @@
1
1
  import type { IFunnelChartColors } from '@/shared/charts';
2
- import '../assets/styles/PathAnalysis.scss';
3
2
  interface PathAnalysisChartProps {
4
3
  funnelColors?: IFunnelChartColors;
5
4
  isEnabled?: boolean;
@@ -13,11 +13,18 @@ export interface IPathAnalysisHeatmapConfig {
13
13
  export interface IPathAnalysisConfig {
14
14
  pricing: IPathAnalysisPricingConfig;
15
15
  heatmap: IPathAnalysisHeatmapConfig;
16
+ /**
17
+ * When enabled, the funnel auto-expands every level along the dominant path
18
+ * (first level → highest-traffic child → ... up to MAX_FUNNEL_ADDITIONAL_LEVEL,
19
+ * stopping early when a level has no further paths) and the "+" add button is hidden.
20
+ */
21
+ autoExpandLevels?: boolean;
16
22
  }
17
23
  export interface IPathAnalysisConfigProviderProps {
18
24
  children: ReactNode;
19
25
  pricing: IPathAnalysisPricingConfig;
20
26
  heatmap: IPathAnalysisHeatmapConfig;
27
+ autoExpandLevels?: boolean;
21
28
  }
22
- export declare const PathAnalysisConfigProvider: ({ children, pricing, heatmap }: IPathAnalysisConfigProviderProps) => import("react/jsx-runtime").JSX.Element;
29
+ export declare const PathAnalysisConfigProvider: ({ children, pricing, heatmap, autoExpandLevels, }: IPathAnalysisConfigProviderProps) => import("react/jsx-runtime").JSX.Element;
23
30
  export declare const usePathAnalysisConfig: () => IPathAnalysisConfig;
@@ -4,6 +4,7 @@ export declare const usePathAnalysisChart: () => {
4
4
  lengthDisplayedLevels: number;
5
5
  listFunnelSelection: IFunnelSelectionItem[];
6
6
  isDisabledAddICon: boolean;
7
+ hideAddIcon: boolean;
7
8
  funnelData: import("@shopify/polaris-viz-core").DataSeries[];
8
9
  onDeleteFunnel: (id?: string) => void;
9
10
  onAddNextFunnel: (id: string) => void;
@@ -6,8 +6,9 @@ interface IUsePathAnalysisFunnelProps {
6
6
  pathAnalysisCacheKey: string;
7
7
  dataFirstLevels?: IPathAnalysisFirstLevel[];
8
8
  locationPath?: string;
9
+ autoExpandLevels?: boolean;
9
10
  }
10
- export declare const usePathAnalysisFunnel: ({ pathAnalytics, pathAnalysisCacheKey, dataFirstLevels, locationPath, }: IUsePathAnalysisFunnelProps) => {
11
+ export declare const usePathAnalysisFunnel: ({ pathAnalytics, pathAnalysisCacheKey, dataFirstLevels, locationPath, autoExpandLevels, }: IUsePathAnalysisFunnelProps) => {
11
12
  pageWithMetric: IBasePathAnalyticPageWithChild | undefined;
12
13
  dynamicLevels: IBasePathAnalyticPageWithChild[];
13
14
  nextLevelPages: IBasePathAnalyticPageWithChild[];
@@ -0,0 +1,20 @@
1
+ import type { IOrderJourneyItem, IOrderPageAnalytic, IReportCampaign } from '@/components/OrderAnalytic/types';
2
+ import type { EAnalyticMode } from '@/types';
3
+ import { EReportSource } from '@/components/OrderAnalytic/types';
4
+ export interface GModalOrderJourneyProps {
5
+ open: boolean;
6
+ onClose: () => void;
7
+ title: string;
8
+ orderId: string;
9
+ journeyItems: IOrderJourneyItem[];
10
+ isLoading?: boolean;
11
+ hasNextPage?: boolean;
12
+ isFetchingNextPage?: boolean;
13
+ fetchNextPage?: () => void;
14
+ reportCampaign?: IReportCampaign;
15
+ pageAnalytic?: IOrderPageAnalytic;
16
+ mode: EAnalyticMode;
17
+ journeySource?: EReportSource;
18
+ onViewOrderDetails?: (orderId: string) => void;
19
+ }
20
+ export declare const GModalOrderJourney: ({ open, onClose, title, orderId, journeyItems, isLoading, hasNextPage, isFetchingNextPage, fetchNextPage, reportCampaign, pageAnalytic, mode, journeySource, onViewOrderDetails, }: GModalOrderJourneyProps) => import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1 @@
1
+ export declare const OrderJourneySkeleton: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export * from './OrderJourneySkeleton';
@@ -0,0 +1,6 @@
1
+ export interface OrderJourneyContextValue {
2
+ orderId: string;
3
+ onViewOrderDetails?: (orderId: string) => void;
4
+ }
5
+ export declare const OrderJourneyProvider: import("react").Provider<OrderJourneyContextValue | undefined>;
6
+ export declare const useOrderJourneyContext: () => OrderJourneyContextValue;
@@ -0,0 +1 @@
1
+ export * from './OrderJourneyContext';
@@ -0,0 +1 @@
1
+ export * from './useGModalOrderJourney';
@@ -0,0 +1,7 @@
1
+ import type { GModalOrderJourneyInitialValues } from '../types';
2
+ export declare const useGModalOrderJourney: () => {
3
+ isOpen: boolean;
4
+ initialValues: GModalOrderJourneyInitialValues | null;
5
+ handleOpenModalOrderJourney: (data: GModalOrderJourneyInitialValues) => void;
6
+ handleCloseModalOrderJourney: () => void;
7
+ };
@@ -0,0 +1,4 @@
1
+ export * from './types';
2
+ export * from './hooks';
3
+ export * from './context';
4
+ export * from './GModalOrderJourney';
@@ -0,0 +1,4 @@
1
+ export interface GModalOrderJourneyInitialValues {
2
+ id: string;
3
+ orderId: string;
4
+ }
@@ -0,0 +1,28 @@
1
+ import type { IOrderJourneyItem, IOrderPageAnalytic } from '@/components/OrderAnalytic/types';
2
+ import { EReportSource } from '@/components/OrderAnalytic/types';
3
+ import { EAnalyticMode } from '@/types';
4
+ interface SliceJourneyItemsParams {
5
+ journeyItems: IOrderJourneyItem[];
6
+ mode: EAnalyticMode;
7
+ source: EReportSource;
8
+ filteredCampaignId?: string;
9
+ pageAnalytic?: IOrderPageAnalytic;
10
+ }
11
+ /**
12
+ * Slices journey items based on the analytic metric mode.
13
+ *
14
+ * - FIRST_SESSION: Returns all items (no slicing)
15
+ * - PAGE_ONLY: Slices from the LAST matching event (most recent relevant interaction)
16
+ * - ALL_SESSION: Slices from the FIRST matching event (entire journey from first interaction)
17
+ */
18
+ export declare const sliceJourneyItems: ({ journeyItems, mode, source, filteredCampaignId, pageAnalytic, }: SliceJourneyItemsParams) => IOrderJourneyItem[];
19
+ export declare const getEventCampaignIdByType: ({ campaignGroupID, campaignID, }: {
20
+ campaignGroupID: string;
21
+ campaignID: string;
22
+ }) => string;
23
+ export declare const isCampaignOfAnother: ({ campaignGroupID, campaignID, filteredCampaignId, }: {
24
+ campaignGroupID: string;
25
+ campaignID: string;
26
+ filteredCampaignId?: string;
27
+ }) => boolean | "" | undefined;
28
+ export {};
@@ -11,6 +11,7 @@ export interface IProps {
11
11
  currentPeriodLabel?: string;
12
12
  previousPeriodLabel?: string;
13
13
  columnTypes?: ColumnTypesMap;
14
+ isMockData?: boolean;
14
15
  onclickMetric?: (key: string) => void;
15
16
  }
16
- export declare const GSelectableMetricChartCard: ({ metricInfo, dataChart, defaultActiveTab, isLoading, isEmptyMetricData, hideComparison, currentPeriodLabel, previousPeriodLabel, columnTypes, }: IProps) => ReactElement;
17
+ export declare const GSelectableMetricChartCard: ({ metricInfo, dataChart, defaultActiveTab, isLoading, isEmptyMetricData, hideComparison, currentPeriodLabel, previousPeriodLabel, columnTypes, isMockData, onclickMetric, }: IProps) => ReactElement;
@@ -5,7 +5,8 @@ export interface IProps {
5
5
  isActive: boolean;
6
6
  isLoading?: boolean;
7
7
  hideComparison?: boolean;
8
+ isMockData?: boolean;
8
9
  onSelect: (key: EMetricKey) => void;
9
10
  onClickTitle?: (key: string) => void;
10
11
  }
11
- export declare const MetricChartTab: ({ item, isActive, isLoading, hideComparison, onSelect, onClickTitle, }: IProps) => ReactElement;
12
+ export declare const MetricChartTab: ({ item, isActive, isLoading, hideComparison, isMockData, onSelect, onClickTitle, }: IProps) => ReactElement;
@@ -11,6 +11,7 @@ export interface IProps {
11
11
  isLoading?: boolean;
12
12
  isEmptyMetricData?: boolean;
13
13
  minHeight?: number;
14
+ isMockData?: boolean;
14
15
  onClick: () => void;
15
16
  }
16
- export declare const MetricDonutChartCard: ({ label, metricKey, targets, totalsRow, comparisonTotalsRow, sort, isLoading, isEmptyMetricData, minHeight, onClick, }: IProps) => ReactElement;
17
+ export declare const MetricDonutChartCard: ({ label, metricKey, targets, totalsRow, comparisonTotalsRow, sort, isLoading, isEmptyMetricData, minHeight, isMockData, onClick, }: IProps) => ReactElement;
@@ -16,6 +16,7 @@ interface OrderListingLatestTableProps {
16
16
  source: EReportSource;
17
17
  data: IOrderListingLatestData;
18
18
  callbacks?: IOrderListingLatestCallbacks;
19
+ isMockData?: boolean;
19
20
  }
20
- export declare const OrderListingLatestTable: ({ source, data, callbacks }: OrderListingLatestTableProps) => import("react/jsx-runtime").JSX.Element;
21
+ export declare const OrderListingLatestTable: ({ source, data, callbacks, isMockData }: OrderListingLatestTableProps) => import("react/jsx-runtime").JSX.Element;
21
22
  export {};
@@ -18,9 +18,10 @@ interface OrderListingTableProps {
18
18
  queryValue?: string;
19
19
  paginationProps?: GPaginationProps;
20
20
  tableOptions?: OrderListingTableOptions;
21
+ isMockData?: boolean;
21
22
  onViewAllStoreOrders?: () => void;
22
23
  onViewOrderJourney?: (orderId: string) => void;
23
24
  onViewOrderDetails?: (orderId: string) => void;
24
25
  }
25
- declare const _default: import("react").MemoExoticComponent<({ orders, isLoading, totalStoreOrders, queryValue, paginationProps, tableOptions, onViewAllStoreOrders, onViewOrderJourney, onViewOrderDetails, }: OrderListingTableProps) => import("react/jsx-runtime").JSX.Element>;
26
+ declare const _default: import("react").MemoExoticComponent<({ orders, isLoading, totalStoreOrders, queryValue, paginationProps, tableOptions, isMockData, onViewAllStoreOrders, onViewOrderJourney, onViewOrderDetails, }: OrderListingTableProps) => import("react/jsx-runtime").JSX.Element>;
26
27
  export default _default;
@@ -1,7 +1,5 @@
1
1
  import type { EReportColumnKey } from '@/shared/reports/ui/ReportTable/types/report-columns';
2
2
  export interface IOrderColumnsSelectorStoreState {
3
- isChangeSelectedColumnsPreviously: boolean;
4
- setIsChangeSelectedColumnsPreviously: (isChangeSelectedColumnsPreviously: boolean) => void;
5
3
  selectedColumns: EReportColumnKey[];
6
4
  columnsOrder: EReportColumnKey[];
7
5
  setSelectedColumns: (selectedColumns: EReportColumnKey[]) => void;
@@ -1,3 +1,4 @@
1
+ import type { ICampaignType } from '@/types';
1
2
  export declare enum EJourneyEvent {
2
3
  ADDED_TO_CART = "ADDED_TO_CART",
3
4
  CHECKOUT_ADDRESS_INFO_SUBMITTED = "CHECKOUT_ADDRESS_INFO_SUBMITTED",
@@ -19,6 +20,37 @@ export interface IBaseJourneyEvent {
19
20
  date: string;
20
21
  eventType: EJourneyEvent;
21
22
  }
23
+ export interface ILineItem {
24
+ imageURL?: string | null;
25
+ productID?: string | null;
26
+ productTitle?: string | null;
27
+ productVariantID?: string | null;
28
+ properties?: string | null;
29
+ quantity?: number | null;
30
+ title?: string | null;
31
+ }
32
+ export interface IOrderJourneyBase {
33
+ campaignID?: string | null;
34
+ campaignGroupID?: string | null;
35
+ campaignGroupName?: string | null;
36
+ campaignName?: string | null;
37
+ campaignVariantType?: string | null;
38
+ date: string;
39
+ locationPath?: string | null;
40
+ name?: string | null;
41
+ orderID: string;
42
+ pageTitle?: string | null;
43
+ shopifySessionID?: string | null;
44
+ items?: (ILineItem | null)[] | null;
45
+ }
46
+ export interface IOrderJourneyItem extends IOrderJourneyBase {
47
+ eventType: EJourneyEvent;
48
+ lineItems?: ILineItem[];
49
+ }
50
+ export type IOrderItemPage = Pick<IOrderJourneyBase, 'campaignID' | 'campaignGroupID' | 'campaignGroupName' | 'campaignName' | 'campaignVariantType' | 'locationPath'> & {
51
+ filteredCampaignId?: string;
52
+ filteredCampaignType?: ICampaignType;
53
+ };
22
54
  export interface IOrderItem {
23
55
  image_url: string;
24
56
  product_title: string;
@@ -9,6 +9,7 @@ export interface IProps {
9
9
  isEmptyMetricData?: boolean;
10
10
  lineChartData: DataSeries[];
11
11
  columnTypes?: ColumnTypesMap;
12
+ isMockData?: boolean;
12
13
  onClickTitle?: (key: string) => void;
13
14
  }
14
- export declare const SingleMetricChartCard: ({ metricInfo, lineChartData, isLoading, hideComparison, columnTypes, isEmptyMetricData, onClickTitle, }: IProps) => ReactElement;
15
+ export declare const SingleMetricChartCard: ({ metricInfo, lineChartData, isLoading, hideComparison, columnTypes, isEmptyMetricData, isMockData, onClickTitle, }: IProps) => ReactElement;
@@ -8,6 +8,7 @@ export interface IProps {
8
8
  hideComparison?: boolean;
9
9
  titleVariant?: TextProps['variant'];
10
10
  titleFontWeight?: TextProps['fontWeight'];
11
+ isMockData?: boolean;
11
12
  onClickTitle?: (key: string) => void;
12
13
  }
13
- export declare const MetricInfoBlock: ({ item, isHovered, isLoading, hideComparison, titleVariant, titleFontWeight, onClickTitle, }: IProps) => ReactElement;
14
+ export declare const MetricInfoBlock: ({ item, isHovered, isLoading, hideComparison, titleVariant, titleFontWeight, isMockData, onClickTitle, }: IProps) => ReactElement;
@@ -6,3 +6,4 @@ export * from './CurrencySelector';
6
6
  export * from './GTimePicker';
7
7
  export * from './CardPathAnalysis';
8
8
  export * from './OrderAnalytic';
9
+ export * from './GModalOrderJourney';
@@ -4,7 +4,7 @@ import timezone from 'dayjs/plugin/timezone.js';
4
4
  import utc from 'dayjs/plugin/utc.js';
5
5
  import { useQuery } from '@tanstack/react-query';
6
6
  import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
7
- import { createContext, useContext, useState, useRef, useCallback, useEffect } from 'react';
7
+ import { createContext, useContext, useState, useMemo, useRef, useCallback, useEffect } from 'react';
8
8
  import { create } from 'zustand';
9
9
  import '@shopify/polaris';
10
10
 
@@ -177,6 +177,8 @@ const CLAUSE_KEYWORD_BOUNDARY = CLAUSE_KEYWORDS.join('|');
177
177
  const DEFAULT_QUERY_LIMIT = 1000;
178
178
 
179
179
  const DEFAULT_GROUP_OPERATOR = EGroupOperator.OR;
180
+ // Serializes a value as a single-quoted DSL string literal. Numbers are passed through unquoted.
181
+ const quoteValue = (v) => typeof v === 'number' ? String(v) : `'${String(v).replace(/'/g, "''")}'`;
180
182
  const joinFieldClauses = (parts, groupOperator = DEFAULT_GROUP_OPERATOR) => {
181
183
  if (!parts.length)
182
184
  return '';
@@ -187,18 +189,18 @@ const joinFieldClauses = (parts, groupOperator = DEFAULT_GROUP_OPERATOR) => {
187
189
  const buildEq = ({ fields, value, groupOperator }) => {
188
190
  if (!fields.length)
189
191
  return '';
190
- return joinFieldClauses(fields.map((field) => `${field} = ${value}`), groupOperator);
192
+ return joinFieldClauses(fields.map((field) => `${field} = ${quoteValue(value)}`), groupOperator);
191
193
  };
192
194
  const buildIn = ({ fields, values, groupOperator }) => {
193
195
  if (!fields.length || !values.length)
194
196
  return '';
195
- return joinFieldClauses(fields.map((field) => `${field} IN (${values.join(', ')})`), groupOperator);
197
+ return joinFieldClauses(fields.map((field) => `${field} IN (${values.map(quoteValue).join(', ')})`), groupOperator);
196
198
  };
197
199
  const buildLike = ({ fields, value, groupOperator }) => {
198
200
  const trimmed = value.trim();
199
201
  if (!trimmed || !fields.length)
200
202
  return '';
201
- return joinFieldClauses(fields.map((field) => `${field} LIKE '%${trimmed}%'`), groupOperator);
203
+ return joinFieldClauses(fields.map((field) => `${field} LIKE '%${trimmed.replace(/'/g, "''")}%'`), groupOperator);
202
204
  };
203
205
  const buildExtraCondition = (condition) => {
204
206
  switch (condition.operator) {
@@ -260,13 +262,14 @@ const filterConfigs = [
260
262
  multiField: EFilterField.GROUP_CAMPAIGN,
261
263
  },
262
264
  ];
265
+ const quoteStr = (v) => `'${v.replace(/'/g, "''")}'`;
263
266
  const buildCondition = (data) => {
264
267
  const { operatorValue, singleValue, multiValue, fieldName } = data;
265
268
  if (operatorValue === OPERATOR_IS && singleValue) {
266
- return `${fieldName} = ${singleValue}`;
269
+ return `${fieldName} = ${quoteStr(singleValue)}`;
267
270
  }
268
271
  else if (operatorValue === OPERATOR_IS_ONE_OF && Array.isArray(multiValue) && multiValue.length > 0) {
269
- return `${fieldName} IN (${multiValue.join(', ')})`;
272
+ return `${fieldName} IN (${multiValue.map(quoteStr).join(', ')})`;
270
273
  }
271
274
  return '';
272
275
  };
@@ -276,7 +279,9 @@ const buildOverrideFilterConditions = (overrideFilters) => {
276
279
  return Object.fromEntries(Object.entries(overrideFilters)
277
280
  .filter(([, value]) => value !== undefined)
278
281
  .map(([key, value]) => {
279
- const condition = Array.isArray(value) ? `${key} IN (${value.join(', ')})` : `${key} = ${value}`;
282
+ const condition = Array.isArray(value)
283
+ ? `${key} IN (${value.map(quoteStr).join(', ')})`
284
+ : `${key} = ${quoteStr(String(value))}`;
280
285
  return [key, condition];
281
286
  }));
282
287
  };
@@ -321,7 +326,7 @@ const buildVersionIdCondition = (versionIds) => {
321
326
  Object.entries(versionIds).forEach(([key, value]) => {
322
327
  if (!value)
323
328
  return;
324
- conditions.push(`${key} = ${value}`);
329
+ conditions.push(`${key} = ${quoteStr(value)}`);
325
330
  });
326
331
  return conditions;
327
332
  };
@@ -346,13 +351,14 @@ const parse$b = (query) => {
346
351
  const conditions = (match[1] ?? '').trim().split(/\s+AND\s+/i);
347
352
  const filters = {};
348
353
  const versionIds = {};
354
+ const unquoteStr = (v) => v.replace(/^'(.*)'$/s, '$1').replace(/''/g, "'");
349
355
  conditions.forEach((condition) => {
350
356
  const trimmed = condition.trim();
351
357
  const inMatch = trimmed.match(/^(\S+)\s+IN\s+\((.+)\)$/i);
352
358
  if (inMatch) {
353
359
  const field = inMatch[1] ?? '';
354
360
  const valuesStr = inMatch[2] ?? '';
355
- const values = valuesStr.split(',').map((v) => v.trim());
361
+ const values = valuesStr.split(',').map((v) => unquoteStr(v.trim()));
356
362
  const config = filterConfigs.find((c) => c.fieldName === field || c.multiField === field);
357
363
  if (config?.operator) {
358
364
  filters[config.multiField] = values;
@@ -363,7 +369,7 @@ const parse$b = (query) => {
363
369
  const eqMatch = trimmed.match(/^(\S+)\s+=\s+(.+)$/);
364
370
  if (eqMatch) {
365
371
  const field = eqMatch[1] ?? '';
366
- const value = eqMatch[2] ?? '';
372
+ const value = unquoteStr(eqMatch[2] ?? '');
367
373
  const config = filterConfigs.find((c) => c.fieldName === field || c.singleField === field);
368
374
  if (config) {
369
375
  filters[config.singleField] = value;
@@ -383,7 +389,7 @@ const parse$b = (query) => {
383
389
 
384
390
  const build$9 = (sources) => `FROM ${sources.join(', ')}`;
385
391
  const parse$a = (query) => {
386
- const match = query.match(new RegExp(`\\bFROM\\s+([\\s\\S]+?)(?=\\s+(?:${CLAUSE_KEYWORD_BOUNDARY})\\b)`, 'i'));
392
+ const match = query.match(new RegExp(`\\bFROM\\s+([\\s\\S]+?)(?=\\s+(?:${CLAUSE_KEYWORD_BOUNDARY})\\b|$)`, 'i'));
387
393
  if (!match)
388
394
  return [];
389
395
  return (match[1] ?? '')
@@ -394,27 +400,30 @@ const parse$a = (query) => {
394
400
 
395
401
  const build$8 = (dimensions, withClause = EGroupWithClause.ALL) => dimensions.length === 0 ? '' : `GROUP BY ${dimensions.join(', ')} ${withClause}`;
396
402
  const parse$9 = (query) => {
397
- const match = query.match(new RegExp(`\\bGROUP BY\\s+([\\s\\S]+?)(?=\\s+(?:${CLAUSE_KEYWORD_BOUNDARY})\\b)`, 'i'));
403
+ const match = query.match(new RegExp(`\\bGROUP BY\\s+([\\s\\S]+?)(?=\\s+(?:${CLAUSE_KEYWORD_BOUNDARY})\\b|$)`, 'i'));
398
404
  if (!match)
399
405
  return { dimensions: [] };
400
- const content = (match[1] ?? '').trim();
401
- const withIdx = content.toUpperCase().indexOf(' WITH ');
402
- if (withIdx === -1) {
403
- return {
404
- dimensions: content
405
- .split(',')
406
- .map((s) => s.trim())
407
- .filter(Boolean),
408
- groupWithClause: EGroupWithClause.NONE,
409
- };
406
+ let content = (match[1] ?? '').trim();
407
+ // Detect the trailing with-clause token (e.g. `WITH GROUP_TOTALS, TOTALS` or `TOTALS`).
408
+ // Derive tokens from the enum and check longest-first so `ALL` is not mistaken for `TOTALS`.
409
+ const clauseTokens = Object.values(EGroupWithClause)
410
+ .filter((token) => token !== EGroupWithClause.NONE)
411
+ .sort((a, b) => b.length - a.length);
412
+ let groupWithClause = EGroupWithClause.NONE;
413
+ const upperContent = content.toUpperCase();
414
+ for (const token of clauseTokens) {
415
+ if (upperContent.endsWith(token)) {
416
+ groupWithClause = token;
417
+ content = content.slice(0, content.length - token.length).trim();
418
+ break;
419
+ }
410
420
  }
411
421
  return {
412
422
  dimensions: content
413
- .slice(0, withIdx)
414
423
  .split(',')
415
424
  .map((s) => s.trim())
416
425
  .filter(Boolean),
417
- groupWithClause: content.slice(withIdx + 1).trim(),
426
+ groupWithClause,
418
427
  };
419
428
  };
420
429
 
@@ -472,7 +481,7 @@ const parse$5 = (query) => {
472
481
 
473
482
  const build$3 = (metrics) => `SHOW ${metrics.join(', ')}`;
474
483
  const parse$4 = (query) => {
475
- const match = query.match(new RegExp(`\\bSHOW\\s+([\\s\\S]+?)(?=\\s+(?:${CLAUSE_KEYWORD_BOUNDARY})\\b)`, 'i'));
484
+ const match = query.match(new RegExp(`\\bSHOW\\s+([\\s\\S]+?)(?=\\s+(?:${CLAUSE_KEYWORD_BOUNDARY})\\b|$)`, 'i'));
476
485
  if (!match)
477
486
  return [];
478
487
  return (match[1] ?? '')
@@ -524,11 +533,15 @@ const calcPercentageString = (part, total, decimals = 2) => {
524
533
  dayjs.extend(utc);
525
534
  dayjs.extend(timezone);
526
535
  dayjs.extend(quarterOfYear);
527
- let tz = 'UTC';
536
+ // Stored on `globalThis` (not a module-local `let`): each entry-point bundle gets its
537
+ // own copy of this module, so a local var would let `setTz` and the query builder read
538
+ // different copies. A shared global slot keeps every bundle in sync.
539
+ const TZ_GLOBAL_KEY = '__GEM_SDK_ANALYTICS_TZ__';
528
540
  function getInitialTimezone() {
529
- return tz;
541
+ return globalThis[TZ_GLOBAL_KEY] ?? 'UTC';
530
542
  }
531
543
  const dayjsTz = (date) => {
544
+ const tz = getInitialTimezone();
532
545
  if (!date)
533
546
  return dayjs().tz(tz);
534
547
  return dayjs(date).tz(tz);
@@ -904,7 +917,13 @@ const parsePageItems = (value) => parseJsonObject(value);
904
917
 
905
918
  const readNumeric = (metric, key) => {
906
919
  const raw = metric?.[key];
907
- return typeof raw === 'number' ? raw : 0;
920
+ if (typeof raw === 'number')
921
+ return raw;
922
+ if (typeof raw === 'string') {
923
+ const n = parseFloat(raw);
924
+ return isNaN(n) ? 0 : n;
925
+ }
926
+ return 0;
908
927
  };
909
928
  const createNumericRowReader = (row, mode = ERowReaderMode.DEFAULT) => (key) => {
910
929
  const { prefix, suffix } = ROW_READER_MODE_CONFIG[mode];
@@ -1165,6 +1184,11 @@ var ICampaignType;
1165
1184
  ICampaignType["TEMPLATE_BUNDLE"] = "TEMPLATE_BUNDLE";
1166
1185
  // THEME = 'THEME',
1167
1186
  })(ICampaignType || (ICampaignType = {}));
1187
+ var IVariantType;
1188
+ (function (IVariantType) {
1189
+ IVariantType["VARIANT_A"] = "A";
1190
+ IVariantType["VARIANT_B"] = "B";
1191
+ })(IVariantType || (IVariantType = {}));
1168
1192
 
1169
1193
  [
1170
1194
  { value: EVisitorType.NEW, label: 'New' },
@@ -1230,8 +1254,19 @@ var GPaginationDirection;
1230
1254
 
1231
1255
  const useGemXQlPagination = ({ resetKey, itemsPerPage, }) => {
1232
1256
  const [currentPage, setCurrentPage] = useState(1);
1257
+ // Serialize so object/array reset keys compare by value, not by reference.
1258
+ const serializedResetKey = useMemo(() => {
1259
+ if (resetKey === undefined)
1260
+ return undefined;
1261
+ try {
1262
+ return JSON.stringify(resetKey);
1263
+ }
1264
+ catch {
1265
+ return String(resetKey);
1266
+ }
1267
+ }, [resetKey]);
1233
1268
  const previousResetKeyRef = useRef();
1234
- const shouldResetPagination = currentPage > 1 && previousResetKeyRef.current !== undefined && previousResetKeyRef.current !== resetKey;
1269
+ const shouldResetPagination = currentPage > 1 && previousResetKeyRef.current !== undefined && previousResetKeyRef.current !== serializedResetKey;
1235
1270
  const effectivePage = shouldResetPagination ? 1 : currentPage;
1236
1271
  const offset = (effectivePage - 1) * itemsPerPage;
1237
1272
  const handlePageChange = useCallback((totalPages) => (direction) => {
@@ -1242,11 +1277,11 @@ const useGemXQlPagination = ({ resetKey, itemsPerPage, }) => {
1242
1277
  });
1243
1278
  }, []);
1244
1279
  useEffect(() => {
1245
- if (previousResetKeyRef.current !== resetKey) {
1246
- previousResetKeyRef.current = resetKey;
1280
+ if (previousResetKeyRef.current !== serializedResetKey) {
1281
+ previousResetKeyRef.current = serializedResetKey;
1247
1282
  setCurrentPage(1);
1248
1283
  }
1249
- }, [resetKey]);
1284
+ }, [serializedResetKey]);
1250
1285
  const buildPagination = useCallback(({ totalRecords, isLoading }) => {
1251
1286
  const totalPages = Math.max(1, Math.ceil(totalRecords / itemsPerPage));
1252
1287
  return {