@camunda/camunda-composite-components 0.2.2-rc.2 → 0.2.2-rc.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.
@@ -18,6 +18,7 @@ export const C3HelpCenter = ({ autoStartSurvey, origin, flags, isOpen, onRequest
18
18
  const [userId, setUserId] = useState("");
19
19
  const [token, setToken] = useState("");
20
20
  const [audience, setAudience] = useState("");
21
+ const [organizationId, setOrganizationId] = useState(null);
21
22
  const [organization, setOrganization] = useState(null);
22
23
  const [clusters, setClusters] = useState([]);
23
24
  const [helpCenterConfig, setHelpCenterConfig] = useState(defaultHelpCenterConfig);
@@ -75,11 +76,15 @@ export const C3HelpCenter = ({ autoStartSurvey, origin, flags, isOpen, onRequest
75
76
  }
76
77
  };
77
78
  React.useEffect(() => {
78
- if (token !== userToken && !!userToken) {
79
+ const tokenChanged = token !== userToken && !!userToken;
80
+ const orgChanged = organizationId !== activeOrganizationId && !!activeOrganizationId;
81
+ if (tokenChanged)
79
82
  setToken(userToken);
83
+ if (orgChanged)
84
+ setOrganizationId(activeOrganizationId);
85
+ if (tokenChanged || orgChanged)
80
86
  fetchData();
81
- }
82
- }, [userToken]);
87
+ }, [userToken, activeOrganizationId]);
83
88
  React.useEffect(() => {
84
89
  const tabs = helpCenterConfig.tabs;
85
90
  const firstTab = tabs[0].id;
@@ -59,6 +59,9 @@ export const Feedback = (props) => {
59
59
  formData.append("reportType", selectedType);
60
60
  formData.append("suggestion", suggestion);
61
61
  formData.append("allowContact", "" + allowContact);
62
+ if (props.salesPlanType) {
63
+ formData.append("salesPlanType", props.salesPlanType);
64
+ }
62
65
  if (file) {
63
66
  formData.append("file", file);
64
67
  }
@@ -95,9 +98,9 @@ export const Feedback = (props) => {
95
98
  React.createElement("svg", { width: "62", height: "54", viewBox: "0 0 62 54", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
96
99
  React.createElement("path", { d: "M60.7573 6.91209L56.137 2.22698C55.3173 1.39576 54.2441 0.972656 53.1711 0.972656C52.0981 0.972656 51.0248 1.39576 50.2051 2.22698L20.635 32.2572L11.7819 23.2496C10.9622 22.4184 9.88904 21.9953 8.81588 21.9953C7.74272 21.9953 6.66971 22.4032 5.85001 23.2496L1.22972 27.9347C-0.409906 29.5972 -0.409906 32.3025 1.22972 33.9649L20.65 53.6726L60.7723 12.9425C62.4117 11.2798 62.4117 8.57471 60.7573 6.91209Z", fill: "#FC5D0D" })),
97
100
  React.createElement(Stack, { gap: 3 },
98
- React.createElement("h2", null, "Feedback submitted successfuly"),
101
+ React.createElement("h2", null, "Feedback submitted successfully"),
99
102
  React.createElement(Stack, { gap: 6 },
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,
103
+ 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 addressed promptly.")) : (React.createElement(React.Fragment, null,
101
104
  "Thanks for sharing your feedback. ",
102
105
  React.createElement("br", null),
103
106
  "We use suggestions like yours to improve our service."))),
@@ -144,7 +147,7 @@ export const Feedback = (props) => {
144
147
  React.createElement("div", null,
145
148
  React.createElement(Stack, null,
146
149
  !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") })),
150
+ 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") })),
148
151
  React.createElement(TextArea, { labelText: "", id: "feedback-text", placeholder: content.placeholder, rows: 4, onChange: (event) => {
149
152
  setSuggestion(event.target.value);
150
153
  }, value: suggestion }),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camunda/camunda-composite-components",
3
- "version": "0.2.2-rc.2",
3
+ "version": "0.2.2-rc.4",
4
4
  "scripts": {
5
5
  "clean": "rimraf lib/",
6
6
  "build": "yarn clean && tsc",