@zealicsolutions/web-ui 0.2.91 → 0.2.92

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 (26) hide show
  1. package/dist/cjs/index.js +1 -1
  2. package/dist/cjs/index.js.map +1 -1
  3. package/dist/cjs/src/atoms/RadioButtons/RadioButtons.d.ts +14 -6
  4. package/dist/cjs/src/atoms/RadioButtons/RadioButtons.stories.d.ts +9 -1
  5. package/dist/cjs/src/containers/MoleculeItem.d.ts +1 -1
  6. package/dist/cjs/src/containers/helpers.d.ts +1 -1
  7. package/dist/cjs/src/containers/types/moleculeTypes.d.ts +21 -6
  8. package/dist/cjs/src/contexts/MlrRichTextViewerContext/types.d.ts +2 -1
  9. package/dist/cjs/src/molecules/RadioButtonField/RadioButtonField.d.ts +28 -10
  10. package/dist/cjs/src/molecules/RadioButtonField/RadioButtonField.stories.d.ts +36 -1
  11. package/dist/cjs/src/molecules/TextMolecule/TextMolecule.d.ts +2 -2
  12. package/dist/cjs/src/molecules/TextMolecule/TextMolecule.stories.d.ts +1 -1
  13. package/dist/esm/index.js +1 -1
  14. package/dist/esm/index.js.map +1 -1
  15. package/dist/esm/src/atoms/RadioButtons/RadioButtons.d.ts +14 -6
  16. package/dist/esm/src/atoms/RadioButtons/RadioButtons.stories.d.ts +9 -1
  17. package/dist/esm/src/containers/MoleculeItem.d.ts +1 -1
  18. package/dist/esm/src/containers/helpers.d.ts +1 -1
  19. package/dist/esm/src/containers/types/moleculeTypes.d.ts +21 -6
  20. package/dist/esm/src/contexts/MlrRichTextViewerContext/types.d.ts +2 -1
  21. package/dist/esm/src/molecules/RadioButtonField/RadioButtonField.d.ts +28 -10
  22. package/dist/esm/src/molecules/RadioButtonField/RadioButtonField.stories.d.ts +36 -1
  23. package/dist/esm/src/molecules/TextMolecule/TextMolecule.d.ts +2 -2
  24. package/dist/esm/src/molecules/TextMolecule/TextMolecule.stories.d.ts +1 -1
  25. package/dist/index.d.ts +69 -26
  26. package/package.json +1 -1
@@ -17,13 +17,21 @@ export declare type RadioButtonType<T extends string = string> = {
17
17
  disabled?: boolean;
18
18
  isRichText?: boolean;
19
19
  };
20
- export declare type RadioButtonsProps<T extends string> = {
21
- isEditMode?: boolean;
20
+ export declare type RadioButtonsProps<T extends string> = Partial<{
21
+ isEditMode: boolean;
22
22
  onChange: (value: T) => void;
23
23
  value: T;
24
- isRow?: boolean;
24
+ isRow: boolean;
25
25
  items: RadioButtonType<T>[];
26
26
  name: string;
27
- internalConfig?: RadioButtonInternalConfigProps;
28
- };
29
- export declare const RadioButtons: <T extends string>({ value, items, isRow, isEditMode, onChange, name, internalConfig, }: RadioButtonsProps<T>) => JSX.Element;
27
+ internalConfig: RadioButtonInternalConfigProps;
28
+ }>;
29
+ export declare const RadioButtons: <T extends string>({ value, items, isRow, isEditMode, onChange, name, internalConfig, }: Partial<{
30
+ isEditMode: boolean;
31
+ onChange: (value: T) => void;
32
+ value: T;
33
+ isRow: boolean;
34
+ items: RadioButtonType<T>[];
35
+ name: string;
36
+ internalConfig: RadioButtonInternalConfigProps;
37
+ }>) => JSX.Element;
@@ -3,7 +3,15 @@ import type { ComponentStory } from '@storybook/react';
3
3
  import { RadioButtons as RadioButtonsComponent } from './RadioButtons';
4
4
  declare const _default: {
5
5
  title: string;
6
- component: <T extends string>({ value, items, isRow, isEditMode, onChange, name, internalConfig, }: import("./RadioButtons").RadioButtonsProps<T>) => JSX.Element;
6
+ component: <T extends string>({ value, items, isRow, isEditMode, onChange, name, internalConfig, }: Partial<{
7
+ isEditMode: boolean;
8
+ onChange: (value: T) => void;
9
+ value: T;
10
+ isRow: boolean;
11
+ items: import("./RadioButtons").RadioButtonType<T>[];
12
+ name: string;
13
+ internalConfig: import("./RadioButtons").RadioButtonInternalConfigProps;
14
+ }>) => JSX.Element;
7
15
  };
8
16
  export default _default;
9
17
  export declare const RadioButtons: ComponentStory<typeof RadioButtonsComponent>;
@@ -3,6 +3,6 @@ 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 MoleculeItem: ({ type, config, attributes, tabsProps, form, }: Molecule & {
6
+ export declare const MoleculeItem: ({ type, config, attributes, tabsProps, form, id: moleculeId, }: Molecule & {
7
7
  tabsProps?: Pick<TabGroupProps<string, string>, "tabs" | "activeTabKey" | "onTabChange"> | undefined;
8
8
  }) => JSX.Element;
@@ -1,2 +1,2 @@
1
1
  import { ContainerScrollBehaviourType } from 'containers/types/types';
2
- export declare const getScrollBehaviour: (scrollBehaviour?: ContainerScrollBehaviourType) => "overflow-y: scroll" | "overflow-x: scroll" | "overflow: visible" | "overflow: auto";
2
+ export declare const getScrollBehaviour: (scrollBehaviour?: ContainerScrollBehaviourType) => "overflow-y: scroll" | "overflow-x: scroll" | "overflow: visible" | "overflow: unset";
@@ -1,5 +1,5 @@
1
- import { SelectOption } from 'atoms';
2
- import { ButtonProps, ImageProps, InputFieldProps, SelectFieldProps, TabGroupProps, TextMoleculeProps } from 'molecules';
1
+ import { RadioButtonType, SelectOption } from 'atoms';
2
+ import { ButtonProps, ImageProps, InputFieldProps, RadioButtonFieldProps, SelectFieldProps, TabGroupProps, TextMoleculeProps } from 'molecules';
3
3
  import { UseFormReturn } from 'react-hook-form';
4
4
  import { CSSProperties } from 'styled-components';
5
5
  import type { Nullable, StrictUnion } from 'typescript';
@@ -35,9 +35,9 @@ export interface BooleanAttributes {
35
35
  }
36
36
  export interface IterableAttributes {
37
37
  attributeType: 'iterable';
38
- options: SelectOption[];
38
+ options: SelectOption | RadioButtonType[];
39
39
  }
40
- export declare type MoleculeTypes = 'image' | 'text' | 'button' | 'video' | 'header_tab_group' | 'input_field' | 'select_field';
40
+ export declare type MoleculeTypes = 'image' | 'text' | 'button' | 'video' | 'header_tab_group' | 'input_field' | 'select_field' | 'radio_button_field';
41
41
  export interface BaseMolecule {
42
42
  id: string;
43
43
  instance: 'molecule';
@@ -71,7 +71,9 @@ export interface ButtonMolecule extends BaseMolecule {
71
71
  buttonLink: LinkAttributes;
72
72
  };
73
73
  config: {
74
- props: Partial<Omit<ButtonProps, 'disabled' | 'children' | 'link' | 'text' | 'onClick' | 'elementId'>>;
74
+ props: Partial<Omit<ButtonProps, 'disabled' | 'children' | 'link' | 'text' | 'onClick' | 'elementId'>> & {
75
+ type?: 'button' | 'submit' | 'reset';
76
+ };
75
77
  };
76
78
  }
77
79
  export interface VideoMolecule extends BaseMolecule {
@@ -130,6 +132,19 @@ export interface SelectFieldMolecule extends BaseMolecule {
130
132
  } & SelectFieldProps>;
131
133
  };
132
134
  }
133
- export declare type Molecule = StrictUnion<ImageMolecule | TextMoleculeType | ButtonMolecule | VideoMolecule | TabGroupMolecule | TextInputMolecule | SelectFieldMolecule> & {
135
+ export interface RadioButtonFieldMolecule extends BaseMolecule {
136
+ type: 'radio_button_field';
137
+ attributes: {
138
+ label: TextAttributes;
139
+ required: BooleanAttributes;
140
+ options: IterableAttributes;
141
+ };
142
+ config: {
143
+ props: Partial<{
144
+ state: 'default' | 'error';
145
+ } & RadioButtonFieldProps<string>>;
146
+ };
147
+ }
148
+ export declare type Molecule = StrictUnion<ImageMolecule | TextMoleculeType | ButtonMolecule | VideoMolecule | TabGroupMolecule | TextInputMolecule | SelectFieldMolecule | RadioButtonFieldMolecule> & {
134
149
  form?: UseFormReturn<any>;
135
150
  };
@@ -4,7 +4,8 @@ export declare type AnnotationsList = {
4
4
  label: string;
5
5
  }[];
6
6
  links: {
7
- id: string;
7
+ referencedById: string;
8
+ moleculeId: string;
8
9
  text: string;
9
10
  url: string;
10
11
  }[];
@@ -3,15 +3,33 @@ import { RadioButtonsProps } from 'atoms';
3
3
  import { Control, ControllerProps } from 'react-hook-form/dist/types';
4
4
  import { CSSProperties } from 'styled-components';
5
5
  import { FieldLabelsProps } from '../FieldLabels/FieldLabels';
6
- export declare type RadioButtonFieldProps<T extends string> = {
6
+ export declare type RadioButtonFieldProps<T extends string> = Partial<{
7
7
  name: string;
8
- control?: Control<any>;
9
- rules?: ControllerProps['rules'];
10
- required?: boolean;
11
- optional?: boolean;
12
- defaultValue?: string;
13
- styles?: CSSProperties;
8
+ control: Control<any>;
9
+ rules: ControllerProps['rules'];
10
+ required: boolean;
11
+ optional: boolean;
12
+ defaultValue: string;
13
+ styles: CSSProperties;
14
14
  radioButtonsProps: RadioButtonsProps<T>;
15
- labelsProps?: FieldLabelsProps;
16
- };
17
- export declare const RadioButtonField: <T extends string>({ control, name, radioButtonsProps, styles, labelsProps, defaultValue, optional, required, rules, }: RadioButtonFieldProps<T>) => JSX.Element;
15
+ labelsProps: FieldLabelsProps;
16
+ }>;
17
+ export declare const RadioButtonField: <T extends string>({ control, name, radioButtonsProps, styles, labelsProps, defaultValue, optional, required, rules, }: Partial<{
18
+ name: string;
19
+ control: Control<any>;
20
+ rules: ControllerProps['rules'];
21
+ required: boolean;
22
+ optional: boolean;
23
+ defaultValue: string;
24
+ styles: CSSProperties;
25
+ radioButtonsProps: Partial<{
26
+ isEditMode: boolean;
27
+ onChange: (value: T) => void;
28
+ value: T;
29
+ isRow: boolean;
30
+ items: import("atoms").RadioButtonType<T>[];
31
+ name: string;
32
+ internalConfig: import("atoms").RadioButtonInternalConfigProps;
33
+ }>;
34
+ labelsProps: FieldLabelsProps;
35
+ }>) => JSX.Element;
@@ -3,7 +3,42 @@ 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>({ control, name, radioButtonsProps, styles, labelsProps, defaultValue, optional, required, rules, }: import("./RadioButtonField").RadioButtonFieldProps<T>) => JSX.Element;
6
+ component: <T extends string>({ control, name, radioButtonsProps, styles, labelsProps, defaultValue, optional, required, rules, }: Partial<{
7
+ name: string;
8
+ control: import("react-hook-form").Control<any, any>;
9
+ rules: Omit<Partial<{
10
+ required: string | import("react-hook-form").ValidationRule<boolean>;
11
+ min: import("react-hook-form").ValidationRule<string | number>;
12
+ max: import("react-hook-form").ValidationRule<string | number>;
13
+ maxLength: import("react-hook-form").ValidationRule<number>;
14
+ minLength: import("react-hook-form").ValidationRule<number>;
15
+ pattern: import("react-hook-form").ValidationRule<RegExp>;
16
+ validate: import("react-hook-form").Validate<any> | Record<string, import("react-hook-form").Validate<any>>;
17
+ valueAsNumber: boolean;
18
+ valueAsDate: boolean;
19
+ value: any;
20
+ setValueAs: (value: any) => any;
21
+ shouldUnregister?: boolean | undefined;
22
+ onChange?: ((event: any) => void) | undefined;
23
+ onBlur?: ((event: any) => void) | undefined;
24
+ disabled: boolean;
25
+ deps: string | string[];
26
+ }>, "disabled" | "valueAsNumber" | "valueAsDate" | "setValueAs"> | undefined;
27
+ required: boolean;
28
+ optional: boolean;
29
+ defaultValue: string;
30
+ styles: import("styled-components").CSSProperties;
31
+ radioButtonsProps: Partial<{
32
+ isEditMode: boolean;
33
+ onChange: (value: T) => void;
34
+ value: T;
35
+ isRow: boolean;
36
+ items: import("../..").RadioButtonType<T>[];
37
+ name: string;
38
+ internalConfig: import("../..").RadioButtonInternalConfigProps;
39
+ }>;
40
+ labelsProps: import("..").FieldLabelsProps;
41
+ }>) => JSX.Element;
7
42
  };
8
43
  export default _default;
9
44
  export declare const RadioButtonField: ComponentStory<typeof RadioButtonFieldComponent>;
@@ -14,5 +14,5 @@ export declare type TextMoleculeProps = Partial<{
14
14
  isRichText: boolean;
15
15
  styles: StylesType;
16
16
  textAlign: 'center' | 'right' | 'left';
17
- }> & Pick<TextProps, 'seoTag'>;
18
- export declare const TextMolecule: ({ isRichText, variant, text, seoTag, fontVariant, textColor, textSize, fontWeight, lineHeight, letterSpacing, styles, textAlign, }: TextMoleculeProps) => JSX.Element;
17
+ }> & Pick<TextProps, 'seoTag' | 'numberOfLines'>;
18
+ export declare const TextMolecule: ({ isRichText, variant, text, seoTag, fontVariant, textColor, textSize, fontWeight, lineHeight, letterSpacing, styles, textAlign, ...restOfTextProps }: TextMoleculeProps) => JSX.Element;
@@ -3,7 +3,7 @@ import type { StoryFn } from '@storybook/react';
3
3
  import { TextMoleculeProps } from './TextMolecule';
4
4
  declare const _default: {
5
5
  title: string;
6
- component: ({ isRichText, variant, text, seoTag, fontVariant, textColor, textSize, fontWeight, lineHeight, letterSpacing, styles, textAlign, }: TextMoleculeProps) => JSX.Element;
6
+ component: ({ isRichText, variant, text, seoTag, fontVariant, textColor, textSize, fontWeight, lineHeight, letterSpacing, styles, textAlign, ...restOfTextProps }: TextMoleculeProps) => JSX.Element;
7
7
  };
8
8
  export default _default;
9
9
  export declare const TextMolecule: StoryFn<TextMoleculeProps>;