@rokt/dcui-orchestrator 0.2.1-rc.8 → 0.2.1-rc.80

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 (68) 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 +30 -30
  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/dcui-components/src/components/icon-group/factory.d.ts +2 -0
  12. package/dist/libraries/dcui-components/src/components/icon-group/icon-group.d.ts +36 -0
  13. package/dist/libraries/dcui-components/src/components/icon-group/index.d.ts +2 -0
  14. package/dist/libraries/domain/src/behaviors/cart-item-event.d.ts +49 -0
  15. package/dist/libraries/domain/src/behaviors/global-actions.d.ts +2 -0
  16. package/dist/libraries/domain/src/behaviors/index.d.ts +1 -0
  17. package/dist/libraries/domain/src/behaviors/offer-engagement.d.ts +1 -0
  18. package/dist/libraries/domain/src/behaviors/send-partner.d.ts +7 -3
  19. package/dist/libraries/domain/src/models/index.d.ts +1 -0
  20. package/dist/libraries/domain/src/models/layout/layout-catalog-item.d.ts +2 -0
  21. package/dist/libraries/domain/src/models/partner-event.d.ts +1 -1
  22. package/dist/libraries/domain/src/models/plugin/plugin-catalog-item.d.ts +8 -0
  23. package/dist/libraries/domain/src/models/shipping.d.ts +25 -0
  24. package/dist/libraries/domain/src/models/signals.d.ts +2 -2
  25. package/dist/libraries/layout-renderer-utils/src/sagas/error/error-codes.d.ts +1 -0
  26. package/dist/libraries/layout-renderer-utils/src/sagas/plugin/display.d.ts +3 -0
  27. package/dist/libraries/orchestrator/src/sagas/cart-service/sagas.d.ts +16 -0
  28. package/dist/libraries/orchestrator/src/sagas/progression/sagas.d.ts +2 -1
  29. package/dist/libraries/saga-utils/src/utils/catalog-translator.d.ts +1 -0
  30. package/dist/modules/add-to-cart/src/components/escape-hatch/factory.d.ts +1 -1
  31. package/dist/modules/add-to-cart/src/components/read-more-text/read-more-text.d.ts +29 -0
  32. package/dist/modules/add-to-cart/src/components/read-more-text-container/read-more-text-container.d.ts +34 -0
  33. package/dist/modules/add-to-cart/src/components/scroll-to-target/scroll-to-target.d.ts +56 -0
  34. package/dist/modules/add-to-cart/src/components/tooltip/tooltip.d.ts +42 -0
  35. package/dist/modules/add-to-cart/src/components/when-catalog-quantity/when-catalog-quantity.d.ts +22 -0
  36. package/dist/modules/add-to-cart/src/sagas/index.d.ts +2 -0
  37. package/dist/modules/add-to-cart/src/selectors/creative/index.d.ts +1 -0
  38. package/dist/modules/add-to-cart/src/selectors/creative/selectors.d.ts +3 -0
  39. package/dist/modules/add-to-cart/src/selectors/index.d.ts +1 -0
  40. package/dist/modules/instant-purchase/src/actions/instant-purchase.d.ts +6 -1
  41. package/dist/modules/instant-purchase/src/components/catalog-discount-callout-tag/catalog-discount-callout-tag.d.ts +90 -0
  42. package/dist/modules/instant-purchase/src/components/catalog-drop-down/catalog-drop-down.d.ts +2 -0
  43. package/dist/modules/instant-purchase/src/components/catalog-image-gallery/catalog-image-gallery.d.ts +9 -4
  44. package/dist/modules/instant-purchase/src/components/catalog-image-gallery/constants.d.ts +9 -0
  45. package/dist/modules/instant-purchase/src/components/checkbox/checkbox.d.ts +1 -0
  46. package/dist/modules/instant-purchase/src/components/custom-state-validation-trigger-button/custom-state-validation-trigger-button.d.ts +28 -0
  47. package/dist/modules/instant-purchase/src/components/dismiss-instant-purchase-button/dismiss-instant-purchase-button.d.ts +1 -0
  48. package/dist/modules/instant-purchase/src/components/escape-hatch/factory.d.ts +1 -1
  49. package/dist/modules/instant-purchase/src/components/escape-hatch/index.d.ts +1 -0
  50. package/dist/modules/instant-purchase/src/components/inline-container/factory.d.ts +2 -0
  51. package/dist/modules/instant-purchase/src/components/inline-container/inline-container.d.ts +55 -0
  52. package/dist/modules/instant-purchase/src/components/loading-spinner/loading-spinner.d.ts +2 -1
  53. package/dist/modules/instant-purchase/src/components/offer-lifecycle-timer/offer-lifecycle-timer.d.ts +2 -0
  54. package/dist/modules/instant-purchase/src/components/read-more-text-container/read-more-text-container.d.ts +1 -0
  55. package/dist/modules/instant-purchase/src/components/rich-text/factory.d.ts +2 -0
  56. package/dist/modules/instant-purchase/src/components/rich-text/rich-text.d.ts +64 -0
  57. package/dist/modules/instant-purchase/src/models/state/instant-purchase.d.ts +3 -2
  58. package/dist/modules/instant-purchase/src/reducers/index.d.ts +3 -1
  59. package/dist/modules/instant-purchase/src/reducers/instant-purchase/index.d.ts +1 -0
  60. package/dist/modules/instant-purchase/src/reducers/instant-purchase/offer-lifecycle-event/index.d.ts +1 -0
  61. package/dist/modules/instant-purchase/src/reducers/instant-purchase/offer-lifecycle-event/reducer.d.ts +4 -0
  62. package/dist/modules/instant-purchase/src/sagas/index.d.ts +2 -0
  63. package/dist/modules/instant-purchase/src/sagas/instant-purchase/sagas.d.ts +11 -2
  64. package/dist/modules/layouts-xp-sandbox/src/sagas/index.d.ts +2 -0
  65. package/dist/modules/standard-marketing/src/sagas/index.d.ts +2 -0
  66. package/dist/modules/standard-marketing/src/sagas/offer-engagement/channels.d.ts +4 -1
  67. package/package.json +1 -1
  68. package/dist/modules/instant-purchase/src/components/catalog-variation-selection-button/catalog-variation-selection-button.d.ts +0 -28
@@ -1,3 +1,4 @@
1
1
  export * from './cart';
2
2
  export * from './catalogItems';
3
3
  export * from './globalOfferDataState';
4
+ export * from './creative';
@@ -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 } from '../models';
3
+ import { FulfillmentDetailsState, OfferLifecycleEventState } from '../models';
4
4
  export type InitiateInstantPurchasePayload = {
5
5
  catalogItem: PluginCatalogItem;
6
6
  quantity: number;
@@ -57,4 +57,9 @@ export type SetFulfillmentDetails = {
57
57
  type: typeof SET_FULFILLMENT_DETAILS;
58
58
  payload: FulfillmentDetailsState;
59
59
  };
60
+ export declare const SET_OFFER_LIFECYCLE_EVENT = "INSTANT_PURCHASE/SET_OFFER_LIFECYCLE_EVENT";
61
+ export type SetOfferLifecycleEvent = {
62
+ type: typeof SET_OFFER_LIFECYCLE_EVENT;
63
+ payload: OfferLifecycleEventState;
64
+ };
60
65
  export type InstantPurchaseActions = InitiateInstantPurchase;
@@ -0,0 +1,90 @@
1
+ import { BackgroundStylingProperties, BasicStateStylingBlock, BorderStylingProperties, ConditionalStyleTransition, DimensionStylingProperties, ContainerStylingProperties, FlexChildStylingProperties, LayoutStyle, SpacingStylingProperties, WhenPredicate, TextStylingProperties, NonInteractableChildren } from '@rokt/dcui-layout-schema';
2
+ import { PluginCatalogItem } from '@rokt/domain/src/models';
3
+ export interface CatalogDiscountCalloutTagStyles {
4
+ container?: null | ContainerStylingProperties;
5
+ background?: null | BackgroundStylingProperties;
6
+ border?: null | BorderStylingProperties;
7
+ dimension?: null | DimensionStylingProperties;
8
+ flexChild?: null | FlexChildStylingProperties;
9
+ spacing?: null | SpacingStylingProperties;
10
+ /**
11
+ * TODO [utyp-857] - Remove once catalogItem model is updated and when Numeric
12
+ * predicates support dynamic predicate values for
13
+ */
14
+ text?: null | TextStylingProperties;
15
+ }
16
+ export interface CatalogDiscountCalloutTagTransitions {
17
+ own?: null | CatalogDiscountCalloutTagStyles;
18
+ }
19
+ export interface CatalogDiscountCalloutTagElements {
20
+ own: BasicStateStylingBlock<CatalogDiscountCalloutTagStyles>[];
21
+ /**
22
+ * TODO [utyp-857] - Remove once catalogItem model is updated and when Numeric
23
+ * predicates support dynamic predicate values for
24
+ */
25
+ originalPrice?: BasicStateStylingBlock<CatalogDiscountCalloutTagStyles>[];
26
+ }
27
+ export interface CatalogDiscountCalloutTagModel<Predicates> {
28
+ discountThreshold: number;
29
+ children: NonInteractableChildren[];
30
+ styles?: null | LayoutStyle<CatalogDiscountCalloutTagElements, ConditionalStyleTransition<CatalogDiscountCalloutTagTransitions, Predicates>>;
31
+ }
32
+ export interface CatalogDiscountCalloutTagProps {
33
+ /**
34
+ * - `children`: 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
+ * - `discountThreshold`:
47
+ * * `number`
48
+ * - `styles`:
49
+ * * `elements`:
50
+ * * `own`:
51
+ * - `container`
52
+ * - `background`
53
+ * - `border`
54
+ * - `dimension`
55
+ * - `flexChild`
56
+ * - `spacing`
57
+ * * `transitions`:
58
+ * - `type`: 'Conditional'
59
+ * - `transition`:
60
+ * * `predicates`: WhenPredicate[]
61
+ * * `duration`: number
62
+ * * `value`:
63
+ * * `own`:
64
+ * - `container`
65
+ * - `background`
66
+ * - `border`
67
+ * - `dimension`
68
+ * - `flexChild`
69
+ * - `spacing`
70
+ */
71
+ schema: CatalogDiscountCalloutTagModel<WhenPredicate>;
72
+ testId?: string;
73
+ }
74
+ /**
75
+ * TODO [utyp-857] - Remove once catalogItem model is updated and when Numeric
76
+ * predicates support dynamic predicate values for
77
+ */
78
+ export interface ExtendedCatalogItem extends PluginCatalogItem {
79
+ originalPrice: number;
80
+ originalPriceFormatted: string;
81
+ }
82
+ /**
83
+ * TODO [utyp-857] - Remove once catalogItem model is updated and when Numeric
84
+ * predicates support dynamic predicate values for
85
+ *
86
+ * Temporary implementation of a discount callout tag. see:
87
+ * https://chat.google.com/room/AAAAyw1UKdw/NO4XvPCB3Wg/NO4XvPCB3Wg?cls=10
88
+ */
89
+ export declare function TempCatalogDiscountCalloutTag(props: CatalogDiscountCalloutTagProps): import("react/jsx-runtime").JSX.Element;
90
+ export declare function CatalogDiscountCalloutTag(props: CatalogDiscountCalloutTagProps): import("react/jsx-runtime").JSX.Element;
@@ -27,6 +27,8 @@ interface CatalogDropDownModel<NonInteractableChildren, Predicates> {
27
27
  openTemplate: NonInteractableChildren;
28
28
  closedTemplate: NonInteractableChildren;
29
29
  closedDefaultTemplate: NonInteractableChildren;
30
+ openTemplateTitle?: string;
31
+ closedTemplateTitle?: string;
30
32
  requiredSelectionErrorTemplate?: NonInteractableChildren;
31
33
  validatorFieldConfig?: ValidatorFieldConfig<CatalogDropDownValidators>;
32
34
  disableProgrammaticFocus?: boolean;
@@ -9,11 +9,15 @@ interface CatalogImageGalleryStyles {
9
9
  }
10
10
  interface CatalogImageGalleryElements {
11
11
  own: BasicStateStylingBlock<CatalogImageGalleryStyles>[];
12
- mainImage: BasicStateStylingBlock<DataImageStyles>[];
13
- thumbnailImage: BasicStateStylingBlock<DataImageStyles>[];
14
- selectedThumbnailImage: BasicStateStylingBlock<DataImageStyles>[];
15
- thumbnailList: BasicStateStylingBlock<RowStyle>[];
12
+ mainImage?: BasicStateStylingBlock<DataImageStyles>[];
13
+ thumbnailImage?: BasicStateStylingBlock<DataImageStyles>[];
14
+ selectedThumbnailImage?: BasicStateStylingBlock<DataImageStyles>[];
15
+ thumbnailList?: BasicStateStylingBlock<RowStyle>[];
16
16
  scrollIconButton?: BasicStateStylingBlock<RowStyle>[];
17
+ paginationIndicator?: BasicStateStylingBlock<RowStyle>[];
18
+ paginationMinimizedIndicator?: BasicStateStylingBlock<RowStyle>[];
19
+ paginationActiveIndicator?: BasicStateStylingBlock<RowStyle>[];
20
+ paginationIndicatorContainer?: BasicStateStylingBlock<RowStyle>[];
17
21
  }
18
22
  interface CatalogImageGalleryTransitions {
19
23
  own?: null | CatalogImageGalleryStyles;
@@ -23,6 +27,7 @@ export interface CatalogImageGalleryModel<Predicates> {
23
27
  scrollGradientLength?: number;
24
28
  leftScrollIconTemplate?: StaticIconModel<WhenPredicate>;
25
29
  rightScrollIconTemplate?: StaticIconModel<WhenPredicate>;
30
+ navigationStrategy?: 'thumbnailList' | 'paginationIndicator';
26
31
  }
27
32
  export interface CatalogImageGalleryProps {
28
33
  schema: CatalogImageGalleryModel<WhenPredicate>;
@@ -0,0 +1,9 @@
1
+ import { CSSProperties } from 'react';
2
+ import { WhenPredicate, StaticIconModel } from '@rokt/dcui-layout-schema';
3
+ export declare const DEFAULT_LEFT_SCROLL_ICON_TEMPLATE: StaticIconModel<WhenPredicate>;
4
+ export declare const DEFAULT_RIGHT_SCROLL_ICON_TEMPLATE: StaticIconModel<WhenPredicate>;
5
+ export declare const MAX_PAGINATION_INDICATORS = 5;
6
+ export declare const DEFAULT_PAGINATION_INDICATOR_STYLES: CSSProperties;
7
+ export declare const DEFAULT_PAGINATION_MINIMIZED_INDICATOR_STYLES: CSSProperties;
8
+ export declare const DEFAULT_PAGINATION_ACTIVE_INDICATOR_STYLES: CSSProperties;
9
+ export declare const DEFAULT_PAGINATION_INDICATOR_CONTAINER_STYLES: CSSProperties;
@@ -24,6 +24,7 @@ export interface CheckboxElements {
24
24
  export interface CheckboxModel<Predicates> {
25
25
  styles?: null | LayoutStyle<CheckboxElements, ConditionalStyleTransition<CheckboxTransitions, Predicates>>;
26
26
  checkboxColor?: string;
27
+ checkboxScale?: number;
27
28
  value?: boolean;
28
29
  labelTemplate?: NonInteractableChildren[];
29
30
  errorContentTemplate?: NonInteractableChildren[];
@@ -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;
@@ -29,6 +29,7 @@ export interface ReadMoreTextContainerModel<Predicates> {
29
29
  export interface LinearGradientConfig {
30
30
  linearColorStart: string;
31
31
  linearColorStop?: string;
32
+ linearGradientHeight?: number;
32
33
  }
33
34
  export interface ReadMoreTextContainerProps {
34
35
  schema: ReadMoreTextContainerModel<WhenPredicate>;
@@ -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,64 @@
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
+ removePTagBaseStyles?: boolean;
11
+ }
12
+ export interface RichTextProps {
13
+ /**
14
+ * - `openLinks`: 'internally' | 'externally'
15
+ * - `value`: the textual content. It supports:
16
+ * * plain text;
17
+ * * html: `<em>`, `<strong>`, `<a>`, '<br>', '<u>';
18
+ * * data expansion placeholder: e.g `%^DATA.creativeCopy.creative.title|^%`,
19
+ * `%^DATA.creativeCopy.creative.copy|^%`,
20
+ * `%^DATA.creativeLink.termsAndConditions|^%`,
21
+ * `%^DATA.creativeLink.privacyPolicy|^%`.
22
+ * - `styles`:
23
+ * * `elements`:
24
+ * - `own`:
25
+ * * `dimension`
26
+ * * `flexChild`
27
+ * * `spacing`
28
+ * * `background`
29
+ * * `text`
30
+ * - `link`:
31
+ * * `text`
32
+ */
33
+ schema: RichTextModel<WhenPredicate>;
34
+ isInline?: boolean;
35
+ testId?: string;
36
+ }
37
+ export declare const sanitiseOptions: {
38
+ allowedTags: string[];
39
+ allowedAttributes: {
40
+ a: string[];
41
+ strong: never[];
42
+ em: never[];
43
+ br: never[];
44
+ u: never[];
45
+ p: never[];
46
+ ol: never[];
47
+ ul: never[];
48
+ li: never[];
49
+ span: never[];
50
+ h3: never[];
51
+ div: never[];
52
+ b: never[];
53
+ };
54
+ allowedSchemes: string[];
55
+ };
56
+ export declare const insaneExceptionCharacters: Map<string, string>;
57
+ export declare const breaklinePattern: RegExp;
58
+ /**The RichText override-Node is meant to be used for testing new element-styling only.<br>
59
+ * If no additional functionality is required for an instance of RichText, it is recommended to use the base node in plugin.<br>
60
+ * It also supports data expansion with namespace 'creativeCopy'.<br>
61
+ * *Where can we use this: __outer layout__, __layout variant__*
62
+ * */
63
+ export declare function RichText(props: RichTextProps): import("react/jsx-runtime").JSX.Element | null;
64
+ export {};
@@ -1,3 +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 OfferLifecycleEventState = OfferLifecycleDismissedPayload | OfferLifecycleCompletePayload | null;
@@ -1,12 +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 } 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
+ offerLifecycleEvent: OfferLifecycleEventState;
10
11
  };
11
12
  export type StateActions = GlobalActions | ChildLayoutActions;
12
13
  export declare const appReducers: {
@@ -15,5 +16,6 @@ export declare const appReducers: {
15
16
  dynamicData: typeof dynamicDataReducer;
16
17
  childLayouts: typeof childLayoutsReducer;
17
18
  fulfillmentDetails: (state: FulfillmentDetailsState | undefined, action: import("redux").AnyAction) => FulfillmentDetailsState;
19
+ offerLifecycleEvent: (state: OfferLifecycleEventState | undefined, action: import("redux").AnyAction) => OfferLifecycleEventState;
18
20
  };
19
21
  export declare function makeAppInitialState(data?: Partial<AppState>): AppState;
@@ -1,2 +1,3 @@
1
1
  export * from './fulfillment-details';
2
+ export * from './offer-lifecycle-event';
2
3
  export * from './utils';
@@ -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';
@@ -7,9 +7,12 @@ import { InitiateInstantPurchase, InstantPurchasePartnerResponse } from '../../a
7
7
  import { AppState } from '../../reducers';
8
8
  import { TriggerSelectItemAction, InstantPurchaseWsdkResponse } from '../../actions';
9
9
  export declare const INSTANT_PURCHASE_RESPONSE_TTL = 60000;
10
- export declare function processSelectOnlyCatalogItem(): Generator<SelectEffect | PutEffect, void, AppState | undefined>;
10
+ export declare function processSelectDefaultOrOnlyCatalogItem(): 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;
@@ -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.8",
3
+ "version": "0.2.1-rc.80",
4
4
  "description": "Rokt's DCUI rendering process",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.js",
@@ -1,28 +0,0 @@
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 CatalogVariationSelectionButtonStyles {
4
- container?: null | ContainerStylingProperties;
5
- border?: null | BorderStylingProperties;
6
- dimension?: null | DimensionStylingProperties;
7
- flexChild?: null | FlexChildStylingProperties;
8
- spacing?: null | SpacingStylingProperties;
9
- }
10
- export interface CatalogVariationSelectionButtonElements {
11
- own: BasicStateStylingBlock<CatalogVariationSelectionButtonStyles>[];
12
- }
13
- export interface CatalogVariationSelectionButtonTransitions {
14
- own?: null | CatalogVariationSelectionButtonStyles;
15
- }
16
- export interface CatalogVariationSelectionButtonModel<Children, Predicates> {
17
- styles?: null | LayoutStyle<CatalogVariationSelectionButtonElements, ConditionalStyleTransition<CatalogVariationSelectionButtonTransitions, Predicates>>;
18
- children: Children[];
19
- customStateKey: string;
20
- customStateValue: number;
21
- validatorTriggerConfig?: ValidatorTriggerConfig;
22
- a11yLabel?: null | string;
23
- }
24
- export interface CatalogVariationSelectionButtonProps {
25
- schema: CatalogVariationSelectionButtonModel<NonInteractableChildren, WhenPredicate>;
26
- testId?: string;
27
- }
28
- export declare function CatalogVariationSelectionButton(props: CatalogVariationSelectionButtonProps): import("react/jsx-runtime").JSX.Element;