@rokt/dcui-orchestrator 0.2.1-rc.1 → 0.2.1-rc.11

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 (29) hide show
  1. package/dist/index.cjs +29 -29
  2. package/dist/index.js +22 -22
  3. package/dist/libraries/domain/src/behaviors/offer-engagement.d.ts +7 -1
  4. package/dist/libraries/domain/src/models/plugin/plugin-catalog-item.d.ts +4 -0
  5. package/dist/libraries/domain/src/models/plugin/plugin-creative-response-option.d.ts +5 -1
  6. package/dist/libraries/domain/src/models/plugin/plugin-signal-type.d.ts +2 -1
  7. package/dist/libraries/domain/src/models/signals.d.ts +12 -2
  8. package/dist/libraries/orchestrator/src/sagas/offer-engagement/sagas.d.ts +1 -1
  9. package/dist/libraries/plugin-utils/src/translate-config.d.ts +2 -2
  10. package/dist/modules/add-to-cart/src/components/catalog-partner-event-button/catalog-partner-event-button.d.ts +8 -0
  11. package/dist/modules/instant-purchase/src/actions/instant-purchase.d.ts +1 -6
  12. package/dist/modules/instant-purchase/src/components/catalog-drop-down/catalog-drop-down.d.ts +6 -7
  13. package/dist/modules/instant-purchase/src/components/catalog-image-gallery/catalog-image-gallery.d.ts +6 -1
  14. package/dist/modules/instant-purchase/src/components/catalog-response-button/catalog-response-button.d.ts +5 -1
  15. package/dist/modules/instant-purchase/src/components/catalog-variation-selection-button/catalog-variation-selection-button.d.ts +2 -0
  16. package/dist/modules/instant-purchase/src/components/checkbox/checkbox.d.ts +78 -0
  17. package/dist/modules/instant-purchase/src/components/dismiss-instant-purchase-button/dismiss-instant-purchase-button.d.ts +64 -0
  18. package/dist/modules/instant-purchase/src/models/state/instant-purchase.d.ts +0 -3
  19. package/dist/modules/instant-purchase/src/reducers/index.d.ts +1 -3
  20. package/dist/modules/instant-purchase/src/reducers/instant-purchase/index.d.ts +0 -1
  21. package/dist/modules/instant-purchase/src/validators/index.d.ts +3 -0
  22. package/dist/modules/instant-purchase/src/validators/types.d.ts +8 -0
  23. package/dist/modules/instant-purchase/src/validators/utils.d.ts +3 -0
  24. package/dist/modules/instant-purchase/src/validators/validator-provider.d.ts +24 -0
  25. package/dist/modules/standard-marketing/src/components/catalog-response-button/catalog-response-button.d.ts +43 -0
  26. package/dist/modules/standard-marketing/src/components/catalog-response-button/factory.d.ts +2 -0
  27. package/package.json +1 -1
  28. package/dist/modules/instant-purchase/src/reducers/instant-purchase/variation-selection-required/index.d.ts +0 -1
  29. package/dist/modules/instant-purchase/src/reducers/instant-purchase/variation-selection-required/reducer.d.ts +0 -4
@@ -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,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,4 @@
1
- import { BackgroundStylingProperties, BasicStateStylingBlock, BorderStylingProperties, ConditionalStyleTransition, ContainerStylingProperties, DataImageStyles, DimensionStylingProperties, FlexChildStylingProperties, LayoutStyle, RowStyle, SpacingStylingProperties, WhenPredicate } from '@rokt/dcui-layout-schema';
1
+ import { BackgroundStylingProperties, BasicStateStylingBlock, BorderStylingProperties, ConditionalStyleTransition, ContainerStylingProperties, DataImageStyles, DimensionStylingProperties, FlexChildStylingProperties, LayoutStyle, RowStyle, SpacingStylingProperties, WhenPredicate, StaticIconModel } from '@rokt/dcui-layout-schema';
2
2
  interface CatalogImageGalleryStyles {
3
3
  container?: null | ContainerStylingProperties;
4
4
  background?: null | BackgroundStylingProperties;
@@ -11,13 +11,18 @@ interface CatalogImageGalleryElements {
11
11
  own: BasicStateStylingBlock<CatalogImageGalleryStyles>[];
12
12
  mainImage: BasicStateStylingBlock<DataImageStyles>[];
13
13
  thumbnailImage: BasicStateStylingBlock<DataImageStyles>[];
14
+ selectedThumbnailImage: BasicStateStylingBlock<DataImageStyles>[];
14
15
  thumbnailList: BasicStateStylingBlock<RowStyle>[];
16
+ scrollIconButton?: BasicStateStylingBlock<RowStyle>[];
15
17
  }
16
18
  interface CatalogImageGalleryTransitions {
17
19
  own?: null | CatalogImageGalleryStyles;
18
20
  }
19
21
  export interface CatalogImageGalleryModel<Predicates> {
20
22
  styles?: null | LayoutStyle<CatalogImageGalleryElements, ConditionalStyleTransition<CatalogImageGalleryTransitions, Predicates>>;
23
+ scrollGradientLength?: number;
24
+ leftScrollIconTemplate?: StaticIconModel<WhenPredicate>;
25
+ rightScrollIconTemplate?: StaticIconModel<WhenPredicate>;
21
26
  }
22
27
  export interface CatalogImageGalleryProps {
23
28
  schema: CatalogImageGalleryModel<WhenPredicate>;
@@ -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;
@@ -1,13 +1,12 @@
1
1
  import { GlobalActions } from '../../../../libraries/domain/src/behaviors';
2
2
  import { ChildLayoutActions, childLayoutsReducer, ChildLayoutsState, StaticData, staticDataReducer, DynamicData, dynamicDataReducer } from '@rokt/module-utils';
3
- import { CatalogSelectionState, FulfillmentDetailsState, VariationSelectionRequiredState } from '../models';
3
+ import { CatalogSelectionState, FulfillmentDetailsState } from '../models';
4
4
  export type AppState = {
5
5
  staticData: StaticData;
6
6
  selectedItem: CatalogSelectionState;
7
7
  dynamicData: DynamicData;
8
8
  childLayouts: ChildLayoutsState;
9
9
  fulfillmentDetails: FulfillmentDetailsState;
10
- variationSelectionRequired: VariationSelectionRequiredState;
11
10
  };
12
11
  export type StateActions = GlobalActions | ChildLayoutActions;
13
12
  export declare const appReducers: {
@@ -16,6 +15,5 @@ export declare const appReducers: {
16
15
  dynamicData: typeof dynamicDataReducer;
17
16
  childLayouts: typeof childLayoutsReducer;
18
17
  fulfillmentDetails: (state: FulfillmentDetailsState | undefined, action: import("redux").AnyAction) => FulfillmentDetailsState;
19
- variationSelectionRequired: (state: VariationSelectionRequiredState | undefined, action: import("redux").AnyAction) => VariationSelectionRequiredState;
20
18
  };
21
19
  export declare function makeAppInitialState(data?: Partial<AppState>): AppState;
@@ -1,3 +1,2 @@
1
1
  export * from './fulfillment-details';
2
2
  export * from './utils';
3
- export * from './variation-selection-required';
@@ -0,0 +1,3 @@
1
+ export * from './validator-provider';
2
+ export * from './types';
3
+ export * from './utils';
@@ -0,0 +1,8 @@
1
+ export interface ValidatorTriggerConfig {
2
+ validatorFieldKeys: string[];
3
+ }
4
+ export interface ValidatorFieldConfig<Validators extends string> {
5
+ validationFieldKey: string;
6
+ validators: Validators[];
7
+ validateOnChange?: boolean;
8
+ }
@@ -0,0 +1,3 @@
1
+ import { Validator } from './validator-provider';
2
+ import { ValidatorFieldConfig } from './types';
3
+ export declare function getActiveValidators<ValidatorType extends string>(validatorFunctions: Record<ValidatorType, Validator>, validatorFieldConfig: ValidatorFieldConfig<ValidatorType> | undefined): Validator[];
@@ -0,0 +1,24 @@
1
+ import { ReactNode } from 'react';
2
+ export type Validator = () => boolean;
3
+ export interface ValidatorFieldData {
4
+ validators: Validator[];
5
+ isValid: boolean;
6
+ }
7
+ export type ValidatorMap = Record<string, ValidatorFieldData>;
8
+ export interface ValidatorContextType {
9
+ registerValidators: (validatorFieldKey: string, validators: Validator[]) => void;
10
+ validateFieldKeys: (validatorFieldKey: string[]) => boolean;
11
+ getFieldKeyValidity: (validatorFieldKey: string) => boolean;
12
+ }
13
+ export declare const ValidatorContext: import("react").Context<ValidatorContextType | null>;
14
+ /**
15
+ * React context provider that manages validation across multiple nodes.
16
+ * Stores a map of validator functions keyed by identifiers, tracks
17
+ * each node's validity, and exposes methods to register validators,
18
+ * validate nodes, and check validity.
19
+ */
20
+ export declare function ValidatorProvider(props: {
21
+ children: ReactNode;
22
+ }): import("react/jsx-runtime").JSX.Element;
23
+ export declare function useValidator(): ValidatorContextType;
24
+ export declare function useRegisterValidators(validationFieldKey: string | undefined, validators: Validator[]): void;
@@ -0,0 +1,43 @@
1
+ import { CatalogResponseButtonModel, NonInteractableChildren, WhenPredicate } from '@rokt/dcui-layout-schema';
2
+ export interface CatalogResponseButtonProps {
3
+ /**
4
+ * - `responseKey`: the key of the response option to use.
5
+ * - `children`: it can accept below nodes,
6
+ * * `Row`
7
+ * * `Column`
8
+ * * `ZStack`
9
+ * * `BasicText`
10
+ * * `StaticImage`
11
+ * * `DataImage`
12
+ * * `When`
13
+ * - `styles`:
14
+ * * `elements`:
15
+ * * `own`:
16
+ * - `container`
17
+ * - `dimension`
18
+ * - `flexChild`
19
+ * - `spacing`
20
+ * - `background`
21
+ * - `border`
22
+ * * `transitions`:
23
+ * - `type`: 'Conditional'
24
+ * - `transition`:
25
+ * * `predicates`: WhenPredicate[]
26
+ * * `duration`: number
27
+ * * `value`:
28
+ * * `own`:
29
+ * - `container`
30
+ * - `dimension`
31
+ * - `flexChild`
32
+ * - `spacing`
33
+ * - `background`
34
+ * - `border`
35
+ */
36
+ schema: CatalogResponseButtonModel<NonInteractableChildren, WhenPredicate>;
37
+ testId?: string;
38
+ }
39
+ /**The CatalogResponse is a button node that generate a Call-to-Action button
40
+ * for performing response actions for catalog items
41
+ * *Where can we use this: __layout variant__*
42
+ */
43
+ export declare function CatalogResponseButton(props: CatalogResponseButtonProps): import("react/jsx-runtime").JSX.Element | undefined;
@@ -0,0 +1,2 @@
1
+ import { LayoutSchemaModel } from '@rokt/dcui-layout-schema';
2
+ export declare function tryMakeCatalogResponseButton(schema: LayoutSchemaModel, testId?: string): JSX.Element | void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rokt/dcui-orchestrator",
3
- "version": "0.2.1-rc.1",
3
+ "version": "0.2.1-rc.11",
4
4
  "description": "Rokt's DCUI rendering process",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.js",
@@ -1,4 +0,0 @@
1
- import { AnyAction } from '@reduxjs/toolkit';
2
- import { VariationSelectionRequiredState } from '../../../models';
3
- export declare function makeInitialVariationSelectionRequiredState(): VariationSelectionRequiredState;
4
- export declare const variationSelectionRequiredReducer: (state: VariationSelectionRequiredState | undefined, action: AnyAction) => VariationSelectionRequiredState;