@homefile/components-v2 2.49.5 → 2.49.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.
- package/dist/components/inboxTile/panel/MessageChatPanel.d.ts +1 -1
- package/dist/components/inboxTile/panel/MessageChatPanel.js +18 -4
- package/dist/components/inboxTile/panel/MessagePanel.d.ts +1 -1
- package/dist/components/inboxTile/panel/MessagePanel.js +13 -15
- package/dist/components/myProfile/details/HomiSms.d.ts +1 -1
- package/dist/components/myProfile/details/HomiSms.js +15 -20
- package/dist/interfaces/inboxTile/MessageChatPanel.interface.d.ts +6 -4
- package/dist/interfaces/myProfile/details/HomiSms.interface.d.ts +1 -4
- package/dist/stories/inboxTile/MessagePanel.stories.js +16 -3
- package/dist/stories/myProfile/MyProfilePanel.stories.js +1 -1
- package/dist/stories/myProfile/details/HomiSms.stories.d.ts +0 -2
- package/dist/stories/myProfile/details/HomiSms.stories.js +0 -2
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { MessageChatPanelI } from '../../../interfaces';
|
|
2
2
|
import 'react-quill-new/dist/quill.snow.css';
|
|
3
3
|
import '../../../styles';
|
|
4
|
-
export declare const MessageChatPanel: ({ message, onBack, onClose, onReply, }: MessageChatPanelI) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
export declare const MessageChatPanel: ({ actionLabel, address, city, email, firstName, icon, lastName, message, onBack, onAction, onClose, onReply, phone, showAvatar, showHeader, state, title, zip, }: MessageChatPanelI) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -12,13 +12,27 @@ import { useState } from 'react';
|
|
|
12
12
|
import { t } from 'i18next';
|
|
13
13
|
import { Box, DrawerBody, DrawerContent, DrawerFooter, DrawerHeader, Stack, Text, } from '@chakra-ui/react';
|
|
14
14
|
import QuillEditor from 'react-quill-new';
|
|
15
|
-
import {
|
|
16
|
-
import { BackCircleButton, FooterButtons, MessageCard, PanelHeader, up, WrapperWithShadow, } from '../../../components';
|
|
15
|
+
import { Inbox } from '../../../assets/images';
|
|
16
|
+
import { BackCircleButton, FooterButtons, MessageCard, MessageSenderCard, PanelHeader, up, WrapperWithShadow, } from '../../../components';
|
|
17
17
|
import 'react-quill-new/dist/quill.snow.css';
|
|
18
18
|
import '../../../styles';
|
|
19
|
-
export const MessageChatPanel = ({ message, onBack, onClose, onReply, }) => {
|
|
19
|
+
export const MessageChatPanel = ({ actionLabel, address, city, email, firstName, icon = Inbox, lastName, message, onBack, onAction, onClose, onReply, phone, showAvatar, showHeader, state, title, zip, }) => {
|
|
20
20
|
var _a, _b;
|
|
21
21
|
const [value, setValue] = useState('');
|
|
22
|
+
const senderCardData = {
|
|
23
|
+
actionLabel,
|
|
24
|
+
address,
|
|
25
|
+
city,
|
|
26
|
+
email,
|
|
27
|
+
firstName,
|
|
28
|
+
lastName,
|
|
29
|
+
onAction,
|
|
30
|
+
phone,
|
|
31
|
+
showAvatar,
|
|
32
|
+
showHeader,
|
|
33
|
+
state,
|
|
34
|
+
zip,
|
|
35
|
+
};
|
|
22
36
|
const onChange = (content) => {
|
|
23
37
|
setValue(content);
|
|
24
38
|
};
|
|
@@ -30,7 +44,7 @@ export const MessageChatPanel = ({ message, onBack, onClose, onReply, }) => {
|
|
|
30
44
|
});
|
|
31
45
|
setValue('');
|
|
32
46
|
});
|
|
33
|
-
return (_jsxs(DrawerContent, { bg: "lightBlue.1", children: [_jsx(DrawerHeader, { p: "0", children: _jsx(PanelHeader, { handleCloseButton: onClose, title: (_a = message === null || message === void 0 ? void 0 : message.from) !== null && _a !== void 0 ? _a : '', icon:
|
|
47
|
+
return (_jsxs(DrawerContent, { bg: "lightBlue.1", children: [_jsx(DrawerHeader, { p: "0", children: _jsx(PanelHeader, { handleCloseButton: onClose, title: (_a = title !== null && title !== void 0 ? title : message === null || message === void 0 ? void 0 : message.from) !== null && _a !== void 0 ? _a : '', icon: icon }) }), _jsx(DrawerBody, { p: "0", children: _jsxs(Stack, { spacing: "base", children: [onBack && (_jsx(Box, { bg: "lightBlue.2", py: "2", px: "base", children: _jsx(BackCircleButton, { onClick: onBack }) })), _jsx(MessageSenderCard, Object.assign({}, senderCardData)), _jsx(Stack, { spacing: "base", p: "base", pb: "4", children: (_b = message === null || message === void 0 ? void 0 : message.chatReplies) === null || _b === void 0 ? void 0 : _b.map((reply) => (_jsx(MessageCard, { message: Object.assign(Object.assign({}, reply), { currentUser: message.currentUser }), variant: "chat" }, reply._id))) })] }) }), _jsx(DrawerFooter, { p: "0", maxH: "400px", children: _jsx(WrapperWithShadow, { animation: up, fadeDelay: 0.2, children: _jsxs(Stack, { spacing: "base", children: [_jsx(Text, { children: t('inbox.createReply') }), _jsx(QuillEditor, { theme: "snow", value: value, modules: { toolbar }, onChange: onChange, placeholder: t('inbox.enterContent') }), _jsx(FooterButtons, { px: "0", button1: {
|
|
34
48
|
buttonStyle: 'secondaryFooter',
|
|
35
49
|
label: t('buttons.send'),
|
|
36
50
|
isDisabled: Number(value.length) === 0,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { MessagePanelI } from '../../../interfaces';
|
|
2
|
-
export declare const MessagePanel: ({ icon, messages, onClick, onClose, title,
|
|
2
|
+
export declare const MessagePanel: ({ icon, messages, onClick, onClose, title, ...senderCardData }: MessagePanelI) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,3 +1,14 @@
|
|
|
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
|
+
};
|
|
1
12
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
13
|
import { t } from 'i18next';
|
|
3
14
|
import { Box, DrawerBody, DrawerContent, DrawerHeader, Stack, } from '@chakra-ui/react';
|
|
@@ -5,22 +16,9 @@ import { Inbox } from '../../../assets/images';
|
|
|
5
16
|
import { BaseCounter, MessageCard, MessageSenderCard, PanelHeader, SelectInput, } from '../../../components';
|
|
6
17
|
import { useMessagePanel } from '../../../hooks';
|
|
7
18
|
import { pluralize } from '../../../utils';
|
|
8
|
-
export const MessagePanel = (
|
|
19
|
+
export const MessagePanel = (_a) => {
|
|
20
|
+
var { icon = Inbox, messages, onClick, onClose, title = t('inbox.message') } = _a, senderCardData = __rest(_a, ["icon", "messages", "onClick", "onClose", "title"]);
|
|
9
21
|
const { currentSort, sortedMessages, handleSelectItem, items } = useMessagePanel(messages);
|
|
10
22
|
const baseCounterText = `${t('counter.showing')} ${sortedMessages.length} ${t('counter.of')} ${messages.length} ${pluralize(sortedMessages.length, t('inbox.message').toLowerCase())} `;
|
|
11
|
-
const senderCardData = {
|
|
12
|
-
email,
|
|
13
|
-
firstName,
|
|
14
|
-
lastName,
|
|
15
|
-
phone,
|
|
16
|
-
address,
|
|
17
|
-
city,
|
|
18
|
-
state,
|
|
19
|
-
zip,
|
|
20
|
-
showAvatar,
|
|
21
|
-
showHeader,
|
|
22
|
-
onAction,
|
|
23
|
-
actionLabel,
|
|
24
|
-
};
|
|
25
23
|
return (_jsxs(DrawerContent, { bg: "lightBlue.1", children: [_jsx(DrawerHeader, { p: "0", children: _jsx(PanelHeader, { handleCloseButton: onClose, title: title, icon: icon }) }), _jsx(DrawerBody, { p: "0", children: _jsxs(Stack, { spacing: "base", children: [_jsxs(Box, { children: [_jsx(MessageSenderCard, Object.assign({}, senderCardData)), _jsx(Box, { p: "base", bg: "lightBlue.2", children: _jsx(SelectInput, { handleClick: handleSelectItem, initialValue: currentSort, items: items }) })] }), _jsx(Box, { px: "base", children: _jsx(BaseCounter, { text: baseCounterText }) }), _jsx(Stack, { spacing: "1", pl: "26px", pr: "base", children: sortedMessages.map((message) => (_jsx(MessageCard, { message: message, onClick: onClick }, message._id))) })] }) })] }));
|
|
26
24
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { HomiSmsI } from '../../../interfaces';
|
|
2
|
-
export declare const HomiSms: ({
|
|
2
|
+
export declare const HomiSms: ({ mode, sms, loading, onChange, onSave, }: HomiSmsI) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,40 +1,35 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { t } from 'i18next';
|
|
3
3
|
import { Controller, useForm, useWatch } from 'react-hook-form';
|
|
4
|
-
import { useEffect } from 'react';
|
|
4
|
+
import { useEffect, useState } from 'react';
|
|
5
5
|
import * as yup from 'yup';
|
|
6
6
|
import { Stack, Flex, Img, Text, Box, FormControl, FormLabel, Switch, Checkbox, Button, } from '@chakra-ui/react';
|
|
7
7
|
import { SMS } from '../../../assets/images';
|
|
8
8
|
import { ControlledInput, Loading } from '../../../components';
|
|
9
|
-
export const HomiSms = ({
|
|
10
|
-
var _a
|
|
9
|
+
export const HomiSms = ({ mode = 'full', sms = '', loading, onChange, onSave, }) => {
|
|
10
|
+
var _a;
|
|
11
|
+
const isPhoneOnly = mode === 'phone-only';
|
|
11
12
|
const { control, handleSubmit } = useForm({
|
|
12
|
-
defaultValues: {
|
|
13
|
-
enabled: defaultEnabled,
|
|
14
|
-
smsEnabled: defaultSmsEnabled,
|
|
15
|
-
sms,
|
|
16
|
-
},
|
|
13
|
+
defaultValues: { sms },
|
|
17
14
|
});
|
|
18
15
|
const values = useWatch({ control });
|
|
19
|
-
const
|
|
20
|
-
const
|
|
21
|
-
const
|
|
22
|
-
const
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
const showButtons = isEnabledChanged || isSmsEnabledChanged || isSmsChanged;
|
|
16
|
+
const smsValue = (_a = values === null || values === void 0 ? void 0 : values.sms) !== null && _a !== void 0 ? _a : '';
|
|
17
|
+
const [isEnabled, setIsEnabled] = useState(false);
|
|
18
|
+
const [isSmsEnabled, setIsSmsEnabled] = useState(true);
|
|
19
|
+
const showButtons = isPhoneOnly
|
|
20
|
+
? smsValue !== sms
|
|
21
|
+
: smsValue !== sms || isEnabled || !isSmsEnabled;
|
|
26
22
|
const handlePhoneValidation = (value) => {
|
|
23
|
+
if (isPhoneOnly)
|
|
24
|
+
return yup.string().required().min(10).max(10).isValidSync(value);
|
|
27
25
|
if (isEnabled && isSmsEnabled)
|
|
28
26
|
return yup.string().required().min(10).max(10).isValidSync(value);
|
|
29
27
|
return true;
|
|
30
28
|
};
|
|
31
29
|
useEffect(() => {
|
|
32
30
|
if (onChange && values) {
|
|
33
|
-
onChange(values);
|
|
31
|
+
onChange({ sms: values.sms });
|
|
34
32
|
}
|
|
35
33
|
}, [onChange, values]);
|
|
36
|
-
return (_jsxs(Box, { position: "relative", children: [loading && _jsx(Loading, {}), _jsxs(Stack, { bg: "lightBlue.2", px: "base", py: "4", spacing: "4", children: [_jsxs(Stack, { spacing: "3", children: [_jsxs(Flex, { align: "center", justify: "space-between", children: [_jsxs(Flex, { gap: "base", align: "center", children: [_jsx(Img, { src: SMS, alt: t('myProfile.details.homiSmsAlt') }), _jsx(Text, { fontSize: "sm", textTransform: "uppercase", children: t('myProfile.details.homiSmsTitle') })] }), _jsx(Controller, { name: "
|
|
37
|
-
const label = value ? 'ON' : 'OFF';
|
|
38
|
-
return (_jsxs(FormControl, { display: "flex", alignItems: "center", w: "fit-content", children: [_jsx(FormLabel, { htmlFor: "homi-sms", mb: "0", fontSize: "sm", children: label }), _jsx(Switch, { id: "homi-sms", size: "lg", isChecked: value, onChange: onChange, onBlur: onBlur })] }));
|
|
39
|
-
} })] }), _jsx(Text, { fontFamily: "secondary", lineHeight: "1.2", children: t('myProfile.details.homiSmsSubtitle') })] }), _jsxs(Flex, { gap: "base", align: "center", justify: "space-between", children: [_jsx(Controller, { name: "smsEnabled", control: control, render: ({ field: { value, onChange } }) => (_jsx(Checkbox, { size: "md", isChecked: value, onChange: (event) => onChange(event.target.checked), isDisabled: !isEnabled, children: _jsx(Text, { variant: "info", fontWeight: "normal", children: "SMS" }) })) }), _jsx(Box, { w: "75%", children: _jsx(Controller, { name: "sms", control: control, rules: { validate: handlePhoneValidation }, render: ({ field: { value, onBlur, onChange }, fieldState: { invalid }, }) => (_jsx(ControlledInput, { placeholder: t('myProfile.placeholders.sms'), onChange: onChange, onBlur: onBlur, value: value !== null && value !== void 0 ? value : '', type: "tel", hasError: invalid, errorMessage: `${t('forms.invalid')} ${t('forms.phone')}`, isDisabled: !isEnabled || !isSmsEnabled })) }) })] }), showButtons && onSave && (_jsx(Box, { w: "75%", alignSelf: "end", children: _jsx(Button, { variant: "secondaryFooter", type: "submit", bg: "neutral.white", fontWeight: "medium", onClick: handleSubmit(onSave), children: t('buttons.save').toUpperCase() }) }))] })] }));
|
|
34
|
+
return (_jsxs(Box, { position: "relative", children: [loading && _jsx(Loading, {}), _jsxs(Stack, { bg: "lightBlue.2", px: "base", py: "4", spacing: "4", children: [_jsxs(Stack, { spacing: "3", children: [_jsxs(Flex, { align: "center", justify: "space-between", children: [_jsxs(Flex, { gap: "base", align: "center", children: [_jsx(Img, { src: SMS, alt: t('myProfile.details.homiSmsAlt') }), _jsx(Text, { fontSize: "sm", textTransform: "uppercase", children: t('myProfile.details.homiSmsTitle') })] }), !isPhoneOnly && (_jsxs(FormControl, { display: "flex", alignItems: "center", w: "fit-content", children: [_jsx(FormLabel, { htmlFor: "homi-sms", mb: "0", fontSize: "sm", children: isEnabled ? 'ON' : 'OFF' }), _jsx(Switch, { id: "homi-sms", size: "lg", isChecked: isEnabled, onChange: (e) => setIsEnabled(e.target.checked) })] }))] }), _jsx(Text, { fontFamily: "secondary", lineHeight: "1.2", children: t('myProfile.details.homiSmsSubtitle') })] }), _jsxs(Flex, { gap: "base", align: "center", justify: "space-between", children: [!isPhoneOnly && (_jsx(Checkbox, { size: "md", isChecked: isSmsEnabled, onChange: (e) => setIsSmsEnabled(e.target.checked), isDisabled: !isEnabled, children: _jsx(Text, { variant: "info", fontWeight: "normal", children: "SMS" }) })), _jsx(Box, { w: isPhoneOnly ? '100%' : '75%', children: _jsx(Controller, { name: "sms", control: control, rules: { validate: handlePhoneValidation }, render: ({ field: { value, onBlur, onChange }, fieldState: { invalid }, }) => (_jsx(ControlledInput, { placeholder: t('myProfile.placeholders.sms'), onChange: onChange, onBlur: onBlur, value: value !== null && value !== void 0 ? value : '', type: "tel", hasError: invalid, errorMessage: `${t('forms.invalid')} ${t('forms.phone')}`, isDisabled: !isPhoneOnly && (!isEnabled || !isSmsEnabled) })) }) })] }), showButtons && onSave && (_jsx(Box, { w: "75%", alignSelf: "end", children: _jsx(Button, { variant: "secondaryFooter", type: "submit", bg: "neutral.white", fontWeight: "medium", onClick: handleSubmit(onSave), children: t('buttons.save').toUpperCase() }) }))] })] }));
|
|
40
35
|
};
|
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
import { InboxMessageI } from '../../interfaces';
|
|
1
|
+
import { InboxMessageI, MessageSenderCardI } from '../../interfaces';
|
|
2
2
|
interface InboxMessageReplyI {
|
|
3
3
|
id: string;
|
|
4
4
|
message: string;
|
|
5
5
|
}
|
|
6
|
-
export interface MessageChatPanelI {
|
|
6
|
+
export interface MessageChatPanelI extends Partial<MessageSenderCardI> {
|
|
7
|
+
icon?: string;
|
|
7
8
|
message?: InboxMessageI;
|
|
8
|
-
onReply: (props: InboxMessageReplyI) => void | Promise<void>;
|
|
9
|
-
onClose: () => void;
|
|
10
9
|
onBack?: () => void;
|
|
10
|
+
onClose: () => void;
|
|
11
|
+
onReply: (props: InboxMessageReplyI) => void | Promise<void>;
|
|
12
|
+
title?: string;
|
|
11
13
|
}
|
|
12
14
|
export {};
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
export interface HomiSmsFormI {
|
|
2
|
-
enabled: boolean;
|
|
3
|
-
smsEnabled: boolean;
|
|
4
2
|
sms?: string;
|
|
5
3
|
}
|
|
6
4
|
export interface HomiSmsI {
|
|
7
|
-
|
|
8
|
-
defaultSmsEnabled?: boolean;
|
|
5
|
+
mode?: 'full' | 'phone-only';
|
|
9
6
|
sms?: string;
|
|
10
7
|
loading?: boolean;
|
|
11
8
|
onChange?: (value: HomiSmsFormI) => void;
|
|
@@ -32,18 +32,31 @@ export default {
|
|
|
32
32
|
showHeader: true,
|
|
33
33
|
},
|
|
34
34
|
decorators: [
|
|
35
|
-
(Story) => (_jsx(RightPanel, { isOpen: true, onClose: action('onClose'), children: _jsx(Story, {}) })),
|
|
35
|
+
(Story) => (_jsx(RightPanel, { isOpen: true, onClose: action('onClose'), blockScrollOnMount: false, children: _jsx(Story, {}) })),
|
|
36
36
|
],
|
|
37
37
|
};
|
|
38
38
|
export const MessagePanelComponent = (args) => {
|
|
39
39
|
const [showMessageChat, setShowMessageChat] = useState(false);
|
|
40
40
|
const [selectedMessage, setSelectedMessage] = useState(undefined);
|
|
41
41
|
const onReply = action('onReply');
|
|
42
|
+
const senderCardData = {
|
|
43
|
+
actionLabel: args.actionLabel,
|
|
44
|
+
address: args.address,
|
|
45
|
+
city: args.city,
|
|
46
|
+
email: args.email,
|
|
47
|
+
firstName: args.firstName,
|
|
48
|
+
lastName: args.lastName,
|
|
49
|
+
phone: args.phone,
|
|
50
|
+
showAvatar: args.showAvatar,
|
|
51
|
+
showHeader: args.showHeader,
|
|
52
|
+
state: args.state,
|
|
53
|
+
zip: args.zip,
|
|
54
|
+
};
|
|
42
55
|
const handleMessageChatToggle = () => setShowMessageChat(!showMessageChat);
|
|
43
56
|
return (_jsxs(Fragment, { children: [_jsx(MessagePanel, Object.assign({}, args, { onClick: (message) => {
|
|
44
57
|
setSelectedMessage(message);
|
|
45
58
|
handleMessageChatToggle();
|
|
46
|
-
}, onAction: action('onAction'), actionLabel: "NOTE" })), _jsx(RightPanel, { isOpen: showMessageChat, onClose: handleMessageChatToggle, children: _jsx(MessageChatPanel, { message: selectedMessage, onReply: (reply) => __awaiter(void 0, void 0, void 0, function* () {
|
|
59
|
+
}, onAction: action('onAction'), actionLabel: "NOTE" })), _jsx(RightPanel, { isOpen: showMessageChat, onClose: handleMessageChatToggle, blockScrollOnMount: false, children: _jsx(MessageChatPanel, Object.assign({}, senderCardData, { actionLabel: "NOTE", icon: args.icon, message: selectedMessage, onAction: action('onActionChat'), onReply: (reply) => __awaiter(void 0, void 0, void 0, function* () {
|
|
47
60
|
onReply(reply);
|
|
48
|
-
}), onClose: action('onCloseChatPanel'), onBack: handleMessageChatToggle }) })] }));
|
|
61
|
+
}), onClose: action('onCloseChatPanel'), onBack: handleMessageChatToggle, title: args.title })) })] }));
|
|
49
62
|
};
|
|
@@ -14,5 +14,5 @@ export const MyProfilePanelComponent = () => {
|
|
|
14
14
|
const handleCloseNewCreditCardPanel = () => setIsNewCreditCardPanelOpen(false);
|
|
15
15
|
const handleOpenNewCreditCardPanel = () => setIsNewCreditCardPanelOpen(true);
|
|
16
16
|
const handleError = () => setHasError(true);
|
|
17
|
-
return (_jsxs(_Fragment, { children: [_jsx(RightPanel, { isOpen: true, onClose: action('onCloseClick'), children: _jsxs(MyProfilePanel, { children: [_jsx(MyProfileHeader, { onClose: action('onCloseClick') }), _jsx(MyProfileBody, { isLoading: false, account: _jsxs(_Fragment, { children: [_jsx(ActiveSubscription, { nextCharge: "2024-12-01", subscriptionPrice: 36, totalStorage: 2, totalUsed: 1, availableStorage: 200, state: 'trial' }), _jsx(Divider, { width: "calc(100% - 26px)", mx: "auto" }), _jsx(MonthlyCharge, { additionalPrice: 36, monthlyCharge: 36, monthDate: "03/01/2023", nextCharge: "01/12/2024", taxPercentage: 8.5, taxValue: 3.06, subtotal: 36.0 }), _jsx(CancelAccount, { label: "Contact Homefile", onClick: action('onCancelAccountClick') })] }), details: _jsxs(_Fragment, { children: [_jsx(UserDetails, { email: "gary.edmunds@gmail.com", firstName: "Gary", lastName: "Edmunds", onSave: action('onSaveClick'), bg: "#4CC35A" }), _jsx(TwoFactorSetting, { email: "gary.edmunds@gmail.com", sms: "2032409108", onChange: action('on2FAChangeClick'), onSave: action('onSaveClick'), defaultValue: "email", twoFactor: 'active' }), _jsx(HomiSms, {
|
|
17
|
+
return (_jsxs(_Fragment, { children: [_jsx(RightPanel, { isOpen: true, onClose: action('onCloseClick'), children: _jsxs(MyProfilePanel, { children: [_jsx(MyProfileHeader, { onClose: action('onCloseClick') }), _jsx(MyProfileBody, { isLoading: false, account: _jsxs(_Fragment, { children: [_jsx(ActiveSubscription, { nextCharge: "2024-12-01", subscriptionPrice: 36, totalStorage: 2, totalUsed: 1, availableStorage: 200, state: 'trial' }), _jsx(Divider, { width: "calc(100% - 26px)", mx: "auto" }), _jsx(MonthlyCharge, { additionalPrice: 36, monthlyCharge: 36, monthDate: "03/01/2023", nextCharge: "01/12/2024", taxPercentage: 8.5, taxValue: 3.06, subtotal: 36.0 }), _jsx(CancelAccount, { label: "Contact Homefile", onClick: action('onCancelAccountClick') })] }), details: _jsxs(_Fragment, { children: [_jsx(UserDetails, { email: "gary.edmunds@gmail.com", firstName: "Gary", lastName: "Edmunds", onSave: action('onSaveClick'), bg: "#4CC35A" }), _jsx(TwoFactorSetting, { email: "gary.edmunds@gmail.com", sms: "2032409108", onChange: action('on2FAChangeClick'), onSave: action('onSaveClick'), defaultValue: "email", twoFactor: 'active' }), _jsx(HomiSms, { sms: "2032409108", onChange: action('onHomiSmsChange'), onSave: action('onHomiSmsSave') })] }), payment: _jsxs(Box, { bg: "lightBlue.2", h: "inherit", children: [_jsx(CreditCardContainer, { cardNumber: "1234 5678 9012 3456", brand: "visa", onAddCard: action('onAddCard'), onDeleteCard: handleOpenNewCreditCardPanel, onSubmit: (data) => action('onDeleteCard')(data), cardHolder: "Gary Edmunds", cvv: "123", expirationMonth: "12", expirationYear: "2024" }), _jsx(PaymentReceipts, { receipts: receiptsMock, menuItems: menuMock })] }), rolePermissions: _jsx(RolePermissionsTab, { selected: featuresSelectedMock, onSelect: action('onSelect') }) })] }) }), _jsx(RightPanel, { isOpen: isNewCreditCardPanelOpen, onClose: handleCloseNewCreditCardPanel, children: _jsxs(MyProfilePanel, { children: [_jsx(MyProfileHeader, { onClose: handleCloseNewCreditCardPanel }), _jsxs(DrawerBody, { p: "0", children: [_jsx(NewCreditCardHeader, { onClick: handleCloseNewCreditCardPanel }), hasError && _jsx(CreditCardError, {}), _jsx(NewCreditCard, { hasError: hasError, onSubmit: handleError })] })] }) })] }));
|
|
18
18
|
};
|
|
@@ -5,14 +5,12 @@ export default _default;
|
|
|
5
5
|
export declare const HomiSmsEnabledComponent: {
|
|
6
6
|
(args: HomiSmsI): import("react/jsx-runtime").JSX.Element;
|
|
7
7
|
args: {
|
|
8
|
-
defaultEnabled: boolean;
|
|
9
8
|
sms: string;
|
|
10
9
|
};
|
|
11
10
|
};
|
|
12
11
|
export declare const HomiSmsDisabledComponent: {
|
|
13
12
|
(args: HomiSmsI): import("react/jsx-runtime").JSX.Element;
|
|
14
13
|
args: {
|
|
15
|
-
defaultEnabled: boolean;
|
|
16
14
|
sms: string;
|
|
17
15
|
};
|
|
18
16
|
};
|
|
@@ -12,11 +12,9 @@ export default {
|
|
|
12
12
|
};
|
|
13
13
|
export const HomiSmsEnabledComponent = (args) => (_jsx(Box, { w: ['full', 'md'], p: "base", children: _jsx(HomiSms, Object.assign({}, args)) }));
|
|
14
14
|
HomiSmsEnabledComponent.args = {
|
|
15
|
-
defaultEnabled: true,
|
|
16
15
|
sms: '512.806.5011',
|
|
17
16
|
};
|
|
18
17
|
export const HomiSmsDisabledComponent = (args) => (_jsx(HomiSmsEnabledComponent, Object.assign({}, args)));
|
|
19
18
|
HomiSmsDisabledComponent.args = {
|
|
20
|
-
defaultEnabled: false,
|
|
21
19
|
sms: '512.806.5011',
|
|
22
20
|
};
|