@homefile/components-v2 2.6.2 → 2.6.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/components/appBar/TourButton.js +2 -1
- package/dist/components/help/HelpContent.js +2 -1
- package/dist/components/homeBoard/HomeBoard.js +1 -1
- package/dist/components/onboarding/pages/SignUp.js +2 -2
- package/dist/interfaces/appBar/TourButton.interface.d.ts +1 -1
- package/dist/interfaces/feedback/ContactForm.interface.d.ts +1 -1
- package/dist/interfaces/pages/SignUp.interface.d.ts +1 -1
- package/package.json +1 -1
- package/src/components/appBar/TourButton.tsx +2 -1
- package/src/components/help/HelpContent.tsx +3 -1
- package/src/components/homeBoard/HomeBoard.tsx +1 -1
- package/src/components/onboarding/pages/SignUp.tsx +3 -3
- package/src/interfaces/appBar/TourButton.interface.ts +1 -1
- package/src/interfaces/feedback/ContactForm.interface.ts +1 -1
- package/src/interfaces/pages/SignUp.interface.ts +1 -1
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { t } from 'i18next';
|
|
2
3
|
import { Box, Flex, Image } from '@chakra-ui/react';
|
|
3
4
|
import { Flag } from '../../assets/images';
|
|
4
5
|
export const TourButton = ({ label, onClick }) => {
|
|
5
|
-
return (_jsx(Box, { as: "button", boxShadow: "none", borderRadius: "full", bg: "lightGreen.5", fontFamily: "secondary", transition: "all 0.2s ease-in-out", _hover: { bg: 'lightGreen.4' }, onClick: onClick, flexShrink: 0, overflow: "hidden", children: _jsxs(Flex, { align: "center", pr: "base", py: "1", children: [_jsx(Image, { src: Flag, w: "40px", h: "auto", alt: "tour", position: "relative", bottom: "-4px" }), label] }) }));
|
|
6
|
+
return (_jsx(Box, { as: "button", boxShadow: "none", borderRadius: "full", bg: "lightGreen.5", fontFamily: "secondary", transition: "all 0.2s ease-in-out", _hover: { bg: 'lightGreen.4' }, onClick: onClick, flexShrink: 0, overflow: "hidden", children: _jsxs(Flex, { align: "center", pr: "base", py: "1", children: [_jsx(Image, { src: Flag, w: "40px", h: "auto", alt: "tour", position: "relative", bottom: "-4px" }), label !== null && label !== void 0 ? label : t('help.buttonTour')] }) }));
|
|
6
7
|
};
|
|
@@ -6,10 +6,11 @@ import { useHelpContent } from '../../hooks';
|
|
|
6
6
|
export const HelpContent = ({ categories, formSent, onClose, onFeedback, isLoading, tutorials, }) => {
|
|
7
7
|
var _a;
|
|
8
8
|
const { handlePlay, handleSearchChange, isModalOpen, onModalClose, search, filteredTutorials, videoToPlay, } = useHelpContent(tutorials);
|
|
9
|
+
const categoriesDefault = t('feedback.categories').split(',');
|
|
9
10
|
const tabs = [
|
|
10
11
|
{
|
|
11
12
|
label: t('help.tabs.tab1'),
|
|
12
|
-
component: (_jsx(HelpFeedback, { categories: categories, formSent: formSent, isLoading: isLoading, onClick: onFeedback })),
|
|
13
|
+
component: (_jsx(HelpFeedback, { categories: categories !== null && categories !== void 0 ? categories : categoriesDefault, formSent: formSent, isLoading: isLoading, onClick: onFeedback })),
|
|
13
14
|
},
|
|
14
15
|
{
|
|
15
16
|
label: t('help.tabs.tab2'),
|
|
@@ -65,5 +65,5 @@ export const AppBarComponent = ({ setActiveTour = (value) => { }, onClick = (pan
|
|
|
65
65
|
};
|
|
66
66
|
const { windowDimensions: { width }, } = useWindowDimensions();
|
|
67
67
|
const isMobile = width <= 768;
|
|
68
|
-
return (_jsxs(AppBar, { onLogoClick: () => null, user: userMock, children: [!isMobile && (_jsxs(_Fragment, { children: [_jsx(TourButton, { onClick: handleTour
|
|
68
|
+
return (_jsxs(AppBar, { onLogoClick: () => null, user: userMock, children: [!isMobile && (_jsxs(_Fragment, { children: [_jsx(TourButton, { onClick: handleTour }), _jsx(BarDivider, {})] })), _jsx(NotificationsReminder, { onClick: () => onClick('Notifications'), total: 2 }), _jsx(BarDivider, {}), _jsx(PeopleConnected, { onClick: () => null, total: 12 }), _jsx(BarDivider, {}), _jsx(ContactList, { onClick: () => null, total: 2 }), _jsx(BarDivider, {}), _jsx(TutorialsButton, { onClick: () => null }), !isMobile && (_jsxs(_Fragment, { children: [_jsx(BarDivider, {}), _jsxs(Flex, { align: "center", gap: "1", children: [_jsx(StorageUsed, { totalUsed: 2, totalStorage: 10, state: "trial", onClick: () => null }), _jsx(Trash, { onClick: () => null, total: 2 })] })] }))] }));
|
|
69
69
|
};
|
|
@@ -10,7 +10,7 @@ export const SignUp = ({ isLoading, handleCreateAccount, handleSignIn, showPromo
|
|
|
10
10
|
lastName: '',
|
|
11
11
|
confirmPassword: '',
|
|
12
12
|
password: '',
|
|
13
|
-
|
|
13
|
+
partnerCode: '',
|
|
14
14
|
}, }) => {
|
|
15
15
|
var _a, _b, _c;
|
|
16
16
|
const { inputs, handleInputChange, handleSubmit, isValidated, passwordErrorMessage, } = useSignUp({
|
|
@@ -18,7 +18,7 @@ export const SignUp = ({ isLoading, handleCreateAccount, handleSignIn, showPromo
|
|
|
18
18
|
values,
|
|
19
19
|
});
|
|
20
20
|
return (_jsxs(BasePageWrapper, { children: [_jsxs(Container, { size: "onboarding", boxShadow: "lg", children: [_jsx(Logo, {}), _jsx(PageTitle, { title: t('signup.title') }), _jsx(Box, { px: ['container.sm', 'container.md', 'container.lg'], mb: 6, children: _jsxs(Stack, { spacing: "base", as: "form", children: [_jsx(TextInput, { errorMessage: t('forms.firstName') + ' ' + t('forms.required'), hasError: isValidated && isEmptyField(inputs.firstName), id: "firstName", placeholder: t('forms.firstName'), value: inputs.firstName, handleChange: handleInputChange, autoComplete: "given-name" }), _jsx(TextInput, { errorMessage: t('forms.lastName') + ' ' + t('forms.required'), hasError: isValidated && isEmptyField(inputs.lastName), id: "lastName", placeholder: t('forms.lastName'), value: inputs.lastName, handleChange: handleInputChange, autoComplete: "family-name" }), _jsx(TextInput, { autoCapitalize: "none", autoCorrect: "off", errorMessage: t('forms.email') + ' ' + t('forms.required'), hasError: isValidated &&
|
|
21
|
-
(isEmptyField(inputs.email) || !isValidEmail(inputs.email)), id: "email", placeholder: t('forms.email'), value: inputs.email, handleChange: handleInputChange, autoComplete: "email" }), showPromoCode && (_jsx(TextInput, { autoCapitalize: "none", autoCorrect: "off", id: "
|
|
21
|
+
(isEmptyField(inputs.email) || !isValidEmail(inputs.email)), id: "email", placeholder: t('forms.email'), value: inputs.email, handleChange: handleInputChange, autoComplete: "email" }), showPromoCode && (_jsx(TextInput, { autoCapitalize: "none", autoCorrect: "off", id: "partnerCode", placeholder: t('forms.promoCode'), value: (_a = inputs.partnerCode) !== null && _a !== void 0 ? _a : '', handleChange: handleInputChange, autoComplete: "off" })), _jsx(Text, { textAlign: "center", variant: "caption", children: t('signup.subtitle') }), _jsx(PasswordInput, { errorMessage: passwordErrorMessage(values.password), hasError: isValidated &&
|
|
22
22
|
(!isValidPassword(inputs.password) ||
|
|
23
23
|
!passwordMatch(inputs.password, inputs.confirmPassword)), id: "password", placeholder: t('forms.password'), value: (_b = inputs.password) !== null && _b !== void 0 ? _b : '', handleChange: (event) => handleInputChange(event), autoComplete: "new-password" }), _jsx(PasswordInput, { errorMessage: passwordErrorMessage(inputs.confirmPassword), hasError: isValidated &&
|
|
24
24
|
(!isValidPassword(inputs.confirmPassword) ||
|
package/package.json
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { t } from 'i18next'
|
|
1
2
|
import { Box, Flex, Image } from '@chakra-ui/react'
|
|
2
3
|
import { TourButtonI } from '@/interfaces'
|
|
3
4
|
import { Flag } from '@/assets/images'
|
|
@@ -25,7 +26,7 @@ export const TourButton = ({ label, onClick }: TourButtonI) => {
|
|
|
25
26
|
position="relative"
|
|
26
27
|
bottom="-4px"
|
|
27
28
|
/>
|
|
28
|
-
{label}
|
|
29
|
+
{label ?? t('help.buttonTour')}
|
|
29
30
|
</Flex>
|
|
30
31
|
</Box>
|
|
31
32
|
)
|
|
@@ -35,12 +35,14 @@ export const HelpContent = ({
|
|
|
35
35
|
videoToPlay,
|
|
36
36
|
} = useHelpContent(tutorials)
|
|
37
37
|
|
|
38
|
+
const categoriesDefault = t('feedback.categories').split(',')
|
|
39
|
+
|
|
38
40
|
const tabs = [
|
|
39
41
|
{
|
|
40
42
|
label: t('help.tabs.tab1'),
|
|
41
43
|
component: (
|
|
42
44
|
<HelpFeedback
|
|
43
|
-
categories={categories}
|
|
45
|
+
categories={categories ?? categoriesDefault}
|
|
44
46
|
formSent={formSent}
|
|
45
47
|
isLoading={isLoading}
|
|
46
48
|
onClick={onFeedback}
|
|
@@ -31,7 +31,7 @@ export const SignUp = ({
|
|
|
31
31
|
lastName: '',
|
|
32
32
|
confirmPassword: '',
|
|
33
33
|
password: '',
|
|
34
|
-
|
|
34
|
+
partnerCode: '',
|
|
35
35
|
},
|
|
36
36
|
}: SignUpI) => {
|
|
37
37
|
const {
|
|
@@ -88,9 +88,9 @@ export const SignUp = ({
|
|
|
88
88
|
<TextInput
|
|
89
89
|
autoCapitalize="none"
|
|
90
90
|
autoCorrect="off"
|
|
91
|
-
id="
|
|
91
|
+
id="partnerCode"
|
|
92
92
|
placeholder={t('forms.promoCode')}
|
|
93
|
-
value={inputs.
|
|
93
|
+
value={inputs.partnerCode ?? ''}
|
|
94
94
|
handleChange={handleInputChange}
|
|
95
95
|
autoComplete="off"
|
|
96
96
|
/>
|