@homefile/components-v2 2.39.25 → 2.39.27
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/locales/en/index.json +2 -1
- package/dist/components/contacts/ContactsContent.js +12 -11
- package/dist/components/myHomes/MyHomes.js +1 -1
- package/dist/components/rooms/RoomVideo.js +3 -1
- package/dist/components/sharedHomePanel/SharedHomeHeader.js +1 -1
- package/dist/stories/contacts/ContactsContent.stories.js +1 -0
- package/package.json +1 -1
|
@@ -174,7 +174,8 @@
|
|
|
174
174
|
},
|
|
175
175
|
"rating": "Homeowner Rating",
|
|
176
176
|
"recipient": "recipient",
|
|
177
|
-
"title": "Contacts"
|
|
177
|
+
"title": "Contacts",
|
|
178
|
+
"noContacts": "You currently have no contacts. To add new contacts, click the Add Contact button."
|
|
178
179
|
},
|
|
179
180
|
"counter": {
|
|
180
181
|
"of": "of",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { t } from 'i18next';
|
|
3
3
|
import { DrawerContent, DrawerHeader, DrawerBody, Flex, Stack, Checkbox, Box, Text, DrawerFooter, Button, } from '@chakra-ui/react';
|
|
4
4
|
import { Contacts } from '../../assets/images';
|
|
@@ -13,16 +13,17 @@ export const ContactsContent = ({ apiError, contacts, menuItems, handleClose, ch
|
|
|
13
13
|
const { windowDimensions: { width }, } = useWindowDimensions();
|
|
14
14
|
const maxW = width > 413 ? '16rem' : '10rem';
|
|
15
15
|
const isDisabled = Number(itemsSelected.length) === 0 || disabled;
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
16
|
+
const hasContacts = contacts.length > 0;
|
|
17
|
+
return (_jsxs(DrawerContent, { bg: "lightBlue.1", children: [_jsxs(DrawerHeader, { p: "0", children: [_jsx(PanelHeader, { handleCloseButton: handleClose, icon: Contacts, title: t('contacts.title') }), _jsxs(Flex, { justify: "space-between", pl: "base", my: "base", align: "center", gap: "base", children: [_jsx(SearchInput, { maxW: maxW, value: search, onChange: handleChange }), _jsx(LeftButtonAnimated, { onClick: handleAdd, label: t('contacts.addBtn'), disabled: disabled })] })] }), _jsxs(DrawerBody, { p: "0", overflowX: "hidden", children: [!hasContacts && (_jsx(Stack, { bg: "lightBlue.2", h: '100%', children: _jsx(Box, { px: "base", py: "6", bg: "lightBlue.1", children: _jsx(Text, { fontFamily: "secondary", children: t('contacts.noContacts') }) }) })), hasContacts && (_jsxs(_Fragment, { children: [_jsxs(Stack, { spacing: "base", pt: "base", pb: "120px", pr: "base", bg: "lightBlue.2", minHeight: "full", children: [_jsxs(Flex, { gap: "3", pl: "base", children: [_jsx(Checkbox, { onChange: handleSelectAll }), _jsx(Text, { fontFamily: "secondary", fontSize: "xs", children: t('subscription.select') })] }), _jsx(Box, { children: Object.keys(splittedContacts).map((letter, idx) => {
|
|
18
|
+
const showLetterDivider = idx !== 0;
|
|
19
|
+
return (_jsxs(Stack, { spacing: "0", children: [showLetterDivider && _jsx(LetterDivider, { letter: letter }), _jsx(Stack, { spacing: "2px", children: splittedContacts[letter].map((contact, idx) => {
|
|
20
|
+
const selected = isItemSelected(contact._id);
|
|
21
|
+
return (_jsx(Card, { apiError: apiError, contact: contact, onClick: onClick, index: idx, menuItems: menuItems, selected: selected, onChange: handleItemSelect, onShareContact: (contact) => onShareContacts([contact]) }, contact._id));
|
|
22
|
+
}) })] }, letter));
|
|
23
|
+
}) }), Number(contactsWithoutFirstOrLastName.length) > 0 && (_jsx(LetterDivider, { letter: "Others" })), _jsx(Box, { children: contactsWithoutFirstOrLastName.map((contact, idx) => {
|
|
24
|
+
const selected = isItemSelected(contact._id);
|
|
25
|
+
return (_jsx(Card, { apiError: apiError, contact: contact, onClick: onClick, index: idx, menuItems: menuItems, selected: selected, onChange: handleItemSelect, onShareContact: (contact) => onShareContacts([contact]) }, contact._id));
|
|
26
|
+
}) })] }), children, showLoadMore && (_jsx(Flex, { justifyContent: 'center', bg: "lightBlue.2", p: '1rem', children: _jsx(Button, { onClick: handleLoadMore, variant: 'primaryFooter', disabled: loadMoreDisabled, children: t('buttons.loadMore') }) }))] }))] }), _jsx(DrawerFooter, { p: "0", zIndex: "overlay", children: _jsx(FooterDrawer, { isOpen: !isDisabled, children: _jsx(FooterButtons, { button1: {
|
|
26
27
|
buttonStyle: 'primaryFooter',
|
|
27
28
|
label: t('buttons.share'),
|
|
28
29
|
onClick: () => onShareContacts(getContactByIds(itemsSelected)),
|
|
@@ -7,7 +7,7 @@ import { useState } from 'react';
|
|
|
7
7
|
export const MyHomes = ({ cardList = [], cardMenuItems = [], handleCardClick, handleFilterClick, handleNewHomeClick, headerMenuItems, addImage, loading, loadingId, showLoadMore, handleLoadMore, loadMoreDisabled, }) => {
|
|
8
8
|
const [showChildren, setShowChildren] = useState(false);
|
|
9
9
|
const handleHelpClick = () => setShowChildren(!showChildren);
|
|
10
|
-
return (_jsx(TileTooltip, { label: "myHomes", children: _jsxs(Container, { variant: "launchpad", maxW: "none", pb: "3rem", position: "relative", children: [showChildren && (_jsx(BaseStep, { top: "60px", right: "60px", onClose: handleHelpClick, children: _jsx(InviteRolesStep, {}) })), _jsx(ContainerHeader, { disabled: true, menuItems: headerMenuItems, title: t('myHomes.title'), icon: _jsx(MoreHorizontal, { size: 38 }), titleIcon: House, showHelp: true
|
|
10
|
+
return (_jsx(TileTooltip, { label: "myHomes", children: _jsxs(Container, { variant: "launchpad", maxW: "none", pb: "3rem", position: "relative", children: [showChildren && (_jsx(BaseStep, { top: "60px", right: "60px", onClose: handleHelpClick, children: _jsx(InviteRolesStep, {}) })), _jsx(ContainerHeader, { disabled: true, menuItems: headerMenuItems, title: t('myHomes.title'), icon: _jsx(MoreHorizontal, { size: 38 }), titleIcon: House, showHelp: true }), _jsx(MyHomesHeader, { onFilterClick: handleFilterClick, onNewHomeClick: handleNewHomeClick }), _jsx(Wrap, { spacing: "base", px: "base", alignItems: "start", children: cardList.length > 0 &&
|
|
11
11
|
(cardList === null || cardList === void 0 ? void 0 : cardList.map(({ accountType, address, active, _id, image, name }, index) => (_jsx(WrapItem, { children: _jsxs(Container, { w: "179px", position: "relative", transition: "all 0.3s ease-in-out", _hover: {
|
|
12
12
|
boxShadow: 'xl',
|
|
13
13
|
}, id: index === 0 ? 'homeCard' : '', children: [_jsx(ContainerHeader, { menuItems: accountType === 'Member' ? [] : cardMenuItems, itemForm: { _id, name }, icon: _jsx(MoreHorizontal, { size: 32 }), isThin: true, index: index }), _jsx(Box, { w: "179px", textAlign: "left", children: _jsx(MyHomeCard, { accountType: accountType, address: address, image: image, name: name, active: active, _id: _id, index: index, handleCardClick: handleCardClick, addImage: addImage, loading: loading, loadingId: loadingId, editImage: false }) })] }) }, _id)))) }), showLoadMore && (_jsx(Flex, { justifyContent: 'center', mt: '2rem', children: _jsx(Button, { onClick: handleLoadMore, variant: 'primaryFooter', disabled: loadMoreDisabled, children: t('buttons.loadMore') }) }))] }) }));
|
|
@@ -14,7 +14,9 @@ export const RoomVideo = ({ files = [], loading, menuItems, onDelete, onUpload,
|
|
|
14
14
|
const showFiles = filesLength > 0;
|
|
15
15
|
const handlePlay = (file) => setFileToPlay(file);
|
|
16
16
|
const { imageUrl, title } = fileToPlay || {};
|
|
17
|
-
return (_jsxs(_Fragment, { children: [_jsx(TileTooltip, { label: "roomVideo", children: _jsxs(Container, { variant: "launchpad", h: "full", position: "relative", maxW: "none", children: [showBubble && _jsx(RoomVideoHelp, { onClose: handleToggle }), _jsx(ContainerHeader, { title: t('roomVideo.title'), titleIcon: VideoIcon, icon: _jsx(MoreHorizontal, { size: 38 }), iconSize: "20px", menuItems: menuItems,
|
|
17
|
+
return (_jsxs(_Fragment, { children: [_jsx(TileTooltip, { label: "roomVideo", children: _jsxs(Container, { variant: "launchpad", h: "full", position: "relative", maxW: "none", children: [showBubble && _jsx(RoomVideoHelp, { onClose: handleToggle }), _jsx(ContainerHeader, { title: t('roomVideo.title'), titleIcon: VideoIcon, icon: _jsx(MoreHorizontal, { size: 38 }), iconSize: "20px", menuItems: menuItems,
|
|
18
|
+
// onHelpClick={handleToggle}
|
|
19
|
+
showHelp: true, fontWeight: 'normal' }), !showFiles && _jsx(RoomVideoInstruction, {}), showFiles && (_jsx(RoomVideoFiles, { files: files, loading: loading, onDelete: onDelete, uploading: uploading, onPlay: handlePlay })), showDragDrop && (_jsx(AddMedia, { accept: {
|
|
18
20
|
'video/mp4': ['.mp4', '.MP4', '.webm'],
|
|
19
21
|
'video/mov': ['.mov', '.MOV'],
|
|
20
22
|
}, bgColor: "transparent", errorTypeMessage: t('addMedia.errorVideoType'), maxFiles: 4, handleDelete: onDelete, handleEdit: () => null, handleUpload: onUpload, uploading: uploading, showHeader: false, loading: loading, dropAreaHeight: dragDropHeight }))] }) }), imageUrl && (_jsx(VideoPlayerModal, { url: imageUrl, title: title, onClose: () => setFileToPlay(undefined), showOverlay: true }))] }));
|
|
@@ -7,5 +7,5 @@ import { ShareHome } from '../../assets/images';
|
|
|
7
7
|
export const SharedHomeHeader = ({ children, onClose }) => {
|
|
8
8
|
const [showChildren, setShowChildren] = useState(false);
|
|
9
9
|
const handleHelpClick = () => setShowChildren(!showChildren);
|
|
10
|
-
return (_jsxs(DrawerHeader, { p: "0", children: [_jsx(PanelHeader, { handleCloseButton: onClose, icon: ShareHome, title: t('shareHome.title'), children: _jsx(Box, { mr: "base", position: "relative", children: _jsx(HelpButton, { onClick:
|
|
10
|
+
return (_jsxs(DrawerHeader, { p: "0", children: [_jsx(PanelHeader, { handleCloseButton: onClose, icon: ShareHome, title: t('shareHome.title'), children: _jsx(Box, { mr: "base", position: "relative", children: _jsx(HelpButton, { onClick: () => { }, children: showChildren && (_jsx(RolesHelpModal, { top: "40px", right: "0", onClose: handleHelpClick })) }) }) }), children] }));
|
|
11
11
|
};
|