@zealicsolutions/web-ui 0.3.2 → 0.3.3-2.2125
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cjs/index.js +26 -31
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/src/atoms/Buttons/Buttons.stories.d.ts +4 -4
- package/dist/cjs/src/atoms/Buttons/IconButton.d.ts +1 -1
- package/dist/cjs/src/atoms/Circle/Circle.d.ts +1 -0
- package/dist/cjs/src/atoms/GoogleMap/GoogleMap.d.ts +2 -13
- package/dist/cjs/src/atoms/Input/Input.d.ts +3 -1
- package/dist/cjs/src/atoms/Input/Input.stories.d.ts +1 -1
- package/dist/cjs/src/atoms/Input/helpers.d.ts +18 -0
- package/dist/cjs/src/atoms/RichTextViewer/types.d.ts +1 -0
- package/dist/cjs/src/atoms/Select/Select.d.ts +3 -1
- package/dist/cjs/src/containers/Container.d.ts +38 -2
- package/dist/cjs/src/containers/FormStepContainer.d.ts +6 -0
- package/dist/cjs/src/containers/MoleculeItem.d.ts +2 -1
- package/dist/cjs/src/containers/hooks/index.d.ts +1 -0
- package/dist/cjs/src/containers/hooks/useCheckCondition.d.ts +11 -0
- package/dist/cjs/src/containers/hooks/useCheckCondition.test.d.ts +1 -0
- package/dist/cjs/src/containers/mock-data.d.ts +2 -0
- package/dist/cjs/src/containers/styles.d.ts +2 -3
- package/dist/cjs/src/containers/types/moleculeTypes.d.ts +98 -39
- package/dist/cjs/src/containers/types/types.d.ts +34 -8
- package/dist/cjs/src/contexts/ButtonActionsContext/ButtonActionsContext.d.ts +11 -0
- package/dist/cjs/src/contexts/ButtonActionsContext/ButtonActionsContextProvider.d.ts +11 -0
- package/dist/cjs/src/contexts/FormStepContext/FormStepContext.d.ts +13 -0
- package/dist/cjs/src/contexts/FormStepContext/FormStepContextProvider.d.ts +5 -0
- package/dist/cjs/src/contexts/FormStepContext/utils.d.ts +2 -0
- package/dist/cjs/src/contexts/MlrRichTextViewerContext/types.d.ts +3 -0
- package/dist/cjs/src/contexts/OrganismContext/OrganismContext.d.ts +8 -0
- package/dist/cjs/src/contexts/OrganismContext/OrganismContextProvider.d.ts +6 -0
- package/dist/cjs/src/contexts/OrganismContext/utils.d.ts +5 -0
- package/dist/cjs/src/contexts/hooks/index.d.ts +4 -0
- package/dist/cjs/src/contexts/hooks/useButtonActionsContext.d.ts +1 -0
- package/dist/cjs/src/contexts/hooks/useFormStepContext.d.ts +1 -0
- package/dist/cjs/src/contexts/hooks/useOrganismContext.d.ts +1 -0
- package/dist/cjs/src/contexts/index.d.ts +5 -0
- package/dist/cjs/src/fieldsConfiguration/types.d.ts +1 -1
- package/dist/cjs/src/helpers/validations.d.ts +9 -0
- package/dist/cjs/src/molecules/Button/Button.d.ts +1 -2
- package/dist/cjs/src/molecules/Button/Button.stories.d.ts +2 -2
- package/dist/cjs/src/molecules/CheckboxField/CheckboxField.d.ts +5 -3
- package/dist/cjs/src/molecules/CheckboxField/CheckboxField.stories.d.ts +21 -3
- package/dist/cjs/src/molecules/Consent/Consent.d.ts +28 -0
- package/dist/cjs/src/molecules/Consent/Consent.stories.d.ts +9 -0
- package/dist/cjs/src/{organisms → molecules}/Consent/ConsentCapture.d.ts +2 -1
- package/dist/cjs/src/molecules/Consent/ConsentMolecule.d.ts +3 -0
- package/dist/cjs/src/{organisms → molecules}/Consent/consentMock.d.ts +2 -2
- package/dist/cjs/src/molecules/Drawer/Drawer.stories.d.ts +2 -2
- package/dist/cjs/src/molecules/Image/Image.d.ts +3 -2
- package/dist/cjs/src/molecules/Image/Image.stories.d.ts +1 -1
- package/dist/cjs/src/molecules/InputField/InputField.d.ts +3 -1
- package/dist/cjs/src/molecules/InputField/InputField.stories.d.ts +21 -3
- package/dist/cjs/src/molecules/PdfDocument/PdfDocument.d.ts +1 -2
- package/dist/cjs/src/molecules/RadioButtonField/RadioButtonField.d.ts +5 -2
- package/dist/cjs/src/molecules/RadioButtonField/RadioButtonField.stories.d.ts +21 -3
- package/dist/cjs/src/molecules/SelectField/SelectField.d.ts +3 -1
- package/dist/cjs/src/molecules/SelectField/SelectField.stories.d.ts +21 -3
- package/dist/cjs/src/molecules/TabGroup/TabGroup.d.ts +2 -4
- package/dist/cjs/src/molecules/TabGroup/styles.d.ts +3 -3
- package/dist/cjs/src/molecules/Video/Video.d.ts +3 -1
- package/dist/cjs/src/molecules/Video/Video.stories.d.ts +2 -2
- package/dist/cjs/src/molecules/ZealUIModal/ZealUIModal.d.ts +20 -0
- package/dist/cjs/src/molecules/ZealUIModal/ZealUIModal.stories.d.ts +9 -0
- package/dist/cjs/src/molecules/index.d.ts +2 -0
- package/dist/cjs/src/organisms/AcquisitionForm/AcquisitionForm.d.ts +1 -1
- package/dist/cjs/src/organisms/AcquisitionForm/AcquisitionForm.stories.d.ts +2 -2
- package/dist/cjs/src/organisms/FeedContent/styles.d.ts +1 -1
- package/dist/cjs/src/organisms/LoginForm/LoginForm.d.ts +1 -1
- package/dist/cjs/src/organisms/LoginForm/LoginForm.stories.d.ts +2 -2
- package/dist/cjs/src/organisms/index.d.ts +0 -1
- package/dist/cjs/src/typescript.d.ts +3 -0
- package/dist/esm/index.js +26 -31
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/src/atoms/Buttons/Buttons.stories.d.ts +4 -4
- package/dist/esm/src/atoms/Buttons/IconButton.d.ts +1 -1
- package/dist/esm/src/atoms/Circle/Circle.d.ts +1 -0
- package/dist/esm/src/atoms/GoogleMap/GoogleMap.d.ts +2 -13
- package/dist/esm/src/atoms/Input/Input.d.ts +3 -1
- package/dist/esm/src/atoms/Input/Input.stories.d.ts +1 -1
- package/dist/esm/src/atoms/Input/helpers.d.ts +18 -0
- package/dist/esm/src/atoms/RichTextViewer/types.d.ts +1 -0
- package/dist/esm/src/atoms/Select/Select.d.ts +3 -1
- package/dist/esm/src/containers/Container.d.ts +38 -2
- package/dist/esm/src/containers/FormStepContainer.d.ts +6 -0
- package/dist/esm/src/containers/MoleculeItem.d.ts +2 -1
- package/dist/esm/src/containers/hooks/index.d.ts +1 -0
- package/dist/esm/src/containers/hooks/useCheckCondition.d.ts +11 -0
- package/dist/esm/src/containers/hooks/useCheckCondition.test.d.ts +1 -0
- package/dist/esm/src/containers/mock-data.d.ts +2 -0
- package/dist/esm/src/containers/styles.d.ts +2 -3
- package/dist/esm/src/containers/types/moleculeTypes.d.ts +98 -39
- package/dist/esm/src/containers/types/types.d.ts +34 -8
- package/dist/esm/src/contexts/ButtonActionsContext/ButtonActionsContext.d.ts +11 -0
- package/dist/esm/src/contexts/ButtonActionsContext/ButtonActionsContextProvider.d.ts +11 -0
- package/dist/esm/src/contexts/FormStepContext/FormStepContext.d.ts +13 -0
- package/dist/esm/src/contexts/FormStepContext/FormStepContextProvider.d.ts +5 -0
- package/dist/esm/src/contexts/FormStepContext/utils.d.ts +2 -0
- package/dist/esm/src/contexts/MlrRichTextViewerContext/types.d.ts +3 -0
- package/dist/esm/src/contexts/OrganismContext/OrganismContext.d.ts +8 -0
- package/dist/esm/src/contexts/OrganismContext/OrganismContextProvider.d.ts +6 -0
- package/dist/esm/src/contexts/OrganismContext/utils.d.ts +5 -0
- package/dist/esm/src/contexts/hooks/index.d.ts +4 -0
- package/dist/esm/src/contexts/hooks/useButtonActionsContext.d.ts +1 -0
- package/dist/esm/src/contexts/hooks/useFormStepContext.d.ts +1 -0
- package/dist/esm/src/contexts/hooks/useOrganismContext.d.ts +1 -0
- package/dist/esm/src/contexts/index.d.ts +5 -0
- package/dist/esm/src/fieldsConfiguration/types.d.ts +1 -1
- package/dist/esm/src/helpers/validations.d.ts +9 -0
- package/dist/esm/src/molecules/Button/Button.d.ts +1 -2
- package/dist/esm/src/molecules/Button/Button.stories.d.ts +2 -2
- package/dist/esm/src/molecules/CheckboxField/CheckboxField.d.ts +5 -3
- package/dist/esm/src/molecules/CheckboxField/CheckboxField.stories.d.ts +21 -3
- package/dist/esm/src/molecules/Consent/Consent.d.ts +28 -0
- package/dist/esm/src/molecules/Consent/Consent.stories.d.ts +9 -0
- package/dist/esm/src/{organisms → molecules}/Consent/ConsentCapture.d.ts +2 -1
- package/dist/esm/src/molecules/Consent/ConsentMolecule.d.ts +3 -0
- package/dist/esm/src/{organisms → molecules}/Consent/consentMock.d.ts +2 -2
- package/dist/esm/src/molecules/Drawer/Drawer.stories.d.ts +2 -2
- package/dist/esm/src/molecules/Image/Image.d.ts +3 -2
- package/dist/esm/src/molecules/Image/Image.stories.d.ts +1 -1
- package/dist/esm/src/molecules/InputField/InputField.d.ts +3 -1
- package/dist/esm/src/molecules/InputField/InputField.stories.d.ts +21 -3
- package/dist/esm/src/molecules/PdfDocument/PdfDocument.d.ts +1 -2
- package/dist/esm/src/molecules/RadioButtonField/RadioButtonField.d.ts +5 -2
- package/dist/esm/src/molecules/RadioButtonField/RadioButtonField.stories.d.ts +21 -3
- package/dist/esm/src/molecules/SelectField/SelectField.d.ts +3 -1
- package/dist/esm/src/molecules/SelectField/SelectField.stories.d.ts +21 -3
- package/dist/esm/src/molecules/TabGroup/TabGroup.d.ts +2 -4
- package/dist/esm/src/molecules/TabGroup/styles.d.ts +3 -3
- package/dist/esm/src/molecules/Video/Video.d.ts +3 -1
- package/dist/esm/src/molecules/Video/Video.stories.d.ts +2 -2
- package/dist/esm/src/molecules/ZealUIModal/ZealUIModal.d.ts +20 -0
- package/dist/esm/src/molecules/ZealUIModal/ZealUIModal.stories.d.ts +9 -0
- package/dist/esm/src/molecules/index.d.ts +2 -0
- package/dist/esm/src/organisms/AcquisitionForm/AcquisitionForm.d.ts +1 -1
- package/dist/esm/src/organisms/AcquisitionForm/AcquisitionForm.stories.d.ts +2 -2
- package/dist/esm/src/organisms/FeedContent/styles.d.ts +1 -1
- package/dist/esm/src/organisms/LoginForm/LoginForm.d.ts +1 -1
- package/dist/esm/src/organisms/LoginForm/LoginForm.stories.d.ts +2 -2
- package/dist/esm/src/organisms/index.d.ts +0 -1
- package/dist/esm/src/typescript.d.ts +3 -0
- package/dist/index.d.ts +347 -163
- package/package.json +10 -5
- package/dist/cjs/src/atoms/GoogleMap/GoogleMap.stories.d.ts +0 -12
- package/dist/cjs/src/molecules/PdfDocument/PdfDocument.stories.d.ts +0 -9
- package/dist/cjs/src/organisms/Consent/Consent.d.ts +0 -11
- package/dist/cjs/src/organisms/Consent/Consent.stories.d.ts +0 -9
- package/dist/esm/src/atoms/GoogleMap/GoogleMap.stories.d.ts +0 -12
- package/dist/esm/src/molecules/PdfDocument/PdfDocument.stories.d.ts +0 -9
- package/dist/esm/src/organisms/Consent/Consent.d.ts +0 -11
- package/dist/esm/src/organisms/Consent/Consent.stories.d.ts +0 -9
@@ -1,4 +1,4 @@
|
|
1
|
-
import type {
|
1
|
+
import type { StoryFn } from '@storybook/react';
|
2
2
|
import { TextButtonProps } from 'atoms/Buttons/TextButton';
|
3
3
|
import { FC } from 'react';
|
4
4
|
import { IconButton as IconButtonComponent } from './IconButton';
|
@@ -11,6 +11,6 @@ declare const _default: {
|
|
11
11
|
}, never>;
|
12
12
|
};
|
13
13
|
export default _default;
|
14
|
-
export declare const TouchableOpacity:
|
15
|
-
export declare const TextButton:
|
16
|
-
export declare const IconButton:
|
14
|
+
export declare const TouchableOpacity: StoryFn<FC<TouchableOpacityProps>>;
|
15
|
+
export declare const TextButton: StoryFn<FC<TextButtonProps>>;
|
16
|
+
export declare const IconButton: StoryFn<typeof IconButtonComponent>;
|
@@ -1,7 +1,7 @@
|
|
1
1
|
/// <reference types="react" />
|
2
2
|
import { ThemeColors } from 'theme';
|
3
3
|
import { IconNames, TouchableOpacityProps } from 'atoms';
|
4
|
-
import { Callback } from 'typescript';
|
4
|
+
import type { Callback } from 'typescript';
|
5
5
|
export declare type IconButtonProps = {
|
6
6
|
name: IconNames;
|
7
7
|
size?: number;
|
@@ -5,4 +5,5 @@ export declare type CircleBoxProps = {
|
|
5
5
|
type: CircleType;
|
6
6
|
};
|
7
7
|
export declare const Circle: ({ index, type }: CircleBoxProps) => JSX.Element;
|
8
|
+
export declare const CirclesWrapper: import("styled-components").StyledComponent<"span", import("styled-components").DefaultTheme, {}, never>;
|
8
9
|
export {};
|
@@ -1,13 +1,2 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
import { WithScriptjsProps } from 'react-google-maps/lib/withScriptjs';
|
4
|
-
export declare type MapPosition = {
|
5
|
-
lat: number;
|
6
|
-
lng: number;
|
7
|
-
};
|
8
|
-
export declare type GoogleMapProps = {
|
9
|
-
position: MapPosition;
|
10
|
-
} & WithScriptjsProps & WithGoogleMapProps;
|
11
|
-
export declare const GoogleMap: React.ComponentClass<{
|
12
|
-
position: MapPosition;
|
13
|
-
} & WithScriptjsProps & WithGoogleMapProps, any>;
|
1
|
+
/// <reference types="react" />
|
2
|
+
export declare const GoogleMap: () => JSX.Element;
|
@@ -3,6 +3,7 @@ import { InputFieldTypes } from 'fieldsConfiguration/types';
|
|
3
3
|
import React from 'react';
|
4
4
|
import { ThemeColors } from 'theme/types';
|
5
5
|
import type { Callback, StylesType } from 'typescript';
|
6
|
+
import { MaskConfig } from './helpers';
|
6
7
|
export declare type InputFieldInternalConfigProps = Partial<{
|
7
8
|
textColor: ThemeColors | string;
|
8
9
|
textFontSize: number;
|
@@ -31,5 +32,6 @@ export declare type InputProps = {
|
|
31
32
|
onChange?: (value: string) => void;
|
32
33
|
onKeyDown?: (event: React.KeyboardEvent<HTMLInputElement>) => void;
|
33
34
|
internalConfig?: InputFieldInternalConfigProps;
|
35
|
+
config?: MaskConfig;
|
34
36
|
};
|
35
|
-
export declare const Input: ({ value, leftIcon, rightIcon, onChange, onBlur, disabled, isError, placeholder, isEditMode, type, internalConfig, ...rest }: InputProps) => JSX.Element;
|
37
|
+
export declare const Input: ({ value, leftIcon, rightIcon, onChange, onBlur, disabled, isError, placeholder, isEditMode, type, internalConfig, config, ...rest }: InputProps) => JSX.Element;
|
@@ -3,7 +3,7 @@ import type { StoryFn } from '@storybook/react';
|
|
3
3
|
import { InputProps } from './Input';
|
4
4
|
declare const _default: {
|
5
5
|
title: string;
|
6
|
-
component: ({ value, leftIcon, rightIcon, onChange, onBlur, disabled, isError, placeholder, isEditMode, type, internalConfig, ...rest }: InputProps) => JSX.Element;
|
6
|
+
component: ({ value, leftIcon, rightIcon, onChange, onBlur, disabled, isError, placeholder, isEditMode, type, internalConfig, config, ...rest }: InputProps) => JSX.Element;
|
7
7
|
};
|
8
8
|
export default _default;
|
9
9
|
export declare const Input: StoryFn<InputProps>;
|
@@ -0,0 +1,18 @@
|
|
1
|
+
import { MaskedInputProps } from 'react-text-mask';
|
2
|
+
import { HTMLInputTypeAttribute } from 'react';
|
3
|
+
import { ThemeColors } from 'theme';
|
4
|
+
import { InputProps } from 'atoms';
|
5
|
+
import { InputFieldTypes } from '../../fieldsConfiguration';
|
6
|
+
export declare type MaskConfig = Partial<{
|
7
|
+
maskPlaceholder: string;
|
8
|
+
dataModelFieldType: InputFieldTypes;
|
9
|
+
maskPattern: Array<string | RegExp>;
|
10
|
+
}>;
|
11
|
+
export declare const getSpecificInputProps: (type: InputFieldTypes) => {
|
12
|
+
type?: HTMLInputTypeAttribute | undefined;
|
13
|
+
inputMode?: "text" | "none" | "search" | "tel" | "url" | "email" | "numeric" | "decimal" | undefined;
|
14
|
+
};
|
15
|
+
export declare const getMaskInputProps: (type?: InputFieldTypes, config?: MaskConfig) => Pick<MaskedInputProps, 'pipe' | 'mask' | 'placeholder' | 'keepCharPositions'>;
|
16
|
+
export declare const getInputIconColor: ({ isEditMode, isFocused, isError, disabled, }: Pick<InputProps, "disabled" | "isError" | "isEditMode"> & {
|
17
|
+
isFocused: boolean;
|
18
|
+
}) => ThemeColors;
|
@@ -1,10 +1,12 @@
|
|
1
1
|
/// <reference types="react" />
|
2
2
|
import { ThemeColors } from 'theme';
|
3
|
-
import type { Callback, StylesType } from 'typescript';
|
3
|
+
import type { AnyObject, Callback, StylesType } from 'typescript';
|
4
4
|
import { RefCallBack } from 'react-hook-form/dist/types';
|
5
5
|
export declare type SelectOption = {
|
6
6
|
id: string;
|
7
7
|
label: string;
|
8
|
+
value?: string;
|
9
|
+
config?: AnyObject;
|
8
10
|
};
|
9
11
|
export declare type SelectInternalConfigurationOptions = {
|
10
12
|
placeholderTextColor: ThemeColors | string;
|
@@ -1,4 +1,40 @@
|
|
1
1
|
/// <reference types="react" />
|
2
2
|
import { ContainerComponentProps, ContainerProps } from 'containers';
|
3
|
-
export declare const Container: ({ children, wide, compact, type, props }:
|
4
|
-
|
3
|
+
export declare const Container: ({ children, wide, compact, type, props, id, }: Partial<{
|
4
|
+
type: import("containers").ContainerType;
|
5
|
+
wide: Partial<{
|
6
|
+
containerStyle: import("styled-components").CSSProperties;
|
7
|
+
containerProps: Partial<{
|
8
|
+
position: import("containers").ContainerPositionType;
|
9
|
+
scrollBehaviour: import("containers").ContainerScrollBehaviourType;
|
10
|
+
cornerRadius: number;
|
11
|
+
styles: import("styled-components").FlattenInterpolation<import("styled-components").ThemedStyledProps<object, import("styled-components").DefaultTheme>>;
|
12
|
+
formProps: import("containers").FormContainerProps;
|
13
|
+
formStepProps: import("containers").FormStepContainerProps;
|
14
|
+
}>;
|
15
|
+
}>;
|
16
|
+
compact: Partial<{
|
17
|
+
containerStyle: import("styled-components").CSSProperties;
|
18
|
+
containerProps: Partial<{
|
19
|
+
position: import("containers").ContainerPositionType;
|
20
|
+
scrollBehaviour: import("containers").ContainerScrollBehaviourType;
|
21
|
+
cornerRadius: number;
|
22
|
+
styles: import("styled-components").FlattenInterpolation<import("styled-components").ThemedStyledProps<object, import("styled-components").DefaultTheme>>;
|
23
|
+
formProps: import("containers").FormContainerProps;
|
24
|
+
formStepProps: import("containers").FormStepContainerProps;
|
25
|
+
}>;
|
26
|
+
}>;
|
27
|
+
props: Partial<{
|
28
|
+
position: import("containers").ContainerPositionType;
|
29
|
+
scrollBehaviour: import("containers").ContainerScrollBehaviourType;
|
30
|
+
cornerRadius: number;
|
31
|
+
styles: import("styled-components").FlattenInterpolation<import("styled-components").ThemedStyledProps<object, import("styled-components").DefaultTheme>>;
|
32
|
+
formProps: import("containers").FormContainerProps;
|
33
|
+
formStepProps: import("containers").FormStepContainerProps;
|
34
|
+
}>;
|
35
|
+
}> & {
|
36
|
+
children?: import("react").ReactNode;
|
37
|
+
} & {
|
38
|
+
id: string;
|
39
|
+
}) => JSX.Element;
|
40
|
+
export declare const ContainerComponent: ({ type, items, config, tabsProps, id, }: ContainerComponentProps) => JSX.Element | null;
|
@@ -0,0 +1,6 @@
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
2
|
+
import { FormStepContainerProps } from 'containers';
|
3
|
+
export declare type StepContainerProps = PropsWithChildren<Partial<FormStepContainerProps>> & {
|
4
|
+
id: string;
|
5
|
+
};
|
6
|
+
export declare const FormStepContainer: ({ order, id }: StepContainerProps) => JSX.Element | null;
|
@@ -3,6 +3,7 @@ import { Molecule } from 'containers';
|
|
3
3
|
import { TabGroupProps } from 'molecules';
|
4
4
|
export declare const getFullLink: (url: string) => string;
|
5
5
|
export declare const navigateToPage: (url: string) => void;
|
6
|
+
export declare const downloadFile: (url?: string, name?: string) => Promise<void>;
|
6
7
|
export declare const MoleculeItem: ({ type, config, attributes, tabsProps, form, id: moleculeId, }: Molecule & {
|
7
8
|
tabsProps?: Pick<TabGroupProps<string, string>, "tabs" | "activeTabKey" | "onTabChange"> | undefined;
|
8
|
-
}) => JSX.Element;
|
9
|
+
}) => JSX.Element | null;
|
@@ -0,0 +1 @@
|
|
1
|
+
export { useCheckCondition } from './useCheckCondition';
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import { ConditionConfig, ConditionCriteria } from 'containers/types/types';
|
2
|
+
import { AnyObject } from 'typescript';
|
3
|
+
/**
|
4
|
+
* @attention This hook needs to be used inside of the form container for the form fields
|
5
|
+
*/
|
6
|
+
export declare const useCheckCondition: (config?: ConditionConfig, formData?: AnyObject) => boolean;
|
7
|
+
export declare type GetEvaluateCriteriaFunctionParams = {
|
8
|
+
criteriaList?: ConditionCriteria[];
|
9
|
+
data?: AnyObject;
|
10
|
+
};
|
11
|
+
export declare const getEvaluateCriteriaFunction: ({ criteriaList, data, }: GetEvaluateCriteriaFunctionParams) => (criteria?: ConditionCriteria) => boolean;
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -1,3 +1,5 @@
|
|
1
1
|
import { ContainerComponentProps } from 'containers';
|
2
|
+
export declare const sliderContainerProps: ContainerComponentProps;
|
2
3
|
export declare const formContainerProps: ContainerComponentProps;
|
3
4
|
export declare const columnContainerProps: ContainerComponentProps;
|
5
|
+
export declare const formBuilderData: ContainerComponentProps;
|
@@ -5,8 +5,7 @@ export declare const ContainerWrapper: import("styled-components").StyledCompone
|
|
5
5
|
scrollBehaviour: import("containers/types/types").ContainerScrollBehaviourType;
|
6
6
|
cornerRadius: number;
|
7
7
|
styles: import("styled-components").FlattenInterpolation<import("styled-components").ThemedStyledProps<object, import("styled-components").DefaultTheme>>;
|
8
|
-
formProps:
|
9
|
-
|
10
|
-
};
|
8
|
+
formProps: import("containers/types/types").FormContainerProps;
|
9
|
+
formStepProps: import("containers/types/types").FormStepContainerProps;
|
11
10
|
}> | undefined;
|
12
11
|
}, never>;
|
@@ -1,21 +1,50 @@
|
|
1
1
|
import { SelectOption } from 'atoms';
|
2
|
-
import { ButtonProps, CheckboxFieldProps, ImageProps, InputFieldProps, RadioButtonFieldProps, SelectFieldProps, TabGroupProps, TextMoleculeProps } from 'molecules';
|
2
|
+
import { AdditionalTabContainerProps, ButtonProps, CheckboxFieldProps, Consent, ImageProps, InputFieldProps, RadioButtonFieldProps, SelectFieldProps, TabGroupProps, TextMoleculeProps } from 'molecules';
|
3
3
|
import { UseFormReturn } from 'react-hook-form';
|
4
|
-
import {
|
5
|
-
import
|
4
|
+
import type { AnyObject, Nullable, StrictUnion, StylesType } from 'typescript';
|
5
|
+
import { ConditionConfig, ContainerComponentProps } from './types';
|
6
|
+
export declare type ActionTypes = 'link' | 'popup' | 'drawer' | 'download' | 'submit' | 'reset' | 'destroy';
|
7
|
+
export declare type DownloadFile = {
|
8
|
+
url: string;
|
9
|
+
name: string;
|
10
|
+
};
|
11
|
+
declare type LinkAction = LinkAttributes;
|
12
|
+
declare type PopupDrawerAction = ContainerComponentProps;
|
13
|
+
declare type DownloadAction = DownloadFile;
|
14
|
+
declare type SubmitAction = AnyObject;
|
15
|
+
declare type CancelAction = AnyObject;
|
16
|
+
declare type ResetAction = AnyObject;
|
17
|
+
declare type DestroyAction = AnyObject;
|
18
|
+
declare type Action = {
|
19
|
+
type: ActionTypes;
|
20
|
+
} & Partial<{
|
21
|
+
link: LinkAction;
|
22
|
+
popup: PopupDrawerAction;
|
23
|
+
drawer: PopupDrawerAction;
|
24
|
+
download: DownloadAction;
|
25
|
+
submit: SubmitAction;
|
26
|
+
cancel: CancelAction;
|
27
|
+
reset: ResetAction;
|
28
|
+
destroy: DestroyAction;
|
29
|
+
}>;
|
6
30
|
export declare type ImageAttributes = {
|
7
31
|
attributeType: 'image';
|
8
32
|
imageSource: string;
|
9
33
|
};
|
10
34
|
export interface TextAttributes {
|
35
|
+
id?: string;
|
11
36
|
attributeType: 'text';
|
12
|
-
isRichText
|
37
|
+
isRichText?: boolean;
|
13
38
|
text: string;
|
14
39
|
}
|
15
40
|
export interface VideoAttributes {
|
16
41
|
attributeType: 'video';
|
17
42
|
videoSource: string;
|
18
43
|
}
|
44
|
+
export interface ActionAttributes {
|
45
|
+
attributeType: 'action';
|
46
|
+
action: Action;
|
47
|
+
}
|
19
48
|
export interface LinkAttributes {
|
20
49
|
id: string;
|
21
50
|
attributeType: 'link';
|
@@ -25,6 +54,7 @@ export interface LinkAttributes {
|
|
25
54
|
name: string;
|
26
55
|
}
|
27
56
|
export interface SelectAttributes {
|
57
|
+
id?: string;
|
28
58
|
attributeType: 'select';
|
29
59
|
value: string;
|
30
60
|
options: SelectOption[];
|
@@ -37,56 +67,72 @@ export interface IterableAttributes {
|
|
37
67
|
attributeType: 'iterable';
|
38
68
|
options: SelectOption[];
|
39
69
|
}
|
40
|
-
export
|
70
|
+
export interface DataConnectionAttributes {
|
71
|
+
id: string;
|
72
|
+
attributeType: 'data_model_field';
|
73
|
+
dataModelField: {
|
74
|
+
id: string;
|
75
|
+
fieldName: string;
|
76
|
+
code: string;
|
77
|
+
};
|
78
|
+
}
|
79
|
+
export interface ConditionConfigAttributes {
|
80
|
+
id: string;
|
81
|
+
attributeType: 'condition_config';
|
82
|
+
conditionConfig: ConditionConfig;
|
83
|
+
}
|
84
|
+
export declare type MoleculeTypes = 'image' | 'text' | 'button' | 'video' | 'header_tab_group' | 'input_field' | 'select_field' | 'radio_button_field' | 'checkbox_field' | 'consent';
|
41
85
|
export interface BaseMolecule {
|
42
86
|
id: string;
|
43
87
|
instance: 'molecule';
|
44
88
|
type: MoleculeTypes;
|
89
|
+
metadata?: AnyObject;
|
45
90
|
}
|
46
91
|
export interface ImageMolecule extends BaseMolecule {
|
47
92
|
type: 'image';
|
48
|
-
attributes: {
|
93
|
+
attributes: Partial<{
|
49
94
|
image: ImageAttributes;
|
50
95
|
altText: Omit<TextAttributes, 'isRichText'>;
|
51
96
|
link: LinkAttributes;
|
52
|
-
}
|
97
|
+
}>;
|
53
98
|
config: {
|
54
|
-
props
|
99
|
+
props?: Omit<ImageProps, 'src' | 'link' | 'altText'>;
|
55
100
|
};
|
56
101
|
}
|
57
102
|
export interface TextMoleculeType extends BaseMolecule {
|
58
103
|
type: 'text';
|
59
|
-
attributes: {
|
104
|
+
attributes: Partial<{
|
60
105
|
text: TextAttributes;
|
61
106
|
seoStyle: SelectAttributes;
|
62
|
-
|
107
|
+
fontVariant: SelectAttributes;
|
108
|
+
}>;
|
63
109
|
config: {
|
64
|
-
props
|
110
|
+
props?: TextMoleculeProps;
|
65
111
|
};
|
66
112
|
}
|
67
113
|
export interface ButtonMolecule extends BaseMolecule {
|
68
114
|
type: 'button';
|
69
|
-
attributes: {
|
115
|
+
attributes: Partial<{
|
70
116
|
title: TextAttributes;
|
71
|
-
|
72
|
-
}
|
117
|
+
action: ActionAttributes;
|
118
|
+
}>;
|
73
119
|
config: {
|
74
|
-
props
|
120
|
+
props?: Partial<Omit<ButtonProps, 'disabled' | 'children' | 'link' | 'text' | 'onClick' | 'elementId'>>;
|
75
121
|
};
|
76
122
|
}
|
77
123
|
export interface VideoMolecule extends BaseMolecule {
|
78
124
|
type: 'video';
|
79
|
-
attributes: {
|
125
|
+
attributes: Partial<{
|
80
126
|
video: VideoAttributes;
|
81
127
|
altText: Omit<TextAttributes, 'isRichText'>;
|
82
128
|
autoPlayVideo: BooleanAttributes;
|
83
129
|
enableCoverImage: BooleanAttributes;
|
84
130
|
coverImage: ImageAttributes;
|
85
|
-
}
|
131
|
+
}>;
|
86
132
|
config: {
|
87
133
|
props: Partial<{
|
88
134
|
width: number;
|
89
|
-
styles:
|
135
|
+
styles: StylesType;
|
90
136
|
}>;
|
91
137
|
};
|
92
138
|
}
|
@@ -94,68 +140,81 @@ export interface TabGroupMolecule extends BaseMolecule {
|
|
94
140
|
type: 'header_tab_group';
|
95
141
|
config: {
|
96
142
|
props: TabGroupProps;
|
97
|
-
wide:
|
98
|
-
|
99
|
-
containerProps?: Record<string, unknown>;
|
100
|
-
};
|
101
|
-
compact: {
|
102
|
-
containerStyle?: CSSProperties;
|
103
|
-
containerProps?: Record<string, unknown>;
|
104
|
-
};
|
143
|
+
wide: AdditionalTabContainerProps;
|
144
|
+
compact: AdditionalTabContainerProps;
|
105
145
|
};
|
106
146
|
}
|
107
147
|
export interface TextInputMolecule extends BaseMolecule {
|
108
148
|
type: 'input_field';
|
109
|
-
attributes: {
|
149
|
+
attributes: Partial<{
|
110
150
|
label: TextAttributes;
|
111
151
|
required: BooleanAttributes;
|
112
152
|
inputType: SelectAttributes;
|
113
|
-
|
153
|
+
dataModelField: DataConnectionAttributes;
|
154
|
+
conditionConfig: ConditionConfigAttributes;
|
155
|
+
}>;
|
114
156
|
config: {
|
115
|
-
props
|
157
|
+
props?: Partial<{
|
116
158
|
state: 'default' | 'error';
|
117
159
|
} & InputFieldProps>;
|
118
160
|
};
|
119
161
|
}
|
120
162
|
export interface SelectFieldMolecule extends BaseMolecule {
|
121
163
|
type: 'select_field';
|
122
|
-
attributes: {
|
164
|
+
attributes: Partial<{
|
123
165
|
label: TextAttributes;
|
124
166
|
required: BooleanAttributes;
|
125
167
|
options: IterableAttributes;
|
126
|
-
|
168
|
+
dataModelField: DataConnectionAttributes;
|
169
|
+
conditionConfig: ConditionConfigAttributes;
|
170
|
+
}>;
|
127
171
|
config: {
|
128
|
-
props
|
172
|
+
props?: Partial<{
|
129
173
|
state: 'default' | 'error';
|
130
174
|
} & SelectFieldProps>;
|
131
175
|
};
|
132
176
|
}
|
133
177
|
export interface RadioButtonFieldMolecule extends BaseMolecule {
|
134
178
|
type: 'radio_button_field';
|
135
|
-
attributes: {
|
179
|
+
attributes: Partial<{
|
136
180
|
label: TextAttributes;
|
137
181
|
required: BooleanAttributes;
|
138
182
|
options: IterableAttributes;
|
139
|
-
|
183
|
+
dataModelField: DataConnectionAttributes;
|
184
|
+
conditionConfig: ConditionConfigAttributes;
|
185
|
+
}>;
|
140
186
|
config: {
|
141
|
-
props
|
187
|
+
props?: Partial<{
|
142
188
|
state: 'default' | 'error';
|
143
189
|
} & RadioButtonFieldProps<string>>;
|
144
190
|
};
|
145
191
|
}
|
146
192
|
export interface CheckboxFieldMolecule extends BaseMolecule {
|
147
193
|
type: 'checkbox_field';
|
148
|
-
attributes: {
|
194
|
+
attributes: Partial<{
|
149
195
|
label: TextAttributes;
|
150
196
|
required: BooleanAttributes;
|
151
197
|
options: IterableAttributes;
|
152
|
-
|
198
|
+
dataModelField: DataConnectionAttributes;
|
199
|
+
conditionConfig: ConditionConfigAttributes;
|
200
|
+
}>;
|
153
201
|
config: {
|
154
|
-
props
|
202
|
+
props?: Partial<{
|
155
203
|
state: 'default' | 'error';
|
156
204
|
} & CheckboxFieldProps>;
|
157
205
|
};
|
158
206
|
}
|
159
|
-
export
|
207
|
+
export interface ConsentFieldMolecule extends BaseMolecule {
|
208
|
+
type: 'consent';
|
209
|
+
attributes: Partial<{
|
210
|
+
consent: Partial<{
|
211
|
+
attributeType: 'consent';
|
212
|
+
consent: Consent;
|
213
|
+
required: BooleanAttributes;
|
214
|
+
}>;
|
215
|
+
}>;
|
216
|
+
}
|
217
|
+
export declare type Molecule = StrictUnion<ImageMolecule | TextMoleculeType | ButtonMolecule | VideoMolecule | TabGroupMolecule | TextInputMolecule | SelectFieldMolecule | RadioButtonFieldMolecule | CheckboxFieldMolecule | ConsentFieldMolecule> & {
|
160
218
|
form?: UseFormReturn<any>;
|
161
219
|
};
|
220
|
+
export {};
|
@@ -1,20 +1,27 @@
|
|
1
1
|
import { TabGroupProps } from 'molecules';
|
2
2
|
import { PropsWithChildren } from 'react';
|
3
3
|
import { CSSProperties } from 'styled-components';
|
4
|
-
import { Molecule } from './moleculeTypes';
|
5
4
|
import { ValidationMode } from 'react-hook-form';
|
6
|
-
import { StylesType } from 'typescript';
|
7
|
-
|
8
|
-
export declare type
|
5
|
+
import type { AnyObject, Nullable, StylesType } from 'typescript';
|
6
|
+
import { Molecule } from './moleculeTypes';
|
7
|
+
export declare type ContainerType = 'row' | 'column' | 'slider' | 'form' | 'form_step';
|
8
|
+
export declare type ContainerPositionType = 'fixed' | 'sticky' | 'static' | 'relative';
|
9
9
|
export declare type ContainerScrollBehaviourType = 'vertical' | 'horizontal' | 'auto' | 'none';
|
10
|
+
export declare type FormStepContainerProps = {
|
11
|
+
formStepName: string;
|
12
|
+
order: number;
|
13
|
+
conditionConfig: ConditionConfig;
|
14
|
+
};
|
15
|
+
export declare type FormContainerProps = {
|
16
|
+
mode: keyof ValidationMode;
|
17
|
+
};
|
10
18
|
export declare type ContainerPropsType = Partial<{
|
11
19
|
position: ContainerPositionType;
|
12
20
|
scrollBehaviour: ContainerScrollBehaviourType;
|
13
21
|
cornerRadius: number;
|
14
22
|
styles: StylesType;
|
15
|
-
formProps:
|
16
|
-
|
17
|
-
};
|
23
|
+
formProps: FormContainerProps;
|
24
|
+
formStepProps: FormStepContainerProps;
|
18
25
|
}>;
|
19
26
|
export declare type AdditionalContainerProps = Partial<{
|
20
27
|
containerStyle: CSSProperties;
|
@@ -30,11 +37,30 @@ export declare type ContainerComponentProps = {
|
|
30
37
|
id: string;
|
31
38
|
instance: 'container';
|
32
39
|
type: ContainerType;
|
40
|
+
items: (ContainerComponentProps | Molecule)[];
|
33
41
|
config: {
|
34
42
|
wide?: AdditionalContainerProps;
|
35
43
|
compact?: AdditionalContainerProps;
|
36
44
|
props?: ContainerPropsType;
|
37
45
|
};
|
38
|
-
items: (ContainerComponentProps | Molecule)[];
|
39
46
|
tabsProps?: Pick<TabGroupProps, 'tabs' | 'activeTabKey' | 'onTabChange'>;
|
47
|
+
metadata?: AnyObject;
|
48
|
+
attributes?: AnyObject;
|
49
|
+
containerLibraryId?: string;
|
50
|
+
};
|
51
|
+
export declare type CriteriaType = 'operator' | 'condition';
|
52
|
+
export declare type ConditionCriteria = {
|
53
|
+
id: string;
|
54
|
+
type: CriteriaType;
|
55
|
+
operator: string;
|
56
|
+
dataFieldId: Nullable<string>;
|
57
|
+
dataFieldName: Nullable<string>;
|
58
|
+
dataValue: Nullable<string>;
|
59
|
+
connectedTo: Nullable<string>;
|
40
60
|
};
|
61
|
+
export declare type SegmentationType = 'simple' | 'advanced';
|
62
|
+
export declare type ConditionConfig = Nullable<{
|
63
|
+
id: string;
|
64
|
+
segmentationType: SegmentationType;
|
65
|
+
criteriaList: ConditionCriteria[];
|
66
|
+
}>;
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import { Dispatch, SetStateAction } from 'react';
|
2
|
+
import { ContainerComponentProps } from 'containers';
|
3
|
+
export declare type ButtonActionsContextType = {
|
4
|
+
actionContent?: ContainerComponentProps;
|
5
|
+
setActionContent: Dispatch<SetStateAction<ContainerComponentProps>>;
|
6
|
+
isModalVisible: boolean;
|
7
|
+
setModalVisible: Dispatch<SetStateAction<boolean>>;
|
8
|
+
isDrawerVisible: boolean;
|
9
|
+
setDrawerVisible: Dispatch<SetStateAction<boolean>>;
|
10
|
+
};
|
11
|
+
export declare const ButtonActionsContext: import("react").Context<ButtonActionsContextType>;
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import { Dispatch, PropsWithChildren, SetStateAction } from 'react';
|
2
|
+
import { ContainerComponentProps } from 'containers';
|
3
|
+
export declare type ButtonActionsProviderProps = PropsWithChildren<Partial<{
|
4
|
+
actionContent: ContainerComponentProps;
|
5
|
+
setActionContent: Dispatch<SetStateAction<ContainerComponentProps>>;
|
6
|
+
isModalVisible: boolean;
|
7
|
+
setModalVisible: Dispatch<SetStateAction<boolean>>;
|
8
|
+
setDrawerVisible: Dispatch<SetStateAction<boolean>>;
|
9
|
+
isDrawerVisible: boolean;
|
10
|
+
}>>;
|
11
|
+
export declare const ButtonActionsProvider: ({ children }: ButtonActionsProviderProps) => JSX.Element;
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import { Dispatch, SetStateAction } from 'react';
|
2
|
+
export declare type FormStepContextType = {
|
3
|
+
steps: number;
|
4
|
+
currentStep: number;
|
5
|
+
goToNextStep: () => void;
|
6
|
+
goToPrevStep: () => void;
|
7
|
+
reset: () => void;
|
8
|
+
canGoToNextStep: boolean;
|
9
|
+
canGoToPrevStep: boolean;
|
10
|
+
setStep: Dispatch<SetStateAction<number>>;
|
11
|
+
setInitSteps: Dispatch<SetStateAction<number>>;
|
12
|
+
};
|
13
|
+
export declare const FormStepContext: import("react").Context<FormStepContextType>;
|
@@ -0,0 +1,5 @@
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
2
|
+
export declare type FormStepContextProviderProps = PropsWithChildren<{
|
3
|
+
initialStepsCount?: number;
|
4
|
+
}>;
|
5
|
+
export declare const FormStepContextProvider: ({ initialStepsCount, children, }: FormStepContextProviderProps) => JSX.Element;
|
@@ -0,0 +1,8 @@
|
|
1
|
+
/// <reference types="react" />
|
2
|
+
import { ContainerComponentProps, Molecule } from 'containers';
|
3
|
+
import { GroupedStepItemsByStepContainer } from './utils';
|
4
|
+
export declare type OrganismContextType = {
|
5
|
+
items: (ContainerComponentProps | Molecule)[];
|
6
|
+
groupStepItemsByStepContainer: () => GroupedStepItemsByStepContainer;
|
7
|
+
};
|
8
|
+
export declare const OrganismContext: import("react").Context<OrganismContextType>;
|
@@ -0,0 +1,6 @@
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
2
|
+
import { ContainerComponentProps, Molecule } from 'containers';
|
3
|
+
export declare type FormStepContextProviderProps = PropsWithChildren<Partial<{
|
4
|
+
initItems: (ContainerComponentProps | Molecule)[];
|
5
|
+
}>>;
|
6
|
+
export declare const OrganismContextProvider: ({ initItems, children, }: FormStepContextProviderProps) => JSX.Element;
|
@@ -0,0 +1,5 @@
|
|
1
|
+
import { ContainerComponentProps, Molecule } from 'containers';
|
2
|
+
declare type StepItem = ContainerComponentProps | Molecule;
|
3
|
+
export declare type GroupedStepItemsByStepContainer = Map<string, StepItem[]>;
|
4
|
+
export declare const groupStepItemsByStepContainer: (items: StepItem[]) => GroupedStepItemsByStepContainer;
|
5
|
+
export {};
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare const useButtonActionsContext: () => import("contexts/ButtonActionsContext/ButtonActionsContext").ButtonActionsContextType;
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare const useFormStepContext: () => import("contexts/FormStepContext/FormStepContext").FormStepContextType;
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare const useOrganismContext: () => import("contexts/OrganismContext/OrganismContext").OrganismContextType;
|