@paro.io/expert-shared-components 1.9.6 → 1.9.8

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 (86) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +2 -2
  3. package/lib/components/ClientReferencesSection/DeleteButton.js +11 -11
  4. package/lib/components/ClientReferencesSection/ParoError.js +10 -10
  5. package/lib/components/ClientReferencesSection/TagsSection.js +2 -2
  6. package/lib/components/ClientReferencesSection/styles/BrandedTypography.js +2 -2
  7. package/lib/components/ClientReferencesSection/styles/Buttons.js +15 -15
  8. package/lib/components/ClientReferencesSection/styles/Name.js +5 -5
  9. package/lib/components/ClientReferencesSection/styles/NullContentConditionalColor.js +4 -4
  10. package/lib/components/ClientReferencesSection/styles/SectionBody.js +11 -11
  11. package/lib/components/ClientReferencesSection/styles/SectionTitle.js +6 -6
  12. package/lib/components/ClientReferencesSection/styles/Tags.js +2 -2
  13. package/lib/components/DocumentCenter/DocumentTable.d.ts +15 -15
  14. package/lib/components/DocumentCenter/DocumentTable.js +350 -350
  15. package/lib/components/DocumentCenter/UploadFilesButton.d.ts +6 -6
  16. package/lib/components/DocumentCenter/UploadFilesButton.js +29 -29
  17. package/lib/components/EarningsTracker/ActiveProjectCard.d.ts +52 -0
  18. package/lib/components/EarningsTracker/ActiveProjectCard.js +161 -0
  19. package/lib/components/EarningsTracker/CenterCardUI.d.ts +13 -0
  20. package/lib/components/EarningsTracker/CenterCardUI.js +134 -0
  21. package/lib/components/EarningsTracker/EarningsTracker.d.ts +52 -0
  22. package/lib/components/EarningsTracker/EarningsTracker.js +508 -0
  23. package/lib/components/EarningsTracker/EditDateModal.d.ts +22 -0
  24. package/lib/components/EarningsTracker/EditDateModal.js +149 -0
  25. package/lib/components/EarningsTracker/EmailModal.d.ts +14 -0
  26. package/lib/components/EarningsTracker/EmailModal.js +79 -0
  27. package/lib/components/EarningsTracker/EndProjectModal.d.ts +56 -0
  28. package/lib/components/EarningsTracker/EndProjectModal.js +221 -0
  29. package/lib/components/EarningsTracker/LeftCardUI.d.ts +18 -0
  30. package/lib/components/EarningsTracker/LeftCardUI.js +189 -0
  31. package/lib/components/EarningsTracker/LogTimeModalAuthenticated.d.ts +52 -0
  32. package/lib/components/EarningsTracker/LogTimeModalAuthenticated.js +358 -0
  33. package/lib/components/EarningsTracker/ProgressBar.d.ts +4 -0
  34. package/lib/components/EarningsTracker/ProgressBar.js +66 -0
  35. package/lib/components/EarningsTracker/ReviewRequestModal.d.ts +17 -0
  36. package/lib/components/EarningsTracker/ReviewRequestModal.js +135 -0
  37. package/lib/components/EarningsTracker/RightCardUI.d.ts +46 -0
  38. package/lib/components/EarningsTracker/RightCardUI.js +231 -0
  39. package/lib/components/EarningsTracker/index.d.ts +1 -0
  40. package/lib/components/EarningsTracker/index.js +5 -0
  41. package/lib/components/ExpertProfileHeader/ActionButtonSection.js +6 -6
  42. package/lib/components/ExpertProfileHeader/ProfileSection.js +7 -16
  43. package/lib/components/OrganizationChart/OrganizationChart.d.ts +15 -15
  44. package/lib/components/OrganizationChart/OrganizationChart.js +312 -312
  45. package/lib/components/OrganizationChart/PersonCard.js +5 -5
  46. package/lib/components/OrganizationChart/utils.js +79 -79
  47. package/lib/components/ProjectCard/ActiveProjectCard.d.ts +58 -0
  48. package/lib/components/ProjectCard/ActiveProjectCard.js +162 -0
  49. package/lib/components/ProjectCard/CenterCardUI.d.ts +13 -0
  50. package/lib/components/ProjectCard/CenterCardUI.js +133 -0
  51. package/lib/components/ProjectCard/EditDateModal.d.ts +22 -0
  52. package/lib/components/ProjectCard/EditDateModal.js +149 -0
  53. package/lib/components/ProjectCard/EmailModal.d.ts +14 -0
  54. package/lib/components/ProjectCard/EmailModal.js +79 -0
  55. package/lib/components/ProjectCard/EndProjectModal.d.ts +56 -0
  56. package/lib/components/ProjectCard/EndProjectModal.js +221 -0
  57. package/lib/components/ProjectCard/LeftCardUI.d.ts +18 -0
  58. package/lib/components/ProjectCard/LeftCardUI.js +177 -0
  59. package/lib/components/ProjectCard/LogTimeModalAuthenticated.d.ts +52 -0
  60. package/lib/components/ProjectCard/LogTimeModalAuthenticated.js +357 -0
  61. package/lib/components/ProjectCard/ProgressBar.d.ts +4 -0
  62. package/lib/components/ProjectCard/ProgressBar.js +66 -0
  63. package/lib/components/ProjectCard/ReviewRequestModal.d.ts +17 -0
  64. package/lib/components/ProjectCard/ReviewRequestModal.js +135 -0
  65. package/lib/components/ProjectCard/RightCardUI.d.ts +50 -0
  66. package/lib/components/ProjectCard/RightCardUI.js +239 -0
  67. package/lib/components/ProjectCard/index.d.ts +1 -0
  68. package/lib/components/ProjectCard/index.js +5 -0
  69. package/lib/components/Reviews/Pagination.js +6 -6
  70. package/lib/components/ReviewsTab/RatingHeader.js +6 -6
  71. package/lib/components/ReviewsTab/ReviewModal.js +1 -1
  72. package/lib/components/ReviewsTab/expert-shared-components.code-workspace +20 -20
  73. package/lib/components/ReviewsTab/reviewRequestModal.js +5 -5
  74. package/lib/components/ServiceLinesTemplate/index.js +3 -3
  75. package/lib/components/shared/Error.d.ts +5 -5
  76. package/lib/components/shared/Error.js +8 -32
  77. package/lib/components/shared/Image.js +13 -13
  78. package/lib/components/shared/ProfileTextField.d.ts +18 -18
  79. package/lib/components/shared/ProfileTextField.js +16 -16
  80. package/lib/components/shared/StyledActionButtons.d.ts +7 -7
  81. package/lib/components/shared/StyledActionButtons.js +15 -15
  82. package/lib/components/shared/ToastNotification.d.ts +10 -10
  83. package/lib/components/shared/ToastNotification.js +63 -63
  84. package/lib/index.d.ts +1 -0
  85. package/lib/index.js +3 -1
  86. package/package.json +61 -59
@@ -34,11 +34,11 @@ const react_hot_toast_1 = __importDefault(require("react-hot-toast"));
34
34
  const ReviewRequestModal = ({ project, requestModal, setRequestModal, expertName, freelancerId, setRequestStatus, selectedProject, setSelectedProject, clientId, refetchParoProjects, setHighlightedRatings, createOrUpdateRatingRequestMutation, getParoProjectsDocument, }) => {
35
35
  var _a;
36
36
  const [showError, setShowError] = (0, react_1.useState)(false);
37
- const [textareaValue, setTextareaValue] = (0, react_1.useState)(`Hi ${(_a = project === null || project === void 0 ? void 0 : project.client) === null || _a === void 0 ? void 0 : _a.name},
38
- I hope you are satisfied with the work I provided on ${project === null || project === void 0 ? void 0 : project.name}. Your feedback is very important to me and helps me improve my services and build my reputation on Paro. Could you please take a moment to leave a review of you experience? Your input is greatly appreciated!
39
-
40
- Thank you in advance for your time and feedback.
41
- Best regards,
37
+ const [textareaValue, setTextareaValue] = (0, react_1.useState)(`Hi ${(_a = project === null || project === void 0 ? void 0 : project.client) === null || _a === void 0 ? void 0 : _a.name},
38
+ I hope you are satisfied with the work I provided on ${project === null || project === void 0 ? void 0 : project.name}. Your feedback is very important to me and helps me improve my services and build my reputation on Paro. Could you please take a moment to leave a review of you experience? Your input is greatly appreciated!
39
+
40
+ Thank you in advance for your time and feedback.
41
+ Best regards,
42
42
  ${expertName}`);
43
43
  const handleTextArea = (e) => {
44
44
  setTextareaValue(e.target.value);
@@ -273,8 +273,8 @@ const ServiceLinesTemplate = ({ getFreelancerDataResult, createOrUpdateRates, ge
273
273
  setDisablePublicProfile(false);
274
274
  };
275
275
  return react_1.default.createElement(core_1.Grid, { container: true, direction: "row", justifyContent: "space-evenly", style: { margin: 'auto' }, spacing: 2 },
276
- react_1.default.createElement(base_ui_1.Button, { label: "PREVIEW PUBLIC PROFILE", onClick: () => window.open(`${reactAppUrl}/public/${legacyFreelancerId}`, '_blank'), type: "button", disabled: disablePublicProfile, isLoading: updateClicked, size: "sm" }),
277
- react_1.default.createElement(base_ui_1.Button, { label: "UPDATE PROFILE", onClick: handleButtonClick, type: "button", isLoading: updateClicked, disabled: isUpdateButtonDisabled(), color: "primary", size: "sm" }));
276
+ react_1.default.createElement(base_ui_1.Button, { label: "PREVIEW PUBLIC PROFILE", onClick: () => window.open(`${reactAppUrl}/public/${legacyFreelancerId}`, '_blank'), type: "button", disabled: disablePublicProfile, isLoading: updateClicked, size: "sm", className: "m-2" }),
277
+ react_1.default.createElement(base_ui_1.Button, { label: "UPDATE PROFILE", onClick: handleButtonClick, type: "button", isLoading: updateClicked, disabled: isUpdateButtonDisabled(), color: "primary", size: "sm", className: "m-2" }));
278
278
  };
279
279
  const newServiceLine = () => {
280
280
  var _a, _b;
@@ -338,7 +338,7 @@ const ServiceLinesTemplate = ({ getFreelancerDataResult, createOrUpdateRates, ge
338
338
  handleServiceToggle(service.title, true);
339
339
  }
340
340
  } })),
341
- react_1.default.createElement(core_1.Box, { sx: { flex: 1 } },
341
+ react_1.default.createElement(core_1.Box, { sx: { flex: 1, width: '100%' } },
342
342
  react_1.default.createElement(core_1.Box, { display: 'flex', alignItems: 'center', justifyContent: 'space-between' },
343
343
  react_1.default.createElement(core_1.Box, { display: 'flex', alignItems: 'center' },
344
344
  react_1.default.createElement(core_1.Typography, { component: "div", style: { fontWeight: 600, fontSize: '12px', color: '#1C1F2B', fontFamily: "Roboto" } },
@@ -1,6 +1,6 @@
1
- type SectionContents = {
2
- handleClose?: (...args: any) => void;
3
- formError?: boolean;
4
- };
5
- declare const Error: ({ handleClose }: SectionContents) => JSX.Element;
1
+ import React from "react";
2
+ interface ErrorProps {
3
+ message?: string;
4
+ }
5
+ declare const Error: ({ message }: ErrorProps) => React.JSX.Element;
6
6
  export default Error;
@@ -4,37 +4,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
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' })))));
7
+ const Error = ({ message = 'Error while loading this page. Please refresh and try again.' }) => {
8
+ return (react_1.default.createElement(react_1.default.Fragment, null,
9
+ react_1.default.createElement("div", { className: "flex align-middle justify-center" },
10
+ react_1.default.createElement("div", { className: "flex-col" },
11
+ react_1.default.createElement("div", { className: "flex item-center justify-center" },
12
+ react_1.default.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", className: "h-12 w-12 text-grey-light", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor" },
13
+ react_1.default.createElement("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" }))),
14
+ react_1.default.createElement("div", { className: "text-grey" }, message)))));
39
15
  };
40
16
  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;
package/lib/index.d.ts CHANGED
@@ -9,3 +9,4 @@ export { DocumentCenter } from './components/DocumentCenter';
9
9
  export { HeaderNavBar } from './components/HeaderNavBar';
10
10
  export { ServiceLinesTemplate } from './components/ServiceLinesTemplate';
11
11
  export { sharedUtils } from './components/shared/utils';
12
+ export { ActiveProjectCard } from './components/ProjectCard/ActiveProjectCard';
package/lib/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
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;
3
+ exports.ActiveProjectCard = 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");
@@ -23,3 +23,5 @@ var ServiceLinesTemplate_1 = require("./components/ServiceLinesTemplate");
23
23
  Object.defineProperty(exports, "ServiceLinesTemplate", { enumerable: true, get: function () { return ServiceLinesTemplate_1.ServiceLinesTemplate; } });
24
24
  var utils_1 = require("./components/shared/utils");
25
25
  Object.defineProperty(exports, "sharedUtils", { enumerable: true, get: function () { return utils_1.sharedUtils; } });
26
+ var ActiveProjectCard_1 = require("./components/ProjectCard/ActiveProjectCard");
27
+ Object.defineProperty(exports, "ActiveProjectCard", { enumerable: true, get: function () { return ActiveProjectCard_1.ActiveProjectCard; } });
package/package.json CHANGED
@@ -1,59 +1,61 @@
1
- {
2
- "name": "@paro.io/expert-shared-components",
3
- "version": "1.9.6",
4
- "description": "",
5
- "main": "lib/index.js",
6
- "scripts": {
7
- "build": "tsc",
8
- "prepare": "yarn build",
9
- "test": "yarn test:build",
10
- "test:build": "yarn build",
11
- "clean": "yarn -rf lib",
12
- "predeploy": "tsc && cp package.json README.md ./lib",
13
- "link-local": "yarn link && cd node_modules/react && yarn link && cd ../react-dom && yarn link",
14
- "unlink-local": "yarn unlink && cd node_modules/react && yarn unlink && cd ../react-dom && yarn unlink"
15
- },
16
- "repository": "https://github.com/paroadmin/expert-shared-components.git",
17
- "keywords": ["react", "components", "shared"],
18
- "author": "apande@paro.io",
19
- "license": "MIT",
20
- "dependencies": {
21
- "@fortawesome/fontawesome-svg-core": "^6.6.0",
22
- "@fortawesome/free-solid-svg-icons": "^6.6.0",
23
- "@fortawesome/react-fontawesome": "^0.2.2",
24
- "@hookform/resolvers": "3.3.4",
25
- "@material-ui/core": "^4.11.0",
26
- "@material-ui/icons": "^4.11.3",
27
- "@material-ui/lab": "^4.0.0-alpha.61",
28
- "@paro.io/base-icons": "^1.0.4",
29
- "@paro.io/base-ui": "^1.8.3",
30
- "@types/react-input-mask": "^3.0.5",
31
- "dayjs": "^1.10.7",
32
- "lodash": "^4.17.21",
33
- "react": "^18.2.0",
34
- "react-copy-to-clipboard": "^5.0.4",
35
- "react-datepicker": "^4.6.0",
36
- "react-dom": "^17.0.2",
37
- "react-hook-form": "7.51.1",
38
- "react-hot-toast": "^2.4.1",
39
- "react-input-mask": "^3.0.0-alpha.2",
40
- "styled-components": "^5.3.3",
41
- "yup": "^0.32.11"
42
- },
43
- "devDependencies": {
44
- "@types/lodash": "^4.14.170",
45
- "@types/react": "^18.2.73",
46
- "@types/react-copy-to-clipboard": "^5.0.2",
47
- "@types/react-datepicker": "^4.19.6",
48
- "@types/react-dom": "^18.2.22",
49
- "@types/styled-components": "^5.1.22",
50
- "@types/yup": "^0.29.13",
51
- "typescript": "^5.3.3"
52
- },
53
- "files": [
54
- "lib/**/*"
55
- ],
56
- "directories": {
57
- "lib": "lib"
58
- }
59
- }
1
+ {
2
+ "name": "@paro.io/expert-shared-components",
3
+ "version": "1.9.8",
4
+ "description": "",
5
+ "main": "lib/index.js",
6
+ "scripts": {
7
+ "build": "tsc",
8
+ "prepare": "yarn build",
9
+ "test": "yarn test:build",
10
+ "test:build": "yarn build",
11
+ "clean": "yarn -rf lib",
12
+ "predeploy": "tsc && cp package.json README.md ./lib",
13
+ "link-local": "yarn link && cd node_modules/react && yarn link && cd ../react-dom && yarn link",
14
+ "unlink-local": "yarn unlink && cd node_modules/react && yarn unlink && cd ../react-dom && yarn unlink"
15
+ },
16
+ "repository": "https://github.com/paroadmin/expert-shared-components.git",
17
+ "keywords": ["react", "components", "shared"],
18
+ "author": "apande@paro.io",
19
+ "license": "MIT",
20
+ "dependencies": {
21
+ "@date-io/dayjs": "1.x",
22
+ "@fortawesome/fontawesome-svg-core": "^6.6.0",
23
+ "@fortawesome/free-solid-svg-icons": "^6.6.0",
24
+ "@fortawesome/react-fontawesome": "^0.2.2",
25
+ "@hookform/resolvers": "3.3.4",
26
+ "@material-ui/core": "^4.11.0",
27
+ "@material-ui/icons": "^4.11.3",
28
+ "@material-ui/lab": "^4.0.0-alpha.61",
29
+ "@material-ui/pickers": "^3.3.11",
30
+ "@paro.io/base-icons": "^1.0.4",
31
+ "@paro.io/base-ui": "^1.8.3",
32
+ "@types/react-input-mask": "^3.0.5",
33
+ "dayjs": "^1.10.7",
34
+ "lodash": "^4.17.21",
35
+ "react": "^18.2.0",
36
+ "react-copy-to-clipboard": "^5.0.4",
37
+ "react-datepicker": "^4.6.0",
38
+ "react-dom": "^17.0.2",
39
+ "react-hook-form": "7.51.1",
40
+ "react-hot-toast": "^2.4.1",
41
+ "react-input-mask": "^3.0.0-alpha.2",
42
+ "styled-components": "^5.3.3",
43
+ "yup": "^0.32.11"
44
+ },
45
+ "devDependencies": {
46
+ "@types/lodash": "^4.14.170",
47
+ "@types/react": "^18.2.73",
48
+ "@types/react-copy-to-clipboard": "^5.0.2",
49
+ "@types/react-datepicker": "^4.19.6",
50
+ "@types/react-dom": "^18.2.22",
51
+ "@types/styled-components": "^5.1.22",
52
+ "@types/yup": "^0.29.13",
53
+ "typescript": "^5.3.3"
54
+ },
55
+ "files": [
56
+ "lib/**/*"
57
+ ],
58
+ "directories": {
59
+ "lib": "lib"
60
+ }
61
+ }