@gem-sdk/analytics 0.1.0-staging.2 → 0.1.0-staging.4

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 (155) hide show
  1. package/dist/esm/components/GModalOrderJourney/GModalOrderJourney.d.ts +20 -0
  2. package/dist/esm/components/GModalOrderJourney/components/OrderJourneySkeleton.d.ts +1 -0
  3. package/dist/esm/components/GModalOrderJourney/components/index.d.ts +1 -0
  4. package/dist/esm/components/GModalOrderJourney/context/OrderJourneyContext.d.ts +6 -0
  5. package/dist/esm/components/GModalOrderJourney/context/index.d.ts +1 -0
  6. package/dist/esm/components/GModalOrderJourney/hooks/index.d.ts +1 -0
  7. package/dist/esm/components/GModalOrderJourney/hooks/useGModalOrderJourney.d.ts +7 -0
  8. package/dist/esm/components/GModalOrderJourney/index.d.ts +4 -0
  9. package/dist/esm/components/GModalOrderJourney/types/index.d.ts +4 -0
  10. package/dist/esm/components/GModalOrderJourney/utils/index.d.ts +28 -0
  11. package/dist/esm/components/OrderAnalytic/types/order.d.ts +32 -0
  12. package/dist/esm/components/index.d.ts +1 -0
  13. package/dist/esm/gemxql.js +11 -2
  14. package/dist/esm/gemxql.mjs +11 -2
  15. package/dist/esm/hooks/index.d.ts +1 -0
  16. package/dist/esm/hooks/usePreventBodyScroll.d.ts +3 -0
  17. package/dist/esm/index.js +607 -17
  18. package/dist/esm/index.mjs +607 -17
  19. package/dist/esm/shared/components/GDotInline/GDotInline.d.ts +5 -0
  20. package/dist/esm/shared/components/GDotInline/index.d.ts +1 -0
  21. package/dist/esm/shared/components/GModal/GModal.d.ts +14 -0
  22. package/dist/esm/shared/components/GModal/index.d.ts +1 -0
  23. package/dist/esm/shared/components/GSpinner/GSpinner.d.ts +5 -0
  24. package/dist/esm/shared/components/GSpinner/index.d.ts +1 -0
  25. package/dist/esm/shared/components/index.d.ts +3 -0
  26. package/dist/esm/shared/journey/common/JourneyContainer/components/JourneyContainer.d.ts +10 -0
  27. package/dist/esm/shared/journey/common/JourneyContainer/components/JourneyTimeline.d.ts +1 -0
  28. package/dist/esm/shared/journey/common/JourneyContainer/components/index.d.ts +2 -0
  29. package/dist/esm/shared/journey/common/JourneyContainer/index.d.ts +1 -0
  30. package/dist/esm/shared/journey/common/index.d.ts +1 -0
  31. package/dist/esm/shared/journey/index.d.ts +2 -0
  32. package/dist/esm/shared/journey/ui/JourneyEvents/components/AcceptedPostPurchaseOffer/AcceptedPostPurchaseOffer.d.ts +10 -0
  33. package/dist/esm/shared/journey/ui/JourneyEvents/components/AcceptedPostPurchaseOffer/index.d.ts +1 -0
  34. package/dist/esm/shared/journey/ui/JourneyEvents/components/CheckoutCompleted/CheckoutCompleted.d.ts +9 -0
  35. package/dist/esm/shared/journey/ui/JourneyEvents/components/CheckoutCompleted/index.d.ts +1 -0
  36. package/dist/esm/shared/journey/ui/JourneyEvents/components/CheckoutItems.d.ts +6 -0
  37. package/dist/esm/shared/journey/ui/JourneyEvents/components/CheckoutStarted/CheckoutStarted.d.ts +10 -0
  38. package/dist/esm/shared/journey/ui/JourneyEvents/components/CheckoutStarted/CheckoutStartedDetail.d.ts +8 -0
  39. package/dist/esm/shared/journey/ui/JourneyEvents/components/CheckoutStarted/index.d.ts +2 -0
  40. package/dist/esm/shared/journey/ui/JourneyEvents/components/PageViewed/PageViewed.d.ts +9 -0
  41. package/dist/esm/shared/journey/ui/JourneyEvents/components/PageViewed/index.d.ts +1 -0
  42. package/dist/esm/shared/journey/ui/JourneyEvents/components/ProductAddedToCart/ProductAddedToCart.d.ts +10 -0
  43. package/dist/esm/shared/journey/ui/JourneyEvents/components/ProductAddedToCart/index.d.ts +1 -0
  44. package/dist/esm/shared/journey/ui/JourneyEvents/components/ProductQuantity/ProductQuantity.d.ts +6 -0
  45. package/dist/esm/shared/journey/ui/JourneyEvents/components/ProductQuantity/index.d.ts +1 -0
  46. package/dist/esm/shared/journey/ui/JourneyEvents/components/ProductRemovedFromCart/ProductRemovedFromCart.d.ts +10 -0
  47. package/dist/esm/shared/journey/ui/JourneyEvents/components/ProductRemovedFromCart/index.d.ts +1 -0
  48. package/dist/esm/shared/journey/ui/JourneyEvents/components/index.d.ts +6 -0
  49. package/dist/esm/shared/journey/ui/JourneyEvents/constants/event.d.ts +13 -0
  50. package/dist/esm/shared/journey/ui/JourneyEvents/constants/index.d.ts +1 -0
  51. package/dist/esm/shared/journey/ui/JourneyEvents/index.d.ts +2 -0
  52. package/dist/esm/shared/journey/ui/JourneyEvents/types.d.ts +2 -0
  53. package/dist/esm/shared/journey/ui/JourneyGroup/JourneyGroup.d.ts +7 -0
  54. package/dist/esm/shared/journey/ui/JourneyGroup/index.d.ts +1 -0
  55. package/dist/esm/shared/journey/ui/JourneyItem/components/EventMarkerIcon.d.ts +2 -0
  56. package/dist/esm/shared/journey/ui/JourneyItem/components/JourneyDetail.d.ts +5 -0
  57. package/dist/esm/shared/journey/ui/JourneyItem/components/JourneyItem.d.ts +9 -0
  58. package/dist/esm/shared/journey/ui/JourneyItem/components/JourneyTime.d.ts +9 -0
  59. package/dist/esm/shared/journey/ui/JourneyItem/components/QuantityWrapper.d.ts +5 -0
  60. package/dist/esm/shared/journey/ui/JourneyItem/components/index.d.ts +3 -0
  61. package/dist/esm/shared/journey/ui/JourneyItem/index.d.ts +2 -0
  62. package/dist/esm/shared/journey/ui/JourneyItem/types/events.d.ts +18 -0
  63. package/dist/esm/shared/journey/ui/JourneyItem/types/index.d.ts +1 -0
  64. package/dist/esm/shared/journey/ui/JourneyTitle/components/JourneyDateBadge.d.ts +5 -0
  65. package/dist/esm/shared/journey/ui/JourneyTitle/components/JourneyIdBadge.d.ts +6 -0
  66. package/dist/esm/shared/journey/ui/JourneyTitle/components/JourneyLoadMore.d.ts +6 -0
  67. package/dist/esm/shared/journey/ui/JourneyTitle/components/JourneyTitle.d.ts +9 -0
  68. package/dist/esm/shared/journey/ui/JourneyTitle/components/index.d.ts +1 -0
  69. package/dist/esm/shared/journey/ui/JourneyTitle/index.d.ts +1 -0
  70. package/dist/esm/shared/journey/ui/index.d.ts +3 -0
  71. package/dist/esm/shared/journey/ui/type.d.ts +2 -0
  72. package/dist/esm/types/campaign.d.ts +4 -0
  73. package/dist/esm/types.js +6 -1
  74. package/dist/esm/types.mjs +6 -1
  75. package/dist/esm/utils/array.d.ts +1 -0
  76. package/dist/esm/utils/date-time.d.ts +1 -0
  77. package/dist/esm/utils/index.d.ts +3 -0
  78. package/dist/esm/utils/is-browser.d.ts +1 -0
  79. package/dist/style.css +1 -1
  80. package/dist/umd/esm/components/GModalOrderJourney/GModalOrderJourney.d.ts +20 -0
  81. package/dist/umd/esm/components/GModalOrderJourney/components/OrderJourneySkeleton.d.ts +1 -0
  82. package/dist/umd/esm/components/GModalOrderJourney/components/index.d.ts +1 -0
  83. package/dist/umd/esm/components/GModalOrderJourney/context/OrderJourneyContext.d.ts +6 -0
  84. package/dist/umd/esm/components/GModalOrderJourney/context/index.d.ts +1 -0
  85. package/dist/umd/esm/components/GModalOrderJourney/hooks/index.d.ts +1 -0
  86. package/dist/umd/esm/components/GModalOrderJourney/hooks/useGModalOrderJourney.d.ts +7 -0
  87. package/dist/umd/esm/components/GModalOrderJourney/index.d.ts +4 -0
  88. package/dist/umd/esm/components/GModalOrderJourney/types/index.d.ts +4 -0
  89. package/dist/umd/esm/components/GModalOrderJourney/utils/index.d.ts +28 -0
  90. package/dist/umd/esm/components/OrderAnalytic/types/order.d.ts +32 -0
  91. package/dist/umd/esm/components/index.d.ts +1 -0
  92. package/dist/umd/esm/hooks/index.d.ts +1 -0
  93. package/dist/umd/esm/hooks/usePreventBodyScroll.d.ts +3 -0
  94. package/dist/umd/esm/shared/components/GDotInline/GDotInline.d.ts +5 -0
  95. package/dist/umd/esm/shared/components/GDotInline/index.d.ts +1 -0
  96. package/dist/umd/esm/shared/components/GModal/GModal.d.ts +14 -0
  97. package/dist/umd/esm/shared/components/GModal/index.d.ts +1 -0
  98. package/dist/umd/esm/shared/components/GSpinner/GSpinner.d.ts +5 -0
  99. package/dist/umd/esm/shared/components/GSpinner/index.d.ts +1 -0
  100. package/dist/umd/esm/shared/components/index.d.ts +3 -0
  101. package/dist/umd/esm/shared/journey/common/JourneyContainer/components/JourneyContainer.d.ts +10 -0
  102. package/dist/umd/esm/shared/journey/common/JourneyContainer/components/JourneyTimeline.d.ts +1 -0
  103. package/dist/umd/esm/shared/journey/common/JourneyContainer/components/index.d.ts +2 -0
  104. package/dist/umd/esm/shared/journey/common/JourneyContainer/index.d.ts +1 -0
  105. package/dist/umd/esm/shared/journey/common/index.d.ts +1 -0
  106. package/dist/umd/esm/shared/journey/index.d.ts +2 -0
  107. package/dist/umd/esm/shared/journey/ui/JourneyEvents/components/AcceptedPostPurchaseOffer/AcceptedPostPurchaseOffer.d.ts +10 -0
  108. package/dist/umd/esm/shared/journey/ui/JourneyEvents/components/AcceptedPostPurchaseOffer/index.d.ts +1 -0
  109. package/dist/umd/esm/shared/journey/ui/JourneyEvents/components/CheckoutCompleted/CheckoutCompleted.d.ts +9 -0
  110. package/dist/umd/esm/shared/journey/ui/JourneyEvents/components/CheckoutCompleted/index.d.ts +1 -0
  111. package/dist/umd/esm/shared/journey/ui/JourneyEvents/components/CheckoutItems.d.ts +6 -0
  112. package/dist/umd/esm/shared/journey/ui/JourneyEvents/components/CheckoutStarted/CheckoutStarted.d.ts +10 -0
  113. package/dist/umd/esm/shared/journey/ui/JourneyEvents/components/CheckoutStarted/CheckoutStartedDetail.d.ts +8 -0
  114. package/dist/umd/esm/shared/journey/ui/JourneyEvents/components/CheckoutStarted/index.d.ts +2 -0
  115. package/dist/umd/esm/shared/journey/ui/JourneyEvents/components/PageViewed/PageViewed.d.ts +9 -0
  116. package/dist/umd/esm/shared/journey/ui/JourneyEvents/components/PageViewed/index.d.ts +1 -0
  117. package/dist/umd/esm/shared/journey/ui/JourneyEvents/components/ProductAddedToCart/ProductAddedToCart.d.ts +10 -0
  118. package/dist/umd/esm/shared/journey/ui/JourneyEvents/components/ProductAddedToCart/index.d.ts +1 -0
  119. package/dist/umd/esm/shared/journey/ui/JourneyEvents/components/ProductQuantity/ProductQuantity.d.ts +6 -0
  120. package/dist/umd/esm/shared/journey/ui/JourneyEvents/components/ProductQuantity/index.d.ts +1 -0
  121. package/dist/umd/esm/shared/journey/ui/JourneyEvents/components/ProductRemovedFromCart/ProductRemovedFromCart.d.ts +10 -0
  122. package/dist/umd/esm/shared/journey/ui/JourneyEvents/components/ProductRemovedFromCart/index.d.ts +1 -0
  123. package/dist/umd/esm/shared/journey/ui/JourneyEvents/components/index.d.ts +6 -0
  124. package/dist/umd/esm/shared/journey/ui/JourneyEvents/constants/event.d.ts +13 -0
  125. package/dist/umd/esm/shared/journey/ui/JourneyEvents/constants/index.d.ts +1 -0
  126. package/dist/umd/esm/shared/journey/ui/JourneyEvents/index.d.ts +2 -0
  127. package/dist/umd/esm/shared/journey/ui/JourneyEvents/types.d.ts +2 -0
  128. package/dist/umd/esm/shared/journey/ui/JourneyGroup/JourneyGroup.d.ts +7 -0
  129. package/dist/umd/esm/shared/journey/ui/JourneyGroup/index.d.ts +1 -0
  130. package/dist/umd/esm/shared/journey/ui/JourneyItem/components/EventMarkerIcon.d.ts +2 -0
  131. package/dist/umd/esm/shared/journey/ui/JourneyItem/components/JourneyDetail.d.ts +5 -0
  132. package/dist/umd/esm/shared/journey/ui/JourneyItem/components/JourneyItem.d.ts +9 -0
  133. package/dist/umd/esm/shared/journey/ui/JourneyItem/components/JourneyTime.d.ts +9 -0
  134. package/dist/umd/esm/shared/journey/ui/JourneyItem/components/QuantityWrapper.d.ts +5 -0
  135. package/dist/umd/esm/shared/journey/ui/JourneyItem/components/index.d.ts +3 -0
  136. package/dist/umd/esm/shared/journey/ui/JourneyItem/index.d.ts +2 -0
  137. package/dist/umd/esm/shared/journey/ui/JourneyItem/types/events.d.ts +18 -0
  138. package/dist/umd/esm/shared/journey/ui/JourneyItem/types/index.d.ts +1 -0
  139. package/dist/umd/esm/shared/journey/ui/JourneyTitle/components/JourneyDateBadge.d.ts +5 -0
  140. package/dist/umd/esm/shared/journey/ui/JourneyTitle/components/JourneyIdBadge.d.ts +6 -0
  141. package/dist/umd/esm/shared/journey/ui/JourneyTitle/components/JourneyLoadMore.d.ts +6 -0
  142. package/dist/umd/esm/shared/journey/ui/JourneyTitle/components/JourneyTitle.d.ts +9 -0
  143. package/dist/umd/esm/shared/journey/ui/JourneyTitle/components/index.d.ts +1 -0
  144. package/dist/umd/esm/shared/journey/ui/JourneyTitle/index.d.ts +1 -0
  145. package/dist/umd/esm/shared/journey/ui/index.d.ts +3 -0
  146. package/dist/umd/esm/shared/journey/ui/type.d.ts +2 -0
  147. package/dist/umd/esm/types/campaign.d.ts +4 -0
  148. package/dist/umd/esm/utils/array.d.ts +1 -0
  149. package/dist/umd/esm/utils/date-time.d.ts +1 -0
  150. package/dist/umd/esm/utils/index.d.ts +3 -0
  151. package/dist/umd/esm/utils/is-browser.d.ts +1 -0
  152. package/dist/umd/gemxql.js +1 -1
  153. package/dist/umd/index.js +1 -1
  154. package/dist/umd/types.js +1 -1
  155. package/package.json +1 -1
@@ -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 {};
@@ -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;
@@ -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';
@@ -533,11 +533,15 @@ const calcPercentageString = (part, total, decimals = 2) => {
533
533
  dayjs.extend(utc);
534
534
  dayjs.extend(timezone);
535
535
  dayjs.extend(quarterOfYear);
536
- 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__';
537
540
  function getInitialTimezone() {
538
- return tz;
541
+ return globalThis[TZ_GLOBAL_KEY] ?? 'UTC';
539
542
  }
540
543
  const dayjsTz = (date) => {
544
+ const tz = getInitialTimezone();
541
545
  if (!date)
542
546
  return dayjs().tz(tz);
543
547
  return dayjs(date).tz(tz);
@@ -1180,6 +1184,11 @@ var ICampaignType;
1180
1184
  ICampaignType["TEMPLATE_BUNDLE"] = "TEMPLATE_BUNDLE";
1181
1185
  // THEME = 'THEME',
1182
1186
  })(ICampaignType || (ICampaignType = {}));
1187
+ var IVariantType;
1188
+ (function (IVariantType) {
1189
+ IVariantType["VARIANT_A"] = "A";
1190
+ IVariantType["VARIANT_B"] = "B";
1191
+ })(IVariantType || (IVariantType = {}));
1183
1192
 
1184
1193
  [
1185
1194
  { value: EVisitorType.NEW, label: 'New' },
@@ -533,11 +533,15 @@ const calcPercentageString = (part, total, decimals = 2) => {
533
533
  dayjs.extend(utc);
534
534
  dayjs.extend(timezone);
535
535
  dayjs.extend(quarterOfYear);
536
- 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__';
537
540
  function getInitialTimezone() {
538
- return tz;
541
+ return globalThis[TZ_GLOBAL_KEY] ?? 'UTC';
539
542
  }
540
543
  const dayjsTz = (date) => {
544
+ const tz = getInitialTimezone();
541
545
  if (!date)
542
546
  return dayjs().tz(tz);
543
547
  return dayjs(date).tz(tz);
@@ -1180,6 +1184,11 @@ var ICampaignType;
1180
1184
  ICampaignType["TEMPLATE_BUNDLE"] = "TEMPLATE_BUNDLE";
1181
1185
  // THEME = 'THEME',
1182
1186
  })(ICampaignType || (ICampaignType = {}));
1187
+ var IVariantType;
1188
+ (function (IVariantType) {
1189
+ IVariantType["VARIANT_A"] = "A";
1190
+ IVariantType["VARIANT_B"] = "B";
1191
+ })(IVariantType || (IVariantType = {}));
1183
1192
 
1184
1193
  [
1185
1194
  { value: EVisitorType.NEW, label: 'New' },
@@ -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';
@@ -0,0 +1,3 @@
1
+ export declare const usePreventBodyScroll: ({ enable }: {
2
+ enable: boolean;
3
+ }) => void;