@zealicsolutions/web-ui 0.3.46 → 0.3.47
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cjs/index.js +2 -2
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/src/atoms/Select/Select.d.ts +1 -1
- package/dist/cjs/src/containers/Container.d.ts +7 -3
- package/dist/cjs/src/containers/MoleculeItem.d.ts +1 -1
- package/dist/cjs/src/containers/OrganismItem.d.ts +5 -2
- package/dist/cjs/src/containers/OrganismItemWithActiveChildren.d.ts +5 -2
- package/dist/cjs/src/containers/hooks/index.d.ts +1 -0
- package/dist/cjs/src/containers/hooks/useSetFormData.d.ts +14 -0
- package/dist/cjs/src/containers/types/moleculeTypes.d.ts +6 -3
- package/dist/cjs/src/molecules/CheckboxField/CheckboxField.d.ts +4 -3
- package/dist/cjs/src/molecules/CheckboxField/CheckboxField.stories.d.ts +3 -2
- package/dist/cjs/src/molecules/InputField/InputField.d.ts +3 -2
- package/dist/cjs/src/molecules/InputField/InputField.stories.d.ts +2 -1
- package/dist/cjs/src/molecules/RadioButtonField/RadioButtonField.d.ts +4 -2
- package/dist/cjs/src/molecules/RadioButtonField/RadioButtonField.stories.d.ts +2 -1
- package/dist/cjs/src/molecules/SelectField/SelectField.d.ts +3 -1
- package/dist/cjs/src/molecules/SelectField/SelectField.stories.d.ts +2 -1
- package/dist/esm/index.js +2 -2
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/src/atoms/Select/Select.d.ts +1 -1
- package/dist/esm/src/containers/Container.d.ts +7 -3
- package/dist/esm/src/containers/MoleculeItem.d.ts +1 -1
- package/dist/esm/src/containers/OrganismItem.d.ts +5 -2
- package/dist/esm/src/containers/OrganismItemWithActiveChildren.d.ts +5 -2
- package/dist/esm/src/containers/hooks/index.d.ts +1 -0
- package/dist/esm/src/containers/hooks/useSetFormData.d.ts +14 -0
- package/dist/esm/src/containers/types/moleculeTypes.d.ts +6 -3
- package/dist/esm/src/molecules/CheckboxField/CheckboxField.d.ts +4 -3
- package/dist/esm/src/molecules/CheckboxField/CheckboxField.stories.d.ts +3 -2
- package/dist/esm/src/molecules/InputField/InputField.d.ts +3 -2
- package/dist/esm/src/molecules/InputField/InputField.stories.d.ts +2 -1
- package/dist/esm/src/molecules/RadioButtonField/RadioButtonField.d.ts +4 -2
- package/dist/esm/src/molecules/RadioButtonField/RadioButtonField.stories.d.ts +2 -1
- package/dist/esm/src/molecules/SelectField/SelectField.d.ts +3 -1
- package/dist/esm/src/molecules/SelectField/SelectField.stories.d.ts +2 -1
- package/dist/index.d.ts +26 -12
- package/package.json +1 -1
@@ -1,7 +1,7 @@
|
|
1
1
|
/// <reference types="react" />
|
2
|
+
import { RefCallBack } from 'react-hook-form/dist/types';
|
2
3
|
import { ThemeColors } from 'theme';
|
3
4
|
import type { AnyObject, Callback, StylesType } from 'typescript';
|
4
|
-
import { RefCallBack } from 'react-hook-form/dist/types';
|
5
5
|
export declare type SelectOption = {
|
6
6
|
id: string;
|
7
7
|
label: string;
|
@@ -1,5 +1,6 @@
|
|
1
1
|
import { ContainerComponentProps, ContainerProps } from 'containers';
|
2
|
-
import { ReactNode } from 'react';
|
2
|
+
import { Dispatch, ReactNode, SetStateAction } from 'react';
|
3
|
+
import { AnyObject } from 'typescript';
|
3
4
|
export declare const Container: ({ children, wide, compact, type, props, id, metadata, }: Partial<{
|
4
5
|
type: import("containers").ContainerType;
|
5
6
|
containerTemplateType: "row_content_container";
|
@@ -51,10 +52,13 @@ export declare const Container: ({ children, wide, compact, type, props, id, met
|
|
51
52
|
activeChildrenIds: string[];
|
52
53
|
activeOrganismIds: string[];
|
53
54
|
}>;
|
54
|
-
metadata:
|
55
|
+
metadata: AnyObject;
|
55
56
|
}> & {
|
56
57
|
children?: ReactNode;
|
57
58
|
} & {
|
58
59
|
id: string;
|
59
60
|
}) => JSX.Element;
|
60
|
-
export declare const ContainerComponent: ({ config, tabsProps, id, type, items, metadata, }: ContainerComponentProps
|
61
|
+
export declare const ContainerComponent: ({ config, tabsProps, id, type, items, metadata, formData, setFormData, }: ContainerComponentProps & {
|
62
|
+
formData?: AnyObject | undefined;
|
63
|
+
setFormData?: Dispatch<SetStateAction<AnyObject>> | undefined;
|
64
|
+
}) => JSX.Element | null;
|
@@ -4,6 +4,6 @@ import { TabGroupProps } from 'molecules';
|
|
4
4
|
export declare const getFullLink: (url: string) => string;
|
5
5
|
export declare const navigateToPage: (url: string) => void;
|
6
6
|
export declare const downloadFile: (url?: string, name?: string) => Promise<void>;
|
7
|
-
export declare const MoleculeItem: ({ type, config, attributes, tabsProps, form, id: moleculeId, }: Molecule & {
|
7
|
+
export declare const MoleculeItem: ({ type, config, attributes, tabsProps, form, id: moleculeId, formData, setFormData, }: Molecule & {
|
8
8
|
tabsProps?: Pick<TabGroupProps<string, string>, "tabs" | "activeTabKey" | "onTabChange"> | undefined;
|
9
9
|
}) => JSX.Element | null;
|
@@ -1,8 +1,11 @@
|
|
1
|
-
/// <reference types="react" />
|
2
1
|
import { ContainerComponentProps, Molecule } from 'containers';
|
3
2
|
import { TabGroupProps } from 'molecules';
|
3
|
+
import { Dispatch, SetStateAction } from 'react';
|
4
|
+
import { AnyObject } from 'typescript';
|
4
5
|
export declare type OrganismItemProps = {
|
5
6
|
item: ContainerComponentProps | Molecule;
|
6
7
|
tabsProps?: Pick<TabGroupProps, 'tabs' | 'activeTabKey' | 'onTabChange'>;
|
8
|
+
formData?: AnyObject;
|
9
|
+
setFormData?: Dispatch<SetStateAction<AnyObject>>;
|
7
10
|
};
|
8
|
-
export declare const OrganismItem: ({ item, tabsProps }: OrganismItemProps) => JSX.Element | null;
|
11
|
+
export declare const OrganismItem: ({ item, tabsProps, formData, setFormData }: OrganismItemProps) => JSX.Element | null;
|
@@ -1,7 +1,10 @@
|
|
1
|
-
/// <reference types="react" />
|
2
1
|
import { ContainerComponentProps } from 'containers/types/types';
|
2
|
+
import { Dispatch, SetStateAction } from 'react';
|
3
|
+
import { AnyObject } from 'typescript';
|
3
4
|
export declare type OrganismItemWithActiveChildrenProps = {
|
4
5
|
item: ContainerComponentProps;
|
5
6
|
activeChildrenIds: string[];
|
7
|
+
formData?: AnyObject;
|
8
|
+
setFormData?: Dispatch<SetStateAction<AnyObject>>;
|
6
9
|
};
|
7
|
-
export declare const OrganismItemWithActiveChildren: (props: OrganismItemWithActiveChildrenProps) => JSX.Element | null;
|
10
|
+
export declare const OrganismItemWithActiveChildren: ({ formData, setFormData, ...props }: OrganismItemWithActiveChildrenProps) => JSX.Element | null;
|
@@ -0,0 +1,14 @@
|
|
1
|
+
import { DataConnectionAttributes } from 'containers/types/moleculeTypes';
|
2
|
+
import { Dispatch, SetStateAction } from 'react';
|
3
|
+
import { AnyObject } from 'typescript';
|
4
|
+
declare type UseSetFormDataProps<DefaultValueType> = Partial<{
|
5
|
+
defaultValue: DefaultValueType;
|
6
|
+
dataModelField: DataConnectionAttributes;
|
7
|
+
setFormData: Dispatch<SetStateAction<AnyObject>>;
|
8
|
+
}>;
|
9
|
+
export declare const useSetFormData: <DefaultValueType>({ setFormData, defaultValue, dataModelField, }: Partial<{
|
10
|
+
defaultValue: DefaultValueType;
|
11
|
+
dataModelField: DataConnectionAttributes;
|
12
|
+
setFormData: Dispatch<SetStateAction<AnyObject>>;
|
13
|
+
}>) => void;
|
14
|
+
export {};
|
@@ -1,5 +1,6 @@
|
|
1
1
|
import { LinkVariant, SelectOption } from 'atoms';
|
2
2
|
import { AdditionalTabContainerProps, ButtonProps, CheckboxFieldProps, Consent, ImageProps, InputFieldProps, LinkProps, RadioButtonFieldProps, SelectFieldProps, TabGroupProps, TextMoleculeProps } from 'molecules';
|
3
|
+
import { Dispatch, SetStateAction } from 'react';
|
3
4
|
import { UseFormReturn } from 'react-hook-form';
|
4
5
|
import type { AnyObject, Nullable, StrictUnion, StylesType } from 'typescript';
|
5
6
|
import { ConditionConfig, ContainerComponentProps } from './types';
|
@@ -225,7 +226,9 @@ export interface LinkMolecule extends BaseMolecule {
|
|
225
226
|
}>;
|
226
227
|
};
|
227
228
|
}
|
228
|
-
export declare type Molecule = StrictUnion<ImageMolecule | TextMoleculeType | ButtonMolecule | VideoMolecule | TabGroupMolecule | TextInputMolecule | SelectFieldMolecule | RadioButtonFieldMolecule | CheckboxFieldMolecule | ConsentFieldMolecule | LinkMolecule> & {
|
229
|
-
form
|
230
|
-
|
229
|
+
export declare type Molecule = StrictUnion<ImageMolecule | TextMoleculeType | ButtonMolecule | VideoMolecule | TabGroupMolecule | TextInputMolecule | SelectFieldMolecule | RadioButtonFieldMolecule | CheckboxFieldMolecule | ConsentFieldMolecule | LinkMolecule> & Partial<{
|
230
|
+
form: UseFormReturn<any>;
|
231
|
+
formData: AnyObject;
|
232
|
+
setFormData: Dispatch<SetStateAction<AnyObject>>;
|
233
|
+
}>;
|
231
234
|
export {};
|
@@ -3,7 +3,7 @@ import { SelectOption } from 'atoms';
|
|
3
3
|
import { CheckboxInternalConfigProps } from 'atoms/Checkbox/types';
|
4
4
|
import { ConditionConfig, FormStateType } from 'containers';
|
5
5
|
import { Control, ControllerProps } from 'react-hook-form/dist/types';
|
6
|
-
import type { StylesType } from 'typescript';
|
6
|
+
import type { AnyObject, StylesType } from 'typescript';
|
7
7
|
import { FieldLabelsProps } from '../FieldLabels/FieldLabels';
|
8
8
|
export declare type CheckboxesProps = Partial<{
|
9
9
|
checkboxGroupWrapperStyles: StylesType;
|
@@ -28,6 +28,7 @@ export declare type CheckboxFieldProps = Partial<{
|
|
28
28
|
wrapperStyles: StylesType;
|
29
29
|
conditionConfig: ConditionConfig;
|
30
30
|
state: FormStateType;
|
31
|
-
defaultValue: string;
|
31
|
+
defaultValue: string[];
|
32
|
+
formData: AnyObject;
|
32
33
|
}>;
|
33
|
-
export declare const CheckboxField: ({ checkboxesProps, name, rules, control, optional, required, labelsProps, wrapperStyles, conditionConfig, defaultValue, }: CheckboxFieldProps) => JSX.Element | null;
|
34
|
+
export declare const CheckboxField: ({ checkboxesProps, name, rules, control, optional, required, labelsProps, wrapperStyles, conditionConfig, defaultValue, formData, }: CheckboxFieldProps) => JSX.Element | null;
|
@@ -3,7 +3,7 @@ import type { StoryFn } from '@storybook/react';
|
|
3
3
|
import { CheckboxField as CheckboxFieldComponent } from 'molecules';
|
4
4
|
declare const _default: {
|
5
5
|
title: string;
|
6
|
-
component: ({ checkboxesProps, name, rules, control, optional, required, labelsProps, wrapperStyles, conditionConfig, defaultValue, }: Partial<{
|
6
|
+
component: ({ checkboxesProps, name, rules, control, optional, required, labelsProps, wrapperStyles, conditionConfig, defaultValue, formData, }: Partial<{
|
7
7
|
checkboxesProps: Partial<{
|
8
8
|
checkboxGroupWrapperStyles: import("styled-components").FlattenInterpolation<import("styled-components").ThemedStyledProps<object, import("styled-components").DefaultTheme>>;
|
9
9
|
checkboxFieldWrapperStyles: import("styled-components").FlattenInterpolation<import("styled-components").ThemedStyledProps<object, import("styled-components").DefaultTheme>>;
|
@@ -50,7 +50,8 @@ declare const _default: {
|
|
50
50
|
wrapperStyles: import("styled-components").FlattenInterpolation<import("styled-components").ThemedStyledProps<object, import("styled-components").DefaultTheme>>;
|
51
51
|
conditionConfig: import("../..").ConditionConfig;
|
52
52
|
state: import("../..").FormStateType;
|
53
|
-
defaultValue: string;
|
53
|
+
defaultValue: string[];
|
54
|
+
formData: import("../../typescript").AnyObject;
|
54
55
|
}>) => JSX.Element | null;
|
55
56
|
};
|
56
57
|
export default _default;
|
@@ -3,7 +3,7 @@ import { InputProps } from 'atoms';
|
|
3
3
|
import { ConditionConfig, FormStateType } from 'containers';
|
4
4
|
import { InputFieldTypes } from 'fieldsConfiguration';
|
5
5
|
import { Control, ControllerProps } from 'react-hook-form/dist/types';
|
6
|
-
import type { StylesType } from 'typescript';
|
6
|
+
import type { AnyObject, StylesType } from 'typescript';
|
7
7
|
import { FieldLabelsProps } from '../FieldLabels/FieldLabels';
|
8
8
|
export declare type InputFieldProps = Partial<{
|
9
9
|
name: string;
|
@@ -17,8 +17,9 @@ export declare type InputFieldProps = Partial<{
|
|
17
17
|
labelsProps: FieldLabelsProps;
|
18
18
|
conditionConfig: ConditionConfig;
|
19
19
|
state: FormStateType;
|
20
|
+
formData: AnyObject;
|
20
21
|
}>;
|
21
22
|
declare type ReturnValueType = Record<FormStateType, string>;
|
22
23
|
export declare const getMockValueForSuccessAndFormatError: (type: InputFieldTypes) => ReturnValueType;
|
23
|
-
export declare const InputField: ({ control, name, inputProps, styles, labelsProps, defaultValue, optional, required, rules, conditionConfig, state, }: InputFieldProps) => JSX.Element | null;
|
24
|
+
export declare const InputField: ({ control, name, inputProps, styles, labelsProps, defaultValue, optional, required, rules, conditionConfig, state, formData, }: InputFieldProps) => JSX.Element | null;
|
24
25
|
export {};
|
@@ -3,7 +3,7 @@ import { StoryFn } from '@storybook/react';
|
|
3
3
|
import { InputFieldProps } from './InputField';
|
4
4
|
declare const _default: {
|
5
5
|
title: string;
|
6
|
-
component: ({ control, name, inputProps, styles, labelsProps, defaultValue, optional, required, rules, conditionConfig, state, }: Partial<{
|
6
|
+
component: ({ control, name, inputProps, styles, labelsProps, defaultValue, optional, required, rules, conditionConfig, state, formData, }: Partial<{
|
7
7
|
name: string;
|
8
8
|
control: import("react-hook-form").Control<any, any>;
|
9
9
|
rules: Omit<Partial<{
|
@@ -61,6 +61,7 @@ declare const _default: {
|
|
61
61
|
labelsProps: import("..").FieldLabelsProps;
|
62
62
|
conditionConfig: import("../..").ConditionConfig;
|
63
63
|
state: import("../..").FormStateType;
|
64
|
+
formData: import("typescript").AnyObject;
|
64
65
|
}>) => JSX.Element | null;
|
65
66
|
};
|
66
67
|
export default _default;
|
@@ -2,7 +2,7 @@
|
|
2
2
|
import { RadioButtonInternalConfigProps, RadioButtonsProps } from 'atoms';
|
3
3
|
import { ConditionConfig, FormStateType } from 'containers';
|
4
4
|
import { Control, ControllerProps } from 'react-hook-form/dist/types';
|
5
|
-
import type { StylesType } from 'typescript';
|
5
|
+
import type { AnyObject, StylesType } from 'typescript';
|
6
6
|
import { FieldLabelsProps } from '../FieldLabels/FieldLabels';
|
7
7
|
export declare type RadioButtonFieldProps<T extends string> = Partial<{
|
8
8
|
name: string;
|
@@ -17,8 +17,9 @@ export declare type RadioButtonFieldProps<T extends string> = Partial<{
|
|
17
17
|
internalConfig: RadioButtonInternalConfigProps;
|
18
18
|
conditionConfig: ConditionConfig;
|
19
19
|
state: FormStateType;
|
20
|
+
formData: AnyObject;
|
20
21
|
}>;
|
21
|
-
export declare const RadioButtonField: <T extends string>({ name, rules, styles, control, optional, required, labelsProps, defaultValue, radioButtonsProps, conditionConfig, }: Partial<{
|
22
|
+
export declare const RadioButtonField: <T extends string>({ name, rules, styles, control, optional, required, labelsProps, defaultValue, radioButtonsProps, conditionConfig, formData, }: Partial<{
|
22
23
|
name: string;
|
23
24
|
rules: ControllerProps['rules'];
|
24
25
|
styles: import("styled-components").FlattenInterpolation<import("styled-components").ThemedStyledProps<object, import("styled-components").DefaultTheme>>;
|
@@ -62,4 +63,5 @@ export declare const RadioButtonField: <T extends string>({ name, rules, styles,
|
|
62
63
|
}>;
|
63
64
|
conditionConfig: ConditionConfig;
|
64
65
|
state: FormStateType;
|
66
|
+
formData: AnyObject;
|
65
67
|
}>) => JSX.Element | null;
|
@@ -3,7 +3,7 @@ import type { ComponentStory } from '@storybook/react';
|
|
3
3
|
import { RadioButtonField as RadioButtonFieldComponent } from './RadioButtonField';
|
4
4
|
declare const _default: {
|
5
5
|
title: string;
|
6
|
-
component: <T extends string>({ name, rules, styles, control, optional, required, labelsProps, defaultValue, radioButtonsProps, conditionConfig, }: Partial<{
|
6
|
+
component: <T extends string>({ name, rules, styles, control, optional, required, labelsProps, defaultValue, radioButtonsProps, conditionConfig, formData, }: Partial<{
|
7
7
|
name: string;
|
8
8
|
rules: Omit<Partial<{
|
9
9
|
required: string | import("react-hook-form").ValidationRule<boolean>;
|
@@ -64,6 +64,7 @@ declare const _default: {
|
|
64
64
|
}>;
|
65
65
|
conditionConfig: import("../..").ConditionConfig;
|
66
66
|
state: import("../..").FormStateType;
|
67
|
+
formData: import("typescript").AnyObject;
|
67
68
|
}>) => JSX.Element | null;
|
68
69
|
};
|
69
70
|
export default _default;
|
@@ -3,6 +3,7 @@ import { SelectProps } from 'atoms';
|
|
3
3
|
import { ConditionConfig, FormStateType } from 'containers';
|
4
4
|
import { Control, ControllerProps } from 'react-hook-form/dist/types';
|
5
5
|
import type { StylesType } from 'typescript';
|
6
|
+
import { AnyObject } from 'typescript';
|
6
7
|
import { FieldLabelsProps } from '../FieldLabels/FieldLabels';
|
7
8
|
export declare type SelectFieldProps = Partial<{
|
8
9
|
selectProps: SelectProps;
|
@@ -16,5 +17,6 @@ export declare type SelectFieldProps = Partial<{
|
|
16
17
|
styles: StylesType;
|
17
18
|
conditionConfig: ConditionConfig;
|
18
19
|
state: FormStateType;
|
20
|
+
formData: AnyObject;
|
19
21
|
}>;
|
20
|
-
export declare const SelectField: ({ selectProps, name, defaultValue, optional, required, control, styles, labelsProps, rules, conditionConfig, }: SelectFieldProps) => JSX.Element | null;
|
22
|
+
export declare const SelectField: ({ selectProps, name, defaultValue, optional, required, control, styles, labelsProps, rules, conditionConfig, formData, }: SelectFieldProps) => JSX.Element | null;
|
@@ -3,7 +3,7 @@ import { StoryFn } from '@storybook/react';
|
|
3
3
|
import { SelectFieldProps } from './SelectField';
|
4
4
|
declare const _default: {
|
5
5
|
title: string;
|
6
|
-
component: ({ selectProps, name, defaultValue, optional, required, control, styles, labelsProps, rules, conditionConfig, }: Partial<{
|
6
|
+
component: ({ selectProps, name, defaultValue, optional, required, control, styles, labelsProps, rules, conditionConfig, formData, }: Partial<{
|
7
7
|
selectProps: Partial<{
|
8
8
|
ref: import("react-hook-form").RefCallBack;
|
9
9
|
onBlur: import("typescript").Callback;
|
@@ -45,6 +45,7 @@ declare const _default: {
|
|
45
45
|
styles: import("styled-components").FlattenInterpolation<import("styled-components").ThemedStyledProps<object, import("styled-components").DefaultTheme>>;
|
46
46
|
conditionConfig: import("../..").ConditionConfig;
|
47
47
|
state: import("../..").FormStateType;
|
48
|
+
formData: import("typescript").AnyObject;
|
48
49
|
}>) => JSX.Element | null;
|
49
50
|
};
|
50
51
|
export default _default;
|