@camunda/camunda-composite-components 0.2.1 → 0.2.2-rc.2
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.
|
@@ -55,7 +55,7 @@ export const HelpCenter = ({ configuration, organization, persona, email, audien
|
|
|
55
55
|
header = "Share your feedback";
|
|
56
56
|
content = (React.createElement(Feedback, { audience: audience, theme: theme, mixpanelTrack: mixpanelTrack, setHeader: (head) => {
|
|
57
57
|
header = head;
|
|
58
|
-
} }));
|
|
58
|
+
}, salesPlanType: organization?.organizationToSalesPlan?.salesPlan?.salesPlanType ?? "" }));
|
|
59
59
|
}
|
|
60
60
|
else if (activeTab === "recommendations" &&
|
|
61
61
|
Object.keys(tabTiles).length === 0) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Button, Checkbox, FileUploaderDropContainer, FileUploaderItem, InlineLoading, RadioTile, Stack, TextArea, Tooltip, } from "@carbon/react";
|
|
1
|
+
import { ActionableNotification, Button, Checkbox, FileUploaderDropContainer, FileUploaderItem, InlineLoading, RadioTile, Stack, TextArea, Tooltip, } from "@carbon/react";
|
|
2
2
|
import React, { useState } from "react";
|
|
3
3
|
import { Idea, Debug, Information, Chat } from "@carbon/react/icons";
|
|
4
4
|
import { submitFeedback } from "../../../api/help-center";
|
|
@@ -77,6 +77,7 @@ export const Feedback = (props) => {
|
|
|
77
77
|
console.error(err);
|
|
78
78
|
});
|
|
79
79
|
}
|
|
80
|
+
const orgIsEnterPriseOrPaidCC = props.salesPlanType === "enterprise" || props.salesPlanType === "paid-cc";
|
|
80
81
|
if (submitted) {
|
|
81
82
|
props.setHeader("");
|
|
82
83
|
return (React.createElement("div", { style: {
|
|
@@ -96,10 +97,10 @@ export const Feedback = (props) => {
|
|
|
96
97
|
React.createElement(Stack, { gap: 3 },
|
|
97
98
|
React.createElement("h2", null, "Feedback submitted successfuly"),
|
|
98
99
|
React.createElement(Stack, { gap: 6 },
|
|
99
|
-
React.createElement("p", { style: { maxWidth: "400px" } },
|
|
100
|
+
React.createElement("p", { style: { maxWidth: "400px" } }, orgIsEnterPriseOrPaidCC ? (React.createElement(React.Fragment, null, "Your feedback will be forwarded to your Customer Success Manager who will ensure that your inputs are adressed promptly.")) : (React.createElement(React.Fragment, null,
|
|
100
101
|
"Thanks for sharing your feedback. ",
|
|
101
102
|
React.createElement("br", null),
|
|
102
|
-
"We use suggestions like yours to improve our service."),
|
|
103
|
+
"We use suggestions like yours to improve our service."))),
|
|
103
104
|
React.createElement(Stack, { gap: 3 },
|
|
104
105
|
React.createElement(Button, { id: "additional-feedback-button", size: "md", onClick: () => {
|
|
105
106
|
setSuggestion("");
|
|
@@ -112,7 +113,7 @@ export const Feedback = (props) => {
|
|
|
112
113
|
return (React.createElement("div", { style: { paddingLeft: "256px" } },
|
|
113
114
|
React.createElement(Stack, { gap: 6 },
|
|
114
115
|
React.createElement("p", null, "We actively use this information to fix problems and improve your experience with our products."),
|
|
115
|
-
React.createElement("div", null,
|
|
116
|
+
!orgIsEnterPriseOrPaidCC && (React.createElement("div", null,
|
|
116
117
|
React.createElement("h5", { style: { marginBottom: "12px" } }, "What type of feedback would you like to share?"),
|
|
117
118
|
React.createElement("div", { style: {
|
|
118
119
|
display: "flex",
|
|
@@ -139,45 +140,48 @@ export const Feedback = (props) => {
|
|
|
139
140
|
}, value: ReportType.Bug, style: { minWidth: "200px" } },
|
|
140
141
|
React.createElement(Stack, null,
|
|
141
142
|
React.createElement(Debug, { size: "40" }),
|
|
142
|
-
React.createElement("p", null, "Report a bug")))))),
|
|
143
|
+
React.createElement("p", null, "Report a bug"))))))),
|
|
143
144
|
React.createElement("div", null,
|
|
144
145
|
React.createElement(Stack, null,
|
|
145
|
-
React.createElement("h5", { style: { marginBottom: "-16px" } }, content.title),
|
|
146
|
+
!orgIsEnterPriseOrPaidCC && (React.createElement("h5", { style: { marginBottom: "-16px" } }, content.title)),
|
|
147
|
+
orgIsEnterPriseOrPaidCC && (React.createElement(ActionableNotification, { inline: true, lowContrast: true, kind: "info", title: "If you are looking to get technical support, please use our Jira support system", hideCloseButton: true, style: { maxWidth: "100%" }, actionButtonLabel: "Open a ticket", onActionButtonClick: () => window.open("https://jira.camunda.com/projects/SUPPORT/queues", "_blank") })),
|
|
146
148
|
React.createElement(TextArea, { labelText: "", id: "feedback-text", placeholder: content.placeholder, rows: 4, onChange: (event) => {
|
|
147
149
|
setSuggestion(event.target.value);
|
|
148
150
|
}, value: suggestion }),
|
|
149
|
-
React.createElement(
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
React.createElement(
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
151
|
+
!orgIsEnterPriseOrPaidCC && (React.createElement(React.Fragment, null,
|
|
152
|
+
React.createElement("h5", null,
|
|
153
|
+
"Upload file (optional)",
|
|
154
|
+
React.createElement(Tooltip, { label: "Please be sure to redact any confidential information, such as intellectual property, addresses or account numbers before uploading files.",
|
|
155
|
+
// eslint-disable-next-line
|
|
156
|
+
// @ts-ignore
|
|
157
|
+
align: "bottom" },
|
|
158
|
+
React.createElement("span", { className: "upload-file" },
|
|
159
|
+
React.createElement(Button, { kind: "ghost", renderIcon: Information, iconDescription: "Information", style: {
|
|
160
|
+
marginTop: "-10px",
|
|
161
|
+
backgroundColor: props.theme === "light" ? "#FFFFFF" : "#161616",
|
|
162
|
+
color: props.theme === "light" ? "#161616" : "#F4F4F4",
|
|
163
|
+
paddingLeft: "0px",
|
|
164
|
+
} })))),
|
|
165
|
+
React.createElement("p", { className: "cds--label-description", style: { marginTop: "-24px" } }, "Max. file size is 5MB. Supported file types are .jpg and .png."))),
|
|
166
|
+
!orgIsEnterPriseOrPaidCC &&
|
|
167
|
+
(() => {
|
|
168
|
+
if (file !== undefined) {
|
|
169
|
+
return (React.createElement(FileUploaderItem, { name: file.name, iconDescription: "Delete file", invalid: (() => {
|
|
170
|
+
return file.size > 5000000;
|
|
171
|
+
})(), status: "edit", errorSubject: "File exceeds size limit.", size: "lg", style: { marginTop: "-32px", maxWidth: "100%" }, onDelete: () => {
|
|
172
|
+
setFile(undefined);
|
|
173
|
+
} }));
|
|
174
|
+
}
|
|
175
|
+
else {
|
|
176
|
+
return (React.createElement(FileUploaderDropContainer, { labelText: "Drag and drop file here or click to upload", multiple: false, accept: ["image/jpeg", "image/jpg", "image/png"], onAddFiles: (_evt, { addedFiles }) => {
|
|
177
|
+
setFile(addedFiles[0]);
|
|
178
|
+
}, style: { marginTop: "-32px", maxWidth: "100%" } }));
|
|
179
|
+
}
|
|
180
|
+
})(),
|
|
181
|
+
!orgIsEnterPriseOrPaidCC && (React.createElement("div", null,
|
|
178
182
|
React.createElement(Checkbox, { id: "allow-contact", labelText: "Camunda may contact me about my feedback", checked: allowContact, onChange: () => {
|
|
179
183
|
setAllowContact(!allowContact);
|
|
180
|
-
} })),
|
|
184
|
+
} }))),
|
|
181
185
|
React.createElement("div", null,
|
|
182
186
|
React.createElement("div", null, isDoingAsyncWork ? (React.createElement(InlineLoading, { description: "Submitting feedback...", status: "active", style: { marginLeft: "1rem" } })) : (React.createElement(Button, { kind: "primary", disabled: suggestion.trim().length == 0, onClick: submit }, "Submit feedback")))))))));
|
|
183
187
|
};
|
|
@@ -5,9 +5,6 @@ import { TAB_TYPES } from "./tabs/tabContent";
|
|
|
5
5
|
import ReactMarkdown from "react-markdown";
|
|
6
6
|
export const HelpCenterTile = ({ tile, tabType, origin, mixpanelTrack }) => {
|
|
7
7
|
const { title, description, timeToComplete, cta, image, link, card_id } = tile;
|
|
8
|
-
const linkAction = () => {
|
|
9
|
-
window.open(link, "blank");
|
|
10
|
-
};
|
|
11
8
|
if (tabType === TAB_TYPES.Grid) {
|
|
12
9
|
return (React.createElement(Tile, { style: {
|
|
13
10
|
justifySelf: "start",
|
|
@@ -25,8 +22,7 @@ export const HelpCenterTile = ({ tile, tabType, origin, mixpanelTrack }) => {
|
|
|
25
22
|
}
|
|
26
23
|
return content;
|
|
27
24
|
})()))),
|
|
28
|
-
React.createElement(Button, { onClick: () => {
|
|
29
|
-
linkAction();
|
|
25
|
+
React.createElement(Button, { as: "a", href: link, target: "_blank", onClick: () => {
|
|
30
26
|
mixpanelTrack?.(`helpcenter:click`, {
|
|
31
27
|
from: origin,
|
|
32
28
|
to: card_id,
|