@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.
- package/dist/assets/images/animations/index.d.ts +7 -0
- package/dist/assets/images/animations/index.js +7 -0
- package/dist/assets/images/animations/index.ts +15 -0
- package/dist/assets/images/animations/trees-cloudy.png +0 -0
- package/dist/assets/images/animations/trees-day-fall.png +0 -0
- package/dist/assets/images/animations/trees-day-summer.png +0 -0
- package/dist/assets/images/animations/trees-day-winter.png +0 -0
- package/dist/assets/images/animations/trees-evening.png +0 -0
- package/dist/assets/images/animations/trees-morning.png +0 -0
- package/dist/assets/images/animations/trees-night.png +0 -0
- package/dist/assets/images/book.svg +25 -0
- package/dist/assets/images/chat-bubble.svg +8 -0
- package/dist/assets/images/document2.svg +14 -0
- package/dist/assets/images/index.d.ts +5 -1
- package/dist/assets/images/index.js +5 -1
- package/dist/assets/images/index.ts +7 -0
- package/dist/assets/locales/en/index.json +11 -10
- package/dist/components/animations/CloudsAnimation.js +19 -3
- package/dist/components/animations/WeatherTrees.d.ts +6 -0
- package/dist/components/animations/WeatherTrees.js +36 -0
- package/dist/components/animations/index.d.ts +1 -0
- package/dist/components/animations/index.js +1 -0
- package/dist/components/badge/TextBadge.js +1 -1
- package/dist/components/folderPanel/folderDetails/FilesCounter.js +3 -5
- package/dist/components/footers/FooterButtons.d.ts +1 -1
- package/dist/components/footers/FooterButtons.js +2 -2
- package/dist/components/forms/BaseCounter.d.ts +2 -0
- package/dist/components/forms/BaseCounter.js +8 -0
- package/dist/components/forms/dynamicForm/fields/uiFields/TileCta.js +1 -1
- package/dist/components/forms/dynamicForm/fields/uiFields/TileCta.tsx +4 -2
- package/dist/components/forms/index.d.ts +1 -0
- package/dist/components/forms/index.js +1 -0
- package/dist/components/forms/readOnly/ReadOnlyDynamicForm.d.ts +1 -1
- package/dist/components/forms/readOnly/ReadOnlyDynamicForm.js +6 -4
- package/dist/components/forms/readOnly/fields/ReadOnlyGrid.d.ts +1 -1
- package/dist/components/forms/readOnly/fields/ReadOnlyGrid.js +7 -3
- package/dist/components/forms/readOnly/fields/ReadOnlyNotes.d.ts +2 -0
- package/dist/components/forms/readOnly/fields/ReadOnlyNotes.js +5 -0
- package/dist/components/forms/readOnly/fields/homeItem/ReadOnlyAppliances.js +1 -1
- package/dist/components/forms/readOnly/fields/homeItem/ReadOnlyAppliances.tsx +1 -1
- package/dist/components/forms/readOnly/fields/homeItem/ReadOnlyGuidelines.d.ts +2 -0
- package/dist/components/forms/readOnly/fields/homeItem/ReadOnlyGuidelines.js +11 -0
- package/dist/components/forms/readOnly/fields/homeItem/ReadOnlyGuidelines.tsx +33 -0
- package/dist/components/forms/readOnly/fields/homeItem/ReadOnlyHomeItemImages.js +1 -1
- package/dist/components/forms/readOnly/fields/homeItem/ReadOnlyHomeItemImages.tsx +1 -0
- package/dist/components/forms/readOnly/fields/homeItem/ReadOnlyItemRelated.d.ts +2 -0
- package/dist/components/forms/readOnly/fields/homeItem/ReadOnlyItemRelated.js +11 -0
- package/dist/components/forms/readOnly/fields/homeItem/ReadOnlyItemRelated.tsx +40 -0
- package/dist/components/forms/readOnly/fields/homeItem/index.d.ts +2 -0
- package/dist/components/forms/readOnly/fields/homeItem/index.js +2 -0
- package/dist/components/forms/readOnly/fields/homeItem/index.ts +2 -0
- package/dist/components/forms/readOnly/fields/index.d.ts +1 -0
- package/dist/components/forms/readOnly/fields/index.js +1 -0
- package/dist/components/homeAssistant/HomeAssistantWrapper.d.ts +1 -1
- package/dist/components/homeAssistant/HomeAssistantWrapper.js +20 -6
- package/dist/components/homeItems/ViewingHomeItemPanel.d.ts +1 -1
- package/dist/components/homeItems/ViewingHomeItemPanel.js +2 -2
- package/dist/components/inboxTile/InboxForwardBanner.js +2 -2
- package/dist/components/inboxTile/index.d.ts +1 -0
- package/dist/components/inboxTile/index.js +1 -0
- package/dist/components/inboxTile/panel/MessageCard.d.ts +2 -0
- package/dist/components/inboxTile/panel/MessageCard.js +14 -0
- package/dist/components/inboxTile/panel/MessageChatPanel.d.ts +4 -0
- package/dist/components/inboxTile/panel/MessageChatPanel.js +38 -0
- package/dist/components/inboxTile/panel/MessagePanel.d.ts +2 -0
- package/dist/components/inboxTile/panel/MessagePanel.js +12 -0
- package/dist/components/inboxTile/panel/index.d.ts +3 -0
- package/dist/components/inboxTile/panel/index.js +3 -0
- package/dist/components/myHomes/WrapperWithShadow.js +1 -1
- package/dist/components/myHomes/steps/MyHomeDetails.d.ts +1 -0
- package/dist/components/myHomes/steps/MyHomeDetails.js +1 -1
- package/dist/components/notifications/NotificationCard.d.ts +1 -1
- package/dist/components/notifications/NotificationCard.js +2 -47
- package/dist/components/rooms/VideosCounter.js +3 -5
- package/dist/helpers/forms/dynamicForm.helper.js +2 -1
- package/dist/hooks/inbox/index.d.ts +1 -0
- package/dist/hooks/inbox/index.js +1 -0
- package/dist/hooks/inbox/useMessagePanel.d.ts +7 -0
- package/dist/hooks/inbox/useMessagePanel.js +17 -0
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/index.js +1 -0
- package/dist/hooks/notifications/useNotificationsPanel.js +0 -5
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/interfaces/appBar/UserProfile.interface.d.ts +2 -2
- package/dist/interfaces/footers/FooterButtons.interface.d.ts +1 -0
- package/dist/interfaces/forms/BaseCounter.interface.d.ts +5 -0
- package/dist/interfaces/forms/BaseCounter.interface.js +1 -0
- package/dist/interfaces/forms/dynamicForm/DynamicForm.interface.d.ts +4 -3
- package/dist/interfaces/forms/index.d.ts +1 -0
- package/dist/interfaces/forms/index.js +1 -0
- package/dist/interfaces/forms/readOnly/ReadOnlyGrid.interface.d.ts +2 -1
- package/dist/interfaces/forms/readOnly/homeItem/ReadOnlyGuidelines.interface.d.ts +4 -0
- package/dist/interfaces/forms/readOnly/homeItem/ReadOnlyGuidelines.interface.js +1 -0
- package/dist/interfaces/forms/readOnly/homeItem/index.d.ts +1 -0
- package/dist/interfaces/forms/readOnly/homeItem/index.js +1 -0
- package/dist/interfaces/homeItems/ViewingHomeItemPanel.interface.d.ts +1 -0
- package/dist/interfaces/inboxTile/MessageCard.interface.d.ts +16 -0
- package/dist/interfaces/inboxTile/MessageCard.interface.js +1 -0
- package/dist/interfaces/inboxTile/MessageChatPanel.interface.d.ts +12 -0
- package/dist/interfaces/inboxTile/MessageChatPanel.interface.js +1 -0
- package/dist/interfaces/inboxTile/MessagePanel.interface.d.ts +6 -0
- package/dist/interfaces/inboxTile/MessagePanel.interface.js +1 -0
- package/dist/interfaces/inboxTile/index.d.ts +3 -0
- package/dist/interfaces/inboxTile/index.js +3 -0
- package/dist/interfaces/notifications/NotificationsPanel.interface.d.ts +3 -2
- package/dist/mocks/forms/dynamicForm.mock.js +60 -0
- package/dist/mocks/inbox/index.d.ts +1 -0
- package/dist/mocks/inbox/index.js +1 -0
- package/dist/mocks/inbox/messages.d.ts +2 -0
- package/dist/mocks/inbox/messages.js +136 -0
- package/dist/mocks/index.d.ts +1 -0
- package/dist/mocks/index.js +1 -0
- package/dist/mocks/notifications/notifications.mock.js +4 -4
- package/dist/stories/assets/Illustrations.stories.js +2 -2
- package/dist/stories/homeItems/ViewingHomeItem.stories.js +1 -0
- package/dist/stories/inboxTile/MessagePanel.stories.d.ts +5 -0
- package/dist/stories/inboxTile/MessagePanel.stories.js +24 -0
- package/dist/theme/colors.d.ts +4 -1
- package/dist/theme/colors.js +4 -1
- package/dist/utils/Animations.utils.d.ts +6 -0
- package/dist/utils/Animations.utils.js +31 -0
- package/dist/utils/Avatars.utils.d.ts +1 -1
- package/dist/utils/Avatars.utils.js +1 -1
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.js +1 -0
- package/package.json +1 -1
- package/src/assets/images/animations/index.ts +15 -0
- package/src/assets/images/animations/trees-cloudy.png +0 -0
- package/src/assets/images/animations/trees-day-fall.png +0 -0
- package/src/assets/images/animations/trees-day-summer.png +0 -0
- package/src/assets/images/animations/trees-day-winter.png +0 -0
- package/src/assets/images/animations/trees-evening.png +0 -0
- package/src/assets/images/animations/trees-morning.png +0 -0
- package/src/assets/images/animations/trees-night.png +0 -0
- package/src/assets/images/book.svg +25 -0
- package/src/assets/images/chat-bubble.svg +8 -0
- package/src/assets/images/document2.svg +14 -0
- package/src/assets/images/index.ts +7 -0
- package/src/assets/locales/en/index.json +11 -10
- package/src/components/animations/CloudsAnimation.tsx +34 -17
- package/src/components/animations/WeatherTrees.tsx +37 -0
- package/src/components/animations/index.ts +1 -0
- package/src/components/badge/TextBadge.tsx +1 -1
- package/src/components/folderPanel/folderDetails/FilesCounter.tsx +6 -21
- package/src/components/footers/FooterButtons.tsx +2 -1
- package/src/components/forms/BaseCounter.tsx +30 -0
- package/src/components/forms/dynamicForm/fields/uiFields/TileCta.tsx +4 -2
- package/src/components/forms/index.ts +1 -0
- package/src/components/forms/readOnly/ReadOnlyDynamicForm.tsx +8 -2
- package/src/components/forms/readOnly/fields/ReadOnlyGrid.tsx +32 -3
- package/src/components/forms/readOnly/fields/ReadOnlyNotes.tsx +16 -0
- package/src/components/forms/readOnly/fields/homeItem/ReadOnlyAppliances.tsx +1 -1
- package/src/components/forms/readOnly/fields/homeItem/ReadOnlyGuidelines.tsx +33 -0
- package/src/components/forms/readOnly/fields/homeItem/ReadOnlyHomeItemImages.tsx +1 -0
- package/src/components/forms/readOnly/fields/homeItem/ReadOnlyItemRelated.tsx +40 -0
- package/src/components/forms/readOnly/fields/homeItem/index.ts +2 -0
- package/src/components/forms/readOnly/fields/index.ts +1 -0
- package/src/components/homeAssistant/HomeAssistantWrapper.tsx +31 -18
- package/src/components/homeItems/ViewingHomeItemPanel.tsx +2 -1
- package/src/components/inboxTile/InboxForwardBanner.tsx +5 -4
- package/src/components/inboxTile/index.ts +1 -0
- package/src/components/inboxTile/panel/MessageCard.tsx +112 -0
- package/src/components/inboxTile/panel/MessageChatPanel.tsx +105 -0
- package/src/components/inboxTile/panel/MessagePanel.tsx +64 -0
- package/src/components/inboxTile/panel/index.ts +3 -0
- package/src/components/myHomes/WrapperWithShadow.tsx +1 -0
- package/src/components/myHomes/steps/MyHomeDetails.tsx +1 -1
- package/src/components/notifications/NotificationCard.tsx +2 -106
- package/src/components/onboarding/pages/SignIn.tsx +1 -0
- package/src/components/rooms/VideosCounter.tsx +2 -18
- package/src/helpers/forms/dynamicForm.helper.ts +2 -0
- package/src/hooks/inbox/index.ts +1 -0
- package/src/hooks/inbox/useMessagePanel.ts +23 -0
- package/src/hooks/index.ts +1 -0
- package/src/hooks/notifications/useNotificationsPanel.ts +0 -5
- package/src/index.ts +2 -0
- package/src/interfaces/appBar/UserProfile.interface.ts +2 -2
- package/src/interfaces/footers/FooterButtons.interface.ts +2 -1
- package/src/interfaces/forms/BaseCounter.interface.ts +5 -0
- package/src/interfaces/forms/dynamicForm/DynamicForm.interface.ts +9 -1
- package/src/interfaces/forms/index.ts +1 -0
- package/src/interfaces/forms/readOnly/ReadOnlyGrid.interface.ts +3 -1
- package/src/interfaces/forms/readOnly/homeItem/ReadOnlyGuidelines.interface.ts +6 -0
- package/src/interfaces/forms/readOnly/homeItem/index.ts +1 -0
- package/src/interfaces/homeItems/ViewingHomeItemPanel.interface.ts +1 -0
- package/src/interfaces/inboxTile/MessageCard.interface.ts +18 -0
- package/src/interfaces/inboxTile/MessageChatPanel.interface.ts +13 -0
- package/src/interfaces/inboxTile/MessagePanel.interface.ts +7 -0
- package/src/interfaces/inboxTile/index.ts +3 -0
- package/src/interfaces/notifications/NotificationsPanel.interface.ts +3 -9
- package/src/mocks/forms/dynamicForm.mock.ts +60 -0
- package/src/mocks/inbox/index.ts +1 -0
- package/src/mocks/inbox/messages.ts +139 -0
- package/src/mocks/index.ts +1 -0
- package/src/mocks/notifications/notifications.mock.ts +4 -4
- package/src/stories/assets/Illustrations.stories.tsx +4 -0
- package/src/stories/homeItems/ViewingHomeItem.stories.tsx +1 -0
- package/src/stories/inboxTile/MessagePanel.stories.tsx +47 -0
- package/src/theme/colors.ts +4 -1
- package/src/utils/Animations.utils.ts +39 -0
- package/src/utils/Avatars.utils.ts +2 -2
- 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
|
};
|
|
@@ -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
|
+
}
|
|
@@ -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
|
|
5
|
-
import {
|
|
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
|
|
9
|
-
|
|
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(
|
|
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
|
};
|
|
@@ -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,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
|
+
};
|
|
@@ -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,
|
|
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,
|
|
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:
|
|
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
|
|
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(
|
|
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
|
+
};
|
package/dist/hooks/index.d.ts
CHANGED
package/dist/hooks/index.js
CHANGED
|
@@ -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';
|