@zealicsolutions/web-ui 0.2.122 → 0.2.125
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.
- package/dist/cjs/index.js +27 -27
- package/dist/cjs/index.js.map +1 -1
- 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/containers/types/moleculeTypes.d.ts +1 -4
- package/dist/cjs/src/fieldsConfiguration/types.d.ts +1 -1
- package/dist/cjs/src/helpers/validations.d.ts +7 -0
- package/dist/cjs/src/molecules/CheckboxField/CheckboxField.stories.d.ts +18 -1
- 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.stories.d.ts +18 -1
- package/dist/cjs/src/molecules/RadioButtonField/RadioButtonField.stories.d.ts +18 -1
- package/dist/cjs/src/molecules/SelectField/SelectField.stories.d.ts +18 -1
- package/dist/esm/index.js +27 -27
- package/dist/esm/index.js.map +1 -1
- 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/containers/types/moleculeTypes.d.ts +1 -4
- package/dist/esm/src/fieldsConfiguration/types.d.ts +1 -1
- package/dist/esm/src/helpers/validations.d.ts +7 -0
- package/dist/esm/src/molecules/CheckboxField/CheckboxField.stories.d.ts +18 -1
- 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.stories.d.ts +18 -1
- package/dist/esm/src/molecules/RadioButtonField/RadioButtonField.stories.d.ts +18 -1
- package/dist/esm/src/molecules/SelectField/SelectField.stories.d.ts +18 -1
- package/dist/index.d.ts +63 -58
- package/package.json +9 -5
@@ -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> | false;
|
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;
|
@@ -9,7 +9,7 @@ export declare type DownloadFile = {
|
|
9
9
|
url: string;
|
10
10
|
name: string;
|
11
11
|
};
|
12
|
-
declare type LinkAction =
|
12
|
+
declare type LinkAction = LinkAttributes;
|
13
13
|
declare type PopupDrawerAction = ContainerComponentProps;
|
14
14
|
declare type DownloadAction = DownloadFile;
|
15
15
|
declare type SubmitAction = AnyObject;
|
@@ -74,9 +74,6 @@ export interface BaseMolecule {
|
|
74
74
|
instance: 'molecule';
|
75
75
|
type: MoleculeTypes;
|
76
76
|
metadata?: AnyObject;
|
77
|
-
idForFrontend?: string;
|
78
|
-
moleculeLibraryId?: string;
|
79
|
-
organismLibraryMoleculeId?: string;
|
80
77
|
}
|
81
78
|
export interface ImageMolecule extends BaseMolecule {
|
82
79
|
type: 'image';
|
@@ -2,7 +2,7 @@
|
|
2
2
|
import { ControllerProps } from 'react-hook-form';
|
3
3
|
import { SelectOption } from 'atoms';
|
4
4
|
import { InputFieldProps, SelectFieldProps } from 'molecules';
|
5
|
-
export declare type InputFieldTypes = 'phone-number' | 'text' | 'email' | 'password' | 'numerical' | 'any';
|
5
|
+
export declare type InputFieldTypes = 'phone-number' | 'text' | 'email' | 'password' | 'numerical' | 'month_year_date' | 'day_month_year_date' | 'month_day_year_date' | 'us_zip_code' | 'any';
|
6
6
|
export declare type FieldTypes = 'input' | 'select' | 'checkbox';
|
7
7
|
export declare type UIField<T = string> = (UIInputField & UISelectField & UICheckboxField) & {
|
8
8
|
name: T;
|
@@ -5,4 +5,11 @@ export declare const phoneNumberValidation: RegExp;
|
|
5
5
|
export declare const numberValidation: RegExp;
|
6
6
|
export declare const emailValidation: RegExp;
|
7
7
|
export declare const textValidation: RegExp;
|
8
|
+
export declare const dateValidation: RegExp;
|
9
|
+
export declare const usZipCode: RegExp;
|
8
10
|
export declare const getInputValidation: (type?: InputFieldTypes) => ValidationRule<RegExp> | undefined;
|
11
|
+
export declare const postCodeMask: RegExp[];
|
12
|
+
export declare const dayMonthYearDateMask: (string | RegExp)[];
|
13
|
+
export declare const monthYearDateMask: (string | RegExp)[];
|
14
|
+
export declare const phoneNumberMask: (string | RegExp)[];
|
15
|
+
export declare const removeMaskFromString: (inputString: string) => string;
|
@@ -26,7 +26,24 @@ declare const _default: {
|
|
26
26
|
}>;
|
27
27
|
labelsProps: import("molecules").FieldLabelsProps;
|
28
28
|
name: string;
|
29
|
-
rules: Omit<
|
29
|
+
rules: Omit<Partial<{
|
30
|
+
required: string | import("react-hook-form").ValidationRule<boolean>;
|
31
|
+
min: import("react-hook-form").ValidationRule<string | number>;
|
32
|
+
max: import("react-hook-form").ValidationRule<string | number>;
|
33
|
+
maxLength: import("react-hook-form").ValidationRule<number>;
|
34
|
+
minLength: import("react-hook-form").ValidationRule<number>;
|
35
|
+
pattern: import("react-hook-form").ValidationRule<RegExp>;
|
36
|
+
validate: import("react-hook-form").Validate<any> | Record<string, import("react-hook-form").Validate<any>>;
|
37
|
+
valueAsNumber: boolean;
|
38
|
+
valueAsDate: boolean;
|
39
|
+
value: any;
|
40
|
+
setValueAs: (value: any) => any;
|
41
|
+
shouldUnregister?: boolean | undefined;
|
42
|
+
onChange?: ((event: any) => void) | undefined;
|
43
|
+
onBlur?: ((event: any) => void) | undefined;
|
44
|
+
disabled: boolean;
|
45
|
+
deps: string | string[];
|
46
|
+
}>, "disabled" | "valueAsNumber" | "valueAsDate" | "setValueAs"> | undefined;
|
30
47
|
control: import("react-hook-form").Control<any, any>;
|
31
48
|
required: boolean;
|
32
49
|
optional: boolean;
|
@@ -1,15 +1,16 @@
|
|
1
1
|
/// <reference types="react" />
|
2
|
-
import { StylesType } from 'typescript';
|
2
|
+
import { Callback, StylesType } from 'typescript';
|
3
3
|
export declare type ImageProps = {
|
4
4
|
src: string;
|
5
5
|
} & Partial<{
|
6
6
|
id: string;
|
7
7
|
altText: string;
|
8
8
|
link: string;
|
9
|
+
onClick: Callback;
|
9
10
|
width: number;
|
10
11
|
height: number;
|
11
12
|
cornerRadius: number;
|
12
13
|
behaveAs: 'background' | 'regular';
|
13
14
|
styles: StylesType;
|
14
15
|
}>;
|
15
|
-
export declare const Image: ({ src, link, altText, styles, width, height, id, behaveAs, cornerRadius, }: ImageProps) => JSX.Element;
|
16
|
+
export declare const Image: ({ src, onClick, link, altText, styles, width, height, id, behaveAs, cornerRadius, }: ImageProps) => JSX.Element;
|
@@ -3,7 +3,7 @@ import type { StoryFn } from '@storybook/react';
|
|
3
3
|
import { Image as ImageComponent } from './Image';
|
4
4
|
declare const _default: {
|
5
5
|
title: string;
|
6
|
-
component: ({ src, link, altText, styles, width, height, id, behaveAs, cornerRadius, }: import("./Image").ImageProps) => JSX.Element;
|
6
|
+
component: ({ src, onClick, link, altText, styles, width, height, id, behaveAs, cornerRadius, }: import("./Image").ImageProps) => JSX.Element;
|
7
7
|
};
|
8
8
|
export default _default;
|
9
9
|
export declare const Image: StoryFn<typeof ImageComponent>;
|
@@ -6,7 +6,24 @@ declare const _default: {
|
|
6
6
|
component: ({ control, name, inputProps, styles, labelsProps, defaultValue, optional, required, rules, }: Partial<{
|
7
7
|
name: string;
|
8
8
|
control: import("react-hook-form").Control<any, any>;
|
9
|
-
rules: Omit<
|
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;
|
10
27
|
required: boolean;
|
11
28
|
optional: boolean;
|
12
29
|
defaultValue: string;
|
@@ -5,7 +5,24 @@ declare const _default: {
|
|
5
5
|
title: string;
|
6
6
|
component: <T extends string>({ name, rules, styles, control, optional, required, labelsProps, defaultValue, radioButtonsProps, }: Partial<{
|
7
7
|
name: string;
|
8
|
-
rules: Omit<
|
8
|
+
rules: Omit<Partial<{
|
9
|
+
required: string | import("react-hook-form").ValidationRule<boolean>;
|
10
|
+
min: import("react-hook-form").ValidationRule<string | number>;
|
11
|
+
max: import("react-hook-form").ValidationRule<string | number>;
|
12
|
+
maxLength: import("react-hook-form").ValidationRule<number>;
|
13
|
+
minLength: import("react-hook-form").ValidationRule<number>;
|
14
|
+
pattern: import("react-hook-form").ValidationRule<RegExp>;
|
15
|
+
validate: import("react-hook-form").Validate<any> | Record<string, import("react-hook-form").Validate<any>>;
|
16
|
+
valueAsNumber: boolean;
|
17
|
+
valueAsDate: boolean;
|
18
|
+
value: any;
|
19
|
+
setValueAs: (value: any) => any;
|
20
|
+
shouldUnregister?: boolean | undefined;
|
21
|
+
onChange?: ((event: any) => void) | undefined;
|
22
|
+
onBlur?: ((event: any) => void) | undefined;
|
23
|
+
disabled: boolean;
|
24
|
+
deps: string | string[];
|
25
|
+
}>, "disabled" | "valueAsNumber" | "valueAsDate" | "setValueAs"> | undefined;
|
9
26
|
styles: import("styled-components").FlattenInterpolation<import("styled-components").ThemedStyledProps<object, import("styled-components").DefaultTheme>>;
|
10
27
|
control: import("react-hook-form").Control<any, any>;
|
11
28
|
optional: boolean;
|
@@ -20,7 +20,24 @@ declare const _default: {
|
|
20
20
|
}>;
|
21
21
|
labelsProps: import("..").FieldLabelsProps;
|
22
22
|
name: string;
|
23
|
-
rules: Omit<
|
23
|
+
rules: Omit<Partial<{
|
24
|
+
required: string | import("react-hook-form").ValidationRule<boolean>;
|
25
|
+
min: import("react-hook-form").ValidationRule<string | number>;
|
26
|
+
max: import("react-hook-form").ValidationRule<string | number>;
|
27
|
+
maxLength: import("react-hook-form").ValidationRule<number>;
|
28
|
+
minLength: import("react-hook-form").ValidationRule<number>;
|
29
|
+
pattern: import("react-hook-form").ValidationRule<RegExp>;
|
30
|
+
validate: import("react-hook-form").Validate<any> | Record<string, import("react-hook-form").Validate<any>>;
|
31
|
+
valueAsNumber: boolean;
|
32
|
+
valueAsDate: boolean;
|
33
|
+
value: any;
|
34
|
+
setValueAs: (value: any) => any;
|
35
|
+
shouldUnregister?: boolean | undefined;
|
36
|
+
onChange?: ((event: any) => void) | undefined;
|
37
|
+
onBlur?: ((event: any) => void) | undefined;
|
38
|
+
disabled: boolean;
|
39
|
+
deps: string | string[];
|
40
|
+
}>, "disabled" | "valueAsNumber" | "valueAsDate" | "setValueAs"> | undefined;
|
24
41
|
control: import("react-hook-form").Control<any, any>;
|
25
42
|
required: boolean;
|
26
43
|
optional: boolean;
|
package/dist/index.d.ts
CHANGED
@@ -8,17 +8,19 @@ import * as typescript from 'typescript';
|
|
8
8
|
import { StylesType, Callback as Callback$1, OverrideStyles, StyledTransientProps, Nullable, AnyObject, StrictUnion } from 'typescript';
|
9
9
|
import { RefCallBack, Control as Control$1, ControllerProps as ControllerProps$1 } from 'react-hook-form/dist/types';
|
10
10
|
import { IconNames as IconNames$1 } from 'atoms/Icon/Icon';
|
11
|
-
import {
|
11
|
+
import { FieldTypes as FieldTypes$1, UIFields as UIFields$1, InputFieldTypes as InputFieldTypes$1 } from 'fieldsConfiguration/types';
|
12
12
|
import { ThemeColors as ThemeColors$2, FontSizesTypes as FontSizesTypes$1, SizesTypes as SizesTypes$2, BreakpointSizesTypes as BreakpointSizesTypes$1 } from 'theme/types';
|
13
|
-
import
|
13
|
+
import * as react_hook_form from 'react-hook-form';
|
14
|
+
import { ControllerProps, DeepPartial, FieldValues, FormState, Control, UseFormReturn, ValidationMode } from 'react-hook-form';
|
15
|
+
import * as atoms from 'atoms';
|
16
|
+
import { SelectOption as SelectOption$1, TextProps as TextProps$1, IconNames as IconNames$2, TouchableOpacityProps as TouchableOpacityProps$1, AvatarProps as AvatarProps$1, TabProps as TabProps$1, RadioButtonsProps as RadioButtonsProps$1, InputProps as InputProps$1, SelectProps as SelectProps$1, RegularImageProps as RegularImageProps$1, TextButtonProps as TextButtonProps$1, TabTheme as TabTheme$1, RadioButtonInternalConfigProps as RadioButtonInternalConfigProps$1, HorizontalButtonsProps as HorizontalButtonsProps$1, IconProps as IconProps$1 } from 'atoms';
|
17
|
+
import { InputFieldProps as InputFieldProps$1, SelectFieldProps as SelectFieldProps$1, FieldSectionProps as FieldSectionProps$1, BaseButtonProps as BaseButtonProps$1, MenuItem as MenuItem$1, HeroImageProps as HeroImageProps$1, ColumnsProps as ColumnsProps$1, EmphasizedTextProps as EmphasizedTextProps$1, TabGroupProps as TabGroupProps$1, AvatarDropdownProps as AvatarDropdownProps$1, ButtonProps as ButtonProps$1, FeedContentHeaderProps as FeedContentHeaderProps$1, AlertProps as AlertProps$1, BottomNaVBarItemProps as BottomNaVBarItemProps$1, MenuItemsProps as MenuItemsProps$1, ImageProps as ImageProps$1, TextMoleculeProps as TextMoleculeProps$1, AdditionalTabContainerProps as AdditionalTabContainerProps$1, RadioButtonFieldProps as RadioButtonFieldProps$1, CheckboxFieldProps as CheckboxFieldProps$1 } from 'molecules';
|
14
18
|
import { TooltipProps as TooltipProps$1 } from 'rc-tooltip/lib/Tooltip';
|
15
19
|
import { WithGoogleMapProps } from 'react-google-maps/lib/withGoogleMap';
|
16
20
|
import { WithScriptjsProps } from 'react-google-maps/lib/withScriptjs';
|
17
|
-
import * as atoms from 'atoms';
|
18
|
-
import { TextProps as TextProps$1, IconNames as IconNames$2, TouchableOpacityProps as TouchableOpacityProps$1, AvatarProps as AvatarProps$1, TabProps as TabProps$1, RadioButtonsProps as RadioButtonsProps$1, SelectOption as SelectOption$1, InputProps as InputProps$1, SelectProps as SelectProps$1, RegularImageProps as RegularImageProps$1, TextButtonProps as TextButtonProps$1, TabTheme as TabTheme$1, RadioButtonInternalConfigProps as RadioButtonInternalConfigProps$1, HorizontalButtonsProps as HorizontalButtonsProps$1, IconProps as IconProps$1 } from 'atoms';
|
19
21
|
import { RadioGroup, DrawerProps as DrawerProps$1, ModalProps } from '@mui/material';
|
20
|
-
import { UIFields as UIFields$
|
21
|
-
import { MaxRuleValidation, MinRuleValidation
|
22
|
+
import { UIFields as UIFields$2, UIField as UIField$1 } from 'fieldsConfiguration';
|
23
|
+
import { SetPasswordFields, MaxRuleValidation, MinRuleValidation } from 'organisms/SetPasswordForm/types';
|
22
24
|
import { ConsentProps as ConsentProps$1, FilteredFeedContentType as FilteredFeedContentType$1, HeroSliderProps as HeroSliderProps$1, ProcessTrackerProps as ProcessTrackerProps$1, ProcessTrackerStatus as ProcessTrackerStatus$1 } from 'organisms';
|
23
25
|
import { ConsentProps as ConsentProps$2 } from 'organisms/Consent/Consent';
|
24
26
|
import { FooterAProps } from 'organisms/Footer/FooterA';
|
@@ -30,8 +32,6 @@ import { SubscribePanelProps as SubscribePanelProps$1 } from 'organisms/Subscrib
|
|
30
32
|
import { ISIAProps } from 'organisms/ISI/ISIA';
|
31
33
|
import { HeaderAProps as HeaderAProps$1 } from 'organisms/Header/HeaderA';
|
32
34
|
import { FeedContentProps as FeedContentProps$1, FeedContentTemplateTypes as FeedContentTemplateTypes$1 } from 'organisms/FeedContent/types';
|
33
|
-
import * as react_hook_form from 'react-hook-form';
|
34
|
-
import { Control, ControllerProps, DeepPartial, FieldValues, FormState, UseFormReturn, ValidationMode } from 'react-hook-form';
|
35
35
|
import { AlertProps as AlertProps$2 } from 'molecules/Alert/Alert';
|
36
36
|
import { LoginFields as LoginFields$1 } from 'organisms/LoginForm/types';
|
37
37
|
import { AnnotationsList as AnnotationsList$1 } from 'contexts/MlrRichTextViewerContext/types';
|
@@ -110,6 +110,53 @@ declare type SelectProps = Partial<{
|
|
110
110
|
}>;
|
111
111
|
declare const Select: ({ ref, onBlur, onChange, value, placeholder, options, disabled, optionsPresentation, isError, selectInternalConfig, isRichText, }: SelectProps) => JSX.Element;
|
112
112
|
|
113
|
+
declare const getFieldPlaceholder: (type: FieldTypes$1, title?: string) => string;
|
114
|
+
|
115
|
+
declare type InputFieldTypes = 'phone-number' | 'text' | 'email' | 'password' | 'numerical' | 'month_year_date' | 'day_month_year_date' | 'month_day_year_date' | 'us_zip_code' | 'any';
|
116
|
+
declare type FieldTypes = 'input' | 'select' | 'checkbox';
|
117
|
+
declare type UIField<T = string> = (UIInputField & UISelectField & UICheckboxField) & {
|
118
|
+
name: T;
|
119
|
+
type: FieldTypes;
|
120
|
+
value?: string;
|
121
|
+
label?: string;
|
122
|
+
placeholder?: string;
|
123
|
+
required?: boolean;
|
124
|
+
tooltip?: string;
|
125
|
+
rules?: ControllerProps['rules'];
|
126
|
+
order?: number;
|
127
|
+
};
|
128
|
+
declare type UIInputField = {
|
129
|
+
inputType?: InputFieldTypes;
|
130
|
+
maxLength?: number;
|
131
|
+
onKeyDown?: (event: React.KeyboardEvent<HTMLInputElement>) => void;
|
132
|
+
} & InputFieldProps$1;
|
133
|
+
declare type UISelectField = {
|
134
|
+
options?: SelectOption$1[];
|
135
|
+
} & SelectFieldProps$1;
|
136
|
+
declare type UICheckboxField = {
|
137
|
+
checkboxLabel?: string;
|
138
|
+
};
|
139
|
+
declare type UIFields<T extends object> = UIField<keyof T>[];
|
140
|
+
|
141
|
+
declare const getInitialValuesFromFields: <T extends object>(fields: UIFields$1<T>) => DeepPartial<T>;
|
142
|
+
declare const isFormValid: <T extends FieldValues>(formState: FormState<T>) => boolean;
|
143
|
+
declare const getFieldsFromFieldSections: <T extends object>(sections: Pick<FieldSectionProps$1<T>, "fields">[]) => UIFields$1<T>;
|
144
|
+
|
145
|
+
declare const acquisitionFormMockFields: UIFields$1<Record<string, string>>;
|
146
|
+
declare const setPasswordMockFields: UIFields$1<SetPasswordFields>;
|
147
|
+
declare const loginMockFields: UIFields$1<LoginFields$1>;
|
148
|
+
declare const sectionMockFields: UIFields$1<Record<string, string>>;
|
149
|
+
declare const profileInformationMockForm: {
|
150
|
+
label: string;
|
151
|
+
fields: UIFields$1<Record<string, string>>;
|
152
|
+
}[];
|
153
|
+
|
154
|
+
declare type MaskConfig = Partial<{
|
155
|
+
maskPlaceholder: string;
|
156
|
+
dataModelFieldType: InputFieldTypes;
|
157
|
+
maskPattern: Array<string | RegExp> | false;
|
158
|
+
}>;
|
159
|
+
|
113
160
|
declare type InputFieldInternalConfigProps = Partial<{
|
114
161
|
textColor: ThemeColors$2 | string;
|
115
162
|
textFontSize: number;
|
@@ -138,8 +185,9 @@ declare type InputProps = {
|
|
138
185
|
onChange?: (value: string) => void;
|
139
186
|
onKeyDown?: (event: React__default.KeyboardEvent<HTMLInputElement>) => void;
|
140
187
|
internalConfig?: InputFieldInternalConfigProps;
|
188
|
+
config?: MaskConfig;
|
141
189
|
};
|
142
|
-
declare const Input: ({ value, leftIcon, rightIcon, onChange, onBlur, disabled, isError, placeholder, isEditMode, type, internalConfig, ...rest }: InputProps) => JSX.Element;
|
190
|
+
declare const Input: ({ value, leftIcon, rightIcon, onChange, onBlur, disabled, isError, placeholder, isEditMode, type, internalConfig, config, ...rest }: InputProps) => JSX.Element;
|
143
191
|
|
144
192
|
declare type TextTypes = 'primary' | 'secondary' | 'error' | 'success';
|
145
193
|
declare type TextAlign = 'center' | 'right' | 'left';
|
@@ -473,7 +521,7 @@ declare type SetPasswordRuleValidation = {
|
|
473
521
|
rule: MaxRuleValidation | MinRuleValidation;
|
474
522
|
};
|
475
523
|
declare type SetPasswordFormProps = {
|
476
|
-
fields: UIFields$
|
524
|
+
fields: UIFields$2<SetPasswordFields>;
|
477
525
|
logoUrl: string;
|
478
526
|
isLoading?: boolean;
|
479
527
|
validations: SetPasswordRuleValidation[];
|
@@ -484,7 +532,7 @@ declare const SetPasswordForm: ({ logoUrl, fields, validations, onBack, onSubmit
|
|
484
532
|
|
485
533
|
declare const showAcceptToastMessage: () => void | undefined;
|
486
534
|
declare type AcquisitionFormProps<T extends object> = {
|
487
|
-
fields: UIFields$
|
535
|
+
fields: UIFields$2<T>;
|
488
536
|
consents: ConsentProps$1[];
|
489
537
|
logoUrl: string;
|
490
538
|
isLoading?: boolean;
|
@@ -520,7 +568,7 @@ declare type LoginFields = {
|
|
520
568
|
};
|
521
569
|
|
522
570
|
declare type LoginFormProps = {
|
523
|
-
fields: UIFields$
|
571
|
+
fields: UIFields$2<LoginFields>;
|
524
572
|
logoUrl: string;
|
525
573
|
isLoading?: boolean;
|
526
574
|
twoFactorAuthConfig?: {
|
@@ -816,47 +864,6 @@ declare const toastStyles: styled_components.FlattenSimpleInterpolation;
|
|
816
864
|
|
817
865
|
declare const useMediaQuery: (breakpointSize: BreakpointSizesTypes$1) => boolean;
|
818
866
|
|
819
|
-
declare const getFieldPlaceholder: (type: FieldTypes$1, title?: string) => string;
|
820
|
-
|
821
|
-
declare type InputFieldTypes = 'phone-number' | 'text' | 'email' | 'password' | 'numerical' | 'any';
|
822
|
-
declare type FieldTypes = 'input' | 'select' | 'checkbox';
|
823
|
-
declare type UIField<T = string> = (UIInputField & UISelectField & UICheckboxField) & {
|
824
|
-
name: T;
|
825
|
-
type: FieldTypes;
|
826
|
-
value?: string;
|
827
|
-
label?: string;
|
828
|
-
placeholder?: string;
|
829
|
-
required?: boolean;
|
830
|
-
tooltip?: string;
|
831
|
-
rules?: ControllerProps['rules'];
|
832
|
-
order?: number;
|
833
|
-
};
|
834
|
-
declare type UIInputField = {
|
835
|
-
inputType?: InputFieldTypes;
|
836
|
-
maxLength?: number;
|
837
|
-
onKeyDown?: (event: React.KeyboardEvent<HTMLInputElement>) => void;
|
838
|
-
} & InputFieldProps$1;
|
839
|
-
declare type UISelectField = {
|
840
|
-
options?: SelectOption$1[];
|
841
|
-
} & SelectFieldProps$1;
|
842
|
-
declare type UICheckboxField = {
|
843
|
-
checkboxLabel?: string;
|
844
|
-
};
|
845
|
-
declare type UIFields<T extends object> = UIField<keyof T>[];
|
846
|
-
|
847
|
-
declare const getInitialValuesFromFields: <T extends object>(fields: UIFields$2<T>) => DeepPartial<T>;
|
848
|
-
declare const isFormValid: <T extends FieldValues>(formState: FormState<T>) => boolean;
|
849
|
-
declare const getFieldsFromFieldSections: <T extends object>(sections: Pick<FieldSectionProps$1<T>, "fields">[]) => UIFields$2<T>;
|
850
|
-
|
851
|
-
declare const acquisitionFormMockFields: UIFields$2<Record<string, string>>;
|
852
|
-
declare const setPasswordMockFields: UIFields$2<SetPasswordFields>;
|
853
|
-
declare const loginMockFields: UIFields$2<LoginFields$1>;
|
854
|
-
declare const sectionMockFields: UIFields$2<Record<string, string>>;
|
855
|
-
declare const profileInformationMockForm: {
|
856
|
-
label: string;
|
857
|
-
fields: UIFields$2<Record<string, string>>;
|
858
|
-
}[];
|
859
|
-
|
860
867
|
declare type MlrRichTextViewerProviderProps = PropsWithChildren<{
|
861
868
|
annotationsList: AnnotationsList$1;
|
862
869
|
isMLRReview: boolean;
|
@@ -1307,13 +1314,14 @@ declare type ImageProps = {
|
|
1307
1314
|
id: string;
|
1308
1315
|
altText: string;
|
1309
1316
|
link: string;
|
1317
|
+
onClick: Callback$1;
|
1310
1318
|
width: number;
|
1311
1319
|
height: number;
|
1312
1320
|
cornerRadius: number;
|
1313
1321
|
behaveAs: 'background' | 'regular';
|
1314
1322
|
styles: StylesType;
|
1315
1323
|
}>;
|
1316
|
-
declare const Image: ({ src, link, altText, styles, width, height, id, behaveAs, cornerRadius, }: ImageProps) => JSX.Element;
|
1324
|
+
declare const Image: ({ src, onClick, link, altText, styles, width, height, id, behaveAs, cornerRadius, }: ImageProps) => JSX.Element;
|
1317
1325
|
|
1318
1326
|
declare type CarouselProps = {
|
1319
1327
|
children: JSX.Element[];
|
@@ -1409,7 +1417,7 @@ declare type DownloadFile = {
|
|
1409
1417
|
url: string;
|
1410
1418
|
name: string;
|
1411
1419
|
};
|
1412
|
-
declare type LinkAction =
|
1420
|
+
declare type LinkAction = LinkAttributes;
|
1413
1421
|
declare type PopupDrawerAction = ContainerComponentProps;
|
1414
1422
|
declare type DownloadAction = DownloadFile;
|
1415
1423
|
declare type SubmitAction = AnyObject;
|
@@ -1474,9 +1482,6 @@ interface BaseMolecule {
|
|
1474
1482
|
instance: 'molecule';
|
1475
1483
|
type: MoleculeTypes;
|
1476
1484
|
metadata?: AnyObject;
|
1477
|
-
idForFrontend?: string;
|
1478
|
-
moleculeLibraryId?: string;
|
1479
|
-
organismLibraryMoleculeId?: string;
|
1480
1485
|
}
|
1481
1486
|
interface ImageMolecule extends BaseMolecule {
|
1482
1487
|
type: 'image';
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@zealicsolutions/web-ui",
|
3
|
-
"version": "0.2.
|
3
|
+
"version": "0.2.125",
|
4
4
|
"repository": {
|
5
5
|
"type": "git",
|
6
6
|
"url": "git+ssh://git@bitbucket.org/Zealic_Solutions/zeal-ui-web.git"
|
@@ -57,8 +57,10 @@
|
|
57
57
|
"@types/jest": "^29.0.0",
|
58
58
|
"@types/react": "^18.0.18",
|
59
59
|
"@types/react-pdf": "^6.2.0",
|
60
|
+
"@types/react-text-mask": "^5.4.11",
|
60
61
|
"@types/styled-components": "^5.1.26",
|
61
62
|
"@types/styled-system": "^5.1.15",
|
63
|
+
"@types/text-mask-addons": "^3.8.1",
|
62
64
|
"@typescript-eslint/eslint-plugin": "^5.36.2",
|
63
65
|
"@typescript-eslint/parser": "^5.36.2",
|
64
66
|
"babel-loader": "^8.2.5",
|
@@ -85,8 +87,8 @@
|
|
85
87
|
"peerDependencies": {
|
86
88
|
"react": "^18.2.0",
|
87
89
|
"react-dom": "^18.2.0",
|
88
|
-
"
|
89
|
-
"
|
90
|
+
"react-pdf": "6.2.2",
|
91
|
+
"styled-components": "^5.3.5"
|
90
92
|
},
|
91
93
|
"dependencies": {
|
92
94
|
"@mui/material": "^5.10.4",
|
@@ -101,9 +103,11 @@
|
|
101
103
|
"react-google-maps": "^9.4.5",
|
102
104
|
"react-hook-form": "^7.34.2",
|
103
105
|
"react-pdf": "6.2.2",
|
106
|
+
"react-text-mask": "^5.5.0",
|
104
107
|
"slate": "^0.85.0",
|
105
108
|
"slate-react": "^0.83.2",
|
106
|
-
"styled-components": "^5.3.5"
|
109
|
+
"styled-components": "^5.3.5",
|
110
|
+
"text-mask-addons": "^3.8.0"
|
107
111
|
},
|
108
112
|
"resolutions": {
|
109
113
|
"@mui/styled-engine": "npm:@mui/styled-engine-sc@latest"
|
@@ -119,4 +123,4 @@
|
|
119
123
|
"homepage": "https://bitbucket.org/Zealic_Solutions/zeal-ui-web#readme",
|
120
124
|
"keywords": [],
|
121
125
|
"description": ""
|
122
|
-
}
|
126
|
+
}
|