@paro.io/expert-shared-components 1.13.2 → 1.13.4

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.
@@ -42,10 +42,8 @@ const FileUploader_1 = require("../FileUploader");
42
42
  const EscalationRespondForm_1 = require("./EscalationRespondForm");
43
43
  const utils_1 = require("../shared/utils");
44
44
  const EscalationChat = ({ activeChatIssue, showEscalationChat, onClose, user, createEscalationChatMessage, documentUploadUrl, bucketName, uploadExpertClientFiles, updateProjectEscalation, isExpert, }) => {
45
- var _a, _b, _c, _d;
46
- const [uploadFiles, setUploadFiles] = (0, react_1.useState)(isExpert
47
- ? (((_a = activeChatIssue === null || activeChatIssue === void 0 ? void 0 : activeChatIssue.expertSupportingDocuments) === null || _a === void 0 ? void 0 : _a.split(",")) || [])
48
- : (((_b = activeChatIssue === null || activeChatIssue === void 0 ? void 0 : activeChatIssue.clientSupportingDocuments) === null || _b === void 0 ? void 0 : _b.split(",")) || []));
45
+ var _a, _b;
46
+ const [uploadFiles, setUploadFiles] = (0, react_1.useState)([]);
49
47
  const [uploadingFile, setUploadingFile] = (0, react_1.useState)(false);
50
48
  const fileInputRef = (0, react_1.useRef)(null);
51
49
  const handleFileUpload = (event) => __awaiter(void 0, void 0, void 0, function* () {
@@ -111,7 +109,7 @@ const EscalationChat = ({ activeChatIssue, showEscalationChat, onClose, user, cr
111
109
  const docs = [activeChatIssue.expertSupportingDocuments, activeChatIssue.clientSupportingDocuments, activeChatIssue.internalSupportingDocuments, ...uploadFiles];
112
110
  const processedDocs = (0, utils_1.processDocs)(docs);
113
111
  const project = activeChatIssue.projectDetails && Array.isArray(activeChatIssue.projectDetails) && activeChatIssue.projectDetails.length > 0
114
- ? `${(_c = activeChatIssue.projectDetails[0]) === null || _c === void 0 ? void 0 : _c.projectName}${activeChatIssue.projectDetails.length > 1 ? ` +${activeChatIssue.projectDetails.length - 1} more` : ''} `
112
+ ? `${(_a = activeChatIssue.projectDetails[0]) === null || _a === void 0 ? void 0 : _a.projectName}${activeChatIssue.projectDetails.length > 1 ? ` +${activeChatIssue.projectDetails.length - 1} more` : ''} `
115
113
  : '';
116
114
  return (react_1.default.createElement(core_1.Dialog, { open: showEscalationChat, onClose: onClose, maxWidth: 'sm' },
117
115
  react_1.default.createElement(core_1.DialogTitle, null,
@@ -121,7 +119,7 @@ const EscalationChat = ({ activeChatIssue, showEscalationChat, onClose, user, cr
121
119
  react_1.default.createElement("h1", { className: "text-md font-bold mr-2" },
122
120
  "Escalation Chat #",
123
121
  activeChatIssue.escalationNumber),
124
- react_1.default.createElement(EscalationIssueCard_1.CustomTag, { label: activeChatIssue.status === "InProgress" ? "In Progress" : activeChatIssue.status })),
122
+ react_1.default.createElement(EscalationIssueCard_1.CustomTag, { label: activeChatIssue.status === "InProgress" ? "In Progress" : activeChatIssue.status, customColor: isExpert ? 'bg-neutral border-neutral' : 'bg-[#B0B5D3] border-[#181027]' })),
125
123
  react_1.default.createElement("p", { className: "text-xs" },
126
124
  activeChatIssue.problem,
127
125
  " \u2022 ",
@@ -131,7 +129,7 @@ const EscalationChat = ({ activeChatIssue, showEscalationChat, onClose, user, cr
131
129
  react_1.default.createElement(base_icons_1.IconX, null))))),
132
130
  react_1.default.createElement(core_1.DialogContent, null,
133
131
  react_1.default.createElement("div", { className: "bg-white rounded-lg w-full overflow-hidden flex flex-col p-2 mt-12" },
134
- react_1.default.createElement(DiscussionSection_1.DiscussionSection, { escalationNumber: activeChatIssue.escalationNumber, currentUser: user, messages: (_d = activeChatIssue === null || activeChatIssue === void 0 ? void 0 : activeChatIssue.chatMessages) !== null && _d !== void 0 ? _d : [], onCreateMessage: createEscalationChatMessage, isInternal: false }),
132
+ react_1.default.createElement(DiscussionSection_1.DiscussionSection, { escalationNumber: activeChatIssue.escalationNumber, currentUser: user, messages: (_b = activeChatIssue === null || activeChatIssue === void 0 ? void 0 : activeChatIssue.chatMessages) !== null && _b !== void 0 ? _b : [], onCreateMessage: createEscalationChatMessage, isInternal: false }),
135
133
  processedDocs && processedDocs.length > 0 && (react_1.default.createElement("div", { className: "flex flex-wrap gap-2 mt-4 mb-2" },
136
134
  react_1.default.createElement("span", { className: "text-sm font-bold text-gray-500 items-center" }, "Supporting Documents: "),
137
135
  processedDocs.map((d, idx) => (react_1.default.createElement(EscalationIssueCard_1.CustomTag, { key: idx, label: d.split('%2F')[1], customColor: `bg-success border-success` }))))),
@@ -76,12 +76,9 @@ const responseTypes = [
76
76
  },
77
77
  ];
78
78
  const EscalationRespondForm = ({ goBack, selectedIssue, documentUploadUrl, downloadDocumentUrl, uploadExpertClientFiles, updateProjectEscalation, bucketName, goHome, isExpert, userId, }) => {
79
- var _a, _b;
80
79
  const [selectedType, setSelectedType] = (0, react_1.useState)(responseTypes[0].value);
81
80
  const [responseInput, setResponseInput] = (0, react_1.useState)('');
82
- const [uploadFiles, setUploadFiles] = (0, react_1.useState)(isExpert
83
- ? (((_a = selectedIssue === null || selectedIssue === void 0 ? void 0 : selectedIssue.expertSupportingDocuments) === null || _a === void 0 ? void 0 : _a.split(",")) || [])
84
- : (((_b = selectedIssue === null || selectedIssue === void 0 ? void 0 : selectedIssue.clientSupportingDocuments) === null || _b === void 0 ? void 0 : _b.split(",")) || []));
81
+ const [uploadFiles, setUploadFiles] = (0, react_1.useState)([]);
85
82
  const [uploadingFile, setUploadingFile] = (0, react_1.useState)(false);
86
83
  const [submitting, setSubmitting] = (0, react_1.useState)(false);
87
84
  const fileInputRef = (0, react_1.useRef)(null);
@@ -88,7 +88,7 @@ const Escalations = ({ expertsOrClients, projects, isExpert = false, escalations
88
88
  react_1.default.createElement("div", { className: isExpert ? "p-6" : "mx-auto p-6 border-solid border-t-2" },
89
89
  activeSection === 'support' && selectedIssueId === null && react_1.default.createElement("div", null,
90
90
  react_1.default.createElement("div", { className: "flex justify-between items-center mb-1 mt-2" },
91
- react_1.default.createElement("h2", { className: "text-xl font-bold" }, "Support & Escalation Management"),
91
+ react_1.default.createElement("h2", { className: "text-xl font-bold" }, "Support & Engagement Management"),
92
92
  activeIssues.length > 0 ? react_1.default.createElement("div", { className: "flex items-center space-x-2" },
93
93
  react_1.default.createElement("div", { className: `border box-border text-center px-4 pb-0.5 pt-1 text-sm inline-block break-words text-[#A73A43] rounded-full bg-[#F9BABF] border-[#F9BABF] font-medium` },
94
94
  activeIssues.length,
@@ -96,7 +96,7 @@ const Escalations = ({ expertsOrClients, projects, isExpert = false, escalations
96
96
  react_1.default.createElement("div", { className: "border-b pb-4 mb-6" },
97
97
  react_1.default.createElement("p", { className: "text-gray-600" }, `Manage escalations with integrated chat between you, your ${isExpert ? 'client' : 'expert'}, and Paro support. All conversations are organized by priority and status.`)),
98
98
  react_1.default.createElement("div", { className: "bg-blue-50 border border-blue-200 rounded-lg p-4 mb-6" },
99
- react_1.default.createElement("h3", { className: "font-medium text-blue-800 mb-3" }, "How Our Escalation System Works"),
99
+ react_1.default.createElement("h3", { className: "font-medium text-blue-800 mb-3" }, "How Our Engagement Support System Works"),
100
100
  react_1.default.createElement("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-6" },
101
101
  react_1.default.createElement("div", null,
102
102
  react_1.default.createElement("h4", { className: "font-medium text-gray-900 mb-2" }, "Standard Resolution Process"),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@paro.io/expert-shared-components",
3
- "version": "1.13.2",
3
+ "version": "1.13.4",
4
4
  "description": "",
5
5
  "main": "lib/index.js",
6
6
  "scripts": {