@paro.io/expert-shared-components 1.6.1 → 1.6.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 (42) 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.d.ts +2 -1
  12. package/lib/components/DocumentCenter/ClientDocumentsTable.js +5 -5
  13. package/lib/components/DocumentCenter/DocumentCenter.d.ts +2 -1
  14. package/lib/components/DocumentCenter/DocumentCenter.js +3 -3
  15. package/lib/components/DocumentCenter/DocumentTable.d.ts +15 -15
  16. package/lib/components/DocumentCenter/DocumentTable.js +350 -350
  17. package/lib/components/DocumentCenter/DocumentUploadRow.d.ts +2 -1
  18. package/lib/components/DocumentCenter/DocumentUploadRow.js +27 -6
  19. package/lib/components/DocumentCenter/ParoDocumentsTable.js +2 -2
  20. package/lib/components/DocumentCenter/UploadFilesButton.d.ts +6 -6
  21. package/lib/components/DocumentCenter/UploadFilesButton.js +29 -29
  22. package/lib/components/ExpertProfileHeader/ActionButtonSection.js +6 -6
  23. package/lib/components/ExpertProfileHeader/ProfileSection.js +7 -7
  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/shared/Error.d.ts +6 -6
  30. package/lib/components/shared/Error.js +40 -40
  31. package/lib/components/shared/Image.js +13 -13
  32. package/lib/components/shared/ProfileTextField.d.ts +18 -18
  33. package/lib/components/shared/ProfileTextField.js +16 -16
  34. package/lib/components/shared/StyledActionButtons.d.ts +7 -7
  35. package/lib/components/shared/StyledActionButtons.js +15 -15
  36. package/lib/components/shared/ToastNotification.d.ts +10 -10
  37. package/lib/components/shared/ToastNotification.js +63 -63
  38. package/lib/components/shared/UploadClient.d.ts +14 -0
  39. package/lib/components/shared/UploadClient.js +115 -0
  40. package/lib/components/shared/utils.d.ts +1 -1
  41. package/lib/components/shared/utils.js +5 -2
  42. package/package.json +59 -59
@@ -21,6 +21,7 @@ interface DocumentUploadProps {
21
21
  freelancerName?: string;
22
22
  freelancerEmail?: string;
23
23
  isClientPortal?: boolean;
24
+ documentUploadUrl?: string;
24
25
  }
25
- export declare const DocumentUploadRow: ({ clientAndProject, setClientAndProject, docType, setDocType, paroDocuments, expiryDate, handleDateChange, error, clientAndProjectsList, uploadExpertClientFiles, refetchFiles, legacyFreelancerId, freelancerName, freelancerEmail, isClientPortal, }: DocumentUploadProps) => JSX.Element;
26
+ export declare const DocumentUploadRow: ({ clientAndProject, setClientAndProject, docType, setDocType, paroDocuments, expiryDate, handleDateChange, error, clientAndProjectsList, uploadExpertClientFiles, refetchFiles, legacyFreelancerId, freelancerName, freelancerEmail, isClientPortal, documentUploadUrl, }: DocumentUploadProps) => JSX.Element;
26
27
  export {};
@@ -32,6 +32,7 @@ const core_1 = require("@material-ui/core");
32
32
  const base_ui_1 = require("@paro.io/base-ui");
33
33
  const react_datepicker_1 = __importDefault(require("react-datepicker"));
34
34
  const utils_1 = require("../shared/utils");
35
+ const UploadClient_1 = __importDefault(require("../shared/UploadClient"));
35
36
  const ClientDocumentTypes = [
36
37
  "Financial Documents",
37
38
  "Contractual and Legal Documents",
@@ -45,6 +46,7 @@ const ParoDocumentTypes = [
45
46
  "General Insurance",
46
47
  "Certification",
47
48
  ];
49
+ const CHUNK_SIZE = 5 * 1024 * 1024;
48
50
  const generateOptions = (array, clientOptions, isClientPortal) => {
49
51
  return array.map((item, index) => {
50
52
  var _a, _b;
@@ -76,7 +78,7 @@ const generateOptions = (array, clientOptions, isClientPortal) => {
76
78
  }
77
79
  });
78
80
  };
79
- const DocumentUploadRow = ({ clientAndProject, setClientAndProject, docType, setDocType, paroDocuments, expiryDate, handleDateChange, error, clientAndProjectsList, uploadExpertClientFiles, refetchFiles, legacyFreelancerId, freelancerName, freelancerEmail, isClientPortal = false, }) => {
81
+ const DocumentUploadRow = ({ clientAndProject, setClientAndProject, docType, setDocType, paroDocuments, expiryDate, handleDateChange, error, clientAndProjectsList, uploadExpertClientFiles, refetchFiles, legacyFreelancerId, freelancerName, freelancerEmail, isClientPortal = false, documentUploadUrl, }) => {
80
82
  const [isUploading, setIsUploading] = (0, react_1.useState)(false);
81
83
  const [documentName, setDocumentName] = (0, react_1.useState)('');
82
84
  const fileInputRef = (0, react_1.useRef)(null);
@@ -89,23 +91,23 @@ const DocumentUploadRow = ({ clientAndProject, setClientAndProject, docType, set
89
91
  }, []);
90
92
  const checkField = (paroDocuments) ? (docType === 'EO Insurance' ? (expiryDate && !error) : true) : (clientAndProject && (clientAndProject === null || clientAndProject === void 0 ? void 0 : clientAndProject.value));
91
93
  const disableButton = !(documentName && checkField) && !isUploading;
92
- const uploadFile = (fileForUpload, fileExtension) => {
94
+ const uploadFile = (fileForUpload, fileExtension, isLargeFile, selectedFile) => {
93
95
  var _a, _b, _c, _d, _e;
94
- setIsUploading(true);
95
96
  uploadExpertClientFiles({
96
97
  variables: {
97
98
  input: {
98
99
  clientId: (_a = clientAndProject === null || clientAndProject === void 0 ? void 0 : clientAndProject.client) === null || _a === void 0 ? void 0 : _a.id,
99
100
  clientName: (_b = clientAndProject === null || clientAndProject === void 0 ? void 0 : clientAndProject.client) === null || _b === void 0 ? void 0 : _b.name,
100
- data: fileForUpload,
101
101
  email: isClientPortal ? (_c = clientAndProject === null || clientAndProject === void 0 ? void 0 : clientAndProject.freelancer) === null || _c === void 0 ? void 0 : _c.name : freelancerEmail,
102
102
  fileName: `${documentName}.${fileExtension}`,
103
+ fileSize: selectedFile === null || selectedFile === void 0 ? void 0 : selectedFile.size,
103
104
  fileType: utils_1.DOCUMENT_TYPE_CONSTANTS[docType],
104
105
  freelancerId: isClientPortal ? (_d = clientAndProject === null || clientAndProject === void 0 ? void 0 : clientAndProject.freelancer) === null || _d === void 0 ? void 0 : _d.id : legacyFreelancerId,
105
106
  freelancerName: isClientPortal ? (_e = clientAndProject === null || clientAndProject === void 0 ? void 0 : clientAndProject.freelancer) === null || _e === void 0 ? void 0 : _e.name : freelancerName,
106
107
  projectId: clientAndProject === null || clientAndProject === void 0 ? void 0 : clientAndProject.id,
107
108
  projectName: clientAndProject === null || clientAndProject === void 0 ? void 0 : clientAndProject.name,
108
109
  uploadedBy: isClientPortal ? 'CLIENT' : 'FREELANCER',
110
+ data: isLargeFile ? "" : fileForUpload,
109
111
  },
110
112
  }
111
113
  })
@@ -126,6 +128,25 @@ const DocumentUploadRow = ({ clientAndProject, setClientAndProject, docType, set
126
128
  setDocumentName('');
127
129
  });
128
130
  };
131
+ const uploadFileRouter = (fileForUpload, fileExtension, selectedFile) => {
132
+ setIsUploading(true);
133
+ const isLargeFile = (selectedFile === null || selectedFile === void 0 ? void 0 : selectedFile.size) >= CHUNK_SIZE;
134
+ const fileNameWithExtension = `${documentName}.${fileExtension}`;
135
+ if (isLargeFile) {
136
+ (0, utils_1.showToast)('warning', 'Uploading a large file — this may take longer than usual. Thank you for your patience!');
137
+ const uploadClient = new UploadClient_1.default({ fileSelected: selectedFile, fileName: fileNameWithExtension, projectId: clientAndProject === null || clientAndProject === void 0 ? void 0 : clientAndProject.id, documentUploadUrl });
138
+ uploadClient.triggerMultipartUpload().then((res) => {
139
+ console.log(`Multipart File uploaded successfully with ${res}`);
140
+ uploadFile(fileForUpload, fileExtension, isLargeFile, selectedFile);
141
+ })
142
+ .catch((err) => {
143
+ (0, utils_1.showToast)('warning', 'Error Uploading Large File. Please try again.');
144
+ });
145
+ }
146
+ else {
147
+ uploadFile(fileForUpload, fileExtension, isLargeFile, selectedFile);
148
+ }
149
+ };
129
150
  const handleUpload = (event) => {
130
151
  const selectedFile = event.target.files && event.target.files[0];
131
152
  if (!(0, utils_1.validateFileUpload)(selectedFile, true)) {
@@ -136,7 +157,7 @@ const DocumentUploadRow = ({ clientAndProject, setClientAndProject, docType, set
136
157
  const reader = new FileReader();
137
158
  reader.onloadend = () => {
138
159
  const fileForUpload = String(reader.result).split(';base64,')[1];
139
- uploadFile(fileForUpload, fileExtension);
160
+ uploadFileRouter(fileForUpload, fileExtension, selectedFile);
140
161
  };
141
162
  reader.readAsDataURL(selectedFile);
142
163
  }
@@ -172,7 +193,7 @@ const DocumentUploadRow = ({ clientAndProject, setClientAndProject, docType, set
172
193
  }, value: (clientAndProject === null || clientAndProject === void 0 ? void 0 : clientAndProject.value) || '', defaultValue: defaultValue.value, options: clientOptions })))),
173
194
  react_1.default.createElement("div", { className: 'flex flex-row items-center flex-none' },
174
195
  react_1.default.createElement("span", { className: "flex w-6 h-6 m-2 p-2 justify-center items-center rounded-full self-end", style: { backgroundColor: '#A3C9E5' } }, paroDocuments && docType !== 'EO Insurance' ? 3 : 4),
175
- react_1.default.createElement("input", { id: "upload-file", type: "file", accept: ".pdf,.doc,.docx,.ppt,.xls,.xlsx", style: { display: 'none' }, ref: fileInputRef, onChange: handleUpload }),
196
+ react_1.default.createElement("input", { id: "upload-file", type: "file", accept: ".pdf,.doc,.docx,.ppt,.xls,.xlsx, .csv", style: { display: 'none' }, ref: fileInputRef, onChange: handleUpload }),
176
197
  react_1.default.createElement(core_1.Tooltip, { arrow: true, placement: "top", interactive: true, className: "whitespace-nowrap", title: disableButton ? "Please fill out the required info" : "" },
177
198
  react_1.default.createElement(base_ui_1.Button, { label: "Upload", onClick: () => {
178
199
  fileInputRef.current && fileInputRef.current.click();
@@ -365,9 +365,9 @@ const ParoDocumentsTable = ({ legacyFreelancerId, expiryDate, setExpiryDate, exp
365
365
  react_1.default.createElement(core_1.Box, null,
366
366
  react_1.default.createElement(core_1.Divider, null),
367
367
  react_1.default.createElement(core_1.Typography, { variant: "h6", style: { fontWeight: 'bold' }, align: 'center' }, "No Documents Found"),
368
- react_1.default.createElement(core_1.Typography, { variant: "body1", align: 'center' }, "You haven\u2019t uploaded any documents yet. Click above and upload any .pdf , .doc, .docx, .ppt, .xls, .xlsx file. Your resume is a great way to start."))),
368
+ react_1.default.createElement(core_1.Typography, { variant: "body1", align: 'center' }, "You haven\u2019t uploaded any documents yet. Click above and upload any .pdf , .doc, .docx, .ppt, .xls, .xlsx, .csv file. Your resume is a great way to start."))),
369
369
  (expertFiles === null || expertFiles === void 0 ? void 0 : expertFiles.length) >= 10 && react_1.default.createElement(core_1.Box, { m: 2 },
370
- react_1.default.createElement(Pagination_1.default, { total: expertFiles === null || expertFiles === void 0 ? void 0 : expertFiles.length, currentPage: currentPage, setCurrentPage: setCurrentPage, perPageItems: perPageItems, setPerPageItems: setPerPageItems, displayText: "projects" })),
370
+ react_1.default.createElement(Pagination_1.default, { total: expertFiles === null || expertFiles === void 0 ? void 0 : expertFiles.length, currentPage: currentPage, setCurrentPage: setCurrentPage, perPageItems: perPageItems, setPerPageItems: setPerPageItems, displayText: "documents" })),
371
371
  react_1.default.createElement(DeleteDocumentModal_1.DeleteDocumentModal, { isDeleteModalOpen: isDeleteModalOpen, setDeleteModalOpen: setDeleteModalOpen, handleDelete: handleDelete, content: apiFoldername.split('/')[1] !== "EO Insurance" ? (react_1.default.createElement(react_1.default.Fragment, null,
372
372
  "Are you sure you want to delete document ",
373
373
  react_1.default.createElement("strong", null, deleteFileName),
@@ -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,13 +53,13 @@ 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
65
  const [openReviews, setOpenReviews] = (0, react_1.useState)(false);
@@ -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" },
@@ -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;
@@ -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;