@homefile/components-v2 2.35.0 → 2.36.1
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/components/forms/dynamicForm/fields/HomeInitialSetup.d.ts +1 -1
- package/dist/components/forms/dynamicForm/fields/HomeInitialSetup.js +6 -5
- package/dist/components/homeAssistant/panel/HomeAssistantPanel.d.ts +1 -0
- package/dist/components/homeAssistant/panel/HomeAssistantPanel.js +28 -3
- package/dist/components/homeBoard/AddPropertyRecords.js +1 -1
- package/dist/components/inputs/RadioCard.js +1 -1
- package/dist/components/myHomes/AddHomeContent.js +1 -1
- package/dist/components/wizard/WizardInitialOptions.d.ts +1 -1
- package/dist/components/wizard/WizardInitialOptions.js +4 -3
- package/dist/components/wizard/WizardStepOptions.d.ts +1 -1
- package/dist/components/wizard/WizardStepOptions.js +3 -2
- package/dist/components/wizard/WizardTextBody.d.ts +1 -1
- package/dist/components/wizard/WizardTextBody.js +7 -3
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/interfaces/forms/dynamicForm/DynamicForm.interface.d.ts +1 -0
- package/dist/interfaces/forms/dynamicForm/fields/GroupField.interface.d.ts +1 -0
- package/dist/interfaces/homeAssistant/HomeAssistantPanel.interface.d.ts +2 -2
- package/dist/interfaces/wizard/WizardTextHeader.interface.d.ts +1 -0
- package/dist/mocks/myHomes/Properties.mock.js +198 -0
- package/dist/stories/homeAssistant/panel/HomeAssistantPanel.stories.d.ts +1 -0
- package/dist/stories/homeAssistant/panel/HomeAssistantPanel.stories.js +17 -2
- package/dist/stories/wizard/ControlledWizard.stories.js +5 -5
- package/package.json +1 -1
- package/src/components/forms/dynamicForm/fields/HomeInitialSetup.tsx +14 -3
- package/src/components/homeAssistant/panel/HomeAssistantPanel.tsx +68 -3
- package/src/components/homeAssistant/wizard/HomeAssistantWizardButton.tsx +1 -1
- package/src/components/homeBoard/AddPropertyRecords.tsx +1 -1
- package/src/components/inputs/RadioCard.tsx +2 -1
- package/src/components/myHomes/AddHomeContent.tsx +1 -1
- package/src/components/wizard/WizardInitialOptions.tsx +7 -1
- package/src/components/wizard/WizardStepOptions.tsx +8 -2
- package/src/components/wizard/WizardTextBody.tsx +36 -11
- package/src/index.ts +1 -0
- package/src/interfaces/forms/dynamicForm/DynamicForm.interface.ts +1 -0
- package/src/interfaces/forms/dynamicForm/fields/GroupField.interface.ts +1 -0
- package/src/interfaces/homeAssistant/HomeAssistantPanel.interface.ts +2 -2
- package/src/interfaces/wizard/WizardTextHeader.interface.ts +1 -0
- package/src/mocks/myHomes/Properties.mock.ts +198 -0
- package/src/stories/homeAssistant/panel/HomeAssistantPanel.stories.tsx +36 -1
- package/src/stories/wizard/ControlledWizard.stories.tsx +24 -23
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { FieldTypesI } from '@/interfaces';
|
|
2
|
-
export declare const HomeInitialSetup: ({ fields, callback }: FieldTypesI) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare const HomeInitialSetup: ({ fields, callback, style }: FieldTypesI) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { Stack } from '@chakra-ui/react';
|
|
3
3
|
import { WizardTextBody, WizardInitialOptions, WizardStepOptions, } from '@/components';
|
|
4
|
-
export const HomeInitialSetup = ({ fields, callback }) => {
|
|
5
|
-
|
|
4
|
+
export const HomeInitialSetup = ({ fields, callback, style }) => {
|
|
5
|
+
const isWizard = style === 'wizard';
|
|
6
|
+
return (_jsx(Stack, { bg: "neutral.white", spacing: { base: '6', md: isWizard ? '10' : '0' }, children: fields === null || fields === void 0 ? void 0 : fields.map(({ children = [], id, label = '', type, value, description }) => {
|
|
6
7
|
switch (type) {
|
|
7
8
|
case 'home-wizard-header':
|
|
8
|
-
return (_jsx(WizardTextBody, { title: label, subtitle: description }, id));
|
|
9
|
+
return (_jsx(WizardTextBody, { title: label, subtitle: description, style: style }, id));
|
|
9
10
|
case 'home-wizard-initial-setup':
|
|
10
|
-
return (_jsx(WizardInitialOptions, { form: children, title: String(value), callback: callback }, id));
|
|
11
|
+
return (_jsx(WizardInitialOptions, { form: children, title: String(value), callback: callback, style: style }, id));
|
|
11
12
|
case 'home-wizard-step-options':
|
|
12
|
-
return (_jsx(WizardStepOptions, { form: children, title: String(value), callback: callback }, id));
|
|
13
|
+
return (_jsx(WizardStepOptions, { form: children, title: String(value), callback: callback, style: style }, id));
|
|
13
14
|
default:
|
|
14
15
|
return null;
|
|
15
16
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import { PropsWithChildren } from 'react';
|
|
2
2
|
import { HomeAssistantPanelI } from '@/interfaces';
|
|
3
3
|
export declare const HomeAssistantPanel: ({ children, currentForm, currentStep, onApplianceClick, onBack, onClose, onNext, onSave, backDisabled, nextDisabled, hasCompleted, isLoading, }: PropsWithChildren<HomeAssistantPanelI>) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
export declare const HomeAssistantWizardPanel: ({ currentForm, currentStep, onBack, onClose, onNext, onSave, backDisabled, nextDisabled, hasCompleted, isLoading, }: PropsWithChildren<HomeAssistantPanelI>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -4,11 +4,11 @@ import { FormProvider } from 'react-hook-form';
|
|
|
4
4
|
import { t } from 'i18next';
|
|
5
5
|
import { DrawerHeader, DrawerBody, Stack, Text, DrawerFooter, } from '@chakra-ui/react';
|
|
6
6
|
import { IA } from '@/assets/images';
|
|
7
|
-
import { ApplianceSteps, SimpleDynamicForm, FooterButtons, HomeAssistantPanelStep, PanelHeader, Loading, } from '@/components';
|
|
7
|
+
import { ApplianceSteps, SimpleDynamicForm, FooterButtons, HomeAssistantPanelStep, PanelHeader, Loading, HomeAssistantWizardSteps, DynamicForm, } from '@/components';
|
|
8
8
|
import { homeAssistantSteps } from '@/helpers';
|
|
9
9
|
import { useSimpleDynamicForm } from '@/hooks';
|
|
10
10
|
import { homeAssistantProxy } from '@/proxies';
|
|
11
|
-
export const HomeAssistantPanel = ({ children, currentForm, currentStep, onApplianceClick, onBack, onClose, onNext, onSave, backDisabled, nextDisabled, hasCompleted, isLoading, }) => {
|
|
11
|
+
export const HomeAssistantPanel = ({ children, currentForm, currentStep, onApplianceClick = () => { }, onBack, onClose, onNext, onSave, backDisabled, nextDisabled, hasCompleted, isLoading, }) => {
|
|
12
12
|
var _a, _b;
|
|
13
13
|
const [addedAppliances, updateAddedAppliances] = useState([]);
|
|
14
14
|
const title = (_b = (_a = homeAssistantSteps === null || homeAssistantSteps === void 0 ? void 0 : homeAssistantSteps[currentStep - 1]) === null || _a === void 0 ? void 0 : _a.title) !== null && _b !== void 0 ? _b : '';
|
|
@@ -49,7 +49,7 @@ export const HomeAssistantPanel = ({ children, currentForm, currentStep, onAppli
|
|
|
49
49
|
label: !hasCompleted && currentStep === 6
|
|
50
50
|
? t('buttons.finish')
|
|
51
51
|
: t('buttons.saveStep'),
|
|
52
|
-
onClick: () => onSave(updatedFields),
|
|
52
|
+
onClick: () => onSave === null || onSave === void 0 ? void 0 : onSave(updatedFields),
|
|
53
53
|
}, button3: !hasCompleted && currentStep === 6
|
|
54
54
|
? undefined
|
|
55
55
|
: {
|
|
@@ -59,3 +59,28 @@ export const HomeAssistantPanel = ({ children, currentForm, currentStep, onAppli
|
|
|
59
59
|
isDisabled: nextDisabled,
|
|
60
60
|
} }) })] }));
|
|
61
61
|
};
|
|
62
|
+
export const HomeAssistantWizardPanel = ({ currentForm, currentStep, onBack, onClose, onNext, onSave, backDisabled, nextDisabled, hasCompleted, isLoading, }) => {
|
|
63
|
+
if (isLoading)
|
|
64
|
+
return _jsx(Loading, {});
|
|
65
|
+
return (_jsxs(_Fragment, { children: [_jsx(DrawerHeader, { p: "0", children: _jsx(PanelHeader, { handleCloseButton: onClose, title: t('homeAssistant.title'), icon: IA }) }), _jsxs(DrawerBody, { p: "0", children: [_jsx(HomeAssistantWizardSteps, { currentStep: currentStep }), _jsx(DynamicForm, { form: currentForm, showTitle: false, style: "panel" })] }), _jsx(DrawerFooter, { px: "0", py: "6", bg: "neutral.white", children: _jsx(FooterButtons, { button1: currentStep === 1
|
|
66
|
+
? undefined
|
|
67
|
+
: {
|
|
68
|
+
buttonStyle: 'secondaryFooter',
|
|
69
|
+
label: t('buttons.back'),
|
|
70
|
+
onClick: onBack,
|
|
71
|
+
isDisabled: backDisabled,
|
|
72
|
+
}, button2: {
|
|
73
|
+
buttonStyle: 'primaryFooter',
|
|
74
|
+
label: !hasCompleted && currentStep === 5
|
|
75
|
+
? t('buttons.finish')
|
|
76
|
+
: t('buttons.saveStep'),
|
|
77
|
+
onClick: () => onSave === null || onSave === void 0 ? void 0 : onSave(),
|
|
78
|
+
}, button3: !hasCompleted && currentStep === 5
|
|
79
|
+
? undefined
|
|
80
|
+
: {
|
|
81
|
+
buttonStyle: 'primaryFooter',
|
|
82
|
+
label: t('buttons.next'),
|
|
83
|
+
onClick: onNext,
|
|
84
|
+
isDisabled: nextDisabled,
|
|
85
|
+
} }) })] }));
|
|
86
|
+
};
|
|
@@ -21,5 +21,5 @@ export const AddPropertyRecords = (_a) => {
|
|
|
21
21
|
loading: _jsx(SearchRecords, {}),
|
|
22
22
|
properties: _jsx(ConfirmProperty, Object.assign({}, props, { handleAddress: onSelectAddress })),
|
|
23
23
|
};
|
|
24
|
-
return (_jsxs(DrawerContent, {
|
|
24
|
+
return (_jsxs(DrawerContent, { children: [_jsx(DrawerHeader, { p: "0", children: _jsx(PanelHeader, { handleCloseButton: onClose, title: t('homeBoard.addRecords'), icon: Records }) }), _jsx(Box, { h: "full", children: currentStep[step] })] }));
|
|
25
25
|
};
|
|
@@ -10,7 +10,7 @@ export const RadioCard = (props) => {
|
|
|
10
10
|
borderLeft: '6px solid',
|
|
11
11
|
borderLeftColor: 'blue.6',
|
|
12
12
|
boxShadow: 'md',
|
|
13
|
-
}, px: 5, py: 3, children: _jsxs(Flex, { align: "center", gap: "base", minH: "40px", children: [_jsx(Box, Object.assign({}, checkbox, { height: "18px", width: "18px", rounded: isSafari() ? 'sm' : 'full', border: "1px", borderColor: "lightBlue.5", _checked: {
|
|
13
|
+
}, px: 5, py: 3, children: _jsxs(Flex, { align: "center", gap: "base", minH: "40px", children: [_jsx(Box, Object.assign({}, checkbox, { height: "18px", width: "18px", rounded: isSafari() ? 'sm' : 'full', border: "1px", borderColor: "lightBlue.5", flexShrink: 0, _checked: {
|
|
14
14
|
bg: 'blue.2',
|
|
15
15
|
outline: '2px solid white',
|
|
16
16
|
outlineOffset: '-3px',
|
|
@@ -23,5 +23,5 @@ export const AddHomeContent = (_a) => {
|
|
|
23
23
|
loading: _jsx(SearchRecords, { isFirstHome: props.isFirstHome }),
|
|
24
24
|
properties: _jsx(ConfirmProperty, Object.assign({}, props)),
|
|
25
25
|
};
|
|
26
|
-
return (_jsxs(DrawerContent, { bg: "neutral.white",
|
|
26
|
+
return (_jsxs(DrawerContent, { bg: "neutral.white", children: [_jsx(DrawerHeader, { p: "0", children: !isFirstHome && (_jsx(PanelHeader, { handleCloseButton: handleSkipClick, title: t('myHomes.newHome.title'), icon: House })) }), _jsx(Box, { h: "full", children: (_b = currentStep[step]) !== null && _b !== void 0 ? _b : currentStep['initial'] })] }));
|
|
27
27
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { DynamicFormI } from '@/interfaces';
|
|
2
|
-
export declare const WizardInitialOptions: ({ form, title, callback, }: DynamicFormI) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare const WizardInitialOptions: ({ form, title, callback, style, }: DynamicFormI) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -3,15 +3,16 @@ import { Container, SimpleGrid, Stack, Text, Image, Flex, } from '@chakra-ui/rea
|
|
|
3
3
|
import { Controller, useFormContext } from 'react-hook-form';
|
|
4
4
|
import { CheckInCircle } from '@/assets/images';
|
|
5
5
|
import { fieldIcons, setOptionButtonStyles } from '@/helpers';
|
|
6
|
-
export const WizardInitialOptions = ({ form, title, callback, }) => {
|
|
6
|
+
export const WizardInitialOptions = ({ form, title, callback, style = 'wizard', }) => {
|
|
7
7
|
const { control } = useFormContext();
|
|
8
|
-
|
|
8
|
+
const isWizard = style === 'wizard';
|
|
9
|
+
return (_jsxs(Stack, { spacing: "base", bg: "lightBlue.1", p: "base", children: [_jsx(Text, { fontFamily: "secondary", fontSize: "sm", children: title }), _jsx(SimpleGrid, { columns: { base: 1, md: isWizard ? 2 : 1 }, spacing: { base: 1, md: isWizard ? 'base' : 1 }, children: form.map((field) => {
|
|
9
10
|
const { id, value, label, icon, description } = field;
|
|
10
11
|
return (_jsx(Controller, { control: control, name: id, defaultValue: value, render: ({ field: { value, onChange } }) => {
|
|
11
12
|
const iconSrc = icon
|
|
12
13
|
? fieldIcons[icon]
|
|
13
14
|
: undefined;
|
|
14
|
-
return (_jsxs(Container, { position: "relative", children: [value && (_jsx(Image, { src: CheckInCircle, alt: "check", w: "22px", h: "auto", position: "absolute", top: "-4px", left: "-2px", boxShadow: "lg", borderRadius: "full" })), _jsxs(Stack, Object.assign({ as: "button", p: "base", onClick: () => {
|
|
15
|
+
return (_jsxs(Container, { position: "relative", children: [value && (_jsx(Image, { src: CheckInCircle, alt: "check", w: "22px", h: "auto", position: "absolute", top: "-4px", left: "-2px", boxShadow: "lg", borderRadius: "full" })), _jsxs(Stack, Object.assign({ as: "button", p: "base", w: "full", onClick: () => {
|
|
15
16
|
onChange(!value);
|
|
16
17
|
callback === null || callback === void 0 ? void 0 : callback(Object.assign(Object.assign({}, field), { value: !value }));
|
|
17
18
|
} }, setOptionButtonStyles(value), { children: [_jsxs(Flex, { gap: "2", w: "full", align: "center", children: [_jsx(Image, { src: iconSrc, alt: "icon", h: "16px", w: "auto" }), label && (_jsx(Text, { fontWeight: "bold", fontSize: "xs", textTransform: "capitalize", fontFamily: "secondary", children: label }))] }), _jsx(Text, { fontFamily: "secondary", textAlign: "left", children: description })] }))] }));
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { DynamicFormI } from '@/interfaces';
|
|
2
|
-
export declare const WizardStepOptions: ({ form, title, callback }: DynamicFormI) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare const WizardStepOptions: ({ form, title, callback, style, }: DynamicFormI) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -3,9 +3,10 @@ import { Container, SimpleGrid, Stack, Text, Image, Center, } from '@chakra-ui/r
|
|
|
3
3
|
import { Controller, useFormContext } from 'react-hook-form';
|
|
4
4
|
import { CheckInCircle } from '@/assets/images';
|
|
5
5
|
import { fieldIcons, setOptionButtonStyles } from '@/helpers';
|
|
6
|
-
export const WizardStepOptions = ({ form, title, callback }) => {
|
|
6
|
+
export const WizardStepOptions = ({ form, title, callback, style = 'wizard', }) => {
|
|
7
7
|
const { control } = useFormContext();
|
|
8
|
-
|
|
8
|
+
const isWizard = style === 'wizard';
|
|
9
|
+
return (_jsxs(Stack, { spacing: "base", bg: "lightBlue.1", p: "base", children: [_jsx(Text, { fontFamily: "secondary", fontSize: "sm", children: title }), _jsx(SimpleGrid, { columns: { base: 3, md: isWizard ? 6 : 5 }, spacing: "base", gridAutoRows: "1fr", alignItems: "stretch", children: form.map((field) => {
|
|
9
10
|
const { id, value, label, icon } = field;
|
|
10
11
|
return (_jsx(Controller, { control: control, name: id, defaultValue: value, render: ({ field: { value, onChange } }) => {
|
|
11
12
|
const iconSrc = icon
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { WizardTextHeaderI } from '@/interfaces';
|
|
2
|
-
export declare const WizardTextBody: ({ title, subtitle }: WizardTextHeaderI) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare const WizardTextBody: ({ title, subtitle, style, }: WizardTextHeaderI) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Center, Stack, Text } from '@chakra-ui/react';
|
|
3
|
-
export const WizardTextBody = ({ title, subtitle }) => {
|
|
4
|
-
|
|
2
|
+
import { Box, Center, Stack, Text } from '@chakra-ui/react';
|
|
3
|
+
export const WizardTextBody = ({ title, subtitle, style, }) => {
|
|
4
|
+
const isWizard = style === 'wizard';
|
|
5
|
+
if (isWizard) {
|
|
6
|
+
return (_jsx(Center, { w: "full", minH: { md: '100px' }, children: _jsxs(Stack, { spacing: "4", w: { base: 'full', md: '80%' }, children: [_jsx(Text, { fontSize: { base: 'xl', md: '2xl' }, lineHeight: { base: 'shorter', md: 'base' }, textAlign: { base: 'left', md: 'center' }, children: title }), subtitle && (_jsx(Text, { fontFamily: "secondary", textAlign: { base: 'left', md: 'center' }, children: subtitle }))] }) }));
|
|
7
|
+
}
|
|
8
|
+
return (_jsx(Box, { p: "base", children: _jsxs(Stack, { spacing: "4", w: "full", children: [_jsx(Text, { fontSize: "2xl", lineHeight: "base", textAlign: "left", children: title }), subtitle && (_jsx(Text, { fontFamily: "secondary", textAlign: "left", children: subtitle }))] }) }));
|
|
5
9
|
};
|
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, AddToHomefile, AlertBanner, AphwTile, AppBar, AssignableReceipts, BackHeader, BackendAlert, BarDivider, CancelAccount, CatalogPopup, CloudsAnimation, ContactList, ContactsContent, ContainerHeader, ControlledWizard, CreateDocumentHeader, CreateHouseholdItemHeader, CreditCardContainer, CreditCardError, CustomerTile, DeleteBanner, Dialog, DisplayFiles, DisplayFilesDetail, DisplayOptions, DisplayReceipts, DocumentMenu, DocumentNameHeader, DocumentPreview, DynamicForm, EditAccountType, EditHomeBody, EditHomeFooter, EditHomeHeader, EditHomePanel, EditItemName, 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, HomeDetailsContent, HomefileMonitoring, HomeHeader, HomeItemList, HomeItemManualInfo, HomeMonitor, HomeMonitorPanel, HomeMonitorSteps, HomeSharedWith, HomieAddItems, InboxForwardBanner, InboxTile, ItemFormPanel, ItemFormTabs, ItemNameHeader, ItemsReviewBanner, ItemSubTypeSelect, Launchpad, LaunchpadAutofilerBanner, LaunchpadReceiptAutofiler, LaunchpadReceiptPanel, LaunchpadTour, LeftPanel, Loading, MediaDetailsStep, MessagePanel, MessageChatPanel, MinimizedTiles, MonthlyCharge, MortgageInfo, MoveModal, MyHomes, MyProfileBody, MyProfileContent, MyProfileFooter, MyProfileHeader, 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, SearchItemLoader, ShareContactsContent, SharedAccounts, SharedHomeContent, SharedHomeHeader, ShareHome, ShareHomeConnections, ShareHomeForm, ShineTile, ShortPartnerTile, SignIn, SignUp, SkeletonBox, 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, WeatherWidget, WellDone, YtdTile, WizardTextHeader, WizardValueSummary, } from './components';
|
|
1
|
+
export { ActivateAccount, ActiveSubscription, AddCardBanner, AddEditContactPanel, AddFolder, AddHomeContent, AddHomeItem, AddHomeItemHeader, AddMedia, AddPropertyRecords, Address, AddPopup, AddTile, AddToHomefile, AlertBanner, AphwTile, AppBar, AssignableReceipts, BackHeader, BackendAlert, BarDivider, CancelAccount, CatalogPopup, CloudsAnimation, ContactList, ContactsContent, ContainerHeader, ControlledWizard, CreateDocumentHeader, CreateHouseholdItemHeader, CreditCardContainer, CreditCardError, CustomerTile, DeleteBanner, Dialog, DisplayFiles, DisplayFilesDetail, DisplayOptions, DisplayReceipts, DocumentMenu, DocumentNameHeader, DocumentPreview, DynamicForm, EditAccountType, EditHomeBody, EditHomeFooter, EditHomeHeader, EditHomePanel, EditItemName, EmailPermissions, EmailValidation, Feedback, FileDetail, FilesUploader, FlowStep, FolderDetail, FolderDetailBody, FolderDetailContent, FolderDetailFooter, FolderDetailHeader, FolderInfo, FolderSharing, FolderTypeSelection, FooterButtons, FooterDrawer, GenericBackHeader, GroupCard, GroupsContainer, GroupsHeader, Header, HelpContent, HomeAssistant, HomeAssistantPanel, HomeAssistantWizardPanel, HomeBoardGrid, HomeBoardTour, HomeCard, HomeCardWithRecipent, HomeDetailsContent, HomefileMonitoring, HomeHeader, HomeItemList, HomeItemManualInfo, HomeMonitor, HomeMonitorPanel, HomeMonitorSteps, HomeSharedWith, HomieAddItems, InboxForwardBanner, InboxTile, ItemFormPanel, ItemFormTabs, ItemNameHeader, ItemsReviewBanner, ItemSubTypeSelect, Launchpad, LaunchpadAutofilerBanner, LaunchpadReceiptAutofiler, LaunchpadReceiptPanel, LaunchpadTour, LeftPanel, Loading, MediaDetailsStep, MessagePanel, MessageChatPanel, MinimizedTiles, MonthlyCharge, MortgageInfo, MoveModal, MyHomes, MyProfileBody, MyProfileContent, MyProfileFooter, MyProfileHeader, 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, SearchItemLoader, ShareContactsContent, SharedAccounts, SharedHomeContent, SharedHomeHeader, ShareHome, ShareHomeConnections, ShareHomeForm, ShineTile, ShortPartnerTile, SignIn, SignUp, SkeletonBox, 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, WeatherWidget, WellDone, YtdTile, WizardTextHeader, WizardValueSummary, } from './components';
|
|
2
2
|
export { useCustomToast } from './hooks';
|
|
3
3
|
export { randomColor, mapApiObjectToFormFields, mapForecastToWidget, } from './utils';
|
|
4
4
|
export { Contacts, MagnifyingGlassReport, Message, Register, Receipts, Price, BlueFolderShared, Calendar, Create, Notes, } from './assets/images';
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { ActivateAccount, ActiveSubscription, AddCardBanner, AddEditContactPanel, AddFolder, AddHomeContent, AddHomeItem, AddHomeItemHeader, AddMedia, AddPropertyRecords, Address, AddPopup, AddTile, AddToHomefile, AlertBanner, AphwTile, AppBar, AssignableReceipts, BackHeader, BackendAlert, BarDivider, CancelAccount, CatalogPopup, CloudsAnimation, ContactList, ContactsContent, ContainerHeader, ControlledWizard, CreateDocumentHeader, CreateHouseholdItemHeader, CreditCardContainer, CreditCardError, CustomerTile, DeleteBanner, Dialog, DisplayFiles, DisplayFilesDetail, DisplayOptions, DisplayReceipts, DocumentMenu, DocumentNameHeader, DocumentPreview, DynamicForm, EditAccountType, EditHomeBody, EditHomeFooter, EditHomeHeader, EditHomePanel, EditItemName, 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, HomeDetailsContent, HomefileMonitoring, HomeHeader, HomeItemList, HomeItemManualInfo, HomeMonitor, HomeMonitorPanel, HomeMonitorSteps, HomeSharedWith, HomieAddItems, InboxForwardBanner, InboxTile, ItemFormPanel, ItemFormTabs, ItemNameHeader, ItemsReviewBanner, ItemSubTypeSelect, Launchpad, LaunchpadAutofilerBanner, LaunchpadReceiptAutofiler, LaunchpadReceiptPanel, LaunchpadTour, LeftPanel, Loading, MediaDetailsStep, MessagePanel, MessageChatPanel, MinimizedTiles, MonthlyCharge, MortgageInfo, MoveModal, MyHomes, MyProfileBody, MyProfileContent, MyProfileFooter, MyProfileHeader, 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, SearchItemLoader, ShareContactsContent, SharedAccounts, SharedHomeContent, SharedHomeHeader, ShareHome, ShareHomeConnections, ShareHomeForm, ShineTile, ShortPartnerTile, SignIn, SignUp, SkeletonBox, 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, WeatherWidget, WellDone, YtdTile, WizardTextHeader, WizardValueSummary, } from './components';
|
|
1
|
+
export { ActivateAccount, ActiveSubscription, AddCardBanner, AddEditContactPanel, AddFolder, AddHomeContent, AddHomeItem, AddHomeItemHeader, AddMedia, AddPropertyRecords, Address, AddPopup, AddTile, AddToHomefile, AlertBanner, AphwTile, AppBar, AssignableReceipts, BackHeader, BackendAlert, BarDivider, CancelAccount, CatalogPopup, CloudsAnimation, ContactList, ContactsContent, ContainerHeader, ControlledWizard, CreateDocumentHeader, CreateHouseholdItemHeader, CreditCardContainer, CreditCardError, CustomerTile, DeleteBanner, Dialog, DisplayFiles, DisplayFilesDetail, DisplayOptions, DisplayReceipts, DocumentMenu, DocumentNameHeader, DocumentPreview, DynamicForm, EditAccountType, EditHomeBody, EditHomeFooter, EditHomeHeader, EditHomePanel, EditItemName, EmailPermissions, EmailValidation, Feedback, FileDetail, FilesUploader, FlowStep, FolderDetail, FolderDetailBody, FolderDetailContent, FolderDetailFooter, FolderDetailHeader, FolderInfo, FolderSharing, FolderTypeSelection, FooterButtons, FooterDrawer, GenericBackHeader, GroupCard, GroupsContainer, GroupsHeader, Header, HelpContent, HomeAssistant, HomeAssistantPanel, HomeAssistantWizardPanel, HomeBoardGrid, HomeBoardTour, HomeCard, HomeCardWithRecipent, HomeDetailsContent, HomefileMonitoring, HomeHeader, HomeItemList, HomeItemManualInfo, HomeMonitor, HomeMonitorPanel, HomeMonitorSteps, HomeSharedWith, HomieAddItems, InboxForwardBanner, InboxTile, ItemFormPanel, ItemFormTabs, ItemNameHeader, ItemsReviewBanner, ItemSubTypeSelect, Launchpad, LaunchpadAutofilerBanner, LaunchpadReceiptAutofiler, LaunchpadReceiptPanel, LaunchpadTour, LeftPanel, Loading, MediaDetailsStep, MessagePanel, MessageChatPanel, MinimizedTiles, MonthlyCharge, MortgageInfo, MoveModal, MyHomes, MyProfileBody, MyProfileContent, MyProfileFooter, MyProfileHeader, 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, SearchItemLoader, ShareContactsContent, SharedAccounts, SharedHomeContent, SharedHomeHeader, ShareHome, ShareHomeConnections, ShareHomeForm, ShineTile, ShortPartnerTile, SignIn, SignUp, SkeletonBox, 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, WeatherWidget, WellDone, YtdTile, WizardTextHeader, WizardValueSummary, } from './components';
|
|
2
2
|
export { useCustomToast } from './hooks';
|
|
3
3
|
export { randomColor, mapApiObjectToFormFields, mapForecastToWidget, } from './utils';
|
|
4
4
|
export { Contacts, MagnifyingGlassReport, Message, Register, Receipts, Price, BlueFolderShared, Calendar, Create, Notes, } from './assets/images';
|
|
@@ -2,11 +2,11 @@ import { DynamicFormI, ReportI } from '@/interfaces';
|
|
|
2
2
|
export interface HomeAssistantPanelI {
|
|
3
3
|
currentForm: DynamicFormI['form'];
|
|
4
4
|
currentStep: number;
|
|
5
|
-
onApplianceClick
|
|
5
|
+
onApplianceClick?: (selected: string[]) => void;
|
|
6
6
|
onBack: () => void;
|
|
7
7
|
onClose: () => void;
|
|
8
8
|
onNext: () => void;
|
|
9
|
-
onSave
|
|
9
|
+
onSave?: (form?: ReportI[]) => void;
|
|
10
10
|
backDisabled: boolean;
|
|
11
11
|
nextDisabled: boolean;
|
|
12
12
|
hasCompleted: boolean;
|
|
@@ -32,4 +32,202 @@ export const propertiesMock = [
|
|
|
32
32
|
zip: '20171',
|
|
33
33
|
},
|
|
34
34
|
},
|
|
35
|
+
{
|
|
36
|
+
id: '11',
|
|
37
|
+
address: {
|
|
38
|
+
address: '13723 Neil Armstrong Ave Unit 308, Herndon, Va 20171',
|
|
39
|
+
city: 'Herndon',
|
|
40
|
+
county: 'Fairfax',
|
|
41
|
+
state: 'VA',
|
|
42
|
+
street: '13723 Neil Armstrong Ave Unit 308',
|
|
43
|
+
zip: '20171',
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
id: '21',
|
|
48
|
+
address: {
|
|
49
|
+
address: '13723 Neil Armstrong Ave Unit 308, Herndon, Va 20171',
|
|
50
|
+
city: 'Herndon',
|
|
51
|
+
county: 'Fairfax',
|
|
52
|
+
state: 'VA',
|
|
53
|
+
street: '13723 Neil Armstrong Ave Unit 308',
|
|
54
|
+
zip: '20171',
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
id: '31',
|
|
59
|
+
address: {
|
|
60
|
+
address: '13723 Neil Armstrong Ave Unit 308, Herndon, Va 20171',
|
|
61
|
+
city: 'Herndon',
|
|
62
|
+
county: 'Fairfax',
|
|
63
|
+
state: 'VA',
|
|
64
|
+
street: '13723 Neil Armstrong Ave Unit 308',
|
|
65
|
+
zip: '20171',
|
|
66
|
+
},
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
id: '12',
|
|
70
|
+
address: {
|
|
71
|
+
address: '13723 Neil Armstrong Ave Unit 308, Herndon, Va 20171',
|
|
72
|
+
city: 'Herndon',
|
|
73
|
+
county: 'Fairfax',
|
|
74
|
+
state: 'VA',
|
|
75
|
+
street: '13723 Neil Armstrong Ave Unit 308',
|
|
76
|
+
zip: '20171',
|
|
77
|
+
},
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
id: '22',
|
|
81
|
+
address: {
|
|
82
|
+
address: '13723 Neil Armstrong Ave Unit 308, Herndon, Va 20171',
|
|
83
|
+
city: 'Herndon',
|
|
84
|
+
county: 'Fairfax',
|
|
85
|
+
state: 'VA',
|
|
86
|
+
street: '13723 Neil Armstrong Ave Unit 308',
|
|
87
|
+
zip: '20171',
|
|
88
|
+
},
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
id: '32',
|
|
92
|
+
address: {
|
|
93
|
+
address: '13723 Neil Armstrong Ave Unit 308, Herndon, Va 20171',
|
|
94
|
+
city: 'Herndon',
|
|
95
|
+
county: 'Fairfax',
|
|
96
|
+
state: 'VA',
|
|
97
|
+
street: '13723 Neil Armstrong Ave Unit 308',
|
|
98
|
+
zip: '20171',
|
|
99
|
+
},
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
id: '13',
|
|
103
|
+
address: {
|
|
104
|
+
address: '13723 Neil Armstrong Ave Unit 308, Herndon, Va 20171',
|
|
105
|
+
city: 'Herndon',
|
|
106
|
+
county: 'Fairfax',
|
|
107
|
+
state: 'VA',
|
|
108
|
+
street: '13723 Neil Armstrong Ave Unit 308',
|
|
109
|
+
zip: '20171',
|
|
110
|
+
},
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
id: '23',
|
|
114
|
+
address: {
|
|
115
|
+
address: '13723 Neil Armstrong Ave Unit 308, Herndon, Va 20171',
|
|
116
|
+
city: 'Herndon',
|
|
117
|
+
county: 'Fairfax',
|
|
118
|
+
state: 'VA',
|
|
119
|
+
street: '13723 Neil Armstrong Ave Unit 308',
|
|
120
|
+
zip: '20171',
|
|
121
|
+
},
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
id: '33',
|
|
125
|
+
address: {
|
|
126
|
+
address: '13723 Neil Armstrong Ave Unit 308, Herndon, Va 20171',
|
|
127
|
+
city: 'Herndon',
|
|
128
|
+
county: 'Fairfax',
|
|
129
|
+
state: 'VA',
|
|
130
|
+
street: '13723 Neil Armstrong Ave Unit 308',
|
|
131
|
+
zip: '20171',
|
|
132
|
+
},
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
id: '14',
|
|
136
|
+
address: {
|
|
137
|
+
address: '13723 Neil Armstrong Ave Unit 308, Herndon, Va 20171',
|
|
138
|
+
city: 'Herndon',
|
|
139
|
+
county: 'Fairfax',
|
|
140
|
+
state: 'VA',
|
|
141
|
+
street: '13723 Neil Armstrong Ave Unit 308',
|
|
142
|
+
zip: '20171',
|
|
143
|
+
},
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
id: '24',
|
|
147
|
+
address: {
|
|
148
|
+
address: '13723 Neil Armstrong Ave Unit 308, Herndon, Va 20171',
|
|
149
|
+
city: 'Herndon',
|
|
150
|
+
county: 'Fairfax',
|
|
151
|
+
state: 'VA',
|
|
152
|
+
street: '13723 Neil Armstrong Ave Unit 308',
|
|
153
|
+
zip: '20171',
|
|
154
|
+
},
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
id: '34',
|
|
158
|
+
address: {
|
|
159
|
+
address: '13723 Neil Armstrong Ave Unit 308, Herndon, Va 20171',
|
|
160
|
+
city: 'Herndon',
|
|
161
|
+
county: 'Fairfax',
|
|
162
|
+
state: 'VA',
|
|
163
|
+
street: '13723 Neil Armstrong Ave Unit 308',
|
|
164
|
+
zip: '20171',
|
|
165
|
+
},
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
id: '15',
|
|
169
|
+
address: {
|
|
170
|
+
address: '13723 Neil Armstrong Ave Unit 308, Herndon, Va 20171',
|
|
171
|
+
city: 'Herndon',
|
|
172
|
+
county: 'Fairfax',
|
|
173
|
+
state: 'VA',
|
|
174
|
+
street: '13723 Neil Armstrong Ave Unit 308',
|
|
175
|
+
zip: '20171',
|
|
176
|
+
},
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
id: '25',
|
|
180
|
+
address: {
|
|
181
|
+
address: '13723 Neil Armstrong Ave Unit 308, Herndon, Va 20171',
|
|
182
|
+
city: 'Herndon',
|
|
183
|
+
county: 'Fairfax',
|
|
184
|
+
state: 'VA',
|
|
185
|
+
street: '13723 Neil Armstrong Ave Unit 308',
|
|
186
|
+
zip: '20171',
|
|
187
|
+
},
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
id: '35',
|
|
191
|
+
address: {
|
|
192
|
+
address: '13723 Neil Armstrong Ave Unit 308, Herndon, Va 20171',
|
|
193
|
+
city: 'Herndon',
|
|
194
|
+
county: 'Fairfax',
|
|
195
|
+
state: 'VA',
|
|
196
|
+
street: '13723 Neil Armstrong Ave Unit 308',
|
|
197
|
+
zip: '20171',
|
|
198
|
+
},
|
|
199
|
+
},
|
|
200
|
+
{
|
|
201
|
+
id: '16',
|
|
202
|
+
address: {
|
|
203
|
+
address: '13723 Neil Armstrong Ave Unit 308, Herndon, Va 20171',
|
|
204
|
+
city: 'Herndon',
|
|
205
|
+
county: 'Fairfax',
|
|
206
|
+
state: 'VA',
|
|
207
|
+
street: '13723 Neil Armstrong Ave Unit 308',
|
|
208
|
+
zip: '20171',
|
|
209
|
+
},
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
id: '26',
|
|
213
|
+
address: {
|
|
214
|
+
address: '13723 Neil Armstrong Ave Unit 308, Herndon, Va 20171',
|
|
215
|
+
city: 'Herndon',
|
|
216
|
+
county: 'Fairfax',
|
|
217
|
+
state: 'VA',
|
|
218
|
+
street: '13723 Neil Armstrong Ave Unit 308',
|
|
219
|
+
zip: '20171',
|
|
220
|
+
},
|
|
221
|
+
},
|
|
222
|
+
{
|
|
223
|
+
id: '36',
|
|
224
|
+
address: {
|
|
225
|
+
address: '13723 Neil Armstrong Ave Unit 308, Herndon, Va 20171',
|
|
226
|
+
city: 'Herndon',
|
|
227
|
+
county: 'Fairfax',
|
|
228
|
+
state: 'VA',
|
|
229
|
+
street: '13723 Neil Armstrong Ave Unit 308',
|
|
230
|
+
zip: '20171',
|
|
231
|
+
},
|
|
232
|
+
},
|
|
35
233
|
];
|
|
@@ -3,3 +3,4 @@ import { HomeAssistantPanelI } from '@/interfaces';
|
|
|
3
3
|
declare const _default: Meta;
|
|
4
4
|
export default _default;
|
|
5
5
|
export declare const HomeAssistantPanelComponent: (args: HomeAssistantPanelI) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export declare const NewHomeAssistantPanelComponent: (args: HomeAssistantPanelI) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { DrawerContent } from '@chakra-ui/react';
|
|
3
3
|
import { action } from '@storybook/addon-actions';
|
|
4
|
-
import { HomeAssistantPanel, RightPanel } from '@/components';
|
|
5
|
-
import { homeAssitantStep1FormMock, homeAssitantStep2FormMock, homeAssitantStep3FormMock, homeAssitantStep4FormMock, homeAssitantStep5FormMock, homeAssitantStep6FormMock, } from '@/mocks';
|
|
4
|
+
import { HomeAssistantPanel, HomeAssistantWizardPanel, RightPanel, } from '@/components';
|
|
5
|
+
import { homeAssitantStep1FormMock, homeAssitantStep2FormMock, homeAssitantStep3FormMock, homeAssitantStep4FormMock, homeAssitantStep5FormMock, homeAssitantStep6FormMock, homeWizardForm, } from '@/mocks';
|
|
6
6
|
import { useState } from 'react';
|
|
7
7
|
export default {
|
|
8
8
|
title: 'Components/HomeAssistant',
|
|
@@ -39,3 +39,18 @@ export const HomeAssistantPanelComponent = (args) => {
|
|
|
39
39
|
const currentForm = forms[currentStep];
|
|
40
40
|
return (_jsx(DrawerContent, { bg: "lightBlue.1", children: _jsx(HomeAssistantPanel, Object.assign({}, args, { currentStep: currentStep, currentForm: currentForm, onNext: handleFormChange, onBack: handleBack, onSave: action('onSave'), isLoading: false })) }));
|
|
41
41
|
};
|
|
42
|
+
export const NewHomeAssistantPanelComponent = (args) => {
|
|
43
|
+
const [currentStep, setCurrentStep] = useState(0);
|
|
44
|
+
const handleFormChange = () => setCurrentStep((prev) => {
|
|
45
|
+
if (prev === 5)
|
|
46
|
+
return 1;
|
|
47
|
+
return prev + 1;
|
|
48
|
+
});
|
|
49
|
+
const handleBack = () => setCurrentStep((prev) => {
|
|
50
|
+
if (prev === 0)
|
|
51
|
+
return 5;
|
|
52
|
+
return prev - 1;
|
|
53
|
+
});
|
|
54
|
+
const currentForm = homeWizardForm[currentStep];
|
|
55
|
+
return (_jsx(DrawerContent, { bg: "lightBlue.1", children: _jsx(HomeAssistantWizardPanel, Object.assign({}, args, { currentStep: currentStep + 1, currentForm: [currentForm], onNext: handleFormChange, onBack: handleBack, onSave: action('onSave'), isLoading: false })) }));
|
|
56
|
+
};
|
|
@@ -39,10 +39,6 @@ export const ControlledWizardComponent = () => {
|
|
|
39
39
|
} }) })] })),
|
|
40
40
|
}));
|
|
41
41
|
return (_jsx(ControlledWizard, { minHeight: "700px", step: step, setStep: setStep, steps: [
|
|
42
|
-
{
|
|
43
|
-
header: (_jsx(WizardTextHeader, { title: "This is the data we found in public records.", subtitle: "The details linked to your address come from public data sources and may not \nrepresent the most up-to-date information about your home." })),
|
|
44
|
-
body: ({ setStep }) => (_jsx(WizardValueSummary, { title: "The Edmunds", address: "113 South First Street, Austin TX 89853", estimatedValue: 894000, purchasePrice: 456432, assessedValue: 726678, purchasePriceDetails: purchasePriceMock, assessedValueDetails: assessedValueMock, onAccurate: () => setStep(step + 1), onNotAccurate: () => setStep(step + 1) })),
|
|
45
|
-
},
|
|
46
42
|
{
|
|
47
43
|
header: (_jsx(WizardTextHeader, { title: "Hi John, let\u2019s get your Homefile set up.", subtitle: "Complete this quick setup and we\u2019ll handle the rest." })),
|
|
48
44
|
body: ({ setStep }) => (_jsx(MyHomeDetails, { isWizard: true, userFirstName: "Adam", values: formValues, properties: propertiesMock, handleCreateHomeClick: (values) => __awaiter(void 0, void 0, void 0, function* () {
|
|
@@ -61,6 +57,10 @@ export const ControlledWizardComponent = () => {
|
|
|
61
57
|
setStep(3);
|
|
62
58
|
} })),
|
|
63
59
|
},
|
|
60
|
+
{
|
|
61
|
+
header: (_jsx(WizardTextHeader, { title: "This is the data we found in public records.", subtitle: "The details linked to your address come from public data sources and may not \nrepresent the most up-to-date information about your home." })),
|
|
62
|
+
body: ({ setStep }) => (_jsx(WizardValueSummary, { title: "The Edmunds", address: "113 South First Street, Austin TX 89853", estimatedValue: 894000, purchasePrice: 456432, assessedValue: 726678, purchasePriceDetails: purchasePriceMock, assessedValueDetails: assessedValueMock, onAccurate: () => setStep(step + 1), onNotAccurate: () => setStep(step + 1) })),
|
|
63
|
+
},
|
|
64
64
|
{
|
|
65
65
|
header: (_jsx(WizardSuccessHeader, { title: "Your homefile has been created.", subtitle: "Your Homefile is created. You will be able to edit and update your home details once setup is complete.", address: {
|
|
66
66
|
city: 'Austin',
|
|
@@ -69,7 +69,7 @@ export const ControlledWizardComponent = () => {
|
|
|
69
69
|
number: '123',
|
|
70
70
|
zip: '80123',
|
|
71
71
|
}, name: "your home" })),
|
|
72
|
-
body: () => (_jsx(Center, { w: "full", h: "full", children: _jsx(HomeAssistantTutorial, { onStart: () => setStep(
|
|
72
|
+
body: () => (_jsx(Center, { w: "full", h: "full", children: _jsx(HomeAssistantTutorial, { onStart: () => setStep(step + 1) }) })),
|
|
73
73
|
},
|
|
74
74
|
...homeAssistantSteps,
|
|
75
75
|
] }));
|
package/package.json
CHANGED
|
@@ -6,15 +6,24 @@ import {
|
|
|
6
6
|
WizardStepOptions,
|
|
7
7
|
} from '@/components'
|
|
8
8
|
|
|
9
|
-
export const HomeInitialSetup = ({ fields, callback }: FieldTypesI) => {
|
|
9
|
+
export const HomeInitialSetup = ({ fields, callback, style }: FieldTypesI) => {
|
|
10
|
+
const isWizard = style === 'wizard'
|
|
10
11
|
return (
|
|
11
|
-
<Stack
|
|
12
|
+
<Stack
|
|
13
|
+
bg="neutral.white"
|
|
14
|
+
spacing={{ base: '6', md: isWizard ? '10' : '0' }}
|
|
15
|
+
>
|
|
12
16
|
{fields?.map(
|
|
13
17
|
({ children = [], id, label = '', type, value, description }) => {
|
|
14
18
|
switch (type) {
|
|
15
19
|
case 'home-wizard-header':
|
|
16
20
|
return (
|
|
17
|
-
<WizardTextBody
|
|
21
|
+
<WizardTextBody
|
|
22
|
+
key={id}
|
|
23
|
+
title={label}
|
|
24
|
+
subtitle={description}
|
|
25
|
+
style={style}
|
|
26
|
+
/>
|
|
18
27
|
)
|
|
19
28
|
case 'home-wizard-initial-setup':
|
|
20
29
|
return (
|
|
@@ -23,6 +32,7 @@ export const HomeInitialSetup = ({ fields, callback }: FieldTypesI) => {
|
|
|
23
32
|
form={children}
|
|
24
33
|
title={String(value)}
|
|
25
34
|
callback={callback}
|
|
35
|
+
style={style}
|
|
26
36
|
/>
|
|
27
37
|
)
|
|
28
38
|
case 'home-wizard-step-options':
|
|
@@ -32,6 +42,7 @@ export const HomeInitialSetup = ({ fields, callback }: FieldTypesI) => {
|
|
|
32
42
|
form={children}
|
|
33
43
|
title={String(value)}
|
|
34
44
|
callback={callback}
|
|
45
|
+
style={style}
|
|
35
46
|
/>
|
|
36
47
|
)
|
|
37
48
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PropsWithChildren, useState, useEffect
|
|
1
|
+
import { PropsWithChildren, useState, useEffect } from 'react'
|
|
2
2
|
import { FormProvider } from 'react-hook-form'
|
|
3
3
|
import { t } from 'i18next'
|
|
4
4
|
import {
|
|
@@ -16,6 +16,8 @@ import {
|
|
|
16
16
|
HomeAssistantPanelStep,
|
|
17
17
|
PanelHeader,
|
|
18
18
|
Loading,
|
|
19
|
+
HomeAssistantWizardSteps,
|
|
20
|
+
DynamicForm,
|
|
19
21
|
} from '@/components'
|
|
20
22
|
import { AppliancesType, HomeAssistantPanelI } from '@/interfaces'
|
|
21
23
|
import { homeAssistantSteps } from '@/helpers'
|
|
@@ -26,7 +28,7 @@ export const HomeAssistantPanel = ({
|
|
|
26
28
|
children,
|
|
27
29
|
currentForm,
|
|
28
30
|
currentStep,
|
|
29
|
-
onApplianceClick,
|
|
31
|
+
onApplianceClick = () => {},
|
|
30
32
|
onBack,
|
|
31
33
|
onClose,
|
|
32
34
|
onNext,
|
|
@@ -112,7 +114,7 @@ export const HomeAssistantPanel = ({
|
|
|
112
114
|
!hasCompleted && currentStep === 6
|
|
113
115
|
? t('buttons.finish')
|
|
114
116
|
: t('buttons.saveStep'),
|
|
115
|
-
onClick: () => onSave(updatedFields),
|
|
117
|
+
onClick: () => onSave?.(updatedFields),
|
|
116
118
|
}}
|
|
117
119
|
button3={
|
|
118
120
|
!hasCompleted && currentStep === 6
|
|
@@ -129,3 +131,66 @@ export const HomeAssistantPanel = ({
|
|
|
129
131
|
</>
|
|
130
132
|
)
|
|
131
133
|
}
|
|
134
|
+
|
|
135
|
+
export const HomeAssistantWizardPanel = ({
|
|
136
|
+
currentForm,
|
|
137
|
+
currentStep,
|
|
138
|
+
onBack,
|
|
139
|
+
onClose,
|
|
140
|
+
onNext,
|
|
141
|
+
onSave,
|
|
142
|
+
backDisabled,
|
|
143
|
+
nextDisabled,
|
|
144
|
+
hasCompleted,
|
|
145
|
+
isLoading,
|
|
146
|
+
}: PropsWithChildren<HomeAssistantPanelI>) => {
|
|
147
|
+
if (isLoading) return <Loading />
|
|
148
|
+
|
|
149
|
+
return (
|
|
150
|
+
<>
|
|
151
|
+
<DrawerHeader p="0">
|
|
152
|
+
<PanelHeader
|
|
153
|
+
handleCloseButton={onClose}
|
|
154
|
+
title={t('homeAssistant.title')}
|
|
155
|
+
icon={IA}
|
|
156
|
+
/>
|
|
157
|
+
</DrawerHeader>
|
|
158
|
+
<DrawerBody p="0">
|
|
159
|
+
<HomeAssistantWizardSteps currentStep={currentStep} />
|
|
160
|
+
<DynamicForm form={currentForm} showTitle={false} style="panel" />
|
|
161
|
+
</DrawerBody>
|
|
162
|
+
<DrawerFooter px="0" py="6" bg="neutral.white">
|
|
163
|
+
<FooterButtons
|
|
164
|
+
button1={
|
|
165
|
+
currentStep === 1
|
|
166
|
+
? undefined
|
|
167
|
+
: {
|
|
168
|
+
buttonStyle: 'secondaryFooter',
|
|
169
|
+
label: t('buttons.back'),
|
|
170
|
+
onClick: onBack,
|
|
171
|
+
isDisabled: backDisabled,
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
button2={{
|
|
175
|
+
buttonStyle: 'primaryFooter',
|
|
176
|
+
label:
|
|
177
|
+
!hasCompleted && currentStep === 5
|
|
178
|
+
? t('buttons.finish')
|
|
179
|
+
: t('buttons.saveStep'),
|
|
180
|
+
onClick: () => onSave?.(),
|
|
181
|
+
}}
|
|
182
|
+
button3={
|
|
183
|
+
!hasCompleted && currentStep === 5
|
|
184
|
+
? undefined
|
|
185
|
+
: {
|
|
186
|
+
buttonStyle: 'primaryFooter',
|
|
187
|
+
label: t('buttons.next'),
|
|
188
|
+
onClick: onNext,
|
|
189
|
+
isDisabled: nextDisabled,
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
/>
|
|
193
|
+
</DrawerFooter>
|
|
194
|
+
</>
|
|
195
|
+
)
|
|
196
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Box, Center, Image, Stack, Text } from '@chakra-ui/react'
|
|
2
2
|
import { CheckInCircle } from '@/assets/images'
|
|
3
3
|
import { HomeAssistantButtonI } from '@/interfaces'
|
|
4
4
|
import { getIconAltText } from '@/utils'
|
|
@@ -22,7 +22,7 @@ export const AddPropertyRecords = ({
|
|
|
22
22
|
properties: <ConfirmProperty {...props} handleAddress={onSelectAddress} />,
|
|
23
23
|
}
|
|
24
24
|
return (
|
|
25
|
-
<DrawerContent
|
|
25
|
+
<DrawerContent>
|
|
26
26
|
<DrawerHeader p="0">
|
|
27
27
|
<PanelHeader
|
|
28
28
|
handleCloseButton={onClose}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { PropsWithChildren } from 'react'
|
|
2
2
|
import { Box, Flex, useRadio, UseRadioProps } from '@chakra-ui/react'
|
|
3
3
|
import { isSafari } from '@/utils'
|
|
4
4
|
|
|
@@ -33,6 +33,7 @@ export const RadioCard = (props: PropsWithChildren<UseRadioProps>) => {
|
|
|
33
33
|
rounded={isSafari() ? 'sm' : 'full'}
|
|
34
34
|
border="1px"
|
|
35
35
|
borderColor="lightBlue.5"
|
|
36
|
+
flexShrink={0}
|
|
36
37
|
_checked={{
|
|
37
38
|
bg: 'blue.2',
|
|
38
39
|
outline: '2px solid white',
|
|
@@ -15,14 +15,19 @@ export const WizardInitialOptions = ({
|
|
|
15
15
|
form,
|
|
16
16
|
title,
|
|
17
17
|
callback,
|
|
18
|
+
style = 'wizard',
|
|
18
19
|
}: DynamicFormI) => {
|
|
19
20
|
const { control } = useFormContext()
|
|
21
|
+
const isWizard = style === 'wizard'
|
|
20
22
|
return (
|
|
21
23
|
<Stack spacing="base" bg="lightBlue.1" p="base">
|
|
22
24
|
<Text fontFamily="secondary" fontSize="sm">
|
|
23
25
|
{title}
|
|
24
26
|
</Text>
|
|
25
|
-
<SimpleGrid
|
|
27
|
+
<SimpleGrid
|
|
28
|
+
columns={{ base: 1, md: isWizard ? 2 : 1 }}
|
|
29
|
+
spacing={{ base: 1, md: isWizard ? 'base' : 1 }}
|
|
30
|
+
>
|
|
26
31
|
{form.map((field) => {
|
|
27
32
|
const { id, value, label, icon, description } = field
|
|
28
33
|
return (
|
|
@@ -54,6 +59,7 @@ export const WizardInitialOptions = ({
|
|
|
54
59
|
<Stack
|
|
55
60
|
as="button"
|
|
56
61
|
p="base"
|
|
62
|
+
w="full"
|
|
57
63
|
onClick={() => {
|
|
58
64
|
onChange(!value)
|
|
59
65
|
callback?.({ ...field, value: !value })
|
|
@@ -12,15 +12,21 @@ import { Controller, useFormContext } from 'react-hook-form'
|
|
|
12
12
|
import { CheckInCircle } from '@/assets/images'
|
|
13
13
|
import { fieldIcons, setOptionButtonStyles } from '@/helpers'
|
|
14
14
|
|
|
15
|
-
export const WizardStepOptions = ({
|
|
15
|
+
export const WizardStepOptions = ({
|
|
16
|
+
form,
|
|
17
|
+
title,
|
|
18
|
+
callback,
|
|
19
|
+
style = 'wizard',
|
|
20
|
+
}: DynamicFormI) => {
|
|
16
21
|
const { control } = useFormContext()
|
|
22
|
+
const isWizard = style === 'wizard'
|
|
17
23
|
return (
|
|
18
24
|
<Stack spacing="base" bg="lightBlue.1" p="base">
|
|
19
25
|
<Text fontFamily="secondary" fontSize="sm">
|
|
20
26
|
{title}
|
|
21
27
|
</Text>
|
|
22
28
|
<SimpleGrid
|
|
23
|
-
columns={6}
|
|
29
|
+
columns={{ base: 3, md: isWizard ? 6 : 5 }}
|
|
24
30
|
spacing="base"
|
|
25
31
|
gridAutoRows="1fr"
|
|
26
32
|
alignItems="stretch"
|
|
@@ -1,23 +1,48 @@
|
|
|
1
|
-
import { Center, Stack, Text } from '@chakra-ui/react'
|
|
1
|
+
import { Box, Center, Stack, Text } from '@chakra-ui/react'
|
|
2
2
|
import { WizardTextHeaderI } from '@/interfaces'
|
|
3
3
|
|
|
4
|
-
export const WizardTextBody = ({
|
|
4
|
+
export const WizardTextBody = ({
|
|
5
|
+
title,
|
|
6
|
+
subtitle,
|
|
7
|
+
style,
|
|
8
|
+
}: WizardTextHeaderI) => {
|
|
9
|
+
const isWizard = style === 'wizard'
|
|
10
|
+
|
|
11
|
+
if (isWizard) {
|
|
12
|
+
return (
|
|
13
|
+
<Center w="full" minH={{ md: '100px' }}>
|
|
14
|
+
<Stack spacing="4" w={{ base: 'full', md: '80%' }}>
|
|
15
|
+
<Text
|
|
16
|
+
fontSize={{ base: 'xl', md: '2xl' }}
|
|
17
|
+
lineHeight={{ base: 'shorter', md: 'base' }}
|
|
18
|
+
textAlign={{ base: 'left', md: 'center' }}
|
|
19
|
+
>
|
|
20
|
+
{title}
|
|
21
|
+
</Text>
|
|
22
|
+
{subtitle && (
|
|
23
|
+
<Text
|
|
24
|
+
fontFamily="secondary"
|
|
25
|
+
textAlign={{ base: 'left', md: 'center' }}
|
|
26
|
+
>
|
|
27
|
+
{subtitle}
|
|
28
|
+
</Text>
|
|
29
|
+
)}
|
|
30
|
+
</Stack>
|
|
31
|
+
</Center>
|
|
32
|
+
)
|
|
33
|
+
}
|
|
5
34
|
return (
|
|
6
|
-
<
|
|
7
|
-
<Stack spacing="4" w="
|
|
8
|
-
<Text
|
|
9
|
-
fontSize={{ base: 'xl', md: '2xl' }}
|
|
10
|
-
lineHeight={{ base: 'shorter', md: 'base' }}
|
|
11
|
-
textAlign="center"
|
|
12
|
-
>
|
|
35
|
+
<Box p="base">
|
|
36
|
+
<Stack spacing="4" w="full">
|
|
37
|
+
<Text fontSize="2xl" lineHeight="base" textAlign="left">
|
|
13
38
|
{title}
|
|
14
39
|
</Text>
|
|
15
40
|
{subtitle && (
|
|
16
|
-
<Text fontFamily="secondary" textAlign="
|
|
41
|
+
<Text fontFamily="secondary" textAlign="left">
|
|
17
42
|
{subtitle}
|
|
18
43
|
</Text>
|
|
19
44
|
)}
|
|
20
45
|
</Stack>
|
|
21
|
-
</
|
|
46
|
+
</Box>
|
|
22
47
|
)
|
|
23
48
|
}
|
package/src/index.ts
CHANGED
|
@@ -3,11 +3,11 @@ import { DynamicFormI, ReportI } from '@/interfaces'
|
|
|
3
3
|
export interface HomeAssistantPanelI {
|
|
4
4
|
currentForm: DynamicFormI['form']
|
|
5
5
|
currentStep: number
|
|
6
|
-
onApplianceClick
|
|
6
|
+
onApplianceClick?: (selected: string[]) => void
|
|
7
7
|
onBack: () => void
|
|
8
8
|
onClose: () => void
|
|
9
9
|
onNext: () => void
|
|
10
|
-
onSave
|
|
10
|
+
onSave?: (form?: ReportI[]) => void
|
|
11
11
|
backDisabled: boolean
|
|
12
12
|
nextDisabled: boolean
|
|
13
13
|
hasCompleted: boolean
|
|
@@ -34,4 +34,202 @@ export const propertiesMock: AddHomeContentI['properties'] = [
|
|
|
34
34
|
zip: '20171',
|
|
35
35
|
},
|
|
36
36
|
},
|
|
37
|
+
{
|
|
38
|
+
id: '11',
|
|
39
|
+
address: {
|
|
40
|
+
address: '13723 Neil Armstrong Ave Unit 308, Herndon, Va 20171',
|
|
41
|
+
city: 'Herndon',
|
|
42
|
+
county: 'Fairfax',
|
|
43
|
+
state: 'VA',
|
|
44
|
+
street: '13723 Neil Armstrong Ave Unit 308',
|
|
45
|
+
zip: '20171',
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
id: '21',
|
|
50
|
+
address: {
|
|
51
|
+
address: '13723 Neil Armstrong Ave Unit 308, Herndon, Va 20171',
|
|
52
|
+
city: 'Herndon',
|
|
53
|
+
county: 'Fairfax',
|
|
54
|
+
state: 'VA',
|
|
55
|
+
street: '13723 Neil Armstrong Ave Unit 308',
|
|
56
|
+
zip: '20171',
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
id: '31',
|
|
61
|
+
address: {
|
|
62
|
+
address: '13723 Neil Armstrong Ave Unit 308, Herndon, Va 20171',
|
|
63
|
+
city: 'Herndon',
|
|
64
|
+
county: 'Fairfax',
|
|
65
|
+
state: 'VA',
|
|
66
|
+
street: '13723 Neil Armstrong Ave Unit 308',
|
|
67
|
+
zip: '20171',
|
|
68
|
+
},
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
id: '12',
|
|
72
|
+
address: {
|
|
73
|
+
address: '13723 Neil Armstrong Ave Unit 308, Herndon, Va 20171',
|
|
74
|
+
city: 'Herndon',
|
|
75
|
+
county: 'Fairfax',
|
|
76
|
+
state: 'VA',
|
|
77
|
+
street: '13723 Neil Armstrong Ave Unit 308',
|
|
78
|
+
zip: '20171',
|
|
79
|
+
},
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
id: '22',
|
|
83
|
+
address: {
|
|
84
|
+
address: '13723 Neil Armstrong Ave Unit 308, Herndon, Va 20171',
|
|
85
|
+
city: 'Herndon',
|
|
86
|
+
county: 'Fairfax',
|
|
87
|
+
state: 'VA',
|
|
88
|
+
street: '13723 Neil Armstrong Ave Unit 308',
|
|
89
|
+
zip: '20171',
|
|
90
|
+
},
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
id: '32',
|
|
94
|
+
address: {
|
|
95
|
+
address: '13723 Neil Armstrong Ave Unit 308, Herndon, Va 20171',
|
|
96
|
+
city: 'Herndon',
|
|
97
|
+
county: 'Fairfax',
|
|
98
|
+
state: 'VA',
|
|
99
|
+
street: '13723 Neil Armstrong Ave Unit 308',
|
|
100
|
+
zip: '20171',
|
|
101
|
+
},
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
id: '13',
|
|
105
|
+
address: {
|
|
106
|
+
address: '13723 Neil Armstrong Ave Unit 308, Herndon, Va 20171',
|
|
107
|
+
city: 'Herndon',
|
|
108
|
+
county: 'Fairfax',
|
|
109
|
+
state: 'VA',
|
|
110
|
+
street: '13723 Neil Armstrong Ave Unit 308',
|
|
111
|
+
zip: '20171',
|
|
112
|
+
},
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
id: '23',
|
|
116
|
+
address: {
|
|
117
|
+
address: '13723 Neil Armstrong Ave Unit 308, Herndon, Va 20171',
|
|
118
|
+
city: 'Herndon',
|
|
119
|
+
county: 'Fairfax',
|
|
120
|
+
state: 'VA',
|
|
121
|
+
street: '13723 Neil Armstrong Ave Unit 308',
|
|
122
|
+
zip: '20171',
|
|
123
|
+
},
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
id: '33',
|
|
127
|
+
address: {
|
|
128
|
+
address: '13723 Neil Armstrong Ave Unit 308, Herndon, Va 20171',
|
|
129
|
+
city: 'Herndon',
|
|
130
|
+
county: 'Fairfax',
|
|
131
|
+
state: 'VA',
|
|
132
|
+
street: '13723 Neil Armstrong Ave Unit 308',
|
|
133
|
+
zip: '20171',
|
|
134
|
+
},
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
id: '14',
|
|
138
|
+
address: {
|
|
139
|
+
address: '13723 Neil Armstrong Ave Unit 308, Herndon, Va 20171',
|
|
140
|
+
city: 'Herndon',
|
|
141
|
+
county: 'Fairfax',
|
|
142
|
+
state: 'VA',
|
|
143
|
+
street: '13723 Neil Armstrong Ave Unit 308',
|
|
144
|
+
zip: '20171',
|
|
145
|
+
},
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
id: '24',
|
|
149
|
+
address: {
|
|
150
|
+
address: '13723 Neil Armstrong Ave Unit 308, Herndon, Va 20171',
|
|
151
|
+
city: 'Herndon',
|
|
152
|
+
county: 'Fairfax',
|
|
153
|
+
state: 'VA',
|
|
154
|
+
street: '13723 Neil Armstrong Ave Unit 308',
|
|
155
|
+
zip: '20171',
|
|
156
|
+
},
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
id: '34',
|
|
160
|
+
address: {
|
|
161
|
+
address: '13723 Neil Armstrong Ave Unit 308, Herndon, Va 20171',
|
|
162
|
+
city: 'Herndon',
|
|
163
|
+
county: 'Fairfax',
|
|
164
|
+
state: 'VA',
|
|
165
|
+
street: '13723 Neil Armstrong Ave Unit 308',
|
|
166
|
+
zip: '20171',
|
|
167
|
+
},
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
id: '15',
|
|
171
|
+
address: {
|
|
172
|
+
address: '13723 Neil Armstrong Ave Unit 308, Herndon, Va 20171',
|
|
173
|
+
city: 'Herndon',
|
|
174
|
+
county: 'Fairfax',
|
|
175
|
+
state: 'VA',
|
|
176
|
+
street: '13723 Neil Armstrong Ave Unit 308',
|
|
177
|
+
zip: '20171',
|
|
178
|
+
},
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
id: '25',
|
|
182
|
+
address: {
|
|
183
|
+
address: '13723 Neil Armstrong Ave Unit 308, Herndon, Va 20171',
|
|
184
|
+
city: 'Herndon',
|
|
185
|
+
county: 'Fairfax',
|
|
186
|
+
state: 'VA',
|
|
187
|
+
street: '13723 Neil Armstrong Ave Unit 308',
|
|
188
|
+
zip: '20171',
|
|
189
|
+
},
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
id: '35',
|
|
193
|
+
address: {
|
|
194
|
+
address: '13723 Neil Armstrong Ave Unit 308, Herndon, Va 20171',
|
|
195
|
+
city: 'Herndon',
|
|
196
|
+
county: 'Fairfax',
|
|
197
|
+
state: 'VA',
|
|
198
|
+
street: '13723 Neil Armstrong Ave Unit 308',
|
|
199
|
+
zip: '20171',
|
|
200
|
+
},
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
id: '16',
|
|
204
|
+
address: {
|
|
205
|
+
address: '13723 Neil Armstrong Ave Unit 308, Herndon, Va 20171',
|
|
206
|
+
city: 'Herndon',
|
|
207
|
+
county: 'Fairfax',
|
|
208
|
+
state: 'VA',
|
|
209
|
+
street: '13723 Neil Armstrong Ave Unit 308',
|
|
210
|
+
zip: '20171',
|
|
211
|
+
},
|
|
212
|
+
},
|
|
213
|
+
{
|
|
214
|
+
id: '26',
|
|
215
|
+
address: {
|
|
216
|
+
address: '13723 Neil Armstrong Ave Unit 308, Herndon, Va 20171',
|
|
217
|
+
city: 'Herndon',
|
|
218
|
+
county: 'Fairfax',
|
|
219
|
+
state: 'VA',
|
|
220
|
+
street: '13723 Neil Armstrong Ave Unit 308',
|
|
221
|
+
zip: '20171',
|
|
222
|
+
},
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
id: '36',
|
|
226
|
+
address: {
|
|
227
|
+
address: '13723 Neil Armstrong Ave Unit 308, Herndon, Va 20171',
|
|
228
|
+
city: 'Herndon',
|
|
229
|
+
county: 'Fairfax',
|
|
230
|
+
state: 'VA',
|
|
231
|
+
street: '13723 Neil Armstrong Ave Unit 308',
|
|
232
|
+
zip: '20171',
|
|
233
|
+
},
|
|
234
|
+
},
|
|
37
235
|
]
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import { Meta } from '@storybook/react'
|
|
2
2
|
import { DrawerContent } from '@chakra-ui/react'
|
|
3
3
|
import { action } from '@storybook/addon-actions'
|
|
4
|
-
import {
|
|
4
|
+
import {
|
|
5
|
+
HomeAssistantPanel,
|
|
6
|
+
HomeAssistantWizardPanel,
|
|
7
|
+
RightPanel,
|
|
8
|
+
} from '@/components'
|
|
5
9
|
import { HomeAssistantPanelI, ReportI } from '@/interfaces'
|
|
6
10
|
import {
|
|
7
11
|
homeAssitantStep1FormMock,
|
|
@@ -10,6 +14,7 @@ import {
|
|
|
10
14
|
homeAssitantStep4FormMock,
|
|
11
15
|
homeAssitantStep5FormMock,
|
|
12
16
|
homeAssitantStep6FormMock,
|
|
17
|
+
homeWizardForm,
|
|
13
18
|
} from '@/mocks'
|
|
14
19
|
import { useState } from 'react'
|
|
15
20
|
|
|
@@ -67,3 +72,33 @@ export const HomeAssistantPanelComponent = (args: HomeAssistantPanelI) => {
|
|
|
67
72
|
</DrawerContent>
|
|
68
73
|
)
|
|
69
74
|
}
|
|
75
|
+
|
|
76
|
+
export const NewHomeAssistantPanelComponent = (args: HomeAssistantPanelI) => {
|
|
77
|
+
const [currentStep, setCurrentStep] = useState<number>(0)
|
|
78
|
+
const handleFormChange = () =>
|
|
79
|
+
setCurrentStep((prev) => {
|
|
80
|
+
if (prev === 5) return 1
|
|
81
|
+
return prev + 1
|
|
82
|
+
})
|
|
83
|
+
|
|
84
|
+
const handleBack = () =>
|
|
85
|
+
setCurrentStep((prev) => {
|
|
86
|
+
if (prev === 0) return 5
|
|
87
|
+
return prev - 1
|
|
88
|
+
})
|
|
89
|
+
|
|
90
|
+
const currentForm = homeWizardForm[currentStep]
|
|
91
|
+
return (
|
|
92
|
+
<DrawerContent bg="lightBlue.1">
|
|
93
|
+
<HomeAssistantWizardPanel
|
|
94
|
+
{...args}
|
|
95
|
+
currentStep={currentStep + 1}
|
|
96
|
+
currentForm={[currentForm]}
|
|
97
|
+
onNext={handleFormChange}
|
|
98
|
+
onBack={handleBack}
|
|
99
|
+
onSave={action('onSave')}
|
|
100
|
+
isLoading={false}
|
|
101
|
+
/>
|
|
102
|
+
</DrawerContent>
|
|
103
|
+
)
|
|
104
|
+
}
|
|
@@ -80,28 +80,6 @@ export const ControlledWizardComponent = () => {
|
|
|
80
80
|
step={step}
|
|
81
81
|
setStep={setStep}
|
|
82
82
|
steps={[
|
|
83
|
-
{
|
|
84
|
-
header: (
|
|
85
|
-
<WizardTextHeader
|
|
86
|
-
title="This is the data we found in public records."
|
|
87
|
-
subtitle="The details linked to your address come from public data sources and may not
|
|
88
|
-
represent the most up-to-date information about your home."
|
|
89
|
-
/>
|
|
90
|
-
),
|
|
91
|
-
body: ({ setStep }) => (
|
|
92
|
-
<WizardValueSummary
|
|
93
|
-
title="The Edmunds"
|
|
94
|
-
address="113 South First Street, Austin TX 89853"
|
|
95
|
-
estimatedValue={894000}
|
|
96
|
-
purchasePrice={456432}
|
|
97
|
-
assessedValue={726678}
|
|
98
|
-
purchasePriceDetails={purchasePriceMock}
|
|
99
|
-
assessedValueDetails={assessedValueMock}
|
|
100
|
-
onAccurate={() => setStep(step + 1)}
|
|
101
|
-
onNotAccurate={() => setStep(step + 1)}
|
|
102
|
-
/>
|
|
103
|
-
),
|
|
104
|
-
},
|
|
105
83
|
{
|
|
106
84
|
header: (
|
|
107
85
|
<WizardTextHeader
|
|
@@ -146,6 +124,28 @@ represent the most up-to-date information about your home."
|
|
|
146
124
|
/>
|
|
147
125
|
),
|
|
148
126
|
},
|
|
127
|
+
{
|
|
128
|
+
header: (
|
|
129
|
+
<WizardTextHeader
|
|
130
|
+
title="This is the data we found in public records."
|
|
131
|
+
subtitle="The details linked to your address come from public data sources and may not
|
|
132
|
+
represent the most up-to-date information about your home."
|
|
133
|
+
/>
|
|
134
|
+
),
|
|
135
|
+
body: ({ setStep }) => (
|
|
136
|
+
<WizardValueSummary
|
|
137
|
+
title="The Edmunds"
|
|
138
|
+
address="113 South First Street, Austin TX 89853"
|
|
139
|
+
estimatedValue={894000}
|
|
140
|
+
purchasePrice={456432}
|
|
141
|
+
assessedValue={726678}
|
|
142
|
+
purchasePriceDetails={purchasePriceMock}
|
|
143
|
+
assessedValueDetails={assessedValueMock}
|
|
144
|
+
onAccurate={() => setStep(step + 1)}
|
|
145
|
+
onNotAccurate={() => setStep(step + 1)}
|
|
146
|
+
/>
|
|
147
|
+
),
|
|
148
|
+
},
|
|
149
149
|
{
|
|
150
150
|
header: (
|
|
151
151
|
<WizardSuccessHeader
|
|
@@ -163,10 +163,11 @@ represent the most up-to-date information about your home."
|
|
|
163
163
|
),
|
|
164
164
|
body: () => (
|
|
165
165
|
<Center w="full" h="full">
|
|
166
|
-
<HomeAssistantTutorial onStart={() => setStep(
|
|
166
|
+
<HomeAssistantTutorial onStart={() => setStep(step + 1)} />
|
|
167
167
|
</Center>
|
|
168
168
|
),
|
|
169
169
|
},
|
|
170
|
+
|
|
170
171
|
...homeAssistantSteps,
|
|
171
172
|
]}
|
|
172
173
|
/>
|