@zealicsolutions/web-ui 0.3.81 → 0.3.82
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cjs/index.js +16 -16
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/src/containers/Container.d.ts +1 -1
- package/dist/cjs/src/containers/Container.stories.d.ts +2 -1
- package/dist/cjs/src/containers/FormStepContainer.d.ts +3 -2
- package/dist/cjs/src/containers/MoleculeItem.d.ts +1 -1
- package/dist/cjs/src/containers/mock-data.d.ts +1 -0
- package/dist/cjs/src/containers/types/moleculeTypes.d.ts +24 -5
- package/dist/cjs/src/containers/types/types.d.ts +23 -2
- package/dist/cjs/src/contexts/StateContext/StateContext.d.ts +6 -0
- package/dist/cjs/src/contexts/StateContext/StateContextProvider.d.ts +6 -0
- package/dist/cjs/src/contexts/hooks/index.d.ts +1 -0
- package/dist/cjs/src/contexts/hooks/useStateContext.d.ts +1 -0
- package/dist/cjs/src/fieldsConfiguration/mock.d.ts +2 -0
- package/dist/cjs/src/molecules/FieldLabels/FieldLabels.d.ts +2 -2
- package/dist/cjs/src/molecules/PasswordSetup/PasswordSetup.d.ts +18 -0
- package/dist/cjs/src/molecules/PasswordSetup/PasswordSetup.stories.d.ts +8 -0
- package/dist/cjs/src/organisms/FeedContent/styles.d.ts +1 -1
- package/dist/esm/index.js +3 -3
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/src/containers/Container.d.ts +1 -1
- package/dist/esm/src/containers/Container.stories.d.ts +2 -1
- package/dist/esm/src/containers/FormStepContainer.d.ts +3 -2
- package/dist/esm/src/containers/MoleculeItem.d.ts +1 -1
- package/dist/esm/src/containers/mock-data.d.ts +1 -0
- package/dist/esm/src/containers/types/moleculeTypes.d.ts +24 -5
- package/dist/esm/src/containers/types/types.d.ts +23 -2
- package/dist/esm/src/contexts/StateContext/StateContext.d.ts +6 -0
- package/dist/esm/src/contexts/StateContext/StateContextProvider.d.ts +6 -0
- package/dist/esm/src/contexts/hooks/index.d.ts +1 -0
- package/dist/esm/src/contexts/hooks/useStateContext.d.ts +1 -0
- package/dist/esm/src/fieldsConfiguration/mock.d.ts +2 -0
- package/dist/esm/src/molecules/FieldLabels/FieldLabels.d.ts +2 -2
- package/dist/esm/src/molecules/PasswordSetup/PasswordSetup.d.ts +18 -0
- package/dist/esm/src/molecules/PasswordSetup/PasswordSetup.stories.d.ts +8 -0
- package/dist/esm/src/organisms/FeedContent/styles.d.ts +1 -1
- package/dist/index.d.ts +50 -9
- package/package.json +1 -1
@@ -52,7 +52,7 @@ export declare const Container: ({ children, wide, compact, type, props, id, met
|
|
52
52
|
activeChildrenIds: string[];
|
53
53
|
activeOrganismIds: string[];
|
54
54
|
}>;
|
55
|
-
metadata:
|
55
|
+
metadata: import("containers").MetadataType;
|
56
56
|
isMobile: boolean;
|
57
57
|
}> & {
|
58
58
|
children?: ReactNode;
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import type { Meta, StoryFn } from '@storybook/react';
|
2
|
-
import { ContainerComponent, ContainerComponentProps } from 'containers';
|
2
|
+
import { ContainerComponent, ContainerComponentProps, StateConfigType } from 'containers';
|
3
3
|
declare const meta: Meta<typeof ContainerComponent>;
|
4
4
|
export default meta;
|
5
5
|
declare type Story = StoryFn<ContainerComponentProps>;
|
6
6
|
export declare const Container: Story;
|
7
|
+
export declare const stateObject: StateConfigType;
|
@@ -1,6 +1,7 @@
|
|
1
|
-
import { FormStepContainerProps } from 'containers';
|
1
|
+
import { FormStepContainerProps, MetadataType } from 'containers';
|
2
2
|
import { PropsWithChildren } from 'react';
|
3
3
|
export declare type StepContainerProps = PropsWithChildren<Partial<FormStepContainerProps>> & {
|
4
4
|
id: string;
|
5
|
+
metadata?: MetadataType;
|
5
6
|
};
|
6
|
-
export declare const FormStepContainer: ({ order, id }: StepContainerProps) => JSX.Element | null;
|
7
|
+
export declare const FormStepContainer: ({ order, id, metadata }: StepContainerProps) => JSX.Element | null;
|
@@ -3,7 +3,7 @@ import { TabGroupProps } from 'molecules';
|
|
3
3
|
export declare const getFullLink: (url: string) => string;
|
4
4
|
export declare const navigateToPage: (url: string) => void;
|
5
5
|
export declare const downloadFile: (url?: string, name?: string) => Promise<void>;
|
6
|
-
export declare const MoleculeItem: ({ type, config, attributes, tabsProps, form, id, formData, setFormData, isMobile, }: Molecule & {
|
6
|
+
export declare const MoleculeItem: ({ type, config, attributes, tabsProps, form, id, formData, setFormData, isMobile, validations, }: Molecule & {
|
7
7
|
tabsProps?: Pick<TabGroupProps<string, string>, "tabs" | "activeTabKey" | "onTabChange"> | undefined;
|
8
8
|
isMobile?: boolean | undefined;
|
9
9
|
}) => JSX.Element | null;
|
@@ -11,3 +11,4 @@ export declare const rowRepeaterContainerSingle: ContainerComponentProps;
|
|
11
11
|
export declare const columnRepeaterContainer: ContainerComponentProps;
|
12
12
|
export declare const outlinedColumnContainer: ContainerComponentProps;
|
13
13
|
export declare const headerContainer: ContainerComponentProps;
|
14
|
+
export declare const headerContainerWithTabs: ContainerComponentProps;
|
@@ -1,9 +1,10 @@
|
|
1
1
|
import { LinkVariant, SelectOption } from 'atoms';
|
2
2
|
import { AdditionalTabContainerProps, ButtonProps, CheckboxFieldProps, ConsentType, ImageProps, InputFieldProps, LinkProps, RadioButtonFieldProps, SelectFieldProps, TabGroupProps, TextMoleculeProps } from 'molecules';
|
3
|
+
import { PasswordRuleValidation } from 'molecules/PasswordSetup/PasswordSetup';
|
3
4
|
import { Dispatch, SetStateAction } from 'react';
|
4
5
|
import { UseFormReturn } from 'react-hook-form';
|
5
6
|
import type { AnyObject, Nullable, StrictUnion, StylesType } from 'typescript';
|
6
|
-
import { ConditionConfig, ContainerComponentProps } from './types';
|
7
|
+
import { ConditionConfig, ContainerComponentProps, MetadataType } from './types';
|
7
8
|
export declare type ActionTypes = 'link' | 'popup' | 'drawer' | 'download' | 'submit' | 'reset' | 'destroy';
|
8
9
|
export declare type DownloadFile = {
|
9
10
|
url: string;
|
@@ -28,7 +29,7 @@ declare type Action = {
|
|
28
29
|
reset: ResetAction;
|
29
30
|
destroy: DestroyAction;
|
30
31
|
}>;
|
31
|
-
export declare type FormStateType = 'default' | 'success' | 'format_error' | 'field_error' | 'open_dropdown';
|
32
|
+
export declare type FormStateType = 'default' | 'success' | 'format_error' | 'field_error' | 'open_dropdown' | 'match_error';
|
32
33
|
export declare type ImageAttributes = {
|
33
34
|
attributeType: 'image';
|
34
35
|
imageSource: string;
|
@@ -87,12 +88,12 @@ export interface ColorAttributes {
|
|
87
88
|
attributeType: 'color';
|
88
89
|
color: string;
|
89
90
|
}
|
90
|
-
export declare type MoleculeTypes = 'image' | 'text' | 'button' | 'video' | 'header_tab_group' | 'input_field' | 'select_field' | 'radio_button_field' | 'checkbox_field' | 'consent' | 'link';
|
91
|
+
export declare type MoleculeTypes = 'image' | 'text' | 'button' | 'video' | 'header_tab_group' | 'input_field' | 'select_field' | 'radio_button_field' | 'checkbox_field' | 'consent' | 'link' | 'password_setup_field';
|
91
92
|
export interface BaseMolecule {
|
92
93
|
id: string;
|
93
94
|
instance: 'molecule';
|
94
95
|
type: MoleculeTypes;
|
95
|
-
metadata?:
|
96
|
+
metadata?: MetadataType;
|
96
97
|
}
|
97
98
|
export interface ImageMolecule extends BaseMolecule {
|
98
99
|
type: 'image';
|
@@ -232,9 +233,27 @@ export interface LinkMolecule extends BaseMolecule {
|
|
232
233
|
}>;
|
233
234
|
};
|
234
235
|
}
|
235
|
-
export
|
236
|
+
export interface PasswordSetupMolecule extends BaseMolecule {
|
237
|
+
type: 'password_setup_field';
|
238
|
+
attributes: Partial<{
|
239
|
+
passwordFieldLabel: TextAttributes;
|
240
|
+
reenteredPasswordFieldLabel: TextAttributes;
|
241
|
+
passwordFieldRequired: BooleanAttributes;
|
242
|
+
reenteredPasswordFieldRequired: BooleanAttributes;
|
243
|
+
dataModelField: DataConnectionAttributes;
|
244
|
+
}>;
|
245
|
+
config: {
|
246
|
+
props: {
|
247
|
+
validationLabel?: string;
|
248
|
+
passwordInputProps: InputFieldProps;
|
249
|
+
reenteredPasswordInputProps: InputFieldProps;
|
250
|
+
};
|
251
|
+
};
|
252
|
+
}
|
253
|
+
export declare type Molecule = StrictUnion<ImageMolecule | TextMoleculeType | ButtonMolecule | VideoMolecule | TabGroupMolecule | TextInputMolecule | SelectFieldMolecule | RadioButtonFieldMolecule | CheckboxFieldMolecule | ConsentFieldMolecule | LinkMolecule | PasswordSetupMolecule> & Partial<{
|
236
254
|
form: UseFormReturn<any>;
|
237
255
|
formData: AnyObject;
|
238
256
|
setFormData: Dispatch<SetStateAction<AnyObject>>;
|
257
|
+
validations: PasswordRuleValidation[];
|
239
258
|
}>;
|
240
259
|
export {};
|
@@ -10,6 +10,26 @@ export declare type ContainerTemplateType = 'row_content_container';
|
|
10
10
|
export declare type WrappedContainerType = Extract<ContainerType, 'slider' | 'form' | 'form_step'>;
|
11
11
|
export declare type ContainerPositionType = 'fixed' | 'sticky' | 'static' | 'relative';
|
12
12
|
export declare type ContainerScrollBehaviourType = 'vertical' | 'horizontal' | 'auto' | 'none';
|
13
|
+
export declare type StateActionType = 'visible' | 'disabled';
|
14
|
+
export declare type StateEventType = 'click' | 'view';
|
15
|
+
export declare type StateListenerConfigType = {
|
16
|
+
stateRole: 'stateListener';
|
17
|
+
stateKey: string;
|
18
|
+
stateValue: string;
|
19
|
+
defaultState: Record<StateActionType, boolean>;
|
20
|
+
action: Record<StateActionType, boolean>;
|
21
|
+
};
|
22
|
+
export declare type StateModifierConfigType = {
|
23
|
+
stateRole: 'stateModifier';
|
24
|
+
stateKey: string;
|
25
|
+
event: StateEventType;
|
26
|
+
};
|
27
|
+
export declare type MetadataStateConfig = StateListenerConfigType | StateModifierConfigType;
|
28
|
+
export declare type MetadataType = AnyObject & {
|
29
|
+
stateConfig: MetadataStateConfig[];
|
30
|
+
notEditable?: boolean;
|
31
|
+
hasOwnButton?: boolean;
|
32
|
+
};
|
13
33
|
export declare type SliderProps = {
|
14
34
|
autoplay?: boolean;
|
15
35
|
autoplayDuration?: number;
|
@@ -48,7 +68,7 @@ export declare type ContainerProps = PropsWithChildren<Partial<{
|
|
48
68
|
wide: AdditionalContainerProps;
|
49
69
|
compact: AdditionalContainerProps;
|
50
70
|
props: ContainerPropsType;
|
51
|
-
metadata:
|
71
|
+
metadata: MetadataType;
|
52
72
|
isMobile: boolean;
|
53
73
|
}>>;
|
54
74
|
export declare type ContainerComponentProps = {
|
@@ -62,7 +82,7 @@ export declare type ContainerComponentProps = {
|
|
62
82
|
props: ContainerPropsType;
|
63
83
|
}>;
|
64
84
|
tabsProps?: Pick<TabGroupProps, 'tabs' | 'activeTabKey' | 'onTabChange'>;
|
65
|
-
metadata?:
|
85
|
+
metadata?: MetadataType;
|
66
86
|
attributes?: AnyObject;
|
67
87
|
containerLibraryId?: string;
|
68
88
|
isMobile?: boolean;
|
@@ -83,3 +103,4 @@ export declare type ConditionConfig = Nullable<{
|
|
83
103
|
segmentationType: SegmentationType;
|
84
104
|
criteriaList: ConditionCriteria[];
|
85
105
|
}>;
|
106
|
+
export declare type StateConfigType = Record<string, Nullable<boolean | string>>;
|
@@ -0,0 +1,6 @@
|
|
1
|
+
import { StateConfigType } from 'containers';
|
2
|
+
import { PropsWithChildren } from 'react';
|
3
|
+
export declare type StateContextProviderProps = PropsWithChildren<{
|
4
|
+
initStateConfig: StateConfigType;
|
5
|
+
}>;
|
6
|
+
export declare const StateContextProvider: ({ initStateConfig, children }: StateContextProviderProps) => JSX.Element;
|
@@ -2,3 +2,4 @@ export { useFormStepContext } from './useFormStepContext';
|
|
2
2
|
export { useButtonActionsContext } from './useButtonActionsContext';
|
3
3
|
export { useMlrRichTextViewerContext } from './useMlrRichTextViewerContext';
|
4
4
|
export { useOrganismContext } from './useOrganismContext';
|
5
|
+
export { useStateContext } from './useStateContext';
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare const useStateContext: () => import("contexts/StateContext/StateContext").StateContextType;
|
@@ -1,8 +1,10 @@
|
|
1
1
|
import { UIFields } from 'fieldsConfiguration/types';
|
2
|
+
import { PasswordFields } from 'molecules/PasswordSetup/PasswordSetup';
|
2
3
|
import { LoginFields } from 'organisms/LoginForm/types';
|
3
4
|
import { SetPasswordFields } from 'organisms/SetPasswordForm/types';
|
4
5
|
export declare const acquisitionFormMockFields: UIFields<Record<string, string>>;
|
5
6
|
export declare const setPasswordMockFields: UIFields<SetPasswordFields>;
|
7
|
+
export declare const passwordMockFields: UIFields<PasswordFields>;
|
6
8
|
export declare const loginMockFields: UIFields<LoginFields>;
|
7
9
|
export declare const sectionMockFields: UIFields<Record<string, string>>;
|
8
10
|
export declare const profileInformationMockForm: {
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import type { StylesType } from 'typescript';
|
2
1
|
import { FontSizesTypes, ThemeColors } from 'theme';
|
2
|
+
import type { Nullable, StylesType } from 'typescript';
|
3
3
|
export declare type FieldRuleLabelTypes = 'OPTIONAL' | 'REQUIRED';
|
4
4
|
export declare type LabelInternalConfig = {
|
5
5
|
fontVariant: FontSizesTypes;
|
@@ -33,7 +33,7 @@ export declare type FieldLabelsProps = {
|
|
33
33
|
tooltipText?: string;
|
34
34
|
isError?: boolean;
|
35
35
|
isTooltipVisible?: boolean;
|
36
|
-
ruleLabel?: FieldRuleLabelTypes
|
36
|
+
ruleLabel?: Nullable<FieldRuleLabelTypes>;
|
37
37
|
labelInternalConfig?: LabelInternalConfig;
|
38
38
|
ruleLabelInternalConfig?: RuleLabelInternalConfig;
|
39
39
|
tooltipInternalConfig?: TooltipInternalConfig;
|
@@ -0,0 +1,18 @@
|
|
1
|
+
import { UIFields } from 'fieldsConfiguration';
|
2
|
+
import { MaxRuleValidation, MinRuleValidation } from 'organisms/SetPasswordForm/types';
|
3
|
+
import { UseFormReturn } from 'react-hook-form';
|
4
|
+
export declare type PasswordRuleValidation = {
|
5
|
+
label: string;
|
6
|
+
rule: MaxRuleValidation | MinRuleValidation;
|
7
|
+
};
|
8
|
+
export declare type PasswordFields = {
|
9
|
+
password: string;
|
10
|
+
reenteredPassword?: string;
|
11
|
+
};
|
12
|
+
export declare type PasswordSetupProps = {
|
13
|
+
fields: UIFields<PasswordFields>;
|
14
|
+
validations: PasswordRuleValidation[];
|
15
|
+
form?: UseFormReturn<any>;
|
16
|
+
validationLabel?: string;
|
17
|
+
};
|
18
|
+
export declare const PasswordSetup: ({ fields, validations, form, validationLabel, }: PasswordSetupProps) => JSX.Element;
|
@@ -0,0 +1,8 @@
|
|
1
|
+
import type { ComponentStory } from '@storybook/react';
|
2
|
+
import { PasswordSetup as PasswordSetupComponent } from './PasswordSetup';
|
3
|
+
declare const _default: {
|
4
|
+
title: string;
|
5
|
+
component: ({ fields, validations, form, validationLabel, }: import("./PasswordSetup").PasswordSetupProps) => JSX.Element;
|
6
|
+
};
|
7
|
+
export default _default;
|
8
|
+
export declare const PasswordSetup: ComponentStory<typeof PasswordSetupComponent>;
|
@@ -15,5 +15,5 @@ export declare const CloseButton: import("styled-components").StyledComponent<"d
|
|
15
15
|
disabled?: boolean | undefined;
|
16
16
|
} & {
|
17
17
|
children?: import("react").ReactNode;
|
18
|
-
} & Pick<FeedContentProps, "
|
18
|
+
} & Pick<FeedContentProps, "feedContentTemplate" | "withCloseIcon">, never>;
|
19
19
|
export declare const PdfWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, Pick<FeedContentProps, "showDefaultDocumentStyles">, never>;
|