@rokt/dcui-orchestrator 0.2.1-rc.6 → 0.2.1-rc.60

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 (64) hide show
  1. package/dist/extensions/minimized-bottomsheet/src/components/bottom-sheet/bottom-sheet.d.ts +2 -0
  2. package/dist/extensions/minimized-bottomsheet/src/components/bottom-sheet/factory.d.ts +1 -0
  3. package/dist/extensions/minimized-bottomsheet/src/components/bottom-sheet/hooks.d.ts +2 -1
  4. package/dist/extensions/minimized-bottomsheet/src/components/bottomsheet-wrapper/overlay-wrapper.d.ts +2 -2
  5. package/dist/index.cjs +23 -23
  6. package/dist/index.js +25 -25
  7. package/dist/libraries/dcui-components/src/components/data-image-carousel/carousel-indicators.d.ts +20 -0
  8. package/dist/libraries/dcui-components/src/components/data-image-carousel/data-image-carousel.d.ts +100 -0
  9. package/dist/libraries/dcui-components/src/components/data-image-carousel/factory.d.ts +2 -0
  10. package/dist/libraries/dcui-components/src/components/data-image-carousel/index.d.ts +2 -0
  11. package/dist/libraries/domain/src/behaviors/cart-item-event.d.ts +49 -0
  12. package/dist/libraries/domain/src/behaviors/global-actions.d.ts +2 -0
  13. package/dist/libraries/domain/src/behaviors/index.d.ts +1 -0
  14. package/dist/libraries/domain/src/behaviors/send-partner.d.ts +7 -3
  15. package/dist/libraries/domain/src/models/index.d.ts +1 -0
  16. package/dist/libraries/domain/src/models/layout/layout-catalog-item.d.ts +2 -0
  17. package/dist/libraries/domain/src/models/partner-event.d.ts +1 -1
  18. package/dist/libraries/domain/src/models/plugin/plugin-catalog-item.d.ts +2 -0
  19. package/dist/libraries/domain/src/models/shipping.d.ts +25 -0
  20. package/dist/libraries/domain/src/models/signals.d.ts +2 -2
  21. package/dist/libraries/layout-renderer-utils/src/sagas/error/error-codes.d.ts +1 -0
  22. package/dist/libraries/layout-renderer-utils/src/sagas/plugin/display.d.ts +3 -0
  23. package/dist/libraries/orchestrator/src/sagas/cart-service/sagas.d.ts +16 -0
  24. package/dist/modules/add-to-cart/src/components/escape-hatch/factory.d.ts +1 -1
  25. package/dist/modules/add-to-cart/src/components/read-more-text/read-more-text.d.ts +29 -0
  26. package/dist/modules/add-to-cart/src/components/scroll-to-target/scroll-to-target.d.ts +56 -0
  27. package/dist/modules/add-to-cart/src/components/tooltip/tooltip.d.ts +42 -0
  28. package/dist/modules/add-to-cart/src/components/when-catalog-quantity/when-catalog-quantity.d.ts +22 -0
  29. package/dist/modules/add-to-cart/src/sagas/index.d.ts +2 -0
  30. package/dist/modules/add-to-cart/src/selectors/creative/index.d.ts +1 -0
  31. package/dist/modules/add-to-cart/src/selectors/creative/selectors.d.ts +3 -0
  32. package/dist/modules/add-to-cart/src/selectors/index.d.ts +1 -0
  33. package/dist/modules/instant-purchase/src/actions/instant-purchase.d.ts +5 -5
  34. package/dist/modules/instant-purchase/src/components/catalog-discount-callout-tag/catalog-discount-callout-tag.d.ts +90 -0
  35. package/dist/modules/instant-purchase/src/components/catalog-drop-down/catalog-drop-down.d.ts +4 -6
  36. package/dist/modules/instant-purchase/src/components/catalog-response-button/catalog-response-button.d.ts +5 -1
  37. package/dist/modules/instant-purchase/src/components/checkbox/checkbox.d.ts +79 -0
  38. package/dist/modules/instant-purchase/src/components/custom-state-validation-trigger-button/custom-state-validation-trigger-button.d.ts +28 -0
  39. package/dist/modules/instant-purchase/src/components/dismiss-instant-purchase-button/dismiss-instant-purchase-button.d.ts +1 -0
  40. package/dist/modules/instant-purchase/src/components/escape-hatch/factory.d.ts +1 -1
  41. package/dist/modules/instant-purchase/src/components/escape-hatch/index.d.ts +1 -0
  42. package/dist/modules/instant-purchase/src/components/inline-container/factory.d.ts +2 -0
  43. package/dist/modules/instant-purchase/src/components/inline-container/inline-container.d.ts +55 -0
  44. package/dist/modules/instant-purchase/src/components/loading-spinner/loading-spinner.d.ts +2 -1
  45. package/dist/modules/instant-purchase/src/components/offer-lifecycle-timer/offer-lifecycle-timer.d.ts +2 -0
  46. package/dist/modules/instant-purchase/src/components/rich-text/factory.d.ts +2 -0
  47. package/dist/modules/instant-purchase/src/components/rich-text/rich-text.d.ts +63 -0
  48. package/dist/modules/instant-purchase/src/models/state/instant-purchase.d.ts +3 -5
  49. package/dist/modules/instant-purchase/src/reducers/index.d.ts +3 -3
  50. package/dist/modules/instant-purchase/src/reducers/instant-purchase/index.d.ts +1 -1
  51. package/dist/modules/instant-purchase/src/reducers/instant-purchase/offer-lifecycle-event/reducer.d.ts +4 -0
  52. package/dist/modules/instant-purchase/src/sagas/index.d.ts +2 -0
  53. package/dist/modules/instant-purchase/src/sagas/instant-purchase/sagas.d.ts +10 -1
  54. package/dist/modules/instant-purchase/src/validators/index.d.ts +3 -0
  55. package/dist/modules/instant-purchase/src/validators/types.d.ts +8 -0
  56. package/dist/modules/instant-purchase/src/validators/utils.d.ts +3 -0
  57. package/dist/modules/instant-purchase/src/validators/validator-provider.d.ts +24 -0
  58. package/dist/modules/layouts-xp-sandbox/src/sagas/index.d.ts +2 -0
  59. package/dist/modules/standard-marketing/src/sagas/index.d.ts +2 -0
  60. package/dist/modules/standard-marketing/src/sagas/offer-engagement/channels.d.ts +4 -1
  61. package/package.json +1 -1
  62. package/dist/modules/instant-purchase/src/components/catalog-variation-selection-button/catalog-variation-selection-button.d.ts +0 -26
  63. package/dist/modules/instant-purchase/src/reducers/instant-purchase/variation-selection-required/reducer.d.ts +0 -4
  64. /package/dist/modules/instant-purchase/src/reducers/instant-purchase/{variation-selection-required → offer-lifecycle-event}/index.d.ts +0 -0
@@ -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;
@@ -21,17 +22,14 @@ export interface CatalogDropDownElements {
21
22
  dropDownListElement?: null | BasicStateStylingBlock<CatalogDropDownStyles>[];
22
23
  errorContentContainerStyles?: null | BasicStateStylingBlock<CatalogDropDownStyles>[];
23
24
  }
24
- export interface CatalogDropDownOptionData {
25
- catalogItem: PluginCatalogItem;
26
- index: number;
27
- }
28
25
  interface CatalogDropDownModel<NonInteractableChildren, Predicates> {
29
26
  styles?: null | LayoutStyle<CatalogDropDownElements, ConditionalStyleTransition<CatalogDropDownTransitions, Predicates>>;
30
27
  openTemplate: NonInteractableChildren;
31
28
  closedTemplate: NonInteractableChildren;
32
29
  closedDefaultTemplate: NonInteractableChildren;
33
30
  requiredSelectionErrorTemplate?: NonInteractableChildren;
34
- options: CatalogDropDownOptionData[];
31
+ validatorFieldConfig?: ValidatorFieldConfig<CatalogDropDownValidators>;
32
+ disableProgrammaticFocus?: boolean;
35
33
  }
36
34
  export interface CatalogDropDownProps {
37
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
@@ -0,0 +1,79 @@
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
+ checkboxScale?: number;
28
+ value?: boolean;
29
+ labelTemplate?: NonInteractableChildren[];
30
+ errorContentTemplate?: NonInteractableChildren[];
31
+ validatorFieldConfig?: ValidatorFieldConfig<CheckboxValidators>;
32
+ }
33
+ export interface CheckboxProps {
34
+ /**
35
+ * - `labelTemplate`, `errorContentTemplate`: it can accept below nodes,
36
+ * * `Row`
37
+ * * `FlowRow
38
+ * * `Column`
39
+ * * `ZStack`
40
+ * * `BasicText`
41
+ * * `StaticImage`
42
+ * * `DataImage`
43
+ * * `When`
44
+ * * `DataIcon`
45
+ * * `StaticIcon`
46
+ * * `EscapeHatch`
47
+ * - `checkboxColor`:
48
+ * * `string`
49
+ * - `value`:
50
+ * * `boolean`
51
+ * - `styles`:
52
+ * * `elements`:
53
+ * * `own`, `checkbox`, `label`, `checkboxContainerError`,
54
+ * `checkboxError`, `labelError`, `errorContent`:
55
+ * - `container`
56
+ * - `background`
57
+ * - `border`
58
+ * - `dimension`
59
+ * - `flexChild`
60
+ * - `spacing`
61
+ * * `transitions`:
62
+ * - `type`: 'Conditional'
63
+ * - `transition`:
64
+ * * `predicates`: WhenPredicate[]
65
+ * * `duration`: number
66
+ * * `value`:
67
+ * * `own`, `checkbox`, `label`, `checkboxContainerError`,
68
+ * `checkboxError`, `labelError`, `errorContent`:
69
+ * - `container`
70
+ * - `background`
71
+ * - `border`
72
+ * - `dimension`
73
+ * - `flexChild`
74
+ * - `spacing`
75
+ */
76
+ schema: CheckboxModel<WhenPredicate>;
77
+ testId?: string;
78
+ }
79
+ export declare function Checkbox(props: CheckboxProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,28 @@
1
+ import { ContainerStylingProperties, BorderStylingProperties, DimensionStylingProperties, FlexChildStylingProperties, SpacingStylingProperties, BasicStateStylingBlock, LayoutStyle, ConditionalStyleTransition, WhenPredicate, NonInteractableChildren } from '@rokt/dcui-layout-schema';
2
+ import { ValidatorTriggerConfig } from '../../validators';
3
+ export interface CustomStateValidationTriggerButtonStyles {
4
+ container?: null | ContainerStylingProperties;
5
+ border?: null | BorderStylingProperties;
6
+ dimension?: null | DimensionStylingProperties;
7
+ flexChild?: null | FlexChildStylingProperties;
8
+ spacing?: null | SpacingStylingProperties;
9
+ }
10
+ export interface CustomStateValidationTriggerButtonElements {
11
+ own: BasicStateStylingBlock<CustomStateValidationTriggerButtonStyles>[];
12
+ }
13
+ export interface CustomStateValidationTriggerButtonTransitions {
14
+ own?: null | CustomStateValidationTriggerButtonStyles;
15
+ }
16
+ export interface CustomStateValidationTriggerButtonModel<Children, Predicates> {
17
+ styles?: null | LayoutStyle<CustomStateValidationTriggerButtonElements, ConditionalStyleTransition<CustomStateValidationTriggerButtonTransitions, Predicates>>;
18
+ children: Children[];
19
+ customStateKey: string;
20
+ customStateValue: number;
21
+ validatorTriggerConfig?: ValidatorTriggerConfig;
22
+ a11yLabel?: null | string;
23
+ }
24
+ export interface CustomStateValidationTriggerButtonProps {
25
+ schema: CustomStateValidationTriggerButtonModel<NonInteractableChildren, WhenPredicate>;
26
+ testId?: string;
27
+ }
28
+ export declare function CustomStateValidationTriggerButton(props: CustomStateValidationTriggerButtonProps): import("react/jsx-runtime").JSX.Element;
@@ -17,6 +17,7 @@ export interface DismissInstantPurchaseButtonModel<Children, Predicates> {
17
17
  a11yLabel?: null | string;
18
18
  styles?: null | LayoutStyle<DismissInstantPurchaseButtonElements, ConditionalStyleTransition<DismissInstantPurchaseButtonTransitions, Predicates>>;
19
19
  children: Children[];
20
+ emitInstantPurchaseDismissalRdnEvent?: boolean;
20
21
  }
21
22
  export interface DismissInstantPurchaseButtonProps {
22
23
  /**
@@ -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, isInline?: boolean): JSX.Element | undefined;
@@ -0,0 +1 @@
1
+ export * from './factory';
@@ -0,0 +1,2 @@
1
+ import { LayoutSchemaModel } from '@rokt/dcui-layout-schema';
2
+ export declare function tryMakeInlineContainer(schema: LayoutSchemaModel, testId?: string): JSX.Element | void;
@@ -0,0 +1,55 @@
1
+ import { BasicStateStylingBlock, LayoutSchemaModel, LayoutStyle, ConditionalStyleTransition, TextStylingProperties, WhenPredicate } from '@rokt/dcui-layout-schema';
2
+ import { InlineContainerStyles } from '@rokt/dcui-layout-schema';
3
+ interface InlineContainerTextStyles extends InlineContainerStyles {
4
+ text?: TextStylingProperties;
5
+ }
6
+ export interface InlineContainerTextElements {
7
+ own: BasicStateStylingBlock<InlineContainerTextStyles>[];
8
+ }
9
+ export interface InlineContainerTextTransitions {
10
+ own?: null | InlineContainerTextStyles;
11
+ }
12
+ export interface InlineContainerTextModel<Children, Predicates> {
13
+ a11yLabel?: null | string;
14
+ styles?: null | LayoutStyle<InlineContainerTextElements, ConditionalStyleTransition<InlineContainerTextTransitions, Predicates>>;
15
+ children: Children[];
16
+ }
17
+ interface InlineContainerProps<Children extends LayoutSchemaModel> {
18
+ /**
19
+ * - `a11yLabel`: define a custom accessibility label for the screen reader
20
+ * - `children`: it can accept below nodes,
21
+ * * `BasicText (with inline styles only)`
22
+ * * `StaticLink (with inline styles only)`
23
+ * * `ToggleButtonStateTrigger (with inline styles only)`
24
+ * - `styles`:
25
+ * * `elements`:
26
+ * - `own`:
27
+ * * `container`
28
+ * * `dimension`
29
+ * * `flexChild`
30
+ * * `spacing`
31
+ * * `background`
32
+ * * `border`
33
+ * * `transitions`:
34
+ * - `type`: 'Conditional'
35
+ * - `transition`:
36
+ * * `predicates`: WhenPredicate[]
37
+ * * `duration`: number
38
+ * * `value`:
39
+ * - `own`:
40
+ * * `container`
41
+ * * `dimension`
42
+ * * `flexChild`
43
+ * * `spacing`
44
+ * * `background`
45
+ * * `border`
46
+ */
47
+ schema: InlineContainerTextModel<Children, WhenPredicate>;
48
+ testId?: string;
49
+ }
50
+ /** The Inline Container is a layout node that organises and aligns content horizontally,
51
+ * treating every child as an inline element.<br>
52
+ * *Where can we use this: __outer layout__, __layout variant__*
53
+ * */
54
+ export declare function InlineContainer<Children extends LayoutSchemaModel>(props: InlineContainerProps<Children>): JSX.Element;
55
+ export {};
@@ -20,9 +20,10 @@ export interface LoadingSpinnerConfig {
20
20
  stroke?: number;
21
21
  primaryColor?: string;
22
22
  secondaryColor?: string | null;
23
+ duration?: number;
24
+ mode?: 'dashed' | 'segmented';
23
25
  primaryRotation?: number;
24
26
  secondaryRotation?: number;
25
- duration?: number;
26
27
  arcFraction?: number;
27
28
  }
28
29
  export interface LoadingSpinnerModel<Predicates> {
@@ -14,11 +14,13 @@ export interface OfferLifecycleTimerTransitions {
14
14
  }
15
15
  export interface OfferLifecycleTimerModel<Predicates> {
16
16
  durationInSeconds: number;
17
+ key: string;
17
18
  format?: 'M:SS' | 'S';
18
19
  styles?: LayoutStyle<OfferLifecycleTimerElements, ConditionalStyleTransition<OfferLifecycleTimerTransitions, Predicates>>;
19
20
  }
20
21
  export interface OfferLifecycleTimerProps {
21
22
  schema: OfferLifecycleTimerModel<WhenPredicate>;
23
+ isInline?: boolean;
22
24
  testId?: string;
23
25
  }
24
26
  export declare function OfferLifecycleTimer(props: OfferLifecycleTimerProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { LayoutSchemaModel } from '@rokt/dcui-layout-schema';
2
+ export declare function tryMakeRichText(schema: LayoutSchemaModel, testId?: string, isInline?: boolean): JSX.Element | void;
@@ -0,0 +1,63 @@
1
+ import { BasicStateStylingBlock, InLineTextStyle, RichTextStyle, ConditionalStyleTransition, RichTextTransitions, LayoutStyle, LinkOpenTarget, WhenPredicate } from '@rokt/dcui-layout-schema';
2
+ export interface RichTextElements {
3
+ own: BasicStateStylingBlock<RichTextStyle>[];
4
+ link?: null | BasicStateStylingBlock<InLineTextStyle>[];
5
+ }
6
+ interface RichTextModel<Predicates> {
7
+ styles?: null | LayoutStyle<RichTextElements, ConditionalStyleTransition<RichTextTransitions, Predicates>>;
8
+ openLinks?: null | LinkOpenTarget;
9
+ value: string;
10
+ }
11
+ export interface RichTextProps {
12
+ /**
13
+ * - `openLinks`: 'internally' | 'externally'
14
+ * - `value`: the textual content. It supports:
15
+ * * plain text;
16
+ * * html: `<em>`, `<strong>`, `<a>`, '<br>', '<u>';
17
+ * * data expansion placeholder: e.g `%^DATA.creativeCopy.creative.title|^%`,
18
+ * `%^DATA.creativeCopy.creative.copy|^%`,
19
+ * `%^DATA.creativeLink.termsAndConditions|^%`,
20
+ * `%^DATA.creativeLink.privacyPolicy|^%`.
21
+ * - `styles`:
22
+ * * `elements`:
23
+ * - `own`:
24
+ * * `dimension`
25
+ * * `flexChild`
26
+ * * `spacing`
27
+ * * `background`
28
+ * * `text`
29
+ * - `link`:
30
+ * * `text`
31
+ */
32
+ schema: RichTextModel<WhenPredicate>;
33
+ isInline?: boolean;
34
+ testId?: string;
35
+ }
36
+ export declare const sanitiseOptions: {
37
+ allowedTags: string[];
38
+ allowedAttributes: {
39
+ a: string[];
40
+ strong: never[];
41
+ em: never[];
42
+ br: never[];
43
+ u: never[];
44
+ p: never[];
45
+ ol: never[];
46
+ ul: never[];
47
+ li: never[];
48
+ span: never[];
49
+ h3: never[];
50
+ div: never[];
51
+ b: never[];
52
+ };
53
+ allowedSchemes: string[];
54
+ };
55
+ export declare const insaneExceptionCharacters: Map<string, string>;
56
+ export declare const breaklinePattern: RegExp;
57
+ /**The RichText override-Node is meant to be used for testing new element-styling only.<br>
58
+ * If no additional functionality is required for an instance of RichText, it is recommended to use the base node in plugin.<br>
59
+ * It also supports data expansion with namespace 'creativeCopy'.<br>
60
+ * *Where can we use this: __outer layout__, __layout variant__*
61
+ * */
62
+ export declare function RichText(props: RichTextProps): import("react/jsx-runtime").JSX.Element | null;
63
+ export {};
@@ -1,6 +1,4 @@
1
- import { RequestFulfillmentDetails, PaymentRequestDetails } from '../../../../../libraries/domain/src/models';
1
+ import { RequestFulfillmentDetails } from '../../../../../libraries/domain/src/models';
2
+ import { OfferLifecycleCompletePayload, OfferLifecycleDismissedPayload } from '../../../../../libraries/domain/src/behaviors';
2
3
  export type FulfillmentDetailsState = Partial<RequestFulfillmentDetails> | null;
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;
4
+ export type OfferLifecycleEventState = OfferLifecycleDismissedPayload | OfferLifecycleCompletePayload | null;
@@ -1,13 +1,13 @@
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, OfferLifecycleEventState } 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;
10
+ offerLifecycleEvent: OfferLifecycleEventState;
11
11
  };
12
12
  export type StateActions = GlobalActions | ChildLayoutActions;
13
13
  export declare const appReducers: {
@@ -16,6 +16,6 @@ export declare const appReducers: {
16
16
  dynamicData: typeof dynamicDataReducer;
17
17
  childLayouts: typeof childLayoutsReducer;
18
18
  fulfillmentDetails: (state: FulfillmentDetailsState | undefined, action: import("redux").AnyAction) => FulfillmentDetailsState;
19
- variationSelectionRequired: (state: VariationSelectionRequiredState | undefined, action: import("redux").AnyAction) => VariationSelectionRequiredState;
19
+ offerLifecycleEvent: (state: OfferLifecycleEventState | undefined, action: import("redux").AnyAction) => OfferLifecycleEventState;
20
20
  };
21
21
  export declare function makeAppInitialState(data?: Partial<AppState>): AppState;
@@ -1,3 +1,3 @@
1
1
  export * from './fulfillment-details';
2
+ export * from './offer-lifecycle-event';
2
3
  export * from './utils';
3
- export * from './variation-selection-required';
@@ -0,0 +1,4 @@
1
+ import { AnyAction } from '@reduxjs/toolkit';
2
+ import { OfferLifecycleEventState } from '../../../models';
3
+ export declare function makeInitialOfferLifecycleEventState(): OfferLifecycleEventState;
4
+ export declare const offerLifecycleEventReducer: (state: OfferLifecycleEventState | undefined, action: AnyAction) => OfferLifecycleEventState;
@@ -16,5 +16,7 @@ export declare const sagaActionTypes: {
16
16
  readonly SET_PARTNER_VALIDATION_STATUS: "GLOBAL/SET_PARTNER_VALIDATION_STATUS";
17
17
  readonly SET_GLOBAL_OFFER_DATA_CART: "GLOBAL/SET_GLOBAL_OFFER_DATA_CART";
18
18
  readonly LAUNCH_CHILD_LAYOUT: "GLOBAL/LAUNCH_CHILD_LAYOUT";
19
+ readonly INITIATE_CART_ITEM_EVENT: "GLOBAL/CART_ITEM_EVENT/INITIATE";
20
+ readonly CART_ITEM_RESPONSE: "GLOBAL/CART_ITEM_EVENT/RESPONSE";
19
21
  };
20
22
  export declare function appSagas(gateway: GlobalGateway, logger: (log: Log) => void): Generator<import("redux-saga/effects").AllEffect<import("redux-saga/effects").ForkEffect<void>>, void, unknown>;
@@ -1,5 +1,5 @@
1
1
  import { SelectEffect, PutEffect, CallEffect } from 'redux-saga/effects';
2
- import { DismissalReason } from '../../../../../libraries/domain/src/behaviors';
2
+ import { DismissalReason, OfferLifecycleDismissedPayload, OfferLifecycleCompletePayload } from '../../../../../libraries/domain/src/behaviors';
3
3
  import { InstantPurchaseWsdkPayload, Log, PluginCartItem, PluginCatalogItem } from '../../../../../libraries/domain/src/models';
4
4
  import { GlobalGateway } from '../../../../../libraries/module-connector/src/main';
5
5
  import { StaticData } from '@rokt/module-utils';
@@ -10,6 +10,9 @@ export declare const INSTANT_PURCHASE_RESPONSE_TTL = 60000;
10
10
  export declare function processSelectOnlyCatalogItem(): Generator<SelectEffect | PutEffect, void, AppState | undefined>;
11
11
  export declare function processSelectCatalogItem(action: TriggerSelectItemAction): Generator<PutEffect, void, PluginCatalogItem | undefined>;
12
12
  export declare function processInstantPurchaseCartItem(gateway: GlobalGateway, logger: (log: Log) => void, action: InitiateInstantPurchase): Generator<CallEffect<void> | SelectEffect | import("redux-saga/effects").ForkEffect<void> | PutEffect<{
13
+ type: string;
14
+ payload: OfferLifecycleDismissedPayload | OfferLifecycleCompletePayload;
15
+ }> | PutEffect<{
13
16
  type: string;
14
17
  payload: {
15
18
  key: string;
@@ -44,6 +47,9 @@ export declare function processInstantPurchaseCartItem(gateway: GlobalGateway, l
44
47
  }>, void, AppState | undefined>;
45
48
  export declare function handleInstantPurchasePartnerResponse(logger: (log: Log) => void, action: InstantPurchasePartnerResponse): Generator<SelectEffect | PutEffect | CallEffect, void, StaticData | undefined>;
46
49
  export declare function handleInstantPurchaseWsdkResponse(action: InstantPurchaseWsdkResponse): Generator<PutEffect<{
50
+ type: string;
51
+ payload: OfferLifecycleDismissedPayload | OfferLifecycleCompletePayload;
52
+ }> | PutEffect<{
47
53
  type: string;
48
54
  payload: {
49
55
  key: string;
@@ -68,6 +74,9 @@ export declare function initiatePartnerResponseListening(gateway: GlobalGateway,
68
74
  }>;
69
75
  /** Visible for testing */
70
76
  export declare function initiateWsdkResponseListening(gateway: GlobalGateway, logger: (log: Log) => void): Generator<CallEffect<void> | PutEffect<{
77
+ type: string;
78
+ payload: OfferLifecycleDismissedPayload | OfferLifecycleCompletePayload;
79
+ }> | PutEffect<{
71
80
  type: string;
72
81
  payload: {
73
82
  key: string;
@@ -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;
@@ -13,5 +13,7 @@ export declare const sagaActionTypes: {
13
13
  readonly SET_PARTNER_VALIDATION_STATUS: "GLOBAL/SET_PARTNER_VALIDATION_STATUS";
14
14
  readonly SET_GLOBAL_OFFER_DATA_CART: "GLOBAL/SET_GLOBAL_OFFER_DATA_CART";
15
15
  readonly LAUNCH_CHILD_LAYOUT: "GLOBAL/LAUNCH_CHILD_LAYOUT";
16
+ readonly INITIATE_CART_ITEM_EVENT: "GLOBAL/CART_ITEM_EVENT/INITIATE";
17
+ readonly CART_ITEM_RESPONSE: "GLOBAL/CART_ITEM_EVENT/RESPONSE";
16
18
  };
17
19
  export declare function appSagas(gateway: GlobalGateway, logger: (log: Log) => void): Generator<import("redux-saga/effects").AllEffect<import("redux-saga/effects").ForkEffect<never>>, void, unknown>;
@@ -13,5 +13,7 @@ export declare const sagaActionTypes: {
13
13
  readonly SET_PARTNER_VALIDATION_STATUS: "GLOBAL/SET_PARTNER_VALIDATION_STATUS";
14
14
  readonly SET_GLOBAL_OFFER_DATA_CART: "GLOBAL/SET_GLOBAL_OFFER_DATA_CART";
15
15
  readonly LAUNCH_CHILD_LAYOUT: "GLOBAL/LAUNCH_CHILD_LAYOUT";
16
+ readonly INITIATE_CART_ITEM_EVENT: "GLOBAL/CART_ITEM_EVENT/INITIATE";
17
+ readonly CART_ITEM_RESPONSE: "GLOBAL/CART_ITEM_EVENT/RESPONSE";
16
18
  };
17
19
  export declare function appSagas(gateway: GlobalGateway, logger: (log: Log) => void): Generator<import("redux-saga/effects").AllEffect<import("redux-saga/effects").ForkEffect<never>>, void, unknown>;
@@ -6,7 +6,10 @@ export type ChildPluginResult = 'SUCCESS' | 'UNSPECIFIED' | 'CLOSED';
6
6
  export declare function createChildPluginChannel(childPlugin: Pick<ChildPlugin, 'onClose' | 'onEvent'>): EventChannel<ChildPluginResult>;
7
7
  export type RealtimeFulfillmentEvent = {
8
8
  eventName: string;
9
- data: Record<string, string>;
9
+ data: NestedStringRecord;
10
10
  };
11
11
  export declare function makeRealtimeFulfillmentEventMessageChannel(gateway: Pick<GlobalGateway, 'onEvent'>): EventChannel<RealtimeFulfillmentEvent>;
12
+ export type NestedStringRecord = {
13
+ [key: string]: string | NestedStringRecord;
14
+ };
12
15
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rokt/dcui-orchestrator",
3
- "version": "0.2.1-rc.6",
3
+ "version": "0.2.1-rc.60",
4
4
  "description": "Rokt's DCUI rendering process",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.js",
@@ -1,26 +0,0 @@
1
- import { ContainerStylingProperties, BorderStylingProperties, DimensionStylingProperties, FlexChildStylingProperties, SpacingStylingProperties, BasicStateStylingBlock, LayoutStyle, ConditionalStyleTransition, WhenPredicate, NonInteractableChildren } from '@rokt/dcui-layout-schema';
2
- export interface CatalogVariationSelectionButtonStyles {
3
- container?: null | ContainerStylingProperties;
4
- border?: null | BorderStylingProperties;
5
- dimension?: null | DimensionStylingProperties;
6
- flexChild?: null | FlexChildStylingProperties;
7
- spacing?: null | SpacingStylingProperties;
8
- }
9
- export interface CatalogVariationSelectionButtonElements {
10
- own: BasicStateStylingBlock<CatalogVariationSelectionButtonStyles>[];
11
- }
12
- export interface CatalogVariationSelectionButtonTransitions {
13
- own?: null | CatalogVariationSelectionButtonStyles;
14
- }
15
- export interface CatalogVariationSelectionButtonModel<Children, Predicates> {
16
- styles?: null | LayoutStyle<CatalogVariationSelectionButtonElements, ConditionalStyleTransition<CatalogVariationSelectionButtonTransitions, Predicates>>;
17
- children: Children[];
18
- customStateKey: string;
19
- customStateValue: number;
20
- a11yLabel?: null | string;
21
- }
22
- export interface CatalogVariationSelectionButtonProps {
23
- schema: CatalogVariationSelectionButtonModel<NonInteractableChildren, WhenPredicate>;
24
- testId?: string;
25
- }
26
- export declare function CatalogVariationSelectionButton(props: CatalogVariationSelectionButtonProps): import("react/jsx-runtime").JSX.Element;
@@ -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;