@homefile/components-v2 2.6.3 → 2.6.5
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/hooks/feedback/useContactForm.js +1 -1
- package/dist/interfaces/appBar/TourButton.interface.d.ts +1 -1
- package/dist/interfaces/feedback/ContactForm.interface.d.ts +2 -2
- 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/hooks/feedback/useContactForm.ts +3 -2
- package/src/interfaces/appBar/TourButton.interface.ts +1 -1
- package/src/interfaces/feedback/ContactForm.interface.ts +2 -2
|
@@ -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
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export type FeedbackFormProps = {
|
|
2
|
-
|
|
2
|
+
category: 'General Feedback' | 'Bug' | 'Account Related' | 'Feature Request';
|
|
3
3
|
message: string;
|
|
4
4
|
};
|
|
5
5
|
export interface ContactFormI {
|
|
6
|
-
categories
|
|
6
|
+
categories?: string[];
|
|
7
7
|
isLoading: boolean;
|
|
8
8
|
onClick: (form: FeedbackFormProps) => void;
|
|
9
9
|
}
|
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}
|
|
@@ -15,7 +15,8 @@ export const useContactForm = ({
|
|
|
15
15
|
const [formMessage, setFormMessage] = useState('')
|
|
16
16
|
const [errorMessage, setErrorMessage] = useState('')
|
|
17
17
|
|
|
18
|
-
const handleTypeChange = (form: string | SelectItemI) =>
|
|
18
|
+
const handleTypeChange = (form: string | SelectItemI) =>
|
|
19
|
+
setFormType(form as string)
|
|
19
20
|
|
|
20
21
|
const handleMessageChange = (event: ChangeEvent<{ value: string }>) => {
|
|
21
22
|
setFormMessage(event.target.value)
|
|
@@ -28,7 +29,7 @@ export const useContactForm = ({
|
|
|
28
29
|
return
|
|
29
30
|
}
|
|
30
31
|
onClick({
|
|
31
|
-
|
|
32
|
+
category: formType as FeedbackFormProps['category'],
|
|
32
33
|
message: formMessage,
|
|
33
34
|
})
|
|
34
35
|
setFormMessage('')
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export type FeedbackFormProps = {
|
|
2
|
-
|
|
2
|
+
category: 'General Feedback' | 'Bug' | 'Account Related' | 'Feature Request'
|
|
3
3
|
message: string
|
|
4
4
|
}
|
|
5
5
|
export interface ContactFormI {
|
|
6
|
-
categories
|
|
6
|
+
categories?: string[]
|
|
7
7
|
isLoading: boolean
|
|
8
8
|
onClick: (form: FeedbackFormProps) => void
|
|
9
9
|
}
|