@rokt/dcui-orchestrator 0.2.1-rc.3 → 0.2.1-rc.31

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 (37) hide show
  1. package/dist/index.cjs +30 -30
  2. package/dist/index.js +25 -25
  3. package/dist/libraries/dcui-components/src/components/data-image-carousel/carousel-indicators.d.ts +20 -0
  4. package/dist/libraries/dcui-components/src/components/data-image-carousel/data-image-carousel.d.ts +100 -0
  5. package/dist/libraries/dcui-components/src/components/data-image-carousel/factory.d.ts +2 -0
  6. package/dist/libraries/dcui-components/src/components/data-image-carousel/index.d.ts +2 -0
  7. package/dist/modules/add-to-cart/src/components/catalog-partner-event-button/catalog-partner-event-button.d.ts +8 -0
  8. package/dist/modules/add-to-cart/src/components/escape-hatch/factory.d.ts +1 -1
  9. package/dist/modules/add-to-cart/src/components/scroll-to-target/scroll-to-target.d.ts +56 -0
  10. package/dist/modules/add-to-cart/src/components/tooltip/tooltip.d.ts +42 -0
  11. package/dist/modules/add-to-cart/src/components/when-catalog-quantity/when-catalog-quantity.d.ts +22 -0
  12. package/dist/modules/instant-purchase/src/actions/instant-purchase.d.ts +1 -6
  13. package/dist/modules/instant-purchase/src/components/catalog-drop-down/catalog-drop-down.d.ts +6 -7
  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/custom-state-validation-trigger-button/custom-state-validation-trigger-button.d.ts +28 -0
  18. package/dist/modules/instant-purchase/src/components/dismiss-instant-purchase-button/dismiss-instant-purchase-button.d.ts +64 -0
  19. package/dist/modules/instant-purchase/src/components/escape-hatch/factory.d.ts +1 -1
  20. package/dist/modules/instant-purchase/src/components/escape-hatch/index.d.ts +1 -0
  21. package/dist/modules/instant-purchase/src/components/inline-container/factory.d.ts +2 -0
  22. package/dist/modules/instant-purchase/src/components/inline-container/inline-container.d.ts +40 -0
  23. package/dist/modules/instant-purchase/src/components/loading-spinner/loading-spinner.d.ts +2 -1
  24. package/dist/modules/instant-purchase/src/components/offer-lifecycle-timer/offer-lifecycle-timer.d.ts +1 -0
  25. package/dist/modules/instant-purchase/src/components/rich-text/factory.d.ts +2 -0
  26. package/dist/modules/instant-purchase/src/components/rich-text/rich-text.d.ts +60 -0
  27. package/dist/modules/instant-purchase/src/models/state/instant-purchase.d.ts +0 -3
  28. package/dist/modules/instant-purchase/src/reducers/index.d.ts +1 -3
  29. package/dist/modules/instant-purchase/src/reducers/instant-purchase/index.d.ts +0 -1
  30. package/dist/modules/instant-purchase/src/validators/index.d.ts +3 -0
  31. package/dist/modules/instant-purchase/src/validators/types.d.ts +8 -0
  32. package/dist/modules/instant-purchase/src/validators/utils.d.ts +3 -0
  33. package/dist/modules/instant-purchase/src/validators/validator-provider.d.ts +24 -0
  34. package/dist/modules/standard-marketing/src/sagas/offer-engagement/channels.d.ts +4 -1
  35. package/package.json +1 -1
  36. package/dist/modules/instant-purchase/src/reducers/instant-purchase/variation-selection-required/index.d.ts +0 -1
  37. package/dist/modules/instant-purchase/src/reducers/instant-purchase/variation-selection-required/reducer.d.ts +0 -4
@@ -0,0 +1,60 @@
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
+ };
50
+ allowedSchemes: string[];
51
+ };
52
+ export declare const insaneExceptionCharacters: Map<string, string>;
53
+ export declare const breaklinePattern: RegExp;
54
+ /**The RichText override-Node is meant to be used for testing new element-styling only.<br>
55
+ * If no additional functionality is required for an instance of RichText, it is recommended to use the base node in plugin.<br>
56
+ * It also supports data expansion with namespace 'creativeCopy'.<br>
57
+ * *Where can we use this: __outer layout__, __layout variant__*
58
+ * */
59
+ export declare function RichText(props: RichTextProps): import("react/jsx-runtime").JSX.Element | null;
60
+ export {};
@@ -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;
@@ -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.3",
3
+ "version": "0.2.1-rc.31",
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;