@rokt/dcui-orchestrator 0.2.1-rc.7 → 0.2.1-rc.70
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/extensions/minimized-bottomsheet/src/components/bottom-sheet/bottom-sheet.d.ts +2 -0
- package/dist/extensions/minimized-bottomsheet/src/components/bottom-sheet/factory.d.ts +1 -0
- package/dist/extensions/minimized-bottomsheet/src/components/bottom-sheet/hooks.d.ts +2 -1
- package/dist/extensions/minimized-bottomsheet/src/components/bottomsheet-wrapper/overlay-wrapper.d.ts +2 -2
- package/dist/index.cjs +30 -30
- package/dist/index.js +25 -25
- package/dist/libraries/dcui-components/src/components/data-image-carousel/carousel-indicators.d.ts +20 -0
- package/dist/libraries/dcui-components/src/components/data-image-carousel/data-image-carousel.d.ts +100 -0
- package/dist/libraries/dcui-components/src/components/data-image-carousel/factory.d.ts +2 -0
- package/dist/libraries/dcui-components/src/components/data-image-carousel/index.d.ts +2 -0
- package/dist/libraries/dcui-components/src/components/icon-group/factory.d.ts +2 -0
- package/dist/libraries/dcui-components/src/components/icon-group/icon-group.d.ts +36 -0
- package/dist/libraries/dcui-components/src/components/icon-group/index.d.ts +2 -0
- package/dist/libraries/domain/src/behaviors/cart-item-event.d.ts +49 -0
- package/dist/libraries/domain/src/behaviors/global-actions.d.ts +2 -0
- package/dist/libraries/domain/src/behaviors/index.d.ts +1 -0
- package/dist/libraries/domain/src/behaviors/send-partner.d.ts +7 -3
- package/dist/libraries/domain/src/models/index.d.ts +1 -0
- package/dist/libraries/domain/src/models/layout/layout-catalog-item.d.ts +2 -0
- package/dist/libraries/domain/src/models/partner-event.d.ts +1 -1
- package/dist/libraries/domain/src/models/plugin/plugin-catalog-item.d.ts +8 -0
- package/dist/libraries/domain/src/models/shipping.d.ts +25 -0
- package/dist/libraries/domain/src/models/signals.d.ts +2 -2
- package/dist/libraries/layout-renderer-utils/src/sagas/error/error-codes.d.ts +1 -0
- package/dist/libraries/layout-renderer-utils/src/sagas/plugin/display.d.ts +3 -0
- package/dist/libraries/orchestrator/src/sagas/cart-service/sagas.d.ts +16 -0
- package/dist/modules/add-to-cart/src/components/escape-hatch/factory.d.ts +1 -1
- package/dist/modules/add-to-cart/src/components/read-more-text/read-more-text.d.ts +29 -0
- package/dist/modules/add-to-cart/src/components/scroll-to-target/scroll-to-target.d.ts +56 -0
- package/dist/modules/add-to-cart/src/components/tooltip/tooltip.d.ts +42 -0
- package/dist/modules/add-to-cart/src/components/when-catalog-quantity/when-catalog-quantity.d.ts +22 -0
- package/dist/modules/add-to-cart/src/sagas/index.d.ts +2 -0
- package/dist/modules/add-to-cart/src/selectors/creative/index.d.ts +1 -0
- package/dist/modules/add-to-cart/src/selectors/creative/selectors.d.ts +3 -0
- package/dist/modules/add-to-cart/src/selectors/index.d.ts +1 -0
- package/dist/modules/instant-purchase/src/actions/instant-purchase.d.ts +6 -1
- package/dist/modules/instant-purchase/src/components/catalog-discount-callout-tag/catalog-discount-callout-tag.d.ts +90 -0
- package/dist/modules/instant-purchase/src/components/catalog-drop-down/catalog-drop-down.d.ts +3 -0
- package/dist/modules/instant-purchase/src/components/checkbox/checkbox.d.ts +1 -0
- package/dist/modules/instant-purchase/src/components/custom-state-validation-trigger-button/custom-state-validation-trigger-button.d.ts +28 -0
- package/dist/modules/instant-purchase/src/components/dismiss-instant-purchase-button/dismiss-instant-purchase-button.d.ts +1 -0
- package/dist/modules/instant-purchase/src/components/escape-hatch/factory.d.ts +1 -1
- package/dist/modules/instant-purchase/src/components/escape-hatch/index.d.ts +1 -0
- package/dist/modules/instant-purchase/src/components/inline-container/factory.d.ts +2 -0
- package/dist/modules/instant-purchase/src/components/inline-container/inline-container.d.ts +55 -0
- package/dist/modules/instant-purchase/src/components/loading-spinner/loading-spinner.d.ts +2 -1
- package/dist/modules/instant-purchase/src/components/offer-lifecycle-timer/offer-lifecycle-timer.d.ts +2 -0
- package/dist/modules/instant-purchase/src/components/read-more-text-container/read-more-text-container.d.ts +1 -0
- package/dist/modules/instant-purchase/src/components/rich-text/factory.d.ts +2 -0
- package/dist/modules/instant-purchase/src/components/rich-text/rich-text.d.ts +63 -0
- package/dist/modules/instant-purchase/src/models/state/instant-purchase.d.ts +3 -2
- package/dist/modules/instant-purchase/src/reducers/index.d.ts +3 -1
- package/dist/modules/instant-purchase/src/reducers/instant-purchase/index.d.ts +1 -0
- package/dist/modules/instant-purchase/src/reducers/instant-purchase/offer-lifecycle-event/index.d.ts +1 -0
- package/dist/modules/instant-purchase/src/reducers/instant-purchase/offer-lifecycle-event/reducer.d.ts +4 -0
- package/dist/modules/instant-purchase/src/sagas/index.d.ts +2 -0
- package/dist/modules/instant-purchase/src/sagas/instant-purchase/sagas.d.ts +11 -2
- package/dist/modules/layouts-xp-sandbox/src/sagas/index.d.ts +2 -0
- package/dist/modules/standard-marketing/src/sagas/index.d.ts +2 -0
- package/dist/modules/standard-marketing/src/sagas/offer-engagement/channels.d.ts +4 -1
- package/package.json +1 -1
- package/dist/modules/instant-purchase/src/components/catalog-variation-selection-button/catalog-variation-selection-button.d.ts +0 -28
package/dist/libraries/dcui-components/src/components/data-image-carousel/carousel-indicators.d.ts
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { DataImageCarouselModel, CarouselActiveIndicatorMode, WhenPredicate } from '@rokt/dcui-layout-schema';
|
|
2
|
+
type CarouselIndicatorsProps = {
|
|
3
|
+
indicatorClasses?: {
|
|
4
|
+
progressIndicatorContainer?: string;
|
|
5
|
+
indicator?: string;
|
|
6
|
+
activeIndicator?: string;
|
|
7
|
+
seenIndicator?: string;
|
|
8
|
+
};
|
|
9
|
+
activeIndicatorMode?: CarouselActiveIndicatorMode | null;
|
|
10
|
+
activeIndicatorStyles?: NonNullable<NonNullable<DataImageCarouselModel<WhenPredicate>['styles']>['elements']>['activeIndicator'];
|
|
11
|
+
activeIndex: number;
|
|
12
|
+
count: number;
|
|
13
|
+
transitionDuration?: number;
|
|
14
|
+
testId?: string;
|
|
15
|
+
};
|
|
16
|
+
export declare const defaultIndicatorContainerStyles: NonNullable<NonNullable<NonNullable<DataImageCarouselModel<WhenPredicate>['styles']>['elements']>['progressIndicatorContainer']>;
|
|
17
|
+
export declare const defaultIndicatorStyles: NonNullable<NonNullable<NonNullable<DataImageCarouselModel<WhenPredicate>['styles']>['elements']>['indicator']>;
|
|
18
|
+
export declare const defaultActiveIndicatorStyles: NonNullable<NonNullable<NonNullable<DataImageCarouselModel<WhenPredicate>['styles']>['elements']>['activeIndicator']>;
|
|
19
|
+
export declare function CarouselIndicators(props: CarouselIndicatorsProps): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
export {};
|
package/dist/libraries/dcui-components/src/components/data-image-carousel/data-image-carousel.d.ts
ADDED
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { DataImageCarouselModel, WhenPredicate } from '@rokt/dcui-layout-schema';
|
|
2
|
+
export interface DataImageCarouselProps {
|
|
3
|
+
/**
|
|
4
|
+
* - `imageKey`: the key prefix for the image objects of the creative images contexts.
|
|
5
|
+
* - `indicators`:
|
|
6
|
+
* * `show`: boolean
|
|
7
|
+
* * `activeIndicatorMode`: 'Progress' | 'Seen'
|
|
8
|
+
* - `duration`: number - Time in milliseconds before changing to the next image.
|
|
9
|
+
* - `transition`:
|
|
10
|
+
* * `type`: 'SlideInOut' | 'FadeInOut' - Transition type.
|
|
11
|
+
* * `settings`:
|
|
12
|
+
* * `speed`: 'fast' | 'medium' | 'slow' - Speed of the transition.
|
|
13
|
+
* - `a11yLabel`: string
|
|
14
|
+
* - `styles`:
|
|
15
|
+
* * `elements`:
|
|
16
|
+
* * `own`:
|
|
17
|
+
* - `container`
|
|
18
|
+
* - `background`
|
|
19
|
+
* - `border`
|
|
20
|
+
* - `dimension`
|
|
21
|
+
* - `flexChild`
|
|
22
|
+
* - `spacing`
|
|
23
|
+
* * `progressIndicatorContainer`:
|
|
24
|
+
* - `container`
|
|
25
|
+
* - `background`
|
|
26
|
+
* - `border`
|
|
27
|
+
* - `dimension`
|
|
28
|
+
* - `flexChild`
|
|
29
|
+
* - `spacing`
|
|
30
|
+
* * `indicator`:
|
|
31
|
+
* - `container`
|
|
32
|
+
* - `background`
|
|
33
|
+
* - `border`
|
|
34
|
+
* - `dimension`
|
|
35
|
+
* - `flexChild`
|
|
36
|
+
* - `spacing`
|
|
37
|
+
* * `seenIndicator`:
|
|
38
|
+
* - `container`
|
|
39
|
+
* - `background`
|
|
40
|
+
* - `border`
|
|
41
|
+
* - `dimension`
|
|
42
|
+
* - `flexChild`
|
|
43
|
+
* - `spacing`
|
|
44
|
+
* * `activeIndicator`:
|
|
45
|
+
* - `container`
|
|
46
|
+
* - `background`
|
|
47
|
+
* - `border`
|
|
48
|
+
* - `dimension`
|
|
49
|
+
* - `flexChild`
|
|
50
|
+
* - `spacing`
|
|
51
|
+
* * `transitions`:
|
|
52
|
+
* - `type`: 'Conditional'
|
|
53
|
+
* - `transition`:
|
|
54
|
+
* * `predicates`: WhenPredicate[]
|
|
55
|
+
* * `duration`: number
|
|
56
|
+
* * `value`:
|
|
57
|
+
* * `own`:
|
|
58
|
+
* - `container`
|
|
59
|
+
* - `background`
|
|
60
|
+
* - `border`
|
|
61
|
+
* - `dimension`
|
|
62
|
+
* - `flexChild`
|
|
63
|
+
* - `spacing`
|
|
64
|
+
* * `progressIndicatorContainer`:
|
|
65
|
+
* - `container`
|
|
66
|
+
* - `background`
|
|
67
|
+
* - `border`
|
|
68
|
+
* - `dimension`
|
|
69
|
+
* - `flexChild`
|
|
70
|
+
* - `spacing`
|
|
71
|
+
* * `indicator`:
|
|
72
|
+
* - `container`
|
|
73
|
+
* - `background`
|
|
74
|
+
* - `border`
|
|
75
|
+
* - `dimension`
|
|
76
|
+
* - `flexChild`
|
|
77
|
+
* - `spacing`
|
|
78
|
+
* * `seenIndicator`:
|
|
79
|
+
* - `container`
|
|
80
|
+
* - `background`
|
|
81
|
+
* - `border`
|
|
82
|
+
* - `dimension`
|
|
83
|
+
* - `flexChild`
|
|
84
|
+
* - `spacing`
|
|
85
|
+
* * `activeIndicator`:
|
|
86
|
+
* - `container`
|
|
87
|
+
* - `background`
|
|
88
|
+
* - `border`
|
|
89
|
+
* - `dimension`
|
|
90
|
+
* - `flexChild`
|
|
91
|
+
* - `spacing`
|
|
92
|
+
*/
|
|
93
|
+
schema: DataImageCarouselModel<WhenPredicate>;
|
|
94
|
+
testId?: string;
|
|
95
|
+
}
|
|
96
|
+
/** The DataImageCarousel is an image node that displays all images prefixed with the given key in the creative images contexts. <br>
|
|
97
|
+
* It supports various formats and sizes.<br>
|
|
98
|
+
* *Where can we use this: __layout variant__*
|
|
99
|
+
* */
|
|
100
|
+
export declare function DataImageCarousel(props: DataImageCarouselProps): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { IconGroupModel, WhenPredicate } from '@rokt/dcui-layout-schema';
|
|
2
|
+
export interface IconGroupProps {
|
|
3
|
+
/**
|
|
4
|
+
* - `name`: the unique name for an icon in a pre-defined icon sets.
|
|
5
|
+
* - `rating`: the source of the rating number in creative, or string number.
|
|
6
|
+
* - `styles`:
|
|
7
|
+
* * `own`:
|
|
8
|
+
* - `text`
|
|
9
|
+
* - `dimension`
|
|
10
|
+
* - `flexChild`
|
|
11
|
+
* - `spacing`
|
|
12
|
+
* - `background`
|
|
13
|
+
* - `border`
|
|
14
|
+
* * `filled`:
|
|
15
|
+
* - `text`
|
|
16
|
+
* - `dimension`
|
|
17
|
+
* - `flexChild`
|
|
18
|
+
* - `spacing`
|
|
19
|
+
* - `background`
|
|
20
|
+
* - `border`
|
|
21
|
+
* * `unfilled`:
|
|
22
|
+
* - `text`
|
|
23
|
+
* - `dimension`
|
|
24
|
+
* - `flexChild`
|
|
25
|
+
* - `spacing`
|
|
26
|
+
* - `background`
|
|
27
|
+
* - `border`
|
|
28
|
+
*/
|
|
29
|
+
schema: IconGroupModel<WhenPredicate>;
|
|
30
|
+
testId?: string;
|
|
31
|
+
}
|
|
32
|
+
/** The IconGroup is an icon node that displays an icon rating through the icon tag. <br>
|
|
33
|
+
* It supports various formats and sizes.<br>
|
|
34
|
+
* *Where can we use this: __outer layout__, __layout variant__*
|
|
35
|
+
* */
|
|
36
|
+
export declare function IconGroup(props: IconGroupProps): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { CartItemPayload } from '../models';
|
|
2
|
+
export declare const INITIATE_CART_ITEM_EVENT = "GLOBAL/CART_ITEM_EVENT/INITIATE";
|
|
3
|
+
export type InitiateCartItemEvent = {
|
|
4
|
+
type: typeof INITIATE_CART_ITEM_EVENT;
|
|
5
|
+
payload: CartItemPayload;
|
|
6
|
+
};
|
|
7
|
+
export type CartItemSuccessData = {
|
|
8
|
+
cartItemId: string;
|
|
9
|
+
totalPrice: number;
|
|
10
|
+
currencyCode: string;
|
|
11
|
+
providerData: string;
|
|
12
|
+
shipping: {
|
|
13
|
+
firstName: string;
|
|
14
|
+
lastName: string;
|
|
15
|
+
address1: string;
|
|
16
|
+
address2: string;
|
|
17
|
+
city: string;
|
|
18
|
+
state: string;
|
|
19
|
+
postalCode: string;
|
|
20
|
+
phoneNumber: string;
|
|
21
|
+
};
|
|
22
|
+
success: true;
|
|
23
|
+
};
|
|
24
|
+
export type CartItemValidationError = {
|
|
25
|
+
code: string;
|
|
26
|
+
message: string;
|
|
27
|
+
};
|
|
28
|
+
export type CartItemFailureData = {
|
|
29
|
+
description?: string;
|
|
30
|
+
success: false;
|
|
31
|
+
errors: CartItemValidationError[];
|
|
32
|
+
};
|
|
33
|
+
export type CartItemResponseData = CartItemSuccessData | CartItemFailureData;
|
|
34
|
+
export type CartItemResponsePayload = {
|
|
35
|
+
success: boolean;
|
|
36
|
+
error?: string;
|
|
37
|
+
timestamp: string;
|
|
38
|
+
sessionId: string;
|
|
39
|
+
response?: CartItemResponseData;
|
|
40
|
+
};
|
|
41
|
+
export declare const CART_ITEM_RESPONSE = "GLOBAL/CART_ITEM_EVENT/RESPONSE";
|
|
42
|
+
export type CartItemResponse = {
|
|
43
|
+
type: typeof CART_ITEM_RESPONSE;
|
|
44
|
+
payload: CartItemResponsePayload;
|
|
45
|
+
};
|
|
46
|
+
export declare const INITIALIZE_CART_SERVICE = "GLOBAL/CART_SERVICE/INITIALIZE";
|
|
47
|
+
export type InitializeCartService = {
|
|
48
|
+
type: typeof INITIALIZE_CART_SERVICE;
|
|
49
|
+
};
|
|
@@ -25,5 +25,7 @@ export declare const GlobalActionTypes: {
|
|
|
25
25
|
readonly SET_PARTNER_VALIDATION_STATUS: "GLOBAL/SET_PARTNER_VALIDATION_STATUS";
|
|
26
26
|
readonly SET_GLOBAL_OFFER_DATA_CART: "GLOBAL/SET_GLOBAL_OFFER_DATA_CART";
|
|
27
27
|
readonly LAUNCH_CHILD_LAYOUT: "GLOBAL/LAUNCH_CHILD_LAYOUT";
|
|
28
|
+
readonly INITIATE_CART_ITEM_EVENT: "GLOBAL/CART_ITEM_EVENT/INITIATE";
|
|
29
|
+
readonly CART_ITEM_RESPONSE: "GLOBAL/CART_ITEM_EVENT/RESPONSE";
|
|
28
30
|
};
|
|
29
31
|
export type GlobalActionType = GlobalActions['type'];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { OutboundPartnerEvent, PluginCartItem, InstantPurchaseWsdkPayload } from '../models';
|
|
1
|
+
import { OutboundPartnerEvent, PluginCartItem, InstantPurchaseWsdkPayload, CartItemPayload } from '../models';
|
|
2
2
|
export declare const SEND_PARTNER = "GLOBAL/SEND_PARTNER";
|
|
3
3
|
export type OutboundInstantPurchaseEventPayload = {
|
|
4
4
|
name: 'CART_ITEM_INSTANT_PURCHASE';
|
|
@@ -41,10 +41,14 @@ export type OutboundInstantPurchaseWsdkEventPayload = {
|
|
|
41
41
|
name: 'INITIATE_INSTANT_PURCHASE_EVENT';
|
|
42
42
|
body: InstantPurchaseWsdkPayload;
|
|
43
43
|
};
|
|
44
|
-
export type
|
|
44
|
+
export type OutboundCartItemEventPayload = {
|
|
45
|
+
name: 'INITIATE_CART_ITEM_EVENT';
|
|
46
|
+
body: CartItemPayload;
|
|
47
|
+
};
|
|
48
|
+
export type OutboundPartnerEventPayload<EventType extends OutboundPartnerEvent> = EventType extends 'REALTIME_OFFER_FULFILLMENT_REFERRAL' ? OutboundRealtimeOfferFulfillmentReferralEventPayload : EventType extends 'REALTIME_OFFER_FULFILLMENT_CONVERSION' ? OutboundRealtimeOfferFulfillmentConversionEventPayload : EventType extends 'REALTIME_OFFER_FULFILLMENT_SUCCESS' ? OutboundRealtimeOfferFulfillmentSuccessEventPayload : EventType extends 'V2_CART_ITEM_UPDATED' | 'CART_ITEM_INSTANT_PURCHASE' | 'UPSELL_CREATIVE_SENT' | 'INITIATE_INSTANT_PURCHASE_EVENT' | 'INITIATE_CART_ITEM_EVENT' ? never : {
|
|
45
49
|
name: EventType;
|
|
46
50
|
};
|
|
47
51
|
export type SendPartner<EventType extends OutboundPartnerEvent> = {
|
|
48
52
|
type: typeof SEND_PARTNER;
|
|
49
|
-
payload: OutboundPartnerEventPayload<EventType> | OutboundUpdateCartEventPayload | OutboundInstantPurchaseEventPayload | OutboundUpsellCreativeSentEventPayload | OutboundInstantPurchaseWsdkEventPayload;
|
|
53
|
+
payload: OutboundPartnerEventPayload<EventType> | OutboundUpdateCartEventPayload | OutboundInstantPurchaseEventPayload | OutboundUpsellCreativeSentEventPayload | OutboundInstantPurchaseWsdkEventPayload | OutboundCartItemEventPayload;
|
|
50
54
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export type CatalogOutboundPartnerEvent = 'V2_CART_ITEM_UPDATED' | 'CART_ITEM_INSTANT_PURCHASE';
|
|
2
|
-
export type OfferOutboundPartnerEvent = CatalogOutboundPartnerEvent | 'OFFER_ENGAGEMENT' | 'POSITIVE_ENGAGEMENT' | 'UPSELL_CREATIVE_SENT' | 'REALTIME_OFFER_FULFILLMENT_REFERRAL' | 'REALTIME_OFFER_FULFILLMENT_CONVERSION' | 'REALTIME_OFFER_FULFILLMENT_SUCCESS' | 'INITIATE_INSTANT_PURCHASE_EVENT';
|
|
2
|
+
export type OfferOutboundPartnerEvent = CatalogOutboundPartnerEvent | 'OFFER_ENGAGEMENT' | 'POSITIVE_ENGAGEMENT' | 'UPSELL_CREATIVE_SENT' | 'REALTIME_OFFER_FULFILLMENT_REFERRAL' | 'REALTIME_OFFER_FULFILLMENT_CONVERSION' | 'REALTIME_OFFER_FULFILLMENT_SUCCESS' | 'INITIATE_INSTANT_PURCHASE_EVENT' | 'INITIATE_CART_ITEM_EVENT';
|
|
3
3
|
export type OutboundPartnerEvent = OfferOutboundPartnerEvent | 'PLACEMENT_CLOSED' | 'PLACEMENT_COMPLETED' | 'PLACEMENT_INTERACTIVE' | 'PLACEMENT_FAILURE';
|
|
4
4
|
export declare function isOutboundPartnerEvent(value: unknown): value is OutboundPartnerEvent;
|
|
5
5
|
export declare function isOfferOutboundPartnerEvent(value: unknown): value is OfferOutboundPartnerEvent;
|
|
@@ -13,6 +13,8 @@ export interface PluginCatalogItem {
|
|
|
13
13
|
responseOptionsMap?: Record<string, PluginCreativeUrlResponseOption>;
|
|
14
14
|
priceFormatted: string;
|
|
15
15
|
price: number;
|
|
16
|
+
originalPrice?: number;
|
|
17
|
+
originalPriceFormatted?: string;
|
|
16
18
|
providerData?: string;
|
|
17
19
|
subtitle?: string;
|
|
18
20
|
title: string;
|
|
@@ -26,9 +28,15 @@ export interface PluginCatalogItem {
|
|
|
26
28
|
url?: string;
|
|
27
29
|
productSku?: string;
|
|
28
30
|
catalogId?: string;
|
|
31
|
+
inventoryStatus?: PluginCatalogItemInventoryStatus;
|
|
29
32
|
}
|
|
30
33
|
export interface PluginCatalogItemImage {
|
|
31
34
|
url: string;
|
|
32
35
|
altText?: string;
|
|
33
36
|
}
|
|
37
|
+
export declare enum PluginCatalogItemInventoryStatus {
|
|
38
|
+
Unknown = "Unknown",
|
|
39
|
+
InStock = "InStock",
|
|
40
|
+
OutOfStock = "OutOfStock"
|
|
41
|
+
}
|
|
34
42
|
export declare function makePluginCatalogItem(data?: Partial<PluginCatalogItem>): PluginCatalogItem;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export interface CartItemPayload {
|
|
2
|
+
cartItemId: string;
|
|
3
|
+
lineItems: Array<LineItem>;
|
|
4
|
+
shipping: Shipping | undefined;
|
|
5
|
+
}
|
|
6
|
+
export interface LineItem {
|
|
7
|
+
cartItemId: string;
|
|
8
|
+
quantity: number;
|
|
9
|
+
}
|
|
10
|
+
export interface Shipping {
|
|
11
|
+
firstName: string;
|
|
12
|
+
lastName: string;
|
|
13
|
+
address1: string;
|
|
14
|
+
address2?: string;
|
|
15
|
+
city: string;
|
|
16
|
+
state: string;
|
|
17
|
+
postalCode: string;
|
|
18
|
+
phoneNumber: string;
|
|
19
|
+
}
|
|
20
|
+
export interface ItemDetail {
|
|
21
|
+
cartItemId: string;
|
|
22
|
+
currency: string;
|
|
23
|
+
totalPrice: number;
|
|
24
|
+
providerData: string;
|
|
25
|
+
}
|
|
@@ -5,12 +5,12 @@ export type Signals = (CoreSignals | CartSignals) & {
|
|
|
5
5
|
export type CoreSignals = LoadStart | LoadComplete | Activation | Impression | Viewed | Response | Dismissal | UserInteraction | InstantPurchaseDismissal | ProductItemResponse;
|
|
6
6
|
export type ResponseActionPayload = CaptureOnlyAction | UrlAction | ExternalAction | FulfillmentAction;
|
|
7
7
|
export type CartSignals = CartItemInstantPurchaseInitiated | CartItemInstantPurchase | CartItemInstantPurchaseFailure | CartItemQuantitySelected;
|
|
8
|
-
export type UniqueSignal = LoadStart | LoadComplete | Activation | Impression | Viewed | Response | Dismissal |
|
|
8
|
+
export type UniqueSignal = LoadStart | LoadComplete | Activation | Impression | Viewed | Response | Dismissal | InstantPurchaseDismissal | CartItemInstantPurchaseInitiated | CartItemInstantPurchase | CartItemInstantPurchaseFailure;
|
|
9
9
|
export declare enum InitiatedBy {
|
|
10
10
|
DCUI = "DCUI",
|
|
11
11
|
Partner = "partner"
|
|
12
12
|
}
|
|
13
|
-
export type RepeatableSignal = CartItemQuantitySelected | ProductItemResponse;
|
|
13
|
+
export type RepeatableSignal = CartItemQuantitySelected | ProductItemResponse | UserInteraction;
|
|
14
14
|
export interface LoadComplete {
|
|
15
15
|
name: 'SignalLoadComplete';
|
|
16
16
|
parentGuid: string;
|
|
@@ -15,3 +15,4 @@ export declare const INCORRECTLY_HANDLE_EXTERNAL_ACTION = "INCORRECTLY_HANDLE_EX
|
|
|
15
15
|
export declare const FAILED_TO_LOAD_FONT = "FAILED_TO_LOAD_FONT";
|
|
16
16
|
export declare const FAILED_TO_ESTABLISH_PARTNER_VALIDATION = "FAILED_TO_ESTABLISH_PARTNER_VALIDATION";
|
|
17
17
|
export declare const PARTNER_VALIDATION_UPDATE_FAILED = "PARTNER_VALIDATION_UPDATE_FAILED";
|
|
18
|
+
export declare const CART_SERVICE_RESPONSE_ERROR = "CART_SERVICE_RESPONSE_ERROR";
|
|
@@ -5,6 +5,7 @@ export declare function getDisplaySettings(preset?: LayoutDisplayPreset | null,
|
|
|
5
5
|
applyHighestZIndex: boolean;
|
|
6
6
|
replaceTargetElement: string;
|
|
7
7
|
outerCss: {
|
|
8
|
+
zIndex?: number | undefined;
|
|
8
9
|
maxWidth?: string | undefined;
|
|
9
10
|
transform?: string | undefined;
|
|
10
11
|
top?: string | undefined;
|
|
@@ -20,6 +21,7 @@ export declare function getDisplaySettings(preset?: LayoutDisplayPreset | null,
|
|
|
20
21
|
} | {
|
|
21
22
|
autoresize: boolean;
|
|
22
23
|
css: {
|
|
24
|
+
zIndex?: number | undefined;
|
|
23
25
|
maxWidth?: string | undefined;
|
|
24
26
|
transform?: string | undefined;
|
|
25
27
|
top?: string | undefined;
|
|
@@ -37,6 +39,7 @@ export declare function getDisplaySettings(preset?: LayoutDisplayPreset | null,
|
|
|
37
39
|
applyHighestZIndex: boolean;
|
|
38
40
|
replaceTargetElement: string;
|
|
39
41
|
css: {
|
|
42
|
+
zIndex?: number | undefined;
|
|
40
43
|
maxWidth?: string | undefined;
|
|
41
44
|
transform?: string | undefined;
|
|
42
45
|
top?: string | undefined;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ChannelTakeEffect, PutEffect, CancelledEffect } from 'redux-saga/effects';
|
|
2
|
+
import { InitiateCartItemEvent, CartItemResponse } from '../../../../domain/src/behaviors';
|
|
3
|
+
import { CartItemPayload } from '../../../../domain/src/models';
|
|
4
|
+
import { EventChannel } from 'redux-saga';
|
|
5
|
+
import { PartnerInteractionService } from '../../../../plugin-utils/src/index';
|
|
6
|
+
export declare function initializeCartService(partnerInteractionService: PartnerInteractionService): Generator<import("redux-saga/effects").ForkEffect<void>, void, unknown>;
|
|
7
|
+
export declare function processCartServiceEvent(action: InitiateCartItemEvent): Generator<PutEffect<{
|
|
8
|
+
type: string;
|
|
9
|
+
payload: {
|
|
10
|
+
name: string;
|
|
11
|
+
body: CartItemPayload;
|
|
12
|
+
};
|
|
13
|
+
}>, void, unknown>;
|
|
14
|
+
export declare function handleCartServiceResponse(action: CartItemResponse): Generator<never, void, unknown>;
|
|
15
|
+
export declare function createCartServiceResponseChannel(partnerInteractionService: PartnerInteractionService): EventChannel<CartItemResponse['payload']>;
|
|
16
|
+
export declare function listenForCartServiceResponse(partnerInteractionService: PartnerInteractionService): Generator<PutEffect | CancelledEffect | ChannelTakeEffect<CartItemResponse['payload']>, void, CartItemResponse['payload']>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { LayoutSchemaModel } from '@rokt/dcui-layout-schema';
|
|
2
|
-
export declare function tryMakeEscapeHatch(schema: LayoutSchemaModel): JSX.Element | undefined;
|
|
2
|
+
export declare function tryMakeEscapeHatch(schema: LayoutSchemaModel, testId?: string): JSX.Element | undefined;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { ConditionalStyleTransition, BackgroundStylingProperties, FlexChildStylingProperties, BorderStylingProperties, ContainerStylingProperties, DimensionStylingProperties, LayoutStyle, NonInteractableChildren, WhenPredicate, SpacingStylingProperties, BasicStateStylingBlock } from '@rokt/dcui-layout-schema';
|
|
2
|
+
export interface ReadMoreTextStyles {
|
|
3
|
+
container?: null | ContainerStylingProperties;
|
|
4
|
+
background?: null | BackgroundStylingProperties;
|
|
5
|
+
border?: null | BorderStylingProperties;
|
|
6
|
+
dimension?: null | DimensionStylingProperties;
|
|
7
|
+
flexChild?: null | FlexChildStylingProperties;
|
|
8
|
+
spacing?: null | SpacingStylingProperties;
|
|
9
|
+
}
|
|
10
|
+
export interface ReadMoreTextElements {
|
|
11
|
+
own: BasicStateStylingBlock<ReadMoreTextStyles>[];
|
|
12
|
+
}
|
|
13
|
+
export interface ReadMoreTextModel<Children, Predicates> {
|
|
14
|
+
a11y_label?: null | string;
|
|
15
|
+
response_key?: null | string;
|
|
16
|
+
styles?: null | LayoutStyle<ReadMoreTextElements, ConditionalStyleTransition<ReadMoreTextTransitions, Predicates>>;
|
|
17
|
+
children: Children[];
|
|
18
|
+
}
|
|
19
|
+
export interface ReadMoreTextTransitions {
|
|
20
|
+
own?: null | ReadMoreTextStyles;
|
|
21
|
+
}
|
|
22
|
+
export interface ReadMoreTextProps {
|
|
23
|
+
schema: ReadMoreTextModel<NonInteractableChildren, WhenPredicate> & {
|
|
24
|
+
title: string;
|
|
25
|
+
preButtonText: string;
|
|
26
|
+
};
|
|
27
|
+
testId?: string;
|
|
28
|
+
}
|
|
29
|
+
export declare function ReadMoreText(props: ReadMoreTextProps): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { LayoutStyle, BasicStateStylingBlock, BasicTextStyle } from '@rokt/dcui-layout-schema';
|
|
2
|
+
export interface ScrollToTargetElements {
|
|
3
|
+
own: BasicStateStylingBlock<BasicTextStyle>[];
|
|
4
|
+
text: BasicStateStylingBlock<BasicTextStyle>[];
|
|
5
|
+
highlighted: BasicStateStylingBlock<BasicTextStyle>[];
|
|
6
|
+
}
|
|
7
|
+
export interface ScrollToTargetTarget {
|
|
8
|
+
key: string;
|
|
9
|
+
value: string;
|
|
10
|
+
}
|
|
11
|
+
export interface ScrollToTargetModel {
|
|
12
|
+
target: ScrollToTargetTarget;
|
|
13
|
+
text: string;
|
|
14
|
+
highlightedText: string;
|
|
15
|
+
styles?: null | LayoutStyle<ScrollToTargetElements, never>;
|
|
16
|
+
a11yLabel?: string;
|
|
17
|
+
}
|
|
18
|
+
export interface ScrollToTargetProps {
|
|
19
|
+
/**
|
|
20
|
+
* - `target`: object with key and value to identify the target element
|
|
21
|
+
* - `key`: the attribute name (e.g., 'aria-label', 'data-testid', 'id')
|
|
22
|
+
* - `value`: the attribute value to search for
|
|
23
|
+
* - `text`: the full text content (supports data mapping)
|
|
24
|
+
* - `highlightedText`: the portion of text that should be highlighted and clickable (supports data mapping)
|
|
25
|
+
* - `styles`:
|
|
26
|
+
* * `elements`:
|
|
27
|
+
* - `own`: styles for container
|
|
28
|
+
* * `dimension`
|
|
29
|
+
* * `flexChild`
|
|
30
|
+
* * `spacing`
|
|
31
|
+
* * `background`
|
|
32
|
+
* * `text`
|
|
33
|
+
* - `highlighted`: styles for highlighted (clickable) text
|
|
34
|
+
* * `dimension`
|
|
35
|
+
* * `flexChild`
|
|
36
|
+
* * `spacing`
|
|
37
|
+
* * `background`
|
|
38
|
+
* * `text`
|
|
39
|
+
* - `text`: styles for regular (non-highlighted) text
|
|
40
|
+
* * `dimension`
|
|
41
|
+
* * `flexChild`
|
|
42
|
+
* * `spacing`
|
|
43
|
+
* * `background`
|
|
44
|
+
* * `text`
|
|
45
|
+
* - `a11yLabel`: optional accessibility label for screen readers
|
|
46
|
+
*/
|
|
47
|
+
schema: ScrollToTargetModel;
|
|
48
|
+
testId?: string;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* The ScrollToTarget is a specialized text component that displays text with a highlighted portion.
|
|
52
|
+
* Only the highlighted text is clickable and triggers smooth scrolling to a target element.
|
|
53
|
+
* The component supports separate styling for regular text and highlighted text portions.
|
|
54
|
+
* Target elements are identified by a configurable attribute key-value pair.
|
|
55
|
+
*/
|
|
56
|
+
export declare function ScrollToTarget({ schema, testId }: ScrollToTargetProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { LayoutStyle, BasicStateStylingBlock, LayoutSchemaModel, DimensionStylingProperties, SpacingStylingProperties, BackgroundStylingProperties, BorderStylingProperties, ContainerStylingProperties } from '@rokt/dcui-layout-schema';
|
|
2
|
+
export interface TooltipStyle {
|
|
3
|
+
container?: null | ContainerStylingProperties;
|
|
4
|
+
dimension?: null | DimensionStylingProperties;
|
|
5
|
+
spacing?: null | SpacingStylingProperties;
|
|
6
|
+
background?: null | BackgroundStylingProperties;
|
|
7
|
+
border?: null | BorderStylingProperties;
|
|
8
|
+
}
|
|
9
|
+
export interface TooltipElements {
|
|
10
|
+
own: BasicStateStylingBlock<TooltipStyle>[];
|
|
11
|
+
}
|
|
12
|
+
export interface TooltipModel {
|
|
13
|
+
children: LayoutSchemaModel[];
|
|
14
|
+
anchor: LayoutSchemaModel;
|
|
15
|
+
background?: LayoutSchemaModel;
|
|
16
|
+
styles?: null | LayoutStyle<TooltipElements, never>;
|
|
17
|
+
a11yLabel?: string;
|
|
18
|
+
}
|
|
19
|
+
export interface TooltipProps {
|
|
20
|
+
/**
|
|
21
|
+
* Tooltip component that displays rich content above an anchor element on hover/click
|
|
22
|
+
* - `children`: array of components to render as tooltip content (text, images, etc.)
|
|
23
|
+
* - `anchor`: single component to render as tooltip trigger (typically an info icon)
|
|
24
|
+
* - `background`: optional arrow/background component (no arrow if not provided)
|
|
25
|
+
* - `styles`:
|
|
26
|
+
* * `elements`:
|
|
27
|
+
* - `own`: styles for tooltip container
|
|
28
|
+
* * `dimension`
|
|
29
|
+
* * `spacing`
|
|
30
|
+
* * `background`
|
|
31
|
+
* * `container`
|
|
32
|
+
* * `border`
|
|
33
|
+
* - `a11yLabel`: optional accessibility label for screen readers
|
|
34
|
+
*/
|
|
35
|
+
schema: TooltipModel;
|
|
36
|
+
testId?: string;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* The Tooltip is a specialized component that displays informational content above a trigger element.
|
|
40
|
+
* It supports both hover and click interactions for showing/hiding the tooltip content.
|
|
41
|
+
*/
|
|
42
|
+
export declare function Tooltip({ schema, testId }: TooltipProps): import("react/jsx-runtime").JSX.Element;
|
package/dist/modules/add-to-cart/src/components/when-catalog-quantity/when-catalog-quantity.d.ts
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { LayoutSchemaModel, EqualityWhenCondition, OrderableWhenCondition } from '@rokt/dcui-layout-schema';
|
|
2
|
+
export type QuantityCondition = EqualityWhenCondition | OrderableWhenCondition;
|
|
3
|
+
export interface QuantityPredicate {
|
|
4
|
+
condition: QuantityCondition;
|
|
5
|
+
value: number;
|
|
6
|
+
}
|
|
7
|
+
export interface WhenCatalogQuantityModel {
|
|
8
|
+
cartItemId: string;
|
|
9
|
+
predicates: Array<QuantityPredicate>;
|
|
10
|
+
children: Array<LayoutSchemaModel>;
|
|
11
|
+
}
|
|
12
|
+
export interface WhenCatalogQuantityProps {
|
|
13
|
+
schema: WhenCatalogQuantityModel;
|
|
14
|
+
testId?: string;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* The WhenCatalogQuantity component conditionally renders children based on
|
|
18
|
+
* catalog item quantity conditions using multiple predicates.
|
|
19
|
+
* ALL predicates must pass for the children to be displayed.
|
|
20
|
+
*
|
|
21
|
+
*/
|
|
22
|
+
export declare function WhenCatalogQuantity({ schema, testId, }: WhenCatalogQuantityProps): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -14,5 +14,7 @@ export declare const sagaActionTypes: {
|
|
|
14
14
|
readonly SET_PARTNER_VALIDATION_STATUS: "GLOBAL/SET_PARTNER_VALIDATION_STATUS";
|
|
15
15
|
readonly SET_GLOBAL_OFFER_DATA_CART: "GLOBAL/SET_GLOBAL_OFFER_DATA_CART";
|
|
16
16
|
readonly LAUNCH_CHILD_LAYOUT: "GLOBAL/LAUNCH_CHILD_LAYOUT";
|
|
17
|
+
readonly INITIATE_CART_ITEM_EVENT: "GLOBAL/CART_ITEM_EVENT/INITIATE";
|
|
18
|
+
readonly CART_ITEM_RESPONSE: "GLOBAL/CART_ITEM_EVENT/RESPONSE";
|
|
17
19
|
};
|
|
18
20
|
export declare function appSagas(gateway: GlobalGateway, logger: (log: Log) => void): Generator<import("redux-saga/effects").AllEffect<import("redux-saga/effects").ForkEffect<void>>, void, unknown>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './selectors';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PluginCatalogItem, UpsellItem } from '../../../../libraries/domain/src/models';
|
|
2
2
|
import { InstantPurchase } from '@rokt/partner-integration';
|
|
3
|
-
import { FulfillmentDetailsState } from '../models';
|
|
3
|
+
import { FulfillmentDetailsState, OfferLifecycleEventState } from '../models';
|
|
4
4
|
export type InitiateInstantPurchasePayload = {
|
|
5
5
|
catalogItem: PluginCatalogItem;
|
|
6
6
|
quantity: number;
|
|
@@ -57,4 +57,9 @@ export type SetFulfillmentDetails = {
|
|
|
57
57
|
type: typeof SET_FULFILLMENT_DETAILS;
|
|
58
58
|
payload: FulfillmentDetailsState;
|
|
59
59
|
};
|
|
60
|
+
export declare const SET_OFFER_LIFECYCLE_EVENT = "INSTANT_PURCHASE/SET_OFFER_LIFECYCLE_EVENT";
|
|
61
|
+
export type SetOfferLifecycleEvent = {
|
|
62
|
+
type: typeof SET_OFFER_LIFECYCLE_EVENT;
|
|
63
|
+
payload: OfferLifecycleEventState;
|
|
64
|
+
};
|
|
60
65
|
export type InstantPurchaseActions = InitiateInstantPurchase;
|