@rokt/dcui-orchestrator 0.2.1-rc.2 → 0.2.1-rc.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +29 -29
- package/dist/index.js +25 -25
- package/dist/libraries/dcui-components/src/components/data-image-carousel/carousel-indicators.d.ts +20 -0
- package/dist/libraries/dcui-components/src/components/data-image-carousel/data-image-carousel.d.ts +100 -0
- package/dist/libraries/dcui-components/src/components/data-image-carousel/factory.d.ts +2 -0
- package/dist/libraries/dcui-components/src/components/data-image-carousel/index.d.ts +2 -0
- package/dist/libraries/domain/src/behaviors/offer-engagement.d.ts +7 -1
- package/dist/libraries/domain/src/models/plugin/plugin-catalog-item.d.ts +4 -0
- package/dist/libraries/domain/src/models/plugin/plugin-creative-response-option.d.ts +5 -1
- package/dist/libraries/domain/src/models/plugin/plugin-signal-type.d.ts +2 -1
- package/dist/libraries/domain/src/models/signals.d.ts +12 -2
- package/dist/libraries/orchestrator/src/sagas/offer-engagement/sagas.d.ts +1 -1
- package/dist/libraries/plugin-utils/src/translate-config.d.ts +2 -2
- package/dist/modules/add-to-cart/src/components/catalog-partner-event-button/catalog-partner-event-button.d.ts +8 -0
- package/dist/modules/add-to-cart/src/components/escape-hatch/factory.d.ts +1 -1
- package/dist/modules/add-to-cart/src/components/scroll-to-target/scroll-to-target.d.ts +56 -0
- package/dist/modules/add-to-cart/src/components/tooltip/tooltip.d.ts +42 -0
- package/dist/modules/add-to-cart/src/components/when-catalog-quantity/when-catalog-quantity.d.ts +22 -0
- package/dist/modules/instant-purchase/src/actions/instant-purchase.d.ts +1 -6
- package/dist/modules/instant-purchase/src/components/catalog-drop-down/catalog-drop-down.d.ts +6 -7
- package/dist/modules/instant-purchase/src/components/catalog-response-button/catalog-response-button.d.ts +5 -1
- package/dist/modules/instant-purchase/src/components/catalog-variation-selection-button/catalog-variation-selection-button.d.ts +2 -0
- package/dist/modules/instant-purchase/src/components/checkbox/checkbox.d.ts +78 -0
- package/dist/modules/instant-purchase/src/components/dismiss-instant-purchase-button/dismiss-instant-purchase-button.d.ts +64 -0
- package/dist/modules/instant-purchase/src/models/state/instant-purchase.d.ts +0 -3
- package/dist/modules/instant-purchase/src/reducers/index.d.ts +1 -3
- package/dist/modules/instant-purchase/src/reducers/instant-purchase/index.d.ts +0 -1
- package/dist/modules/instant-purchase/src/validators/index.d.ts +3 -0
- package/dist/modules/instant-purchase/src/validators/types.d.ts +8 -0
- package/dist/modules/instant-purchase/src/validators/utils.d.ts +3 -0
- package/dist/modules/instant-purchase/src/validators/validator-provider.d.ts +24 -0
- package/dist/modules/standard-marketing/src/components/catalog-response-button/catalog-response-button.d.ts +43 -0
- package/dist/modules/standard-marketing/src/components/catalog-response-button/factory.d.ts +2 -0
- package/package.json +1 -1
- package/dist/modules/instant-purchase/src/reducers/instant-purchase/variation-selection-required/index.d.ts +0 -1
- package/dist/modules/instant-purchase/src/reducers/instant-purchase/variation-selection-required/reducer.d.ts +0 -4
|
@@ -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
|
|
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;
|
|
@@ -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;
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './reducer';
|
|
@@ -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;
|