@camunda/camunda-composite-components 0.2.2-rc.0 → 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.
|
@@ -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";
|
|
@@ -144,6 +144,7 @@ export const Feedback = (props) => {
|
|
|
144
144
|
React.createElement("div", null,
|
|
145
145
|
React.createElement(Stack, null,
|
|
146
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") })),
|
|
147
148
|
React.createElement(TextArea, { labelText: "", id: "feedback-text", placeholder: content.placeholder, rows: 4, onChange: (event) => {
|
|
148
149
|
setSuggestion(event.target.value);
|
|
149
150
|
}, value: suggestion }),
|
|
@@ -162,20 +163,21 @@ export const Feedback = (props) => {
|
|
|
162
163
|
paddingLeft: "0px",
|
|
163
164
|
} })))),
|
|
164
165
|
React.createElement("p", { className: "cds--label-description", style: { marginTop: "-24px" } }, "Max. file size is 5MB. Supported file types are .jpg and .png."))),
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
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
|
+
})(),
|
|
179
181
|
!orgIsEnterPriseOrPaidCC && (React.createElement("div", null,
|
|
180
182
|
React.createElement(Checkbox, { id: "allow-contact", labelText: "Camunda may contact me about my feedback", checked: allowContact, onChange: () => {
|
|
181
183
|
setAllowContact(!allowContact);
|