@homefile/components-v2 2.1.1 → 2.2.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.
Files changed (54) hide show
  1. package/dist/assets/images/index.d.ts +2 -1
  2. package/dist/assets/images/index.js +2 -1
  3. package/dist/assets/images/index.ts +2 -0
  4. package/dist/assets/images/pressure-washer.svg +16 -0
  5. package/dist/components/animations/HomieAnimation.d.ts +3 -1
  6. package/dist/components/animations/HomieAnimation.js +2 -2
  7. package/dist/components/folderSharing/FolderSharing.js +1 -1
  8. package/dist/components/forms/dynamicForm/DynamicForm.d.ts +1 -1
  9. package/dist/components/forms/dynamicForm/DynamicForm.js +7 -4
  10. package/dist/components/forms/dynamicForm/fields/CheckboxGroupField.d.ts +2 -0
  11. package/dist/components/forms/dynamicForm/fields/CheckboxGroupField.js +18 -0
  12. package/dist/components/forms/dynamicForm/fields/SingleFields.js +2 -3
  13. package/dist/components/forms/dynamicForm/fields/index.d.ts +1 -0
  14. package/dist/components/forms/dynamicForm/fields/index.js +1 -0
  15. package/dist/components/forms/dynamicForm/fields/uiFields/TileBodyAction.d.ts +1 -1
  16. package/dist/components/forms/dynamicForm/fields/uiFields/TileBodyAction.js +2 -2
  17. package/dist/components/forms/dynamicForm/fields/uiFields/TileBodyAction.tsx +2 -2
  18. package/dist/components/forms/dynamicForm/fields/uiFields/TileCta.d.ts +1 -1
  19. package/dist/components/forms/dynamicForm/fields/uiFields/TileCta.js +15 -2
  20. package/dist/components/forms/dynamicForm/fields/uiFields/TileCta.tsx +3 -2
  21. package/dist/components/homeAssistant/HomeMonitorSteps.js +2 -6
  22. package/dist/components/homeAssistant/monitorAlerts/HomefileMonitoring.js +1 -1
  23. package/dist/components/homeBoard/HomeBoard.js +6 -1
  24. package/dist/helpers/forms/dynamicForm.helper.js +2 -1
  25. package/dist/helpers/homeBoard/FolderSharing.helper.js +9 -5
  26. package/dist/interfaces/forms/dynamicForm/DynamicForm.interface.d.ts +3 -2
  27. package/dist/interfaces/forms/dynamicForm/fields/UIFields.interface.d.ts +14 -3
  28. package/dist/mocks/forms/dynamicForm.mock.js +67 -1
  29. package/dist/stories/animations/HomieAnimation.stories.d.ts +1 -0
  30. package/dist/stories/animations/HomieAnimation.stories.js +1 -0
  31. package/dist/stories/assets/Illustrations.stories.js +2 -2
  32. package/dist/stories/forms/dynamicForm/DynamicForm.stories.js +1 -3
  33. package/package.json +1 -1
  34. package/src/assets/images/index.ts +2 -0
  35. package/src/assets/images/pressure-washer.svg +16 -0
  36. package/src/components/animations/HomieAnimation.tsx +2 -2
  37. package/src/components/folderSharing/FolderSharing.tsx +1 -1
  38. package/src/components/forms/dynamicForm/DynamicForm.tsx +14 -2
  39. package/src/components/forms/dynamicForm/fields/CheckboxGroupField.tsx +65 -0
  40. package/src/components/forms/dynamicForm/fields/SingleFields.tsx +7 -9
  41. package/src/components/forms/dynamicForm/fields/index.ts +1 -0
  42. package/src/components/forms/dynamicForm/fields/uiFields/TileBodyAction.tsx +2 -2
  43. package/src/components/forms/dynamicForm/fields/uiFields/TileCta.tsx +3 -2
  44. package/src/components/homeAssistant/HomeMonitorSteps.tsx +2 -6
  45. package/src/components/homeAssistant/monitorAlerts/HomefileMonitoring.tsx +1 -1
  46. package/src/components/homeBoard/HomeBoard.tsx +7 -2
  47. package/src/helpers/forms/dynamicForm.helper.ts +2 -0
  48. package/src/helpers/homeBoard/FolderSharing.helper.ts +31 -27
  49. package/src/interfaces/forms/dynamicForm/DynamicForm.interface.ts +3 -0
  50. package/src/interfaces/forms/dynamicForm/fields/UIFields.interface.ts +18 -3
  51. package/src/mocks/forms/dynamicForm.mock.ts +68 -1
  52. package/src/stories/animations/HomieAnimation.stories.tsx +1 -0
  53. package/src/stories/assets/Illustrations.stories.tsx +2 -0
  54. package/src/stories/forms/dynamicForm/DynamicForm.stories.tsx +6 -3
@@ -102,6 +102,7 @@ import Play from './play.svg';
102
102
  import Plus from './plus.svg';
103
103
  import Pool from './pool.svg';
104
104
  import Pool2 from './pool2.svg';
105
+ import PressureWasher from './pressure-washer.svg';
105
106
  import Price from './price.svg';
106
107
  import Profile from './profile.svg';
107
108
  import ProgressReport from './progress-report.svg';
@@ -153,7 +154,7 @@ import WizardDetailed from './wizard-detailed.svg';
153
154
  import WizardQuick from './wizard-quick.svg';
154
155
  import YellowFolder from './yellow-folder.svg';
155
156
  import YellowFolderUnshared from './yellow-folder-unshared.svg';
156
- export { AlertDelete, AlertDeletePurple, Arrow, Batery, Bathroom, Battery, Battery2, Bedroom, BgBlue, BgLogo, Billing, BillingAddress, BlueFolder, BlueFolderShared, Box, Building, Calc, Calendar2, Catalog, Check, CheckInCircle, CheckPen, Chemistry, CircleFace, Cleaning, Closet, Clouds, Co2, Company, ComputerReport, Confirmation, Construction, Contacts, Contacts2, Contributor, CreditCard, Detector, Diamond, DiningRoom, DocIcon, Document, Drop, DropCalendar, Electricity, Entryway, Exclamation, Face, Feedback, FileUploading, Finance, Fire, Flag, FormSent, Foundation, Garage, GearPencil, GearTime, GenericField, GlassWater, GreenFolder, Group, Groups, GuestBedroom, Hallway, HandPencil, Heater, Help, HomeAddress, Homeowner, House, HouseHands, IA, ImageDefault, ImgIcon, Inbox, Insect, Kitchen, Laundry, Light, LivingRoom, Loading, Location, LogoCompany, LogoSmall, MagnifyingGlassReport, Manager, MasterBedroom, Member, Message, MobileDrop, Money, Mudroom, NeedHelp, Office, Painting, PartnerGeneric, Patio, PdfIcon, PersonMail, Plate, Play, Plus, Pool, Pool2, Price, Profile, ProgressReport, Proposal, RealEstate, Receipt, ReceiptBg, ReceiptHouse, Receipts, Recipient, Records, Register, RelationshipHome, ResendPassword, Rocket, Roof2, Security, Send, ShareHome, ShareWith, SixtyEight, SMS, Social, SolarPanel, Sprinkler, Structure, Subscription, Target, Temperature, Theatre, Thumbnail, ThumbnailSmall, ThumbUp, Trash, Trees, TreesCrop, TreesCrop2, VideoIcon, VideoPlay, VioletFolder, Warning, Warranty, WellDone, WholeHome, Wind, WindWhite, Wizard, WizardDetailed, WizardQuick, YellowFolder, YellowFolderUnshared, };
157
+ export { AlertDelete, AlertDeletePurple, Arrow, Batery, Bathroom, Battery, Battery2, Bedroom, BgBlue, BgLogo, Billing, BillingAddress, BlueFolder, BlueFolderShared, Box, Building, Calc, Calendar2, Catalog, Check, CheckInCircle, CheckPen, Chemistry, CircleFace, Cleaning, Closet, Clouds, Co2, Company, ComputerReport, Confirmation, Construction, Contacts, Contacts2, Contributor, CreditCard, Detector, Diamond, DiningRoom, DocIcon, Document, Drop, DropCalendar, Electricity, Entryway, Exclamation, Face, Feedback, FileUploading, Finance, Fire, Flag, FormSent, Foundation, Garage, GearPencil, GearTime, GenericField, GlassWater, GreenFolder, Group, Groups, GuestBedroom, Hallway, HandPencil, Heater, Help, HomeAddress, Homeowner, House, HouseHands, IA, ImageDefault, ImgIcon, Inbox, Insect, Kitchen, Laundry, Light, LivingRoom, Loading, Location, LogoCompany, LogoSmall, MagnifyingGlassReport, Manager, MasterBedroom, Member, Message, MobileDrop, Money, Mudroom, NeedHelp, Office, Painting, PartnerGeneric, Patio, PdfIcon, PersonMail, Plate, Play, Plus, Pool, Pool2, PressureWasher, Price, Profile, ProgressReport, Proposal, RealEstate, Receipt, ReceiptBg, ReceiptHouse, Receipts, Recipient, Records, Register, RelationshipHome, ResendPassword, Rocket, Roof2, Security, Send, ShareHome, ShareWith, SixtyEight, SMS, Social, SolarPanel, Sprinkler, Structure, Subscription, Target, Temperature, Theatre, Thumbnail, ThumbnailSmall, ThumbUp, Trash, Trees, TreesCrop, TreesCrop2, VideoIcon, VideoPlay, VioletFolder, Warning, Warranty, WellDone, WholeHome, Wind, WindWhite, Wizard, WizardDetailed, WizardQuick, YellowFolder, YellowFolderUnshared, };
157
158
  export * from './alerts';
158
159
  export * from './appliances';
159
160
  export * from './clouds-animation';
@@ -102,6 +102,7 @@ import Play from './play.svg';
102
102
  import Plus from './plus.svg';
103
103
  import Pool from './pool.svg';
104
104
  import Pool2 from './pool2.svg';
105
+ import PressureWasher from './pressure-washer.svg';
105
106
  import Price from './price.svg';
106
107
  import Profile from './profile.svg';
107
108
  import ProgressReport from './progress-report.svg';
@@ -153,7 +154,7 @@ import WizardDetailed from './wizard-detailed.svg';
153
154
  import WizardQuick from './wizard-quick.svg';
154
155
  import YellowFolder from './yellow-folder.svg';
155
156
  import YellowFolderUnshared from './yellow-folder-unshared.svg';
156
- export { AlertDelete, AlertDeletePurple, Arrow, Batery, Bathroom, Battery, Battery2, Bedroom, BgBlue, BgLogo, Billing, BillingAddress, BlueFolder, BlueFolderShared, Box, Building, Calc, Calendar2, Catalog, Check, CheckInCircle, CheckPen, Chemistry, CircleFace, Cleaning, Closet, Clouds, Co2, Company, ComputerReport, Confirmation, Construction, Contacts, Contacts2, Contributor, CreditCard, Detector, Diamond, DiningRoom, DocIcon, Document, Drop, DropCalendar, Electricity, Entryway, Exclamation, Face, Feedback, FileUploading, Finance, Fire, Flag, FormSent, Foundation, Garage, GearPencil, GearTime, GenericField, GlassWater, GreenFolder, Group, Groups, GuestBedroom, Hallway, HandPencil, Heater, Help, HomeAddress, Homeowner, House, HouseHands, IA, ImageDefault, ImgIcon, Inbox, Insect, Kitchen, Laundry, Light, LivingRoom, Loading, Location, LogoCompany, LogoSmall, MagnifyingGlassReport, Manager, MasterBedroom, Member, Message, MobileDrop, Money, Mudroom, NeedHelp, Office, Painting, PartnerGeneric, Patio, PdfIcon, PersonMail, Plate, Play, Plus, Pool, Pool2, Price, Profile, ProgressReport, Proposal, RealEstate, Receipt, ReceiptBg, ReceiptHouse, Receipts, Recipient, Records, Register, RelationshipHome, ResendPassword, Rocket, Roof2, Security, Send, ShareHome, ShareWith, SixtyEight, SMS, Social, SolarPanel, Sprinkler, Structure, Subscription, Target, Temperature, Theatre, Thumbnail, ThumbnailSmall, ThumbUp, Trash, Trees, TreesCrop, TreesCrop2, VideoIcon, VideoPlay, VioletFolder, Warning, Warranty, WellDone, WholeHome, Wind, WindWhite, Wizard, WizardDetailed, WizardQuick, YellowFolder, YellowFolderUnshared, };
157
+ export { AlertDelete, AlertDeletePurple, Arrow, Batery, Bathroom, Battery, Battery2, Bedroom, BgBlue, BgLogo, Billing, BillingAddress, BlueFolder, BlueFolderShared, Box, Building, Calc, Calendar2, Catalog, Check, CheckInCircle, CheckPen, Chemistry, CircleFace, Cleaning, Closet, Clouds, Co2, Company, ComputerReport, Confirmation, Construction, Contacts, Contacts2, Contributor, CreditCard, Detector, Diamond, DiningRoom, DocIcon, Document, Drop, DropCalendar, Electricity, Entryway, Exclamation, Face, Feedback, FileUploading, Finance, Fire, Flag, FormSent, Foundation, Garage, GearPencil, GearTime, GenericField, GlassWater, GreenFolder, Group, Groups, GuestBedroom, Hallway, HandPencil, Heater, Help, HomeAddress, Homeowner, House, HouseHands, IA, ImageDefault, ImgIcon, Inbox, Insect, Kitchen, Laundry, Light, LivingRoom, Loading, Location, LogoCompany, LogoSmall, MagnifyingGlassReport, Manager, MasterBedroom, Member, Message, MobileDrop, Money, Mudroom, NeedHelp, Office, Painting, PartnerGeneric, Patio, PdfIcon, PersonMail, Plate, Play, Plus, Pool, Pool2, PressureWasher, Price, Profile, ProgressReport, Proposal, RealEstate, Receipt, ReceiptBg, ReceiptHouse, Receipts, Recipient, Records, Register, RelationshipHome, ResendPassword, Rocket, Roof2, Security, Send, ShareHome, ShareWith, SixtyEight, SMS, Social, SolarPanel, Sprinkler, Structure, Subscription, Target, Temperature, Theatre, Thumbnail, ThumbnailSmall, ThumbUp, Trash, Trees, TreesCrop, TreesCrop2, VideoIcon, VideoPlay, VioletFolder, Warning, Warranty, WellDone, WholeHome, Wind, WindWhite, Wizard, WizardDetailed, WizardQuick, YellowFolder, YellowFolderUnshared, };
157
158
  export * from './alerts';
158
159
  export * from './appliances';
159
160
  export * from './clouds-animation';
@@ -102,6 +102,7 @@ import Play from './play.svg'
102
102
  import Plus from './plus.svg'
103
103
  import Pool from './pool.svg'
104
104
  import Pool2 from './pool2.svg'
105
+ import PressureWasher from './pressure-washer.svg'
105
106
  import Price from './price.svg'
106
107
  import Profile from './profile.svg'
107
108
  import ProgressReport from './progress-report.svg'
@@ -259,6 +260,7 @@ export {
259
260
  Plus,
260
261
  Pool,
261
262
  Pool2,
263
+ PressureWasher,
262
264
  Price,
263
265
  Profile,
264
266
  ProgressReport,
@@ -0,0 +1,16 @@
1
+ <svg id="Group_22267" data-name="Group 22267" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="28.455" height="30.766" viewBox="0 0 28.455 30.766">
2
+ <defs>
3
+ <clipPath id="clip-path">
4
+ <rect id="Rectangle_25649" data-name="Rectangle 25649" width="28.455" height="30.766" fill="none"/>
5
+ </clipPath>
6
+ </defs>
7
+ <g id="Group_22266" data-name="Group 22266" clip-path="url(#clip-path)">
8
+ <path id="Path_17637" data-name="Path 17637" d="M2.623,97.179a2.624,2.624,0,1,1,2.392-3.7c.033.074.062.148.088.222l-.786.276c-.019-.054-.04-.107-.063-.158a1.79,1.79,0,1,0-.009,1.5,1.44,1.44,0,0,0,.067-.172c.014-.038.02-.052.024-.068s.011-.041.016-.057a.37.37,0,0,0,.014-.054c.01-.043.014-.064.018-.088l.821.14c-.007.043-.015.083-.025.126s-.021.09-.035.133-.026.087-.042.131A2.377,2.377,0,0,1,5,95.674a2.641,2.641,0,0,1-2.373,1.5" transform="translate(0 -66.413)" fill="#00c0b7"/>
9
+ <path id="Path_17638" data-name="Path 17638" d="M74.807,0V1.516H71.726V0Z" transform="translate(-51.817 0)" fill="#40566b"/>
10
+ <path id="Path_17639" data-name="Path 17639" d="M30.728,16.7v3.794h-2V16.7Z" transform="translate(-20.753 -12.064)" fill="#40566b"/>
11
+ <path id="Path_17640" data-name="Path 17640" d="M26.768,35.665a4,4,0,0,1,0,8.008H10.422V41.827H26.768a2.157,2.157,0,1,0,0-4.313H7.21a4.008,4.008,0,0,1-4.005-4V24.2A4.011,4.011,0,0,1,7.21,20.2h3.079v1.849H7.21A2.159,2.159,0,0,0,5.054,24.2v9.307A2.157,2.157,0,0,0,7.21,35.665Z" transform="translate(-2.315 -14.592)" fill="#00c0b7"/>
12
+ <path id="Path_17641" data-name="Path 17641" d="M18.926,98.119v1.846h-3.95a1.872,1.872,0,0,0,.086-.219.869.869,0,0,0,.036-.114.881.881,0,0,0,.031-.117c.009-.033.014-.064.02-.1a2.066,2.066,0,0,0,.036-.394,2.188,2.188,0,0,0-.12-.716c-.022-.064-.047-.128-.075-.189Z" transform="translate(-10.819 -70.884)" fill="#e24c5d"/>
13
+ <path id="Path_17642" data-name="Path 17642" d="M53.8,10.734V16.8a5.273,5.273,0,0,1-5.274,5.274H39.055a3.118,3.118,0,0,1-3.12-3.117V8.58a3.119,3.119,0,0,1,3.12-3.12h9.471A5.273,5.273,0,0,1,53.8,10.734m-4.158,7.594V9.4a.616.616,0,0,0-.616-.616H45.791a.618.618,0,0,0-.616.616v8.932a.617.617,0,0,0,.616.616h3.234a.615.615,0,0,0,.616-.616" transform="translate(-25.961 -3.944)" fill="#e24c5d"/>
14
+ <path id="Path_17643" data-name="Path 17643" d="M73.69,26.969a.615.615,0,0,1-.616.616H69.84a.617.617,0,0,1-.616-.616V18.037a.618.618,0,0,1,.616-.616h3.234a.616.616,0,0,1,.616.616Z" transform="translate(-50.01 -12.586)" fill="#ddeff2"/>
15
+ </g>
16
+ </svg>
@@ -1 +1,3 @@
1
- export declare const HomieAnimation: () => import("react/jsx-runtime").JSX.Element;
1
+ export declare const HomieAnimation: ({ animation }: {
2
+ animation?: string | undefined;
3
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -1,9 +1,9 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { useRive } from '@rive-app/react-canvas';
3
3
  const url = import.meta.env.VITE_RIVE_ASSETS;
4
- export const HomieAnimation = () => {
4
+ export const HomieAnimation = ({ animation = 'homie-v2' }) => {
5
5
  const { RiveComponent } = useRive({
6
- src: `${url}/homie-v2.riv`,
6
+ src: `${url}/${animation}.riv`,
7
7
  stateMachines: 'State Machine 1',
8
8
  autoplay: true,
9
9
  });
@@ -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, lineHeight: "1.1", fontSize: "sm", textOverflow: "ellipsis", children: name })] }) }) }, _id));
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,17 +9,18 @@ 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';
15
16
  import { Stack, Text } from '@chakra-ui/react';
16
- import { HiddenFieldSection, GroupField, TextField, TextAreaField, SelectField, RatingField, GridField, FieldWithDelete, FileField, SwitchField, DateField, NumberField, CurrencyField, TileBody, } from '../..';
17
+ import { HiddenFieldSection, GroupField, TextField, TextAreaField, SelectField, RatingField, GridField, FieldWithDelete, FileField, SwitchField, DateField, NumberField, CurrencyField, TileBody, CheckboxGroupField, } from '../..';
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,
@@ -61,8 +62,10 @@ export const DynamicForm = (_a) => {
61
62
  return (_jsx(FieldWithDelete, Object.assign({}, fieldWithDeleteBaseProps, { children: _jsx(FileField, { icon: baseProps.icon, description: description, onUpload: (files) => handleFilesUpload({ id, files }), uploading: uploadingFieldId === id }) })));
62
63
  case 'group':
63
64
  return (_jsx(GroupField, { id: id, fields: children, onRemove: handleRemove, canBeHidden: canBeHidden }, id));
65
+ case 'checkbox-group':
66
+ return (_jsx(CheckboxGroupField, { id: id, children: children, value: value, icon: baseProps.icon }, id));
64
67
  case 'tile-body':
65
- return (_jsx(TileBody, Object.assign({ callback: callback, fields: children, menuItems: menuItems }, props), id));
68
+ return (_createElement(TileBody, Object.assign({}, props, { key: id, callback: callback, fields: children, menuItems: menuItems })));
66
69
  default:
67
70
  return null;
68
71
  }
@@ -0,0 +1,2 @@
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;
@@ -0,0 +1,18 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Box, Checkbox, CheckboxGroup, Flex, SimpleGrid, Text, } from '@chakra-ui/react';
3
+ import { FormIcon } from '../../..';
4
+ import { Controller, useFormContext } from 'react-hook-form';
5
+ export const CheckboxGroupField = ({ children, icon, id, value, }) => {
6
+ const { control } = useFormContext();
7
+ const defaultValues = children === null || children === void 0 ? void 0 : children.map((child) => {
8
+ if (child.value) {
9
+ return child.name;
10
+ }
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: value }) }), _jsxs(Flex, { p: "base", gap: "base", children: [_jsx(FormIcon, { icon: icon }), _jsx(Controller, { control: control, name: id, defaultValue: defaultValues, render: ({ field: { onChange } }) => {
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
+ const { id, name, value } = child;
15
+ return (_jsx(Checkbox, { value: String(name), isChecked: Boolean(value), children: _jsx(Text, { fontSize: "sm", children: name }) }, id));
16
+ }) }) }));
17
+ } })] })] }));
18
+ };
@@ -2,7 +2,7 @@ import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
2
2
  import { fieldIcons } from '../../../../helpers';
3
3
  import { GridField, RatingField, TextAreaField, TextField, SelectField, SwitchField, NumberField, DateField, CurrencyField, TileBodyHeader, TileBodyLogo, VerticalIcon, TileBodySectionGrid, TileBodyAction, TileCta, } from '../../..';
4
4
  export const SingleFields = ({ callback, fields, menuItems }) => {
5
- return (_jsx(_Fragment, { children: fields === null || fields === void 0 ? void 0 : fields.map(({ children, description, id, name, type, value, icon, options = [], }) => {
5
+ return (_jsx(_Fragment, { children: fields === null || fields === void 0 ? void 0 : fields.map(({ children, description, id, name, type, value, icon, link, options = [], }) => {
6
6
  const baseProps = {
7
7
  key: id,
8
8
  id,
@@ -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, { type: type, value: String(baseProps.value), callback: callback }, id));
49
48
  case 'secondary-cta':
50
- return (_jsx(TileCta, { type: type, value: String(baseProps.value), callback: callback }, 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
  }
@@ -1,3 +1,4 @@
1
+ export * from './CheckboxGroupField';
1
2
  export * from './CurrencyField';
2
3
  export * from './DateField';
3
4
  export * from './FieldDescription';
@@ -1,3 +1,4 @@
1
+ export * from './CheckboxGroupField';
1
2
  export * from './CurrencyField';
2
3
  export * from './DateField';
3
4
  export * from './FieldDescription';
@@ -1,2 +1,2 @@
1
1
  import { TileBodyI } from '../../../../../interfaces';
2
- export declare const TileBodyAction: ({ fields }: TileBodyI) => import("react/jsx-runtime").JSX.Element;
2
+ export declare const TileBodyAction: ({ callback, fields }: TileBodyI) => import("react/jsx-runtime").JSX.Element;
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { Flex } from '@chakra-ui/react';
3
3
  import { SingleFields } from '../../../..';
4
- export const TileBodyAction = ({ fields }) => {
5
- return (_jsx(Flex, { p: "base", align: "center", gap: "base", children: _jsx(SingleFields, { fields: fields }) }));
4
+ export const TileBodyAction = ({ callback, fields }) => {
5
+ return (_jsx(Flex, { p: "base", align: "center", gap: "base", children: _jsx(SingleFields, { fields: fields, callback: callback }) }));
6
6
  };
@@ -2,10 +2,10 @@ import { Flex } from '@chakra-ui/react'
2
2
  import { SingleFields } from '@/components'
3
3
  import { TileBodyI } from '@/interfaces'
4
4
 
5
- export const TileBodyAction = ({ fields }: TileBodyI) => {
5
+ export const TileBodyAction = ({ callback, fields }: TileBodyI) => {
6
6
  return (
7
7
  <Flex p="base" align="center" gap="base">
8
- <SingleFields fields={fields} />
8
+ <SingleFields fields={fields} callback={callback} />
9
9
  </Flex>
10
10
  )
11
11
  }
@@ -1,2 +1,2 @@
1
1
  import { TileCtaI } from '../../../../../interfaces';
2
- export declare const TileCta: ({ callback, type, value }: TileCtaI) => import("react/jsx-runtime").JSX.Element;
2
+ export declare const TileCta: ({ callback, ...props }: TileCtaI) => import("react/jsx-runtime").JSX.Element;
@@ -1,5 +1,18 @@
1
+ var __rest = (this && this.__rest) || function (s, e) {
2
+ var t = {};
3
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
+ t[p] = s[p];
5
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
+ t[p[i]] = s[p[i]];
9
+ }
10
+ return t;
11
+ };
1
12
  import { jsx as _jsx } from "react/jsx-runtime";
2
13
  import { Button } from '@chakra-ui/react';
3
- export const TileCta = ({ callback, type, value }) => {
4
- return (_jsx(Button, { onClick: () => callback === null || callback === void 0 ? void 0 : callback(value), variant: type === 'primary-cta' ? 'tertiaryFooter' : 'secondaryFooter', fontSize: "sm", children: value }));
14
+ export const TileCta = (_a) => {
15
+ var { callback } = _a, props = __rest(_a, ["callback"]);
16
+ const { type, value } = props;
17
+ return (_jsx(Button, { onClick: () => callback === null || callback === void 0 ? void 0 : callback(Object.assign({}, props)), variant: type === 'primary-cta' ? 'tertiaryFooter' : 'secondaryFooter', fontSize: "sm", children: value }));
5
18
  };
@@ -1,10 +1,11 @@
1
1
  import { Button } from '@chakra-ui/react'
2
2
  import { TileCtaI } from '@/interfaces'
3
3
 
4
- export const TileCta = ({ callback, type, value }: TileCtaI) => {
4
+ export const TileCta = ({ callback, ...props }: TileCtaI) => {
5
+ const { type, value } = props
5
6
  return (
6
7
  <Button
7
- onClick={() => callback?.(value)}
8
+ onClick={() => callback?.({ ...props })}
8
9
  variant={type === 'primary-cta' ? 'tertiaryFooter' : 'secondaryFooter'}
9
10
  fontSize="sm"
10
11
  >
@@ -12,16 +12,12 @@ export const HomeMonitorSteps = ({ menuItems = [], onStepClick, stepsWithAlerts,
12
12
  'homeMonitorButton-4',
13
13
  'homeMonitorButton-5',
14
14
  'homeMonitorButton-6',
15
- 'menuItems',
16
15
  ];
17
16
  const [selectedId, setSelectedId] = useState('');
18
17
  const isDisabled = menuItems.length === 0;
19
18
  useComponentStyles({ ids, selectedId, zIndex: '2' });
20
- const handleStepClick = (step) => {
21
- onStepClick(step);
22
- setSelectedId(`homeMonitorButton-${step}`);
23
- };
24
- return (_jsx(Flex, { gap: "base", children: homeAssistantSteps.map((step, index) => (_jsx(Box, { position: "relative", children: _jsxs(Box, { flex: "auto", 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('menuItems') }) })] }) }, step === null || step === void 0 ? void 0 : step.title))) }));
19
+ const handleStepClick = (step) => onStepClick(step);
20
+ return (_jsx(Flex, { gap: "base", children: homeAssistantSteps.map((step, index) => (_jsx(Box, { position: "relative", children: _jsxs(Box, { flex: "auto", 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))) }));
25
21
  };
26
22
  const getStatus = (index, stepsWithAlerts) => {
27
23
  const hasAlert = stepsWithAlerts.includes(index);
@@ -3,5 +3,5 @@ import { t } from 'i18next';
3
3
  import { Box, Flex, Text } from '@chakra-ui/react';
4
4
  import { HomieAnimation } from '../..';
5
5
  export const HomefileMonitoring = () => {
6
- return (_jsx(Box, { p: "base", borderRadius: "lg", bg: "#C5E9F4", h: "66px", zIndex: "2", flex: "1", children: _jsxs(Flex, { align: "center", children: [_jsx(Box, { boxSize: "47px", children: _jsx(HomieAnimation, {}) }), _jsx(Text, { children: t('homeAssistant.homeMonitoring') })] }) }));
6
+ return (_jsx(Box, { p: "base", borderRadius: "lg", bg: "#C5E9F4", h: "66px", zIndex: "2", flex: "1", children: _jsxs(Flex, { align: "center", children: [_jsx(Box, { boxSize: "47px", children: _jsx(HomieAnimation, { animation: "homie-v3" }) }), _jsx(Text, { children: t('homeAssistant.homeMonitoring') })] }) }));
7
7
  };
@@ -51,7 +51,12 @@ 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: menuMock, stepsWithAlerts: [], onStepClick: handleHomeAssistantClick })] }) }), _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 })] }));
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: [
55
+ {
56
+ label: 'Details',
57
+ handleClick: handleHomeAssistantClick,
58
+ },
59
+ ], stepsWithAlerts: [], onStepClick: () => null })] }) }), _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
60
  };
56
61
  export const AppBarComponent = ({ setActiveTour = (value) => { } }) => {
57
62
  const handleTour = () => {
@@ -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, } 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, PressureWasher, } from '../../assets/images';
2
2
  export const fieldIcons = {
3
3
  barcode: Barcode,
4
4
  billing: Billing,
@@ -35,6 +35,7 @@ export const fieldIcons = {
35
35
  heater: Heater,
36
36
  light: Light,
37
37
  plate: Plate,
38
+ 'pressure-washer': PressureWasher,
38
39
  pool: Pool2,
39
40
  roof: Roof2,
40
41
  umbrella: Closet,
@@ -27,7 +27,7 @@ export const testFolders = [
27
27
  {
28
28
  _id: faker.database.mongodbObjectId(),
29
29
  home: '6317993b4a8e6e909bcced0a',
30
- name: 'Test',
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',
@@ -1,7 +1,7 @@
1
1
  import { FolderFileI, MenuItemI, PartnerFooterI, TileCtaI } from '../..';
2
- type KindTypes = 'checkbox' | 'currency' | 'date' | 'email' | 'file' | 'grid' | 'group' | 'hidden' | 'number' | 'radio' | 'rating' | 'select' | 'string' | 'switch' | 'telephone' | 'text' | 'textarea' | 'default' | UIKindTypes;
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
- 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' | 'house' | 'target' | 'title' | 'company' | UIIconTypes;
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
5
  export type UIIconTypes = 'sh-pressure' | 'sh-window' | 'sh-roof' | 'sh-lights' | 'sh-gutter' | 'sh-home';
6
6
  export type ValueTypes = string | string[] | number | boolean;
7
7
  export type OptionsTypes = string[] | number[] | null;
@@ -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 {
@@ -1,4 +1,4 @@
1
- import { DynamicFormI, MenuItemI, PartnerFooterI } from '../../..';
1
+ import { DynamicFormI, MenuItemI, PartnerFooterI, ReportI } from '../../..';
2
2
  export interface TileBodyLogoI {
3
3
  menuItems?: MenuItemI[];
4
4
  name?: string;
@@ -13,8 +13,19 @@ export interface VerticalIconI {
13
13
  icon?: string;
14
14
  value: string;
15
15
  }
16
- export interface TileCtaI {
17
- callback?: (value: string) => void;
16
+ interface TileCtaCallbackI {
17
+ id: string;
18
+ value: string;
19
+ name?: string;
20
+ link?: string;
21
+ icon?: string;
22
+ description?: string;
23
+ canBeHidden?: boolean;
24
+ visible?: boolean;
25
+ }
26
+ export interface TileCtaI extends Pick<ReportI, 'id' | 'name' | 'link' | 'icon' | 'description' | 'canBeHidden' | 'visible'> {
27
+ callback?: (form: TileCtaCallbackI) => void;
18
28
  type: 'primary-cta' | 'secondary-cta';
19
29
  value: string;
20
30
  }
31
+ export {};
@@ -189,6 +189,72 @@ export const formFieldsMock = [
189
189
  visible: false,
190
190
  icon: 'book',
191
191
  },
192
+ {
193
+ id: faker.database.mongodbObjectId(),
194
+ name: 'Services',
195
+ description: faker.lorem.sentence(),
196
+ comments: faker.lorem.sentence(),
197
+ value: 'Select the services you are requesting support for?',
198
+ type: 'checkbox-group',
199
+ visible: true,
200
+ icon: 'pressure-washer',
201
+ children: [
202
+ {
203
+ id: faker.database.mongodbObjectId(),
204
+ name: 'Pressure Washing',
205
+ description: faker.lorem.sentence(),
206
+ comments: faker.lorem.sentence(),
207
+ value: true,
208
+ type: 'checkbox',
209
+ visible: true,
210
+ },
211
+ {
212
+ id: faker.database.mongodbObjectId(),
213
+ name: 'Window Cleaning',
214
+ description: faker.lorem.sentence(),
215
+ comments: faker.lorem.sentence(),
216
+ value: false,
217
+ type: 'checkbox',
218
+ visible: true,
219
+ },
220
+ {
221
+ id: faker.database.mongodbObjectId(),
222
+ name: 'Roof Cleaning',
223
+ description: faker.lorem.sentence(),
224
+ comments: faker.lorem.sentence(),
225
+ value: false,
226
+ type: 'checkbox',
227
+ visible: true,
228
+ },
229
+ {
230
+ id: faker.database.mongodbObjectId(),
231
+ name: 'Holiday Lights',
232
+ description: faker.lorem.sentence(),
233
+ comments: faker.lorem.sentence(),
234
+ value: true,
235
+ type: 'checkbox',
236
+ visible: true,
237
+ },
238
+ {
239
+ id: faker.database.mongodbObjectId(),
240
+ name: 'Gutter Cleaning',
241
+ description: faker.lorem.sentence(),
242
+ comments: faker.lorem.sentence(),
243
+ value: true,
244
+ type: 'checkbox',
245
+ visible: true,
246
+ },
247
+ {
248
+ id: faker.database.mongodbObjectId(),
249
+ name: 'Exterior Cleaning',
250
+ description: faker.lorem.sentence(),
251
+ comments: faker.lorem.sentence(),
252
+ value: true,
253
+ type: 'checkbox',
254
+ visible: false,
255
+ },
256
+ ],
257
+ },
192
258
  ];
193
259
  export const contactFieldsMock = [
194
260
  {
@@ -451,7 +517,7 @@ export const tileUIMock = [
451
517
  comments: '',
452
518
  value: 'Request Support',
453
519
  type: 'secondary-cta',
454
- link: 'open-drawer',
520
+ link: 'www.shine.com',
455
521
  },
456
522
  ],
457
523
  },
@@ -2,3 +2,4 @@ import { Meta } from '@storybook/react';
2
2
  declare const _default: Meta;
3
3
  export default _default;
4
4
  export declare const Homie: () => import("react/jsx-runtime").JSX.Element;
5
+ export declare const HomieLarge: () => import("react/jsx-runtime").JSX.Element;
@@ -9,3 +9,4 @@ export default {
9
9
  ],
10
10
  };
11
11
  export const Homie = () => _jsx(HomieAnimation, {});
12
+ export const HomieLarge = () => _jsx(HomieAnimation, { animation: "homie-v3" });