@rokt/dcui-orchestrator 1.2.1-rc.5 → 1.2.1-rc.50
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/index.cjs +44 -38
- package/dist/index.js +54 -48
- package/dist/libraries/dcui-components/src/components/index.d.ts +3 -0
- package/dist/libraries/dcui-components/src/components/paypal-button/index.d.ts +1 -0
- package/dist/libraries/dcui-components/src/components/paypal-button/paypal-button.d.ts +78 -0
- package/dist/libraries/dcui-components/src/components/paypal-button/paypal-wordmark.d.ts +10 -0
- package/dist/libraries/dcui-components/src/components/progress-control/index.d.ts +1 -0
- package/dist/libraries/dcui-components/src/components/progress-control/progress-control.d.ts +49 -0
- package/dist/libraries/dcui-components/src/components/progress-indicator/get-progress-indicator-state.d.ts +3 -0
- package/dist/libraries/dcui-components/src/components/progress-indicator/index.d.ts +3 -0
- package/dist/libraries/dcui-components/src/components/progress-indicator/progress-indicator.d.ts +8 -0
- package/dist/libraries/dcui-components/src/components/progress-indicator/types.d.ts +88 -0
- package/dist/libraries/dcui-components/src/components/style-mapper/combiners/escape-css-string.d.ts +19 -0
- package/dist/libraries/dcui-components/src/components/style-mapper/combiners/index.d.ts +1 -0
- package/dist/libraries/dcui-components/src/contexts/index.d.ts +1 -0
- package/dist/libraries/dcui-components/src/contexts/lead-capture-offer-context.d.ts +5 -0
- package/dist/libraries/dcui-components/src/contexts/validators/validator-provider.d.ts +5 -3
- package/dist/libraries/dcui-components/src/failure-codes.d.ts +1 -0
- package/dist/libraries/dcui-components/src/utils/index.d.ts +1 -0
- package/dist/libraries/dcui-components/src/utils/link-schemes.d.ts +35 -0
- package/dist/libraries/dcui-components/src/utils/responsive-css.d.ts +9 -0
- package/dist/libraries/domain/src/behaviors/continuous-child.d.ts +62 -0
- package/dist/libraries/domain/src/behaviors/custom-states.d.ts +8 -1
- package/dist/libraries/domain/src/behaviors/index.d.ts +1 -0
- package/dist/libraries/domain/src/behaviors/offer-engagement.d.ts +11 -0
- package/dist/libraries/domain/src/behaviors/send-partner.d.ts +14 -2
- package/dist/libraries/domain/src/behaviors/trigger-action.d.ts +3 -3
- package/dist/libraries/domain/src/models/child-layout-response.d.ts +6 -0
- package/dist/libraries/domain/src/models/index.d.ts +1 -0
- package/dist/libraries/domain/src/models/layout/layout-offer.d.ts +2 -0
- package/dist/libraries/domain/src/models/partner-event.d.ts +1 -1
- package/dist/libraries/domain/src/models/plugin/plugin-child-layout-model.d.ts +1 -0
- package/dist/libraries/domain/src/models/plugin/plugin-offer.d.ts +2 -0
- package/dist/libraries/domain/src/models/purchase.d.ts +3 -0
- package/dist/libraries/layout-renderer-utils/src/reducers/breakpoint/coerce-breakpoints.d.ts +19 -0
- package/dist/libraries/layout-renderer-utils/src/reducers/breakpoint/index.d.ts +1 -0
- package/dist/libraries/layout-renderer-utils/src/sagas/error/error-codes.d.ts +3 -0
- package/dist/libraries/layout-renderer-utils/src/sagas/plugin/display.d.ts +3 -0
- package/dist/libraries/layout-renderer-utils/src/sagas/plugin/sagas.d.ts +4 -1
- package/dist/libraries/layout-renderer-utils/src/sagas/utils/index.d.ts +8 -1
- package/dist/libraries/layout-renderer-utils/src/sagas/utils/links.d.ts +28 -1
- package/dist/libraries/module-connector/src/main.d.ts +1 -1
- package/dist/libraries/module-connector/src/models/gateway.d.ts +14 -3
- package/dist/libraries/module-connector/src/models/module-attributes.d.ts +3 -0
- package/dist/libraries/module-connector/src/models/module-connector-builder.d.ts +1 -0
- package/dist/libraries/module-utils/src/sagas/child-layouts/sagas.d.ts +2 -0
- package/dist/libraries/orchestrator/src/components/progress-control/progress-control.d.ts +2 -45
- package/dist/libraries/orchestrator/src/components/progress-indicator/progress-indicator.d.ts +1 -9
- package/dist/libraries/orchestrator/src/components/progress-indicator/types.d.ts +1 -87
- package/dist/libraries/orchestrator/src/measurement/creative-measurement.d.ts +54 -0
- package/dist/libraries/orchestrator/src/reducers/progression/reducer.d.ts +8 -0
- package/dist/libraries/orchestrator/src/sagas/child-layouts/continuous-child-host.d.ts +15 -0
- package/dist/libraries/orchestrator/src/sagas/child-layouts/continuous-child.d.ts +52 -0
- package/dist/libraries/orchestrator/src/sagas/index.d.ts +1 -1
- package/dist/libraries/orchestrator/src/sagas/offer-engagement/sagas.d.ts +3 -3
- package/dist/libraries/orchestrator/src/sagas/progression/sagas.d.ts +8 -2
- package/dist/libraries/orchestrator/src/sagas/utils/distribution.d.ts +21 -0
- package/dist/libraries/orchestrator/src/sagas/utils/index.d.ts +3 -0
- package/dist/libraries/plugin-utils/src/plugin-service/display.d.ts +1 -0
- package/dist/modules/add-to-cart/src/components/when-catalog-quantity/when-catalog-quantity.d.ts +2 -1
- package/dist/modules/instant-purchase/src/actions/instant-purchase.d.ts +4 -0
- package/dist/modules/instant-purchase/src/components/catalog-device-pay-button/catalog-device-pay-button.d.ts +8 -0
- package/dist/modules/instant-purchase/src/components/catalog-selectors-stacked/catalog-selectors-stacked.d.ts +30 -0
- package/dist/modules/instant-purchase/src/constants/device-pay-error.d.ts +1 -1
- package/dist/modules/instant-purchase/src/models/state/device-pay-availability.d.ts +2 -0
- package/dist/modules/instant-purchase/src/models/state/instant-purchase.d.ts +4 -0
- package/dist/modules/instant-purchase/src/sagas/device-pay/sagas.d.ts +2 -7
- package/dist/modules/instant-purchase/src/sagas/instant-purchase/sagas.d.ts +17 -3
- package/dist/modules/instant-purchase/src/sagas/paypal/sagas.d.ts +2 -0
- package/dist/modules/instant-purchase/src/sagas/tax-and-shipping/sagas.d.ts +10 -20
- package/dist/modules/instant-purchase/src/selectors/device-pay-availability/selectors.d.ts +2 -0
- package/dist/modules/instant-purchase/src/selectors/tax-and-shipping/selectors.d.ts +8 -0
- package/dist/modules/instant-purchase/src/utils/create-tax-and-shipping-cache-key.d.ts +4 -0
- package/dist/modules/instant-purchase/src/utils/parse-non-negative-monetary-amount.d.ts +1 -0
- package/dist/modules/instant-purchase/src/utils/requires-tax-and-shipping-initialization.d.ts +2 -0
- package/dist/modules/standard-marketing/src/sagas/offer-engagement/sagas.d.ts +2 -1
- package/node_modules/@rokt/dcui-layout-schema/dist/schema.d.ts +583 -21
- package/node_modules/@rokt/dcui-layout-schema/dist/tsconfig.tsbuildinfo +1 -1
- package/node_modules/@rokt/dcui-layout-schema/package.json +1 -1
- package/node_modules/@rokt/dcui-layout-schema/v1.21/index.d.ts +7105 -0
- package/node_modules/@rokt/dcui-layout-schema/v1.21/index.js +4 -0
- package/node_modules/@rokt/dcui-layout-schema/v1.22/index.d.ts +7121 -0
- package/node_modules/@rokt/dcui-layout-schema/v1.22/index.js +4 -0
- package/node_modules/@rokt/dcui-layout-schema/v1.23/index.d.ts +7126 -0
- package/node_modules/@rokt/dcui-layout-schema/v1.23/index.js +4 -0
- package/node_modules/@rokt/dcui-layout-schema/v1.24/index.d.ts +7492 -0
- package/node_modules/@rokt/dcui-layout-schema/v1.24/index.js +4 -0
- package/node_modules/@rokt/dcui-layout-schema/v1.25/index.d.ts +7510 -0
- package/node_modules/@rokt/dcui-layout-schema/v1.25/index.js +4 -0
- package/node_modules/@rokt/dcui-layout-schema/v1.26/index.d.ts +7516 -0
- package/node_modules/@rokt/dcui-layout-schema/v1.26/index.js +4 -0
- package/node_modules/@rokt/dcui-layout-schema/v1.27/index.d.ts +7577 -0
- package/node_modules/@rokt/dcui-layout-schema/v1.27/index.js +4 -0
- package/node_modules/@rokt/dcui-layout-schema/v1.28/index.d.ts +7628 -0
- package/node_modules/@rokt/dcui-layout-schema/v1.28/index.js +4 -0
- package/node_modules/@rokt/dcui-layout-schema/v1.29/index.d.ts +7643 -0
- package/node_modules/@rokt/dcui-layout-schema/v1.29/index.js +4 -0
- package/node_modules/@rokt/dcui-layout-schema/v1.30/index.d.ts +7659 -0
- package/node_modules/@rokt/dcui-layout-schema/v1.30/index.js +4 -0
- package/package.json +2 -2
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A layout's breakpoint widths end up in CSS text: the saga builds a matchMedia
|
|
3
|
+
* query from each one, and the style mapper writes each into a media query or
|
|
4
|
+
* a class name. Only a finite, non-negative number is a width there. Any other
|
|
5
|
+
* value becomes INVALID_BREAKPOINT_WIDTH, which the saga and the style mapper
|
|
6
|
+
* skip, so its styles never apply, as the browser dropped the malformed rule
|
|
7
|
+
* before. A key is never dropped: the style mapper pairs an element's style
|
|
8
|
+
* blocks with the breakpoints by position, so a missing key would move every
|
|
9
|
+
* later block onto the wrong width.
|
|
10
|
+
*/
|
|
11
|
+
/**
|
|
12
|
+
* Not a width. No media query is registered for it, no style rule is written
|
|
13
|
+
* for it, and every comparison with it is false, so a breakpoint that carries
|
|
14
|
+
* it is never active and never styles anything.
|
|
15
|
+
*/
|
|
16
|
+
export declare const INVALID_BREAKPOINT_WIDTH: number;
|
|
17
|
+
export declare function isBreakpointWidth(value: unknown): value is number;
|
|
18
|
+
export declare function coerceBreakpointWidth(value: unknown): number;
|
|
19
|
+
export declare function coerceBreakpoints(breakpoints: unknown): Record<string, number>;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
export declare const INVALID_RESPONSE_OBJECT = "INVALID_RESPONSE_OBJECT";
|
|
2
2
|
export declare const INVALID_MODULE_NAME = "INVALID_MODULE_NAME";
|
|
3
3
|
export declare const FAILED_TO_OPEN_LINK = "FAILED_TO_OPEN_LINK";
|
|
4
|
+
export declare const REFUSED_LINK_SCHEME = "REFUSED_LINK_SCHEME";
|
|
5
|
+
export declare const LINK_OPEN_RESULT = "LINK_OPEN_RESULT";
|
|
4
6
|
export declare const FAILED_TO_ISSUE_SIGNAL = "FAILED_TO_ISSUE_SIGNAL";
|
|
5
7
|
export declare const FAILED_TO_CLOSE_PLUGIN = "FAILED_TO_CLOSE_PLUGIN";
|
|
6
8
|
export declare const NO_PARENT_GUID = "NO_PARENT_GUID";
|
|
@@ -17,3 +19,4 @@ export declare const FAILED_TO_ESTABLISH_PARTNER_VALIDATION = "FAILED_TO_ESTABLI
|
|
|
17
19
|
export declare const PARTNER_VALIDATION_UPDATE_FAILED = "PARTNER_VALIDATION_UPDATE_FAILED";
|
|
18
20
|
export declare const CART_SERVICE_RESPONSE_ERROR = "CART_SERVICE_RESPONSE_ERROR";
|
|
19
21
|
export declare const UNSUPPORTED_LAYOUT_ACTION = "UNSUPPORTED_LAYOUT_ACTION";
|
|
22
|
+
export declare const INVALID_GROUP_SIZE = "INVALID_GROUP_SIZE";
|
|
@@ -19,6 +19,7 @@ export declare function getDisplaySettings(preset?: LayoutDisplayPreset | null,
|
|
|
19
19
|
width: string;
|
|
20
20
|
};
|
|
21
21
|
css?: undefined;
|
|
22
|
+
lockHostScroll?: undefined;
|
|
22
23
|
} | {
|
|
23
24
|
autoresize: boolean;
|
|
24
25
|
css: {
|
|
@@ -34,9 +35,11 @@ export declare function getDisplaySettings(preset?: LayoutDisplayPreset | null,
|
|
|
34
35
|
replaceTargetElement?: undefined;
|
|
35
36
|
outerCss?: undefined;
|
|
36
37
|
innerCss?: undefined;
|
|
38
|
+
lockHostScroll?: undefined;
|
|
37
39
|
} | {
|
|
38
40
|
autoresize: boolean;
|
|
39
41
|
applyHighestZIndex: boolean;
|
|
42
|
+
lockHostScroll: boolean;
|
|
40
43
|
replaceTargetElement: string;
|
|
41
44
|
css: {
|
|
42
45
|
zIndex?: number | undefined;
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import { CallEffect, PutEffect, SelectEffect } from '@redux-saga/core/effects';
|
|
2
|
+
import { OutboundPartnerEvent } from '../../../../domain/src/models';
|
|
3
|
+
import { SendPartner } from '../../../../domain/src/behaviors';
|
|
2
4
|
import { FrameControls, LayoutDisplayPreset } from '@rokt/dcui-layout-schema';
|
|
3
5
|
import { RaceEffect } from 'redux-saga/effects';
|
|
4
|
-
import { ContextService, DisplayService, PluginService } from '../../../../plugin-utils/src/index';
|
|
6
|
+
import { ContextService, DisplayService, PartnerInteractionService, PluginService } from '../../../../plugin-utils/src/index';
|
|
5
7
|
import { HandleConfigAction, ReportError } from '../../actions';
|
|
6
8
|
import { EventChannel } from 'redux-saga';
|
|
7
9
|
export declare function closePlugin(contextService: ContextService): Generator<RaceEffect<CallEffect | Generator<SelectEffect | CallEffect, void, boolean>> | SelectEffect | CallEffect | Generator<SelectEffect | CallEffect, void, boolean> | PutEffect<ReportError>, void, boolean>;
|
|
10
|
+
export declare function handlePartnerSend(partnerInteractionService: PartnerInteractionService, { payload }: SendPartner<OutboundPartnerEvent>): Generator<Promise<void>, void, void>;
|
|
8
11
|
export declare function listenToWsdkChannel<LayoutModelType, PluginModelType>(pluginService: PluginService<LayoutModelType>, transformRawConfig: (config: LayoutModelType) => PluginModelType | undefined): Generator<PutEffect<ReportError> | CallEffect<EventChannel<import("../../../../orchestrator/src/actions").SetAttributesAction | import("../../../../orchestrator/src/actions").SetFontsAction | HandleConfigAction<PluginModelType>>> | import("redux-saga/effects").ChannelTakeEffect<HandleConfigAction<PluginModelType>> | PutEffect<HandleConfigAction<PluginModelType>>, void, EventChannel<HandleConfigAction<PluginModelType>> & HandleConfigAction<PluginModelType>>;
|
|
9
12
|
export declare function wsdkSagas<LayoutModelType, PluginModelType>(pluginService: PluginService<LayoutModelType>, transformRawConfig: (config: LayoutModelType) => PluginModelType | undefined): Generator<import("redux-saga/effects").AllEffect<import("redux-saga/effects").ForkEffect<void>>, void, unknown>;
|
|
10
13
|
export declare function displayPlugin(displayService: DisplayService, preset?: LayoutDisplayPreset | null, controls?: FrameControls | null): Generator<CallEffect<void> | import("redux-saga/effects").ForkEffect<void> | PutEffect<{
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import * as linkUtils from './links';
|
|
1
2
|
import * as windowUtils from './window';
|
|
2
3
|
export * from './links';
|
|
3
4
|
export * from './errors';
|
|
@@ -5,12 +6,18 @@ export * from './window';
|
|
|
5
6
|
declare const _default: {
|
|
6
7
|
isWindow(value: unknown): value is windowUtils.WindowRef;
|
|
7
8
|
makePluginWarningAction(err: unknown, message: string, originErrorCode: string, additionalInfo?: Record<string, unknown>): import("../../../../orchestrator/src/actions").ReportError;
|
|
9
|
+
isHandleUnavailable(value: unknown): value is linkUtils.HandleUnavailable;
|
|
8
10
|
openLink({ url, urlBehavior, external }: {
|
|
9
11
|
url: string;
|
|
10
12
|
urlBehavior: import("../../../../domain/src/models").PluginUrlBehavior;
|
|
11
13
|
external: {
|
|
12
14
|
partner: import("../../../../../index").PartnerInteractionService;
|
|
13
15
|
};
|
|
14
|
-
}, injectedWindow?: Pick<Window, "top" | "open" | "RoktWebViewSDK">
|
|
16
|
+
}, injectedWindow?: Pick<Window, "top" | "open" | "RoktWebViewSDK"> & {
|
|
17
|
+
location?: Pick<Location, "href">;
|
|
18
|
+
navigator?: Omit<Navigator, "userActivation"> & {
|
|
19
|
+
userActivation?: UserActivation;
|
|
20
|
+
};
|
|
21
|
+
}): Promise<windowUtils.WindowRef | linkUtils.HandleUnavailable | null>;
|
|
15
22
|
};
|
|
16
23
|
export default _default;
|
|
@@ -1,6 +1,33 @@
|
|
|
1
1
|
import { PluginUrlBehavior } from '../../../../domain/src/models';
|
|
2
2
|
import { PartnerInteractionService } from '../../../../plugin-utils/src/index';
|
|
3
3
|
import { WindowRef } from './window';
|
|
4
|
+
/**
|
|
5
|
+
* Neither window.open nor the webview bridge distinguishes "blocked" from
|
|
6
|
+
* "opened, handle withheld" by its return value alone: a blocked popup and an
|
|
7
|
+
* Android WebView with multiple windows disabled both yield nothing, and the
|
|
8
|
+
* latter loads the URL in place. So record which path produced the miss and what
|
|
9
|
+
* the user-activation state was going in, and let the consumer draw conclusions.
|
|
10
|
+
*
|
|
11
|
+
* userActivation is Chromium-only, so both flags are null on WebKit and Gecko —
|
|
12
|
+
* including every iOS webview. isActive false means no transient activation was
|
|
13
|
+
* left to spend; true does NOT rule out a block, since a site-level popup
|
|
14
|
+
* permission or an extension can refuse a gesture-initiated open.
|
|
15
|
+
*/
|
|
16
|
+
export type HandleUnavailable = {
|
|
17
|
+
handleUnavailable: {
|
|
18
|
+
source: 'window' | 'webview' | null;
|
|
19
|
+
target: string | null;
|
|
20
|
+
userActivationActive: boolean | null;
|
|
21
|
+
userActivationHasBeenActive: boolean | null;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
export declare function isHandleUnavailable(value: unknown): value is HandleUnavailable;
|
|
25
|
+
type InjectedWindow = Pick<Window, 'top' | 'open' | 'RoktWebViewSDK'> & {
|
|
26
|
+
location?: Pick<Location, 'href'>;
|
|
27
|
+
navigator?: Omit<Navigator, 'userActivation'> & {
|
|
28
|
+
userActivation?: UserActivation;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
4
31
|
type LinkParams = {
|
|
5
32
|
url: string;
|
|
6
33
|
urlBehavior: PluginUrlBehavior;
|
|
@@ -8,5 +35,5 @@ type LinkParams = {
|
|
|
8
35
|
partner: PartnerInteractionService;
|
|
9
36
|
};
|
|
10
37
|
};
|
|
11
|
-
export declare function openLink({ url, urlBehavior, external }: LinkParams, injectedWindow?:
|
|
38
|
+
export declare function openLink({ url, urlBehavior, external }: LinkParams, injectedWindow?: InjectedWindow): Promise<WindowRef | HandleUnavailable | null>;
|
|
12
39
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { ModuleAttributes } from './models/module-attributes';
|
|
2
2
|
export { ModuleConnectorBuilder, AppSettings, } from './models/module-connector-builder';
|
|
3
|
-
export { IGateway, IDisposable, Gateway, GetFonts, GatewayFactory, ActionInterceptor, EmptyGateway, GlobalGateway, GlobalGatewayFactory, makeGatewayFactory, ModuleEventListener, } from './models/gateway';
|
|
3
|
+
export { IGateway, ContinuousGatewayService, IDisposable, Gateway, GetFonts, 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,4 +1,4 @@
|
|
|
1
|
-
import { GlobalState, Interactivity } from '../../../domain/src/models';
|
|
1
|
+
import { GlobalState, Interactivity, PluginLayoutChild } from '../../../domain/src/models';
|
|
2
2
|
import { GlobalActions } from '../../../domain/src/behaviors';
|
|
3
3
|
import { ChildPluginFactoryInterface, Fonts, PartnerInteractionInterface } from '@rokt/plugin';
|
|
4
4
|
import { Subscriber } from '@rokt/plugin/interface/subscriber';
|
|
@@ -10,6 +10,11 @@ export type ChildPluginFactoryOptions = Parameters<ChildPluginFactory>[0];
|
|
|
10
10
|
export type GetFonts = () => Fonts;
|
|
11
11
|
export type GatewayFactory<State extends object, Action extends object> = (offerContext: GlobalStoreOfferContext, interactivityChannel: ISubscribable<Interactivity> & IClearable) => IGateway<State, Action> & IDisposable;
|
|
12
12
|
export type ActionInterceptor<Action extends object> = (action: Action) => Action | undefined;
|
|
13
|
+
/** Trusted parent services; the gateway binds the module's served offer identity. */
|
|
14
|
+
export interface ContinuousGatewayService {
|
|
15
|
+
register(context: GlobalStoreOfferContext, dispatch: (action: GlobalActions) => void): () => void;
|
|
16
|
+
launch(context: GlobalStoreOfferContext, child: PluginLayoutChild): Promise<boolean>;
|
|
17
|
+
}
|
|
13
18
|
export type ModuleEventListener = {
|
|
14
19
|
name: string;
|
|
15
20
|
source: 'partner' | '*';
|
|
@@ -21,14 +26,20 @@ export interface IGateway<State extends object, Action extends object> {
|
|
|
21
26
|
onInteractivityChange(callback: (interactivity: Interactivity) => void): () => void;
|
|
22
27
|
globalDispatch(action: Action): void;
|
|
23
28
|
createChildPlugin: ChildPluginFactory;
|
|
29
|
+
registerContinuousResponseHandler?: (dispatch: (action: GlobalActions) => void) => () => void;
|
|
30
|
+
launchContinuousChild?: (child: PluginLayoutChild) => Promise<boolean>;
|
|
31
|
+
scrollHostToViewportOffset?: (viewportOffsetY: number) => Promise<void>;
|
|
24
32
|
}
|
|
25
33
|
export interface IDisposable {
|
|
26
34
|
dispose(): void;
|
|
27
35
|
}
|
|
28
|
-
export declare function makeGatewayFactory<State extends object, Action extends object>(globalStore: AbstractGlobalStore<State, Action>, createChildPlugin: ChildPluginFactory, onPartnerEvent: PartnerEventReceiver, getFonts?: GetFonts): GatewayFactory<State, Action>;
|
|
36
|
+
export declare function makeGatewayFactory<State extends object, Action extends object>(globalStore: AbstractGlobalStore<State, Action>, createChildPlugin: ChildPluginFactory, onPartnerEvent: PartnerEventReceiver, getFonts?: GetFonts, scrollHostToViewportOffset?: (viewportOffsetY: number) => Promise<void>, continuous?: ContinuousGatewayService): GatewayFactory<State, Action>;
|
|
29
37
|
export declare class Gateway<State extends object, Action extends object> implements IGateway<State, Action>, IDisposable {
|
|
30
38
|
#private;
|
|
31
|
-
|
|
39
|
+
scrollHostToViewportOffset?: (viewportOffsetY: number) => Promise<void>;
|
|
40
|
+
registerContinuousResponseHandler?: (dispatch: (action: GlobalActions) => void) => () => void;
|
|
41
|
+
launchContinuousChild?: (child: PluginLayoutChild) => Promise<boolean>;
|
|
42
|
+
constructor(store: AbstractGlobalStore<State, Action>, createChildPlugin: ChildPluginFactory, context: GlobalStoreOfferContext, interactivityChannel: ISubscribable<Interactivity> & IClearable, onPartnerEvent: PartnerEventReceiver, getFonts?: GetFonts, scrollHostToViewportOffset?: (viewportOffsetY: number) => Promise<void>, continuous?: ContinuousGatewayService);
|
|
32
43
|
onGlobalStateChange(callback: (globalState: State) => void): () => void;
|
|
33
44
|
onInteractivityChange(callback: (interactivity: Interactivity) => void): () => void;
|
|
34
45
|
onEvent(...moduleEventListeners: Array<ModuleEventListener>): () => void;
|
|
@@ -7,6 +7,9 @@ export interface ModuleAttributes {
|
|
|
7
7
|
childLayouts: string;
|
|
8
8
|
schemaVersion: string;
|
|
9
9
|
visible: 'true' | 'false';
|
|
10
|
+
'continuous-measurement'?: string;
|
|
11
|
+
'expanded-owns-viewability'?: string;
|
|
12
|
+
'measurement-occluded'?: string;
|
|
10
13
|
container: 'row' | 'column';
|
|
11
14
|
interactivity: Interactivity;
|
|
12
15
|
offerState: string;
|
|
@@ -19,6 +19,7 @@ export interface IModuleConnector extends HTMLElement {
|
|
|
19
19
|
getOfferPositionAttr(): number;
|
|
20
20
|
getJSONAttr<Result>(att: string, defaultValue?: string): Result;
|
|
21
21
|
connectedCallback(): void;
|
|
22
|
+
disconnectedCallback(): void;
|
|
22
23
|
}
|
|
23
24
|
export declare class ModuleConnectorBuilder {
|
|
24
25
|
logger: (log: Log) => void;
|
|
@@ -13,5 +13,7 @@ type BridgeChannelMessage = {
|
|
|
13
13
|
export declare function childLayoutBridge(gateway: GlobalGateway, logger: (log: Log) => void, childPlugin: ChildPluginInterface<BasicObject>, offerContext: {
|
|
14
14
|
offer: PluginOffer;
|
|
15
15
|
offerPositionIndex: number | undefined;
|
|
16
|
+
childInstanceGuid: string;
|
|
17
|
+
advanceOnDismiss?: boolean;
|
|
16
18
|
}): Generator<PutEffect | CallEffect | CancelledEffect | RaceEffect<ChannelTakeEffect<BridgeChannelMessage> | CallEffect>, void, never>;
|
|
17
19
|
export {};
|
|
@@ -1,47 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
export
|
|
4
|
-
/**
|
|
5
|
-
* - `a11yLabel`: the aria-label for the button
|
|
6
|
-
* - `direction`: 'Forward' | 'Backward'.
|
|
7
|
-
* - `children`: it can accept below nodes,
|
|
8
|
-
* * `Row`
|
|
9
|
-
* * `Column`
|
|
10
|
-
* * `ZStack`
|
|
11
|
-
* * `BasicText`
|
|
12
|
-
* * `StaticImage`
|
|
13
|
-
* * `When`
|
|
14
|
-
* * `InlineContainer`
|
|
15
|
-
* - `styles`:
|
|
16
|
-
* * `elements`:
|
|
17
|
-
* * `own`:
|
|
18
|
-
* - `container`
|
|
19
|
-
* - `background`
|
|
20
|
-
* - `border`
|
|
21
|
-
* - `dimension`
|
|
22
|
-
* - `flexChild`
|
|
23
|
-
* - `spacing`
|
|
24
|
-
* * `transitions`:
|
|
25
|
-
* - `type`: 'Conditional'
|
|
26
|
-
* - `transition`:
|
|
27
|
-
* * `predicates`: WhenPredicate[]
|
|
28
|
-
* * `duration`: number
|
|
29
|
-
* * `value`:
|
|
30
|
-
* * `own`:
|
|
31
|
-
* - `container`
|
|
32
|
-
* - `background`
|
|
33
|
-
* - `border`
|
|
34
|
-
* - `dimension`
|
|
35
|
-
* - `flexChild`
|
|
36
|
-
* - `spacing`
|
|
37
|
-
*/
|
|
38
|
-
schema: ProgressControlModel<NonInteractableChildren, WhenPredicate>;
|
|
39
|
-
testId?: string;
|
|
40
|
-
}
|
|
41
|
-
/**The ProgressControl is a progress node that facilitates navigation
|
|
42
|
-
* through sequential steps or stages of a process or content.<br>
|
|
43
|
-
* It offers users the ability to move both forward and backward
|
|
44
|
-
* within a linear progression, allowing them to review and control their journey.<br>
|
|
45
|
-
* *Where can we use this: __outer layout__*
|
|
46
|
-
* */
|
|
2
|
+
import { ProgressControlProps as SharedProgressControlProps } from '../../../../dcui-components/src/index';
|
|
3
|
+
export type ProgressControlProps = Omit<SharedProgressControlProps, 'onClick' | 'disabled'>;
|
|
47
4
|
export declare function ProgressControl(props: ProgressControlProps): React.JSX.Element;
|
package/dist/libraries/orchestrator/src/components/progress-indicator/progress-indicator.d.ts
CHANGED
|
@@ -1,9 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { ProgressIndicatorProps } from './types';
|
|
3
|
-
/** The ProgressIndicator is a progress node that provides users with real-time
|
|
4
|
-
* feedback on the status of ongoing processes or actions.<br>
|
|
5
|
-
* It's a visual representation of progress, often displayed as a bar,
|
|
6
|
-
* circle, or numerical percentage.<br>
|
|
7
|
-
* *Where can we use this: __outer layout__*
|
|
8
|
-
* */
|
|
9
|
-
export declare function ProgressIndicator({ activeIndex, startIndex, numOfIndicators, schema, }: ProgressIndicatorProps): React.JSX.Element | null;
|
|
1
|
+
export { ProgressIndicator } from '../../../../dcui-components/src/index';
|
|
@@ -1,87 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export interface StateProps {
|
|
3
|
-
/** The number of indicators */
|
|
4
|
-
numOfIndicators: number;
|
|
5
|
-
/** The currently active index. */
|
|
6
|
-
activeIndex: number;
|
|
7
|
-
/** The index of the indicator to start displaying from **/
|
|
8
|
-
startIndex: number;
|
|
9
|
-
}
|
|
10
|
-
export interface OwnProps {
|
|
11
|
-
/**
|
|
12
|
-
* - `indicator`: The string content of the indicator.
|
|
13
|
-
* - `styles`:
|
|
14
|
-
* * `elements`:
|
|
15
|
-
* * `own`:
|
|
16
|
-
* - `container`
|
|
17
|
-
* - `background`
|
|
18
|
-
* - `border`
|
|
19
|
-
* - `dimension`
|
|
20
|
-
* - `flexChild`
|
|
21
|
-
* - `spacing`
|
|
22
|
-
* * `indicator`:
|
|
23
|
-
* - `container`
|
|
24
|
-
* - `background`
|
|
25
|
-
* - `border`
|
|
26
|
-
* - `dimension`
|
|
27
|
-
* - `flexChild`
|
|
28
|
-
* - `spacing`
|
|
29
|
-
* - `text`
|
|
30
|
-
* * `activeIndicator`:
|
|
31
|
-
* - `container`
|
|
32
|
-
* - `background`
|
|
33
|
-
* - `border`
|
|
34
|
-
* - `dimension`
|
|
35
|
-
* - `flexChild`
|
|
36
|
-
* - `spacing`
|
|
37
|
-
* - `text`
|
|
38
|
-
* * `seenIndicator`:
|
|
39
|
-
* - `container`
|
|
40
|
-
* - `background`
|
|
41
|
-
* - `border`
|
|
42
|
-
* - `dimension`
|
|
43
|
-
* - `flexChild`
|
|
44
|
-
* - `spacing`
|
|
45
|
-
* - `text`
|
|
46
|
-
* * `transitions`:
|
|
47
|
-
* - `type`: 'Conditional'
|
|
48
|
-
* - `transition`:
|
|
49
|
-
* * `predicates`: WhenPredicate[]
|
|
50
|
-
* * `duration`: number
|
|
51
|
-
* * `value`:
|
|
52
|
-
* * `own`:
|
|
53
|
-
* - `container`
|
|
54
|
-
* - `background`
|
|
55
|
-
* - `border`
|
|
56
|
-
* - `dimension`
|
|
57
|
-
* - `flexChild`
|
|
58
|
-
* - `spacing`
|
|
59
|
-
* * `indicator`:
|
|
60
|
-
* - `container`
|
|
61
|
-
* - `background`
|
|
62
|
-
* - `border`
|
|
63
|
-
* - `dimension`
|
|
64
|
-
* - `flexChild`
|
|
65
|
-
* - `spacing`
|
|
66
|
-
* - `text`
|
|
67
|
-
* * `activeIndicator`:
|
|
68
|
-
* - `container`
|
|
69
|
-
* - `background`
|
|
70
|
-
* - `border`
|
|
71
|
-
* - `dimension`
|
|
72
|
-
* - `flexChild`
|
|
73
|
-
* - `spacing`
|
|
74
|
-
* - `text`
|
|
75
|
-
* * `seenIndicator`:
|
|
76
|
-
* - `container`
|
|
77
|
-
* - `background`
|
|
78
|
-
* - `border`
|
|
79
|
-
* - `dimension`
|
|
80
|
-
* - `flexChild`
|
|
81
|
-
* - `spacing`
|
|
82
|
-
* - `text`
|
|
83
|
-
*/
|
|
84
|
-
schema: ProgressIndicatorModel<WhenPredicate>;
|
|
85
|
-
}
|
|
86
|
-
export interface ProgressIndicatorProps extends OwnProps, StateProps {
|
|
87
|
-
}
|
|
1
|
+
export type { ProgressIndicatorProps, ProgressIndicatorStateProps as StateProps, ProgressIndicatorSchemaProps as OwnProps, } from '../../../../dcui-components/src/index';
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { RaiseSignal } from '../../../domain/src/behaviors';
|
|
2
|
+
import { Impression, Viewed } from '../../../domain/src/models';
|
|
3
|
+
export interface CreativeIdentity {
|
|
4
|
+
creativeInstanceGuid: string;
|
|
5
|
+
offerPositionIndex: number;
|
|
6
|
+
}
|
|
7
|
+
export interface PresentationIdentity extends CreativeIdentity {
|
|
8
|
+
sessionId: string;
|
|
9
|
+
revision: number;
|
|
10
|
+
}
|
|
11
|
+
export type Qualification = Pick<Viewed, 'supportedByBrowser' | 'inferred'>;
|
|
12
|
+
type MeasurementStore = {
|
|
13
|
+
dispatch(action: RaiseSignal): void;
|
|
14
|
+
};
|
|
15
|
+
/** One registry per parent store/selection, never one per child session. */
|
|
16
|
+
export declare function getContinuousMeasurement(store: MeasurementStore): CreativeMeasurement;
|
|
17
|
+
/**
|
|
18
|
+
* Parent-owned creative signals. Layout/slot signals deliberately bypass this
|
|
19
|
+
* ledger. Registration is explicit: the disabled capability and ordinary layouts
|
|
20
|
+
* must never change their existing measurement just because a child exists.
|
|
21
|
+
*/
|
|
22
|
+
export declare class CreativeMeasurement {
|
|
23
|
+
private readonly emit;
|
|
24
|
+
private readonly creatives;
|
|
25
|
+
private readonly presentations;
|
|
26
|
+
private sessionId;
|
|
27
|
+
private highestRevision;
|
|
28
|
+
private occluded;
|
|
29
|
+
private readonly listeners;
|
|
30
|
+
constructor(emit: (action: RaiseSignal) => void);
|
|
31
|
+
/** A new served selection is a new lifetime; reopening the child is not. */
|
|
32
|
+
resetSelection(): void;
|
|
33
|
+
registerCreative(identity: CreativeIdentity, ownsViewability: boolean): void;
|
|
34
|
+
getEmbeddedPolicy(identity: CreativeIdentity): {
|
|
35
|
+
registered: boolean;
|
|
36
|
+
ownsViewability: boolean;
|
|
37
|
+
occluded: boolean;
|
|
38
|
+
};
|
|
39
|
+
subscribe(listener: () => void): () => void;
|
|
40
|
+
setOccluded(occluded: boolean): void;
|
|
41
|
+
/** Consumes only opted-in CREATIVE signals; false means use the legacy path. */
|
|
42
|
+
reportEmbedded(identity: CreativeIdentity, signal: Impression | Viewed): boolean;
|
|
43
|
+
/** Called after the child applied the snapshot, not when it was configured. */
|
|
44
|
+
acknowledge(identity: PresentationIdentity): boolean;
|
|
45
|
+
beginSession(sessionId: string): void;
|
|
46
|
+
endSession(): void;
|
|
47
|
+
reportExpanded(identity: PresentationIdentity, qualification?: Qualification): boolean;
|
|
48
|
+
private getCreative;
|
|
49
|
+
private matchesAcknowledged;
|
|
50
|
+
private render;
|
|
51
|
+
private qualify;
|
|
52
|
+
private notify;
|
|
53
|
+
}
|
|
54
|
+
export {};
|
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
import { AnyAction } from '@reduxjs/toolkit';
|
|
2
2
|
import { ProgressionState } from '../../models';
|
|
3
3
|
export declare function makeInitialProgressionState(): null;
|
|
4
|
+
/**
|
|
5
|
+
* A group size is usable only as a whole number from 1 up to the total count.
|
|
6
|
+
* The value comes from the layout's viewableItems, which the plugin does not
|
|
7
|
+
* re-check at runtime: a fraction below 1 makes totalCount / groupSize as
|
|
8
|
+
* large as the layout likes, and a fraction above 1 produces fractional offer
|
|
9
|
+
* indexes.
|
|
10
|
+
*/
|
|
11
|
+
export declare function isValidGroupSize(groupSize: number, totalCount: number): boolean;
|
|
4
12
|
export declare function getNumberOfGroups(totalCount: number, groupSize: number): number;
|
|
5
13
|
export declare function progressionReducer(state: ProgressionState | undefined, action: AnyAction): ProgressionState;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ContinuousPresentationInput } from '../../../../domain/src/behaviors';
|
|
2
|
+
import { ContinuousGatewayService } from '../../../../module-connector/src/main';
|
|
3
|
+
import type { AppStore } from '../../store';
|
|
4
|
+
import { PluginService } from '../../plugin-service';
|
|
5
|
+
import { ContinuousChildCoordinator } from './continuous-child';
|
|
6
|
+
export declare function isContinuousEngagement(action: unknown): boolean;
|
|
7
|
+
/** Connect the coordinator to trusted selected slots and the existing module response path. */
|
|
8
|
+
export declare function makeContinuousChildHost(store: Pick<AppStore, 'getState' | 'dispatch' | 'subscribe'>, service: PluginService, enabled?: boolean): {
|
|
9
|
+
gateway: ContinuousGatewayService | undefined;
|
|
10
|
+
coordinator: ContinuousChildCoordinator;
|
|
11
|
+
getSequence: (key: string, onRejected?: (reason: string) => void) => ContinuousPresentationInput[] | undefined;
|
|
12
|
+
transformAction(action: unknown): unknown;
|
|
13
|
+
observeAction(action: unknown): void;
|
|
14
|
+
close(): Promise<void>;
|
|
15
|
+
};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { LinkOpenTarget } from '@rokt/dcui-layout-schema';
|
|
2
|
+
import { ContinuousExposure, ContinuousPresentation, ContinuousPresentationInput } from '../../../../domain/src/behaviors';
|
|
3
|
+
export interface ContinuousChildTransport {
|
|
4
|
+
send(name: string, payload: object): Promise<void>;
|
|
5
|
+
onEvent(name: string): {
|
|
6
|
+
subscribe(callback: (value: unknown) => void): {
|
|
7
|
+
unsubscribe(): void;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
close(): Promise<void>;
|
|
11
|
+
onClose(): Promise<void>;
|
|
12
|
+
}
|
|
13
|
+
export interface ContinuousChildDependencies {
|
|
14
|
+
createChild(presentation: ContinuousPresentation): Promise<ContinuousChildTransport>;
|
|
15
|
+
getSequence(key: string): ContinuousPresentationInput[] | undefined;
|
|
16
|
+
getActivePosition(): number;
|
|
17
|
+
navigate(position: number): void;
|
|
18
|
+
respond(position: number, key: 'positive' | 'negative', openLinks?: LinkOpenTarget): Promise<void>;
|
|
19
|
+
dismiss(position: number, dismissalMethod?: string): Promise<void>;
|
|
20
|
+
onApplied?(presentation: ContinuousPresentation): void;
|
|
21
|
+
onExposure?(presentation: ContinuousPresentation, report: ContinuousExposure): void;
|
|
22
|
+
onOcclusion?(occluded: boolean): void;
|
|
23
|
+
onError?(error: Error): void;
|
|
24
|
+
}
|
|
25
|
+
export declare function compatibleContinuousSequence(sequence: ContinuousPresentationInput[]): boolean;
|
|
26
|
+
/** One parent-owned session. Never rebinds the launching module's gateway. */
|
|
27
|
+
export declare class ContinuousChildCoordinator {
|
|
28
|
+
private readonly dependencies;
|
|
29
|
+
private child?;
|
|
30
|
+
private sequence;
|
|
31
|
+
private current?;
|
|
32
|
+
private applied?;
|
|
33
|
+
private acknowledged;
|
|
34
|
+
private subscriptions;
|
|
35
|
+
private actionIds;
|
|
36
|
+
private busy;
|
|
37
|
+
private opening;
|
|
38
|
+
private ready;
|
|
39
|
+
private epoch;
|
|
40
|
+
private acknowledgementTimer?;
|
|
41
|
+
private key;
|
|
42
|
+
constructor(dependencies: ContinuousChildDependencies);
|
|
43
|
+
open(position: number, key: string): Promise<boolean>;
|
|
44
|
+
/** Called on authoritative parent progression changes. */
|
|
45
|
+
sync(): void;
|
|
46
|
+
private makePresentation;
|
|
47
|
+
private push;
|
|
48
|
+
private request;
|
|
49
|
+
private awaitAcknowledgement;
|
|
50
|
+
private reset;
|
|
51
|
+
close(): Promise<void>;
|
|
52
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { GlobalGatewayFactory } from '../../../module-connector/src/main';
|
|
2
2
|
import { PluginService } from '../plugin-service';
|
|
3
3
|
export * from './plugin';
|
|
4
|
-
export declare function appSagas(pluginService: PluginService, gatewayFactory: GlobalGatewayFactory): Generator<import("redux-saga/effects").AllEffect<import("redux-saga/effects").ForkEffect<void> | Generator<import("redux-saga/effects").CallEffect | import("redux-saga/effects").TakeEffect, void, import("redux-saga").TakeableChannel<unknown> | undefined> | Generator<import("redux-saga/effects").CallEffect | import("redux-saga/effects").ActionChannelEffect | import("redux-saga/effects").ChannelTakeEffect<unknown>, void, import("redux-saga").TakeableChannel<unknown> | undefined>>, void, unknown>;
|
|
4
|
+
export declare function appSagas(pluginService: PluginService, gatewayFactory: GlobalGatewayFactory, closeContinuous?: () => Promise<void>): Generator<import("redux-saga/effects").AllEffect<import("redux-saga/effects").ForkEffect<void> | Generator<import("redux-saga/effects").CallEffect | import("redux-saga/effects").TakeEffect, void, import("redux-saga").TakeableChannel<unknown> | undefined> | Generator<import("redux-saga/effects").CallEffect | import("redux-saga/effects").ActionChannelEffect | import("redux-saga/effects").ChannelTakeEffect<unknown>, void, import("redux-saga").TakeableChannel<unknown> | undefined>>, void, unknown>;
|
|
@@ -3,9 +3,9 @@ import { PluginCreativeResponseOption } from '../../../../domain/src/models';
|
|
|
3
3
|
import { CallEffect, PutEffect, SelectEffect, TakeEffect } from 'redux-saga/effects';
|
|
4
4
|
import { ReportError, ClosePlugin, OfferEngagement } from '../../actions';
|
|
5
5
|
import { ContextService, PartnerInteractionService } from '../../../../plugin-utils/src/index';
|
|
6
|
-
import { WindowRef } from '../../../../layout-renderer-utils/src/index';
|
|
7
|
-
type NextValues = WindowRef | CallEffect | null | undefined;
|
|
8
|
-
type OfferCompletionResult = 'SUCCESS' | '
|
|
6
|
+
import { HandleUnavailable, WindowRef } from '../../../../layout-renderer-utils/src/index';
|
|
7
|
+
type NextValues = WindowRef | HandleUnavailable | CallEffect | null | undefined;
|
|
8
|
+
type OfferCompletionResult = 'SUCCESS' | 'ERROR' | 'EXPLICIT_DISMISSAL' | 'IMPLICIT_DISMISSAL' | 'END';
|
|
9
9
|
declare const handleUrlResponse: (args_0: PluginCreativeResponseOption, args_1: ContextService, args_2: import("@rokt/plugin").SenderReceiver, args_3: OfferEngagement) => Generator<TakeEffect | NextValues | PutEffect<RaiseSignal | ClosePlugin | ReportError>, OfferCompletionResult, NextValues>;
|
|
10
10
|
export declare function processOfferResponse(dependencies: {
|
|
11
11
|
context: ContextService;
|
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
import { CallEffect, PutEffect, SelectEffect, TakeEffect } from 'redux-saga/effects';
|
|
2
|
-
import { ProcessProgression, StateActions, UpdateActiveBreakpointAction } from '../../actions';
|
|
2
|
+
import { InitialiseBreakpointAction, ProcessProgression, StateActions, UpdateActiveBreakpointAction } from '../../actions';
|
|
3
3
|
import { CloseOnNegativeResponsePolicy } from '@rokt/dcui-layout-schema';
|
|
4
4
|
type ProgressResult = {
|
|
5
5
|
exists: boolean;
|
|
6
6
|
isLastOffer: boolean;
|
|
7
7
|
};
|
|
8
8
|
type NextValues = ProgressResult | boolean | number | CloseOnNegativeResponsePolicy | undefined;
|
|
9
|
-
|
|
9
|
+
/**
|
|
10
|
+
* Sends the group size for the breakpoint the action names, on the first
|
|
11
|
+
* breakpoint read (INITIALISE_BREAKPOINT) and on every later change
|
|
12
|
+
* (UPDATE_ACTIVE_BREAKPOINT). The first read names no breakpoint when the
|
|
13
|
+
* channel reports none, and the reducer reads that as the default one.
|
|
14
|
+
*/
|
|
15
|
+
export declare function updateGroupSize(action: UpdateActiveBreakpointAction | InitialiseBreakpointAction): Generator<SelectEffect | PutEffect<StateActions>, void, Array<number> | undefined>;
|
|
10
16
|
export declare function processProgress(action: ProcessProgression): Generator<SelectEffect | CallEffect | PutEffect | TakeEffect, void, NextValues>;
|
|
11
17
|
export {};
|
|
@@ -14,3 +14,24 @@ export type Distribution = {
|
|
|
14
14
|
};
|
|
15
15
|
export declare function getDistribution(layout: LayoutSchemaModel): Distribution | undefined;
|
|
16
16
|
export declare function getDistributionViewableItems(distribution: Distribution | undefined): Array<number> | undefined;
|
|
17
|
+
/**
|
|
18
|
+
* The layout's viewableItems entry for a breakpoint, made safe for the
|
|
19
|
+
* progression reducer: a value of at least 1 is rounded down to a whole
|
|
20
|
+
* number, so 2.5 keeps a group of 2, and anything else (a value below 1,
|
|
21
|
+
* a missing entry, a value that is not a finite number) becomes 1, the
|
|
22
|
+
* value the reducer already uses when a layout names no group size.
|
|
23
|
+
*/
|
|
24
|
+
export declare function normaliseGroupSize(value: number | undefined): number;
|
|
25
|
+
/**
|
|
26
|
+
* True when normaliseGroupSize uses a value other than the one the layout
|
|
27
|
+
* configured, the case the plugin saga reports as INVALID_GROUP_SIZE. A
|
|
28
|
+
* missing entry is a layout that names no group size, not a changed one.
|
|
29
|
+
*/
|
|
30
|
+
export declare function isGroupSizeChanged(value: number | undefined): boolean;
|
|
31
|
+
/**
|
|
32
|
+
* A normalised group size capped at the number of offers the placement
|
|
33
|
+
* holds: the reducer refuses a group larger than the placement, so one offer
|
|
34
|
+
* with viewableItems [2] at a breakpoint keeps a group of 1 instead of a
|
|
35
|
+
* null progression.
|
|
36
|
+
*/
|
|
37
|
+
export declare function capGroupSize(groupSize: number, slotSize: number): number;
|
|
@@ -3,5 +3,8 @@ export { Distribution } from './distribution';
|
|
|
3
3
|
declare const _default: {
|
|
4
4
|
getDistribution(layout: import("@rokt/dcui-layout-schema").LayoutSchemaModel): distributionUtils.Distribution | undefined;
|
|
5
5
|
getDistributionViewableItems(distribution: distributionUtils.Distribution | undefined): Array<number> | undefined;
|
|
6
|
+
normaliseGroupSize(value: number | undefined): number;
|
|
7
|
+
isGroupSizeChanged(value: number | undefined): boolean;
|
|
8
|
+
capGroupSize(groupSize: number, slotSize: number): number;
|
|
6
9
|
};
|
|
7
10
|
export default _default;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { DisplayInterface, PluginInterface } from '@rokt/plugin';
|
|
2
2
|
import { EventChannel } from 'redux-saga';
|
|
3
3
|
export type DisplayService = Pick<DisplayInterface, 'setDisplaySettings'> & {
|
|
4
|
+
scrollHostToViewportOffset?(viewportOffsetY: number): Promise<void>;
|
|
4
5
|
activeBreakpointEventChannel?(breakpoints: Record<string, number>): EventChannel<string>;
|
|
5
6
|
};
|
|
6
7
|
export declare const makeDisplayService: (pluginInterface: Pick<PluginInterface, 'display'>) => DisplayService;
|
package/dist/modules/add-to-cart/src/components/when-catalog-quantity/when-catalog-quantity.d.ts
CHANGED
|
@@ -3,7 +3,8 @@ import { LayoutSchemaModel, EqualityWhenCondition, OrderableWhenCondition } from
|
|
|
3
3
|
export type QuantityCondition = EqualityWhenCondition | OrderableWhenCondition;
|
|
4
4
|
export interface QuantityPredicate {
|
|
5
5
|
condition: QuantityCondition;
|
|
6
|
-
|
|
6
|
+
/** Fixed number or a numeric string resolved through the current data mapper. */
|
|
7
|
+
value: number | string;
|
|
7
8
|
}
|
|
8
9
|
export interface WhenCatalogQuantityModel {
|
|
9
10
|
cartItemId: string;
|
|
@@ -42,6 +42,8 @@ export interface PushTaxAndShippingPayload {
|
|
|
42
42
|
}
|
|
43
43
|
export interface MarkTaxAndShippingPendingPayload {
|
|
44
44
|
cacheKey: string;
|
|
45
|
+
requestId: string;
|
|
46
|
+
preserveEstimate?: boolean;
|
|
45
47
|
}
|
|
46
48
|
export declare const INITIATE_INSTANT_PURCHASE = "INSTANT_PURCHASE/INITIATE";
|
|
47
49
|
export type InitiateInstantPurchase = {
|
|
@@ -92,6 +94,8 @@ export type SetActiveTaxAndShippingKey = {
|
|
|
92
94
|
};
|
|
93
95
|
export type InitiateTaxAndShippingPayload = {
|
|
94
96
|
catalogItem: PluginCatalogItem;
|
|
97
|
+
force?: boolean;
|
|
98
|
+
requestId?: string;
|
|
95
99
|
};
|
|
96
100
|
export declare const INITIATE_TAX_AND_SHIPPING = "INSTANT_PURCHASE/INITIATE_TAX_AND_SHIPPING";
|
|
97
101
|
export type InitiateTaxAndShipping = {
|