@camunda/camunda-composite-components 0.22.0 → 0.22.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,6 +1,6 @@
1
1
  {
2
2
  "name": "@camunda/camunda-composite-components",
3
- "version": "0.22.0",
3
+ "version": "0.22.2",
4
4
  "description": "Camunda Composite Components",
5
5
  "bugs": {
6
6
  "url": "https://github.com/camunda/camunda-cloud-management-apps/issues"
@@ -50,42 +50,42 @@
50
50
  },
51
51
  "dependencies": {
52
52
  "jwt-decode": "4.0.0",
53
- "react-error-boundary": "6.1.0",
53
+ "react-error-boundary": "6.1.1",
54
54
  "react-markdown": "10.1.0",
55
55
  "semver": "7.7.4"
56
56
  },
57
57
  "devDependencies": {
58
- "@auth0/auth0-spa-js": "2.15.0",
58
+ "@auth0/auth0-spa-js": "2.17.0",
59
59
  "@camunda-cloud/shared-types": "workspace:*",
60
- "@carbon/react": "1.97.0",
60
+ "@carbon/react": "1.102.0",
61
61
  "@chromatic-com/storybook": "5.0.1",
62
62
  "@mdx-js/react": "3.1.1",
63
63
  "@playwright/test": "1.58.2",
64
- "@storybook/addon-a11y": "10.2.8",
65
- "@storybook/addon-docs": "10.2.8",
66
- "@storybook/addon-links": "10.2.8",
67
- "@storybook/addon-vitest": "10.2.8",
68
- "@storybook/react": "10.2.8",
69
- "@storybook/react-vite": "10.2.8",
64
+ "@storybook/addon-a11y": "10.2.15",
65
+ "@storybook/addon-docs": "10.2.15",
66
+ "@storybook/addon-links": "10.2.15",
67
+ "@storybook/addon-vitest": "10.2.15",
68
+ "@storybook/react": "10.2.15",
69
+ "@storybook/react-vite": "10.2.15",
70
70
  "@vitest/browser": "4.0.18",
71
71
  "@vitest/browser-playwright": "4.0.18",
72
72
  "vitest": "4.0.18",
73
- "conventional-changelog-conventionalcommits": "9.1.0",
73
+ "conventional-changelog-conventionalcommits": "9.3.0",
74
74
  "eslint-import-resolver-typescript": "4.4.4",
75
75
  "eslint-plugin-react": "7.37.5",
76
76
  "eslint-plugin-react-hooks": "7.0.1",
77
- "eslint-plugin-storybook": "10.2.8",
77
+ "eslint-plugin-storybook": "10.2.15",
78
78
  "event-source-polyfill": "1.0.31",
79
- "mixpanel-browser": "2.74.0",
79
+ "mixpanel-browser": "2.75.0",
80
80
  "playwright": "1.58.2",
81
81
  "react": "19.2.4",
82
82
  "react-dom": "19.2.4",
83
83
  "react-is": "19.2.4",
84
- "rimraf": "6.1.2",
85
- "serve": "14.2.5",
86
- "storybook": "10.2.8",
87
- "styled-components": "6.3.9",
88
- "typescript-eslint": "8.55.0",
84
+ "rimraf": "6.1.3",
85
+ "serve": "14.2.6",
86
+ "storybook": "10.2.15",
87
+ "styled-components": "6.3.11",
88
+ "typescript-eslint": "8.56.1",
89
89
  "wait-on": "9.0.4"
90
90
  },
91
91
  "peerDependencies": {
@@ -45,6 +45,21 @@ const getClustersToRender = (clusters, activeOrg, appToNavigateTo) => {
45
45
  trueOnInvalidVersion: false,
46
46
  })));
47
47
  };
48
+ /**
49
+ * Returns the display label for admin/identity clusters in the app bar.
50
+ * Shows "Admin" only if at least one cluster is on version 8.9.0-alpha5 or newer;
51
+ * otherwise falls back to "Identity" for older cluster versions.
52
+ */
53
+ const getAdminLabelForClusters = (clusters) => {
54
+ const hasAdminVersionCluster = clusters.some((cluster) => checkVersion({
55
+ possiblyVersionOrDockerPath: cluster.generation.versions?.zeebe,
56
+ trueForSnapshot: true,
57
+ operator: VersionCheckOperator.GreaterThanOrEqual,
58
+ versionToCompareTo: '8.9.0-alpha5',
59
+ trueOnInvalidVersion: false,
60
+ }));
61
+ return hasAdminVersionCluster ? 'Admin' : 'Identity';
62
+ };
48
63
  const OrgNameWrapper = styled.div `
49
64
  margin-bottom: 1rem;
50
65
  padding: 0px 16px;
@@ -259,6 +274,9 @@ export const C3NavigationAppBar = ({ app: appProps, appBar, forwardRef, navbar,
259
274
  else {
260
275
  const appHasReadPermission = hasReadPermissionForApp(app, activeOrg?.permissions);
261
276
  const clustersToRender = getClustersToRender(clusters ?? [], activeOrg, app);
277
+ if (isAdminApp(app)) {
278
+ element.label = getAdminLabelForClusters(clustersToRender);
279
+ }
262
280
  if (clustersToRender?.length === 1 && !enforceDropDown) {
263
281
  element.href = getEndpointForApp(app, clustersToRender[0].endpoints);
264
282
  }
@@ -311,13 +329,11 @@ export const C3NavigationAppBar = ({ app: appProps, appBar, forwardRef, navbar,
311
329
  const appBarElements = appBar.elements || (clusters || clustersByOrgId ? appElements : null);
312
330
  const [isOrgPickerModalOpen, setIsOrgPickerModalOpen] = useState(false);
313
331
  const orgName = activeOrg?.name || navbar.orgName;
314
- return (_jsxs(_Fragment, { children: [_jsx(HeaderGlobalAction
315
- // @ts-expect-error
316
- , {
317
- // @ts-expect-error
318
- ref: iconRef, "aria-label": 'Camunda components', isActive: appBar.isOpen, onClick: () => {
332
+ return (_jsxs(_Fragment, { children: [_jsx(HeaderGlobalAction, { ref: iconRef, "aria-label": 'Camunda components', isActive: appBar.isOpen, onClick: () => {
319
333
  toggleAppbar(!appBar.isOpen);
320
- }, tooltipAlignment: 'start', leaveDelayMs: 100, children: appBar.isOpen ? _jsx(Close, { size: 20 }) : _jsx(C3AppMenuIcon, { size: 20 }) }), _jsx(OrgPickerModal, { activeOrg: activeOrg, appToNavigateTo: appToNavigateTo, isOpen: isOrgPickerModalOpen, orgs: clustersByOrgId, onCancel: () => {
334
+ }, tooltipAlignment: 'start',
335
+ // @ts-expect-error
336
+ leaveDelayMs: 100, children: appBar.isOpen ? _jsx(Close, { size: 20 }) : _jsx(C3AppMenuIcon, { size: 20 }) }), _jsx(OrgPickerModal, { activeOrg: activeOrg, appToNavigateTo: appToNavigateTo, isOpen: isOrgPickerModalOpen, orgs: clustersByOrgId, onCancel: () => {
321
337
  setIsOrgPickerModalOpen(false);
322
338
  }, loadingStatus: loadingStatus, domain: domain }), _jsx(NavWrapper, { children: _jsx(SideNav, { ref: panelRef, "aria-label": appBar.ariaLabel || 'Side Navigation', expanded: appBar.isOpen, isPersistent: false, children: _jsxs(SideNavItems, { children: [orgName && (_jsx("li", { children: _jsxs(OrgNameWrapper, { children: [_jsx(FormLabel, { children: "Organization" }), _jsx(ActiveOrgName, { className: 'textPrimary', title: orgName, children: orgName })] }) })), _jsx("li", { children: navbar.elements.length > 0 && (_jsx(HeaderSideNavItems, { hasDivider: true, children: navbar.elements.map((element) => (_jsx(HeaderMenuItem, { as: element.routeProps && forwardRef, isActive: element.isCurrentPage, ...element.routeProps, onClick: () => {
323
339
  if (element.routeProps.onClick) {
@@ -65,13 +65,11 @@ const C3NavigationSideBar = (props) => {
65
65
  }, 120);
66
66
  }
67
67
  }, [isOpen]);
68
- return (_jsxs(Wrapper, { children: [_jsx(HeaderGlobalAction
69
- /* @ts-expect-error */
70
- , {
71
- /* @ts-expect-error */
72
- ref: setIconRef, "aria-label": sideBar.tooltip ?? `Open ${sideBar.ariaLabel}`, "aria-expanded": isOpen, "aria-controls": id, onClick: () => {
68
+ return (_jsxs(Wrapper, { children: [_jsx(HeaderGlobalAction, { ref: setIconRef, "aria-label": sideBar.tooltip ?? `Open ${sideBar.ariaLabel}`, "aria-expanded": isOpen, "aria-controls": id, onClick: () => {
73
69
  setIsOpen(!isOpen);
74
- }, isActive: isOpen, tooltipAlignment: sideBar.type === 'user' ? 'end' : 'center', leaveDelayMs: 100, children: icon }), _jsxs(HeaderPanel, { ref: setPanelRef, expanded: isOpen, "data-floating-menu-container": true, children: [_jsxs(Stack, { children: [children, sideBar.elements &&
70
+ }, isActive: isOpen, tooltipAlignment: sideBar.type === 'user' ? 'end' : 'center',
71
+ /* @ts-expect-error */
72
+ leaveDelayMs: 100, children: icon }), _jsxs(HeaderPanel, { ref: setPanelRef, expanded: isOpen, "data-floating-menu-container": true, children: [_jsxs(Stack, { children: [children, sideBar.elements &&
75
73
  sideBar.elements.length > 0 &&
76
74
  'customElements' in sideBar &&
77
75
  sideBar.customElements &&
@@ -0,0 +1,3 @@
1
+ import type { FC } from 'react';
2
+ import type { InlineNotificationElementProps } from '../onboarding.types';
3
+ export declare const InlineNotificationElement: FC<InlineNotificationElementProps>;
@@ -0,0 +1,10 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ /*
3
+ * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
4
+ * under one or more contributor license agreements. Licensed under a commercial license.
5
+ * You may not use this file except in compliance with the commercial license.
6
+ */
7
+ import { InlineNotification } from '@carbon/react';
8
+ export const InlineNotificationElement = ({ hideclosebutton, kind, lowcontrast, title, label, }) => {
9
+ return (_jsx(InlineNotification, { hideCloseButton: hideclosebutton, kind: kind, lowContrast: lowcontrast, title: title, subtitle: label, style: { maxWidth: '100%' } }));
10
+ };
@@ -18,5 +18,13 @@ export declare enum OnboardingQuestionType {
18
18
  TileSingleSelect = "TileSingleSelect",
19
19
  TileMultiSelect = "TileMultiSelect",
20
20
  DropdownSelect = "DropdownSelect",
21
- TextInput = "TextInput"
21
+ TextInput = "TextInput",
22
+ InlineNotification = "InlineNotification"
23
+ }
24
+ export interface InlineNotificationElementProps {
25
+ hideclosebutton: boolean;
26
+ kind: 'error' | 'info' | 'info-square' | 'success' | 'warning' | 'warning-alt';
27
+ lowcontrast: boolean;
28
+ title: string;
29
+ label: string;
22
30
  }
@@ -9,4 +9,5 @@ export var OnboardingQuestionType;
9
9
  OnboardingQuestionType["TileMultiSelect"] = "TileMultiSelect";
10
10
  OnboardingQuestionType["DropdownSelect"] = "DropdownSelect";
11
11
  OnboardingQuestionType["TextInput"] = "TextInput";
12
+ OnboardingQuestionType["InlineNotification"] = "InlineNotification";
12
13
  })(OnboardingQuestionType || (OnboardingQuestionType = {}));
@@ -6,6 +6,7 @@ import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
6
6
  */
7
7
  import { Stack } from '@carbon/react';
8
8
  import { DropdownSelect } from './elements/dropdownSelect.js';
9
+ import { InlineNotificationElement } from './elements/inlineNotification.js';
9
10
  import { RadioGroupElementMulti } from './elements/radioGroupMulti.js';
10
11
  import { RadioGroupElementSingle } from './elements/radioGroupSingle.js';
11
12
  import { TextInputElement } from './elements/textField.js';
@@ -33,6 +34,8 @@ export const OnboardingStep = ({ theme, config, generic, setGeneric, }) => {
33
34
  return (_jsx(TextInputElement, { title: element.title, label: element.label, preFiledValue: generic(element.mapto), setValue: (value) => {
34
35
  setGeneric(element.mapto, value);
35
36
  }, placeholder: 'Your company\u2019s name' }, `onboarding-step-element-${index}`));
37
+ case OnboardingQuestionType.InlineNotification:
38
+ return (_jsx(InlineNotificationElement, { hideclosebutton: element.hideclosebutton, kind: element.kind, lowcontrast: element.lowcontrast, title: element.title, label: element.label }, `onboarding-step-element-${index}`));
36
39
  default:
37
40
  return _jsx(_Fragment, {});
38
41
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camunda/camunda-composite-components",
3
- "version": "0.22.0",
3
+ "version": "0.22.2",
4
4
  "description": "Camunda Composite Components",
5
5
  "bugs": {
6
6
  "url": "https://github.com/camunda/camunda-cloud-management-apps/issues"
@@ -24,41 +24,41 @@
24
24
  },
25
25
  "dependencies": {
26
26
  "jwt-decode": "4.0.0",
27
- "react-error-boundary": "6.1.0",
27
+ "react-error-boundary": "6.1.1",
28
28
  "react-markdown": "10.1.0",
29
29
  "semver": "7.7.4"
30
30
  },
31
31
  "devDependencies": {
32
- "@auth0/auth0-spa-js": "2.15.0",
33
- "@carbon/react": "1.97.0",
32
+ "@auth0/auth0-spa-js": "2.17.0",
33
+ "@carbon/react": "1.102.0",
34
34
  "@chromatic-com/storybook": "5.0.1",
35
35
  "@mdx-js/react": "3.1.1",
36
36
  "@playwright/test": "1.58.2",
37
- "@storybook/addon-a11y": "10.2.8",
38
- "@storybook/addon-docs": "10.2.8",
39
- "@storybook/addon-links": "10.2.8",
40
- "@storybook/addon-vitest": "10.2.8",
41
- "@storybook/react": "10.2.8",
42
- "@storybook/react-vite": "10.2.8",
37
+ "@storybook/addon-a11y": "10.2.15",
38
+ "@storybook/addon-docs": "10.2.15",
39
+ "@storybook/addon-links": "10.2.15",
40
+ "@storybook/addon-vitest": "10.2.15",
41
+ "@storybook/react": "10.2.15",
42
+ "@storybook/react-vite": "10.2.15",
43
43
  "@vitest/browser": "4.0.18",
44
44
  "@vitest/browser-playwright": "4.0.18",
45
45
  "vitest": "4.0.18",
46
- "conventional-changelog-conventionalcommits": "9.1.0",
46
+ "conventional-changelog-conventionalcommits": "9.3.0",
47
47
  "eslint-import-resolver-typescript": "4.4.4",
48
48
  "eslint-plugin-react": "7.37.5",
49
49
  "eslint-plugin-react-hooks": "7.0.1",
50
- "eslint-plugin-storybook": "10.2.8",
50
+ "eslint-plugin-storybook": "10.2.15",
51
51
  "event-source-polyfill": "1.0.31",
52
- "mixpanel-browser": "2.74.0",
52
+ "mixpanel-browser": "2.75.0",
53
53
  "playwright": "1.58.2",
54
54
  "react": "19.2.4",
55
55
  "react-dom": "19.2.4",
56
56
  "react-is": "19.2.4",
57
- "rimraf": "6.1.2",
58
- "serve": "14.2.5",
59
- "storybook": "10.2.8",
60
- "styled-components": "6.3.9",
61
- "typescript-eslint": "8.55.0",
57
+ "rimraf": "6.1.3",
58
+ "serve": "14.2.6",
59
+ "storybook": "10.2.15",
60
+ "styled-components": "6.3.11",
61
+ "typescript-eslint": "8.56.1",
62
62
  "wait-on": "9.0.4",
63
63
  "@camunda-cloud/shared-types": "0.0.1"
64
64
  },