@homefile/components-v2 1.0.10 → 1.0.11
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/homeAssistant/HomeAssistantSteps.d.ts +1 -1
- package/dist/components/homeAssistant/HomeAssistantSteps.js +5 -11
- package/dist/components/homeBoard/HomeBoard.js +1 -1
- package/dist/hooks/useComponentStyles.js +1 -1
- package/dist/interfaces/homeAssistant/HomeAssistantSteps.interface.d.ts +1 -1
- package/package.json +1 -1
- package/src/components/homeAssistant/HomeAssistantSteps.tsx +5 -12
- package/src/components/homeBoard/HomeBoard.tsx +1 -1
- package/src/hooks/useComponentStyles.ts +1 -1
- package/src/interfaces/homeAssistant/HomeAssistantSteps.interface.ts +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { HomeAssistantStepsI } from '../../interfaces';
|
|
2
|
-
export declare const HomeAssistantSteps: ({ currentStep, onStepClick,
|
|
2
|
+
export declare const HomeAssistantSteps: ({ currentStep, onStepClick, currentPanel, }: HomeAssistantStepsI) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -2,12 +2,11 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { Center, SimpleGrid, Stack } from '@chakra-ui/react';
|
|
3
3
|
import { HomeAssistantButton, HomeAssistantStepper } from '..';
|
|
4
4
|
import { homeAssistantSteps } from '../../helpers';
|
|
5
|
-
import { useState } from 'react';
|
|
6
5
|
import { useComponentStyles } from '../../hooks';
|
|
7
|
-
export const HomeAssistantSteps = ({ currentStep, onStepClick,
|
|
8
|
-
const
|
|
9
|
-
const stepId = `homeAssistantButton-${
|
|
10
|
-
const componentIds =
|
|
6
|
+
export const HomeAssistantSteps = ({ currentStep, onStepClick, currentPanel, }) => {
|
|
7
|
+
const wrapperZIndex = currentPanel ? undefined : '2';
|
|
8
|
+
const stepId = `homeAssistantButton-${currentPanel}`;
|
|
9
|
+
const componentIds = currentPanel
|
|
11
10
|
? [
|
|
12
11
|
'homeAssistantButton-1',
|
|
13
12
|
'homeAssistantButton-2',
|
|
@@ -17,13 +16,8 @@ export const HomeAssistantSteps = ({ currentStep, onStepClick, isPanelOpen, }) =
|
|
|
17
16
|
'homeAssistantButton-6',
|
|
18
17
|
]
|
|
19
18
|
: [];
|
|
20
|
-
const handleStepClick = (step) => {
|
|
21
|
-
onStepClick(step);
|
|
22
|
-
setStep(step);
|
|
23
|
-
};
|
|
24
19
|
useComponentStyles(componentIds, stepId);
|
|
25
|
-
|
|
26
|
-
return (_jsxs(Stack, { spacing: "8", w: "fit-content", position: "relative", top: ['-10px', '-30px'], zIndex: wrapperZIndex, children: [_jsx(HomeAssistantStepper, { currentStep: currentStep, totalSteps: 6 }), _jsx(SimpleGrid, { columns: [2, 3], spacing: "base", children: homeAssistantSteps.map((step, index) => (_jsx(Center, { w: "100%", children: _jsx(HomeAssistantButton, { currentStep: index + 1, onStepClick: handleStepClick, status: getStatus(index + 1, currentStep), step: step }) }, step.title))) })] }));
|
|
20
|
+
return (_jsxs(Stack, { spacing: "8", w: "fit-content", position: "relative", top: ['-10px', '-30px'], zIndex: wrapperZIndex, children: [_jsx(HomeAssistantStepper, { currentStep: currentStep, totalSteps: 6 }), _jsx(SimpleGrid, { columns: [2, 3], spacing: "base", children: homeAssistantSteps.map((step, index) => (_jsx(Center, { w: "100%", children: _jsx(HomeAssistantButton, { currentStep: index + 1, onStepClick: onStepClick, status: getStatus(index + 1, currentStep), step: step }) }, step.title))) })] }));
|
|
27
21
|
};
|
|
28
22
|
const getStatus = (index, currentStep) => {
|
|
29
23
|
if (index === currentStep)
|
|
@@ -51,7 +51,7 @@ export const HomeBoard = () => {
|
|
|
51
51
|
HomeAssistant: (_jsx(HomeAssistantPanel, { currentStep: homeAssistantCurrentStep, currentForm: currentHomeAssistantForm, onNext: handleHomeAssistantFormChange, onBack: handleHomeAssistantBack, onApplianceClick: () => null, onClose: onRightClose })),
|
|
52
52
|
};
|
|
53
53
|
const panelSize = currentComponent === 'PartnerCatalog' ? 'lg' : 'md';
|
|
54
|
-
return (_jsxs(Box, { overflowX: "hidden", children: [_jsx(RightPanel, { overlay: showOverlay, isOpen: isRightOpen, onClose: onRightClose, size: panelSize, children: rightPanelComponents[currentComponent] }), _jsxs(Flex, { w: "full", minH: "100dvh", children: [_jsx(RoomsMenu, { activeRoom: "homeboard", handleAddRoom: (id) => __awaiter(void 0, void 0, void 0, function* () { return console.log(id); }), handleClick: () => null, handleHomeClick: () => null, rooms: RoomsList, roomsToAdd: RoomsToAdd }), _jsxs(Box, { w: "full", children: [_jsx(AppBarComponent, { setActiveTour: setActiveTour }), _jsxs(Stack, { spacing: "base", p: "base", children: [_jsx(HomeHeader, { buttonLabel: "Partner catalog", onBack: () => null, homeName: homeName, onAdd: () => null }), _jsxs(HomeBoardGrid, { children: [_jsx(HomeCardWithRecipent, { address: HomeCards[0].address, handleEdit: handleEditHomeClick, handleDeleteAccountType: (email) => email, handleSubmitAccountType: (form) => form, _id: HomeCards[0]._id, image: HomeCards[0].image, loading: false, name: HomeCards[0].name, menu: menuMock, addImage: () => null, recipients: recipientsDb, records: homeBoardRecorsMock }), _jsx(HomeAssistant, {
|
|
54
|
+
return (_jsxs(Box, { overflowX: "hidden", children: [_jsx(RightPanel, { overlay: showOverlay, isOpen: isRightOpen, onClose: onRightClose, size: panelSize, children: rightPanelComponents[currentComponent] }), _jsxs(Flex, { w: "full", minH: "100dvh", children: [_jsx(RoomsMenu, { activeRoom: "homeboard", handleAddRoom: (id) => __awaiter(void 0, void 0, void 0, function* () { return console.log(id); }), handleClick: () => null, handleHomeClick: () => null, rooms: RoomsList, roomsToAdd: RoomsToAdd }), _jsxs(Box, { w: "full", children: [_jsx(AppBarComponent, { setActiveTour: setActiveTour }), _jsxs(Stack, { spacing: "base", p: "base", children: [_jsx(HomeHeader, { buttonLabel: "Partner catalog", onBack: () => null, homeName: homeName, onAdd: () => null }), _jsxs(HomeBoardGrid, { children: [_jsx(HomeCardWithRecipent, { address: HomeCards[0].address, handleEdit: handleEditHomeClick, handleDeleteAccountType: (email) => email, handleSubmitAccountType: (form) => form, _id: HomeCards[0]._id, image: HomeCards[0].image, loading: false, name: HomeCards[0].name, menu: menuMock, addImage: () => null, recipients: recipientsDb, records: homeBoardRecorsMock }), _jsx(HomeAssistant, { currentPanel: homeAssistantCurrentStep, currentStep: 6, onStepClick: handleHomeAssistantClick }), _jsx(PropertyTaxes, { estimatedTaxValue: 1000, menuItems: menuMock, taxes: taxesMock, title: "Travis County Property Taxes" }), _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(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 }), _jsxs(Stack, { spacing: "base", children: [_jsx(AddHomeItem, { handleClick: () => null }), _jsx(SendCommunication, { documentList: [] })] }), _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 })] }));
|
|
55
55
|
};
|
|
56
56
|
export const AppBarComponent = ({ setActiveTour = (value) => { } }) => {
|
|
57
57
|
const handleTour = () => {
|
package/package.json
CHANGED
|
@@ -2,17 +2,16 @@ import { Center, SimpleGrid, Stack } from '@chakra-ui/react'
|
|
|
2
2
|
import { HomeAssistantStepsI } from '@/interfaces'
|
|
3
3
|
import { HomeAssistantButton, HomeAssistantStepper } from '@/components'
|
|
4
4
|
import { homeAssistantSteps } from '@/helpers'
|
|
5
|
-
import { useState } from 'react'
|
|
6
5
|
import { useComponentStyles } from '@/hooks'
|
|
7
6
|
|
|
8
7
|
export const HomeAssistantSteps = ({
|
|
9
8
|
currentStep,
|
|
10
9
|
onStepClick,
|
|
11
|
-
|
|
10
|
+
currentPanel,
|
|
12
11
|
}: HomeAssistantStepsI) => {
|
|
13
|
-
const
|
|
14
|
-
const stepId = `homeAssistantButton-${
|
|
15
|
-
const componentIds =
|
|
12
|
+
const wrapperZIndex = currentPanel ? undefined : '2'
|
|
13
|
+
const stepId = `homeAssistantButton-${currentPanel}`
|
|
14
|
+
const componentIds = currentPanel
|
|
16
15
|
? [
|
|
17
16
|
'homeAssistantButton-1',
|
|
18
17
|
'homeAssistantButton-2',
|
|
@@ -23,13 +22,7 @@ export const HomeAssistantSteps = ({
|
|
|
23
22
|
]
|
|
24
23
|
: []
|
|
25
24
|
|
|
26
|
-
const handleStepClick = (step: number) => {
|
|
27
|
-
onStepClick(step)
|
|
28
|
-
setStep(step)
|
|
29
|
-
}
|
|
30
|
-
|
|
31
25
|
useComponentStyles(componentIds, stepId)
|
|
32
|
-
const wrapperZIndex = isPanelOpen ? undefined : '2'
|
|
33
26
|
return (
|
|
34
27
|
<Stack
|
|
35
28
|
spacing="8"
|
|
@@ -44,7 +37,7 @@ export const HomeAssistantSteps = ({
|
|
|
44
37
|
<Center key={step.title} w="100%">
|
|
45
38
|
<HomeAssistantButton
|
|
46
39
|
currentStep={index + 1}
|
|
47
|
-
onStepClick={
|
|
40
|
+
onStepClick={onStepClick}
|
|
48
41
|
status={getStatus(index + 1, currentStep)}
|
|
49
42
|
step={step}
|
|
50
43
|
/>
|
|
@@ -12,6 +12,6 @@ export const useComponentStyles = (ids: string[], selectedId: string) => {
|
|
|
12
12
|
const currentComponent = document.getElementById(selectedId)
|
|
13
13
|
|
|
14
14
|
if (currentComponent) {
|
|
15
|
-
currentComponent.style.zIndex = '
|
|
15
|
+
currentComponent.style.zIndex = '1400'
|
|
16
16
|
}
|
|
17
17
|
}
|