@homefile/components-v2 2.38.13 → 2.38.15

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.
@@ -1,2 +1,2 @@
1
1
  import { AddToHomefileI } from '../../interfaces';
2
- export declare const AddToHomefile: ({ documentList, onItemClick, headerList, isDisabled, }: AddToHomefileI) => import("react/jsx-runtime").JSX.Element;
2
+ export declare const AddToHomefile: ({ documentList, headerList, isDisabled, }: AddToHomefileI) => import("react/jsx-runtime").JSX.Element;
@@ -1,10 +1,10 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { t } from 'i18next';
3
- import { Button, Circle, Container, Flex, Grid, Stack } from '@chakra-ui/react';
4
- import { ChevronRight, ContainerHeader, HiddenField, IconAndText, Plus, TileTooltip, } from '../../components';
5
- import { colors } from '../../theme/colors';
6
- export const AddToHomefile = ({ documentList, onItemClick, headerList, isDisabled = false, }) => {
7
- return (_jsx(TileTooltip, { label: "addToHomefile", children: _jsxs(Container, { variant: "launchpad", h: "full", minW: ['full', '20rem'], bg: "lightViolet.1", children: [_jsx(ContainerHeader, { title: t('addToHomefile.title'), menuItems: headerList, fontWeight: "normal" }), _jsxs(Stack, { spacing: "base", w: "full", p: "4", children: [_jsx(Button, { onClick: onItemClick, disabled: isDisabled, children: _jsxs(Flex, { w: "full", alignItems: "center", justifyContent: "space-between", px: "4", children: [_jsx(IconAndText, { title: t('addHomeItem.btnLabel'), icon: _jsx(Plus, {}) }), _jsx(Circle, { size: "40px", bg: "blue.1", color: "neutral.white", transition: "all 0.2s ease-in-out", children: _jsx(ChevronRight, { size: 26, stroke: colors.neutral.white }) })] }) }), _jsx(Grid, { templateColumns: "repeat(auto-fill, minmax(70px, 1fr))", gap: "base", children: documentList.map((item) => {
8
- return (_jsx(HiddenField, { h: "58px", id: item.label, name: item.label, icon: item.icon, disabled: isDisabled, onClick: item.onClick, showPlusIcon: true }, item.label));
9
- }) })] })] }) }));
3
+ import { Container, Grid } from '@chakra-ui/react';
4
+ import { ContainerHeader, HiddenField, TileTooltip } from '../../components';
5
+ import { BlueCirclePlus } from '../../assets/images';
6
+ export const AddToHomefile = ({ documentList, headerList, isDisabled = false, }) => {
7
+ return (_jsx(TileTooltip, { label: "addToHomefile", children: _jsxs(Container, { variant: "launchpad", h: "full", minW: ['full', '20rem'], bg: "lightViolet.1", children: [_jsx(ContainerHeader, { title: t('addToHomefile.title'), titleIcon: BlueCirclePlus, menuItems: headerList, fontWeight: 'normal' }), _jsx(Grid, { templateColumns: "repeat(auto-fill, minmax(70px, 1fr))", gap: "base", p: "base", children: documentList.map((item) => {
8
+ return (_jsx(HiddenField, { h: "58px", id: item.label, name: item.label, icon: item.icon, disabled: isDisabled, onClick: item.onClick, showPlusIcon: true }, item.label));
9
+ }) })] }) }));
10
10
  };
@@ -58,7 +58,7 @@ export const HomeBoard = () => {
58
58
  label: 'Details',
59
59
  handleClick: handleHomeAssistantClick,
60
60
  },
61
- ], onStepClick: () => null })] }) }), _jsx(DynamicForm, { form: tileUIMock, menuItems: menuMock, socialLinks: socialLinksMock, showTitle: false, websiteUrl: "http://www.audreyscheckdesign.com" }), _jsxs(Stack, { spacing: "base", children: [_jsx(ReceiptAutofiler, { onClick: () => null, totalReceipts: 36, totalTitle: "Receipts Received", forwardTo: "reciepts@homefile.cloud", onFilter: () => null, children: _jsx(ReceiptsFiled, { incidentalItemsNumber: 0, incidentalSpent: 0, inventoryItemsNumber: 0, inventorySpent: 0, total: 0 }) }), _jsx(ValueMonitor, { menuItems: menuMock, balance: "+3%", totalValue: 323421, year: "2023", yearValue: 5684 })] }), _jsx(PropertyTaxes, { estimatedTaxValue: 1000, menuItems: menuMock, taxes: taxesMock, title: "Travis County Property Taxes" }), _jsx(ShortPartnerTile, { _id: "1", buttonText: "Contact Audrey Scheck", description: "Full-service design firm focusing on residential remodels, furnishing, and styling.", onClick: () => null, socialLinks: socialLinksMock2, logo: "https://static.wixstatic.com/media/258105_8e04439070694f278e4787a310ea9f4b~mv2.png", partnerName: "Audrey Scheck", websiteUrl: "" }), _jsx(TrendingValue, { chartData: lineChartData, marketValue: 894000, menuItems: menuMock, mortgageBalance: 220532, purchasePrice: 220532, roi: "+234%" }), _jsx(ShortPartnerTile, { _id: "2", buttonText: "Contact Audrey Scheck", description: "Full-service design firm focusing on residential remodels, furnishing, and styling.", onClick: () => null, socialLinks: socialLinksMock2, logo: "https://static.wixstatic.com/media/258105_8e04439070694f278e4787a310ea9f4b~mv2.png", partnerName: "Audrey Scheck", websiteUrl: "" }), _jsx(FolderSharing, { folders: FoldersDB, handleAddNewFolder: handleNewFolder, handleFolderClick: handleFolderClick, handleSelect: () => null, initialSelectItem: selectOptions[0], menuItems: menuMock, selectItems: selectOptions }), _jsx(AddToHomefile, { documentList: documentListMock, onItemClick: () => null }), _jsx(ShortPartnerTile, { _id: "3", buttonText: "Contact Audrey Scheck", description: "Full-service design firm focusing on residential remodels, furnishing, and styling.", onClick: () => null, socialLinks: socialLinksMock2, logo: "https://static.wixstatic.com/media/258105_8e04439070694f278e4787a310ea9f4b~mv2.png", partnerName: "Audrey Scheck", websiteUrl: "" })] })] })] })] }), _jsx(HomeBoardTour, { currentStep: currentStep, handleClose: handleClose, handleStep: handleStep, meetStepUrl: videoMock, isActive: activeTour })] }));
61
+ ], onStepClick: () => null })] }) }), _jsx(DynamicForm, { form: tileUIMock, menuItems: menuMock, socialLinks: socialLinksMock, showTitle: false, websiteUrl: "http://www.audreyscheckdesign.com" }), _jsxs(Stack, { spacing: "base", children: [_jsx(ReceiptAutofiler, { onClick: () => null, totalReceipts: 36, totalTitle: "Receipts Received", forwardTo: "reciepts@homefile.cloud", onFilter: () => null, children: _jsx(ReceiptsFiled, { incidentalItemsNumber: 0, incidentalSpent: 0, inventoryItemsNumber: 0, inventorySpent: 0, total: 0 }) }), _jsx(ValueMonitor, { menuItems: menuMock, balance: "+3%", totalValue: 323421, year: "2023", yearValue: 5684 })] }), _jsx(PropertyTaxes, { estimatedTaxValue: 1000, menuItems: menuMock, taxes: taxesMock, title: "Travis County Property Taxes" }), _jsx(ShortPartnerTile, { _id: "1", buttonText: "Contact Audrey Scheck", description: "Full-service design firm focusing on residential remodels, furnishing, and styling.", onClick: () => null, socialLinks: socialLinksMock2, logo: "https://static.wixstatic.com/media/258105_8e04439070694f278e4787a310ea9f4b~mv2.png", partnerName: "Audrey Scheck", websiteUrl: "" }), _jsx(TrendingValue, { chartData: lineChartData, marketValue: 894000, menuItems: menuMock, mortgageBalance: 220532, purchasePrice: 220532, roi: "+234%" }), _jsx(ShortPartnerTile, { _id: "2", buttonText: "Contact Audrey Scheck", description: "Full-service design firm focusing on residential remodels, furnishing, and styling.", onClick: () => null, socialLinks: socialLinksMock2, logo: "https://static.wixstatic.com/media/258105_8e04439070694f278e4787a310ea9f4b~mv2.png", partnerName: "Audrey Scheck", websiteUrl: "" }), _jsx(FolderSharing, { folders: FoldersDB, handleAddNewFolder: handleNewFolder, handleFolderClick: handleFolderClick, handleSelect: () => null, initialSelectItem: selectOptions[0], menuItems: menuMock, selectItems: selectOptions }), _jsx(AddToHomefile, { documentList: documentListMock }), _jsx(ShortPartnerTile, { _id: "3", buttonText: "Contact Audrey Scheck", description: "Full-service design firm focusing on residential remodels, furnishing, and styling.", onClick: () => null, socialLinks: socialLinksMock2, logo: "https://static.wixstatic.com/media/258105_8e04439070694f278e4787a310ea9f4b~mv2.png", partnerName: "Audrey Scheck", websiteUrl: "" })] })] })] })] }), _jsx(HomeBoardTour, { currentStep: currentStep, handleClose: handleClose, handleStep: handleStep, meetStepUrl: videoMock, isActive: activeTour })] }));
62
62
  };
63
63
  export const AppBarComponent = ({ setActiveTour = (value) => { }, onClick = (panel) => { }, }) => {
64
64
  const handleTour = () => {
@@ -1,2 +1,2 @@
1
1
  import { HomeCardWithRecipentI } from '../../interfaces';
2
- export declare const HomeCardWithRecipent: ({ address: { city, state, street, number, zip }, addImage, externalLink, handleEdit, handleDeleteAccountType, handleSubmitAccountType, image, _id, loading, menu, name, onAddRecords, onViewDetails, panelSize, recipients, records, disabled, propertyDisabled }: HomeCardWithRecipentI) => import("react/jsx-runtime").JSX.Element;
2
+ export declare const HomeCardWithRecipent: ({ address: { city, state, street, number, zip }, addImage, externalLink, handleEdit, handleDeleteAccountType, handleSubmitAccountType, image, _id, loading, menu, name, onAddRecords, onViewDetails, panelSize, recipients, records, disabled, propertyDisabled, }: HomeCardWithRecipentI) => import("react/jsx-runtime").JSX.Element;
@@ -3,7 +3,7 @@ import { t } from 'i18next';
3
3
  import { Container } from '@chakra-ui/react';
4
4
  import { HomeCard, EditAccountType, RightPanel, HomeCardRecipients, TabsHeader, HomeCardRecords, } from '../../components';
5
5
  import { useHomeCardWithRecipent } from '../../hooks';
6
- export const HomeCardWithRecipent = ({ address: { city, state, street, number = '', zip }, addImage, externalLink, handleEdit, handleDeleteAccountType, handleSubmitAccountType, image, _id, loading = false, menu, name, onAddRecords, onViewDetails, panelSize = 'md', recipients, records = {}, disabled, propertyDisabled }) => {
6
+ export const HomeCardWithRecipent = ({ address: { city, state, street, number = '', zip }, addImage, externalLink, handleEdit, handleDeleteAccountType, handleSubmitAccountType, image, _id, loading = false, menu, name, onAddRecords, onViewDetails, panelSize = 'md', recipients, records = {}, disabled, propertyDisabled, }) => {
7
7
  const { isRightOpen, onRightClose, editingAccountType, handleEditAccountType, } = useHomeCardWithRecipent();
8
8
  const tabs = [
9
9
  {
@@ -19,7 +19,7 @@ export const HomeCardWithRecipent = ({ address: { city, state, street, number =
19
19
  {
20
20
  label: t('homeBoard.tabs.tab2'),
21
21
  component: (_jsx(HomeCardRecipients, { recipients: recipients, menu: menu, onEditClick: handleEditAccountType })),
22
- }
22
+ },
23
23
  ];
24
- return (_jsxs(Container, { variant: "launchpad", children: [_jsx(HomeCard, { city: city, externalLink: externalLink, imageUrl: image, name: name, number: number, street: street, state: state, zip: zip, handleEditClick: () => handleEdit(_id), addImage: addImage, loading: loading, edit: !disabled }), _jsx(TabsHeader, { tabList: propertyDisabled ? noPropertyTabs : tabs }), (handleDeleteAccountType && handleSubmitAccountType) && (_jsx(RightPanel, { isOpen: isRightOpen, onClose: onRightClose, size: panelSize, children: _jsx(EditAccountType, { associateAccount: editingAccountType, handleClose: onRightClose, handleDelete: handleDeleteAccountType, handleSubmit: handleSubmitAccountType, isLoading: loading }) }))] }));
24
+ return (_jsxs(Container, { variant: "launchpad", children: [_jsx(HomeCard, { city: city, externalLink: externalLink, imageUrl: image, name: name, number: number, street: street, state: state, zip: zip, handleEditClick: () => handleEdit(_id), addImage: addImage, loading: loading, edit: false }), _jsx(TabsHeader, { tabList: propertyDisabled ? noPropertyTabs : tabs }), handleDeleteAccountType && handleSubmitAccountType && (_jsx(RightPanel, { isOpen: isRightOpen, onClose: onRightClose, size: panelSize, children: _jsx(EditAccountType, { associateAccount: editingAccountType, handleClose: onRightClose, handleDelete: handleDeleteAccountType, handleSubmit: handleSubmitAccountType, isLoading: loading }) }))] }));
25
25
  };
@@ -1,2 +1,2 @@
1
1
  import { MyHomeCardI } from '../../interfaces';
2
- export declare const MyHomeCard: ({ accountType, address: { city, state, street, number, zip }, externalLink, image, index, name, handleCardClick, _id, addImage, loading, loadingId, }: MyHomeCardI) => import("react/jsx-runtime").JSX.Element;
2
+ export declare const MyHomeCard: ({ accountType, address: { city, state, street, number, zip }, externalLink, editImage, image, index, name, handleCardClick, _id, addImage, loading, loadingId, }: MyHomeCardI) => import("react/jsx-runtime").JSX.Element;
@@ -5,11 +5,11 @@ import { BeatLoader } from 'react-spinners';
5
5
  import { Link, EditFileUploader, TextBadge } from '../../components';
6
6
  import { useMyHomeCard } from '../../hooks';
7
7
  import { randomImages } from '../../utils';
8
- export const MyHomeCard = ({ accountType, address: { city, state, street, number = '', zip }, externalLink, image, index, name, handleCardClick, _id, addImage, loading, loadingId, }) => {
8
+ export const MyHomeCard = ({ accountType, address: { city, state, street, number = '', zip }, externalLink, editImage = true, image, index, name, handleCardClick, _id, addImage, loading, loadingId, }) => {
9
9
  const { imageUrl, minHeight, minWidth, type } = useMyHomeCard({
10
10
  accountType,
11
11
  image,
12
12
  });
13
13
  const isLoading = loading && loadingId === _id;
14
- return (_jsxs(_Fragment, { children: [_jsx(Box, { position: "absolute", left: "-1", top: "-1", id: index === 0 ? 'role' : '', children: type && (_jsx(TextBadge, { bgColor: type === null || type === void 0 ? void 0 : type.bg, text: accountType, width: type === null || type === void 0 ? void 0 : type.width })) }), _jsxs(Center, { pos: "relative", h: "8rem", bg: "lightBlue.2", overflow: "hidden", w: "full", children: [isLoading && (_jsx(Center, { h: "8rem", children: _jsx(BeatLoader, { color: "gray", size: 8 }) })), !isLoading && (_jsxs(_Fragment, { children: [accountType !== "Member" && (_jsx(EditFileUploader, { handleInputChange: (event) => addImage({ event, _id }), "aria-label": t('ariaLabels.edit'), position: "absolute", right: "2", top: "1", id: index === 0 ? 'homePicture' : '' })), _jsx(Image, { src: ((image === null || image === void 0 ? void 0 : image.bucketName) && imageUrl) || randomImages(0), alt: `${name} ${t('images.altImage')}`, objectFit: "cover", minH: minHeight, minW: minWidth, onClick: () => handleCardClick({ _id, name }), cursor: "pointer" })] }))] }), _jsx(Tooltip, { label: t('tooltips.viewHome'), children: _jsx(Stack, { children: _jsxs(Stack, { id: index === 0 ? 'viewHome' : '', bg: "neutral.white", px: "2", py: "4", children: [_jsxs(Flex, { align: "center", gap: "1", children: [_jsx(Box, { as: "button", onClick: () => handleCardClick({ _id, name }), children: _jsx(Text, { textOverflow: "ellipsis", noOfLines: 1, textAlign: "left", textTransform: "uppercase", children: name }) }), externalLink && (_jsx(Tooltip, { label: externalLink, fontSize: "small", children: _jsx(Center, { cursor: "pointer", children: _jsx(Link, { size: 22 }) }) }))] }), _jsxs(Box, { lineHeight: "1.2", as: "button", onClick: () => handleCardClick({ _id, name }), textAlign: "left", children: [_jsx(Text, { isTruncated: true, variant: "home", children: `${number} ${street}` }), _jsxs(Flex, { gap: "1", children: [_jsx(Text, { isTruncated: true, variant: "home", children: `${city},` }), _jsx(Text, { isTruncated: true, variant: "home", children: state })] }), _jsx(Text, { variant: "home", children: zip })] })] }) }) })] }));
14
+ return (_jsxs(_Fragment, { children: [_jsx(Box, { position: "absolute", left: "-1", top: "-1", id: index === 0 ? 'role' : '', children: type && (_jsx(TextBadge, { bgColor: type === null || type === void 0 ? void 0 : type.bg, text: accountType, width: type === null || type === void 0 ? void 0 : type.width })) }), _jsxs(Center, { pos: "relative", h: "8rem", bg: "lightBlue.2", overflow: "hidden", w: "full", children: [isLoading && (_jsx(Center, { h: "8rem", children: _jsx(BeatLoader, { color: "gray", size: 8 }) })), !isLoading && (_jsxs(_Fragment, { children: [accountType !== 'Member' && editImage && (_jsx(EditFileUploader, { handleInputChange: (event) => addImage({ event, _id }), "aria-label": t('ariaLabels.edit'), position: "absolute", right: "2", top: "1", id: index === 0 ? 'homePicture' : '' })), _jsx(Image, { src: ((image === null || image === void 0 ? void 0 : image.bucketName) && imageUrl) || randomImages(0), alt: `${name} ${t('images.altImage')}`, objectFit: "cover", minH: minHeight, minW: minWidth, onClick: () => handleCardClick({ _id, name }), cursor: "pointer" })] }))] }), _jsx(Tooltip, { label: t('tooltips.viewHome'), children: _jsx(Stack, { children: _jsxs(Stack, { id: index === 0 ? 'viewHome' : '', bg: "neutral.white", px: "2", py: "4", children: [_jsxs(Flex, { align: "center", gap: "1", children: [_jsx(Box, { as: "button", onClick: () => handleCardClick({ _id, name }), children: _jsx(Text, { textOverflow: "ellipsis", noOfLines: 1, textAlign: "left", textTransform: "uppercase", children: name }) }), externalLink && (_jsx(Tooltip, { label: externalLink, fontSize: "small", children: _jsx(Center, { cursor: "pointer", children: _jsx(Link, { size: 22 }) }) }))] }), _jsxs(Box, { lineHeight: "1.2", as: "button", onClick: () => handleCardClick({ _id, name }), textAlign: "left", children: [_jsx(Text, { isTruncated: true, variant: "home", children: `${number} ${street}` }), _jsxs(Flex, { gap: "1", children: [_jsx(Text, { isTruncated: true, variant: "home", children: `${city},` }), _jsx(Text, { isTruncated: true, variant: "home", children: state })] }), _jsx(Text, { variant: "home", children: zip })] })] }) }) })] }));
15
15
  };
@@ -10,5 +10,5 @@ export const MyHomes = ({ cardList = [], cardMenuItems = [], handleCardClick, ha
10
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, onHelpClick: handleHelpClick }), _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
- }, 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 }) })] }) }, _id)))) }), showLoadMore && (_jsx(Flex, { justifyContent: 'center', mt: '2rem', children: _jsx(Button, { onClick: handleLoadMore, variant: 'primaryFooter', disabled: loadMoreDisabled, children: t('buttons.loadMore') }) }))] }) }));
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
14
  };
@@ -18,6 +18,7 @@ export interface MyHomeCardI {
18
18
  accountType?: string;
19
19
  active?: boolean;
20
20
  address: HomeAddressI;
21
+ editImage?: boolean;
21
22
  externalLink?: string;
22
23
  _id: string;
23
24
  index?: number;
@@ -1,4 +1,3 @@
1
1
  import { SendCommunicationI } from '../../interfaces';
2
2
  export interface AddToHomefileI extends SendCommunicationI {
3
- onItemClick: () => void;
4
3
  }
@@ -1,13 +1,11 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { Box } from '@chakra-ui/react';
3
3
  import { AddToHomefile } from '../../components';
4
- import { action } from '@storybook/addon-actions';
5
4
  import { documentListMock } from '../../mocks';
6
5
  export default {
7
6
  title: 'Components/HomeBoard',
8
7
  component: AddToHomefile,
9
8
  args: {
10
- onItemClick: action('onItemClick'),
11
9
  documentList: documentListMock,
12
10
  },
13
11
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@homefile/components-v2",
3
- "version": "2.38.13",
3
+ "version": "2.38.15",
4
4
  "author": "Homefile",
5
5
  "license": "UNLICENSED",
6
6
  "typings": "dist/index.d.ts",