@homefile/components-v2 1.4.2 → 1.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 (234) hide show
  1. package/dist/assets/images/alerts/index.d.ts +2 -0
  2. package/dist/assets/images/alerts/index.js +2 -0
  3. package/dist/assets/images/alerts/index.ts +3 -0
  4. package/dist/assets/images/alerts/smoke-detector-expired.jpg +0 -0
  5. package/dist/assets/images/battery.svg +9 -0
  6. package/dist/assets/images/index.d.ts +4 -1
  7. package/dist/assets/images/index.js +4 -1
  8. package/dist/assets/images/index.ts +5 -0
  9. package/dist/assets/images/wind-white.svg +7 -0
  10. package/dist/assets/locales/en/index.json +68 -1
  11. package/dist/components/animations/HomieAnimation.d.ts +1 -0
  12. package/dist/components/animations/HomieAnimation.js +11 -0
  13. package/dist/components/animations/index.d.ts +1 -0
  14. package/dist/components/animations/index.js +1 -0
  15. package/dist/components/badge/CustomBadge.d.ts +5 -0
  16. package/dist/components/badge/CustomBadge.js +5 -0
  17. package/dist/components/badge/index.d.ts +5 -4
  18. package/dist/components/badge/index.js +5 -4
  19. package/dist/components/contacts/ContactCard.d.ts +1 -1
  20. package/dist/components/contacts/ContactCard.js +5 -5
  21. package/dist/components/contacts/ContactCardHeader.d.ts +1 -1
  22. package/dist/components/contacts/ContactCardHeader.js +4 -4
  23. package/dist/components/contacts/ContactCardInfo.d.ts +1 -1
  24. package/dist/components/contacts/ContactCardInfo.js +2 -2
  25. package/dist/components/contacts/ContactHeaderMenu.js +3 -3
  26. package/dist/components/contacts/ContactsContent.d.ts +1 -1
  27. package/dist/components/contacts/ContactsContent.js +31 -6
  28. package/dist/components/contacts/LetterDivider.d.ts +3 -0
  29. package/dist/components/contacts/LetterDivider.js +5 -0
  30. package/dist/components/contacts/ShareContactSection.d.ts +2 -0
  31. package/dist/components/contacts/ShareContactSection.js +26 -0
  32. package/dist/components/contacts/index.d.ts +3 -1
  33. package/dist/components/contacts/index.js +3 -1
  34. package/dist/components/contacts/shareContactForms/AddReceiverButton.d.ts +2 -0
  35. package/dist/components/contacts/shareContactForms/AddReceiverButton.js +7 -0
  36. package/dist/components/contacts/shareContactForms/SendToList.d.ts +2 -0
  37. package/dist/components/contacts/shareContactForms/SendToList.js +11 -0
  38. package/dist/components/contacts/shareContactForms/ShareContactByEmail.d.ts +2 -2
  39. package/dist/components/contacts/shareContactForms/ShareContactByEmail.js +7 -17
  40. package/dist/components/contacts/shareContactForms/ShareContactByHomefile.d.ts +2 -0
  41. package/dist/components/contacts/shareContactForms/ShareContactByHomefile.js +17 -0
  42. package/dist/components/contacts/shareContactForms/ShareContactBySMS.d.ts +2 -0
  43. package/dist/components/contacts/shareContactForms/ShareContactBySMS.js +11 -0
  44. package/dist/components/contacts/shareContactForms/index.d.ts +4 -0
  45. package/dist/components/contacts/shareContactForms/index.js +4 -0
  46. package/dist/components/contacts/sharePanel/SelectedContacts.d.ts +2 -0
  47. package/dist/components/contacts/sharePanel/SelectedContacts.js +8 -0
  48. package/dist/components/contacts/sharePanel/ShareContactsContent.d.ts +2 -0
  49. package/dist/components/contacts/sharePanel/ShareContactsContent.js +28 -0
  50. package/dist/components/contacts/sharePanel/index.d.ts +2 -0
  51. package/dist/components/contacts/sharePanel/index.js +2 -0
  52. package/dist/components/homeAssistant/HomeAssistant.js +2 -1
  53. package/dist/components/homeAssistant/HomeAssistantWrapper.d.ts +2 -1
  54. package/dist/components/homeAssistant/HomeAssistantWrapper.js +2 -3
  55. package/dist/components/homeAssistant/HomeMonitor.d.ts +2 -0
  56. package/dist/components/homeAssistant/HomeMonitor.js +6 -0
  57. package/dist/components/homeAssistant/HomeMonitorButton.d.ts +2 -0
  58. package/dist/components/homeAssistant/HomeMonitorButton.js +31 -0
  59. package/dist/components/homeAssistant/HomeMonitorSteps.d.ts +2 -0
  60. package/dist/components/homeAssistant/HomeMonitorSteps.js +11 -0
  61. package/dist/components/homeAssistant/index.d.ts +4 -0
  62. package/dist/components/homeAssistant/index.js +4 -0
  63. package/dist/components/homeAssistant/monitorAlerts/AlertHeader.d.ts +1 -0
  64. package/dist/components/homeAssistant/monitorAlerts/AlertHeader.js +7 -0
  65. package/dist/components/homeAssistant/monitorAlerts/AlertTemplate.d.ts +2 -0
  66. package/dist/components/homeAssistant/monitorAlerts/AlertTemplate.js +5 -0
  67. package/dist/components/homeAssistant/monitorAlerts/AlertTitle.d.ts +2 -0
  68. package/dist/components/homeAssistant/monitorAlerts/AlertTitle.js +5 -0
  69. package/dist/components/homeAssistant/monitorAlerts/BaseAlertCard.d.ts +3 -0
  70. package/dist/components/homeAssistant/monitorAlerts/BaseAlertCard.js +21 -0
  71. package/dist/components/homeAssistant/monitorAlerts/MonitorAlerts.d.ts +2 -0
  72. package/dist/components/homeAssistant/monitorAlerts/MonitorAlerts.js +32 -0
  73. package/dist/components/homeAssistant/monitorAlerts/Notifications.d.ts +4 -0
  74. package/dist/components/homeAssistant/monitorAlerts/Notifications.js +9 -0
  75. package/dist/components/homeAssistant/monitorAlerts/alertDetails/ChangeAirFilter.d.ts +1 -0
  76. package/dist/components/homeAssistant/monitorAlerts/alertDetails/ChangeAirFilter.js +11 -0
  77. package/dist/components/homeAssistant/monitorAlerts/alertDetails/CustomDivider.d.ts +1 -0
  78. package/dist/components/homeAssistant/monitorAlerts/alertDetails/CustomDivider.js +5 -0
  79. package/dist/components/homeAssistant/monitorAlerts/alertDetails/SmokeDetectorBattery.d.ts +1 -0
  80. package/dist/components/homeAssistant/monitorAlerts/alertDetails/SmokeDetectorBattery.js +11 -0
  81. package/dist/components/homeAssistant/monitorAlerts/alertDetails/SmokeDetectorExpired.d.ts +1 -0
  82. package/dist/components/homeAssistant/monitorAlerts/alertDetails/SmokeDetectorExpired.js +11 -0
  83. package/dist/components/homeAssistant/monitorAlerts/alertDetails/index.d.ts +4 -0
  84. package/dist/components/homeAssistant/monitorAlerts/alertDetails/index.js +4 -0
  85. package/dist/components/homeAssistant/monitorAlerts/index.d.ts +7 -0
  86. package/dist/components/homeAssistant/monitorAlerts/index.js +7 -0
  87. package/dist/components/homeAssistant/panel/HomeAssistantPanel.js +1 -1
  88. package/dist/components/homeBoard/HomeBoard.js +1 -1
  89. package/dist/components/inputs/TextInput.d.ts +1 -1
  90. package/dist/components/inputs/TextInput.js +2 -2
  91. package/dist/components/partner/PartnerFooter.d.ts +1 -1
  92. package/dist/components/partner/PartnerFooter.js +2 -2
  93. package/dist/components/partner/ShortPartnerTile.d.ts +1 -1
  94. package/dist/components/partner/ShortPartnerTile.js +2 -2
  95. package/dist/helpers/homeAssistant/HomeAssistant.helper.js +4 -4
  96. package/dist/hooks/contacts/index.d.ts +3 -0
  97. package/dist/hooks/contacts/index.js +3 -0
  98. package/dist/hooks/contacts/useContactsContent.d.ts +2 -1
  99. package/dist/hooks/contacts/useContactsContent.js +28 -2
  100. package/dist/hooks/contacts/useShareContactBy.d.ts +15 -0
  101. package/dist/hooks/contacts/useShareContactBy.js +33 -0
  102. package/dist/hooks/contacts/useShareContactByHomefile.d.ts +16 -0
  103. package/dist/hooks/contacts/useShareContactByHomefile.js +25 -0
  104. package/dist/hooks/contacts/useShareContactsContent.d.ts +8 -0
  105. package/dist/hooks/contacts/useShareContactsContent.js +26 -0
  106. package/dist/hooks/useAssignableList.d.ts +2 -0
  107. package/dist/hooks/useAssignableList.js +10 -1
  108. package/dist/index.d.ts +2 -1
  109. package/dist/index.js +2 -1
  110. package/dist/interfaces/contacts/ContactCard.interface.d.ts +4 -3
  111. package/dist/interfaces/contacts/ContactCardHeader.interface.d.ts +3 -3
  112. package/dist/interfaces/contacts/ContactCardInfo.interface.d.ts +1 -0
  113. package/dist/interfaces/contacts/ContactsContent.interface.d.ts +12 -2
  114. package/dist/interfaces/contacts/SelectedContacts.interface.d.ts +5 -0
  115. package/dist/interfaces/contacts/ShareContactBy.interface.d.ts +21 -0
  116. package/dist/interfaces/contacts/ShareContactSection.interface.d.ts +4 -0
  117. package/dist/interfaces/contacts/ShareContactSection.interface.js +1 -0
  118. package/dist/interfaces/contacts/ShareContactsContent.interface.d.ts +17 -0
  119. package/dist/interfaces/contacts/ShareContactsContent.interface.js +1 -0
  120. package/dist/interfaces/contacts/ViewContactPanel.interface.d.ts +2 -2
  121. package/dist/interfaces/contacts/index.d.ts +4 -2
  122. package/dist/interfaces/contacts/index.js +4 -2
  123. package/dist/interfaces/homeAssistant/BaseAlertCard.interface.d.ts +8 -0
  124. package/dist/interfaces/homeAssistant/BaseAlertCard.interface.js +1 -0
  125. package/dist/interfaces/homeAssistant/HomeMonitorSteps.interface.d.ts +11 -0
  126. package/dist/interfaces/homeAssistant/HomeMonitorSteps.interface.js +1 -0
  127. package/dist/interfaces/homeAssistant/MonitorAlerts.interface.d.ts +4 -0
  128. package/dist/interfaces/homeAssistant/MonitorAlerts.interface.js +1 -0
  129. package/dist/interfaces/homeAssistant/index.d.ts +3 -0
  130. package/dist/interfaces/homeAssistant/index.js +3 -0
  131. package/dist/interfaces/partner/PartnerFooter.interface.d.ts +1 -0
  132. package/dist/mocks/contacts/contacts.mock.d.ts +1 -0
  133. package/dist/mocks/contacts/contacts.mock.js +86 -2
  134. package/dist/stories/animations/HomieAnimation.stories.d.ts +4 -0
  135. package/dist/stories/animations/HomieAnimation.stories.js +11 -0
  136. package/dist/stories/assets/Illustrations.stories.js +2 -2
  137. package/dist/stories/contacts/ContactsContent.stories.d.ts +1 -10
  138. package/dist/stories/contacts/ContactsContent.stories.js +40 -13
  139. package/dist/stories/homeAssistant/HomeMonitor.stories.d.ts +4 -0
  140. package/dist/stories/homeAssistant/HomeMonitor.stories.js +25 -0
  141. package/dist/stories/homeAssistant/monitorAlerts/HomeAssistant.stories.d.ts +5 -0
  142. package/dist/stories/homeAssistant/monitorAlerts/HomeAssistant.stories.js +22 -0
  143. package/dist/theme/colors.d.ts +4 -0
  144. package/dist/theme/colors.js +4 -0
  145. package/package.json +2 -1
  146. package/src/assets/images/alerts/index.ts +3 -0
  147. package/src/assets/images/alerts/smoke-detector-expired.jpg +0 -0
  148. package/src/assets/images/battery.svg +9 -0
  149. package/src/assets/images/index.ts +5 -0
  150. package/src/assets/images/wind-white.svg +7 -0
  151. package/src/assets/locales/en/index.json +68 -1
  152. package/src/components/animations/HomieAnimation.tsx +12 -0
  153. package/src/components/animations/index.ts +1 -0
  154. package/src/components/badge/CustomBadge.tsx +22 -0
  155. package/src/components/badge/index.ts +5 -4
  156. package/src/components/contacts/ContactCard.tsx +10 -11
  157. package/src/components/contacts/ContactCardHeader.tsx +12 -4
  158. package/src/components/contacts/ContactCardInfo.tsx +11 -8
  159. package/src/components/contacts/ContactHeaderMenu.tsx +3 -15
  160. package/src/components/contacts/ContactsContent.tsx +143 -17
  161. package/src/components/contacts/LetterDivider.tsx +15 -0
  162. package/src/components/contacts/ShareContactSection.tsx +58 -0
  163. package/src/components/contacts/index.ts +3 -1
  164. package/src/components/contacts/shareContactForms/AddReceiverButton.tsx +20 -0
  165. package/src/components/contacts/shareContactForms/SendToList.tsx +47 -0
  166. package/src/components/contacts/shareContactForms/ShareContactByEmail.tsx +40 -41
  167. package/src/components/contacts/shareContactForms/ShareContactByHomefile.tsx +88 -0
  168. package/src/components/contacts/shareContactForms/ShareContactBySMS.tsx +49 -0
  169. package/src/components/contacts/shareContactForms/index.ts +4 -0
  170. package/src/components/contacts/sharePanel/SelectedContacts.tsx +37 -0
  171. package/src/components/contacts/sharePanel/ShareContactsContent.tsx +68 -0
  172. package/src/components/contacts/sharePanel/index.ts +2 -0
  173. package/src/components/homeAssistant/HomeAssistant.tsx +5 -1
  174. package/src/components/homeAssistant/HomeAssistantWrapper.tsx +3 -1
  175. package/src/components/homeAssistant/HomeMonitor.tsx +11 -0
  176. package/src/components/homeAssistant/HomeMonitorButton.tsx +69 -0
  177. package/src/components/homeAssistant/HomeMonitorSteps.tsx +29 -0
  178. package/src/components/homeAssistant/index.ts +4 -0
  179. package/src/components/homeAssistant/monitorAlerts/AlertHeader.tsx +30 -0
  180. package/src/components/homeAssistant/monitorAlerts/AlertTemplate.tsx +25 -0
  181. package/src/components/homeAssistant/monitorAlerts/AlertTitle.tsx +16 -0
  182. package/src/components/homeAssistant/monitorAlerts/BaseAlertCard.tsx +60 -0
  183. package/src/components/homeAssistant/monitorAlerts/MonitorAlerts.tsx +47 -0
  184. package/src/components/homeAssistant/monitorAlerts/Notifications.tsx +32 -0
  185. package/src/components/homeAssistant/monitorAlerts/alertDetails/ChangeAirFilter.tsx +54 -0
  186. package/src/components/homeAssistant/monitorAlerts/alertDetails/CustomDivider.tsx +5 -0
  187. package/src/components/homeAssistant/monitorAlerts/alertDetails/SmokeDetectorBattery.tsx +54 -0
  188. package/src/components/homeAssistant/monitorAlerts/alertDetails/SmokeDetectorExpired.tsx +43 -0
  189. package/src/components/homeAssistant/monitorAlerts/alertDetails/index.ts +4 -0
  190. package/src/components/homeAssistant/monitorAlerts/index.ts +7 -0
  191. package/src/components/homeAssistant/panel/HomeAssistantPanel.tsx +1 -1
  192. package/src/components/homeBoard/HomeBoard.tsx +2 -1
  193. package/src/components/inputs/TextInput.tsx +2 -1
  194. package/src/components/partner/PartnerFooter.tsx +2 -2
  195. package/src/components/partner/ShortPartnerTile.tsx +2 -1
  196. package/src/helpers/homeAssistant/HomeAssistant.helper.tsx +4 -4
  197. package/src/hooks/contacts/index.ts +4 -1
  198. package/src/hooks/contacts/useContactsContent.ts +38 -4
  199. package/src/hooks/contacts/useShareContactBy.ts +45 -0
  200. package/src/hooks/contacts/useShareContactByHomefile.ts +46 -0
  201. package/src/hooks/contacts/useShareContactsContent.ts +38 -0
  202. package/src/hooks/useAssignableList.ts +11 -1
  203. package/src/index.ts +8 -1
  204. package/src/interfaces/contacts/ContactCard.interface.ts +4 -7
  205. package/src/interfaces/contacts/ContactCardHeader.interface.ts +3 -3
  206. package/src/interfaces/contacts/ContactCardInfo.interface.ts +1 -0
  207. package/src/interfaces/contacts/ContactsContent.interface.ts +13 -2
  208. package/src/interfaces/contacts/SelectedContacts.interface.ts +6 -0
  209. package/src/interfaces/contacts/ShareContactBy.interface.ts +25 -0
  210. package/src/interfaces/contacts/ShareContactSection.interface.ts +6 -0
  211. package/src/interfaces/contacts/ShareContactsContent.interface.ts +24 -0
  212. package/src/interfaces/contacts/ViewContactPanel.interface.ts +2 -2
  213. package/src/interfaces/contacts/index.ts +4 -2
  214. package/src/interfaces/homeAssistant/BaseAlertCard.interface.ts +8 -0
  215. package/src/interfaces/homeAssistant/HomeMonitorSteps.interface.ts +13 -0
  216. package/src/interfaces/homeAssistant/MonitorAlerts.interface.ts +8 -0
  217. package/src/interfaces/homeAssistant/index.ts +3 -0
  218. package/src/interfaces/partner/PartnerFooter.interface.ts +1 -0
  219. package/src/mocks/contacts/contacts.mock.ts +87 -2
  220. package/src/stories/animations/HomieAnimation.stories.tsx +17 -0
  221. package/src/stories/assets/Illustrations.stories.tsx +2 -0
  222. package/src/stories/contacts/ContactsContent.stories.tsx +73 -16
  223. package/src/stories/homeAssistant/HomeMonitor.stories.tsx +54 -0
  224. package/src/stories/homeAssistant/monitorAlerts/HomeAssistant.stories.tsx +30 -0
  225. package/src/theme/colors.ts +4 -0
  226. package/dist/components/contacts/ShareContactPopover.d.ts +0 -2
  227. package/dist/components/contacts/ShareContactPopover.js +0 -32
  228. package/dist/interfaces/contacts/ShareContactByEmail.interface.d.ts +0 -11
  229. package/dist/interfaces/contacts/ShareContactPopover.interface.d.ts +0 -8
  230. package/src/components/contacts/ShareContactPopover.tsx +0 -106
  231. package/src/interfaces/contacts/ShareContactByEmail.interface.ts +0 -12
  232. package/src/interfaces/contacts/ShareContactPopover.interface.ts +0 -9
  233. /package/dist/interfaces/contacts/{ShareContactByEmail.interface.js → SelectedContacts.interface.js} +0 -0
  234. /package/dist/interfaces/contacts/{ShareContactPopover.interface.js → ShareContactBy.interface.js} +0 -0
@@ -0,0 +1,17 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { t } from 'i18next';
3
+ import { Box, Flex, Stack, Text } from '@chakra-ui/react';
4
+ import { AddReceiverButton, Loader, SendToList, ShareWithButton, TextInput, } from '../..';
5
+ import { isValidEmail } from '../../../utils';
6
+ import { useShareContactByHomefile } from '../../../hooks';
7
+ import { ShareHomeContactList } from '../../sharedHomePanel/ShareHomeContactList';
8
+ export const ShareContactByHomefile = ({ apiErrorMessage, homefileContacts, isLoading, onShare, onDropdownSelect, onContactSearch, onRemoveContact, shareWithList, }) => {
9
+ const { handleChangeValue, handleSetIsDirtyToTrue, handleToggleDropdown, isDirty, openDropdown, sendTo, value, } = useShareContactByHomefile({ onShare, shareWithList, sendBy: 'homefile' });
10
+ const errorMessage = apiErrorMessage !== null && apiErrorMessage !== void 0 ? apiErrorMessage : `${t('forms.email')} ${t('forms.required')}`;
11
+ return (_jsxs(Box, { w: "100%", children: [_jsxs(Stack, { p: "base", w: "100%", spacing: "base", children: [_jsx(Text, { fontFamily: "secondary", fontSize: "sm", children: t('contacts.shareWithHomefile') }), _jsxs(Flex, { gap: "base", children: [_jsxs(Flex, { position: "relative", flex: 1, children: [_jsx(ShareWithButton, { marginRight: "-1px", onClick: handleToggleDropdown }), _jsx(TextInput, { autoCapitalize: "none", autoCorrect: "off", id: "shareContactByHomefile", errorMessage: errorMessage, hasError: !isValidEmail(value) && isDirty, handleChange: handleChangeValue, placeholder: t('contacts.placeholders.searchContact'), value: value, onBlur: handleSetIsDirtyToTrue, type: "email" }), openDropdown && (_jsx(ShareHomeContactList, { contacts: homefileContacts, onClick: (contact) => {
12
+ onDropdownSelect(contact);
13
+ handleToggleDropdown();
14
+ }, onDone: handleToggleDropdown, onChange: () => null, onSave: () => null, selectedContact: {
15
+ email: '',
16
+ } }))] }), _jsx(AddReceiverButton, { onClick: () => onContactSearch(value), isDisabled: !isValidEmail(value) })] })] }), !isLoading && _jsx(SendToList, { sendTo: sendTo, onDelete: onRemoveContact }), isLoading && _jsx(Loader, { height: "100px" })] }));
17
+ };
@@ -0,0 +1,2 @@
1
+ import { ShareContactByI } from '../../../interfaces';
2
+ export declare const ShareContactBySMS: ({ apiErrorMessage, onShare, }: ShareContactByI) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,11 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { t } from 'i18next';
3
+ import { Box, Flex, Stack, Text } from '@chakra-ui/react';
4
+ import { AddReceiverButton, SendToList, TextInput } from '../..';
5
+ import { isEmptyField } from '../../../utils';
6
+ import { useShareContactBy } from '../../../hooks';
7
+ export const ShareContactBySMS = ({ apiErrorMessage, onShare, }) => {
8
+ const { sendTo, handleAdd, handleChangeValue, handleDelete, handleSetIsDirtyToTrue, isDirty, value, } = useShareContactBy({ onShare, sendBy: 'sms' });
9
+ const errorMessage = apiErrorMessage !== null && apiErrorMessage !== void 0 ? apiErrorMessage : `${t('forms.phone')} ${t('forms.required')}`;
10
+ return (_jsxs(Box, { w: "100%", children: [_jsxs(Stack, { p: "base", w: "100%", spacing: "base", children: [_jsx(Text, { fontFamily: "secondary", fontSize: "sm", children: t('contacts.shareWithSMS') }), _jsxs(Flex, { gap: "base", children: [_jsx(TextInput, { errorMessage: errorMessage, hasError: isEmptyField(value) && isDirty, id: "shareContactBySMS", handleChange: handleChangeValue, placeholder: t('contacts.placeholders.sms'), value: value, type: "number", onBlur: handleSetIsDirtyToTrue }), _jsx(AddReceiverButton, { onClick: handleAdd, isDisabled: isEmptyField(value) })] })] }), _jsx(SendToList, { sendTo: sendTo, onDelete: handleDelete })] }));
11
+ };
@@ -1 +1,5 @@
1
+ export * from './AddReceiverButton';
2
+ export * from './SendToList';
1
3
  export * from './ShareContactByEmail';
4
+ export * from './ShareContactByHomefile';
5
+ export * from './ShareContactBySMS';
@@ -1 +1,5 @@
1
+ export * from './AddReceiverButton';
2
+ export * from './SendToList';
1
3
  export * from './ShareContactByEmail';
4
+ export * from './ShareContactByHomefile';
5
+ export * from './ShareContactBySMS';
@@ -0,0 +1,2 @@
1
+ import { SelectedContactsI } from '../../../interfaces';
2
+ export declare const SelectedContacts: ({ contacts, onDeleteSelected, }: SelectedContactsI) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,8 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Stack, Flex, IconButton } from '@chakra-ui/react';
3
+ import { TrashIcon, ContactCard } from '../..';
4
+ export const SelectedContacts = ({ contacts, onDeleteSelected, }) => {
5
+ return (_jsx(Stack, { spacing: "1", p: "4", bg: "lightBlue.5", maxH: "300px", overflowY: "scroll", children: contacts.map((contact, index) => (_jsxs(Flex, { align: "center", children: [_jsx(ContactCard, { contact: contact, index: index, showHeader: false, showAvatar: false }, contact._id), _jsx(IconButton, { "aria-label": "Remove field", variant: "unstyled", icon: _jsx(TrashIcon, {}), size: "md", position: "relative", right: "-16px", transition: "all 0.2s ease-in-out", _hover: {
6
+ filter: 'brightness(0.7)',
7
+ }, onClick: () => onDeleteSelected(contact._id) })] }, contact._id))) }));
8
+ };
@@ -0,0 +1,2 @@
1
+ import { ShareContactsContentI } from '../../../interfaces';
2
+ export declare const ShareContactsContent: ({ contacts, onClose, onShare, ...props }: ShareContactsContentI) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,28 @@
1
+ var __rest = (this && this.__rest) || function (s, e) {
2
+ var t = {};
3
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
+ t[p] = s[p];
5
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
+ t[p[i]] = s[p[i]];
9
+ }
10
+ return t;
11
+ };
12
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
+ import { t } from 'i18next';
14
+ import { DrawerContent, DrawerHeader, DrawerBody, Stack, DrawerFooter, } from '@chakra-ui/react';
15
+ import { Contacts } from '../../../assets/images';
16
+ import { FooterButtons, FooterDrawer, PanelHeader, SelectedContacts, ShareContactSection, } from '../..';
17
+ import { useShareContactsContent } from '../../../hooks';
18
+ export const ShareContactsContent = (_a) => {
19
+ var { contacts, onClose, onShare } = _a, props = __rest(_a, ["contacts", "onClose", "onShare"]);
20
+ const { contactsSelected, recipientsToSend, handleAddRecipient, handleDeleteSelectedContact, handleShareContacts, } = useShareContactsContent({ contacts, onShare });
21
+ const numberOfContacts = Number(contacts.length);
22
+ return (_jsxs(DrawerContent, { bg: "lightBlue.1", children: [_jsx(DrawerHeader, { p: "0", children: _jsx(PanelHeader, { handleCloseButton: onClose, icon: Contacts, title: `${t('contacts.shareContact')} (${numberOfContacts})` }) }), _jsx(DrawerBody, { p: "0", overflowX: "hidden", overflowY: "scroll", bg: "lightBlue.2", children: _jsxs(Stack, { pb: "120px", spacing: "0", children: [_jsx(SelectedContacts, { contacts: contactsSelected, onDeleteSelected: handleDeleteSelectedContact }), _jsx(ShareContactSection, Object.assign({}, props, { onShare: handleAddRecipient }))] }) }), _jsx(DrawerFooter, { p: "0", children: _jsx(FooterDrawer, { isOpen: true, children: _jsx(FooterButtons, { button1: {
23
+ buttonStyle: 'primaryFooter',
24
+ label: t('buttons.send'),
25
+ isDisabled: Number(recipientsToSend.length) === 0,
26
+ onClick: handleShareContacts,
27
+ } }) }) })] }));
28
+ };
@@ -0,0 +1,2 @@
1
+ export * from './SelectedContacts';
2
+ export * from './ShareContactsContent';
@@ -0,0 +1,2 @@
1
+ export * from './SelectedContacts';
2
+ export * from './ShareContactsContent';
@@ -11,10 +11,11 @@ var __rest = (this && this.__rest) || function (s, e) {
11
11
  };
12
12
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
13
  import { useState } from 'react';
14
+ import { t } from 'i18next';
14
15
  import { HomeAssistantSteps, HomeAssistantTutorial, HomeAssistantWrapper, } from '..';
15
16
  export const HomeAssistant = (_a) => {
16
17
  var { showTutorial = false, tutorialUrl = '' } = _a, props = __rest(_a, ["showTutorial", "tutorialUrl"]);
17
18
  const [startSetup, setStartSetup] = useState(false);
18
19
  const showAirplane = props.currentStep === 6 && (!showTutorial || startSetup);
19
- return (_jsxs(HomeAssistantWrapper, { showAirplane: showAirplane, children: [!startSetup && showTutorial && (_jsx(HomeAssistantTutorial, { onStart: () => setStartSetup(true), videoUrl: tutorialUrl })), (startSetup || !showTutorial) && _jsx(HomeAssistantSteps, Object.assign({}, props))] }));
20
+ return (_jsxs(HomeAssistantWrapper, { showAirplane: showAirplane, title: t('homeAssistant.title'), children: [!startSetup && showTutorial && (_jsx(HomeAssistantTutorial, { onStart: () => setStartSetup(true), videoUrl: tutorialUrl })), (startSetup || !showTutorial) && _jsx(HomeAssistantSteps, Object.assign({}, props))] }));
20
21
  };
@@ -1,4 +1,5 @@
1
1
  import { PropsWithChildren } from 'react';
2
- export declare const HomeAssistantWrapper: ({ children, showAirplane, }: PropsWithChildren<{
2
+ export declare const HomeAssistantWrapper: ({ children, showAirplane, title, }: PropsWithChildren<{
3
3
  showAirplane?: boolean;
4
+ title: string;
4
5
  }>) => import("react/jsx-runtime").JSX.Element;
@@ -1,11 +1,10 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { t } from 'i18next';
3
2
  import { Box, Center, GridItem, Image } from '@chakra-ui/react';
4
3
  import { ContainerHeader, TileTooltip, moveRightToLeftWithFade, moveRightToLeft, moveLeftToRightAirplane, } from '..';
5
4
  import { Airplane, Cloud1, Cloud2, Cloud3, IA, TreesCrop, } from '../../assets/images';
6
5
  import { getImageAltText } from '../../utils';
7
6
  import { colors } from '../../theme/colors';
8
- export const HomeAssistantWrapper = ({ children, showAirplane, }) => {
7
+ export const HomeAssistantWrapper = ({ children, showAirplane, title, }) => {
9
8
  const treesAlt = getImageAltText(TreesCrop);
10
- return (_jsx(GridItem, { colSpan: [1, 2], children: _jsx(TileTooltip, { label: "homeAssistant", children: _jsxs(Box, { bgGradient: colors.skyGradient, boxShadow: "base", h: "full", position: "relative", overflowX: "hidden", children: [_jsx(ContainerHeader, { title: t('homeAssistant.title'), titleIcon: IA }), _jsx(Center, { minH: "477px", children: children }), _jsx(Image, { src: Cloud1, position: "absolute", w: "auto", h: "80px", top: "80px", animation: `${moveRightToLeftWithFade} 400s linear infinite`, zIndex: "1" }), _jsx(Image, { src: Cloud2, position: "absolute", w: "auto", h: "112px", top: "150px", animation: `${moveRightToLeft} 200s linear infinite`, zIndex: "1" }), _jsx(Image, { src: Cloud3, position: "absolute", w: "auto", h: "160px", top: "200px", animation: `${moveRightToLeft} 130s linear infinite`, zIndex: "1" }), showAirplane && (_jsx(Image, { src: Airplane, position: "absolute", w: "auto", h: "40px", top: "85px", animation: `${moveLeftToRightAirplane} 500s cubic-bezier(1, 1, 1, 500) infinite`, zIndex: "1" })), _jsx(Image, { src: TreesCrop, alt: treesAlt, position: "absolute", bottom: "0", right: "2", w: "auto", h: "70px", zIndex: "1" })] }) }) }));
9
+ return (_jsx(GridItem, { colSpan: [1, 2], children: _jsx(TileTooltip, { label: "homeAssistant", children: _jsxs(Box, { bgGradient: colors.skyGradient, boxShadow: "base", h: "full", position: "relative", overflowX: "hidden", children: [_jsx(ContainerHeader, { title: title, titleIcon: IA }), _jsx(Center, { minH: "477px", children: children }), _jsx(Image, { src: Cloud1, position: "absolute", w: "auto", h: "80px", top: "80px", animation: `${moveRightToLeftWithFade} 400s linear infinite`, zIndex: "1" }), _jsx(Image, { src: Cloud2, position: "absolute", w: "auto", h: "112px", top: "150px", animation: `${moveRightToLeft} 200s linear infinite`, zIndex: "1" }), _jsx(Image, { src: Cloud3, position: "absolute", w: "auto", h: "160px", top: "200px", animation: `${moveRightToLeft} 130s linear infinite`, zIndex: "1" }), showAirplane && (_jsx(Image, { src: Airplane, position: "absolute", w: "auto", h: "40px", top: "85px", animation: `${moveLeftToRightAirplane} 500s cubic-bezier(1, 1, 1, 500) infinite`, zIndex: "1" })), _jsx(Image, { src: TreesCrop, alt: treesAlt, position: "absolute", bottom: "0", right: "2", w: "auto", h: "70px", zIndex: "1" })] }) }) }));
11
10
  };
@@ -0,0 +1,2 @@
1
+ import { PropsWithChildren } from 'react';
2
+ export declare const HomeMonitor: ({ children }: PropsWithChildren<{}>) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,6 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { t } from 'i18next';
3
+ import { HomeAssistantWrapper } from '..';
4
+ export const HomeMonitor = ({ children }) => {
5
+ return (_jsx(HomeAssistantWrapper, { showAirplane: true, title: t('homeAssistant.homeMonitor'), children: children }));
6
+ };
@@ -0,0 +1,2 @@
1
+ import { HomeMonitorButtonI } from '../../interfaces';
2
+ export declare const HomeMonitorButton: ({ currentStep, onStepClick, status, step, }: HomeMonitorButtonI) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,31 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Box, Center, Image, Stack, Text } from '@chakra-ui/react';
3
+ import { getIconAltText } from '../../utils';
4
+ export const HomeMonitorButton = ({ currentStep, onStepClick, status, step, }) => {
5
+ const iconAltText = getIconAltText(step.icon);
6
+ const handleClick = () => {
7
+ console.log({ status });
8
+ if (status !== 'ok')
9
+ onStepClick(currentStep);
10
+ };
11
+ return (_jsx(Box, { children: _jsxs(Stack, Object.assign({ as: "button", spacing: "2", borderRadius: "lg", boxShadow: "lg", border: "1px solid transparent", w: "90px", align: "center", h: "96px", py: "base", bg: "neutral.white" }, setStyles(status), { onClick: handleClick, children: [_jsx(Center, { h: "60%", children: _jsx(Image, { src: step.icon, alt: iconAltText, w: "auto", h: "28px" }) }), _jsx(Center, { h: "40%", children: _jsx(Text, { fontSize: "xs", textTransform: "uppercase", textAlign: "center", lineHeight: "14px", children: step.title }) })] })) }));
12
+ };
13
+ const setStyles = (status) => {
14
+ switch (status) {
15
+ case 'alert':
16
+ return {
17
+ cursor: 'pointer',
18
+ border: '1px solid',
19
+ borderColor: 'error.2',
20
+ transition: 'all 0.3s',
21
+ _hover: {
22
+ bg: 'lightGreen.7',
23
+ },
24
+ };
25
+ case 'ok':
26
+ return {
27
+ cursor: 'not-allowed',
28
+ filter: 'grayscale(1) opacity(0.6)',
29
+ };
30
+ }
31
+ };
@@ -0,0 +1,2 @@
1
+ import { HomeMonitortStepsI } from '../../interfaces';
2
+ export declare const HomeMonitorSteps: ({ onStepClick, stepsWithAlerts, }: HomeMonitortStepsI) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,11 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { Box, Flex } from '@chakra-ui/react';
3
+ import { HomeMonitorButton } from '..';
4
+ import { homeAssistantSteps } from '../../helpers';
5
+ export const HomeMonitorSteps = ({ onStepClick, stepsWithAlerts, }) => {
6
+ return (_jsx(Flex, { gap: "base", children: homeAssistantSteps.map((step, index) => (_jsx(Box, { flex: "auto", children: _jsx(HomeMonitorButton, { currentStep: index + 1, onStepClick: onStepClick, status: getStatus(index + 1, stepsWithAlerts), step: step }) }, step.title))) }));
7
+ };
8
+ const getStatus = (index, stepsWithAlerts) => {
9
+ const hasAlert = stepsWithAlerts.includes(index);
10
+ return hasAlert ? 'alert' : 'ok';
11
+ };
@@ -1,3 +1,4 @@
1
+ export * from './monitorAlerts';
1
2
  export * from './panel';
2
3
  export * from './HomeAssistant';
3
4
  export * from './HomeAssistantButton';
@@ -5,3 +6,6 @@ export * from './HomeAssistantStepper';
5
6
  export * from './HomeAssistantSteps';
6
7
  export * from './HomeAssistantTutorial';
7
8
  export * from './HomeAssistantWrapper';
9
+ export * from './HomeMonitor';
10
+ export * from './HomeMonitorButton';
11
+ export * from './HomeMonitorSteps';
@@ -1,3 +1,4 @@
1
+ export * from './monitorAlerts';
1
2
  export * from './panel';
2
3
  export * from './HomeAssistant';
3
4
  export * from './HomeAssistantButton';
@@ -5,3 +6,6 @@ export * from './HomeAssistantStepper';
5
6
  export * from './HomeAssistantSteps';
6
7
  export * from './HomeAssistantTutorial';
7
8
  export * from './HomeAssistantWrapper';
9
+ export * from './HomeMonitor';
10
+ export * from './HomeMonitorButton';
11
+ export * from './HomeMonitorSteps';
@@ -0,0 +1 @@
1
+ export declare const AlertHeader: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,7 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { t } from 'i18next';
3
+ import { Flex, Center, Image, Text } from '@chakra-ui/react';
4
+ import { Exclamation } from '../../../assets/images';
5
+ export const AlertHeader = () => {
6
+ return (_jsx(Flex, { justifyContent: "space-between", px: "base", py: "1", bg: "error.2", borderTopRadius: "lg", align: "center", children: _jsxs(Flex, { align: "center", gap: "2", children: [_jsx(Center, { p: "1", borderRadius: "full", bg: "pink.1", h: "18px", w: "18px", children: _jsx(Image, { src: Exclamation, h: "100%", w: "auto" }) }), _jsx(Text, { color: "white", fontSize: "sm", fontWeight: "medium", textTransform: "uppercase", children: t('homeAssistant.monitorAlerts.homeAction') })] }) }));
7
+ };
@@ -0,0 +1,2 @@
1
+ import { BaseAlertCardI } from '../../../interfaces';
2
+ export declare const AlertTemplate: ({ bg, description, icon, title, }: Pick<BaseAlertCardI, "bg" | "description" | "title" | "icon">) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,5 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Center, Flex, Image, Stack, Text } from '@chakra-ui/react';
3
+ export const AlertTemplate = ({ bg = 'error.1', description, icon, title, }) => {
4
+ return (_jsxs(Flex, { gap: "base", px: "base", pt: "1", pb: "4", children: [_jsx(Center, { minW: "60px", h: "60px", bg: bg, borderRadius: "md", children: _jsx(Image, { src: icon, maxH: "36px", w: "auto" }) }), _jsxs(Stack, { children: [_jsx(Text, { fontWeight: "semibold", fontSize: "xl", lineHeight: "1.2", children: title }), _jsx(Text, { fontFamily: "secondary", fontSize: "sm", lineHeight: "1.2", children: description })] })] }));
5
+ };
@@ -0,0 +1,2 @@
1
+ import { BaseAlertCardI } from '../../../interfaces';
2
+ export declare const AlertTitle: ({ alertIcon, alertTitle, }: Pick<BaseAlertCardI, "alertIcon" | "alertTitle">) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,5 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Flex, Image, Text } from '@chakra-ui/react';
3
+ export const AlertTitle = ({ alertIcon, alertTitle, }) => {
4
+ return (_jsxs(Flex, { align: "center", gap: "1", p: "base", children: [_jsx(Image, { src: alertIcon, h: "20px", w: "20px" }), _jsx(Text, { fontSize: "xs", textTransform: "uppercase", children: alertTitle })] }));
5
+ };
@@ -0,0 +1,3 @@
1
+ import { PropsWithChildren } from 'react';
2
+ import { BaseAlertCardI } from '../../../interfaces';
3
+ export declare const BaseAlertCard: ({ alertIcon, alertTitle, children, ...props }: PropsWithChildren<BaseAlertCardI>) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,21 @@
1
+ var __rest = (this && this.__rest) || function (s, e) {
2
+ var t = {};
3
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
+ t[p] = s[p];
5
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
+ t[p[i]] = s[p[i]];
9
+ }
10
+ return t;
11
+ };
12
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
13
+ import { t } from 'i18next';
14
+ import { Box, Button, Collapse, Flex, useDisclosure } from '@chakra-ui/react';
15
+ import { AlertHeader, AlertTemplate, AlertTitle, Overlay } from '../..';
16
+ import { Warranty } from '../../../assets/images';
17
+ export const BaseAlertCard = (_a) => {
18
+ var { alertIcon = Warranty, alertTitle = t('homeAssistant.monitorAlerts.protection'), children } = _a, props = __rest(_a, ["alertIcon", "alertTitle", "children"]);
19
+ const { isOpen, onToggle } = useDisclosure();
20
+ return (_jsxs(_Fragment, { children: [_jsxs(Box, { display: "flex", flexDir: "column", bg: "neutral.white", boxShadow: "lg", borderRadius: "lg", overflow: "hidden", maxW: "420px", position: isOpen ? 'absolute' : 'relative', top: isOpen ? '4' : 'auto', left: isOpen ? 'calc(50% - 218px)' : 'auto', zIndex: "popover", children: [_jsx(AlertHeader, {}), _jsx(AlertTitle, { alertIcon: alertIcon, alertTitle: alertTitle }), _jsx(AlertTemplate, Object.assign({}, props)), _jsx(Collapse, { in: isOpen, animateOpacity: true, children: _jsx(Box, { p: "base", bg: "lightBlue.1", children: children }) }), _jsx(Flex, { py: "base", bg: "lightBlue.1", justify: "flex-end", children: _jsx(Button, { variant: "leftRounded", w: "fit-content", px: "8", fontSize: "sm", fontWeight: "medium", onClick: onToggle, bg: isOpen ? 'blue.8' : 'blue.2', children: t(`homeAssistant.monitorAlerts.${isOpen ? 'collapse' : 'review'}`) }) })] }), _jsx(Overlay, { bg: "overlayWhite", showOverlay: isOpen, position: "absolute", zIndex: "modal" })] }));
21
+ };
@@ -0,0 +1,2 @@
1
+ import { MonitorAlertsI } from '../../../interfaces';
2
+ export declare const MonitorAlerts: ({ alertId }: MonitorAlertsI) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,32 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { t } from 'i18next';
3
+ import { BaseAlertCard, ChangeAirFilter, SmokeDetectorBattery, SmokeDetectorExpired, } from '../..';
4
+ import { Battery, Fire, GearTime, WindWhite } from '../../../assets/images';
5
+ export const MonitorAlerts = ({ alertId }) => {
6
+ const alertChildren = {
7
+ 'smoke-detector-battery': _jsx(SmokeDetectorBattery, {}),
8
+ 'smoke-detector-expired': _jsx(SmokeDetectorExpired, {}),
9
+ 'change-air-filter': _jsx(ChangeAirFilter, {}),
10
+ };
11
+ const alerts = {
12
+ 'change-air-filter': {
13
+ bg: 'lightBlue.8',
14
+ alertIcon: GearTime,
15
+ alertTitle: t('homeAssistant.monitorAlerts.maintenance'),
16
+ icon: WindWhite,
17
+ title: t('homeAssistant.alerts.airFilter.main.title'),
18
+ description: t('homeAssistant.alerts.airFilter.main.description'),
19
+ },
20
+ 'smoke-detector-battery': {
21
+ icon: Battery,
22
+ title: t('homeAssistant.alerts.smokeDetectorBattery.main.title'),
23
+ description: t('homeAssistant.alerts.smokeDetectorBattery.main.description'),
24
+ },
25
+ 'smoke-detector-expired': {
26
+ icon: Fire,
27
+ title: t('homeAssistant.alerts.smokeDetectorExpired.main.title'),
28
+ description: t('homeAssistant.alerts.smokeDetectorExpired.main.description'),
29
+ },
30
+ };
31
+ return (_jsx(BaseAlertCard, Object.assign({}, alerts[alertId], { children: alertChildren[alertId] })));
32
+ };
@@ -0,0 +1,4 @@
1
+ export declare const Notifications: ({ date, local }: {
2
+ date?: string | undefined;
3
+ local?: string | undefined;
4
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,9 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Stack, Flex, Center, Text } from '@chakra-ui/react';
3
+ import { t } from 'i18next';
4
+ export const Notifications = ({ date = '', local = '' }) => {
5
+ return (_jsxs(Stack, { spacing: "base", minH: "full", zIndex: "2", children: [_jsxs(Flex, { justify: "space-between", children: [_jsx(CustomText, { children: date }), _jsx(CustomText, { children: local })] }), _jsx(Center, { w: "188px", h: "full", border: "1px dashed", borderColor: "blue.1", borderRadius: "sm", children: _jsx(Text, { fontSize: "sm", fontFamily: "secondary", children: t('homeAssistant.notifications') }) })] }));
6
+ };
7
+ const CustomText = ({ children = '' }) => {
8
+ return (_jsx(Text, { fontSize: "sm", fontFamily: "secondary", textTransform: "uppercase", children: children }));
9
+ };
@@ -0,0 +1 @@
1
+ export declare const ChangeAirFilter: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,11 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { t } from 'i18next';
3
+ import { Box, Flex, Stack, Text } from '@chakra-ui/react';
4
+ import { CustomBadge } from '../../../badge';
5
+ import { CustomDivider } from '../../..';
6
+ export const ChangeAirFilter = () => {
7
+ return (_jsxs(Stack, { spacing: "base", children: [_jsx(Text, { fontSize: "sm", fontFamily: "secondary", lineHeight: "1.2", children: t('homeAssistant.alerts.airFilter.description') }), _jsx(CustomDivider, {}), _jsx(Text, { fontWeight: "semibold", children: t('homeAssistant.alerts.airFilter.title') }), _jsx(CustomDivider, {}), _jsx(FilterType, { badgeText: t('homeAssistant.alerts.airFilter.bestBadge'), title: t('homeAssistant.alerts.airFilter.best.title'), description: t('homeAssistant.alerts.airFilter.best.description') }), _jsx(CustomDivider, {}), _jsx(FilterType, { badgeText: t('homeAssistant.alerts.airFilter.betterBadge'), title: t('homeAssistant.alerts.airFilter.better.title'), description: t('homeAssistant.alerts.airFilter.better.description'), bg: "blue.11" })] }));
8
+ };
9
+ const FilterType = ({ badgeText = '', title = '', description = '', bg = 'blue.10', }) => {
10
+ return (_jsxs(Flex, { gap: "base", children: [_jsx(Box, { h: "fit-content", minW: "48px", children: _jsx(CustomBadge, { label: badgeText, bg: bg }) }), _jsxs(Stack, { spacing: "1", children: [_jsx(Text, { fontSize: "sm", fontWeight: "semibold", lineHeight: "1.2", children: title }), _jsx(Text, { fontSize: "sm", fontFamily: "secondary", lineHeight: "1.2", children: description })] })] }));
11
+ };
@@ -0,0 +1 @@
1
+ export declare const CustomDivider: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,5 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { Divider } from '@chakra-ui/react';
3
+ export const CustomDivider = () => {
4
+ return _jsx(Divider, { borderStyle: "dashed", borderColor: "gray.1" });
5
+ };
@@ -0,0 +1 @@
1
+ export declare const SmokeDetectorBattery: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,11 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { t } from 'i18next';
3
+ import { Box, Flex, Stack, Text } from '@chakra-ui/react';
4
+ import { CustomBadge } from '../../../badge';
5
+ import { CustomDivider } from '../../..';
6
+ export const SmokeDetectorBattery = () => {
7
+ return (_jsxs(Stack, { spacing: "base", children: [_jsx(Text, { fontWeight: "semibold", children: t('homeAssistant.alerts.smokeDetectorBattery.title') }), _jsx(CustomDivider, {}), _jsx(BatteryType, { badgeText: t('homeAssistant.alerts.smokeDetectorBattery.bestBadge'), title: t('homeAssistant.alerts.smokeDetectorBattery.best.title'), description: t('homeAssistant.alerts.smokeDetectorBattery.best.description') }), _jsx(CustomDivider, {}), _jsx(BatteryType, { badgeText: t('homeAssistant.alerts.smokeDetectorBattery.betterBadge'), title: t('homeAssistant.alerts.smokeDetectorBattery.better.title'), description: t('homeAssistant.alerts.smokeDetectorBattery.better.description'), bg: "blue.11" })] }));
8
+ };
9
+ const BatteryType = ({ badgeText = '', title = '', description = '', bg = 'blue.10', }) => {
10
+ return (_jsxs(Flex, { gap: "base", children: [_jsx(Box, { h: "fit-content", minW: "48px", children: _jsx(CustomBadge, { label: badgeText, bg: bg }) }), _jsxs(Stack, { spacing: "1", children: [_jsx(Text, { fontSize: "sm", fontWeight: "semibold", lineHeight: "1.2", children: title }), _jsx(Text, { fontSize: "sm", fontFamily: "secondary", lineHeight: "1.2", children: description })] })] }));
11
+ };
@@ -0,0 +1 @@
1
+ export declare const SmokeDetectorExpired: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,11 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { t } from 'i18next';
3
+ import { Box, Flex, Image, Stack, Text } from '@chakra-ui/react';
4
+ import { CustomDivider } from '../../..';
5
+ import { SmokeDetectroExpiredImage } from '../../../../assets/images';
6
+ export const SmokeDetectorExpired = () => {
7
+ return (_jsxs(Stack, { spacing: "base", children: [_jsx(Text, { fontSize: "sm", fontFamily: "secondary", lineHeight: "1.2", children: t('homeAssistant.alerts.smokeDetectorExpired.description') }), _jsx(CustomDivider, {}), _jsx(Text, { fontWeight: "semibold", children: t('homeAssistant.alerts.smokeDetectorExpired.title') }), _jsxs(Flex, { gap: "base", children: [_jsx(Image, { src: SmokeDetectroExpiredImage, boxSize: "84px" }), _jsxs(Stack, { spacing: "1", children: [_jsx(CheckItem, { text: t('homeAssistant.alerts.smokeDetectorExpired.check1') }), _jsx(CheckItem, { text: t('homeAssistant.alerts.smokeDetectorExpired.check2') }), _jsx(CheckItem, { text: t('homeAssistant.alerts.smokeDetectorExpired.check3') })] })] })] }));
8
+ };
9
+ const CheckItem = ({ text = '' }) => {
10
+ return (_jsxs(Flex, { align: "center", gap: "base", children: [_jsx(Box, { boxSize: "6px", borderRadius: "full", bg: "gray.3" }), _jsx(Text, { fontSize: "sm", fontFamily: "secondary", children: text })] }));
11
+ };
@@ -0,0 +1,4 @@
1
+ export * from './ChangeAirFilter';
2
+ export * from './CustomDivider';
3
+ export * from './SmokeDetectorBattery';
4
+ export * from './SmokeDetectorExpired';
@@ -0,0 +1,4 @@
1
+ export * from './ChangeAirFilter';
2
+ export * from './CustomDivider';
3
+ export * from './SmokeDetectorBattery';
4
+ export * from './SmokeDetectorExpired';
@@ -0,0 +1,7 @@
1
+ export * from './alertDetails';
2
+ export * from './AlertHeader';
3
+ export * from './AlertTemplate';
4
+ export * from './AlertTitle';
5
+ export * from './BaseAlertCard';
6
+ export * from './MonitorAlerts';
7
+ export * from './Notifications';
@@ -0,0 +1,7 @@
1
+ export * from './alertDetails';
2
+ export * from './AlertHeader';
3
+ export * from './AlertTemplate';
4
+ export * from './AlertTitle';
5
+ export * from './BaseAlertCard';
6
+ export * from './MonitorAlerts';
7
+ export * from './Notifications';
@@ -9,7 +9,7 @@ import { useSimpleDynamicForm } from '../../../hooks';
9
9
  export const HomeAssistantPanel = ({ children, currentForm, currentStep, onApplianceClick, onBack, onClose, onNext, onSave, backDisabled, nextDisabled, }) => {
10
10
  const { title } = homeAssistantSteps[currentStep - 1];
11
11
  const text = `${t('homeAssistant.details')} ${title.toLowerCase()}:`;
12
- const isAppliances = currentStep === 3;
12
+ const isAppliances = currentStep === 4;
13
13
  const { form, updatedFields } = useSimpleDynamicForm({
14
14
  fields: currentForm,
15
15
  });
@@ -45,7 +45,7 @@ export const HomeBoard = () => {
45
45
  label: 'Edit Contact',
46
46
  handleClick: () => null,
47
47
  },
48
- ], onShare: () => null })),
48
+ ], onShareContacts: () => null, onDeleteContacts: () => 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, onSave: () => { }, backDisabled: false, nextDisabled: false })),
@@ -1,2 +1,2 @@
1
1
  import { InputI } from '../../interfaces';
2
- export declare const TextInput: ({ autoCapitalize, autoCorrect, errorMessage, handleChange, hasError, id, isDisabled, placeholder, value, ...props }: InputI) => import("react/jsx-runtime").JSX.Element;
2
+ export declare const TextInput: ({ autoCapitalize, autoCorrect, errorMessage, handleChange, hasError, id, isDisabled, placeholder, value, type, ...props }: InputI) => import("react/jsx-runtime").JSX.Element;
@@ -12,7 +12,7 @@ var __rest = (this && this.__rest) || function (s, e) {
12
12
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
13
  import { FormControl, Text, Input, Tooltip } from '@chakra-ui/react';
14
14
  export const TextInput = (_a) => {
15
- var { autoCapitalize = 'on', autoCorrect = 'on', errorMessage, handleChange, hasError, id, isDisabled, placeholder, value = '' } = _a, props = __rest(_a, ["autoCapitalize", "autoCorrect", "errorMessage", "handleChange", "hasError", "id", "isDisabled", "placeholder", "value"]);
15
+ var { autoCapitalize = 'on', autoCorrect = 'on', errorMessage, handleChange, hasError, id, isDisabled, placeholder, value = '', type = 'text' } = _a, props = __rest(_a, ["autoCapitalize", "autoCorrect", "errorMessage", "handleChange", "hasError", "id", "isDisabled", "placeholder", "value", "type"]);
16
16
  const error = hasError && !isDisabled;
17
- return (_jsxs(FormControl, { isInvalid: error, children: [_jsx(Tooltip, { label: placeholder, children: _jsx(Input, Object.assign({}, props, { autoCapitalize: autoCapitalize, autoCorrect: autoCorrect, id: id, placeholder: placeholder, type: "text", value: value, onChange: handleChange, isInvalid: error, isDisabled: isDisabled, _placeholder: { color: 'gray.2' } })) }), error && _jsx(Text, { variant: "error", children: errorMessage })] }));
17
+ return (_jsxs(FormControl, { isInvalid: error, children: [_jsx(Tooltip, { label: placeholder, children: _jsx(Input, Object.assign({}, props, { autoCapitalize: autoCapitalize, autoCorrect: autoCorrect, id: id, placeholder: placeholder, value: value, type: type, onChange: handleChange, isInvalid: error, isDisabled: isDisabled, _placeholder: { color: 'gray.2' } })) }), error && _jsx(Text, { variant: "error", children: errorMessage })] }));
18
18
  };
@@ -1,2 +1,2 @@
1
1
  import { PartnerFooterI } from '../../interfaces';
2
- export declare const PartnerFooter: ({ socialLinks, websiteUrl, }: PartnerFooterI) => import("react/jsx-runtime").JSX.Element;
2
+ export declare const PartnerFooter: ({ socialLinks, websiteUrl, urlText, }: PartnerFooterI) => import("react/jsx-runtime").JSX.Element;
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Flex, IconButton, Link, Text } from '@chakra-ui/react';
3
3
  import { SocialIcons } from '..';
4
- export const PartnerFooter = ({ socialLinks = [], websiteUrl, }) => {
4
+ export const PartnerFooter = ({ socialLinks = [], websiteUrl, urlText, }) => {
5
5
  var _a;
6
6
  const hasSocialLinks = (socialLinks === null || socialLinks === void 0 ? void 0 : socialLinks.length) > 0;
7
7
  const cleanedWebsiteUrl = (_a = websiteUrl === null || websiteUrl === void 0 ? void 0 : websiteUrl.replace(/(^\w+:)/, '')) === null || _a === void 0 ? void 0 : _a.replace(/\//g, '');
@@ -10,5 +10,5 @@ export const PartnerFooter = ({ socialLinks = [], websiteUrl, }) => {
10
10
  return;
11
11
  window.open(url, '_blank');
12
12
  };
13
- return (_jsxs(Flex, { align: "center", justify: "space-between", p: "base", children: [_jsx(Link, { href: websiteUrl, isExternal: true, children: _jsx(Text, { fontSize: "xs", color: "blue.3", children: cleanedWebsiteUrl }) }), hasSocialLinks && (_jsx(Flex, { align: "center", gap: "1", children: socialLinks === null || socialLinks === void 0 ? void 0 : socialLinks.map(({ name, link }) => (_jsx(IconButton, { variant: "unstyled", w: "fit-content", "aria-label": "Instagram", icon: SocialIcons({ size: 20, name }), onClick: () => handleSocialClick(link) }, name))) }))] }));
13
+ return (_jsxs(Flex, { align: "center", justify: "space-between", p: "base", children: [_jsx(Link, { href: websiteUrl, isExternal: true, children: _jsx(Text, { fontSize: "xs", color: "blue.3", children: urlText !== null && urlText !== void 0 ? urlText : cleanedWebsiteUrl }) }), hasSocialLinks && (_jsx(Flex, { align: "center", gap: "1", children: socialLinks === null || socialLinks === void 0 ? void 0 : socialLinks.map(({ name, link }) => (_jsx(IconButton, { variant: "unstyled", w: "fit-content", "aria-label": "Instagram", icon: SocialIcons({ size: 20, name }), onClick: () => handleSocialClick(link) }, name))) }))] }));
14
14
  };
@@ -1,2 +1,2 @@
1
1
  import { ShortPartnerTileI } from '../../interfaces';
2
- export declare const ShortPartnerTile: ({ buttonText, description, imageUrl, logo, menuItems, minimized, onClick, socialLinks, partnerName, websiteUrl, }: ShortPartnerTileI) => import("react/jsx-runtime").JSX.Element;
2
+ export declare const ShortPartnerTile: ({ buttonText, description, imageUrl, logo, menuItems, minimized, onClick, socialLinks, partnerName, websiteUrl, urlText }: ShortPartnerTileI) => import("react/jsx-runtime").JSX.Element;
@@ -1,10 +1,10 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Box, Flex } from '@chakra-ui/react';
3
3
  import { Fader, PartnerCallToAction, PartnerFooter, PartnerHeader, PartnerImage, PartnerTileWrapper, } from '..';
4
- export const ShortPartnerTile = ({ buttonText, description, imageUrl, logo, menuItems, minimized, onClick, socialLinks, partnerName, websiteUrl, }) => {
4
+ export const ShortPartnerTile = ({ buttonText, description, imageUrl, logo, menuItems, minimized, onClick, socialLinks, partnerName, websiteUrl, urlText }) => {
5
5
  const callToAction = { description, buttonText, onClick };
6
6
  const header = { logo, menuItems, partnerName };
7
7
  const image = { imageUrl, partnerName };
8
- const footer = { socialLinks, websiteUrl };
8
+ const footer = { socialLinks, websiteUrl, urlText };
9
9
  return (_jsxs(PartnerTileWrapper, { children: [_jsx(PartnerHeader, Object.assign({}, header)), !minimized && (_jsx(Fader, { children: _jsxs(Flex, { flexDir: "column", h: "400px", justifyContent: "space-between", children: [_jsx(PartnerImage, Object.assign({}, image)), _jsxs(Box, { children: [_jsx(PartnerCallToAction, Object.assign({}, callToAction)), _jsx(PartnerFooter, Object.assign({}, footer))] })] }) }))] }));
10
10
  };
@@ -1,5 +1,9 @@
1
1
  import { Fire, House, LargeAppliances, Target, Temperature, Water, } from '../../assets/images';
2
2
  export const homeAssistantSteps = [
3
+ {
4
+ title: 'Goals',
5
+ icon: Target,
6
+ },
3
7
  {
4
8
  title: 'Smoke & CO2 detectors',
5
9
  icon: Fire,
@@ -20,8 +24,4 @@ export const homeAssistantSteps = [
20
24
  title: 'Landscape',
21
25
  icon: Water,
22
26
  },
23
- {
24
- title: 'Goals',
25
- icon: Target,
26
- },
27
27
  ];
@@ -1 +1,4 @@
1
1
  export * from './useContactsContent';
2
+ export * from './useShareContactBy';
3
+ export * from './useShareContactByHomefile';
4
+ export * from './useShareContactsContent';
@@ -1 +1,4 @@
1
1
  export * from './useContactsContent';
2
+ export * from './useShareContactBy';
3
+ export * from './useShareContactByHomefile';
4
+ export * from './useShareContactsContent';
@@ -1,7 +1,8 @@
1
1
  import { ChangeEvent } from 'react';
2
2
  import { InfoContactCardI } from '../../interfaces';
3
3
  export declare const useContactsContent: (contacts: InfoContactCardI[]) => {
4
- filteredContacts: InfoContactCardI[];
4
+ contactsWithoutFirstOrLastName: InfoContactCardI[];
5
5
  handleChange: (event: ChangeEvent<HTMLInputElement>) => void;
6
6
  search: string;
7
+ splittedContacts: Record<string, InfoContactCardI[]>;
7
8
  };