@homefile/components-v2 2.4.0 → 2.6.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.
Files changed (81) hide show
  1. package/dist/assets/images/book.svg +25 -0
  2. package/dist/assets/images/company2.svg +29 -0
  3. package/dist/assets/images/index.d.ts +3 -1
  4. package/dist/assets/images/index.js +3 -1
  5. package/dist/assets/images/index.ts +4 -0
  6. package/dist/components/forms/dynamicForm/DynamicForm.js +3 -1
  7. package/dist/components/forms/dynamicForm/fields/CheckboxAgreement.d.ts +2 -0
  8. package/dist/components/forms/dynamicForm/fields/CheckboxAgreement.js +14 -0
  9. package/dist/components/forms/dynamicForm/fields/index.d.ts +1 -0
  10. package/dist/components/forms/dynamicForm/fields/index.js +1 -0
  11. package/dist/components/forms/dynamicForm/fields/uiFields/TileCta.js +1 -1
  12. package/dist/components/forms/dynamicForm/fields/uiFields/TileCta.tsx +4 -2
  13. package/dist/components/forms/readOnly/ReadOnlyDynamicForm.d.ts +1 -1
  14. package/dist/components/forms/readOnly/ReadOnlyDynamicForm.js +6 -4
  15. package/dist/components/forms/readOnly/fields/ReadOnlyGrid.d.ts +1 -1
  16. package/dist/components/forms/readOnly/fields/ReadOnlyGrid.js +7 -3
  17. package/dist/components/forms/readOnly/fields/ReadOnlyNotes.d.ts +2 -0
  18. package/dist/components/forms/readOnly/fields/ReadOnlyNotes.js +5 -0
  19. package/dist/components/forms/readOnly/fields/homeItem/ReadOnlyAppliances.js +1 -1
  20. package/dist/components/forms/readOnly/fields/homeItem/ReadOnlyAppliances.tsx +1 -1
  21. package/dist/components/forms/readOnly/fields/homeItem/ReadOnlyGuidelines.d.ts +2 -0
  22. package/dist/components/forms/readOnly/fields/homeItem/ReadOnlyGuidelines.js +11 -0
  23. package/dist/components/forms/readOnly/fields/homeItem/ReadOnlyGuidelines.tsx +33 -0
  24. package/dist/components/forms/readOnly/fields/homeItem/ReadOnlyHomeItemImages.js +1 -1
  25. package/dist/components/forms/readOnly/fields/homeItem/ReadOnlyHomeItemImages.tsx +1 -0
  26. package/dist/components/forms/readOnly/fields/homeItem/ReadOnlyItemRelated.d.ts +2 -0
  27. package/dist/components/forms/readOnly/fields/homeItem/ReadOnlyItemRelated.js +11 -0
  28. package/dist/components/forms/readOnly/fields/homeItem/ReadOnlyItemRelated.tsx +40 -0
  29. package/dist/components/forms/readOnly/fields/homeItem/index.d.ts +2 -0
  30. package/dist/components/forms/readOnly/fields/homeItem/index.js +2 -0
  31. package/dist/components/forms/readOnly/fields/homeItem/index.ts +2 -0
  32. package/dist/components/forms/readOnly/fields/index.d.ts +1 -0
  33. package/dist/components/forms/readOnly/fields/index.js +1 -0
  34. package/dist/components/homeItems/ViewingHomeItemPanel.d.ts +1 -1
  35. package/dist/components/homeItems/ViewingHomeItemPanel.js +2 -2
  36. package/dist/components/inboxTile/panel/MessageCard.js +6 -2
  37. package/dist/helpers/forms/dynamicForm.helper.js +3 -2
  38. package/dist/hooks/inbox/useMessagePanel.js +4 -1
  39. package/dist/interfaces/forms/dynamicForm/DynamicForm.interface.d.ts +4 -3
  40. package/dist/interfaces/forms/readOnly/ReadOnlyGrid.interface.d.ts +2 -1
  41. package/dist/interfaces/forms/readOnly/homeItem/ReadOnlyGuidelines.interface.d.ts +4 -0
  42. package/dist/interfaces/forms/readOnly/homeItem/ReadOnlyGuidelines.interface.js +1 -0
  43. package/dist/interfaces/forms/readOnly/homeItem/index.d.ts +1 -0
  44. package/dist/interfaces/forms/readOnly/homeItem/index.js +1 -0
  45. package/dist/interfaces/homeItems/ViewingHomeItemPanel.interface.d.ts +1 -0
  46. package/dist/interfaces/inboxTile/MessageCard.interface.d.ts +2 -2
  47. package/dist/mocks/forms/dynamicForm.mock.js +88 -10
  48. package/dist/mocks/inbox/messages.js +2 -3
  49. package/dist/stories/assets/Illustrations.stories.js +2 -2
  50. package/dist/stories/homeItems/ViewingHomeItem.stories.js +1 -0
  51. package/package.json +1 -1
  52. package/src/assets/images/book.svg +25 -0
  53. package/src/assets/images/company2.svg +29 -0
  54. package/src/assets/images/index.ts +4 -0
  55. package/src/components/forms/dynamicForm/DynamicForm.tsx +11 -0
  56. package/src/components/forms/dynamicForm/fields/CheckboxAgreement.tsx +90 -0
  57. package/src/components/forms/dynamicForm/fields/index.ts +1 -0
  58. package/src/components/forms/dynamicForm/fields/uiFields/TileCta.tsx +4 -2
  59. package/src/components/forms/readOnly/ReadOnlyDynamicForm.tsx +8 -2
  60. package/src/components/forms/readOnly/fields/ReadOnlyGrid.tsx +32 -3
  61. package/src/components/forms/readOnly/fields/ReadOnlyNotes.tsx +16 -0
  62. package/src/components/forms/readOnly/fields/homeItem/ReadOnlyAppliances.tsx +1 -1
  63. package/src/components/forms/readOnly/fields/homeItem/ReadOnlyGuidelines.tsx +33 -0
  64. package/src/components/forms/readOnly/fields/homeItem/ReadOnlyHomeItemImages.tsx +1 -0
  65. package/src/components/forms/readOnly/fields/homeItem/ReadOnlyItemRelated.tsx +40 -0
  66. package/src/components/forms/readOnly/fields/homeItem/index.ts +2 -0
  67. package/src/components/forms/readOnly/fields/index.ts +1 -0
  68. package/src/components/homeItems/ViewingHomeItemPanel.tsx +2 -1
  69. package/src/components/inboxTile/panel/MessageCard.tsx +25 -6
  70. package/src/helpers/forms/dynamicForm.helper.ts +4 -2
  71. package/src/hooks/inbox/useMessagePanel.ts +5 -1
  72. package/src/interfaces/forms/dynamicForm/DynamicForm.interface.ts +10 -1
  73. package/src/interfaces/forms/readOnly/ReadOnlyGrid.interface.ts +3 -1
  74. package/src/interfaces/forms/readOnly/homeItem/ReadOnlyGuidelines.interface.ts +6 -0
  75. package/src/interfaces/forms/readOnly/homeItem/index.ts +1 -0
  76. package/src/interfaces/homeItems/ViewingHomeItemPanel.interface.ts +1 -0
  77. package/src/interfaces/inboxTile/MessageCard.interface.ts +2 -2
  78. package/src/mocks/forms/dynamicForm.mock.ts +89 -11
  79. package/src/mocks/inbox/messages.ts +2 -3
  80. package/src/stories/assets/Illustrations.stories.tsx +4 -0
  81. package/src/stories/homeItems/ViewingHomeItem.stories.tsx +1 -0
@@ -0,0 +1,25 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="36.229" height="25.49" viewBox="0 0 36.229 25.49">
2
+ <defs>
3
+ <clipPath id="clip-path">
4
+ <rect id="Rectangle_24874" data-name="Rectangle 24874" width="36.229" height="25.49" transform="translate(0 0)" fill="none"/>
5
+ </clipPath>
6
+ </defs>
7
+ <g id="Group_20984" data-name="Group 20984" transform="translate(0 0)">
8
+ <g id="Group_20983" data-name="Group 20983" transform="translate(0 0)" clip-path="url(#clip-path)">
9
+ <path id="Path_15109" data-name="Path 15109" d="M23.19,0V23.3A2.195,2.195,0,0,0,21,21.1H7.4V0Z" transform="translate(-5.076 0)" fill="#d2edef"/>
10
+ <path id="Path_15110" data-name="Path 15110" d="M59.866,21.1a2.194,2.194,0,0,0-2.191,2.2V0H73.461V21.1Z" transform="translate(-39.561 0)" fill="#d2edef"/>
11
+ <path id="Path_15111" data-name="Path 15111" d="M15.919,24.116H2.324V4.392H0V26.311H15.919A2.192,2.192,0,0,0,18.114,28.5V26.311a2.195,2.195,0,0,0-2.195-2.2" transform="translate(0 -3.013)" fill="#e24c5d"/>
12
+ <path id="Path_15112" data-name="Path 15112" d="M73.461,4.393V24.117H59.866a2.194,2.194,0,0,0-2.191,2.2V28.5a2.191,2.191,0,0,0,2.191-2.192H75.789V4.393Z" transform="translate(-39.561 -3.013)" fill="#cd4160"/>
13
+ <rect id="Rectangle_24864" data-name="Rectangle 24864" width="5.916" height="0.942" transform="translate(7.209 2.445)" fill="#40566b"/>
14
+ <rect id="Rectangle_24865" data-name="Rectangle 24865" width="10.4" height="0.942" transform="translate(4.965 7.581)" fill="#40566b"/>
15
+ <rect id="Rectangle_24866" data-name="Rectangle 24866" width="10.4" height="0.942" transform="translate(4.965 10.636)" fill="#40566b"/>
16
+ <rect id="Rectangle_24867" data-name="Rectangle 24867" width="10.4" height="0.942" transform="translate(4.965 13.689)" fill="#40566b"/>
17
+ <rect id="Rectangle_24868" data-name="Rectangle 24868" width="10.4" height="0.942" transform="translate(4.965 16.744)" fill="#40566b"/>
18
+ <rect id="Rectangle_24869" data-name="Rectangle 24869" width="10.4" height="0.942" transform="translate(20.807 7.581)" fill="#40566b"/>
19
+ <rect id="Rectangle_24870" data-name="Rectangle 24870" width="10.4" height="0.942" transform="translate(20.807 4.4)" fill="#40566b"/>
20
+ <rect id="Rectangle_24871" data-name="Rectangle 24871" width="10.4" height="0.942" transform="translate(20.807 10.636)" fill="#40566b"/>
21
+ <rect id="Rectangle_24872" data-name="Rectangle 24872" width="10.4" height="0.942" transform="translate(20.807 13.689)" fill="#40566b"/>
22
+ <rect id="Rectangle_24873" data-name="Rectangle 24873" width="10.4" height="0.942" transform="translate(20.807 16.744)" fill="#40566b"/>
23
+ </g>
24
+ </g>
25
+ </svg>
@@ -0,0 +1,29 @@
1
+ <svg id="Group_22676" data-name="Group 22676" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="31.034" height="28.695" viewBox="0 0 31.034 28.695">
2
+ <defs>
3
+ <clipPath id="clip-path">
4
+ <rect id="Rectangle_25833" data-name="Rectangle 25833" width="31.034" height="28.695" fill="none"/>
5
+ </clipPath>
6
+ </defs>
7
+ <rect id="Rectangle_25824" data-name="Rectangle 25824" width="1.715" height="1.79" transform="translate(21.445 8.853)" fill="#323954"/>
8
+ <rect id="Rectangle_25825" data-name="Rectangle 25825" width="3.14" height="15.1" transform="translate(21.875 13.595)" fill="#00c0b7"/>
9
+ <g id="Group_22672" data-name="Group 22672" transform="translate(0 0)">
10
+ <g id="Group_22671" data-name="Group 22671" clip-path="url(#clip-path)">
11
+ <path id="Path_17688" data-name="Path 17688" d="M71.515,21.209a1.5,1.5,0,0,1,.847.263,1.39,1.39,0,0,1,.28-.414v0a1.483,1.483,0,0,1,1.086-.47,1.522,1.522,0,0,1,.339.04,2.411,2.411,0,0,1,.29-.527,2.358,2.358,0,0,1,4.059.406,1.7,1.7,0,0,1,1.89.785A1.344,1.344,0,0,1,82.23,22.5a1.484,1.484,0,0,1-.043.328H70.023c0-.022,0-.04,0-.062v-.116a1.492,1.492,0,0,1,1.495-1.446" transform="translate(-51.196 -13.98)" fill="#d2edef"/>
12
+ <rect id="Rectangle_25826" data-name="Rectangle 25826" width="3.14" height="15.1" transform="translate(16.902 13.595)" fill="#00c0b7"/>
13
+ <path id="Path_17689" data-name="Path 17689" d="M72.362,23.147A1.495,1.495,0,0,0,70.02,24.33V21.41h2.621v1.323a1.389,1.389,0,0,0-.28.414" transform="translate(-51.196 -15.654)" fill="#00c0b7"/>
14
+ <path id="Path_17690" data-name="Path 17690" d="M54.55,0V3.678H53V1.624H50.386V3.678H48.84V0h5.71Z" transform="translate(-35.71 0)" fill="#40566b"/>
15
+ <path id="Path_17691" data-name="Path 17691" d="M70.023,32.762h2.618v1.79H70.02V32.7c0,.022,0,.04,0,.062" transform="translate(-51.196 -23.909)" fill="#00c0b7"/>
16
+ <path id="Path_17692" data-name="Path 17692" d="M42.785,18.793v1.852h-1.53V15.758H38.637v4.887h-1.53V15.758H34.486v4.887H32.771V13.68h14.35v2.441a2.376,2.376,0,0,0-.29.527,1.526,1.526,0,0,0-.339-.041,1.483,1.483,0,0,0-1.086.47v-1.32H42.785v2.92a.272.272,0,0,0,0,.051.433.433,0,0,0,0,.065" transform="translate(-23.961 -10.002)" fill="#323954"/>
17
+ <rect id="Rectangle_25827" data-name="Rectangle 25827" width="2.618" height="4.887" transform="translate(14.676 5.756)" fill="#00c0b7"/>
18
+ <rect id="Rectangle_25828" data-name="Rectangle 25828" width="2.618" height="2.054" transform="translate(14.676 1.623)" fill="#00c0b7"/>
19
+ <path id="Path_17693" data-name="Path 17693" d="M47.51,50.57v15.1H44.37V60.485H45.2a1.344,1.344,0,0,0,.046-.344,1.412,1.412,0,0,0-.876-1.307V50.57Z" transform="translate(-32.442 -36.975)" fill="#00c0b7"/>
20
+ <rect id="Rectangle_25829" data-name="Rectangle 25829" width="2.621" height="4.887" transform="translate(10.525 5.756)" fill="#00c0b7"/>
21
+ <rect id="Rectangle_25830" data-name="Rectangle 25830" width="1.833" height="5.186" transform="translate(10.095 23.509)" fill="#40566b"/>
22
+ <path id="Path_17694" data-name="Path 17694" d="M18.807,42.542V48.6a2.433,2.433,0,0,0-.4-.032,2.471,2.471,0,0,0-2.183,1.309l-.013-.005V39.59H39.464V57.642h-2.6v-15.1h-3.14v15.1H31.894v-15.1h-3.14v15.1H26.92v-15.1H23.78v8.264a1.41,1.41,0,0,0-1.14.032,1.8,1.8,0,0,0-.694-.669V42.542Z" transform="translate(-11.852 -28.947)" fill="#40566b"/>
23
+ <rect id="Rectangle_25831" data-name="Rectangle 25831" width="3.14" height="5.186" transform="translate(6.955 23.509)" fill="#00c0b7"/>
24
+ <path id="Path_17695" data-name="Path 17695" d="M28.166,57.984a1.731,1.731,0,0,0-.444.059,2.485,2.485,0,0,0-1.852-1.42V50.57h3.14V58.2a1.779,1.779,0,0,0-.844-.212" transform="translate(-18.915 -36.975)" fill="#00c0b7"/>
25
+ <rect id="Rectangle_25832" data-name="Rectangle 25832" width="2.597" height="5.186" transform="translate(4.358 23.509)" fill="#40566b"/>
26
+ <path id="Path_17696" data-name="Path 17696" d="M3.89,74.505a1.559,1.559,0,0,1,.355.043,2.054,2.054,0,0,1,.126-.269,2.474,2.474,0,0,1,4.436.142,1.743,1.743,0,0,1,.444-.059,1.779,1.779,0,0,1,.844.212,1.8,1.8,0,0,1,.694.669A1.41,1.41,0,0,1,12.8,76.518a1.332,1.332,0,0,1-.046.344H.006C0,76.817,0,76.774,0,76.728a1.57,1.57,0,0,1,2.457-1.293,1.571,1.571,0,0,1,1.433-.93" transform="translate(0 -53.353)" fill="#d2edef"/>
27
+ </g>
28
+ </g>
29
+ </svg>
@@ -12,6 +12,7 @@ import Billing from './billing.svg';
12
12
  import BillingAddress from './billing-address.svg';
13
13
  import BlueFolder from './blue-folder.svg';
14
14
  import BlueFolderShared from './blue-folder-shared.svg';
15
+ import BookOpened from './book.svg';
15
16
  import Box from './box.svg';
16
17
  import Building from './building.svg';
17
18
  import Calc from './calc.svg';
@@ -28,6 +29,7 @@ import Closet from './closet.svg';
28
29
  import Clouds from './clouds.png';
29
30
  import Co2 from './co2.svg';
30
31
  import Company from './company.svg';
32
+ import Company2 from './company2.svg';
31
33
  import ComputerReport from './computer-report.svg';
32
34
  import Confirmation from './confirmation.svg';
33
35
  import Construction from './construction.svg';
@@ -157,7 +159,7 @@ import WizardDetailed from './wizard-detailed.svg';
157
159
  import WizardQuick from './wizard-quick.svg';
158
160
  import YellowFolder from './yellow-folder.svg';
159
161
  import YellowFolderUnshared from './yellow-folder-unshared.svg';
160
- export { AlertDelete, AlertDeletePurple, Arrow, Batery, Bathroom, Battery, Battery2, Bedroom, BgBlue, BgLogo, Billing, BillingAddress, BlueFolder, BlueFolderShared, Box, Building, Calc, Calendar2, Catalog, ChatBubble, Check, CheckInCircle, CheckPen, Chemistry, CircleFace, Cleaning, Closet, Clouds, Co2, Company, ComputerReport, Confirmation, Construction, Contacts, Contacts2, Contributor, CreditCard, Detector, Diamond, DiningRoom, DocIcon, Document, Document2, 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, };
162
+ export { AlertDelete, AlertDeletePurple, Arrow, Batery, Bathroom, Battery, Battery2, Bedroom, BgBlue, BgLogo, Billing, BillingAddress, BlueFolder, BlueFolderShared, BookOpened, Box, Building, Calc, Calendar2, Catalog, ChatBubble, Check, CheckInCircle, CheckPen, Chemistry, CircleFace, Cleaning, Closet, Clouds, Co2, Company, Company2, ComputerReport, Confirmation, Construction, Contacts, Contacts2, Contributor, CreditCard, Detector, Diamond, DiningRoom, DocIcon, Document, Document2, 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, };
161
163
  export * from './alerts';
162
164
  export * from './animations';
163
165
  export * from './appliances';
@@ -12,6 +12,7 @@ import Billing from './billing.svg';
12
12
  import BillingAddress from './billing-address.svg';
13
13
  import BlueFolder from './blue-folder.svg';
14
14
  import BlueFolderShared from './blue-folder-shared.svg';
15
+ import BookOpened from './book.svg';
15
16
  import Box from './box.svg';
16
17
  import Building from './building.svg';
17
18
  import Calc from './calc.svg';
@@ -28,6 +29,7 @@ import Closet from './closet.svg';
28
29
  import Clouds from './clouds.png';
29
30
  import Co2 from './co2.svg';
30
31
  import Company from './company.svg';
32
+ import Company2 from './company2.svg';
31
33
  import ComputerReport from './computer-report.svg';
32
34
  import Confirmation from './confirmation.svg';
33
35
  import Construction from './construction.svg';
@@ -157,7 +159,7 @@ import WizardDetailed from './wizard-detailed.svg';
157
159
  import WizardQuick from './wizard-quick.svg';
158
160
  import YellowFolder from './yellow-folder.svg';
159
161
  import YellowFolderUnshared from './yellow-folder-unshared.svg';
160
- export { AlertDelete, AlertDeletePurple, Arrow, Batery, Bathroom, Battery, Battery2, Bedroom, BgBlue, BgLogo, Billing, BillingAddress, BlueFolder, BlueFolderShared, Box, Building, Calc, Calendar2, Catalog, ChatBubble, Check, CheckInCircle, CheckPen, Chemistry, CircleFace, Cleaning, Closet, Clouds, Co2, Company, ComputerReport, Confirmation, Construction, Contacts, Contacts2, Contributor, CreditCard, Detector, Diamond, DiningRoom, DocIcon, Document, Document2, 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, };
162
+ export { AlertDelete, AlertDeletePurple, Arrow, Batery, Bathroom, Battery, Battery2, Bedroom, BgBlue, BgLogo, Billing, BillingAddress, BlueFolder, BlueFolderShared, BookOpened, Box, Building, Calc, Calendar2, Catalog, ChatBubble, Check, CheckInCircle, CheckPen, Chemistry, CircleFace, Cleaning, Closet, Clouds, Co2, Company, Company2, ComputerReport, Confirmation, Construction, Contacts, Contacts2, Contributor, CreditCard, Detector, Diamond, DiningRoom, DocIcon, Document, Document2, 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, };
161
163
  export * from './alerts';
162
164
  export * from './animations';
163
165
  export * from './appliances';
@@ -12,6 +12,7 @@ import Billing from './billing.svg'
12
12
  import BillingAddress from './billing-address.svg'
13
13
  import BlueFolder from './blue-folder.svg'
14
14
  import BlueFolderShared from './blue-folder-shared.svg'
15
+ import BookOpened from './book.svg'
15
16
  import Box from './box.svg'
16
17
  import Building from './building.svg'
17
18
  import Calc from './calc.svg'
@@ -28,6 +29,7 @@ import Closet from './closet.svg'
28
29
  import Clouds from './clouds.png'
29
30
  import Co2 from './co2.svg'
30
31
  import Company from './company.svg'
32
+ import Company2 from './company2.svg'
31
33
  import ComputerReport from './computer-report.svg'
32
34
  import Confirmation from './confirmation.svg'
33
35
  import Construction from './construction.svg'
@@ -173,6 +175,7 @@ export {
173
175
  BillingAddress,
174
176
  BlueFolder,
175
177
  BlueFolderShared,
178
+ BookOpened,
176
179
  Box,
177
180
  Building,
178
181
  Calc,
@@ -189,6 +192,7 @@ export {
189
192
  Clouds,
190
193
  Co2,
191
194
  Company,
195
+ Company2,
192
196
  ComputerReport,
193
197
  Confirmation,
194
198
  Construction,
@@ -14,7 +14,7 @@ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-run
14
14
  import { FormProvider } from 'react-hook-form';
15
15
  import { t } from 'i18next';
16
16
  import { Box, Stack, Text } from '@chakra-ui/react';
17
- import { HiddenFieldSection, GroupField, TextField, TextAreaField, SelectField, RatingField, GridField, FieldWithDelete, FileField, SwitchField, DateField, NumberField, CurrencyField, TileBody, CheckboxGroupField, } from '../..';
17
+ import { HiddenFieldSection, GroupField, TextField, TextAreaField, SelectField, RatingField, GridField, FieldWithDelete, FileField, SwitchField, DateField, NumberField, CurrencyField, TileBody, CheckboxGroupField, CheckboxAgreement, } from '../..';
18
18
  import { useDynamicForm } from '../../../hooks';
19
19
  import { fieldIcons } from '../../../helpers';
20
20
  export const DynamicForm = (_a) => {
@@ -64,6 +64,8 @@ export const DynamicForm = (_a) => {
64
64
  return (_jsx(GroupField, { id: id, fields: children, onRemove: handleRemove, canBeHidden: canBeHidden }, id));
65
65
  case 'checkbox-group':
66
66
  return (_jsx(FieldWithDelete, Object.assign({}, fieldWithDeleteBaseProps, { children: _jsx(CheckboxGroupField, { id: id, children: children, description: description, icon: baseProps.icon }, id) })));
67
+ case 'checkbox-agreement':
68
+ return (_jsx(CheckboxAgreement, { id: id, name: name, value: value, description: description }, id));
67
69
  case 'tile-body':
68
70
  return (_createElement(TileBody, Object.assign({}, props, { key: id, callback: callback, fields: children, menuItems: menuItems })));
69
71
  default:
@@ -0,0 +1,2 @@
1
+ import { ReportI } from '../../../../interfaces';
2
+ export declare const CheckboxAgreement: ({ description, id, name, value, }: Pick<ReportI, "name" | "id" | "description" | "value">) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,14 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import { ChevronRight } from '../../../icons';
3
+ import { Accordion, AccordionItem, AccordionButton, Flex, Box, AccordionPanel, Checkbox, Text, } from '@chakra-ui/react';
4
+ import { Controller, useFormContext } from 'react-hook-form';
5
+ export const CheckboxAgreement = ({ description, id, name, value, }) => {
6
+ const { control } = useFormContext();
7
+ return (_jsx(Accordion, { flex: "1", allowToggle: true, defaultIndex: [0], children: _jsx(AccordionItem, { border: "none", bg: "lightViolet.1", children: ({ isExpanded }) => (_jsxs(_Fragment, { children: [_jsxs(Flex, { p: "base", justify: "space-between", children: [_jsx(Controller, { control: control, name: id, defaultValue: value, render: ({ field: { onChange, value } }) => {
8
+ return (_jsx(Checkbox, { value: String(name), isChecked: Boolean(value), onChange: onChange, children: _jsx(Text, { fontFamily: "secondary", fontWeight: "semibold", fontSize: "sm", color: "violet.1", children: name }) }, id));
9
+ } }), _jsx(AccordionButton, { w: "fit-content", p: "0", _hover: {
10
+ bg: 'transparent',
11
+ }, _focus: {
12
+ outline: 'none',
13
+ }, children: _jsx(Box, { rounded: "full", border: "1px solid", padding: "1", borderColor: "neutral.white", transition: "all .2s ease-in-out", transform: isExpanded ? 'rotate(-90deg)' : 'rotate(0)', children: _jsx(ChevronRight, { size: 18 }) }) })] }), _jsx(AccordionPanel, { px: "base", pb: "base", children: _jsx(Text, { variant: "home", fontSize: "xs", marginInlineStart: "8", position: "relative", top: "-10px", children: description }) })] })) }) }));
14
+ };
@@ -1,3 +1,4 @@
1
+ export * from './CheckboxAgreement';
1
2
  export * from './CheckboxGroupField';
2
3
  export * from './CurrencyField';
3
4
  export * from './DateField';
@@ -1,3 +1,4 @@
1
+ export * from './CheckboxAgreement';
1
2
  export * from './CheckboxGroupField';
2
3
  export * from './CurrencyField';
3
4
  export * from './DateField';
@@ -14,5 +14,5 @@ import { Button } from '@chakra-ui/react';
14
14
  export const TileCta = (_a) => {
15
15
  var { callback } = _a, props = __rest(_a, ["callback"]);
16
16
  const { type, value } = props;
17
- return (_jsx(Button, { onClick: () => callback === null || callback === void 0 ? void 0 : callback(Object.assign({}, props)), variant: type === 'primary-cta' ? 'tertiaryFooter' : 'secondaryFooter', fontSize: "sm", maxW: "full", children: value }));
17
+ return (_jsx(Button, { onClick: () => callback === null || callback === void 0 ? void 0 : callback(Object.assign({}, props)), variant: type === 'primary-cta' ? 'primary' : 'secondary', fontSize: "sm", textTransform: "capitalize", px: "none", bg: type === 'primary-cta' ? '' : 'neutral.white', children: value }));
18
18
  };
@@ -6,9 +6,11 @@ export const TileCta = ({ callback, ...props }: TileCtaI) => {
6
6
  return (
7
7
  <Button
8
8
  onClick={() => callback?.({ ...props })}
9
- variant={type === 'primary-cta' ? 'tertiaryFooter' : 'secondaryFooter'}
9
+ variant={type === 'primary-cta' ? 'primary' : 'secondary'}
10
10
  fontSize="sm"
11
- maxW="full"
11
+ textTransform="capitalize"
12
+ px="none"
13
+ bg={type === 'primary-cta' ? '' : 'neutral.white'}
12
14
  >
13
15
  {value}
14
16
  </Button>
@@ -1,2 +1,2 @@
1
1
  import { ReadOnlyDynamicFormI } from '../../../interfaces';
2
- export declare const ReadOnlyDynamicForm: ({ form: fields, onEdit, }: ReadOnlyDynamicFormI) => import("react/jsx-runtime").JSX.Element;
2
+ export declare const ReadOnlyDynamicForm: ({ form: fields, onClick, onEdit, }: ReadOnlyDynamicFormI) => import("react/jsx-runtime").JSX.Element;
@@ -1,10 +1,10 @@
1
1
  import { createElement as _createElement } from "react";
2
2
  import { jsx as _jsx } from "react/jsx-runtime";
3
3
  import { Box } from '@chakra-ui/react';
4
- import { ReadOnlyAppliances, ReadOnlyDate, ReadOnlyGrid, ReadOnlyGroup, ReadOnlyInput, ReadOnlyRating, ReadOnlyTextArea, } from '../..';
4
+ import { ReadOnlyAppliances, ReadOnlyDate, ReadOnlyGrid, ReadOnlyGroup, ReadOnlyInput, ReadOnlyNotes, ReadOnlyRating, ReadOnlyTextArea, } from '../..';
5
5
  import { fieldIcons } from '../../../helpers';
6
- export const ReadOnlyDynamicForm = ({ form: fields, onEdit = () => { }, }) => {
7
- return (_jsx(Box, { bg: "lightBlue.1", children: fields === null || fields === void 0 ? void 0 : fields.map((field) => {
6
+ export const ReadOnlyDynamicForm = ({ form: fields, onClick, onEdit = () => { }, }) => {
7
+ return (_jsx(Box, { bg: "lightBlue.1", overflow: "scroll", children: fields === null || fields === void 0 ? void 0 : fields.map((field) => {
8
8
  const { children = [], icon, id, name, type, value } = field;
9
9
  const baseProps = {
10
10
  key: `${id}-${name}-${value}-${type}`,
@@ -29,11 +29,13 @@ export const ReadOnlyDynamicForm = ({ form: fields, onEdit = () => { }, }) => {
29
29
  case 'textarea':
30
30
  return _jsx(ReadOnlyTextArea, Object.assign({}, baseProps));
31
31
  case 'grid':
32
- return _jsx(ReadOnlyGrid, { children: children }, id);
32
+ return (_jsx(ReadOnlyGrid, { children: children, onClick: onClick }, id));
33
33
  case 'group':
34
34
  return _jsx(ReadOnlyGroup, { children: children }, id);
35
35
  case 'appliances':
36
36
  return _createElement(ReadOnlyAppliances, Object.assign({}, field, { key: id, onEdit: onEdit }));
37
+ case 'notes':
38
+ return _createElement(ReadOnlyNotes, Object.assign({}, field, { key: id }));
37
39
  default:
38
40
  return null;
39
41
  }
@@ -1,2 +1,2 @@
1
1
  import { ReadOnlyGridI } from '../../../../interfaces';
2
- export declare const ReadOnlyGrid: ({ children, ...props }: ReadOnlyGridI) => import("react/jsx-runtime").JSX.Element;
2
+ export declare const ReadOnlyGrid: ({ children, onClick, ...props }: ReadOnlyGridI) => import("react/jsx-runtime").JSX.Element;
@@ -11,11 +11,11 @@ var __rest = (this && this.__rest) || function (s, e) {
11
11
  };
12
12
  import { jsx as _jsx } from "react/jsx-runtime";
13
13
  import { Flex } from '@chakra-ui/react';
14
- import { ReadOnlyDate, ReadOnlyInput } from '../../..';
14
+ import { ReadOnlyDate, ReadOnlyGuidelines, ReadOnlyInput, ReadOnlyItemRelated, } from '../../..';
15
15
  import { fieldIcons } from '../../../../helpers';
16
16
  export const ReadOnlyGrid = (_a) => {
17
- var { children } = _a, props = __rest(_a, ["children"]);
18
- return (_jsx(Flex, Object.assign({ align: "stretch", gap: "base", borderBottom: "1px dashed", borderColor: "lightBlue.6", p: "base" }, props, { children: children === null || children === void 0 ? void 0 : children.map(({ id, name, value, type, icon }) => {
17
+ var { children, onClick } = _a, props = __rest(_a, ["children", "onClick"]);
18
+ return (_jsx(Flex, Object.assign({ align: "stretch", gap: "base", borderBottom: "1px dashed", borderColor: "lightBlue.6", p: "base" }, props, { children: children === null || children === void 0 ? void 0 : children.map(({ children, id, name, value, type, icon }) => {
19
19
  const baseProps = {
20
20
  key: `${id}-${name}-${value}-${type}`,
21
21
  id,
@@ -34,6 +34,10 @@ export const ReadOnlyGrid = (_a) => {
34
34
  return (_jsx(ReadOnlyInput, Object.assign({}, baseProps, { border: "none", flex: "auto", p: "0" })));
35
35
  case 'date':
36
36
  return _jsx(ReadOnlyDate, Object.assign({}, baseProps, { name: name, p: "0" }));
37
+ case 'guidelines':
38
+ return (_jsx(ReadOnlyGuidelines, { name: name, children: children, onClick: onClick }, id));
39
+ case 'item-related':
40
+ return (_jsx(ReadOnlyItemRelated, { name: name, children: children, onClick: onClick }, id));
37
41
  default:
38
42
  return null;
39
43
  }
@@ -0,0 +1,2 @@
1
+ import { ReportI } from '../../../../interfaces';
2
+ export declare const ReadOnlyNotes: ({ name, value, }: Pick<ReportI, "name" | "value">) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,5 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Stack, Text } from '@chakra-ui/react';
3
+ export const ReadOnlyNotes = ({ name, value, }) => {
4
+ return (_jsxs(Stack, { p: "base", spacing: "base", children: [_jsx(Text, { fontSize: "xs", textTransform: "uppercase", children: name }), _jsx(Text, { fontFamily: "secondary", children: value })] }));
5
+ };
@@ -5,7 +5,7 @@ import { colors } from '../../../../../theme/colors';
5
5
  export const ReadOnlyAppliances = ({ description, id, name, children, onEdit, value, }) => {
6
6
  const rating = children === null || children === void 0 ? void 0 : children.find(({ type }) => type === 'rating');
7
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 }) => {
8
+ return (_jsxs(Stack, { spacing: "base", p: "base", bg: "neutral.white", mt: "2px", 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
9
  const baseProps = {
10
10
  key: `${id}-${name}-${value}-${type}`,
11
11
  id,
@@ -19,7 +19,7 @@ export const ReadOnlyAppliances = ({
19
19
  const rating = children?.find(({ type }) => type === 'rating')
20
20
  const images = children?.find(({ type }) => type === 'images')
21
21
  return (
22
- <Stack spacing="base" p="base">
22
+ <Stack spacing="base" p="base" bg="neutral.white" mt="2px">
23
23
  <Flex justify="space-between">
24
24
  <Text fontSize="xs" textTransform="uppercase">
25
25
  {name}
@@ -0,0 +1,2 @@
1
+ import { ReadOnlyGuidelinesI } from '../../../../../interfaces';
2
+ export declare const ReadOnlyGuidelines: ({ name, children, onClick, }: ReadOnlyGuidelinesI) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,11 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Text, Stack, Grid } from '@chakra-ui/react';
3
+ import { HiddenField } from '../../../..';
4
+ import { fieldIcons } from '../../../../../helpers';
5
+ export const ReadOnlyGuidelines = ({ name, children, onClick, }) => {
6
+ return (_jsxs(Stack, { spacing: "base", children: [_jsx(Text, { fontSize: "xs", textTransform: "uppercase", children: name }), _jsx(Grid, { templateColumns: "repeat(2, minmax(80px, 1fr))", gap: "base", children: children === null || children === void 0 ? void 0 : children.map((child) => {
7
+ const { id, icon, value } = child;
8
+ const btnIcon = icon ? fieldIcons[icon] : '';
9
+ return (_jsx(HiddenField, { id: id, icon: btnIcon, name: value, onClick: () => onClick === null || onClick === void 0 ? void 0 : onClick(id) }, id));
10
+ }) })] }));
11
+ };
@@ -0,0 +1,33 @@
1
+ import { Text, Stack, Grid } from '@chakra-ui/react'
2
+ import { HiddenField } from '@/components'
3
+ import { ReadOnlyGuidelinesI } from '@/interfaces'
4
+ import { fieldIcons } from '@/helpers'
5
+
6
+ export const ReadOnlyGuidelines = ({
7
+ name,
8
+ children,
9
+ onClick,
10
+ }: ReadOnlyGuidelinesI) => {
11
+ return (
12
+ <Stack spacing="base">
13
+ <Text fontSize="xs" textTransform="uppercase">
14
+ {name}
15
+ </Text>
16
+ <Grid templateColumns="repeat(2, minmax(80px, 1fr))" gap="base">
17
+ {children?.map((child) => {
18
+ const { id, icon, value } = child
19
+ const btnIcon = icon ? fieldIcons[icon] : ''
20
+ return (
21
+ <HiddenField
22
+ key={id}
23
+ id={id}
24
+ icon={btnIcon}
25
+ name={value as string}
26
+ onClick={() => onClick?.(id)}
27
+ />
28
+ )
29
+ })}
30
+ </Grid>
31
+ </Stack>
32
+ )
33
+ }
@@ -6,5 +6,5 @@ export const ReadOnlyHomeItemImages = (props) => {
6
6
  const [mainImage, setMainImage] = useState(images === null || images === void 0 ? void 0 : images[0]);
7
7
  if (!images)
8
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) }))) })] }));
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) }, image))) })] }));
10
10
  };
@@ -14,6 +14,7 @@ export const ReadOnlyHomeItemImages = (props: Partial<ReportI>) => {
14
14
  <SimpleGrid columns={4} spacing="base">
15
15
  {images?.map((image) => (
16
16
  <Box
17
+ key={image}
17
18
  as="button"
18
19
  backgroundImage={image}
19
20
  backgroundSize="cover"
@@ -0,0 +1,2 @@
1
+ import { ReadOnlyGuidelinesI } from '../../../../../interfaces';
2
+ export declare const ReadOnlyItemRelated: ({ name, children, onClick, }: ReadOnlyGuidelinesI) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,11 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Text, Stack, Grid, Box } from '@chakra-ui/react';
3
+ import { HiddenField } from '../../../..';
4
+ import { fieldIcons } from '../../../../../helpers';
5
+ export const ReadOnlyItemRelated = ({ name, children, onClick, }) => {
6
+ return (_jsx(Box, { borderLeft: "1px solid", borderColor: "lightBlue.6", pl: "4", marginInlineStart: "auto", children: _jsxs(Stack, { spacing: "base", children: [_jsx(Text, { fontSize: "xs", textTransform: "uppercase", children: name }), _jsx(Grid, { templateColumns: "repeat(2, minmax(80px, 1fr))", gap: "base", children: children === null || children === void 0 ? void 0 : children.map((child) => {
7
+ const { id, icon, value } = child;
8
+ const btnIcon = icon ? fieldIcons[icon] : '';
9
+ return (_jsx(HiddenField, { id: id, icon: btnIcon, name: value, onClick: () => onClick === null || onClick === void 0 ? void 0 : onClick(id) }, id));
10
+ }) })] }) }));
11
+ };
@@ -0,0 +1,40 @@
1
+ import { Text, Stack, Grid, Box } from '@chakra-ui/react'
2
+ import { HiddenField } from '@/components'
3
+ import { ReadOnlyGuidelinesI } from '@/interfaces'
4
+ import { fieldIcons } from '@/helpers'
5
+
6
+ export const ReadOnlyItemRelated = ({
7
+ name,
8
+ children,
9
+ onClick,
10
+ }: ReadOnlyGuidelinesI) => {
11
+ return (
12
+ <Box
13
+ borderLeft="1px solid"
14
+ borderColor="lightBlue.6"
15
+ pl="4"
16
+ marginInlineStart="auto"
17
+ >
18
+ <Stack spacing="base">
19
+ <Text fontSize="xs" textTransform="uppercase">
20
+ {name}
21
+ </Text>
22
+ <Grid templateColumns="repeat(2, minmax(80px, 1fr))" gap="base">
23
+ {children?.map((child) => {
24
+ const { id, icon, value } = child
25
+ const btnIcon = icon ? fieldIcons[icon] : ''
26
+ return (
27
+ <HiddenField
28
+ key={id}
29
+ id={id}
30
+ icon={btnIcon}
31
+ name={value as string}
32
+ onClick={() => onClick?.(id)}
33
+ />
34
+ )
35
+ })}
36
+ </Grid>
37
+ </Stack>
38
+ </Box>
39
+ )
40
+ }
@@ -1,4 +1,6 @@
1
1
  export * from './ReadOnlyAppliances';
2
+ export * from './ReadOnlyGuidelines';
2
3
  export * from './ReadOnlyHomeItemImages';
3
4
  export * from './ReadOnlyHomeItemRating';
4
5
  export * from './ReadOnlyHomeItemText';
6
+ export * from './ReadOnlyItemRelated';
@@ -1,4 +1,6 @@
1
1
  export * from './ReadOnlyAppliances';
2
+ export * from './ReadOnlyGuidelines';
2
3
  export * from './ReadOnlyHomeItemImages';
3
4
  export * from './ReadOnlyHomeItemRating';
4
5
  export * from './ReadOnlyHomeItemText';
6
+ export * from './ReadOnlyItemRelated';
@@ -1,4 +1,6 @@
1
1
  export * from './ReadOnlyAppliances'
2
+ export * from './ReadOnlyGuidelines'
2
3
  export * from './ReadOnlyHomeItemImages'
3
4
  export * from './ReadOnlyHomeItemRating'
4
5
  export * from './ReadOnlyHomeItemText'
6
+ export * from './ReadOnlyItemRelated'
@@ -4,6 +4,7 @@ export * from './ReadOnlyImage';
4
4
  export * from './ReadOnlyGrid';
5
5
  export * from './ReadOnlyGroup';
6
6
  export * from './ReadOnlyInput';
7
+ export * from './ReadOnlyNotes';
7
8
  export * from './ReadOnlyRating';
8
9
  export * from './ReadOnlyTextArea';
9
10
  export * from './ReadOnlyWrapper';
@@ -4,6 +4,7 @@ export * from './ReadOnlyImage';
4
4
  export * from './ReadOnlyGrid';
5
5
  export * from './ReadOnlyGroup';
6
6
  export * from './ReadOnlyInput';
7
+ export * from './ReadOnlyNotes';
7
8
  export * from './ReadOnlyRating';
8
9
  export * from './ReadOnlyTextArea';
9
10
  export * from './ReadOnlyWrapper';
@@ -1,2 +1,2 @@
1
1
  import { ViewingHomeItemPanelI } from '../../interfaces';
2
- export declare const ViewingHomeItemPanel: ({ form, onClose, onEdit, }: ViewingHomeItemPanelI) => import("react/jsx-runtime").JSX.Element;
2
+ export declare const ViewingHomeItemPanel: ({ form, onClick, onClose, onEdit, }: ViewingHomeItemPanelI) => import("react/jsx-runtime").JSX.Element;
@@ -3,7 +3,7 @@ import { t } from 'i18next';
3
3
  import { Box, Divider, DrawerContent, DrawerHeader } from '@chakra-ui/react';
4
4
  import { PanelHeader, ReadOnlyDynamicForm, TabsHeader } from '..';
5
5
  import { Painting } from '../../assets/images';
6
- export const ViewingHomeItemPanel = ({ form, onClose, onEdit, }) => {
6
+ export const ViewingHomeItemPanel = ({ form, onClick, onClose, onEdit, }) => {
7
7
  const tabs = [
8
8
  {
9
9
  label: t('contacts.details'),
@@ -20,5 +20,5 @@ export const ViewingHomeItemPanel = ({ form, onClose, onEdit, }) => {
20
20
  component: _jsx("div", {}),
21
21
  },
22
22
  ];
23
- return (_jsxs(DrawerContent, { bg: "lightBlue.1", children: [_jsxs(DrawerHeader, { p: "0", children: [_jsx(PanelHeader, { handleCloseButton: onClose, title: t('homeItems.title'), icon: Painting }), _jsx(Divider, {}), _jsx(Box, { pt: "1", bg: "neutral.white", children: _jsx(TabsHeader, { tabList: tabs, rightTabList: rightTabs }) })] }), _jsx(ReadOnlyDynamicForm, { form: form, onEdit: onEdit })] }));
23
+ return (_jsxs(DrawerContent, { bg: "lightBlue.1", children: [_jsxs(DrawerHeader, { p: "0", children: [_jsx(PanelHeader, { handleCloseButton: onClose, title: t('homeItems.title'), icon: Painting }), _jsx(Divider, {}), _jsx(Box, { pt: "1", bg: "neutral.white", children: _jsx(TabsHeader, { tabList: tabs, rightTabList: rightTabs }) })] }), _jsx(ReadOnlyDynamicForm, { form: form, onClick: onClick, onEdit: onEdit })] }));
24
24
  };
@@ -5,10 +5,14 @@ import { ChatBubble } from '../../../assets/images';
5
5
  import { TextBadge } from '../..';
6
6
  import { formatDateWithAt } from '../../../utils';
7
7
  export const MessageCard = ({ message, onClick, variant = 'inbox', }) => {
8
- const { currentUser, from, subject, date, isNew, chatReplies, description } = message;
8
+ const { currentUser, from, subject, date, isNew, chatReplies, description = '', } = message;
9
9
  const formattedDate = formatDateWithAt({ date });
10
10
  const showChatBubble = Number(chatReplies === null || chatReplies === void 0 ? void 0 : chatReplies.length) > 0;
11
11
  const isInbox = variant === 'inbox';
12
12
  const isCurrentUser = (currentUser === null || currentUser === void 0 ? void 0 : currentUser.userName) === from;
13
- return (_jsxs(Flex, { gap: "base", children: [!isCurrentUser && !isInbox && (_jsx(Avatar, { size: "sm", name: from, bg: "blue.4", fontWeight: "bold", color: "neutral.white" })), _jsx(Container, { as: isInbox ? 'button' : 'div', bg: isCurrentUser ? 'yellow.6' : 'neutral.white', transition: "background-color 0.3s", textAlign: "left", _hover: isInbox ? { bg: 'lightGreen.1' } : {}, onClick: () => onClick === null || onClick === void 0 ? void 0 : onClick(message), children: _jsxs(Box, { children: [!isCurrentUser && (_jsxs(Flex, { justify: "space-between", align: "center", py: "1", pr: "base", pl: isNew ? '' : 'base', children: [_jsxs(Flex, { gap: "base", align: "center", position: "relative", left: isNew ? '-13px' : '', children: [isNew && isInbox && (_jsx(TextBadge, { text: "New", showAnimation: false, bgColor: "violet.1" })), _jsxs(Text, { variant: "home", color: "gray.1", children: [t('inbox.from'), _jsx(chakra.span, { color: "gray.4", children: from })] })] }), _jsx(Text, { variant: "home", fontSize: "xs", children: formattedDate })] })), isInbox && _jsx(Divider, {}), _jsxs(Stack, { spacing: "base", p: "base", children: [_jsxs(Flex, { align: "center", justify: "space-between", children: [_jsx(Text, { variant: "home", fontWeight: "bold", children: subject }), showChatBubble && isInbox && (_jsx(Center, { backgroundImage: `url(${ChatBubble})`, backgroundRepeat: "no-repeat", backgroundSize: "contain", backgroundPosition: "bottom", w: "20px", h: "24px", children: _jsx(Text, { fontSize: "10px", color: "blue.2", fontWeight: "bold", children: chatReplies === null || chatReplies === void 0 ? void 0 : chatReplies.length }) }))] }), isInbox && (_jsx(Text, { variant: "home", noOfLines: 3, textOverflow: "ellipsis", children: description })), !isInbox && _jsx(Text, { variant: "home", children: description })] })] }) })] }));
13
+ return (_jsxs(Flex, { gap: "base", children: [!isCurrentUser && !isInbox && (_jsx(Avatar, { size: "sm", name: from, bg: "blue.4", fontWeight: "bold", color: "neutral.white" })), _jsx(Container, { as: isInbox ? 'button' : 'div', bg: isCurrentUser ? 'yellow.6' : 'neutral.white', transition: "background-color 0.3s", textAlign: "left", _hover: isInbox ? { bg: 'lightGreen.1' } : {}, onClick: () => onClick === null || onClick === void 0 ? void 0 : onClick(message), children: _jsxs(Box, { children: [!isCurrentUser && (_jsxs(Flex, { justify: "space-between", align: "center", py: "1", pr: "base", pl: isNew ? '' : 'base', children: [_jsxs(Flex, { gap: "base", align: "center", position: "relative", left: isNew ? '-13px' : '', children: [isNew && isInbox && (_jsx(TextBadge, { text: "New", showAnimation: false, bgColor: "violet.1" })), _jsxs(Text, { variant: "home", color: "gray.1", children: [t('inbox.from'), _jsx(chakra.span, { color: "gray.4", children: from })] })] }), _jsx(Text, { variant: "home", fontSize: "xs", children: formattedDate })] })), isInbox && _jsx(Divider, {}), _jsxs(Stack, { spacing: "base", p: "base", children: [_jsxs(Flex, { align: "center", justify: "space-between", children: [_jsx(Text, { variant: "home", fontWeight: "bold", children: subject }), showChatBubble && isInbox && (_jsx(Center, { backgroundImage: `url(${ChatBubble})`, backgroundRepeat: "no-repeat", backgroundSize: "contain", backgroundPosition: "bottom", w: "20px", h: "24px", children: _jsx(Text, { fontSize: "10px", color: "blue.2", fontWeight: "bold", children: chatReplies === null || chatReplies === void 0 ? void 0 : chatReplies.length }) }))] }), isInbox && (_jsx(Text, { variant: "home", noOfLines: 3, textOverflow: "ellipsis", dangerouslySetInnerHTML: {
14
+ __html: description,
15
+ } })), !isInbox && (_jsx(Text, { variant: "home", dangerouslySetInnerHTML: {
16
+ __html: description,
17
+ } }))] })] }) })] }));
14
18
  };
@@ -1,8 +1,9 @@
1
- import { Paint, Receipt, Barcode, GoldenBars, Heart, Rating, Notes, Book, ImgIcon, Registry, ShareWith, Calendar, Contacts, Tools2, Billing, Calc, CheckPen, GenericField, Price, Battery2, Co2, Detector, Electricity, Sprinkler, SixtyEight, DropCalendar, MobileDrop, SolarPanel, Calendar2, Drop, Wind, Foundation, Heater, Light, Plate, Pool2, Closet, Structure, GlassWater, Roof2, Target, CircleFace, Company, Pressure, WindowCleaning, RoofCleaning, HolidayLights, GutterCleaning, HomeCleaning, HouseWashing, PressureWasher, } from '../../assets/images';
1
+ import { Paint, Receipt, Barcode, GoldenBars, Heart, Rating, Notes, Book, ImgIcon, Registry, ShareWith, Calendar, Contacts, Tools2, Billing, Calc, CheckPen, GenericField, Price, Battery2, Co2, Detector, Electricity, Sprinkler, SixtyEight, DropCalendar, MobileDrop, SolarPanel, Calendar2, Drop, Wind, Foundation, Heater, Light, Plate, Pool2, Closet, Structure, GlassWater, Roof2, Target, CircleFace, Pressure, WindowCleaning, RoofCleaning, HolidayLights, GutterCleaning, HomeCleaning, HouseWashing, PressureWasher, BookOpened, Company2, } from '../../assets/images';
2
2
  export const fieldIcons = {
3
3
  barcode: Barcode,
4
4
  billing: Billing,
5
5
  book: Book,
6
+ 'book-opened': BookOpened,
6
7
  calc: Calc,
7
8
  check: CheckPen,
8
9
  contact: Contacts,
@@ -44,7 +45,7 @@ export const fieldIcons = {
44
45
  house: Structure,
45
46
  target: Target,
46
47
  title: CircleFace,
47
- company: Company,
48
+ company: Company2,
48
49
  'sh-gutter': GutterCleaning,
49
50
  'sh-home': HomeCleaning,
50
51
  'sh-house': HouseWashing,
@@ -1,8 +1,11 @@
1
1
  import { t } from 'i18next';
2
- import { useState } from 'react';
2
+ import { useState, useEffect } from 'react';
3
3
  export const useMessagePanel = (messages) => {
4
4
  const [sortedMessages, setSortedMessages] = useState(messages);
5
5
  const [currentSort, setCurrentSort] = useState(t('forms.sortBy'));
6
+ useEffect(() => {
7
+ setSortedMessages(messages);
8
+ }, [messages]);
6
9
  const handleSelectItem = (item) => {
7
10
  if (typeof item !== 'string')
8
11
  return;