@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.
- package/dist/esm/components/GModalOrderJourney/GModalOrderJourney.d.ts +20 -0
- package/dist/esm/components/GModalOrderJourney/components/OrderJourneySkeleton.d.ts +1 -0
- package/dist/esm/components/GModalOrderJourney/components/index.d.ts +1 -0
- package/dist/esm/components/GModalOrderJourney/context/OrderJourneyContext.d.ts +6 -0
- package/dist/esm/components/GModalOrderJourney/context/index.d.ts +1 -0
- package/dist/esm/components/GModalOrderJourney/hooks/index.d.ts +1 -0
- package/dist/esm/components/GModalOrderJourney/hooks/useGModalOrderJourney.d.ts +7 -0
- package/dist/esm/components/GModalOrderJourney/index.d.ts +4 -0
- package/dist/esm/components/GModalOrderJourney/types/index.d.ts +4 -0
- package/dist/esm/components/GModalOrderJourney/utils/index.d.ts +28 -0
- package/dist/esm/components/OrderAnalytic/types/order.d.ts +32 -0
- package/dist/esm/components/index.d.ts +1 -0
- package/dist/esm/gemxql.js +11 -2
- package/dist/esm/gemxql.mjs +11 -2
- package/dist/esm/hooks/index.d.ts +1 -0
- package/dist/esm/hooks/usePreventBodyScroll.d.ts +3 -0
- package/dist/esm/index.js +607 -17
- package/dist/esm/index.mjs +607 -17
- package/dist/esm/shared/components/GDotInline/GDotInline.d.ts +5 -0
- package/dist/esm/shared/components/GDotInline/index.d.ts +1 -0
- package/dist/esm/shared/components/GModal/GModal.d.ts +14 -0
- package/dist/esm/shared/components/GModal/index.d.ts +1 -0
- package/dist/esm/shared/components/GSpinner/GSpinner.d.ts +5 -0
- package/dist/esm/shared/components/GSpinner/index.d.ts +1 -0
- package/dist/esm/shared/components/index.d.ts +3 -0
- package/dist/esm/shared/journey/common/JourneyContainer/components/JourneyContainer.d.ts +10 -0
- package/dist/esm/shared/journey/common/JourneyContainer/components/JourneyTimeline.d.ts +1 -0
- package/dist/esm/shared/journey/common/JourneyContainer/components/index.d.ts +2 -0
- package/dist/esm/shared/journey/common/JourneyContainer/index.d.ts +1 -0
- package/dist/esm/shared/journey/common/index.d.ts +1 -0
- package/dist/esm/shared/journey/index.d.ts +2 -0
- package/dist/esm/shared/journey/ui/JourneyEvents/components/AcceptedPostPurchaseOffer/AcceptedPostPurchaseOffer.d.ts +10 -0
- package/dist/esm/shared/journey/ui/JourneyEvents/components/AcceptedPostPurchaseOffer/index.d.ts +1 -0
- package/dist/esm/shared/journey/ui/JourneyEvents/components/CheckoutCompleted/CheckoutCompleted.d.ts +9 -0
- package/dist/esm/shared/journey/ui/JourneyEvents/components/CheckoutCompleted/index.d.ts +1 -0
- package/dist/esm/shared/journey/ui/JourneyEvents/components/CheckoutItems.d.ts +6 -0
- package/dist/esm/shared/journey/ui/JourneyEvents/components/CheckoutStarted/CheckoutStarted.d.ts +10 -0
- package/dist/esm/shared/journey/ui/JourneyEvents/components/CheckoutStarted/CheckoutStartedDetail.d.ts +8 -0
- package/dist/esm/shared/journey/ui/JourneyEvents/components/CheckoutStarted/index.d.ts +2 -0
- package/dist/esm/shared/journey/ui/JourneyEvents/components/PageViewed/PageViewed.d.ts +9 -0
- package/dist/esm/shared/journey/ui/JourneyEvents/components/PageViewed/index.d.ts +1 -0
- package/dist/esm/shared/journey/ui/JourneyEvents/components/ProductAddedToCart/ProductAddedToCart.d.ts +10 -0
- package/dist/esm/shared/journey/ui/JourneyEvents/components/ProductAddedToCart/index.d.ts +1 -0
- package/dist/esm/shared/journey/ui/JourneyEvents/components/ProductQuantity/ProductQuantity.d.ts +6 -0
- package/dist/esm/shared/journey/ui/JourneyEvents/components/ProductQuantity/index.d.ts +1 -0
- package/dist/esm/shared/journey/ui/JourneyEvents/components/ProductRemovedFromCart/ProductRemovedFromCart.d.ts +10 -0
- package/dist/esm/shared/journey/ui/JourneyEvents/components/ProductRemovedFromCart/index.d.ts +1 -0
- package/dist/esm/shared/journey/ui/JourneyEvents/components/index.d.ts +6 -0
- package/dist/esm/shared/journey/ui/JourneyEvents/constants/event.d.ts +13 -0
- package/dist/esm/shared/journey/ui/JourneyEvents/constants/index.d.ts +1 -0
- package/dist/esm/shared/journey/ui/JourneyEvents/index.d.ts +2 -0
- package/dist/esm/shared/journey/ui/JourneyEvents/types.d.ts +2 -0
- package/dist/esm/shared/journey/ui/JourneyGroup/JourneyGroup.d.ts +7 -0
- package/dist/esm/shared/journey/ui/JourneyGroup/index.d.ts +1 -0
- package/dist/esm/shared/journey/ui/JourneyItem/components/EventMarkerIcon.d.ts +2 -0
- package/dist/esm/shared/journey/ui/JourneyItem/components/JourneyDetail.d.ts +5 -0
- package/dist/esm/shared/journey/ui/JourneyItem/components/JourneyItem.d.ts +9 -0
- package/dist/esm/shared/journey/ui/JourneyItem/components/JourneyTime.d.ts +9 -0
- package/dist/esm/shared/journey/ui/JourneyItem/components/QuantityWrapper.d.ts +5 -0
- package/dist/esm/shared/journey/ui/JourneyItem/components/index.d.ts +3 -0
- package/dist/esm/shared/journey/ui/JourneyItem/index.d.ts +2 -0
- package/dist/esm/shared/journey/ui/JourneyItem/types/events.d.ts +18 -0
- package/dist/esm/shared/journey/ui/JourneyItem/types/index.d.ts +1 -0
- package/dist/esm/shared/journey/ui/JourneyTitle/components/JourneyDateBadge.d.ts +5 -0
- package/dist/esm/shared/journey/ui/JourneyTitle/components/JourneyIdBadge.d.ts +6 -0
- package/dist/esm/shared/journey/ui/JourneyTitle/components/JourneyLoadMore.d.ts +6 -0
- package/dist/esm/shared/journey/ui/JourneyTitle/components/JourneyTitle.d.ts +9 -0
- package/dist/esm/shared/journey/ui/JourneyTitle/components/index.d.ts +1 -0
- package/dist/esm/shared/journey/ui/JourneyTitle/index.d.ts +1 -0
- package/dist/esm/shared/journey/ui/index.d.ts +3 -0
- package/dist/esm/shared/journey/ui/type.d.ts +2 -0
- package/dist/esm/types/campaign.d.ts +4 -0
- package/dist/esm/types.js +6 -1
- package/dist/esm/types.mjs +6 -1
- package/dist/esm/utils/array.d.ts +1 -0
- package/dist/esm/utils/date-time.d.ts +1 -0
- package/dist/esm/utils/index.d.ts +3 -0
- package/dist/esm/utils/is-browser.d.ts +1 -0
- package/dist/style.css +1 -1
- package/dist/umd/esm/components/GModalOrderJourney/GModalOrderJourney.d.ts +20 -0
- package/dist/umd/esm/components/GModalOrderJourney/components/OrderJourneySkeleton.d.ts +1 -0
- package/dist/umd/esm/components/GModalOrderJourney/components/index.d.ts +1 -0
- package/dist/umd/esm/components/GModalOrderJourney/context/OrderJourneyContext.d.ts +6 -0
- package/dist/umd/esm/components/GModalOrderJourney/context/index.d.ts +1 -0
- package/dist/umd/esm/components/GModalOrderJourney/hooks/index.d.ts +1 -0
- package/dist/umd/esm/components/GModalOrderJourney/hooks/useGModalOrderJourney.d.ts +7 -0
- package/dist/umd/esm/components/GModalOrderJourney/index.d.ts +4 -0
- package/dist/umd/esm/components/GModalOrderJourney/types/index.d.ts +4 -0
- package/dist/umd/esm/components/GModalOrderJourney/utils/index.d.ts +28 -0
- package/dist/umd/esm/components/OrderAnalytic/types/order.d.ts +32 -0
- package/dist/umd/esm/components/index.d.ts +1 -0
- package/dist/umd/esm/hooks/index.d.ts +1 -0
- package/dist/umd/esm/hooks/usePreventBodyScroll.d.ts +3 -0
- package/dist/umd/esm/shared/components/GDotInline/GDotInline.d.ts +5 -0
- package/dist/umd/esm/shared/components/GDotInline/index.d.ts +1 -0
- package/dist/umd/esm/shared/components/GModal/GModal.d.ts +14 -0
- package/dist/umd/esm/shared/components/GModal/index.d.ts +1 -0
- package/dist/umd/esm/shared/components/GSpinner/GSpinner.d.ts +5 -0
- package/dist/umd/esm/shared/components/GSpinner/index.d.ts +1 -0
- package/dist/umd/esm/shared/components/index.d.ts +3 -0
- package/dist/umd/esm/shared/journey/common/JourneyContainer/components/JourneyContainer.d.ts +10 -0
- package/dist/umd/esm/shared/journey/common/JourneyContainer/components/JourneyTimeline.d.ts +1 -0
- package/dist/umd/esm/shared/journey/common/JourneyContainer/components/index.d.ts +2 -0
- package/dist/umd/esm/shared/journey/common/JourneyContainer/index.d.ts +1 -0
- package/dist/umd/esm/shared/journey/common/index.d.ts +1 -0
- package/dist/umd/esm/shared/journey/index.d.ts +2 -0
- package/dist/umd/esm/shared/journey/ui/JourneyEvents/components/AcceptedPostPurchaseOffer/AcceptedPostPurchaseOffer.d.ts +10 -0
- package/dist/umd/esm/shared/journey/ui/JourneyEvents/components/AcceptedPostPurchaseOffer/index.d.ts +1 -0
- package/dist/umd/esm/shared/journey/ui/JourneyEvents/components/CheckoutCompleted/CheckoutCompleted.d.ts +9 -0
- package/dist/umd/esm/shared/journey/ui/JourneyEvents/components/CheckoutCompleted/index.d.ts +1 -0
- package/dist/umd/esm/shared/journey/ui/JourneyEvents/components/CheckoutItems.d.ts +6 -0
- package/dist/umd/esm/shared/journey/ui/JourneyEvents/components/CheckoutStarted/CheckoutStarted.d.ts +10 -0
- package/dist/umd/esm/shared/journey/ui/JourneyEvents/components/CheckoutStarted/CheckoutStartedDetail.d.ts +8 -0
- package/dist/umd/esm/shared/journey/ui/JourneyEvents/components/CheckoutStarted/index.d.ts +2 -0
- package/dist/umd/esm/shared/journey/ui/JourneyEvents/components/PageViewed/PageViewed.d.ts +9 -0
- package/dist/umd/esm/shared/journey/ui/JourneyEvents/components/PageViewed/index.d.ts +1 -0
- package/dist/umd/esm/shared/journey/ui/JourneyEvents/components/ProductAddedToCart/ProductAddedToCart.d.ts +10 -0
- package/dist/umd/esm/shared/journey/ui/JourneyEvents/components/ProductAddedToCart/index.d.ts +1 -0
- package/dist/umd/esm/shared/journey/ui/JourneyEvents/components/ProductQuantity/ProductQuantity.d.ts +6 -0
- package/dist/umd/esm/shared/journey/ui/JourneyEvents/components/ProductQuantity/index.d.ts +1 -0
- package/dist/umd/esm/shared/journey/ui/JourneyEvents/components/ProductRemovedFromCart/ProductRemovedFromCart.d.ts +10 -0
- package/dist/umd/esm/shared/journey/ui/JourneyEvents/components/ProductRemovedFromCart/index.d.ts +1 -0
- package/dist/umd/esm/shared/journey/ui/JourneyEvents/components/index.d.ts +6 -0
- package/dist/umd/esm/shared/journey/ui/JourneyEvents/constants/event.d.ts +13 -0
- package/dist/umd/esm/shared/journey/ui/JourneyEvents/constants/index.d.ts +1 -0
- package/dist/umd/esm/shared/journey/ui/JourneyEvents/index.d.ts +2 -0
- package/dist/umd/esm/shared/journey/ui/JourneyEvents/types.d.ts +2 -0
- package/dist/umd/esm/shared/journey/ui/JourneyGroup/JourneyGroup.d.ts +7 -0
- package/dist/umd/esm/shared/journey/ui/JourneyGroup/index.d.ts +1 -0
- package/dist/umd/esm/shared/journey/ui/JourneyItem/components/EventMarkerIcon.d.ts +2 -0
- package/dist/umd/esm/shared/journey/ui/JourneyItem/components/JourneyDetail.d.ts +5 -0
- package/dist/umd/esm/shared/journey/ui/JourneyItem/components/JourneyItem.d.ts +9 -0
- package/dist/umd/esm/shared/journey/ui/JourneyItem/components/JourneyTime.d.ts +9 -0
- package/dist/umd/esm/shared/journey/ui/JourneyItem/components/QuantityWrapper.d.ts +5 -0
- package/dist/umd/esm/shared/journey/ui/JourneyItem/components/index.d.ts +3 -0
- package/dist/umd/esm/shared/journey/ui/JourneyItem/index.d.ts +2 -0
- package/dist/umd/esm/shared/journey/ui/JourneyItem/types/events.d.ts +18 -0
- package/dist/umd/esm/shared/journey/ui/JourneyItem/types/index.d.ts +1 -0
- package/dist/umd/esm/shared/journey/ui/JourneyTitle/components/JourneyDateBadge.d.ts +5 -0
- package/dist/umd/esm/shared/journey/ui/JourneyTitle/components/JourneyIdBadge.d.ts +6 -0
- package/dist/umd/esm/shared/journey/ui/JourneyTitle/components/JourneyLoadMore.d.ts +6 -0
- package/dist/umd/esm/shared/journey/ui/JourneyTitle/components/JourneyTitle.d.ts +9 -0
- package/dist/umd/esm/shared/journey/ui/JourneyTitle/components/index.d.ts +1 -0
- package/dist/umd/esm/shared/journey/ui/JourneyTitle/index.d.ts +1 -0
- package/dist/umd/esm/shared/journey/ui/index.d.ts +3 -0
- package/dist/umd/esm/shared/journey/ui/type.d.ts +2 -0
- package/dist/umd/esm/types/campaign.d.ts +4 -0
- package/dist/umd/esm/utils/array.d.ts +1 -0
- package/dist/umd/esm/utils/date-time.d.ts +1 -0
- package/dist/umd/esm/utils/index.d.ts +3 -0
- package/dist/umd/esm/utils/is-browser.d.ts +1 -0
- package/dist/umd/gemxql.js +1 -1
- package/dist/umd/index.js +1 -1
- package/dist/umd/types.js +1 -1
- 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,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;
|
package/dist/esm/gemxql.js
CHANGED
|
@@ -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
|
|
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
|
|
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' },
|
package/dist/esm/gemxql.mjs
CHANGED
|
@@ -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
|
|
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
|
|
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';
|