@homefile/components-v2 2.19.0 → 2.21.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/wallet.svg +18 -0
- package/dist/components/badge/CustomBadge.d.ts +3 -4
- package/dist/components/badge/CustomBadge.js +14 -2
- package/dist/components/homeAssistant/monitorAlerts/BackendAlert.d.ts +1 -1
- package/dist/components/homeAssistant/monitorAlerts/BackendAlert.js +2 -2
- package/dist/components/homeAssistant/monitorAlerts/alertDetails/AlertFields.js +8 -2
- package/dist/components/homeAssistant/monitorAlerts/alertDetails/HireInfo.d.ts +2 -0
- package/dist/components/homeAssistant/monitorAlerts/alertDetails/HireInfo.js +5 -0
- package/dist/components/homeAssistant/monitorAlerts/alertDetails/HireService.d.ts +2 -0
- package/dist/components/homeAssistant/monitorAlerts/alertDetails/HireService.js +26 -0
- package/dist/components/homeAssistant/monitorAlerts/alertDetails/PurchaseProduct.d.ts +2 -0
- package/dist/components/homeAssistant/monitorAlerts/alertDetails/PurchaseProduct.js +26 -0
- package/dist/components/homeAssistant/monitorAlerts/alertDetails/VideoDetail.js +1 -1
- package/dist/components/homeAssistant/monitorAlerts/alertDetails/index.d.ts +3 -0
- package/dist/components/homeAssistant/monitorAlerts/alertDetails/index.js +3 -0
- package/dist/helpers/forms/dynamicForm.helper.js +2 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/interfaces/forms/dynamicForm/DynamicForm.interface.d.ts +2 -2
- package/dist/interfaces/homeAssistant/BackendAlert.interface.d.ts +1 -1
- package/dist/mocks/forms/dynamicForm.mock.js +173 -0
- package/dist/stories/assets/Illustrations.stories.js +2 -2
- package/dist/stories/homeAssistant/monitorAlerts/BackendAlert.stories.js +2 -0
- package/package.json +1 -1
- package/src/assets/images/index.ts +2 -0
- package/src/assets/images/wallet.svg +18 -0
- package/src/components/badge/CustomBadge.tsx +4 -2
- package/src/components/homeAssistant/monitorAlerts/BackendAlert.tsx +4 -2
- package/src/components/homeAssistant/monitorAlerts/alertDetails/AlertFields.tsx +16 -3
- package/src/components/homeAssistant/monitorAlerts/alertDetails/HireInfo.tsx +11 -0
- package/src/components/homeAssistant/monitorAlerts/alertDetails/HireService.tsx +92 -0
- package/src/components/homeAssistant/monitorAlerts/alertDetails/PurchaseProduct.tsx +75 -0
- package/src/components/homeAssistant/monitorAlerts/alertDetails/VideoDetail.tsx +1 -1
- package/src/components/homeAssistant/monitorAlerts/alertDetails/index.ts +3 -0
- package/src/helpers/forms/dynamicForm.helper.ts +2 -0
- package/src/index.ts +1 -0
- package/src/interfaces/forms/dynamicForm/DynamicForm.interface.ts +2 -0
- package/src/interfaces/homeAssistant/BackendAlert.interface.ts +7 -1
- package/src/mocks/forms/dynamicForm.mock.ts +174 -0
- package/src/stories/assets/Illustrations.stories.tsx +2 -0
- package/src/stories/homeAssistant/monitorAlerts/BackendAlert.stories.tsx +2 -0
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Center, Grid, Image, Text } from '@chakra-ui/react';
|
|
3
|
-
import { AlertDelete, AlertDeletePurple, Arrow, Balustrades, Barcode, Batery, Bathroom, Battery, Battery2, Bedding, Bedroom, Billing, BillingAddress, BlueFolder, BlueFolderShared, Book, Box as BoxIcon, Building, Calc, Calendar, Calendar2, Catalog, Check, CheckInCircle, CheckPen, Chemistry, CircleFace, Cleaning, Closet, Co2, Company, ComputerReport, Confirmation, Construction, Contacts, Contacts2, Contributor, Cookware, Countertops, CreditCard, Detector, Diamond, DiningRoom, DocIcon, Document, Document2, Doors, Drop, DropCalendar, Electricity, Electronics, Entryway, EstValue, Equipment, Exclamation, Exterior, Face, Feedback, FileUploading, Finance, Fire, Flag, Flooring, FormSent, Foundation, Furniture, Garage, GearPencil, GearTime, GenericField, GlassWater, GoldenBars, GreenFolder, Group, Groups, GuestBedroom, Hallway, HandPencil, Hardware, Heart, Heater, Help, HomeAddress, Homeowner, House, HouseHands, IA, ImageDefault, ImgIcon, Inbox, Insect, Kitchen, LargeAppliances, Laundry, Light, Lighting, LivingRoom, LogoSmall, MagnifyingGlassReport, Manager, MasterBedroom, Mattress, Member, Message, MobileDrop, Money, Mudroom, NeedHelp, Notes, Office, Paint, Painting, PartnerGeneric, Patio, PdfIcon, PersonMail, Plants, Plate, Play, Plus, Pool, Pool2, PressureWasher, Porch, Price, Profile, ProgressReport, Proposal, Rating, RealEstate, Receipt, ReceiptBg, ReceiptHouse, Receipts, Recipient, Records, Register, Registry, RelationshipHome, ResendPassword, Rocket, Roof, Roof2, Security, Send, ShareHome, ShareWith, SixtyEight, SMS, Social, SmallAppliances, SolarPanel, Speaker, Sprinkler, Steps, Structure, Structures, Subscription, Supplies, Table, Target, Temperature, Theatre, Thumbnail, ThumbnailSmall, ThumbUp, Tile, Tools, Tools2, Trash, Utensils, VideoIcon, VideoPlay, VioletFolder, WallDecor, Warning, Warranty, Water, WellDone, WholeHome, Wind, Window, Wizard, WizardDetailed, WizardQuick, YellowFolder, YellowFolderUnshared, BookOpened, Company2, } from '../../assets/images';
|
|
3
|
+
import { AlertDelete, AlertDeletePurple, Arrow, Balustrades, Barcode, Batery, Bathroom, Battery, Battery2, Bedding, Bedroom, Billing, BillingAddress, BlueFolder, BlueFolderShared, Book, Box as BoxIcon, Building, Calc, Calendar, Calendar2, Catalog, Check, CheckInCircle, CheckPen, Chemistry, CircleFace, Cleaning, Closet, Co2, Company, ComputerReport, Confirmation, Construction, Contacts, Contacts2, Contributor, Cookware, Countertops, CreditCard, Detector, Diamond, DiningRoom, DocIcon, Document, Document2, Doors, Drop, DropCalendar, Electricity, Electronics, Entryway, EstValue, Equipment, Exclamation, Exterior, Face, Feedback, FileUploading, Finance, Fire, Flag, Flooring, FormSent, Foundation, Furniture, Garage, GearPencil, GearTime, GenericField, GlassWater, GoldenBars, GreenFolder, Group, Groups, GuestBedroom, Hallway, HandPencil, Hardware, Heart, Heater, Help, HomeAddress, Homeowner, House, HouseHands, IA, ImageDefault, ImgIcon, Inbox, Insect, Kitchen, LargeAppliances, Laundry, Light, Lighting, LivingRoom, LogoSmall, MagnifyingGlassReport, Manager, MasterBedroom, Mattress, Member, Message, MobileDrop, Money, Mudroom, NeedHelp, Notes, Office, Paint, Painting, PartnerGeneric, Patio, PdfIcon, PersonMail, Plants, Plate, Play, Plus, Pool, Pool2, PressureWasher, Porch, Price, Profile, ProgressReport, Proposal, Rating, RealEstate, Receipt, ReceiptBg, ReceiptHouse, Receipts, Recipient, Records, Register, Registry, RelationshipHome, ResendPassword, Rocket, Roof, Roof2, Security, Send, ShareHome, ShareWith, SixtyEight, SMS, Social, SmallAppliances, SolarPanel, Speaker, Sprinkler, Steps, Structure, Structures, Subscription, Supplies, Table, Target, Temperature, Theatre, Thumbnail, ThumbnailSmall, ThumbUp, Tile, Tools, Tools2, Trash, Utensils, VideoIcon, VideoPlay, VioletFolder, WallDecor, Wallet, Warning, Warranty, Water, WellDone, WholeHome, Wind, Window, Wizard, WizardDetailed, WizardQuick, YellowFolder, YellowFolderUnshared, BookOpened, Company2, } from '../../assets/images';
|
|
4
4
|
import { CookTop, Dishwasher, Dryer, Freezer, Fridge, Microwave, Oven, Range, Washer, } from '../../assets/images/appliances';
|
|
5
5
|
export default {
|
|
6
6
|
title: 'Assets/Illustrations',
|
|
7
7
|
};
|
|
8
8
|
export const Illustrations = () => {
|
|
9
|
-
return (_jsxs(Grid, { maxW: "600px", templateColumns: "repeat(auto-fill, minmax(75px, 1fr))", p: "base", gap: "8", children: [_jsx(IconWrapper, { icon: CookTop, name: "CookTop" }), _jsx(IconWrapper, { icon: Dishwasher, name: "Dishwasher" }), _jsx(IconWrapper, { icon: Dryer, name: "Dryer" }), _jsx(IconWrapper, { icon: Freezer, name: "Freezer" }), _jsx(IconWrapper, { icon: Fridge, name: "Fridge" }), _jsx(IconWrapper, { icon: Microwave, name: "Microwave" }), _jsx(IconWrapper, { icon: Oven, name: "Oven" }), _jsx(IconWrapper, { icon: Range, name: "Range" }), _jsx(IconWrapper, { icon: Washer, name: "Washer" }), _jsx(IconWrapper, { icon: Barcode, name: "Barcode" }), _jsx(IconWrapper, { icon: Book, name: "Book" }), _jsx(IconWrapper, { icon: Calendar, name: "Calendar" }), _jsx(IconWrapper, { icon: GoldenBars, name: "GoldenBars" }), _jsx(IconWrapper, { icon: Heart, name: "Heart" }), _jsx(IconWrapper, { icon: Notes, name: "Notes" }), _jsx(IconWrapper, { icon: Rating, name: "Rating" }), _jsx(IconWrapper, { icon: Registry, name: "Registry" }), _jsx(IconWrapper, { icon: Tools2, name: "Tools2" }), _jsx(IconWrapper, { icon: Balustrades, name: "Balustrades" }), _jsx(IconWrapper, { icon: Bedding, name: "Bedding" }), _jsx(IconWrapper, { icon: Cookware, name: "Cookware" }), _jsx(IconWrapper, { icon: Countertops, name: "Countertops" }), _jsx(IconWrapper, { icon: Doors, name: "Doors" }), _jsx(IconWrapper, { icon: Electronics, name: "Electronics" }), _jsx(IconWrapper, { icon: Equipment, name: "Equipment" }), _jsx(IconWrapper, { icon: Exterior, name: "Exterior" }), _jsx(IconWrapper, { icon: Fire, name: "Fire" }), _jsx(IconWrapper, { icon: Flooring, name: "Flooring" }), _jsx(IconWrapper, { icon: Furniture, name: "Furniture" }), _jsx(IconWrapper, { icon: Hardware, name: "Hardware" }), _jsx(IconWrapper, { icon: LargeAppliances, name: "LargeAppliances" }), _jsx(IconWrapper, { icon: Lighting, name: "Lighting" }), _jsx(IconWrapper, { icon: Mattress, name: "Mattress" }), _jsx(IconWrapper, { icon: Paint, name: "Paint" }), _jsx(IconWrapper, { icon: Plants, name: "Plants" }), _jsx(IconWrapper, { icon: Porch, name: "Porch" }), _jsx(IconWrapper, { icon: Roof, name: "Roof" }), _jsx(IconWrapper, { icon: SmallAppliances, name: "SmallAppliances" }), _jsx(IconWrapper, { icon: Steps, name: "Steps" }), _jsx(IconWrapper, { icon: Structures, name: "Structures" }), _jsx(IconWrapper, { icon: Supplies, name: "Supplies" }), _jsx(IconWrapper, { icon: Table, name: "Table" }), _jsx(IconWrapper, { icon: Temperature, name: "Temperature" }), _jsx(IconWrapper, { icon: Tile, name: "Tile" }), _jsx(IconWrapper, { icon: Tools, name: "Tools" }), _jsx(IconWrapper, { icon: Utensils, name: "Utensils" }), _jsx(IconWrapper, { icon: WallDecor, name: "WallDecor" }), _jsx(IconWrapper, { icon: Water, name: "Water" }), _jsx(IconWrapper, { icon: Window, name: "Window" }), _jsx(IconWrapper, { icon: AlertDelete, name: "AlertDelete" }), _jsx(IconWrapper, { icon: AlertDeletePurple, name: "AlertDeletePurple" }), _jsx(IconWrapper, { icon: Arrow, name: "Arrow" }), _jsx(IconWrapper, { icon: Batery, name: "Batery" }), _jsx(IconWrapper, { icon: Bathroom, name: "Bathroom" }), _jsx(IconWrapper, { icon: Battery, name: "Battery" }), _jsx(IconWrapper, { icon: Battery2, name: "Battery2" }), _jsx(IconWrapper, { icon: Bedroom, name: "Bedroom" }), _jsx(IconWrapper, { icon: Billing, name: "Billing" }), _jsx(IconWrapper, { icon: BillingAddress, name: "BillingAddress" }), _jsx(IconWrapper, { icon: BlueFolder, name: "BlueFolder" }), _jsx(IconWrapper, { icon: BlueFolderShared, name: "BlueFolderShared" }), _jsx(IconWrapper, { icon: BookOpened, name: "BookOpened" }), _jsx(IconWrapper, { icon: BoxIcon, name: "Box" }), _jsx(IconWrapper, { icon: Building, name: "Building" }), _jsx(IconWrapper, { icon: Calc, name: "Calc" }), _jsx(IconWrapper, { icon: Calendar2, name: "Calendar2" }), _jsx(IconWrapper, { icon: Catalog, name: "Catalog" }), _jsx(IconWrapper, { icon: Check, name: "Check" }), _jsx(IconWrapper, { icon: CheckInCircle, name: "CheckInCircle" }), _jsx(IconWrapper, { icon: CheckPen, name: "CheckPen" }), _jsx(IconWrapper, { icon: Chemistry, name: "Chemistry" }), _jsx(IconWrapper, { icon: CircleFace, name: "CircleFace" }), _jsx(IconWrapper, { icon: Cleaning, name: "Cleaning" }), _jsx(IconWrapper, { icon: Closet, name: "Closet" }), _jsx(IconWrapper, { icon: Co2, name: "Co2" }), _jsx(IconWrapper, { icon: Company, name: "Company" }), _jsx(IconWrapper, { icon: Company2, name: "Company2" }), _jsx(IconWrapper, { icon: ComputerReport, name: "ComputerReport" }), _jsx(IconWrapper, { icon: Confirmation, name: "Confirmation" }), _jsx(IconWrapper, { icon: Construction, name: "Construction" }), _jsx(IconWrapper, { icon: Contacts, name: "Contacts" }), _jsx(IconWrapper, { icon: Contacts2, name: "Contacts2" }), _jsx(IconWrapper, { icon: Contributor, name: "Contributor" }), _jsx(IconWrapper, { icon: CreditCard, name: "CreditCard" }), _jsx(IconWrapper, { icon: Detector, name: "Detector" }), _jsx(IconWrapper, { icon: Diamond, name: "Diamond" }), _jsx(IconWrapper, { icon: DiningRoom, name: "DiningRoom" }), _jsx(IconWrapper, { icon: DocIcon, name: "DocIcon" }), _jsx(IconWrapper, { icon: Document, name: "Document" }), _jsx(IconWrapper, { icon: Document2, name: "Document2" }), _jsx(IconWrapper, { icon: Drop, name: "Drop" }), _jsx(IconWrapper, { icon: DropCalendar, name: "DropCalendar" }), _jsx(IconWrapper, { icon: Electricity, name: "Electricity" }), _jsx(IconWrapper, { icon: Entryway, name: "Entryway" }), _jsx(IconWrapper, { icon: EstValue, name: "EstValue" }), _jsx(IconWrapper, { icon: Exclamation, name: "Exclamation" }), _jsx(IconWrapper, { icon: Face, name: "Face" }), _jsx(IconWrapper, { icon: Feedback, name: "Feedback" }), _jsx(IconWrapper, { icon: FileUploading, name: "FileUploading" }), _jsx(IconWrapper, { icon: Finance, name: "Finance" }), _jsx(IconWrapper, { icon: Flag, name: "Flag" }), _jsx(IconWrapper, { icon: FormSent, name: "FormSent" }), _jsx(IconWrapper, { icon: Foundation, name: "Foundation" }), _jsx(IconWrapper, { icon: Garage, name: "Garage" }), _jsx(IconWrapper, { icon: GearPencil, name: "GearPencil" }), _jsx(IconWrapper, { icon: GearTime, name: "GearTime" }), _jsx(IconWrapper, { icon: GenericField, name: "GenericField" }), _jsx(IconWrapper, { icon: GlassWater, name: "GlassWater" }), _jsx(IconWrapper, { icon: GreenFolder, name: "GreenFolder" }), _jsx(IconWrapper, { icon: Group, name: "Group" }), _jsx(IconWrapper, { icon: Groups, name: "Groups" }), _jsx(IconWrapper, { icon: GuestBedroom, name: "GuestBedroom" }), _jsx(IconWrapper, { icon: Hallway, name: "Hallway" }), _jsx(IconWrapper, { icon: HandPencil, name: "HandPencil" }), _jsx(IconWrapper, { icon: Heater, name: "Heater" }), _jsx(IconWrapper, { icon: Help, name: "Help" }), _jsx(IconWrapper, { icon: HomeAddress, name: "HomeAddress" }), _jsx(IconWrapper, { icon: Homeowner, name: "Homeowner" }), _jsx(IconWrapper, { icon: House, name: "House" }), _jsx(IconWrapper, { icon: HouseHands, name: "HouseHands" }), _jsx(IconWrapper, { icon: IA, name: "IA" }), _jsx(IconWrapper, { icon: ImageDefault, name: "ImageDefault" }), _jsx(IconWrapper, { icon: ImgIcon, name: "ImgIcon" }), _jsx(IconWrapper, { icon: Inbox, name: "Inbox" }), _jsx(IconWrapper, { icon: Insect, name: "Insect" }), _jsx(IconWrapper, { icon: Kitchen, name: "Kitchen" }), _jsx(IconWrapper, { icon: Laundry, name: "Laundry" }), _jsx(IconWrapper, { icon: Light, name: "Light" }), _jsx(IconWrapper, { icon: LivingRoom, name: "LivingRoom" }), _jsx(IconWrapper, { icon: LogoSmall, name: "LogoSmall" }), _jsx(IconWrapper, { icon: MagnifyingGlassReport, name: "MagnifyingGlassReport" }), _jsx(IconWrapper, { icon: Manager, name: "Manager" }), _jsx(IconWrapper, { icon: MasterBedroom, name: "MasterBedroom" }), _jsx(IconWrapper, { icon: Member, name: "Member" }), _jsx(IconWrapper, { icon: Message, name: "Message" }), _jsx(IconWrapper, { icon: MobileDrop, name: "MobileDrop" }), _jsx(IconWrapper, { icon: Money, name: "Money" }), _jsx(IconWrapper, { icon: Mudroom, name: "Mudroom" }), _jsx(IconWrapper, { icon: NeedHelp, name: "NeedHelp" }), _jsx(IconWrapper, { icon: Office, name: "Office" }), _jsx(IconWrapper, { icon: Painting, name: "Painting" }), _jsx(IconWrapper, { icon: PartnerGeneric, name: "PartnerGeneric" }), _jsx(IconWrapper, { icon: Patio, name: "Patio" }), _jsx(IconWrapper, { icon: PdfIcon, name: "PdfIcon" }), _jsx(IconWrapper, { icon: PersonMail, name: "PersonMail" }), _jsx(IconWrapper, { icon: Plate, name: "Plate" }), _jsx(IconWrapper, { icon: Play, name: "Play" }), _jsx(IconWrapper, { icon: Plus, name: "Plus" }), _jsx(IconWrapper, { icon: Pool, name: "Pool" }), _jsx(IconWrapper, { icon: Pool2, name: "Pool2" }), _jsx(IconWrapper, { icon: PressureWasher, name: "PressureWasher" }), _jsx(IconWrapper, { icon: Price, name: "Price" }), _jsx(IconWrapper, { icon: Profile, name: "Profile" }), _jsx(IconWrapper, { icon: ProgressReport, name: "ProgressReport" }), _jsx(IconWrapper, { icon: Proposal, name: "Proposal" }), _jsx(IconWrapper, { icon: RealEstate, name: "RealEstate" }), _jsx(IconWrapper, { icon: Receipt, name: "Receipt" }), _jsx(IconWrapper, { icon: ReceiptBg, name: "ReceiptBg" }), _jsx(IconWrapper, { icon: ReceiptHouse, name: "ReceiptHouse" }), _jsx(IconWrapper, { icon: Receipts, name: "Receipts" }), _jsx(IconWrapper, { icon: Recipient, name: "Recipient" }), _jsx(IconWrapper, { icon: Records, name: "Records" }), _jsx(IconWrapper, { icon: Register, name: "Register" }), _jsx(IconWrapper, { icon: RelationshipHome, name: "RelationshipHome" }), _jsx(IconWrapper, { icon: ResendPassword, name: "ResendPassword" }), _jsx(IconWrapper, { icon: Rocket, name: "Rocket" }), _jsx(IconWrapper, { icon: Roof2, name: "Roof2" }), _jsx(IconWrapper, { icon: Security, name: "Security" }), _jsx(IconWrapper, { icon: Send, name: "Send" }), _jsx(IconWrapper, { icon: ShareHome, name: "ShareHome" }), _jsx(IconWrapper, { icon: ShareWith, name: "ShareWith" }), _jsx(IconWrapper, { icon: SixtyEight, name: "SixtyEight" }), _jsx(IconWrapper, { icon: SMS, name: "SMS" }), _jsx(IconWrapper, { icon: Social, name: "Social" }), _jsx(IconWrapper, { icon: SolarPanel, name: "SolarPanel" }), _jsx(IconWrapper, { icon: Speaker, name: "Speaker" }), _jsx(IconWrapper, { icon: Sprinkler, name: "Sprinkler" }), _jsx(IconWrapper, { icon: Structure, name: "Structure" }), _jsx(IconWrapper, { icon: Subscription, name: "Subscription" }), _jsx(IconWrapper, { icon: Target, name: "Target" }), _jsx(IconWrapper, { icon: Theatre, name: "Theatre" }), _jsx(IconWrapper, { icon: Thumbnail, name: "Thumbnail" }), _jsx(IconWrapper, { icon: ThumbnailSmall, name: "ThumbnailSmall" }), _jsx(IconWrapper, { icon: ThumbUp, name: "ThumbUp" }), _jsx(IconWrapper, { icon: Trash, name: "Trash" }), _jsx(IconWrapper, { icon: VideoIcon, name: "VideoIcon" }), _jsx(IconWrapper, { icon: VideoPlay, name: "VideoPlay" }), _jsx(IconWrapper, { icon: VioletFolder, name: "VioletFolder" }), _jsx(IconWrapper, { icon: Warning, name: "Warning" }), _jsx(IconWrapper, { icon: Warranty, name: "Warranty" }), _jsx(IconWrapper, { icon: WellDone, name: "WellDone" }), _jsx(IconWrapper, { icon: WholeHome, name: "WholeHome" }), _jsx(IconWrapper, { icon: Wind, name: "Wind" }), _jsx(IconWrapper, { icon: Wizard, name: "Wizard" }), _jsx(IconWrapper, { icon: WizardDetailed, name: "WizardDetailed" }), _jsx(IconWrapper, { icon: WizardQuick, name: "WizardQuick" }), _jsx(IconWrapper, { icon: YellowFolder, name: "YellowFolder" }), _jsx(IconWrapper, { icon: YellowFolderUnshared, name: "YellowFolderUnshared" })] }));
|
|
9
|
+
return (_jsxs(Grid, { maxW: "600px", templateColumns: "repeat(auto-fill, minmax(75px, 1fr))", p: "base", gap: "8", children: [_jsx(IconWrapper, { icon: CookTop, name: "CookTop" }), _jsx(IconWrapper, { icon: Dishwasher, name: "Dishwasher" }), _jsx(IconWrapper, { icon: Dryer, name: "Dryer" }), _jsx(IconWrapper, { icon: Freezer, name: "Freezer" }), _jsx(IconWrapper, { icon: Fridge, name: "Fridge" }), _jsx(IconWrapper, { icon: Microwave, name: "Microwave" }), _jsx(IconWrapper, { icon: Oven, name: "Oven" }), _jsx(IconWrapper, { icon: Range, name: "Range" }), _jsx(IconWrapper, { icon: Washer, name: "Washer" }), _jsx(IconWrapper, { icon: Barcode, name: "Barcode" }), _jsx(IconWrapper, { icon: Book, name: "Book" }), _jsx(IconWrapper, { icon: Calendar, name: "Calendar" }), _jsx(IconWrapper, { icon: GoldenBars, name: "GoldenBars" }), _jsx(IconWrapper, { icon: Heart, name: "Heart" }), _jsx(IconWrapper, { icon: Notes, name: "Notes" }), _jsx(IconWrapper, { icon: Rating, name: "Rating" }), _jsx(IconWrapper, { icon: Registry, name: "Registry" }), _jsx(IconWrapper, { icon: Tools2, name: "Tools2" }), _jsx(IconWrapper, { icon: Balustrades, name: "Balustrades" }), _jsx(IconWrapper, { icon: Bedding, name: "Bedding" }), _jsx(IconWrapper, { icon: Cookware, name: "Cookware" }), _jsx(IconWrapper, { icon: Countertops, name: "Countertops" }), _jsx(IconWrapper, { icon: Doors, name: "Doors" }), _jsx(IconWrapper, { icon: Electronics, name: "Electronics" }), _jsx(IconWrapper, { icon: Equipment, name: "Equipment" }), _jsx(IconWrapper, { icon: Exterior, name: "Exterior" }), _jsx(IconWrapper, { icon: Fire, name: "Fire" }), _jsx(IconWrapper, { icon: Flooring, name: "Flooring" }), _jsx(IconWrapper, { icon: Furniture, name: "Furniture" }), _jsx(IconWrapper, { icon: Hardware, name: "Hardware" }), _jsx(IconWrapper, { icon: LargeAppliances, name: "LargeAppliances" }), _jsx(IconWrapper, { icon: Lighting, name: "Lighting" }), _jsx(IconWrapper, { icon: Mattress, name: "Mattress" }), _jsx(IconWrapper, { icon: Paint, name: "Paint" }), _jsx(IconWrapper, { icon: Plants, name: "Plants" }), _jsx(IconWrapper, { icon: Porch, name: "Porch" }), _jsx(IconWrapper, { icon: Roof, name: "Roof" }), _jsx(IconWrapper, { icon: SmallAppliances, name: "SmallAppliances" }), _jsx(IconWrapper, { icon: Steps, name: "Steps" }), _jsx(IconWrapper, { icon: Structures, name: "Structures" }), _jsx(IconWrapper, { icon: Supplies, name: "Supplies" }), _jsx(IconWrapper, { icon: Table, name: "Table" }), _jsx(IconWrapper, { icon: Temperature, name: "Temperature" }), _jsx(IconWrapper, { icon: Tile, name: "Tile" }), _jsx(IconWrapper, { icon: Tools, name: "Tools" }), _jsx(IconWrapper, { icon: Utensils, name: "Utensils" }), _jsx(IconWrapper, { icon: WallDecor, name: "WallDecor" }), _jsx(IconWrapper, { icon: Water, name: "Water" }), _jsx(IconWrapper, { icon: Window, name: "Window" }), _jsx(IconWrapper, { icon: AlertDelete, name: "AlertDelete" }), _jsx(IconWrapper, { icon: AlertDeletePurple, name: "AlertDeletePurple" }), _jsx(IconWrapper, { icon: Arrow, name: "Arrow" }), _jsx(IconWrapper, { icon: Batery, name: "Batery" }), _jsx(IconWrapper, { icon: Bathroom, name: "Bathroom" }), _jsx(IconWrapper, { icon: Battery, name: "Battery" }), _jsx(IconWrapper, { icon: Battery2, name: "Battery2" }), _jsx(IconWrapper, { icon: Bedroom, name: "Bedroom" }), _jsx(IconWrapper, { icon: Billing, name: "Billing" }), _jsx(IconWrapper, { icon: BillingAddress, name: "BillingAddress" }), _jsx(IconWrapper, { icon: BlueFolder, name: "BlueFolder" }), _jsx(IconWrapper, { icon: BlueFolderShared, name: "BlueFolderShared" }), _jsx(IconWrapper, { icon: BookOpened, name: "BookOpened" }), _jsx(IconWrapper, { icon: BoxIcon, name: "Box" }), _jsx(IconWrapper, { icon: Building, name: "Building" }), _jsx(IconWrapper, { icon: Calc, name: "Calc" }), _jsx(IconWrapper, { icon: Calendar2, name: "Calendar2" }), _jsx(IconWrapper, { icon: Catalog, name: "Catalog" }), _jsx(IconWrapper, { icon: Check, name: "Check" }), _jsx(IconWrapper, { icon: CheckInCircle, name: "CheckInCircle" }), _jsx(IconWrapper, { icon: CheckPen, name: "CheckPen" }), _jsx(IconWrapper, { icon: Chemistry, name: "Chemistry" }), _jsx(IconWrapper, { icon: CircleFace, name: "CircleFace" }), _jsx(IconWrapper, { icon: Cleaning, name: "Cleaning" }), _jsx(IconWrapper, { icon: Closet, name: "Closet" }), _jsx(IconWrapper, { icon: Co2, name: "Co2" }), _jsx(IconWrapper, { icon: Company, name: "Company" }), _jsx(IconWrapper, { icon: Company2, name: "Company2" }), _jsx(IconWrapper, { icon: ComputerReport, name: "ComputerReport" }), _jsx(IconWrapper, { icon: Confirmation, name: "Confirmation" }), _jsx(IconWrapper, { icon: Construction, name: "Construction" }), _jsx(IconWrapper, { icon: Contacts, name: "Contacts" }), _jsx(IconWrapper, { icon: Contacts2, name: "Contacts2" }), _jsx(IconWrapper, { icon: Contributor, name: "Contributor" }), _jsx(IconWrapper, { icon: CreditCard, name: "CreditCard" }), _jsx(IconWrapper, { icon: Detector, name: "Detector" }), _jsx(IconWrapper, { icon: Diamond, name: "Diamond" }), _jsx(IconWrapper, { icon: DiningRoom, name: "DiningRoom" }), _jsx(IconWrapper, { icon: DocIcon, name: "DocIcon" }), _jsx(IconWrapper, { icon: Document, name: "Document" }), _jsx(IconWrapper, { icon: Document2, name: "Document2" }), _jsx(IconWrapper, { icon: Drop, name: "Drop" }), _jsx(IconWrapper, { icon: DropCalendar, name: "DropCalendar" }), _jsx(IconWrapper, { icon: Electricity, name: "Electricity" }), _jsx(IconWrapper, { icon: Entryway, name: "Entryway" }), _jsx(IconWrapper, { icon: EstValue, name: "EstValue" }), _jsx(IconWrapper, { icon: Exclamation, name: "Exclamation" }), _jsx(IconWrapper, { icon: Face, name: "Face" }), _jsx(IconWrapper, { icon: Feedback, name: "Feedback" }), _jsx(IconWrapper, { icon: FileUploading, name: "FileUploading" }), _jsx(IconWrapper, { icon: Finance, name: "Finance" }), _jsx(IconWrapper, { icon: Flag, name: "Flag" }), _jsx(IconWrapper, { icon: FormSent, name: "FormSent" }), _jsx(IconWrapper, { icon: Foundation, name: "Foundation" }), _jsx(IconWrapper, { icon: Garage, name: "Garage" }), _jsx(IconWrapper, { icon: GearPencil, name: "GearPencil" }), _jsx(IconWrapper, { icon: GearTime, name: "GearTime" }), _jsx(IconWrapper, { icon: GenericField, name: "GenericField" }), _jsx(IconWrapper, { icon: GlassWater, name: "GlassWater" }), _jsx(IconWrapper, { icon: GreenFolder, name: "GreenFolder" }), _jsx(IconWrapper, { icon: Group, name: "Group" }), _jsx(IconWrapper, { icon: Groups, name: "Groups" }), _jsx(IconWrapper, { icon: GuestBedroom, name: "GuestBedroom" }), _jsx(IconWrapper, { icon: Hallway, name: "Hallway" }), _jsx(IconWrapper, { icon: HandPencil, name: "HandPencil" }), _jsx(IconWrapper, { icon: Heater, name: "Heater" }), _jsx(IconWrapper, { icon: Help, name: "Help" }), _jsx(IconWrapper, { icon: HomeAddress, name: "HomeAddress" }), _jsx(IconWrapper, { icon: Homeowner, name: "Homeowner" }), _jsx(IconWrapper, { icon: House, name: "House" }), _jsx(IconWrapper, { icon: HouseHands, name: "HouseHands" }), _jsx(IconWrapper, { icon: IA, name: "IA" }), _jsx(IconWrapper, { icon: ImageDefault, name: "ImageDefault" }), _jsx(IconWrapper, { icon: ImgIcon, name: "ImgIcon" }), _jsx(IconWrapper, { icon: Inbox, name: "Inbox" }), _jsx(IconWrapper, { icon: Insect, name: "Insect" }), _jsx(IconWrapper, { icon: Kitchen, name: "Kitchen" }), _jsx(IconWrapper, { icon: Laundry, name: "Laundry" }), _jsx(IconWrapper, { icon: Light, name: "Light" }), _jsx(IconWrapper, { icon: LivingRoom, name: "LivingRoom" }), _jsx(IconWrapper, { icon: LogoSmall, name: "LogoSmall" }), _jsx(IconWrapper, { icon: MagnifyingGlassReport, name: "MagnifyingGlassReport" }), _jsx(IconWrapper, { icon: Manager, name: "Manager" }), _jsx(IconWrapper, { icon: MasterBedroom, name: "MasterBedroom" }), _jsx(IconWrapper, { icon: Member, name: "Member" }), _jsx(IconWrapper, { icon: Message, name: "Message" }), _jsx(IconWrapper, { icon: MobileDrop, name: "MobileDrop" }), _jsx(IconWrapper, { icon: Money, name: "Money" }), _jsx(IconWrapper, { icon: Mudroom, name: "Mudroom" }), _jsx(IconWrapper, { icon: NeedHelp, name: "NeedHelp" }), _jsx(IconWrapper, { icon: Office, name: "Office" }), _jsx(IconWrapper, { icon: Painting, name: "Painting" }), _jsx(IconWrapper, { icon: PartnerGeneric, name: "PartnerGeneric" }), _jsx(IconWrapper, { icon: Patio, name: "Patio" }), _jsx(IconWrapper, { icon: PdfIcon, name: "PdfIcon" }), _jsx(IconWrapper, { icon: PersonMail, name: "PersonMail" }), _jsx(IconWrapper, { icon: Plate, name: "Plate" }), _jsx(IconWrapper, { icon: Play, name: "Play" }), _jsx(IconWrapper, { icon: Plus, name: "Plus" }), _jsx(IconWrapper, { icon: Pool, name: "Pool" }), _jsx(IconWrapper, { icon: Pool2, name: "Pool2" }), _jsx(IconWrapper, { icon: PressureWasher, name: "PressureWasher" }), _jsx(IconWrapper, { icon: Price, name: "Price" }), _jsx(IconWrapper, { icon: Profile, name: "Profile" }), _jsx(IconWrapper, { icon: ProgressReport, name: "ProgressReport" }), _jsx(IconWrapper, { icon: Proposal, name: "Proposal" }), _jsx(IconWrapper, { icon: RealEstate, name: "RealEstate" }), _jsx(IconWrapper, { icon: Receipt, name: "Receipt" }), _jsx(IconWrapper, { icon: ReceiptBg, name: "ReceiptBg" }), _jsx(IconWrapper, { icon: ReceiptHouse, name: "ReceiptHouse" }), _jsx(IconWrapper, { icon: Receipts, name: "Receipts" }), _jsx(IconWrapper, { icon: Recipient, name: "Recipient" }), _jsx(IconWrapper, { icon: Records, name: "Records" }), _jsx(IconWrapper, { icon: Register, name: "Register" }), _jsx(IconWrapper, { icon: RelationshipHome, name: "RelationshipHome" }), _jsx(IconWrapper, { icon: ResendPassword, name: "ResendPassword" }), _jsx(IconWrapper, { icon: Rocket, name: "Rocket" }), _jsx(IconWrapper, { icon: Roof2, name: "Roof2" }), _jsx(IconWrapper, { icon: Security, name: "Security" }), _jsx(IconWrapper, { icon: Send, name: "Send" }), _jsx(IconWrapper, { icon: ShareHome, name: "ShareHome" }), _jsx(IconWrapper, { icon: ShareWith, name: "ShareWith" }), _jsx(IconWrapper, { icon: SixtyEight, name: "SixtyEight" }), _jsx(IconWrapper, { icon: SMS, name: "SMS" }), _jsx(IconWrapper, { icon: Social, name: "Social" }), _jsx(IconWrapper, { icon: SolarPanel, name: "SolarPanel" }), _jsx(IconWrapper, { icon: Speaker, name: "Speaker" }), _jsx(IconWrapper, { icon: Sprinkler, name: "Sprinkler" }), _jsx(IconWrapper, { icon: Structure, name: "Structure" }), _jsx(IconWrapper, { icon: Subscription, name: "Subscription" }), _jsx(IconWrapper, { icon: Target, name: "Target" }), _jsx(IconWrapper, { icon: Theatre, name: "Theatre" }), _jsx(IconWrapper, { icon: Thumbnail, name: "Thumbnail" }), _jsx(IconWrapper, { icon: ThumbnailSmall, name: "ThumbnailSmall" }), _jsx(IconWrapper, { icon: ThumbUp, name: "ThumbUp" }), _jsx(IconWrapper, { icon: Trash, name: "Trash" }), _jsx(IconWrapper, { icon: VideoIcon, name: "VideoIcon" }), _jsx(IconWrapper, { icon: VideoPlay, name: "VideoPlay" }), _jsx(IconWrapper, { icon: VioletFolder, name: "VioletFolder" }), _jsx(IconWrapper, { icon: Wallet, name: "Wallet" }), _jsx(IconWrapper, { icon: Warning, name: "Warning" }), _jsx(IconWrapper, { icon: Warranty, name: "Warranty" }), _jsx(IconWrapper, { icon: WellDone, name: "WellDone" }), _jsx(IconWrapper, { icon: WholeHome, name: "WholeHome" }), _jsx(IconWrapper, { icon: Wind, name: "Wind" }), _jsx(IconWrapper, { icon: Wizard, name: "Wizard" }), _jsx(IconWrapper, { icon: WizardDetailed, name: "WizardDetailed" }), _jsx(IconWrapper, { icon: WizardQuick, name: "WizardQuick" }), _jsx(IconWrapper, { icon: YellowFolder, name: "YellowFolder" }), _jsx(IconWrapper, { icon: YellowFolderUnshared, name: "YellowFolderUnshared" })] }));
|
|
10
10
|
};
|
|
11
11
|
const IconWrapper = ({ icon, name }) => {
|
|
12
12
|
return (_jsxs(Center, { flexDirection: "column", children: [_jsx(Image, { src: icon, boxSize: "30px", mb: "2" }), _jsx(Text, { variant: "home", children: name })] }));
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { action } from '@storybook/addon-actions';
|
|
2
3
|
import { BackendAlert } from '../../../components';
|
|
3
4
|
import { alertFieldsMock } from '../../../mocks';
|
|
4
5
|
export default {
|
|
@@ -7,6 +8,7 @@ export default {
|
|
|
7
8
|
args: {
|
|
8
9
|
category: 'budget',
|
|
9
10
|
form: alertFieldsMock,
|
|
11
|
+
callback: action('onClick'),
|
|
10
12
|
},
|
|
11
13
|
};
|
|
12
14
|
export const BackendAlertComponent = (args) => {
|
package/package.json
CHANGED
|
@@ -151,6 +151,7 @@ import TreesCrop2 from './trees-crop2.png'
|
|
|
151
151
|
import VideoIcon from './video-icon.svg'
|
|
152
152
|
import VideoPlay from './video-play.svg'
|
|
153
153
|
import VioletFolder from './violet-folder.svg'
|
|
154
|
+
import Wallet from './wallet.svg'
|
|
154
155
|
import Warning from './warning.svg'
|
|
155
156
|
import Warranty from './warranty.svg'
|
|
156
157
|
import WellDone from './well-done.png'
|
|
@@ -317,6 +318,7 @@ export {
|
|
|
317
318
|
VideoIcon,
|
|
318
319
|
VideoPlay,
|
|
319
320
|
VioletFolder,
|
|
321
|
+
Wallet,
|
|
320
322
|
Warning,
|
|
321
323
|
Warranty,
|
|
322
324
|
WellDone,
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<svg id="Grupo_22869" data-name="Grupo 22869" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="35.199" height="39.708" viewBox="0 0 35.199 39.708">
|
|
2
|
+
<defs>
|
|
3
|
+
<clipPath id="clip-path">
|
|
4
|
+
<rect id="Retângulo_26646" data-name="Retângulo 26646" width="35.199" height="39.708" transform="translate(0 0)" fill="none"/>
|
|
5
|
+
</clipPath>
|
|
6
|
+
</defs>
|
|
7
|
+
<g id="Grupo_22868" data-name="Grupo 22868" transform="translate(0 0)" clip-path="url(#clip-path)">
|
|
8
|
+
<path id="Caminho_18397" data-name="Caminho 18397" d="M0,39.93a2.882,2.882,0,0,0,2.882,2.878h.53V65.725h-.53A2.883,2.883,0,0,1,0,62.844Z" transform="translate(0 -26.017)" fill="#323954"/>
|
|
9
|
+
<path id="Caminho_18398" data-name="Caminho 18398" d="M76.372,66.9v8.474H67.431a4.237,4.237,0,1,1,0-8.474Zm-6.363,4.237a1.594,1.594,0,1,0-1.6,1.592,1.593,1.593,0,0,0,1.6-1.592" transform="translate(-41.172 -43.589)" fill="#e24c5d"/>
|
|
10
|
+
<path id="Caminho_18399" data-name="Caminho 18399" d="M75.2,74.49a1.592,1.592,0,1,1-1.592,1.592A1.593,1.593,0,0,1,75.2,74.49" transform="translate(-47.961 -48.535)" fill="#f6cf76"/>
|
|
11
|
+
<path id="Caminho_18400" data-name="Caminho 18400" d="M35.463,48.19h6.115v6.519H32.637a4.237,4.237,0,1,0,0,8.474h8.941v7.924H9.79V48.19H35.463Z" transform="translate(-6.379 -31.399)" fill="#40566b"/>
|
|
12
|
+
<path id="Caminho_18401" data-name="Caminho 18401" d="M2.881,31.65A2.883,2.883,0,0,0,0,34.532v0a2.882,2.882,0,0,0,2.882,2.878H7.8L9.39,34.532l1.585-2.882Z" transform="translate(0.001 -20.622)" fill="#e24c5d"/>
|
|
13
|
+
<path id="Caminho_18402" data-name="Caminho 18402" d="M86.644,31.65l-1.586,2.882L83.47,37.413h6.115V31.65Z" transform="translate(-54.386 -20.622)" fill="#e24c5d"/>
|
|
14
|
+
<path id="Caminho_18403" data-name="Caminho 18403" d="M33.024,3.388l-8.23,14.948h-2.4l1.589-2.882,1.585-2.882,5.617-10.2Z" transform="translate(-14.588 -1.544)" fill="#00c0b7"/>
|
|
15
|
+
<path id="Caminho_18404" data-name="Caminho 18404" d="M49.757,13.91l-1.589,2.882h-2.4l4.4-7.99-10.8-5.944L31.691,16.791h-2.4L37.52,1.843,38.534,0,53.022,7.976l-1.679,3.052Z" transform="translate(-19.084 0)" fill="#00a1aa"/>
|
|
16
|
+
<path id="Caminho_18405" data-name="Caminho 18405" d="M54.65,14.145l-4.4,7.99H36.179L43.852,8.2Z" transform="translate(-23.573 -5.343)" fill="#00c0b7"/>
|
|
17
|
+
</g>
|
|
18
|
+
</svg>
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { Center } from '@chakra-ui/react'
|
|
1
|
+
import { Center, CenterProps } from '@chakra-ui/react'
|
|
2
2
|
|
|
3
3
|
export const CustomBadge = ({
|
|
4
4
|
bg = 'neutral.white',
|
|
5
5
|
color = 'neutral.white',
|
|
6
6
|
label = '',
|
|
7
|
-
|
|
7
|
+
...props
|
|
8
|
+
}: CenterProps & { label?: string }) => {
|
|
8
9
|
return (
|
|
9
10
|
<Center
|
|
10
11
|
bg={bg}
|
|
@@ -15,6 +16,7 @@ export const CustomBadge = ({
|
|
|
15
16
|
px="2"
|
|
16
17
|
rounded="md"
|
|
17
18
|
textTransform="uppercase"
|
|
19
|
+
{...props}
|
|
18
20
|
>
|
|
19
21
|
{label}
|
|
20
22
|
</Center>
|
|
@@ -3,7 +3,7 @@ import { BackendAlertI, TabI } from '@/interfaces'
|
|
|
3
3
|
import { getCategoryStyles } from '@/utils/Alerts.utils'
|
|
4
4
|
import { Divider } from '@chakra-ui/react'
|
|
5
5
|
|
|
6
|
-
export const BackendAlert = ({ category, form }: BackendAlertI) => {
|
|
6
|
+
export const BackendAlert = ({ category, form, callback }: BackendAlertI) => {
|
|
7
7
|
const { headerBg, alertIcon, alertIconBg, alertTitle } =
|
|
8
8
|
getCategoryStyles(category)
|
|
9
9
|
const alert = form?.find((item) => item.type === 'alert')
|
|
@@ -13,7 +13,9 @@ export const BackendAlert = ({ category, form }: BackendAlertI) => {
|
|
|
13
13
|
(tab) =>
|
|
14
14
|
({
|
|
15
15
|
label: tab.name,
|
|
16
|
-
component:
|
|
16
|
+
component: (
|
|
17
|
+
<AlertFields fields={tab.children ?? []} callback={callback} />
|
|
18
|
+
),
|
|
17
19
|
} as TabI)
|
|
18
20
|
) ?? []
|
|
19
21
|
|
|
@@ -1,11 +1,18 @@
|
|
|
1
1
|
import { FieldTypesI, IconTypes } from '@/interfaces'
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { Stack, Text } from '@chakra-ui/react'
|
|
3
|
+
import {
|
|
4
|
+
FilterSize,
|
|
5
|
+
HireInfo,
|
|
6
|
+
HireService,
|
|
7
|
+
PurchaseProduct,
|
|
8
|
+
SearchField,
|
|
9
|
+
VideoDetail,
|
|
10
|
+
} from '@/components'
|
|
4
11
|
import { fieldIcons } from '@/helpers'
|
|
5
12
|
|
|
6
13
|
export const AlertFields = ({ fields, callback }: FieldTypesI) => {
|
|
7
14
|
return (
|
|
8
|
-
<Stack spacing="
|
|
15
|
+
<Stack spacing="1" p="base">
|
|
9
16
|
{fields?.map((field) => {
|
|
10
17
|
const { id, type, value, icon } = field
|
|
11
18
|
const mappedIcon = icon && (fieldIcons[icon] as IconTypes)
|
|
@@ -28,6 +35,12 @@ export const AlertFields = ({ fields, callback }: FieldTypesI) => {
|
|
|
28
35
|
return <FilterSize {...field} key={id} icon={mappedIcon} />
|
|
29
36
|
case 'search':
|
|
30
37
|
return <SearchField {...field} key={id} callback={callback} />
|
|
38
|
+
case 'purchase-product':
|
|
39
|
+
return <PurchaseProduct {...field} key={id} callback={callback} />
|
|
40
|
+
case 'hire-info':
|
|
41
|
+
return <HireInfo {...field} key={id} icon={mappedIcon} />
|
|
42
|
+
case 'hire-service':
|
|
43
|
+
return <HireService {...field} key={id} callback={callback} />
|
|
31
44
|
default:
|
|
32
45
|
return null
|
|
33
46
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ReportI } from '@/interfaces'
|
|
2
|
+
import { Flex, Image, Text } from '@chakra-ui/react'
|
|
3
|
+
|
|
4
|
+
export const HireInfo = ({ name, icon, value }: ReportI) => {
|
|
5
|
+
return (
|
|
6
|
+
<Flex bg="lightBlue.2" gap="base" p="base" mx="-base">
|
|
7
|
+
<Image boxSize="40px" src={icon} alt={name} />
|
|
8
|
+
<Text>{value}</Text>
|
|
9
|
+
</Flex>
|
|
10
|
+
)
|
|
11
|
+
}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { CustomBadge, Plus, Calendar } from '@/components'
|
|
2
|
+
import { FieldTypesI, ReportI } from '@/interfaces'
|
|
3
|
+
import { colors } from '@/theme/colors'
|
|
4
|
+
import {
|
|
5
|
+
AspectRatio,
|
|
6
|
+
Box,
|
|
7
|
+
Container,
|
|
8
|
+
Flex,
|
|
9
|
+
IconButton,
|
|
10
|
+
Image,
|
|
11
|
+
Text,
|
|
12
|
+
} from '@chakra-ui/react'
|
|
13
|
+
|
|
14
|
+
export const HireService = ({
|
|
15
|
+
description,
|
|
16
|
+
name,
|
|
17
|
+
label,
|
|
18
|
+
icon,
|
|
19
|
+
comments,
|
|
20
|
+
value,
|
|
21
|
+
callback,
|
|
22
|
+
children,
|
|
23
|
+
...rest
|
|
24
|
+
}: ReportI & Pick<FieldTypesI, 'callback'>) => {
|
|
25
|
+
const ctaIcon = {
|
|
26
|
+
plus: <Plus stroke={colors.blue[3]} />,
|
|
27
|
+
calendar: <Calendar stroke={colors.blue[3]} />,
|
|
28
|
+
}
|
|
29
|
+
return (
|
|
30
|
+
<Container p="base" position="relative" boxShadow="md">
|
|
31
|
+
<CustomBadge
|
|
32
|
+
label={label}
|
|
33
|
+
bg="#77C100"
|
|
34
|
+
position="absolute"
|
|
35
|
+
top="2"
|
|
36
|
+
left="-1"
|
|
37
|
+
zIndex="3"
|
|
38
|
+
/>
|
|
39
|
+
<Flex gap="base" ml="10" align="center">
|
|
40
|
+
<Image src={icon} alt={name} objectFit="contain" w="70px" h="70px" />
|
|
41
|
+
<Flex align="end" justify="space-between" w="100%">
|
|
42
|
+
<Box>
|
|
43
|
+
<Text
|
|
44
|
+
fontWeight="semibold"
|
|
45
|
+
fontSize="sm"
|
|
46
|
+
noOfLines={2}
|
|
47
|
+
overflow="hidden"
|
|
48
|
+
textOverflow="ellipsis"
|
|
49
|
+
>
|
|
50
|
+
{name}
|
|
51
|
+
</Text>
|
|
52
|
+
<Text fontSize="sm" fontFamily="secondary" lineHeight="1.2">
|
|
53
|
+
{description}
|
|
54
|
+
</Text>
|
|
55
|
+
<Text fontSize="sm" fontFamily="secondary" lineHeight="1.2">
|
|
56
|
+
{comments}
|
|
57
|
+
</Text>
|
|
58
|
+
<Text
|
|
59
|
+
fontSize="sm"
|
|
60
|
+
fontFamily="secondary"
|
|
61
|
+
color="blue.2"
|
|
62
|
+
lineHeight="1.2"
|
|
63
|
+
>
|
|
64
|
+
{value}
|
|
65
|
+
</Text>
|
|
66
|
+
</Box>
|
|
67
|
+
<Flex gap="2">
|
|
68
|
+
{children?.map((child) => {
|
|
69
|
+
const { id, icon, label = '' } = child
|
|
70
|
+
return (
|
|
71
|
+
<IconButton
|
|
72
|
+
key={id}
|
|
73
|
+
w="2rem"
|
|
74
|
+
h="2rem"
|
|
75
|
+
aria-label={label}
|
|
76
|
+
variant="iconOutlined"
|
|
77
|
+
icon={ctaIcon[icon as keyof typeof ctaIcon] || <Plus />}
|
|
78
|
+
onClick={() =>
|
|
79
|
+
callback?.({
|
|
80
|
+
...child,
|
|
81
|
+
value: String(child.value),
|
|
82
|
+
})
|
|
83
|
+
}
|
|
84
|
+
/>
|
|
85
|
+
)
|
|
86
|
+
})}
|
|
87
|
+
</Flex>
|
|
88
|
+
</Flex>
|
|
89
|
+
</Flex>
|
|
90
|
+
</Container>
|
|
91
|
+
)
|
|
92
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { CustomBadge, Plus } from '@/components'
|
|
2
|
+
import { FieldTypesI, ReportI } from '@/interfaces'
|
|
3
|
+
import { colors } from '@/theme/colors'
|
|
4
|
+
import {
|
|
5
|
+
AspectRatio,
|
|
6
|
+
Container,
|
|
7
|
+
Flex,
|
|
8
|
+
IconButton,
|
|
9
|
+
Image,
|
|
10
|
+
Stack,
|
|
11
|
+
Text,
|
|
12
|
+
} from '@chakra-ui/react'
|
|
13
|
+
|
|
14
|
+
export const PurchaseProduct = ({
|
|
15
|
+
name,
|
|
16
|
+
label,
|
|
17
|
+
icon,
|
|
18
|
+
comments,
|
|
19
|
+
value,
|
|
20
|
+
callback,
|
|
21
|
+
...rest
|
|
22
|
+
}: ReportI & Pick<FieldTypesI, 'callback'>) => {
|
|
23
|
+
const bgs = {
|
|
24
|
+
best: '#232669',
|
|
25
|
+
better: '#424CBF',
|
|
26
|
+
good: '#5C81C7',
|
|
27
|
+
}
|
|
28
|
+
const bg = bgs[(label?.toLowerCase() as keyof typeof bgs) ?? 'best']
|
|
29
|
+
return (
|
|
30
|
+
<Container p="base" position="relative" boxShadow="md">
|
|
31
|
+
<CustomBadge
|
|
32
|
+
label={label}
|
|
33
|
+
bg={bg}
|
|
34
|
+
position="absolute"
|
|
35
|
+
top="2"
|
|
36
|
+
left="-1"
|
|
37
|
+
zIndex="3"
|
|
38
|
+
/>
|
|
39
|
+
<Flex gap="base" ml="6">
|
|
40
|
+
<Image src={icon} alt={name} objectFit="contain" w="70px" h="70px" />
|
|
41
|
+
<Stack spacing="0">
|
|
42
|
+
<Text
|
|
43
|
+
fontWeight="semibold"
|
|
44
|
+
fontSize="sm"
|
|
45
|
+
noOfLines={2}
|
|
46
|
+
overflow="hidden"
|
|
47
|
+
textOverflow="ellipsis"
|
|
48
|
+
>
|
|
49
|
+
{name}
|
|
50
|
+
</Text>
|
|
51
|
+
<Flex alignSelf="end" gap="base" align="end">
|
|
52
|
+
<Stack spacing="0" align="end">
|
|
53
|
+
<Text fontSize="xs" fontFamily="secondary" color="red">
|
|
54
|
+
{comments}
|
|
55
|
+
</Text>
|
|
56
|
+
<Text fontSize="sm" fontWeight="bold" lineHeight="1.2">
|
|
57
|
+
{value}
|
|
58
|
+
</Text>
|
|
59
|
+
</Stack>
|
|
60
|
+
<IconButton
|
|
61
|
+
w="2rem"
|
|
62
|
+
h="2rem"
|
|
63
|
+
aria-label="Add product"
|
|
64
|
+
variant="iconOutlined"
|
|
65
|
+
icon={<Plus size={20} stroke={colors.blue['3']} />}
|
|
66
|
+
onClick={() =>
|
|
67
|
+
callback?.({ name, icon, value: String(value), ...rest })
|
|
68
|
+
}
|
|
69
|
+
/>
|
|
70
|
+
</Flex>
|
|
71
|
+
</Stack>
|
|
72
|
+
</Flex>
|
|
73
|
+
</Container>
|
|
74
|
+
)
|
|
75
|
+
}
|
|
@@ -3,7 +3,7 @@ import { AspectRatio, Box, Container, Flex, Text } from '@chakra-ui/react'
|
|
|
3
3
|
|
|
4
4
|
export const VideoDetail = ({ name, label, link, description }: ReportI) => {
|
|
5
5
|
return (
|
|
6
|
-
<Container p="base">
|
|
6
|
+
<Container p="base" boxShadow="md">
|
|
7
7
|
<Flex gap="base">
|
|
8
8
|
<AspectRatio w="140px" ratio={16 / 9}>
|
|
9
9
|
<iframe title={name} src={link} allowFullScreen />
|
|
@@ -2,6 +2,9 @@ export * from './AlertFields'
|
|
|
2
2
|
export * from './ChangeAirFilter'
|
|
3
3
|
export * from './CustomDivider'
|
|
4
4
|
export * from './FilterSize'
|
|
5
|
+
export * from './HireInfo'
|
|
6
|
+
export * from './HireService'
|
|
7
|
+
export * from './PurchaseProduct'
|
|
5
8
|
export * from './SearchField'
|
|
6
9
|
export * from './SmokeDetectorBattery'
|
|
7
10
|
export * from './SmokeDetectorExpired'
|
|
@@ -58,6 +58,7 @@ import {
|
|
|
58
58
|
AAWeed,
|
|
59
59
|
AApest,
|
|
60
60
|
FilterSize,
|
|
61
|
+
Wallet,
|
|
61
62
|
} from '@/assets/images'
|
|
62
63
|
import { IconTypes } from '@/interfaces'
|
|
63
64
|
|
|
@@ -108,6 +109,7 @@ export const fieldIcons: Record<IconTypes, string> = {
|
|
|
108
109
|
target: Target,
|
|
109
110
|
title: CircleFace,
|
|
110
111
|
company: Company2,
|
|
112
|
+
wallet: Wallet,
|
|
111
113
|
'sh-gutter': GutterCleaning,
|
|
112
114
|
'sh-home': HomeCleaning,
|
|
113
115
|
'sh-house': HouseWashing,
|
package/src/index.ts
CHANGED
|
@@ -106,6 +106,7 @@ export type IconTypes =
|
|
|
106
106
|
| 'target'
|
|
107
107
|
| 'title'
|
|
108
108
|
| 'company'
|
|
109
|
+
| 'wallet'
|
|
109
110
|
| UIIconTypes
|
|
110
111
|
|
|
111
112
|
export type UIIconTypes =
|
|
@@ -123,6 +124,7 @@ export type UIIconTypes =
|
|
|
123
124
|
| 'aa-dressing'
|
|
124
125
|
| 'aa-pest'
|
|
125
126
|
| 'filter-size'
|
|
127
|
+
| string
|
|
126
128
|
|
|
127
129
|
export type ValueTypes = string | string[] | number | boolean
|
|
128
130
|
export type OptionsTypes = string[] | number[] | null
|
|
@@ -4,7 +4,13 @@ export type AlertCategory = 'safeguard' | 'maintain' | 'budget' | 'improve'
|
|
|
4
4
|
|
|
5
5
|
export type AlertTabType = 'details' | 'filter-size' | 'purchase' | 'hire-out'
|
|
6
6
|
|
|
7
|
-
export type AlertFieldType =
|
|
7
|
+
export type AlertFieldType =
|
|
8
|
+
| 'alert'
|
|
9
|
+
| 'search'
|
|
10
|
+
| 'purchase-product'
|
|
11
|
+
| 'hire-info'
|
|
12
|
+
| 'hire-service'
|
|
13
|
+
| 'hire-service-cta'
|
|
8
14
|
|
|
9
15
|
export interface BackendAlertI extends DynamicFormI {
|
|
10
16
|
category: AlertCategory
|
|
@@ -945,6 +945,180 @@ export const alertFieldsMock: ReportI[] = [
|
|
|
945
945
|
},
|
|
946
946
|
],
|
|
947
947
|
},
|
|
948
|
+
{
|
|
949
|
+
id: faker.database.mongodbObjectId(),
|
|
950
|
+
name: 'Purchase',
|
|
951
|
+
label: '',
|
|
952
|
+
description: faker.lorem.sentence(),
|
|
953
|
+
comments: faker.lorem.sentence(),
|
|
954
|
+
value: '',
|
|
955
|
+
type: 'purchase',
|
|
956
|
+
visible: true,
|
|
957
|
+
children: [
|
|
958
|
+
{
|
|
959
|
+
id: faker.database.mongodbObjectId(),
|
|
960
|
+
name: 'Filtrete™ Allergen Defense Furnace AC Air Filter 1000 MPR',
|
|
961
|
+
label: 'best',
|
|
962
|
+
description: '',
|
|
963
|
+
icon: 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcT50sebT9p-twQB-DdM2tlRo12In8F09QCsmg&s',
|
|
964
|
+
comments: 'Save 20% off Retail',
|
|
965
|
+
value: '$22.99',
|
|
966
|
+
type: 'purchase-product',
|
|
967
|
+
visible: true,
|
|
968
|
+
},
|
|
969
|
+
{
|
|
970
|
+
id: faker.database.mongodbObjectId(),
|
|
971
|
+
name: 'Filtrete™ Smart Allergen Bacteria & Virus Furnace AC Air Filter MPR 1500',
|
|
972
|
+
label: 'better',
|
|
973
|
+
description: '',
|
|
974
|
+
icon: 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSbFpjG3kybZDb6psqPIlQSoXgp9OjOR672kg&s',
|
|
975
|
+
comments: 'Save 28% off Retail',
|
|
976
|
+
value: '$16.99',
|
|
977
|
+
type: 'purchase-product',
|
|
978
|
+
visible: true,
|
|
979
|
+
},
|
|
980
|
+
{
|
|
981
|
+
id: faker.database.mongodbObjectId(),
|
|
982
|
+
name: 'Filtrete™ 700 MPR Dust Pollen and Pet Dander Electrostatic Air Filter',
|
|
983
|
+
label: 'good',
|
|
984
|
+
description: '',
|
|
985
|
+
icon: 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQ7j1KYfPZqPnFmTgyx7b9pp78N6RForQfZFQ&s',
|
|
986
|
+
comments: 'Save 24% off Retail',
|
|
987
|
+
value: '$10.99',
|
|
988
|
+
type: 'purchase-product',
|
|
989
|
+
visible: true,
|
|
990
|
+
},
|
|
991
|
+
],
|
|
992
|
+
},
|
|
993
|
+
{
|
|
994
|
+
id: faker.database.mongodbObjectId(),
|
|
995
|
+
name: 'Hire out',
|
|
996
|
+
label: '',
|
|
997
|
+
description: faker.lorem.sentence(),
|
|
998
|
+
comments: faker.lorem.sentence(),
|
|
999
|
+
value: faker.image.urlPicsumPhotos(),
|
|
1000
|
+
type: 'hire-out',
|
|
1001
|
+
visible: true,
|
|
1002
|
+
children: [
|
|
1003
|
+
{
|
|
1004
|
+
id: faker.database.mongodbObjectId(),
|
|
1005
|
+
name: '',
|
|
1006
|
+
label: '',
|
|
1007
|
+
description: '',
|
|
1008
|
+
icon: 'wallet',
|
|
1009
|
+
comments: '',
|
|
1010
|
+
value:
|
|
1011
|
+
'Average cost for this service range from $100-125 in your area, including filter.',
|
|
1012
|
+
type: 'hire-info',
|
|
1013
|
+
visible: true,
|
|
1014
|
+
},
|
|
1015
|
+
{
|
|
1016
|
+
id: faker.database.mongodbObjectId(),
|
|
1017
|
+
name: 'Bobs Heating & Cooling',
|
|
1018
|
+
label: 'match',
|
|
1019
|
+
description: 'Jerry Marks',
|
|
1020
|
+
icon: 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRlUXEpc3FdoRVmQoYvmAttMwG2dzvBz49oGg&s',
|
|
1021
|
+
comments: '512-650-3030',
|
|
1022
|
+
value: 'JerryM@BobsHTC.com',
|
|
1023
|
+
type: 'hire-service',
|
|
1024
|
+
visible: true,
|
|
1025
|
+
children: [
|
|
1026
|
+
{
|
|
1027
|
+
id: faker.database.mongodbObjectId(),
|
|
1028
|
+
name: 'Bobs Heating & Cooling - add service',
|
|
1029
|
+
label: '',
|
|
1030
|
+
description: '',
|
|
1031
|
+
icon: 'plus',
|
|
1032
|
+
comments: '',
|
|
1033
|
+
value: '',
|
|
1034
|
+
type: 'hire-service-cta',
|
|
1035
|
+
visible: true,
|
|
1036
|
+
},
|
|
1037
|
+
{
|
|
1038
|
+
id: faker.database.mongodbObjectId(),
|
|
1039
|
+
name: 'Bobs Heating & Cooling - schedule service',
|
|
1040
|
+
label: '',
|
|
1041
|
+
description: '',
|
|
1042
|
+
icon: 'calendar',
|
|
1043
|
+
comments: '',
|
|
1044
|
+
value: '',
|
|
1045
|
+
type: 'hire-service-cta',
|
|
1046
|
+
visible: true,
|
|
1047
|
+
},
|
|
1048
|
+
],
|
|
1049
|
+
},
|
|
1050
|
+
{
|
|
1051
|
+
id: faker.database.mongodbObjectId(),
|
|
1052
|
+
name: 'Sears Home Services',
|
|
1053
|
+
label: 'match',
|
|
1054
|
+
description: 'Mark Jones',
|
|
1055
|
+
icon: 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTJU3pPD1SFxFnAuaOkoHR36lcVNmoP39USqA&s',
|
|
1056
|
+
comments: '512-354-6584',
|
|
1057
|
+
value: 'MarkJones@searssvc.com',
|
|
1058
|
+
type: 'hire-service',
|
|
1059
|
+
visible: true,
|
|
1060
|
+
children: [
|
|
1061
|
+
{
|
|
1062
|
+
id: faker.database.mongodbObjectId(),
|
|
1063
|
+
name: 'Sears Home Services - add service',
|
|
1064
|
+
label: '',
|
|
1065
|
+
description: '',
|
|
1066
|
+
icon: 'plus',
|
|
1067
|
+
comments: '',
|
|
1068
|
+
value: '',
|
|
1069
|
+
type: 'hire-service-cta',
|
|
1070
|
+
visible: true,
|
|
1071
|
+
},
|
|
1072
|
+
{
|
|
1073
|
+
id: faker.database.mongodbObjectId(),
|
|
1074
|
+
name: 'Sears Home Services - schedule service',
|
|
1075
|
+
label: '',
|
|
1076
|
+
description: '',
|
|
1077
|
+
icon: 'calendar',
|
|
1078
|
+
comments: '',
|
|
1079
|
+
value: '',
|
|
1080
|
+
type: 'hire-service-cta',
|
|
1081
|
+
visible: true,
|
|
1082
|
+
},
|
|
1083
|
+
],
|
|
1084
|
+
},
|
|
1085
|
+
{
|
|
1086
|
+
id: faker.database.mongodbObjectId(),
|
|
1087
|
+
name: 'Airco Mechanical',
|
|
1088
|
+
label: 'match',
|
|
1089
|
+
description: 'Chris Rodriquez',
|
|
1090
|
+
icon: 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRWZ_hk6-7mpzQG2ZSQTu0XV2FiMF4AYkT4Wg&s',
|
|
1091
|
+
comments: '512-888-5454',
|
|
1092
|
+
value: 'ChrisR@airco.com',
|
|
1093
|
+
type: 'hire-service',
|
|
1094
|
+
visible: true,
|
|
1095
|
+
children: [
|
|
1096
|
+
{
|
|
1097
|
+
id: faker.database.mongodbObjectId(),
|
|
1098
|
+
name: 'Airco Mechanical - add service',
|
|
1099
|
+
label: '',
|
|
1100
|
+
description: '',
|
|
1101
|
+
icon: 'plus',
|
|
1102
|
+
comments: '',
|
|
1103
|
+
value: '',
|
|
1104
|
+
type: 'hire-service-cta',
|
|
1105
|
+
visible: true,
|
|
1106
|
+
},
|
|
1107
|
+
{
|
|
1108
|
+
id: faker.database.mongodbObjectId(),
|
|
1109
|
+
name: 'Airco Mechanical - schedule service',
|
|
1110
|
+
label: '',
|
|
1111
|
+
description: '',
|
|
1112
|
+
icon: 'calendar',
|
|
1113
|
+
comments: '',
|
|
1114
|
+
value: '',
|
|
1115
|
+
type: 'hire-service-cta',
|
|
1116
|
+
visible: true,
|
|
1117
|
+
},
|
|
1118
|
+
],
|
|
1119
|
+
},
|
|
1120
|
+
],
|
|
1121
|
+
},
|
|
948
1122
|
],
|
|
949
1123
|
},
|
|
950
1124
|
]
|