@homefile/components-v2 2.2.4 → 2.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/images/index.d.ts +2 -1
- package/dist/assets/images/index.js +2 -1
- package/dist/assets/images/index.ts +2 -0
- package/dist/assets/images/speaker.svg +17 -0
- package/dist/assets/locales/en/index.json +35 -7
- package/dist/components/appBar/ContactList.d.ts +2 -2
- package/dist/components/appBar/NotificationsReminder.d.ts +2 -0
- package/dist/components/appBar/NotificationsReminder.js +24 -0
- package/dist/components/appBar/PeopleConnected.d.ts +2 -2
- package/dist/components/appBar/Trash.d.ts +2 -2
- package/dist/components/appBar/index.d.ts +1 -0
- package/dist/components/appBar/index.js +1 -0
- package/dist/components/badge/NumberBadge.d.ts +1 -1
- package/dist/components/badge/NumberBadge.js +14 -2
- package/dist/components/forms/dynamicForm/DynamicForm.d.ts +1 -1
- package/dist/components/forms/dynamicForm/DynamicForm.js +2 -2
- package/dist/components/forms/dynamicForm/fields/FileField.d.ts +1 -1
- package/dist/components/forms/dynamicForm/fields/FileField.js +9 -5
- package/dist/components/forms/readOnly/ReadOnlyDynamicForm.d.ts +2 -2
- package/dist/components/forms/readOnly/ReadOnlyDynamicForm.js +5 -2
- package/dist/components/forms/readOnly/fields/homeItem/ReadOnlyAppliances.d.ts +2 -0
- package/dist/components/forms/readOnly/fields/homeItem/ReadOnlyAppliances.js +23 -0
- package/dist/components/forms/readOnly/fields/homeItem/ReadOnlyAppliances.tsx +74 -0
- package/dist/components/forms/readOnly/fields/homeItem/ReadOnlyHomeItemImages.d.ts +2 -0
- package/dist/components/forms/readOnly/fields/homeItem/ReadOnlyHomeItemImages.js +10 -0
- package/dist/components/forms/readOnly/fields/homeItem/ReadOnlyHomeItemImages.tsx +28 -0
- package/dist/components/forms/readOnly/fields/homeItem/ReadOnlyHomeItemRating.d.ts +2 -0
- package/dist/components/forms/readOnly/fields/homeItem/ReadOnlyHomeItemRating.js +14 -0
- package/dist/components/forms/readOnly/fields/homeItem/ReadOnlyHomeItemRating.tsx +22 -0
- package/dist/components/forms/readOnly/fields/homeItem/ReadOnlyHomeItemText.d.ts +2 -0
- package/dist/components/forms/readOnly/fields/homeItem/ReadOnlyHomeItemText.js +10 -0
- package/dist/components/forms/readOnly/fields/homeItem/ReadOnlyHomeItemText.tsx +22 -0
- package/dist/components/forms/readOnly/fields/homeItem/index.d.ts +4 -0
- package/dist/components/forms/readOnly/fields/homeItem/index.js +4 -0
- package/dist/components/forms/readOnly/fields/homeItem/index.ts +4 -0
- package/dist/components/forms/readOnly/fields/index.d.ts +1 -0
- package/dist/components/forms/readOnly/fields/index.js +1 -0
- package/dist/components/headers/TabsHeader.d.ts +1 -1
- package/dist/components/headers/TabsHeader.js +9 -6
- package/dist/components/homeAssistant/HomeAssistant.d.ts +1 -1
- package/dist/components/homeAssistant/HomeAssistant.js +3 -2
- package/dist/components/homeAssistant/HomeAssistantWrapper.d.ts +2 -1
- package/dist/components/homeAssistant/HomeAssistantWrapper.js +4 -4
- package/dist/components/homeAssistant/HomeMonitor.d.ts +3 -1
- package/dist/components/homeAssistant/HomeMonitor.js +2 -2
- package/dist/components/homeAssistant/monitorAlerts/Notifications.js +2 -2
- package/dist/components/homeBoard/HomeBoard.d.ts +2 -1
- package/dist/components/homeBoard/HomeBoard.js +8 -7
- package/dist/components/homeItems/ViewingHomeItemPanel.d.ts +2 -0
- package/dist/components/homeItems/ViewingHomeItemPanel.js +24 -0
- package/dist/components/homeItems/index.d.ts +1 -0
- package/dist/components/homeItems/index.js +1 -0
- package/dist/components/inboxTile/InboxCard.d.ts +2 -0
- package/dist/components/inboxTile/InboxCard.js +10 -0
- package/dist/components/inboxTile/InboxForwardBanner.d.ts +1 -0
- package/dist/components/inboxTile/InboxForwardBanner.js +7 -0
- package/dist/components/inboxTile/InboxTile.d.ts +2 -0
- package/dist/components/inboxTile/InboxTile.js +9 -0
- package/dist/components/{partner/adminTiles/inboxTile → inboxTile}/index.d.ts +1 -0
- package/dist/components/{partner/adminTiles/inboxTile → inboxTile}/index.js +1 -0
- package/dist/components/index.d.ts +3 -0
- package/dist/components/index.js +3 -0
- package/dist/components/notifications/NotificationCard.d.ts +2 -0
- package/dist/components/notifications/NotificationCard.js +64 -0
- package/dist/components/notifications/NotificationsPanel.d.ts +2 -0
- package/dist/components/notifications/NotificationsPanel.js +14 -0
- package/dist/components/notifications/index.d.ts +2 -0
- package/dist/components/notifications/index.js +2 -0
- package/dist/components/partner/adminTiles/index.d.ts +0 -1
- package/dist/components/partner/adminTiles/index.js +0 -1
- package/dist/components/tour/Bubble.js +1 -1
- package/dist/components/tour/HomeBoardTour.js +16 -16
- package/dist/components/valueMonitor/ValueCard.js +1 -1
- package/dist/hooks/display/useMediaPreview.js +4 -7
- package/dist/hooks/folderPanel/useFilesUploader.d.ts +3 -1
- package/dist/hooks/folderPanel/useFilesUploader.js +12 -2
- package/dist/hooks/homeBoard/useHomeBoard.d.ts +1 -0
- package/dist/hooks/homeBoard/useHomeBoard.js +5 -0
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/index.js +1 -0
- package/dist/hooks/notifications/index.d.ts +1 -0
- package/dist/hooks/notifications/index.js +1 -0
- package/dist/hooks/notifications/useNotificationsPanel.d.ts +7 -0
- package/dist/hooks/notifications/useNotificationsPanel.js +32 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/interfaces/appBar/AppBar.interface.d.ts +6 -2
- package/dist/interfaces/appBar/index.d.ts +0 -1
- package/dist/interfaces/appBar/index.js +0 -1
- package/dist/interfaces/badge/NumberBadge.interface.d.ts +2 -3
- package/dist/interfaces/forms/dynamicForm/DynamicForm.interface.d.ts +7 -1
- package/dist/interfaces/forms/dynamicForm/fields/FileField.interface.d.ts +2 -0
- package/dist/interfaces/forms/readOnly/homeItem/ReadOnlyAppliances.interface.d.ts +4 -0
- package/dist/interfaces/forms/readOnly/homeItem/index.d.ts +1 -0
- package/dist/interfaces/forms/readOnly/homeItem/index.js +1 -0
- package/dist/interfaces/forms/readOnly/index.d.ts +1 -0
- package/dist/interfaces/forms/readOnly/index.js +1 -0
- package/dist/interfaces/headers/TabsHeader.interface.d.ts +1 -0
- package/dist/interfaces/homeAssistant/HomeAssistantSteps.interface.d.ts +1 -0
- package/dist/interfaces/homeItems/ViewingHomeItemPanel.interface.d.ts +6 -0
- package/dist/interfaces/homeItems/index.d.ts +1 -0
- package/dist/interfaces/homeItems/index.js +1 -0
- package/dist/interfaces/inboxTile/InboxCard.interface.d.ts +10 -0
- package/dist/interfaces/inboxTile/InboxTile.interface.d.ts +8 -0
- package/dist/interfaces/inboxTile/InboxTile.interface.js +1 -0
- package/dist/interfaces/index.d.ts +3 -0
- package/dist/interfaces/index.js +3 -0
- package/dist/interfaces/notifications/NotificationsPanel.interface.d.ts +16 -0
- package/dist/interfaces/notifications/NotificationsPanel.interface.js +1 -0
- package/dist/interfaces/notifications/index.d.ts +1 -0
- package/dist/interfaces/notifications/index.js +1 -0
- package/dist/interfaces/partner/adminTiles/index.d.ts +0 -1
- package/dist/interfaces/partner/adminTiles/index.js +0 -1
- package/dist/interfaces/tour/Step.interface.d.ts +2 -0
- package/dist/interfaces/valueMonitor/ValueCard.interface.d.ts +1 -1
- package/dist/mocks/forms/dynamicForm.mock.d.ts +1 -0
- package/dist/mocks/forms/dynamicForm.mock.js +72 -12
- package/dist/mocks/index.d.ts +1 -0
- package/dist/mocks/index.js +1 -0
- package/dist/mocks/notifications/index.d.ts +1 -0
- package/dist/mocks/notifications/index.js +1 -0
- package/dist/mocks/notifications/notifications.mock.d.ts +2 -0
- package/dist/mocks/notifications/notifications.mock.js +35 -0
- package/dist/stories/appBar/ContactList.stories.d.ts +3 -3
- package/dist/stories/appBar/PeopleConnected.stories.d.ts +3 -3
- package/dist/stories/appBar/Trash.stories.d.ts +3 -3
- package/dist/stories/assets/Illustrations.stories.js +2 -2
- package/dist/stories/forms/dynamicForm/DynamicForm.stories.js +13 -0
- package/dist/stories/homeItems/ViewingHomeItem.stories.d.ts +5 -0
- package/dist/stories/homeItems/ViewingHomeItem.stories.js +16 -0
- package/dist/stories/{partner/adminTiles/InboxTile.stories.d.ts → inboxTile/inboxTile.stories.d.ts} +1 -1
- package/dist/stories/inboxTile/inboxTile.stories.js +29 -0
- package/dist/stories/notifications/NotificationsPanel.stories.d.ts +5 -0
- package/dist/stories/notifications/NotificationsPanel.stories.js +17 -0
- package/dist/stories/valueMonitor/ValueMonitor.stories.d.ts +0 -1
- package/dist/stories/valueMonitor/ValueMonitor.stories.js +1 -1
- package/dist/theme/colors.d.ts +1 -0
- package/dist/theme/colors.js +1 -0
- package/package.json +1 -1
- package/src/assets/images/index.ts +2 -0
- package/src/assets/images/speaker.svg +17 -0
- package/src/assets/locales/en/index.json +35 -7
- package/src/components/appBar/ContactList.tsx +2 -2
- package/src/components/appBar/NotificationsReminder.tsx +49 -0
- package/src/components/appBar/PeopleConnected.tsx +2 -2
- package/src/components/appBar/Trash.tsx +2 -2
- package/src/components/appBar/index.ts +2 -1
- package/src/components/badge/NumberBadge.tsx +2 -0
- package/src/components/customToast/CustomToast.tsx +1 -1
- package/src/components/forms/dynamicForm/DynamicForm.tsx +4 -0
- package/src/components/forms/dynamicForm/fields/FileField.tsx +52 -6
- package/src/components/forms/readOnly/ReadOnlyDynamicForm.tsx +7 -3
- package/src/components/forms/readOnly/fields/homeItem/ReadOnlyAppliances.tsx +74 -0
- package/src/components/forms/readOnly/fields/homeItem/ReadOnlyHomeItemImages.tsx +28 -0
- package/src/components/forms/readOnly/fields/homeItem/ReadOnlyHomeItemRating.tsx +22 -0
- package/src/components/forms/readOnly/fields/homeItem/ReadOnlyHomeItemText.tsx +22 -0
- package/src/components/forms/readOnly/fields/homeItem/index.ts +4 -0
- package/src/components/forms/readOnly/fields/index.ts +1 -0
- package/src/components/headers/TabsHeader.tsx +36 -23
- package/src/components/homeAssistant/HomeAssistant.tsx +12 -7
- package/src/components/homeAssistant/HomeAssistantWrapper.tsx +5 -3
- package/src/components/homeAssistant/HomeMonitor.tsx +2 -2
- package/src/components/homeAssistant/monitorAlerts/Notifications.tsx +3 -3
- package/src/components/homeBoard/HomeBoard.tsx +30 -3
- package/src/components/homeItems/ViewingHomeItemPanel.tsx +44 -0
- package/src/components/homeItems/index.ts +1 -0
- package/src/components/inboxTile/InboxCard.tsx +38 -0
- package/src/components/inboxTile/InboxForwardBanner.tsx +26 -0
- package/src/components/inboxTile/InboxTile.tsx +36 -0
- package/src/components/{partner/adminTiles/inboxTile → inboxTile}/index.ts +1 -0
- package/src/components/index.ts +3 -0
- package/src/components/notifications/NotificationCard.tsx +162 -0
- package/src/components/notifications/NotificationsPanel.tsx +52 -0
- package/src/components/notifications/index.ts +2 -0
- package/src/components/partner/adminTiles/index.ts +0 -1
- package/src/components/tour/Bubble.tsx +2 -0
- package/src/components/tour/HomeBoardTour.tsx +4 -7
- package/src/components/valueMonitor/ValueCard.tsx +17 -13
- package/src/hooks/display/useMediaPreview.ts +3 -5
- package/src/hooks/folderPanel/useFilesUploader.ts +16 -3
- package/src/hooks/homeBoard/useHomeBoard.ts +6 -0
- package/src/hooks/index.ts +1 -0
- package/src/hooks/notifications/index.ts +1 -0
- package/src/hooks/notifications/useNotificationsPanel.ts +46 -0
- package/src/index.ts +4 -0
- package/src/interfaces/appBar/AppBar.interface.ts +7 -2
- package/src/interfaces/appBar/index.ts +1 -2
- package/src/interfaces/badge/NumberBadge.interface.ts +3 -3
- package/src/interfaces/forms/dynamicForm/DynamicForm.interface.ts +9 -0
- package/src/interfaces/forms/dynamicForm/fields/FileField.interface.ts +2 -0
- package/src/interfaces/forms/readOnly/homeItem/ReadOnlyAppliances.interface.ts +5 -0
- package/src/interfaces/forms/readOnly/homeItem/index.ts +1 -0
- package/src/interfaces/forms/readOnly/index.ts +1 -0
- package/src/interfaces/headers/TabsHeader.interface.ts +4 -3
- package/src/interfaces/homeAssistant/HomeAssistantSteps.interface.ts +1 -0
- package/src/interfaces/homeItems/ViewingHomeItemPanel.interface.ts +7 -0
- package/src/interfaces/homeItems/index.ts +1 -0
- package/src/interfaces/inboxTile/InboxCard.interface.ts +11 -0
- package/src/interfaces/inboxTile/InboxTile.interface.ts +9 -0
- package/src/interfaces/index.ts +3 -0
- package/src/interfaces/notifications/NotificationsPanel.interface.ts +24 -0
- package/src/interfaces/notifications/index.ts +1 -0
- package/src/interfaces/partner/adminTiles/index.ts +0 -1
- package/src/interfaces/tour/Step.interface.ts +2 -0
- package/src/interfaces/valueMonitor/ValueCard.interface.ts +1 -1
- package/src/mocks/forms/dynamicForm.mock.ts +74 -12
- package/src/mocks/index.ts +1 -0
- package/src/mocks/notifications/index.ts +1 -0
- package/src/mocks/notifications/notifications.mock.ts +37 -0
- package/src/stories/appBar/AppBar.stories.tsx +0 -1
- package/src/stories/appBar/ContactList.stories.tsx +4 -5
- package/src/stories/appBar/PeopleConnected.stories.tsx +4 -5
- package/src/stories/appBar/Trash.stories.tsx +4 -6
- package/src/stories/assets/Illustrations.stories.tsx +2 -0
- package/src/stories/forms/dynamicForm/DynamicForm.stories.tsx +13 -0
- package/src/stories/homeItems/ViewingHomeItem.stories.tsx +25 -0
- package/src/stories/inboxTile/inboxTile.stories.tsx +36 -0
- package/src/stories/notifications/NotificationsPanel.stories.tsx +26 -0
- package/src/stories/valueMonitor/ValueMonitor.stories.tsx +1 -1
- package/src/theme/colors.ts +1 -0
- package/dist/components/partner/adminTiles/inboxTile/InboxCard.d.ts +0 -2
- package/dist/components/partner/adminTiles/inboxTile/InboxCard.js +0 -8
- package/dist/components/partner/adminTiles/inboxTile/InboxTile.d.ts +0 -2
- package/dist/components/partner/adminTiles/inboxTile/InboxTile.js +0 -8
- package/dist/interfaces/appBar/PeopleConnected.interface.d.ts +0 -4
- package/dist/interfaces/partner/adminTiles/inboxTile/InboxCard.interface.d.ts +0 -6
- package/dist/interfaces/partner/adminTiles/inboxTile/InboxTile.interface.d.ts +0 -5
- package/dist/stories/partner/adminTiles/InboxTile.stories.js +0 -35
- package/src/components/partner/adminTiles/inboxTile/InboxCard.tsx +0 -35
- package/src/components/partner/adminTiles/inboxTile/InboxTile.tsx +0 -21
- package/src/interfaces/appBar/PeopleConnected.interface.ts +0 -4
- package/src/interfaces/partner/adminTiles/inboxTile/InboxCard.interface.ts +0 -6
- package/src/interfaces/partner/adminTiles/inboxTile/InboxTile.interface.ts +0 -6
- package/src/stories/partner/adminTiles/InboxTile.stories.tsx +0 -42
- /package/dist/interfaces/{appBar/PeopleConnected.interface.js → forms/readOnly/homeItem/ReadOnlyAppliances.interface.js} +0 -0
- /package/dist/interfaces/{partner/adminTiles/inboxTile/InboxCard.interface.js → homeItems/ViewingHomeItemPanel.interface.js} +0 -0
- /package/dist/interfaces/{partner/adminTiles/inboxTile/InboxTile.interface.js → inboxTile/InboxCard.interface.js} +0 -0
- /package/dist/interfaces/{partner/adminTiles/inboxTile → inboxTile}/index.d.ts +0 -0
- /package/dist/interfaces/{partner/adminTiles/inboxTile → inboxTile}/index.js +0 -0
- /package/src/interfaces/{partner/adminTiles/inboxTile → inboxTile}/index.ts +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { TabsHeaderI } from '../../interfaces';
|
|
2
|
-
export declare const TabsHeader: ({ onChange, tabList, tabIndex, defaultIndex, rightButton, }: TabsHeaderI) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare const TabsHeader: ({ onChange, tabList, tabIndex, defaultIndex, rightButton, rightTabList, }: TabsHeaderI) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Box, Flex, Tab, TabList, TabPanel, TabPanels, Tabs, } from '@chakra-ui/react';
|
|
3
|
-
export const TabsHeader = ({ onChange, tabList, tabIndex, defaultIndex, rightButton, }) => {
|
|
4
|
-
return (_jsxs(Tabs, { zIndex: "base", variant: "unstyled", onChange: onChange, index: tabIndex, defaultIndex: defaultIndex, h: "100%", children: [_jsx(Box, { bg: "lightBlue.2", children: _jsxs(Flex, { justify: "space-between", children: [_jsx(TabList, { bg: "neutral.white", w: "full", children: tabList === null || tabList === void 0 ? void 0 : tabList.map(({ label }) => (_jsx(
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
3
|
+
export const TabsHeader = ({ onChange, tabList, tabIndex, defaultIndex, rightButton, rightTabList, }) => {
|
|
4
|
+
return (_jsxs(Tabs, { zIndex: "base", variant: "unstyled", onChange: onChange, index: tabIndex, defaultIndex: defaultIndex, h: "100%", children: [_jsx(Box, { bg: "lightBlue.2", children: _jsxs(Flex, { justify: "space-between", children: [_jsx(TabList, { bg: "neutral.white", w: "full", children: tabList === null || tabList === void 0 ? void 0 : tabList.map(({ label }) => (_jsx(CustomTab, { label: label }, label))) }), _jsxs(Flex, { children: [_jsx(TabList, { bg: "neutral.white", w: "full", children: rightTabList === null || rightTabList === void 0 ? void 0 : rightTabList.map(({ label }) => (_jsx(CustomTab, { label: label }, label))) }), rightButton] })] }) }), _jsx(TabPanels, { h: "100%", children: tabList === null || tabList === void 0 ? void 0 : tabList.map(({ label, component }) => (_jsx(TabPanel, { p: "0", h: "100%", children: component }, label))) })] }));
|
|
5
|
+
};
|
|
6
|
+
const CustomTab = ({ label = '' }) => {
|
|
7
|
+
return (_jsx(Tab, { minW: "1rem", px: "base", py: "0", lineHeight: "10", textTransform: "uppercase", fontWeight: "medium", fontSize: "sm", fontFamily: "primary", color: "blue.3", borderBottom: "3px solid transparent", _hover: { cursor: 'pointer' }, _focus: { outline: 'none' }, _selected: {
|
|
8
|
+
color: 'blue.8',
|
|
9
|
+
fontWeight: 'bold',
|
|
10
|
+
borderColor: 'blue.8',
|
|
11
|
+
}, children: label }));
|
|
9
12
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { HomeAssistantStepsI } from '../../interfaces';
|
|
2
|
-
export declare const HomeAssistant: ({ showTutorial, tutorialUrl, onStart, ...props }: HomeAssistantStepsI) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare const HomeAssistant: ({ showTutorial, tutorialUrl, onStart, zIndex, ...props }: HomeAssistantStepsI) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -13,9 +13,10 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
13
13
|
import { useState } from 'react';
|
|
14
14
|
import { t } from 'i18next';
|
|
15
15
|
import { HomeAssistantSteps, HomeAssistantTutorial, HomeAssistantWrapper, } from '..';
|
|
16
|
+
import { Center } from '@chakra-ui/react';
|
|
16
17
|
export const HomeAssistant = (_a) => {
|
|
17
|
-
var { showTutorial = false, tutorialUrl = '', onStart } = _a, props = __rest(_a, ["showTutorial", "tutorialUrl", "onStart"]);
|
|
18
|
+
var { showTutorial = false, tutorialUrl = '', onStart, zIndex } = _a, props = __rest(_a, ["showTutorial", "tutorialUrl", "onStart", "zIndex"]);
|
|
18
19
|
const [startSetup, setStartSetup] = useState(false);
|
|
19
20
|
const showAirplane = props.currentStep === 6 && (!showTutorial || startSetup);
|
|
20
|
-
return (
|
|
21
|
+
return (_jsx(HomeAssistantWrapper, { showAirplane: showAirplane, title: t('homeAssistant.title'), zIndex: zIndex, children: _jsxs(Center, { minH: "477px", children: [!startSetup && showTutorial && (_jsx(HomeAssistantTutorial, { onStart: onStart !== null && onStart !== void 0 ? onStart : (() => setStartSetup(true)), videoUrl: tutorialUrl })), (startSetup || !showTutorial) && _jsx(HomeAssistantSteps, Object.assign({}, props))] }) }));
|
|
21
22
|
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { PropsWithChildren } from 'react';
|
|
2
|
-
export declare const HomeAssistantWrapper: ({ children, showAirplane, title, }: PropsWithChildren<{
|
|
2
|
+
export declare const HomeAssistantWrapper: ({ children, showAirplane, title, zIndex }: PropsWithChildren<{
|
|
3
3
|
showAirplane?: boolean;
|
|
4
4
|
title: string;
|
|
5
|
+
zIndex?: string;
|
|
5
6
|
}>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Box,
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Box, GridItem, Image } from '@chakra-ui/react';
|
|
3
3
|
import { ContainerHeader, TileTooltip, moveRightToLeftWithFade, moveRightToLeft, moveLeftToRightAirplane, } from '..';
|
|
4
4
|
import { Airplane, Cloud1, Cloud2, Cloud3, IA, TreesCrop, } from '../../assets/images';
|
|
5
5
|
import { getImageAltText } from '../../utils';
|
|
6
6
|
import { colors } from '../../theme/colors';
|
|
7
|
-
export const HomeAssistantWrapper = ({ children, showAirplane, title, }) => {
|
|
7
|
+
export const HomeAssistantWrapper = ({ children, showAirplane, title, zIndex }) => {
|
|
8
8
|
const treesAlt = getImageAltText(TreesCrop);
|
|
9
|
-
return (_jsx(GridItem, { colSpan: [1, 2], children: _jsx(TileTooltip, { label: "homeAssistant", children: _jsxs(Box, { bgGradient: colors.skyGradient, boxShadow: "base", h: "full", position: "relative",
|
|
9
|
+
return (_jsx(GridItem, { colSpan: [1, 2], zIndex: zIndex, children: _jsx(TileTooltip, { label: "homeAssistant", children: _jsxs(Box, { bgGradient: colors.skyGradient, boxShadow: "base", h: "full", position: "relative", overflow: "hidden", 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(Image, { src: TreesCrop, alt: treesAlt, position: "absolute", bottom: "0", right: "2", w: "auto", h: "70px" })] }) }) }));
|
|
10
10
|
};
|
|
@@ -1,2 +1,4 @@
|
|
|
1
1
|
import { PropsWithChildren } from 'react';
|
|
2
|
-
export declare const HomeMonitor: ({ children }: PropsWithChildren<{
|
|
2
|
+
export declare const HomeMonitor: ({ children, zIndex }: PropsWithChildren<{
|
|
3
|
+
zIndex?: string;
|
|
4
|
+
}>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { t } from 'i18next';
|
|
3
3
|
import { HomeAssistantWrapper } from '..';
|
|
4
|
-
export const HomeMonitor = ({ children }) => {
|
|
5
|
-
return (_jsx(HomeAssistantWrapper, { showAirplane: true, title: t('homeAssistant.homeMonitor'), children: children }));
|
|
4
|
+
export const HomeMonitor = ({ children, zIndex }) => {
|
|
5
|
+
return (_jsx(HomeAssistantWrapper, { zIndex: zIndex, showAirplane: true, title: t('homeAssistant.homeMonitor'), children: children }));
|
|
6
6
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Stack, Flex, Center, Text } from '@chakra-ui/react';
|
|
3
2
|
import { t } from 'i18next';
|
|
3
|
+
import { Stack, Flex, Center, Text } from '@chakra-ui/react';
|
|
4
4
|
export const Notifications = ({ date = '', local = '' }) => {
|
|
5
|
-
return (_jsxs(Stack, { spacing: "base",
|
|
5
|
+
return (_jsxs(Stack, { spacing: "base", zIndex: "2", children: [_jsxs(Flex, { justify: "space-between", children: [_jsx(CustomText, { children: date }), _jsx(CustomText, { children: local })] }), _jsx(Center, { w: "188px", h: "300px", border: "1px dashed", borderColor: "blue.1", borderRadius: "sm", children: _jsx(Text, { fontSize: "sm", fontFamily: "secondary", children: t('homeAssistant.notifications') }) })] }));
|
|
6
6
|
};
|
|
7
7
|
const CustomText = ({ children = '' }) => {
|
|
8
8
|
return (_jsx(Text, { fontSize: "sm", fontFamily: "secondary", textTransform: "uppercase", children: children }));
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export declare const HomeBoard: () => import("react/jsx-runtime").JSX.Element;
|
|
2
|
-
export declare const AppBarComponent: ({ setActiveTour }: {
|
|
2
|
+
export declare const AppBarComponent: ({ setActiveTour, onClick, }: {
|
|
3
3
|
setActiveTour?: ((value: boolean) => void) | undefined;
|
|
4
|
+
onClick?: ((panel: string) => void) | undefined;
|
|
4
5
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -9,9 +9,9 @@ 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, AddHomeItem, SendCommunication, PartnerCatalogPanel, DynamicForm, PanelHeader, EditHomePanel, HomeCard, EditHomeFooter, HomeAssistant, HomeAssistantPanel, HomeMonitor, HomefileMonitoring, Notifications, HomeMonitorSteps, } 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, AddHomeItem, SendCommunication, PartnerCatalogPanel, DynamicForm, PanelHeader, EditHomePanel, HomeCard, EditHomeFooter, HomeAssistant, HomeAssistantPanel, HomeMonitor, HomefileMonitoring, Notifications, HomeMonitorSteps, NotificationsReminder, NotificationsPanel, } 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, } 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, } from '../../mocks';
|
|
15
15
|
import { useHomeBoard, useWindowDimensions } from '../../hooks';
|
|
16
16
|
import { Painting } from '../../assets/images';
|
|
17
17
|
const forms = {
|
|
@@ -23,7 +23,7 @@ const forms = {
|
|
|
23
23
|
6: homeAssitantStep6FormMock,
|
|
24
24
|
};
|
|
25
25
|
export const HomeBoard = () => {
|
|
26
|
-
const { currentStep, activeTour, currentComponent, form, handleClose, handleEditHomeClick, handleFolderClick, handleNewFolder, handleStep, homeName, isRightOpen, onRightClose, setActiveTour, setShowFooter, showFooter, showOverlay, handleHomeAssistantFormChange, handleHomeAssistantBack, homeAssistantCurrentStep, handleHomeAssistantClick, } = useHomeBoard();
|
|
26
|
+
const { currentStep, activeTour, currentComponent, form, handleAppBarClick, handleClose, handleEditHomeClick, handleFolderClick, handleNewFolder, handleStep, homeName, isRightOpen, onRightClose, setActiveTour, setShowFooter, showFooter, showOverlay, handleHomeAssistantFormChange, handleHomeAssistantBack, homeAssistantCurrentStep, handleHomeAssistantClick, } = useHomeBoard();
|
|
27
27
|
const currentHomeAssistantForm = forms[homeAssistantCurrentStep];
|
|
28
28
|
const rightPanelComponents = {
|
|
29
29
|
AddFolder: (_jsx(AddFolder, { handleClose: onRightClose, handleSubmit: (_) => {
|
|
@@ -49,20 +49,21 @@ export const HomeBoard = () => {
|
|
|
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, hasCompleted: true })),
|
|
52
|
+
Notifications: (_jsx(NotificationsPanel, { notifications: notificationsMock, onClose: onRightClose, onDismiss: () => null })),
|
|
52
53
|
};
|
|
53
54
|
const panelSize = currentComponent === 'PartnerCatalog' ? 'lg' : 'md';
|
|
54
|
-
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", handleAddRoom: (id) => __awaiter(void 0, void 0, void 0, function* () { return console.log(id); }), handleClick: () => null, handleHomeClick: () => null, rooms: RoomsList, roomsToAdd: RoomsToAdd }), _jsxs(Box, { w: "full", children: [_jsx(AppBarComponent, { setActiveTour: setActiveTour }), _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: [
|
|
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", handleAddRoom: (id) => __awaiter(void 0, void 0, void 0, function* () { return console.log(id); }), handleClick: () => null, handleHomeClick: () => 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: [
|
|
55
56
|
{
|
|
56
57
|
label: 'Details',
|
|
57
58
|
handleClick: handleHomeAssistantClick,
|
|
58
59
|
},
|
|
59
|
-
], stepsWithAlerts: [], onStepClick: () => null })] }) }), _jsx(DynamicForm, { form: tileUIMock, menuItems: menuMock, socialLinks: socialLinksMock, showTitle: false, websiteUrl: "http://www.audreyscheckdesign.com" }), _jsxs(Stack, { spacing: "base", children: [_jsx(ReceiptAutofiler, { onClick: () => null, totalReceipts: 36, totalTitle: "Receipts Received", forwardTo: "reciepts@homefile.cloud", onFilter: () => null, children: _jsx(ReceiptsFiled, { incidentalItemsNumber: 0, incidentalSpent: 0, inventoryItemsNumber: 0, inventorySpent: 0, total: 0 }) }), _jsx(ValueMonitor, { menuItems: menuMock, balance: "+3%", totalValue: 323421, year: "2023", yearValue: 5684 })] }), _jsx(ShortPartnerTile, { _id: "1", buttonText: "Contact Audrey Scheck", description: "Full-service design firm focusing on residential remodels, furnishing, and styling.", onClick: () => null, socialLinks: socialLinksMock2, logo: "https://static.wixstatic.com/media/258105_8e04439070694f278e4787a310ea9f4b~mv2.png", partnerName: "Audrey Scheck", websiteUrl: "" }), _jsx(TrendingValue, { chartData: lineChartData, marketValue: 894000, menuItems: menuMock, mortgageBalance: 220532, purchasePrice: 220532, roi: "+234%" }), _jsx(ShortPartnerTile, { _id: "2", buttonText: "Contact Audrey Scheck", description: "Full-service design firm focusing on residential remodels, furnishing, and styling.", onClick: () => null, socialLinks: socialLinksMock2, logo: "https://static.wixstatic.com/media/258105_8e04439070694f278e4787a310ea9f4b~mv2.png", partnerName: "Audrey Scheck", websiteUrl: "" }), _jsx(FolderSharing, { folders: FoldersDB, handleAddNewFolder: handleNewFolder, handleFolderClick: handleFolderClick, handleSelect: () => null, initialSelectItem: selectOptions[0], menuItems: menuMock, selectItems: selectOptions }), _jsxs(Stack, { spacing: "base", children: [_jsx(AddHomeItem, { handleClick: () => null }), _jsx(SendCommunication, { documentList: [] })] }), _jsx(ShortPartnerTile, { _id: "3", buttonText: "Contact Audrey Scheck", description: "Full-service design firm focusing on residential remodels, furnishing, and styling.", onClick: () => null, socialLinks: socialLinksMock2, logo: "https://static.wixstatic.com/media/258105_8e04439070694f278e4787a310ea9f4b~mv2.png", partnerName: "Audrey Scheck", websiteUrl: "" })] })] })] })] }), _jsx(HomeBoardTour, { currentStep: currentStep, handleClose: handleClose, handleStep: handleStep, meetStepUrl: videoMock, isActive: activeTour })] }));
|
|
60
|
+
], stepsWithAlerts: [], onStepClick: () => null })] }) }), _jsx(DynamicForm, { form: tileUIMock, menuItems: menuMock, socialLinks: socialLinksMock, showTitle: false, websiteUrl: "http://www.audreyscheckdesign.com" }), _jsxs(Stack, { spacing: "base", children: [_jsx(ReceiptAutofiler, { onClick: () => null, totalReceipts: 36, totalTitle: "Receipts Received", forwardTo: "reciepts@homefile.cloud", onFilter: () => null, children: _jsx(ReceiptsFiled, { incidentalItemsNumber: 0, incidentalSpent: 0, inventoryItemsNumber: 0, inventorySpent: 0, total: 0 }) }), _jsx(ValueMonitor, { menuItems: menuMock, balance: "+3%", totalValue: 323421, year: "2023", yearValue: 5684 })] }), _jsx(PropertyTaxes, { estimatedTaxValue: 1000, menuItems: menuMock, taxes: taxesMock, title: "Travis County Property Taxes" }), _jsx(ShortPartnerTile, { _id: "1", buttonText: "Contact Audrey Scheck", description: "Full-service design firm focusing on residential remodels, furnishing, and styling.", onClick: () => null, socialLinks: socialLinksMock2, logo: "https://static.wixstatic.com/media/258105_8e04439070694f278e4787a310ea9f4b~mv2.png", partnerName: "Audrey Scheck", websiteUrl: "" }), _jsx(TrendingValue, { chartData: lineChartData, marketValue: 894000, menuItems: menuMock, mortgageBalance: 220532, purchasePrice: 220532, roi: "+234%" }), _jsx(ShortPartnerTile, { _id: "2", buttonText: "Contact Audrey Scheck", description: "Full-service design firm focusing on residential remodels, furnishing, and styling.", onClick: () => null, socialLinks: socialLinksMock2, logo: "https://static.wixstatic.com/media/258105_8e04439070694f278e4787a310ea9f4b~mv2.png", partnerName: "Audrey Scheck", websiteUrl: "" }), _jsx(FolderSharing, { folders: FoldersDB, handleAddNewFolder: handleNewFolder, handleFolderClick: handleFolderClick, handleSelect: () => null, initialSelectItem: selectOptions[0], menuItems: menuMock, selectItems: selectOptions }), _jsxs(Stack, { spacing: "base", children: [_jsx(AddHomeItem, { handleClick: () => null }), _jsx(SendCommunication, { documentList: [] })] }), _jsx(ShortPartnerTile, { _id: "3", buttonText: "Contact Audrey Scheck", description: "Full-service design firm focusing on residential remodels, furnishing, and styling.", onClick: () => null, socialLinks: socialLinksMock2, logo: "https://static.wixstatic.com/media/258105_8e04439070694f278e4787a310ea9f4b~mv2.png", partnerName: "Audrey Scheck", websiteUrl: "" })] })] })] })] }), _jsx(HomeBoardTour, { currentStep: currentStep, handleClose: handleClose, handleStep: handleStep, meetStepUrl: videoMock, isActive: activeTour })] }));
|
|
60
61
|
};
|
|
61
|
-
export const AppBarComponent = ({ setActiveTour = (value) => { } }) => {
|
|
62
|
+
export const AppBarComponent = ({ setActiveTour = (value) => { }, onClick = (panel) => { }, }) => {
|
|
62
63
|
const handleTour = () => {
|
|
63
64
|
setActiveTour(true);
|
|
64
65
|
};
|
|
65
66
|
const { windowDimensions: { width }, } = useWindowDimensions();
|
|
66
67
|
const isMobile = width <= 768;
|
|
67
|
-
return (_jsxs(AppBar, { onLogoClick: () => null, user: userMock, children: [!isMobile && (_jsxs(_Fragment, { children: [_jsx(TourButton, { onClick: handleTour, label: "Show tour" }), _jsx(BarDivider, {})] })), _jsx(PeopleConnected, { onClick: () => null, total: 12 }), _jsx(BarDivider, {}), _jsx(ContactList, { onClick: () => null, total: 2 }), _jsx(BarDivider, {}), _jsx(TutorialsButton, { onClick: () => null }), !isMobile && (_jsxs(_Fragment, { children: [_jsx(BarDivider, {}), _jsxs(Flex, { align: "center", gap: "1", children: [_jsx(StorageUsed, { totalUsed: 2, totalStorage: 10, state: "trial", onClick: () => null }), _jsx(Trash, { onClick: () => null, total: 2 })] })] }))] }));
|
|
68
|
+
return (_jsxs(AppBar, { onLogoClick: () => null, user: userMock, children: [!isMobile && (_jsxs(_Fragment, { children: [_jsx(TourButton, { onClick: handleTour, label: "Show tour" }), _jsx(BarDivider, {})] })), _jsx(NotificationsReminder, { onClick: () => onClick('Notifications'), total: 2 }), _jsx(BarDivider, {}), _jsx(PeopleConnected, { onClick: () => null, total: 12 }), _jsx(BarDivider, {}), _jsx(ContactList, { onClick: () => null, total: 2 }), _jsx(BarDivider, {}), _jsx(TutorialsButton, { onClick: () => null }), !isMobile && (_jsxs(_Fragment, { children: [_jsx(BarDivider, {}), _jsxs(Flex, { align: "center", gap: "1", children: [_jsx(StorageUsed, { totalUsed: 2, totalStorage: 10, state: "trial", onClick: () => null }), _jsx(Trash, { onClick: () => null, total: 2 })] })] }))] }));
|
|
68
69
|
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { t } from 'i18next';
|
|
3
|
+
import { Box, Divider, DrawerContent, DrawerHeader } from '@chakra-ui/react';
|
|
4
|
+
import { PanelHeader, ReadOnlyDynamicForm, TabsHeader } from '..';
|
|
5
|
+
import { Painting } from '../../assets/images';
|
|
6
|
+
export const ViewingHomeItemPanel = ({ form, onClose, onEdit, }) => {
|
|
7
|
+
const tabs = [
|
|
8
|
+
{
|
|
9
|
+
label: t('contacts.details'),
|
|
10
|
+
component: _jsx("div", {}),
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
label: t('contacts.permissions'),
|
|
14
|
+
component: _jsx("div", {}),
|
|
15
|
+
},
|
|
16
|
+
];
|
|
17
|
+
const rightTabs = [
|
|
18
|
+
{
|
|
19
|
+
label: 'History',
|
|
20
|
+
component: _jsx("div", {}),
|
|
21
|
+
},
|
|
22
|
+
];
|
|
23
|
+
return (_jsxs(DrawerContent, { bg: "lightBlue.1", children: [_jsxs(DrawerHeader, { p: "0", children: [_jsx(PanelHeader, { handleCloseButton: onClose, title: t('homeItems.title'), icon: Painting }), _jsx(Divider, {}), _jsx(Box, { pt: "1", bg: "neutral.white", children: _jsx(TabsHeader, { tabList: tabs, rightTabList: rightTabs }) })] }), _jsx(ReadOnlyDynamicForm, { form: form, onEdit: onEdit })] }));
|
|
24
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './ViewingHomeItemPanel';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './ViewingHomeItemPanel';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { t } from 'i18next';
|
|
3
|
+
import { AspectRatio, Flex, Image, Text } from '@chakra-ui/react';
|
|
4
|
+
import { TextBadge } from '..';
|
|
5
|
+
export const InboxCard = ({ box, onClick }) => {
|
|
6
|
+
const { image, name, newMessages = 0, totalMessages } = box;
|
|
7
|
+
const hasNewMessages = newMessages > 0;
|
|
8
|
+
const message = `${newMessages} ${t('badges.new')}`;
|
|
9
|
+
return (_jsxs(Flex, { as: "button", align: "center", justify: "space-between", px: "base", py: "6", bg: "neutral.white", transition: "background-color 0.2s", _hover: { bg: 'lightGreen.1' }, onClick: () => onClick === null || onClick === void 0 ? void 0 : onClick(name), children: [_jsxs(Flex, { align: "center", gap: "base", children: [_jsx(AspectRatio, { ratio: 1, w: "34px", h: "auto", children: _jsx(Image, { src: image, alt: name }) }), _jsx(Text, { children: name })] }), _jsxs(Flex, { align: "center", gap: "6", children: [hasNewMessages && (_jsx(TextBadge, { text: message, showAnimation: false, bgColor: "violet.1" })), _jsx(Text, { fontSize: "30px", fontWeight: "medium", color: "blue.2", children: totalMessages })] })] }));
|
|
10
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const InboxForwardBanner: () => 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 { AspectRatio, Flex, Text, Image } from '@chakra-ui/react';
|
|
4
|
+
import { IA } from '../../assets/images';
|
|
5
|
+
export const InboxForwardBanner = () => {
|
|
6
|
+
return (_jsxs(Flex, { p: "base", gap: "base", align: "center", bg: "lightBlue.2", children: [_jsx(AspectRatio, { ratio: 1, minW: "35px", h: "auto", children: _jsx(Image, { src: IA, alt: "IA" }) }), _jsxs(Text, { variant: "home", lineHeight: "1", children: [t('inbox.forwardTo'), _jsx(Text, { variant: "home", lineHeight: "1", color: "neutral.black", fontWeight: "bold", display: "inline", children: "homefileit@homefile.com." })] })] }));
|
|
7
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { t } from 'i18next';
|
|
3
|
+
import { Container, Stack } from '@chakra-ui/react';
|
|
4
|
+
import { ContainerHeader, InboxCard, MoreHorizontal, TileTooltip, } from '..';
|
|
5
|
+
import { Inbox } from '../../assets/images';
|
|
6
|
+
export const InboxTile = ({ banner, boxes, menuItems, onClick, }) => {
|
|
7
|
+
var _a;
|
|
8
|
+
return (_jsx(TileTooltip, { label: "inbox", children: _jsx(Container, { variant: "launchpad", h: "full", position: "relative", m: "0", children: _jsxs(Stack, { spacing: "2px", children: [_jsx(ContainerHeader, { menuItems: menuItems, title: (_a = t('partner.tiles.inbox')) !== null && _a !== void 0 ? _a : '', icon: _jsx(MoreHorizontal, { size: 38 }), titleIcon: Inbox }), banner, boxes.map((box) => (_jsx(InboxCard, { box: box, onClick: onClick }, box.name)))] }) }) }));
|
|
9
|
+
};
|
|
@@ -16,13 +16,16 @@ export * from './headers';
|
|
|
16
16
|
export * from './help';
|
|
17
17
|
export * from './homeAssistant';
|
|
18
18
|
export * from './homeBoard';
|
|
19
|
+
export * from './homeItems';
|
|
19
20
|
export * from './homeSummary';
|
|
20
21
|
export * from './icons';
|
|
22
|
+
export * from './inboxTile';
|
|
21
23
|
export * from './inputs';
|
|
22
24
|
export * from './launchpad';
|
|
23
25
|
export * from './loaders';
|
|
24
26
|
export * from './myHomes';
|
|
25
27
|
export * from './myProfile';
|
|
28
|
+
export * from './notifications';
|
|
26
29
|
export * from './onboarding';
|
|
27
30
|
export * from './overlay/Overlay';
|
|
28
31
|
export * from './partner';
|
package/dist/components/index.js
CHANGED
|
@@ -16,13 +16,16 @@ export * from './headers';
|
|
|
16
16
|
export * from './help';
|
|
17
17
|
export * from './homeAssistant';
|
|
18
18
|
export * from './homeBoard';
|
|
19
|
+
export * from './homeItems';
|
|
19
20
|
export * from './homeSummary';
|
|
20
21
|
export * from './icons';
|
|
22
|
+
export * from './inboxTile';
|
|
21
23
|
export * from './inputs';
|
|
22
24
|
export * from './launchpad';
|
|
23
25
|
export * from './loaders';
|
|
24
26
|
export * from './myHomes';
|
|
25
27
|
export * from './myProfile';
|
|
28
|
+
export * from './notifications';
|
|
26
29
|
export * from './onboarding';
|
|
27
30
|
export * from './overlay/Overlay';
|
|
28
31
|
export * from './partner';
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { t } from 'i18next';
|
|
3
|
+
import { Container, Flex, IconButton, Stack, Text } from '@chakra-ui/react';
|
|
4
|
+
import { Close } from '..';
|
|
5
|
+
import { formatDateWithAt } from '../../utils';
|
|
6
|
+
export const NotificationCard = ({ _id, createdAt, message, onDismiss, status, type, }) => {
|
|
7
|
+
const actionLabels = {
|
|
8
|
+
contact: {
|
|
9
|
+
added: `${t('notifications.types.contact')} ${t('notifications.status.added')}`,
|
|
10
|
+
removed: `${t('notifications.types.contact')} ${t('notifications.status.removed')}`,
|
|
11
|
+
shared: `${t('notifications.status.shared')} ${t('notifications.types.contact')}`,
|
|
12
|
+
updated: `${t('notifications.types.contact')} ${t('notifications.status.updated')}`,
|
|
13
|
+
},
|
|
14
|
+
file: {
|
|
15
|
+
added: `${t('notifications.types.file')} ${t('notifications.status.added')}`,
|
|
16
|
+
removed: `${t('notifications.types.file')} ${t('notifications.status.removed')}`,
|
|
17
|
+
shared: `${t('notifications.status.shared')} ${t('notifications.types.file')}`,
|
|
18
|
+
updated: `${t('notifications.types.file')} ${t('notifications.status.updated')}`,
|
|
19
|
+
},
|
|
20
|
+
folder: {
|
|
21
|
+
added: `${t('notifications.types.folder')} ${t('notifications.status.added')}`,
|
|
22
|
+
removed: `${t('notifications.types.folder')} ${t('notifications.status.removed')}`,
|
|
23
|
+
shared: `${t('notifications.status.shared')} ${t('notifications.types.folder')}`,
|
|
24
|
+
updated: `${t('notifications.types.folder')} ${t('notifications.status.updated')}`,
|
|
25
|
+
},
|
|
26
|
+
payment: {
|
|
27
|
+
added: `${t('notifications.types.payment')} ${t('notifications.status.added')}`,
|
|
28
|
+
removed: `${t('notifications.types.payment')} ${t('notifications.status.removed')}`,
|
|
29
|
+
shared: `${t('notifications.status.shared')} ${t('notifications.types.payment')}`,
|
|
30
|
+
updated: `${t('notifications.types.payment')} ${t('notifications.status.updated')}`,
|
|
31
|
+
},
|
|
32
|
+
receipt: {
|
|
33
|
+
added: `${t('notifications.types.receipt')} ${t('notifications.status.added')}`,
|
|
34
|
+
removed: `${t('notifications.types.receipt')} ${t('notifications.status.removed')}`,
|
|
35
|
+
shared: `${t('notifications.status.shared')} ${t('notifications.types.receipt')}`,
|
|
36
|
+
updated: `${t('notifications.types.receipt')} ${t('notifications.status.updated')}`,
|
|
37
|
+
},
|
|
38
|
+
tile: {
|
|
39
|
+
added: `${t('notifications.types.tile')} ${t('notifications.status.added')}`,
|
|
40
|
+
removed: `${t('notifications.types.tile')} ${t('notifications.status.removed')}`,
|
|
41
|
+
shared: `${t('notifications.status.shared')} ${t('notifications.types.tile')}`,
|
|
42
|
+
updated: `${t('notifications.types.tile')} ${t('notifications.status.updated')}`,
|
|
43
|
+
},
|
|
44
|
+
user: {
|
|
45
|
+
added: `${t('notifications.types.user')} ${t('notifications.status.added')}`,
|
|
46
|
+
removed: `${t('notifications.types.user')} ${t('notifications.status.removed')}`,
|
|
47
|
+
shared: `${t('notifications.status.shared')} ${t('notifications.types.user')}`,
|
|
48
|
+
updated: `${t('notifications.types.user')} ${t('notifications.status.updated')}`,
|
|
49
|
+
},
|
|
50
|
+
};
|
|
51
|
+
const bgColors = {
|
|
52
|
+
added: 'lightGreen.3',
|
|
53
|
+
removed: 'error.1',
|
|
54
|
+
shared: 'yellow.6',
|
|
55
|
+
updated: 'lightBlue.10',
|
|
56
|
+
};
|
|
57
|
+
const colors = {
|
|
58
|
+
added: 'green.8',
|
|
59
|
+
removed: 'error.2',
|
|
60
|
+
shared: 'yellow.1',
|
|
61
|
+
updated: 'lightBlue.9',
|
|
62
|
+
};
|
|
63
|
+
return (_jsx(Container, { p: "2", bg: bgColors[status], children: _jsxs(Stack, { spacing: "3", children: [_jsxs(Flex, { justify: "space-between", align: "center", children: [_jsx(Text, { fontSize: "10px", fontWeight: "semibold", textTransform: "uppercase", color: colors[status], children: actionLabels[type][status] }), _jsxs(Flex, { gap: "1", align: "center", children: [_jsx(Text, { variant: "date", children: formatDateWithAt({ date: createdAt }) }), _jsx(IconButton, { variant: "ghost", "aria-label": "close", maxW: "fit-content", onClick: () => onDismiss(_id), icon: _jsx(Close, { size: 11 }) })] })] }), _jsx(Text, { fontSize: "sm", fontFamily: "secondary", children: message })] }) }));
|
|
64
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { createElement as _createElement } from "react";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { t } from 'i18next';
|
|
4
|
+
import { DrawerBody, DrawerContent, DrawerHeader, Stack, } from '@chakra-ui/react';
|
|
5
|
+
import { PanelHeader, NotificationCard, SelectInput } from '..';
|
|
6
|
+
import { Speaker } from '../../assets/images';
|
|
7
|
+
import { useNotificationsPanel } from '../../hooks';
|
|
8
|
+
export const NotificationsPanel = ({ notifications = [], onClose, onDismiss, }) => {
|
|
9
|
+
const count = notifications.length;
|
|
10
|
+
const { currentSort, items, handleSelectItem, sortedNotifications } = useNotificationsPanel({
|
|
11
|
+
notifications,
|
|
12
|
+
});
|
|
13
|
+
return (_jsxs(DrawerContent, { bg: "lightBlue.1", children: [_jsx(DrawerHeader, { p: "0", children: _jsx(PanelHeader, { handleCloseButton: onClose, title: `${t('notifications.title')} ${count && `(${count})`}`, icon: Speaker }) }), _jsx(DrawerBody, { p: "base", children: _jsxs(Stack, { spacing: "base", children: [_jsx(SelectInput, { handleClick: handleSelectItem, initialValue: currentSort, items: items }), _jsx(Stack, { spacing: "1", children: sortedNotifications.map((notification) => (_createElement(NotificationCard, Object.assign({}, notification, { key: notification._id, onDismiss: onDismiss })))) })] }) })] }));
|
|
14
|
+
};
|
|
@@ -5,5 +5,5 @@ import { useBubble } from '../../hooks';
|
|
|
5
5
|
export const Bubble = ({ counter = 0, handleClose, handleStep, position = 'fixed', setCounter = () => { }, steps, width = 'fit-content', }) => {
|
|
6
6
|
const { currentStep, handleNext, handlePosition, handlePrev, stepsOrder } = useBubble({ counter, handleStep, setCounter, steps });
|
|
7
7
|
const hasMoreSteps = stepsOrder.length > 1;
|
|
8
|
-
return (_jsxs(_Fragment, { children: [_jsxs(Box, { bgGradient: "linear(to-b, lightGreen.1, neutral.white)", w: width, position: position, top: handlePosition(steps[currentStep].topRef), left: handlePosition(steps[currentStep].leftRef), zIndex: "popover", boxShadow: "lg", borderRadius: "md", children: [_jsx(BubbleArrow, { arrowBottom: steps[currentStep].arrowBottom, arrowLeft: steps[currentStep].arrowLeft, arrowRight: steps[currentStep].arrowRight, arrowTop: steps[currentStep].arrowTop }), !steps[currentStep].hideHeader && _jsx(BubbleHead, { onClose: handleClose }), steps[currentStep].component, hasMoreSteps && !steps[currentStep].hideFooter && (_jsx(BubbleFooter, { currentStep: counter + 1, handleNext: handleNext, handlePrevious: handlePrev, totalSteps: stepsOrder.length }))] }), _jsx(BubbleOverlay, { onClick: handleClose })] }));
|
|
8
|
+
return (_jsxs(_Fragment, { children: [_jsxs(Box, { bgGradient: "linear(to-b, lightGreen.1, neutral.white)", w: width, position: position, top: handlePosition(steps[currentStep].topRef), left: handlePosition(steps[currentStep].leftRef), bottom: handlePosition(steps[currentStep].bottomRef), right: handlePosition(steps[currentStep].rightRef), zIndex: "popover", boxShadow: "lg", borderRadius: "md", children: [_jsx(BubbleArrow, { arrowBottom: steps[currentStep].arrowBottom, arrowLeft: steps[currentStep].arrowLeft, arrowRight: steps[currentStep].arrowRight, arrowTop: steps[currentStep].arrowTop }), !steps[currentStep].hideHeader && _jsx(BubbleHead, { onClose: handleClose }), steps[currentStep].component, hasMoreSteps && !steps[currentStep].hideFooter && (_jsx(BubbleFooter, { currentStep: counter + 1, handleNext: handleNext, handlePrevious: handlePrev, totalSteps: stepsOrder.length }))] }), _jsx(BubbleOverlay, { onClick: handleClose })] }));
|
|
9
9
|
};
|
|
@@ -5,7 +5,7 @@ import { Bubble, BubbleText, MeetStep } from '..';
|
|
|
5
5
|
import { useComponentCoordinates, useComponentStyles, useWindowDimensions, } from '../../hooks';
|
|
6
6
|
import { appBarHeight, arrowSize, distanceFromEdgeArrowToBorder, firstBubbleHeight, firstBubbleWidth, getDistanceFromArrow, getMiddleAnchorPosition, getXPosition, getYPosition, } from '../../utils';
|
|
7
7
|
export const HomeBoardTour = ({ currentStep = 'homeboard', bubbleWidth = '300px', handleClose, handleStep, meetStepUrl, isActive = false, }) => {
|
|
8
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s
|
|
8
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
|
|
9
9
|
const [counter, setCounter] = useState(0);
|
|
10
10
|
const componentIds = [
|
|
11
11
|
'backToLaunchpad',
|
|
@@ -27,7 +27,7 @@ export const HomeBoardTour = ({ currentStep = 'homeboard', bubbleWidth = '300px'
|
|
|
27
27
|
const parsedBubbleWidth = Number(bubbleWidth.replace('px', ''));
|
|
28
28
|
const panelBubbleArrowSize = 500 + parsedBubbleWidth + arrowSize;
|
|
29
29
|
const halfBubbleWidth = parsedBubbleWidth / 2;
|
|
30
|
-
const bubbleArrowWidth = parsedBubbleWidth + arrowSize +
|
|
30
|
+
const bubbleArrowWidth = parsedBubbleWidth + arrowSize + 10;
|
|
31
31
|
const steps = {
|
|
32
32
|
homeboard: {
|
|
33
33
|
arrowBottom: 'bottom',
|
|
@@ -56,9 +56,9 @@ export const HomeBoardTour = ({ currentStep = 'homeboard', bubbleWidth = '300px'
|
|
|
56
56
|
},
|
|
57
57
|
// Reference component id -> FolderSharing/FolderSharing
|
|
58
58
|
addFolders: {
|
|
59
|
-
arrowRight: 'right-
|
|
59
|
+
arrowRight: 'right-bottom',
|
|
60
60
|
leftRef: ((_e = coordinates.addFolders) === null || _e === void 0 ? void 0 : _e.x) - bubbleArrowWidth,
|
|
61
|
-
|
|
61
|
+
bottomRef: 3,
|
|
62
62
|
component: (_jsx(BubbleText, { title: t('tour.steps.addFolders.title'), description: t('tour.steps.addFolders.description') })),
|
|
63
63
|
},
|
|
64
64
|
nameFolder: {
|
|
@@ -82,36 +82,36 @@ export const HomeBoardTour = ({ currentStep = 'homeboard', bubbleWidth = '300px'
|
|
|
82
82
|
// Reference component id -> appBar/PeopleConnected
|
|
83
83
|
shareWithOthers: {
|
|
84
84
|
arrowTop: 'top',
|
|
85
|
-
leftRef: getXPosition(((
|
|
86
|
-
topRef: ((
|
|
85
|
+
leftRef: getXPosition(((_f = coordinates.shareWithOthers) === null || _f === void 0 ? void 0 : _f.x) + 25, halfBubbleWidth),
|
|
86
|
+
topRef: ((_g = coordinates.shareWithOthers) === null || _g === void 0 ? void 0 : _g.y) + appBarHeight,
|
|
87
87
|
component: (_jsx(BubbleText, { title: t('tour.steps.shareWithOthers.title'), description: t('tour.steps.shareWithOthers.description') })),
|
|
88
88
|
},
|
|
89
89
|
// Reference component id -> appBar/ContactList
|
|
90
90
|
viewContacts: {
|
|
91
91
|
arrowTop: 'top',
|
|
92
|
-
leftRef: getXPosition(((
|
|
93
|
-
topRef: ((
|
|
92
|
+
leftRef: getXPosition(((_h = coordinates.viewContacts) === null || _h === void 0 ? void 0 : _h.x) + 28, halfBubbleWidth),
|
|
93
|
+
topRef: ((_j = coordinates.shareWithOthers) === null || _j === void 0 ? void 0 : _j.y) + appBarHeight,
|
|
94
94
|
component: (_jsx(BubbleText, { title: t('tour.steps.viewContacts.title'), description: t('tour.steps.viewContacts.description') })),
|
|
95
95
|
},
|
|
96
96
|
// Reference component id -> appBar/TutorialsButton
|
|
97
97
|
feedback: {
|
|
98
98
|
arrowTop: 'top',
|
|
99
|
-
leftRef: getXPosition(((
|
|
100
|
-
topRef: ((
|
|
99
|
+
leftRef: getXPosition(((_k = coordinates.feedback) === null || _k === void 0 ? void 0 : _k.x) + 14, halfBubbleWidth),
|
|
100
|
+
topRef: ((_l = coordinates.feedback) === null || _l === void 0 ? void 0 : _l.y) + appBarHeight,
|
|
101
101
|
component: (_jsx(BubbleText, { title: t('tour.steps.feedback.title'), description: t('tour.steps.feedback.description') })),
|
|
102
102
|
},
|
|
103
103
|
// Reference component id -> appBar/StorageUsed
|
|
104
104
|
storageUsed: {
|
|
105
105
|
arrowTop: 'top',
|
|
106
|
-
leftRef: getXPosition(((
|
|
107
|
-
topRef: ((
|
|
106
|
+
leftRef: getXPosition(((_m = coordinates.storageUsed) === null || _m === void 0 ? void 0 : _m.x) + 30, halfBubbleWidth),
|
|
107
|
+
topRef: ((_o = coordinates.shareWithOthers) === null || _o === void 0 ? void 0 : _o.y) + appBarHeight,
|
|
108
108
|
component: (_jsx(BubbleText, { title: t('tour.steps.storageUsed.title'), description: t('tour.steps.storageUsed.description') })),
|
|
109
109
|
},
|
|
110
110
|
// Reference component id -> appBar/UserProfile
|
|
111
111
|
profile: {
|
|
112
112
|
arrowTop: 'top-right',
|
|
113
|
-
leftRef: getXPosition(((
|
|
114
|
-
topRef: ((
|
|
113
|
+
leftRef: getXPosition(((_p = coordinates.profile) === null || _p === void 0 ? void 0 : _p.x) + 20, parsedBubbleWidth),
|
|
114
|
+
topRef: ((_q = coordinates.shareWithOthers) === null || _q === void 0 ? void 0 : _q.y) + appBarHeight,
|
|
115
115
|
component: (_jsx(BubbleText, { title: t('tour.steps.profile.title'), description: t('tour.steps.profile.description') })),
|
|
116
116
|
},
|
|
117
117
|
// Reference component id -> receipts/autofiler/AutofilerHeader
|
|
@@ -129,8 +129,8 @@ export const HomeBoardTour = ({ currentStep = 'homeboard', bubbleWidth = '300px'
|
|
|
129
129
|
// Reference component id -> appBar/ContactList
|
|
130
130
|
addCatalog: {
|
|
131
131
|
arrowRight: 'right-top',
|
|
132
|
-
leftRef: getXPosition(((
|
|
133
|
-
topRef: ((
|
|
132
|
+
leftRef: getXPosition(((_r = coordinates.viewContacts) === null || _r === void 0 ? void 0 : _r.x) + 28, halfBubbleWidth),
|
|
133
|
+
topRef: ((_s = coordinates.viewContacts) === null || _s === void 0 ? void 0 : _s.y) + 40,
|
|
134
134
|
component: (_jsx(BubbleText, { title: t('tour.steps.addCatalog.title'), description: t('tour.steps.addCatalog.description') })),
|
|
135
135
|
},
|
|
136
136
|
partnerCatalog: {
|
|
@@ -4,5 +4,5 @@ import { Box, Flex, Text, Progress } from '@chakra-ui/react';
|
|
|
4
4
|
import { useValueCard } from '../../hooks';
|
|
5
5
|
export const ValueCard = ({ balance, totalValue, year, yearValue, }) => {
|
|
6
6
|
const { balanceColor, formattedTotalValue, formattedYearValue, percentage, showBalance, } = useValueCard({ balance, totalValue, yearValue });
|
|
7
|
-
return (_jsxs(Box, { bg: "neutral.white", border: "1px solid", borderColor: "lightBlue.6", children: [_jsxs(Flex, { justify: "space-between", align: "center", p: "base", children: [_jsx(Text, { fontSize: "3xl", color: "lightBlue.6", children: "$" }), _jsxs(Flex, { gap: "base", align: "center", children: [_jsxs(Text, { fontSize: "3xl", children: [formattedTotalValue, "."] }), showBalance && (_jsx(Text, { fontSize: "small", fontWeight: "semibold", bg: balanceColor, py: "1", px: "2", height: "fit-content", borderRadius: "md", color: "neutral.white", children: balance }))] })] }), _jsxs(Flex, { gap: "base", align: "center", p: "base", borderTop: "1px dashed", borderColor: "lightBlue.6", children: [_jsx(Text, { fontSize: "sm", color: "gray.4", textTransform: "uppercase", children: `${t('valueMonitor.label')} ${year}` }), _jsx(Progress, { flex: "1", size: "md", value: percentage || 0, height: "13px" }), _jsxs(Text, { fontSize: "sm", children: [formattedYearValue, "."] })] })] }));
|
|
7
|
+
return (_jsxs(Box, { bg: "neutral.white", border: "1px solid", borderColor: "lightBlue.6", children: [_jsxs(Flex, { justify: "space-between", align: "center", p: "base", children: [_jsx(Text, { fontSize: "3xl", color: "lightBlue.6", children: "$" }), _jsxs(Flex, { gap: "base", align: "center", children: [_jsxs(Text, { fontSize: "3xl", children: [formattedTotalValue, "."] }), showBalance && (_jsx(Text, { fontSize: "small", fontWeight: "semibold", bg: balanceColor, py: "1", px: "2", height: "fit-content", borderRadius: "md", color: "neutral.white", children: balance }))] })] }), year && (_jsxs(Flex, { gap: "base", align: "center", p: "base", borderTop: "1px dashed", borderColor: "lightBlue.6", children: [_jsx(Text, { fontSize: "sm", color: "gray.4", textTransform: "uppercase", children: `${t('valueMonitor.label')} ${year}` }), _jsx(Progress, { flex: "1", size: "md", value: percentage || 0, height: "13px" }), _jsxs(Text, { fontSize: "sm", children: [formattedYearValue, "."] })] }))] }));
|
|
8
8
|
};
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { handleMapMedia } from '../../utils';
|
|
1
|
+
import { useEffect, useState } from 'react';
|
|
3
2
|
export const useMediaPreview = ({ images }) => {
|
|
4
3
|
var _a, _b, _c;
|
|
5
|
-
const [dbImages, setDbImages] = useState([]);
|
|
6
4
|
const [totalFiles, setTotalFiles] = useState([]);
|
|
7
5
|
const [index, setIndex] = useState(0);
|
|
8
6
|
const storageUrl = import.meta.env.VITE_STORAGE_URL;
|
|
@@ -36,10 +34,9 @@ export const useMediaPreview = ({ images }) => {
|
|
|
36
34
|
setIndex(index - 1);
|
|
37
35
|
}
|
|
38
36
|
};
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
}, [images.length]);
|
|
37
|
+
useEffect(() => {
|
|
38
|
+
setTotalFiles([...images]);
|
|
39
|
+
}, [JSON.stringify(images.map((image) => image._id))]);
|
|
43
40
|
return {
|
|
44
41
|
handleDescription,
|
|
45
42
|
handleEditDescription,
|
|
@@ -2,11 +2,13 @@ import { FolderFileI } from '../../interfaces';
|
|
|
2
2
|
interface FilesUploaderHookI {
|
|
3
3
|
onUpload: (files: FolderFileI[]) => void;
|
|
4
4
|
uploading: boolean;
|
|
5
|
+
displayImages?: string[];
|
|
5
6
|
}
|
|
6
|
-
export declare const useFilesUploader: ({ onUpload, uploading, }: FilesUploaderHookI) => {
|
|
7
|
+
export declare const useFilesUploader: ({ onUpload, uploading, displayImages, }: FilesUploaderHookI) => {
|
|
7
8
|
acceptedFiles: FolderFileI[];
|
|
8
9
|
errorMessage: string;
|
|
9
10
|
getRootProps: <T extends import("react-dropzone").DropzoneRootProps>(props?: T) => T;
|
|
10
11
|
getInputProps: <T extends import("react-dropzone").DropzoneInputProps>(props?: T) => T;
|
|
12
|
+
thumbnails: string[];
|
|
11
13
|
};
|
|
12
14
|
export {};
|