@rokt/dcui-orchestrator 0.2.1-rc.2 → 0.2.1-rc.20

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.
Files changed (36) hide show
  1. package/dist/index.cjs +29 -29
  2. package/dist/index.js +25 -25
  3. package/dist/libraries/dcui-components/src/components/data-image-carousel/carousel-indicators.d.ts +20 -0
  4. package/dist/libraries/dcui-components/src/components/data-image-carousel/data-image-carousel.d.ts +100 -0
  5. package/dist/libraries/dcui-components/src/components/data-image-carousel/factory.d.ts +2 -0
  6. package/dist/libraries/dcui-components/src/components/data-image-carousel/index.d.ts +2 -0
  7. package/dist/libraries/domain/src/behaviors/offer-engagement.d.ts +7 -1
  8. package/dist/libraries/domain/src/models/plugin/plugin-catalog-item.d.ts +4 -0
  9. package/dist/libraries/domain/src/models/plugin/plugin-creative-response-option.d.ts +5 -1
  10. package/dist/libraries/domain/src/models/plugin/plugin-signal-type.d.ts +2 -1
  11. package/dist/libraries/domain/src/models/signals.d.ts +12 -2
  12. package/dist/libraries/orchestrator/src/sagas/offer-engagement/sagas.d.ts +1 -1
  13. package/dist/libraries/plugin-utils/src/translate-config.d.ts +2 -2
  14. package/dist/modules/add-to-cart/src/components/catalog-partner-event-button/catalog-partner-event-button.d.ts +8 -0
  15. package/dist/modules/add-to-cart/src/components/escape-hatch/factory.d.ts +1 -1
  16. package/dist/modules/add-to-cart/src/components/scroll-to-target/scroll-to-target.d.ts +56 -0
  17. package/dist/modules/add-to-cart/src/components/tooltip/tooltip.d.ts +42 -0
  18. package/dist/modules/add-to-cart/src/components/when-catalog-quantity/when-catalog-quantity.d.ts +22 -0
  19. package/dist/modules/instant-purchase/src/actions/instant-purchase.d.ts +1 -6
  20. package/dist/modules/instant-purchase/src/components/catalog-drop-down/catalog-drop-down.d.ts +6 -7
  21. package/dist/modules/instant-purchase/src/components/catalog-response-button/catalog-response-button.d.ts +5 -1
  22. package/dist/modules/instant-purchase/src/components/catalog-variation-selection-button/catalog-variation-selection-button.d.ts +2 -0
  23. package/dist/modules/instant-purchase/src/components/checkbox/checkbox.d.ts +78 -0
  24. package/dist/modules/instant-purchase/src/components/dismiss-instant-purchase-button/dismiss-instant-purchase-button.d.ts +64 -0
  25. package/dist/modules/instant-purchase/src/models/state/instant-purchase.d.ts +0 -3
  26. package/dist/modules/instant-purchase/src/reducers/index.d.ts +1 -3
  27. package/dist/modules/instant-purchase/src/reducers/instant-purchase/index.d.ts +0 -1
  28. package/dist/modules/instant-purchase/src/validators/index.d.ts +3 -0
  29. package/dist/modules/instant-purchase/src/validators/types.d.ts +8 -0
  30. package/dist/modules/instant-purchase/src/validators/utils.d.ts +3 -0
  31. package/dist/modules/instant-purchase/src/validators/validator-provider.d.ts +24 -0
  32. package/dist/modules/standard-marketing/src/components/catalog-response-button/catalog-response-button.d.ts +43 -0
  33. package/dist/modules/standard-marketing/src/components/catalog-response-button/factory.d.ts +2 -0
  34. package/package.json +1 -1
  35. package/dist/modules/instant-purchase/src/reducers/instant-purchase/variation-selection-required/index.d.ts +0 -1
  36. package/dist/modules/instant-purchase/src/reducers/instant-purchase/variation-selection-required/reducer.d.ts +0 -4
@@ -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 {};
@@ -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,2 @@
1
+ import { LayoutSchemaModel } from '@rokt/dcui-layout-schema';
2
+ export declare function tryMakeDataImageCarousel(schema: LayoutSchemaModel, testId?: string): JSX.Element | void;
@@ -0,0 +1,2 @@
1
+ export * from './data-image-carousel';
2
+ export * from './factory';
@@ -19,13 +19,19 @@ export interface OfferEngagementUrlPayload extends PluginCreativeUrlResponseOpti
19
19
  referralCreativeID?: string;
20
20
  creativeInstanceGuid?: string;
21
21
  }
22
+ export interface OfferEngagementProductItemResponsePayload extends OfferEngagementUrlPayload {
23
+ catalogItemId: string;
24
+ productSku: string;
25
+ catalogId: string;
26
+ }
22
27
  export type OfferEngagementCaptureOnlyPayload = PluginCreativeCaptureOnlyResponseOption;
23
28
  export type OfferEngagementExternalPayload = PluginCreativeExternalResponseOption;
24
- export type OfferEngagementPayload = OfferEngagementFulfillmentPayload | OfferEngagementUrlPayload | OfferEngagementCaptureOnlyPayload | OfferEngagementExternalPayload;
29
+ export type OfferEngagementPayload = OfferEngagementFulfillmentPayload | OfferEngagementUrlPayload | OfferEngagementCaptureOnlyPayload | OfferEngagementExternalPayload | OfferEngagementProductItemResponsePayload;
25
30
  export declare function isFulfillmentPayload(value: unknown): value is OfferEngagementFulfillmentPayload;
26
31
  export declare function isExternalPayload(value: unknown): value is OfferEngagementExternalPayload;
27
32
  export declare function isUrlPayload(value: unknown): value is OfferEngagementUrlPayload;
28
33
  export declare function isCaptureOnlyPayload(value: unknown): value is OfferEngagementCaptureOnlyPayload;
34
+ export declare function isProductItemResponsePayload(value: unknown): value is OfferEngagementProductItemResponsePayload;
29
35
  export declare function isRealTimeFulfillmentReferral(response: OfferEngagementPayload | (OfferEngagementPayload & {
30
36
  offerPositionIndex: number;
31
37
  })): response is OfferEngagementPayload & {
@@ -1,3 +1,4 @@
1
+ import { PluginCreativeUrlResponseOption } from './plugin-creative-response-option';
1
2
  import { PluginImage } from './plugin-image';
2
3
  export interface PluginCatalogItem {
3
4
  instanceGuid: string;
@@ -9,6 +10,7 @@ export interface PluginCatalogItem {
9
10
  description: string;
10
11
  disclaimer?: string;
11
12
  images?: Record<string, PluginImage>;
13
+ responseOptionsMap?: Record<string, PluginCreativeUrlResponseOption>;
12
14
  priceFormatted: string;
13
15
  price: number;
14
16
  providerData?: string;
@@ -22,6 +24,8 @@ export interface PluginCatalogItem {
22
24
  positiveResponseText: string;
23
25
  negativeResponseText: string;
24
26
  url?: string;
27
+ productSku?: string;
28
+ catalogId?: string;
25
29
  }
26
30
  export interface PluginCatalogItemImage {
27
31
  url: string;
@@ -2,7 +2,7 @@ import { PluginConversionType } from './plugin-conversion-type';
2
2
  import { PluginCreativeResponseActionType } from './plugin-creative-response-action-type';
3
3
  import { PluginSignalType } from './plugin-signal-type';
4
4
  import { PluginUrlBehavior } from './plugin-url-behavior';
5
- export type PluginCreativeResponseOption = PluginCreativeFulfillmentResponseOption | PluginCreativeUrlResponseOption | PluginCreativeCaptureOnlyResponseOption | PluginCreativeExternalResponseOption;
5
+ export type PluginCreativeResponseOption = PluginCreativeFulfillmentResponseOption | PluginCreativeUrlResponseOption | PluginCreativeCaptureOnlyResponseOption | PluginCreativeExternalResponseOption | PluginCatalogItemUrlResponseOption;
6
6
  export interface PluginCreativeFulfillmentResponseOption {
7
7
  id: string;
8
8
  action: PluginCreativeResponseActionType.Fulfillment;
@@ -46,6 +46,10 @@ export interface PluginCreativeCaptureOnlyResponseOption {
46
46
  urlBehavior?: PluginUrlBehavior;
47
47
  creativeInstanceGuid?: string;
48
48
  }
49
+ export interface PluginCatalogItemUrlResponseOption extends PluginCreativeUrlResponseOption {
50
+ catalogItemId: string;
51
+ externalId: string;
52
+ }
49
53
  export interface PluginCreativeExternalResponseOption {
50
54
  id: string;
51
55
  action: PluginCreativeResponseActionType.External;
@@ -1,5 +1,6 @@
1
1
  export declare const enum PluginSignalType {
2
2
  SignalResponse = "SignalResponse",
3
3
  SignalGatedResponse = "SignalGatedResponse",
4
- SignalSecondaryResponse = "SignalSecondaryResponse"
4
+ SignalSecondaryResponse = "SignalSecondaryResponse",
5
+ SignalProductItemResponse = "SignalProductItemResponse"
5
6
  }
@@ -2,7 +2,7 @@ import { PluginCreativeResponseActionType } from './plugin';
2
2
  export type Signals = (CoreSignals | CartSignals) & {
3
3
  creativeInstanceGuid?: string;
4
4
  };
5
- export type CoreSignals = LoadStart | LoadComplete | Activation | Impression | Viewed | Response | Dismissal | UserInteraction | InstantPurchaseDismissal;
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
8
  export type UniqueSignal = LoadStart | LoadComplete | Activation | Impression | Viewed | Response | Dismissal | UserInteraction | InstantPurchaseDismissal | CartItemInstantPurchaseInitiated | CartItemInstantPurchase | CartItemInstantPurchaseFailure;
@@ -10,7 +10,7 @@ export declare enum InitiatedBy {
10
10
  DCUI = "DCUI",
11
11
  Partner = "partner"
12
12
  }
13
- export type RepeatableSignal = CartItemQuantitySelected;
13
+ export type RepeatableSignal = CartItemQuantitySelected | ProductItemResponse;
14
14
  export interface LoadComplete {
15
15
  name: 'SignalLoadComplete';
16
16
  parentGuid: string;
@@ -89,6 +89,16 @@ export interface UserInteraction {
89
89
  action: string;
90
90
  context: string;
91
91
  }
92
+ export interface ProductItemResponse {
93
+ name: 'SignalProductItemResponse';
94
+ parentGuid: string;
95
+ objectData: {
96
+ catalogItemId: string;
97
+ productSku: string;
98
+ catalogId: string;
99
+ accountId: string;
100
+ };
101
+ }
92
102
  export interface CaptureOnlyAction {
93
103
  name: PluginCreativeResponseActionType.CaptureOnly;
94
104
  creativeInstanceGuid?: string;
@@ -6,7 +6,7 @@ import { ContextService, PartnerInteractionService } from '../../../../plugin-ut
6
6
  import { WindowRef } from '../../../../layout-renderer-utils/src/index';
7
7
  type NextValues = WindowRef | CallEffect | null | undefined;
8
8
  type OfferCompletionResult = 'SUCCESS' | 'UNSPECIFIED' | 'ERROR' | 'EXPLICIT_DISMISSAL' | 'IMPLICIT_DISMISSAL' | 'END';
9
- declare const handleUrlResponse: (args_0: PluginCreativeResponseOption, args_1: ContextService, args_2: import("@rokt/plugin").SenderReceiver) => Generator<TakeEffect | NextValues | PutEffect<RaiseSignal | ClosePlugin | ReportError>, OfferCompletionResult, NextValues>;
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;
12
12
  partner: PartnerInteractionService;
@@ -1,4 +1,4 @@
1
- import { PluginCreative, PluginCreativeResponseOption, PluginCreativeResponseActionType, PluginSignalType, PluginUrlBehavior, LayoutCreative, LayoutCreativeResponseOption, PluginConversionType } from '../../domain/src/models';
1
+ import { PluginCreative, PluginCreativeResponseOption, PluginCreativeResponseActionType, PluginSignalType, PluginUrlBehavior, LayoutCreative, LayoutCreativeResponseOption, PluginConversionType, PluginCatalogItemUrlResponseOption } from '../../domain/src/models';
2
2
  export declare const CREATIVE_RESPONSE_ENUM_MAP: {
3
3
  action: {
4
4
  CaptureOnly: PluginCreativeResponseActionType;
@@ -24,6 +24,6 @@ export declare const CREATIVE_RESPONSE_ENUM_MAP: {
24
24
  };
25
25
  export declare function makeTranslateErrorLogs(configurationName: string, instanceGuid: string, isChildLayout?: boolean): Error;
26
26
  export declare function translateLayoutCreative(layoutCreative: LayoutCreative, isChildLayout?: boolean): PluginCreative;
27
- export declare function translateLayoutResponse(response: LayoutCreativeResponseOption): PluginCreativeResponseOption;
27
+ export declare function translateLayoutResponse(response: LayoutCreativeResponseOption): Exclude<PluginCreativeResponseOption, PluginCatalogItemUrlResponseOption>;
28
28
  export type ParseJsonCategory = 'LayoutRootLayoutSchema' | 'LayoutSlotLayoutVariant' | 'ChildLayoutRootSchema';
29
29
  export declare function parseLayoutJsonAs<T>(json: string, category: ParseJsonCategory, instanceGuid: string): T;
@@ -0,0 +1,8 @@
1
+ import { CatalogResponseButtonModel, NonInteractableChildren, WhenPredicate } from '@rokt/dcui-layout-schema';
2
+ export interface CatalogPartnerEventButtonProps {
3
+ schema: CatalogResponseButtonModel<NonInteractableChildren, WhenPredicate> & {
4
+ partnerEventName?: string;
5
+ };
6
+ testId?: string;
7
+ }
8
+ export declare function CatalogPartnerEventButton(props: CatalogPartnerEventButtonProps): import("react/jsx-runtime").JSX.Element;
@@ -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,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;
@@ -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;
@@ -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, VariationSelectionRequiredState } from '../models';
3
+ import { FulfillmentDetailsState } from '../models';
4
4
  export type InitiateInstantPurchasePayload = {
5
5
  catalogItem: PluginCatalogItem;
6
6
  quantity: number;
@@ -57,9 +57,4 @@ export type SetFulfillmentDetails = {
57
57
  type: typeof SET_FULFILLMENT_DETAILS;
58
58
  payload: FulfillmentDetailsState;
59
59
  };
60
- export declare const SET_VARIATION_SELECTION_REQUIRED = "INSTANT_PURCHASE/SET_VARIATION_SELECTION_REQUIRED";
61
- export type SetVariationSelectionRequired = {
62
- type: typeof SET_VARIATION_SELECTION_REQUIRED;
63
- payload: VariationSelectionRequiredState | null;
64
- };
65
60
  export type InstantPurchaseActions = InitiateInstantPurchase;
@@ -1,5 +1,6 @@
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
+ import { ValidatorFieldConfig } from '../../validators';
3
+ export type CatalogDropDownValidators = 'required';
3
4
  export interface CatalogDropDownStyles {
4
5
  container?: null | ContainerStylingProperties;
5
6
  background?: null | BackgroundStylingProperties;
@@ -16,13 +17,10 @@ export interface CatalogDropDownElements {
16
17
  own: BasicStateStylingBlock<CatalogDropDownStyles>[];
17
18
  dropDownContainer?: null | BasicStateStylingBlock<CatalogDropDownStyles>[];
18
19
  dropDownSelectedElement?: null | BasicStateStylingBlock<CatalogDropDownStyles>[];
20
+ dropDownContainerErrorStyles?: null | BasicStateStylingBlock<CatalogDropDownStyles>[];
19
21
  dropDownListContainer?: null | BasicStateStylingBlock<CatalogDropDownStyles>[];
20
22
  dropDownListElement?: null | BasicStateStylingBlock<CatalogDropDownStyles>[];
21
- requiredSelectionErrorElement?: null | BasicStateStylingBlock<CatalogDropDownStyles>[];
22
- }
23
- export interface CatalogDropDownOptionData {
24
- catalogItem: PluginCatalogItem;
25
- index: number;
23
+ errorContentContainerStyles?: null | BasicStateStylingBlock<CatalogDropDownStyles>[];
26
24
  }
27
25
  interface CatalogDropDownModel<NonInteractableChildren, Predicates> {
28
26
  styles?: null | LayoutStyle<CatalogDropDownElements, ConditionalStyleTransition<CatalogDropDownTransitions, Predicates>>;
@@ -30,7 +28,8 @@ interface CatalogDropDownModel<NonInteractableChildren, Predicates> {
30
28
  closedTemplate: NonInteractableChildren;
31
29
  closedDefaultTemplate: NonInteractableChildren;
32
30
  requiredSelectionErrorTemplate?: NonInteractableChildren;
33
- options: CatalogDropDownOptionData[];
31
+ validatorFieldConfig?: ValidatorFieldConfig<CatalogDropDownValidators>;
32
+ disableProgrammaticFocus?: boolean;
34
33
  }
35
34
  export interface CatalogDropDownProps {
36
35
  /**
@@ -1,4 +1,8 @@
1
1
  import { CatalogResponseButtonModel, NonInteractableChildren, WhenPredicate } from '@rokt/dcui-layout-schema';
2
+ import { ValidatorTriggerConfig } from '../../validators';
3
+ export interface CatalogResponseValidatorButtonModel<NonInteractableChildren, WhenPredicate> extends CatalogResponseButtonModel<NonInteractableChildren, WhenPredicate> {
4
+ validatorTriggerConfig?: ValidatorTriggerConfig;
5
+ }
2
6
  export interface CatalogResponseButtonProps {
3
7
  /**
4
8
  * - `children`: it can accept below nodes,
@@ -32,7 +36,7 @@ export interface CatalogResponseButtonProps {
32
36
  * - `background`
33
37
  * - `border`
34
38
  */
35
- schema: CatalogResponseButtonModel<NonInteractableChildren, WhenPredicate>;
39
+ schema: CatalogResponseValidatorButtonModel<NonInteractableChildren, WhenPredicate>;
36
40
  testId?: string;
37
41
  }
38
42
  /**The CatalogResponse is a button node that generate a Call-to-Action button
@@ -1,4 +1,5 @@
1
1
  import { ContainerStylingProperties, BorderStylingProperties, DimensionStylingProperties, FlexChildStylingProperties, SpacingStylingProperties, BasicStateStylingBlock, LayoutStyle, ConditionalStyleTransition, WhenPredicate, NonInteractableChildren } from '@rokt/dcui-layout-schema';
2
+ import { ValidatorTriggerConfig } from '../../validators';
2
3
  export interface CatalogVariationSelectionButtonStyles {
3
4
  container?: null | ContainerStylingProperties;
4
5
  border?: null | BorderStylingProperties;
@@ -17,6 +18,7 @@ export interface CatalogVariationSelectionButtonModel<Children, Predicates> {
17
18
  children: Children[];
18
19
  customStateKey: string;
19
20
  customStateValue: number;
21
+ validatorTriggerConfig?: ValidatorTriggerConfig;
20
22
  a11yLabel?: null | string;
21
23
  }
22
24
  export interface CatalogVariationSelectionButtonProps {
@@ -0,0 +1,78 @@
1
+ import { BackgroundStylingProperties, BasicStateStylingBlock, BorderStylingProperties, ConditionalStyleTransition, DimensionStylingProperties, ContainerStylingProperties, FlexChildStylingProperties, LayoutStyle, SpacingStylingProperties, WhenPredicate, NonInteractableChildren } from '@rokt/dcui-layout-schema';
2
+ import { ValidatorFieldConfig } from '../../validators';
3
+ export type CheckboxValidators = 'required';
4
+ export interface CheckboxStyles {
5
+ container?: null | ContainerStylingProperties;
6
+ background?: null | BackgroundStylingProperties;
7
+ border?: null | BorderStylingProperties;
8
+ dimension?: null | DimensionStylingProperties;
9
+ flexChild?: null | FlexChildStylingProperties;
10
+ spacing?: null | SpacingStylingProperties;
11
+ }
12
+ export interface CheckboxTransitions {
13
+ own?: null | CheckboxStyles;
14
+ }
15
+ export interface CheckboxElements {
16
+ own: BasicStateStylingBlock<CheckboxStyles>[];
17
+ checkbox?: BasicStateStylingBlock<CheckboxStyles>[];
18
+ label?: BasicStateStylingBlock<CheckboxStyles>[];
19
+ checkboxContainerError?: BasicStateStylingBlock<CheckboxStyles>[];
20
+ checkboxError?: BasicStateStylingBlock<CheckboxStyles>[];
21
+ labelError?: BasicStateStylingBlock<CheckboxStyles>[];
22
+ errorContent?: BasicStateStylingBlock<CheckboxStyles>[];
23
+ }
24
+ export interface CheckboxModel<Predicates> {
25
+ styles?: null | LayoutStyle<CheckboxElements, ConditionalStyleTransition<CheckboxTransitions, Predicates>>;
26
+ checkboxColor?: string;
27
+ value?: boolean;
28
+ labelTemplate?: NonInteractableChildren[];
29
+ errorContentTemplate?: NonInteractableChildren[];
30
+ validatorFieldConfig?: ValidatorFieldConfig<CheckboxValidators>;
31
+ }
32
+ export interface CheckboxProps {
33
+ /**
34
+ * - `labelTemplate`, `errorContentTemplate`: it can accept below nodes,
35
+ * * `Row`
36
+ * * `FlowRow
37
+ * * `Column`
38
+ * * `ZStack`
39
+ * * `BasicText`
40
+ * * `StaticImage`
41
+ * * `DataImage`
42
+ * * `When`
43
+ * * `DataIcon`
44
+ * * `StaticIcon`
45
+ * * `EscapeHatch`
46
+ * - `checkboxColor`:
47
+ * * `string`
48
+ * - `value`:
49
+ * * `boolean`
50
+ * - `styles`:
51
+ * * `elements`:
52
+ * * `own`, `checkbox`, `label`, `checkboxContainerError`,
53
+ * `checkboxError`, `labelError`, `errorContent`:
54
+ * - `container`
55
+ * - `background`
56
+ * - `border`
57
+ * - `dimension`
58
+ * - `flexChild`
59
+ * - `spacing`
60
+ * * `transitions`:
61
+ * - `type`: 'Conditional'
62
+ * - `transition`:
63
+ * * `predicates`: WhenPredicate[]
64
+ * * `duration`: number
65
+ * * `value`:
66
+ * * `own`, `checkbox`, `label`, `checkboxContainerError`,
67
+ * `checkboxError`, `labelError`, `errorContent`:
68
+ * - `container`
69
+ * - `background`
70
+ * - `border`
71
+ * - `dimension`
72
+ * - `flexChild`
73
+ * - `spacing`
74
+ */
75
+ schema: CheckboxModel<WhenPredicate>;
76
+ testId?: string;
77
+ }
78
+ export declare function Checkbox(props: CheckboxProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,64 @@
1
+ import { BackgroundStylingProperties, BorderStylingProperties, ConditionalStyleTransition, ContainerStylingProperties, DimensionStylingProperties, FlexChildStylingProperties, LayoutStyle, NonInteractableChildren, SpacingStylingProperties, StatelessStylingBlock, WhenPredicate } from '@rokt/dcui-layout-schema';
2
+ export interface DismissInstantPurchaseButtonStyles {
3
+ background?: null | BackgroundStylingProperties;
4
+ border?: null | BorderStylingProperties;
5
+ container?: null | ContainerStylingProperties;
6
+ dimension?: null | DimensionStylingProperties;
7
+ flexChild?: null | FlexChildStylingProperties;
8
+ spacing?: null | SpacingStylingProperties;
9
+ }
10
+ export interface DismissInstantPurchaseButtonTransitions {
11
+ own?: null | DismissInstantPurchaseButtonStyles;
12
+ }
13
+ export interface DismissInstantPurchaseButtonElements {
14
+ own: StatelessStylingBlock<DismissInstantPurchaseButtonStyles>[];
15
+ }
16
+ export interface DismissInstantPurchaseButtonModel<Children, Predicates> {
17
+ a11yLabel?: null | string;
18
+ styles?: null | LayoutStyle<DismissInstantPurchaseButtonElements, ConditionalStyleTransition<DismissInstantPurchaseButtonTransitions, Predicates>>;
19
+ children: Children[];
20
+ }
21
+ export interface DismissInstantPurchaseButtonProps {
22
+ /**
23
+ * - `a11yLabel`: define a custom accessibility label for a screen reader
24
+ * - `targetStep`: Checkout transaction step to transition to when element is clicked
25
+ * - `children`: it can accept below nodes,
26
+ * * `Row`
27
+ * * `Column`
28
+ * * `ZStack`
29
+ * * `FlowRow`
30
+ * * `BasicText`
31
+ * * `StaticImage`
32
+ * * `StaticIcon`
33
+ * * `DataImage`
34
+ * * `DataIcon`
35
+ * * `When`
36
+ * * `InlineContainer`
37
+ * * `EscapeHatch`
38
+ * - `styles`:
39
+ * * `elements`:
40
+ * - `own`:
41
+ * * `background`
42
+ * * `border`
43
+ * * `container`
44
+ * * `dimension`
45
+ * * `flexChild`
46
+ * * `spacing`
47
+ * * `transitions`:
48
+ * - `type`: 'Conditional'
49
+ * - `transition`:
50
+ * * `predicates`: WhenPredicate[]
51
+ * * `duration`: number
52
+ * * `value`:
53
+ * - `own`:
54
+ * * `container`
55
+ * * `dimension`
56
+ * * `flexChild`
57
+ * * `spacing`
58
+ * * `background`
59
+ * * `border`
60
+ */
61
+ schema: DismissInstantPurchaseButtonModel<NonInteractableChildren, WhenPredicate>;
62
+ testId?: string;
63
+ }
64
+ export declare function DismissInstantPurchaseButton(props: DismissInstantPurchaseButtonProps): import("react/jsx-runtime").JSX.Element;
@@ -1,6 +1,3 @@
1
1
  import { RequestFulfillmentDetails, PaymentRequestDetails } from '../../../../../libraries/domain/src/models';
2
2
  export type FulfillmentDetailsState = Partial<RequestFulfillmentDetails> | null;
3
3
  export type PaymentDetailsState = Partial<PaymentRequestDetails> | null;
4
- export type VariationSelectionTypes = 'variationColor' | 'variationSize' | 'variationUnits' | 'variationCount';
5
- export type VariationSelectionRequiredType = VariationSelectionTypes | 'default';
6
- export type VariationSelectionRequiredState = VariationSelectionRequiredType | null;