@zealicsolutions/web-ui 0.3.94 → 0.3.96
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 +4 -4
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/src/containers/FormStepContainer.d.ts +2 -0
- package/dist/cjs/src/containers/hooks/useSetFormData.d.ts +4 -1
- package/dist/cjs/src/contexts/OrganismContext/OrganismContext.d.ts +10 -1
- package/dist/cjs/src/fieldsConfiguration/types.d.ts +2 -2
- package/dist/cjs/src/helpers/validations.d.ts +1 -0
- package/dist/esm/index.js +4 -4
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/src/containers/FormStepContainer.d.ts +2 -0
- package/dist/esm/src/containers/hooks/useSetFormData.d.ts +4 -1
- package/dist/esm/src/contexts/OrganismContext/OrganismContext.d.ts +10 -1
- package/dist/esm/src/fieldsConfiguration/types.d.ts +2 -2
- package/dist/esm/src/helpers/validations.d.ts +1 -0
- package/dist/index.d.ts +12 -4
- package/package.json +1 -1
@@ -1,7 +1,9 @@
|
|
1
1
|
import { FormStepContainerProps, MetadataType } from 'containers';
|
2
|
+
import { InputFieldTypes } from 'fieldsConfiguration';
|
2
3
|
import { PropsWithChildren } from 'react';
|
3
4
|
export declare type StepContainerProps = PropsWithChildren<Partial<FormStepContainerProps>> & {
|
4
5
|
id: string;
|
5
6
|
metadata?: MetadataType;
|
6
7
|
};
|
8
|
+
export declare const parsedDateValue: (value: string, type: InputFieldTypes) => string;
|
7
9
|
export declare const FormStepContainer: ({ order, id, metadata, formStepStyles, }: StepContainerProps) => JSX.Element | null;
|
@@ -1,14 +1,17 @@
|
|
1
1
|
import { DataConnectionAttributes } from 'containers/types/moleculeTypes';
|
2
|
+
import { InputFieldTypes } from 'fieldsConfiguration';
|
2
3
|
import { Dispatch, SetStateAction } from 'react';
|
3
4
|
import { AnyObject } from 'typescript';
|
4
5
|
declare type UseSetFormDataProps<DefaultValueType> = Partial<{
|
5
6
|
defaultValue: DefaultValueType;
|
6
7
|
dataModelField: DataConnectionAttributes;
|
7
8
|
setFormData: Dispatch<SetStateAction<AnyObject>>;
|
9
|
+
inputType: InputFieldTypes;
|
8
10
|
}>;
|
9
|
-
export declare const useSetFormData: <DefaultValueType>({ setFormData, defaultValue, dataModelField, }: Partial<{
|
11
|
+
export declare const useSetFormData: <DefaultValueType>({ setFormData, defaultValue, dataModelField, inputType, }: Partial<{
|
10
12
|
defaultValue: DefaultValueType;
|
11
13
|
dataModelField: DataConnectionAttributes;
|
12
14
|
setFormData: Dispatch<SetStateAction<AnyObject>>;
|
15
|
+
inputType: InputFieldTypes;
|
13
16
|
}>) => void;
|
14
17
|
export {};
|
@@ -1,11 +1,20 @@
|
|
1
|
-
/// <reference types="react" />
|
2
1
|
import { ContainerComponentProps, Molecule } from 'containers';
|
2
|
+
import { InputFieldTypes } from 'fieldsConfiguration';
|
3
3
|
import { PasswordRuleValidation } from 'molecules/PasswordSetup/PasswordSetup';
|
4
|
+
import { Dispatch, SetStateAction } from 'react';
|
4
5
|
import { AnyObject } from 'typescript';
|
5
6
|
import { GroupedStepItemsByStepContainer } from './utils';
|
6
7
|
export declare type OrganismContextType = {
|
7
8
|
items: (ContainerComponentProps | Molecule)[];
|
8
9
|
groupStepItemsByStepContainer: () => GroupedStepItemsByStepContainer;
|
10
|
+
dateFields: {
|
11
|
+
id: string;
|
12
|
+
dateType: InputFieldTypes;
|
13
|
+
}[];
|
14
|
+
setDateFields: Dispatch<SetStateAction<{
|
15
|
+
id: string;
|
16
|
+
dateType: InputFieldTypes;
|
17
|
+
}[]>>;
|
9
18
|
formId?: string;
|
10
19
|
submitHandler?: (data: {
|
11
20
|
formId: string;
|
@@ -1,8 +1,8 @@
|
|
1
1
|
/// <reference types="react" />
|
2
|
-
import { ControllerProps } from 'react-hook-form';
|
3
2
|
import { SelectOption } from 'atoms';
|
4
3
|
import { InputFieldProps, SelectFieldProps } from 'molecules';
|
5
|
-
|
4
|
+
import { ControllerProps } from 'react-hook-form';
|
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' | 'username' | '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;
|
@@ -9,6 +9,7 @@ export declare const monthDayYearDateValidation: RegExp;
|
|
9
9
|
export declare const dayMonthYearDateValidation: RegExp;
|
10
10
|
export declare const monthYearDateValidation: RegExp;
|
11
11
|
export declare const usZipCode: RegExp;
|
12
|
+
export declare const usernameValidation: RegExp;
|
12
13
|
export declare const getInputValidation: (type?: InputFieldTypes) => ValidationRule<RegExp> | undefined;
|
13
14
|
export declare const postCodeMask: RegExp[];
|
14
15
|
export declare const dayMonthYearDateMask: (string | RegExp)[];
|
package/dist/index.d.ts
CHANGED
@@ -13,17 +13,17 @@ import * as containers from 'containers';
|
|
13
13
|
import { FormStateType as FormStateType$1, ContainerComponentProps as ContainerComponentProps$1, Molecule as Molecule$1, StateConfigType as StateConfigType$1, ConditionConfig as ConditionConfig$1, MetadataStateConfig as MetadataStateConfig$1 } from 'containers';
|
14
14
|
import { FieldTypes as FieldTypes$1, UIFields as UIFields$1, InputFieldTypes as InputFieldTypes$1 } from 'fieldsConfiguration/types';
|
15
15
|
import { ThemeColors as ThemeColors$2, FontSizesTypes as FontSizesTypes$1, SizesTypes as SizesTypes$2, BreakpointSizesTypes as BreakpointSizesTypes$1 } from 'theme/types';
|
16
|
-
import * as react_hook_form from 'react-hook-form';
|
17
|
-
import { ControllerProps, DeepPartial, FieldValues, FormState, Control, UseFormReturn, ValidationMode } from 'react-hook-form';
|
18
16
|
import * as atoms from 'atoms';
|
19
17
|
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, InputProps as InputProps$1, SelectProps as SelectProps$1, RegularImageProps as RegularImageProps$1, TextButtonProps as TextButtonProps$1, TabTheme as TabTheme$1, RadioButtonsProps as RadioButtonsProps$1, RadioButtonInternalConfigProps as RadioButtonInternalConfigProps$1, HorizontalButtonsProps as HorizontalButtonsProps$1, IconProps as IconProps$1, LinkVariant as LinkVariant$1 } from 'atoms';
|
20
18
|
import { InputFieldProps as InputFieldProps$1, SelectFieldProps as SelectFieldProps$1, FieldSectionProps as FieldSectionProps$1, BaseButtonProps as BaseButtonProps$1, MenuItem as MenuItem$1, ConsentProps as ConsentProps$1, HeroImageProps as HeroImageProps$1, ColumnsProps as ColumnsProps$1, EmphasizedTextProps as EmphasizedTextProps$1, TabGroupProps as TabGroupProps$1, AvatarDropdownProps as AvatarDropdownProps$1, FeedContentHeaderProps as FeedContentHeaderProps$1, AlertProps as AlertProps$1, BottomNaVBarItemProps as BottomNaVBarItemProps$1, ButtonProps as ButtonProps$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, ConsentType as ConsentType$1, LinkProps as LinkProps$1, AvatarDropdownMenuConfigType as AvatarDropdownMenuConfigType$1 } from 'molecules';
|
19
|
+
import * as react_hook_form from 'react-hook-form';
|
20
|
+
import { ControllerProps, DeepPartial, FieldValues, FormState, Control, UseFormReturn, ValidationMode } from 'react-hook-form';
|
21
21
|
import { TooltipProps as TooltipProps$1 } from 'rc-tooltip/lib/Tooltip';
|
22
22
|
import { WithGoogleMapProps } from 'react-google-maps/lib/withGoogleMap';
|
23
23
|
import { WithScriptjsProps } from 'react-google-maps/lib/withScriptjs';
|
24
24
|
import { Descendant } from 'slate';
|
25
25
|
import { RadioGroup, DrawerProps as DrawerProps$1, ModalProps } from '@mui/material';
|
26
|
-
import { UIFields as UIFields$2, UIField as UIField$1 } from 'fieldsConfiguration';
|
26
|
+
import { UIFields as UIFields$2, InputFieldTypes as InputFieldTypes$2, UIField as UIField$1 } from 'fieldsConfiguration';
|
27
27
|
import { SetPasswordFields, MaxRuleValidation, MinRuleValidation } from 'organisms/SetPasswordForm/types';
|
28
28
|
import { ConsentProps as ConsentProps$2 } from 'molecules/Consent/Consent';
|
29
29
|
import { FooterAProps } from 'organisms/Footer/FooterA';
|
@@ -123,7 +123,7 @@ declare type AnyObject = Record<string, unknown>;
|
|
123
123
|
|
124
124
|
declare const getFieldPlaceholder: (type: FieldTypes$1, title?: string) => string;
|
125
125
|
|
126
|
-
declare type InputFieldTypes = 'phone_number' | 'text' | 'email' | 'password' | 'numerical' | 'month_year_date' | 'day_month_year_date' | 'month_day_year_date' | 'us_zip_code' | 'any';
|
126
|
+
declare type InputFieldTypes = 'phone_number' | 'text' | 'email' | 'password' | 'numerical' | 'month_year_date' | 'day_month_year_date' | 'month_day_year_date' | 'us_zip_code' | 'username' | 'any';
|
127
127
|
declare type FieldTypes = 'input' | 'select' | 'checkbox';
|
128
128
|
declare type UIField<T = string> = (UIInputField & UISelectField & UICheckboxField) & {
|
129
129
|
name: T;
|
@@ -923,6 +923,14 @@ declare type GroupedStepItemsByStepContainer = Map<string, StepItem[]>;
|
|
923
923
|
declare type OrganismContextType = {
|
924
924
|
items: (ContainerComponentProps$1 | Molecule$1)[];
|
925
925
|
groupStepItemsByStepContainer: () => GroupedStepItemsByStepContainer;
|
926
|
+
dateFields: {
|
927
|
+
id: string;
|
928
|
+
dateType: InputFieldTypes$2;
|
929
|
+
}[];
|
930
|
+
setDateFields: Dispatch<SetStateAction<{
|
931
|
+
id: string;
|
932
|
+
dateType: InputFieldTypes$2;
|
933
|
+
}[]>>;
|
926
934
|
formId?: string;
|
927
935
|
submitHandler?: (data: {
|
928
936
|
formId: string;
|