@homefile/components-v2 2.25.5 → 2.25.7

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.
@@ -11,6 +11,7 @@ export const ReadOnlyCollapsible = ({ children, }) => {
11
11
  };
12
12
  switch (type) {
13
13
  case 'text':
14
+ case 'textarea':
14
15
  return (_jsx(Collapsible, { title: name, showShadow: false, children: _jsx(ReadOnlyTextArea, Object.assign({}, baseProps)) }, `${id}-${name}-${value}-${type}`));
15
16
  default:
16
17
  return null;
@@ -16,6 +16,7 @@ export const ReadOnlyCollapsible = ({
16
16
  }
17
17
  switch (type) {
18
18
  case 'text':
19
+ case 'textarea':
19
20
  return (
20
21
  <Collapsible
21
22
  title={name}
@@ -1,4 +1,4 @@
1
- import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useState } from 'react';
3
3
  import { Box, GridItem, Image } from '@chakra-ui/react';
4
4
  import { ContainerHeader, TileTooltip, moveRightToLeftWithFade, moveRightToLeft, moveLeftToRightAirplane, WeatherTrees, } from '..';
@@ -19,5 +19,5 @@ export const HomeAssistantWrapper = ({ children, showAirplane, title, zIndex, })
19
19
  // }, 60000)
20
20
  // return () => clearInterval(interval)
21
21
  // }, [])
22
- return (_jsx(GridItem, { colSpan: [1, 2], zIndex: zIndex, children: _jsx(TileTooltip, { label: "homeAssistant", children: _jsxs(Box, { bgGradient: gradients[timeOfDay], boxShadow: "base", h: "full", position: "relative", overflow: "hidden", transition: "background 1s ease-in-out", children: [_jsx(ContainerHeader, { title: title, titleIcon: IA }), _jsx(_Fragment, { children: children }), _jsx(Image, { src: Cloud1, position: "absolute", w: "auto", h: "80px", top: "80px", animation: `${moveRightToLeftWithFade} 400s linear infinite` }), _jsx(Image, { src: Cloud2, position: "absolute", w: "auto", h: "112px", top: "150px", animation: `${moveRightToLeft} 200s linear infinite` }), _jsx(Image, { src: Cloud3, position: "absolute", w: "auto", h: "160px", top: "200px", animation: `${moveRightToLeft} 130s linear infinite` }), showAirplane && (_jsx(Image, { src: Airplane, position: "absolute", w: "auto", h: "40px", top: "85px", animation: `${moveLeftToRightAirplane} 500s cubic-bezier(1, 1, 1, 500) infinite` })), _jsx(WeatherTrees, { timeOfDaySeason: timeOfDaySeason, position: "absolute", bottom: "0", right: "2", w: "auto", h: "100px" })] }) }) }));
22
+ return (_jsx(GridItem, { colSpan: [1, 2], zIndex: zIndex, children: _jsx(TileTooltip, { label: "homeAssistant", children: _jsxs(Box, { bgGradient: gradients[timeOfDay], boxShadow: "base", position: "relative", overflow: "hidden", transition: "background 1s ease-in-out", h: "full", children: [_jsx(ContainerHeader, { title: title, titleIcon: IA }), _jsx(Box, { h: "calc(100% - 60px)", children: children }), _jsx(Image, { src: Cloud1, position: "absolute", w: "auto", h: "80px", top: "80px", animation: `${moveRightToLeftWithFade} 400s linear infinite` }), _jsx(Image, { src: Cloud2, position: "absolute", w: "auto", h: "112px", top: "150px", animation: `${moveRightToLeft} 200s linear infinite` }), _jsx(Image, { src: Cloud3, position: "absolute", w: "auto", h: "160px", top: "200px", animation: `${moveRightToLeft} 130s linear infinite` }), showAirplane && (_jsx(Image, { src: Airplane, position: "absolute", w: "auto", h: "40px", top: "85px", animation: `${moveLeftToRightAirplane} 500s cubic-bezier(1, 1, 1, 500) infinite` })), _jsx(WeatherTrees, { timeOfDaySeason: timeOfDaySeason, position: "absolute", bottom: "0", right: "2", w: "auto", h: "100px" })] }) }) }));
23
23
  };
@@ -9,11 +9,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  };
10
10
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
11
11
  import { Box, DrawerBody, DrawerContent, DrawerHeader, Flex, Stack, } from '@chakra-ui/react';
12
- import { HomeHeader, HomeCardWithRecipent, AddFolder, EditAccountType, FolderSharing, RightPanel, HomeBoardTour, RoomsMenu, ContactsContent, AppBar, BarDivider, ContactList, PeopleConnected, StorageUsed, TourButton, Trash, TutorialsButton, FolderTypeSelection, DisplayFiles, DisplayOptions, FilesUploader, FolderDetailBody, FolderDetailContent, FolderDetailFooter, FolderDetailHeader, FolderInfo, SharedAccounts, ReceiptAutofiler, HomeBoardGrid, ShortPartnerTile, ValueMonitor, TrendingValue, ReceiptsFiled, PropertyTaxes, PartnerCatalogPanel, DynamicForm, PanelHeader, EditHomePanel, HomeCard, EditHomeFooter, HomeAssistant, HomeAssistantPanel, HomeMonitor, HomefileMonitoring, Notifications, HomeMonitorSteps, NotificationsReminder, NotificationsPanel, AddToHomefile, } from '..';
12
+ import { HomeHeader, HomeCardWithRecipent, AddFolder, EditAccountType, FolderSharing, RightPanel, HomeBoardTour, RoomsMenu, ContactsContent, AppBar, BarDivider, ContactList, PeopleConnected, StorageUsed, TourButton, Trash, TutorialsButton, FolderTypeSelection, DisplayFiles, DisplayOptions, FilesUploader, FolderDetailBody, FolderDetailContent, FolderDetailFooter, FolderDetailHeader, FolderInfo, SharedAccounts, ReceiptAutofiler, HomeBoardGrid, ShortPartnerTile, ValueMonitor, TrendingValue, ReceiptsFiled, PropertyTaxes, PartnerCatalogPanel, DynamicForm, PanelHeader, EditHomePanel, HomeCard, EditHomeFooter, HomeAssistant, HomeAssistantPanel, HomeMonitor, HomefileMonitoring, HomeMonitorSteps, NotificationsReminder, NotificationsPanel, AddToHomefile, WeatherWidget, } from '..';
13
13
  import { HomeCards, recipientsDb, FoldersDB, selectOptions, RoomsList, RoomsToAdd, } from '../../helpers';
14
- import { ContactsMock, DisplayFilesMock, formFieldsMock, homeBoardRecorsMock, lineChartData, menuMock, partnerCatalogMock, sharedAccountsMock, socialLinksMock2, taxesMock, userMock, videoMock, homeAssitantStep1FormMock, homeAssitantStep2FormMock, homeAssitantStep3FormMock, homeAssitantStep4FormMock, homeAssitantStep5FormMock, homeAssitantStep6FormMock, tileUIMock, socialLinksMock, notificationsMock, } from '../../mocks';
14
+ import { ContactsMock, DisplayFilesMock, formFieldsMock, homeBoardRecorsMock, lineChartData, menuMock, partnerCatalogMock, sharedAccountsMock, socialLinksMock2, taxesMock, userMock, videoMock, homeAssitantStep1FormMock, homeAssitantStep2FormMock, homeAssitantStep3FormMock, homeAssitantStep4FormMock, homeAssitantStep5FormMock, homeAssitantStep6FormMock, tileUIMock, socialLinksMock, notificationsMock, weatherDataMock, } from '../../mocks';
15
15
  import { useHomeBoard, useWindowDimensions } from '../../hooks';
16
16
  import { Painting } from '../../assets/images';
17
+ import { mapForecastToWidget } from '../../utils';
17
18
  const forms = {
18
19
  1: homeAssitantStep1FormMock,
19
20
  2: homeAssitantStep2FormMock,
@@ -52,7 +53,7 @@ export const HomeBoard = () => {
52
53
  Notifications: (_jsx(NotificationsPanel, { notifications: notificationsMock, onClose: onRightClose, onDismiss: () => null })),
53
54
  };
54
55
  const panelSize = currentComponent === 'PartnerCatalog' ? 'lg' : 'md';
55
- return (_jsxs(Box, { overflowX: "hidden", children: [_jsx(RightPanel, { overlay: showOverlay, isOpen: isRightOpen, onClose: onRightClose, size: panelSize, children: rightPanelComponents[currentComponent] }), _jsxs(Flex, { w: "full", minH: "100dvh", children: [_jsx(RoomsMenu, { activeRoom: "homeboard", onAddRoom: (id) => __awaiter(void 0, void 0, void 0, function* () { return console.log(id); }), onClick: () => null, onHomeClick: () => null, rooms: RoomsList, roomsToAdd: RoomsToAdd }), _jsxs(Box, { w: "full", children: [_jsx(AppBarComponent, { setActiveTour: setActiveTour, onClick: handleAppBarClick }), _jsxs(Stack, { spacing: "base", p: "base", children: [_jsx(HomeHeader, { buttonLabel: "Partner catalog", onBack: () => null, homeName: homeName, onAdd: () => null }), _jsxs(HomeBoardGrid, { children: [_jsx(HomeCardWithRecipent, { address: HomeCards[0].address, handleEdit: handleEditHomeClick, handleDeleteAccountType: (email) => email, handleSubmitAccountType: (form) => form, _id: HomeCards[0]._id, image: HomeCards[0].image, loading: false, name: HomeCards[0].name, menu: menuMock, addImage: () => null, recipients: recipientsDb, records: homeBoardRecorsMock }), _jsx(HomeAssistant, { currentPanel: homeAssistantCurrentStep, currentStep: 6, onStepClick: handleHomeAssistantClick }), _jsx(PropertyTaxes, { estimatedTaxValue: 1000, menuItems: menuMock, taxes: taxesMock, title: "Travis County Property Taxes" }), _jsx(HomeMonitor, { children: _jsxs(Stack, { spacing: "base", w: "full", px: "base", children: [_jsxs(Flex, { gap: "base", children: [_jsx(HomefileMonitoring, {}), _jsx(Notifications, { date: "10-10-24", local: "TX - Houston" })] }), _jsx(HomeMonitorSteps, { menuItems: [
56
+ return (_jsxs(Box, { overflowX: "hidden", children: [_jsx(RightPanel, { overlay: showOverlay, isOpen: isRightOpen, onClose: onRightClose, size: panelSize, children: rightPanelComponents[currentComponent] }), _jsxs(Flex, { w: "full", minH: "100dvh", children: [_jsx(RoomsMenu, { activeRoom: "homeboard", onAddRoom: (id) => __awaiter(void 0, void 0, void 0, function* () { return console.log(id); }), onClick: () => null, onHomeClick: () => null, rooms: RoomsList, roomsToAdd: RoomsToAdd }), _jsxs(Box, { w: "full", children: [_jsx(AppBarComponent, { setActiveTour: setActiveTour, onClick: handleAppBarClick }), _jsxs(Stack, { spacing: "base", p: "base", children: [_jsx(HomeHeader, { buttonLabel: "Partner catalog", onBack: () => null, homeName: homeName, onAdd: () => null }), _jsxs(HomeBoardGrid, { children: [_jsx(HomeCardWithRecipent, { address: HomeCards[0].address, handleEdit: handleEditHomeClick, handleDeleteAccountType: (email) => email, handleSubmitAccountType: (form) => form, _id: HomeCards[0]._id, image: HomeCards[0].image, loading: false, name: HomeCards[0].name, menu: menuMock, addImage: () => null, recipients: recipientsDb, records: homeBoardRecorsMock }), _jsx(HomeAssistant, { currentPanel: homeAssistantCurrentStep, currentStep: 6, onStepClick: handleHomeAssistantClick }), _jsx(PropertyTaxes, { estimatedTaxValue: 1000, menuItems: menuMock, taxes: taxesMock, title: "Travis County Property Taxes" }), _jsx(HomeMonitor, { children: _jsxs(Stack, { spacing: "base", w: "full", p: "base", h: "full", justify: "space-between", children: [_jsxs(Flex, { gap: "base", children: [_jsx(HomefileMonitoring, {}), _jsx(WeatherWidget, Object.assign({}, mapForecastToWidget(weatherDataMock, 'TX, Houston')))] }), _jsx(HomeMonitorSteps, { menuItems: [
56
57
  {
57
58
  label: 'Details',
58
59
  handleClick: handleHomeAssistantClick,
@@ -777,7 +777,7 @@ export const viewingHomeItemMock = [
777
777
  description: faker.lorem.sentence(),
778
778
  comments: faker.lorem.sentence(),
779
779
  value: faker.lorem.paragraphs(),
780
- type: 'text',
780
+ type: 'textarea',
781
781
  visible: true,
782
782
  },
783
783
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@homefile/components-v2",
3
- "version": "2.25.5",
3
+ "version": "2.25.7",
4
4
  "author": "Homefile",
5
5
  "license": "UNLICENSED",
6
6
  "typings": "dist/index.d.ts",
@@ -16,6 +16,7 @@ export const ReadOnlyCollapsible = ({
16
16
  }
17
17
  switch (type) {
18
18
  case 'text':
19
+ case 'textarea':
19
20
  return (
20
21
  <Collapsible
21
22
  title={name}
@@ -50,13 +50,13 @@ export const HomeAssistantWrapper = ({
50
50
  <Box
51
51
  bgGradient={gradients[timeOfDay]}
52
52
  boxShadow="base"
53
- h="full"
54
53
  position="relative"
55
54
  overflow="hidden"
56
55
  transition="background 1s ease-in-out"
56
+ h="full"
57
57
  >
58
58
  <ContainerHeader title={title} titleIcon={IA} />
59
- <>{children}</>
59
+ <Box h="calc(100% - 60px)">{children}</Box>
60
60
  <Image
61
61
  src={Cloud1}
62
62
  position="absolute"
@@ -58,6 +58,7 @@ import {
58
58
  NotificationsReminder,
59
59
  NotificationsPanel,
60
60
  AddToHomefile,
61
+ WeatherWidget,
61
62
  } from '@/components'
62
63
  import {
63
64
  HomeCards,
@@ -90,12 +91,14 @@ import {
90
91
  tileUIMock,
91
92
  socialLinksMock,
92
93
  notificationsMock,
94
+ weatherDataMock,
93
95
  } from '@/mocks'
94
96
  import { useHomeBoard, useWindowDimensions } from '@/hooks'
95
97
  import { Painting } from '@/assets/images'
96
98
 
97
99
  import { ReportI } from '@/interfaces'
98
100
  import { ReactNode } from 'react'
101
+ import { mapForecastToWidget } from '@/utils'
99
102
 
100
103
  const forms: Record<number, ReportI[]> = {
101
104
  1: homeAssitantStep1FormMock,
@@ -358,10 +361,18 @@ export const HomeBoard = () => {
358
361
  title="Travis County Property Taxes"
359
362
  />
360
363
  <HomeMonitor>
361
- <Stack spacing="base" w="full" px="base">
364
+ <Stack
365
+ spacing="base"
366
+ w="full"
367
+ p="base"
368
+ h="full"
369
+ justify="space-between"
370
+ >
362
371
  <Flex gap="base">
363
372
  <HomefileMonitoring />
364
- <Notifications date="10-10-24" local="TX - Houston" />
373
+ <WeatherWidget
374
+ {...mapForecastToWidget(weatherDataMock, 'TX, Houston')}
375
+ />
365
376
  </Flex>
366
377
  <HomeMonitorSteps
367
378
  menuItems={[
@@ -786,7 +786,7 @@ export const viewingHomeItemMock: ReportI[] = [
786
786
  description: faker.lorem.sentence(),
787
787
  comments: faker.lorem.sentence(),
788
788
  value: faker.lorem.paragraphs(),
789
- type: 'text',
789
+ type: 'textarea',
790
790
  visible: true,
791
791
  },
792
792
  {