@rokt/dcui-orchestrator 0.0.2-rc.5 → 0.0.2-rc.7
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/hooks/useScrollTrap.d.ts +2 -0
- package/dist/index.cjs +38 -28
- package/dist/index.js +39 -29
- package/dist/libraries/dcui-components/src/components/child-layout-handler/child-layout-handler.d.ts +5 -0
- package/dist/libraries/dcui-components/src/components/child-layout-handler/index.d.ts +1 -0
- package/dist/libraries/dcui-components/src/components/copy-to-clipboard-button/copy-to-clipboard-button.d.ts +48 -0
- package/dist/libraries/dcui-components/src/components/copy-to-clipboard-button/factory.d.ts +2 -0
- package/dist/libraries/dcui-components/src/components/copy-to-clipboard-button/index.d.ts +2 -0
- package/dist/libraries/dcui-components/src/components/index.d.ts +2 -0
- package/dist/libraries/dcui-components/src/components/partner-event-button-trigger/factory.d.ts +2 -0
- package/dist/libraries/dcui-components/src/components/partner-event-button-trigger/index.d.ts +2 -0
- package/dist/libraries/dcui-components/src/components/partner-event-button-trigger/partner-event-button-trigger.d.ts +6 -0
- package/dist/libraries/dcui-components/src/contexts/index.d.ts +1 -0
- package/dist/libraries/dcui-components/src/contexts/schema-version-context.d.ts +2 -0
- package/dist/libraries/domain/src/behaviors/child-layout.d.ts +6 -0
- package/dist/libraries/domain/src/behaviors/global-actions.d.ts +3 -1
- package/dist/libraries/domain/src/behaviors/index.d.ts +1 -0
- package/dist/libraries/domain/src/behaviors/send-partner.d.ts +14 -2
- package/dist/libraries/domain/src/models/layout/index.d.ts +1 -0
- package/dist/libraries/domain/src/models/layout/layout-child-config.d.ts +4 -0
- package/dist/libraries/domain/src/models/layout/layout-child-layout.d.ts +8 -0
- package/dist/libraries/domain/src/models/layout/layout-variant.d.ts +3 -1
- package/dist/libraries/domain/src/models/partner-event.d.ts +1 -1
- package/dist/libraries/domain/src/models/plugin/index.d.ts +1 -0
- package/dist/libraries/domain/src/models/plugin/plugin-child-layout-model.d.ts +6 -2
- package/dist/libraries/domain/src/models/plugin/plugin-layout-child.d.ts +9 -0
- package/dist/libraries/domain/src/models/plugin/plugin-layout-variant.d.ts +2 -0
- package/dist/libraries/domain/src/models/plugin/plugin-offer.d.ts +3 -0
- package/dist/libraries/module-connector/src/main.d.ts +3 -3
- package/dist/libraries/module-connector/src/models/module-attributes.d.ts +3 -1
- package/dist/libraries/module-connector/src/models/module-connector-builder.d.ts +5 -3
- package/dist/libraries/module-connector/src/models/module.d.ts +1 -1
- package/dist/libraries/orchestrator/src/actions/index.d.ts +2 -2
- package/dist/modules/add-to-cart/src/models/state/index.d.ts +0 -1
- package/dist/modules/add-to-cart/src/reducers/index.d.ts +5 -3
- package/dist/modules/add-to-cart/src/sagas/index.d.ts +1 -0
- package/dist/modules/instant-purchase/src/channels/channel.d.ts +3 -3
- package/dist/modules/instant-purchase/src/components/drop-down/drop-down.d.ts +7 -6
- package/dist/modules/instant-purchase/src/components/image-gallery/image-gallery.d.ts +28 -0
- package/dist/modules/instant-purchase/src/hooks/index.d.ts +1 -0
- package/dist/modules/instant-purchase/src/hooks/use-image-mapper.d.ts +2 -0
- package/dist/modules/instant-purchase/src/reducers/index.d.ts +4 -3
- package/dist/modules/instant-purchase/src/sagas/error-codes.d.ts +2 -0
- package/dist/modules/instant-purchase/src/sagas/index.d.ts +1 -0
- package/dist/modules/instant-purchase/src/sagas/instant-purchase/sagas.d.ts +8 -3
- package/dist/modules/layouts-xp-sandbox/src/reducers/index.d.ts +6 -4
- package/dist/modules/layouts-xp-sandbox/src/sagas/index.d.ts +1 -0
- package/dist/modules/standard-marketing/src/reducers/index.d.ts +8 -4
- package/dist/modules/standard-marketing/src/sagas/error-codes.d.ts +2 -0
- package/dist/modules/standard-marketing/src/sagas/index.d.ts +1 -0
- package/dist/modules/standard-marketing/src/sagas/offer-engagement/channels.d.ts +8 -1
- package/dist/modules/standard-marketing/src/sagas/offer-engagement/sagas.d.ts +4 -3
- package/package.json +1 -1
- package/dist/modules/add-to-cart/src/models/state/static-data.d.ts +0 -5
- package/dist/modules/add-to-cart/src/reducers/static-data/index.d.ts +0 -1
- package/dist/modules/add-to-cart/src/reducers/static-data/reducer.d.ts +0 -4
- package/dist/modules/instant-purchase/src/models/index.d.ts +0 -1
- package/dist/modules/instant-purchase/src/models/state/index.d.ts +0 -1
- package/dist/modules/instant-purchase/src/models/state/static-data.d.ts +0 -5
- package/dist/modules/instant-purchase/src/reducers/static-data/index.d.ts +0 -1
- package/dist/modules/instant-purchase/src/reducers/static-data/reducer.d.ts +0 -4
- package/dist/modules/layouts-xp-sandbox/src/reducers/mock/index.d.ts +0 -1
- package/dist/modules/layouts-xp-sandbox/src/reducers/mock/reducer.d.ts +0 -9
- package/dist/modules/standard-marketing/src/reducers/mock/index.d.ts +0 -1
- package/dist/modules/standard-marketing/src/reducers/mock/reducer.d.ts +0 -9
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './child-layout-handler';
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { LayoutSchemaModel, CopyToClipboardButtonModel, WhenPredicate } from '@rokt/dcui-layout-schema';
|
|
2
|
+
export interface CopyToClipboardButtonProps {
|
|
3
|
+
/**
|
|
4
|
+
* - `a11yLabel`: the aria-label for the button
|
|
5
|
+
* - `value`: the text to be copied to the clipboard
|
|
6
|
+
* - `customStateKey`: the name of the custom state that should be updated.
|
|
7
|
+
* - `children`: it can accept below nodes,
|
|
8
|
+
* * `Row`
|
|
9
|
+
* * `FlowRow`
|
|
10
|
+
* * `Column`
|
|
11
|
+
* * `ZStack`
|
|
12
|
+
* * `BasicText`
|
|
13
|
+
* * `StaticImage`
|
|
14
|
+
* * `StaticIcon`
|
|
15
|
+
* * `DataImage` -> When present in Layout Variant
|
|
16
|
+
* * `DataIcon` -> When present in Layout Variant
|
|
17
|
+
* * `When`
|
|
18
|
+
* * `InlineContainer`
|
|
19
|
+
* - `styles`:
|
|
20
|
+
* * `elements`:
|
|
21
|
+
* * `own`:
|
|
22
|
+
* - `container`
|
|
23
|
+
* - `background`
|
|
24
|
+
* - `border`
|
|
25
|
+
* - `dimension`
|
|
26
|
+
* - `flexChild`
|
|
27
|
+
* - `spacing`
|
|
28
|
+
* * `transitions`:
|
|
29
|
+
* - `type`: 'Conditional'
|
|
30
|
+
* - `transition`:
|
|
31
|
+
* * `predicates`: WhenPredicate[]
|
|
32
|
+
* * `duration`: number
|
|
33
|
+
* * `value`:
|
|
34
|
+
* * `own`:
|
|
35
|
+
* - `container`
|
|
36
|
+
* - `background`
|
|
37
|
+
* - `border`
|
|
38
|
+
* - `dimension`
|
|
39
|
+
* - `flexChild`
|
|
40
|
+
* - `spacing`
|
|
41
|
+
*/
|
|
42
|
+
schema: CopyToClipboardButtonModel<LayoutSchemaModel, WhenPredicate>;
|
|
43
|
+
testId?: string;
|
|
44
|
+
}
|
|
45
|
+
/**The CopyToClipboardButton is a button that copies a text to the clipboard on click.<br>
|
|
46
|
+
* *Where can we use this: __outer layout__, __layout variant__ & __child layout__*
|
|
47
|
+
* */
|
|
48
|
+
export declare function CopyToClipboardButton(props: CopyToClipboardButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { WhenPredicate, PartnerEventButtonTriggerModel, LayoutVariantNonInteractableChildren } from "@rokt/dcui-layout-schema";
|
|
2
|
+
export interface PartnerEventButtonTriggerProps {
|
|
3
|
+
schema: PartnerEventButtonTriggerModel<LayoutVariantNonInteractableChildren, WhenPredicate>;
|
|
4
|
+
testId?: string;
|
|
5
|
+
}
|
|
6
|
+
export declare function PartnerEventButtonTrigger(props: PartnerEventButtonTriggerProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -10,7 +10,8 @@ import { PrepareSignal } from './prepare-signal';
|
|
|
10
10
|
import { OpenLink } from './open-link';
|
|
11
11
|
import { SetPartnerValidationStatus } from './partner-validation';
|
|
12
12
|
import { SetGlobalOfferDataCart } from './global-offer-data-state';
|
|
13
|
-
|
|
13
|
+
import { LaunchChildLayout } from './child-layout';
|
|
14
|
+
export type GlobalActions = RaiseMetric | PrepareSignal | OfferEngagement | RaiseSignal | OfferLifecycle | SendPartner<OfferOutboundPartnerEvent> | SetCustomState | SetDomainState | OpenLink | SetPartnerValidationStatus | SetGlobalOfferDataCart | LaunchChildLayout;
|
|
14
15
|
export declare const GlobalActionTypes: {
|
|
15
16
|
readonly RAISE_METRIC: "GLOBAL/RAISE_METRIC";
|
|
16
17
|
readonly PREPARE_SIGNAL: "GLOBAL/PREPARE_SIGNAL";
|
|
@@ -23,5 +24,6 @@ export declare const GlobalActionTypes: {
|
|
|
23
24
|
readonly OPEN_LINK: "GLOBAL/OPEN_LINK";
|
|
24
25
|
readonly SET_PARTNER_VALIDATION_STATUS: "GLOBAL/SET_PARTNER_VALIDATION_STATUS";
|
|
25
26
|
readonly SET_GLOBAL_OFFER_DATA_CART: "GLOBAL/SET_GLOBAL_OFFER_DATA_CART";
|
|
27
|
+
readonly LAUNCH_CHILD_LAYOUT: "GLOBAL/LAUNCH_CHILD_LAYOUT";
|
|
26
28
|
};
|
|
27
29
|
export type GlobalActionType = GlobalActions['type'];
|
|
@@ -12,14 +12,26 @@ export type OutboundRealtimeOfferFulfillmentReferralEventPayload = {
|
|
|
12
12
|
referralCreativeID: string;
|
|
13
13
|
};
|
|
14
14
|
};
|
|
15
|
+
export type OutboundRealtimeOfferFulfillmentSuccessEventPayload = {
|
|
16
|
+
name: 'REALTIME_OFFER_FULFILLMENT_SUCCESS';
|
|
17
|
+
body: Record<string, string>;
|
|
18
|
+
};
|
|
15
19
|
export type OutboundUpdateCartEventPayload = {
|
|
16
20
|
name: 'V2_CART_ITEM_UPDATED';
|
|
17
21
|
body: Record<string, PluginCartItem | null>;
|
|
18
22
|
};
|
|
19
|
-
export type
|
|
23
|
+
export type OutboundUpsellCreativeSentEventPayload = {
|
|
24
|
+
name: 'UPSELL_CREATIVE_SENT';
|
|
25
|
+
body: {
|
|
26
|
+
offerId: string;
|
|
27
|
+
title: string;
|
|
28
|
+
description: string;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
export type OutboundPartnerEventPayload<EventType extends OutboundPartnerEvent> = EventType extends 'REALTIME_OFFER_FULFILLMENT_REFERRAL' ? OutboundRealtimeOfferFulfillmentReferralEventPayload : EventType extends 'REALTIME_OFFER_FULFILLMENT_SUCCESS' ? OutboundRealtimeOfferFulfillmentSuccessEventPayload : EventType extends 'V2_CART_ITEM_UPDATED' | 'CART_ITEM_INSTANT_PURCHASE' | 'UPSELL_CREATIVE_SENT' ? never : {
|
|
20
32
|
name: EventType;
|
|
21
33
|
};
|
|
22
34
|
export type SendPartner<EventType extends OutboundPartnerEvent> = {
|
|
23
35
|
type: typeof SEND_PARTNER;
|
|
24
|
-
payload: OutboundPartnerEventPayload<EventType> | OutboundUpdateCartEventPayload | OutboundInstantPurchaseEventPayload;
|
|
36
|
+
payload: OutboundPartnerEventPayload<EventType> | OutboundUpdateCartEventPayload | OutboundInstantPurchaseEventPayload | OutboundUpsellCreativeSentEventPayload;
|
|
25
37
|
};
|
|
@@ -2,8 +2,12 @@ import { LayoutDisplayPreset, LayoutSchemaModel, LayoutSettings, ChildRootSchema
|
|
|
2
2
|
import { LayoutOffer } from './layout-offer';
|
|
3
3
|
export interface LayoutChildConfig<ChildRootLayoutSchema> {
|
|
4
4
|
instanceGuid: string;
|
|
5
|
+
childLayoutId: string;
|
|
5
6
|
layoutSchemaVersion: string;
|
|
6
7
|
childLayoutSchema: string | ChildRootLayoutSchema;
|
|
7
8
|
offer: LayoutOffer;
|
|
9
|
+
content?: {
|
|
10
|
+
text: Record<string, string>;
|
|
11
|
+
};
|
|
8
12
|
}
|
|
9
13
|
export declare function makeLayoutChildConfig(data?: Partial<LayoutChildConfig<ChildRootSchemaModel<LayoutSchemaModel, LayoutDisplayPreset, LayoutSettings, WhenPredicate>>>): LayoutChildConfig<ChildRootSchemaModel<LayoutSchemaModel, LayoutDisplayPreset, LayoutSettings, WhenPredicate>>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { LayoutDisplayPreset, LayoutSchemaModel, LayoutSettings, ChildRootSchemaModel, WhenPredicate } from '@rokt/dcui-layout-schema';
|
|
2
|
+
export interface LayoutChildLayout<ChildRootLayoutSchema> {
|
|
3
|
+
childLayoutId: string;
|
|
4
|
+
instanceGuid: string;
|
|
5
|
+
targetElementSelector: string;
|
|
6
|
+
childLayoutSchema: string | ChildRootLayoutSchema;
|
|
7
|
+
}
|
|
8
|
+
export declare function makeChildLayout(data?: Partial<LayoutChildLayout<ChildRootSchemaModel<LayoutSchemaModel, LayoutDisplayPreset, LayoutSettings, WhenPredicate>>>): LayoutChildLayout<ChildRootSchemaModel<LayoutSchemaModel, LayoutDisplayPreset, LayoutSettings, WhenPredicate>>;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import { LayoutSchemaModel } from '@rokt/dcui-layout-schema';
|
|
1
|
+
import { ChildRootSchemaModel, LayoutDisplayPreset, LayoutSchemaModel, LayoutSettings, WhenPredicate } from '@rokt/dcui-layout-schema';
|
|
2
|
+
import { LayoutChildLayout } from './layout-child-layout';
|
|
2
3
|
export interface LayoutVariant<LayoutSchema> {
|
|
3
4
|
layoutVariantId: string;
|
|
4
5
|
moduleName: string;
|
|
5
6
|
layoutVariantSchema: string | LayoutSchema;
|
|
7
|
+
childLayouts?: Array<LayoutChildLayout<ChildRootSchemaModel<LayoutSchemaModel, LayoutDisplayPreset, LayoutSettings, WhenPredicate>>>;
|
|
6
8
|
}
|
|
7
9
|
export declare function makeLayoutVariant(data?: Partial<LayoutVariant<LayoutSchemaModel>>): LayoutVariant<LayoutSchemaModel>;
|
|
@@ -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' | 'REALTIME_OFFER_FULFILLMENT_REFERRAL';
|
|
2
|
+
export type OfferOutboundPartnerEvent = CatalogOutboundPartnerEvent | 'OFFER_ENGAGEMENT' | 'POSITIVE_ENGAGEMENT' | 'UPSELL_CREATIVE_SENT' | 'REALTIME_OFFER_FULFILLMENT_REFERRAL' | 'REALTIME_OFFER_FULFILLMENT_SUCCESS';
|
|
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;
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
import { LayoutSchemaModel, LayoutDisplayPreset, LayoutSettings, ChildRootSchemaModel, WhenPredicate } from '@rokt/dcui-layout-schema';
|
|
2
2
|
import { PluginOffer } from './plugin-offer';
|
|
3
|
-
export interface PluginChildLayoutModel<ChildRootLayoutSchema
|
|
3
|
+
export interface PluginChildLayoutModel<ChildRootLayoutSchema = ChildRootSchemaModel<LayoutSchemaModel, LayoutDisplayPreset, LayoutSettings, WhenPredicate>> {
|
|
4
4
|
instanceGuid: string;
|
|
5
|
+
childLayoutId: string;
|
|
5
6
|
layoutSchemaVersion: string;
|
|
6
7
|
childLayoutSchema: ChildRootLayoutSchema;
|
|
7
8
|
offer: PluginOffer;
|
|
9
|
+
content?: {
|
|
10
|
+
text?: Record<string, string>;
|
|
11
|
+
};
|
|
8
12
|
}
|
|
9
13
|
export declare function makeChildLayoutRootSchemaModel(data?: Partial<ChildRootSchemaModel<LayoutSchemaModel, LayoutDisplayPreset, LayoutSettings, WhenPredicate>>): ChildRootSchemaModel<LayoutSchemaModel, LayoutDisplayPreset, LayoutSettings, WhenPredicate>;
|
|
10
|
-
export declare function makePluginChildLayoutModel(data?: Partial<PluginChildLayoutModel
|
|
14
|
+
export declare function makePluginChildLayoutModel(data?: Partial<PluginChildLayoutModel>): PluginChildLayoutModel;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { LayoutDisplayPreset, LayoutSchemaModel, LayoutSettings, WhenPredicate } from '@rokt/dcui-layout-schema';
|
|
2
|
+
import { ChildRootSchemaModel } from '@rokt/dcui-layout-schema';
|
|
3
|
+
export interface PluginLayoutChild<ChildRootLayoutSchema = ChildRootSchemaModel<LayoutSchemaModel, LayoutDisplayPreset, LayoutSettings, WhenPredicate>> {
|
|
4
|
+
childLayoutId: string;
|
|
5
|
+
instanceGuid: string;
|
|
6
|
+
targetElementSelector: string;
|
|
7
|
+
childLayoutSchema: ChildRootLayoutSchema;
|
|
8
|
+
}
|
|
9
|
+
export declare function makePluginLayoutChild(data?: Partial<PluginLayoutChild>): PluginLayoutChild;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { LayoutSchemaModel } from '@rokt/dcui-layout-schema';
|
|
2
|
+
import { PluginLayoutChild } from './plugin-layout-child';
|
|
2
3
|
export interface PluginLayoutVariant<LayoutSchema> {
|
|
3
4
|
layoutVariantId: string;
|
|
4
5
|
moduleName: string;
|
|
5
6
|
layoutVariantSchema: LayoutSchema;
|
|
7
|
+
childLayouts?: Array<PluginLayoutChild>;
|
|
6
8
|
}
|
|
7
9
|
export declare function makePluginLayoutVariant(data?: Partial<PluginLayoutVariant<LayoutSchemaModel>>): PluginLayoutVariant<LayoutSchemaModel>;
|
|
@@ -7,5 +7,8 @@ export interface PluginOffer {
|
|
|
7
7
|
creative: PluginCreative;
|
|
8
8
|
metadata: Record<string, string>;
|
|
9
9
|
catalogItems?: Array<PluginCatalogItem>;
|
|
10
|
+
content?: {
|
|
11
|
+
text?: Record<string, string>;
|
|
12
|
+
};
|
|
10
13
|
}
|
|
11
14
|
export declare function makePluginOffer(data?: Partial<PluginOffer>): PluginOffer;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export {
|
|
3
|
-
export { IGateway, IDisposable, Gateway, GatewayFactory, ActionInterceptor, EmptyGateway, GlobalGateway, GlobalGatewayFactory, makeGatewayFactory, } from './models/gateway';
|
|
1
|
+
export { ModuleAttributes } from './models/module-attributes';
|
|
2
|
+
export { ModuleConnectorBuilder, AppSettings, } from './models/module-connector-builder';
|
|
3
|
+
export { IGateway, IDisposable, Gateway, GatewayFactory, ActionInterceptor, EmptyGateway, GlobalGateway, GlobalGatewayFactory, makeGatewayFactory, ModuleEventListener, } from './models/gateway';
|
|
4
4
|
export * from './models/module';
|
|
5
5
|
export { AbstractStore } from './models/abstract-store';
|
|
6
6
|
export { AbstractGlobalStore, GlobalStoreOfferContext, } from './models/abstract-global-store';
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { Interactivity } from '../../../domain/src/models';
|
|
2
|
-
export
|
|
2
|
+
export interface ModuleAttributes {
|
|
3
3
|
slotInstanceGuid: string;
|
|
4
4
|
layoutSchema: string;
|
|
5
5
|
offerData: string;
|
|
6
6
|
offerPositionIndex: number;
|
|
7
|
+
childLayouts: string;
|
|
8
|
+
schemaVersion: string;
|
|
7
9
|
visible: boolean;
|
|
8
10
|
container: 'row' | 'column';
|
|
9
11
|
interactivity: Interactivity;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { GlobalGateway, GlobalGatewayFactory } from './gateway';
|
|
2
|
-
import { Log, PluginOffer } from '../../../domain/src/models';
|
|
2
|
+
import { Log, PluginOffer, PluginLayoutChild } from '../../../domain/src/models';
|
|
3
3
|
import { LayoutSchemaModel } from '@rokt/dcui-layout-schema';
|
|
4
4
|
export interface AppSettings {
|
|
5
5
|
rootElement: HTMLElement;
|
|
@@ -7,15 +7,17 @@ export interface AppSettings {
|
|
|
7
7
|
logger: (log: Log) => void;
|
|
8
8
|
offerPositionIndex: number;
|
|
9
9
|
layoutSchema: LayoutSchemaModel;
|
|
10
|
+
schemaVersion: string;
|
|
11
|
+
childLayouts: PluginLayoutChild[];
|
|
10
12
|
offerData: PluginOffer;
|
|
11
13
|
pluginId: string;
|
|
12
14
|
}
|
|
13
15
|
export interface IModuleConnector extends HTMLElement {
|
|
14
16
|
getOfferPositionAttr(): number;
|
|
15
|
-
getJSONAttr<Result>(att: string): Result;
|
|
17
|
+
getJSONAttr<Result>(att: string, defaultValue?: string): Result;
|
|
16
18
|
connectedCallback(): void;
|
|
17
19
|
}
|
|
18
|
-
export
|
|
20
|
+
export declare class ModuleConnectorBuilder {
|
|
19
21
|
logger: (log: Log) => void;
|
|
20
22
|
appFactory?: (settings: AppSettings) => void;
|
|
21
23
|
gatewayFactory?: GlobalGatewayFactory;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SetPartnerValidationStatus } from '../../../domain/src/behaviors';
|
|
1
|
+
import { LaunchChildLayout, SetPartnerValidationStatus } from '../../../domain/src/behaviors';
|
|
2
2
|
import { LoadModules, ModuleActions } from './module';
|
|
3
3
|
import { ProcessProgression, ProgressionActions } from './progression';
|
|
4
4
|
import { SlotActions } from './slots';
|
|
@@ -60,4 +60,4 @@ export declare const sagaActionTypes: {
|
|
|
60
60
|
readonly LOG: "LOG";
|
|
61
61
|
readonly OPEN_LINK: "GLOBAL/OPEN_LINK";
|
|
62
62
|
};
|
|
63
|
-
export type SagasActions = CoreSagasActions | HandleConfigAction<PluginModel<LayoutSchemaModel, RootSchemaModel<LayoutSchemaModel, LayoutDisplayPreset, LayoutSettings>>> | LoadModules | DismissInstantPurchase | OfferLifecycle | OfferEngagement | ProcessProgression | SetPartnerValidationStatus;
|
|
63
|
+
export type SagasActions = CoreSagasActions | HandleConfigAction<PluginModel<LayoutSchemaModel, RootSchemaModel<LayoutSchemaModel, LayoutDisplayPreset, LayoutSettings>>> | LoadModules | DismissInstantPurchase | OfferLifecycle | OfferEngagement | ProcessProgression | LaunchChildLayout | SetPartnerValidationStatus;
|
|
@@ -1,18 +1,20 @@
|
|
|
1
1
|
import { GlobalActions } from '../../../../libraries/domain/src/behaviors';
|
|
2
|
+
import { ChildLayoutActions, childLayoutsReducer, ChildLayoutsState, StaticData, staticDataReducer } from '@rokt/module-utils';
|
|
2
3
|
import { cartReducer } from './cart/reducer';
|
|
3
|
-
import { CartState,
|
|
4
|
+
import { CartState, UserCreativeResponseHistory } from '../models';
|
|
4
5
|
import { UserCreativeResponseHistoryActions } from '../actions';
|
|
5
6
|
import { userCreativeResponseHistoryReducer } from './user-creative-response-history';
|
|
6
|
-
import { staticDataReducer } from './static-data';
|
|
7
7
|
export type AppState = {
|
|
8
8
|
cart: CartState;
|
|
9
9
|
userCreativeResponseHistory: UserCreativeResponseHistory;
|
|
10
10
|
staticData: StaticData;
|
|
11
|
+
childLayouts: ChildLayoutsState;
|
|
11
12
|
};
|
|
12
|
-
export type StateActions = GlobalActions | UserCreativeResponseHistoryActions;
|
|
13
|
+
export type StateActions = GlobalActions | UserCreativeResponseHistoryActions | ChildLayoutActions;
|
|
13
14
|
export declare const appReducers: {
|
|
14
15
|
cart: typeof cartReducer;
|
|
15
16
|
userCreativeResponseHistory: typeof userCreativeResponseHistoryReducer;
|
|
16
17
|
staticData: typeof staticDataReducer;
|
|
18
|
+
childLayouts: typeof childLayoutsReducer;
|
|
17
19
|
};
|
|
18
20
|
export declare function makeAppInitialState(data?: Partial<AppState>): AppState;
|
|
@@ -13,5 +13,6 @@ export declare const sagaActionTypes: {
|
|
|
13
13
|
readonly OPEN_LINK: "GLOBAL/OPEN_LINK";
|
|
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
|
+
readonly LAUNCH_CHILD_LAYOUT: "GLOBAL/LAUNCH_CHILD_LAYOUT";
|
|
16
17
|
};
|
|
17
18
|
export declare function appSagas(gateway: GlobalGateway, logger: (log: Log) => void): Generator<import("redux-saga/effects").AllEffect<import("redux-saga/effects").ForkEffect<void>>, void, unknown>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { InstantPurchase } from '@rokt/partner-integration';
|
|
2
|
-
import { CallEffect } from 'redux-saga/effects';
|
|
3
|
-
import { Task } from 'redux-saga';
|
|
2
|
+
import { PutEffect, CallEffect, ChannelTakeEffect } from 'redux-saga/effects';
|
|
4
3
|
import { EventChannel } from 'redux-saga';
|
|
5
4
|
import { GlobalGateway } from '../../../../libraries/module-connector/src/main';
|
|
5
|
+
import { InstantPurchasePartnerResponse } from '../actions/instant-purchase';
|
|
6
6
|
import { Log } from '../../../../libraries/domain/src/models';
|
|
7
7
|
export declare function makeInstantPurchasePartnerResponseChannel(gateway: GlobalGateway, logger: (log: Log) => void): EventChannel<InstantPurchase.CartItemInstantPurchaseResponseMessageBody>;
|
|
8
|
-
export declare function
|
|
8
|
+
export declare function handleInstantPurchaseResponse(channel: EventChannel<InstantPurchase.CartItemInstantPurchaseResponseMessageBody>, logger: (log: Log) => void): Generator<CallEffect<EventChannel<InstantPurchase.CartItemInstantPurchaseResponseMessageBody>> | ChannelTakeEffect<InstantPurchase.CartItemInstantPurchaseResponseMessageBody> | CallEffect<void> | PutEffect<InstantPurchasePartnerResponse>, void, InstantPurchase.CartItemInstantPurchaseResponseMessageBody>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { BackgroundStylingProperties, BasicStateStylingBlock, BorderStylingProperties, ConditionalStyleTransition, ContainerStylingProperties, DimensionStylingProperties, FlexChildStylingProperties, LayoutStyle, NonInteractableChildren, SpacingStylingProperties, TextStylingProperties, WhenPredicate } from '@rokt/dcui-layout-schema';
|
|
2
|
+
import { PluginCatalogItem } from '../../../../../libraries/domain/src/models';
|
|
2
3
|
export interface DropDownStyles {
|
|
3
4
|
container?: null | ContainerStylingProperties;
|
|
4
5
|
background?: null | BackgroundStylingProperties;
|
|
@@ -18,19 +19,19 @@ export interface DropDownElements {
|
|
|
18
19
|
dropDownListElement?: null | BasicStateStylingBlock<DropDownStyles>[];
|
|
19
20
|
}
|
|
20
21
|
export interface DropDownOptionData {
|
|
21
|
-
|
|
22
|
-
value: string;
|
|
22
|
+
catalogItem: PluginCatalogItem;
|
|
23
23
|
index: number;
|
|
24
24
|
}
|
|
25
|
-
interface DropDownModel<
|
|
26
|
-
a11yLabel?: string | null;
|
|
25
|
+
interface DropDownModel<NonInteractableChildren, Predicates> {
|
|
27
26
|
styles?: null | LayoutStyle<DropDownElements, ConditionalStyleTransition<DropDownTransitions, Predicates>>;
|
|
28
|
-
|
|
27
|
+
openTemplate: NonInteractableChildren;
|
|
28
|
+
closedTemplate: NonInteractableChildren;
|
|
29
|
+
closedDefaultTemplate: NonInteractableChildren;
|
|
29
30
|
options: DropDownOptionData[];
|
|
30
31
|
}
|
|
31
32
|
export interface DropDownProps {
|
|
32
33
|
/**
|
|
33
|
-
* - `
|
|
34
|
+
* - `openTemplate`, `closedTemplate`, `closedDefaultTemplate`: it can accept below nodes,
|
|
34
35
|
* * `Row`
|
|
35
36
|
* * `FlowRow
|
|
36
37
|
* * `Column`
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { BackgroundStylingProperties, BasicStateStylingBlock, BorderStylingProperties, ConditionalStyleTransition, ContainerStylingProperties, DataImageStyles, DimensionStylingProperties, FlexChildStylingProperties, LayoutStyle, RowStyle, SpacingStylingProperties, WhenPredicate } from '@rokt/dcui-layout-schema';
|
|
2
|
+
interface ImageGalleryStyles {
|
|
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
|
+
interface ImageGalleryElements {
|
|
11
|
+
own: BasicStateStylingBlock<ImageGalleryStyles>[];
|
|
12
|
+
mainImage: BasicStateStylingBlock<DataImageStyles>[];
|
|
13
|
+
thumbnailImage: BasicStateStylingBlock<DataImageStyles>[];
|
|
14
|
+
thumbnailList: BasicStateStylingBlock<RowStyle>[];
|
|
15
|
+
}
|
|
16
|
+
interface ImageGalleryTransitions {
|
|
17
|
+
own?: null | ImageGalleryStyles;
|
|
18
|
+
}
|
|
19
|
+
export interface ImageGalleryModel<Predicates> {
|
|
20
|
+
styles?: null | LayoutStyle<ImageGalleryElements, ConditionalStyleTransition<ImageGalleryTransitions, Predicates>>;
|
|
21
|
+
imageKeys: Array<string>;
|
|
22
|
+
}
|
|
23
|
+
export interface ImageGalleryProps {
|
|
24
|
+
schema: ImageGalleryModel<WhenPredicate>;
|
|
25
|
+
testId?: string;
|
|
26
|
+
}
|
|
27
|
+
export declare function ImageGallery(props: ImageGalleryProps): import("react/jsx-runtime").JSX.Element | null;
|
|
28
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './use-image-mapper';
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import { GlobalActions } from '../../../../libraries/domain/src/behaviors';
|
|
2
|
-
import { StaticData } from '
|
|
2
|
+
import { ChildLayoutActions, childLayoutsReducer, ChildLayoutsState, StaticData, staticDataReducer } from '@rokt/module-utils';
|
|
3
3
|
import { CatalogSelectionState } from '../models/state/catalog-selection';
|
|
4
|
-
import { staticDataReducer } from './static-data';
|
|
5
4
|
export type AppState = {
|
|
6
5
|
staticData: StaticData;
|
|
7
6
|
selectedItem: CatalogSelectionState;
|
|
7
|
+
childLayouts: ChildLayoutsState;
|
|
8
8
|
};
|
|
9
|
-
export type StateActions = GlobalActions;
|
|
9
|
+
export type StateActions = GlobalActions | ChildLayoutActions;
|
|
10
10
|
export declare const appReducers: {
|
|
11
11
|
staticData: typeof staticDataReducer;
|
|
12
12
|
selectedItem: (state: CatalogSelectionState | undefined, action: import("redux").AnyAction) => CatalogSelectionState;
|
|
13
|
+
childLayouts: typeof childLayoutsReducer;
|
|
13
14
|
};
|
|
14
15
|
export declare function makeAppInitialState(data?: Partial<AppState>): AppState;
|
|
@@ -2,3 +2,5 @@ export declare const INVALID_RESPONSE_OBJECT = "INVALID_RESPONSE_OBJECT";
|
|
|
2
2
|
export declare const MISSING_STATIC_DATA_IN_INSTANT_PURCHASE_MODULE = "MISSING_STATIC_DATA_IN_INSTANT_PURCHASE_MODULE";
|
|
3
3
|
export declare const MISSING_CATALOG_ITEMS = "MISSING_CATALOG_ITEMS";
|
|
4
4
|
export declare const MALFORMED_PARTNER_DATA = "MALFORMED_PARTNER_DATA";
|
|
5
|
+
export declare const INSTANT_PURCHASE_RESPONSE_TIMEOUT = "INSTANT_PURCHASE_RESPONSE_TIMEOUT";
|
|
6
|
+
export declare const INSTANT_PURCHASE_CHANNEL_ERROR = "INSTANT_PURCHASE_CHANNEL_ERROR";
|
|
@@ -14,5 +14,6 @@ export declare const sagaActionTypes: {
|
|
|
14
14
|
readonly OPEN_LINK: "GLOBAL/OPEN_LINK";
|
|
15
15
|
readonly SET_PARTNER_VALIDATION_STATUS: "GLOBAL/SET_PARTNER_VALIDATION_STATUS";
|
|
16
16
|
readonly SET_GLOBAL_OFFER_DATA_CART: "GLOBAL/SET_GLOBAL_OFFER_DATA_CART";
|
|
17
|
+
readonly LAUNCH_CHILD_LAYOUT: "GLOBAL/LAUNCH_CHILD_LAYOUT";
|
|
17
18
|
};
|
|
18
19
|
export declare function appSagas(gateway: GlobalGateway, logger: (log: Log) => void): Generator<import("redux-saga/effects").AllEffect<import("redux-saga/effects").ForkEffect<never>>, void, unknown>;
|
|
@@ -2,7 +2,7 @@ import { SelectEffect, PutEffect, CallEffect } from 'redux-saga/effects';
|
|
|
2
2
|
import { Log } from '../../../../../libraries/domain/src/models';
|
|
3
3
|
import { InitiateInstantPurchase, InstantPurchasePartnerResponse } from '../../actions/instant-purchase';
|
|
4
4
|
import { GlobalGateway } from '../../../../../libraries/module-connector/src/main';
|
|
5
|
-
import { StaticData } from '
|
|
5
|
+
import { StaticData } from '@rokt/module-utils';
|
|
6
6
|
export declare const INSTANT_PURCHASE_RESPONSE_TTL = 60000;
|
|
7
7
|
export declare function processInstantPurchaseCartItem(gateway: GlobalGateway, logger: (log: Log) => void, action: InitiateInstantPurchase): Generator<CallEffect<void> | import("redux-saga/effects").ForkEffect<void> | PutEffect<{
|
|
8
8
|
type: string;
|
|
@@ -27,7 +27,12 @@ export declare function processInstantPurchaseCartItem(gateway: GlobalGateway, l
|
|
|
27
27
|
}>, void, unknown>;
|
|
28
28
|
export declare function handleInstantPurchasePartnerResponse(logger: (log: Log) => void, action: InstantPurchasePartnerResponse): Generator<SelectEffect | PutEffect | CallEffect, void, StaticData | undefined>;
|
|
29
29
|
/** Visible for testing */
|
|
30
|
-
export declare function initiateInstantPurchaseResponseListening(gateway: GlobalGateway, logger: (log: Log) => void): Generator<import("redux-saga/effects").RaceEffect<CallEffect<
|
|
31
|
-
|
|
30
|
+
export declare function initiateInstantPurchaseResponseListening(gateway: GlobalGateway, logger: (log: Log) => void): Generator<CallEffect<void> | import("redux-saga/effects").RaceEffect<CallEffect<void> | CallEffect<true>> | PutEffect<{
|
|
31
|
+
type: string;
|
|
32
|
+
payload: {
|
|
33
|
+
event: string;
|
|
34
|
+
dismissalReason: string;
|
|
35
|
+
};
|
|
36
|
+
}>, void, {
|
|
32
37
|
timeout: any;
|
|
33
38
|
}>;
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { GlobalActions } from '../../../../libraries/domain/src/behaviors';
|
|
2
|
-
import {
|
|
2
|
+
import { ChildLayoutActions, childLayoutsReducer, ChildLayoutsState, StaticData, staticDataReducer } from '@rokt/module-utils';
|
|
3
3
|
export type AppState = {
|
|
4
|
-
|
|
4
|
+
staticData: StaticData;
|
|
5
|
+
childLayouts: ChildLayoutsState;
|
|
5
6
|
};
|
|
6
|
-
export type StateActions = GlobalActions;
|
|
7
|
+
export type StateActions = GlobalActions | ChildLayoutActions;
|
|
7
8
|
export declare const appReducers: {
|
|
8
|
-
|
|
9
|
+
staticData: typeof staticDataReducer;
|
|
10
|
+
childLayouts: typeof childLayoutsReducer;
|
|
9
11
|
};
|
|
10
12
|
export declare function makeAppInitialState(data?: Partial<AppState>): AppState;
|
|
@@ -12,5 +12,6 @@ export declare const sagaActionTypes: {
|
|
|
12
12
|
readonly OPEN_LINK: "GLOBAL/OPEN_LINK";
|
|
13
13
|
readonly SET_PARTNER_VALIDATION_STATUS: "GLOBAL/SET_PARTNER_VALIDATION_STATUS";
|
|
14
14
|
readonly SET_GLOBAL_OFFER_DATA_CART: "GLOBAL/SET_GLOBAL_OFFER_DATA_CART";
|
|
15
|
+
readonly LAUNCH_CHILD_LAYOUT: "GLOBAL/LAUNCH_CHILD_LAYOUT";
|
|
15
16
|
};
|
|
16
17
|
export declare function appSagas(gateway: GlobalGateway, logger: (log: Log) => void): Generator<import("redux-saga/effects").AllEffect<import("redux-saga/effects").ForkEffect<never>>, void, unknown>;
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
import { GlobalActions } from '../../../../libraries/domain/src/behaviors';
|
|
2
|
-
import {
|
|
2
|
+
import { ChildLayoutActions, childLayoutsReducer, ChildLayoutsState, StaticData, staticDataReducer, DynamicData, dynamicDataReducer } from '@rokt/module-utils';
|
|
3
3
|
export type AppState = {
|
|
4
|
-
|
|
4
|
+
staticData: StaticData;
|
|
5
|
+
dynamicData: DynamicData;
|
|
6
|
+
childLayouts: ChildLayoutsState;
|
|
5
7
|
};
|
|
6
|
-
export type StateActions = GlobalActions;
|
|
8
|
+
export type StateActions = GlobalActions | ChildLayoutActions;
|
|
7
9
|
export declare const appReducers: {
|
|
8
|
-
|
|
10
|
+
staticData: typeof staticDataReducer;
|
|
11
|
+
dynamicData: typeof dynamicDataReducer;
|
|
12
|
+
childLayouts: typeof childLayoutsReducer;
|
|
9
13
|
};
|
|
10
14
|
export declare function makeAppInitialState(data?: Partial<AppState>): AppState;
|
|
@@ -12,5 +12,6 @@ export declare const sagaActionTypes: {
|
|
|
12
12
|
readonly OPEN_LINK: "GLOBAL/OPEN_LINK";
|
|
13
13
|
readonly SET_PARTNER_VALIDATION_STATUS: "GLOBAL/SET_PARTNER_VALIDATION_STATUS";
|
|
14
14
|
readonly SET_GLOBAL_OFFER_DATA_CART: "GLOBAL/SET_GLOBAL_OFFER_DATA_CART";
|
|
15
|
+
readonly LAUNCH_CHILD_LAYOUT: "GLOBAL/LAUNCH_CHILD_LAYOUT";
|
|
15
16
|
};
|
|
16
17
|
export declare function appSagas(gateway: GlobalGateway, logger: (log: Log) => void): Generator<import("redux-saga/effects").AllEffect<import("redux-saga/effects").ForkEffect<never>>, void, unknown>;
|
|
@@ -1,5 +1,12 @@
|
|
|
1
|
+
import { GlobalGateway } from '../../../../../libraries/module-connector/src/main';
|
|
1
2
|
import { ChildPluginFactoryInterface } from '@rokt/plugin';
|
|
3
|
+
import { EventChannel } from 'redux-saga';
|
|
2
4
|
type ChildPlugin = ReturnType<ChildPluginFactoryInterface['create']>;
|
|
3
5
|
export type ChildPluginResult = 'SUCCESS' | 'UNSPECIFIED' | 'CLOSED';
|
|
4
|
-
export declare function createChildPluginChannel(childPlugin: Pick<ChildPlugin, 'onClose' | 'onEvent'>):
|
|
6
|
+
export declare function createChildPluginChannel(childPlugin: Pick<ChildPlugin, 'onClose' | 'onEvent'>): EventChannel<ChildPluginResult>;
|
|
7
|
+
export type RealtimeFulfillmentEvent = {
|
|
8
|
+
eventName: string;
|
|
9
|
+
data: Record<string, string>;
|
|
10
|
+
};
|
|
11
|
+
export declare function makeRealtimeFulfillmentEventMessageChannel(gateway: Pick<GlobalGateway, 'onEvent'>): EventChannel<RealtimeFulfillmentEvent>;
|
|
5
12
|
export {};
|