@camunda/camunda-composite-components 0.2.1 → 0.2.2-rc.0

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) {
@@ -4,5 +4,6 @@ export declare const Feedback: FC<{
4
4
  audience: string;
5
5
  theme: string;
6
6
  setHeader: (header: string) => void;
7
+ salesPlanType: string;
7
8
  mixpanelTrack?: (event: string, data: Dict | undefined) => void;
8
9
  }>;
@@ -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,27 +140,28 @@ 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)),
146
147
  React.createElement(TextArea, { labelText: "", id: "feedback-text", placeholder: content.placeholder, rows: 4, onChange: (event) => {
147
148
  setSuggestion(event.target.value);
148
149
  }, value: suggestion }),
149
- React.createElement("h5", null,
150
- "Upload file (optional)",
151
- React.createElement(Tooltip, { label: "Please be sure to redact any confidential information, such as intellectual property, addresses or account numbers before uploading files.",
152
- // eslint-disable-next-line
153
- // @ts-ignore
154
- align: "bottom" },
155
- React.createElement("span", { className: "upload-file" },
156
- React.createElement(Button, { kind: "ghost", renderIcon: Information, iconDescription: "Information", style: {
157
- marginTop: "-10px",
158
- backgroundColor: props.theme === "light" ? "#FFFFFF" : "#161616",
159
- color: props.theme === "light" ? "#161616" : "#F4F4F4",
160
- paddingLeft: "0px",
161
- } })))),
162
- React.createElement("p", { className: "cds--label-description", style: { marginTop: "-24px" } }, "Max. file size is 5MB. Supported file types are .jpg and .png."),
150
+ !orgIsEnterPriseOrPaidCC && (React.createElement(React.Fragment, null,
151
+ React.createElement("h5", null,
152
+ "Upload file (optional)",
153
+ React.createElement(Tooltip, { label: "Please be sure to redact any confidential information, such as intellectual property, addresses or account numbers before uploading files.",
154
+ // eslint-disable-next-line
155
+ // @ts-ignore
156
+ align: "bottom" },
157
+ React.createElement("span", { className: "upload-file" },
158
+ React.createElement(Button, { kind: "ghost", renderIcon: Information, iconDescription: "Information", style: {
159
+ marginTop: "-10px",
160
+ backgroundColor: props.theme === "light" ? "#FFFFFF" : "#161616",
161
+ color: props.theme === "light" ? "#161616" : "#F4F4F4",
162
+ paddingLeft: "0px",
163
+ } })))),
164
+ React.createElement("p", { className: "cds--label-description", style: { marginTop: "-24px" } }, "Max. file size is 5MB. Supported file types are .jpg and .png."))),
163
165
  (() => {
164
166
  if (file !== undefined) {
165
167
  return (React.createElement(FileUploaderItem, { name: file.name, iconDescription: "Delete file", invalid: (() => {
@@ -174,10 +176,10 @@ export const Feedback = (props) => {
174
176
  }, style: { marginTop: "-32px", maxWidth: "100%" } }));
175
177
  }
176
178
  })(),
177
- React.createElement("div", null,
179
+ !orgIsEnterPriseOrPaidCC && (React.createElement("div", null,
178
180
  React.createElement(Checkbox, { id: "allow-contact", labelText: "Camunda may contact me about my feedback", checked: allowContact, onChange: () => {
179
181
  setAllowContact(!allowContact);
180
- } })),
182
+ } }))),
181
183
  React.createElement("div", null,
182
184
  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
185
  };
@@ -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,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camunda/camunda-composite-components",
3
- "version": "0.2.1",
3
+ "version": "0.2.2-rc.0",
4
4
  "scripts": {
5
5
  "clean": "rimraf lib/",
6
6
  "build": "yarn clean && tsc",