@homefile/components-v2 2.3.1 → 2.5.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 (203) hide show
  1. package/dist/assets/images/animations/index.d.ts +7 -0
  2. package/dist/assets/images/animations/index.js +7 -0
  3. package/dist/assets/images/animations/index.ts +15 -0
  4. package/dist/assets/images/animations/trees-cloudy.png +0 -0
  5. package/dist/assets/images/animations/trees-day-fall.png +0 -0
  6. package/dist/assets/images/animations/trees-day-summer.png +0 -0
  7. package/dist/assets/images/animations/trees-day-winter.png +0 -0
  8. package/dist/assets/images/animations/trees-evening.png +0 -0
  9. package/dist/assets/images/animations/trees-morning.png +0 -0
  10. package/dist/assets/images/animations/trees-night.png +0 -0
  11. package/dist/assets/images/book.svg +25 -0
  12. package/dist/assets/images/chat-bubble.svg +8 -0
  13. package/dist/assets/images/document2.svg +14 -0
  14. package/dist/assets/images/index.d.ts +5 -1
  15. package/dist/assets/images/index.js +5 -1
  16. package/dist/assets/images/index.ts +7 -0
  17. package/dist/assets/locales/en/index.json +11 -10
  18. package/dist/components/animations/CloudsAnimation.js +19 -3
  19. package/dist/components/animations/WeatherTrees.d.ts +6 -0
  20. package/dist/components/animations/WeatherTrees.js +36 -0
  21. package/dist/components/animations/index.d.ts +1 -0
  22. package/dist/components/animations/index.js +1 -0
  23. package/dist/components/badge/TextBadge.js +1 -1
  24. package/dist/components/folderPanel/folderDetails/FilesCounter.js +3 -5
  25. package/dist/components/footers/FooterButtons.d.ts +1 -1
  26. package/dist/components/footers/FooterButtons.js +2 -2
  27. package/dist/components/forms/BaseCounter.d.ts +2 -0
  28. package/dist/components/forms/BaseCounter.js +8 -0
  29. package/dist/components/forms/dynamicForm/fields/uiFields/TileCta.js +1 -1
  30. package/dist/components/forms/dynamicForm/fields/uiFields/TileCta.tsx +4 -2
  31. package/dist/components/forms/index.d.ts +1 -0
  32. package/dist/components/forms/index.js +1 -0
  33. package/dist/components/forms/readOnly/ReadOnlyDynamicForm.d.ts +1 -1
  34. package/dist/components/forms/readOnly/ReadOnlyDynamicForm.js +6 -4
  35. package/dist/components/forms/readOnly/fields/ReadOnlyGrid.d.ts +1 -1
  36. package/dist/components/forms/readOnly/fields/ReadOnlyGrid.js +7 -3
  37. package/dist/components/forms/readOnly/fields/ReadOnlyNotes.d.ts +2 -0
  38. package/dist/components/forms/readOnly/fields/ReadOnlyNotes.js +5 -0
  39. package/dist/components/forms/readOnly/fields/homeItem/ReadOnlyAppliances.js +1 -1
  40. package/dist/components/forms/readOnly/fields/homeItem/ReadOnlyAppliances.tsx +1 -1
  41. package/dist/components/forms/readOnly/fields/homeItem/ReadOnlyGuidelines.d.ts +2 -0
  42. package/dist/components/forms/readOnly/fields/homeItem/ReadOnlyGuidelines.js +11 -0
  43. package/dist/components/forms/readOnly/fields/homeItem/ReadOnlyGuidelines.tsx +33 -0
  44. package/dist/components/forms/readOnly/fields/homeItem/ReadOnlyHomeItemImages.js +1 -1
  45. package/dist/components/forms/readOnly/fields/homeItem/ReadOnlyHomeItemImages.tsx +1 -0
  46. package/dist/components/forms/readOnly/fields/homeItem/ReadOnlyItemRelated.d.ts +2 -0
  47. package/dist/components/forms/readOnly/fields/homeItem/ReadOnlyItemRelated.js +11 -0
  48. package/dist/components/forms/readOnly/fields/homeItem/ReadOnlyItemRelated.tsx +40 -0
  49. package/dist/components/forms/readOnly/fields/homeItem/index.d.ts +2 -0
  50. package/dist/components/forms/readOnly/fields/homeItem/index.js +2 -0
  51. package/dist/components/forms/readOnly/fields/homeItem/index.ts +2 -0
  52. package/dist/components/forms/readOnly/fields/index.d.ts +1 -0
  53. package/dist/components/forms/readOnly/fields/index.js +1 -0
  54. package/dist/components/homeAssistant/HomeAssistantWrapper.d.ts +1 -1
  55. package/dist/components/homeAssistant/HomeAssistantWrapper.js +20 -6
  56. package/dist/components/homeItems/ViewingHomeItemPanel.d.ts +1 -1
  57. package/dist/components/homeItems/ViewingHomeItemPanel.js +2 -2
  58. package/dist/components/inboxTile/InboxForwardBanner.js +2 -2
  59. package/dist/components/inboxTile/index.d.ts +1 -0
  60. package/dist/components/inboxTile/index.js +1 -0
  61. package/dist/components/inboxTile/panel/MessageCard.d.ts +2 -0
  62. package/dist/components/inboxTile/panel/MessageCard.js +14 -0
  63. package/dist/components/inboxTile/panel/MessageChatPanel.d.ts +4 -0
  64. package/dist/components/inboxTile/panel/MessageChatPanel.js +38 -0
  65. package/dist/components/inboxTile/panel/MessagePanel.d.ts +2 -0
  66. package/dist/components/inboxTile/panel/MessagePanel.js +12 -0
  67. package/dist/components/inboxTile/panel/index.d.ts +3 -0
  68. package/dist/components/inboxTile/panel/index.js +3 -0
  69. package/dist/components/myHomes/WrapperWithShadow.js +1 -1
  70. package/dist/components/myHomes/steps/MyHomeDetails.d.ts +1 -0
  71. package/dist/components/myHomes/steps/MyHomeDetails.js +1 -1
  72. package/dist/components/notifications/NotificationCard.d.ts +1 -1
  73. package/dist/components/notifications/NotificationCard.js +2 -47
  74. package/dist/components/rooms/VideosCounter.js +3 -5
  75. package/dist/helpers/forms/dynamicForm.helper.js +2 -1
  76. package/dist/hooks/inbox/index.d.ts +1 -0
  77. package/dist/hooks/inbox/index.js +1 -0
  78. package/dist/hooks/inbox/useMessagePanel.d.ts +7 -0
  79. package/dist/hooks/inbox/useMessagePanel.js +17 -0
  80. package/dist/hooks/index.d.ts +1 -0
  81. package/dist/hooks/index.js +1 -0
  82. package/dist/hooks/notifications/useNotificationsPanel.js +0 -5
  83. package/dist/index.d.ts +1 -1
  84. package/dist/index.js +1 -1
  85. package/dist/interfaces/appBar/UserProfile.interface.d.ts +2 -2
  86. package/dist/interfaces/footers/FooterButtons.interface.d.ts +1 -0
  87. package/dist/interfaces/forms/BaseCounter.interface.d.ts +5 -0
  88. package/dist/interfaces/forms/BaseCounter.interface.js +1 -0
  89. package/dist/interfaces/forms/dynamicForm/DynamicForm.interface.d.ts +4 -3
  90. package/dist/interfaces/forms/index.d.ts +1 -0
  91. package/dist/interfaces/forms/index.js +1 -0
  92. package/dist/interfaces/forms/readOnly/ReadOnlyGrid.interface.d.ts +2 -1
  93. package/dist/interfaces/forms/readOnly/homeItem/ReadOnlyGuidelines.interface.d.ts +4 -0
  94. package/dist/interfaces/forms/readOnly/homeItem/ReadOnlyGuidelines.interface.js +1 -0
  95. package/dist/interfaces/forms/readOnly/homeItem/index.d.ts +1 -0
  96. package/dist/interfaces/forms/readOnly/homeItem/index.js +1 -0
  97. package/dist/interfaces/homeItems/ViewingHomeItemPanel.interface.d.ts +1 -0
  98. package/dist/interfaces/inboxTile/MessageCard.interface.d.ts +16 -0
  99. package/dist/interfaces/inboxTile/MessageCard.interface.js +1 -0
  100. package/dist/interfaces/inboxTile/MessageChatPanel.interface.d.ts +12 -0
  101. package/dist/interfaces/inboxTile/MessageChatPanel.interface.js +1 -0
  102. package/dist/interfaces/inboxTile/MessagePanel.interface.d.ts +6 -0
  103. package/dist/interfaces/inboxTile/MessagePanel.interface.js +1 -0
  104. package/dist/interfaces/inboxTile/index.d.ts +3 -0
  105. package/dist/interfaces/inboxTile/index.js +3 -0
  106. package/dist/interfaces/notifications/NotificationsPanel.interface.d.ts +3 -2
  107. package/dist/mocks/forms/dynamicForm.mock.js +60 -0
  108. package/dist/mocks/inbox/index.d.ts +1 -0
  109. package/dist/mocks/inbox/index.js +1 -0
  110. package/dist/mocks/inbox/messages.d.ts +2 -0
  111. package/dist/mocks/inbox/messages.js +136 -0
  112. package/dist/mocks/index.d.ts +1 -0
  113. package/dist/mocks/index.js +1 -0
  114. package/dist/mocks/notifications/notifications.mock.js +4 -4
  115. package/dist/stories/assets/Illustrations.stories.js +2 -2
  116. package/dist/stories/homeItems/ViewingHomeItem.stories.js +1 -0
  117. package/dist/stories/inboxTile/MessagePanel.stories.d.ts +5 -0
  118. package/dist/stories/inboxTile/MessagePanel.stories.js +24 -0
  119. package/dist/theme/colors.d.ts +4 -1
  120. package/dist/theme/colors.js +4 -1
  121. package/dist/utils/Animations.utils.d.ts +6 -0
  122. package/dist/utils/Animations.utils.js +31 -0
  123. package/dist/utils/Avatars.utils.d.ts +1 -1
  124. package/dist/utils/Avatars.utils.js +1 -1
  125. package/dist/utils/index.d.ts +1 -0
  126. package/dist/utils/index.js +1 -0
  127. package/package.json +1 -1
  128. package/src/assets/images/animations/index.ts +15 -0
  129. package/src/assets/images/animations/trees-cloudy.png +0 -0
  130. package/src/assets/images/animations/trees-day-fall.png +0 -0
  131. package/src/assets/images/animations/trees-day-summer.png +0 -0
  132. package/src/assets/images/animations/trees-day-winter.png +0 -0
  133. package/src/assets/images/animations/trees-evening.png +0 -0
  134. package/src/assets/images/animations/trees-morning.png +0 -0
  135. package/src/assets/images/animations/trees-night.png +0 -0
  136. package/src/assets/images/book.svg +25 -0
  137. package/src/assets/images/chat-bubble.svg +8 -0
  138. package/src/assets/images/document2.svg +14 -0
  139. package/src/assets/images/index.ts +7 -0
  140. package/src/assets/locales/en/index.json +11 -10
  141. package/src/components/animations/CloudsAnimation.tsx +34 -17
  142. package/src/components/animations/WeatherTrees.tsx +37 -0
  143. package/src/components/animations/index.ts +1 -0
  144. package/src/components/badge/TextBadge.tsx +1 -1
  145. package/src/components/folderPanel/folderDetails/FilesCounter.tsx +6 -21
  146. package/src/components/footers/FooterButtons.tsx +2 -1
  147. package/src/components/forms/BaseCounter.tsx +30 -0
  148. package/src/components/forms/dynamicForm/fields/uiFields/TileCta.tsx +4 -2
  149. package/src/components/forms/index.ts +1 -0
  150. package/src/components/forms/readOnly/ReadOnlyDynamicForm.tsx +8 -2
  151. package/src/components/forms/readOnly/fields/ReadOnlyGrid.tsx +32 -3
  152. package/src/components/forms/readOnly/fields/ReadOnlyNotes.tsx +16 -0
  153. package/src/components/forms/readOnly/fields/homeItem/ReadOnlyAppliances.tsx +1 -1
  154. package/src/components/forms/readOnly/fields/homeItem/ReadOnlyGuidelines.tsx +33 -0
  155. package/src/components/forms/readOnly/fields/homeItem/ReadOnlyHomeItemImages.tsx +1 -0
  156. package/src/components/forms/readOnly/fields/homeItem/ReadOnlyItemRelated.tsx +40 -0
  157. package/src/components/forms/readOnly/fields/homeItem/index.ts +2 -0
  158. package/src/components/forms/readOnly/fields/index.ts +1 -0
  159. package/src/components/homeAssistant/HomeAssistantWrapper.tsx +31 -18
  160. package/src/components/homeItems/ViewingHomeItemPanel.tsx +2 -1
  161. package/src/components/inboxTile/InboxForwardBanner.tsx +5 -4
  162. package/src/components/inboxTile/index.ts +1 -0
  163. package/src/components/inboxTile/panel/MessageCard.tsx +112 -0
  164. package/src/components/inboxTile/panel/MessageChatPanel.tsx +105 -0
  165. package/src/components/inboxTile/panel/MessagePanel.tsx +64 -0
  166. package/src/components/inboxTile/panel/index.ts +3 -0
  167. package/src/components/myHomes/WrapperWithShadow.tsx +1 -0
  168. package/src/components/myHomes/steps/MyHomeDetails.tsx +1 -1
  169. package/src/components/notifications/NotificationCard.tsx +2 -106
  170. package/src/components/onboarding/pages/SignIn.tsx +1 -0
  171. package/src/components/rooms/VideosCounter.tsx +2 -18
  172. package/src/helpers/forms/dynamicForm.helper.ts +2 -0
  173. package/src/hooks/inbox/index.ts +1 -0
  174. package/src/hooks/inbox/useMessagePanel.ts +23 -0
  175. package/src/hooks/index.ts +1 -0
  176. package/src/hooks/notifications/useNotificationsPanel.ts +0 -5
  177. package/src/index.ts +2 -0
  178. package/src/interfaces/appBar/UserProfile.interface.ts +2 -2
  179. package/src/interfaces/footers/FooterButtons.interface.ts +2 -1
  180. package/src/interfaces/forms/BaseCounter.interface.ts +5 -0
  181. package/src/interfaces/forms/dynamicForm/DynamicForm.interface.ts +9 -1
  182. package/src/interfaces/forms/index.ts +1 -0
  183. package/src/interfaces/forms/readOnly/ReadOnlyGrid.interface.ts +3 -1
  184. package/src/interfaces/forms/readOnly/homeItem/ReadOnlyGuidelines.interface.ts +6 -0
  185. package/src/interfaces/forms/readOnly/homeItem/index.ts +1 -0
  186. package/src/interfaces/homeItems/ViewingHomeItemPanel.interface.ts +1 -0
  187. package/src/interfaces/inboxTile/MessageCard.interface.ts +18 -0
  188. package/src/interfaces/inboxTile/MessageChatPanel.interface.ts +13 -0
  189. package/src/interfaces/inboxTile/MessagePanel.interface.ts +7 -0
  190. package/src/interfaces/inboxTile/index.ts +3 -0
  191. package/src/interfaces/notifications/NotificationsPanel.interface.ts +3 -9
  192. package/src/mocks/forms/dynamicForm.mock.ts +60 -0
  193. package/src/mocks/inbox/index.ts +1 -0
  194. package/src/mocks/inbox/messages.ts +139 -0
  195. package/src/mocks/index.ts +1 -0
  196. package/src/mocks/notifications/notifications.mock.ts +4 -4
  197. package/src/stories/assets/Illustrations.stories.tsx +4 -0
  198. package/src/stories/homeItems/ViewingHomeItem.stories.tsx +1 -0
  199. package/src/stories/inboxTile/MessagePanel.stories.tsx +47 -0
  200. package/src/theme/colors.ts +4 -1
  201. package/src/utils/Animations.utils.ts +39 -0
  202. package/src/utils/Avatars.utils.ts +2 -2
  203. package/src/utils/index.ts +1 -0
@@ -0,0 +1,11 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Text, Stack, Grid } from '@chakra-ui/react';
3
+ import { HiddenField } from '../../../..';
4
+ import { fieldIcons } from '../../../../../helpers';
5
+ export const ReadOnlyGuidelines = ({ name, children, onClick, }) => {
6
+ return (_jsxs(Stack, { spacing: "base", children: [_jsx(Text, { fontSize: "xs", textTransform: "uppercase", children: name }), _jsx(Grid, { templateColumns: "repeat(2, minmax(80px, 1fr))", gap: "base", children: children === null || children === void 0 ? void 0 : children.map((child) => {
7
+ const { id, icon, value } = child;
8
+ const btnIcon = icon ? fieldIcons[icon] : '';
9
+ return (_jsx(HiddenField, { id: id, icon: btnIcon, name: value, onClick: () => onClick === null || onClick === void 0 ? void 0 : onClick(id) }, id));
10
+ }) })] }));
11
+ };
@@ -0,0 +1,33 @@
1
+ import { Text, Stack, Grid } from '@chakra-ui/react'
2
+ import { HiddenField } from '@/components'
3
+ import { ReadOnlyGuidelinesI } from '@/interfaces'
4
+ import { fieldIcons } from '@/helpers'
5
+
6
+ export const ReadOnlyGuidelines = ({
7
+ name,
8
+ children,
9
+ onClick,
10
+ }: ReadOnlyGuidelinesI) => {
11
+ return (
12
+ <Stack spacing="base">
13
+ <Text fontSize="xs" textTransform="uppercase">
14
+ {name}
15
+ </Text>
16
+ <Grid templateColumns="repeat(2, minmax(80px, 1fr))" gap="base">
17
+ {children?.map((child) => {
18
+ const { id, icon, value } = child
19
+ const btnIcon = icon ? fieldIcons[icon] : ''
20
+ return (
21
+ <HiddenField
22
+ key={id}
23
+ id={id}
24
+ icon={btnIcon}
25
+ name={value as string}
26
+ onClick={() => onClick?.(id)}
27
+ />
28
+ )
29
+ })}
30
+ </Grid>
31
+ </Stack>
32
+ )
33
+ }
@@ -6,5 +6,5 @@ export const ReadOnlyHomeItemImages = (props) => {
6
6
  const [mainImage, setMainImage] = useState(images === null || images === void 0 ? void 0 : images[0]);
7
7
  if (!images)
8
8
  return null;
9
- return (_jsxs(Stack, { spacing: "base", children: [_jsx(Image, { src: mainImage, alt: "home item", boxSize: "174px" }), _jsx(SimpleGrid, { columns: 4, spacing: "base", children: images === null || images === void 0 ? void 0 : images.map((image) => (_jsx(Box, { as: "button", backgroundImage: image, backgroundSize: "cover", backgroundPosition: "center", boxSize: "34px", onClick: () => setMainImage(image) }))) })] }));
9
+ return (_jsxs(Stack, { spacing: "base", children: [_jsx(Image, { src: mainImage, alt: "home item", boxSize: "174px" }), _jsx(SimpleGrid, { columns: 4, spacing: "base", children: images === null || images === void 0 ? void 0 : images.map((image) => (_jsx(Box, { as: "button", backgroundImage: image, backgroundSize: "cover", backgroundPosition: "center", boxSize: "34px", onClick: () => setMainImage(image) }, image))) })] }));
10
10
  };
@@ -14,6 +14,7 @@ export const ReadOnlyHomeItemImages = (props: Partial<ReportI>) => {
14
14
  <SimpleGrid columns={4} spacing="base">
15
15
  {images?.map((image) => (
16
16
  <Box
17
+ key={image}
17
18
  as="button"
18
19
  backgroundImage={image}
19
20
  backgroundSize="cover"
@@ -0,0 +1,2 @@
1
+ import { ReadOnlyGuidelinesI } from '../../../../../interfaces';
2
+ export declare const ReadOnlyItemRelated: ({ name, children, onClick, }: ReadOnlyGuidelinesI) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,11 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Text, Stack, Grid, Box } from '@chakra-ui/react';
3
+ import { HiddenField } from '../../../..';
4
+ import { fieldIcons } from '../../../../../helpers';
5
+ export const ReadOnlyItemRelated = ({ name, children, onClick, }) => {
6
+ return (_jsx(Box, { borderLeft: "1px solid", borderColor: "lightBlue.6", pl: "4", marginInlineStart: "auto", children: _jsxs(Stack, { spacing: "base", children: [_jsx(Text, { fontSize: "xs", textTransform: "uppercase", children: name }), _jsx(Grid, { templateColumns: "repeat(2, minmax(80px, 1fr))", gap: "base", children: children === null || children === void 0 ? void 0 : children.map((child) => {
7
+ const { id, icon, value } = child;
8
+ const btnIcon = icon ? fieldIcons[icon] : '';
9
+ return (_jsx(HiddenField, { id: id, icon: btnIcon, name: value, onClick: () => onClick === null || onClick === void 0 ? void 0 : onClick(id) }, id));
10
+ }) })] }) }));
11
+ };
@@ -0,0 +1,40 @@
1
+ import { Text, Stack, Grid, Box } from '@chakra-ui/react'
2
+ import { HiddenField } from '@/components'
3
+ import { ReadOnlyGuidelinesI } from '@/interfaces'
4
+ import { fieldIcons } from '@/helpers'
5
+
6
+ export const ReadOnlyItemRelated = ({
7
+ name,
8
+ children,
9
+ onClick,
10
+ }: ReadOnlyGuidelinesI) => {
11
+ return (
12
+ <Box
13
+ borderLeft="1px solid"
14
+ borderColor="lightBlue.6"
15
+ pl="4"
16
+ marginInlineStart="auto"
17
+ >
18
+ <Stack spacing="base">
19
+ <Text fontSize="xs" textTransform="uppercase">
20
+ {name}
21
+ </Text>
22
+ <Grid templateColumns="repeat(2, minmax(80px, 1fr))" gap="base">
23
+ {children?.map((child) => {
24
+ const { id, icon, value } = child
25
+ const btnIcon = icon ? fieldIcons[icon] : ''
26
+ return (
27
+ <HiddenField
28
+ key={id}
29
+ id={id}
30
+ icon={btnIcon}
31
+ name={value as string}
32
+ onClick={() => onClick?.(id)}
33
+ />
34
+ )
35
+ })}
36
+ </Grid>
37
+ </Stack>
38
+ </Box>
39
+ )
40
+ }
@@ -1,4 +1,6 @@
1
1
  export * from './ReadOnlyAppliances';
2
+ export * from './ReadOnlyGuidelines';
2
3
  export * from './ReadOnlyHomeItemImages';
3
4
  export * from './ReadOnlyHomeItemRating';
4
5
  export * from './ReadOnlyHomeItemText';
6
+ export * from './ReadOnlyItemRelated';
@@ -1,4 +1,6 @@
1
1
  export * from './ReadOnlyAppliances';
2
+ export * from './ReadOnlyGuidelines';
2
3
  export * from './ReadOnlyHomeItemImages';
3
4
  export * from './ReadOnlyHomeItemRating';
4
5
  export * from './ReadOnlyHomeItemText';
6
+ export * from './ReadOnlyItemRelated';
@@ -1,4 +1,6 @@
1
1
  export * from './ReadOnlyAppliances'
2
+ export * from './ReadOnlyGuidelines'
2
3
  export * from './ReadOnlyHomeItemImages'
3
4
  export * from './ReadOnlyHomeItemRating'
4
5
  export * from './ReadOnlyHomeItemText'
6
+ export * from './ReadOnlyItemRelated'
@@ -4,6 +4,7 @@ export * from './ReadOnlyImage';
4
4
  export * from './ReadOnlyGrid';
5
5
  export * from './ReadOnlyGroup';
6
6
  export * from './ReadOnlyInput';
7
+ export * from './ReadOnlyNotes';
7
8
  export * from './ReadOnlyRating';
8
9
  export * from './ReadOnlyTextArea';
9
10
  export * from './ReadOnlyWrapper';
@@ -4,6 +4,7 @@ export * from './ReadOnlyImage';
4
4
  export * from './ReadOnlyGrid';
5
5
  export * from './ReadOnlyGroup';
6
6
  export * from './ReadOnlyInput';
7
+ export * from './ReadOnlyNotes';
7
8
  export * from './ReadOnlyRating';
8
9
  export * from './ReadOnlyTextArea';
9
10
  export * from './ReadOnlyWrapper';
@@ -1,5 +1,5 @@
1
1
  import { PropsWithChildren } from 'react';
2
- export declare const HomeAssistantWrapper: ({ children, showAirplane, title, zIndex }: PropsWithChildren<{
2
+ export declare const HomeAssistantWrapper: ({ children, showAirplane, title, zIndex, }: PropsWithChildren<{
3
3
  showAirplane?: boolean;
4
4
  title: string;
5
5
  zIndex?: string;
@@ -1,10 +1,24 @@
1
1
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useEffect, useState } from 'react';
2
3
  import { Box, GridItem, Image } from '@chakra-ui/react';
3
- import { ContainerHeader, TileTooltip, moveRightToLeftWithFade, moveRightToLeft, moveLeftToRightAirplane, } from '..';
4
- import { Airplane, Cloud1, Cloud2, Cloud3, IA, TreesCrop, } from '../../assets/images';
5
- import { getImageAltText } from '../../utils';
4
+ import { ContainerHeader, TileTooltip, moveRightToLeftWithFade, moveRightToLeft, moveLeftToRightAirplane, WeatherTrees, } from '..';
5
+ import { Airplane, Cloud1, Cloud2, Cloud3, IA } from '../../assets/images';
6
+ import { getTimeOfDay, getTimeOfDaySeason, } from '../../utils';
6
7
  import { colors } from '../../theme/colors';
7
- export const HomeAssistantWrapper = ({ children, showAirplane, title, zIndex }) => {
8
- const treesAlt = getImageAltText(TreesCrop);
9
- return (_jsx(GridItem, { colSpan: [1, 2], zIndex: zIndex, children: _jsx(TileTooltip, { label: "homeAssistant", children: _jsxs(Box, { bgGradient: colors.skyGradient, boxShadow: "base", h: "full", position: "relative", overflow: "hidden", children: [_jsx(ContainerHeader, { title: title, titleIcon: IA }), _jsx(_Fragment, { children: children }), _jsx(Image, { src: Cloud1, position: "absolute", w: "auto", h: "80px", top: "80px", animation: `${moveRightToLeftWithFade} 400s linear infinite` }), _jsx(Image, { src: Cloud2, position: "absolute", w: "auto", h: "112px", top: "150px", animation: `${moveRightToLeft} 200s linear infinite` }), _jsx(Image, { src: Cloud3, position: "absolute", w: "auto", h: "160px", top: "200px", animation: `${moveRightToLeft} 130s linear infinite` }), showAirplane && (_jsx(Image, { src: Airplane, position: "absolute", w: "auto", h: "40px", top: "85px", animation: `${moveLeftToRightAirplane} 500s cubic-bezier(1, 1, 1, 500) infinite` })), _jsx(Image, { src: TreesCrop, alt: treesAlt, position: "absolute", bottom: "0", right: "2", w: "auto", h: "70px" })] }) }) }));
8
+ export const HomeAssistantWrapper = ({ children, showAirplane, title, zIndex, }) => {
9
+ const [timeOfDay, setTimeOfDay] = useState(getTimeOfDay());
10
+ const timeOfDaySeason = getTimeOfDaySeason();
11
+ const gradients = {
12
+ day: colors.dayGradient,
13
+ evening: colors.eveningGradient,
14
+ morning: colors.morningGradient,
15
+ night: colors.nightGradient,
16
+ };
17
+ useEffect(() => {
18
+ const interval = setInterval(() => {
19
+ setTimeOfDay(getTimeOfDay());
20
+ }, 60000);
21
+ return () => clearInterval(interval);
22
+ }, []);
23
+ return (_jsx(GridItem, { colSpan: [1, 2], zIndex: zIndex, children: _jsx(TileTooltip, { label: "homeAssistant", children: _jsxs(Box, { bgGradient: gradients[timeOfDay], boxShadow: "base", h: "full", position: "relative", overflow: "hidden", transition: "background 1s ease-in-out", children: [_jsx(ContainerHeader, { title: title, titleIcon: IA }), _jsx(_Fragment, { children: children }), _jsx(Image, { src: Cloud1, position: "absolute", w: "auto", h: "80px", top: "80px", animation: `${moveRightToLeftWithFade} 400s linear infinite` }), _jsx(Image, { src: Cloud2, position: "absolute", w: "auto", h: "112px", top: "150px", animation: `${moveRightToLeft} 200s linear infinite` }), _jsx(Image, { src: Cloud3, position: "absolute", w: "auto", h: "160px", top: "200px", animation: `${moveRightToLeft} 130s linear infinite` }), showAirplane && (_jsx(Image, { src: Airplane, position: "absolute", w: "auto", h: "40px", top: "85px", animation: `${moveLeftToRightAirplane} 500s cubic-bezier(1, 1, 1, 500) infinite` })), _jsx(WeatherTrees, { timeOfDaySeason: timeOfDaySeason, position: "absolute", bottom: "0", right: "2", w: "auto", h: "100px" })] }) }) }));
10
24
  };
@@ -1,2 +1,2 @@
1
1
  import { ViewingHomeItemPanelI } from '../../interfaces';
2
- export declare const ViewingHomeItemPanel: ({ form, onClose, onEdit, }: ViewingHomeItemPanelI) => import("react/jsx-runtime").JSX.Element;
2
+ export declare const ViewingHomeItemPanel: ({ form, onClick, onClose, onEdit, }: ViewingHomeItemPanelI) => import("react/jsx-runtime").JSX.Element;
@@ -3,7 +3,7 @@ import { t } from 'i18next';
3
3
  import { Box, Divider, DrawerContent, DrawerHeader } from '@chakra-ui/react';
4
4
  import { PanelHeader, ReadOnlyDynamicForm, TabsHeader } from '..';
5
5
  import { Painting } from '../../assets/images';
6
- export const ViewingHomeItemPanel = ({ form, onClose, onEdit, }) => {
6
+ export const ViewingHomeItemPanel = ({ form, onClick, onClose, onEdit, }) => {
7
7
  const tabs = [
8
8
  {
9
9
  label: t('contacts.details'),
@@ -20,5 +20,5 @@ export const ViewingHomeItemPanel = ({ form, onClose, onEdit, }) => {
20
20
  component: _jsx("div", {}),
21
21
  },
22
22
  ];
23
- return (_jsxs(DrawerContent, { bg: "lightBlue.1", children: [_jsxs(DrawerHeader, { p: "0", children: [_jsx(PanelHeader, { handleCloseButton: onClose, title: t('homeItems.title'), icon: Painting }), _jsx(Divider, {}), _jsx(Box, { pt: "1", bg: "neutral.white", children: _jsx(TabsHeader, { tabList: tabs, rightTabList: rightTabs }) })] }), _jsx(ReadOnlyDynamicForm, { form: form, onEdit: onEdit })] }));
23
+ return (_jsxs(DrawerContent, { bg: "lightBlue.1", children: [_jsxs(DrawerHeader, { p: "0", children: [_jsx(PanelHeader, { handleCloseButton: onClose, title: t('homeItems.title'), icon: Painting }), _jsx(Divider, {}), _jsx(Box, { pt: "1", bg: "neutral.white", children: _jsx(TabsHeader, { tabList: tabs, rightTabList: rightTabs }) })] }), _jsx(ReadOnlyDynamicForm, { form: form, onClick: onClick, onEdit: onEdit })] }));
24
24
  };
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { t } from 'i18next';
3
- import { AspectRatio, Flex, Text, Image } from '@chakra-ui/react';
3
+ import { AspectRatio, Flex, Text, Image, chakra } from '@chakra-ui/react';
4
4
  import { IA } from '../../assets/images';
5
5
  export const InboxForwardBanner = () => {
6
- return (_jsxs(Flex, { p: "base", gap: "base", align: "center", bg: "lightBlue.2", children: [_jsx(AspectRatio, { ratio: 1, minW: "35px", h: "auto", children: _jsx(Image, { src: IA, alt: "IA" }) }), _jsxs(Text, { variant: "home", lineHeight: "1", children: [t('inbox.forwardTo'), _jsx(Text, { variant: "home", lineHeight: "1", color: "neutral.black", fontWeight: "bold", display: "inline", children: "homefileit@homefile.com." })] })] }));
6
+ return (_jsxs(Flex, { p: "base", gap: "base", align: "center", bg: "lightBlue.2", children: [_jsx(AspectRatio, { ratio: 1, minW: "35px", h: "auto", children: _jsx(Image, { src: IA, alt: "IA" }) }), _jsxs(Text, { variant: "home", lineHeight: "1", children: [t('inbox.forwardTo'), _jsx(chakra.span, { fontFamily: "secondary", fontSize: "sm", lineHeight: "1", color: "neutral.black", fontWeight: "bold", display: "inline", children: "homefileit@homefile.com." })] })] }));
7
7
  };
@@ -1,3 +1,4 @@
1
+ export * from './panel';
1
2
  export * from './InboxCard';
2
3
  export * from './InboxForwardBanner';
3
4
  export * from './InboxTile';
@@ -1,3 +1,4 @@
1
+ export * from './panel';
1
2
  export * from './InboxCard';
2
3
  export * from './InboxForwardBanner';
3
4
  export * from './InboxTile';
@@ -0,0 +1,2 @@
1
+ import { MessageCardI } from '../../../interfaces';
2
+ export declare const MessageCard: ({ message, onClick, variant, }: MessageCardI) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,14 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { t } from 'i18next';
3
+ import { Avatar, Box, Center, chakra, Container, Divider, Flex, Stack, Text, } from '@chakra-ui/react';
4
+ import { ChatBubble } from '../../../assets/images';
5
+ import { TextBadge } from '../..';
6
+ import { formatDateWithAt } from '../../../utils';
7
+ export const MessageCard = ({ message, onClick, variant = 'inbox', }) => {
8
+ const { currentUser, from, subject, date, isNew, chatReplies, description } = message;
9
+ const formattedDate = formatDateWithAt({ date });
10
+ const showChatBubble = Number(chatReplies === null || chatReplies === void 0 ? void 0 : chatReplies.length) > 0;
11
+ const isInbox = variant === 'inbox';
12
+ const isCurrentUser = (currentUser === null || currentUser === void 0 ? void 0 : currentUser.userName) === from;
13
+ return (_jsxs(Flex, { gap: "base", children: [!isCurrentUser && !isInbox && (_jsx(Avatar, { size: "sm", name: from, bg: "blue.4", fontWeight: "bold", color: "neutral.white" })), _jsx(Container, { as: isInbox ? 'button' : 'div', bg: isCurrentUser ? 'yellow.6' : 'neutral.white', transition: "background-color 0.3s", textAlign: "left", _hover: isInbox ? { bg: 'lightGreen.1' } : {}, onClick: () => onClick === null || onClick === void 0 ? void 0 : onClick(message), children: _jsxs(Box, { children: [!isCurrentUser && (_jsxs(Flex, { justify: "space-between", align: "center", py: "1", pr: "base", pl: isNew ? '' : 'base', children: [_jsxs(Flex, { gap: "base", align: "center", position: "relative", left: isNew ? '-13px' : '', children: [isNew && isInbox && (_jsx(TextBadge, { text: "New", showAnimation: false, bgColor: "violet.1" })), _jsxs(Text, { variant: "home", color: "gray.1", children: [t('inbox.from'), _jsx(chakra.span, { color: "gray.4", children: from })] })] }), _jsx(Text, { variant: "home", fontSize: "xs", children: formattedDate })] })), isInbox && _jsx(Divider, {}), _jsxs(Stack, { spacing: "base", p: "base", children: [_jsxs(Flex, { align: "center", justify: "space-between", children: [_jsx(Text, { variant: "home", fontWeight: "bold", children: subject }), showChatBubble && isInbox && (_jsx(Center, { backgroundImage: `url(${ChatBubble})`, backgroundRepeat: "no-repeat", backgroundSize: "contain", backgroundPosition: "bottom", w: "20px", h: "24px", children: _jsx(Text, { fontSize: "10px", color: "blue.2", fontWeight: "bold", children: chatReplies === null || chatReplies === void 0 ? void 0 : chatReplies.length }) }))] }), isInbox && (_jsx(Text, { variant: "home", noOfLines: 3, textOverflow: "ellipsis", children: description })), !isInbox && _jsx(Text, { variant: "home", children: description })] })] }) })] }));
14
+ };
@@ -0,0 +1,4 @@
1
+ import { MessageChatPanelI } from '../../../interfaces';
2
+ import 'react-quill/dist/quill.snow.css';
3
+ import '../../../styles/quill.css';
4
+ export declare const MessageChatPanel: ({ message, onBack, onClose, onReply, }: MessageChatPanelI) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,38 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useState } from 'react';
3
+ import { t } from 'i18next';
4
+ import { Box, DrawerBody, DrawerContent, DrawerFooter, DrawerHeader, Stack, Text, } from '@chakra-ui/react';
5
+ import QuillEditor from 'react-quill';
6
+ import { Document2 } from '../../../assets/images';
7
+ import { BackCircleButton, FooterButtons, MessageCard, PanelHeader, up, WrapperWithShadow, } from '../..';
8
+ import 'react-quill/dist/quill.snow.css';
9
+ import '../../../styles/quill.css';
10
+ export const MessageChatPanel = ({ message, onBack, onClose, onReply, }) => {
11
+ var _a, _b;
12
+ const [value, setValue] = useState('');
13
+ const onChange = (content) => {
14
+ setValue(content);
15
+ };
16
+ return (_jsxs(DrawerContent, { bg: "lightBlue.1", children: [_jsx(DrawerHeader, { p: "0", children: _jsx(PanelHeader, { handleCloseButton: onClose, title: (_a = message === null || message === void 0 ? void 0 : message.from) !== null && _a !== void 0 ? _a : '', icon: Document2 }) }), _jsxs(DrawerBody, { p: "0", children: [_jsx(Box, { bg: "lightBlue.2", py: "2", px: "base", children: _jsx(BackCircleButton, { onClick: onBack }) }), _jsx(Stack, { spacing: "base", p: "base", pb: "4", children: (_b = message === null || message === void 0 ? void 0 : message.chatReplies) === null || _b === void 0 ? void 0 : _b.map((reply) => (_jsx(MessageCard, { message: Object.assign(Object.assign({}, reply), { currentUser: message.currentUser }), variant: "chat" }, reply._id))) })] }), _jsx(DrawerFooter, { p: "0", maxH: "400px", children: _jsx(WrapperWithShadow, { animation: up, fadeDelay: 0.2, children: _jsxs(Stack, { spacing: "base", children: [_jsx(Text, { children: t('inbox.createReply') }), _jsx(QuillEditor, { theme: "snow", value: value, modules: { toolbar }, onChange: onChange, placeholder: t('inbox.enterContent') }), _jsx(FooterButtons, { px: "0", button1: {
17
+ buttonStyle: 'secondaryFooter',
18
+ label: t('buttons.send'),
19
+ isDisabled: Number(value.length) === 0,
20
+ onClick: () => {
21
+ var _a;
22
+ return onReply({
23
+ id: (_a = message === null || message === void 0 ? void 0 : message._id) !== null && _a !== void 0 ? _a : '',
24
+ message: value,
25
+ });
26
+ },
27
+ } })] }) }) })] }));
28
+ };
29
+ const toolbar = [
30
+ ['bold', 'italic', 'underline', 'strike'],
31
+ ['blockquote', 'link', 'image'],
32
+ [{ list: 'ordered' }, { list: 'bullet' }, { list: 'check' }],
33
+ [{ script: 'sub' }, { script: 'super' }],
34
+ [{ indent: '-1' }, { indent: '+1' }],
35
+ [{ header: [1, 2, 3, 4, 5, 6, false] }],
36
+ [{ color: [] }, { background: [] }],
37
+ ['clean'],
38
+ ];
@@ -0,0 +1,2 @@
1
+ import { MessagePanelI } from '../../../interfaces';
2
+ export declare const MessagePanel: ({ messages, onClick, onClose }: MessagePanelI) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,12 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { t } from 'i18next';
3
+ import { Box, DrawerBody, DrawerContent, DrawerHeader, Stack, } from '@chakra-ui/react';
4
+ import { Inbox } from '../../../assets/images';
5
+ import { BaseCounter, MessageCard, PanelHeader, SelectInput, } from '../..';
6
+ import { useMessagePanel } from '../../../hooks';
7
+ import { pluralize } from '../../../utils';
8
+ export const MessagePanel = ({ messages, onClick, onClose }) => {
9
+ const { currentSort, sortedMessages, handleSelectItem, items } = useMessagePanel(messages);
10
+ const baseCounterText = `${t('counter.showing')} ${sortedMessages.length} ${t('counter.of')} ${messages.length} ${pluralize(sortedMessages.length, t('inbox.message').toLowerCase())} `;
11
+ return (_jsxs(DrawerContent, { bg: "lightBlue.1", children: [_jsx(DrawerHeader, { p: "0", children: _jsx(PanelHeader, { handleCloseButton: onClose, title: t('inbox.message'), icon: Inbox }) }), _jsx(DrawerBody, { p: "0", children: _jsxs(Stack, { spacing: "base", pb: "4", children: [_jsx(Box, { p: "base", bg: "lightBlue.2", children: _jsx(SelectInput, { handleClick: handleSelectItem, initialValue: currentSort, items: items }) }), _jsx(Box, { px: "base", children: _jsx(BaseCounter, { text: baseCounterText }) }), _jsx(Stack, { spacing: "1", pl: "26px", pr: "base", children: sortedMessages.map((message) => (_jsx(MessageCard, { message: message, onClick: onClick }, message._id))) })] }) })] }));
12
+ };
@@ -0,0 +1,3 @@
1
+ export * from './MessageCard';
2
+ export * from './MessageChatPanel';
3
+ export * from './MessagePanel';
@@ -0,0 +1,3 @@
1
+ export * from './MessageCard';
2
+ export * from './MessageChatPanel';
3
+ export * from './MessagePanel';
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { Stack, Fade } from '@chakra-ui/react';
3
3
  export const WrapperWithShadow = ({ animation, children, fadeDelay = 0.3, }) => {
4
- return (_jsx(Stack, { spacing: "base", p: "base", borderTopRadius: "xl", bg: "neutral.white", animation: animation, h: "full", overflowY: "scroll", pb: "3rem", children: _jsx(Fade, { delay: fadeDelay, in: true, children: children }) }));
4
+ return (_jsx(Stack, { w: "full", spacing: "base", p: "base", borderTopRadius: "xl", bg: "neutral.white", animation: animation, h: "full", overflowY: "scroll", pb: "3rem", children: _jsx(Fade, { delay: fadeDelay, in: true, children: children }) }));
5
5
  };
@@ -1,2 +1,3 @@
1
1
  import { AddHomeContentI } from '../../../interfaces';
2
+ export declare const up: string;
2
3
  export declare const MyHomeDetails: ({ handleCreateHomeClick, handleSkipClick, isFirstHome, showExternalLink, userFirstName, values, isLoading, }: AddHomeContentI) => import("react/jsx-runtime").JSX.Element;
@@ -12,7 +12,7 @@ const upAnimation = keyframes `
12
12
  from { transform: translateY(50%) }
13
13
  to { transform: translateY(0); box-shadow: 0 -5px 10px rgba(0, 0, 0, 0.07)}
14
14
  `;
15
- const up = `${upAnimation} 200ms ease forwards`;
15
+ export const up = `${upAnimation} 200ms ease forwards`;
16
16
  export const MyHomeDetails = ({ handleCreateHomeClick, handleSkipClick, isFirstHome = false, showExternalLink, userFirstName = '', values, isLoading, }) => {
17
17
  const { handleErrorMessage, handleLinkChange, handleNameChange, handleNameValidation, handleSelectRecords, handleSubmit, isOwner, group, ownRadio, rentRadio, } = useAddHouseContent(values, handleCreateHomeClick);
18
18
  const { externalLink, name, isNameValid, searchRecords } = useSnapshot(firstHomeProxy, { sync: true });
@@ -1,2 +1,2 @@
1
1
  import { NotificationCardI, NotificationsPanelI } from '../../interfaces';
2
- export declare const NotificationCard: ({ _id, createdAt, message, onDismiss, status, type, }: NotificationCardI & Pick<NotificationsPanelI, "onDismiss">) => import("react/jsx-runtime").JSX.Element;
2
+ export declare const NotificationCard: ({ _id, createdAt, label, message, onDismiss, status, }: NotificationCardI & Pick<NotificationsPanelI, "onDismiss">) => import("react/jsx-runtime").JSX.Element;
@@ -1,53 +1,8 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { t } from 'i18next';
3
2
  import { Container, Flex, IconButton, Stack, Text } from '@chakra-ui/react';
4
3
  import { Close } from '..';
5
4
  import { formatDateWithAt } from '../../utils';
6
- export const NotificationCard = ({ _id, createdAt, message, onDismiss, status, type, }) => {
7
- const actionLabels = {
8
- contact: {
9
- added: `${t('notifications.types.contact')} ${t('notifications.status.added')}`,
10
- removed: `${t('notifications.types.contact')} ${t('notifications.status.removed')}`,
11
- shared: `${t('notifications.status.shared')} ${t('notifications.types.contact')}`,
12
- updated: `${t('notifications.types.contact')} ${t('notifications.status.updated')}`,
13
- },
14
- file: {
15
- added: `${t('notifications.types.file')} ${t('notifications.status.added')}`,
16
- removed: `${t('notifications.types.file')} ${t('notifications.status.removed')}`,
17
- shared: `${t('notifications.status.shared')} ${t('notifications.types.file')}`,
18
- updated: `${t('notifications.types.file')} ${t('notifications.status.updated')}`,
19
- },
20
- folder: {
21
- added: `${t('notifications.types.folder')} ${t('notifications.status.added')}`,
22
- removed: `${t('notifications.types.folder')} ${t('notifications.status.removed')}`,
23
- shared: `${t('notifications.status.shared')} ${t('notifications.types.folder')}`,
24
- updated: `${t('notifications.types.folder')} ${t('notifications.status.updated')}`,
25
- },
26
- payment: {
27
- added: `${t('notifications.types.payment')} ${t('notifications.status.added')}`,
28
- removed: `${t('notifications.types.payment')} ${t('notifications.status.removed')}`,
29
- shared: `${t('notifications.status.shared')} ${t('notifications.types.payment')}`,
30
- updated: `${t('notifications.types.payment')} ${t('notifications.status.updated')}`,
31
- },
32
- receipt: {
33
- added: `${t('notifications.types.receipt')} ${t('notifications.status.added')}`,
34
- removed: `${t('notifications.types.receipt')} ${t('notifications.status.removed')}`,
35
- shared: `${t('notifications.status.shared')} ${t('notifications.types.receipt')}`,
36
- updated: `${t('notifications.types.receipt')} ${t('notifications.status.updated')}`,
37
- },
38
- tile: {
39
- added: `${t('notifications.types.tile')} ${t('notifications.status.added')}`,
40
- removed: `${t('notifications.types.tile')} ${t('notifications.status.removed')}`,
41
- shared: `${t('notifications.status.shared')} ${t('notifications.types.tile')}`,
42
- updated: `${t('notifications.types.tile')} ${t('notifications.status.updated')}`,
43
- },
44
- user: {
45
- added: `${t('notifications.types.user')} ${t('notifications.status.added')}`,
46
- removed: `${t('notifications.types.user')} ${t('notifications.status.removed')}`,
47
- shared: `${t('notifications.status.shared')} ${t('notifications.types.user')}`,
48
- updated: `${t('notifications.types.user')} ${t('notifications.status.updated')}`,
49
- },
50
- };
5
+ export const NotificationCard = ({ _id, createdAt, label, message, onDismiss, status, }) => {
51
6
  const bgColors = {
52
7
  added: 'lightGreen.3',
53
8
  removed: 'error.1',
@@ -60,5 +15,5 @@ export const NotificationCard = ({ _id, createdAt, message, onDismiss, status, t
60
15
  shared: 'yellow.1',
61
16
  updated: 'lightBlue.9',
62
17
  };
63
- return (_jsx(Container, { p: "2", bg: bgColors[status], children: _jsxs(Stack, { spacing: "3", children: [_jsxs(Flex, { justify: "space-between", align: "center", children: [_jsx(Text, { fontSize: "10px", fontWeight: "semibold", textTransform: "uppercase", color: colors[status], children: actionLabels[type][status] }), _jsxs(Flex, { gap: "1", align: "center", children: [_jsx(Text, { variant: "date", children: formatDateWithAt({ date: createdAt }) }), _jsx(IconButton, { variant: "ghost", "aria-label": "close", maxW: "fit-content", onClick: () => onDismiss(_id), icon: _jsx(Close, { size: 11 }) })] })] }), _jsx(Text, { fontSize: "sm", fontFamily: "secondary", children: message })] }) }));
18
+ return (_jsx(Container, { p: "2", bg: bgColors[status], children: _jsxs(Stack, { spacing: "3", children: [_jsxs(Flex, { justify: "space-between", align: "center", children: [_jsx(Text, { fontSize: "10px", fontWeight: "semibold", textTransform: "uppercase", color: colors[status], children: label }), _jsxs(Flex, { gap: "1", align: "center", children: [_jsx(Text, { variant: "date", children: formatDateWithAt({ date: createdAt }) }), _jsx(IconButton, { variant: "ghost", "aria-label": "close", maxW: "fit-content", onClick: () => onDismiss(_id), icon: _jsx(Close, { size: 11 }) })] })] }), _jsx(Text, { fontSize: "sm", fontFamily: "secondary", children: message })] }) }));
64
19
  };
@@ -1,11 +1,9 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { t } from 'i18next';
3
- import { Box, Flex, Text, chakra } from '@chakra-ui/react';
4
- import { BeatLoader } from 'react-spinners';
5
- import { colors } from '../../theme/colors';
6
3
  import { pluralize } from '../../utils';
4
+ import { BaseCounter } from '..';
7
5
  export const VideosCounter = ({ totalVideos, uploading }) => {
8
6
  const videos = pluralize(totalVideos, t('roomVideo.more'));
9
7
  const text = `${t('roomVideo.youCan')} ${totalVideos} ${videos}`;
10
- return (_jsx(Box, { w: "100%", children: _jsxs(Flex, { justify: "space-between", align: "center", children: [!uploading && _jsx(Text, { variant: "home", children: text }), uploading && (_jsxs(Text, { variant: "home", children: [_jsx(chakra.span, { fontWeight: "bold", children: t('folderSharing.uploading') }), _jsx(chakra.span, { ml: "2", children: _jsx(BeatLoader, { size: "4px", color: colors.blue[6] }) })] }))] }) }));
8
+ return (_jsx(BaseCounter, { text: text, uploading: uploading, uploadingText: videos }));
11
9
  };
@@ -1,8 +1,9 @@
1
- import { Paint, Receipt, Barcode, GoldenBars, Heart, Rating, Notes, Book, ImgIcon, Registry, ShareWith, Calendar, Contacts, Tools2, Billing, Calc, CheckPen, GenericField, Price, Battery2, Co2, Detector, Electricity, Sprinkler, SixtyEight, DropCalendar, MobileDrop, SolarPanel, Calendar2, Drop, Wind, Foundation, Heater, Light, Plate, Pool2, Closet, Structure, GlassWater, Roof2, Target, CircleFace, Company, Pressure, WindowCleaning, RoofCleaning, HolidayLights, GutterCleaning, HomeCleaning, HouseWashing, PressureWasher, } from '../../assets/images';
1
+ import { Paint, Receipt, Barcode, GoldenBars, Heart, Rating, Notes, Book, ImgIcon, Registry, ShareWith, Calendar, Contacts, Tools2, Billing, Calc, CheckPen, GenericField, Price, Battery2, Co2, Detector, Electricity, Sprinkler, SixtyEight, DropCalendar, MobileDrop, SolarPanel, Calendar2, Drop, Wind, Foundation, Heater, Light, Plate, Pool2, Closet, Structure, GlassWater, Roof2, Target, CircleFace, Company, Pressure, WindowCleaning, RoofCleaning, HolidayLights, GutterCleaning, HomeCleaning, HouseWashing, PressureWasher, BookOpened, } from '../../assets/images';
2
2
  export const fieldIcons = {
3
3
  barcode: Barcode,
4
4
  billing: Billing,
5
5
  book: Book,
6
+ 'book-opened': BookOpened,
6
7
  calc: Calc,
7
8
  check: CheckPen,
8
9
  contact: Contacts,
@@ -0,0 +1 @@
1
+ export * from './useMessagePanel';
@@ -0,0 +1 @@
1
+ export * from './useMessagePanel';
@@ -0,0 +1,7 @@
1
+ import { InboxMessageI, SelectItemI } from '../../interfaces';
2
+ export declare const useMessagePanel: (messages: InboxMessageI[]) => {
3
+ currentSort: string;
4
+ sortedMessages: InboxMessageI[];
5
+ handleSelectItem: (item: string | SelectItemI<string>) => void;
6
+ items: string[];
7
+ };
@@ -0,0 +1,17 @@
1
+ import { t } from 'i18next';
2
+ import { useState } from 'react';
3
+ export const useMessagePanel = (messages) => {
4
+ const [sortedMessages, setSortedMessages] = useState(messages);
5
+ const [currentSort, setCurrentSort] = useState(t('forms.sortBy'));
6
+ const handleSelectItem = (item) => {
7
+ if (typeof item !== 'string')
8
+ return;
9
+ setCurrentSort(item);
10
+ if (item === t('forms.sortBy')) {
11
+ return setSortedMessages(messages);
12
+ }
13
+ setSortedMessages(messages.filter((message) => message.isNew));
14
+ };
15
+ const items = [t('forms.sortBy'), t('forms.new')];
16
+ return { currentSort, sortedMessages, handleSelectItem, items };
17
+ };
@@ -9,6 +9,7 @@ export * from './folderPanel';
9
9
  export * from './forms';
10
10
  export * from './help';
11
11
  export * from './homeBoard';
12
+ export * from './inbox';
12
13
  export * from './inputs';
13
14
  export * from './launchpad';
14
15
  export * from './myHomes';
@@ -9,6 +9,7 @@ export * from './folderPanel';
9
9
  export * from './forms';
10
10
  export * from './help';
11
11
  export * from './homeBoard';
12
+ export * from './inbox';
12
13
  export * from './inputs';
13
14
  export * from './launchpad';
14
15
  export * from './myHomes';
@@ -18,11 +18,6 @@ export const useNotificationsPanel = ({ notifications, }) => {
18
18
  };
19
19
  const items = [
20
20
  t('forms.sortBy'),
21
- t('notifications.types.contact'),
22
- t('notifications.types.file'),
23
- t('notifications.types.folder'),
24
- t('notifications.types.payment'),
25
- t('notifications.types.receipt'),
26
21
  t('notifications.status.added'),
27
22
  t('notifications.status.removed'),
28
23
  t('notifications.status.shared'),
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export { ActivateAccount, ActiveSubscription, AddCardBanner, AddEditContactPanel, AddFolder, AddHomeContent, AddHomeItem, AddHomeItemHeader, AddMedia, AddPropertyRecords, Address, AddPopup, AddTile, AlertBanner, AphwTile, AppBar, AssignableReceipts, BackHeader, BarDivider, CancelAccount, CatalogPopup, CloudsAnimation, ContactList, ContactsContent, ContainerHeader, CreateDocumentHeader, CreateHouseholdItemHeader, CreditCardContainer, CreditCardError, CustomerTile, DeleteBanner, DisplayFiles, DisplayFilesDetail, DisplayOptions, DisplayReceipts, DocumentMenu, DocumentNameHeader, DocumentPreview, DynamicForm, EditAccountType, EditHomeBody, EditHomeFooter, EditHomeHeader, EditHomePanel, EmailPermissions, EmailValidation, Feedback, FileDetail, FilesUploader, FlowStep, FolderDetail, FolderDetailBody, FolderDetailContent, FolderDetailFooter, FolderDetailHeader, FolderInfo, FolderSharing, FolderTypeSelection, FooterButtons, FooterDrawer, GenericBackHeader, GroupCard, GroupsContainer, GroupsHeader, Header, HelpContent, HomeAssistant, HomeAssistantPanel, HomeBoardGrid, HomeBoardTour, HomeCard, HomeCardWithRecipent, HomefileMonitoring, HomeHeader, HomeMonitor, HomeMonitorSteps, HomeSharedWith, InboxForwardBanner, InboxTile, ItemNameHeader, ItemsReviewBanner, ItemSubTypeSelect, Launchpad, LaunchpadAutofilerBanner, LaunchpadReceiptAutofiler, LaunchpadTour, LeftPanel, MediaDetailsStep, MonitorAlerts, MonthlyCharge, MortgageInfo, MoveModal, MyHomes, MyProfileContent, MyProfileFooter, MyProfilePanel, NewCreditCard, NewCreditCardHeader, NewPassword, NotBeChargedBanner, Notifications, NotificationsReminder, NotificationsPanel, NotificationCard, Overlay, PanelHeader, PartnerActiveSubscription, PartnerCatalogPanel, PartnerContent, PartnerCustomerCode, PartnerDetails, PartnerImages, PartnerPanel, PasswordInput, PaymentReceipts, PdfButton, PeopleConnected, ProfileDetailsTab, ProfilePaymentTab, ProjectList, PropertyRecords, PropertyTaxes, ReadOnlyDynamicForm, ReadOnlyImage, ReadOnlyToggle, ReceiptAutofiler, ReceiptBody, ReceiptContent, ReceiptDetails, ReceiptFilters, ReceiptFooter, ReceiptHeader, ReceiptInfos, ReceiptItem, ReceiptItems, ReceiptPDF, ReceiptsDisplayOptions, ReceiptsFiled, ReceiptsHeader, ReceiptsInfo, ReceiptsReceivedContent, RecipientForm, RecipientsToShare, RecipientTab, RecordsInputs, ResendResetPassword, ResetPassword, ReviewBanner, RightPanel, RolePermissionsTab, RoomHeader, RoomsBoardTour, RoomsMenu, RoomsMenuMobile, RoomStep, RoomVideo, SalesTax, SatisfactionTile, SectionHeader, SendCommunication, ShareContactsContent, SharedAccounts, SharedHomeContent, SharedHomeHeader, ShareHome, ShareHomeConnections, ShareHomeForm, ShineTile, ShortPartnerTile, SignIn, SignUp, StepHeader, StorageUsed, Subscription, SubscriptionCard, SubscriptionTable, Summary, TabsHeader, TextInput, ToBeDeletedBody, ToBeDeletedContent, ToBeDeletedFooter, ToBeDeletedHeader, TourButton, Trash, TrendingValue, TrialBanner, TutorialsButton, TwoFactor, TwoFactorSetting, UpdateList, UserDetails, ValueMonitor, ViewContactPanel, VideoPlayer, VideoPlayerModal, WellDone, YtdTile, } from './components';
1
+ export { ActivateAccount, ActiveSubscription, AddCardBanner, AddEditContactPanel, AddFolder, AddHomeContent, AddHomeItem, AddHomeItemHeader, AddMedia, AddPropertyRecords, Address, AddPopup, AddTile, AlertBanner, AphwTile, AppBar, AssignableReceipts, BackHeader, BarDivider, CancelAccount, CatalogPopup, CloudsAnimation, ContactList, ContactsContent, ContainerHeader, CreateDocumentHeader, CreateHouseholdItemHeader, CreditCardContainer, CreditCardError, CustomerTile, DeleteBanner, DisplayFiles, DisplayFilesDetail, DisplayOptions, DisplayReceipts, DocumentMenu, DocumentNameHeader, DocumentPreview, DynamicForm, EditAccountType, EditHomeBody, EditHomeFooter, EditHomeHeader, EditHomePanel, EmailPermissions, EmailValidation, Feedback, FileDetail, FilesUploader, FlowStep, FolderDetail, FolderDetailBody, FolderDetailContent, FolderDetailFooter, FolderDetailHeader, FolderInfo, FolderSharing, FolderTypeSelection, FooterButtons, FooterDrawer, GenericBackHeader, GroupCard, GroupsContainer, GroupsHeader, Header, HelpContent, HomeAssistant, HomeAssistantPanel, HomeBoardGrid, HomeBoardTour, HomeCard, HomeCardWithRecipent, HomefileMonitoring, HomeHeader, HomeMonitor, HomeMonitorSteps, HomeSharedWith, InboxForwardBanner, InboxTile, ItemNameHeader, ItemsReviewBanner, ItemSubTypeSelect, Launchpad, LaunchpadAutofilerBanner, LaunchpadReceiptAutofiler, LaunchpadTour, LeftPanel, MediaDetailsStep, MessagePanel, MessageChatPanel, MonitorAlerts, MonthlyCharge, MortgageInfo, MoveModal, MyHomes, MyProfileContent, MyProfileFooter, MyProfilePanel, NewCreditCard, NewCreditCardHeader, NewPassword, NotBeChargedBanner, Notifications, NotificationsReminder, NotificationsPanel, NotificationCard, Overlay, PanelHeader, PartnerActiveSubscription, PartnerCatalogPanel, PartnerContent, PartnerCustomerCode, PartnerDetails, PartnerImages, PartnerPanel, PasswordInput, PaymentReceipts, PdfButton, PeopleConnected, ProfileDetailsTab, ProfilePaymentTab, ProjectList, PropertyRecords, PropertyTaxes, ReadOnlyDynamicForm, ReadOnlyImage, ReadOnlyToggle, ReceiptAutofiler, ReceiptBody, ReceiptContent, ReceiptDetails, ReceiptFilters, ReceiptFooter, ReceiptHeader, ReceiptInfos, ReceiptItem, ReceiptItems, ReceiptPDF, ReceiptsDisplayOptions, ReceiptsFiled, ReceiptsHeader, ReceiptsInfo, ReceiptsReceivedContent, RecipientForm, RecipientsToShare, RecipientTab, RecordsInputs, ResendResetPassword, ResetPassword, ReviewBanner, RightPanel, RolePermissionsTab, RoomHeader, RoomsBoardTour, RoomsMenu, RoomsMenuMobile, RoomStep, RoomVideo, SalesTax, SatisfactionTile, SectionHeader, SendCommunication, ShareContactsContent, SharedAccounts, SharedHomeContent, SharedHomeHeader, ShareHome, ShareHomeConnections, ShareHomeForm, ShineTile, ShortPartnerTile, SignIn, SignUp, StepHeader, StorageUsed, Subscription, SubscriptionCard, SubscriptionTable, Summary, TabsHeader, TextInput, ToBeDeletedBody, ToBeDeletedContent, ToBeDeletedFooter, ToBeDeletedHeader, TourButton, Trash, TrendingValue, TrialBanner, TutorialsButton, TwoFactor, TwoFactorSetting, UpdateList, UserDetails, ValueMonitor, ViewContactPanel, VideoPlayer, VideoPlayerModal, WellDone, YtdTile, } from './components';
2
2
  export { useCustomToast } from './hooks';
3
3
  export { randomColor } from './utils';
4
4
  export { billingProxy, dynamicFormProxy, homeCardProxy, partnerContentProxy, partnerDetailsProxy, paymentMethodProxy, recordsInputsProxy, recordsInputsToDBProxy, userDetailsProxy, confirmAddressProxy, } from './proxies';
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- export { ActivateAccount, ActiveSubscription, AddCardBanner, AddEditContactPanel, AddFolder, AddHomeContent, AddHomeItem, AddHomeItemHeader, AddMedia, AddPropertyRecords, Address, AddPopup, AddTile, AlertBanner, AphwTile, AppBar, AssignableReceipts, BackHeader, BarDivider, CancelAccount, CatalogPopup, CloudsAnimation, ContactList, ContactsContent, ContainerHeader, CreateDocumentHeader, CreateHouseholdItemHeader, CreditCardContainer, CreditCardError, CustomerTile, DeleteBanner, DisplayFiles, DisplayFilesDetail, DisplayOptions, DisplayReceipts, DocumentMenu, DocumentNameHeader, DocumentPreview, DynamicForm, EditAccountType, EditHomeBody, EditHomeFooter, EditHomeHeader, EditHomePanel, EmailPermissions, EmailValidation, Feedback, FileDetail, FilesUploader, FlowStep, FolderDetail, FolderDetailBody, FolderDetailContent, FolderDetailFooter, FolderDetailHeader, FolderInfo, FolderSharing, FolderTypeSelection, FooterButtons, FooterDrawer, GenericBackHeader, GroupCard, GroupsContainer, GroupsHeader, Header, HelpContent, HomeAssistant, HomeAssistantPanel, HomeBoardGrid, HomeBoardTour, HomeCard, HomeCardWithRecipent, HomefileMonitoring, HomeHeader, HomeMonitor, HomeMonitorSteps, HomeSharedWith, InboxForwardBanner, InboxTile, ItemNameHeader, ItemsReviewBanner, ItemSubTypeSelect, Launchpad, LaunchpadAutofilerBanner, LaunchpadReceiptAutofiler, LaunchpadTour, LeftPanel, MediaDetailsStep, MonitorAlerts, MonthlyCharge, MortgageInfo, MoveModal, MyHomes, MyProfileContent, MyProfileFooter, MyProfilePanel, NewCreditCard, NewCreditCardHeader, NewPassword, NotBeChargedBanner, Notifications, NotificationsReminder, NotificationsPanel, NotificationCard, Overlay, PanelHeader, PartnerActiveSubscription, PartnerCatalogPanel, PartnerContent, PartnerCustomerCode, PartnerDetails, PartnerImages, PartnerPanel, PasswordInput, PaymentReceipts, PdfButton, PeopleConnected, ProfileDetailsTab, ProfilePaymentTab, ProjectList, PropertyRecords, PropertyTaxes, ReadOnlyDynamicForm, ReadOnlyImage, ReadOnlyToggle, ReceiptAutofiler, ReceiptBody, ReceiptContent, ReceiptDetails, ReceiptFilters, ReceiptFooter, ReceiptHeader, ReceiptInfos, ReceiptItem, ReceiptItems, ReceiptPDF, ReceiptsDisplayOptions, ReceiptsFiled, ReceiptsHeader, ReceiptsInfo, ReceiptsReceivedContent, RecipientForm, RecipientsToShare, RecipientTab, RecordsInputs, ResendResetPassword, ResetPassword, ReviewBanner, RightPanel, RolePermissionsTab, RoomHeader, RoomsBoardTour, RoomsMenu, RoomsMenuMobile, RoomStep, RoomVideo, SalesTax, SatisfactionTile, SectionHeader, SendCommunication, ShareContactsContent, SharedAccounts, SharedHomeContent, SharedHomeHeader, ShareHome, ShareHomeConnections, ShareHomeForm, ShineTile, ShortPartnerTile, SignIn, SignUp, StepHeader, StorageUsed, Subscription, SubscriptionCard, SubscriptionTable, Summary, TabsHeader, TextInput, ToBeDeletedBody, ToBeDeletedContent, ToBeDeletedFooter, ToBeDeletedHeader, TourButton, Trash, TrendingValue, TrialBanner, TutorialsButton, TwoFactor, TwoFactorSetting, UpdateList, UserDetails, ValueMonitor, ViewContactPanel, VideoPlayer, VideoPlayerModal, WellDone, YtdTile, } from './components';
1
+ export { ActivateAccount, ActiveSubscription, AddCardBanner, AddEditContactPanel, AddFolder, AddHomeContent, AddHomeItem, AddHomeItemHeader, AddMedia, AddPropertyRecords, Address, AddPopup, AddTile, AlertBanner, AphwTile, AppBar, AssignableReceipts, BackHeader, BarDivider, CancelAccount, CatalogPopup, CloudsAnimation, ContactList, ContactsContent, ContainerHeader, CreateDocumentHeader, CreateHouseholdItemHeader, CreditCardContainer, CreditCardError, CustomerTile, DeleteBanner, DisplayFiles, DisplayFilesDetail, DisplayOptions, DisplayReceipts, DocumentMenu, DocumentNameHeader, DocumentPreview, DynamicForm, EditAccountType, EditHomeBody, EditHomeFooter, EditHomeHeader, EditHomePanel, EmailPermissions, EmailValidation, Feedback, FileDetail, FilesUploader, FlowStep, FolderDetail, FolderDetailBody, FolderDetailContent, FolderDetailFooter, FolderDetailHeader, FolderInfo, FolderSharing, FolderTypeSelection, FooterButtons, FooterDrawer, GenericBackHeader, GroupCard, GroupsContainer, GroupsHeader, Header, HelpContent, HomeAssistant, HomeAssistantPanel, HomeBoardGrid, HomeBoardTour, HomeCard, HomeCardWithRecipent, HomefileMonitoring, HomeHeader, HomeMonitor, HomeMonitorSteps, HomeSharedWith, InboxForwardBanner, InboxTile, ItemNameHeader, ItemsReviewBanner, ItemSubTypeSelect, Launchpad, LaunchpadAutofilerBanner, LaunchpadReceiptAutofiler, LaunchpadTour, LeftPanel, MediaDetailsStep, MessagePanel, MessageChatPanel, MonitorAlerts, MonthlyCharge, MortgageInfo, MoveModal, MyHomes, MyProfileContent, MyProfileFooter, MyProfilePanel, NewCreditCard, NewCreditCardHeader, NewPassword, NotBeChargedBanner, Notifications, NotificationsReminder, NotificationsPanel, NotificationCard, Overlay, PanelHeader, PartnerActiveSubscription, PartnerCatalogPanel, PartnerContent, PartnerCustomerCode, PartnerDetails, PartnerImages, PartnerPanel, PasswordInput, PaymentReceipts, PdfButton, PeopleConnected, ProfileDetailsTab, ProfilePaymentTab, ProjectList, PropertyRecords, PropertyTaxes, ReadOnlyDynamicForm, ReadOnlyImage, ReadOnlyToggle, ReceiptAutofiler, ReceiptBody, ReceiptContent, ReceiptDetails, ReceiptFilters, ReceiptFooter, ReceiptHeader, ReceiptInfos, ReceiptItem, ReceiptItems, ReceiptPDF, ReceiptsDisplayOptions, ReceiptsFiled, ReceiptsHeader, ReceiptsInfo, ReceiptsReceivedContent, RecipientForm, RecipientsToShare, RecipientTab, RecordsInputs, ResendResetPassword, ResetPassword, ReviewBanner, RightPanel, RolePermissionsTab, RoomHeader, RoomsBoardTour, RoomsMenu, RoomsMenuMobile, RoomStep, RoomVideo, SalesTax, SatisfactionTile, SectionHeader, SendCommunication, ShareContactsContent, SharedAccounts, SharedHomeContent, SharedHomeHeader, ShareHome, ShareHomeConnections, ShareHomeForm, ShineTile, ShortPartnerTile, SignIn, SignUp, StepHeader, StorageUsed, Subscription, SubscriptionCard, SubscriptionTable, Summary, TabsHeader, TextInput, ToBeDeletedBody, ToBeDeletedContent, ToBeDeletedFooter, ToBeDeletedHeader, TourButton, Trash, TrendingValue, TrialBanner, TutorialsButton, TwoFactor, TwoFactorSetting, UpdateList, UserDetails, ValueMonitor, ViewContactPanel, VideoPlayer, VideoPlayerModal, WellDone, YtdTile, } from './components';
2
2
  export { useCustomToast } from './hooks';
3
3
  export { randomColor } from './utils';
4
4
  export { billingProxy, dynamicFormProxy, homeCardProxy, partnerContentProxy, partnerDetailsProxy, paymentMethodProxy, recordsInputsProxy, recordsInputsToDBProxy, userDetailsProxy, confirmAddressProxy, } from './proxies';
@@ -1,8 +1,8 @@
1
- import { MenuItemI } from "..";
1
+ import { MenuItemI } from '..';
2
2
  export interface UserProfileI {
3
3
  avatarUrl: string;
4
4
  firstName: string;
5
5
  userName: string;
6
- menuItems: MenuItemI[];
6
+ menuItems?: MenuItemI[];
7
7
  bg: string;
8
8
  }