@paro.io/expert-shared-components 1.6.4 → 1.6.6

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 (37) 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/ClientDocumentsTable.js +1 -1
  12. package/lib/components/DocumentCenter/DocumentCenter.d.ts +2 -1
  13. package/lib/components/DocumentCenter/DocumentCenter.js +2 -2
  14. package/lib/components/DocumentCenter/DocumentTable.d.ts +15 -15
  15. package/lib/components/DocumentCenter/DocumentTable.js +350 -350
  16. package/lib/components/DocumentCenter/UploadFilesButton.d.ts +6 -6
  17. package/lib/components/DocumentCenter/UploadFilesButton.js +29 -29
  18. package/lib/components/ExpertProfileHeader/ActionButtonSection.js +6 -6
  19. package/lib/components/ExpertProfileHeader/ProfileSection.js +10 -10
  20. package/lib/components/ExpertProfileHeader/ReviewsModal.js +1 -1
  21. package/lib/components/OrganizationChart/OrganizationChart.js +7 -7
  22. package/lib/components/Reviews/Pagination.js +6 -6
  23. package/lib/components/Reviews/Reviews.js +2 -1
  24. package/lib/components/ReviewsTab/RatingHeader.js +6 -6
  25. package/lib/components/ReviewsTab/ReviewsTab.js +1 -1
  26. package/lib/components/ReviewsTab/expert-shared-components.code-workspace +20 -20
  27. package/lib/components/ReviewsTab/reviewRequestModal.js +5 -5
  28. package/lib/components/shared/Error.d.ts +6 -6
  29. package/lib/components/shared/Error.js +40 -40
  30. package/lib/components/shared/Image.js +13 -13
  31. package/lib/components/shared/ProfileTextField.d.ts +18 -18
  32. package/lib/components/shared/ProfileTextField.js +16 -16
  33. package/lib/components/shared/StyledActionButtons.d.ts +7 -7
  34. package/lib/components/shared/StyledActionButtons.js +15 -15
  35. package/lib/components/shared/ToastNotification.d.ts +10 -10
  36. package/lib/components/shared/ToastNotification.js +63 -63
  37. package/package.json +59 -59
@@ -1,6 +1,6 @@
1
- interface UploadFilesButtonProps {
2
- onFileSelect: (file: File) => void;
3
- isLoading?: boolean;
4
- }
5
- export declare const UploadFilesButton: ({ onFileSelect, isLoading, }: UploadFilesButtonProps) => JSX.Element;
6
- export {};
1
+ interface UploadFilesButtonProps {
2
+ onFileSelect: (file: File) => void;
3
+ isLoading?: boolean;
4
+ }
5
+ export declare const UploadFilesButton: ({ onFileSelect, isLoading, }: UploadFilesButtonProps) => JSX.Element;
6
+ export {};
@@ -1,29 +1,29 @@
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
- exports.UploadFilesButton = void 0;
7
- const react_1 = __importDefault(require("react"));
8
- const base_ui_1 = require("@paro.io/base-ui");
9
- const react_2 = require("react");
10
- const UploadFilesButton = ({ onFileSelect, isLoading, }) => {
11
- const fileInputRef = (0, react_2.useRef)(null);
12
- const handleClick = () => {
13
- var _a;
14
- (_a = fileInputRef.current) === null || _a === void 0 ? void 0 : _a.click();
15
- };
16
- const handleFileChange = (event) => {
17
- var _a;
18
- const file = (_a = event.target.files) === null || _a === void 0 ? void 0 : _a[0];
19
- if (file) {
20
- onFileSelect(file);
21
- }
22
- // Reset input value to allow uploading the same file again
23
- event.target.value = '';
24
- };
25
- return (react_1.default.createElement("div", null,
26
- react_1.default.createElement("input", { type: "file", ref: fileInputRef, onChange: handleFileChange, className: "hidden", accept: ".pdf,.doc,.docx,.xls,.xlsx,.ppt,.pptx" }),
27
- react_1.default.createElement(base_ui_1.Button, { onClick: handleClick, disabled: isLoading })));
28
- };
29
- exports.UploadFilesButton = UploadFilesButton;
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
+ exports.UploadFilesButton = void 0;
7
+ const react_1 = __importDefault(require("react"));
8
+ const base_ui_1 = require("@paro.io/base-ui");
9
+ const react_2 = require("react");
10
+ const UploadFilesButton = ({ onFileSelect, isLoading, }) => {
11
+ const fileInputRef = (0, react_2.useRef)(null);
12
+ const handleClick = () => {
13
+ var _a;
14
+ (_a = fileInputRef.current) === null || _a === void 0 ? void 0 : _a.click();
15
+ };
16
+ const handleFileChange = (event) => {
17
+ var _a;
18
+ const file = (_a = event.target.files) === null || _a === void 0 ? void 0 : _a[0];
19
+ if (file) {
20
+ onFileSelect(file);
21
+ }
22
+ // Reset input value to allow uploading the same file again
23
+ event.target.value = '';
24
+ };
25
+ return (react_1.default.createElement("div", null,
26
+ react_1.default.createElement("input", { type: "file", ref: fileInputRef, onChange: handleFileChange, className: "hidden", accept: ".pdf,.doc,.docx,.xls,.xlsx,.ppt,.pptx" }),
27
+ react_1.default.createElement(base_ui_1.Button, { onClick: handleClick, disabled: isLoading })));
28
+ };
29
+ exports.UploadFilesButton = UploadFilesButton;
@@ -10,12 +10,12 @@ const react_1 = __importDefault(require("react"));
10
10
  const CopyToClipboardAlert_1 = __importDefault(require("../shared/CopyToClipboardAlert"));
11
11
  const colors_1 = __importDefault(require("../ClientReferencesSection/constants/colors"));
12
12
  const Banner_1 = __importDefault(require("./Banner"));
13
- const StyledButton = (0, styled_components_1.default)(core_1.Button) `
14
- margin: 0px !important;
15
- padding: 26px 0 18px 0 !important;
16
- span {
17
- color: ${colors_1.default.buttonText} !important
18
- }
13
+ const StyledButton = (0, styled_components_1.default)(core_1.Button) `
14
+ margin: 0px !important;
15
+ padding: 26px 0 18px 0 !important;
16
+ span {
17
+ color: ${colors_1.default.buttonText} !important
18
+ }
19
19
  `;
20
20
  const ActionButton = ({ title, ariaLabel, onClick, icon: Icon }) => (react_1.default.createElement(core_1.Tooltip, { arrow: true, placement: "top", interactive: true, className: "whitespace-nowrap", title: title },
21
21
  react_1.default.createElement(core_1.IconButton, { "aria-label": ariaLabel, onClick: onClick },
@@ -53,22 +53,22 @@ const formatPhoneNumber = (phone) => {
53
53
  return `(${numericPhone.slice(0, 3)}) ${numericPhone.slice(3, 6)} - ${numericPhone.slice(6)}`;
54
54
  };
55
55
  exports.formatPhoneNumber = formatPhoneNumber;
56
- exports.ProfilePhotoPreview = styled_components_1.default.img `
57
- height: 86px;
58
- width: 86px;
59
- border: 1px solid ${colors_1.default.lightGray};
60
- border-radius: 50%;
61
- object-fit: cover;
62
- object-position: top;
56
+ exports.ProfilePhotoPreview = styled_components_1.default.img `
57
+ height: 86px;
58
+ width: 86px;
59
+ border: 1px solid ${colors_1.default.lightGray};
60
+ border-radius: 50%;
61
+ object-fit: cover;
62
+ object-position: top;
63
63
  `;
64
64
  const ProfileSection = ({ legacyFreelancerId, imageUrl, shouldAllowEditProfile, firstName, lastName, primaryServiceLine, editServiceLine, city, stateAbbreviation, email, phone, paroTenure, hourlyRate, setOpen, paroProjectsData, getUserDocument, uploadUserPhotoMutation, loadingNewImage, imageUpdateError, isInternal, getUserByEmail, updateUserEmail, updateUserMutation, getUserByEmailLazyQuery, updateUserPassword, verifyUserPassword, }) => {
65
+ var _a;
65
66
  const [openReviews, setOpenReviews] = (0, react_1.useState)(false);
66
67
  const [resetPasswordOpen, setResetPasswordOpen] = (0, react_1.useState)(false);
67
68
  const [changeEmailOpen, setChangeEmailOpen] = (0, react_1.useState)(false);
68
69
  const [updatedEmail, setUpdatedEmail] = (0, react_1.useState)(email);
69
70
  const filterProjectsWithRating = paroProjectsData === null || paroProjectsData === void 0 ? void 0 : paroProjectsData.flatMap(({ client, rating }) => rating === null || rating === void 0 ? void 0 : rating.map((rating) => ({ client, rating })));
70
- const totalReviews = paroProjectsData === null || paroProjectsData === void 0 ? void 0 : paroProjectsData.filter((obj) => { if (obj.rating.length > 0)
71
- return obj.rating; }).length;
71
+ const totalReviews = (_a = paroProjectsData === null || paroProjectsData === void 0 ? void 0 : paroProjectsData.filter((obj) => obj.rating.length > 0)) === null || _a === void 0 ? void 0 : _a.flatMap((obj) => obj.rating).length;
72
72
  const avgRating = () => {
73
73
  const overallRatings = filterProjectsWithRating === null || filterProjectsWithRating === void 0 ? void 0 : filterProjectsWithRating.map((obj) => { var _a; return (_a = obj === null || obj === void 0 ? void 0 : obj.rating) === null || _a === void 0 ? void 0 : _a.overallRating; });
74
74
  if (overallRatings) {
@@ -111,7 +111,7 @@ const ProfileSection = ({ legacyFreelancerId, imageUrl, shouldAllowEditProfile,
111
111
  react_1.default.createElement(core_1.Grid, { item: true, container: true, xs: 12, direction: "row", justify: "center", spacing: 2 },
112
112
  react_1.default.createElement(core_1.Box, { mr: 1 },
113
113
  react_1.default.createElement(core_1.Typography, { variant: "h6" },
114
- react_1.default.createElement("b", null, Number(avgRating()).toFixed(2)))),
114
+ react_1.default.createElement("b", null, Number(avgRating()).toFixed(1)))),
115
115
  react_1.default.createElement(Rating_1.default, { name: "half-rating-read", readOnly: true, value: avgRating(), precision: 0.1, size: "medium", emptyIcon: react_1.default.createElement(Star_1.default, { fontSize: "inherit" }) })),
116
116
  react_1.default.createElement(core_1.Box, { mt: 1 },
117
117
  react_1.default.createElement(core_1.Typography, { variant: "body2", align: 'center' },
@@ -86,7 +86,7 @@ const ReviewsModal = ({ openReviews, setOpenReviews, paroProjectsData, filterPro
86
86
  react_1.default.createElement(core_1.Grid, { container: true, style: { display: 'flex', justifyContent: 'space-between', alignItems: 'center', marginBottom: '20px', backgroundColor: '#F1F5F9', padding: '12px', width: '100%', } },
87
87
  react_1.default.createElement(core_1.Grid, { item: true },
88
88
  react_1.default.createElement(core_1.Typography, { variant: "h1", style: { marginLeft: '10px' }, align: 'center' },
89
- react_1.default.createElement("b", null, (avgRating).toFixed(2))),
89
+ react_1.default.createElement("b", null, (avgRating).toFixed(1))),
90
90
  react_1.default.createElement(Rating_1.default, { name: "read-only", value: avgRating, readOnly: true, precision: 0.5, size: "large" }),
91
91
  react_1.default.createElement(core_1.Typography, { variant: "h6", style: { marginLeft: '10px' }, align: 'center' },
92
92
  totalReviews,
@@ -34,13 +34,13 @@ const Close_1 = __importDefault(require("@material-ui/icons/Close"));
34
34
  const cdn_1 = require("../shared/constants/cdn");
35
35
  const styled_components_1 = __importDefault(require("styled-components"));
36
36
  const defaultAvatar = cdn_1.CDN_URL + 'defaultAvatar.png';
37
- const ProfilePhotoPreview = styled_components_1.default.img `
38
- height: 86px;
39
- width: 86px;
40
- border: 1px solid #e4e5e4;
41
- border-radius: 50%;
42
- object-fit: cover;
43
- object-position: top;
37
+ const ProfilePhotoPreview = styled_components_1.default.img `
38
+ height: 86px;
39
+ width: 86px;
40
+ border: 1px solid #e4e5e4;
41
+ border-radius: 50%;
42
+ object-fit: cover;
43
+ object-position: top;
44
44
  `;
45
45
  const CustomDialog = (0, core_1.styled)(Dialog_1.default)(({ theme }) => ({
46
46
  '& .MuiDialog-paper': {
@@ -51,12 +51,12 @@ const Pagination = ({ total, currentPage = 1, setCurrentPage, perPageItems = 10,
51
51
  };
52
52
  const numberOfPages = Math.ceil(total / perPageItems);
53
53
  return (react_1.default.createElement("div", { className: "bg-white px-4 py-3 border-t border-gray-200 sm:px-6 flex flex-col md:flex-row md:items-center md:justify-between" },
54
- react_1.default.createElement("div", { className: "pb-2 md:pb-0" }, `Showing
55
- ${perPageItems * (currentPage - 1) + 1}
56
- to
57
- ${Math.min(total, perPageItems * currentPage)}
58
- of
59
- ${total}
54
+ react_1.default.createElement("div", { className: "pb-2 md:pb-0" }, `Showing
55
+ ${perPageItems * (currentPage - 1) + 1}
56
+ to
57
+ ${Math.min(total, perPageItems * currentPage)}
58
+ of
59
+ ${total}
60
60
  ${displayText}`),
61
61
  react_1.default.createElement("div", { className: "flex items-center justify-between" },
62
62
  react_1.default.createElement("div", { className: "flex-1 flex justify-between sm:hidden" },
@@ -295,6 +295,7 @@ const formatDate = (date, pattern = 'MM/dd/yyyy') => {
295
295
  return { label: formattedDate, value: convertToDateTime };
296
296
  };
297
297
  const Reviews = ({ paroProjectsData, legacyFreelancerId, expertName, refetchParoProjects, createOrUpdateRating, }) => {
298
+ var _a, _b;
298
299
  const classes = useStyles();
299
300
  const [loadingSubmitId, setLoadingSubmitId] = (0, react_1.useState)(null);
300
301
  const [openReviewModal, setOpenReviewModal] = (0, react_1.useState)(false);
@@ -390,7 +391,7 @@ const Reviews = ({ paroProjectsData, legacyFreelancerId, expertName, refetchParo
390
391
  const checkHighlighted = highlightedRatings.filter((p) => { var _a, _b; return ((_a = p === null || p === void 0 ? void 0 : p.rating[0]) === null || _a === void 0 ? void 0 : _a.id) === (rating === null || rating === void 0 ? void 0 : rating.id) && ((_b = p === null || p === void 0 ? void 0 : p.rating[0]) === null || _b === void 0 ? void 0 : _b.isHighlighted); }).length;
391
392
  return checkHighlighted > 0 ? true : false;
392
393
  };
393
- const reviewsGiven = highlightedRatings === null || highlightedRatings === void 0 ? void 0 : highlightedRatings.filter((p) => p.rating[0]).length;
394
+ const reviewsGiven = (_b = (_a = highlightedRatings === null || highlightedRatings === void 0 ? void 0 : highlightedRatings.filter((p) => p.rating.length > 0)) === null || _a === void 0 ? void 0 : _a.flatMap((p) => p.rating)) === null || _b === void 0 ? void 0 : _b.length;
394
395
  const reviewNotGiven = (highlightedRatings === null || highlightedRatings === void 0 ? void 0 : highlightedRatings.length) - reviewsGiven;
395
396
  // const customRound = (value: number): number => {
396
397
  // const decimalPart = value - Math.floor(value);
@@ -51,12 +51,12 @@ const isRatingExists = (rating) => {
51
51
  return false;
52
52
  };
53
53
  exports.isRatingExists = isRatingExists;
54
- const StyledButton = (0, styled_components_1.default)(core_2.Button) `
55
- margin: 0px !important;
56
- padding: 26px 0 18px 0 !important;
57
- span {
58
- color: #248384 !important
59
- }
54
+ const StyledButton = (0, styled_components_1.default)(core_2.Button) `
55
+ margin: 0px !important;
56
+ padding: 26px 0 18px 0 !important;
57
+ span {
58
+ color: #248384 !important
59
+ }
60
60
  `;
61
61
  const RatingHeader = ({ ratings, project, index, highlightedRatings, requestStatus, handleRatingRequest, loadingSubmitId, handleAddToProfile, ratingReviewButtonlabel, setOpenClientReviewModal, setShowReviewModelWithRecentlyRatedProjects, enableReviewModal, disableReviewModal, isClientPortal, isInternal, createOrUpdateRating, getParoProjectsDocument, projectIdToShow, }) => {
62
62
  var _a, _b, _c, _d;
@@ -304,7 +304,7 @@ const ReviewsTab = ({ paroProjectsData, legacyFreelancerId, expertName, getParoP
304
304
  setOrderBy(buttonText);
305
305
  }
306
306
  };
307
- const reviewsGiven = paroProjectsData === null || paroProjectsData === void 0 ? void 0 : paroProjectsData.filter((p) => { var _a; return (_a = p === null || p === void 0 ? void 0 : p.rating) === null || _a === void 0 ? void 0 : _a[0]; }).map(p => p.rating).flat().length;
307
+ const reviewsGiven = paroProjectsData === null || paroProjectsData === void 0 ? void 0 : paroProjectsData.filter((p) => { var _a; return ((_a = p === null || p === void 0 ? void 0 : p.rating) === null || _a === void 0 ? void 0 : _a.length) > 0; }).flatMap(p => p.rating).length;
308
308
  const reviewNotGiven = Math.max(0, (paroProjectsData === null || paroProjectsData === void 0 ? void 0 : paroProjectsData.length) - reviewsGiven);
309
309
  const { overallRating, timelinessRating, communicationRating, professionalismRating, executionOfDeliverablesRating } = (0, ProjectReviewsSection_1.calculateAverageRatings)(paroProjectsData);
310
310
  const uniqueClients = highlightedRatings === null || highlightedRatings === void 0 ? void 0 : highlightedRatings.map((obj) => {
@@ -1,20 +1,20 @@
1
- {
2
- "folders": [
3
- {
4
- "path": "../../.."
5
- },
6
- {
7
- "path": "../../../../internal-profile-app"
8
- },
9
- {
10
- "path": "../../../../availability-gantt-chart"
11
- },
12
- {
13
- "path": "../../../../client-portal"
14
- },
15
- {
16
- "path": "../../../../expert-portal"
17
- }
18
- ],
19
- "settings": {}
20
- }
1
+ {
2
+ "folders": [
3
+ {
4
+ "path": "../../.."
5
+ },
6
+ {
7
+ "path": "../../../../internal-profile-app"
8
+ },
9
+ {
10
+ "path": "../../../../availability-gantt-chart"
11
+ },
12
+ {
13
+ "path": "../../../../client-portal"
14
+ },
15
+ {
16
+ "path": "../../../../expert-portal"
17
+ }
18
+ ],
19
+ "settings": {}
20
+ }
@@ -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);
@@ -1,6 +1,6 @@
1
- type SectionContents = {
2
- handleClose?: (...args: any) => void;
3
- formError?: boolean;
4
- };
5
- declare const Error: ({ handleClose }: SectionContents) => JSX.Element;
6
- export default Error;
1
+ type SectionContents = {
2
+ handleClose?: (...args: any) => void;
3
+ formError?: boolean;
4
+ };
5
+ declare const Error: ({ handleClose }: SectionContents) => JSX.Element;
6
+ export default Error;
@@ -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;