@homefile/components-v2 1.1.0 → 1.2.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 (112) hide show
  1. package/dist/assets/images/index.d.ts +3 -1
  2. package/dist/assets/images/index.js +3 -1
  3. package/dist/assets/images/index.ts +4 -0
  4. package/dist/assets/images/sms.svg +21 -0
  5. package/dist/assets/images/social.svg +10 -0
  6. package/dist/assets/locales/en/index.json +6 -0
  7. package/dist/components/contacts/ContactCard.d.ts +1 -1
  8. package/dist/components/contacts/ContactCard.js +2 -2
  9. package/dist/components/contacts/ContactCardHeader.d.ts +1 -1
  10. package/dist/components/contacts/ContactCardHeader.js +5 -4
  11. package/dist/components/contacts/ContactsContent.d.ts +1 -1
  12. package/dist/components/contacts/ContactsContent.js +2 -2
  13. package/dist/components/contacts/ShareContactPopover.d.ts +2 -0
  14. package/dist/components/contacts/ShareContactPopover.js +32 -0
  15. package/dist/components/contacts/index.d.ts +2 -0
  16. package/dist/components/contacts/index.js +2 -0
  17. package/dist/components/contacts/shareContactForms/ShareContactByEmail.d.ts +2 -0
  18. package/dist/components/contacts/shareContactForms/ShareContactByEmail.js +21 -0
  19. package/dist/components/contacts/shareContactForms/index.d.ts +1 -0
  20. package/dist/components/contacts/shareContactForms/index.js +1 -0
  21. package/dist/components/folderPanel/displayFiles/GridFile.js +1 -1
  22. package/dist/components/folderPanel/displayFiles/IconMenuWithMove.js +1 -1
  23. package/dist/components/folderPanel/displayFiles/ListFile.js +1 -1
  24. package/dist/components/folderPanel/displayFiles/MoveModal.js +1 -1
  25. package/dist/components/forms/dynamicForm/HiddenField.d.ts +1 -1
  26. package/dist/components/forms/dynamicForm/HiddenField.js +7 -2
  27. package/dist/components/homeBoard/HomeBoard.js +1 -1
  28. package/dist/components/homeBoard/HomeCard.js +1 -1
  29. package/dist/components/homeSummary/DocumentMenu.js +1 -1
  30. package/dist/components/icons/ShareIcon.d.ts +4 -0
  31. package/dist/components/icons/ShareIcon.js +5 -0
  32. package/dist/components/icons/index.d.ts +1 -0
  33. package/dist/components/icons/index.js +1 -0
  34. package/dist/components/launchpad/IconMenu.js +1 -1
  35. package/dist/components/myHomes/MyHomeCard.js +1 -1
  36. package/dist/components/myHomes/MyHomes.js +1 -1
  37. package/dist/components/myProfile/permissions/RolePermissionsTab.js +1 -1
  38. package/dist/components/overlay/Overlay.d.ts +1 -1
  39. package/dist/components/overlay/Overlay.js +2 -2
  40. package/dist/components/rooms/GroupCard.d.ts +1 -1
  41. package/dist/components/rooms/GroupCard.js +3 -3
  42. package/dist/components/rooms/ItemCard.d.ts +1 -1
  43. package/dist/components/rooms/ItemCard.js +2 -2
  44. package/dist/components/sendDocument/RecipientCard.js +1 -1
  45. package/dist/components/sharedHomePanel/ShareHomeContactList.js +1 -1
  46. package/dist/helpers/homeAssistant/HomeAssistant.helper.js +6 -7
  47. package/dist/helpers/myProfile/RolePermissions.helper.js +25 -25
  48. package/dist/hooks/myProfile/useRolePermissionsTab.js +4 -0
  49. package/dist/interfaces/contacts/ContactCard.interface.d.ts +3 -1
  50. package/dist/interfaces/contacts/ContactCardHeader.interface.d.ts +3 -1
  51. package/dist/interfaces/contacts/ContactsContent.interface.d.ts +4 -2
  52. package/dist/interfaces/contacts/ShareContactByEmail.interface.d.ts +11 -0
  53. package/dist/interfaces/contacts/ShareContactByEmail.interface.js +1 -0
  54. package/dist/interfaces/contacts/ShareContactPopover.interface.d.ts +8 -0
  55. package/dist/interfaces/contacts/ShareContactPopover.interface.js +1 -0
  56. package/dist/interfaces/contacts/index.d.ts +2 -0
  57. package/dist/interfaces/contacts/index.js +2 -0
  58. package/dist/interfaces/forms/dynamicForm/HiddenField.interface.d.ts +2 -0
  59. package/dist/interfaces/overlay/Overlay.interface.d.ts +2 -1
  60. package/dist/interfaces/rooms/GroupCard.interface.d.ts +1 -0
  61. package/dist/interfaces/rooms/ItemCard.interface.d.ts +1 -0
  62. package/dist/mocks/myProfile/Permissions.mock.js +9 -11
  63. package/dist/stories/assets/Illustrations.stories.js +2 -2
  64. package/dist/theme/colors.d.ts +1 -0
  65. package/dist/theme/colors.js +1 -0
  66. package/package.json +1 -1
  67. package/src/assets/images/index.ts +4 -0
  68. package/src/assets/images/sms.svg +21 -0
  69. package/src/assets/images/social.svg +10 -0
  70. package/src/assets/locales/en/index.json +6 -0
  71. package/src/components/contacts/ContactCard.tsx +13 -2
  72. package/src/components/contacts/ContactCardHeader.tsx +33 -8
  73. package/src/components/contacts/ContactsContent.tsx +4 -0
  74. package/src/components/contacts/ShareContactPopover.tsx +106 -0
  75. package/src/components/contacts/index.ts +3 -1
  76. package/src/components/contacts/shareContactForms/ShareContactByEmail.tsx +50 -0
  77. package/src/components/contacts/shareContactForms/index.ts +1 -0
  78. package/src/components/folderPanel/displayFiles/GridFile.tsx +1 -0
  79. package/src/components/folderPanel/displayFiles/IconMenuWithMove.tsx +1 -1
  80. package/src/components/folderPanel/displayFiles/ListFile.tsx +1 -0
  81. package/src/components/folderPanel/displayFiles/MoveModal.tsx +1 -1
  82. package/src/components/forms/dynamicForm/HiddenField.tsx +16 -2
  83. package/src/components/homeBoard/HomeBoard.tsx +1 -0
  84. package/src/components/homeBoard/HomeCard.tsx +1 -0
  85. package/src/components/homeSummary/DocumentMenu.tsx +1 -1
  86. package/src/components/icons/ShareIcon.tsx +74 -0
  87. package/src/components/icons/index.ts +1 -0
  88. package/src/components/launchpad/IconMenu.tsx +1 -1
  89. package/src/components/myHomes/MyHomeCard.tsx +12 -8
  90. package/src/components/myHomes/MyHomes.tsx +1 -1
  91. package/src/components/myProfile/permissions/RolePermissionsTab.tsx +1 -1
  92. package/src/components/overlay/Overlay.tsx +2 -0
  93. package/src/components/rooms/GroupCard.tsx +3 -1
  94. package/src/components/rooms/ItemCard.tsx +2 -0
  95. package/src/components/sendDocument/RecipientCard.tsx +1 -0
  96. package/src/components/sharedHomePanel/ShareHomeContactList.tsx +1 -1
  97. package/src/helpers/homeAssistant/HomeAssistant.helper.tsx +6 -7
  98. package/src/helpers/myProfile/RolePermissions.helper.ts +25 -25
  99. package/src/hooks/myProfile/useRolePermissionsTab.ts +8 -0
  100. package/src/interfaces/contacts/ContactCard.interface.ts +3 -1
  101. package/src/interfaces/contacts/ContactCardHeader.interface.ts +4 -2
  102. package/src/interfaces/contacts/ContactsContent.interface.ts +5 -3
  103. package/src/interfaces/contacts/ShareContactByEmail.interface.ts +12 -0
  104. package/src/interfaces/contacts/ShareContactPopover.interface.ts +9 -0
  105. package/src/interfaces/contacts/index.ts +3 -1
  106. package/src/interfaces/forms/dynamicForm/HiddenField.interface.ts +2 -0
  107. package/src/interfaces/overlay/Overlay.interface.ts +2 -1
  108. package/src/interfaces/rooms/GroupCard.interface.ts +1 -0
  109. package/src/interfaces/rooms/ItemCard.interface.ts +1 -0
  110. package/src/mocks/myProfile/Permissions.mock.ts +9 -11
  111. package/src/stories/assets/Illustrations.stories.tsx +4 -0
  112. package/src/theme/colors.ts +1 -0
@@ -119,6 +119,8 @@ import Send from './send.svg';
119
119
  import ShareHome from './share-home.svg';
120
120
  import ShareWith from './share-with.svg';
121
121
  import SixtyEight from './sixty-eight.svg';
122
+ import SMS from './sms.svg';
123
+ import Social from './social.svg';
122
124
  import SolarPanel from './solar-panel.svg';
123
125
  import Sprinkler from './sprinkler.svg';
124
126
  import Structure from './structure.svg';
@@ -146,7 +148,7 @@ import WizardDetailed from './wizard-detailed.svg';
146
148
  import WizardQuick from './wizard-quick.svg';
147
149
  import YellowFolder from './yellow-folder.svg';
148
150
  import YellowFolderUnshared from './yellow-folder-unshared.svg';
149
- export { AlertDelete, AlertDeletePurple, Arrow, Batery, Bathroom, Battery2, Bedroom, BgBlue, BgLogo, Billing, BillingAddress, BlueFolder, BlueFolderShared, Box, Building, Calc, Calendar2, Catalog, Check, CheckInCircle, CheckPen, Chemistry, Cleaning, Closet, Clouds, Co2, ComputerReport, Confirmation, Construction, Contacts, Contacts2, Contributor, CreditCard, Detector, Diamond, DiningRoom, DocIcon, Document, Drop, DropCalendar, Electricity, Entryway, Exclamation, Face, Feedback, FileUploading, Finance, Fire, Flag, FormSent, Foundation, Garage, GearPencil, GearTime, GenericField, GlassWater, GreenFolder, Group, Groups, GuestBedroom, Hallway, HandPencil, Heater, Help, HomeAddress, Homeowner, House, HouseHands, IA, ImageDefault, ImgIcon, Inbox, Insect, Kitchen, Laundry, Light, LivingRoom, Loading, LogoCompany, LogoSmall, MagnifyingGlassReport, Manager, MasterBedroom, Member, Message, MobileDrop, Money, Mudroom, NeedHelp, Office, Painting, PartnerGeneric, Patio, PdfIcon, PersonMail, Plate, Play, Plus, Pool, Pool2, Price, Profile, ProgressReport, Proposal, RealEstate, Receipt, ReceiptBg, ReceiptHouse, Receipts, Recipient, Records, Register, RelationshipHome, ResendPassword, Rocket, Roof2, Security, Send, ShareHome, ShareWith, SixtyEight, SolarPanel, Sprinkler, Structure, Subscription, Target, Temperature, Theatre, Thumbnail, ThumbnailSmall, ThumbUp, Trash, Trees, TreesCrop, TreesCrop2, VideoIcon, VideoPlay, VioletFolder, Warning, Warranty, WellDone, WholeHome, Wind, Wizard, WizardDetailed, WizardQuick, YellowFolder, YellowFolderUnshared, };
151
+ export { AlertDelete, AlertDeletePurple, Arrow, Batery, Bathroom, Battery2, Bedroom, BgBlue, BgLogo, Billing, BillingAddress, BlueFolder, BlueFolderShared, Box, Building, Calc, Calendar2, Catalog, Check, CheckInCircle, CheckPen, Chemistry, Cleaning, Closet, Clouds, Co2, ComputerReport, Confirmation, Construction, Contacts, Contacts2, Contributor, CreditCard, Detector, Diamond, DiningRoom, DocIcon, Document, Drop, DropCalendar, Electricity, Entryway, Exclamation, Face, Feedback, FileUploading, Finance, Fire, Flag, FormSent, Foundation, Garage, GearPencil, GearTime, GenericField, GlassWater, GreenFolder, Group, Groups, GuestBedroom, Hallway, HandPencil, Heater, Help, HomeAddress, Homeowner, House, HouseHands, IA, ImageDefault, ImgIcon, Inbox, Insect, Kitchen, Laundry, Light, LivingRoom, Loading, LogoCompany, LogoSmall, MagnifyingGlassReport, Manager, MasterBedroom, Member, Message, MobileDrop, Money, Mudroom, NeedHelp, Office, Painting, PartnerGeneric, Patio, PdfIcon, PersonMail, Plate, Play, Plus, Pool, Pool2, Price, Profile, ProgressReport, Proposal, RealEstate, Receipt, ReceiptBg, ReceiptHouse, Receipts, Recipient, Records, Register, RelationshipHome, ResendPassword, Rocket, Roof2, Security, Send, ShareHome, ShareWith, SixtyEight, SMS, Social, SolarPanel, Sprinkler, Structure, Subscription, Target, Temperature, Theatre, Thumbnail, ThumbnailSmall, ThumbUp, Trash, Trees, TreesCrop, TreesCrop2, VideoIcon, VideoPlay, VioletFolder, Warning, Warranty, WellDone, WholeHome, Wind, Wizard, WizardDetailed, WizardQuick, YellowFolder, YellowFolderUnshared, };
150
152
  export * from './appliances';
151
153
  export * from './clouds-animation';
152
154
  export * from './form';
@@ -119,6 +119,8 @@ import Send from './send.svg';
119
119
  import ShareHome from './share-home.svg';
120
120
  import ShareWith from './share-with.svg';
121
121
  import SixtyEight from './sixty-eight.svg';
122
+ import SMS from './sms.svg';
123
+ import Social from './social.svg';
122
124
  import SolarPanel from './solar-panel.svg';
123
125
  import Sprinkler from './sprinkler.svg';
124
126
  import Structure from './structure.svg';
@@ -146,7 +148,7 @@ import WizardDetailed from './wizard-detailed.svg';
146
148
  import WizardQuick from './wizard-quick.svg';
147
149
  import YellowFolder from './yellow-folder.svg';
148
150
  import YellowFolderUnshared from './yellow-folder-unshared.svg';
149
- export { AlertDelete, AlertDeletePurple, Arrow, Batery, Bathroom, Battery2, Bedroom, BgBlue, BgLogo, Billing, BillingAddress, BlueFolder, BlueFolderShared, Box, Building, Calc, Calendar2, Catalog, Check, CheckInCircle, CheckPen, Chemistry, Cleaning, Closet, Clouds, Co2, ComputerReport, Confirmation, Construction, Contacts, Contacts2, Contributor, CreditCard, Detector, Diamond, DiningRoom, DocIcon, Document, Drop, DropCalendar, Electricity, Entryway, Exclamation, Face, Feedback, FileUploading, Finance, Fire, Flag, FormSent, Foundation, Garage, GearPencil, GearTime, GenericField, GlassWater, GreenFolder, Group, Groups, GuestBedroom, Hallway, HandPencil, Heater, Help, HomeAddress, Homeowner, House, HouseHands, IA, ImageDefault, ImgIcon, Inbox, Insect, Kitchen, Laundry, Light, LivingRoom, Loading, LogoCompany, LogoSmall, MagnifyingGlassReport, Manager, MasterBedroom, Member, Message, MobileDrop, Money, Mudroom, NeedHelp, Office, Painting, PartnerGeneric, Patio, PdfIcon, PersonMail, Plate, Play, Plus, Pool, Pool2, Price, Profile, ProgressReport, Proposal, RealEstate, Receipt, ReceiptBg, ReceiptHouse, Receipts, Recipient, Records, Register, RelationshipHome, ResendPassword, Rocket, Roof2, Security, Send, ShareHome, ShareWith, SixtyEight, SolarPanel, Sprinkler, Structure, Subscription, Target, Temperature, Theatre, Thumbnail, ThumbnailSmall, ThumbUp, Trash, Trees, TreesCrop, TreesCrop2, VideoIcon, VideoPlay, VioletFolder, Warning, Warranty, WellDone, WholeHome, Wind, Wizard, WizardDetailed, WizardQuick, YellowFolder, YellowFolderUnshared, };
151
+ export { AlertDelete, AlertDeletePurple, Arrow, Batery, Bathroom, Battery2, Bedroom, BgBlue, BgLogo, Billing, BillingAddress, BlueFolder, BlueFolderShared, Box, Building, Calc, Calendar2, Catalog, Check, CheckInCircle, CheckPen, Chemistry, Cleaning, Closet, Clouds, Co2, ComputerReport, Confirmation, Construction, Contacts, Contacts2, Contributor, CreditCard, Detector, Diamond, DiningRoom, DocIcon, Document, Drop, DropCalendar, Electricity, Entryway, Exclamation, Face, Feedback, FileUploading, Finance, Fire, Flag, FormSent, Foundation, Garage, GearPencil, GearTime, GenericField, GlassWater, GreenFolder, Group, Groups, GuestBedroom, Hallway, HandPencil, Heater, Help, HomeAddress, Homeowner, House, HouseHands, IA, ImageDefault, ImgIcon, Inbox, Insect, Kitchen, Laundry, Light, LivingRoom, Loading, LogoCompany, LogoSmall, MagnifyingGlassReport, Manager, MasterBedroom, Member, Message, MobileDrop, Money, Mudroom, NeedHelp, Office, Painting, PartnerGeneric, Patio, PdfIcon, PersonMail, Plate, Play, Plus, Pool, Pool2, Price, Profile, ProgressReport, Proposal, RealEstate, Receipt, ReceiptBg, ReceiptHouse, Receipts, Recipient, Records, Register, RelationshipHome, ResendPassword, Rocket, Roof2, Security, Send, ShareHome, ShareWith, SixtyEight, SMS, Social, SolarPanel, Sprinkler, Structure, Subscription, Target, Temperature, Theatre, Thumbnail, ThumbnailSmall, ThumbUp, Trash, Trees, TreesCrop, TreesCrop2, VideoIcon, VideoPlay, VioletFolder, Warning, Warranty, WellDone, WholeHome, Wind, Wizard, WizardDetailed, WizardQuick, YellowFolder, YellowFolderUnshared, };
150
152
  export * from './appliances';
151
153
  export * from './clouds-animation';
152
154
  export * from './form';
@@ -119,6 +119,8 @@ import Send from './send.svg'
119
119
  import ShareHome from './share-home.svg'
120
120
  import ShareWith from './share-with.svg'
121
121
  import SixtyEight from './sixty-eight.svg'
122
+ import SMS from './sms.svg'
123
+ import Social from './social.svg'
122
124
  import SolarPanel from './solar-panel.svg'
123
125
  import Sprinkler from './sprinkler.svg'
124
126
  import Structure from './structure.svg'
@@ -269,6 +271,8 @@ export {
269
271
  ShareHome,
270
272
  ShareWith,
271
273
  SixtyEight,
274
+ SMS,
275
+ Social,
272
276
  SolarPanel,
273
277
  Sprinkler,
274
278
  Structure,
@@ -0,0 +1,21 @@
1
+ <svg id="Group_18906" data-name="Group 18906" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="20.228" height="24" viewBox="0 0 20.228 24">
2
+ <defs>
3
+ <clipPath id="clip-path">
4
+ <rect id="Rectangle_22680" data-name="Rectangle 22680" width="20.227" height="24" fill="none"/>
5
+ </clipPath>
6
+ </defs>
7
+ <g id="Group_18894" data-name="Group 18894" clip-path="url(#clip-path)">
8
+ <path id="Path_14256" data-name="Path 14256" d="M7.713,26.082H8.926l1.288,1.469L11.5,26.082h1.815v5.3H0V14.26H13.316v3.114h-5.6a.762.762,0,0,0-.76.76v7.188a.762.762,0,0,0,.76.76" transform="translate(0 -11.033)" fill="#40566b"/>
9
+ <path id="Path_14257" data-name="Path 14257" d="M15.3,26.083v5.3H3.618V14.26H15.3V26.083Z" transform="translate(-2.799 -11.033)" fill="#daf1f3"/>
10
+ <rect id="Rectangle_22678" data-name="Rectangle 22678" width="6.635" height="0.453" transform="matrix(0.707, -0.707, 0.707, 0.707, 3.174, 12.446)" fill="#fff"/>
11
+ <rect id="Rectangle_22679" data-name="Rectangle 22679" width="6.593" height="0.453" transform="matrix(0.707, -0.707, 0.707, 0.707, 3.174, 15.761)" fill="#fff"/>
12
+ <path id="Path_14258" data-name="Path 14258" d="M44,28.781v7.188a.762.762,0,0,1-.758.76H35.27L33.982,38.2l-1.287-1.469H31.481a.762.762,0,0,1-.76-.76V28.781a.762.762,0,0,1,.76-.76H43.238a.761.761,0,0,1,.758.76" transform="translate(-23.769 -21.68)" fill="#e24c5d"/>
13
+ <path id="Path_14259" data-name="Path 14259" d="M70.756,41.351a1.026,1.026,0,1,1-1.025,1.025,1.026,1.026,0,0,1,1.025-1.025" transform="translate(-53.95 -31.993)" fill="#fff"/>
14
+ <path id="Path_14260" data-name="Path 14260" d="M56.147,41.351a1.026,1.026,0,1,1-1.028,1.025,1.026,1.026,0,0,1,1.028-1.025" transform="translate(-42.645 -31.993)" fill="#fff"/>
15
+ <path id="Path_14261" data-name="Path 14261" d="M41.548,41.351a1.026,1.026,0,1,1-1.027,1.025,1.025,1.025,0,0,1,1.027-1.025" transform="translate(-31.351 -31.993)" fill="#fff"/>
16
+ <path id="Path_14262" data-name="Path 14262" d="M13.316,89.931v2.385a1.268,1.268,0,0,1-1.265,1.263H1.263A1.268,1.268,0,0,1,0,92.316V89.931Z" transform="translate(0 -69.579)" fill="#40566b"/>
17
+ <path id="Path_14263" data-name="Path 14263" d="M13.316,1.263V3.227H0V1.263A1.268,1.268,0,0,1,1.263,0H12.051a1.268,1.268,0,0,1,1.265,1.263" fill="#40566b"/>
18
+ <path id="Path_14264" data-name="Path 14264" d="M25.614,6.309h-2.34a.339.339,0,1,1,0-.679h2.34a.339.339,0,0,1,0,.679" transform="translate(-17.745 -4.356)" fill="#18252f"/>
19
+ <path id="Path_14265" data-name="Path 14265" d="M27.057,94.069a.977.977,0,1,1-.977-.977.977.977,0,0,1,.977.977" transform="translate(-19.422 -72.025)" fill="#323954"/>
20
+ </g>
21
+ </svg>
@@ -0,0 +1,10 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="22.558" height="17.29" viewBox="0 0 22.558 17.29">
2
+ <g id="Group_18914" data-name="Group 18914" transform="translate(-2445.885 -801.401)">
3
+ <g id="Group_18893" data-name="Group 18893" transform="translate(2445.885 801.401)">
4
+ <g id="Group_18913" data-name="Group 18913" transform="translate(0 0)">
5
+ <path id="Path_14254" data-name="Path 14254" d="M22.558,13.5A1.3,1.3,0,0,1,21.264,14.8H7.73L5.541,17.29,3.351,14.8H1.291A1.3,1.3,0,0,1,0,13.5V1.291A1.293,1.293,0,0,1,1.291,0H21.264a1.3,1.3,0,0,1,1.294,1.291Zm-4.34-6.51-5.272,0-5.274,0" transform="translate(0 0)" fill="#e24c5d"/>
6
+ </g>
7
+ </g>
8
+ <text id="_" data-name="#" transform="translate(2450.934 812.401)" fill="#fff" font-size="10" font-family="Poppins-Medium, Poppins" font-weight="500"><tspan x="0" y="0">#</tspan></text>
9
+ </g>
10
+ </svg>
@@ -108,6 +108,7 @@
108
108
  "next": "Next",
109
109
  "previous": "Previous",
110
110
  "save": "Save",
111
+ "send": "Send",
111
112
  "skip": "Skip for now"
112
113
  },
113
114
  "createDocument": {
@@ -138,6 +139,11 @@
138
139
  },
139
140
  "contacts": {
140
141
  "addBtn": "Contact",
142
+ "error": "Email should be from a valid Homefile account",
143
+ "shareContact": "Share Contact",
144
+ "placeholders": {
145
+ "email": "Enter Email"
146
+ },
141
147
  "title": "Contacts"
142
148
  },
143
149
  "daysOfWeek": {
@@ -1,2 +1,2 @@
1
1
  import { ContactCardI } from '../../interfaces';
2
- export declare const ContactCard: ({ contact, index, menuItems }: ContactCardI) => import("react/jsx-runtime").JSX.Element;
2
+ export declare const ContactCard: ({ apiError, contact, index, menuItems, onShare, }: ContactCardI) => import("react/jsx-runtime").JSX.Element;
@@ -2,7 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Box, Container, Flex, Stack } from '@chakra-ui/react';
3
3
  import { ContactCardHeader, ContactCardInfo, ContactCardAddress, } from '..';
4
4
  import { colors } from '../../theme/colors';
5
- export const ContactCard = ({ contact, index, menuItems }) => {
5
+ export const ContactCard = ({ apiError, contact, index, menuItems, onShare, }) => {
6
6
  const { address, city, state, zip, company, email, firstName, lastName, phone, } = contact;
7
- return (_jsx(Container, { maxW: 'none', children: _jsxs(Stack, { pb: "base", px: "base", children: [_jsx(ContactCardHeader, { contact: contact, menuItems: menuItems }), _jsxs(Flex, { justify: "space-between", align: "stretch", gap: "base", children: [_jsx(ContactCardInfo, { company, email, firstName, lastName, phone, index }), _jsx(Box, { borderLeft: `1px solid ${colors.lightBlue[1]}`, w: "45%", pl: "base", children: _jsx(ContactCardAddress, { company, address, city, state, zip }) })] })] }) }));
7
+ return (_jsx(Container, { maxW: 'none', children: _jsxs(Stack, { pb: "base", px: "base", children: [_jsx(ContactCardHeader, { apiError: apiError, contact: contact, menuItems: menuItems, onShare: onShare }), _jsxs(Flex, { justify: "space-between", align: "stretch", gap: "base", children: [_jsx(ContactCardInfo, { company, email, firstName, lastName, phone, index }), _jsx(Box, { borderLeft: `1px solid ${colors.lightBlue[1]}`, w: "45%", pl: "base", children: _jsx(ContactCardAddress, { company, address, city, state, zip }) })] })] }) }));
8
8
  };
@@ -1,2 +1,2 @@
1
1
  import { ContactCardHeaderI } from '../../interfaces';
2
- export declare const ContactCardHeader: ({ contact, menuItems, }: ContactCardHeaderI) => import("react/jsx-runtime").JSX.Element;
2
+ export declare const ContactCardHeader: ({ apiError, contact, menuItems, onShare, }: ContactCardHeaderI) => import("react/jsx-runtime").JSX.Element;
@@ -1,10 +1,11 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { t } from 'i18next';
3
- import { Flex, Image, Text } from '@chakra-ui/react';
3
+ import { Flex, IconButton, Image, Text, useDisclosure } from '@chakra-ui/react';
4
4
  import { Contacts } from '../../assets/images';
5
- import { IconMenu, MoreHorizontal } from '..';
6
- export const ContactCardHeader = ({ contact, menuItems, }) => {
5
+ import { IconMenu, MoreHorizontal, ShareContactPopover, ShareIcon, } from '..';
6
+ export const ContactCardHeader = ({ apiError, contact, menuItems, onShare, }) => {
7
7
  var _a;
8
8
  const { category, title } = contact;
9
- return (_jsxs(Flex, { align: "center", justify: "space-between", children: [_jsxs(Flex, { align: "center", gap: "base", children: [_jsx(Image, { src: Contacts, boxSize: "1rem", "aria-label": (_a = t('ariaLabels.contact')) !== null && _a !== void 0 ? _a : ' ' }), _jsxs(Flex, { align: "center", gap: "base", children: [_jsx(Text, { fontSize: "xs", children: category.toUpperCase() }), title && (_jsx(Text, { fontSize: "xs", color: "gray.4", children: "|" })), _jsx(Text, { fontSize: "xs", children: title.toUpperCase() })] })] }), _jsx(IconMenu, { icon: _jsx(MoreHorizontal, { size: 32 }), itemForm: contact, menuItems: menuItems, disabled: !menuItems })] }));
9
+ const { isOpen, onOpen, onClose } = useDisclosure();
10
+ return (_jsxs(Flex, { align: "center", justify: "space-between", children: [_jsxs(Flex, { align: "center", gap: "base", children: [_jsx(Image, { src: Contacts, boxSize: "1rem", "aria-label": (_a = t('ariaLabels.contact')) !== null && _a !== void 0 ? _a : ' ' }), _jsxs(Flex, { align: "center", gap: "base", children: [_jsx(Text, { fontSize: "xs", children: category.toUpperCase() }), title && (_jsx(Text, { fontSize: "xs", color: "gray.4", children: "|" })), _jsx(Text, { fontSize: "xs", children: title.toUpperCase() })] })] }), _jsxs(Flex, { align: "center", position: "relative", gap: "base", py: "base", children: [_jsx(IconButton, { "aria-label": "share", variant: "menuIcon", icon: _jsx(ShareIcon, { size: 18 }), onClick: onOpen, w: "fit-content" }), _jsx(ShareContactPopover, { apiError: apiError, contact: contact, isOpen: isOpen, onClose: onClose, onShare: onShare }), _jsx(IconMenu, { icon: _jsx(MoreHorizontal, { size: 32 }), itemForm: contact, menuItems: menuItems, disabled: menuItems.length < 1 })] })] }));
10
11
  };
@@ -1,2 +1,2 @@
1
1
  import { ContactsContentI } from '../../interfaces';
2
- export declare const ContactsContent: ({ contacts, menuItems, handleClose, children, handleAdd, disabled, }: ContactsContentI) => import("react/jsx-runtime").JSX.Element;
2
+ export declare const ContactsContent: ({ apiError, contacts, menuItems, handleClose, children, handleAdd, disabled, onShare, }: ContactsContentI) => import("react/jsx-runtime").JSX.Element;
@@ -4,9 +4,9 @@ import { DrawerContent, DrawerHeader, DrawerBody, Flex, Stack, } from '@chakra-u
4
4
  import { Contacts } from '../../assets/images';
5
5
  import { ContactCard, LeftButtonAnimated, PanelHeader, SearchInput, } from '..';
6
6
  import { useContactsContent, useWindowDimensions } from '../../hooks';
7
- export const ContactsContent = ({ contacts, menuItems, handleClose, children, handleAdd, disabled, }) => {
7
+ export const ContactsContent = ({ apiError, contacts, menuItems, handleClose, children, handleAdd, disabled, onShare, }) => {
8
8
  const { filteredContacts, handleChange, search } = useContactsContent(contacts);
9
9
  const { windowDimensions: { width }, } = useWindowDimensions();
10
10
  const maxW = width > 413 ? '16rem' : '10rem';
11
- return (_jsxs(DrawerContent, { bg: "lightBlue.1", children: [_jsxs(DrawerHeader, { p: "0", children: [_jsx(PanelHeader, { handleCloseButton: handleClose, icon: Contacts, title: t('contacts.title') }), _jsxs(Flex, { justify: "space-between", pl: "base", my: "base", align: "center", gap: "base", children: [_jsx(SearchInput, { maxW: maxW, value: search, onChange: handleChange }), _jsx(LeftButtonAnimated, { onClick: handleAdd, label: t('contacts.addBtn'), disabled: disabled })] })] }), _jsxs(DrawerBody, { p: "0", children: [_jsx(Stack, { spacing: "2", p: "base", bg: "lightBlue.2", minHeight: "full", children: filteredContacts.map((contact, idx) => (_jsx(ContactCard, { contact: contact, menuItems: menuItems, index: idx }, contact._id))) }), children] })] }));
11
+ return (_jsxs(DrawerContent, { bg: "lightBlue.1", children: [_jsxs(DrawerHeader, { p: "0", children: [_jsx(PanelHeader, { handleCloseButton: handleClose, icon: Contacts, title: t('contacts.title') }), _jsxs(Flex, { justify: "space-between", pl: "base", my: "base", align: "center", gap: "base", children: [_jsx(SearchInput, { maxW: maxW, value: search, onChange: handleChange }), _jsx(LeftButtonAnimated, { onClick: handleAdd, label: t('contacts.addBtn'), disabled: disabled })] })] }), _jsxs(DrawerBody, { p: "0", children: [_jsx(Stack, { spacing: "2", p: "base", bg: "lightBlue.2", minHeight: "full", children: filteredContacts.map((contact, idx) => (_jsx(ContactCard, { apiError: apiError, contact: contact, menuItems: menuItems, onShare: onShare, index: idx }, contact._id))) }), children] })] }));
12
12
  };
@@ -0,0 +1,2 @@
1
+ import { ShareContactPopoverI } from '../../interfaces';
2
+ export declare const ShareContactPopover: ({ apiError, contact, isOpen, onClose, onShare, }: ShareContactPopoverI) => import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,32 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import { Fragment, useState } from 'react';
3
+ import { t } from 'i18next';
4
+ import { Text, Box, Flex, IconButton, Grid } from '@chakra-ui/react';
5
+ import { HiddenField, Close, Overlay, ShareContactByEmail } from '..';
6
+ import { Feedback, ShareWith, SMS, Social } from '../../assets/images';
7
+ export const ShareContactPopover = ({ apiError, contact, isOpen, onClose, onShare, }) => {
8
+ const [activeField, setActiveField] = useState('email');
9
+ if (!isOpen)
10
+ return null;
11
+ const forms = {
12
+ email: (_jsx(ShareContactByEmail, { apiError: apiError, contact: contact, onShare: onShare })),
13
+ sms: _jsx(Fragment, {}),
14
+ social: _jsx(Fragment, {}),
15
+ homefile: _jsx(Fragment, {}),
16
+ };
17
+ return (_jsxs(_Fragment, { children: [_jsxs(Box, { position: "absolute", top: "0px", right: ['0px', '50px'], bg: "lightBlue.1", zIndex: "modal", w: "367px", borderRadius: "md", boxShadow: "xl", overflow: "hidden", children: [_jsxs(Flex, { justify: "space-between", align: "center", h: "34px", bg: "neutral.white", px: "base", children: [_jsx(Text, { fontSize: "sm", children: t('contacts.shareContact') }), _jsx(IconButton, { variant: "menuIcon", "aria-label": "Close", icon: _jsx(Close, {}), onClick: onClose, w: "fit-content" })] }), _jsxs(Box, { children: [forms[activeField], _jsx(Grid, { templateColumns: "repeat(auto-fill, minmax(70px, 1fr))", gap: "base", p: "base", children: fields.map(({ disabled, icon = 'email', id, name = '' }) => {
18
+ return (_jsx(HiddenField, { disabled: disabled, id: id, name: name, icon: fieldIcons[icon], onClick: () => setActiveField(id), isActive: id === activeField }, id));
19
+ }) })] })] }), _jsx(Overlay, { onClick: onClose, bg: "overlay", showOverlay: true, position: "fixed", zIndex: "4" })] }));
20
+ };
21
+ const fields = [
22
+ { disabled: true, icon: 'homefile', id: 'homefile', name: 'Homefile' },
23
+ { disabled: true, icon: 'social', id: 'social', name: 'Social' },
24
+ { disabled: true, icon: 'sms', id: 'sms', name: 'SMS' },
25
+ { disabled: false, icon: 'email', id: 'email', name: 'Email' },
26
+ ];
27
+ const fieldIcons = {
28
+ homefile: ShareWith,
29
+ social: Social,
30
+ sms: SMS,
31
+ email: Feedback,
32
+ };
@@ -1,5 +1,7 @@
1
+ export * from './shareContactForms';
1
2
  export * from './ContactCard';
2
3
  export * from './ContactCardAddress';
3
4
  export * from './ContactCardHeader';
4
5
  export * from './ContactCardInfo';
5
6
  export * from './ContactsContent';
7
+ export * from './ShareContactPopover';
@@ -1,5 +1,7 @@
1
+ export * from './shareContactForms';
1
2
  export * from './ContactCard';
2
3
  export * from './ContactCardAddress';
3
4
  export * from './ContactCardHeader';
4
5
  export * from './ContactCardInfo';
5
6
  export * from './ContactsContent';
7
+ export * from './ShareContactPopover';
@@ -0,0 +1,2 @@
1
+ import { ShareContactByEmailI } from '../../../interfaces';
2
+ export declare const ShareContactByEmail: ({ apiError, contact, onShare, }: ShareContactByEmailI) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,21 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useState } from 'react';
3
+ import { t } from 'i18next';
4
+ import { Box, Button, Flex } from '@chakra-ui/react';
5
+ import { TextInput } from '../..';
6
+ import { isValidEmail } from '../../../utils';
7
+ export const ShareContactByEmail = ({ apiError, contact, onShare, }) => {
8
+ const [value, setValue] = useState('');
9
+ const [isDirty, setIsDirty] = useState(apiError !== null && apiError !== void 0 ? apiError : false);
10
+ const errorMessage = apiError
11
+ ? t('contacts.error')
12
+ : `${t('forms.email')} ${t('forms.required')}`;
13
+ return (_jsx(Box, { bg: "lightBlue.2", p: "base", w: "100%", children: _jsxs(Flex, { gap: "base", children: [_jsx(TextInput, { errorMessage: errorMessage, hasError: !isValidEmail(value) && isDirty, id: "shareContactByEmail", handleChange: (e) => setValue(e.target.value), placeholder: t('contacts.placeholders.email'), value: value, onBlur: () => setIsDirty(true) }), _jsx(Button, { variant: "secondary", maxW: "fit-content", maxH: "input.md", onClick: () => {
14
+ onShare({
15
+ contact,
16
+ emailTo: value,
17
+ });
18
+ setValue('');
19
+ setIsDirty(false);
20
+ }, disabled: !isValidEmail(value), children: t('buttons.send') })] }) }));
21
+ };
@@ -0,0 +1 @@
1
+ export * from './ShareContactByEmail';
@@ -0,0 +1 @@
1
+ export * from './ShareContactByEmail';
@@ -24,5 +24,5 @@ export const GridFile = (_a) => {
24
24
  updatedAt,
25
25
  icon: fileTypes[fileExtension] || DocIcon,
26
26
  };
27
- return (_jsxs(WrapItem, { maxW: "7rem", position: "relative", children: [_jsx(Box, { position: "absolute", top: "0", right: "1", zIndex: "docked", children: _jsx(IconMenuWithMove, { icon: _jsx(MoreHorizontal, { size: 28 }), itemForm: itemForm, menuItems: menu, onMove: () => onMove(itemForm) }) }), _jsx(Button, { variant: "folder", px: "base", pb: "base", pt: "6", onClick: () => onClick(props), children: _jsxs(Stack, { spacing: "1", align: "center", children: [_jsx(Image, { src: fileTypes[fileExtension] || DocIcon, w: "46px", h: "49px", alt: fileExtension, transition: "all 0.2s ease-in-out" }), _jsxs(Box, { children: [_jsx(Text, { isTruncated: true, maxWidth: "5rem", fontSize: "sm", children: title }), _jsx(Text, { variant: "date", children: updatedAt })] })] }) })] }));
27
+ return (_jsxs(WrapItem, { maxW: "7rem", position: "relative", children: [_jsx(Box, { position: "absolute", top: "0", right: "1", zIndex: "docked", children: _jsx(IconMenuWithMove, { disabled: menu.length < 1 ? true : false, icon: _jsx(MoreHorizontal, { size: 28 }), itemForm: itemForm, menuItems: menu, onMove: () => onMove(itemForm) }) }), _jsx(Button, { variant: "folder", px: "base", pb: "base", pt: "6", onClick: () => onClick(props), children: _jsxs(Stack, { spacing: "1", align: "center", children: [_jsx(Image, { src: fileTypes[fileExtension] || DocIcon, w: "46px", h: "49px", alt: fileExtension, transition: "all 0.2s ease-in-out" }), _jsxs(Box, { children: [_jsx(Text, { isTruncated: true, maxWidth: "5rem", fontSize: "sm", children: title }), _jsx(Text, { variant: "date", children: updatedAt })] })] }) })] }));
28
28
  };
@@ -4,7 +4,7 @@ import { MenuButton, IconButton, Menu, MenuItem, MenuList, MenuDivider, } from '
4
4
  import { ChevronRight, Overlay } from '../..';
5
5
  import { colors } from '../../../theme/colors';
6
6
  export const IconMenuWithMove = ({ disabled = false, icon, itemForm, menuItems, onMove, }) => {
7
- return (_jsx(Menu, { isLazy: true, children: ({ isOpen }) => (_jsxs(_Fragment, { children: [_jsx(Overlay, { bg: "#00000040", showOverlay: isOpen, position: "fixed", zIndex: "4" }), _jsx(MenuButton, { as: IconButton, "aria-label": "Options", icon: icon, variant: "menuIcon", w: "fit-content", disabled: disabled }), _jsxs(MenuList, { zIndex: "5", children: [menuItems === null || menuItems === void 0 ? void 0 : menuItems.map(({ handleClick, label }) => (_jsx(MenuItem, { onClick: () => handleClick(itemForm), _hover: {
7
+ return (_jsx(Menu, { isLazy: true, children: ({ isOpen }) => (_jsxs(_Fragment, { children: [_jsx(Overlay, { bg: "overlay", showOverlay: isOpen, position: "fixed", zIndex: "4" }), _jsx(MenuButton, { as: IconButton, "aria-label": "Options", icon: icon, variant: "menuIcon", w: "fit-content", disabled: disabled }), _jsxs(MenuList, { zIndex: "5", children: [menuItems === null || menuItems === void 0 ? void 0 : menuItems.map(({ handleClick, label }) => (_jsx(MenuItem, { onClick: () => handleClick(itemForm), _hover: {
8
8
  bg: 'lightGreen.1',
9
9
  }, _focus: {
10
10
  bg: 'lightGreen.1',
@@ -24,5 +24,5 @@ export const ListFile = (_a) => {
24
24
  updatedAt,
25
25
  icon: fileTypes[fileExtension] || DocIcon,
26
26
  };
27
- return (_jsx(Box, { bg: "neutral.white", w: "100%", transition: "all 0.2s ease-in-out", _hover: { bg: 'lightGreen.1' }, children: _jsxs(Flex, { children: [_jsxs(Flex, { gap: "base", p: "base", as: "button", flex: "1", onClick: () => onClick(props), children: [_jsx(Image, { src: fileTypes[fileExtension] || DocIcon, minW: "32px", h: "auto", alt: fileExtension, transition: "all 0.2s ease-in-out" }), _jsxs(Box, { mt: "-1", children: [_jsx(Text, { variant: "date", textTransform: "uppercase", textAlign: "left", children: fileExtension === '' ? 'Doc' : fileExtension }), _jsx(Text, { textOverflow: "ellipsis", noOfLines: 1, fontSize: "sm", textAlign: "left", children: title })] })] }), _jsxs(Flex, { align: "center", gap: "2", h: "fit-content", p: "1", pr: "base", children: [_jsx(Text, { variant: "date", w: "fit-content", children: updatedAt }), _jsx(IconMenuWithMove, { icon: _jsx(MoreHorizontal, { size: 28 }), itemForm: itemForm, menuItems: menu, onMove: () => onMove(itemForm) })] })] }) }));
27
+ return (_jsx(Box, { bg: "neutral.white", w: "100%", transition: "all 0.2s ease-in-out", _hover: { bg: 'lightGreen.1' }, children: _jsxs(Flex, { children: [_jsxs(Flex, { gap: "base", p: "base", as: "button", flex: "1", onClick: () => onClick(props), children: [_jsx(Image, { src: fileTypes[fileExtension] || DocIcon, minW: "32px", h: "auto", alt: fileExtension, transition: "all 0.2s ease-in-out" }), _jsxs(Box, { mt: "-1", children: [_jsx(Text, { variant: "date", textTransform: "uppercase", textAlign: "left", children: fileExtension === '' ? 'Doc' : fileExtension }), _jsx(Text, { textOverflow: "ellipsis", noOfLines: 1, fontSize: "sm", textAlign: "left", children: title })] })] }), _jsxs(Flex, { align: "center", gap: "2", h: "fit-content", p: "1", pr: "base", children: [_jsx(Text, { variant: "date", w: "fit-content", children: updatedAt }), _jsx(IconMenuWithMove, { disabled: menu.length < 1 ? true : false, icon: _jsx(MoreHorizontal, { size: 28 }), itemForm: itemForm, menuItems: menu, onMove: () => onMove(itemForm) })] })] }) }));
28
28
  };
@@ -28,5 +28,5 @@ export const MoveModal = (_a) => {
28
28
  secondOption: secondFilter,
29
29
  });
30
30
  };
31
- return (_jsxs(Box, { w: "inherit", h: "inherit", children: [_jsx(Overlay, { bg: "#00000040", showOverlay: true, position: "fixed", zIndex: "modal" }), _jsxs(Stack, Object.assign({ p: "base", boxShadow: "lg", w: "14rem", bg: "neutral.white", spacing: "base", zIndex: "modal", position: "absolute", top: "350px", left: "50%", transform: "translate(-50%, -50%)" }, props, { children: [_jsxs(Flex, { justify: "space-between", children: [_jsx(Text, { children: t('folderSharing.move') }), _jsx(IconButton, { variant: "menuIconWithShadow", "aria-label": t('buttons.close'), maxW: "fit-content", onClick: onClose, icon: _jsx(Close, { size: 20 }) })] }), _jsx(SelectInput, { width: "100%", handleClick: handleFirstFilterClick, initialValue: firstInitialFilter, items: firstFilterItems }), _jsx(SelectInput, { width: "100%", handleClick: setSecondFilter, initialValue: secondInitialFilter, items: secondFilterItems }), _jsx(Button, { alignSelf: "flex-end", variant: "secondary", maxW: "fit-content", maxH: "input.sm", textTransform: "capitalize", onClick: handleSave, isLoading: loading, children: t('buttons.save') })] }))] }));
31
+ return (_jsxs(Box, { w: "inherit", h: "inherit", children: [_jsx(Overlay, { bg: "overlay", showOverlay: true, position: "fixed", zIndex: "modal" }), _jsxs(Stack, Object.assign({ p: "base", boxShadow: "lg", w: "14rem", bg: "neutral.white", spacing: "base", zIndex: "modal", position: "absolute", top: "350px", left: "50%", transform: "translate(-50%, -50%)" }, props, { children: [_jsxs(Flex, { justify: "space-between", children: [_jsx(Text, { children: t('folderSharing.move') }), _jsx(IconButton, { variant: "menuIconWithShadow", "aria-label": t('buttons.close'), maxW: "fit-content", onClick: onClose, icon: _jsx(Close, { size: 20 }) })] }), _jsx(SelectInput, { width: "100%", handleClick: handleFirstFilterClick, initialValue: firstInitialFilter, items: firstFilterItems }), _jsx(SelectInput, { width: "100%", handleClick: setSecondFilter, initialValue: secondInitialFilter, items: secondFilterItems }), _jsx(Button, { alignSelf: "flex-end", variant: "secondary", maxW: "fit-content", maxH: "input.sm", textTransform: "capitalize", onClick: handleSave, isLoading: loading, children: t('buttons.save') })] }))] }));
32
32
  };
@@ -1,2 +1,2 @@
1
1
  import { HiddenFieldI } from '../../../interfaces';
2
- export declare const HiddenField: ({ icon, id, name, onClick }: HiddenFieldI) => import("react/jsx-runtime").JSX.Element;
2
+ export declare const HiddenField: ({ disabled, icon, id, isActive, name, onClick, }: HiddenFieldI) => import("react/jsx-runtime").JSX.Element;
@@ -1,9 +1,14 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Center, Image, Text } from '@chakra-ui/react';
3
- export const HiddenField = ({ icon, id, name, onClick }) => {
3
+ export const HiddenField = ({ disabled, icon, id, isActive, name, onClick, }) => {
4
4
  const handleClick = () => onClick(id);
5
- return (_jsxs(Center, { as: "button", bg: "neutral.white", borderRadius: "md", w: "auto", h: "80px", boxShadow: "md", flexDirection: "column", onClick: handleClick, gap: "1", transition: "all .2s ease-in-out", border: "1px solid", borderColor: "transparent", _hover: {
5
+ return (_jsxs(Center, { as: "button", disabled: disabled, bg: "neutral.white", borderRadius: "md", w: "auto", h: "80px", boxShadow: "md", flexDirection: "column", onClick: handleClick, gap: "1", transition: "all .2s ease-in-out", border: "1px solid", borderColor: isActive ? 'blue.1' : 'transparent', _hover: {
6
6
  borderColor: 'blue.1',
7
+ }, _disabled: {
8
+ opacity: 0.5,
9
+ _hover: {
10
+ borderColor: 'transparent',
11
+ },
7
12
  }, _active: {
8
13
  boxShadow: 'md',
9
14
  }, children: [_jsx(Image, { h: "24px", w: "auto", maxW: "35px", src: icon }), _jsx(Text, { textTransform: "uppercase", fontSize: "xs", noOfLines: 2, overflow: "hidden", lineHeight: "1", width: "100%", children: name })] }));
@@ -45,7 +45,7 @@ export const HomeBoard = () => {
45
45
  label: 'Edit Contact',
46
46
  handleClick: () => null,
47
47
  },
48
- ] })),
48
+ ], onShare: () => null })),
49
49
  PartnerCatalog: (_jsx(PartnerCatalogPanel, { onClose: onRightClose, onPartnerAdd: () => null, partners: partnerCatalogMock })),
50
50
  AddHouseholdItem: (_jsxs(DrawerContent, { bg: "lightBlue.1", children: [_jsx(DrawerHeader, { p: "0", children: _jsx(PanelHeader, { handleCloseButton: handleClose, icon: Painting, title: "Add Household Item" }) }), _jsx(DrawerBody, { children: _jsx(DynamicForm, { form: formFieldsMock }) })] })),
51
51
  HomeAssistant: (_jsx(HomeAssistantPanel, { currentStep: homeAssistantCurrentStep, currentForm: currentHomeAssistantForm, onNext: handleHomeAssistantFormChange, onBack: handleHomeAssistantBack, onApplianceClick: () => null, onClose: onRightClose })),
@@ -29,5 +29,5 @@ export const HomeCard = (_a) => {
29
29
  };
30
30
  const { imageUrl } = useHomeCard(image);
31
31
  const hasImage = Boolean(imageUrl);
32
- return (_jsx(TileTooltip, { label: "homeCard", children: _jsxs(Box, { children: [_jsxs(Center, { pos: "relative", h: "12rem", bg: "lightBlue.2", overflow: "hidden", children: [loading && (_jsx(Center, { h: "8rem", children: _jsx(BeatLoader, { color: "gray", size: 8 }) })), !loading && (_jsxs(_Fragment, { children: [edit && (_jsx(EditFileUploader, { handleInputChange: addImage, "aria-label": t('ariaLabels.edit'), position: "absolute", right: "2", top: "1" })), _jsx(Image, { src: (hasImage && imageUrl) || randomImages(0), alt: `${name} ${t('images.altImage')}`, w: "full", objectFit: "cover" })] }))] }), !isEditMode && (_jsx(HomeCardReadOnly, Object.assign({ addImage: addImage, name: name, externalLink: externalLink }, props, address))), isEditMode && (_jsx(EditHomeDetails, { address: address, externalLink: externalLink, name: name, setIsDirty: setIsDirty }))] }) }));
32
+ return (_jsx(TileTooltip, { label: "homeCard", children: _jsxs(Box, { children: [_jsxs(Center, { pos: "relative", h: "12rem", bg: "lightBlue.2", overflow: "hidden", children: [loading && (_jsx(Center, { h: "8rem", children: _jsx(BeatLoader, { color: "gray", size: 8 }) })), !loading && (_jsxs(_Fragment, { children: [edit && (_jsx(EditFileUploader, { handleInputChange: addImage, "aria-label": t('ariaLabels.edit'), position: "absolute", right: "2", top: "1" })), _jsx(Image, { src: (hasImage && imageUrl) || randomImages(0), alt: `${name} ${t('images.altImage')}`, w: "full", objectFit: "cover" })] }))] }), !isEditMode && (_jsx(HomeCardReadOnly, Object.assign({ addImage: addImage, name: name, externalLink: externalLink, edit: edit }, props, address))), isEditMode && (_jsx(EditHomeDetails, { address: address, externalLink: externalLink, name: name, setIsDirty: setIsDirty }))] }) }));
33
33
  };
@@ -5,7 +5,7 @@ import { ChevronRight, IconAndText, Overlay, Plus } from '..';
5
5
  import { colors } from '../../theme/colors';
6
6
  export const DocumentMenu = ({ documents, isDisabled, title, }) => {
7
7
  const filteredDocuments = documents.filter((document) => document.active !== false);
8
- return (_jsx(Menu, { gutter: 0, matchWidth: true, children: ({ isOpen }) => (_jsxs(_Fragment, { children: [_jsx(Overlay, { bg: "#00000040", showOverlay: isOpen, zIndex: "2", position: "fixed" }), _jsx(MenuButton, { as: Button, variant: "menu", disabled: isDisabled, zIndex: "3", children: _jsxs(Flex, { alignItems: "center", justifyContent: "space-between", px: "4", children: [_jsx(IconAndText, { title: title, icon: _jsx(Plus, {}) }), _jsx(Circle, { size: "40px", bg: "blue.1", color: "neutral.white", transform: isOpen ? 'rotate(90deg)' : 'rotate(0deg)', transition: "all 0.2s ease-in-out", children: _jsx(ChevronRight, { size: 26, stroke: colors.neutral.white }) })] }) }), _jsx(MenuList, { borderTopRadius: "0", boxShadow: "lg", zIndex: "3", children: documents &&
8
+ return (_jsx(Menu, { gutter: 0, matchWidth: true, children: ({ isOpen }) => (_jsxs(_Fragment, { children: [_jsx(Overlay, { bg: "overlay", showOverlay: isOpen, zIndex: "2", position: "fixed" }), _jsx(MenuButton, { as: Button, variant: "menu", disabled: isDisabled, zIndex: "3", children: _jsxs(Flex, { alignItems: "center", justifyContent: "space-between", px: "4", children: [_jsx(IconAndText, { title: title, icon: _jsx(Plus, {}) }), _jsx(Circle, { size: "40px", bg: "blue.1", color: "neutral.white", transform: isOpen ? 'rotate(90deg)' : 'rotate(0deg)', transition: "all 0.2s ease-in-out", children: _jsx(ChevronRight, { size: 26, stroke: colors.neutral.white }) })] }) }), _jsx(MenuList, { borderTopRadius: "0", boxShadow: "lg", zIndex: "3", children: documents &&
9
9
  filteredDocuments.map(({ onClick, icon, active = true, label }) => (_jsxs(MenuItem, { minH: "3rem", onClick: onClick, isDisabled: !active, _hover: {
10
10
  bg: 'lightGreen.1',
11
11
  }, _focus: {
@@ -0,0 +1,4 @@
1
+ export declare const ShareIcon: ({ stroke, size }: {
2
+ stroke?: string | undefined;
3
+ size?: number | undefined;
4
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,5 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { colors } from '../../theme/colors';
3
+ export const ShareIcon = ({ stroke = colors.blue[3], size = 24 }) => {
4
+ return (_jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: size, height: size, viewBox: "0 0 19.5 21.5", children: _jsxs("g", { id: "Icon_feather-share-2", "data-name": "Icon feather-share-2", transform: "translate(-3.75 -2.25)", children: [_jsx("path", { id: "Path_14156", "data-name": "Path 14156", d: "M28.5,6a3,3,0,1,1-3-3,3,3,0,0,1,3,3Z", transform: "translate(-6 0)", fill: "none", stroke: stroke, strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "1.5" }), _jsx("path", { id: "Path_14157", "data-name": "Path 14157", d: "M10.5,16.5a3,3,0,1,1-3-3A3,3,0,0,1,10.5,16.5Z", transform: "translate(0 -3.5)", fill: "none", stroke: stroke, strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "1.5" }), _jsx("path", { id: "Path_14158", "data-name": "Path 14158", d: "M28.5,27a3,3,0,1,1-3-3A3,3,0,0,1,28.5,27Z", transform: "translate(-6 -7)", fill: "none", stroke: stroke, strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "1.5" }), _jsx("path", { id: "Path_14159", "data-name": "Path 14159", d: "M12.885,20.265l6.83,3.98", transform: "translate(-2.795 -5.755)", fill: "none", stroke: stroke, strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "1.5" }), _jsx("path", { id: "Path_14160", "data-name": "Path 14160", d: "M19.7,9.765l-6.82,3.98", transform: "translate(-2.795 -2.255)", fill: "none", stroke: stroke, strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "1.5" })] }) }));
5
+ };
@@ -26,6 +26,7 @@ export * from './MoreHorizontal';
26
26
  export * from './OpenVideo';
27
27
  export * from './Plus';
28
28
  export * from './SearchIcon';
29
+ export * from './ShareIcon';
29
30
  export * from './Star';
30
31
  export * from './TikTok';
31
32
  export * from './Trash';
@@ -26,6 +26,7 @@ export * from './MoreHorizontal';
26
26
  export * from './OpenVideo';
27
27
  export * from './Plus';
28
28
  export * from './SearchIcon';
29
+ export * from './ShareIcon';
29
30
  export * from './Star';
30
31
  export * from './TikTok';
31
32
  export * from './Trash';
@@ -2,7 +2,7 @@ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-run
2
2
  import { MenuButton, IconButton, Menu, MenuItem, MenuList, } from '@chakra-ui/react';
3
3
  import { Overlay } from '..';
4
4
  export const IconMenu = ({ disabled = false, icon, itemForm, menuItems, variant = 'menuIcon', width = 'fit-content', }) => {
5
- return (_jsx(Menu, { isLazy: true, children: ({ isOpen }) => (_jsxs(_Fragment, { children: [_jsx(Overlay, { bg: "#00000040", showOverlay: isOpen, position: "fixed", zIndex: "4" }), _jsx(MenuButton, { as: IconButton, "aria-label": "Options", icon: icon, variant: variant, w: width, disabled: disabled, marginTop: "0 !important" }), _jsx(MenuList, { zIndex: "5", children: menuItems === null || menuItems === void 0 ? void 0 : menuItems.map(({ handleClick, label }) => (_jsx(MenuItem, { onClick: () => handleClick(itemForm), _hover: {
5
+ return (_jsx(Menu, { isLazy: true, children: ({ isOpen }) => (_jsxs(_Fragment, { children: [_jsx(Overlay, { bg: "overlay", showOverlay: isOpen, position: "fixed", zIndex: "4" }), _jsx(MenuButton, { as: IconButton, "aria-label": "Options", icon: icon, variant: variant, w: width, disabled: disabled, marginTop: "0 !important" }), _jsx(MenuList, { zIndex: "5", children: menuItems === null || menuItems === void 0 ? void 0 : menuItems.map(({ handleClick, label }) => (_jsx(MenuItem, { onClick: () => handleClick(itemForm), _hover: {
6
6
  bg: 'lightGreen.1',
7
7
  }, _focus: {
8
8
  bg: 'lightGreen.1',
@@ -11,5 +11,5 @@ export const MyHomeCard = ({ accountType, address: { city, state, street, number
11
11
  image,
12
12
  });
13
13
  const isLoading = loading && loadingId === _id;
14
- return (_jsxs(_Fragment, { children: [_jsx(Box, { position: "absolute", left: "-1", top: "-1", id: index === 0 ? 'role' : '', children: type && (_jsx(TextBadge, { bgColor: type === null || type === void 0 ? void 0 : type.bg, text: accountType, width: type === null || type === void 0 ? void 0 : type.width })) }), _jsxs(Center, { pos: "relative", h: "8rem", bg: "lightBlue.2", overflow: "hidden", w: "full", children: [isLoading && (_jsx(Center, { h: "8rem", children: _jsx(BeatLoader, { color: "gray", size: 8 }) })), !isLoading && (_jsxs(_Fragment, { children: [_jsx(EditFileUploader, { handleInputChange: (event) => addImage({ event, _id }), "aria-label": t('ariaLabels.edit'), position: "absolute", right: "2", top: "1", id: index === 0 ? 'homePicture' : '' }), _jsx(Image, { src: ((image === null || image === void 0 ? void 0 : image.bucketName) && imageUrl) || randomImages(0), alt: `${name} ${t('images.altImage')}`, objectFit: "cover", minH: minHeight, minW: minWidth, onClick: () => handleCardClick({ _id, name }), cursor: "pointer" })] }))] }), _jsx(Tooltip, { label: t('tooltips.viewHome'), children: _jsx(Stack, { children: _jsxs(Stack, { id: index === 0 ? 'viewHome' : '', bg: "neutral.white", px: "2", py: "4", children: [_jsxs(Flex, { align: "center", gap: "1", children: [_jsx(Box, { as: "button", onClick: () => handleCardClick({ _id, name }), children: _jsx(Text, { textOverflow: "ellipsis", noOfLines: 1, textAlign: "left", textTransform: "uppercase", children: name }) }), externalLink && (_jsx(Tooltip, { label: externalLink, fontSize: "small", children: _jsx(Center, { cursor: "pointer", children: _jsx(Link, { size: 22 }) }) }))] }), _jsxs(Box, { lineHeight: "1.2", as: "button", onClick: () => handleCardClick({ _id, name }), textAlign: "left", children: [_jsx(Text, { isTruncated: true, variant: "home", children: `${number} ${street}` }), _jsxs(Flex, { gap: "1", children: [_jsx(Text, { isTruncated: true, variant: "home", children: `${city},` }), _jsx(Text, { isTruncated: true, variant: "home", children: state })] }), _jsx(Text, { variant: "home", children: zip })] })] }) }) })] }));
14
+ return (_jsxs(_Fragment, { children: [_jsx(Box, { position: "absolute", left: "-1", top: "-1", id: index === 0 ? 'role' : '', children: type && (_jsx(TextBadge, { bgColor: type === null || type === void 0 ? void 0 : type.bg, text: accountType, width: type === null || type === void 0 ? void 0 : type.width })) }), _jsxs(Center, { pos: "relative", h: "8rem", bg: "lightBlue.2", overflow: "hidden", w: "full", children: [isLoading && (_jsx(Center, { h: "8rem", children: _jsx(BeatLoader, { color: "gray", size: 8 }) })), !isLoading && (_jsxs(_Fragment, { children: [accountType !== "Member" && (_jsx(EditFileUploader, { handleInputChange: (event) => addImage({ event, _id }), "aria-label": t('ariaLabels.edit'), position: "absolute", right: "2", top: "1", id: index === 0 ? 'homePicture' : '' })), _jsx(Image, { src: ((image === null || image === void 0 ? void 0 : image.bucketName) && imageUrl) || randomImages(0), alt: `${name} ${t('images.altImage')}`, objectFit: "cover", minH: minHeight, minW: minWidth, onClick: () => handleCardClick({ _id, name }), cursor: "pointer" })] }))] }), _jsx(Tooltip, { label: t('tooltips.viewHome'), children: _jsx(Stack, { children: _jsxs(Stack, { id: index === 0 ? 'viewHome' : '', bg: "neutral.white", px: "2", py: "4", children: [_jsxs(Flex, { align: "center", gap: "1", children: [_jsx(Box, { as: "button", onClick: () => handleCardClick({ _id, name }), children: _jsx(Text, { textOverflow: "ellipsis", noOfLines: 1, textAlign: "left", textTransform: "uppercase", children: name }) }), externalLink && (_jsx(Tooltip, { label: externalLink, fontSize: "small", children: _jsx(Center, { cursor: "pointer", children: _jsx(Link, { size: 22 }) }) }))] }), _jsxs(Box, { lineHeight: "1.2", as: "button", onClick: () => handleCardClick({ _id, name }), textAlign: "left", children: [_jsx(Text, { isTruncated: true, variant: "home", children: `${number} ${street}` }), _jsxs(Flex, { gap: "1", children: [_jsx(Text, { isTruncated: true, variant: "home", children: `${city},` }), _jsx(Text, { isTruncated: true, variant: "home", children: state })] }), _jsx(Text, { variant: "home", children: zip })] })] }) }) })] }));
15
15
  };
@@ -10,5 +10,5 @@ export const MyHomes = ({ cardList = [], cardMenuItems = [], handleCardClick, ha
10
10
  return (_jsx(TileTooltip, { label: "myHomes", children: _jsxs(Container, { variant: "launchpad", maxW: "none", pb: "3rem", position: "relative", children: [showChildren && (_jsx(BaseStep, { top: "60px", right: "60px", onClose: handleHelpClick, children: _jsx(InviteRolesStep, {}) })), _jsx(ContainerHeader, { disabled: true, menuItems: headerMenuItems, title: t('myHomes.title'), icon: _jsx(MoreHorizontal, { size: 38 }), titleIcon: House, showHelp: true, onHelpClick: handleHelpClick }), _jsx(MyHomesHeader, { onFilterClick: handleFilterClick, onNewHomeClick: handleNewHomeClick }), _jsx(Wrap, { spacing: "base", px: "base", alignItems: "start", children: cardList.length > 0 &&
11
11
  (cardList === null || cardList === void 0 ? void 0 : cardList.map(({ accountType, address, active, _id, image, name }, index) => (_jsx(WrapItem, { children: _jsxs(Container, { w: "179px", position: "relative", transition: "all 0.3s ease-in-out", _hover: {
12
12
  boxShadow: 'xl',
13
- }, id: index === 0 ? 'homeCard' : '', children: [_jsx(ContainerHeader, { menuItems: cardMenuItems, itemForm: { _id, name }, icon: _jsx(MoreHorizontal, {}), isThin: true, index: index }), _jsx(Box, { w: "179px", textAlign: "left", children: _jsx(MyHomeCard, { accountType: accountType, address: address, image: image, name: name, active: active, _id: _id, index: index, handleCardClick: handleCardClick, addImage: addImage, loading: loading, loadingId: loadingId }) })] }) }, _id)))) })] }) }));
13
+ }, id: index === 0 ? 'homeCard' : '', children: [_jsx(ContainerHeader, { menuItems: accountType === "Member" ? [] : cardMenuItems, itemForm: { _id, name }, icon: _jsx(MoreHorizontal, {}), isThin: true, index: index }), _jsx(Box, { w: "179px", textAlign: "left", children: _jsx(MyHomeCard, { accountType: accountType, address: address, image: image, name: name, active: active, _id: _id, index: index, handleCardClick: handleCardClick, addImage: addImage, loading: loading, loadingId: loadingId }) })] }) }, _id)))) })] }) }));
14
14
  };
@@ -6,7 +6,7 @@ import { rolePermissions } from '../../../helpers';
6
6
  import { useRolePermissionsTab } from '../../../hooks';
7
7
  export const RolePermissionsTab = ({ selected, onSelect, }) => {
8
8
  const { actions, callback, selectedRole, selectedActions, handleRoleChange, handleFeatureChange, handleActionChange, } = useRolePermissionsTab({ selected, onSelect });
9
- return (_jsxs(Flex, { h: "100%", children: [_jsxs(Box, { bg: "neutral.white", children: [_jsx(RoleButton, { role: "member", isSelected: selectedRole === 'member', onClick: () => handleRoleChange('member'), showBorder: true }), _jsx(RoleButton, { role: "contributor", isSelected: selectedRole === 'contributor', onClick: () => handleRoleChange('contributor') }), _jsx(RoleButton, { role: "manager", isSelected: selectedRole === 'manager', onClick: () => handleRoleChange('manager'), showBorder: true })] }), _jsxs(Box, { children: [_jsx(PermissionsBanner, { role: selectedRole }), _jsx(Center, { bg: "lightBlue.6", py: "base", children: _jsxs(Flex, { w: "100%", children: [_jsxs(Flex, { flex: "1", gap: "base", justify: "flex-end", align: "start", children: [_jsx(ActionLabel, { label: t('myProfile.actions.can'), color: "neutral.white" }), _jsx(Box, { w: "1px", bg: "neutral.white", h: "100%" })] }), _jsx(Flex, { flex: "1", justify: "space-evenly", children: actions.map((action) => {
9
+ return (_jsxs(Flex, { h: "100%", children: [_jsxs(Box, { bg: "neutral.white", children: [_jsx(RoleButton, { role: "member", isSelected: selectedRole === 'member', onClick: () => handleRoleChange('member'), showBorder: true }), _jsx(RoleButton, { role: "contributor", isSelected: selectedRole === 'contributor', onClick: () => handleRoleChange('contributor') }), _jsx(RoleButton, { role: "manager", isSelected: selectedRole === 'manager', onClick: () => handleRoleChange('manager'), showBorder: true })] }), _jsxs(Box, { width: "100%", children: [_jsx(PermissionsBanner, { role: selectedRole }), _jsx(Center, { bg: "lightBlue.6", py: "base", children: _jsxs(Flex, { w: "100%", children: [_jsxs(Flex, { flex: "1", gap: "base", justify: "flex-end", align: "start", children: [_jsx(ActionLabel, { label: t('myProfile.actions.can'), color: "neutral.white" }), _jsx(Box, { w: "1px", bg: "neutral.white", h: "100%" })] }), _jsx(Flex, { flex: "1", justify: "space-evenly", children: actions.map((action) => {
10
10
  const disabledAllCheckbox = selectedRole === 'member' && action !== 'view';
11
11
  return (_jsx(ActionCheckbox, { label: action, action: action, isChecked: selectedActions.includes(action), isDisabled: disabledAllCheckbox, onChange: handleActionChange }, action));
12
12
  }) })] }) }), _jsx(Stack, { spacing: "base", py: "base", children: rolePermissions.map(({ id, label, permissions }) => {
@@ -1,2 +1,2 @@
1
1
  import { OverlayI } from '../../interfaces';
2
- export declare const Overlay: ({ bg, showOverlay, ...props }: OverlayI) => import("react/jsx-runtime").JSX.Element | null;
2
+ export declare const Overlay: ({ bg, showOverlay, onClick, ...props }: OverlayI) => import("react/jsx-runtime").JSX.Element | null;
@@ -12,7 +12,7 @@ var __rest = (this && this.__rest) || function (s, e) {
12
12
  import { jsx as _jsx } from "react/jsx-runtime";
13
13
  import { Box, keyframes } from '@chakra-ui/react';
14
14
  export const Overlay = (_a) => {
15
- var { bg = '#fdfdfdca', showOverlay = true } = _a, props = __rest(_a, ["bg", "showOverlay"]);
15
+ var { bg = '#fdfdfdca', showOverlay = true, onClick } = _a, props = __rest(_a, ["bg", "showOverlay", "onClick"]);
16
16
  if (!showOverlay)
17
17
  return null;
18
18
  const fadeIn = keyframes({
@@ -20,5 +20,5 @@ export const Overlay = (_a) => {
20
20
  '100%': { opacity: 1 },
21
21
  });
22
22
  const animation = showOverlay && `${fadeIn} 0.2s ease-in-out`;
23
- return (_jsx(Box, Object.assign({ bg: bg, top: "0", left: "0", right: "0", bottom: "0", animation: animation }, props)));
23
+ return (_jsx(Box, Object.assign({ onClick: onClick, bg: bg, top: "0", left: "0", right: "0", bottom: "0", animation: animation }, props)));
24
24
  };
@@ -1,2 +1,2 @@
1
1
  import { GroupCardI } from '../../interfaces';
2
- export declare const GroupCard: ({ items, menuItems, onAddItem, onAddImage, onClickDelete, onClickDetails, title, totalAmount, disabled, ...props }: GroupCardI) => import("react/jsx-runtime").JSX.Element;
2
+ export declare const GroupCard: ({ items, menuItems, onAddItem, onAddImage, onClickDelete, onClickDetails, title, totalAmount, disabled, itemsDisabled, ...props }: GroupCardI) => import("react/jsx-runtime").JSX.Element;
@@ -18,9 +18,9 @@ import { useGroupCard } from '../../hooks';
18
18
  import { receiptOrigins } from '../../helpers';
19
19
  const storageUrl = import.meta.env.VITE_STORAGE_URL;
20
20
  export const GroupCard = (_a) => {
21
- var { items, menuItems, onAddItem, onAddImage, onClickDelete, onClickDetails, title, totalAmount, disabled } = _a, props = __rest(_a, ["items", "menuItems", "onAddItem", "onAddImage", "onClickDelete", "onClickDetails", "title", "totalAmount", "disabled"]);
21
+ var { items, menuItems, onAddItem, onAddImage, onClickDelete, onClickDetails, title, totalAmount, disabled, itemsDisabled } = _a, props = __rest(_a, ["items", "menuItems", "onAddItem", "onAddImage", "onClickDelete", "onClickDetails", "title", "totalAmount", "disabled", "itemsDisabled"]);
22
22
  const { filteredResults, handleAddItem, handleChange, isItemsEmpty, searchValue, totalAmountFormatted, } = useGroupCard({ items, onAddItem, title, totalAmount });
23
- return (_jsx(TileTooltip, { label: title, children: _jsxs(Box, { backgroundColor: "lightBlue.1", boxShadow: "base", w: "100%", children: [_jsx(GroupCardHeader, { menuItems: menuItems, title: title, totalAmount: totalAmountFormatted }), _jsxs(Flex, { justify: items.length >= 10 ? 'space-between' : 'flex-end', pl: "base", my: "base", align: "center", gap: "base", children: [items.length >= 10 && (_jsx(SearchInput, { value: searchValue, onChange: handleChange })), _jsx(LeftButtonAnimated, { onClick: handleAddItem, label: t('addHomeItem.btnLabel'), disabled: disabled, id: "addingItems" })] }), _jsxs(Box, { pb: "10", px: "base", children: [isItemsEmpty && _jsx(AddItemCard, { onClick: handleAddItem }), !isItemsEmpty && (_jsx(Wrap, { spacing: "base", children: filteredResults.map(({ _id, title, report, images, receipt, metadata, type, subType, room, }) => {
23
+ return (_jsx(TileTooltip, { label: title, children: _jsxs(Box, { backgroundColor: "lightBlue.1", boxShadow: "base", w: "100%", children: [_jsx(GroupCardHeader, { menuItems: menuItems, title: title, totalAmount: totalAmountFormatted }), _jsxs(Flex, { justify: items.length >= 10 ? 'space-between' : 'flex-end', pl: "base", my: "base", align: "center", gap: "base", children: [items.length >= 10 && (_jsx(SearchInput, { value: searchValue, onChange: handleChange })), _jsx(LeftButtonAnimated, { onClick: handleAddItem, label: t('addHomeItem.btnLabel'), disabled: disabled, id: "addingItems" })] }), _jsxs(Box, { pb: "10", px: "base", children: [isItemsEmpty && _jsx(AddItemCard, { disabled: itemsDisabled, onClick: handleAddItem }), !isItemsEmpty && (_jsx(Wrap, { spacing: "base", children: filteredResults.map(({ _id, title, report, images, receipt, metadata, type, subType, room, }) => {
24
24
  var _a, _b, _c, _d;
25
25
  const reportData = {
26
26
  _id,
@@ -47,6 +47,6 @@ export const GroupCard = (_a) => {
47
47
  onAddImage(fileMapped);
48
48
  }
49
49
  };
50
- return (_jsx(ItemCard, Object.assign({ brandLabel: brand, imageUrl: hasImage ? imageUrl : storeImage, onAddImage: handleImage, onClickDelete: onClickDelete, onClickDetails: onClickDetails }, props, reportData), _id));
50
+ return (_jsx(ItemCard, Object.assign({ brandLabel: brand, imageUrl: hasImage ? imageUrl : storeImage, onAddImage: handleImage, onClickDelete: onClickDelete, onClickDetails: onClickDetails, disabled: itemsDisabled }, props, reportData), _id));
51
51
  }) }))] })] }) }));
52
52
  };
@@ -1,2 +1,2 @@
1
1
  import { ItemCardI } from '../../interfaces';
2
- export declare const ItemCard: ({ brandLabel, imageUrl, onAddImage, onClickDelete, onClickDetails, onMove, _id, title, subType, room, report, type, onSave, ...props }: ItemCardI) => import("react/jsx-runtime").JSX.Element;
2
+ export declare const ItemCard: ({ brandLabel, imageUrl, onAddImage, onClickDelete, onClickDetails, onMove, _id, title, subType, room, report, type, disabled, onSave, ...props }: ItemCardI) => import("react/jsx-runtime").JSX.Element;
@@ -16,7 +16,7 @@ import { AddItemImage, MoreHorizontal, MoveModal, IconMenuWithMove, } from '..';
16
16
  import { getImageAltText } from '../../utils';
17
17
  import { useState } from 'react';
18
18
  export const ItemCard = (_a) => {
19
- var { brandLabel, imageUrl, onAddImage, onClickDelete, onClickDetails, onMove, _id = '', title, subType, room, report, type, onSave } = _a, props = __rest(_a, ["brandLabel", "imageUrl", "onAddImage", "onClickDelete", "onClickDetails", "onMove", "_id", "title", "subType", "room", "report", "type", "onSave"]);
19
+ var { brandLabel, imageUrl, onAddImage, onClickDelete, onClickDetails, onMove, _id = '', title, subType, room, report, type, disabled, onSave } = _a, props = __rest(_a, ["brandLabel", "imageUrl", "onAddImage", "onClickDelete", "onClickDetails", "onMove", "_id", "title", "subType", "room", "report", "type", "disabled", "onSave"]);
20
20
  const alt = getImageAltText(imageUrl);
21
21
  const handleAddImage = (event) => {
22
22
  const files = event.target.files;
@@ -44,5 +44,5 @@ export const ItemCard = (_a) => {
44
44
  }, children: [_jsx(Box, { textAlign: "right", w: "full", pr: "2", children: _jsx(IconMenuWithMove, { icon: _jsx(MoreHorizontal, { size: 26 }), itemForm: _id, menuItems: [
45
45
  { label: t('groups.menu.details'), handleClick: onClickDetails },
46
46
  { label: t('groups.menu.delete'), handleClick: onClickDelete },
47
- ], onMove: () => handleMove(reportData) }) }), _jsxs(Stack, { px: "base", align: "center", w: "8.75rem", h: "8.75rem", cursor: "pointer", pos: "relative", children: [_jsx(Box, { onClick: () => onClickDetails(_id), pos: "absolute", top: "0", right: "0", bottom: "0", left: "0" }), _jsx(Text, { fontSize: "xs", fontWeight: "medium", noOfLines: 1, textOverflow: "ellipsis", children: title === null || title === void 0 ? void 0 : title.toUpperCase() }), imageUrl ? (_jsx(Image, { src: imageUrl, alt: alt, boxSize: "4.2rem", objectFit: "cover" })) : (_jsx(AddItemImage, { onClick: handleAddImage })), brandLabel && (_jsx(Text, { textAlign: "center", noOfLines: 1, textOverflow: "ellipsis", fontSize: "xs", children: brandLabel }))] }), showMoveModal && (_jsx(MoveModal, Object.assign({}, props, { onSave: handleSave, onClose: () => setShowMoveModal(false), top: "100", left: "260" })))] }));
47
+ ], onMove: () => handleMove(reportData), disabled: disabled }) }), _jsxs(Stack, { px: "base", align: "center", w: "8.75rem", h: "8.75rem", cursor: "pointer", pos: "relative", children: [_jsx(Box, { onClick: () => onClickDetails(_id), pos: "absolute", top: "0", right: "0", bottom: "0", left: "0" }), _jsx(Text, { fontSize: "xs", fontWeight: "medium", noOfLines: 1, textOverflow: "ellipsis", children: title === null || title === void 0 ? void 0 : title.toUpperCase() }), imageUrl ? (_jsx(Image, { src: imageUrl, alt: alt, boxSize: "4.2rem", objectFit: "cover" })) : (_jsx(AddItemImage, { onClick: handleAddImage })), brandLabel && (_jsx(Text, { textAlign: "center", noOfLines: 1, textOverflow: "ellipsis", fontSize: "xs", children: brandLabel }))] }), showMoveModal && (_jsx(MoveModal, Object.assign({}, props, { onSave: handleSave, onClose: () => setShowMoveModal(false), top: "100", left: "260" })))] }));
48
48
  };
@@ -5,7 +5,7 @@ import { RecipientContent, RecipientHeader, IconMenu, MoreHorizontal, SelectInpu
5
5
  export const RecipientCard = ({ hasTitle = true, header, index, isDocument = false, isEditDisabled, menu, onEdit, recipient: { accountTypes, user }, }) => {
6
6
  var _a;
7
7
  const types = t('shareHome.accountTypes').split(',');
8
- return (_jsx(Container, { p: "2", position: "relative", children: _jsxs(Stack, { spacing: "4", children: [_jsxs(Flex, { justify: "space-between", align: "center", children: [hasTitle && (_jsx(Header, { header: header, recipient: { accountTypes, user }, isDocument: isDocument })), _jsxs(Flex, { gap: "1", align: "center", children: [!isEditDisabled && (_jsx(SelectInput, { handleClick: (accountType) => onEdit === null || onEdit === void 0 ? void 0 : onEdit({ accountType: accountType, user }), initialValue: accountTypes[0], variant: "accountType", items: types })), !!menu && (_jsx(IconMenu, { icon: _jsx(MoreHorizontal, { size: 32 }), menuItems: menu, itemForm: {
8
+ return (_jsx(Container, { p: "2", position: "relative", children: _jsxs(Stack, { spacing: "4", children: [_jsxs(Flex, { justify: "space-between", align: "center", children: [hasTitle && (_jsx(Header, { header: header, recipient: { accountTypes, user }, isDocument: isDocument })), _jsxs(Flex, { gap: "1", align: "center", children: [!isEditDisabled && (_jsx(SelectInput, { handleClick: (accountType) => onEdit === null || onEdit === void 0 ? void 0 : onEdit({ accountType: accountType, user }), initialValue: accountTypes[0], variant: "accountType", items: types })), !!menu && (_jsx(IconMenu, { icon: _jsx(MoreHorizontal, { size: 32 }), menuItems: menu, disabled: menu.length < 1, itemForm: {
9
9
  _id: user.email,
10
10
  name: (_a = user.firstName) !== null && _a !== void 0 ? _a : '',
11
11
  } }))] })] }), user && _jsx(RecipientContent, Object.assign({ index: index }, user))] }) }));