@paro.io/expert-shared-components 1.12.41 → 1.12.43
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.
- package/lib/components/Escalations/EscalationChat.d.ts +8 -1
- package/lib/components/Escalations/EscalationChat.js +80 -23
- package/lib/components/Escalations/EscalationIssueCard.d.ts +7 -3
- package/lib/components/Escalations/EscalationIssueCard.js +38 -20
- package/lib/components/Escalations/EscalationRespondForm.d.ts +9 -1
- package/lib/components/Escalations/EscalationRespondForm.js +128 -20
- package/lib/components/Escalations/EscalationSubmitForm.d.ts +7 -2
- package/lib/components/Escalations/EscalationSubmitForm.js +138 -39
- package/lib/components/Escalations/EscalationTabsContent.d.ts +5 -8
- package/lib/components/Escalations/EscalationTabsContent.js +4 -9
- package/lib/components/Escalations/Escalations.d.ts +11 -5
- package/lib/components/Escalations/Escalations.js +8 -5
- package/lib/components/FileUploader/index.d.ts +9 -5
- package/lib/components/FileUploader/index.js +55 -9
- package/lib/components/Invoices/ClientDisputeProjectCard.d.ts +1 -1
- package/lib/components/Invoices/ClientDisputeProjectCard.js +3 -3
- package/lib/components/Invoices/DiscussionSection.d.ts +2 -2
- package/lib/components/Invoices/DiscussionSection.js +2 -2
- package/lib/components/Invoices/DisputeSection.js +1 -1
- package/lib/components/shared/UploadClient.d.ts +2 -1
- package/lib/components/shared/UploadClient.js +7 -4
- package/lib/components/shared/utils.d.ts +1 -0
- package/lib/components/shared/utils.js +6 -1
- package/lib/index.d.ts +0 -1
- package/lib/index.js +1 -3
- package/package.json +8 -2
|
@@ -18,18 +18,21 @@ class UploadClient {
|
|
|
18
18
|
documentUploadUrl: props.documentUploadUrl,
|
|
19
19
|
projectId: props.projectId,
|
|
20
20
|
bucketName: props.bucketName,
|
|
21
|
+
escalationId: props.escalationId,
|
|
21
22
|
};
|
|
22
23
|
}
|
|
23
|
-
generateS3Key(projectId, fileName) {
|
|
24
|
+
generateS3Key(projectId, escalationId, fileName) {
|
|
24
25
|
const sanitizedFileName = fileName.replace(/[^a-zA-Z0-9.-]/g, '_');
|
|
25
|
-
|
|
26
|
-
|
|
26
|
+
if (escalationId) {
|
|
27
|
+
return `escalation-${escalationId}/${sanitizedFileName}`;
|
|
28
|
+
}
|
|
29
|
+
return `project-${projectId}/${sanitizedFileName}`;
|
|
27
30
|
}
|
|
28
31
|
;
|
|
29
32
|
triggerMultipartUpload() {
|
|
30
33
|
return __awaiter(this, void 0, void 0, function* () {
|
|
31
34
|
try {
|
|
32
|
-
const fileName = this.generateS3Key(this.state.projectId, this.state.fileName);
|
|
35
|
+
const fileName = this.generateS3Key(this.state.projectId, this.state.escalationId, this.state.fileName);
|
|
33
36
|
console.log('File Name', fileName);
|
|
34
37
|
this.state = Object.assign(Object.assign({}, this.state), { fileName: fileName });
|
|
35
38
|
const params = {
|
|
@@ -40,6 +40,7 @@ export declare const features: string[];
|
|
|
40
40
|
export declare const titleFeatures: string[];
|
|
41
41
|
export declare const serviceDescriptions: Record<string, string>;
|
|
42
42
|
export declare const selectedServicesReducer: (selectedServices: any, action: any) => any;
|
|
43
|
+
export declare const generateUUID: () => string;
|
|
43
44
|
export declare const sharedUtils: {
|
|
44
45
|
selectedServicesReducer: (selectedServices: any, action: any) => any;
|
|
45
46
|
};
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.sharedUtils = exports.selectedServicesReducer = exports.serviceDescriptions = exports.titleFeatures = exports.features = exports.titleMappings = exports.DOCUMENT_TYPE_CONSTANTS = exports.validateFileUpload = exports.showToast = exports.MAX_FILE_SIZE = exports.ACCEPTED_FILE_TYPES = exports.formatDate = exports.CustomPaper = exports.handleDownloadPdf = exports.getFileMimeType = exports.stateAbbreviationMap = exports.getPreviousMonthStartDate = exports.isOlderThan30Days = exports.formatTenure = exports.isOnClickEvent = void 0;
|
|
3
|
+
exports.sharedUtils = exports.generateUUID = exports.selectedServicesReducer = exports.serviceDescriptions = exports.titleFeatures = exports.features = exports.titleMappings = exports.DOCUMENT_TYPE_CONSTANTS = exports.validateFileUpload = exports.showToast = exports.MAX_FILE_SIZE = exports.ACCEPTED_FILE_TYPES = exports.formatDate = exports.CustomPaper = exports.handleDownloadPdf = exports.getFileMimeType = exports.stateAbbreviationMap = exports.getPreviousMonthStartDate = exports.isOlderThan30Days = exports.formatTenure = exports.isOnClickEvent = void 0;
|
|
4
4
|
exports.getComparator = getComparator;
|
|
5
5
|
exports.stableSort = stableSort;
|
|
6
6
|
exports.compareItems = compareItems;
|
|
7
7
|
const core_1 = require("@material-ui/core");
|
|
8
8
|
const ReviewsTab_1 = require("../ReviewsTab/ReviewsTab");
|
|
9
|
+
const uuid_1 = require("uuid");
|
|
9
10
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
10
11
|
const isOnClickEvent = (potentialEvent) => {
|
|
11
12
|
return (potentialEvent === null || potentialEvent === void 0 ? void 0 : potentialEvent.type) === 'mouseup' || (potentialEvent === null || potentialEvent === void 0 ? void 0 : potentialEvent.type) === 'keydown' || (potentialEvent === null || potentialEvent === void 0 ? void 0 : potentialEvent.type) === 'click';
|
|
@@ -357,4 +358,8 @@ const selectedServicesReducer = (selectedServices, action) => {
|
|
|
357
358
|
}
|
|
358
359
|
};
|
|
359
360
|
exports.selectedServicesReducer = selectedServicesReducer;
|
|
361
|
+
const generateUUID = () => {
|
|
362
|
+
return (0, uuid_1.v4)();
|
|
363
|
+
};
|
|
364
|
+
exports.generateUUID = generateUUID;
|
|
360
365
|
exports.sharedUtils = { selectedServicesReducer: exports.selectedServicesReducer };
|
package/lib/index.d.ts
CHANGED
|
@@ -11,7 +11,6 @@ export { ServiceLinesTemplate } from './components/ServiceLinesTemplate';
|
|
|
11
11
|
export { sharedUtils } from './components/shared/utils';
|
|
12
12
|
export { ActiveProjectCard } from './components/ProjectCard/ActiveProjectCard';
|
|
13
13
|
export { InvoiceCard } from './components/Invoices/InvoiceCard';
|
|
14
|
-
export { DiscussionThread } from './components/DiscussionThread';
|
|
15
14
|
export { fileUploader } from './components/FileUploader';
|
|
16
15
|
export { DiscussionSection } from './components/Invoices/DiscussionSection';
|
|
17
16
|
export { fileDownloader } from './components/FileDownloader';
|
package/lib/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Escalations = exports.fileDownloader = exports.DiscussionSection = exports.fileUploader = exports.
|
|
3
|
+
exports.Escalations = exports.fileDownloader = exports.DiscussionSection = exports.fileUploader = exports.InvoiceCard = exports.ActiveProjectCard = exports.sharedUtils = exports.ServiceLinesTemplate = exports.HeaderNavBar = exports.DocumentCenter = exports.ProfileCompletedPercentage = exports.ExpertProfileHeader = exports.OrganizationChart = exports.FirmEmployeeSection = exports.ClientReferenceSection = exports.Reviews = exports.ReviewsTab = void 0;
|
|
4
4
|
var ReviewsTab_1 = require("./components/ReviewsTab");
|
|
5
5
|
Object.defineProperty(exports, "ReviewsTab", { enumerable: true, get: function () { return ReviewsTab_1.ReviewsTab; } });
|
|
6
6
|
var Reviews_1 = require("./components/Reviews");
|
|
@@ -27,8 +27,6 @@ var ActiveProjectCard_1 = require("./components/ProjectCard/ActiveProjectCard");
|
|
|
27
27
|
Object.defineProperty(exports, "ActiveProjectCard", { enumerable: true, get: function () { return ActiveProjectCard_1.ActiveProjectCard; } });
|
|
28
28
|
var InvoiceCard_1 = require("./components/Invoices/InvoiceCard");
|
|
29
29
|
Object.defineProperty(exports, "InvoiceCard", { enumerable: true, get: function () { return InvoiceCard_1.InvoiceCard; } });
|
|
30
|
-
var DiscussionThread_1 = require("./components/DiscussionThread");
|
|
31
|
-
Object.defineProperty(exports, "DiscussionThread", { enumerable: true, get: function () { return DiscussionThread_1.DiscussionThread; } });
|
|
32
30
|
var FileUploader_1 = require("./components/FileUploader");
|
|
33
31
|
Object.defineProperty(exports, "fileUploader", { enumerable: true, get: function () { return FileUploader_1.fileUploader; } });
|
|
34
32
|
var DiscussionSection_1 = require("./components/Invoices/DiscussionSection");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@paro.io/expert-shared-components",
|
|
3
|
-
"version": "1.12.
|
|
3
|
+
"version": "1.12.43",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -14,7 +14,11 @@
|
|
|
14
14
|
"unlink-local": "yarn unlink && cd node_modules/react && yarn unlink && cd ../react-dom && yarn unlink"
|
|
15
15
|
},
|
|
16
16
|
"repository": "https://github.com/paroadmin/expert-shared-components.git",
|
|
17
|
-
"keywords": [
|
|
17
|
+
"keywords": [
|
|
18
|
+
"react",
|
|
19
|
+
"components",
|
|
20
|
+
"shared"
|
|
21
|
+
],
|
|
18
22
|
"author": "apande@paro.io",
|
|
19
23
|
"license": "MIT",
|
|
20
24
|
"dependencies": {
|
|
@@ -40,6 +44,7 @@
|
|
|
40
44
|
"react-hot-toast": "^2.4.1",
|
|
41
45
|
"react-input-mask": "^3.0.0-alpha.2",
|
|
42
46
|
"styled-components": "^5.3.3",
|
|
47
|
+
"uuid": "^11.1.0",
|
|
43
48
|
"yup": "^0.32.11"
|
|
44
49
|
},
|
|
45
50
|
"devDependencies": {
|
|
@@ -49,6 +54,7 @@
|
|
|
49
54
|
"@types/react-datepicker": "^4.19.6",
|
|
50
55
|
"@types/react-dom": "^18.2.22",
|
|
51
56
|
"@types/styled-components": "^5.1.22",
|
|
57
|
+
"@types/uuid": "^10.0.0",
|
|
52
58
|
"@types/yup": "^0.29.13",
|
|
53
59
|
"typescript": "^5.3.3"
|
|
54
60
|
},
|