@homefile/components-v2 2.6.6 → 2.6.8

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.
@@ -15,13 +15,13 @@ import { isEmptyField } from '../../../utils';
15
15
  import { useSignIn } from '../../../hooks';
16
16
  export const SignIn = ({ isLoading, handleForgotPassword, handleSignIn, handleSignUp, loginErrorMessage, values = { email: '', password: '' }, }) => {
17
17
  const { inputs, handleInputChange, isValidated, setIsValidated } = useSignIn(values);
18
- return (_jsxs(BasePageWrapper, { children: [_jsxs(Container, { size: "onboarding", boxShadow: "lg", children: [_jsx(Logo, {}), _jsx(PageTitle, { title: t('signin.title') }), _jsx(Box, { px: ['container.sm', 'container.md', 'container.lg'], mb: 6, children: _jsxs(Stack, { spacing: 8, children: [_jsxs(Stack, { spacing: "base", as: "form", children: [_jsx(TextInput, { autoCapitalize: "none", autoCorrect: "off", autoComplete: "username", errorMessage: t('forms.email') + ' ' + t('forms.required'), hasError: isValidated && isEmptyField(inputs.email), id: "email", placeholder: t('forms.email'), value: values.email || inputs.email, handleChange: (event) => {
18
+ return (_jsxs(BasePageWrapper, { children: [_jsxs(Container, { size: "onboarding", boxShadow: "lg", children: [_jsx(Logo, {}), _jsx(PageTitle, { title: t('signin.title') }), _jsx(Box, { px: ['container.sm', 'container.md', 'container.lg'], mb: 6, children: _jsxs(Stack, { spacing: 8, children: [_jsxs(Stack, { spacing: "base", as: "form", children: [Boolean(loginErrorMessage) && (_jsx(Text, { variant: "error", children: loginErrorMessage })), _jsx(TextInput, { autoCapitalize: "none", autoCorrect: "off", autoComplete: "username", errorMessage: t('forms.email') + ' ' + t('forms.required'), hasError: isValidated && isEmptyField(inputs.email), id: "email", placeholder: t('forms.email'), value: values.email || inputs.email, handleChange: (event) => {
19
19
  values.email = event.target.value;
20
20
  handleInputChange(event);
21
21
  } }), _jsx(PasswordInput, { autoComplete: "current-password", errorMessage: t('forms.password') + ' ' + t('forms.required'), hasError: isValidated && isEmptyField(inputs.password), id: "password", placeholder: t('forms.password'), value: values.password || inputs.password, handleChange: (event) => {
22
22
  values.password = event.target.value;
23
23
  handleInputChange(event);
24
- } }), Boolean(loginErrorMessage) && (_jsx(Text, { variant: "error", children: loginErrorMessage }))] }), _jsxs(Stack, { spacing: 4, children: [_jsx(Button, { isLoading: isLoading, spinner: _jsx(ButtonLoader, {}), onClick: () => __awaiter(void 0, void 0, void 0, function* () {
24
+ } })] }), _jsxs(Stack, { spacing: 4, children: [_jsx(Button, { isLoading: isLoading, spinner: _jsx(ButtonLoader, {}), onClick: () => __awaiter(void 0, void 0, void 0, function* () {
25
25
  setIsValidated(true);
26
26
  if (!isEmptyField(inputs.email) &&
27
27
  !isEmptyField(inputs.password)) {
@@ -25,6 +25,10 @@ export interface MyHomeCardI {
25
25
  loading: boolean;
26
26
  loadingId: string;
27
27
  }
28
+ export interface UserAssociationI {
29
+ accountTypes: string[];
30
+ user: string;
31
+ }
28
32
  export interface HomeI {
29
33
  accountType?: string;
30
34
  active?: boolean;
@@ -32,4 +36,5 @@ export interface HomeI {
32
36
  _id: string;
33
37
  image?: ImageI | null;
34
38
  name: string;
39
+ association?: UserAssociationI[];
35
40
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@homefile/components-v2",
3
- "version": "2.6.6",
3
+ "version": "2.6.8",
4
4
  "author": "Homefile",
5
5
  "license": "UNLICENSED",
6
6
  "typings": "dist/index.d.ts",
@@ -34,6 +34,9 @@ export const SignIn = ({
34
34
  <Box px={['container.sm', 'container.md', 'container.lg']} mb={6}>
35
35
  <Stack spacing={8}>
36
36
  <Stack spacing="base" as="form">
37
+ {Boolean(loginErrorMessage) && (
38
+ <Text variant="error">{loginErrorMessage}</Text>
39
+ )}
37
40
  <TextInput
38
41
  autoCapitalize="none"
39
42
  autoCorrect="off"
@@ -60,9 +63,6 @@ export const SignIn = ({
60
63
  handleInputChange(event)
61
64
  }}
62
65
  />
63
- {Boolean(loginErrorMessage) && (
64
- <Text variant="error">{loginErrorMessage}</Text>
65
- )}
66
66
  </Stack>
67
67
  <Stack spacing={4}>
68
68
  <Button
@@ -29,6 +29,11 @@ export interface MyHomeCardI {
29
29
  loadingId: string
30
30
  }
31
31
 
32
+ export interface UserAssociationI {
33
+ accountTypes: string[]
34
+ user: string
35
+ }
36
+
32
37
  export interface HomeI {
33
38
  accountType?: string
34
39
  active?: boolean
@@ -36,4 +41,5 @@ export interface HomeI {
36
41
  _id: string
37
42
  image?: ImageI | null
38
43
  name: string
44
+ association?: UserAssociationI[]
39
45
  }