@gem-sdk/analytics 0.1.0-staging.3 → 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 +5 -0
- package/dist/esm/gemxql.mjs +5 -0
- package/dist/esm/hooks/index.d.ts +1 -0
- package/dist/esm/hooks/usePreventBodyScroll.d.ts +3 -0
- package/dist/esm/index.js +595 -9
- package/dist/esm/index.mjs +595 -9
- 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,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;
|
|
@@ -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 @@
|
|
|
1
|
+
export * from './GDotInline';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { ModalProps } from '@shopify/polaris';
|
|
2
|
+
export interface GModalProps extends Omit<ModalProps, 'title'> {
|
|
3
|
+
title: string | React.ReactNode;
|
|
4
|
+
id?: string;
|
|
5
|
+
/**
|
|
6
|
+
* @default 'large'
|
|
7
|
+
*/
|
|
8
|
+
size?: ModalProps['size'];
|
|
9
|
+
primaryAction?: ModalProps['primaryAction'] & {
|
|
10
|
+
variant?: 'primary' | 'breadcrumb' | null;
|
|
11
|
+
};
|
|
12
|
+
children: React.ReactNode;
|
|
13
|
+
}
|
|
14
|
+
export declare const GModal: ({ children, primaryAction, secondaryActions, ...props }: GModalProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './GModal';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './GSpinner';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { IEventsByDate } from '../../../ui/type';
|
|
2
|
+
interface JourneyContainerProps {
|
|
3
|
+
orderId: string;
|
|
4
|
+
eventsByDate: IEventsByDate[];
|
|
5
|
+
hasMoreSteps: boolean;
|
|
6
|
+
isFetchingMoreSteps: boolean;
|
|
7
|
+
onLoadMore: () => void;
|
|
8
|
+
}
|
|
9
|
+
export declare const JourneyContainer: ({ orderId, eventsByDate, hasMoreSteps, isFetchingMoreSteps, onLoadMore, }: JourneyContainerProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const JourneyTimeline: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './components';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './JourneyContainer';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { IJourneyItemProps } from '../../../type';
|
|
2
|
+
import type { EJourneyEvent, IBaseJourneyEvent } from '../../types';
|
|
3
|
+
import type { ILineItem } from '@/components/OrderAnalytic/types';
|
|
4
|
+
export interface IAcceptedPostPurchaseOfferJourneyEvent extends IBaseJourneyEvent {
|
|
5
|
+
eventType: EJourneyEvent.CHECKOUT_COMPLETED;
|
|
6
|
+
lineItems?: ILineItem[];
|
|
7
|
+
}
|
|
8
|
+
type AcceptedPostPurchaseOfferProps = IJourneyItemProps<IAcceptedPostPurchaseOfferJourneyEvent>;
|
|
9
|
+
export declare const AcceptedPostPurchaseOffer: React.FC<AcceptedPostPurchaseOfferProps>;
|
|
10
|
+
export {};
|
package/dist/umd/esm/shared/journey/ui/JourneyEvents/components/AcceptedPostPurchaseOffer/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './AcceptedPostPurchaseOffer';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { IJourneyItemProps } from '../../../type';
|
|
2
|
+
import type { EJourneyEvent, IBaseJourneyEvent } from '../../types';
|
|
3
|
+
import type { ILineItem } from '@/components/OrderAnalytic/types';
|
|
4
|
+
export interface ICheckoutCompletedJourneyEvent extends IBaseJourneyEvent {
|
|
5
|
+
eventType: EJourneyEvent.CHECKOUT_COMPLETED;
|
|
6
|
+
lineItems?: ILineItem[];
|
|
7
|
+
}
|
|
8
|
+
export type CheckoutCompletedProps = IJourneyItemProps<ICheckoutCompletedJourneyEvent>;
|
|
9
|
+
export declare const CheckoutCompleted: React.FC<CheckoutCompletedProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './CheckoutCompleted';
|
package/dist/umd/esm/shared/journey/ui/JourneyEvents/components/CheckoutStarted/CheckoutStarted.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { IJourneyItemProps } from '../../../type';
|
|
2
|
+
import type { EJourneyEvent, IBaseJourneyEvent } from '../../types';
|
|
3
|
+
import type { ILineItem } from '@/components/OrderAnalytic/types';
|
|
4
|
+
export interface ICheckoutStartedJourneyEvent extends IBaseJourneyEvent {
|
|
5
|
+
eventType: EJourneyEvent.CHECKOUT_STARTED;
|
|
6
|
+
lineItems?: ILineItem[];
|
|
7
|
+
}
|
|
8
|
+
type CheckoutStartedProps = IJourneyItemProps<ICheckoutStartedJourneyEvent>;
|
|
9
|
+
export declare const CheckoutStarted: React.FC<CheckoutStartedProps>;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ILineItem } from '@/components/OrderAnalytic/types';
|
|
2
|
+
import type { BoxProps } from '@shopify/polaris';
|
|
3
|
+
interface ICheckoutStartedDetailProps {
|
|
4
|
+
lineItems?: ILineItem[];
|
|
5
|
+
activatorWrapperProps?: BoxProps;
|
|
6
|
+
}
|
|
7
|
+
export declare const CheckoutStartedDetail: ({ lineItems, activatorWrapperProps }: ICheckoutStartedDetailProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { IJourneyItemProps } from '../../../type';
|
|
2
|
+
import type { EJourneyEvent, IBaseJourneyEvent } from '../../types';
|
|
3
|
+
import type { IOrderItemPage } from '@/components/OrderAnalytic/types';
|
|
4
|
+
export interface IPageViewedJourneyEvent extends IBaseJourneyEvent, IOrderItemPage {
|
|
5
|
+
eventType: EJourneyEvent.PAGE_VIEWED;
|
|
6
|
+
}
|
|
7
|
+
type PageViewedProps = IJourneyItemProps<IPageViewedJourneyEvent>;
|
|
8
|
+
export declare const PageViewed: React.FC<PageViewedProps>;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './PageViewed';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { IJourneyItemProps } from '../../../type';
|
|
2
|
+
import type { EJourneyEvent, IBaseJourneyEvent } from '../../types';
|
|
3
|
+
import type { ILineItem } from '@/components/OrderAnalytic/types';
|
|
4
|
+
export interface IProductAddedToCartJourneyEvent extends IBaseJourneyEvent {
|
|
5
|
+
eventType: EJourneyEvent.PRODUCT_ADDED_TO_CART;
|
|
6
|
+
lineItems: ILineItem[];
|
|
7
|
+
}
|
|
8
|
+
type ProductAddedToCartProps = IJourneyItemProps<IProductAddedToCartJourneyEvent>;
|
|
9
|
+
export declare const ProductAddedToCart: React.FC<ProductAddedToCartProps>;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './ProductAddedToCart';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './ProductQuantity';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { IJourneyItemProps } from '../../../type';
|
|
2
|
+
import type { EJourneyEvent, IBaseJourneyEvent } from '../../types';
|
|
3
|
+
import type { ILineItem } from '@/components/OrderAnalytic/types';
|
|
4
|
+
export interface IProductRemovedFromCartJourneyEvent extends IBaseJourneyEvent {
|
|
5
|
+
eventType: EJourneyEvent.PRODUCT_REMOVED_FROM_CART;
|
|
6
|
+
lineItems: ILineItem[];
|
|
7
|
+
}
|
|
8
|
+
type ProductRemovedFromCartProps = IJourneyItemProps<IProductRemovedFromCartJourneyEvent>;
|
|
9
|
+
export declare const ProductRemovedFromCart: React.FC<ProductRemovedFromCartProps>;
|
|
10
|
+
export {};
|
package/dist/umd/esm/shared/journey/ui/JourneyEvents/components/ProductRemovedFromCart/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './ProductRemovedFromCart';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { IJourneyEvent, IJourneyItemProps } from '../../type';
|
|
2
|
+
import { EJourneyEvent } from '../../type';
|
|
3
|
+
type ExtractByType<Union, Type> = Union extends {
|
|
4
|
+
eventType: Type;
|
|
5
|
+
} ? Union : never;
|
|
6
|
+
export type JourneyEventToPropsMap = {
|
|
7
|
+
[K in EJourneyEvent]: ExtractByType<IJourneyEvent, K>;
|
|
8
|
+
};
|
|
9
|
+
export type JourneyEventComponentsMap = {
|
|
10
|
+
[K in EJourneyEvent]: React.FC<IJourneyItemProps<JourneyEventToPropsMap[K]>> | null;
|
|
11
|
+
};
|
|
12
|
+
export declare const JOURNEY_EVENT_COMPONENTS_MAP: JourneyEventComponentsMap;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './event';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { IEventsByDate } from '../JourneyItem';
|
|
2
|
+
interface JourneyGroupProps {
|
|
3
|
+
eventsByDate: IEventsByDate[];
|
|
4
|
+
sectionRefs: React.MutableRefObject<Map<string, HTMLDivElement>>;
|
|
5
|
+
}
|
|
6
|
+
export declare const JourneyGroup: ({ eventsByDate, sectionRefs }: JourneyGroupProps) => import("react/jsx-runtime").JSX.Element[];
|
|
7
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './JourneyGroup';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { IEventMarker } from '../types';
|
|
2
|
+
interface JourneyItemProps {
|
|
3
|
+
time: string;
|
|
4
|
+
title: string | React.ReactNode;
|
|
5
|
+
eventMarker: IEventMarker;
|
|
6
|
+
children?: React.ReactNode;
|
|
7
|
+
}
|
|
8
|
+
export declare const JourneyItem: ({ time, title, eventMarker, children }: JourneyItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare enum JourneyTimeFormat {
|
|
2
|
+
HH_MM_SS = "HH:mm:ss"
|
|
3
|
+
}
|
|
4
|
+
interface JourneyItemProps {
|
|
5
|
+
time: string;
|
|
6
|
+
format?: JourneyTimeFormat;
|
|
7
|
+
}
|
|
8
|
+
export declare const JourneyTime: ({ time, format }: JourneyItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { ICheckoutCompletedJourneyEvent, ICheckoutStartedJourneyEvent, IPageViewedJourneyEvent, IProductAddedToCartJourneyEvent, IProductRemovedFromCartJourneyEvent } from '../../JourneyEvents';
|
|
2
|
+
import type { IconProps, IconSource } from '@shopify/polaris';
|
|
3
|
+
import type { ReactNode } from 'react';
|
|
4
|
+
export type IJourneyEvent = ICheckoutCompletedJourneyEvent | ICheckoutStartedJourneyEvent | IPageViewedJourneyEvent | IProductAddedToCartJourneyEvent | IProductRemovedFromCartJourneyEvent;
|
|
5
|
+
export interface IJourneyItemProps<T extends IJourneyEvent> {
|
|
6
|
+
event: T;
|
|
7
|
+
}
|
|
8
|
+
export interface IEventMarker {
|
|
9
|
+
icon: IconSource | ReactNode;
|
|
10
|
+
tone?: IconProps['tone'];
|
|
11
|
+
hasPadding?: boolean;
|
|
12
|
+
}
|
|
13
|
+
export interface IEventsByDate {
|
|
14
|
+
date: string;
|
|
15
|
+
dateKey: string;
|
|
16
|
+
filteredCampaignId?: string;
|
|
17
|
+
events: IJourneyEvent[];
|
|
18
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './events';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
interface JourneyTitleProps {
|
|
2
|
+
content: string;
|
|
3
|
+
id?: string;
|
|
4
|
+
hasMoreSteps?: boolean;
|
|
5
|
+
isFetching?: boolean;
|
|
6
|
+
onLoadMode?: () => void;
|
|
7
|
+
}
|
|
8
|
+
export declare const JourneyTitle: ({ content, id, hasMoreSteps, isFetching, onLoadMode }: JourneyTitleProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './JourneyTitle';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './components';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function findLastIndex<T>(array: T[], predicate: (value: T, index: number, array: T[]) => boolean, thisArg?: unknown): number;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const formatDateBy: (format: string, date?: string | Date) => string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const isBrowser: () => boolean;
|