@zealicsolutions/web-ui 1.0.2 → 1.0.4
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 +20 -20
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/src/index.d.ts +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/src/index.d.ts +1 -1
- package/dist/index.d.ts +14 -5
- package/package.json +1 -1
package/dist/esm/src/index.d.ts
CHANGED
package/dist/index.d.ts
CHANGED
@@ -5,7 +5,7 @@ import { PropsWithChildren, ReactNode, Dispatch, SetStateAction } from 'react';
|
|
5
5
|
import * as styled_components from 'styled-components';
|
6
6
|
import { DefaultTheme, CSSProperties } from 'styled-components';
|
7
7
|
import { IconNames as IconNames$1 } from 'atoms/Icon/Icon';
|
8
|
-
import { InputFieldTypes as InputFieldTypes$1 } from 'fieldsConfiguration/types';
|
8
|
+
import { InputFieldTypes as InputFieldTypes$1, FieldTypes as FieldTypes$1, UIFields as UIFields$1 } from 'fieldsConfiguration/types';
|
9
9
|
import { SizesTypes as SizesTypes$1, ThemeColors as ThemeColors$1 } from 'theme/types';
|
10
10
|
import { SizesTypes as SizesTypes$2, ThemeColors as ThemeColors$2 } from 'theme';
|
11
11
|
import { TooltipProps as TooltipProps$1 } from 'rc-tooltip/lib/Tooltip';
|
@@ -13,6 +13,8 @@ import { Control } from 'react-hook-form/dist/types';
|
|
13
13
|
import { SelectOption as SelectOption$1 } from 'atoms/Select/types';
|
14
14
|
import { DrawerProps as DrawerProps$1 } from '@mui/material';
|
15
15
|
import { SetPasswordFields, SetPasswordRuleValidation } from 'organisms/SetPasswordForm/types';
|
16
|
+
import { DeepPartial, FieldValues, FormState } from 'react-hook-form';
|
17
|
+
import { LoginFields as LoginFields$1 } from 'organisms/LoginForm/types';
|
16
18
|
|
17
19
|
declare type BaseButtonProps = {
|
18
20
|
onClick?: Callback;
|
@@ -248,7 +250,10 @@ declare type InputFieldProps = {
|
|
248
250
|
};
|
249
251
|
declare const InputField: ({ control, name, inputProps, styles, labelsProps, defaultValue, optional, required, }: InputFieldProps) => JSX.Element;
|
250
252
|
|
253
|
+
declare const getFieldPlaceholder: (type: FieldTypes$1, title?: string) => string;
|
254
|
+
|
251
255
|
declare type InputFieldTypes = 'number' | 'text' | 'email' | 'password';
|
256
|
+
declare type FieldTypes = 'input' | 'select' | 'date-picker' | 'checkbox' | 'switch';
|
252
257
|
declare type UIField<T = string> = (UIInputField | UISelectField | UICheckboxField) & {
|
253
258
|
name: T;
|
254
259
|
value?: string;
|
@@ -273,6 +278,13 @@ declare type UICheckboxField = {
|
|
273
278
|
};
|
274
279
|
declare type UIFields<T extends object> = UIField<keyof T>[];
|
275
280
|
|
281
|
+
declare const getInitialValuesFromFields: <T extends object>(fields: UIFields$1<T>) => DeepPartial<T>;
|
282
|
+
declare const isFormValid: <T extends FieldValues>(formState: FormState<T>) => boolean;
|
283
|
+
|
284
|
+
declare const acquisitionFormMockFields: UIFields$1<any>;
|
285
|
+
declare const setPasswordMockFields: UIFields$1<SetPasswordFields>;
|
286
|
+
declare const loginMockFields: UIFields$1<LoginFields$1>;
|
287
|
+
|
276
288
|
declare type FieldMapperProps<T extends object> = {
|
277
289
|
field: UIField<keyof T>;
|
278
290
|
control: Control<T>;
|
@@ -498,7 +510,4 @@ interface Helpers {
|
|
498
510
|
}
|
499
511
|
declare const useStep: (maxStep: number) => [number, Helpers];
|
500
512
|
|
501
|
-
|
502
|
-
declare const HomeBannerImage: string;
|
503
|
-
|
504
|
-
export { AcquisitionForm, AcquisitionFormProps, AppLogo, AuthMethod, AuthPage, Avatar, AvatarDropdown, AvatarDropdownProps, AvatarProps, Banner, BannerProps, BaseButtonProps, Button, ButtonProps, CheckBoxProps, Checkbox, CheckboxField, CheckboxFieldProps, CustomValidation, CustomValidationProps, CustomValidationRule, DefaultTemplate, DefaultTemplateProps, Divider, DividerProps, Drawer, FieldLabels, FieldLabelsProps, FieldMapper, FieldMapperProps, FieldRuleLabelTypes, ForgotPasswordForm, ForgotPasswordFormProps, Header, HeaderProps, HomeBannerImage, HorizontalPadding, HorizontalPaddingProps, Icon, IconNames, IconProps, Image, ImageProps, InfoBox, InfoBoxProps, Input, InputField, InputFieldProps, InputIconProps, InputProps, LinkButton, LinkButtonProps, LoginForm, LoginFormProps, MenuItem, MenuItems, MenuItemsProps, RegistrationPageProps, Select, SelectField, SelectFieldProps, SelectableCardGroup, SelectableCardGroupProps, SetPasswordForm, SetPasswordFormProps, SizesTypes, Spacer, SpacerProps, Spinner, StyleWrapper, TabGroup, TabGroupProps, TextTypes, TextWrapper, TextWrapperProps, ThemeColors, ThemeColorsType, ThemeSizesType, ThemeTextType, Tooltip, TooltipProps, TouchableOpacity, TouchableOpacityProps, TwoFactorAuth, TwoFactorAuthProps, ValidationTag, ValidationTagProps, ValidationTagStatus, VerticalPadding, ZealThemeProvider, defaultTheme, toast, toastStyles, useStep };
|
513
|
+
export { AcquisitionForm, AcquisitionFormProps, AuthMethod, AuthPage, Avatar, AvatarDropdown, AvatarDropdownProps, AvatarProps, Banner, BannerProps, BaseButtonProps, Button, ButtonProps, CheckBoxProps, Checkbox, CheckboxField, CheckboxFieldProps, CustomValidation, CustomValidationProps, CustomValidationRule, DefaultTemplate, DefaultTemplateProps, Divider, DividerProps, Drawer, FieldLabels, FieldLabelsProps, FieldMapper, FieldMapperProps, FieldRuleLabelTypes, FieldTypes, ForgotPasswordForm, ForgotPasswordFormProps, Header, HeaderProps, HorizontalPadding, HorizontalPaddingProps, Icon, IconNames, IconProps, Image, ImageProps, InfoBox, InfoBoxProps, Input, InputField, InputFieldProps, InputFieldTypes, InputIconProps, InputProps, LinkButton, LinkButtonProps, LoginForm, LoginFormProps, MenuItem, MenuItems, MenuItemsProps, RegistrationPageProps, Select, SelectField, SelectFieldProps, SelectableCardGroup, SelectableCardGroupProps, SetPasswordForm, SetPasswordFormProps, SizesTypes, Spacer, SpacerProps, Spinner, StyleWrapper, TabGroup, TabGroupProps, TextTypes, TextWrapper, TextWrapperProps, ThemeColors, ThemeColorsType, ThemeSizesType, ThemeTextType, Tooltip, TooltipProps, TouchableOpacity, TouchableOpacityProps, TwoFactorAuth, TwoFactorAuthProps, UICheckboxField, UIField, UIFields, UIInputField, UISelectField, ValidationTag, ValidationTagProps, ValidationTagStatus, VerticalPadding, ZealThemeProvider, acquisitionFormMockFields, defaultTheme, getFieldPlaceholder, getInitialValuesFromFields, isFormValid, loginMockFields, setPasswordMockFields, toast, toastStyles, useStep };
|