@homefile/components-v2 2.2.4 → 2.3.0

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.
Files changed (240) hide show
  1. package/dist/assets/images/index.d.ts +2 -1
  2. package/dist/assets/images/index.js +2 -1
  3. package/dist/assets/images/index.ts +2 -0
  4. package/dist/assets/images/speaker.svg +17 -0
  5. package/dist/assets/locales/en/index.json +35 -7
  6. package/dist/components/appBar/ContactList.d.ts +2 -2
  7. package/dist/components/appBar/NotificationsReminder.d.ts +2 -0
  8. package/dist/components/appBar/NotificationsReminder.js +24 -0
  9. package/dist/components/appBar/PeopleConnected.d.ts +2 -2
  10. package/dist/components/appBar/Trash.d.ts +2 -2
  11. package/dist/components/appBar/index.d.ts +1 -0
  12. package/dist/components/appBar/index.js +1 -0
  13. package/dist/components/badge/NumberBadge.d.ts +1 -1
  14. package/dist/components/badge/NumberBadge.js +14 -2
  15. package/dist/components/forms/dynamicForm/DynamicForm.d.ts +1 -1
  16. package/dist/components/forms/dynamicForm/DynamicForm.js +2 -2
  17. package/dist/components/forms/dynamicForm/fields/FileField.d.ts +1 -1
  18. package/dist/components/forms/dynamicForm/fields/FileField.js +9 -5
  19. package/dist/components/forms/readOnly/ReadOnlyDynamicForm.d.ts +2 -2
  20. package/dist/components/forms/readOnly/ReadOnlyDynamicForm.js +5 -2
  21. package/dist/components/forms/readOnly/fields/homeItem/ReadOnlyAppliances.d.ts +2 -0
  22. package/dist/components/forms/readOnly/fields/homeItem/ReadOnlyAppliances.js +23 -0
  23. package/dist/components/forms/readOnly/fields/homeItem/ReadOnlyAppliances.tsx +74 -0
  24. package/dist/components/forms/readOnly/fields/homeItem/ReadOnlyHomeItemImages.d.ts +2 -0
  25. package/dist/components/forms/readOnly/fields/homeItem/ReadOnlyHomeItemImages.js +10 -0
  26. package/dist/components/forms/readOnly/fields/homeItem/ReadOnlyHomeItemImages.tsx +28 -0
  27. package/dist/components/forms/readOnly/fields/homeItem/ReadOnlyHomeItemRating.d.ts +2 -0
  28. package/dist/components/forms/readOnly/fields/homeItem/ReadOnlyHomeItemRating.js +14 -0
  29. package/dist/components/forms/readOnly/fields/homeItem/ReadOnlyHomeItemRating.tsx +22 -0
  30. package/dist/components/forms/readOnly/fields/homeItem/ReadOnlyHomeItemText.d.ts +2 -0
  31. package/dist/components/forms/readOnly/fields/homeItem/ReadOnlyHomeItemText.js +10 -0
  32. package/dist/components/forms/readOnly/fields/homeItem/ReadOnlyHomeItemText.tsx +22 -0
  33. package/dist/components/forms/readOnly/fields/homeItem/index.d.ts +4 -0
  34. package/dist/components/forms/readOnly/fields/homeItem/index.js +4 -0
  35. package/dist/components/forms/readOnly/fields/homeItem/index.ts +4 -0
  36. package/dist/components/forms/readOnly/fields/index.d.ts +1 -0
  37. package/dist/components/forms/readOnly/fields/index.js +1 -0
  38. package/dist/components/headers/TabsHeader.d.ts +1 -1
  39. package/dist/components/headers/TabsHeader.js +9 -6
  40. package/dist/components/homeAssistant/HomeAssistant.d.ts +1 -1
  41. package/dist/components/homeAssistant/HomeAssistant.js +3 -2
  42. package/dist/components/homeAssistant/HomeAssistantWrapper.d.ts +2 -1
  43. package/dist/components/homeAssistant/HomeAssistantWrapper.js +4 -4
  44. package/dist/components/homeAssistant/HomeMonitor.d.ts +3 -1
  45. package/dist/components/homeAssistant/HomeMonitor.js +2 -2
  46. package/dist/components/homeAssistant/monitorAlerts/Notifications.js +2 -2
  47. package/dist/components/homeBoard/HomeBoard.d.ts +2 -1
  48. package/dist/components/homeBoard/HomeBoard.js +8 -7
  49. package/dist/components/homeItems/ViewingHomeItemPanel.d.ts +2 -0
  50. package/dist/components/homeItems/ViewingHomeItemPanel.js +24 -0
  51. package/dist/components/homeItems/index.d.ts +1 -0
  52. package/dist/components/homeItems/index.js +1 -0
  53. package/dist/components/inboxTile/InboxCard.d.ts +2 -0
  54. package/dist/components/inboxTile/InboxCard.js +10 -0
  55. package/dist/components/inboxTile/InboxForwardBanner.d.ts +1 -0
  56. package/dist/components/inboxTile/InboxForwardBanner.js +7 -0
  57. package/dist/components/inboxTile/InboxTile.d.ts +2 -0
  58. package/dist/components/inboxTile/InboxTile.js +9 -0
  59. package/dist/components/{partner/adminTiles/inboxTile → inboxTile}/index.d.ts +1 -0
  60. package/dist/components/{partner/adminTiles/inboxTile → inboxTile}/index.js +1 -0
  61. package/dist/components/index.d.ts +3 -0
  62. package/dist/components/index.js +3 -0
  63. package/dist/components/notifications/NotificationCard.d.ts +2 -0
  64. package/dist/components/notifications/NotificationCard.js +64 -0
  65. package/dist/components/notifications/NotificationsPanel.d.ts +2 -0
  66. package/dist/components/notifications/NotificationsPanel.js +14 -0
  67. package/dist/components/notifications/index.d.ts +2 -0
  68. package/dist/components/notifications/index.js +2 -0
  69. package/dist/components/partner/adminTiles/index.d.ts +0 -1
  70. package/dist/components/partner/adminTiles/index.js +0 -1
  71. package/dist/components/tour/Bubble.js +1 -1
  72. package/dist/components/tour/HomeBoardTour.js +16 -16
  73. package/dist/components/valueMonitor/ValueCard.js +1 -1
  74. package/dist/hooks/display/useMediaPreview.js +4 -7
  75. package/dist/hooks/folderPanel/useFilesUploader.d.ts +3 -1
  76. package/dist/hooks/folderPanel/useFilesUploader.js +12 -2
  77. package/dist/hooks/homeBoard/useHomeBoard.d.ts +1 -0
  78. package/dist/hooks/homeBoard/useHomeBoard.js +5 -0
  79. package/dist/hooks/index.d.ts +1 -0
  80. package/dist/hooks/index.js +1 -0
  81. package/dist/hooks/notifications/index.d.ts +1 -0
  82. package/dist/hooks/notifications/index.js +1 -0
  83. package/dist/hooks/notifications/useNotificationsPanel.d.ts +7 -0
  84. package/dist/hooks/notifications/useNotificationsPanel.js +32 -0
  85. package/dist/index.d.ts +1 -1
  86. package/dist/index.js +1 -1
  87. package/dist/interfaces/appBar/AppBar.interface.d.ts +6 -2
  88. package/dist/interfaces/appBar/index.d.ts +0 -1
  89. package/dist/interfaces/appBar/index.js +0 -1
  90. package/dist/interfaces/badge/NumberBadge.interface.d.ts +2 -3
  91. package/dist/interfaces/forms/dynamicForm/DynamicForm.interface.d.ts +7 -1
  92. package/dist/interfaces/forms/dynamicForm/fields/FileField.interface.d.ts +2 -0
  93. package/dist/interfaces/forms/readOnly/homeItem/ReadOnlyAppliances.interface.d.ts +4 -0
  94. package/dist/interfaces/forms/readOnly/homeItem/index.d.ts +1 -0
  95. package/dist/interfaces/forms/readOnly/homeItem/index.js +1 -0
  96. package/dist/interfaces/forms/readOnly/index.d.ts +1 -0
  97. package/dist/interfaces/forms/readOnly/index.js +1 -0
  98. package/dist/interfaces/headers/TabsHeader.interface.d.ts +1 -0
  99. package/dist/interfaces/homeAssistant/HomeAssistantSteps.interface.d.ts +1 -0
  100. package/dist/interfaces/homeItems/ViewingHomeItemPanel.interface.d.ts +6 -0
  101. package/dist/interfaces/homeItems/index.d.ts +1 -0
  102. package/dist/interfaces/homeItems/index.js +1 -0
  103. package/dist/interfaces/inboxTile/InboxCard.interface.d.ts +10 -0
  104. package/dist/interfaces/inboxTile/InboxTile.interface.d.ts +8 -0
  105. package/dist/interfaces/inboxTile/InboxTile.interface.js +1 -0
  106. package/dist/interfaces/index.d.ts +3 -0
  107. package/dist/interfaces/index.js +3 -0
  108. package/dist/interfaces/notifications/NotificationsPanel.interface.d.ts +16 -0
  109. package/dist/interfaces/notifications/NotificationsPanel.interface.js +1 -0
  110. package/dist/interfaces/notifications/index.d.ts +1 -0
  111. package/dist/interfaces/notifications/index.js +1 -0
  112. package/dist/interfaces/partner/adminTiles/index.d.ts +0 -1
  113. package/dist/interfaces/partner/adminTiles/index.js +0 -1
  114. package/dist/interfaces/tour/Step.interface.d.ts +2 -0
  115. package/dist/interfaces/valueMonitor/ValueCard.interface.d.ts +1 -1
  116. package/dist/mocks/forms/dynamicForm.mock.d.ts +1 -0
  117. package/dist/mocks/forms/dynamicForm.mock.js +72 -12
  118. package/dist/mocks/index.d.ts +1 -0
  119. package/dist/mocks/index.js +1 -0
  120. package/dist/mocks/notifications/index.d.ts +1 -0
  121. package/dist/mocks/notifications/index.js +1 -0
  122. package/dist/mocks/notifications/notifications.mock.d.ts +2 -0
  123. package/dist/mocks/notifications/notifications.mock.js +35 -0
  124. package/dist/stories/appBar/ContactList.stories.d.ts +3 -3
  125. package/dist/stories/appBar/PeopleConnected.stories.d.ts +3 -3
  126. package/dist/stories/appBar/Trash.stories.d.ts +3 -3
  127. package/dist/stories/assets/Illustrations.stories.js +2 -2
  128. package/dist/stories/forms/dynamicForm/DynamicForm.stories.js +13 -0
  129. package/dist/stories/homeItems/ViewingHomeItem.stories.d.ts +5 -0
  130. package/dist/stories/homeItems/ViewingHomeItem.stories.js +16 -0
  131. package/dist/stories/{partner/adminTiles/InboxTile.stories.d.ts → inboxTile/inboxTile.stories.d.ts} +1 -1
  132. package/dist/stories/inboxTile/inboxTile.stories.js +29 -0
  133. package/dist/stories/notifications/NotificationsPanel.stories.d.ts +5 -0
  134. package/dist/stories/notifications/NotificationsPanel.stories.js +17 -0
  135. package/dist/stories/valueMonitor/ValueMonitor.stories.d.ts +0 -1
  136. package/dist/stories/valueMonitor/ValueMonitor.stories.js +1 -1
  137. package/dist/theme/colors.d.ts +1 -0
  138. package/dist/theme/colors.js +1 -0
  139. package/package.json +1 -1
  140. package/src/assets/images/index.ts +2 -0
  141. package/src/assets/images/speaker.svg +17 -0
  142. package/src/assets/locales/en/index.json +35 -7
  143. package/src/components/appBar/ContactList.tsx +2 -2
  144. package/src/components/appBar/NotificationsReminder.tsx +49 -0
  145. package/src/components/appBar/PeopleConnected.tsx +2 -2
  146. package/src/components/appBar/Trash.tsx +2 -2
  147. package/src/components/appBar/index.ts +2 -1
  148. package/src/components/badge/NumberBadge.tsx +2 -0
  149. package/src/components/customToast/CustomToast.tsx +1 -1
  150. package/src/components/forms/dynamicForm/DynamicForm.tsx +4 -0
  151. package/src/components/forms/dynamicForm/fields/FileField.tsx +52 -6
  152. package/src/components/forms/readOnly/ReadOnlyDynamicForm.tsx +7 -3
  153. package/src/components/forms/readOnly/fields/homeItem/ReadOnlyAppliances.tsx +74 -0
  154. package/src/components/forms/readOnly/fields/homeItem/ReadOnlyHomeItemImages.tsx +28 -0
  155. package/src/components/forms/readOnly/fields/homeItem/ReadOnlyHomeItemRating.tsx +22 -0
  156. package/src/components/forms/readOnly/fields/homeItem/ReadOnlyHomeItemText.tsx +22 -0
  157. package/src/components/forms/readOnly/fields/homeItem/index.ts +4 -0
  158. package/src/components/forms/readOnly/fields/index.ts +1 -0
  159. package/src/components/headers/TabsHeader.tsx +36 -23
  160. package/src/components/homeAssistant/HomeAssistant.tsx +12 -7
  161. package/src/components/homeAssistant/HomeAssistantWrapper.tsx +5 -3
  162. package/src/components/homeAssistant/HomeMonitor.tsx +2 -2
  163. package/src/components/homeAssistant/monitorAlerts/Notifications.tsx +3 -3
  164. package/src/components/homeBoard/HomeBoard.tsx +30 -3
  165. package/src/components/homeItems/ViewingHomeItemPanel.tsx +44 -0
  166. package/src/components/homeItems/index.ts +1 -0
  167. package/src/components/inboxTile/InboxCard.tsx +38 -0
  168. package/src/components/inboxTile/InboxForwardBanner.tsx +26 -0
  169. package/src/components/inboxTile/InboxTile.tsx +36 -0
  170. package/src/components/{partner/adminTiles/inboxTile → inboxTile}/index.ts +1 -0
  171. package/src/components/index.ts +3 -0
  172. package/src/components/notifications/NotificationCard.tsx +162 -0
  173. package/src/components/notifications/NotificationsPanel.tsx +52 -0
  174. package/src/components/notifications/index.ts +2 -0
  175. package/src/components/partner/adminTiles/index.ts +0 -1
  176. package/src/components/tour/Bubble.tsx +2 -0
  177. package/src/components/tour/HomeBoardTour.tsx +4 -7
  178. package/src/components/valueMonitor/ValueCard.tsx +17 -13
  179. package/src/hooks/display/useMediaPreview.ts +3 -5
  180. package/src/hooks/folderPanel/useFilesUploader.ts +16 -3
  181. package/src/hooks/homeBoard/useHomeBoard.ts +6 -0
  182. package/src/hooks/index.ts +1 -0
  183. package/src/hooks/notifications/index.ts +1 -0
  184. package/src/hooks/notifications/useNotificationsPanel.ts +46 -0
  185. package/src/index.ts +4 -0
  186. package/src/interfaces/appBar/AppBar.interface.ts +7 -2
  187. package/src/interfaces/appBar/index.ts +1 -2
  188. package/src/interfaces/badge/NumberBadge.interface.ts +3 -3
  189. package/src/interfaces/forms/dynamicForm/DynamicForm.interface.ts +9 -0
  190. package/src/interfaces/forms/dynamicForm/fields/FileField.interface.ts +2 -0
  191. package/src/interfaces/forms/readOnly/homeItem/ReadOnlyAppliances.interface.ts +5 -0
  192. package/src/interfaces/forms/readOnly/homeItem/index.ts +1 -0
  193. package/src/interfaces/forms/readOnly/index.ts +1 -0
  194. package/src/interfaces/headers/TabsHeader.interface.ts +4 -3
  195. package/src/interfaces/homeAssistant/HomeAssistantSteps.interface.ts +1 -0
  196. package/src/interfaces/homeItems/ViewingHomeItemPanel.interface.ts +7 -0
  197. package/src/interfaces/homeItems/index.ts +1 -0
  198. package/src/interfaces/inboxTile/InboxCard.interface.ts +11 -0
  199. package/src/interfaces/inboxTile/InboxTile.interface.ts +9 -0
  200. package/src/interfaces/index.ts +3 -0
  201. package/src/interfaces/notifications/NotificationsPanel.interface.ts +24 -0
  202. package/src/interfaces/notifications/index.ts +1 -0
  203. package/src/interfaces/partner/adminTiles/index.ts +0 -1
  204. package/src/interfaces/tour/Step.interface.ts +2 -0
  205. package/src/interfaces/valueMonitor/ValueCard.interface.ts +1 -1
  206. package/src/mocks/forms/dynamicForm.mock.ts +74 -12
  207. package/src/mocks/index.ts +1 -0
  208. package/src/mocks/notifications/index.ts +1 -0
  209. package/src/mocks/notifications/notifications.mock.ts +37 -0
  210. package/src/stories/appBar/AppBar.stories.tsx +0 -1
  211. package/src/stories/appBar/ContactList.stories.tsx +4 -5
  212. package/src/stories/appBar/PeopleConnected.stories.tsx +4 -5
  213. package/src/stories/appBar/Trash.stories.tsx +4 -6
  214. package/src/stories/assets/Illustrations.stories.tsx +2 -0
  215. package/src/stories/forms/dynamicForm/DynamicForm.stories.tsx +13 -0
  216. package/src/stories/homeItems/ViewingHomeItem.stories.tsx +25 -0
  217. package/src/stories/inboxTile/inboxTile.stories.tsx +36 -0
  218. package/src/stories/notifications/NotificationsPanel.stories.tsx +26 -0
  219. package/src/stories/valueMonitor/ValueMonitor.stories.tsx +1 -1
  220. package/src/theme/colors.ts +1 -0
  221. package/dist/components/partner/adminTiles/inboxTile/InboxCard.d.ts +0 -2
  222. package/dist/components/partner/adminTiles/inboxTile/InboxCard.js +0 -8
  223. package/dist/components/partner/adminTiles/inboxTile/InboxTile.d.ts +0 -2
  224. package/dist/components/partner/adminTiles/inboxTile/InboxTile.js +0 -8
  225. package/dist/interfaces/appBar/PeopleConnected.interface.d.ts +0 -4
  226. package/dist/interfaces/partner/adminTiles/inboxTile/InboxCard.interface.d.ts +0 -6
  227. package/dist/interfaces/partner/adminTiles/inboxTile/InboxTile.interface.d.ts +0 -5
  228. package/dist/stories/partner/adminTiles/InboxTile.stories.js +0 -35
  229. package/src/components/partner/adminTiles/inboxTile/InboxCard.tsx +0 -35
  230. package/src/components/partner/adminTiles/inboxTile/InboxTile.tsx +0 -21
  231. package/src/interfaces/appBar/PeopleConnected.interface.ts +0 -4
  232. package/src/interfaces/partner/adminTiles/inboxTile/InboxCard.interface.ts +0 -6
  233. package/src/interfaces/partner/adminTiles/inboxTile/InboxTile.interface.ts +0 -6
  234. package/src/stories/partner/adminTiles/InboxTile.stories.tsx +0 -42
  235. /package/dist/interfaces/{appBar/PeopleConnected.interface.js → forms/readOnly/homeItem/ReadOnlyAppliances.interface.js} +0 -0
  236. /package/dist/interfaces/{partner/adminTiles/inboxTile/InboxCard.interface.js → homeItems/ViewingHomeItemPanel.interface.js} +0 -0
  237. /package/dist/interfaces/{partner/adminTiles/inboxTile/InboxTile.interface.js → inboxTile/InboxCard.interface.js} +0 -0
  238. /package/dist/interfaces/{partner/adminTiles/inboxTile → inboxTile}/index.d.ts +0 -0
  239. /package/dist/interfaces/{partner/adminTiles/inboxTile → inboxTile}/index.js +0 -0
  240. /package/src/interfaces/{partner/adminTiles/inboxTile → inboxTile}/index.ts +0 -0
@@ -0,0 +1,74 @@
1
+ import { Text, Flex, Stack, IconButton, Box } from '@chakra-ui/react'
2
+ import {
3
+ ReadOnlyHomeItemRating,
4
+ Edit,
5
+ ReadOnlyHomeItemImages,
6
+ ReadOnlyHomeItemText,
7
+ } from '@/components'
8
+ import { ReadOnlyAppliancesI } from '@/interfaces'
9
+ import { colors } from '@/theme/colors'
10
+
11
+ export const ReadOnlyAppliances = ({
12
+ description,
13
+ id,
14
+ name,
15
+ children,
16
+ onEdit,
17
+ value,
18
+ }: ReadOnlyAppliancesI) => {
19
+ const rating = children?.find(({ type }) => type === 'rating')
20
+ const images = children?.find(({ type }) => type === 'images')
21
+ return (
22
+ <Stack spacing="base" p="base">
23
+ <Flex justify="space-between">
24
+ <Text fontSize="xs" textTransform="uppercase">
25
+ {name}
26
+ </Text>
27
+ <IconButton
28
+ aria-label="Edit appliance"
29
+ variant="ghost"
30
+ w="fit-content"
31
+ icon={<Edit size={18} stroke={colors.blue[3]} />}
32
+ onClick={() => onEdit(id)}
33
+ />
34
+ </Flex>
35
+ <Flex gap="base">
36
+ <ReadOnlyHomeItemImages {...images} />
37
+ <Stack spacing="4" flex="1">
38
+ <ReadOnlyHomeItemRating {...rating} />
39
+ <Stack spacing="base">
40
+ <Text fontSize="22px" fontWeight="semibold">
41
+ {value}
42
+ </Text>
43
+ <Text fontFamily="secondary" fontSize="sm">
44
+ {description}
45
+ </Text>
46
+ </Stack>
47
+ <Box
48
+ flex="1"
49
+ borderBottom="1px dashed"
50
+ borderColor="lightBlue.6"
51
+ h="1px"
52
+ />
53
+ <Box>
54
+ {children?.map(({ id, name, value, type }) => {
55
+ const baseProps = {
56
+ key: `${id}-${name}-${value}-${type}`,
57
+ id,
58
+ value,
59
+ type,
60
+ name,
61
+ }
62
+ switch (type) {
63
+ case 'text':
64
+ return <ReadOnlyHomeItemText {...baseProps} />
65
+ default:
66
+ return null
67
+ }
68
+ })}
69
+ </Box>
70
+ </Stack>
71
+ </Flex>
72
+ </Stack>
73
+ )
74
+ }
@@ -0,0 +1,28 @@
1
+ import { ReportI } from '@/interfaces'
2
+ import { Box, Image, SimpleGrid, Stack } from '@chakra-ui/react'
3
+ import { useState } from 'react'
4
+
5
+ export const ReadOnlyHomeItemImages = (props: Partial<ReportI>) => {
6
+ const images = props.value as string[]
7
+ const [mainImage, setMainImage] = useState(images?.[0])
8
+
9
+ if (!images) return null
10
+
11
+ return (
12
+ <Stack spacing="base">
13
+ <Image src={mainImage} alt="home item" boxSize="174px" />
14
+ <SimpleGrid columns={4} spacing="base">
15
+ {images?.map((image) => (
16
+ <Box
17
+ as="button"
18
+ backgroundImage={image}
19
+ backgroundSize="cover"
20
+ backgroundPosition="center"
21
+ boxSize="34px"
22
+ onClick={() => setMainImage(image)}
23
+ />
24
+ ))}
25
+ </SimpleGrid>
26
+ </Stack>
27
+ )
28
+ }
@@ -0,0 +1,22 @@
1
+ import { t } from 'i18next'
2
+ import { Box, Flex, Text } from '@chakra-ui/react'
3
+ import { Star } from '@/components'
4
+ import { ReportI } from '@/interfaces'
5
+ import { colors } from '@/theme/colors'
6
+
7
+ export const ReadOnlyHomeItemRating = ({ id, value }: Partial<ReportI>) => {
8
+ if (!value) return null
9
+ const count = Number(value) - 1
10
+ return (
11
+ <Box>
12
+ <Text fontSize="10px">{t('dynamicForm.myRating')}</Text>
13
+ <Flex gap="1">
14
+ {Array.from({ length: 5 }).map((_, index) => {
15
+ const starColor: string =
16
+ count >= index ? colors.yellow['1'] : colors.gray['1']
17
+ return <Star size={13} key={`${id}-${index}`} stroke={starColor} />
18
+ })}
19
+ </Flex>
20
+ </Box>
21
+ )
22
+ }
@@ -0,0 +1,22 @@
1
+ import { Box, Flex, Text } from '@chakra-ui/react'
2
+ import { ReportI } from '@/interfaces'
3
+
4
+ export const ReadOnlyHomeItemText = ({ name, value }: Partial<ReportI>) => {
5
+ if (!name) return null
6
+ return (
7
+ <Flex gap="base">
8
+ <Box w="20%">
9
+ <CustomText>{`${name}:`}</CustomText>
10
+ </Box>
11
+ <CustomText>{String(value)}</CustomText>
12
+ </Flex>
13
+ )
14
+ }
15
+
16
+ const CustomText = ({ children = '' }) => {
17
+ return (
18
+ <Text fontSize="sm" fontFamily="secondary">
19
+ {children}
20
+ </Text>
21
+ )
22
+ }
@@ -0,0 +1,4 @@
1
+ export * from './ReadOnlyAppliances'
2
+ export * from './ReadOnlyHomeItemImages'
3
+ export * from './ReadOnlyHomeItemRating'
4
+ export * from './ReadOnlyHomeItemText'
@@ -1,3 +1,4 @@
1
+ export * from './homeItem'
1
2
  export * from './ReadOnlyDate'
2
3
  export * from './ReadOnlyImage'
3
4
  export * from './ReadOnlyGrid'
@@ -15,6 +15,7 @@ export const TabsHeader = ({
15
15
  tabIndex,
16
16
  defaultIndex,
17
17
  rightButton,
18
+ rightTabList,
18
19
  }: TabsHeaderI) => {
19
20
  return (
20
21
  <Tabs
@@ -29,31 +30,17 @@ export const TabsHeader = ({
29
30
  <Flex justify="space-between">
30
31
  <TabList bg="neutral.white" w="full">
31
32
  {tabList?.map(({ label }) => (
32
- <Tab
33
- key={label}
34
- minW="1rem"
35
- px="base"
36
- py="0"
37
- lineHeight="10"
38
- textTransform="uppercase"
39
- fontWeight="medium"
40
- fontSize="sm"
41
- fontFamily="primary"
42
- color="blue.3"
43
- borderBottom="3px solid transparent"
44
- _hover={{ cursor: 'pointer' }}
45
- _focus={{ outline: 'none' }}
46
- _selected={{
47
- color: 'blue.8',
48
- fontWeight: 'bold',
49
- borderColor: 'blue.8',
50
- }}
51
- >
52
- {label}
53
- </Tab>
33
+ <CustomTab key={label} label={label} />
54
34
  ))}
55
35
  </TabList>
56
- {rightButton}
36
+ <Flex>
37
+ <TabList bg="neutral.white" w="full">
38
+ {rightTabList?.map(({ label }) => (
39
+ <CustomTab key={label} label={label} />
40
+ ))}
41
+ </TabList>
42
+ {rightButton}
43
+ </Flex>
57
44
  </Flex>
58
45
  </Box>
59
46
  <TabPanels h="100%">
@@ -66,3 +53,29 @@ export const TabsHeader = ({
66
53
  </Tabs>
67
54
  )
68
55
  }
56
+
57
+ const CustomTab = ({ label = '' }) => {
58
+ return (
59
+ <Tab
60
+ minW="1rem"
61
+ px="base"
62
+ py="0"
63
+ lineHeight="10"
64
+ textTransform="uppercase"
65
+ fontWeight="medium"
66
+ fontSize="sm"
67
+ fontFamily="primary"
68
+ color="blue.3"
69
+ borderBottom="3px solid transparent"
70
+ _hover={{ cursor: 'pointer' }}
71
+ _focus={{ outline: 'none' }}
72
+ _selected={{
73
+ color: 'blue.8',
74
+ fontWeight: 'bold',
75
+ borderColor: 'blue.8',
76
+ }}
77
+ >
78
+ {label}
79
+ </Tab>
80
+ )
81
+ }
@@ -6,11 +6,13 @@ import {
6
6
  HomeAssistantWrapper,
7
7
  } from '@/components'
8
8
  import { HomeAssistantStepsI } from '@/interfaces'
9
+ import { Center } from '@chakra-ui/react'
9
10
 
10
11
  export const HomeAssistant = ({
11
12
  showTutorial = false,
12
13
  tutorialUrl = '',
13
14
  onStart,
15
+ zIndex,
14
16
  ...props
15
17
  }: HomeAssistantStepsI) => {
16
18
  const [startSetup, setStartSetup] = useState(false)
@@ -19,14 +21,17 @@ export const HomeAssistant = ({
19
21
  <HomeAssistantWrapper
20
22
  showAirplane={showAirplane}
21
23
  title={t('homeAssistant.title')}
24
+ zIndex={zIndex}
22
25
  >
23
- {!startSetup && showTutorial && (
24
- <HomeAssistantTutorial
25
- onStart={onStart ? onStart : () => setStartSetup(true)}
26
- videoUrl={tutorialUrl}
27
- />
28
- )}
29
- {(startSetup || !showTutorial) && <HomeAssistantSteps {...props} />}
26
+ <Center minH="477px">
27
+ {!startSetup && showTutorial && (
28
+ <HomeAssistantTutorial
29
+ onStart={onStart ?? (() => setStartSetup(true))}
30
+ videoUrl={tutorialUrl}
31
+ />
32
+ )}
33
+ {(startSetup || !showTutorial) && <HomeAssistantSteps {...props} />}
34
+ </Center>
30
35
  </HomeAssistantWrapper>
31
36
  )
32
37
  }
@@ -23,24 +23,26 @@ export const HomeAssistantWrapper = ({
23
23
  children,
24
24
  showAirplane,
25
25
  title,
26
+ zIndex
26
27
  }: PropsWithChildren<{
27
28
  showAirplane?: boolean
28
29
  title: string
30
+ zIndex?: string
29
31
  }>) => {
30
32
  const treesAlt = getImageAltText(TreesCrop)
31
33
 
32
34
  return (
33
- <GridItem colSpan={[1, 2]}>
35
+ <GridItem colSpan={[1, 2]} zIndex={zIndex}>
34
36
  <TileTooltip label="homeAssistant">
35
37
  <Box
36
38
  bgGradient={colors.skyGradient}
37
39
  boxShadow="base"
38
40
  h="full"
39
41
  position="relative"
40
- overflowX="hidden"
42
+ overflow="hidden"
41
43
  >
42
44
  <ContainerHeader title={title} titleIcon={IA} />
43
- <Center minH="477px">{children}</Center>
45
+ <>{children}</>
44
46
  <Image
45
47
  src={Cloud1}
46
48
  position="absolute"
@@ -2,9 +2,9 @@ import { PropsWithChildren } from 'react'
2
2
  import { t } from 'i18next'
3
3
  import { HomeAssistantWrapper } from '@/components'
4
4
 
5
- export const HomeMonitor = ({ children }: PropsWithChildren<{}>) => {
5
+ export const HomeMonitor = ({ children, zIndex}: PropsWithChildren<{zIndex?: string}>) => {
6
6
  return (
7
- <HomeAssistantWrapper showAirplane title={t('homeAssistant.homeMonitor')}>
7
+ <HomeAssistantWrapper zIndex={zIndex} showAirplane title={t('homeAssistant.homeMonitor')}>
8
8
  {children}
9
9
  </HomeAssistantWrapper>
10
10
  )
@@ -1,16 +1,16 @@
1
- import { Stack, Flex, Center, Text } from '@chakra-ui/react'
2
1
  import { t } from 'i18next'
2
+ import { Stack, Flex, Center, Text } from '@chakra-ui/react'
3
3
 
4
4
  export const Notifications = ({ date = '', local = '' }) => {
5
5
  return (
6
- <Stack spacing="base" minH="full" zIndex="2">
6
+ <Stack spacing="base" zIndex="2">
7
7
  <Flex justify="space-between">
8
8
  <CustomText>{date}</CustomText>
9
9
  <CustomText>{local}</CustomText>
10
10
  </Flex>
11
11
  <Center
12
12
  w="188px"
13
- h="243px"
13
+ h="300px"
14
14
  border="1px dashed"
15
15
  borderColor="blue.1"
16
16
  borderRadius="sm"
@@ -55,6 +55,8 @@ import {
55
55
  HomefileMonitoring,
56
56
  Notifications,
57
57
  HomeMonitorSteps,
58
+ NotificationsReminder,
59
+ NotificationsPanel,
58
60
  } from '@/components'
59
61
  import {
60
62
  HomeCards,
@@ -86,6 +88,7 @@ import {
86
88
  homeAssitantStep6FormMock,
87
89
  tileUIMock,
88
90
  socialLinksMock,
91
+ notificationsMock,
89
92
  } from '@/mocks'
90
93
  import { useHomeBoard, useWindowDimensions } from '@/hooks'
91
94
  import { Painting } from '@/assets/images'
@@ -107,6 +110,7 @@ export const HomeBoard = () => {
107
110
  activeTour,
108
111
  currentComponent,
109
112
  form,
113
+ handleAppBarClick,
110
114
  handleClose,
111
115
  handleEditHomeClick,
112
116
  handleFolderClick,
@@ -276,6 +280,13 @@ export const HomeBoard = () => {
276
280
  hasCompleted={true}
277
281
  />
278
282
  ),
283
+ Notifications: (
284
+ <NotificationsPanel
285
+ notifications={notificationsMock}
286
+ onClose={onRightClose}
287
+ onDismiss={() => null}
288
+ />
289
+ ),
279
290
  }
280
291
 
281
292
  const panelSize = currentComponent === 'PartnerCatalog' ? 'lg' : 'md'
@@ -301,7 +312,10 @@ export const HomeBoard = () => {
301
312
  roomsToAdd={RoomsToAdd}
302
313
  />
303
314
  <Box w="full">
304
- <AppBarComponent setActiveTour={setActiveTour} />
315
+ <AppBarComponent
316
+ setActiveTour={setActiveTour}
317
+ onClick={handleAppBarClick}
318
+ />
305
319
  <Stack spacing="base" p="base">
306
320
  <HomeHeader
307
321
  buttonLabel="Partner catalog"
@@ -324,7 +338,6 @@ export const HomeBoard = () => {
324
338
  recipients={recipientsDb}
325
339
  records={homeBoardRecorsMock}
326
340
  />
327
-
328
341
  <HomeAssistant
329
342
  currentPanel={homeAssistantCurrentStep}
330
343
  currentStep={6}
@@ -386,6 +399,12 @@ export const HomeBoard = () => {
386
399
  yearValue={5684}
387
400
  />
388
401
  </Stack>
402
+ <PropertyTaxes
403
+ estimatedTaxValue={1000}
404
+ menuItems={menuMock}
405
+ taxes={taxesMock}
406
+ title="Travis County Property Taxes"
407
+ />
389
408
 
390
409
  <ShortPartnerTile
391
410
  _id="1"
@@ -458,7 +477,10 @@ export const HomeBoard = () => {
458
477
  )
459
478
  }
460
479
 
461
- export const AppBarComponent = ({ setActiveTour = (value: boolean) => {} }) => {
480
+ export const AppBarComponent = ({
481
+ setActiveTour = (value: boolean) => {},
482
+ onClick = (panel: string) => {},
483
+ }) => {
462
484
  const handleTour = () => {
463
485
  setActiveTour(true)
464
486
  }
@@ -474,6 +496,11 @@ export const AppBarComponent = ({ setActiveTour = (value: boolean) => {} }) => {
474
496
  <BarDivider />
475
497
  </>
476
498
  )}
499
+ <NotificationsReminder
500
+ onClick={() => onClick('Notifications')}
501
+ total={2}
502
+ />
503
+ <BarDivider />
477
504
  <PeopleConnected onClick={() => null} total={12} />
478
505
  <BarDivider />
479
506
  <ContactList onClick={() => null} total={2} />
@@ -0,0 +1,44 @@
1
+ import { t } from 'i18next'
2
+ import { Box, Divider, DrawerContent, DrawerHeader } from '@chakra-ui/react'
3
+ import { PanelHeader, ReadOnlyDynamicForm, TabsHeader } from '@/components'
4
+ import { Painting } from '@/assets/images'
5
+ import { ViewingHomeItemPanelI } from '@/interfaces'
6
+
7
+ export const ViewingHomeItemPanel = ({
8
+ form,
9
+ onClose,
10
+ onEdit,
11
+ }: ViewingHomeItemPanelI) => {
12
+ const tabs = [
13
+ {
14
+ label: t('contacts.details'),
15
+ component: <div />,
16
+ },
17
+ {
18
+ label: t('contacts.permissions'),
19
+ component: <div />,
20
+ },
21
+ ]
22
+ const rightTabs = [
23
+ {
24
+ label: 'History',
25
+ component: <div />,
26
+ },
27
+ ]
28
+ return (
29
+ <DrawerContent bg="lightBlue.1">
30
+ <DrawerHeader p="0">
31
+ <PanelHeader
32
+ handleCloseButton={onClose}
33
+ title={t('homeItems.title')}
34
+ icon={Painting}
35
+ />
36
+ <Divider />
37
+ <Box pt="1" bg="neutral.white">
38
+ <TabsHeader tabList={tabs} rightTabList={rightTabs} />
39
+ </Box>
40
+ </DrawerHeader>
41
+ <ReadOnlyDynamicForm form={form} onEdit={onEdit} />
42
+ </DrawerContent>
43
+ )
44
+ }
@@ -0,0 +1 @@
1
+ export * from './ViewingHomeItemPanel'
@@ -0,0 +1,38 @@
1
+ import { t } from 'i18next'
2
+ import { AspectRatio, Flex, Image, Text } from '@chakra-ui/react'
3
+ import { TextBadge } from '@/components'
4
+ import { InboxCardI } from '@/interfaces'
5
+
6
+ export const InboxCard = ({ box, onClick }: InboxCardI) => {
7
+ const { image, name, newMessages = 0, totalMessages } = box
8
+ const hasNewMessages = newMessages > 0
9
+ const message = `${newMessages} ${t('badges.new')}`
10
+ return (
11
+ <Flex
12
+ as="button"
13
+ align="center"
14
+ justify="space-between"
15
+ px="base"
16
+ py="6"
17
+ bg="neutral.white"
18
+ transition="background-color 0.2s"
19
+ _hover={{ bg: 'lightGreen.1' }}
20
+ onClick={() => onClick?.(name)}
21
+ >
22
+ <Flex align="center" gap="base">
23
+ <AspectRatio ratio={1} w="34px" h="auto">
24
+ <Image src={image} alt={name} />
25
+ </AspectRatio>
26
+ <Text>{name}</Text>
27
+ </Flex>
28
+ <Flex align="center" gap="6">
29
+ {hasNewMessages && (
30
+ <TextBadge text={message} showAnimation={false} bgColor="violet.1" />
31
+ )}
32
+ <Text fontSize="30px" fontWeight="medium" color="blue.2">
33
+ {totalMessages}
34
+ </Text>
35
+ </Flex>
36
+ </Flex>
37
+ )
38
+ }
@@ -0,0 +1,26 @@
1
+ import { t } from 'i18next'
2
+ import { AspectRatio, Flex, Text, Image } from '@chakra-ui/react'
3
+ import { IA } from '@/assets/images'
4
+
5
+ export const InboxForwardBanner = () => {
6
+ return (
7
+ <Flex p="base" gap="base" align="center" bg="lightBlue.2">
8
+ <AspectRatio ratio={1} minW="35px" h="auto">
9
+ <Image src={IA} alt="IA" />
10
+ </AspectRatio>
11
+
12
+ <Text variant="home" lineHeight="1">
13
+ {t('inbox.forwardTo')}
14
+ <Text
15
+ variant="home"
16
+ lineHeight="1"
17
+ color="neutral.black"
18
+ fontWeight="bold"
19
+ display="inline"
20
+ >
21
+ homefileit@homefile.com.
22
+ </Text>
23
+ </Text>
24
+ </Flex>
25
+ )
26
+ }
@@ -0,0 +1,36 @@
1
+ import { t } from 'i18next'
2
+ import { Container, Stack } from '@chakra-ui/react'
3
+ import {
4
+ ContainerHeader,
5
+ InboxCard,
6
+ MoreHorizontal,
7
+ TileTooltip,
8
+ } from '@/components'
9
+ import { Inbox } from '@/assets/images'
10
+ import { InboxTileI } from '@/interfaces'
11
+
12
+ export const InboxTile = ({
13
+ banner,
14
+ boxes,
15
+ menuItems,
16
+ onClick,
17
+ }: InboxTileI) => {
18
+ return (
19
+ <TileTooltip label="inbox">
20
+ <Container variant="launchpad" h="full" position="relative" m="0">
21
+ <Stack spacing="2px">
22
+ <ContainerHeader
23
+ menuItems={menuItems}
24
+ title={t('partner.tiles.inbox') ?? ''}
25
+ icon={<MoreHorizontal size={38} />}
26
+ titleIcon={Inbox}
27
+ />
28
+ {banner}
29
+ {boxes.map((box) => (
30
+ <InboxCard key={box.name} box={box} onClick={onClick} />
31
+ ))}
32
+ </Stack>
33
+ </Container>
34
+ </TileTooltip>
35
+ )
36
+ }
@@ -1,2 +1,3 @@
1
1
  export * from './InboxCard'
2
+ export * from './InboxForwardBanner'
2
3
  export * from './InboxTile'
@@ -16,13 +16,16 @@ export * from './headers'
16
16
  export * from './help'
17
17
  export * from './homeAssistant'
18
18
  export * from './homeBoard'
19
+ export * from './homeItems'
19
20
  export * from './homeSummary'
20
21
  export * from './icons'
22
+ export * from './inboxTile'
21
23
  export * from './inputs'
22
24
  export * from './launchpad'
23
25
  export * from './loaders'
24
26
  export * from './myHomes'
25
27
  export * from './myProfile'
28
+ export * from './notifications'
26
29
  export * from './onboarding'
27
30
  export * from './overlay/Overlay'
28
31
  export * from './partner'