@homefile/components-v2 2.2.0 → 2.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/images/shine/house-washing.png +0 -0
- package/dist/assets/images/shine/index.d.ts +2 -1
- package/dist/assets/images/shine/index.js +2 -1
- package/dist/assets/images/shine/index.ts +2 -0
- package/dist/components/folderSharing/FolderSharing.js +1 -1
- package/dist/components/forms/dynamicForm/DynamicForm.d.ts +1 -1
- package/dist/components/forms/dynamicForm/DynamicForm.js +5 -4
- package/dist/components/forms/dynamicForm/fields/CheckboxGroupField.d.ts +1 -1
- package/dist/components/forms/dynamicForm/fields/CheckboxGroupField.js +4 -4
- package/dist/components/forms/dynamicForm/fields/SingleFields.js +1 -2
- package/dist/components/forms/dynamicForm/fields/uiFields/TileBody.js +1 -1
- package/dist/components/forms/dynamicForm/fields/uiFields/TileBody.tsx +1 -1
- package/dist/components/forms/dynamicForm/fields/uiFields/TileBodyAction.js +1 -1
- package/dist/components/forms/dynamicForm/fields/uiFields/TileBodyAction.tsx +1 -1
- package/dist/components/forms/dynamicForm/fields/uiFields/TileBodyHeader.js +1 -1
- package/dist/components/forms/dynamicForm/fields/uiFields/TileBodyHeader.tsx +1 -1
- package/dist/components/forms/dynamicForm/fields/uiFields/TileBodySectionGrid.js +1 -1
- package/dist/components/forms/dynamicForm/fields/uiFields/TileBodySectionGrid.tsx +1 -1
- package/dist/components/homeAssistant/HomeAssistantButton.js +1 -1
- package/dist/components/homeAssistant/HomeMonitorButton.js +1 -1
- package/dist/components/homeAssistant/HomeMonitorSteps.js +2 -2
- package/dist/components/homeBoard/HomeBoard.js +1 -1
- package/dist/components/launchpad/IconMenu.js +7 -7
- package/dist/components/partner/PartnerFooter.js +1 -1
- package/dist/helpers/forms/dynamicForm.helper.js +2 -1
- package/dist/helpers/homeBoard/FolderSharing.helper.js +9 -5
- package/dist/interfaces/forms/dynamicForm/DynamicForm.interface.d.ts +2 -1
- package/dist/mocks/forms/dynamicForm.mock.js +10 -1
- package/package.json +1 -1
- package/src/assets/images/shine/house-washing.png +0 -0
- package/src/assets/images/shine/index.ts +2 -0
- package/src/components/folderSharing/FolderSharing.tsx +1 -1
- package/src/components/forms/dynamicForm/DynamicForm.tsx +4 -2
- package/src/components/forms/dynamicForm/fields/CheckboxGroupField.tsx +5 -4
- package/src/components/forms/dynamicForm/fields/SingleFields.tsx +1 -13
- package/src/components/forms/dynamicForm/fields/uiFields/TileBody.tsx +1 -1
- package/src/components/forms/dynamicForm/fields/uiFields/TileBodyAction.tsx +1 -1
- package/src/components/forms/dynamicForm/fields/uiFields/TileBodyHeader.tsx +1 -1
- package/src/components/forms/dynamicForm/fields/uiFields/TileBodySectionGrid.tsx +1 -1
- package/src/components/homeAssistant/HomeAssistantButton.tsx +1 -1
- package/src/components/homeAssistant/HomeMonitorButton.tsx +3 -3
- package/src/components/homeAssistant/HomeMonitorSteps.tsx +5 -5
- package/src/components/homeBoard/HomeBoard.tsx +1 -1
- package/src/components/launchpad/IconMenu.tsx +37 -39
- package/src/components/partner/PartnerFooter.tsx +1 -1
- package/src/helpers/forms/dynamicForm.helper.ts +2 -0
- package/src/helpers/homeBoard/FolderSharing.helper.ts +31 -27
- package/src/interfaces/forms/dynamicForm/DynamicForm.interface.ts +2 -0
- package/src/mocks/forms/dynamicForm.mock.ts +10 -1
|
Binary file
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import GutterCleaning from './gutter-cleaning.png';
|
|
2
2
|
import HomeCleaning from './home-cleaning.png';
|
|
3
|
+
import HouseWashing from './house-washing.png';
|
|
3
4
|
import HolidayLights from './holiday-lights.png';
|
|
4
5
|
import Pressure from './pressure.png';
|
|
5
6
|
import RoofCleaning from './roof-cleaning.png';
|
|
6
7
|
import WindowCleaning from './window.png';
|
|
7
|
-
export { GutterCleaning, HomeCleaning, HolidayLights, Pressure, RoofCleaning, WindowCleaning, };
|
|
8
|
+
export { GutterCleaning, HomeCleaning, HouseWashing, HolidayLights, Pressure, RoofCleaning, WindowCleaning, };
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import GutterCleaning from './gutter-cleaning.png';
|
|
2
2
|
import HomeCleaning from './home-cleaning.png';
|
|
3
|
+
import HouseWashing from './house-washing.png';
|
|
3
4
|
import HolidayLights from './holiday-lights.png';
|
|
4
5
|
import Pressure from './pressure.png';
|
|
5
6
|
import RoofCleaning from './roof-cleaning.png';
|
|
6
7
|
import WindowCleaning from './window.png';
|
|
7
|
-
export { GutterCleaning, HomeCleaning, HolidayLights, Pressure, RoofCleaning, WindowCleaning, };
|
|
8
|
+
export { GutterCleaning, HomeCleaning, HouseWashing, HolidayLights, Pressure, RoofCleaning, WindowCleaning, };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import GutterCleaning from './gutter-cleaning.png'
|
|
2
2
|
import HomeCleaning from './home-cleaning.png'
|
|
3
|
+
import HouseWashing from './house-washing.png'
|
|
3
4
|
import HolidayLights from './holiday-lights.png'
|
|
4
5
|
import Pressure from './pressure.png'
|
|
5
6
|
import RoofCleaning from './roof-cleaning.png'
|
|
@@ -8,6 +9,7 @@ import WindowCleaning from './window.png'
|
|
|
8
9
|
export {
|
|
9
10
|
GutterCleaning,
|
|
10
11
|
HomeCleaning,
|
|
12
|
+
HouseWashing,
|
|
11
13
|
HolidayLights,
|
|
12
14
|
Pressure,
|
|
13
15
|
RoofCleaning,
|
|
@@ -17,6 +17,6 @@ export const FolderSharing = ({ currentSort, folders = [], handleAddNewFolder, h
|
|
|
17
17
|
return (_jsx(WrapItem, { w: "6.5rem", role: "group", children: _jsx(Box, { as: "button", position: "relative", pb: "base", pt: "6", w: "100%", onClick: () => handleFolderClick(folder), children: _jsxs(Flex, { direction: "column", gap: "base", align: "center", px: "base", children: [_jsx(Image, { src: folderIcon || GreenFolder, w: "3.7rem", h: "auto", alt: t('folderSharing.altIcon'), transition: "all 0.2s ease-in-out", _groupHover: {
|
|
18
18
|
boxShadow: 'lg',
|
|
19
19
|
transform: 'scale(1.05)',
|
|
20
|
-
} }), _jsx(Text, { noOfLines: 2,
|
|
20
|
+
} }), _jsx(Text, { noOfLines: 2, fontSize: "sm", lineHeight: "17px", textOverflow: "ellipsis", children: name })] }) }) }, _id));
|
|
21
21
|
}) })] }) }) }));
|
|
22
22
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { DynamicFormI } from '../../../interfaces';
|
|
2
|
-
export declare const DynamicForm: ({ callback, form: fields, menuItems, onUpload, showTitle, uploadingFieldId, ...props }: DynamicFormI) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare const DynamicForm: ({ callback, form: fields, menuItems, onUpload, showTitle, title, uploadingFieldId, ...props }: DynamicFormI) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -9,6 +9,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
9
9
|
}
|
|
10
10
|
return t;
|
|
11
11
|
};
|
|
12
|
+
import { createElement as _createElement } from "react";
|
|
12
13
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
14
|
import { FormProvider } from 'react-hook-form';
|
|
14
15
|
import { t } from 'i18next';
|
|
@@ -17,9 +18,9 @@ import { HiddenFieldSection, GroupField, TextField, TextAreaField, SelectField,
|
|
|
17
18
|
import { useDynamicForm } from '../../../hooks';
|
|
18
19
|
import { fieldIcons } from '../../../helpers';
|
|
19
20
|
export const DynamicForm = (_a) => {
|
|
20
|
-
var { callback, form: fields, menuItems, onUpload, showTitle = true, uploadingFieldId } = _a, props = __rest(_a, ["callback", "form", "menuItems", "onUpload", "showTitle", "uploadingFieldId"]);
|
|
21
|
+
var { callback, form: fields, menuItems, onUpload, showTitle = true, title, uploadingFieldId } = _a, props = __rest(_a, ["callback", "form", "menuItems", "onUpload", "showTitle", "title", "uploadingFieldId"]);
|
|
21
22
|
const { form, visibleFields, hiddenFields, handleAddAll, handleAdd, handleFilesUpload, handleRemove, } = useDynamicForm({ fields, onUpload });
|
|
22
|
-
return (_jsxs(Stack, { bg: "lightBlue.1", spacing: "0", h: "full", children: [showTitle && (_jsx(Text, { fontFamily: "secondary", px: "base", pt: "4", pb: "2", children: t('forms.itemDetails') })), _jsx(FormProvider, Object.assign({}, form, { children: _jsx(_Fragment, { children: visibleFields === null || visibleFields === void 0 ? void 0 : visibleFields.map((field) => {
|
|
23
|
+
return (_jsxs(Stack, { bg: "lightBlue.1", spacing: "0", h: "full", children: [showTitle && (_jsx(Text, { fontFamily: "secondary", px: "base", pt: "4", pb: "2", children: title ? title : t('forms.itemDetails') })), _jsx(FormProvider, Object.assign({}, form, { children: _jsx(_Fragment, { children: visibleFields === null || visibleFields === void 0 ? void 0 : visibleFields.map((field) => {
|
|
23
24
|
const { canBeHidden, children, description, icon, id, name, options, type, value, } = field;
|
|
24
25
|
const baseProps = {
|
|
25
26
|
id,
|
|
@@ -62,9 +63,9 @@ export const DynamicForm = (_a) => {
|
|
|
62
63
|
case 'group':
|
|
63
64
|
return (_jsx(GroupField, { id: id, fields: children, onRemove: handleRemove, canBeHidden: canBeHidden }, id));
|
|
64
65
|
case 'checkbox-group':
|
|
65
|
-
return (_jsx(CheckboxGroupField, { id: id, children: children, value: value, icon: baseProps.icon }, id));
|
|
66
|
+
return (_jsx(CheckboxGroupField, { id: id, children: children, value: value, description: description, icon: baseProps.icon }, id));
|
|
66
67
|
case 'tile-body':
|
|
67
|
-
return (
|
|
68
|
+
return (_createElement(TileBody, Object.assign({}, props, { key: id, callback: callback, fields: children, menuItems: menuItems })));
|
|
68
69
|
default:
|
|
69
70
|
return null;
|
|
70
71
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { ReportI } from '../../../../interfaces';
|
|
2
|
-
export declare const CheckboxGroupField: ({ children, icon, id, value, }: Pick<ReportI, "children" | "icon" | "id" | "value">) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare const CheckboxGroupField: ({ children, icon, id, value, description }: Pick<ReportI, "children" | "icon" | "id" | "value" | "description">) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -2,17 +2,17 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { Box, Checkbox, CheckboxGroup, Flex, SimpleGrid, Text, } from '@chakra-ui/react';
|
|
3
3
|
import { FormIcon } from '../../..';
|
|
4
4
|
import { Controller, useFormContext } from 'react-hook-form';
|
|
5
|
-
export const CheckboxGroupField = ({ children, icon, id, value, }) => {
|
|
5
|
+
export const CheckboxGroupField = ({ children, icon, id, value, description }) => {
|
|
6
6
|
const { control } = useFormContext();
|
|
7
7
|
const defaultValues = children === null || children === void 0 ? void 0 : children.map((child) => {
|
|
8
8
|
if (child.value) {
|
|
9
|
-
return child.
|
|
9
|
+
return child.name;
|
|
10
10
|
}
|
|
11
11
|
}).filter((value) => value);
|
|
12
|
-
return (_jsxs(Box, { children: [_jsx(Box, { p: "base", borderBottom: "1px dashed", borderColor: "lightBlue.6", children: _jsx(Text, { fontFamily: "secondary", fontSize: "sm", children:
|
|
12
|
+
return (_jsxs(Box, { children: [_jsx(Box, { p: "base", borderBottom: "1px dashed", borderColor: "lightBlue.6", children: _jsx(Text, { fontFamily: "secondary", fontSize: "sm", children: description }) }), _jsxs(Flex, { p: "base", gap: "base", children: [_jsx(FormIcon, { icon: icon }), _jsx(Controller, { control: control, name: id, defaultValue: defaultValues, render: ({ field: { onChange } }) => {
|
|
13
13
|
return (_jsx(CheckboxGroup, { defaultValue: defaultValues, onChange: onChange, children: _jsx(SimpleGrid, { columns: 2, spacing: "base", w: "full", children: children === null || children === void 0 ? void 0 : children.map((child) => {
|
|
14
14
|
const { id, name, value } = child;
|
|
15
|
-
return (_jsx(Checkbox, { value: String(
|
|
15
|
+
return (_jsx(Checkbox, { value: String(name), isChecked: Boolean(value), children: _jsx(Text, { fontSize: "sm", children: name }) }, id));
|
|
16
16
|
}) }) }));
|
|
17
17
|
} })] })] }));
|
|
18
18
|
};
|
|
@@ -45,9 +45,8 @@ export const SingleFields = ({ callback, fields, menuItems }) => {
|
|
|
45
45
|
case 'tile-body-action':
|
|
46
46
|
return (_jsx(TileBodyAction, { fields: children, callback: callback }, id));
|
|
47
47
|
case 'primary-cta':
|
|
48
|
-
return (_jsx(TileCta, { callback: callback, description: description, icon: icon, id: id, name: name, type: type, link: link, value: String(baseProps.value) }, id));
|
|
49
48
|
case 'secondary-cta':
|
|
50
|
-
return (_jsx(TileCta, { callback: callback, description: description, icon: icon, id: id, name: name, type: type, value: String(baseProps.value) }, id));
|
|
49
|
+
return (_jsx(TileCta, { callback: callback, description: description, icon: icon, id: id, name: name, type: type, link: link, value: String(baseProps.value) }, id));
|
|
51
50
|
default:
|
|
52
51
|
return null;
|
|
53
52
|
}
|
|
@@ -14,5 +14,5 @@ import { Box, Stack } from '@chakra-ui/react';
|
|
|
14
14
|
import { PartnerFooter, SingleFields } from '../../../..';
|
|
15
15
|
export const TileBody = (_a) => {
|
|
16
16
|
var { callback, fields, websiteUrl = '', menuItems } = _a, props = __rest(_a, ["callback", "fields", "websiteUrl", "menuItems"]);
|
|
17
|
-
return (_jsx(Box, { display: "flex", flexDir: "column", bg: "
|
|
17
|
+
return (_jsx(Box, { display: "flex", flexGrow: 1, flexDir: "column", bg: "#f6f8f9", boxShadow: "lg", children: _jsxs(Stack, { spacing: "0", flex: "1", children: [_jsx(SingleFields, { callback: callback, fields: fields, menuItems: menuItems }), _jsx(PartnerFooter, Object.assign({}, props, { websiteUrl: websiteUrl }))] }) }));
|
|
18
18
|
};
|
|
@@ -10,7 +10,7 @@ export const TileBody = ({
|
|
|
10
10
|
...props
|
|
11
11
|
}: TileBodyI) => {
|
|
12
12
|
return (
|
|
13
|
-
<Box display="flex" flexDir="column" bg="
|
|
13
|
+
<Box display="flex" flexGrow={1} flexDir="column" bg="#f6f8f9" boxShadow="lg">
|
|
14
14
|
<Stack spacing="0" flex="1">
|
|
15
15
|
<SingleFields
|
|
16
16
|
callback={callback}
|
|
@@ -2,5 +2,5 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { Flex } from '@chakra-ui/react';
|
|
3
3
|
import { SingleFields } from '../../../..';
|
|
4
4
|
export const TileBodyAction = ({ callback, fields }) => {
|
|
5
|
-
return (_jsx(Flex, { p: "base", align: "center", gap: "base", children: _jsx(SingleFields, { fields: fields, callback: callback }) }));
|
|
5
|
+
return (_jsx(Flex, { p: "base", align: "center", gap: "base", background: "#f6f8f9", children: _jsx(SingleFields, { fields: fields, callback: callback }) }));
|
|
6
6
|
};
|
|
@@ -4,7 +4,7 @@ import { TileBodyI } from '@/interfaces'
|
|
|
4
4
|
|
|
5
5
|
export const TileBodyAction = ({ callback, fields }: TileBodyI) => {
|
|
6
6
|
return (
|
|
7
|
-
<Flex p="base" align="center" gap="base">
|
|
7
|
+
<Flex p="base" align="center" gap="base" background={"#f6f8f9"}>
|
|
8
8
|
<SingleFields fields={fields} callback={callback} />
|
|
9
9
|
</Flex>
|
|
10
10
|
)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { Box, Text } from '@chakra-ui/react';
|
|
3
3
|
export const TileBodyHeader = ({ value = '' }) => {
|
|
4
|
-
return (_jsx(Box, { p: "base", children: _jsx(Text, { fontWeight: "semibold", children: value }) }));
|
|
4
|
+
return (_jsx(Box, { borderTop: "1px solid #dbdbdb", p: "base", background: "#ffffff", children: _jsx(Text, { fontWeight: "semibold", children: value }) }));
|
|
5
5
|
};
|
|
@@ -2,5 +2,5 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { SimpleGrid } from '@chakra-ui/react';
|
|
3
3
|
import { SingleFields } from '../../../..';
|
|
4
4
|
export const TileBodySectionGrid = ({ fields }) => {
|
|
5
|
-
return (_jsx(SimpleGrid, { columns: 3, spacing: "base", p: "base", children: _jsx(SingleFields, { fields: fields }) }));
|
|
5
|
+
return (_jsx(SimpleGrid, { columns: 3, spacing: "base", p: "base", background: "#ffffff", children: _jsx(SingleFields, { fields: fields }) }));
|
|
6
6
|
};
|
|
@@ -4,7 +4,7 @@ import { TileBodyI } from '@/interfaces'
|
|
|
4
4
|
|
|
5
5
|
export const TileBodySectionGrid = ({ fields }: TileBodyI) => {
|
|
6
6
|
return (
|
|
7
|
-
<SimpleGrid columns={3} spacing="base" p="base">
|
|
7
|
+
<SimpleGrid columns={3} spacing="base" p="base" background={"#ffffff"}>
|
|
8
8
|
<SingleFields fields={fields} />
|
|
9
9
|
</SimpleGrid>
|
|
10
10
|
)
|
|
@@ -11,7 +11,7 @@ export const HomeAssistantButton = ({ currentStep, onStepClick, status, step, })
|
|
|
11
11
|
onStepClick(currentStep);
|
|
12
12
|
};
|
|
13
13
|
const buttonId = `homeAssistantButton-${currentStep}`;
|
|
14
|
-
return (_jsxs(Box, { position: "relative", id: buttonId, children: [isCompleted && (_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", spacing: "2", borderRadius: "lg", boxShadow: "lg", border: "1px solid transparent", w: "116px", align: "center", h: "106px", py: "base", onClick: handleClick }, setStyles(status), { children: [_jsx(Center, { h: "60%", children: _jsx(Image, { src: step.icon, alt: iconAltText, w: "auto", h: "38px" }) }), _jsx(Center, { h: "40%", children: _jsx(Text, { fontSize: "sm", textTransform: "uppercase", textAlign: "center", lineHeight: "14px", children: step.title }) })] }))] }));
|
|
14
|
+
return (_jsxs(Box, { position: "relative", id: buttonId, zIndex: "2", children: [isCompleted && (_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", spacing: "2", borderRadius: "lg", boxShadow: "lg", border: "1px solid transparent", w: "116px", align: "center", h: "106px", py: "base", onClick: handleClick }, setStyles(status), { children: [_jsx(Center, { h: "60%", children: _jsx(Image, { src: step.icon, alt: iconAltText, w: "auto", h: "38px" }) }), _jsx(Center, { h: "40%", children: _jsx(Text, { fontSize: "sm", textTransform: "uppercase", textAlign: "center", lineHeight: "14px", children: step.title }) })] }))] }));
|
|
15
15
|
};
|
|
16
16
|
const setStyles = (status) => {
|
|
17
17
|
switch (status) {
|
|
@@ -4,7 +4,7 @@ import { getIconAltText } from '../../utils';
|
|
|
4
4
|
export const HomeMonitorButton = ({ currentStep, onStepClick, status = 'ok', step, }) => {
|
|
5
5
|
const buttonId = `homeMonitorButton-${currentStep}`;
|
|
6
6
|
const iconAltText = getIconAltText(step.icon);
|
|
7
|
-
return (_jsx(Box, { position: "relative", id: buttonId, children: _jsxs(Box, { position: "relative", bg: "neutral.white", borderRadius: "lg", boxShadow: "lg", zIndex: "2", children: [_jsx(Box, { bg: status === 'alert' ? 'error.2' : 'green.1', boxSize: "10px", borderRadius: "full", position: "absolute", top: "6px", left: "6px", zIndex: "8" }), _jsxs(Stack, Object.assign({ position: "relative", zIndex: "2", as: "button", spacing: "2", border: "1px solid transparent",
|
|
7
|
+
return (_jsx(Box, { position: "relative", id: buttonId, zIndex: "2", children: _jsxs(Box, { position: "relative", bg: "neutral.white", borderRadius: "lg", boxShadow: "lg", zIndex: "2", children: [_jsx(Box, { bg: status === 'alert' ? 'error.2' : 'green.1', boxSize: "10px", borderRadius: "full", position: "absolute", top: "6px", left: "6px", zIndex: "8" }), _jsxs(Stack, Object.assign({ position: "relative", zIndex: "2", as: "button", spacing: "2", border: "1px solid transparent", align: "center", h: "96px", w: "100%", p: "base" }, setStyles(status), { onClick: () => onStepClick(currentStep), children: [_jsx(Center, { h: "60%", marginTop: "2", children: _jsx(Image, { src: step.icon, alt: iconAltText, w: "auto", h: "28px" }) }), _jsx(Center, { h: "40%", children: _jsx(Text, { fontSize: "xs", textTransform: "uppercase", textAlign: "center", lineHeight: "14px", children: step.title }) })] }))] }) }));
|
|
8
8
|
};
|
|
9
9
|
const setStyles = (status) => {
|
|
10
10
|
switch (status) {
|
|
@@ -3,7 +3,7 @@ import { Box, Flex } from '@chakra-ui/react';
|
|
|
3
3
|
import { HomeMonitorButton, IconMenu, MoreHorizontal } from '..';
|
|
4
4
|
import { homeAssistantSteps } from '../../helpers';
|
|
5
5
|
import { useComponentStyles } from '../../hooks';
|
|
6
|
-
import { useState } from 'react';
|
|
6
|
+
import { Fragment, useState } from 'react';
|
|
7
7
|
export const HomeMonitorSteps = ({ menuItems = [], onStepClick, stepsWithAlerts, }) => {
|
|
8
8
|
const ids = [
|
|
9
9
|
'homeMonitorButton-1',
|
|
@@ -17,7 +17,7 @@ export const HomeMonitorSteps = ({ menuItems = [], onStepClick, stepsWithAlerts,
|
|
|
17
17
|
const isDisabled = menuItems.length === 0;
|
|
18
18
|
useComponentStyles({ ids, selectedId, zIndex: '2' });
|
|
19
19
|
const handleStepClick = (step) => onStepClick(step);
|
|
20
|
-
return (_jsx(Flex, { gap: "base", children: homeAssistantSteps.map((step, index) => (_jsx(Box, { position: "relative", children: _jsxs(
|
|
20
|
+
return (_jsx(Flex, { gap: "base", justify: "center", children: homeAssistantSteps.map((step, index) => (_jsx(Box, { position: "relative", flex: "1", children: _jsxs(Fragment, { children: [_jsx(HomeMonitorButton, { currentStep: index + 1, onStepClick: handleStepClick, status: getStatus(index + 1, stepsWithAlerts), step: step }), _jsx(Box, { position: "absolute", top: "-2px", right: "4px", zIndex: "1400", children: _jsx(IconMenu, { zIndex: "2", icon: _jsx(MoreHorizontal, { size: 26 }), itemForm: index + 1, menuItems: menuItems, disabled: isDisabled, onClick: () => setSelectedId(`homeMonitorButton-${index + 1}`) }) })] }) }, step === null || step === void 0 ? void 0 : step.title))) }));
|
|
21
21
|
};
|
|
22
22
|
const getStatus = (index, stepsWithAlerts) => {
|
|
23
23
|
const hasAlert = stepsWithAlerts.includes(index);
|
|
@@ -51,7 +51,7 @@ export const HomeBoard = () => {
|
|
|
51
51
|
HomeAssistant: (_jsx(HomeAssistantPanel, { currentStep: homeAssistantCurrentStep, currentForm: currentHomeAssistantForm, onNext: handleHomeAssistantFormChange, onBack: handleHomeAssistantBack, onApplianceClick: () => null, onClose: onRightClose, onSave: () => { }, backDisabled: false, nextDisabled: false })),
|
|
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, { currentPanel: homeAssistantCurrentStep, currentStep: 6, onStepClick: handleHomeAssistantClick }), _jsx(PropertyTaxes, { estimatedTaxValue: 1000, menuItems: menuMock, taxes: taxesMock, title: "Travis County Property Taxes" }), _jsx(HomeMonitor, { children: _jsxs(Stack, { spacing: "base", children: [_jsxs(Flex, { gap: "base", children: [_jsx(HomefileMonitoring, {}), _jsx(Notifications, { date: "10-10-24", local: "TX - Houston" })] }), _jsx(HomeMonitorSteps, { menuItems: [
|
|
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" }), _jsx(HomeMonitor, { children: _jsxs(Stack, { spacing: "base", w: "full", px: "base", children: [_jsxs(Flex, { gap: "base", children: [_jsx(HomefileMonitoring, {}), _jsx(Notifications, { date: "10-10-24", local: "TX - Houston" })] }), _jsx(HomeMonitorSteps, { menuItems: [
|
|
55
55
|
{
|
|
56
56
|
label: 'Details',
|
|
57
57
|
handleClick: handleHomeAssistantClick,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { MenuButton, IconButton, Menu, MenuItem, MenuList, } from '@chakra-ui/react';
|
|
2
|
+
import { MenuButton, IconButton, Menu, MenuItem, MenuList, Box, } from '@chakra-ui/react';
|
|
3
3
|
import { Overlay } from '..';
|
|
4
|
-
export const IconMenu = ({ disabled = false, icon, itemForm, menuItems, onClick, variant = 'menuIcon', width = 'fit-content', zIndex, }) => {
|
|
5
|
-
return (_jsx(Menu, { isLazy: true, children: ({ isOpen }) => (_jsxs(_Fragment, { children: [_jsx(Overlay, { bg: "overlay", showOverlay: isOpen, position: "fixed"
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
4
|
+
export const IconMenu = ({ disabled = false, icon, itemForm, menuItems, onClick, variant = 'menuIcon', width = 'fit-content', zIndex = '999', }) => {
|
|
5
|
+
return (_jsx(Box, { zIndex: zIndex, children: _jsx(Menu, { isLazy: true, children: ({ isOpen }) => (_jsxs(_Fragment, { children: [_jsx(Overlay, { bg: "overlay", showOverlay: isOpen, position: "fixed" }), _jsx(MenuButton, { as: IconButton, "aria-label": "Options", icon: icon, variant: variant, w: width, disabled: disabled, marginTop: "0 !important", onClick: onClick }), _jsx(MenuList, { zIndex: "5", children: menuItems === null || menuItems === void 0 ? void 0 : menuItems.map(({ handleClick, label }) => (_jsx(MenuItem, { onClick: () => handleClick(itemForm), _hover: {
|
|
6
|
+
bg: 'lightGreen.1',
|
|
7
|
+
}, _focus: {
|
|
8
|
+
bg: 'lightGreen.1',
|
|
9
|
+
}, children: label }, label))) })] })) }) }));
|
|
10
10
|
};
|
|
@@ -10,5 +10,5 @@ export const PartnerFooter = ({ socialLinks = [], websiteUrl, urlText, }) => {
|
|
|
10
10
|
return;
|
|
11
11
|
window.open(url, '_blank');
|
|
12
12
|
};
|
|
13
|
-
return (_jsxs(Flex, { align: "center", justify: "space-between", p: "base", children: [_jsx(Link, { href: websiteUrl, isExternal: true, children: _jsx(Text, { fontSize: "xs", color: "blue.3", children: urlText !== null && urlText !== void 0 ? urlText : cleanedWebsiteUrl }) }), hasSocialLinks && (_jsx(Flex, { align: "center", gap: "1", children: socialLinks === null || socialLinks === void 0 ? void 0 : socialLinks.map(({ name, link }) => (_jsx(IconButton, { variant: "unstyled", w: "fit-content", "aria-label": "Instagram", icon: SocialIcons({ size: 20, name }), onClick: () => handleSocialClick(link) }, name))) }))] }));
|
|
13
|
+
return (_jsxs(Flex, { background: "#f6f8f9", align: "center", justify: "space-between", p: "base", children: [_jsx(Link, { href: websiteUrl, isExternal: true, children: _jsx(Text, { fontSize: "xs", color: "blue.3", children: urlText !== null && urlText !== void 0 ? urlText : cleanedWebsiteUrl }) }), hasSocialLinks && (_jsx(Flex, { align: "center", gap: "1", children: socialLinks === null || socialLinks === void 0 ? void 0 : socialLinks.map(({ name, link }) => (_jsx(IconButton, { variant: "unstyled", w: "fit-content", "aria-label": "Instagram", icon: SocialIcons({ size: 20, name }), onClick: () => handleSocialClick(link) }, name))) }))] }));
|
|
14
14
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Paint, Receipt, Barcode, GoldenBars, Heart, Rating, Notes, Book, ImgIcon, Registry, ShareWith, Calendar, Tools2, Billing, Calc, CheckPen, GenericField, Price, Battery2, Co2, Detector, Electricity, Sprinkler, SixtyEight, DropCalendar, MobileDrop, SolarPanel, Calendar2, Drop, Wind, Foundation, Heater, Light, Plate, Pool2, Closet, Structure, GlassWater, Roof2, Target, CircleFace, Company, Pressure, WindowCleaning, RoofCleaning, HolidayLights, GutterCleaning, HomeCleaning, PressureWasher, } from '../../assets/images';
|
|
1
|
+
import { Paint, Receipt, Barcode, GoldenBars, Heart, Rating, Notes, Book, ImgIcon, Registry, ShareWith, Calendar, Tools2, Billing, Calc, CheckPen, GenericField, Price, Battery2, Co2, Detector, Electricity, Sprinkler, SixtyEight, DropCalendar, MobileDrop, SolarPanel, Calendar2, Drop, Wind, Foundation, Heater, Light, Plate, Pool2, Closet, Structure, GlassWater, Roof2, Target, CircleFace, Company, Pressure, WindowCleaning, RoofCleaning, HolidayLights, GutterCleaning, HomeCleaning, HouseWashing, PressureWasher, } from '../../assets/images';
|
|
2
2
|
export const fieldIcons = {
|
|
3
3
|
barcode: Barcode,
|
|
4
4
|
billing: Billing,
|
|
@@ -46,6 +46,7 @@ export const fieldIcons = {
|
|
|
46
46
|
company: Company,
|
|
47
47
|
'sh-gutter': GutterCleaning,
|
|
48
48
|
'sh-home': HomeCleaning,
|
|
49
|
+
'sh-house': HouseWashing,
|
|
49
50
|
'sh-lights': HolidayLights,
|
|
50
51
|
'sh-pressure': Pressure,
|
|
51
52
|
'sh-roof': RoofCleaning,
|
|
@@ -27,7 +27,7 @@ export const testFolders = [
|
|
|
27
27
|
{
|
|
28
28
|
_id: faker.database.mongodbObjectId(),
|
|
29
29
|
home: '6317993b4a8e6e909bcced0a',
|
|
30
|
-
name: '
|
|
30
|
+
name: 'Mortgage',
|
|
31
31
|
public: false,
|
|
32
32
|
icon: 'project',
|
|
33
33
|
createdAt: '2023-01-13T20:35:02.538Z',
|
|
@@ -147,7 +147,8 @@ export const fileDB = [
|
|
|
147
147
|
createdAt: '2022-06-15T21:17:33.246Z',
|
|
148
148
|
updatedAt: '2022-06-15T21:17:33.246Z',
|
|
149
149
|
__v: 0,
|
|
150
|
-
files: [
|
|
150
|
+
files: [
|
|
151
|
+
{
|
|
151
152
|
_id: '62aa4c6db225dd3957d09b24',
|
|
152
153
|
fileName: 'test-plans.jpeg-37f8c3',
|
|
153
154
|
extension: 'mov',
|
|
@@ -159,7 +160,8 @@ export const fileDB = [
|
|
|
159
160
|
createdAt: '2022-06-15T21:17:33.166Z',
|
|
160
161
|
updatedAt: '2022-06-15T21:17:33.166Z',
|
|
161
162
|
__v: 0,
|
|
162
|
-
}
|
|
163
|
+
},
|
|
164
|
+
],
|
|
163
165
|
room: {
|
|
164
166
|
_id: '63176dfa5d8cee7e11f6f962',
|
|
165
167
|
name: 'Master Bedroom',
|
|
@@ -185,7 +187,8 @@ export const fileDB = [
|
|
|
185
187
|
createdAt: '2022-06-15T21:17:33.246Z',
|
|
186
188
|
updatedAt: '2022-06-15T21:17:33.246Z',
|
|
187
189
|
__v: 0,
|
|
188
|
-
files: [
|
|
190
|
+
files: [
|
|
191
|
+
{
|
|
189
192
|
_id: '62aa4c6db225dd3957d09b24',
|
|
190
193
|
fileName: 'test-plans.jpeg-37f8c3',
|
|
191
194
|
extension: 'jpeg',
|
|
@@ -197,7 +200,8 @@ export const fileDB = [
|
|
|
197
200
|
createdAt: '2022-06-15T21:17:33.166Z',
|
|
198
201
|
updatedAt: '2022-06-15T21:17:33.166Z',
|
|
199
202
|
__v: 0,
|
|
200
|
-
}
|
|
203
|
+
},
|
|
204
|
+
],
|
|
201
205
|
room: {
|
|
202
206
|
_id: '63176dfa5d8cee7e11f6f962',
|
|
203
207
|
name: 'Master Bedroom',
|
|
@@ -2,7 +2,7 @@ import { FolderFileI, MenuItemI, PartnerFooterI, TileCtaI } from '../..';
|
|
|
2
2
|
type KindTypes = 'checkbox' | 'checkbox-group' | 'currency' | 'date' | 'email' | 'file' | 'grid' | 'group' | 'hidden' | 'number' | 'radio' | 'rating' | 'select' | 'string' | 'switch' | 'telephone' | 'text' | 'textarea' | 'default' | UIKindTypes;
|
|
3
3
|
type UIKindTypes = 'tile-body' | 'tile-body-logo' | 'tile-body-header' | 'tile-body-section' | 'tile-body-section-grid' | 'tile-form' | 'tile-body-action' | 'vertical-icon' | 'primary-cta' | 'secondary-cta';
|
|
4
4
|
export type IconTypes = 'barcode' | 'battery' | 'billing' | 'book' | 'calc' | 'calendar' | 'check' | 'co2' | 'date' | 'default' | 'detector' | 'electricity' | 'goldbars' | 'heart' | 'image' | 'notes' | 'palette' | 'people' | 'price' | 'rating' | 'receipt' | 'registry' | 'sprinkler' | 'tools' | 'wind' | '68' | 'calendar2' | 'water' | 'calendar-drop' | 'umbrella' | 'heater' | 'roof' | 'foundation' | 'solar-panel' | 'pool' | 'drop' | 'mobile-drop' | 'light' | 'plate' | 'pressure-washer' | 'house' | 'target' | 'title' | 'company' | UIIconTypes;
|
|
5
|
-
export type UIIconTypes = 'sh-pressure' | 'sh-window' | 'sh-roof' | 'sh-lights' | 'sh-gutter' | 'sh-home';
|
|
5
|
+
export type UIIconTypes = 'sh-pressure' | 'sh-window' | 'sh-roof' | 'sh-lights' | 'sh-gutter' | 'sh-home' | 'sh-house';
|
|
6
6
|
export type ValueTypes = string | string[] | number | boolean;
|
|
7
7
|
export type OptionsTypes = string[] | number[] | null;
|
|
8
8
|
export interface ReportI {
|
|
@@ -25,6 +25,7 @@ export interface DynamicFormI extends Partial<PartnerFooterI> {
|
|
|
25
25
|
menuItems?: MenuItemI[];
|
|
26
26
|
onUpload?: (filesByFieldId: Record<string, FolderFileI[]>) => void;
|
|
27
27
|
showTitle?: boolean;
|
|
28
|
+
title?: string;
|
|
28
29
|
uploadingFieldId?: string;
|
|
29
30
|
}
|
|
30
31
|
export interface DynamicFormProxyI {
|
|
@@ -491,6 +491,15 @@ export const tileUIMock = [
|
|
|
491
491
|
type: 'vertical-icon',
|
|
492
492
|
icon: 'sh-gutter',
|
|
493
493
|
},
|
|
494
|
+
{
|
|
495
|
+
id: faker.database.mongodbObjectId(),
|
|
496
|
+
name: '',
|
|
497
|
+
description: '',
|
|
498
|
+
comments: '',
|
|
499
|
+
value: 'House Washing',
|
|
500
|
+
type: 'vertical-icon',
|
|
501
|
+
icon: 'sh-house',
|
|
502
|
+
},
|
|
494
503
|
],
|
|
495
504
|
},
|
|
496
505
|
{
|
|
@@ -517,7 +526,7 @@ export const tileUIMock = [
|
|
|
517
526
|
comments: '',
|
|
518
527
|
value: 'Request Support',
|
|
519
528
|
type: 'secondary-cta',
|
|
520
|
-
link: '
|
|
529
|
+
link: 'www.shine.com',
|
|
521
530
|
},
|
|
522
531
|
],
|
|
523
532
|
},
|
package/package.json
CHANGED
|
Binary file
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import GutterCleaning from './gutter-cleaning.png'
|
|
2
2
|
import HomeCleaning from './home-cleaning.png'
|
|
3
|
+
import HouseWashing from './house-washing.png'
|
|
3
4
|
import HolidayLights from './holiday-lights.png'
|
|
4
5
|
import Pressure from './pressure.png'
|
|
5
6
|
import RoofCleaning from './roof-cleaning.png'
|
|
@@ -8,6 +9,7 @@ import WindowCleaning from './window.png'
|
|
|
8
9
|
export {
|
|
9
10
|
GutterCleaning,
|
|
10
11
|
HomeCleaning,
|
|
12
|
+
HouseWashing,
|
|
11
13
|
HolidayLights,
|
|
12
14
|
Pressure,
|
|
13
15
|
RoofCleaning,
|
|
@@ -28,6 +28,7 @@ export const DynamicForm = ({
|
|
|
28
28
|
menuItems,
|
|
29
29
|
onUpload,
|
|
30
30
|
showTitle = true,
|
|
31
|
+
title,
|
|
31
32
|
uploadingFieldId,
|
|
32
33
|
...props
|
|
33
34
|
}: DynamicFormI) => {
|
|
@@ -45,7 +46,7 @@ export const DynamicForm = ({
|
|
|
45
46
|
<Stack bg="lightBlue.1" spacing="0" h="full">
|
|
46
47
|
{showTitle && (
|
|
47
48
|
<Text fontFamily="secondary" px="base" pt="4" pb="2">
|
|
48
|
-
{t('forms.itemDetails')}
|
|
49
|
+
{title ? title : t('forms.itemDetails')}
|
|
49
50
|
</Text>
|
|
50
51
|
)}
|
|
51
52
|
<FormProvider {...form}>
|
|
@@ -171,17 +172,18 @@ export const DynamicForm = ({
|
|
|
171
172
|
id={id}
|
|
172
173
|
children={children}
|
|
173
174
|
value={value}
|
|
175
|
+
description={description}
|
|
174
176
|
icon={baseProps.icon}
|
|
175
177
|
/>
|
|
176
178
|
)
|
|
177
179
|
case 'tile-body':
|
|
178
180
|
return (
|
|
179
181
|
<TileBody
|
|
182
|
+
{...props}
|
|
180
183
|
key={id}
|
|
181
184
|
callback={callback}
|
|
182
185
|
fields={children}
|
|
183
186
|
menuItems={menuItems}
|
|
184
|
-
{...props}
|
|
185
187
|
/>
|
|
186
188
|
)
|
|
187
189
|
default:
|
|
@@ -15,12 +15,13 @@ export const CheckboxGroupField = ({
|
|
|
15
15
|
icon,
|
|
16
16
|
id,
|
|
17
17
|
value,
|
|
18
|
-
|
|
18
|
+
description
|
|
19
|
+
}: Pick<ReportI, 'children' | 'icon' | 'id' | 'value' | 'description'>) => {
|
|
19
20
|
const { control } = useFormContext()
|
|
20
21
|
const defaultValues = children
|
|
21
22
|
?.map((child) => {
|
|
22
23
|
if (child.value) {
|
|
23
|
-
return child.
|
|
24
|
+
return child.name
|
|
24
25
|
}
|
|
25
26
|
})
|
|
26
27
|
.filter((value) => value) as string[]
|
|
@@ -29,7 +30,7 @@ export const CheckboxGroupField = ({
|
|
|
29
30
|
<Box>
|
|
30
31
|
<Box p="base" borderBottom="1px dashed" borderColor="lightBlue.6">
|
|
31
32
|
<Text fontFamily="secondary" fontSize="sm">
|
|
32
|
-
{
|
|
33
|
+
{description}
|
|
33
34
|
</Text>
|
|
34
35
|
</Box>
|
|
35
36
|
<Flex p="base" gap="base">
|
|
@@ -47,7 +48,7 @@ export const CheckboxGroupField = ({
|
|
|
47
48
|
return (
|
|
48
49
|
<Checkbox
|
|
49
50
|
key={id}
|
|
50
|
-
value={String(
|
|
51
|
+
value={String(name)}
|
|
51
52
|
isChecked={Boolean(value)}
|
|
52
53
|
>
|
|
53
54
|
<Text fontSize="sm">{name}</Text>
|
|
@@ -100,19 +100,6 @@ export const SingleFields = ({ callback, fields, menuItems }: FieldTypesI) => {
|
|
|
100
100
|
/>
|
|
101
101
|
)
|
|
102
102
|
case 'primary-cta':
|
|
103
|
-
return (
|
|
104
|
-
<TileCta
|
|
105
|
-
key={id}
|
|
106
|
-
callback={callback}
|
|
107
|
-
description={description}
|
|
108
|
-
icon={icon}
|
|
109
|
-
id={id}
|
|
110
|
-
name={name}
|
|
111
|
-
type={type}
|
|
112
|
-
link={link}
|
|
113
|
-
value={String(baseProps.value)}
|
|
114
|
-
/>
|
|
115
|
-
)
|
|
116
103
|
case 'secondary-cta':
|
|
117
104
|
return (
|
|
118
105
|
<TileCta
|
|
@@ -123,6 +110,7 @@ export const SingleFields = ({ callback, fields, menuItems }: FieldTypesI) => {
|
|
|
123
110
|
id={id}
|
|
124
111
|
name={name}
|
|
125
112
|
type={type}
|
|
113
|
+
link={link}
|
|
126
114
|
value={String(baseProps.value)}
|
|
127
115
|
/>
|
|
128
116
|
)
|
|
@@ -10,7 +10,7 @@ export const TileBody = ({
|
|
|
10
10
|
...props
|
|
11
11
|
}: TileBodyI) => {
|
|
12
12
|
return (
|
|
13
|
-
<Box display="flex" flexDir="column" bg="
|
|
13
|
+
<Box display="flex" flexGrow={1} flexDir="column" bg="#f6f8f9" boxShadow="lg">
|
|
14
14
|
<Stack spacing="0" flex="1">
|
|
15
15
|
<SingleFields
|
|
16
16
|
callback={callback}
|
|
@@ -4,7 +4,7 @@ import { TileBodyI } from '@/interfaces'
|
|
|
4
4
|
|
|
5
5
|
export const TileBodyAction = ({ callback, fields }: TileBodyI) => {
|
|
6
6
|
return (
|
|
7
|
-
<Flex p="base" align="center" gap="base">
|
|
7
|
+
<Flex p="base" align="center" gap="base" background={"#f6f8f9"}>
|
|
8
8
|
<SingleFields fields={fields} callback={callback} />
|
|
9
9
|
</Flex>
|
|
10
10
|
)
|
|
@@ -4,7 +4,7 @@ import { TileBodyI } from '@/interfaces'
|
|
|
4
4
|
|
|
5
5
|
export const TileBodySectionGrid = ({ fields }: TileBodyI) => {
|
|
6
6
|
return (
|
|
7
|
-
<SimpleGrid columns={3} spacing="base" p="base">
|
|
7
|
+
<SimpleGrid columns={3} spacing="base" p="base" background={"#ffffff"}>
|
|
8
8
|
<SingleFields fields={fields} />
|
|
9
9
|
</SimpleGrid>
|
|
10
10
|
)
|
|
@@ -17,7 +17,7 @@ export const HomeAssistantButton = ({
|
|
|
17
17
|
}
|
|
18
18
|
const buttonId = `homeAssistantButton-${currentStep}`
|
|
19
19
|
return (
|
|
20
|
-
<Box position="relative" id={buttonId}>
|
|
20
|
+
<Box position="relative" id={buttonId} zIndex="2">
|
|
21
21
|
{isCompleted && (
|
|
22
22
|
<Image
|
|
23
23
|
src={CheckInCircle}
|
|
@@ -12,7 +12,7 @@ export const HomeMonitorButton = ({
|
|
|
12
12
|
const iconAltText = getIconAltText(step.icon)
|
|
13
13
|
|
|
14
14
|
return (
|
|
15
|
-
<Box position="relative" id={buttonId}>
|
|
15
|
+
<Box position="relative" id={buttonId} zIndex="2">
|
|
16
16
|
<Box
|
|
17
17
|
position="relative"
|
|
18
18
|
bg="neutral.white"
|
|
@@ -36,10 +36,10 @@ export const HomeMonitorButton = ({
|
|
|
36
36
|
as="button"
|
|
37
37
|
spacing="2"
|
|
38
38
|
border="1px solid transparent"
|
|
39
|
-
w="90px"
|
|
40
39
|
align="center"
|
|
41
40
|
h="96px"
|
|
42
|
-
|
|
41
|
+
w="100%"
|
|
42
|
+
p="base"
|
|
43
43
|
{...setStyles(status)}
|
|
44
44
|
onClick={() => onStepClick(currentStep)}
|
|
45
45
|
>
|
|
@@ -3,7 +3,7 @@ import { HomeMonitortStepsI } from '@/interfaces'
|
|
|
3
3
|
import { HomeMonitorButton, IconMenu, MoreHorizontal } from '@/components'
|
|
4
4
|
import { homeAssistantSteps } from '@/helpers'
|
|
5
5
|
import { useComponentStyles } from '@/hooks'
|
|
6
|
-
import { useState } from 'react'
|
|
6
|
+
import { Fragment, useState } from 'react'
|
|
7
7
|
|
|
8
8
|
export const HomeMonitorSteps = ({
|
|
9
9
|
menuItems = [],
|
|
@@ -24,10 +24,10 @@ export const HomeMonitorSteps = ({
|
|
|
24
24
|
useComponentStyles({ ids, selectedId, zIndex: '2' })
|
|
25
25
|
const handleStepClick = (step: number) => onStepClick(step)
|
|
26
26
|
return (
|
|
27
|
-
<Flex gap="base">
|
|
27
|
+
<Flex gap="base" justify="center">
|
|
28
28
|
{homeAssistantSteps.map((step, index) => (
|
|
29
|
-
<Box key={step?.title} position="relative">
|
|
30
|
-
<
|
|
29
|
+
<Box key={step?.title} position="relative" flex="1">
|
|
30
|
+
<Fragment>
|
|
31
31
|
<HomeMonitorButton
|
|
32
32
|
currentStep={index + 1}
|
|
33
33
|
onStepClick={handleStepClick}
|
|
@@ -44,7 +44,7 @@ export const HomeMonitorSteps = ({
|
|
|
44
44
|
onClick={() => setSelectedId(`homeMonitorButton-${index + 1}`)}
|
|
45
45
|
/>
|
|
46
46
|
</Box>
|
|
47
|
-
</
|
|
47
|
+
</Fragment>
|
|
48
48
|
</Box>
|
|
49
49
|
))}
|
|
50
50
|
</Flex>
|
|
@@ -334,7 +334,7 @@ export const HomeBoard = () => {
|
|
|
334
334
|
title="Travis County Property Taxes"
|
|
335
335
|
/>
|
|
336
336
|
<HomeMonitor>
|
|
337
|
-
<Stack spacing="base">
|
|
337
|
+
<Stack spacing="base" w="full" px="base">
|
|
338
338
|
<Flex gap="base">
|
|
339
339
|
<HomefileMonitoring />
|
|
340
340
|
<Notifications date="10-10-24" local="TX - Houston" />
|
|
@@ -4,6 +4,7 @@ import {
|
|
|
4
4
|
Menu,
|
|
5
5
|
MenuItem,
|
|
6
6
|
MenuList,
|
|
7
|
+
Box,
|
|
7
8
|
} from '@chakra-ui/react'
|
|
8
9
|
import { IconMenuI } from '@/interfaces'
|
|
9
10
|
import { Overlay } from '@/components'
|
|
@@ -16,46 +17,43 @@ export const IconMenu = <T extends unknown>({
|
|
|
16
17
|
onClick,
|
|
17
18
|
variant = 'menuIcon',
|
|
18
19
|
width = 'fit-content',
|
|
19
|
-
zIndex,
|
|
20
|
+
zIndex = '999',
|
|
20
21
|
}: IconMenuI<T>) => {
|
|
21
22
|
return (
|
|
22
|
-
<
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
bg="overlay"
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
</>
|
|
58
|
-
)}
|
|
59
|
-
</Menu>
|
|
23
|
+
<Box zIndex={zIndex}>
|
|
24
|
+
<Menu isLazy>
|
|
25
|
+
{({ isOpen }) => (
|
|
26
|
+
<>
|
|
27
|
+
<Overlay bg="overlay" showOverlay={isOpen} position="fixed" />
|
|
28
|
+
<MenuButton
|
|
29
|
+
as={IconButton}
|
|
30
|
+
aria-label="Options"
|
|
31
|
+
icon={icon}
|
|
32
|
+
variant={variant}
|
|
33
|
+
w={width}
|
|
34
|
+
disabled={disabled}
|
|
35
|
+
marginTop="0 !important"
|
|
36
|
+
onClick={onClick}
|
|
37
|
+
/>
|
|
38
|
+
<MenuList zIndex="5">
|
|
39
|
+
{menuItems?.map(({ handleClick, label }) => (
|
|
40
|
+
<MenuItem
|
|
41
|
+
key={label}
|
|
42
|
+
onClick={() => handleClick(itemForm)}
|
|
43
|
+
_hover={{
|
|
44
|
+
bg: 'lightGreen.1',
|
|
45
|
+
}}
|
|
46
|
+
_focus={{
|
|
47
|
+
bg: 'lightGreen.1',
|
|
48
|
+
}}
|
|
49
|
+
>
|
|
50
|
+
{label}
|
|
51
|
+
</MenuItem>
|
|
52
|
+
))}
|
|
53
|
+
</MenuList>
|
|
54
|
+
</>
|
|
55
|
+
)}
|
|
56
|
+
</Menu>
|
|
57
|
+
</Box>
|
|
60
58
|
)
|
|
61
59
|
}
|
|
@@ -18,7 +18,7 @@ export const PartnerFooter = ({
|
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
return (
|
|
21
|
-
<Flex align="center" justify="space-between" p="base">
|
|
21
|
+
<Flex background={"#f6f8f9"} align="center" justify="space-between" p="base">
|
|
22
22
|
<Link href={websiteUrl} isExternal>
|
|
23
23
|
<Text fontSize="xs" color="blue.3">
|
|
24
24
|
{urlText ?? cleanedWebsiteUrl}
|
|
@@ -47,6 +47,7 @@ import {
|
|
|
47
47
|
HolidayLights,
|
|
48
48
|
GutterCleaning,
|
|
49
49
|
HomeCleaning,
|
|
50
|
+
HouseWashing,
|
|
50
51
|
PressureWasher,
|
|
51
52
|
} from '@/assets/images'
|
|
52
53
|
import { IconTypes } from '@/interfaces'
|
|
@@ -98,6 +99,7 @@ export const fieldIcons: Record<IconTypes, string> = {
|
|
|
98
99
|
company: Company,
|
|
99
100
|
'sh-gutter': GutterCleaning,
|
|
100
101
|
'sh-home': HomeCleaning,
|
|
102
|
+
'sh-house': HouseWashing,
|
|
101
103
|
'sh-lights': HolidayLights,
|
|
102
104
|
'sh-pressure': Pressure,
|
|
103
105
|
'sh-roof': RoofCleaning,
|
|
@@ -30,7 +30,7 @@ export const testFolders: FolderI[] = [
|
|
|
30
30
|
{
|
|
31
31
|
_id: faker.database.mongodbObjectId(),
|
|
32
32
|
home: '6317993b4a8e6e909bcced0a',
|
|
33
|
-
name: '
|
|
33
|
+
name: 'Mortgage',
|
|
34
34
|
public: false,
|
|
35
35
|
icon: 'project',
|
|
36
36
|
createdAt: '2023-01-13T20:35:02.538Z',
|
|
@@ -153,19 +153,21 @@ export const fileDB: ReportsI[] = [
|
|
|
153
153
|
createdAt: '2022-06-15T21:17:33.246Z',
|
|
154
154
|
updatedAt: '2022-06-15T21:17:33.246Z',
|
|
155
155
|
__v: 0,
|
|
156
|
-
files: [
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
156
|
+
files: [
|
|
157
|
+
{
|
|
158
|
+
_id: '62aa4c6db225dd3957d09b24',
|
|
159
|
+
fileName: 'test-plans.jpeg-37f8c3',
|
|
160
|
+
extension: 'mov',
|
|
161
|
+
originalName: 'test-plans.jpeg',
|
|
162
|
+
bucketName: 'homefile-images',
|
|
163
|
+
description: '',
|
|
164
|
+
collectionName: 'homes',
|
|
165
|
+
docId: '62a20af1cc6d1000ef17c7d0',
|
|
166
|
+
createdAt: '2022-06-15T21:17:33.166Z',
|
|
167
|
+
updatedAt: '2022-06-15T21:17:33.166Z',
|
|
168
|
+
__v: 0,
|
|
169
|
+
},
|
|
170
|
+
],
|
|
169
171
|
room: {
|
|
170
172
|
_id: '63176dfa5d8cee7e11f6f962',
|
|
171
173
|
name: 'Master Bedroom',
|
|
@@ -191,19 +193,21 @@ export const fileDB: ReportsI[] = [
|
|
|
191
193
|
createdAt: '2022-06-15T21:17:33.246Z',
|
|
192
194
|
updatedAt: '2022-06-15T21:17:33.246Z',
|
|
193
195
|
__v: 0,
|
|
194
|
-
files: [
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
196
|
+
files: [
|
|
197
|
+
{
|
|
198
|
+
_id: '62aa4c6db225dd3957d09b24',
|
|
199
|
+
fileName: 'test-plans.jpeg-37f8c3',
|
|
200
|
+
extension: 'jpeg',
|
|
201
|
+
originalName: 'test-plans.jpeg',
|
|
202
|
+
bucketName: 'homefile-images',
|
|
203
|
+
description: '',
|
|
204
|
+
collectionName: 'homes',
|
|
205
|
+
docId: '62a20af1cc6d1000ef17c7d0',
|
|
206
|
+
createdAt: '2022-06-15T21:17:33.166Z',
|
|
207
|
+
updatedAt: '2022-06-15T21:17:33.166Z',
|
|
208
|
+
__v: 0,
|
|
209
|
+
},
|
|
210
|
+
],
|
|
207
211
|
room: {
|
|
208
212
|
_id: '63176dfa5d8cee7e11f6f962',
|
|
209
213
|
name: 'Master Bedroom',
|
|
@@ -88,6 +88,7 @@ export type UIIconTypes =
|
|
|
88
88
|
| 'sh-lights'
|
|
89
89
|
| 'sh-gutter'
|
|
90
90
|
| 'sh-home'
|
|
91
|
+
| 'sh-house'
|
|
91
92
|
|
|
92
93
|
export type ValueTypes = string | string[] | number | boolean
|
|
93
94
|
export type OptionsTypes = string[] | number[] | null
|
|
@@ -113,6 +114,7 @@ export interface DynamicFormI extends Partial<PartnerFooterI> {
|
|
|
113
114
|
menuItems?: MenuItemI[]
|
|
114
115
|
onUpload?: (filesByFieldId: Record<string, FolderFileI[]>) => void
|
|
115
116
|
showTitle?: boolean
|
|
117
|
+
title?: string
|
|
116
118
|
uploadingFieldId?: string
|
|
117
119
|
}
|
|
118
120
|
|
|
@@ -496,6 +496,15 @@ export const tileUIMock: ReportI[] = [
|
|
|
496
496
|
type: 'vertical-icon',
|
|
497
497
|
icon: 'sh-gutter',
|
|
498
498
|
},
|
|
499
|
+
{
|
|
500
|
+
id: faker.database.mongodbObjectId(),
|
|
501
|
+
name: '',
|
|
502
|
+
description: '',
|
|
503
|
+
comments: '',
|
|
504
|
+
value: 'House Washing',
|
|
505
|
+
type: 'vertical-icon',
|
|
506
|
+
icon: 'sh-house',
|
|
507
|
+
},
|
|
499
508
|
],
|
|
500
509
|
},
|
|
501
510
|
|
|
@@ -523,7 +532,7 @@ export const tileUIMock: ReportI[] = [
|
|
|
523
532
|
comments: '',
|
|
524
533
|
value: 'Request Support',
|
|
525
534
|
type: 'secondary-cta',
|
|
526
|
-
link: '
|
|
535
|
+
link: 'www.shine.com',
|
|
527
536
|
},
|
|
528
537
|
],
|
|
529
538
|
},
|