@zealicsolutions/web-ui 0.3.45 → 0.3.47

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 (48) hide show
  1. package/dist/cjs/index.js +2 -2
  2. package/dist/cjs/index.js.map +1 -1
  3. package/dist/cjs/src/atoms/Select/Select.d.ts +1 -1
  4. package/dist/cjs/src/containers/Container.d.ts +13 -3
  5. package/dist/cjs/src/containers/MoleculeItem.d.ts +1 -1
  6. package/dist/cjs/src/containers/OrganismItem.d.ts +5 -2
  7. package/dist/cjs/src/containers/OrganismItemWithActiveChildren.d.ts +10 -0
  8. package/dist/cjs/src/containers/hooks/index.d.ts +1 -0
  9. package/dist/cjs/src/containers/hooks/useOrganismItemWithActiveChildren.d.ts +3 -0
  10. package/dist/cjs/src/containers/hooks/useSetFormData.d.ts +14 -0
  11. package/dist/cjs/src/containers/index.d.ts +1 -0
  12. package/dist/cjs/src/containers/styles.d.ts +2 -0
  13. package/dist/cjs/src/containers/types/moleculeTypes.d.ts +6 -3
  14. package/dist/cjs/src/containers/types/types.d.ts +7 -5
  15. package/dist/cjs/src/contexts/OrganismContext/OrganismContextProvider.d.ts +1 -1
  16. package/dist/cjs/src/molecules/CheckboxField/CheckboxField.d.ts +4 -3
  17. package/dist/cjs/src/molecules/CheckboxField/CheckboxField.stories.d.ts +3 -2
  18. package/dist/cjs/src/molecules/InputField/InputField.d.ts +3 -2
  19. package/dist/cjs/src/molecules/InputField/InputField.stories.d.ts +2 -1
  20. package/dist/cjs/src/molecules/RadioButtonField/RadioButtonField.d.ts +4 -2
  21. package/dist/cjs/src/molecules/RadioButtonField/RadioButtonField.stories.d.ts +2 -1
  22. package/dist/cjs/src/molecules/SelectField/SelectField.d.ts +3 -1
  23. package/dist/cjs/src/molecules/SelectField/SelectField.stories.d.ts +2 -1
  24. package/dist/esm/index.js +2 -2
  25. package/dist/esm/index.js.map +1 -1
  26. package/dist/esm/src/atoms/Select/Select.d.ts +1 -1
  27. package/dist/esm/src/containers/Container.d.ts +13 -3
  28. package/dist/esm/src/containers/MoleculeItem.d.ts +1 -1
  29. package/dist/esm/src/containers/OrganismItem.d.ts +5 -2
  30. package/dist/esm/src/containers/OrganismItemWithActiveChildren.d.ts +10 -0
  31. package/dist/esm/src/containers/hooks/index.d.ts +1 -0
  32. package/dist/esm/src/containers/hooks/useOrganismItemWithActiveChildren.d.ts +3 -0
  33. package/dist/esm/src/containers/hooks/useSetFormData.d.ts +14 -0
  34. package/dist/esm/src/containers/index.d.ts +1 -0
  35. package/dist/esm/src/containers/styles.d.ts +2 -0
  36. package/dist/esm/src/containers/types/moleculeTypes.d.ts +6 -3
  37. package/dist/esm/src/containers/types/types.d.ts +7 -5
  38. package/dist/esm/src/contexts/OrganismContext/OrganismContextProvider.d.ts +1 -1
  39. package/dist/esm/src/molecules/CheckboxField/CheckboxField.d.ts +4 -3
  40. package/dist/esm/src/molecules/CheckboxField/CheckboxField.stories.d.ts +3 -2
  41. package/dist/esm/src/molecules/InputField/InputField.d.ts +3 -2
  42. package/dist/esm/src/molecules/InputField/InputField.stories.d.ts +2 -1
  43. package/dist/esm/src/molecules/RadioButtonField/RadioButtonField.d.ts +4 -2
  44. package/dist/esm/src/molecules/RadioButtonField/RadioButtonField.stories.d.ts +2 -1
  45. package/dist/esm/src/molecules/SelectField/SelectField.d.ts +3 -1
  46. package/dist/esm/src/molecules/SelectField/SelectField.stories.d.ts +2 -1
  47. package/dist/index.d.ts +48 -18
  48. 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";
@@ -16,6 +17,8 @@ export declare const Container: ({ children, wide, compact, type, props, id, met
16
17
  formStepProps: import("containers").FormStepContainerProps;
17
18
  padding: import("containers").Padding;
18
19
  border: string;
20
+ activeChildrenIds: string[];
21
+ activeOrganismIds: string[];
19
22
  }>;
20
23
  }>;
21
24
  compact: Partial<{
@@ -31,6 +34,8 @@ export declare const Container: ({ children, wide, compact, type, props, id, met
31
34
  formStepProps: import("containers").FormStepContainerProps;
32
35
  padding: import("containers").Padding;
33
36
  border: string;
37
+ activeChildrenIds: string[];
38
+ activeOrganismIds: string[];
34
39
  }>;
35
40
  }>;
36
41
  props: Partial<{
@@ -44,11 +49,16 @@ export declare const Container: ({ children, wide, compact, type, props, id, met
44
49
  formStepProps: import("containers").FormStepContainerProps;
45
50
  padding: import("containers").Padding;
46
51
  border: string;
52
+ activeChildrenIds: string[];
53
+ activeOrganismIds: string[];
47
54
  }>;
48
- metadata: import("../typescript").AnyObject;
55
+ metadata: AnyObject;
49
56
  }> & {
50
57
  children?: ReactNode;
51
58
  } & {
52
59
  id: string;
53
60
  }) => JSX.Element;
54
- export declare const ContainerComponent: ({ config, tabsProps, id, type, items, metadata, }: ContainerComponentProps) => JSX.Element | null;
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;
@@ -0,0 +1,10 @@
1
+ import { ContainerComponentProps } from 'containers/types/types';
2
+ import { Dispatch, SetStateAction } from 'react';
3
+ import { AnyObject } from 'typescript';
4
+ export declare type OrganismItemWithActiveChildrenProps = {
5
+ item: ContainerComponentProps;
6
+ activeChildrenIds: string[];
7
+ formData?: AnyObject;
8
+ setFormData?: Dispatch<SetStateAction<AnyObject>>;
9
+ };
10
+ export declare const OrganismItemWithActiveChildren: ({ formData, setFormData, ...props }: OrganismItemWithActiveChildrenProps) => JSX.Element | null;
@@ -1 +1,2 @@
1
1
  export { useCheckCondition } from './useCheckCondition';
2
+ export { useSetFormData } from './useSetFormData';
@@ -0,0 +1,3 @@
1
+ import { OrganismItemWithActiveChildrenProps } from 'containers/OrganismItemWithActiveChildren';
2
+ import { ContainerComponentProps } from 'containers/types/types';
3
+ export declare const useOrganismItemWithActiveChildren: ({ item, activeChildrenIds, }: OrganismItemWithActiveChildrenProps) => ContainerComponentProps | undefined;
@@ -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 {};
@@ -3,3 +3,4 @@ export * from './types/types';
3
3
  export * from './types/moleculeTypes';
4
4
  export * from './styles';
5
5
  export * from './OrganismItem';
6
+ export { OrganismItemWithActiveChildren } from './OrganismItemWithActiveChildren';
@@ -13,6 +13,8 @@ export declare const ContainerWrapper: import("styled-components").StyledCompone
13
13
  formStepProps: import("containers/types/types").FormStepContainerProps;
14
14
  padding: import("containers/types/types").Padding;
15
15
  border: string;
16
+ activeChildrenIds: string[];
17
+ activeOrganismIds: string[];
16
18
  }> | undefined;
17
19
  metadata?: AnyObject | undefined;
18
20
  }, never>;
@@ -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?: UseFormReturn<any>;
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 {};
@@ -35,6 +35,8 @@ export declare type ContainerPropsType = Partial<{
35
35
  formStepProps: FormStepContainerProps;
36
36
  padding: Padding;
37
37
  border: string;
38
+ activeChildrenIds: string[];
39
+ activeOrganismIds: string[];
38
40
  }>;
39
41
  export declare type AdditionalContainerProps = Partial<{
40
42
  containerStyle: CSSProperties;
@@ -53,11 +55,11 @@ export declare type ContainerComponentProps = {
53
55
  instance: 'container';
54
56
  type: ContainerType;
55
57
  items: (ContainerComponentProps | Molecule)[];
56
- config: {
57
- wide?: AdditionalContainerProps;
58
- compact?: AdditionalContainerProps;
59
- props?: ContainerPropsType;
60
- };
58
+ config: Partial<{
59
+ wide: AdditionalContainerProps;
60
+ compact: AdditionalContainerProps;
61
+ props: ContainerPropsType;
62
+ }>;
61
63
  tabsProps?: Pick<TabGroupProps, 'tabs' | 'activeTabKey' | 'onTabChange'>;
62
64
  metadata?: AnyObject;
63
65
  attributes?: AnyObject;
@@ -1,5 +1,5 @@
1
- import { PropsWithChildren } from 'react';
2
1
  import { ContainerComponentProps, Molecule } from 'containers';
2
+ import { PropsWithChildren } from 'react';
3
3
  export declare type FormStepContextProviderProps = PropsWithChildren<Partial<{
4
4
  initItems: (ContainerComponentProps | Molecule)[];
5
5
  }>>;
@@ -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;
package/dist/index.d.ts CHANGED
@@ -45,7 +45,7 @@ import { CheckboxInternalConfigProps as CheckboxInternalConfigProps$1 } from 'at
45
45
  import { CustomDescendant } from 'atoms/RichTextViewer/types';
46
46
  import { ConsentCaptureProps } from 'molecules/Consent/ConsentCapture';
47
47
  import * as containers_types_types from 'containers/types/types';
48
- import { ContainerProps as ContainerProps$1 } from 'containers/types/types';
48
+ import { ContainerProps as ContainerProps$1, ContainerComponentProps as ContainerComponentProps$2 } from 'containers/types/types';
49
49
 
50
50
  declare type TouchableOpacityProps = PropsWithChildren<{
51
51
  activeOpacity?: number;
@@ -978,10 +978,11 @@ declare type InputFieldProps = Partial<{
978
978
  labelsProps: FieldLabelsProps;
979
979
  conditionConfig: ConditionConfig$1;
980
980
  state: FormStateType$1;
981
+ formData: AnyObject$1;
981
982
  }>;
982
983
  declare type ReturnValueType = Record<FormStateType$1, string>;
983
984
  declare const getMockValueForSuccessAndFormatError: (type: InputFieldTypes$2) => ReturnValueType;
984
- declare const InputField: ({ control, name, inputProps, styles, labelsProps, defaultValue, optional, required, rules, conditionConfig, state, }: InputFieldProps) => JSX.Element | null;
985
+ declare const InputField: ({ control, name, inputProps, styles, labelsProps, defaultValue, optional, required, rules, conditionConfig, state, formData, }: InputFieldProps) => JSX.Element | null;
985
986
 
986
987
  declare type FieldMapperProps<T extends object> = {
987
988
  field: UIField$1<keyof T>;
@@ -1017,9 +1018,10 @@ declare type CheckboxFieldProps = Partial<{
1017
1018
  wrapperStyles: StylesType;
1018
1019
  conditionConfig: ConditionConfig$1;
1019
1020
  state: FormStateType$1;
1020
- defaultValue: string;
1021
+ defaultValue: string[];
1022
+ formData: AnyObject$1;
1021
1023
  }>;
1022
- declare const CheckboxField: ({ checkboxesProps, name, rules, control, optional, required, labelsProps, wrapperStyles, conditionConfig, defaultValue, }: CheckboxFieldProps) => JSX.Element | null;
1024
+ declare const CheckboxField: ({ checkboxesProps, name, rules, control, optional, required, labelsProps, wrapperStyles, conditionConfig, defaultValue, formData, }: CheckboxFieldProps) => JSX.Element | null;
1023
1025
 
1024
1026
  declare type CheckboxGroupProps = Partial<{
1025
1027
  ref: RefCallBack;
@@ -1041,8 +1043,9 @@ declare type SelectFieldProps = Partial<{
1041
1043
  styles: StylesType;
1042
1044
  conditionConfig: ConditionConfig$1;
1043
1045
  state: FormStateType$1;
1046
+ formData: AnyObject$1;
1044
1047
  }>;
1045
- declare const SelectField: ({ selectProps, name, defaultValue, optional, required, control, styles, labelsProps, rules, conditionConfig, }: SelectFieldProps) => JSX.Element | null;
1048
+ declare const SelectField: ({ selectProps, name, defaultValue, optional, required, control, styles, labelsProps, rules, conditionConfig, formData, }: SelectFieldProps) => JSX.Element | null;
1046
1049
 
1047
1050
  declare type CustomValidationRule<T = string> = {
1048
1051
  text: string;
@@ -1194,8 +1197,9 @@ declare type RadioButtonFieldProps<T extends string> = Partial<{
1194
1197
  internalConfig: RadioButtonInternalConfigProps$1;
1195
1198
  conditionConfig: ConditionConfig$1;
1196
1199
  state: FormStateType$1;
1200
+ formData: AnyObject$1;
1197
1201
  }>;
1198
- declare const RadioButtonField: <T extends string>({ name, rules, styles, control, optional, required, labelsProps, defaultValue, radioButtonsProps, conditionConfig, }: Partial<{
1202
+ declare const RadioButtonField: <T extends string>({ name, rules, styles, control, optional, required, labelsProps, defaultValue, radioButtonsProps, conditionConfig, formData, }: Partial<{
1199
1203
  name: string;
1200
1204
  rules: ControllerProps$1['rules'];
1201
1205
  styles: styled_components.FlattenInterpolation<styled_components.ThemedStyledProps<object, styled_components.DefaultTheme>>;
@@ -1239,6 +1243,7 @@ declare const RadioButtonField: <T extends string>({ name, rules, styles, contro
1239
1243
  }>;
1240
1244
  conditionConfig: ConditionConfig$1;
1241
1245
  state: FormStateType$1;
1246
+ formData: AnyObject$1;
1242
1247
  }>) => JSX.Element | null;
1243
1248
 
1244
1249
  declare type AlertProps = {
@@ -1478,6 +1483,8 @@ declare const Container: ({ children, wide, compact, type, props, id, metadata,
1478
1483
  formStepProps: containers.FormStepContainerProps;
1479
1484
  padding: containers.Padding;
1480
1485
  border: string;
1486
+ activeChildrenIds: string[];
1487
+ activeOrganismIds: string[];
1481
1488
  }>;
1482
1489
  }>;
1483
1490
  compact: Partial<{
@@ -1493,6 +1500,8 @@ declare const Container: ({ children, wide, compact, type, props, id, metadata,
1493
1500
  formStepProps: containers.FormStepContainerProps;
1494
1501
  padding: containers.Padding;
1495
1502
  border: string;
1503
+ activeChildrenIds: string[];
1504
+ activeOrganismIds: string[];
1496
1505
  }>;
1497
1506
  }>;
1498
1507
  props: Partial<{
@@ -1506,14 +1515,19 @@ declare const Container: ({ children, wide, compact, type, props, id, metadata,
1506
1515
  formStepProps: containers.FormStepContainerProps;
1507
1516
  padding: containers.Padding;
1508
1517
  border: string;
1518
+ activeChildrenIds: string[];
1519
+ activeOrganismIds: string[];
1509
1520
  }>;
1510
- metadata: AnyObject;
1521
+ metadata: AnyObject$1;
1511
1522
  }> & {
1512
1523
  children?: ReactNode;
1513
1524
  } & {
1514
1525
  id: string;
1515
1526
  }) => JSX.Element;
1516
- declare const ContainerComponent: ({ config, tabsProps, id, type, items, metadata, }: ContainerComponentProps$1) => JSX.Element | null;
1527
+ declare const ContainerComponent: ({ config, tabsProps, id, type, items, metadata, formData, setFormData, }: ContainerComponentProps$1 & {
1528
+ formData?: AnyObject$1 | undefined;
1529
+ setFormData?: Dispatch<SetStateAction<AnyObject$1>> | undefined;
1530
+ }) => JSX.Element | null;
1517
1531
 
1518
1532
  declare type ActionTypes = 'link' | 'popup' | 'drawer' | 'download' | 'submit' | 'reset' | 'destroy';
1519
1533
  declare type DownloadFile = {
@@ -1737,9 +1751,11 @@ interface LinkMolecule extends BaseMolecule {
1737
1751
  }>;
1738
1752
  };
1739
1753
  }
1740
- declare type Molecule = StrictUnion<ImageMolecule | TextMoleculeType | ButtonMolecule | VideoMolecule | TabGroupMolecule | TextInputMolecule | SelectFieldMolecule | RadioButtonFieldMolecule | CheckboxFieldMolecule | ConsentFieldMolecule | LinkMolecule> & {
1741
- form?: UseFormReturn<any>;
1742
- };
1754
+ declare type Molecule = StrictUnion<ImageMolecule | TextMoleculeType | ButtonMolecule | VideoMolecule | TabGroupMolecule | TextInputMolecule | SelectFieldMolecule | RadioButtonFieldMolecule | CheckboxFieldMolecule | ConsentFieldMolecule | LinkMolecule> & Partial<{
1755
+ form: UseFormReturn<any>;
1756
+ formData: AnyObject$1;
1757
+ setFormData: Dispatch<SetStateAction<AnyObject$1>>;
1758
+ }>;
1743
1759
 
1744
1760
  declare type ContainerType = 'row' | 'column' | 'slider' | 'form' | 'form_step' | 'dynamic';
1745
1761
  declare type ContainerTemplateType = 'row_content_container';
@@ -1771,6 +1787,8 @@ declare type ContainerPropsType = Partial<{
1771
1787
  formStepProps: FormStepContainerProps;
1772
1788
  padding: Padding;
1773
1789
  border: string;
1790
+ activeChildrenIds: string[];
1791
+ activeOrganismIds: string[];
1774
1792
  }>;
1775
1793
  declare type AdditionalContainerProps = Partial<{
1776
1794
  containerStyle: CSSProperties;
@@ -1789,11 +1807,11 @@ declare type ContainerComponentProps = {
1789
1807
  instance: 'container';
1790
1808
  type: ContainerType;
1791
1809
  items: (ContainerComponentProps | Molecule)[];
1792
- config: {
1793
- wide?: AdditionalContainerProps;
1794
- compact?: AdditionalContainerProps;
1795
- props?: ContainerPropsType;
1796
- };
1810
+ config: Partial<{
1811
+ wide: AdditionalContainerProps;
1812
+ compact: AdditionalContainerProps;
1813
+ props: ContainerPropsType;
1814
+ }>;
1797
1815
  tabsProps?: Pick<TabGroupProps$1, 'tabs' | 'activeTabKey' | 'onTabChange'>;
1798
1816
  metadata?: AnyObject$1;
1799
1817
  attributes?: AnyObject$1;
@@ -1828,6 +1846,8 @@ declare const ContainerWrapper: styled_components.StyledComponent<"div", styled_
1828
1846
  formStepProps: containers_types_types.FormStepContainerProps;
1829
1847
  padding: containers_types_types.Padding;
1830
1848
  border: string;
1849
+ activeChildrenIds: string[];
1850
+ activeOrganismIds: string[];
1831
1851
  }> | undefined;
1832
1852
  metadata?: AnyObject | undefined;
1833
1853
  }, never>;
@@ -1835,7 +1855,17 @@ declare const ContainerWrapper: styled_components.StyledComponent<"div", styled_
1835
1855
  declare type OrganismItemProps = {
1836
1856
  item: ContainerComponentProps$1 | Molecule$1;
1837
1857
  tabsProps?: Pick<TabGroupProps$1, 'tabs' | 'activeTabKey' | 'onTabChange'>;
1858
+ formData?: AnyObject$1;
1859
+ setFormData?: Dispatch<SetStateAction<AnyObject$1>>;
1860
+ };
1861
+ declare const OrganismItem: ({ item, tabsProps, formData, setFormData }: OrganismItemProps) => JSX.Element | null;
1862
+
1863
+ declare type OrganismItemWithActiveChildrenProps = {
1864
+ item: ContainerComponentProps$2;
1865
+ activeChildrenIds: string[];
1866
+ formData?: AnyObject$1;
1867
+ setFormData?: Dispatch<SetStateAction<AnyObject$1>>;
1838
1868
  };
1839
- declare const OrganismItem: ({ item, tabsProps }: OrganismItemProps) => JSX.Element | null;
1869
+ declare const OrganismItemWithActiveChildren: ({ formData, setFormData, ...props }: OrganismItemWithActiveChildrenProps) => JSX.Element | null;
1840
1870
 
1841
- export { AcquisitionForm, AcquisitionFormProps, ActionAttributes, ActionTypes, AdditionalContainerProps, AdditionalTabContainerProps, Alert, AlertProps, AnnotationsList, ArrowIconWrapper, AuthMethod, Avatar, AvatarDropdown, AvatarDropdownProps, AvatarProps, BackgroundImage, BaseButtonProps, BaseMolecule, Body, BodyProps, BooleanAttributes, BottomNaVBarItemProps, BottomNavBarItem, BottomNavBarNavigation, BottomNavBarNavigationProps, BreakpointSizesTypes, Button, ButtonActionsContext, ButtonActionsContextType, ButtonActionsProvider, ButtonActionsProviderProps, ButtonMolecule, ButtonProps, ButtonType, ButtonVariant, ButtonsWrapper, COMMUNICATION_LINK_DATA_TEXT, COMMUNICATION_LINK_DATA_URL, COMMUNICATION_LINK_ELEMENT_ID, CaretIconWrapper, Carousel, CarouselProps, Checkbox, CheckboxField, CheckboxFieldMolecule, CheckboxFieldProps, CheckboxGroup, CheckboxGroupProps, CheckboxProps, CheckboxesProps, Circle, CircleBoxProps, CirclesWrapper, CircularIndicator, CircularIndicatorProps, CircularIndicatorStyledComponent, ColorAttributes, ColumnItem, Columns, ColumnsProps, ConditionConfig, ConditionConfigAttributes, ConditionCriteria, Consent, ConsentCaptureMethod, ConsentFieldMolecule, ConsentProps, Container, ContainerComponent, ContainerComponentProps, ContainerPositionType, ContainerProps, ContainerPropsType, ContainerScrollBehaviourType, ContainerTemplateType, ContainerType, ContainerWrapper, CriteriaType, CustomValidation, CustomValidationProps, CustomValidationRule, DataConnectionAttributes, DefaultSelectionType, DefaultTemplate, DefaultTemplateProps, Divider, DividerProps, DownloadFile, Drawer, DynamicContentZone, DynamicContentZoneProps, DynamicElementProps, EmphasizedText, EmphasizedTextProps, ErrorText, FeedContent, FeedContentContainer, FeedContentContainerProps, FeedContentHeader, FeedContentHeaderProps, FeedTemplateKeys, FieldLabels, FieldLabelsProps, FieldMapper, FieldMapperProps, FieldRuleLabelTypes, FieldSection, FieldSectionProps, FieldTypes, FilteredFeedContentType, FontSizesTypes, FontWeight, Footer, FooterContactInfo, FooterLink, FooterProps, ForgotPasswordForm, ForgotPasswordFormProps, FormContainerProps, FormStateType, FormStepContainerProps, FormStepContextProviderProps, GoogleMap, GoogleMapProps, Header, HeaderProps, HeroImage, HeroImageAlignment, HeroImageProps, HeroImageTemplate, HeroSlider, HeroSliderProps, HeroSliderWrapper, HorizontalButtons, HorizontalButtonsField, HorizontalButtonsProps, HorizontalPadding, HorizontalPaddingProps, ISI, ISIProps, Icon, IconButton, IconButtonProps, IconNames, IconProps, IconWrapper, Image, ImageAttributes, ImageMolecule, ImageProps, Input, InputField, InputFieldInternalConfigProps, InputFieldProps, InputFieldTypes, InputIconProps, InputProps, IterableAttributes, LabelInternalConfig, Link, LinkAttributes, LinkMolecule, LinkProps, LinkVariant, LoginForm, LoginFormProps, MATRIX_MESSAGE_DATA_ID, MATRIX_MESSAGE_ELEMENT_ID, MapPosition, MenuItem, MenuItems, MenuItemsProps, MenuNavigation, MenuNavigationProps, MlrRichTextViewerContext, MlrRichTextViewerContextType, MlrRichTextViewerProvider, MlrRichTextViewerProviderProps, ModalWrapper, Molecule, MoleculeTypes, NavigationDotsWrapper, OrganismContext, OrganismContextProvider, OrganismContextType, OrganismItem, OrganismItemProps, OrientationType, Padding, PaddingVariants, PdfDocument, PdfDocumentProps, ProcessTracker, ProcessTrackerProps, ProcessTrackerStatus, ProfileInformation, ProfileInformationProps, RadioButtonField, RadioButtonFieldMolecule, RadioButtonFieldProps, RadioButtonInternalConfigProps, RadioButtons, RadioButtonsProps, RadioGroupWrapper, RegularImage, RegularImageProps, RichTextEditorProps, RichTextViewer, RuleLabelInternalConfig, SegmentationType, Select, SelectAttributes, SelectField, SelectFieldMolecule, SelectFieldProps, SelectInternalConfigurationOptions, SelectOption, SelectProps, SelectableCardGroup, SelectableCardGroupProps, SeoTags, SetPasswordForm, SetPasswordFormProps, SetPasswordRuleValidation, SizesTypes, Slide, SliderProps, SlidesWrapper, Spacer, SpacerProps, Spinner, Stepper, StepperProps, StyleWrapper, SubscribePanel, Tab, TabGroup, TabGroupMolecule, TabGroupProps, TabOption, TabProps, TabTheme, TabType, TextAlign, TextAttributes, TextButton, TextButtonProps, TextInputMolecule, TextMolecule, TextMoleculeProps, TextMoleculeType, TextProps, TextTypes, TextWrapper, TextWrapperProps, ThemeColors, ThemeColorsType, ThemeDevicesType, ThemeSizesType, ThemeTextType, Tooltip, TooltipInternalConfig, TooltipProps, TouchableOpacity, TouchableOpacityProps, TwoFactorAuth, TwoFactorAuthProps, UICheckboxField, UIField, UIFields, UIInputField, UISelectField, ValidationTag, ValidationTagProps, ValidationTagStatus, VerticalPadding, Video, VideoAttributes, VideoMolecule, VideoProps, WrappedContainerType, Wrapper, ZealTheme, ZealThemeProvider, ZealUIModal, ZealUIModalProps, acquisitionFormMockFields, defaultTheme, getFieldPlaceholder, getFieldsFromFieldSections, getInitialValuesFromFields, getMockValueForSuccessAndFormatError, isFormValid, loginMockFields, profileInformationMockForm, sectionMockFields, setPasswordMockFields, showAcceptToastMessage, toast, toastStyles, useButtonActionsContext, useMediaQuery, useMlrRichTextViewerContext, useRequiredConsentsAcceptedValues, useStep };
1871
+ export { AcquisitionForm, AcquisitionFormProps, ActionAttributes, ActionTypes, AdditionalContainerProps, AdditionalTabContainerProps, Alert, AlertProps, AnnotationsList, ArrowIconWrapper, AuthMethod, Avatar, AvatarDropdown, AvatarDropdownProps, AvatarProps, BackgroundImage, BaseButtonProps, BaseMolecule, Body, BodyProps, BooleanAttributes, BottomNaVBarItemProps, BottomNavBarItem, BottomNavBarNavigation, BottomNavBarNavigationProps, BreakpointSizesTypes, Button, ButtonActionsContext, ButtonActionsContextType, ButtonActionsProvider, ButtonActionsProviderProps, ButtonMolecule, ButtonProps, ButtonType, ButtonVariant, ButtonsWrapper, COMMUNICATION_LINK_DATA_TEXT, COMMUNICATION_LINK_DATA_URL, COMMUNICATION_LINK_ELEMENT_ID, CaretIconWrapper, Carousel, CarouselProps, Checkbox, CheckboxField, CheckboxFieldMolecule, CheckboxFieldProps, CheckboxGroup, CheckboxGroupProps, CheckboxProps, CheckboxesProps, Circle, CircleBoxProps, CirclesWrapper, CircularIndicator, CircularIndicatorProps, CircularIndicatorStyledComponent, ColorAttributes, ColumnItem, Columns, ColumnsProps, ConditionConfig, ConditionConfigAttributes, ConditionCriteria, Consent, ConsentCaptureMethod, ConsentFieldMolecule, ConsentProps, Container, ContainerComponent, ContainerComponentProps, ContainerPositionType, ContainerProps, ContainerPropsType, ContainerScrollBehaviourType, ContainerTemplateType, ContainerType, ContainerWrapper, CriteriaType, CustomValidation, CustomValidationProps, CustomValidationRule, DataConnectionAttributes, DefaultSelectionType, DefaultTemplate, DefaultTemplateProps, Divider, DividerProps, DownloadFile, Drawer, DynamicContentZone, DynamicContentZoneProps, DynamicElementProps, EmphasizedText, EmphasizedTextProps, ErrorText, FeedContent, FeedContentContainer, FeedContentContainerProps, FeedContentHeader, FeedContentHeaderProps, FeedTemplateKeys, FieldLabels, FieldLabelsProps, FieldMapper, FieldMapperProps, FieldRuleLabelTypes, FieldSection, FieldSectionProps, FieldTypes, FilteredFeedContentType, FontSizesTypes, FontWeight, Footer, FooterContactInfo, FooterLink, FooterProps, ForgotPasswordForm, ForgotPasswordFormProps, FormContainerProps, FormStateType, FormStepContainerProps, FormStepContextProviderProps, GoogleMap, GoogleMapProps, Header, HeaderProps, HeroImage, HeroImageAlignment, HeroImageProps, HeroImageTemplate, HeroSlider, HeroSliderProps, HeroSliderWrapper, HorizontalButtons, HorizontalButtonsField, HorizontalButtonsProps, HorizontalPadding, HorizontalPaddingProps, ISI, ISIProps, Icon, IconButton, IconButtonProps, IconNames, IconProps, IconWrapper, Image, ImageAttributes, ImageMolecule, ImageProps, Input, InputField, InputFieldInternalConfigProps, InputFieldProps, InputFieldTypes, InputIconProps, InputProps, IterableAttributes, LabelInternalConfig, Link, LinkAttributes, LinkMolecule, LinkProps, LinkVariant, LoginForm, LoginFormProps, MATRIX_MESSAGE_DATA_ID, MATRIX_MESSAGE_ELEMENT_ID, MapPosition, MenuItem, MenuItems, MenuItemsProps, MenuNavigation, MenuNavigationProps, MlrRichTextViewerContext, MlrRichTextViewerContextType, MlrRichTextViewerProvider, MlrRichTextViewerProviderProps, ModalWrapper, Molecule, MoleculeTypes, NavigationDotsWrapper, OrganismContext, OrganismContextProvider, OrganismContextType, OrganismItem, OrganismItemProps, OrganismItemWithActiveChildren, OrientationType, Padding, PaddingVariants, PdfDocument, PdfDocumentProps, ProcessTracker, ProcessTrackerProps, ProcessTrackerStatus, ProfileInformation, ProfileInformationProps, RadioButtonField, RadioButtonFieldMolecule, RadioButtonFieldProps, RadioButtonInternalConfigProps, RadioButtons, RadioButtonsProps, RadioGroupWrapper, RegularImage, RegularImageProps, RichTextEditorProps, RichTextViewer, RuleLabelInternalConfig, SegmentationType, Select, SelectAttributes, SelectField, SelectFieldMolecule, SelectFieldProps, SelectInternalConfigurationOptions, SelectOption, SelectProps, SelectableCardGroup, SelectableCardGroupProps, SeoTags, SetPasswordForm, SetPasswordFormProps, SetPasswordRuleValidation, SizesTypes, Slide, SliderProps, SlidesWrapper, Spacer, SpacerProps, Spinner, Stepper, StepperProps, StyleWrapper, SubscribePanel, Tab, TabGroup, TabGroupMolecule, TabGroupProps, TabOption, TabProps, TabTheme, TabType, TextAlign, TextAttributes, TextButton, TextButtonProps, TextInputMolecule, TextMolecule, TextMoleculeProps, TextMoleculeType, TextProps, TextTypes, TextWrapper, TextWrapperProps, ThemeColors, ThemeColorsType, ThemeDevicesType, ThemeSizesType, ThemeTextType, Tooltip, TooltipInternalConfig, TooltipProps, TouchableOpacity, TouchableOpacityProps, TwoFactorAuth, TwoFactorAuthProps, UICheckboxField, UIField, UIFields, UIInputField, UISelectField, ValidationTag, ValidationTagProps, ValidationTagStatus, VerticalPadding, Video, VideoAttributes, VideoMolecule, VideoProps, WrappedContainerType, Wrapper, ZealTheme, ZealThemeProvider, ZealUIModal, ZealUIModalProps, acquisitionFormMockFields, defaultTheme, getFieldPlaceholder, getFieldsFromFieldSections, getInitialValuesFromFields, getMockValueForSuccessAndFormatError, isFormValid, loginMockFields, profileInformationMockForm, sectionMockFields, setPasswordMockFields, showAcceptToastMessage, toast, toastStyles, useButtonActionsContext, useMediaQuery, useMlrRichTextViewerContext, useRequiredConsentsAcceptedValues, useStep };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zealicsolutions/web-ui",
3
- "version": "0.3.45",
3
+ "version": "0.3.47",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+ssh://git@bitbucket.org/Zealic_Solutions/zeal-ui-web.git"