@homefile/components-v2 2.2.4 → 2.3.0
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/index.d.ts +2 -1
- package/dist/assets/images/index.js +2 -1
- package/dist/assets/images/index.ts +2 -0
- package/dist/assets/images/speaker.svg +17 -0
- package/dist/assets/locales/en/index.json +35 -7
- package/dist/components/appBar/ContactList.d.ts +2 -2
- package/dist/components/appBar/NotificationsReminder.d.ts +2 -0
- package/dist/components/appBar/NotificationsReminder.js +24 -0
- package/dist/components/appBar/PeopleConnected.d.ts +2 -2
- package/dist/components/appBar/Trash.d.ts +2 -2
- package/dist/components/appBar/index.d.ts +1 -0
- package/dist/components/appBar/index.js +1 -0
- package/dist/components/badge/NumberBadge.d.ts +1 -1
- package/dist/components/badge/NumberBadge.js +14 -2
- package/dist/components/forms/dynamicForm/DynamicForm.d.ts +1 -1
- package/dist/components/forms/dynamicForm/DynamicForm.js +2 -2
- package/dist/components/forms/dynamicForm/fields/FileField.d.ts +1 -1
- package/dist/components/forms/dynamicForm/fields/FileField.js +9 -5
- package/dist/components/forms/readOnly/ReadOnlyDynamicForm.d.ts +2 -2
- package/dist/components/forms/readOnly/ReadOnlyDynamicForm.js +5 -2
- package/dist/components/forms/readOnly/fields/homeItem/ReadOnlyAppliances.d.ts +2 -0
- package/dist/components/forms/readOnly/fields/homeItem/ReadOnlyAppliances.js +23 -0
- package/dist/components/forms/readOnly/fields/homeItem/ReadOnlyAppliances.tsx +74 -0
- package/dist/components/forms/readOnly/fields/homeItem/ReadOnlyHomeItemImages.d.ts +2 -0
- package/dist/components/forms/readOnly/fields/homeItem/ReadOnlyHomeItemImages.js +10 -0
- package/dist/components/forms/readOnly/fields/homeItem/ReadOnlyHomeItemImages.tsx +28 -0
- package/dist/components/forms/readOnly/fields/homeItem/ReadOnlyHomeItemRating.d.ts +2 -0
- package/dist/components/forms/readOnly/fields/homeItem/ReadOnlyHomeItemRating.js +14 -0
- package/dist/components/forms/readOnly/fields/homeItem/ReadOnlyHomeItemRating.tsx +22 -0
- package/dist/components/forms/readOnly/fields/homeItem/ReadOnlyHomeItemText.d.ts +2 -0
- package/dist/components/forms/readOnly/fields/homeItem/ReadOnlyHomeItemText.js +10 -0
- package/dist/components/forms/readOnly/fields/homeItem/ReadOnlyHomeItemText.tsx +22 -0
- package/dist/components/forms/readOnly/fields/homeItem/index.d.ts +4 -0
- package/dist/components/forms/readOnly/fields/homeItem/index.js +4 -0
- package/dist/components/forms/readOnly/fields/homeItem/index.ts +4 -0
- package/dist/components/forms/readOnly/fields/index.d.ts +1 -0
- package/dist/components/forms/readOnly/fields/index.js +1 -0
- package/dist/components/headers/TabsHeader.d.ts +1 -1
- package/dist/components/headers/TabsHeader.js +9 -6
- package/dist/components/homeAssistant/HomeAssistant.d.ts +1 -1
- package/dist/components/homeAssistant/HomeAssistant.js +3 -2
- package/dist/components/homeAssistant/HomeAssistantWrapper.d.ts +2 -1
- package/dist/components/homeAssistant/HomeAssistantWrapper.js +4 -4
- package/dist/components/homeAssistant/HomeMonitor.d.ts +3 -1
- package/dist/components/homeAssistant/HomeMonitor.js +2 -2
- package/dist/components/homeAssistant/monitorAlerts/Notifications.js +2 -2
- package/dist/components/homeBoard/HomeBoard.d.ts +2 -1
- package/dist/components/homeBoard/HomeBoard.js +8 -7
- package/dist/components/homeItems/ViewingHomeItemPanel.d.ts +2 -0
- package/dist/components/homeItems/ViewingHomeItemPanel.js +24 -0
- package/dist/components/homeItems/index.d.ts +1 -0
- package/dist/components/homeItems/index.js +1 -0
- package/dist/components/inboxTile/InboxCard.d.ts +2 -0
- package/dist/components/inboxTile/InboxCard.js +10 -0
- package/dist/components/inboxTile/InboxForwardBanner.d.ts +1 -0
- package/dist/components/inboxTile/InboxForwardBanner.js +7 -0
- package/dist/components/inboxTile/InboxTile.d.ts +2 -0
- package/dist/components/inboxTile/InboxTile.js +9 -0
- package/dist/components/{partner/adminTiles/inboxTile → inboxTile}/index.d.ts +1 -0
- package/dist/components/{partner/adminTiles/inboxTile → inboxTile}/index.js +1 -0
- package/dist/components/index.d.ts +3 -0
- package/dist/components/index.js +3 -0
- package/dist/components/notifications/NotificationCard.d.ts +2 -0
- package/dist/components/notifications/NotificationCard.js +64 -0
- package/dist/components/notifications/NotificationsPanel.d.ts +2 -0
- package/dist/components/notifications/NotificationsPanel.js +14 -0
- package/dist/components/notifications/index.d.ts +2 -0
- package/dist/components/notifications/index.js +2 -0
- package/dist/components/partner/adminTiles/index.d.ts +0 -1
- package/dist/components/partner/adminTiles/index.js +0 -1
- package/dist/components/tour/Bubble.js +1 -1
- package/dist/components/tour/HomeBoardTour.js +16 -16
- package/dist/components/valueMonitor/ValueCard.js +1 -1
- package/dist/hooks/display/useMediaPreview.js +4 -7
- package/dist/hooks/folderPanel/useFilesUploader.d.ts +3 -1
- package/dist/hooks/folderPanel/useFilesUploader.js +12 -2
- package/dist/hooks/homeBoard/useHomeBoard.d.ts +1 -0
- package/dist/hooks/homeBoard/useHomeBoard.js +5 -0
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/index.js +1 -0
- package/dist/hooks/notifications/index.d.ts +1 -0
- package/dist/hooks/notifications/index.js +1 -0
- package/dist/hooks/notifications/useNotificationsPanel.d.ts +7 -0
- package/dist/hooks/notifications/useNotificationsPanel.js +32 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/interfaces/appBar/AppBar.interface.d.ts +6 -2
- package/dist/interfaces/appBar/index.d.ts +0 -1
- package/dist/interfaces/appBar/index.js +0 -1
- package/dist/interfaces/badge/NumberBadge.interface.d.ts +2 -3
- package/dist/interfaces/forms/dynamicForm/DynamicForm.interface.d.ts +7 -1
- package/dist/interfaces/forms/dynamicForm/fields/FileField.interface.d.ts +2 -0
- package/dist/interfaces/forms/readOnly/homeItem/ReadOnlyAppliances.interface.d.ts +4 -0
- package/dist/interfaces/forms/readOnly/homeItem/index.d.ts +1 -0
- package/dist/interfaces/forms/readOnly/homeItem/index.js +1 -0
- package/dist/interfaces/forms/readOnly/index.d.ts +1 -0
- package/dist/interfaces/forms/readOnly/index.js +1 -0
- package/dist/interfaces/headers/TabsHeader.interface.d.ts +1 -0
- package/dist/interfaces/homeAssistant/HomeAssistantSteps.interface.d.ts +1 -0
- package/dist/interfaces/homeItems/ViewingHomeItemPanel.interface.d.ts +6 -0
- package/dist/interfaces/homeItems/index.d.ts +1 -0
- package/dist/interfaces/homeItems/index.js +1 -0
- package/dist/interfaces/inboxTile/InboxCard.interface.d.ts +10 -0
- package/dist/interfaces/inboxTile/InboxTile.interface.d.ts +8 -0
- package/dist/interfaces/inboxTile/InboxTile.interface.js +1 -0
- package/dist/interfaces/index.d.ts +3 -0
- package/dist/interfaces/index.js +3 -0
- package/dist/interfaces/notifications/NotificationsPanel.interface.d.ts +16 -0
- package/dist/interfaces/notifications/NotificationsPanel.interface.js +1 -0
- package/dist/interfaces/notifications/index.d.ts +1 -0
- package/dist/interfaces/notifications/index.js +1 -0
- package/dist/interfaces/partner/adminTiles/index.d.ts +0 -1
- package/dist/interfaces/partner/adminTiles/index.js +0 -1
- package/dist/interfaces/tour/Step.interface.d.ts +2 -0
- package/dist/interfaces/valueMonitor/ValueCard.interface.d.ts +1 -1
- package/dist/mocks/forms/dynamicForm.mock.d.ts +1 -0
- package/dist/mocks/forms/dynamicForm.mock.js +72 -12
- package/dist/mocks/index.d.ts +1 -0
- package/dist/mocks/index.js +1 -0
- package/dist/mocks/notifications/index.d.ts +1 -0
- package/dist/mocks/notifications/index.js +1 -0
- package/dist/mocks/notifications/notifications.mock.d.ts +2 -0
- package/dist/mocks/notifications/notifications.mock.js +35 -0
- package/dist/stories/appBar/ContactList.stories.d.ts +3 -3
- package/dist/stories/appBar/PeopleConnected.stories.d.ts +3 -3
- package/dist/stories/appBar/Trash.stories.d.ts +3 -3
- package/dist/stories/assets/Illustrations.stories.js +2 -2
- package/dist/stories/forms/dynamicForm/DynamicForm.stories.js +13 -0
- package/dist/stories/homeItems/ViewingHomeItem.stories.d.ts +5 -0
- package/dist/stories/homeItems/ViewingHomeItem.stories.js +16 -0
- package/dist/stories/{partner/adminTiles/InboxTile.stories.d.ts → inboxTile/inboxTile.stories.d.ts} +1 -1
- package/dist/stories/inboxTile/inboxTile.stories.js +29 -0
- package/dist/stories/notifications/NotificationsPanel.stories.d.ts +5 -0
- package/dist/stories/notifications/NotificationsPanel.stories.js +17 -0
- package/dist/stories/valueMonitor/ValueMonitor.stories.d.ts +0 -1
- package/dist/stories/valueMonitor/ValueMonitor.stories.js +1 -1
- package/dist/theme/colors.d.ts +1 -0
- package/dist/theme/colors.js +1 -0
- package/package.json +1 -1
- package/src/assets/images/index.ts +2 -0
- package/src/assets/images/speaker.svg +17 -0
- package/src/assets/locales/en/index.json +35 -7
- package/src/components/appBar/ContactList.tsx +2 -2
- package/src/components/appBar/NotificationsReminder.tsx +49 -0
- package/src/components/appBar/PeopleConnected.tsx +2 -2
- package/src/components/appBar/Trash.tsx +2 -2
- package/src/components/appBar/index.ts +2 -1
- package/src/components/badge/NumberBadge.tsx +2 -0
- package/src/components/customToast/CustomToast.tsx +1 -1
- package/src/components/forms/dynamicForm/DynamicForm.tsx +4 -0
- package/src/components/forms/dynamicForm/fields/FileField.tsx +52 -6
- package/src/components/forms/readOnly/ReadOnlyDynamicForm.tsx +7 -3
- package/src/components/forms/readOnly/fields/homeItem/ReadOnlyAppliances.tsx +74 -0
- package/src/components/forms/readOnly/fields/homeItem/ReadOnlyHomeItemImages.tsx +28 -0
- package/src/components/forms/readOnly/fields/homeItem/ReadOnlyHomeItemRating.tsx +22 -0
- package/src/components/forms/readOnly/fields/homeItem/ReadOnlyHomeItemText.tsx +22 -0
- package/src/components/forms/readOnly/fields/homeItem/index.ts +4 -0
- package/src/components/forms/readOnly/fields/index.ts +1 -0
- package/src/components/headers/TabsHeader.tsx +36 -23
- package/src/components/homeAssistant/HomeAssistant.tsx +12 -7
- package/src/components/homeAssistant/HomeAssistantWrapper.tsx +5 -3
- package/src/components/homeAssistant/HomeMonitor.tsx +2 -2
- package/src/components/homeAssistant/monitorAlerts/Notifications.tsx +3 -3
- package/src/components/homeBoard/HomeBoard.tsx +30 -3
- package/src/components/homeItems/ViewingHomeItemPanel.tsx +44 -0
- package/src/components/homeItems/index.ts +1 -0
- package/src/components/inboxTile/InboxCard.tsx +38 -0
- package/src/components/inboxTile/InboxForwardBanner.tsx +26 -0
- package/src/components/inboxTile/InboxTile.tsx +36 -0
- package/src/components/{partner/adminTiles/inboxTile → inboxTile}/index.ts +1 -0
- package/src/components/index.ts +3 -0
- package/src/components/notifications/NotificationCard.tsx +162 -0
- package/src/components/notifications/NotificationsPanel.tsx +52 -0
- package/src/components/notifications/index.ts +2 -0
- package/src/components/partner/adminTiles/index.ts +0 -1
- package/src/components/tour/Bubble.tsx +2 -0
- package/src/components/tour/HomeBoardTour.tsx +4 -7
- package/src/components/valueMonitor/ValueCard.tsx +17 -13
- package/src/hooks/display/useMediaPreview.ts +3 -5
- package/src/hooks/folderPanel/useFilesUploader.ts +16 -3
- package/src/hooks/homeBoard/useHomeBoard.ts +6 -0
- package/src/hooks/index.ts +1 -0
- package/src/hooks/notifications/index.ts +1 -0
- package/src/hooks/notifications/useNotificationsPanel.ts +46 -0
- package/src/index.ts +4 -0
- package/src/interfaces/appBar/AppBar.interface.ts +7 -2
- package/src/interfaces/appBar/index.ts +1 -2
- package/src/interfaces/badge/NumberBadge.interface.ts +3 -3
- package/src/interfaces/forms/dynamicForm/DynamicForm.interface.ts +9 -0
- package/src/interfaces/forms/dynamicForm/fields/FileField.interface.ts +2 -0
- package/src/interfaces/forms/readOnly/homeItem/ReadOnlyAppliances.interface.ts +5 -0
- package/src/interfaces/forms/readOnly/homeItem/index.ts +1 -0
- package/src/interfaces/forms/readOnly/index.ts +1 -0
- package/src/interfaces/headers/TabsHeader.interface.ts +4 -3
- package/src/interfaces/homeAssistant/HomeAssistantSteps.interface.ts +1 -0
- package/src/interfaces/homeItems/ViewingHomeItemPanel.interface.ts +7 -0
- package/src/interfaces/homeItems/index.ts +1 -0
- package/src/interfaces/inboxTile/InboxCard.interface.ts +11 -0
- package/src/interfaces/inboxTile/InboxTile.interface.ts +9 -0
- package/src/interfaces/index.ts +3 -0
- package/src/interfaces/notifications/NotificationsPanel.interface.ts +24 -0
- package/src/interfaces/notifications/index.ts +1 -0
- package/src/interfaces/partner/adminTiles/index.ts +0 -1
- package/src/interfaces/tour/Step.interface.ts +2 -0
- package/src/interfaces/valueMonitor/ValueCard.interface.ts +1 -1
- package/src/mocks/forms/dynamicForm.mock.ts +74 -12
- package/src/mocks/index.ts +1 -0
- package/src/mocks/notifications/index.ts +1 -0
- package/src/mocks/notifications/notifications.mock.ts +37 -0
- package/src/stories/appBar/AppBar.stories.tsx +0 -1
- package/src/stories/appBar/ContactList.stories.tsx +4 -5
- package/src/stories/appBar/PeopleConnected.stories.tsx +4 -5
- package/src/stories/appBar/Trash.stories.tsx +4 -6
- package/src/stories/assets/Illustrations.stories.tsx +2 -0
- package/src/stories/forms/dynamicForm/DynamicForm.stories.tsx +13 -0
- package/src/stories/homeItems/ViewingHomeItem.stories.tsx +25 -0
- package/src/stories/inboxTile/inboxTile.stories.tsx +36 -0
- package/src/stories/notifications/NotificationsPanel.stories.tsx +26 -0
- package/src/stories/valueMonitor/ValueMonitor.stories.tsx +1 -1
- package/src/theme/colors.ts +1 -0
- package/dist/components/partner/adminTiles/inboxTile/InboxCard.d.ts +0 -2
- package/dist/components/partner/adminTiles/inboxTile/InboxCard.js +0 -8
- package/dist/components/partner/adminTiles/inboxTile/InboxTile.d.ts +0 -2
- package/dist/components/partner/adminTiles/inboxTile/InboxTile.js +0 -8
- package/dist/interfaces/appBar/PeopleConnected.interface.d.ts +0 -4
- package/dist/interfaces/partner/adminTiles/inboxTile/InboxCard.interface.d.ts +0 -6
- package/dist/interfaces/partner/adminTiles/inboxTile/InboxTile.interface.d.ts +0 -5
- package/dist/stories/partner/adminTiles/InboxTile.stories.js +0 -35
- package/src/components/partner/adminTiles/inboxTile/InboxCard.tsx +0 -35
- package/src/components/partner/adminTiles/inboxTile/InboxTile.tsx +0 -21
- package/src/interfaces/appBar/PeopleConnected.interface.ts +0 -4
- package/src/interfaces/partner/adminTiles/inboxTile/InboxCard.interface.ts +0 -6
- package/src/interfaces/partner/adminTiles/inboxTile/InboxTile.interface.ts +0 -6
- package/src/stories/partner/adminTiles/InboxTile.stories.tsx +0 -42
- /package/dist/interfaces/{appBar/PeopleConnected.interface.js → forms/readOnly/homeItem/ReadOnlyAppliances.interface.js} +0 -0
- /package/dist/interfaces/{partner/adminTiles/inboxTile/InboxCard.interface.js → homeItems/ViewingHomeItemPanel.interface.js} +0 -0
- /package/dist/interfaces/{partner/adminTiles/inboxTile/InboxTile.interface.js → inboxTile/InboxCard.interface.js} +0 -0
- /package/dist/interfaces/{partner/adminTiles/inboxTile → inboxTile}/index.d.ts +0 -0
- /package/dist/interfaces/{partner/adminTiles/inboxTile → inboxTile}/index.js +0 -0
- /package/src/interfaces/{partner/adminTiles/inboxTile → inboxTile}/index.ts +0 -0
|
@@ -127,6 +127,7 @@ import SixtyEight from './sixty-eight.svg';
|
|
|
127
127
|
import SMS from './sms.svg';
|
|
128
128
|
import Social from './social.svg';
|
|
129
129
|
import SolarPanel from './solar-panel.svg';
|
|
130
|
+
import Speaker from './speaker.svg';
|
|
130
131
|
import Sprinkler from './sprinkler.svg';
|
|
131
132
|
import Structure from './structure.svg';
|
|
132
133
|
import Subscription from './subscription.svg';
|
|
@@ -154,7 +155,7 @@ import WizardDetailed from './wizard-detailed.svg';
|
|
|
154
155
|
import WizardQuick from './wizard-quick.svg';
|
|
155
156
|
import YellowFolder from './yellow-folder.svg';
|
|
156
157
|
import YellowFolderUnshared from './yellow-folder-unshared.svg';
|
|
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, };
|
|
158
|
+
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, Speaker, 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, };
|
|
158
159
|
export * from './alerts';
|
|
159
160
|
export * from './appliances';
|
|
160
161
|
export * from './clouds-animation';
|
|
@@ -127,6 +127,7 @@ import SixtyEight from './sixty-eight.svg';
|
|
|
127
127
|
import SMS from './sms.svg';
|
|
128
128
|
import Social from './social.svg';
|
|
129
129
|
import SolarPanel from './solar-panel.svg';
|
|
130
|
+
import Speaker from './speaker.svg';
|
|
130
131
|
import Sprinkler from './sprinkler.svg';
|
|
131
132
|
import Structure from './structure.svg';
|
|
132
133
|
import Subscription from './subscription.svg';
|
|
@@ -154,7 +155,7 @@ import WizardDetailed from './wizard-detailed.svg';
|
|
|
154
155
|
import WizardQuick from './wizard-quick.svg';
|
|
155
156
|
import YellowFolder from './yellow-folder.svg';
|
|
156
157
|
import YellowFolderUnshared from './yellow-folder-unshared.svg';
|
|
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, };
|
|
158
|
+
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, Speaker, 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, };
|
|
158
159
|
export * from './alerts';
|
|
159
160
|
export * from './appliances';
|
|
160
161
|
export * from './clouds-animation';
|
|
@@ -127,6 +127,7 @@ import SixtyEight from './sixty-eight.svg'
|
|
|
127
127
|
import SMS from './sms.svg'
|
|
128
128
|
import Social from './social.svg'
|
|
129
129
|
import SolarPanel from './solar-panel.svg'
|
|
130
|
+
import Speaker from './speaker.svg'
|
|
130
131
|
import Sprinkler from './sprinkler.svg'
|
|
131
132
|
import Structure from './structure.svg'
|
|
132
133
|
import Subscription from './subscription.svg'
|
|
@@ -285,6 +286,7 @@ export {
|
|
|
285
286
|
SMS,
|
|
286
287
|
Social,
|
|
287
288
|
SolarPanel,
|
|
289
|
+
Speaker,
|
|
288
290
|
Sprinkler,
|
|
289
291
|
Structure,
|
|
290
292
|
Subscription,
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="31.583" height="23.521" viewBox="0 0 31.583 23.521">
|
|
2
|
+
<g id="Group_23052" data-name="Group 23052" transform="translate(-2614.222 -2095.171)">
|
|
3
|
+
<g id="Group_23003" data-name="Group 23003" transform="translate(1755.841 2072.773)">
|
|
4
|
+
<rect id="Rectangle_2034" data-name="Rectangle 2034" width="4.205" height="0.863" transform="translate(885.758 33.849)" fill="#00c0b7"/>
|
|
5
|
+
<rect id="Rectangle_2035" data-name="Rectangle 2035" width="4.205" height="0.863" transform="matrix(0.707, -0.707, 0.707, 0.707, 884.549, 29.857)" fill="#00c0b7"/>
|
|
6
|
+
<rect id="Rectangle_2036" data-name="Rectangle 2036" width="0.863" height="4.205" transform="translate(884.549 38.708) rotate(-45)" fill="#00c0b7"/>
|
|
7
|
+
</g>
|
|
8
|
+
<g id="Group_23007" data-name="Group 23007" transform="translate(1755.8 2072.191)">
|
|
9
|
+
<path id="Path_18016" data-name="Path 18016" d="M24.851,50.454l-.768-.044.03-.451c.016-.236.031-.462.05-.674.268-3.138,1.771-6.043,3.83-7.4l.423.642c-1.87,1.231-3.238,3.91-3.487,6.823-.019.209-.034.429-.049.659Z" transform="translate(851.091 -10.419)" fill="#fff"/>
|
|
10
|
+
<path id="Path_4022" data-name="Path 4022" d="M5810.5-622.634a1.425,1.425,0,0,1-.474-.084l-5.457-1.9a2.08,2.08,0,0,1-1.318-1.856v-2h1.012v2a1.069,1.069,0,0,0,.641.9l5.458,1.9a.278.278,0,0,0,.234,0,.281.281,0,0,0,.074-.221v-2h1.012v2a1.252,1.252,0,0,1-.5,1.046A1.163,1.163,0,0,1,5810.5-622.634Z" transform="translate(-4939.069 668.243)" fill="#40566b"/>
|
|
11
|
+
<rect id="Rectangle_2033" data-name="Rectangle 2033" width="3.55" height="6.261" transform="translate(858.421 31.433)" fill="#40566b"/>
|
|
12
|
+
<path id="Path_4023" data-name="Path 4023" d="M5868.355-682.568v20.354a1.5,1.5,0,0,1-1.4,1.583,1.322,1.322,0,0,1-.99-.463,1.706,1.706,0,0,1-.409-1.12v-20.354a1.5,1.5,0,0,1,1.4-1.583,1.324,1.324,0,0,1,.991.463A1.684,1.684,0,0,1,5868.355-682.568Z" transform="translate(-4985.622 707.13)" fill="#40566b"/>
|
|
13
|
+
<path id="Path_4024" data-name="Path 4024" d="M5812.487-658.645v.276l-7.832-3.131-7.419-2.964-2.71-1.084v-7.179l17.961-6.843v20.926Z" transform="translate(-4932.554 703.709)" fill="#abe188"/>
|
|
14
|
+
<path id="Intersection_1" data-name="Intersection 1" d="M10.129,6.4,2.711,3.811,0,2.866V0H17.961V9.128Z" transform="translate(861.972 36.212)" fill="#8dc966" stroke="rgba(0,0,0,0)" stroke-miterlimit="10" stroke-width="1"/>
|
|
15
|
+
</g>
|
|
16
|
+
</g>
|
|
17
|
+
</svg>
|
|
@@ -181,7 +181,8 @@
|
|
|
181
181
|
"message2": "browse"
|
|
182
182
|
},
|
|
183
183
|
"dynamicForm": {
|
|
184
|
-
"item": "Name this item"
|
|
184
|
+
"item": "Name this item",
|
|
185
|
+
"myRating": "My Rating"
|
|
185
186
|
},
|
|
186
187
|
"feedback": {
|
|
187
188
|
"alt": "Feedback sent",
|
|
@@ -321,6 +322,7 @@
|
|
|
321
322
|
"required2": "*Required",
|
|
322
323
|
"return": "Back",
|
|
323
324
|
"search": "Find",
|
|
325
|
+
"sortBy": "Sort by",
|
|
324
326
|
"street": "Street",
|
|
325
327
|
"number": "Number",
|
|
326
328
|
"submit": "Submit",
|
|
@@ -435,6 +437,9 @@
|
|
|
435
437
|
},
|
|
436
438
|
"viewDetails": "View All"
|
|
437
439
|
},
|
|
440
|
+
"homeItems": {
|
|
441
|
+
"title": "Viewing Home Item"
|
|
442
|
+
},
|
|
438
443
|
"homeHeader": {
|
|
439
444
|
"backBtn": "Return to Launchpad"
|
|
440
445
|
},
|
|
@@ -449,10 +454,19 @@
|
|
|
449
454
|
"unopened": "Unopened"
|
|
450
455
|
}
|
|
451
456
|
},
|
|
457
|
+
"householdItems": {
|
|
458
|
+
"headers": {
|
|
459
|
+
"itemName": "An item name",
|
|
460
|
+
"placeholder": "Name this item"
|
|
461
|
+
}
|
|
462
|
+
},
|
|
452
463
|
"images": {
|
|
453
464
|
"altIcon": "icon",
|
|
454
465
|
"altImage": "image"
|
|
455
466
|
},
|
|
467
|
+
"inbox": {
|
|
468
|
+
"forwardTo": "To use Receipt Autofiler, simply forward reciepts to "
|
|
469
|
+
},
|
|
456
470
|
"launchpad": {
|
|
457
471
|
"menu": {
|
|
458
472
|
"profile": "My Account",
|
|
@@ -607,6 +621,24 @@
|
|
|
607
621
|
"create": "Create Password",
|
|
608
622
|
"title": "Please enter your new password."
|
|
609
623
|
},
|
|
624
|
+
"notifications": {
|
|
625
|
+
"status": {
|
|
626
|
+
"added": "Added",
|
|
627
|
+
"removed": "Removed",
|
|
628
|
+
"shared": "Shared",
|
|
629
|
+
"updated": "Updated"
|
|
630
|
+
},
|
|
631
|
+
"types": {
|
|
632
|
+
"contact": "Contact",
|
|
633
|
+
"file": "File",
|
|
634
|
+
"folder": "Folder",
|
|
635
|
+
"receipt": "Receipt",
|
|
636
|
+
"user": "User",
|
|
637
|
+
"tile": "Tile",
|
|
638
|
+
"payment": "Payment"
|
|
639
|
+
},
|
|
640
|
+
"title": "Notifications"
|
|
641
|
+
},
|
|
610
642
|
"partner": {
|
|
611
643
|
"aphw": {
|
|
612
644
|
"description": "APHW’s home warranty plans and cost cover your major home appliances and systems.",
|
|
@@ -859,12 +891,6 @@
|
|
|
859
891
|
},
|
|
860
892
|
"placeholder": "Insert document name"
|
|
861
893
|
},
|
|
862
|
-
"householdItems": {
|
|
863
|
-
"headers": {
|
|
864
|
-
"itemName": "An item name",
|
|
865
|
-
"placeholder": "Name this item"
|
|
866
|
-
}
|
|
867
|
-
},
|
|
868
894
|
"shareHome": {
|
|
869
895
|
"accountTypes": "Member,Contributor,Manager",
|
|
870
896
|
"btInvite": "Invite",
|
|
@@ -957,7 +983,9 @@
|
|
|
957
983
|
"homeAssistant": "Home AI Assistant",
|
|
958
984
|
"homeCard": "Home card",
|
|
959
985
|
"homeItem": "Home item",
|
|
986
|
+
"inbox": "Inbox",
|
|
960
987
|
"more": "More options",
|
|
988
|
+
"notifications": "Notifications",
|
|
961
989
|
"myHomes": "My homes",
|
|
962
990
|
"partner": "Partner",
|
|
963
991
|
"propertyTaxes": "Property taxes",
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const ContactList: ({ onClick, total }:
|
|
1
|
+
import { AppBarIconI } from '../../interfaces';
|
|
2
|
+
export declare const ContactList: ({ onClick, total }: AppBarIconI) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { t } from 'i18next';
|
|
3
|
+
import { Box, Flex, Img, Tooltip } from '@chakra-ui/react';
|
|
4
|
+
import { keyframes } from '@emotion/react';
|
|
5
|
+
import { Speaker } from '../../assets/images';
|
|
6
|
+
import { NumberBadge } from '..';
|
|
7
|
+
import { useWindowDimensions } from '../../hooks';
|
|
8
|
+
import { MOBILE_WIDTH } from '../../utils';
|
|
9
|
+
export const NotificationsReminder = ({ onClick, total }) => {
|
|
10
|
+
const { windowDimensions: { width }, } = useWindowDimensions();
|
|
11
|
+
const isMobile = width < MOBILE_WIDTH;
|
|
12
|
+
return (_jsx(Tooltip, { label: t('tooltips.notifications'), children: _jsx(Box, { id: "notificationsRemember", children: _jsxs(Flex, { gap: "1", as: "button", onClick: onClick, children: [_jsx(Img, { src: Speaker, "aria-label": t('tooltips.notifications'), h: "26px", w: "auto" }), !isMobile && (_jsx(NumberBadge, { total: total, background: "linear-gradient(120deg, #0b8dd7, #730bd7, #0bd7ac)", backgroundSize: 100, animation: `${bgGradient} 6s linear infinite` }))] }) }) }));
|
|
13
|
+
};
|
|
14
|
+
const bgGradient = keyframes `
|
|
15
|
+
0% {
|
|
16
|
+
background-position: 0% 50%;
|
|
17
|
+
}
|
|
18
|
+
50% {
|
|
19
|
+
background-position: 100% 50%;
|
|
20
|
+
}
|
|
21
|
+
100% {
|
|
22
|
+
background-position: 0% 50%;
|
|
23
|
+
}
|
|
24
|
+
`;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const PeopleConnected: ({ onClick, total }:
|
|
1
|
+
import { AppBarIconI } from '../../interfaces';
|
|
2
|
+
export declare const PeopleConnected: ({ onClick, total }: AppBarIconI) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const Trash: ({ onClick, total }:
|
|
1
|
+
import { AppBarIconI } from '../../interfaces';
|
|
2
|
+
export declare const Trash: ({ onClick, total }: AppBarIconI) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { NumberBadgeI } from '../../interfaces';
|
|
2
|
-
export declare const NumberBadge: ({ color, bg, px, py, total, }: NumberBadgeI) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare const NumberBadge: ({ color, bg, px, py, total, ...props }: NumberBadgeI) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,6 +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 { Center, Text } from '@chakra-ui/react';
|
|
3
|
-
export const NumberBadge = (
|
|
14
|
+
export const NumberBadge = (_a) => {
|
|
15
|
+
var { color = 'neutral.white', bg, px = '1', py = '1', total } = _a, props = __rest(_a, ["color", "bg", "px", "py", "total"]);
|
|
4
16
|
const bgColor = bg !== null && bg !== void 0 ? bg : 'blue.4';
|
|
5
|
-
return (_jsx(Center, { bg: bgColor, px: px, py: py, borderRadius: "4px", h: "fit-content", minW: "1.3rem", children: _jsx(Text, { fontWeight: "semibold", color: color, fontSize: "xs", lineHeight: "1", children: total }) }));
|
|
17
|
+
return (_jsx(Center, Object.assign({ bg: bgColor, px: px, py: py, borderRadius: "4px", h: "fit-content", minW: "1.3rem" }, props, { children: _jsx(Text, { fontWeight: "semibold", color: color, fontSize: "xs", lineHeight: "1", children: total }) })));
|
|
6
18
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { DynamicFormI } from '../../../interfaces';
|
|
2
|
-
export declare const DynamicForm: ({ callback, form: fields, menuItems, onUpload, showTitle, title, uploadingFieldId, ...props }: DynamicFormI) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare const DynamicForm: ({ callback, displayImages, form: fields, menuItems, onRemoveImage, onUpload, showTitle, title, uploadingFieldId, ...props }: DynamicFormI) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -18,7 +18,7 @@ import { HiddenFieldSection, GroupField, TextField, TextAreaField, SelectField,
|
|
|
18
18
|
import { useDynamicForm } from '../../../hooks';
|
|
19
19
|
import { fieldIcons } from '../../../helpers';
|
|
20
20
|
export const DynamicForm = (_a) => {
|
|
21
|
-
var { callback, form: fields, menuItems, onUpload, showTitle = true, title, uploadingFieldId } = _a, props = __rest(_a, ["callback", "form", "menuItems", "onUpload", "showTitle", "title", "uploadingFieldId"]);
|
|
21
|
+
var { callback, displayImages, form: fields, menuItems, onRemoveImage, onUpload, showTitle = true, title, uploadingFieldId } = _a, props = __rest(_a, ["callback", "displayImages", "form", "menuItems", "onRemoveImage", "onUpload", "showTitle", "title", "uploadingFieldId"]);
|
|
22
22
|
const { form, visibleFields, hiddenFields, handleAddAll, handleAdd, handleFilesUpload, handleRemove, } = useDynamicForm({ fields, onUpload });
|
|
23
23
|
return (_jsxs(Stack, { bg: "lightBlue.1", spacing: "0", h: "full", overflowX: "hidden", children: [showTitle && (_jsx(Box, { px: "base", pt: "4", pb: "2", borderBottom: "1px dashed", borderColor: "lightBlue.6", children: _jsx(Text, { fontFamily: "secondary", 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) => {
|
|
24
24
|
const { canBeHidden, children, description, icon, id, name, options, type, value, } = field;
|
|
@@ -59,7 +59,7 @@ export const DynamicForm = (_a) => {
|
|
|
59
59
|
case 'switch':
|
|
60
60
|
return (_jsx(FieldWithDelete, Object.assign({}, fieldWithDeleteBaseProps, { children: _jsx(SwitchField, Object.assign({}, baseProps, { description: description })) })));
|
|
61
61
|
case 'file':
|
|
62
|
-
return (_jsx(FieldWithDelete, Object.assign({}, fieldWithDeleteBaseProps, { children: _jsx(FileField, { icon: baseProps.icon, description: description, onUpload: (files) => handleFilesUpload({ id, files }), uploading: uploadingFieldId === id }) })));
|
|
62
|
+
return (_jsx(FieldWithDelete, Object.assign({}, fieldWithDeleteBaseProps, { children: _jsx(FileField, { icon: baseProps.icon, description: description, onRemove: onRemoveImage, onUpload: (files) => handleFilesUpload({ id, files }), uploading: uploadingFieldId === id, displayImages: displayImages }) })));
|
|
63
63
|
case 'group':
|
|
64
64
|
return (_jsx(GroupField, { id: id, fields: children, onRemove: handleRemove, canBeHidden: canBeHidden }, id));
|
|
65
65
|
case 'checkbox-group':
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { FileFieldI } from '../../../../interfaces';
|
|
2
|
-
export declare const FileField: ({ description, icon, onUpload, uploading, }: FileFieldI) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare const FileField: ({ description, icon, onRemove, onUpload, uploading, displayImages, }: FileFieldI) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Flex, Image, Stack, Text } from '@chakra-ui/react';
|
|
3
|
-
import { DragDropArea } from '../../..';
|
|
2
|
+
import { AspectRatio, Box, Flex, Grid, IconButton, Image, Stack, Text, } from '@chakra-ui/react';
|
|
3
|
+
import { Close, DragDropArea } from '../../..';
|
|
4
4
|
import { useFilesUploader } from '../../../../hooks';
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
import { colors } from '../../../../theme/colors';
|
|
6
|
+
export const FileField = ({ description, icon, onRemove, onUpload, uploading = false, displayImages = [], }) => {
|
|
7
|
+
const { errorMessage, getInputProps, getRootProps, thumbnails } = useFilesUploader({
|
|
7
8
|
onUpload,
|
|
8
9
|
uploading,
|
|
10
|
+
displayImages,
|
|
9
11
|
});
|
|
10
|
-
|
|
12
|
+
const isStringArray = Array.isArray(thumbnails) && typeof thumbnails[0] === 'string';
|
|
13
|
+
return (_jsxs(Flex, { gap: "base", align: "center", flex: "auto", children: [icon && _jsx(Image, { h: "auto", w: "icon.md", src: icon, marginTop: "2" }), _jsxs(Stack, { spacing: "base", flex: "auto", children: [description && _jsx(Text, { fontFamily: "secondary", children: description }), _jsx(DragDropArea, { errorMessage: errorMessage, getInputProps: getInputProps, getRootProps: getRootProps, height: "85px" }), _jsx(Grid, { gridTemplateColumns: `repeat(auto-fill, minmax(22px, 1fr))`, gap: "base", children: isStringArray &&
|
|
14
|
+
thumbnails.map((file, index) => (_jsxs(Box, { position: "relative", children: [_jsx(IconButton, { variant: "ghost", "aria-label": "close", maxW: "fit-content", onClick: () => onRemove === null || onRemove === void 0 ? void 0 : onRemove(file), icon: _jsx(Close, { size: 11, stroke: colors.error['2'] }), disabled: uploading, position: "absolute", bg: "neutral.white", p: "0.5", borderRadius: "full", top: "-2", right: "-2", zIndex: "1" }), _jsx(AspectRatio, { maxW: "100%", ratio: 1, children: _jsx(Image, { src: file, objectFit: "cover", alt: `file-${index}` }) })] }, file))) })] })] }));
|
|
11
15
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const ReadOnlyDynamicForm: ({ form: fields, }:
|
|
1
|
+
import { ReadOnlyDynamicFormI } from '../../../interfaces';
|
|
2
|
+
export declare const ReadOnlyDynamicForm: ({ form: fields, onEdit, }: ReadOnlyDynamicFormI) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import { createElement as _createElement } from "react";
|
|
1
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
3
|
import { Box } from '@chakra-ui/react';
|
|
3
|
-
import { ReadOnlyDate, ReadOnlyGrid, ReadOnlyGroup, ReadOnlyInput, ReadOnlyRating, ReadOnlyTextArea, } from '../..';
|
|
4
|
+
import { ReadOnlyAppliances, ReadOnlyDate, ReadOnlyGrid, ReadOnlyGroup, ReadOnlyInput, ReadOnlyRating, ReadOnlyTextArea, } from '../..';
|
|
4
5
|
import { fieldIcons } from '../../../helpers';
|
|
5
|
-
export const ReadOnlyDynamicForm = ({ form: fields, }) => {
|
|
6
|
+
export const ReadOnlyDynamicForm = ({ form: fields, onEdit = () => { }, }) => {
|
|
6
7
|
return (_jsx(Box, { bg: "lightBlue.1", children: fields === null || fields === void 0 ? void 0 : fields.map((field) => {
|
|
7
8
|
const { children = [], icon, id, name, type, value } = field;
|
|
8
9
|
const baseProps = {
|
|
@@ -31,6 +32,8 @@ export const ReadOnlyDynamicForm = ({ form: fields, }) => {
|
|
|
31
32
|
return _jsx(ReadOnlyGrid, { children: children }, id);
|
|
32
33
|
case 'group':
|
|
33
34
|
return _jsx(ReadOnlyGroup, { children: children }, id);
|
|
35
|
+
case 'appliances':
|
|
36
|
+
return _createElement(ReadOnlyAppliances, Object.assign({}, field, { key: id, onEdit: onEdit }));
|
|
34
37
|
default:
|
|
35
38
|
return null;
|
|
36
39
|
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Text, Flex, Stack, IconButton, Box } from '@chakra-ui/react';
|
|
3
|
+
import { ReadOnlyHomeItemRating, Edit, ReadOnlyHomeItemImages, ReadOnlyHomeItemText, } from '../../../..';
|
|
4
|
+
import { colors } from '../../../../../theme/colors';
|
|
5
|
+
export const ReadOnlyAppliances = ({ description, id, name, children, onEdit, value, }) => {
|
|
6
|
+
const rating = children === null || children === void 0 ? void 0 : children.find(({ type }) => type === 'rating');
|
|
7
|
+
const images = children === null || children === void 0 ? void 0 : children.find(({ type }) => type === 'images');
|
|
8
|
+
return (_jsxs(Stack, { spacing: "base", p: "base", children: [_jsxs(Flex, { justify: "space-between", children: [_jsx(Text, { fontSize: "xs", textTransform: "uppercase", children: name }), _jsx(IconButton, { "aria-label": "Edit appliance", variant: "ghost", w: "fit-content", icon: _jsx(Edit, { size: 18, stroke: colors.blue[3] }), onClick: () => onEdit(id) })] }), _jsxs(Flex, { gap: "base", children: [_jsx(ReadOnlyHomeItemImages, Object.assign({}, images)), _jsxs(Stack, { spacing: "4", flex: "1", children: [_jsx(ReadOnlyHomeItemRating, Object.assign({}, rating)), _jsxs(Stack, { spacing: "base", children: [_jsx(Text, { fontSize: "22px", fontWeight: "semibold", children: value }), _jsx(Text, { fontFamily: "secondary", fontSize: "sm", children: description })] }), _jsx(Box, { flex: "1", borderBottom: "1px dashed", borderColor: "lightBlue.6", h: "1px" }), _jsx(Box, { children: children === null || children === void 0 ? void 0 : children.map(({ id, name, value, type }) => {
|
|
9
|
+
const baseProps = {
|
|
10
|
+
key: `${id}-${name}-${value}-${type}`,
|
|
11
|
+
id,
|
|
12
|
+
value,
|
|
13
|
+
type,
|
|
14
|
+
name,
|
|
15
|
+
};
|
|
16
|
+
switch (type) {
|
|
17
|
+
case 'text':
|
|
18
|
+
return _jsx(ReadOnlyHomeItemText, Object.assign({}, baseProps));
|
|
19
|
+
default:
|
|
20
|
+
return null;
|
|
21
|
+
}
|
|
22
|
+
}) })] })] })] }));
|
|
23
|
+
};
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { Text, Flex, Stack, IconButton, Box } from '@chakra-ui/react'
|
|
2
|
+
import {
|
|
3
|
+
ReadOnlyHomeItemRating,
|
|
4
|
+
Edit,
|
|
5
|
+
ReadOnlyHomeItemImages,
|
|
6
|
+
ReadOnlyHomeItemText,
|
|
7
|
+
} from '@/components'
|
|
8
|
+
import { ReadOnlyAppliancesI } from '@/interfaces'
|
|
9
|
+
import { colors } from '@/theme/colors'
|
|
10
|
+
|
|
11
|
+
export const ReadOnlyAppliances = ({
|
|
12
|
+
description,
|
|
13
|
+
id,
|
|
14
|
+
name,
|
|
15
|
+
children,
|
|
16
|
+
onEdit,
|
|
17
|
+
value,
|
|
18
|
+
}: ReadOnlyAppliancesI) => {
|
|
19
|
+
const rating = children?.find(({ type }) => type === 'rating')
|
|
20
|
+
const images = children?.find(({ type }) => type === 'images')
|
|
21
|
+
return (
|
|
22
|
+
<Stack spacing="base" p="base">
|
|
23
|
+
<Flex justify="space-between">
|
|
24
|
+
<Text fontSize="xs" textTransform="uppercase">
|
|
25
|
+
{name}
|
|
26
|
+
</Text>
|
|
27
|
+
<IconButton
|
|
28
|
+
aria-label="Edit appliance"
|
|
29
|
+
variant="ghost"
|
|
30
|
+
w="fit-content"
|
|
31
|
+
icon={<Edit size={18} stroke={colors.blue[3]} />}
|
|
32
|
+
onClick={() => onEdit(id)}
|
|
33
|
+
/>
|
|
34
|
+
</Flex>
|
|
35
|
+
<Flex gap="base">
|
|
36
|
+
<ReadOnlyHomeItemImages {...images} />
|
|
37
|
+
<Stack spacing="4" flex="1">
|
|
38
|
+
<ReadOnlyHomeItemRating {...rating} />
|
|
39
|
+
<Stack spacing="base">
|
|
40
|
+
<Text fontSize="22px" fontWeight="semibold">
|
|
41
|
+
{value}
|
|
42
|
+
</Text>
|
|
43
|
+
<Text fontFamily="secondary" fontSize="sm">
|
|
44
|
+
{description}
|
|
45
|
+
</Text>
|
|
46
|
+
</Stack>
|
|
47
|
+
<Box
|
|
48
|
+
flex="1"
|
|
49
|
+
borderBottom="1px dashed"
|
|
50
|
+
borderColor="lightBlue.6"
|
|
51
|
+
h="1px"
|
|
52
|
+
/>
|
|
53
|
+
<Box>
|
|
54
|
+
{children?.map(({ id, name, value, type }) => {
|
|
55
|
+
const baseProps = {
|
|
56
|
+
key: `${id}-${name}-${value}-${type}`,
|
|
57
|
+
id,
|
|
58
|
+
value,
|
|
59
|
+
type,
|
|
60
|
+
name,
|
|
61
|
+
}
|
|
62
|
+
switch (type) {
|
|
63
|
+
case 'text':
|
|
64
|
+
return <ReadOnlyHomeItemText {...baseProps} />
|
|
65
|
+
default:
|
|
66
|
+
return null
|
|
67
|
+
}
|
|
68
|
+
})}
|
|
69
|
+
</Box>
|
|
70
|
+
</Stack>
|
|
71
|
+
</Flex>
|
|
72
|
+
</Stack>
|
|
73
|
+
)
|
|
74
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Box, Image, SimpleGrid, Stack } from '@chakra-ui/react';
|
|
3
|
+
import { useState } from 'react';
|
|
4
|
+
export const ReadOnlyHomeItemImages = (props) => {
|
|
5
|
+
const images = props.value;
|
|
6
|
+
const [mainImage, setMainImage] = useState(images === null || images === void 0 ? void 0 : images[0]);
|
|
7
|
+
if (!images)
|
|
8
|
+
return null;
|
|
9
|
+
return (_jsxs(Stack, { spacing: "base", children: [_jsx(Image, { src: mainImage, alt: "home item", boxSize: "174px" }), _jsx(SimpleGrid, { columns: 4, spacing: "base", children: images === null || images === void 0 ? void 0 : images.map((image) => (_jsx(Box, { as: "button", backgroundImage: image, backgroundSize: "cover", backgroundPosition: "center", boxSize: "34px", onClick: () => setMainImage(image) }))) })] }));
|
|
10
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { ReportI } from '@/interfaces'
|
|
2
|
+
import { Box, Image, SimpleGrid, Stack } from '@chakra-ui/react'
|
|
3
|
+
import { useState } from 'react'
|
|
4
|
+
|
|
5
|
+
export const ReadOnlyHomeItemImages = (props: Partial<ReportI>) => {
|
|
6
|
+
const images = props.value as string[]
|
|
7
|
+
const [mainImage, setMainImage] = useState(images?.[0])
|
|
8
|
+
|
|
9
|
+
if (!images) return null
|
|
10
|
+
|
|
11
|
+
return (
|
|
12
|
+
<Stack spacing="base">
|
|
13
|
+
<Image src={mainImage} alt="home item" boxSize="174px" />
|
|
14
|
+
<SimpleGrid columns={4} spacing="base">
|
|
15
|
+
{images?.map((image) => (
|
|
16
|
+
<Box
|
|
17
|
+
as="button"
|
|
18
|
+
backgroundImage={image}
|
|
19
|
+
backgroundSize="cover"
|
|
20
|
+
backgroundPosition="center"
|
|
21
|
+
boxSize="34px"
|
|
22
|
+
onClick={() => setMainImage(image)}
|
|
23
|
+
/>
|
|
24
|
+
))}
|
|
25
|
+
</SimpleGrid>
|
|
26
|
+
</Stack>
|
|
27
|
+
)
|
|
28
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { t } from 'i18next';
|
|
3
|
+
import { Box, Flex, Text } from '@chakra-ui/react';
|
|
4
|
+
import { Star } from '../../../..';
|
|
5
|
+
import { colors } from '../../../../../theme/colors';
|
|
6
|
+
export const ReadOnlyHomeItemRating = ({ id, value }) => {
|
|
7
|
+
if (!value)
|
|
8
|
+
return null;
|
|
9
|
+
const count = Number(value) - 1;
|
|
10
|
+
return (_jsxs(Box, { children: [_jsx(Text, { fontSize: "10px", children: t('dynamicForm.myRating') }), _jsx(Flex, { gap: "1", children: Array.from({ length: 5 }).map((_, index) => {
|
|
11
|
+
const starColor = count >= index ? colors.yellow['1'] : colors.gray['1'];
|
|
12
|
+
return _jsx(Star, { size: 13, stroke: starColor }, `${id}-${index}`);
|
|
13
|
+
}) })] }));
|
|
14
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { t } from 'i18next'
|
|
2
|
+
import { Box, Flex, Text } from '@chakra-ui/react'
|
|
3
|
+
import { Star } from '@/components'
|
|
4
|
+
import { ReportI } from '@/interfaces'
|
|
5
|
+
import { colors } from '@/theme/colors'
|
|
6
|
+
|
|
7
|
+
export const ReadOnlyHomeItemRating = ({ id, value }: Partial<ReportI>) => {
|
|
8
|
+
if (!value) return null
|
|
9
|
+
const count = Number(value) - 1
|
|
10
|
+
return (
|
|
11
|
+
<Box>
|
|
12
|
+
<Text fontSize="10px">{t('dynamicForm.myRating')}</Text>
|
|
13
|
+
<Flex gap="1">
|
|
14
|
+
{Array.from({ length: 5 }).map((_, index) => {
|
|
15
|
+
const starColor: string =
|
|
16
|
+
count >= index ? colors.yellow['1'] : colors.gray['1']
|
|
17
|
+
return <Star size={13} key={`${id}-${index}`} stroke={starColor} />
|
|
18
|
+
})}
|
|
19
|
+
</Flex>
|
|
20
|
+
</Box>
|
|
21
|
+
)
|
|
22
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Box, Flex, Text } from '@chakra-ui/react';
|
|
3
|
+
export const ReadOnlyHomeItemText = ({ name, value }) => {
|
|
4
|
+
if (!name)
|
|
5
|
+
return null;
|
|
6
|
+
return (_jsxs(Flex, { gap: "base", children: [_jsx(Box, { w: "20%", children: _jsx(CustomText, { children: `${name}:` }) }), _jsx(CustomText, { children: String(value) })] }));
|
|
7
|
+
};
|
|
8
|
+
const CustomText = ({ children = '' }) => {
|
|
9
|
+
return (_jsx(Text, { fontSize: "sm", fontFamily: "secondary", children: children }));
|
|
10
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Box, Flex, Text } from '@chakra-ui/react'
|
|
2
|
+
import { ReportI } from '@/interfaces'
|
|
3
|
+
|
|
4
|
+
export const ReadOnlyHomeItemText = ({ name, value }: Partial<ReportI>) => {
|
|
5
|
+
if (!name) return null
|
|
6
|
+
return (
|
|
7
|
+
<Flex gap="base">
|
|
8
|
+
<Box w="20%">
|
|
9
|
+
<CustomText>{`${name}:`}</CustomText>
|
|
10
|
+
</Box>
|
|
11
|
+
<CustomText>{String(value)}</CustomText>
|
|
12
|
+
</Flex>
|
|
13
|
+
)
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
const CustomText = ({ children = '' }) => {
|
|
17
|
+
return (
|
|
18
|
+
<Text fontSize="sm" fontFamily="secondary">
|
|
19
|
+
{children}
|
|
20
|
+
</Text>
|
|
21
|
+
)
|
|
22
|
+
}
|