@camunda/camunda-composite-components 0.20.2 → 0.20.3

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.
Files changed (88) hide show
  1. package/lib/esm/package.json +27 -28
  2. package/lib/esm/src/api/clusters.js +1 -1
  3. package/lib/esm/src/api/endpoints.const.js +2 -0
  4. package/lib/esm/src/api/help-center.d.ts +1 -1
  5. package/lib/esm/src/api/status.js +1 -1
  6. package/lib/esm/src/assets/c3-icons.d.ts +4 -4
  7. package/lib/esm/src/assets/c3-icons.js +5 -14
  8. package/lib/esm/src/components/c3-app-teaser/app-teaser-cards.d.ts +1 -1
  9. package/lib/esm/src/components/c3-app-teaser/app-teaser-cards.js +10 -19
  10. package/lib/esm/src/components/c3-app-teaser/app-teaster-card.d.ts +1 -1
  11. package/lib/esm/src/components/c3-app-teaser/app-teaster-card.js +4 -8
  12. package/lib/esm/src/components/c3-app-teaser/c3-app-teaser-page.d.ts +1 -1
  13. package/lib/esm/src/components/c3-app-teaser/c3-app-teaser-page.js +2 -2
  14. package/lib/esm/src/components/c3-app-teaser/c3-app-teaser.d.ts +1 -1
  15. package/lib/esm/src/components/c3-app-teaser/c3-app-teaser.js +8 -9
  16. package/lib/esm/src/components/c3-cluster-tag/c3-cluster-tag.d.ts +2 -1
  17. package/lib/esm/src/components/c3-cluster-tag/c3-cluster-tag.js +9 -8
  18. package/lib/esm/src/components/c3-data-table/c3-data-table.js +84 -70
  19. package/lib/esm/src/components/c3-data-table/c3-data-table.types.d.ts +3 -2
  20. package/lib/esm/src/components/c3-data-table/link-button/link-button.js +2 -4
  21. package/lib/esm/src/components/c3-data-table/link-button/link-button.types.d.ts +0 -1
  22. package/lib/esm/src/components/c3-empty-state/c3-empty-state.js +9 -29
  23. package/lib/esm/src/components/c3-help-center/c3-help-center-provider.js +3 -2
  24. package/lib/esm/src/components/c3-help-center/c3-help-center.js +3 -7
  25. package/lib/esm/src/components/c3-help-center/help-center-hint.d.ts +1 -1
  26. package/lib/esm/src/components/c3-help-center/help-center-hint.js +6 -10
  27. package/lib/esm/src/components/c3-help-center/help-center.d.ts +1 -1
  28. package/lib/esm/src/components/c3-help-center/help-center.js +69 -102
  29. package/lib/esm/src/components/c3-help-center/tabs/feedback.js +41 -89
  30. package/lib/esm/src/components/c3-help-center/tabs/tabContent.js +2 -5
  31. package/lib/esm/src/components/c3-help-center/tabs/tabContentSkeleton.js +4 -5
  32. package/lib/esm/src/components/c3-help-center/tile.js +16 -30
  33. package/lib/esm/src/components/c3-navigation/c3-info-button.d.ts +1 -1
  34. package/lib/esm/src/components/c3-navigation/c3-info-button.js +2 -3
  35. package/lib/esm/src/components/c3-navigation/c3-navigation-actions/c3-action-buttons.d.ts +1 -1
  36. package/lib/esm/src/components/c3-navigation/c3-navigation-actions/c3-action-buttons.js +9 -9
  37. package/lib/esm/src/components/c3-navigation/c3-navigation-appbar/c3-navigation-appbar.js +72 -87
  38. package/lib/esm/src/components/c3-navigation/c3-navigation-appbar/components.d.ts +1 -5
  39. package/lib/esm/src/components/c3-navigation/c3-navigation-appbar/components.js +1 -0
  40. package/lib/esm/src/components/c3-navigation/c3-navigation-sidebar/c3-info-sidebar.d.ts +1 -1
  41. package/lib/esm/src/components/c3-navigation/c3-navigation-sidebar/c3-info-sidebar.js +20 -28
  42. package/lib/esm/src/components/c3-navigation/c3-navigation-sidebar/c3-navigation-sidebar-element.d.ts +1 -1
  43. package/lib/esm/src/components/c3-navigation/c3-navigation-sidebar/c3-navigation-sidebar-element.js +23 -27
  44. package/lib/esm/src/components/c3-navigation/c3-navigation-sidebar/c3-navigation-sidebar.d.ts +1 -1
  45. package/lib/esm/src/components/c3-navigation/c3-navigation-sidebar/c3-navigation-sidebar.js +29 -37
  46. package/lib/esm/src/components/c3-navigation/c3-navigation-sidebar/c3-notification-sidebar.js +18 -24
  47. package/lib/esm/src/components/c3-navigation/c3-navigation-sidebar/c3-sidebar-state-provider.js +3 -2
  48. package/lib/esm/src/components/c3-navigation/c3-navigation-sidebar/c3-user-sidebar.js +13 -37
  49. package/lib/esm/src/components/c3-navigation/c3-navigation.js +78 -120
  50. package/lib/esm/src/components/c3-navigation/c3-navigation.types.d.ts +5 -6
  51. package/lib/esm/src/components/c3-navigation/c3-notification-provider/c3-notification-container.d.ts +1 -1
  52. package/lib/esm/src/components/c3-navigation/c3-notification-provider/c3-notification-container.js +10 -18
  53. package/lib/esm/src/components/c3-navigation/c3-notification-provider/c3-notification-provider.js +4 -4
  54. package/lib/esm/src/components/c3-navigation/c3-org-name.js +2 -4
  55. package/lib/esm/src/components/c3-navigation/c3-org-sidebar/c3-org-sidebar.js +48 -60
  56. package/lib/esm/src/components/c3-navigation/c3-org-sidebar/components.js +23 -13
  57. package/lib/esm/src/components/c3-navigation/helpers.d.ts +2 -3
  58. package/lib/esm/src/components/c3-navigation/index.d.ts +1 -2
  59. package/lib/esm/src/components/c3-navigation/stories/story-helpers.js +3 -5
  60. package/lib/esm/src/components/c3-navigation/stories/story-templates.d.ts +1 -1
  61. package/lib/esm/src/components/c3-navigation/stories/story-templates.js +23 -29
  62. package/lib/esm/src/components/c3-onboarding-survey/c3-onboarding-survey.js +2 -1
  63. package/lib/esm/src/components/c3-onboarding-survey/elements/dropdownSelect.js +25 -38
  64. package/lib/esm/src/components/c3-onboarding-survey/elements/radioGroupMulti.js +45 -56
  65. package/lib/esm/src/components/c3-onboarding-survey/elements/radioGroupSingle.js +24 -34
  66. package/lib/esm/src/components/c3-onboarding-survey/elements/textField.js +4 -9
  67. package/lib/esm/src/components/c3-onboarding-survey/onboardingModal.d.ts +9 -9
  68. package/lib/esm/src/components/c3-onboarding-survey/onboardingModal.js +31 -42
  69. package/lib/esm/src/components/c3-onboarding-survey/onboardingPage.d.ts +9 -9
  70. package/lib/esm/src/components/c3-onboarding-survey/onboardingPage.js +27 -39
  71. package/lib/esm/src/components/c3-onboarding-survey/onboardingSurvey.js +9 -13
  72. package/lib/esm/src/components/c3-onboarding-survey/step.js +27 -27
  73. package/lib/esm/src/components/c3-page/c3-breadcrumb/c3-breadcrumb.js +8 -17
  74. package/lib/esm/src/components/c3-page/c3-page.js +2 -9
  75. package/lib/esm/src/components/c3-page/c3-tabs/c3-tabs.js +4 -5
  76. package/lib/esm/src/components/c3-responsive-stack/c3-responsive-stack.d.ts +2 -0
  77. package/lib/esm/src/components/c3-responsive-stack/c3-responsive-stack.js +13 -0
  78. package/lib/esm/src/components/c3-user-configuration/c3-profile-provider/c3-profile-provider.d.ts +1 -1
  79. package/lib/esm/src/components/c3-user-configuration/c3-profile-provider/c3-profile-provider.js +5 -4
  80. package/lib/esm/src/components/c3-user-configuration/c3-profile-provider/carbon-theme-provider.js +3 -2
  81. package/lib/esm/src/components/c3-user-configuration/c3-user-configuration-provider.js +3 -4
  82. package/lib/esm/src/contexts/c3-cluster-update-manager.d.ts +1 -1
  83. package/lib/esm/src/contexts/c3-cluster-update-manager.js +3 -2
  84. package/lib/esm/src/hooks/useApi.d.ts +4 -5
  85. package/lib/esm/src/index.d.ts +1 -0
  86. package/lib/esm/src/index.js +1 -0
  87. package/package.json +20 -27
  88. package/README.md +0 -197
@@ -1,3 +1,4 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
1
2
  import { Header, HeaderGlobalBar, HeaderMenuItem, HeaderName, HeaderNavigation, SkipToContent, Tag, Toggletip, ToggletipButton, ToggletipContent, Stack as CarbonStack, Link, Callout, DefinitionTooltip, } from "@carbon/react";
2
3
  import React, { useState } from "react";
3
4
  import C3InfoSidebar from "./c3-navigation-sidebar/c3-info-sidebar";
@@ -110,15 +111,7 @@ export const C3Navigation = ({ app, appBar, forwardRef, navbar, orgSideBar, info
110
111
  tooltip: navbar.licenseTag.isProductionLicense
111
112
  ? undefined
112
113
  : {
113
- content: (React.createElement("p", null,
114
- "Non-production license. For production usage details, visit our",
115
- " ",
116
- React.createElement(Link, { href: NON_PRODUCTION_TERMS_LINK, target: "_blank", style: { display: "inline" } }, "terms & conditions page"),
117
- " ",
118
- "or",
119
- " ",
120
- React.createElement(Link, { href: SALES_CONTACT_LINK, target: "_blank", style: { display: "inline" } }, "contact our sales team"),
121
- ".")),
114
+ content: (_jsxs("p", { children: ["Non-production license. For production usage details, visit our", " ", _jsx(Link, { href: NON_PRODUCTION_TERMS_LINK, target: "_blank", style: { display: "inline" }, children: "terms & conditions page" }), " ", "or", " ", _jsx(Link, { href: SALES_CONTACT_LINK, target: "_blank", style: { display: "inline" }, children: "contact our sales team" }), "."] })),
122
115
  buttonLabel: "Learn more",
123
116
  },
124
117
  },
@@ -147,7 +140,7 @@ export const C3Navigation = ({ app, appBar, forwardRef, navbar, orgSideBar, info
147
140
  color: "blue",
148
141
  renderIcon: Time,
149
142
  tooltip: {
150
- content: (React.createElement("p", null, "Please renew and provide new license keys to continue production use of Camunda.")),
143
+ content: (_jsx("p", { children: "Please renew and provide new license keys to continue production use of Camunda." })),
151
144
  buttonLabel: "Learn more",
152
145
  },
153
146
  },
@@ -164,7 +157,7 @@ export const C3Navigation = ({ app, appBar, forwardRef, navbar, orgSideBar, info
164
157
  color: "red",
165
158
  renderIcon: Warning,
166
159
  tooltip: {
167
- content: (React.createElement("p", null, "To continue using all features, please renew your license.")),
160
+ content: (_jsx("p", { children: "To continue using all features, please renew your license." })),
168
161
  buttonLabel: "Learn more",
169
162
  },
170
163
  },
@@ -173,116 +166,81 @@ export const C3Navigation = ({ app, appBar, forwardRef, navbar, orgSideBar, info
173
166
  ];
174
167
  if (app.prefix)
175
168
  console.warn("The `prefix` prop is deprecated and will be removed in a future release. It has been replaced with a Camunda icon.");
176
- return (React.createElement(C3SidebarStateProvider, { isNotificationSidebarOpen: notificationSideBar?.isOpen, isOrgSidebarOpen: orgSideBar?.isOpen, isInfoSidebarOpen: infoSideBar?.isOpen, isUserSidebarOpen: userSideBar?.isOpen },
177
- React.createElement(Header, { "aria-label": app.ariaLabel },
178
- React.createElement(SkipToContent, null),
179
- displayAppBar && (React.createElement(C3NavigationAppBar, { app: app, appBar: { ...appBar, isOpen: appBarOpen }, forwardRef: forwardRef, navbar: navbar, toggleAppbar: (value) => {
180
- setAppBarOpen(value);
181
- } })),
182
- React.createElement(HeaderName, { as: forwardRef, prefix: "", ...app.routeProps },
183
- React.createElement(Stack, { gap: 3, orientation: "horizontal" },
184
- React.createElement(CamundaLogo, { "aria-label": "Camunda" }),
185
- React.createElement("span", null, app.name))),
186
- React.createElement(HeaderNavigation, { "aria-label": app.ariaLabel }, navbar.elements.map((element) => (React.createElement(HeaderMenuItem, { key: element.key, as: element.routeProps && forwardRef, isActive: element.isCurrentPage, ...element.routeProps },
187
- React.createElement("span", null, element.label))))),
188
- React.createElement(HeaderGlobalBar, null,
189
- React.createElement(ResponsiveNavbarElementsWrapper, null,
190
- tags &&
191
- tags.length > 0 &&
192
- tags.map((tag) => {
193
- if (tag?.tooltip !== undefined) {
194
- const { content, buttonLabel } = tag.tooltip;
195
- return (React.createElement("div", { key: tag.key, style: {
196
- height: "1.5rem",
197
- marginTop: "0.75rem",
198
- } },
199
- React.createElement(Toggletip, null,
200
- React.createElement(ToggletipButton, { as: "span", label: buttonLabel },
201
- React.createElement(Tag, { type: tag.color, renderIcon: tag.renderIcon, style: {
202
- margin: "0",
203
- cursor: "pointer",
169
+ return (_jsxs(C3SidebarStateProvider, { isNotificationSidebarOpen: notificationSideBar?.isOpen, isOrgSidebarOpen: orgSideBar?.isOpen, isInfoSidebarOpen: infoSideBar?.isOpen, isUserSidebarOpen: userSideBar?.isOpen, children: [_jsxs(Header, { "aria-label": app.ariaLabel, children: [_jsx(SkipToContent, {}), displayAppBar && (_jsx(C3NavigationAppBar, { app: app, appBar: { ...appBar, isOpen: appBarOpen }, forwardRef: forwardRef, navbar: navbar, toggleAppbar: (value) => {
170
+ setAppBarOpen(value);
171
+ } })), _jsx(HeaderName, { as: forwardRef, prefix: "", ...app.routeProps, children: _jsxs(Stack, { gap: 3, orientation: "horizontal", children: [_jsx(CamundaLogo, { "aria-label": "Camunda" }), _jsx("span", { children: app.name })] }) }), _jsx(HeaderNavigation, { "aria-label": app.ariaLabel, children: navbar.elements.map((element) => (_jsx(HeaderMenuItem, { as: element.routeProps && forwardRef, isActive: element.isCurrentPage, ...element.routeProps, children: _jsx("span", { children: element.label }) }, element.key))) }), _jsxs(HeaderGlobalBar, { children: [_jsxs(ResponsiveNavbarElementsWrapper, { children: [tags &&
172
+ tags.length > 0 &&
173
+ tags.map((tag) => {
174
+ if (tag?.tooltip !== undefined) {
175
+ const { content, buttonLabel } = tag.tooltip;
176
+ return (_jsx("div", { style: {
177
+ height: "1.5rem",
178
+ marginTop: "0.75rem",
179
+ }, children: _jsxs(Toggletip, { children: [_jsx(ToggletipButton, { as: "span", label: buttonLabel, children: _jsx(Tag, { type: tag.color, renderIcon: tag.renderIcon, style: {
180
+ margin: "0",
181
+ cursor: "pointer",
182
+ overflow: "hidden",
183
+ whiteSpace: "nowrap",
184
+ textOverflow: "ellipsis",
185
+ }, children: tag.label }) }), _jsx(StyledToggletipContent, { children: content })] }) }, tag.key));
186
+ }
187
+ return (_jsx(Tag, { renderIcon: tag.renderIcon, style: {
188
+ height: "1.5rem",
189
+ marginTop: "0.75rem",
204
190
  overflow: "hidden",
205
191
  whiteSpace: "nowrap",
206
192
  textOverflow: "ellipsis",
207
- } }, tag.label)),
208
- React.createElement(StyledToggletipContent, null, content))));
209
- }
210
- return (React.createElement(Tag, { key: tag.key, renderIcon: tag.renderIcon, style: {
211
- height: "1.5rem",
212
- marginTop: "0.75rem",
213
- overflow: "hidden",
214
- whiteSpace: "nowrap",
215
- textOverflow: "ellipsis",
216
- }, type: tag.color }, tag.label));
217
- }),
218
- (clusterUuid || currentClusterUuid) && (React.createElement(ClusterTagWrapper, null,
219
- React.createElement(C3ClusterTagWithClusterName, { clusterUuid: clusterUuid || currentClusterUuid || "", conditionalRendering: options?.conditionalTagRendering }))),
220
- orgName && (React.createElement(OrgName, { orgName: orgName, isSuperOrg: activeOrg?.isSuperOrg, activeSuperOrg: activeOrg?.superOrganization?.name }))),
221
- actionButtons && React.createElement(C3ActionButtons, { elements: actionButtons }),
222
- notificationSideBar && (React.createElement(C3NotificationSidebar, { sideBar: {
223
- ...notificationSideBar,
224
- type: "notifications",
225
- } })),
226
- orgSideBar && (React.createElement(C3OrgSidebar, { sideBar: {
227
- ...orgSideBar,
228
- type: "org",
229
- } })),
230
- infoButton || helpCenter ? (React.createElement(HelpCenterHint, null,
231
- React.createElement(InfoButton, { onClick: infoButton ? infoButton.onClick : () => openHelpCenter() }))) : (infoSideBar && (React.createElement(C3InfoSidebar, { sideBar: { ...infoSideBar, type: "info" } }))),
232
- userSideBar && (React.createElement(C3UserSidebar, { sideBar: {
233
- ...userSideBar,
234
- type: "user",
235
- } })))),
236
- (() => {
237
- if (camundaStatus.error &&
238
- camundaStatus.endpoint &&
239
- options?.c8StatusBanner) {
240
- return (React.createElement(React.Fragment, null,
241
- React.createElement("div", { className: "cds--header", style: {
242
- position: "fixed",
243
- marginTop: "48px",
244
- zIndex: "7000",
245
- } },
246
- React.createElement(Callout, { title: "", kind: "error", lowContrast: true, style: { maxWidth: "100%" } },
247
- React.createElement("div", { style: {
248
- display: "flex",
249
- justifyContent: "space-between",
250
- alignItems: "center",
251
- width: "100%",
252
- position: "absolute",
253
- paddingRight: "62px",
254
- } },
255
- React.createElement("div", { className: "cds--actionable-notification__title", dir: "auto", style: {
256
- overflow: "hidden",
257
- whiteSpace: "nowrap",
258
- textWrap: "nowrap",
259
- } }, "Service incident alert"),
260
- React.createElement(DefinitionTooltip, { "aria-describedby": "", definition: "We're aware of a live incident potentially impacting our SaaS product. Please check our status page for details.", align: "bottom", openOnHover: true, style: {
261
- marginTop: "-1px",
262
- width: "calc(100vw - 400px)",
263
- borderBlockEnd: "none",
264
- overflow: "hidden",
265
- textOverflow: "ellipsis",
266
- textWrap: "nowrap",
267
- whiteSpace: "nowrap",
268
- fontSize: "14px",
269
- } },
270
- React.createElement("span", null, "We're aware of a live incident potentially impacting our SaaS product. Please check our status page for details.")),
271
- React.createElement(Link, { onClick: () => {
272
- window.open(camundaStatus.endpoint, "_blank");
273
- }, inline: true, style: {
274
- cursor: "pointer",
275
- color: "$link-primary",
276
- marginLeft: "auto",
277
- marginRight: 0,
278
- textDecoration: "none",
279
- overflow: "hidden",
280
- whiteSpace: "nowrap",
281
- textWrap: "nowrap",
282
- } }, "Camunda status page")))),
283
- React.createElement("div", { style: { height: "48px" } })));
284
- }
285
- return React.createElement(React.Fragment, null);
286
- })(),
287
- helpCenter && React.createElement(C3HelpCenter, { ...helpCenter })));
193
+ }, type: tag.color, children: tag.label }, tag.key));
194
+ }), (clusterUuid || currentClusterUuid) && (_jsx(ClusterTagWrapper, { children: _jsx(C3ClusterTagWithClusterName, { clusterUuid: clusterUuid || currentClusterUuid || "", conditionalRendering: options?.conditionalTagRendering }) })), orgName && (_jsx(OrgName, { orgName: orgName, isSuperOrg: activeOrg?.isSuperOrg, activeSuperOrg: activeOrg?.superOrganization?.name }))] }), actionButtons && _jsx(C3ActionButtons, { elements: actionButtons }), notificationSideBar && (_jsx(C3NotificationSidebar, { sideBar: {
195
+ ...notificationSideBar,
196
+ type: "notifications",
197
+ } })), orgSideBar && (_jsx(C3OrgSidebar, { sideBar: {
198
+ ...orgSideBar,
199
+ type: "org",
200
+ } })), infoButton || helpCenter ? (_jsx(HelpCenterHint, { children: _jsx(InfoButton, { onClick: infoButton ? infoButton.onClick : () => openHelpCenter() }) })) : (infoSideBar && (_jsx(C3InfoSidebar, { sideBar: { ...infoSideBar, type: "info" } }))), userSideBar && (_jsx(C3UserSidebar, { sideBar: {
201
+ ...userSideBar,
202
+ type: "user",
203
+ } }))] })] }), (() => {
204
+ if (camundaStatus.error &&
205
+ camundaStatus.endpoint &&
206
+ options?.c8StatusBanner) {
207
+ return (_jsxs(_Fragment, { children: [_jsx("div", { className: "cds--header", style: {
208
+ position: "fixed",
209
+ marginTop: "48px",
210
+ zIndex: "7000",
211
+ }, children: _jsx(Callout, { title: "", kind: "error", lowContrast: true, style: { maxWidth: "100%" }, children: _jsxs("div", { style: {
212
+ display: "flex",
213
+ justifyContent: "space-between",
214
+ alignItems: "center",
215
+ width: "100%",
216
+ position: "absolute",
217
+ paddingRight: "62px",
218
+ }, children: [_jsx("div", { className: "cds--actionable-notification__title", dir: "auto", style: {
219
+ overflow: "hidden",
220
+ whiteSpace: "nowrap",
221
+ textWrap: "nowrap",
222
+ }, children: "Service incident alert" }), _jsx(DefinitionTooltip, { "aria-describedby": "", definition: "We're aware of a live incident potentially impacting our SaaS product. Please check our status page for details.", align: "bottom", openOnHover: true, style: {
223
+ marginTop: "-1px",
224
+ width: "calc(100vw - 400px)",
225
+ borderBlockEnd: "none",
226
+ overflow: "hidden",
227
+ textOverflow: "ellipsis",
228
+ textWrap: "nowrap",
229
+ whiteSpace: "nowrap",
230
+ fontSize: "14px",
231
+ }, children: _jsx("span", { children: "We're aware of a live incident potentially impacting our SaaS product. Please check our status page for details." }) }), _jsx(Link, { onClick: () => {
232
+ window.open(camundaStatus.endpoint, "_blank");
233
+ }, inline: true, style: {
234
+ cursor: "pointer",
235
+ color: "$link-primary",
236
+ marginLeft: "auto",
237
+ marginRight: 0,
238
+ textDecoration: "none",
239
+ overflow: "hidden",
240
+ whiteSpace: "nowrap",
241
+ textWrap: "nowrap",
242
+ }, children: "Camunda status page" })] }) }) }), _jsx("div", { style: { height: "48px" } })] }));
243
+ }
244
+ return _jsx(_Fragment, {});
245
+ })(), helpCenter && _jsx(C3HelpCenter, { ...helpCenter })] }));
288
246
  };
@@ -1,10 +1,9 @@
1
- /// <reference types="react" />
2
- import { Tag } from "@carbon/react";
3
1
  import { Endpoints, Stage } from "../../api/endpoints.const";
4
- import { C3NavigationAppBarProps, C3NavigationInfoSideBarProps, C3NavigationNotificationsSideBarProps, C3NavigationOrgSideBarProps, C3NavigationUserSideBarProps } from "./c3-navigation-sidebar/c3-navigation-sidebar.types";
5
- import { C3ActionButtonsProps } from "./c3-navigation-actions/c3-action-buttons.types";
6
- import { C3HelpCenterProps } from "../c3-help-center/c3-help-center";
2
+ import { TagColor } from "../c3-cluster-tag/c3-cluster-tag";
7
3
  import { CamundaClusterStage } from "../c3-cluster-tag/c3-cluster-tag.types";
4
+ import { C3HelpCenterProps } from "../c3-help-center/c3-help-center";
5
+ import { C3ActionButtonsProps } from "./c3-navigation-actions/c3-action-buttons.types";
6
+ import { C3NavigationAppBarProps, C3NavigationInfoSideBarProps, C3NavigationNotificationsSideBarProps, C3NavigationOrgSideBarProps, C3NavigationUserSideBarProps } from "./c3-navigation-sidebar/c3-navigation-sidebar.types";
8
7
  export interface C3NavigationAppProps {
9
8
  prefix?: string;
10
9
  name: string;
@@ -38,7 +37,7 @@ export interface C3NavigationNavBarProps {
38
37
  tags?: Array<{
39
38
  label: string;
40
39
  key: string;
41
- color?: React.ComponentProps<typeof Tag>["type"];
40
+ color?: TagColor;
42
41
  renderIcon?: any;
43
42
  tooltip?: {
44
43
  content: React.ReactNode;
@@ -1,4 +1,4 @@
1
- import { FC } from "react";
1
+ import { type FC } from "react";
2
2
  import { Notification as NotificationProps } from "../../../api/notifications";
3
3
  export declare const NotificationTitle: any;
4
4
  export declare const NotificationDescription: any;
@@ -1,4 +1,5 @@
1
- import React, { useState } from "react";
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useState } from "react";
2
3
  import styled from "styled-components";
3
4
  import { Button, Link, Tile } from "@carbon/react";
4
5
  import { Close } from "@carbon/react/icons";
@@ -87,25 +88,16 @@ const C3NotificationContainer = ({ description, state, timestamp, title, onDismi
87
88
  }
88
89
  return true;
89
90
  };
90
- return (React.createElement(NotificationTile, { onMouseEnter: () => {
91
+ return (_jsxs(NotificationTile, { onMouseEnter: () => {
91
92
  setIsHovering(true);
92
93
  }, onMouseLeave: () => {
93
94
  setIsHovering(false);
94
- } },
95
- React.createElement(UnreadNotificationHeader, null,
96
- (state === "new" || unread) && React.createElement(Dot, null),
97
- React.createElement(NotificationHeader, null,
98
- React.createElement(Timestamp, null, getReadableTimestamp(timestamp)),
99
- React.createElement(CloseButton
100
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
101
- // @ts-ignore
102
- , {
103
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
104
- // @ts-ignore
105
- kind: "ghost", hasIconOnly: true, iconDescription: "Dismiss", align: "bottom-right", renderIcon: Close, onClick: dismissNotification, size: "sm", "$show": isHovering }))),
106
- React.createElement(NotificationTitle, null, title),
107
- React.createElement(NotificationDescription, null, description),
108
- meta && (React.createElement(LinkContainer, null,
109
- React.createElement(Link, { href: meta.href, onClick: handleLinkClick, visited: true, style: { fontSize: "var(--cds-helper-text-01-font-size)" } }, meta.label)))));
95
+ }, children: [_jsxs(UnreadNotificationHeader, { children: [(state === "new" || unread) && _jsx(Dot, {}), _jsxs(NotificationHeader, { children: [_jsx(Timestamp, { children: getReadableTimestamp(timestamp) }), _jsx(CloseButton
96
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
97
+ // @ts-ignore
98
+ , {
99
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
100
+ // @ts-ignore
101
+ kind: "ghost", hasIconOnly: true, iconDescription: "Dismiss", align: "bottom-right", renderIcon: Close, onClick: dismissNotification, size: "sm", "$show": isHovering })] })] }), _jsx(NotificationTitle, { children: title }), _jsx(NotificationDescription, { children: description }), meta && (_jsx(LinkContainer, { children: _jsx(Link, { href: meta.href, onClick: handleLinkClick, visited: true, style: { fontSize: "var(--cds-helper-text-01-font-size)" }, children: meta.label }) }))] }));
110
102
  };
111
103
  export default C3NotificationContainer;
@@ -1,3 +1,4 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
1
2
  import React, { useContext, useEffect, useRef, useState, } from "react";
2
3
  import { NotificationService, } from "../../../api/notifications";
3
4
  import { C3UserConfigurationContext } from "../../c3-user-configuration/c3-user-configuration-provider";
@@ -85,7 +86,7 @@ const C3NotificationProvider = ({ children, }) => {
85
86
  });
86
87
  }
87
88
  };
88
- return (React.createElement(C3NotificationContext.Provider, { value: {
89
+ return (_jsx(C3NotificationContext.Provider, { value: {
89
90
  enabled,
90
91
  notifications,
91
92
  markAsRead,
@@ -94,12 +95,11 @@ const C3NotificationProvider = ({ children, }) => {
94
95
  dismissAll,
95
96
  analytics,
96
97
  isFetching,
97
- } }, children));
98
+ }, children: children }));
98
99
  };
99
100
  export function withNotifications(Component) {
100
101
  return function WithNamespace(props) {
101
- return (React.createElement(C3NotificationProvider, null,
102
- React.createElement(Component, { ...props })));
102
+ return (_jsx(C3NotificationProvider, { children: _jsx(Component, { ...props }) }));
103
103
  };
104
104
  }
105
105
  export default C3NotificationProvider;
@@ -1,4 +1,4 @@
1
- import React from "react";
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import styled from "styled-components";
3
3
  import { body01, label01 } from "../styles";
4
4
  const OrgNameWrapper = styled.div `
@@ -31,6 +31,4 @@ const SingleOrgName = styled.div `
31
31
  overflow: hidden;
32
32
  max-width: 150px;
33
33
  `;
34
- export const OrgName = ({ orgName, isSuperOrg, activeSuperOrg }) => (React.createElement(OrgNameWrapper, null, activeSuperOrg && !isSuperOrg ? (React.createElement(SuperOrgWrapper, { title: orgName },
35
- React.createElement(SuperOrgName, null, activeSuperOrg),
36
- React.createElement(TeamName, null, orgName))) : (React.createElement(SingleOrgName, { className: "bodyText", title: orgName }, orgName))));
34
+ export const OrgName = ({ orgName, isSuperOrg, activeSuperOrg }) => (_jsx(OrgNameWrapper, { children: activeSuperOrg && !isSuperOrg ? (_jsxs(SuperOrgWrapper, { title: orgName, children: [_jsx(SuperOrgName, { children: activeSuperOrg }), _jsx(TeamName, { children: orgName })] })) : (_jsx(SingleOrgName, { className: "bodyText", title: orgName, children: orgName })) }));
@@ -1,4 +1,5 @@
1
- import React, { useState } from "react";
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import { useState } from "react";
2
3
  import { Button, FormLabel, TreeNode, TreeView } from "@carbon/react";
3
4
  import { Enterprise } from "@carbon/react/icons";
4
5
  import C3NavigationSideBar from "../c3-navigation-sidebar/c3-navigation-sidebar";
@@ -12,10 +13,10 @@ function renderTree({ nodes, expanded, withIcons = false }) {
12
13
  if (!nodes) {
13
14
  return;
14
15
  }
15
- return nodes.map(({ children, renderIcon, isExpanded, isDisabled, ...nodeProps }) => (React.createElement(TreeNode, { key: nodeProps.id, renderIcon: withIcons ? renderIcon : null, isExpanded: expanded ?? isExpanded, ...(isDisabled && {
16
+ return nodes.map(({ children, renderIcon, isExpanded, isDisabled, ...nodeProps }) => (_jsx(TreeNode, { renderIcon: withIcons ? renderIcon : null, isExpanded: expanded ?? isExpanded, ...(isDisabled && {
16
17
  style: { cursor: "not-allowed" },
17
18
  "aria-disabled": "true",
18
- }), ...nodeProps }, renderTree({ nodes: children, expanded, withIcons }))));
19
+ }), ...nodeProps, children: renderTree({ nodes: children, expanded, withIcons }) }, nodeProps.id)));
19
20
  }
20
21
  const C3OrgSidebar = ({ sideBar }) => {
21
22
  const { customElements, switchToOrg, manageOrg, manageSuperorg, manageTeam, ...sideBarProps } = sideBar;
@@ -128,68 +129,55 @@ const C3OrgSidebar = ({ sideBar }) => {
128
129
  };
129
130
  return acc;
130
131
  }, {}) ?? {};
131
- return (React.createElement(C3NavigationSideBar, { sideBar: {
132
+ return (_jsx(C3NavigationSideBar, { sideBar: {
132
133
  ...sideBarProps,
133
134
  ariaLabel: sideBarProps.ariaLabel || "Organization Sidebars",
134
- }, icon: React.createElement(Enterprise, { size: 20 }) }, (customElements?.activeOrganization || activeOrg) && (React.createElement(React.Fragment, null,
135
- isCustomized ? (React.createElement(ActiveOrgWrapperCustom, null,
136
- React.createElement("div", { style: {
137
- overflow: "hidden",
138
- display: "grid",
139
- gap: "4px",
140
- } },
141
- React.createElement(FormLabel, null, activeOrganization.activeLabel),
142
- React.createElement(ActiveOrgName, { className: "textPrimary", title: activeOrganization.orgName, "$isCustomized": true }, activeOrganization.orgName)),
143
- React.createElement(Button, { size: "md", kind: "ghost", onClick: () => {
144
- activeOrganization.action.onClick();
145
- onManageCustomOrg();
146
- }, tabIndex: itemTabIndex }, activeOrganization.action?.label))) : (React.createElement(ActiveOrgWrapper, { "$scrollBarWidth": scrollBarWidth },
147
- React.createElement(FormLabel, null, activeOrganization.activeLabel),
148
- React.createElement(ActiveOrgNameWrapper, null,
149
- React.createElement(ActiveOrgName, { className: "textPrimary", title: activeOrganization.orgName }, activeOrganization.orgName),
150
- activeOrg?.uuid && domain && (React.createElement(ManageOrgOverflowMenu, { canManage: canUserManageOrg(activeOrg), canLeave: canUserLeaveOrg(activeOrg), isLastOrg: isLastOrg, isOrgMember: isMemberOfTeam(activeOrg.uuid), orgName: activeOrg.name, onManage: () => onManageOrg(activeOrg), onRequestToLeave: () => {
151
- setOrgToLeave(activeOrg);
152
- setIsConfirmLeaveModalOpen(true);
153
- } }))),
154
- React.createElement(ConfirmLeaveModal, { isOpen: isConfirmLeaveModalOpen, orgName: orgToLeave?.name || "", onConfirm: confirmLeaveOrg, onCancel: () => {
155
- setIsConfirmLeaveModalOpen(false);
156
- setOrgToLeave(null);
157
- }, loadingStatus: loadingStatus }))),
158
- React.createElement(SwitcherDivider, null),
159
- React.createElement(OrgListWrapper, null,
160
- React.createElement(TreeView, { label: "All organizations", ...(activeOrg?.uuid ? { selected: [activeOrg?.uuid] } : {}) }, renderTree({
161
- nodes: Object.values(groupedBySuperOrg)?.map((element) => {
162
- const userTeams = Object.values(element?.childOrganizations)?.filter((child) => isMemberOfTeam(child.uuid));
163
- const defaultIsExpanded = (activeOrg?.uuid === element.uuid ||
164
- !isMemberOfTeam(element.uuid) ||
165
- userTeams?.some((team) => activeOrg?.uuid === team.uuid)) ??
166
- false;
167
- return {
168
- children: userTeams?.length > 0
169
- ? userTeams.map((team) => {
135
+ }, icon: _jsx(Enterprise, { size: 20 }), children: (customElements?.activeOrganization || activeOrg) && (_jsxs(_Fragment, { children: [isCustomized ? (_jsxs(ActiveOrgWrapperCustom, { children: [_jsxs("div", { style: {
136
+ overflow: "hidden",
137
+ display: "grid",
138
+ gap: "4px",
139
+ }, children: [_jsx(FormLabel, { children: activeOrganization.activeLabel }), _jsx(ActiveOrgName, { className: "textPrimary", title: activeOrganization.orgName, "$isCustomized": true, children: activeOrganization.orgName })] }), _jsx(Button, { size: "md", kind: "ghost", onClick: () => {
140
+ activeOrganization.action.onClick();
141
+ onManageCustomOrg();
142
+ }, tabIndex: itemTabIndex, children: activeOrganization.action?.label })] })) : (_jsxs(ActiveOrgWrapper, { "$scrollBarWidth": scrollBarWidth, children: [_jsx(FormLabel, { children: activeOrganization.activeLabel }), _jsxs(ActiveOrgNameWrapper, { children: [_jsx(ActiveOrgName, { className: "textPrimary", title: activeOrganization.orgName, children: activeOrganization.orgName }), activeOrg?.uuid && domain && (_jsx(ManageOrgOverflowMenu, { canManage: canUserManageOrg(activeOrg), canLeave: canUserLeaveOrg(activeOrg), isLastOrg: isLastOrg, isOrgMember: isMemberOfTeam(activeOrg.uuid), orgName: activeOrg.name, onManage: () => onManageOrg(activeOrg), onRequestToLeave: () => {
143
+ setOrgToLeave(activeOrg);
144
+ setIsConfirmLeaveModalOpen(true);
145
+ } }))] }), _jsx(ConfirmLeaveModal, { isOpen: isConfirmLeaveModalOpen, orgName: orgToLeave?.name || "", onConfirm: confirmLeaveOrg, onCancel: () => {
146
+ setIsConfirmLeaveModalOpen(false);
147
+ setOrgToLeave(null);
148
+ }, loadingStatus: loadingStatus })] })), _jsx(SwitcherDivider, {}), _jsx(OrgListWrapper, { children: _jsx(TreeView, { label: "All organizations", ...(activeOrg?.uuid ? { selected: [activeOrg?.uuid] } : {}), children: renderTree({
149
+ nodes: Object.values(groupedBySuperOrg)?.map((element) => {
150
+ const userTeams = Object.values(element?.childOrganizations)?.filter((child) => isMemberOfTeam(child.uuid));
151
+ const defaultIsExpanded = (activeOrg?.uuid === element.uuid ||
152
+ !isMemberOfTeam(element.uuid) ||
153
+ userTeams?.some((team) => activeOrg?.uuid === team.uuid)) ??
154
+ false;
170
155
  return {
171
- id: team.uuid,
172
- label: team.name,
173
- isExpanded: false,
174
- value: team.uuid,
156
+ children: userTeams?.length > 0
157
+ ? userTeams.map((team) => {
158
+ return {
159
+ id: team.uuid,
160
+ label: team.name,
161
+ isExpanded: false,
162
+ value: team.uuid,
163
+ renderIcon: null,
164
+ onSelect: canSwitchToOrg(team.uuid)
165
+ ? () => switchOrg(team.uuid, true)
166
+ : undefined,
167
+ };
168
+ })
169
+ : null,
170
+ id: element.uuid,
171
+ label: element.name,
172
+ value: element.uuid,
175
173
  renderIcon: null,
176
- onSelect: canSwitchToOrg(team.uuid)
177
- ? () => switchOrg(team.uuid, true)
174
+ isExpanded: defaultIsExpanded,
175
+ isDisabled: !isMemberOfTeam(element.uuid),
176
+ onSelect: canSwitchToOrg(element.uuid)
177
+ ? () => switchOrg(element.uuid, true)
178
178
  : undefined,
179
179
  };
180
- })
181
- : null,
182
- id: element.uuid,
183
- label: element.name,
184
- value: element.uuid,
185
- renderIcon: null,
186
- isExpanded: defaultIsExpanded,
187
- isDisabled: !isMemberOfTeam(element.uuid),
188
- onSelect: canSwitchToOrg(element.uuid)
189
- ? () => switchOrg(element.uuid, true)
190
- : undefined,
191
- };
192
- }),
193
- })))))));
180
+ }),
181
+ }) }) })] })) }));
194
182
  };
195
183
  export default C3OrgSidebar;
@@ -1,3 +1,4 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
2
  import React from "react";
2
3
  import { Dropdown, Modal, OverflowMenu, OverflowMenuItem, Popover, PopoverContent, } from "@carbon/react";
3
4
  import styled from "styled-components";
@@ -36,13 +37,7 @@ export const ActiveOrgName = styled.div `
36
37
  white-space: nowrap;
37
38
  `;
38
39
  export const ConfirmLeaveModal = ({ isOpen, onConfirm, onCancel, orgName, loadingStatus }) => {
39
- return (React.createElement(Modal, { danger: true, open: isOpen, modalHeading: "Leave organization", primaryButtonText: "Leave", secondaryButtonText: "Cancel", closeButtonLabel: "Cancel", loadingStatus: loadingStatus, onRequestClose: onCancel, onRequestSubmit: onConfirm, onSecondarySubmit: onCancel, loadingDescription: "Leaving" },
40
- React.createElement("p", null,
41
- "Are you sure you want to leave ",
42
- React.createElement("strong", null, orgName),
43
- "?"),
44
- React.createElement("br", null),
45
- React.createElement("p", null, "Leaving this organization will remove you from all associated teams and projects. To regain access you would need to reach out to the admin/owner of this organization.")));
40
+ return (_jsxs(Modal, { danger: true, open: isOpen, modalHeading: "Leave organization", primaryButtonText: "Leave", secondaryButtonText: "Cancel", closeButtonLabel: "Cancel", loadingStatus: loadingStatus, onRequestClose: onCancel, onRequestSubmit: onConfirm, onSecondarySubmit: onCancel, loadingDescription: "Leaving", children: [_jsxs("p", { children: ["Are you sure you want to leave ", _jsx("strong", { children: orgName }), "?"] }), _jsx("br", {}), _jsx("p", { children: "Leaving this organization will remove you from all associated teams and projects. To regain access you would need to reach out to the admin/owner of this organization." })] }));
46
41
  };
47
42
  const PopoverWrapper = styled(Popover) `
48
43
  max-width: 11rem;
@@ -59,17 +54,13 @@ const StyledOverflowMenu = styled(OverflowMenu) `
59
54
  `;
60
55
  export const ManageOrgOverflowMenu = ({ canManage, canLeave, isLastOrg, isOrgMember, onManage, onRequestToLeave, orgName, }) => {
61
56
  const [isPopoverShown, setIsPopoverShown] = React.useState(false);
62
- const leaveMenuItem = (React.createElement(OverflowMenuItem, { itemText: "Leave organization", disabled: !canLeave, onClick: onRequestToLeave, onMouseOver: () => setIsPopoverShown(true), onMouseLeave: () => setIsPopoverShown(false), "aria-label": `Leave organization - ${orgName}` }));
57
+ const leaveMenuItem = (_jsx(OverflowMenuItem, { itemText: "Leave organization", disabled: !canLeave, onClick: onRequestToLeave, onMouseOver: () => setIsPopoverShown(true), onMouseLeave: () => setIsPopoverShown(false), "aria-label": `Leave organization - ${orgName}` }));
63
58
  const popoverLabel = !isOrgMember
64
59
  ? "You are not a member of this team. You can only leave teams you are a member of."
65
60
  : isLastOrg
66
61
  ? "You need to be a member of at least one organization. Join a different organization first if you wish to leave."
67
62
  : "Owners cannot leave an organization directly. Assign another user as an owner if you wish to leave.";
68
- return (React.createElement(StyledOverflowMenu, { size: "sm", flipped: true, "aria-label": "Organization options menu", "data-floating-menu-container": "cds--header-panel", ...{ align: "top-right" } },
69
- canManage && (React.createElement(OverflowMenuItem, { itemText: "Manage organization", onClick: onManage, "aria-label": `Manage organization - ${orgName}` })),
70
- canLeave ? (leaveMenuItem) : (React.createElement(PopoverWrapper, { open: isPopoverShown, label: popoverLabel, align: "bottom-right" },
71
- leaveMenuItem,
72
- React.createElement(PopoverContent, null, popoverLabel)))));
63
+ return (_jsxs(StyledOverflowMenu, { size: "sm", flipped: true, "aria-label": "Organization options menu", "data-floating-menu-container": "cds--header-panel", align: "top-right", children: [canManage && (_jsx(OverflowMenuItem, { itemText: "Manage organization", onClick: onManage, "aria-label": `Manage organization - ${orgName}` })), canLeave ? (leaveMenuItem) : (_jsxs(PopoverWrapper, { open: isPopoverShown, label: popoverLabel, align: "bottom-right", children: [leaveMenuItem, _jsx(PopoverContent, { children: popoverLabel })] }))] }));
73
64
  };
74
65
  export const StyledDropdown = styled(Dropdown) `
75
66
  grid-gap: 0;
@@ -85,4 +76,23 @@ export const StyledDropdown = styled(Dropdown) `
85
76
  `;
86
77
  export const OrgListWrapper = styled.div `
87
78
  padding: 1rem 1rem 15px;
79
+
80
+ .cds--tree-node__label__text {
81
+ white-space: normal !important;
82
+ word-wrap: break-word;
83
+ word-break: break-word;
84
+ max-width: 200px;
85
+ display: inline-block;
86
+ }
87
+
88
+ .cds--tree-node__label__text-button {
89
+ white-space: normal !important;
90
+ height: auto !important;
91
+ min-height: 2rem;
92
+ padding: 0.5rem 1rem;
93
+ }
94
+
95
+ .cds--tree-node {
96
+ min-height: auto;
97
+ }
88
98
  `;
@@ -1,8 +1,7 @@
1
- /// <reference types="react" />
2
1
  export declare function useOnClickOutside(handler: (e: Event) => void): {
3
- panelRef: import("react").MutableRefObject<HTMLElement | null>;
2
+ panelRef: import("@types/react").MutableRefObject<HTMLElement | null>;
4
3
  setPanelRef: (node: unknown) => void;
5
- iconRef: import("react").MutableRefObject<HTMLElement | null>;
4
+ iconRef: import("@types/react").MutableRefObject<HTMLElement | null>;
6
5
  setIconRef: (node: unknown) => void;
7
6
  };
8
7
  export declare function executeMediaQuery(mediaQuery: string): MediaQueryList;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
- declare const _default: import("react").ComponentType<import("./c3-navigation.types").C3NavigationProps>;
1
+ declare const _default: import("@types/react").ComponentType<import("./c3-navigation.types").C3NavigationProps>;
3
2
  export default _default;
@@ -1,4 +1,5 @@
1
- import React from "react";
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ // React import not required with automatic JSX runtime
2
3
  import { Link } from "@carbon/react";
3
4
  import { ArrowRight, TrashCan, Add } from "@carbon/react/icons";
4
5
  export function createAppProps() {
@@ -110,10 +111,7 @@ export function createNavBarBarProps({ orgName = "Camunda", elements = undefined
110
111
  label: "tooltip tag",
111
112
  color: "purple",
112
113
  tooltip: {
113
- content: (React.createElement("p", null,
114
- "tooltip popover with a",
115
- " ",
116
- React.createElement(Link, { href: "http://camunda.com/" }, "link"))),
114
+ content: (_jsxs("p", { children: ["tooltip popover with a", " ", _jsx(Link, { href: "http://camunda.com/", children: "link" })] })),
117
115
  buttonLabel: "open the tooltip",
118
116
  },
119
117
  },
@@ -1,6 +1,6 @@
1
1
  import { FC } from "react";
2
2
  import { C3Navigation } from "../c3-navigation";
3
- import { StoryFn } from "@storybook/react";
3
+ import { StoryFn } from "@storybook/react-webpack5";
4
4
  export declare const DefaultTemplate: StoryFn<typeof C3Navigation>;
5
5
  export declare const SuperUserToggle: FC<{
6
6
  isActive?: boolean;