@paro.io/expert-shared-components 1.6.7 → 1.6.9

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 (35) 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.js +6 -4
  13. package/lib/components/DocumentCenter/DocumentTable.d.ts +15 -15
  14. package/lib/components/DocumentCenter/DocumentTable.js +350 -350
  15. package/lib/components/DocumentCenter/DocumentUploadRow.js +1 -1
  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 +7 -7
  20. package/lib/components/HeaderNavBar/index.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/ReviewsTab/RatingHeader.js +6 -6
  24. package/lib/components/ReviewsTab/expert-shared-components.code-workspace +20 -20
  25. package/lib/components/ReviewsTab/reviewRequestModal.js +5 -5
  26. package/lib/components/shared/Error.d.ts +6 -6
  27. package/lib/components/shared/Error.js +40 -40
  28. package/lib/components/shared/Image.js +13 -13
  29. package/lib/components/shared/ProfileTextField.d.ts +18 -18
  30. package/lib/components/shared/ProfileTextField.js +16 -16
  31. package/lib/components/shared/StyledActionButtons.d.ts +7 -7
  32. package/lib/components/shared/StyledActionButtons.js +15 -15
  33. package/lib/components/shared/ToastNotification.d.ts +10 -10
  34. package/lib/components/shared/ToastNotification.js +63 -63
  35. package/package.json +59 -59
@@ -15,26 +15,26 @@ const omitDeleteButtonIconProps = ["isDisabled"];
15
15
  const omitDeleteButtonTypographyProps = ["isDisabled"];
16
16
  const DeleteButtonTypography = (0, styled_components_1.default)((props) => {
17
17
  return react_1.default.createElement(Typography_1.default, Object.assign({}, (0, omit_1.default)(props, omitDeleteButtonTypographyProps)));
18
- }) `
19
- padding-right: 17px;
20
- color: ${colors_1.default.deleteButtonRed} !important ;
18
+ }) `
19
+ padding-right: 17px;
20
+ color: ${colors_1.default.deleteButtonRed} !important ;
21
21
  ${({ isDisabled }) => {
22
22
  return (isDisabled &&
23
- `
24
- color: ${colors_1.default.notice} !important;
23
+ `
24
+ color: ${colors_1.default.notice} !important;
25
25
  `);
26
- }}
26
+ }}
27
27
  `;
28
28
  const DeleteButtonIcon = (0, styled_components_1.default)((props) => {
29
29
  return react_1.default.createElement(Clear_1.default, Object.assign({}, (0, omit_1.default)(props, omitDeleteButtonIconProps)));
30
- }) `
31
- color: ${colors_1.default.deleteButtonRed} !important ;
30
+ }) `
31
+ color: ${colors_1.default.deleteButtonRed} !important ;
32
32
  ${({ isDisabled }) => {
33
33
  return (isDisabled &&
34
- `
35
- color: ${colors_1.default.notice} !important;
34
+ `
35
+ color: ${colors_1.default.notice} !important;
36
36
  `);
37
- }}
37
+ }}
38
38
  `;
39
39
  const DeleteButton = ({ buttonText, onClick, variant = "text", isDisabled, className }) => {
40
40
  return (react_1.default.createElement(Buttons_1.StyledEditOrDeleteButton, { onClick: () => {
@@ -9,18 +9,18 @@ const core_1 = require("@material-ui/core");
9
9
  const styled_components_1 = __importDefault(require("styled-components"));
10
10
  const colors_1 = __importDefault(require("./constants/colors"));
11
11
  const AlertSnackBarButton_1 = require("./AlertSnackBarButton");
12
- const ErrorBox = (0, styled_components_1.default)(core_1.Box) `
13
- width: 100%;
14
- padding-bottom: 100;
12
+ const ErrorBox = (0, styled_components_1.default)(core_1.Box) `
13
+ width: 100%;
14
+ padding-bottom: 100;
15
15
  `;
16
- const ParoTitle = (0, styled_components_1.default)(core_1.Box) `
17
- color: ${colors_1.default.paroBlack};
18
- padding: 0px 0px 18px 0px;
16
+ const ParoTitle = (0, styled_components_1.default)(core_1.Box) `
17
+ color: ${colors_1.default.paroBlack};
18
+ padding: 0px 0px 18px 0px;
19
19
  `;
20
- const ParoSubtitle = styled_components_1.default.div `
21
- color: ${colors_1.default.paroBlack};
22
- margin-bottom: 24px;
23
- font-size: 1rem;
20
+ const ParoSubtitle = styled_components_1.default.div `
21
+ color: ${colors_1.default.paroBlack};
22
+ margin-bottom: 24px;
23
+ font-size: 1rem;
24
24
  `;
25
25
  const ParoError = ({ handleClose }) => {
26
26
  const handleCancelLanguage = handleClose ? "Close" : "Retry";
@@ -9,8 +9,8 @@ const core_1 = require("@material-ui/core");
9
9
  const styled_components_1 = __importDefault(require("styled-components"));
10
10
  const NullContentConditionalColor_1 = require("./styles/NullContentConditionalColor");
11
11
  const Tags_1 = require("./styles/Tags");
12
- const ProfileTags = (0, styled_components_1.default)(Tags_1.Tags) `
13
- margin: 0 5px 8px 0;
12
+ const ProfileTags = (0, styled_components_1.default)(Tags_1.Tags) `
13
+ margin: 0 5px 8px 0;
14
14
  `;
15
15
  const TagsSection = ({ multiLine, tags = [], tagsExpected, }) => {
16
16
  if ((tags === null || tags === void 0 ? void 0 : tags.length) < 1) {
@@ -7,6 +7,6 @@ exports.StyledTypography = void 0;
7
7
  const Typography_1 = __importDefault(require("@material-ui/core/Typography"));
8
8
  const styled_components_1 = __importDefault(require("styled-components"));
9
9
  const colors_1 = __importDefault(require("../constants/colors"));
10
- exports.StyledTypography = (0, styled_components_1.default)(Typography_1.default) `
11
- color: ${colors_1.default.paroDeepblue} !important ;
10
+ exports.StyledTypography = (0, styled_components_1.default)(Typography_1.default) `
11
+ color: ${colors_1.default.paroDeepblue} !important ;
12
12
  `;
@@ -7,21 +7,21 @@ exports.StyledEditOrDeleteButton = exports.HeaderButtonUnderline = exports.Heade
7
7
  const core_1 = require("@material-ui/core");
8
8
  const styled_components_1 = __importDefault(require("styled-components"));
9
9
  const colors_1 = __importDefault(require("../constants/colors"));
10
- exports.HeaderButtons = (0, styled_components_1.default)(core_1.Button) `
11
- margin-left: 0px !important;
12
- padding-left: 0px !important;
13
- span {
14
- color: ${colors_1.default.buttonText} !important;
15
- }
10
+ exports.HeaderButtons = (0, styled_components_1.default)(core_1.Button) `
11
+ margin-left: 0px !important;
12
+ padding-left: 0px !important;
13
+ span {
14
+ color: ${colors_1.default.buttonText} !important;
15
+ }
16
16
  `;
17
- exports.HeaderButtonUnderline = (0, styled_components_1.default)(exports.HeaderButtons) `
18
- text-decoration: underline;
17
+ exports.HeaderButtonUnderline = (0, styled_components_1.default)(exports.HeaderButtons) `
18
+ text-decoration: underline;
19
19
  `;
20
- exports.StyledEditOrDeleteButton = (0, styled_components_1.default)(core_1.Button) `
21
- margin: 10px 0px !important;
22
- background-color: ${colors_1.default.primary};
23
- color: ${colors_1.default.white};
24
- :hover {
25
- color: ${colors_1.default.primary} !important;
26
- }
20
+ exports.StyledEditOrDeleteButton = (0, styled_components_1.default)(core_1.Button) `
21
+ margin: 10px 0px !important;
22
+ background-color: ${colors_1.default.primary};
23
+ color: ${colors_1.default.white};
24
+ :hover {
25
+ color: ${colors_1.default.primary} !important;
26
+ }
27
27
  `;
@@ -11,12 +11,12 @@ const styled_components_1 = __importDefault(require("styled-components"));
11
11
  const colors_1 = __importDefault(require("../constants/colors"));
12
12
  exports.Name = (0, styled_components_1.default)((props) => {
13
13
  return react_1.default.createElement(core_1.Typography, Object.assign({}, (0, omit_1.default)(props, ["isNull"])));
14
- }) `
15
- font-family: Roboto-Bold;
14
+ }) `
15
+ font-family: Roboto-Bold;
16
16
  ${({ isNull }) => {
17
17
  return (isNull &&
18
- `
19
- color: ${colors_1.default.paroRed} !important;
18
+ `
19
+ color: ${colors_1.default.paroRed} !important;
20
20
  `);
21
- }}
21
+ }}
22
22
  `;
@@ -6,11 +6,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.NullContentConditionalColor = void 0;
7
7
  const styled_components_1 = __importDefault(require("styled-components"));
8
8
  const colors_1 = __importDefault(require("../constants/colors"));
9
- exports.NullContentConditionalColor = styled_components_1.default.span `
9
+ exports.NullContentConditionalColor = styled_components_1.default.span `
10
10
  ${(props) => {
11
11
  return (props.isNull &&
12
- `
13
- color: ${colors_1.default.paroRed} !important
12
+ `
13
+ color: ${colors_1.default.paroRed} !important
14
14
  `);
15
- }}
15
+ }}
16
16
  `;
@@ -10,18 +10,18 @@ const styled_components_1 = __importDefault(require("styled-components"));
10
10
  const colors_1 = __importDefault(require("../constants/colors"));
11
11
  exports.SectionBody = (0, styled_components_1.default)((props) => {
12
12
  return react_1.default.createElement("div", Object.assign({}, (0, omit_1.default)(props, ["atLeastOneValueIsNull"])));
13
- }) `
14
- background-color: ${colors_1.default.white};
15
- border-radius: 2px;
16
- border: 1px Solid ${colors_1.default.lightGray};
17
- color: ${colors_1.default.paroBlack};
18
- font-family: Roboto;
19
- padding: 32.5px 42.5px 32.5px 42.5px;
20
- width: 100%;
13
+ }) `
14
+ background-color: ${colors_1.default.white};
15
+ border-radius: 2px;
16
+ border: 1px Solid ${colors_1.default.lightGray};
17
+ color: ${colors_1.default.paroBlack};
18
+ font-family: Roboto;
19
+ padding: 32.5px 42.5px 32.5px 42.5px;
20
+ width: 100%;
21
21
  ${({ atLeastOneValueIsNull }) => {
22
22
  return (atLeastOneValueIsNull &&
23
- `
24
- border-color: ${colors_1.default.paroRed} !important;
23
+ `
24
+ border-color: ${colors_1.default.paroRed} !important;
25
25
  `);
26
- }}
26
+ }}
27
27
  `;
@@ -10,12 +10,12 @@ const styled_components_1 = __importDefault(require("styled-components"));
10
10
  const colors_1 = __importDefault(require("../constants/colors"));
11
11
  exports.SectionTitle = (0, styled_components_1.default)((props) => {
12
12
  return react_1.default.createElement("div", Object.assign({}, (0, omit_1.default)(props, ["noBottomPadding"])));
13
- }) `
14
- font-family: Roboto-Bold;
15
- font-size: 20px;
16
- color: ${colors_1.default.paroBlack};
17
- padding: 23px 0px 15.5px 0px;
13
+ }) `
14
+ font-family: Roboto-Bold;
15
+ font-size: 20px;
16
+ color: ${colors_1.default.paroBlack};
17
+ padding: 23px 0px 15.5px 0px;
18
18
  ${({ noBottomPadding }) => {
19
19
  return noBottomPadding && "padding-bottom: 0 !important;";
20
- }}
20
+ }}
21
21
  `;
@@ -6,6 +6,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.Tags = void 0;
7
7
  const core_1 = require("@material-ui/core");
8
8
  const styled_components_1 = __importDefault(require("styled-components"));
9
- exports.Tags = (0, styled_components_1.default)(core_1.Chip) `
10
- font-family: Roboto-Bold;
9
+ exports.Tags = (0, styled_components_1.default)(core_1.Chip) `
10
+ font-family: Roboto-Bold;
11
11
  `;
@@ -337,7 +337,7 @@ const ClientDocumentsTable = ({ legacyFreelancerId, expertFiles, setExpertClient
337
337
  return (react_1.default.createElement(react_1.default.Fragment, null,
338
338
  react_1.default.createElement(DocumentUploadRow_1.DocumentUploadRow, { clientAndProject: clientAndProject, setClientAndProject: setClientAndProject, clientAndProjectsList: clientAndProjectsList, docType: docType, setDocType: setDocType, paroDocuments: paroDocuments, uploadExpertClientFiles: uploadExpertClientFiles, refetchFiles: refetchFiles, legacyFreelancerId: legacyFreelancerId, freelancerName: freelancerName, freelancerEmail: freelancerEmail, isClientPortal: isClientPortal, documentUploadUrl: documentUploadUrl }),
339
339
  react_1.default.createElement(utils_1.CustomPaper, { style: { height: `${(files === null || files === void 0 ? void 0 : files.length) === 0 ? '30vh' : 'auto'}` } },
340
- react_1.default.createElement("div", { className: 'w-1/3' },
340
+ react_1.default.createElement("div", { className: 'w-1/3', "data-tut": "search_button", id: "search_button" },
341
341
  react_1.default.createElement(base_ui_1.Input, { placeholder: "Search Documents", type: "text", value: searchText, onChange: (e) => setSearchText(e.target.value) })),
342
342
  react_1.default.createElement(core_1.Box, { mt: 2 }, (files === null || files === void 0 ? void 0 : files.length) > 0 ? react_1.default.createElement(core_1.Table, { style: { overflow: 'auto' } },
343
343
  react_1.default.createElement(core_1.TableHead, null,
@@ -80,17 +80,18 @@ const CustomDialogContent = (0, core_1.styled)(core_1.DialogContent)(({ theme })
80
80
  background: '#707070',
81
81
  },
82
82
  }));
83
- const DocumentCenter = ({ legacyFreelancerId, openModal, setOpenModal, expertClientFilesLazyQuery, getClientAndProjectsLazyQuery, clientFilesData, uploadExpertClientFiles, uploadFileData, deleteFileMutation, updateFreelancerExpiryMutation, foldername, getFilesLazyQuery, getFileLazyQuery, freelancerName, freelancerEmail, updateFileLastViewed, deleteExpertClientFile, isClientPortal = false, expertProjectsList, getFreelancerLazyQuery, documentUploadUrl, downloadDocumentUrl, loading, }) => {
83
+ const DocumentCenter = ({ legacyFreelancerId, openModal, setOpenModal, expertClientFilesLazyQuery, getClientAndProjectsLazyQuery, clientFilesData, uploadExpertClientFiles, uploadFileData, deleteFileMutation, updateFreelancerExpiryMutation, foldername, getFilesLazyQuery, getFileLazyQuery, freelancerName, freelancerEmail, updateFileLastViewed, deleteExpertClientFile, isClientPortal = false, expertProjectsList, getFreelancerLazyQuery, documentUploadUrl, downloadDocumentUrl, loading = false, }) => {
84
84
  var _a;
85
85
  const [value, setValue] = (0, react_1.useState)(0);
86
86
  const [expertClientFiles, setExpertClientFiles] = (0, react_1.useState)(clientFilesData !== null && clientFilesData !== void 0 ? clientFilesData : []);
87
87
  const [expertFiles, setExpertFiles] = (0, react_1.useState)([]);
88
88
  const [clientAndProjects, setClientAndProjects] = (0, react_1.useState)([]);
89
89
  const [insuranceExpiryDate, setInsuranceExpiryDate] = (0, react_1.useState)();
90
+ const [expertLoading, setExpertLoading] = (0, react_1.useState)(false);
90
91
  const fetchQueries = () => __awaiter(void 0, void 0, void 0, function* () {
91
92
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
92
93
  try {
93
- loading = true;
94
+ setExpertLoading(true);
94
95
  const freelancerIds = Array.isArray(legacyFreelancerId) ? legacyFreelancerId : [legacyFreelancerId];
95
96
  let clientFiles = [];
96
97
  let clientAndProjects = [];
@@ -107,6 +108,7 @@ const DocumentCenter = ({ legacyFreelancerId, openModal, setOpenModal, expertCli
107
108
  expertFiles = (_g = (_f = expertFilesResponse === null || expertFilesResponse === void 0 ? void 0 : expertFilesResponse.data) === null || _f === void 0 ? void 0 : _f.getFiles) !== null && _g !== void 0 ? _g : [];
108
109
  expiryDate = (_j = (_h = freelancerData === null || freelancerData === void 0 ? void 0 : freelancerData.data) === null || _h === void 0 ? void 0 : _h.getFreelancer) === null || _j === void 0 ? void 0 : _j.insuranceExpiryDate;
109
110
  const filterProjects = clientAndProjects.filter((p) => p.status !== 'Complete');
111
+ setExpertClientFiles(clientFiles);
110
112
  setClientAndProjects(isClientPortal ? expertProjectsList : filterProjects);
111
113
  setExpertFiles(expertFiles);
112
114
  setInsuranceExpiryDate(expiryDate ? (0, utils_1.formatDate)(expiryDate) : '');
@@ -115,7 +117,7 @@ const DocumentCenter = ({ legacyFreelancerId, openModal, setOpenModal, expertCli
115
117
  console.error("Error fetching queries:", error);
116
118
  }
117
119
  finally {
118
- loading = false;
120
+ setExpertLoading(false);
119
121
  }
120
122
  });
121
123
  (0, react_1.useEffect)(() => {
@@ -152,7 +154,7 @@ const DocumentCenter = ({ legacyFreelancerId, openModal, setOpenModal, expertCli
152
154
  react_1.default.createElement(core_1.IconButton, { onClick: () => setOpenModal(false) },
153
155
  react_1.default.createElement(core_1.Box, { style: { backgroundColor: 'white', width: 40, height: 40, borderRadius: '4px' } },
154
156
  react_1.default.createElement(Close_1.default, null))))),
155
- react_1.default.createElement(CustomDialogContent, { style: { width: '100%' } }, loading
157
+ react_1.default.createElement(CustomDialogContent, { style: { width: '100%' } }, loading || expertLoading
156
158
  ?
157
159
  react_1.default.createElement(core_1.CircularProgress, { size: 24 })
158
160
  :
@@ -1,15 +1,15 @@
1
- interface DocumentTableProps {
2
- legacyFreelancerId: number;
3
- paroProjectsData: any;
4
- expiryDate: string;
5
- expertFiles: any[];
6
- uploadExpertClientFiles: any;
7
- uploadFileData: any;
8
- deleteFileMutation: any;
9
- updateFreelancerExpiryMutation: any;
10
- GetFilesDocument: any;
11
- foldername: string;
12
- paroDocuments: boolean;
13
- }
14
- export declare const DocumentTable: ({ legacyFreelancerId, paroProjectsData, expiryDate, expertFiles, uploadExpertClientFiles, uploadFileData, deleteFileMutation, updateFreelancerExpiryMutation, GetFilesDocument, foldername, paroDocuments }: DocumentTableProps) => JSX.Element;
15
- export {};
1
+ interface DocumentTableProps {
2
+ legacyFreelancerId: number;
3
+ paroProjectsData: any;
4
+ expiryDate: string;
5
+ expertFiles: any[];
6
+ uploadExpertClientFiles: any;
7
+ uploadFileData: any;
8
+ deleteFileMutation: any;
9
+ updateFreelancerExpiryMutation: any;
10
+ GetFilesDocument: any;
11
+ foldername: string;
12
+ paroDocuments: boolean;
13
+ }
14
+ export declare const DocumentTable: ({ legacyFreelancerId, paroProjectsData, expiryDate, expertFiles, uploadExpertClientFiles, uploadFileData, deleteFileMutation, updateFreelancerExpiryMutation, GetFilesDocument, foldername, paroDocuments }: DocumentTableProps) => JSX.Element;
15
+ export {};