@gem-sdk/analytics 1.0.0-dev.41 → 1.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 (427) 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 +22 -0
  19. package/dist/esm/components/OrderAnalytic/components/OrderListing/OrderListingSkeleton/OrderListingTableSkeleton.d.ts +5 -0
  20. package/dist/esm/components/OrderAnalytic/components/OrderListing/OrderListingSkeleton/SkeletonCellContent.d.ts +3 -0
  21. package/dist/esm/components/OrderAnalytic/components/OrderListing/OrderListingSkeleton/SkeletonHeader.d.ts +1 -0
  22. package/dist/esm/components/OrderAnalytic/components/OrderListing/OrderListingSkeleton/SkeletonRow.d.ts +1 -0
  23. package/dist/esm/components/OrderAnalytic/components/OrderListing/OrderListingSkeleton/SkeletonSummaryRow.d.ts +1 -0
  24. package/dist/esm/components/OrderAnalytic/components/OrderListing/OrderListingSkeleton/constants.d.ts +2 -0
  25. package/dist/esm/components/OrderAnalytic/components/OrderListing/OrderListingSkeleton/index.d.ts +1 -0
  26. package/dist/esm/components/OrderAnalytic/components/OrderListing/OrderListingTable.d.ts +27 -0
  27. package/dist/esm/components/OrderAnalytic/components/OrderListing/OrderListingTableEmpty.d.ts +6 -0
  28. package/dist/esm/components/OrderAnalytic/constants/index.d.ts +2 -0
  29. package/dist/esm/components/OrderAnalytic/constants/order-columns.d.ts +6 -0
  30. package/dist/esm/components/OrderAnalytic/constants/order-listing.d.ts +13 -0
  31. package/dist/esm/components/OrderAnalytic/helpers/index.d.ts +1 -0
  32. package/dist/esm/components/OrderAnalytic/helpers/order-listing.d.ts +6 -0
  33. package/dist/esm/components/OrderAnalytic/hooks/index.d.ts +1 -0
  34. package/dist/esm/components/OrderAnalytic/hooks/useOrderListingData.d.ts +16 -0
  35. package/dist/esm/components/OrderAnalytic/index.d.ts +4 -0
  36. package/dist/esm/components/OrderAnalytic/stores/index.d.ts +2 -0
  37. package/dist/esm/components/OrderAnalytic/stores/order-columns-selector.d.ts +18 -0
  38. package/dist/esm/components/OrderAnalytic/stores/order-control.d.ts +6 -0
  39. package/dist/esm/components/OrderAnalytic/types/index.d.ts +3 -0
  40. package/dist/esm/components/OrderAnalytic/types/order.d.ts +77 -0
  41. package/dist/esm/components/OrderAnalytic/types/orderListing.d.ts +4 -0
  42. package/dist/esm/components/OrderAnalytic/types/report.d.ts +12 -0
  43. package/dist/esm/components/SingleMetricChartCard/SingleMetricChartCard.d.ts +2 -1
  44. package/dist/esm/components/common/chart/MetricInfoBlock.d.ts +2 -1
  45. package/dist/esm/components/index.d.ts +2 -0
  46. package/dist/esm/core/gemxql/graphql/fragments/gemxql.generated.d.ts +51 -1
  47. package/dist/esm/core/gemxql/hooks/useGemXQlPagination.d.ts +3 -11
  48. package/dist/esm/gemxql.js +79 -33
  49. package/dist/esm/gemxql.mjs +79 -33
  50. package/dist/esm/hooks/index.d.ts +1 -0
  51. package/dist/esm/hooks/useFetchCurrencyRates.d.ts +4 -1
  52. package/dist/esm/hooks/usePreventBodyScroll.d.ts +3 -0
  53. package/dist/esm/index.js +9402 -8627
  54. package/dist/esm/index.mjs +9402 -8627
  55. package/dist/esm/providers/TimezoneProvider.d.ts +11 -0
  56. package/dist/esm/providers/index.d.ts +2 -0
  57. package/dist/esm/shared/charts/components/GFunnelChart/components/types.d.ts +1 -0
  58. package/dist/esm/shared/charts/contexts/GChartProvider.d.ts +1 -1
  59. package/dist/esm/shared/components/GBoxCard/GBoxCard.d.ts +7 -0
  60. package/dist/esm/shared/components/GBoxCard/index.d.ts +1 -0
  61. package/dist/esm/shared/components/GDotInline/GDotInline.d.ts +5 -0
  62. package/dist/esm/shared/components/GDotInline/index.d.ts +1 -0
  63. package/dist/esm/shared/components/GInlineCenter/GInlineCenter.d.ts +10 -0
  64. package/dist/esm/shared/components/GInlineCenter/index.d.ts +1 -0
  65. package/dist/esm/shared/components/GMockDataTooltip/GMockDataTooltip.d.ts +12 -0
  66. package/dist/esm/shared/components/GMockDataTooltip/index.d.ts +1 -0
  67. package/dist/esm/shared/components/GModal/GModal.d.ts +14 -0
  68. package/dist/esm/shared/components/GModal/index.d.ts +1 -0
  69. package/dist/esm/shared/components/GPagination/GPagination.d.ts +13 -0
  70. package/dist/esm/shared/components/GPagination/hooks/useGPagination.d.ts +14 -0
  71. package/dist/esm/shared/components/GPagination/index.d.ts +2 -0
  72. package/dist/esm/shared/components/GSpinner/GSpinner.d.ts +5 -0
  73. package/dist/esm/shared/components/GSpinner/index.d.ts +1 -0
  74. package/dist/esm/shared/components/GTextTooltip/GTextTooltip.d.ts +6 -0
  75. package/dist/esm/shared/components/GTextTooltip/index.d.ts +1 -0
  76. package/dist/esm/shared/components/GTextTruncated/GTextTruncated.d.ts +9 -0
  77. package/dist/esm/shared/components/GTextTruncated/index.d.ts +1 -0
  78. package/dist/esm/shared/components/GTooltip/components/GTooltipCard.d.ts +37 -0
  79. package/dist/esm/shared/components/GTooltip/index.d.ts +1 -0
  80. package/dist/esm/shared/components/GVariantBadge/GVariant.d.ts +7 -0
  81. package/dist/esm/shared/components/GVariantBadge/GVariantBadge.d.ts +25 -0
  82. package/dist/esm/shared/components/GVariantBadge/index.d.ts +3 -0
  83. package/dist/esm/shared/components/GVariantBadge/types.d.ts +18 -0
  84. package/dist/esm/shared/components/index.d.ts +9 -1
  85. package/dist/esm/shared/journey/common/JourneyContainer/components/JourneyContainer.d.ts +10 -0
  86. package/dist/esm/shared/journey/common/JourneyContainer/components/JourneyTimeline.d.ts +1 -0
  87. package/dist/esm/shared/journey/common/JourneyContainer/components/index.d.ts +2 -0
  88. package/dist/esm/shared/journey/common/JourneyContainer/index.d.ts +1 -0
  89. package/dist/esm/shared/journey/common/index.d.ts +1 -0
  90. package/dist/esm/shared/journey/index.d.ts +2 -0
  91. package/dist/esm/shared/journey/ui/JourneyEvents/components/AcceptedPostPurchaseOffer/AcceptedPostPurchaseOffer.d.ts +10 -0
  92. package/dist/esm/shared/journey/ui/JourneyEvents/components/AcceptedPostPurchaseOffer/index.d.ts +1 -0
  93. package/dist/esm/shared/journey/ui/JourneyEvents/components/CheckoutCompleted/CheckoutCompleted.d.ts +9 -0
  94. package/dist/esm/shared/journey/ui/JourneyEvents/components/CheckoutCompleted/index.d.ts +1 -0
  95. package/dist/esm/shared/journey/ui/JourneyEvents/components/CheckoutItems.d.ts +6 -0
  96. package/dist/esm/shared/journey/ui/JourneyEvents/components/CheckoutStarted/CheckoutStarted.d.ts +10 -0
  97. package/dist/esm/shared/journey/ui/JourneyEvents/components/CheckoutStarted/CheckoutStartedDetail.d.ts +8 -0
  98. package/dist/esm/shared/journey/ui/JourneyEvents/components/CheckoutStarted/index.d.ts +2 -0
  99. package/dist/esm/shared/journey/ui/JourneyEvents/components/PageViewed/PageViewed.d.ts +9 -0
  100. package/dist/esm/shared/journey/ui/JourneyEvents/components/PageViewed/index.d.ts +1 -0
  101. package/dist/esm/shared/journey/ui/JourneyEvents/components/ProductAddedToCart/ProductAddedToCart.d.ts +10 -0
  102. package/dist/esm/shared/journey/ui/JourneyEvents/components/ProductAddedToCart/index.d.ts +1 -0
  103. package/dist/esm/shared/journey/ui/JourneyEvents/components/ProductQuantity/ProductQuantity.d.ts +6 -0
  104. package/dist/esm/shared/journey/ui/JourneyEvents/components/ProductQuantity/index.d.ts +1 -0
  105. package/dist/esm/shared/journey/ui/JourneyEvents/components/ProductRemovedFromCart/ProductRemovedFromCart.d.ts +10 -0
  106. package/dist/esm/shared/journey/ui/JourneyEvents/components/ProductRemovedFromCart/index.d.ts +1 -0
  107. package/dist/esm/shared/journey/ui/JourneyEvents/components/index.d.ts +6 -0
  108. package/dist/esm/shared/journey/ui/JourneyEvents/constants/event.d.ts +13 -0
  109. package/dist/esm/shared/journey/ui/JourneyEvents/constants/index.d.ts +1 -0
  110. package/dist/esm/shared/journey/ui/JourneyEvents/index.d.ts +2 -0
  111. package/dist/esm/shared/journey/ui/JourneyEvents/types.d.ts +2 -0
  112. package/dist/esm/shared/journey/ui/JourneyGroup/JourneyGroup.d.ts +7 -0
  113. package/dist/esm/shared/journey/ui/JourneyGroup/index.d.ts +1 -0
  114. package/dist/esm/shared/journey/ui/JourneyItem/components/EventMarkerIcon.d.ts +2 -0
  115. package/dist/esm/shared/journey/ui/JourneyItem/components/JourneyDetail.d.ts +5 -0
  116. package/dist/esm/shared/journey/ui/JourneyItem/components/JourneyItem.d.ts +9 -0
  117. package/dist/esm/shared/journey/ui/JourneyItem/components/JourneyTime.d.ts +9 -0
  118. package/dist/esm/shared/journey/ui/JourneyItem/components/QuantityWrapper.d.ts +5 -0
  119. package/dist/esm/shared/journey/ui/JourneyItem/components/index.d.ts +3 -0
  120. package/dist/esm/shared/journey/ui/JourneyItem/index.d.ts +2 -0
  121. package/dist/esm/shared/journey/ui/JourneyItem/types/events.d.ts +18 -0
  122. package/dist/esm/shared/journey/ui/JourneyItem/types/index.d.ts +1 -0
  123. package/dist/esm/shared/journey/ui/JourneyTitle/components/JourneyDateBadge.d.ts +5 -0
  124. package/dist/esm/shared/journey/ui/JourneyTitle/components/JourneyIdBadge.d.ts +6 -0
  125. package/dist/esm/shared/journey/ui/JourneyTitle/components/JourneyLoadMore.d.ts +6 -0
  126. package/dist/esm/shared/journey/ui/JourneyTitle/components/JourneyTitle.d.ts +9 -0
  127. package/dist/esm/shared/journey/ui/JourneyTitle/components/index.d.ts +1 -0
  128. package/dist/esm/shared/journey/ui/JourneyTitle/index.d.ts +1 -0
  129. package/dist/esm/shared/journey/ui/index.d.ts +3 -0
  130. package/dist/esm/shared/journey/ui/type.d.ts +2 -0
  131. package/dist/esm/shared/reports/common/Visualization/constants/columns.d.ts +5 -0
  132. package/dist/esm/shared/reports/common/Visualization/constants/index.d.ts +2 -0
  133. package/dist/esm/shared/reports/common/Visualization/constants/version.d.ts +6 -0
  134. package/dist/esm/shared/reports/common/Visualization/index.d.ts +2 -0
  135. package/dist/esm/shared/reports/common/Visualization/types/chart.d.ts +5 -0
  136. package/dist/esm/shared/reports/common/Visualization/types/index.d.ts +3 -0
  137. package/dist/esm/shared/reports/common/Visualization/types/report-metric.d.ts +21 -0
  138. package/dist/esm/shared/reports/common/Visualization/types/report.d.ts +36 -0
  139. package/dist/esm/shared/reports/common/Visualization/utils/index.d.ts +2 -0
  140. package/dist/esm/shared/reports/common/Visualization/utils/version.d.ts +2 -0
  141. package/dist/esm/shared/reports/common/Visualization/utils/visualization.d.ts +12 -0
  142. package/dist/esm/shared/reports/common/index.d.ts +1 -0
  143. package/dist/esm/shared/reports/ui/ReportTable/ReportTable.d.ts +34 -0
  144. package/dist/esm/shared/reports/ui/ReportTable/ReportTableSkeleton.d.ts +8 -0
  145. package/dist/esm/shared/reports/ui/ReportTable/components/Body/Cell/CampaignsCell/CampaignsCell.d.ts +3 -0
  146. package/dist/esm/shared/reports/ui/ReportTable/components/Body/Cell/CampaignsCell/CampaignsCellVersion.d.ts +5 -0
  147. package/dist/esm/shared/reports/ui/ReportTable/components/Body/Cell/CampaignsCell/index.d.ts +1 -0
  148. package/dist/esm/shared/reports/ui/ReportTable/components/Body/Cell/Cell.d.ts +18 -0
  149. package/dist/esm/shared/reports/ui/ReportTable/components/Body/Cell/CellRenderers.d.ts +2 -0
  150. package/dist/esm/shared/reports/ui/ReportTable/components/Body/Cell/DateCell.d.ts +2 -0
  151. package/dist/esm/shared/reports/ui/ReportTable/components/Body/Cell/DefaultCell.d.ts +2 -0
  152. package/dist/esm/shared/reports/ui/ReportTable/components/Body/Cell/ItemsCell/CheckoutStartedDetail.d.ts +8 -0
  153. package/dist/esm/shared/reports/ui/ReportTable/components/Body/Cell/ItemsCell/ItemsCell.d.ts +12 -0
  154. package/dist/esm/shared/reports/ui/ReportTable/components/Body/Cell/ItemsCell/index.d.ts +1 -0
  155. package/dist/esm/shared/reports/ui/ReportTable/components/Body/Cell/NoneCell.d.ts +2 -0
  156. package/dist/esm/shared/reports/ui/ReportTable/components/Body/Cell/OrderCell/LoadingData.d.ts +1 -0
  157. package/dist/esm/shared/reports/ui/ReportTable/components/Body/Cell/OrderCell/NoData.d.ts +1 -0
  158. package/dist/esm/shared/reports/ui/ReportTable/components/Body/Cell/OrderCell/OrderCell.d.ts +6 -0
  159. package/dist/esm/shared/reports/ui/ReportTable/components/Body/Cell/OrderCell/OrderCellBase.d.ts +13 -0
  160. package/dist/esm/shared/reports/ui/ReportTable/components/Body/Cell/OrderCell/OrderCellContainer.d.ts +3 -0
  161. package/dist/esm/shared/reports/ui/ReportTable/components/Body/Cell/OrderCell/OrderItem.d.ts +10 -0
  162. package/dist/esm/shared/reports/ui/ReportTable/components/Body/Cell/OrderCell/index.d.ts +2 -0
  163. package/dist/esm/shared/reports/ui/ReportTable/components/Body/Cell/OrderIdCell.d.ts +2 -0
  164. package/dist/esm/shared/reports/ui/ReportTable/components/Body/Cell/PreviousCell.d.ts +7 -0
  165. package/dist/esm/shared/reports/ui/ReportTable/components/Body/Cell/TotalCell.d.ts +7 -0
  166. package/dist/esm/shared/reports/ui/ReportTable/components/Body/Cell/VersionCell.d.ts +11 -0
  167. package/dist/esm/shared/reports/ui/ReportTable/components/Body/Cell/WrapperCell.d.ts +10 -0
  168. package/dist/esm/shared/reports/ui/ReportTable/components/Body/Cell/index.d.ts +1 -0
  169. package/dist/esm/shared/reports/ui/ReportTable/components/Body/Cell/type.d.ts +16 -0
  170. package/dist/esm/shared/reports/ui/ReportTable/components/Body/Row.d.ts +16 -0
  171. package/dist/esm/shared/reports/ui/ReportTable/components/Body/index.d.ts +2 -0
  172. package/dist/esm/shared/reports/ui/ReportTable/components/Footer/Pagination.d.ts +12 -0
  173. package/dist/esm/shared/reports/ui/ReportTable/components/Footer/ScrollBar.d.ts +3 -0
  174. package/dist/esm/shared/reports/ui/ReportTable/components/Footer/WrapperFooter.d.ts +12 -0
  175. package/dist/esm/shared/reports/ui/ReportTable/components/Footer/index.d.ts +1 -0
  176. package/dist/esm/shared/reports/ui/ReportTable/components/Header/Header.d.ts +12 -0
  177. package/dist/esm/shared/reports/ui/ReportTable/components/Header/SortableHeader.d.ts +10 -0
  178. package/dist/esm/shared/reports/ui/ReportTable/components/Header/SortableHeaderWithTooltip.d.ts +9 -0
  179. package/dist/esm/shared/reports/ui/ReportTable/components/Header/SummaryCell.d.ts +10 -0
  180. package/dist/esm/shared/reports/ui/ReportTable/components/Header/SummaryRow.d.ts +12 -0
  181. package/dist/esm/shared/reports/ui/ReportTable/components/Header/WrapperHeader.d.ts +21 -0
  182. package/dist/esm/shared/reports/ui/ReportTable/components/Header/index.d.ts +1 -0
  183. package/dist/esm/shared/reports/ui/ReportTable/components/index.d.ts +2 -0
  184. package/dist/esm/shared/reports/ui/ReportTable/constants/index.d.ts +2 -0
  185. package/dist/esm/shared/reports/ui/ReportTable/constants/order.d.ts +9 -0
  186. package/dist/esm/shared/reports/ui/ReportTable/constants/table.d.ts +4 -0
  187. package/dist/esm/shared/reports/ui/ReportTable/context/ReportTableActionsContext.d.ts +11 -0
  188. package/dist/esm/shared/reports/ui/ReportTable/helpers/format.d.ts +1 -0
  189. package/dist/esm/shared/reports/ui/ReportTable/helpers/index.d.ts +2 -0
  190. package/dist/esm/shared/reports/ui/ReportTable/helpers/report.d.ts +2 -0
  191. package/dist/esm/shared/reports/ui/ReportTable/hooks/index.d.ts +3 -0
  192. package/dist/esm/shared/reports/ui/ReportTable/hooks/useReportTable.d.ts +12 -0
  193. package/dist/esm/shared/reports/ui/ReportTable/hooks/useReportTableCell.d.ts +8 -0
  194. package/dist/esm/shared/reports/ui/ReportTable/hooks/useSyncedScroll.d.ts +12 -0
  195. package/dist/esm/shared/reports/ui/ReportTable/index.d.ts +3 -0
  196. package/dist/esm/shared/reports/ui/ReportTable/types/dimension.d.ts +8 -0
  197. package/dist/esm/shared/reports/ui/ReportTable/types/index.d.ts +38 -0
  198. package/dist/esm/shared/reports/ui/ReportTable/types/order.d.ts +14 -0
  199. package/dist/esm/shared/reports/ui/ReportTable/types/report-columns.d.ts +10 -0
  200. package/dist/esm/shared/reports/ui/ReportTable/utils/format.d.ts +8 -0
  201. package/dist/esm/shared/reports/ui/ReportTable/utils/index.d.ts +2 -0
  202. package/dist/esm/shared/reports/ui/ReportTable/utils/order.d.ts +2 -0
  203. package/dist/esm/shared/reports/ui/ReportTable/utils/table.d.ts +3 -0
  204. package/dist/esm/shared/reports/ui/ReportTable/utils/visualization.d.ts +11 -0
  205. package/dist/esm/types/campaign.d.ts +9 -0
  206. package/dist/esm/types/index.d.ts +1 -0
  207. package/dist/esm/types.js +15 -1
  208. package/dist/esm/types.mjs +15 -1
  209. package/dist/esm/utils/array.d.ts +1 -0
  210. package/dist/esm/utils/date-time.d.ts +1 -0
  211. package/dist/esm/utils/index.d.ts +4 -0
  212. package/dist/esm/utils/is-browser.d.ts +1 -0
  213. package/dist/esm/utils/sort.d.ts +1 -0
  214. package/dist/esm/utils/string.d.ts +3 -0
  215. package/dist/style.css +1 -1
  216. package/dist/umd/esm/components/CardPathAnalysis/components/PathAnalysisChart.d.ts +0 -1
  217. package/dist/umd/esm/components/CardPathAnalysis/contexts/PathAnalysisConfigProvider.d.ts +8 -1
  218. package/dist/umd/esm/components/CardPathAnalysis/hooks/usePathAnalysisChart.d.ts +1 -0
  219. package/dist/umd/esm/components/CardPathAnalysis/hooks/usePathAnalysisFunnel.d.ts +2 -1
  220. package/dist/umd/esm/components/GModalOrderJourney/GModalOrderJourney.d.ts +20 -0
  221. package/dist/umd/esm/components/GModalOrderJourney/components/OrderJourneySkeleton.d.ts +1 -0
  222. package/dist/umd/esm/components/GModalOrderJourney/components/index.d.ts +1 -0
  223. package/dist/umd/esm/components/GModalOrderJourney/context/OrderJourneyContext.d.ts +6 -0
  224. package/dist/umd/esm/components/GModalOrderJourney/context/index.d.ts +1 -0
  225. package/dist/umd/esm/components/GModalOrderJourney/hooks/index.d.ts +1 -0
  226. package/dist/umd/esm/components/GModalOrderJourney/hooks/useGModalOrderJourney.d.ts +7 -0
  227. package/dist/umd/esm/components/GModalOrderJourney/index.d.ts +4 -0
  228. package/dist/umd/esm/components/GModalOrderJourney/types/index.d.ts +4 -0
  229. package/dist/umd/esm/components/GModalOrderJourney/utils/index.d.ts +28 -0
  230. package/dist/umd/esm/components/GSelectableMetricChartCard/GSelectableMetricChartCard.d.ts +2 -1
  231. package/dist/umd/esm/components/GSelectableMetricChartCard/MetricChartTab.d.ts +2 -1
  232. package/dist/umd/esm/components/MetricDonutChartCard/MetricDonutChartCard.d.ts +2 -1
  233. package/dist/umd/esm/components/OrderAnalytic/OrderListingLatestTable.d.ts +22 -0
  234. package/dist/umd/esm/components/OrderAnalytic/components/OrderListing/OrderListingSkeleton/OrderListingTableSkeleton.d.ts +5 -0
  235. package/dist/umd/esm/components/OrderAnalytic/components/OrderListing/OrderListingSkeleton/SkeletonCellContent.d.ts +3 -0
  236. package/dist/umd/esm/components/OrderAnalytic/components/OrderListing/OrderListingSkeleton/SkeletonHeader.d.ts +1 -0
  237. package/dist/umd/esm/components/OrderAnalytic/components/OrderListing/OrderListingSkeleton/SkeletonRow.d.ts +1 -0
  238. package/dist/umd/esm/components/OrderAnalytic/components/OrderListing/OrderListingSkeleton/SkeletonSummaryRow.d.ts +1 -0
  239. package/dist/umd/esm/components/OrderAnalytic/components/OrderListing/OrderListingSkeleton/constants.d.ts +2 -0
  240. package/dist/umd/esm/components/OrderAnalytic/components/OrderListing/OrderListingSkeleton/index.d.ts +1 -0
  241. package/dist/umd/esm/components/OrderAnalytic/components/OrderListing/OrderListingTable.d.ts +27 -0
  242. package/dist/umd/esm/components/OrderAnalytic/components/OrderListing/OrderListingTableEmpty.d.ts +6 -0
  243. package/dist/umd/esm/components/OrderAnalytic/constants/index.d.ts +2 -0
  244. package/dist/umd/esm/components/OrderAnalytic/constants/order-columns.d.ts +6 -0
  245. package/dist/umd/esm/components/OrderAnalytic/constants/order-listing.d.ts +13 -0
  246. package/dist/umd/esm/components/OrderAnalytic/helpers/index.d.ts +1 -0
  247. package/dist/umd/esm/components/OrderAnalytic/helpers/order-listing.d.ts +6 -0
  248. package/dist/umd/esm/components/OrderAnalytic/hooks/index.d.ts +1 -0
  249. package/dist/umd/esm/components/OrderAnalytic/hooks/useOrderListingData.d.ts +16 -0
  250. package/dist/umd/esm/components/OrderAnalytic/index.d.ts +4 -0
  251. package/dist/umd/esm/components/OrderAnalytic/stores/index.d.ts +2 -0
  252. package/dist/umd/esm/components/OrderAnalytic/stores/order-columns-selector.d.ts +18 -0
  253. package/dist/umd/esm/components/OrderAnalytic/stores/order-control.d.ts +6 -0
  254. package/dist/umd/esm/components/OrderAnalytic/types/index.d.ts +3 -0
  255. package/dist/umd/esm/components/OrderAnalytic/types/order.d.ts +77 -0
  256. package/dist/umd/esm/components/OrderAnalytic/types/orderListing.d.ts +4 -0
  257. package/dist/umd/esm/components/OrderAnalytic/types/report.d.ts +12 -0
  258. package/dist/umd/esm/components/SingleMetricChartCard/SingleMetricChartCard.d.ts +2 -1
  259. package/dist/umd/esm/components/common/chart/MetricInfoBlock.d.ts +2 -1
  260. package/dist/umd/esm/components/index.d.ts +2 -0
  261. package/dist/umd/esm/core/gemxql/graphql/fragments/gemxql.generated.d.ts +51 -1
  262. package/dist/umd/esm/core/gemxql/hooks/useGemXQlPagination.d.ts +3 -11
  263. package/dist/umd/esm/hooks/index.d.ts +1 -0
  264. package/dist/umd/esm/hooks/useFetchCurrencyRates.d.ts +4 -1
  265. package/dist/umd/esm/hooks/usePreventBodyScroll.d.ts +3 -0
  266. package/dist/umd/esm/providers/TimezoneProvider.d.ts +11 -0
  267. package/dist/umd/esm/providers/index.d.ts +2 -0
  268. package/dist/umd/esm/shared/charts/components/GFunnelChart/components/types.d.ts +1 -0
  269. package/dist/umd/esm/shared/charts/contexts/GChartProvider.d.ts +1 -1
  270. package/dist/umd/esm/shared/components/GBoxCard/GBoxCard.d.ts +7 -0
  271. package/dist/umd/esm/shared/components/GBoxCard/index.d.ts +1 -0
  272. package/dist/umd/esm/shared/components/GDotInline/GDotInline.d.ts +5 -0
  273. package/dist/umd/esm/shared/components/GDotInline/index.d.ts +1 -0
  274. package/dist/umd/esm/shared/components/GInlineCenter/GInlineCenter.d.ts +10 -0
  275. package/dist/umd/esm/shared/components/GInlineCenter/index.d.ts +1 -0
  276. package/dist/umd/esm/shared/components/GMockDataTooltip/GMockDataTooltip.d.ts +12 -0
  277. package/dist/umd/esm/shared/components/GMockDataTooltip/index.d.ts +1 -0
  278. package/dist/umd/esm/shared/components/GModal/GModal.d.ts +14 -0
  279. package/dist/umd/esm/shared/components/GModal/index.d.ts +1 -0
  280. package/dist/umd/esm/shared/components/GPagination/GPagination.d.ts +13 -0
  281. package/dist/umd/esm/shared/components/GPagination/hooks/useGPagination.d.ts +14 -0
  282. package/dist/umd/esm/shared/components/GPagination/index.d.ts +2 -0
  283. package/dist/umd/esm/shared/components/GSpinner/GSpinner.d.ts +5 -0
  284. package/dist/umd/esm/shared/components/GSpinner/index.d.ts +1 -0
  285. package/dist/umd/esm/shared/components/GTextTooltip/GTextTooltip.d.ts +6 -0
  286. package/dist/umd/esm/shared/components/GTextTooltip/index.d.ts +1 -0
  287. package/dist/umd/esm/shared/components/GTextTruncated/GTextTruncated.d.ts +9 -0
  288. package/dist/umd/esm/shared/components/GTextTruncated/index.d.ts +1 -0
  289. package/dist/umd/esm/shared/components/GTooltip/components/GTooltipCard.d.ts +37 -0
  290. package/dist/umd/esm/shared/components/GTooltip/index.d.ts +1 -0
  291. package/dist/umd/esm/shared/components/GVariantBadge/GVariant.d.ts +7 -0
  292. package/dist/umd/esm/shared/components/GVariantBadge/GVariantBadge.d.ts +25 -0
  293. package/dist/umd/esm/shared/components/GVariantBadge/index.d.ts +3 -0
  294. package/dist/umd/esm/shared/components/GVariantBadge/types.d.ts +18 -0
  295. package/dist/umd/esm/shared/components/index.d.ts +9 -1
  296. package/dist/umd/esm/shared/journey/common/JourneyContainer/components/JourneyContainer.d.ts +10 -0
  297. package/dist/umd/esm/shared/journey/common/JourneyContainer/components/JourneyTimeline.d.ts +1 -0
  298. package/dist/umd/esm/shared/journey/common/JourneyContainer/components/index.d.ts +2 -0
  299. package/dist/umd/esm/shared/journey/common/JourneyContainer/index.d.ts +1 -0
  300. package/dist/umd/esm/shared/journey/common/index.d.ts +1 -0
  301. package/dist/umd/esm/shared/journey/index.d.ts +2 -0
  302. package/dist/umd/esm/shared/journey/ui/JourneyEvents/components/AcceptedPostPurchaseOffer/AcceptedPostPurchaseOffer.d.ts +10 -0
  303. package/dist/umd/esm/shared/journey/ui/JourneyEvents/components/AcceptedPostPurchaseOffer/index.d.ts +1 -0
  304. package/dist/umd/esm/shared/journey/ui/JourneyEvents/components/CheckoutCompleted/CheckoutCompleted.d.ts +9 -0
  305. package/dist/umd/esm/shared/journey/ui/JourneyEvents/components/CheckoutCompleted/index.d.ts +1 -0
  306. package/dist/umd/esm/shared/journey/ui/JourneyEvents/components/CheckoutItems.d.ts +6 -0
  307. package/dist/umd/esm/shared/journey/ui/JourneyEvents/components/CheckoutStarted/CheckoutStarted.d.ts +10 -0
  308. package/dist/umd/esm/shared/journey/ui/JourneyEvents/components/CheckoutStarted/CheckoutStartedDetail.d.ts +8 -0
  309. package/dist/umd/esm/shared/journey/ui/JourneyEvents/components/CheckoutStarted/index.d.ts +2 -0
  310. package/dist/umd/esm/shared/journey/ui/JourneyEvents/components/PageViewed/PageViewed.d.ts +9 -0
  311. package/dist/umd/esm/shared/journey/ui/JourneyEvents/components/PageViewed/index.d.ts +1 -0
  312. package/dist/umd/esm/shared/journey/ui/JourneyEvents/components/ProductAddedToCart/ProductAddedToCart.d.ts +10 -0
  313. package/dist/umd/esm/shared/journey/ui/JourneyEvents/components/ProductAddedToCart/index.d.ts +1 -0
  314. package/dist/umd/esm/shared/journey/ui/JourneyEvents/components/ProductQuantity/ProductQuantity.d.ts +6 -0
  315. package/dist/umd/esm/shared/journey/ui/JourneyEvents/components/ProductQuantity/index.d.ts +1 -0
  316. package/dist/umd/esm/shared/journey/ui/JourneyEvents/components/ProductRemovedFromCart/ProductRemovedFromCart.d.ts +10 -0
  317. package/dist/umd/esm/shared/journey/ui/JourneyEvents/components/ProductRemovedFromCart/index.d.ts +1 -0
  318. package/dist/umd/esm/shared/journey/ui/JourneyEvents/components/index.d.ts +6 -0
  319. package/dist/umd/esm/shared/journey/ui/JourneyEvents/constants/event.d.ts +13 -0
  320. package/dist/umd/esm/shared/journey/ui/JourneyEvents/constants/index.d.ts +1 -0
  321. package/dist/umd/esm/shared/journey/ui/JourneyEvents/index.d.ts +2 -0
  322. package/dist/umd/esm/shared/journey/ui/JourneyEvents/types.d.ts +2 -0
  323. package/dist/umd/esm/shared/journey/ui/JourneyGroup/JourneyGroup.d.ts +7 -0
  324. package/dist/umd/esm/shared/journey/ui/JourneyGroup/index.d.ts +1 -0
  325. package/dist/umd/esm/shared/journey/ui/JourneyItem/components/EventMarkerIcon.d.ts +2 -0
  326. package/dist/umd/esm/shared/journey/ui/JourneyItem/components/JourneyDetail.d.ts +5 -0
  327. package/dist/umd/esm/shared/journey/ui/JourneyItem/components/JourneyItem.d.ts +9 -0
  328. package/dist/umd/esm/shared/journey/ui/JourneyItem/components/JourneyTime.d.ts +9 -0
  329. package/dist/umd/esm/shared/journey/ui/JourneyItem/components/QuantityWrapper.d.ts +5 -0
  330. package/dist/umd/esm/shared/journey/ui/JourneyItem/components/index.d.ts +3 -0
  331. package/dist/umd/esm/shared/journey/ui/JourneyItem/index.d.ts +2 -0
  332. package/dist/umd/esm/shared/journey/ui/JourneyItem/types/events.d.ts +18 -0
  333. package/dist/umd/esm/shared/journey/ui/JourneyItem/types/index.d.ts +1 -0
  334. package/dist/umd/esm/shared/journey/ui/JourneyTitle/components/JourneyDateBadge.d.ts +5 -0
  335. package/dist/umd/esm/shared/journey/ui/JourneyTitle/components/JourneyIdBadge.d.ts +6 -0
  336. package/dist/umd/esm/shared/journey/ui/JourneyTitle/components/JourneyLoadMore.d.ts +6 -0
  337. package/dist/umd/esm/shared/journey/ui/JourneyTitle/components/JourneyTitle.d.ts +9 -0
  338. package/dist/umd/esm/shared/journey/ui/JourneyTitle/components/index.d.ts +1 -0
  339. package/dist/umd/esm/shared/journey/ui/JourneyTitle/index.d.ts +1 -0
  340. package/dist/umd/esm/shared/journey/ui/index.d.ts +3 -0
  341. package/dist/umd/esm/shared/journey/ui/type.d.ts +2 -0
  342. package/dist/umd/esm/shared/reports/common/Visualization/constants/columns.d.ts +5 -0
  343. package/dist/umd/esm/shared/reports/common/Visualization/constants/index.d.ts +2 -0
  344. package/dist/umd/esm/shared/reports/common/Visualization/constants/version.d.ts +6 -0
  345. package/dist/umd/esm/shared/reports/common/Visualization/index.d.ts +2 -0
  346. package/dist/umd/esm/shared/reports/common/Visualization/types/chart.d.ts +5 -0
  347. package/dist/umd/esm/shared/reports/common/Visualization/types/index.d.ts +3 -0
  348. package/dist/umd/esm/shared/reports/common/Visualization/types/report-metric.d.ts +21 -0
  349. package/dist/umd/esm/shared/reports/common/Visualization/types/report.d.ts +36 -0
  350. package/dist/umd/esm/shared/reports/common/Visualization/utils/index.d.ts +2 -0
  351. package/dist/umd/esm/shared/reports/common/Visualization/utils/version.d.ts +2 -0
  352. package/dist/umd/esm/shared/reports/common/Visualization/utils/visualization.d.ts +12 -0
  353. package/dist/umd/esm/shared/reports/common/index.d.ts +1 -0
  354. package/dist/umd/esm/shared/reports/ui/ReportTable/ReportTable.d.ts +34 -0
  355. package/dist/umd/esm/shared/reports/ui/ReportTable/ReportTableSkeleton.d.ts +8 -0
  356. package/dist/umd/esm/shared/reports/ui/ReportTable/components/Body/Cell/CampaignsCell/CampaignsCell.d.ts +3 -0
  357. package/dist/umd/esm/shared/reports/ui/ReportTable/components/Body/Cell/CampaignsCell/CampaignsCellVersion.d.ts +5 -0
  358. package/dist/umd/esm/shared/reports/ui/ReportTable/components/Body/Cell/CampaignsCell/index.d.ts +1 -0
  359. package/dist/umd/esm/shared/reports/ui/ReportTable/components/Body/Cell/Cell.d.ts +18 -0
  360. package/dist/umd/esm/shared/reports/ui/ReportTable/components/Body/Cell/CellRenderers.d.ts +2 -0
  361. package/dist/umd/esm/shared/reports/ui/ReportTable/components/Body/Cell/DateCell.d.ts +2 -0
  362. package/dist/umd/esm/shared/reports/ui/ReportTable/components/Body/Cell/DefaultCell.d.ts +2 -0
  363. package/dist/umd/esm/shared/reports/ui/ReportTable/components/Body/Cell/ItemsCell/CheckoutStartedDetail.d.ts +8 -0
  364. package/dist/umd/esm/shared/reports/ui/ReportTable/components/Body/Cell/ItemsCell/ItemsCell.d.ts +12 -0
  365. package/dist/umd/esm/shared/reports/ui/ReportTable/components/Body/Cell/ItemsCell/index.d.ts +1 -0
  366. package/dist/umd/esm/shared/reports/ui/ReportTable/components/Body/Cell/NoneCell.d.ts +2 -0
  367. package/dist/umd/esm/shared/reports/ui/ReportTable/components/Body/Cell/OrderCell/LoadingData.d.ts +1 -0
  368. package/dist/umd/esm/shared/reports/ui/ReportTable/components/Body/Cell/OrderCell/NoData.d.ts +1 -0
  369. package/dist/umd/esm/shared/reports/ui/ReportTable/components/Body/Cell/OrderCell/OrderCell.d.ts +6 -0
  370. package/dist/umd/esm/shared/reports/ui/ReportTable/components/Body/Cell/OrderCell/OrderCellBase.d.ts +13 -0
  371. package/dist/umd/esm/shared/reports/ui/ReportTable/components/Body/Cell/OrderCell/OrderCellContainer.d.ts +3 -0
  372. package/dist/umd/esm/shared/reports/ui/ReportTable/components/Body/Cell/OrderCell/OrderItem.d.ts +10 -0
  373. package/dist/umd/esm/shared/reports/ui/ReportTable/components/Body/Cell/OrderCell/index.d.ts +2 -0
  374. package/dist/umd/esm/shared/reports/ui/ReportTable/components/Body/Cell/OrderIdCell.d.ts +2 -0
  375. package/dist/umd/esm/shared/reports/ui/ReportTable/components/Body/Cell/PreviousCell.d.ts +7 -0
  376. package/dist/umd/esm/shared/reports/ui/ReportTable/components/Body/Cell/TotalCell.d.ts +7 -0
  377. package/dist/umd/esm/shared/reports/ui/ReportTable/components/Body/Cell/VersionCell.d.ts +11 -0
  378. package/dist/umd/esm/shared/reports/ui/ReportTable/components/Body/Cell/WrapperCell.d.ts +10 -0
  379. package/dist/umd/esm/shared/reports/ui/ReportTable/components/Body/Cell/index.d.ts +1 -0
  380. package/dist/umd/esm/shared/reports/ui/ReportTable/components/Body/Cell/type.d.ts +16 -0
  381. package/dist/umd/esm/shared/reports/ui/ReportTable/components/Body/Row.d.ts +16 -0
  382. package/dist/umd/esm/shared/reports/ui/ReportTable/components/Body/index.d.ts +2 -0
  383. package/dist/umd/esm/shared/reports/ui/ReportTable/components/Footer/Pagination.d.ts +12 -0
  384. package/dist/umd/esm/shared/reports/ui/ReportTable/components/Footer/ScrollBar.d.ts +3 -0
  385. package/dist/umd/esm/shared/reports/ui/ReportTable/components/Footer/WrapperFooter.d.ts +12 -0
  386. package/dist/umd/esm/shared/reports/ui/ReportTable/components/Footer/index.d.ts +1 -0
  387. package/dist/umd/esm/shared/reports/ui/ReportTable/components/Header/Header.d.ts +12 -0
  388. package/dist/umd/esm/shared/reports/ui/ReportTable/components/Header/SortableHeader.d.ts +10 -0
  389. package/dist/umd/esm/shared/reports/ui/ReportTable/components/Header/SortableHeaderWithTooltip.d.ts +9 -0
  390. package/dist/umd/esm/shared/reports/ui/ReportTable/components/Header/SummaryCell.d.ts +10 -0
  391. package/dist/umd/esm/shared/reports/ui/ReportTable/components/Header/SummaryRow.d.ts +12 -0
  392. package/dist/umd/esm/shared/reports/ui/ReportTable/components/Header/WrapperHeader.d.ts +21 -0
  393. package/dist/umd/esm/shared/reports/ui/ReportTable/components/Header/index.d.ts +1 -0
  394. package/dist/umd/esm/shared/reports/ui/ReportTable/components/index.d.ts +2 -0
  395. package/dist/umd/esm/shared/reports/ui/ReportTable/constants/index.d.ts +2 -0
  396. package/dist/umd/esm/shared/reports/ui/ReportTable/constants/order.d.ts +9 -0
  397. package/dist/umd/esm/shared/reports/ui/ReportTable/constants/table.d.ts +4 -0
  398. package/dist/umd/esm/shared/reports/ui/ReportTable/context/ReportTableActionsContext.d.ts +11 -0
  399. package/dist/umd/esm/shared/reports/ui/ReportTable/helpers/format.d.ts +1 -0
  400. package/dist/umd/esm/shared/reports/ui/ReportTable/helpers/index.d.ts +2 -0
  401. package/dist/umd/esm/shared/reports/ui/ReportTable/helpers/report.d.ts +2 -0
  402. package/dist/umd/esm/shared/reports/ui/ReportTable/hooks/index.d.ts +3 -0
  403. package/dist/umd/esm/shared/reports/ui/ReportTable/hooks/useReportTable.d.ts +12 -0
  404. package/dist/umd/esm/shared/reports/ui/ReportTable/hooks/useReportTableCell.d.ts +8 -0
  405. package/dist/umd/esm/shared/reports/ui/ReportTable/hooks/useSyncedScroll.d.ts +12 -0
  406. package/dist/umd/esm/shared/reports/ui/ReportTable/index.d.ts +3 -0
  407. package/dist/umd/esm/shared/reports/ui/ReportTable/types/dimension.d.ts +8 -0
  408. package/dist/umd/esm/shared/reports/ui/ReportTable/types/index.d.ts +38 -0
  409. package/dist/umd/esm/shared/reports/ui/ReportTable/types/order.d.ts +14 -0
  410. package/dist/umd/esm/shared/reports/ui/ReportTable/types/report-columns.d.ts +10 -0
  411. package/dist/umd/esm/shared/reports/ui/ReportTable/utils/format.d.ts +8 -0
  412. package/dist/umd/esm/shared/reports/ui/ReportTable/utils/index.d.ts +2 -0
  413. package/dist/umd/esm/shared/reports/ui/ReportTable/utils/order.d.ts +2 -0
  414. package/dist/umd/esm/shared/reports/ui/ReportTable/utils/table.d.ts +3 -0
  415. package/dist/umd/esm/shared/reports/ui/ReportTable/utils/visualization.d.ts +11 -0
  416. package/dist/umd/esm/types/campaign.d.ts +9 -0
  417. package/dist/umd/esm/types/index.d.ts +1 -0
  418. package/dist/umd/esm/utils/array.d.ts +1 -0
  419. package/dist/umd/esm/utils/date-time.d.ts +1 -0
  420. package/dist/umd/esm/utils/index.d.ts +4 -0
  421. package/dist/umd/esm/utils/is-browser.d.ts +1 -0
  422. package/dist/umd/esm/utils/sort.d.ts +1 -0
  423. package/dist/umd/esm/utils/string.d.ts +3 -0
  424. package/dist/umd/gemxql.js +1 -1
  425. package/dist/umd/index.js +1 -1
  426. package/dist/umd/types.js +1 -1
  427. package/package.json +6 -1
@@ -4,8 +4,9 @@ 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
+ import '@shopify/polaris';
9
10
 
10
11
  const NONE_VALUE = 'None';
11
12
  const PLACEHOLDER_VALUE = '-';
@@ -176,6 +177,8 @@ const CLAUSE_KEYWORD_BOUNDARY = CLAUSE_KEYWORDS.join('|');
176
177
  const DEFAULT_QUERY_LIMIT = 1000;
177
178
 
178
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, "''")}'`;
179
182
  const joinFieldClauses = (parts, groupOperator = DEFAULT_GROUP_OPERATOR) => {
180
183
  if (!parts.length)
181
184
  return '';
@@ -186,18 +189,18 @@ const joinFieldClauses = (parts, groupOperator = DEFAULT_GROUP_OPERATOR) => {
186
189
  const buildEq = ({ fields, value, groupOperator }) => {
187
190
  if (!fields.length)
188
191
  return '';
189
- return joinFieldClauses(fields.map((field) => `${field} = ${value}`), groupOperator);
192
+ return joinFieldClauses(fields.map((field) => `${field} = ${quoteValue(value)}`), groupOperator);
190
193
  };
191
194
  const buildIn = ({ fields, values, groupOperator }) => {
192
195
  if (!fields.length || !values.length)
193
196
  return '';
194
- return joinFieldClauses(fields.map((field) => `${field} IN (${values.join(', ')})`), groupOperator);
197
+ return joinFieldClauses(fields.map((field) => `${field} IN (${values.map(quoteValue).join(', ')})`), groupOperator);
195
198
  };
196
199
  const buildLike = ({ fields, value, groupOperator }) => {
197
200
  const trimmed = value.trim();
198
201
  if (!trimmed || !fields.length)
199
202
  return '';
200
- return joinFieldClauses(fields.map((field) => `${field} LIKE '%${trimmed}%'`), groupOperator);
203
+ return joinFieldClauses(fields.map((field) => `${field} LIKE '%${trimmed.replace(/'/g, "''")}%'`), groupOperator);
201
204
  };
202
205
  const buildExtraCondition = (condition) => {
203
206
  switch (condition.operator) {
@@ -259,13 +262,14 @@ const filterConfigs = [
259
262
  multiField: EFilterField.GROUP_CAMPAIGN,
260
263
  },
261
264
  ];
265
+ const quoteStr = (v) => `'${v.replace(/'/g, "''")}'`;
262
266
  const buildCondition = (data) => {
263
267
  const { operatorValue, singleValue, multiValue, fieldName } = data;
264
268
  if (operatorValue === OPERATOR_IS && singleValue) {
265
- return `${fieldName} = ${singleValue}`;
269
+ return `${fieldName} = ${quoteStr(singleValue)}`;
266
270
  }
267
271
  else if (operatorValue === OPERATOR_IS_ONE_OF && Array.isArray(multiValue) && multiValue.length > 0) {
268
- return `${fieldName} IN (${multiValue.join(', ')})`;
272
+ return `${fieldName} IN (${multiValue.map(quoteStr).join(', ')})`;
269
273
  }
270
274
  return '';
271
275
  };
@@ -275,7 +279,9 @@ const buildOverrideFilterConditions = (overrideFilters) => {
275
279
  return Object.fromEntries(Object.entries(overrideFilters)
276
280
  .filter(([, value]) => value !== undefined)
277
281
  .map(([key, value]) => {
278
- 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))}`;
279
285
  return [key, condition];
280
286
  }));
281
287
  };
@@ -320,7 +326,7 @@ const buildVersionIdCondition = (versionIds) => {
320
326
  Object.entries(versionIds).forEach(([key, value]) => {
321
327
  if (!value)
322
328
  return;
323
- conditions.push(`${key} = ${value}`);
329
+ conditions.push(`${key} = ${quoteStr(value)}`);
324
330
  });
325
331
  return conditions;
326
332
  };
@@ -345,13 +351,14 @@ const parse$b = (query) => {
345
351
  const conditions = (match[1] ?? '').trim().split(/\s+AND\s+/i);
346
352
  const filters = {};
347
353
  const versionIds = {};
354
+ const unquoteStr = (v) => v.replace(/^'(.*)'$/s, '$1').replace(/''/g, "'");
348
355
  conditions.forEach((condition) => {
349
356
  const trimmed = condition.trim();
350
357
  const inMatch = trimmed.match(/^(\S+)\s+IN\s+\((.+)\)$/i);
351
358
  if (inMatch) {
352
359
  const field = inMatch[1] ?? '';
353
360
  const valuesStr = inMatch[2] ?? '';
354
- const values = valuesStr.split(',').map((v) => v.trim());
361
+ const values = valuesStr.split(',').map((v) => unquoteStr(v.trim()));
355
362
  const config = filterConfigs.find((c) => c.fieldName === field || c.multiField === field);
356
363
  if (config?.operator) {
357
364
  filters[config.multiField] = values;
@@ -362,7 +369,7 @@ const parse$b = (query) => {
362
369
  const eqMatch = trimmed.match(/^(\S+)\s+=\s+(.+)$/);
363
370
  if (eqMatch) {
364
371
  const field = eqMatch[1] ?? '';
365
- const value = eqMatch[2] ?? '';
372
+ const value = unquoteStr(eqMatch[2] ?? '');
366
373
  const config = filterConfigs.find((c) => c.fieldName === field || c.singleField === field);
367
374
  if (config) {
368
375
  filters[config.singleField] = value;
@@ -382,7 +389,7 @@ const parse$b = (query) => {
382
389
 
383
390
  const build$9 = (sources) => `FROM ${sources.join(', ')}`;
384
391
  const parse$a = (query) => {
385
- 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'));
386
393
  if (!match)
387
394
  return [];
388
395
  return (match[1] ?? '')
@@ -393,27 +400,30 @@ const parse$a = (query) => {
393
400
 
394
401
  const build$8 = (dimensions, withClause = EGroupWithClause.ALL) => dimensions.length === 0 ? '' : `GROUP BY ${dimensions.join(', ')} ${withClause}`;
395
402
  const parse$9 = (query) => {
396
- 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'));
397
404
  if (!match)
398
405
  return { dimensions: [] };
399
- const content = (match[1] ?? '').trim();
400
- const withIdx = content.toUpperCase().indexOf(' WITH ');
401
- if (withIdx === -1) {
402
- return {
403
- dimensions: content
404
- .split(',')
405
- .map((s) => s.trim())
406
- .filter(Boolean),
407
- groupWithClause: EGroupWithClause.NONE,
408
- };
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
+ }
409
420
  }
410
421
  return {
411
422
  dimensions: content
412
- .slice(0, withIdx)
413
423
  .split(',')
414
424
  .map((s) => s.trim())
415
425
  .filter(Boolean),
416
- groupWithClause: content.slice(withIdx + 1).trim(),
426
+ groupWithClause,
417
427
  };
418
428
  };
419
429
 
@@ -471,7 +481,7 @@ const parse$5 = (query) => {
471
481
 
472
482
  const build$3 = (metrics) => `SHOW ${metrics.join(', ')}`;
473
483
  const parse$4 = (query) => {
474
- 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'));
475
485
  if (!match)
476
486
  return [];
477
487
  return (match[1] ?? '')
@@ -523,11 +533,15 @@ const calcPercentageString = (part, total, decimals = 2) => {
523
533
  dayjs.extend(utc);
524
534
  dayjs.extend(timezone);
525
535
  dayjs.extend(quarterOfYear);
526
- 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__';
527
540
  function getInitialTimezone() {
528
- return tz;
541
+ return globalThis[TZ_GLOBAL_KEY] ?? 'UTC';
529
542
  }
530
543
  const dayjsTz = (date) => {
544
+ const tz = getInitialTimezone();
531
545
  if (!date)
532
546
  return dayjs().tz(tz);
533
547
  return dayjs(date).tz(tz);
@@ -903,7 +917,13 @@ const parsePageItems = (value) => parseJsonObject(value);
903
917
 
904
918
  const readNumeric = (metric, key) => {
905
919
  const raw = metric?.[key];
906
- 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;
907
927
  };
908
928
  const createNumericRowReader = (row, mode = ERowReaderMode.DEFAULT) => (key) => {
909
929
  const { prefix, suffix } = ROW_READER_MODE_CONFIG[mode];
@@ -1156,6 +1176,20 @@ var IShopPlanState;
1156
1176
  IShopPlanState["ACTIVE_FUNNEL_OPT_AND_TRIAL_FUNNEL_OPT"] = "ACTIVE_FUNNEL_OPT_AND_TRIAL_FUNNEL_OPT";
1157
1177
  })(IShopPlanState || (IShopPlanState = {}));
1158
1178
 
1179
+ var ICampaignType;
1180
+ (function (ICampaignType) {
1181
+ // CONTENT = 'CONTENT',
1182
+ ICampaignType["PRICE"] = "PRICE";
1183
+ ICampaignType["TEMPLATE"] = "TEMPLATE";
1184
+ ICampaignType["TEMPLATE_BUNDLE"] = "TEMPLATE_BUNDLE";
1185
+ // THEME = 'THEME',
1186
+ })(ICampaignType || (ICampaignType = {}));
1187
+ var IVariantType;
1188
+ (function (IVariantType) {
1189
+ IVariantType["VARIANT_A"] = "A";
1190
+ IVariantType["VARIANT_B"] = "B";
1191
+ })(IVariantType || (IVariantType = {}));
1192
+
1159
1193
  [
1160
1194
  { value: EVisitorType.NEW, label: 'New' },
1161
1195
  { value: EVisitorType.RETURNING, label: 'Returning' },
@@ -1215,12 +1249,24 @@ const useAnalyticData = ({ getTextPrice: getTextPriceParam, } = {}) => {
1215
1249
  var GPaginationDirection;
1216
1250
  (function (GPaginationDirection) {
1217
1251
  GPaginationDirection["NEXT"] = "NEXT";
1218
- GPaginationDirection["PREV"] = "PREV";
1252
+ GPaginationDirection["PREVIOUS"] = "PREVIOUS";
1219
1253
  })(GPaginationDirection || (GPaginationDirection = {}));
1254
+
1220
1255
  const useGemXQlPagination = ({ resetKey, itemsPerPage, }) => {
1221
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]);
1222
1268
  const previousResetKeyRef = useRef();
1223
- const shouldResetPagination = currentPage > 1 && previousResetKeyRef.current !== undefined && previousResetKeyRef.current !== resetKey;
1269
+ const shouldResetPagination = currentPage > 1 && previousResetKeyRef.current !== undefined && previousResetKeyRef.current !== serializedResetKey;
1224
1270
  const effectivePage = shouldResetPagination ? 1 : currentPage;
1225
1271
  const offset = (effectivePage - 1) * itemsPerPage;
1226
1272
  const handlePageChange = useCallback((totalPages) => (direction) => {
@@ -1231,11 +1277,11 @@ const useGemXQlPagination = ({ resetKey, itemsPerPage, }) => {
1231
1277
  });
1232
1278
  }, []);
1233
1279
  useEffect(() => {
1234
- if (previousResetKeyRef.current !== resetKey) {
1235
- previousResetKeyRef.current = resetKey;
1280
+ if (previousResetKeyRef.current !== serializedResetKey) {
1281
+ previousResetKeyRef.current = serializedResetKey;
1236
1282
  setCurrentPage(1);
1237
1283
  }
1238
- }, [resetKey]);
1284
+ }, [serializedResetKey]);
1239
1285
  const buildPagination = useCallback(({ totalRecords, isLoading }) => {
1240
1286
  const totalPages = Math.max(1, Math.ceil(totalRecords / itemsPerPage));
1241
1287
  return {
@@ -4,8 +4,9 @@ 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
+ import '@shopify/polaris';
9
10
 
10
11
  const NONE_VALUE = 'None';
11
12
  const PLACEHOLDER_VALUE = '-';
@@ -176,6 +177,8 @@ const CLAUSE_KEYWORD_BOUNDARY = CLAUSE_KEYWORDS.join('|');
176
177
  const DEFAULT_QUERY_LIMIT = 1000;
177
178
 
178
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, "''")}'`;
179
182
  const joinFieldClauses = (parts, groupOperator = DEFAULT_GROUP_OPERATOR) => {
180
183
  if (!parts.length)
181
184
  return '';
@@ -186,18 +189,18 @@ const joinFieldClauses = (parts, groupOperator = DEFAULT_GROUP_OPERATOR) => {
186
189
  const buildEq = ({ fields, value, groupOperator }) => {
187
190
  if (!fields.length)
188
191
  return '';
189
- return joinFieldClauses(fields.map((field) => `${field} = ${value}`), groupOperator);
192
+ return joinFieldClauses(fields.map((field) => `${field} = ${quoteValue(value)}`), groupOperator);
190
193
  };
191
194
  const buildIn = ({ fields, values, groupOperator }) => {
192
195
  if (!fields.length || !values.length)
193
196
  return '';
194
- return joinFieldClauses(fields.map((field) => `${field} IN (${values.join(', ')})`), groupOperator);
197
+ return joinFieldClauses(fields.map((field) => `${field} IN (${values.map(quoteValue).join(', ')})`), groupOperator);
195
198
  };
196
199
  const buildLike = ({ fields, value, groupOperator }) => {
197
200
  const trimmed = value.trim();
198
201
  if (!trimmed || !fields.length)
199
202
  return '';
200
- return joinFieldClauses(fields.map((field) => `${field} LIKE '%${trimmed}%'`), groupOperator);
203
+ return joinFieldClauses(fields.map((field) => `${field} LIKE '%${trimmed.replace(/'/g, "''")}%'`), groupOperator);
201
204
  };
202
205
  const buildExtraCondition = (condition) => {
203
206
  switch (condition.operator) {
@@ -259,13 +262,14 @@ const filterConfigs = [
259
262
  multiField: EFilterField.GROUP_CAMPAIGN,
260
263
  },
261
264
  ];
265
+ const quoteStr = (v) => `'${v.replace(/'/g, "''")}'`;
262
266
  const buildCondition = (data) => {
263
267
  const { operatorValue, singleValue, multiValue, fieldName } = data;
264
268
  if (operatorValue === OPERATOR_IS && singleValue) {
265
- return `${fieldName} = ${singleValue}`;
269
+ return `${fieldName} = ${quoteStr(singleValue)}`;
266
270
  }
267
271
  else if (operatorValue === OPERATOR_IS_ONE_OF && Array.isArray(multiValue) && multiValue.length > 0) {
268
- return `${fieldName} IN (${multiValue.join(', ')})`;
272
+ return `${fieldName} IN (${multiValue.map(quoteStr).join(', ')})`;
269
273
  }
270
274
  return '';
271
275
  };
@@ -275,7 +279,9 @@ const buildOverrideFilterConditions = (overrideFilters) => {
275
279
  return Object.fromEntries(Object.entries(overrideFilters)
276
280
  .filter(([, value]) => value !== undefined)
277
281
  .map(([key, value]) => {
278
- 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))}`;
279
285
  return [key, condition];
280
286
  }));
281
287
  };
@@ -320,7 +326,7 @@ const buildVersionIdCondition = (versionIds) => {
320
326
  Object.entries(versionIds).forEach(([key, value]) => {
321
327
  if (!value)
322
328
  return;
323
- conditions.push(`${key} = ${value}`);
329
+ conditions.push(`${key} = ${quoteStr(value)}`);
324
330
  });
325
331
  return conditions;
326
332
  };
@@ -345,13 +351,14 @@ const parse$b = (query) => {
345
351
  const conditions = (match[1] ?? '').trim().split(/\s+AND\s+/i);
346
352
  const filters = {};
347
353
  const versionIds = {};
354
+ const unquoteStr = (v) => v.replace(/^'(.*)'$/s, '$1').replace(/''/g, "'");
348
355
  conditions.forEach((condition) => {
349
356
  const trimmed = condition.trim();
350
357
  const inMatch = trimmed.match(/^(\S+)\s+IN\s+\((.+)\)$/i);
351
358
  if (inMatch) {
352
359
  const field = inMatch[1] ?? '';
353
360
  const valuesStr = inMatch[2] ?? '';
354
- const values = valuesStr.split(',').map((v) => v.trim());
361
+ const values = valuesStr.split(',').map((v) => unquoteStr(v.trim()));
355
362
  const config = filterConfigs.find((c) => c.fieldName === field || c.multiField === field);
356
363
  if (config?.operator) {
357
364
  filters[config.multiField] = values;
@@ -362,7 +369,7 @@ const parse$b = (query) => {
362
369
  const eqMatch = trimmed.match(/^(\S+)\s+=\s+(.+)$/);
363
370
  if (eqMatch) {
364
371
  const field = eqMatch[1] ?? '';
365
- const value = eqMatch[2] ?? '';
372
+ const value = unquoteStr(eqMatch[2] ?? '');
366
373
  const config = filterConfigs.find((c) => c.fieldName === field || c.singleField === field);
367
374
  if (config) {
368
375
  filters[config.singleField] = value;
@@ -382,7 +389,7 @@ const parse$b = (query) => {
382
389
 
383
390
  const build$9 = (sources) => `FROM ${sources.join(', ')}`;
384
391
  const parse$a = (query) => {
385
- 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'));
386
393
  if (!match)
387
394
  return [];
388
395
  return (match[1] ?? '')
@@ -393,27 +400,30 @@ const parse$a = (query) => {
393
400
 
394
401
  const build$8 = (dimensions, withClause = EGroupWithClause.ALL) => dimensions.length === 0 ? '' : `GROUP BY ${dimensions.join(', ')} ${withClause}`;
395
402
  const parse$9 = (query) => {
396
- 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'));
397
404
  if (!match)
398
405
  return { dimensions: [] };
399
- const content = (match[1] ?? '').trim();
400
- const withIdx = content.toUpperCase().indexOf(' WITH ');
401
- if (withIdx === -1) {
402
- return {
403
- dimensions: content
404
- .split(',')
405
- .map((s) => s.trim())
406
- .filter(Boolean),
407
- groupWithClause: EGroupWithClause.NONE,
408
- };
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
+ }
409
420
  }
410
421
  return {
411
422
  dimensions: content
412
- .slice(0, withIdx)
413
423
  .split(',')
414
424
  .map((s) => s.trim())
415
425
  .filter(Boolean),
416
- groupWithClause: content.slice(withIdx + 1).trim(),
426
+ groupWithClause,
417
427
  };
418
428
  };
419
429
 
@@ -471,7 +481,7 @@ const parse$5 = (query) => {
471
481
 
472
482
  const build$3 = (metrics) => `SHOW ${metrics.join(', ')}`;
473
483
  const parse$4 = (query) => {
474
- 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'));
475
485
  if (!match)
476
486
  return [];
477
487
  return (match[1] ?? '')
@@ -523,11 +533,15 @@ const calcPercentageString = (part, total, decimals = 2) => {
523
533
  dayjs.extend(utc);
524
534
  dayjs.extend(timezone);
525
535
  dayjs.extend(quarterOfYear);
526
- 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__';
527
540
  function getInitialTimezone() {
528
- return tz;
541
+ return globalThis[TZ_GLOBAL_KEY] ?? 'UTC';
529
542
  }
530
543
  const dayjsTz = (date) => {
544
+ const tz = getInitialTimezone();
531
545
  if (!date)
532
546
  return dayjs().tz(tz);
533
547
  return dayjs(date).tz(tz);
@@ -903,7 +917,13 @@ const parsePageItems = (value) => parseJsonObject(value);
903
917
 
904
918
  const readNumeric = (metric, key) => {
905
919
  const raw = metric?.[key];
906
- 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;
907
927
  };
908
928
  const createNumericRowReader = (row, mode = ERowReaderMode.DEFAULT) => (key) => {
909
929
  const { prefix, suffix } = ROW_READER_MODE_CONFIG[mode];
@@ -1156,6 +1176,20 @@ var IShopPlanState;
1156
1176
  IShopPlanState["ACTIVE_FUNNEL_OPT_AND_TRIAL_FUNNEL_OPT"] = "ACTIVE_FUNNEL_OPT_AND_TRIAL_FUNNEL_OPT";
1157
1177
  })(IShopPlanState || (IShopPlanState = {}));
1158
1178
 
1179
+ var ICampaignType;
1180
+ (function (ICampaignType) {
1181
+ // CONTENT = 'CONTENT',
1182
+ ICampaignType["PRICE"] = "PRICE";
1183
+ ICampaignType["TEMPLATE"] = "TEMPLATE";
1184
+ ICampaignType["TEMPLATE_BUNDLE"] = "TEMPLATE_BUNDLE";
1185
+ // THEME = 'THEME',
1186
+ })(ICampaignType || (ICampaignType = {}));
1187
+ var IVariantType;
1188
+ (function (IVariantType) {
1189
+ IVariantType["VARIANT_A"] = "A";
1190
+ IVariantType["VARIANT_B"] = "B";
1191
+ })(IVariantType || (IVariantType = {}));
1192
+
1159
1193
  [
1160
1194
  { value: EVisitorType.NEW, label: 'New' },
1161
1195
  { value: EVisitorType.RETURNING, label: 'Returning' },
@@ -1215,12 +1249,24 @@ const useAnalyticData = ({ getTextPrice: getTextPriceParam, } = {}) => {
1215
1249
  var GPaginationDirection;
1216
1250
  (function (GPaginationDirection) {
1217
1251
  GPaginationDirection["NEXT"] = "NEXT";
1218
- GPaginationDirection["PREV"] = "PREV";
1252
+ GPaginationDirection["PREVIOUS"] = "PREVIOUS";
1219
1253
  })(GPaginationDirection || (GPaginationDirection = {}));
1254
+
1220
1255
  const useGemXQlPagination = ({ resetKey, itemsPerPage, }) => {
1221
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]);
1222
1268
  const previousResetKeyRef = useRef();
1223
- const shouldResetPagination = currentPage > 1 && previousResetKeyRef.current !== undefined && previousResetKeyRef.current !== resetKey;
1269
+ const shouldResetPagination = currentPage > 1 && previousResetKeyRef.current !== undefined && previousResetKeyRef.current !== serializedResetKey;
1224
1270
  const effectivePage = shouldResetPagination ? 1 : currentPage;
1225
1271
  const offset = (effectivePage - 1) * itemsPerPage;
1226
1272
  const handlePageChange = useCallback((totalPages) => (direction) => {
@@ -1231,11 +1277,11 @@ const useGemXQlPagination = ({ resetKey, itemsPerPage, }) => {
1231
1277
  });
1232
1278
  }, []);
1233
1279
  useEffect(() => {
1234
- if (previousResetKeyRef.current !== resetKey) {
1235
- previousResetKeyRef.current = resetKey;
1280
+ if (previousResetKeyRef.current !== serializedResetKey) {
1281
+ previousResetKeyRef.current = serializedResetKey;
1236
1282
  setCurrentPage(1);
1237
1283
  }
1238
- }, [resetKey]);
1284
+ }, [serializedResetKey]);
1239
1285
  const buildPagination = useCallback(({ totalRecords, isLoading }) => {
1240
1286
  const totalPages = Math.max(1, Math.ceil(totalRecords / itemsPerPage));
1241
1287
  return {
@@ -4,3 +4,4 @@ export { useFormatLineChartData } from './useFormatLineChartData';
4
4
  export { usePopoverResizeObserver } from './usePopoverResizeObserver';
5
5
  export { useToggle } from './useToggle';
6
6
  export { useWindowSize } from './publish/useWindowSize';
7
+ export { usePreventBodyScroll } from './usePreventBodyScroll';
@@ -1 +1,4 @@
1
- export declare const useFetchCurrencyRates: () => void;
1
+ export declare const useFetchCurrencyRates: () => {
2
+ isError: boolean;
3
+ error: Error | null;
4
+ };
@@ -0,0 +1,3 @@
1
+ export declare const usePreventBodyScroll: ({ enable }: {
2
+ enable: boolean;
3
+ }) => void;