@paro.io/expert-shared-components 1.7.1 → 1.7.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/lib/components/ClientReferencesSection/DeleteButton.js +11 -11
  2. package/lib/components/ClientReferencesSection/ParoError.js +10 -10
  3. package/lib/components/ClientReferencesSection/TagsSection.js +2 -2
  4. package/lib/components/ClientReferencesSection/styles/BrandedTypography.js +2 -2
  5. package/lib/components/ClientReferencesSection/styles/Buttons.js +15 -15
  6. package/lib/components/ClientReferencesSection/styles/Name.js +5 -5
  7. package/lib/components/ClientReferencesSection/styles/NullContentConditionalColor.js +4 -4
  8. package/lib/components/ClientReferencesSection/styles/SectionBody.js +11 -11
  9. package/lib/components/ClientReferencesSection/styles/SectionTitle.js +6 -6
  10. package/lib/components/ClientReferencesSection/styles/Tags.js +2 -2
  11. package/lib/components/DocumentCenter/DocumentCenter.js +4 -3
  12. package/lib/components/DocumentCenter/DocumentTable.d.ts +15 -15
  13. package/lib/components/DocumentCenter/DocumentTable.js +350 -350
  14. package/lib/components/DocumentCenter/UploadFilesButton.d.ts +6 -6
  15. package/lib/components/DocumentCenter/UploadFilesButton.js +29 -29
  16. package/lib/components/ExpertProfileHeader/ActionButtonSection.d.ts +3 -1
  17. package/lib/components/ExpertProfileHeader/ActionButtonSection.js +13 -7
  18. package/lib/components/ExpertProfileHeader/ExpertProfileHeader.d.ts +3 -1
  19. package/lib/components/ExpertProfileHeader/ExpertProfileHeader.js +2 -2
  20. package/lib/components/ExpertProfileHeader/NetworkSection.js +2 -2
  21. package/lib/components/ExpertProfileHeader/ProfileSection.js +7 -7
  22. package/lib/components/HeaderNavBar/index.d.ts +1 -1
  23. package/lib/components/HeaderNavBar/index.js +6 -1
  24. package/lib/components/OrganizationChart/OrganizationChart.js +7 -7
  25. package/lib/components/Reviews/Pagination.js +6 -6
  26. package/lib/components/ReviewsTab/RatingHeader.js +6 -6
  27. package/lib/components/ReviewsTab/expert-shared-components.code-workspace +20 -20
  28. package/lib/components/ReviewsTab/reviewRequestModal.js +5 -5
  29. package/lib/components/ServiceLinesTemplate/index.d.ts +21 -0
  30. package/lib/components/ServiceLinesTemplate/index.js +231 -0
  31. package/lib/components/shared/Error.d.ts +6 -6
  32. package/lib/components/shared/Error.js +40 -40
  33. package/lib/components/shared/Image.js +13 -13
  34. package/lib/components/shared/ProfileTextField.d.ts +18 -18
  35. package/lib/components/shared/ProfileTextField.js +16 -16
  36. package/lib/components/shared/StyledActionButtons.d.ts +7 -7
  37. package/lib/components/shared/StyledActionButtons.js +15 -15
  38. package/lib/components/shared/ToastNotification.d.ts +10 -10
  39. package/lib/components/shared/ToastNotification.js +63 -63
  40. package/lib/components/shared/utils.d.ts +8 -2
  41. package/lib/components/shared/utils.js +73 -1
  42. package/lib/index.d.ts +2 -0
  43. package/lib/index.js +5 -1
  44. package/package.json +59 -59
@@ -1,40 +1,40 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const react_1 = __importDefault(require("react"));
7
- const core_1 = require("@material-ui/core");
8
- const styled_components_1 = __importDefault(require("styled-components"));
9
- const colors_1 = __importDefault(require("../shared/constants/colors"));
10
- const CopyToClipboardAlert_1 = __importDefault(require("./CopyToClipboardAlert"));
11
- const ErrorBox = (0, styled_components_1.default)(core_1.Box) `
12
- width: 100%;
13
- padding-bottom: 100;
14
- `;
15
- const ParoTitle = (0, styled_components_1.default)(core_1.Box) `
16
- color: ${colors_1.default.paroBlack};
17
- padding: 0px 0px 18px 0px;
18
- `;
19
- const ParoSubtitle = styled_components_1.default.div `
20
- color: ${colors_1.default.paroBlack};
21
- margin-bottom: 24px;
22
- font-size: 1rem;
23
- `;
24
- const reloadWindow = () => {
25
- window.location.reload();
26
- };
27
- const Error = ({ handleClose }) => {
28
- const handleCancel = handleClose ? handleClose : reloadWindow;
29
- const handleCancelLanguage = handleClose ? 'Close' : 'Retry';
30
- return (react_1.default.createElement(ErrorBox, null,
31
- react_1.default.createElement(core_1.Box, { display: 'flex', alignContent: 'center', alignItems: 'center', justifyContent: 'center', flexDirection: 'column', padding: '100px 0px 36px 5px;' },
32
- react_1.default.createElement(core_1.Typography, { variant: 'h6', gutterBottom: true },
33
- react_1.default.createElement(ParoTitle, null, "Oops! We had a misstep.")),
34
- react_1.default.createElement(core_1.Typography, { component: 'span', gutterBottom: true },
35
- react_1.default.createElement(ParoSubtitle, null, "Contact support if the issue persists")),
36
- react_1.default.createElement(core_1.DialogActions, null,
37
- react_1.default.createElement(core_1.Button, { variant: 'outlined', onClick: handleCancel, color: 'primary' }, handleCancelLanguage),
38
- react_1.default.createElement(CopyToClipboardAlert_1.default, { alertMessage: 'Email address copied to clipboard', button: core_1.Button, buttonContent: 'Copy support email', copyContent: 'people@paro.io', variant: 'contained' })))));
39
- };
40
- exports.default = Error;
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const react_1 = __importDefault(require("react"));
7
+ const core_1 = require("@material-ui/core");
8
+ const styled_components_1 = __importDefault(require("styled-components"));
9
+ const colors_1 = __importDefault(require("../shared/constants/colors"));
10
+ const CopyToClipboardAlert_1 = __importDefault(require("./CopyToClipboardAlert"));
11
+ const ErrorBox = (0, styled_components_1.default)(core_1.Box) `
12
+ width: 100%;
13
+ padding-bottom: 100;
14
+ `;
15
+ const ParoTitle = (0, styled_components_1.default)(core_1.Box) `
16
+ color: ${colors_1.default.paroBlack};
17
+ padding: 0px 0px 18px 0px;
18
+ `;
19
+ const ParoSubtitle = styled_components_1.default.div `
20
+ color: ${colors_1.default.paroBlack};
21
+ margin-bottom: 24px;
22
+ font-size: 1rem;
23
+ `;
24
+ const reloadWindow = () => {
25
+ window.location.reload();
26
+ };
27
+ const Error = ({ handleClose }) => {
28
+ const handleCancel = handleClose ? handleClose : reloadWindow;
29
+ const handleCancelLanguage = handleClose ? 'Close' : 'Retry';
30
+ return (react_1.default.createElement(ErrorBox, null,
31
+ react_1.default.createElement(core_1.Box, { display: 'flex', alignContent: 'center', alignItems: 'center', justifyContent: 'center', flexDirection: 'column', padding: '100px 0px 36px 5px;' },
32
+ react_1.default.createElement(core_1.Typography, { variant: 'h6', gutterBottom: true },
33
+ react_1.default.createElement(ParoTitle, null, "Oops! We had a misstep.")),
34
+ react_1.default.createElement(core_1.Typography, { component: 'span', gutterBottom: true },
35
+ react_1.default.createElement(ParoSubtitle, null, "Contact support if the issue persists")),
36
+ react_1.default.createElement(core_1.DialogActions, null,
37
+ react_1.default.createElement(core_1.Button, { variant: 'outlined', onClick: handleCancel, color: 'primary' }, handleCancelLanguage),
38
+ react_1.default.createElement(CopyToClipboardAlert_1.default, { alertMessage: 'Email address copied to clipboard', button: core_1.Button, buttonContent: 'Copy support email', copyContent: 'people@paro.io', variant: 'contained' })))));
39
+ };
40
+ exports.default = Error;
@@ -31,20 +31,20 @@ const react_1 = __importStar(require("react"));
31
31
  const core_1 = require("@material-ui/core");
32
32
  const styled_components_1 = __importDefault(require("styled-components"));
33
33
  const cdn_1 = require("./constants/cdn");
34
- const ProfilePhotoPreview = styled_components_1.default.img `
35
- height: 86px;
36
- width: 86px;
37
- border: 4px solid #F8FAFC;
38
- border-radius: 10px;
39
- object-fit: cover;
40
- object-position: top;
34
+ const ProfilePhotoPreview = styled_components_1.default.img `
35
+ height: 86px;
36
+ width: 86px;
37
+ border: 4px solid #F8FAFC;
38
+ border-radius: 10px;
39
+ object-fit: cover;
40
+ object-position: top;
41
41
  `;
42
- const PhotoChangeButton = (0, styled_components_1.default)(core_1.Typography) `
43
- text-decoration: underline;
44
- cursor: pointer;
45
- :active {
46
- text-decoration: none !important;
47
- }
42
+ const PhotoChangeButton = (0, styled_components_1.default)(core_1.Typography) `
43
+ text-decoration: underline;
44
+ cursor: pointer;
45
+ :active {
46
+ text-decoration: none !important;
47
+ }
48
48
  `;
49
49
  exports.defaultAvatar = cdn_1.CDN_URL + 'defaultAvatar.png';
50
50
  const Image = ({ imageUrl, getUserDocument, uploadUserPhotoMutation, loadingNewImage, imageUpdateError, legacyFreelancerId, }) => {
@@ -1,18 +1,18 @@
1
- import { FieldError } from 'react-hook-form/dist/types/form';
2
- type SectionContents = {
3
- defaultValue?: string | number;
4
- error?: boolean;
5
- helperText: string | undefined | (FieldError | undefined)[];
6
- inputRef?: ((instance: any) => void) | null | undefined;
7
- label?: string;
8
- multiline?: boolean;
9
- name?: string;
10
- placeholder?: string;
11
- props?: unknown;
12
- size?: 'small' | 'medium' | undefined;
13
- onChange?: ((value: any) => void) | undefined;
14
- width?: boolean;
15
- InputProps?: any;
16
- };
17
- declare const ProfileTextField: ({ defaultValue, error, helperText, inputRef, label, multiline, name, placeholder, props, size, width, onChange, InputProps }: SectionContents) => JSX.Element;
18
- export default ProfileTextField;
1
+ import { FieldError } from 'react-hook-form/dist/types/form';
2
+ type SectionContents = {
3
+ defaultValue?: string | number;
4
+ error?: boolean;
5
+ helperText: string | undefined | (FieldError | undefined)[];
6
+ inputRef?: ((instance: any) => void) | null | undefined;
7
+ label?: string;
8
+ multiline?: boolean;
9
+ name?: string;
10
+ placeholder?: string;
11
+ props?: unknown;
12
+ size?: 'small' | 'medium' | undefined;
13
+ onChange?: ((value: any) => void) | undefined;
14
+ width?: boolean;
15
+ InputProps?: any;
16
+ };
17
+ declare const ProfileTextField: ({ defaultValue, error, helperText, inputRef, label, multiline, name, placeholder, props, size, width, onChange, InputProps }: SectionContents) => JSX.Element;
18
+ export default ProfileTextField;
@@ -1,16 +1,16 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const react_1 = __importDefault(require("react"));
7
- const TextField_1 = __importDefault(require("@material-ui/core/TextField"));
8
- const ProfileTextField = ({ defaultValue, error, helperText, inputRef, label, multiline = false, name, placeholder, props, size, width = false, onChange, InputProps }) => {
9
- return (onChange ? react_1.default.createElement(TextField_1.default, Object.assign({ InputProps: InputProps, "x-id": 'TextField' }, props, { defaultValue: defaultValue, error: error, fullWidth: true, helperText: helperText, InputLabelProps: {
10
- shrink: true
11
- }, inputRef: inputRef, label: label, margin: 'normal', multiline: multiline, name: name, placeholder: placeholder, size: size, style: Object.assign({ marginTop: '8px' }, (width && { width: '100%' })), variant: 'outlined', onChange: onChange, classes: { root: 'inputCurrency' } })) :
12
- react_1.default.createElement(TextField_1.default, Object.assign({ InputProps: InputProps, "x-id": 'TextField' }, props, { defaultValue: defaultValue, error: error, fullWidth: true, helperText: helperText, InputLabelProps: {
13
- shrink: true
14
- }, inputRef: inputRef, label: label, margin: 'normal', multiline: multiline, name: name, placeholder: placeholder, size: size, style: Object.assign({ marginTop: '8px' }, (width && { width: '100%' })), variant: 'outlined' })));
15
- };
16
- exports.default = ProfileTextField;
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const react_1 = __importDefault(require("react"));
7
+ const TextField_1 = __importDefault(require("@material-ui/core/TextField"));
8
+ const ProfileTextField = ({ defaultValue, error, helperText, inputRef, label, multiline = false, name, placeholder, props, size, width = false, onChange, InputProps }) => {
9
+ return (onChange ? react_1.default.createElement(TextField_1.default, Object.assign({ InputProps: InputProps, "x-id": 'TextField' }, props, { defaultValue: defaultValue, error: error, fullWidth: true, helperText: helperText, InputLabelProps: {
10
+ shrink: true
11
+ }, inputRef: inputRef, label: label, margin: 'normal', multiline: multiline, name: name, placeholder: placeholder, size: size, style: Object.assign({ marginTop: '8px' }, (width && { width: '100%' })), variant: 'outlined', onChange: onChange, classes: { root: 'inputCurrency' } })) :
12
+ react_1.default.createElement(TextField_1.default, Object.assign({ InputProps: InputProps, "x-id": 'TextField' }, props, { defaultValue: defaultValue, error: error, fullWidth: true, helperText: helperText, InputLabelProps: {
13
+ shrink: true
14
+ }, inputRef: inputRef, label: label, margin: 'normal', multiline: multiline, name: name, placeholder: placeholder, size: size, style: Object.assign({ marginTop: '8px' }, (width && { width: '100%' })), variant: 'outlined' })));
15
+ };
16
+ exports.default = ProfileTextField;
@@ -1,7 +1,7 @@
1
- declare const StyledActionButtons: ({ closeOnClick, isDisabled, isLoading, handleSubmit }: {
2
- closeOnClick: () => void;
3
- isDisabled: boolean;
4
- isLoading: boolean;
5
- handleSubmit?: () => void;
6
- }) => JSX.Element;
7
- export default StyledActionButtons;
1
+ declare const StyledActionButtons: ({ closeOnClick, isDisabled, isLoading, handleSubmit }: {
2
+ closeOnClick: () => void;
3
+ isDisabled: boolean;
4
+ isLoading: boolean;
5
+ handleSubmit?: () => void;
6
+ }) => JSX.Element;
7
+ export default StyledActionButtons;
@@ -1,15 +1,15 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const react_1 = __importDefault(require("react"));
7
- const core_1 = require("@material-ui/core");
8
- const Button_1 = __importDefault(require("@material-ui/core/Button"));
9
- const Loader_1 = __importDefault(require("./Loader"));
10
- const StyledActionButtons = ({ closeOnClick, isDisabled, isLoading, handleSubmit }) => {
11
- return (react_1.default.createElement(core_1.DialogActions, null,
12
- react_1.default.createElement(Button_1.default, { variant: 'outlined', onClick: closeOnClick, color: 'primary' }, "Close"),
13
- react_1.default.createElement(Button_1.default, { color: 'default', disabled: isDisabled, key: String(isDisabled), onClick: handleSubmit, variant: 'contained' }, isLoading ? react_1.default.createElement(Loader_1.default, { key: String(isLoading) }) : 'Save')));
14
- };
15
- exports.default = StyledActionButtons;
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const react_1 = __importDefault(require("react"));
7
+ const core_1 = require("@material-ui/core");
8
+ const Button_1 = __importDefault(require("@material-ui/core/Button"));
9
+ const Loader_1 = __importDefault(require("./Loader"));
10
+ const StyledActionButtons = ({ closeOnClick, isDisabled, isLoading, handleSubmit }) => {
11
+ return (react_1.default.createElement(core_1.DialogActions, null,
12
+ react_1.default.createElement(Button_1.default, { variant: 'outlined', onClick: closeOnClick, color: 'primary' }, "Close"),
13
+ react_1.default.createElement(Button_1.default, { color: 'default', disabled: isDisabled, key: String(isDisabled), onClick: handleSubmit, variant: 'contained' }, isLoading ? react_1.default.createElement(Loader_1.default, { key: String(isLoading) }) : 'Save')));
14
+ };
15
+ exports.default = StyledActionButtons;
@@ -1,10 +1,10 @@
1
- import React from 'react';
2
- interface ToastModalProps {
3
- color: 'success' | 'info' | 'warning' | 'danger';
4
- icon: string;
5
- message: string;
6
- duration?: number;
7
- position?: 'top-right' | 'bottom-right' | 'top-left' | 'bottom-left';
8
- }
9
- declare const ToastModal: React.FC<ToastModalProps>;
10
- export default ToastModal;
1
+ import React from 'react';
2
+ interface ToastModalProps {
3
+ color: 'success' | 'info' | 'warning' | 'danger';
4
+ icon: string;
5
+ message: string;
6
+ duration?: number;
7
+ position?: 'top-right' | 'bottom-right' | 'top-left' | 'bottom-left';
8
+ }
9
+ declare const ToastModal: React.FC<ToastModalProps>;
10
+ export default ToastModal;
@@ -1,63 +1,63 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
- Object.defineProperty(exports, "__esModule", { value: true });
26
- const react_1 = __importStar(require("react"));
27
- const core_1 = require("@material-ui/core");
28
- const base_ui_1 = require("@paro.io/base-ui");
29
- const ToastModal = ({ color, icon, message, duration = 6000, // Default duration is 6 seconds
30
- position = 'bottom-right', }) => {
31
- const [open, setOpen] = (0, react_1.useState)(false);
32
- // Automatically open the modal on mount
33
- (0, react_1.useEffect)(() => {
34
- setOpen(true);
35
- // Automatically close the modal after the specified duration
36
- const timer = setTimeout(() => {
37
- setOpen(false);
38
- }, duration);
39
- // Cleanup the timeout if the component unmounts or if the duration changes
40
- return () => clearTimeout(timer);
41
- }, [duration]);
42
- console.log("triggered");
43
- return (react_1.default.createElement(core_1.Dialog, { open: open, onClose: () => setOpen(false), "aria-labelledby": "toast-modal-title", maxWidth: "xs", fullWidth: true, PaperProps: {
44
- style: {
45
- backgroundColor: '#323232', // Dark background to resemble toast style
46
- color: '#fff', // White text
47
- borderRadius: '8px',
48
- display: 'flex',
49
- justifyContent: 'center',
50
- alignItems: 'center',
51
- zIndex: 9999, // Ensure it’s on top of the MUI Dialog
52
- position: 'absolute', // Absolute positioning to control location
53
- top: position.includes('top') ? '10%' : 'auto',
54
- bottom: position.includes('bottom') ? '10%' : 'auto',
55
- right: position.includes('right') ? '10%' : 'auto',
56
- left: position.includes('left') ? '10%' : 'auto',
57
- },
58
- } },
59
- react_1.default.createElement(core_1.DialogContent, { style: { textAlign: 'center' } },
60
- react_1.default.createElement(base_ui_1.Alert, { color: color, icon: icon, label: message, className: color === 'warning' ? 'bg-warning' : 'bg-success' }),
61
- ",")));
62
- };
63
- exports.default = ToastModal;
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ Object.defineProperty(exports, "__esModule", { value: true });
26
+ const react_1 = __importStar(require("react"));
27
+ const core_1 = require("@material-ui/core");
28
+ const base_ui_1 = require("@paro.io/base-ui");
29
+ const ToastModal = ({ color, icon, message, duration = 6000, // Default duration is 6 seconds
30
+ position = 'bottom-right', }) => {
31
+ const [open, setOpen] = (0, react_1.useState)(false);
32
+ // Automatically open the modal on mount
33
+ (0, react_1.useEffect)(() => {
34
+ setOpen(true);
35
+ // Automatically close the modal after the specified duration
36
+ const timer = setTimeout(() => {
37
+ setOpen(false);
38
+ }, duration);
39
+ // Cleanup the timeout if the component unmounts or if the duration changes
40
+ return () => clearTimeout(timer);
41
+ }, [duration]);
42
+ console.log("triggered");
43
+ return (react_1.default.createElement(core_1.Dialog, { open: open, onClose: () => setOpen(false), "aria-labelledby": "toast-modal-title", maxWidth: "xs", fullWidth: true, PaperProps: {
44
+ style: {
45
+ backgroundColor: '#323232', // Dark background to resemble toast style
46
+ color: '#fff', // White text
47
+ borderRadius: '8px',
48
+ display: 'flex',
49
+ justifyContent: 'center',
50
+ alignItems: 'center',
51
+ zIndex: 9999, // Ensure it’s on top of the MUI Dialog
52
+ position: 'absolute', // Absolute positioning to control location
53
+ top: position.includes('top') ? '10%' : 'auto',
54
+ bottom: position.includes('bottom') ? '10%' : 'auto',
55
+ right: position.includes('right') ? '10%' : 'auto',
56
+ left: position.includes('left') ? '10%' : 'auto',
57
+ },
58
+ } },
59
+ react_1.default.createElement(core_1.DialogContent, { style: { textAlign: 'center' } },
60
+ react_1.default.createElement(base_ui_1.Alert, { color: color, icon: icon, label: message, className: color === 'warning' ? 'bg-warning' : 'bg-success' }),
61
+ ",")));
62
+ };
63
+ exports.default = ToastModal;
@@ -1,4 +1,3 @@
1
- import React from 'react';
2
1
  export declare const isOnClickEvent: (potentialEvent: any) => boolean;
3
2
  export declare const formatTenure: (timestamp: string) => string;
4
3
  export declare const isOlderThan30Days: (timestamp: string | number) => boolean;
@@ -12,7 +11,7 @@ export declare const handleDownloadPdf: ({ fileData, downloadFilename, streamDat
12
11
  downloadFilename: string;
13
12
  streamData: boolean;
14
13
  }) => void;
15
- export declare const CustomPaper: React.ComponentType<Pick<import("@material-ui/core").PaperProps, "variant" | "id" | "square" | "color" | "content" | "translate" | "hidden" | "slot" | "style" | "title" | "dir" | "rel" | "accessKey" | "draggable" | "lang" | "prefix" | "role" | "children" | "contentEditable" | "enterKeyHint" | "inputMode" | "nonce" | "tabIndex" | "ref" | "suppressHydrationWarning" | "elevation" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "autoCapitalize" | "autoFocus" | "contextMenu" | "spellCheck" | "radioGroup" | "about" | "datatype" | "inlist" | "property" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "is" | "component" | "innerRef"> & import("@material-ui/core").StyledComponentProps<"root"> & {
14
+ export declare const CustomPaper: import("react").ComponentType<Pick<import("@material-ui/core").PaperProps, "variant" | "id" | "square" | "color" | "content" | "translate" | "hidden" | "slot" | "style" | "title" | "dir" | "rel" | "accessKey" | "draggable" | "lang" | "prefix" | "role" | "children" | "contentEditable" | "enterKeyHint" | "inputMode" | "nonce" | "tabIndex" | "ref" | "suppressHydrationWarning" | "elevation" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "autoCapitalize" | "autoFocus" | "contextMenu" | "spellCheck" | "radioGroup" | "about" | "datatype" | "inlist" | "property" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "is" | "component" | "innerRef"> & import("@material-ui/core").StyledComponentProps<"root"> & {
16
15
  className?: string;
17
16
  }>;
18
17
  export type Order = 'asc' | 'desc';
@@ -35,3 +34,10 @@ export declare const DOCUMENT_TYPE_CONSTANTS: {
35
34
  "Tax and Compliance Documents": string;
36
35
  "Project Specific Documents": string;
37
36
  };
37
+ export declare const titleMappings: Record<string, string>;
38
+ export declare const features: string[];
39
+ export declare const serviceDescriptions: Record<string, string>;
40
+ export declare const selectedServicesReducer: (selectedServices: any, action: any) => any;
41
+ export declare const sharedUtils: {
42
+ selectedServicesReducer: (selectedServices: any, action: any) => any;
43
+ };
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DOCUMENT_TYPE_CONSTANTS = exports.validateFileUpload = exports.showToast = exports.MAX_FILE_SIZE = exports.ACCEPTED_FILE_TYPES = exports.formatDate = exports.CustomPaper = exports.handleDownloadPdf = exports.getFileMimeType = exports.stateAbbreviationMap = exports.getPreviousMonthStartDate = exports.isOlderThan30Days = exports.formatTenure = exports.isOnClickEvent = void 0;
3
+ exports.sharedUtils = exports.selectedServicesReducer = exports.serviceDescriptions = exports.features = exports.titleMappings = exports.DOCUMENT_TYPE_CONSTANTS = exports.validateFileUpload = exports.showToast = exports.MAX_FILE_SIZE = exports.ACCEPTED_FILE_TYPES = exports.formatDate = exports.CustomPaper = exports.handleDownloadPdf = exports.getFileMimeType = exports.stateAbbreviationMap = exports.getPreviousMonthStartDate = exports.isOlderThan30Days = exports.formatTenure = exports.isOnClickEvent = void 0;
4
4
  exports.getComparator = getComparator;
5
5
  exports.stableSort = stableSort;
6
6
  exports.compareItems = compareItems;
@@ -272,3 +272,75 @@ exports.DOCUMENT_TYPE_CONSTANTS = {
272
272
  "Tax and Compliance Documents": "TAX_AND_COMPLIANCE_DOCUMENTS",
273
273
  "Project Specific Documents": "PROJECT_SPECIFIC_DOCUMENTS"
274
274
  };
275
+ exports.titleMappings = {
276
+ "CFO": "Chief Financial Officer (CFO)",
277
+ "Full Charge Bookkeeping": "Full Charge Bookkeeping",
278
+ "CPA/Accounting Advisory": "CPA/Accounting Advisory",
279
+ "FP&A": "Financial Planning & Analysis (FP&A)",
280
+ "Tax Preparation": "Tax Preparation Expert"
281
+ };
282
+ exports.features = [
283
+ "Increase your visibility to clients searching for diverse expertise",
284
+ "Position yourself as a versatile professional",
285
+ "Stand out from competitors by showcasing the full range of your skills",
286
+ "Attract more opportunities to grow your business",
287
+ ];
288
+ exports.serviceDescriptions = {
289
+ "Full Charge Bookkeeping": "Work directly with companies to set up, clean, maintain, and/or reconcile their books and records. This service requires in-depth expertise and insights into their financials. Example Deliverables: Chart of Accounts, Journal Entry Posting, etc.",
290
+ "Chief Financial Officer (CFO)": "A senior executive expected to offer financial guidance and strategy for for-profit and/or nonprofit organizations. From leading the entire finance function to going even deeper internally to help owners keep and strengthen their financial footing. 10+ years of professional corporate finance experience, MBA, CFA, and/or CPA's are common in this role.",
291
+ "Tax Preparation Expert": "Prepare and file taxes for companies and individuals, as well as helping companies report the complexities of managing taxes through advisory-style projects. Example: Small/mid-sized professional tax preparation, FTIN, Tax software(s). Secure file sharing software(s). CPA and/or EA common in this service line.",
292
+ "Financial Planning & Analysis (FP&A)": "Help businesses make strategic financial decisions by providing insights through budgeting, forecasting, and financial analysis. This service includes creating financial models, identifying key performance trends, and offering actionable recommendations to optimize revenue and control costs.",
293
+ "CPA/Accounting Advisory": "Provide expert accounting advice and support to help businesses make informed financial decisions. This service includes guiding clients on best practices for financial reporting, compliance, budgeting, and overall financial health."
294
+ };
295
+ const selectedServicesReducer = (selectedServices, action) => {
296
+ switch (action.type) {
297
+ case "populate":
298
+ const selectedServicesUpdated = [];
299
+ const currentService = action.currentService;
300
+ const currentRate = action.currentRate;
301
+ const expertRates = action.expertRates || [];
302
+ if (currentService) {
303
+ const serviceTitle = exports.titleMappings[currentService] || currentService;
304
+ selectedServicesUpdated.push({
305
+ service: serviceTitle,
306
+ rate: currentRate,
307
+ currentService: true,
308
+ });
309
+ }
310
+ if (expertRates.length > 0) {
311
+ expertRates.forEach((rate) => {
312
+ const serviceTitle = exports.titleMappings[rate.serviceLine] || rate.serviceLine;
313
+ // Check if service already exists in the array
314
+ const existingIndex = selectedServicesUpdated.findIndex(s => s.service === serviceTitle);
315
+ if (existingIndex === -1) {
316
+ selectedServicesUpdated.push({
317
+ service: serviceTitle,
318
+ rate: rate.rate
319
+ });
320
+ }
321
+ else {
322
+ selectedServicesUpdated[existingIndex] = Object.assign(Object.assign({}, selectedServicesUpdated[existingIndex]), { rate: rate.rate });
323
+ }
324
+ });
325
+ }
326
+ return selectedServicesUpdated;
327
+ case "price-change":
328
+ const serviceIndex = selectedServices.findIndex((service) => service.service === action.serviceTitle);
329
+ if (serviceIndex === -1) {
330
+ return [...selectedServices];
331
+ }
332
+ const updatedServices = [...selectedServices];
333
+ updatedServices[serviceIndex] = Object.assign(Object.assign({}, updatedServices[serviceIndex]), { rate: action.newPrice });
334
+ return updatedServices;
335
+ case "update":
336
+ const existingServiceIndex = selectedServices.findIndex((svc) => svc.service === action.service);
337
+ if (existingServiceIndex !== -1) {
338
+ return selectedServices.filter((svc) => svc.service !== action.service);
339
+ }
340
+ return [...selectedServices, { service: action.service, rate: 0 }];
341
+ default:
342
+ return selectedServices;
343
+ }
344
+ };
345
+ exports.selectedServicesReducer = selectedServicesReducer;
346
+ exports.sharedUtils = { selectedServicesReducer: exports.selectedServicesReducer };
package/lib/index.d.ts CHANGED
@@ -7,3 +7,5 @@ export { ExpertProfileHeader } from './components/ExpertProfileHeader';
7
7
  export { ProfileCompletedPercentage } from './components/ProfileCompletedPercentange';
8
8
  export { DocumentCenter } from './components/DocumentCenter';
9
9
  export { HeaderNavBar } from './components/HeaderNavBar';
10
+ export { ServiceLinesTemplate } from './components/ServiceLinesTemplate';
11
+ export { sharedUtils } from './components/shared/utils';
package/lib/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.HeaderNavBar = exports.DocumentCenter = exports.ProfileCompletedPercentage = exports.ExpertProfileHeader = exports.OrganizationChart = exports.FirmEmployeeSection = exports.ClientReferenceSection = exports.Reviews = exports.ReviewsTab = void 0;
3
+ exports.sharedUtils = exports.ServiceLinesTemplate = exports.HeaderNavBar = exports.DocumentCenter = exports.ProfileCompletedPercentage = exports.ExpertProfileHeader = exports.OrganizationChart = exports.FirmEmployeeSection = exports.ClientReferenceSection = exports.Reviews = exports.ReviewsTab = void 0;
4
4
  var ReviewsTab_1 = require("./components/ReviewsTab");
5
5
  Object.defineProperty(exports, "ReviewsTab", { enumerable: true, get: function () { return ReviewsTab_1.ReviewsTab; } });
6
6
  var Reviews_1 = require("./components/Reviews");
@@ -19,3 +19,7 @@ var DocumentCenter_1 = require("./components/DocumentCenter");
19
19
  Object.defineProperty(exports, "DocumentCenter", { enumerable: true, get: function () { return DocumentCenter_1.DocumentCenter; } });
20
20
  var HeaderNavBar_1 = require("./components/HeaderNavBar");
21
21
  Object.defineProperty(exports, "HeaderNavBar", { enumerable: true, get: function () { return HeaderNavBar_1.HeaderNavBar; } });
22
+ var ServiceLinesTemplate_1 = require("./components/ServiceLinesTemplate");
23
+ Object.defineProperty(exports, "ServiceLinesTemplate", { enumerable: true, get: function () { return ServiceLinesTemplate_1.ServiceLinesTemplate; } });
24
+ var utils_1 = require("./components/shared/utils");
25
+ Object.defineProperty(exports, "sharedUtils", { enumerable: true, get: function () { return utils_1.sharedUtils; } });