@rokt/dcui-orchestrator 0.2.1-rc.4 → 0.2.1-rc.40
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 +30 -30
- package/dist/index.js +29 -29
- 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/cart-item-event.d.ts +49 -0
- package/dist/libraries/domain/src/behaviors/global-actions.d.ts +2 -0
- package/dist/libraries/domain/src/behaviors/index.d.ts +1 -0
- package/dist/libraries/domain/src/behaviors/send-partner.d.ts +7 -3
- package/dist/libraries/domain/src/models/index.d.ts +1 -0
- package/dist/libraries/domain/src/models/partner-event.d.ts +1 -1
- package/dist/libraries/domain/src/models/shipping.d.ts +25 -0
- package/dist/libraries/domain/src/models/signals.d.ts +2 -2
- package/dist/libraries/layout-renderer-utils/src/sagas/error/error-codes.d.ts +1 -0
- package/dist/libraries/orchestrator/src/sagas/cart-service/sagas.d.ts +15 -0
- 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/add-to-cart/src/sagas/index.d.ts +2 -0
- package/dist/modules/instant-purchase/src/actions/instant-purchase.d.ts +1 -6
- package/dist/modules/instant-purchase/src/components/catalog-discount-callout-tag/catalog-discount-callout-tag.d.ts +90 -0
- 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/custom-state-validation-trigger-button/custom-state-validation-trigger-button.d.ts +28 -0
- package/dist/modules/instant-purchase/src/components/escape-hatch/factory.d.ts +1 -1
- package/dist/modules/instant-purchase/src/components/escape-hatch/index.d.ts +1 -0
- package/dist/modules/instant-purchase/src/components/inline-container/factory.d.ts +2 -0
- package/dist/modules/instant-purchase/src/components/inline-container/inline-container.d.ts +55 -0
- package/dist/modules/instant-purchase/src/components/loading-spinner/loading-spinner.d.ts +2 -1
- package/dist/modules/instant-purchase/src/components/offer-lifecycle-timer/offer-lifecycle-timer.d.ts +2 -0
- package/dist/modules/instant-purchase/src/components/rich-text/factory.d.ts +2 -0
- package/dist/modules/instant-purchase/src/components/rich-text/rich-text.d.ts +63 -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/sagas/index.d.ts +2 -0
- 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/layouts-xp-sandbox/src/sagas/index.d.ts +2 -0
- package/dist/modules/standard-marketing/src/sagas/index.d.ts +2 -0
- package/dist/modules/standard-marketing/src/sagas/offer-engagement/channels.d.ts +4 -1
- 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
|
@@ -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,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;
|
|
@@ -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,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,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,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
|
|
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;
|
|
@@ -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>;
|
|
@@ -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:
|
|
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 +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;
|