@camunda/ccma-saas-frontend 0.11.0 → 0.13.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.
Files changed (116) hide show
  1. package/lib/esm/components/c4-cluster-details-clients/c4-cluster-details-clients.d.ts +1 -1
  2. package/lib/esm/components/c4-cluster-details-clients/c4-cluster-details-clients.js +11 -1
  3. package/lib/esm/components/c4-cluster-details-clients/c4-cluster-details-clients.mocks.js +2 -0
  4. package/lib/esm/components/c4-cluster-details-clients/c4-cluster-details-clients.types.d.ts +2 -0
  5. package/lib/esm/components/c4-cluster-list/c4-cluster-list.d.ts +1 -1
  6. package/lib/esm/components/c4-cluster-list/c4-cluster-list.js +24 -2
  7. package/lib/esm/components/c4-cluster-list/c4-cluster-list.types.d.ts +9 -0
  8. package/lib/esm/components/c4-cluster-settings/c4-cluster-settings.d.ts +1 -1
  9. package/lib/esm/components/c4-cluster-settings/c4-cluster-settings.js +2 -4
  10. package/lib/esm/components/c4-cluster-settings/c4-cluster-settings.types.d.ts +0 -4
  11. package/lib/esm/components/c4-cluster-settings/elements/danger-zone.js +9 -1
  12. package/lib/esm/components/c4-cluster-tag-selector/c4-cluster-tag-selector.js +5 -5
  13. package/lib/esm/components/c4-clusters-empty-state/c4-clusters-empty-state.js +3 -3
  14. package/lib/esm/components/c4-console-dashboard/c4-console-dashboard.d.ts +1 -1
  15. package/lib/esm/components/c4-console-dashboard/c4-console-dashboard.js +2 -2
  16. package/lib/esm/components/c4-console-dashboard/c4-console-dashboard.types.d.ts +5 -0
  17. package/lib/esm/components/c4-convert-trial-organization-modal/c4-convert-trial-organization-modal.js +1 -11
  18. package/lib/esm/components/c4-create-alert-modal/c4-create-alert-modal.js +1 -14
  19. package/lib/esm/components/c4-create-cluster/c4-create-cluster.d.ts +1 -1
  20. package/lib/esm/components/c4-create-cluster/c4-create-cluster.js +188 -71
  21. package/lib/esm/components/c4-create-cluster/c4-create-cluster.types.d.ts +52 -0
  22. package/lib/esm/components/c4-create-cluster-api-client-modal/c4-create-cluster-api-client-modal.js +1 -11
  23. package/lib/esm/components/c4-create-connector-secret-modal/c4-create-connector-secret-modal.js +6 -13
  24. package/lib/esm/components/c4-create-console-api-client-modal/c4-create-console-api-client-modal.js +1 -11
  25. package/lib/esm/components/c4-create-ip-whitelist-modal/c4-create-ip-whitelist-modal.js +1 -18
  26. package/lib/esm/components/c4-create-trial-organization-modal/c4-create-trial-organization-modal.js +1 -11
  27. package/lib/esm/components/c4-delete-account-modal/c4-delete-account-modal.d.ts +0 -7
  28. package/lib/esm/components/c4-delete-account-modal/c4-delete-account-modal.js +1 -24
  29. package/lib/esm/components/c4-delete-organization-modal/c4-delete-organization-modal.js +1 -18
  30. package/lib/esm/components/c4-divider/c4-divider.js +12 -0
  31. package/lib/esm/components/c4-empty-state/c4-empty-state.d.ts +8 -0
  32. package/lib/esm/components/c4-empty-state/c4-empty-state.js +32 -8
  33. package/lib/esm/components/c4-file-uploader/c4-file-uploader.d.ts +36 -0
  34. package/lib/esm/components/c4-file-uploader/c4-file-uploader.js +43 -0
  35. package/lib/esm/components/c4-invite-user-to-organization-modal/c4-invite-user-to-organization-modal.js +1 -11
  36. package/lib/esm/components/c4-leave-organization-modal/c4-leave-organization-modal.js +1 -11
  37. package/lib/esm/components/c4-org-cluster-defaults/c4-org-cluster-defaults.d.ts +10 -0
  38. package/lib/esm/components/c4-org-cluster-defaults/c4-org-cluster-defaults.js +96 -0
  39. package/lib/esm/components/c4-org-cluster-defaults/c4-org-cluster-defaults.types.d.ts +22 -0
  40. package/lib/esm/components/c4-org-cluster-defaults/c4-org-cluster-defaults.types.js +6 -0
  41. package/lib/esm/components/c4-rename-organization-modal/c4-rename-organization-modal.js +1 -11
  42. package/lib/esm/components/c4-segmented-control/c4-segmented-control.d.ts +50 -0
  43. package/lib/esm/components/c4-segmented-control/c4-segmented-control.js +130 -0
  44. package/lib/esm/externalUrls.const.d.ts +7 -0
  45. package/lib/esm/externalUrls.const.js +11 -1
  46. package/lib/esm/i18n/c4-console-i18n.js +3 -0
  47. package/lib/esm/i18n/en/modals/apiclients.json +2 -1
  48. package/lib/esm/i18n/en/modals/clusterclients.json +18 -1
  49. package/lib/esm/i18n/en/pages/clusterdetails.json +12 -7
  50. package/lib/esm/i18n/en/pages/createcluster.json +43 -0
  51. package/lib/esm/i18n/en/pages/orgmanagement.json +6 -0
  52. package/lib/esm/index.d.ts +4 -0
  53. package/lib/esm/index.js +3 -0
  54. package/lib/esm/runtime/c4-console-runtime-context.d.ts +1 -1
  55. package/lib/esm/runtime/c4-console-runtime-context.js +2 -2
  56. package/lib/esm/runtime/cluster-duplication.d.ts +10 -0
  57. package/lib/esm/runtime/cluster-duplication.js +15 -0
  58. package/lib/esm/runtime/org-cluster-defaults.d.ts +14 -0
  59. package/lib/esm/runtime/org-cluster-defaults.js +19 -0
  60. package/lib/esm/ui/c4-password-input.js +1 -1
  61. package/lib/esm/ui/index.d.ts +1 -0
  62. package/lib/esm/ui/index.js +16 -2
  63. package/lib/esm/utils/role-labels.d.ts +1 -2
  64. package/lib/esm/utils/role-labels.js +1 -13
  65. package/lib/esm/utils/safe-translate.d.ts +4 -2
  66. package/lib/esm/utils/safe-translate.js +9 -2
  67. package/lib/esm/widgets/cluster-client-details/c4-cluster-client-details-app.js +80 -23
  68. package/lib/esm/widgets/cluster-details/c4-cluster-details-app.js +34 -23
  69. package/lib/esm/widgets/cluster-details/c4-cluster-details-app.types.d.ts +6 -0
  70. package/lib/esm/widgets/cluster-details/c4-cluster-details-page.js +7 -0
  71. package/lib/esm/widgets/cluster-details/c4-cluster-details-page.types.d.ts +3 -0
  72. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-activity-tab.js +1 -19
  73. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-alerts-tab.js +1 -14
  74. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-byom-clients-tab.js +1 -18
  75. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-clients-tab.js +57 -2
  76. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-connector-secrets-tab.d.ts +1 -0
  77. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-connector-secrets-tab.js +77 -28
  78. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-hot-backups-tab.js +1 -6
  79. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-ip-whitelist-tab.js +1 -18
  80. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-overview-tab.js +12 -22
  81. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-secure-connectivity-tab.js +1 -6
  82. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-settings-tab.js +3 -86
  83. package/lib/esm/widgets/clusters/c4-clusters-page.js +72 -100
  84. package/lib/esm/widgets/clusters/c4-clusters-page.types.d.ts +7 -0
  85. package/lib/esm/widgets/connector-management/c4-connector-management-page.js +1 -9
  86. package/lib/esm/widgets/connector-management/c4-connector-management.shared.js +1 -9
  87. package/lib/esm/widgets/create-cluster/c4-create-cluster-page.d.ts +88 -1
  88. package/lib/esm/widgets/create-cluster/c4-create-cluster-page.js +285 -45
  89. package/lib/esm/widgets/create-cluster/c4-create-cluster-page.types.d.ts +9 -0
  90. package/lib/esm/widgets/dashboard/c4-dashboard-app.js +3 -20
  91. package/lib/esm/widgets/dashboard/c4-dashboard-app.types.d.ts +6 -0
  92. package/lib/esm/widgets/environment/c4-cluster-connector-secrets-widget.js +1 -1
  93. package/lib/esm/widgets/group-details/c4-group-details-page.js +1 -9
  94. package/lib/esm/widgets/job-worker/c4-job-worker.helpers.d.ts +1 -0
  95. package/lib/esm/widgets/job-worker/c4-job-worker.helpers.js +4 -34
  96. package/lib/esm/widgets/management/c4-management-app.d.ts +1 -1
  97. package/lib/esm/widgets/management/c4-management-app.js +99 -23
  98. package/lib/esm/widgets/management/c4-management-app.types.d.ts +6 -0
  99. package/lib/esm/widgets/management/c4-management-page.d.ts +1 -1
  100. package/lib/esm/widgets/management/c4-management-page.js +7 -13
  101. package/lib/esm/widgets/management/c4-management-page.types.d.ts +1 -0
  102. package/lib/esm/widgets/management/management-tabs.d.ts +1 -1
  103. package/lib/esm/widgets/management/management-tabs.js +5 -0
  104. package/lib/esm/widgets/management/tabs/c4-management-api-tab.js +1 -13
  105. package/lib/esm/widgets/management/tabs/c4-management-billing-tab.js +1 -9
  106. package/lib/esm/widgets/management/tabs/c4-management-cluster-defaults-tab.d.ts +5 -0
  107. package/lib/esm/widgets/management/tabs/c4-management-cluster-defaults-tab.js +5 -0
  108. package/lib/esm/widgets/management/tabs/c4-management-overview-tab.js +1 -13
  109. package/lib/esm/widgets/management/tabs/c4-management-pricing-tab.js +1 -8
  110. package/lib/esm/widgets/management/tabs/c4-management-settings-tab.js +1 -24
  111. package/lib/esm/widgets/management/tabs/c4-management-users-tab.js +1 -13
  112. package/lib/esm/widgets/user-account/c4-delete-account-widget.js +2 -1
  113. package/lib/esm/widgets/user-details/c4-user-details-page.js +1 -9
  114. package/package.json +3 -3
  115. package/lib/esm/components/c4-cluster-settings/elements/optional-telemetry-toggle.d.ts +0 -14
  116. package/lib/esm/components/c4-cluster-settings/elements/optional-telemetry-toggle.js +0 -12
@@ -0,0 +1,130 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } 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 { ToggleGroup, ToggleGroupItem } from '@camunda/design-system';
8
+ import { ChevronLeft, ChevronRight } from '@carbon/react/icons/index.esm.js';
9
+ import { useCallback, useEffect, useRef, useState, } from 'react';
10
+ import { useC4DesignSystem } from '../../runtime/c4-console-runtime-context.js';
11
+ import { Button } from '../../ui/index.js';
12
+ import { useContentSwitcherFamily } from '../../ui/families.js';
13
+ /** How far one press of an arrow button moves the strip, in pixels. */
14
+ const MIN_SCROLL_STEP = 160;
15
+ /**
16
+ * One-of-many selector for a small set of options (a cloud provider, a release
17
+ * channel).
18
+ *
19
+ * carbon mode renders the Carbon `ContentSwitcher` and its `Switch` children,
20
+ * unchanged.
21
+ *
22
+ * ds mode renders the DS `ToggleGroup` in its `outline` variant. It corrects
23
+ * three things that the carbon-compat `ContentSwitcher` adapter does not do:
24
+ *
25
+ * - The adapter takes `selectedIndex` as an initial value alone, so the strip
26
+ * keeps the first selection after the state moves. This group is controlled.
27
+ * - Its items are `flex-1`, so every option gets the same width and a long
28
+ * label is cut. Here each option sizes to its own label.
29
+ * - A strip that is wider than its space scrolls, and on a system that hides
30
+ * the scrollbar there was no sign of the options outside the view. This
31
+ * component shows an arrow button on each side that has more options.
32
+ *
33
+ * The ds branch takes its width from its container and none from its options.
34
+ * In a box that shrinks to its content the row has a width of zero, thus a
35
+ * block or a grid column must give it one.
36
+ */
37
+ export const C4SegmentedControl = ({ options, value, onChange, ariaLabel, carbonStyle, dsStyle, }) => {
38
+ const designSystem = useC4DesignSystem();
39
+ // The family hook must run on every render (rules of hooks). Only the carbon
40
+ // branch below renders the result.
41
+ const { ContentSwitcher, Switch } = useContentSwitcherFamily();
42
+ const scrollRef = useRef(null);
43
+ const [hasMoreBefore, setHasMoreBefore] = useState(false);
44
+ const [hasMoreAfter, setHasMoreAfter] = useState(false);
45
+ const readOverflow = useCallback(() => {
46
+ const node = scrollRef.current;
47
+ if (!node) {
48
+ return;
49
+ }
50
+ // One pixel of tolerance: a fractional layout width otherwise reports an
51
+ // overflow of a fraction of a pixel that the reader cannot scroll to.
52
+ const maxScrollLeft = node.scrollWidth - node.clientWidth;
53
+ setHasMoreBefore(node.scrollLeft > 1);
54
+ setHasMoreAfter(node.scrollLeft < maxScrollLeft - 1);
55
+ }, []);
56
+ useEffect(() => {
57
+ const node = scrollRef.current;
58
+ if (!node) {
59
+ return;
60
+ }
61
+ readOverflow();
62
+ node.addEventListener('scroll', readOverflow, { passive: true });
63
+ const observer = typeof ResizeObserver === 'undefined'
64
+ ? undefined
65
+ : new ResizeObserver(readOverflow);
66
+ observer?.observe(node);
67
+ return () => {
68
+ node.removeEventListener('scroll', readOverflow);
69
+ observer?.disconnect();
70
+ };
71
+ }, [readOverflow, options.length]);
72
+ if (designSystem !== 'ds') {
73
+ return (_jsx(ContentSwitcher, { size: 'md', "aria-label": ariaLabel, style: carbonStyle, onChange: (data) => onChange(String(data.name ?? '')), selectedIndex: Math.max(options.findIndex((option) => option.id === value), 0), children: options.map((option) => (_jsx(Switch, { name: option.id, disabled: option.disabled, children: option.label }, option.id))) }));
74
+ }
75
+ const scrollByStep = (direction) => {
76
+ const node = scrollRef.current;
77
+ if (!node) {
78
+ return;
79
+ }
80
+ const step = Math.max(MIN_SCROLL_STEP, node.clientWidth * 0.6) * direction;
81
+ // jsdom has no `scrollBy`, and neither has an old browser. Move the
82
+ // position itself in that case.
83
+ if (typeof node.scrollBy === 'function') {
84
+ node.scrollBy({ left: step, behavior: 'smooth' });
85
+ return;
86
+ }
87
+ node.scrollLeft += step;
88
+ };
89
+ return (_jsxs("div", {
90
+ // The min-content width of this row is the full strip. `min-width: 0`
91
+ // on the scroll box lets the box shrink, but it does not lower the
92
+ // width the box reports. An ancestor that sizes a track by content
93
+ // grows to that width and hands it back to the row. Carbon `Stack` is
94
+ // such an ancestor: a grid with one `auto` track. With
95
+ // `contain: inline-size` the row reports no width of its own, thus it
96
+ // takes the width of its container, and the strip scrolls inside it.
97
+ style: {
98
+ display: 'flex',
99
+ alignItems: 'center',
100
+ gap: '0.25rem',
101
+ contain: 'inline-size',
102
+ ...dsStyle,
103
+ }, children: [hasMoreBefore && (_jsx(Button, { kind: 'ghost', size: 'sm', type: 'button', "aria-label": `Scroll ${ariaLabel} to the left`, renderIcon: ChevronLeft, onClick: () => scrollByStep(-1) })), _jsx("div", { ref: scrollRef,
104
+ // `min-width: 0` and `flex` are necessary, and not decoration: the
105
+ // automatic minimum size of a flex item is its min-content width, thus
106
+ // this box would grow to the full width of the strip. `scrollWidth`
107
+ // would then be equal to `clientWidth`, the component would find no
108
+ // overflow, and the arrow buttons would never come.
109
+ style: {
110
+ flex: '1 1 auto',
111
+ minWidth: 0,
112
+ overflowX: 'auto',
113
+ scrollbarWidth: 'thin',
114
+ }, children: _jsx(ToggleGroup, { type: 'single', variant: 'outline',
115
+ // The page has a grey background, and an option of this group had a
116
+ // transparent one, thus the strip read as a row of labels and not as
117
+ // a control that the reader can press. `neutral-background-subtle`
118
+ // is the surface of `ChoiceCard`, so the options now look the same
119
+ // as the cards of the other sections, and the larger size gives them
120
+ // the same press target.
121
+ size: 'lg', className: 'bg-neutral-background-subtle', "aria-label": ariaLabel, value: value ?? '',
122
+ // Radix reports an empty string when the reader presses the selected
123
+ // option again. This control is one-of-many, thus that press keeps
124
+ // the current selection.
125
+ onValueChange: (next) => {
126
+ if (next) {
127
+ onChange(next);
128
+ }
129
+ }, children: options.map((option) => (_jsx(ToggleGroupItem, { value: option.id, disabled: option.disabled, style: { flex: '0 0 auto', minWidth: 'auto' }, children: option.label }, option.id))) }) }), hasMoreAfter && (_jsx(Button, { kind: 'ghost', size: 'sm', type: 'button', "aria-label": `Scroll ${ariaLabel} to the right`, renderIcon: ChevronRight, onClick: () => scrollByStep(1) }))] }));
130
+ };
@@ -11,12 +11,14 @@ export declare const C4_EXTERNAL_URLS: {
11
11
  readonly consoleClusterClients: "https://docs.camunda.io/docs/next/components/hub/organization/manage-clusters/manage-api-clients";
12
12
  readonly consoleManageConnectors: "https://docs.camunda.io/docs/components/console/manage-clusters/cluster-connectors/";
13
13
  readonly connectorSecrets: "https://docs.camunda.io/docs/next/components/connectors/use-connectors/#using-secrets";
14
+ readonly clusterSecrets: "https://docs.camunda.io/docs/next/components/hub/organization/manage-clusters/manage-secrets/";
14
15
  readonly consoleIpWhitelist: "https://docs.camunda.io/docs/next/components/console/manage-clusters/manage-ip-allowlists/";
15
16
  readonly conceptsRBA: "https://docs.camunda.io/docs/components/concepts/resource-authorizations/";
16
17
  readonly springZeebe: "https://docs.camunda.io/docs/apis-tools/spring-zeebe-sdk/getting-started/";
17
18
  readonly springZeebeConfig: "https://docs.camunda.io/docs/apis-tools/spring-zeebe-sdk/configuration/";
18
19
  readonly hotBackups: "https://docs.camunda.io/docs/components/saas/backups/";
19
20
  readonly earlyAccess: "https://docs.camunda.io/docs/next/components/early-access/overview/";
21
+ readonly createCluster: "https://docs.camunda.io/docs/components/console/manage-clusters/create-cluster/";
20
22
  readonly encryption: "https://docs.camunda.io/docs/components/console/manage-clusters/create-cluster/";
21
23
  readonly clusterLoad: "https://docs.camunda.io/docs/next/components/console/manage-clusters/cluster-capacity/";
22
24
  readonly identityAuthorizations: "https://docs.camunda.io/docs/next/components/concepts/access-control/authorizations/";
@@ -85,6 +87,11 @@ export declare function getC4DashboardUrls(params: {
85
87
  modeler: string;
86
88
  };
87
89
  export declare function getC4ClusterClientDetailsDocsUrl(url?: string): string;
90
+ /**
91
+ * The docs link of the clusters empty state. The empty state asks the reader to
92
+ * make a cluster, thus the link goes to the page about cluster creation. The
93
+ * general guides index made the reader look for that page again.
94
+ */
88
95
  export declare function getC4ClustersGettingStartedHref(href?: string): string;
89
96
  export declare function getC4ManagementUrls(params?: {
90
97
  email?: string;
@@ -10,12 +10,14 @@ export const C4_EXTERNAL_URLS = {
10
10
  consoleClusterClients: 'https://docs.camunda.io/docs/next/components/hub/organization/manage-clusters/manage-api-clients',
11
11
  consoleManageConnectors: 'https://docs.camunda.io/docs/components/console/manage-clusters/cluster-connectors/',
12
12
  connectorSecrets: 'https://docs.camunda.io/docs/next/components/connectors/use-connectors/#using-secrets',
13
+ clusterSecrets: 'https://docs.camunda.io/docs/next/components/hub/organization/manage-clusters/manage-secrets/',
13
14
  consoleIpWhitelist: 'https://docs.camunda.io/docs/next/components/console/manage-clusters/manage-ip-allowlists/',
14
15
  conceptsRBA: 'https://docs.camunda.io/docs/components/concepts/resource-authorizations/',
15
16
  springZeebe: 'https://docs.camunda.io/docs/apis-tools/spring-zeebe-sdk/getting-started/',
16
17
  springZeebeConfig: 'https://docs.camunda.io/docs/apis-tools/spring-zeebe-sdk/configuration/',
17
18
  hotBackups: 'https://docs.camunda.io/docs/components/saas/backups/',
18
19
  earlyAccess: 'https://docs.camunda.io/docs/next/components/early-access/overview/',
20
+ createCluster: 'https://docs.camunda.io/docs/components/console/manage-clusters/create-cluster/',
19
21
  encryption: 'https://docs.camunda.io/docs/components/console/manage-clusters/create-cluster/',
20
22
  clusterLoad: 'https://docs.camunda.io/docs/next/components/console/manage-clusters/cluster-capacity/',
21
23
  identityAuthorizations: 'https://docs.camunda.io/docs/next/components/concepts/access-control/authorizations/',
@@ -82,6 +84,9 @@ export function getC4ClusterDetailsUrls(urls) {
82
84
  ipWhitelist: urls.docs?.ipWhitelist ?? C4_EXTERNAL_URLS.docs.consoleIpWhitelist,
83
85
  clients: urls.docs?.clients ?? C4_EXTERNAL_URLS.docs.consoleClusterClients,
84
86
  connectorSecrets: urls.docs?.connectorSecrets ?? C4_EXTERNAL_URLS.docs.connectorSecrets,
87
+ clusterSecrets: urls.docs?.clusterSecrets ??
88
+ urls.docs?.connectorSecrets ??
89
+ C4_EXTERNAL_URLS.docs.clusterSecrets,
85
90
  mcpSetup: urls.docs?.mcpSetup ?? C4_EXTERNAL_URLS.docs.mcpSetup,
86
91
  upgrade: {
87
92
  whatsNewIn88: urls.docs?.upgrade?.whatsNewIn88 ??
@@ -150,8 +155,13 @@ export function getC4DashboardUrls(params) {
150
155
  export function getC4ClusterClientDetailsDocsUrl(url) {
151
156
  return url?.trim() || C4_EXTERNAL_URLS.docs.consoleClusterClients;
152
157
  }
158
+ /**
159
+ * The docs link of the clusters empty state. The empty state asks the reader to
160
+ * make a cluster, thus the link goes to the page about cluster creation. The
161
+ * general guides index made the reader look for that page again.
162
+ */
153
163
  export function getC4ClustersGettingStartedHref(href) {
154
- return href?.trim() || 'https://docs.camunda.io/docs/guides/';
164
+ return href?.trim() || C4_EXTERNAL_URLS.docs.createCluster;
155
165
  }
156
166
  export function getC4ManagementUrls(params) {
157
167
  const overrides = params?.overrides;
@@ -52,6 +52,8 @@ const resources = {
52
52
  delete: 'Delete',
53
53
  resume: 'Resume',
54
54
  failover: 'Failover',
55
+ duplicate: 'Duplicate',
56
+ duplicateUnavailableFailoverSource: 'Duplicate (unavailable — this cluster was failed over)',
55
57
  },
56
58
  },
57
59
  tags: {
@@ -85,6 +87,7 @@ const resources = {
85
87
  menu: {
86
88
  rename: 'Rename',
87
89
  delete: 'Delete',
90
+ duplicate: 'Duplicate',
88
91
  },
89
92
  banner: {
90
93
  unsupportedGeneration: {
@@ -138,7 +138,8 @@
138
138
  "memberScopes": "Member Scopes",
139
139
  "createdAt": "Created at",
140
140
  "createdBy": "Created by",
141
- "lastUsed": "Last used"
141
+ "lastUsed": "Last used",
142
+ "activityScopes": "Activity scopes"
142
143
  }
143
144
  },
144
145
  "update": {
@@ -102,6 +102,22 @@
102
102
  "buttonText": "Configure authorizations in Identity"
103
103
  }
104
104
  },
105
+ "rotate": {
106
+ "heading": "Rotate client secret",
107
+ "buttons": {
108
+ "primary": "Rotate secret",
109
+ "secondary": "Cancel"
110
+ },
111
+ "loadingText": "Rotating client secret...",
112
+ "description": "This creates a new secret for this client. The current secret stops working, so update every application that uses it. The change can take a few minutes to apply everywhere.",
113
+ "result": {
114
+ "heading": "New client secret"
115
+ },
116
+ "error": {
117
+ "title": "Error",
118
+ "generic": "We're having trouble rotating the client secret"
119
+ }
120
+ },
105
121
  "delete": {
106
122
  "heading": "Delete client",
107
123
  "buttons": {
@@ -145,7 +161,8 @@
145
161
  "fields": {
146
162
  "name": {
147
163
  "label": "Client name",
148
- "helperText": "can contain letters, dashes, underscores, and digits"
164
+ "helperText": "can contain letters, dashes, underscores, and digits",
165
+ "required": "Client name is required"
149
166
  }
150
167
  },
151
168
  "error": {
@@ -64,6 +64,7 @@
64
64
  "overflowMenu": {
65
65
  "detail": "Detail",
66
66
  "rename": "Rename",
67
+ "rotateSecret": "Rotate secret",
67
68
  "delete": "Delete"
68
69
  },
69
70
  "noClientsMessage": {
@@ -93,7 +94,12 @@
93
94
  "operateUrl": "Operate URL",
94
95
  "optimizeUrl": "Optimize URL",
95
96
  "oauthUrl": "OAuth URL",
96
- "restApi": "Camunda REST API"
97
+ "restApi": "Camunda REST API",
98
+ "error": {
99
+ "title": "Something went wrong",
100
+ "cluster": "Failed to load cluster.",
101
+ "clients": "Failed to load clients."
102
+ }
97
103
  },
98
104
  "fetchError": {
99
105
  "title": "Oops ... something went wrong.",
@@ -147,6 +153,11 @@
147
153
  "title": "Store credentials safely using Camunda cluster secrets",
148
154
  "description": "Accessing an external system requires authentication with credentials. To ensure the credentials are secure, use the Camunda secrets vault to store usernames, passwords, or API credentials without exposing sensitive information in your BPMN processes."
149
155
  },
156
+ "noSecretsDs": {
157
+ "title": "Store sensitive values as cluster secrets",
158
+ "description": "Cluster secrets store API keys, passwords, and other sensitive values. Reference them from credentials and supported fields.",
159
+ "link": "Learn more about cluster secrets"
160
+ },
150
161
  "forbidden": {
151
162
  "title": "You don't have access to cluster secrets",
152
163
  "description": "You don't have permission to view cluster secrets for this cluster. Contact an organization owner or admin for access."
@@ -675,12 +686,6 @@
675
686
  "msTeamsLinkText": "Microsoft Teams",
676
687
  "descriptionDisabled": "When disabled, you can still use App Integrations, but they work with reduced functionality."
677
688
  },
678
- "optionalTelemetry": {
679
- "tileTitle": "Optional telemetry",
680
- "description": "Camunda collects optional usage data from this cluster to improve our products. When disabled, Camunda still collects contractual telemetry, which is required and can't be turned off.",
681
- "title": "Enable optional telemetry",
682
- "confirmBody": "Turning off optional telemetry restarts your cluster. Your cluster is briefly unavailable while it restarts. Camunda still collects contractual telemetry, which is required and can't be turned off."
683
- },
684
689
  "tasklistMode": {
685
690
  "title": "Upgrade to Tasklist v2",
686
691
  "warning": "This setting is not recommended for production environments, as it might reduce individual process instance latency but can slow down general throughput.",
@@ -89,5 +89,48 @@
89
89
  "prefix": "Need help?",
90
90
  "label": "Talk to an expert"
91
91
  }
92
+ },
93
+ "duplicate": {
94
+ "title": "Duplicate a cluster",
95
+ "notice": {
96
+ "title": "Copying settings from",
97
+ "copied": "Your connector secrets, alerts, IP allowlist, and other cluster settings carry over to the new cluster.",
98
+ "notCopied": "Process data is not copied — the new cluster starts empty. Each API client is recreated with a new client ID and secret. Use Rotate secret on the new cluster to see the new secret of a client, then update your applications."
99
+ },
100
+ "cta": {
101
+ "create": "Duplicate cluster",
102
+ "states": {
103
+ "submitting": "Duplicating cluster...",
104
+ "success": "Cluster will now be created",
105
+ "error": "Error duplicating cluster. Please try again."
106
+ }
107
+ },
108
+ "replace": {
109
+ "label": "Delete the original cluster to free up a reservation",
110
+ "description": "Your plan has no reservations left. The new cluster is created first, then the original cluster and all of its data are deleted. This cannot be undone.",
111
+ "confirm": {
112
+ "heading": "Delete the original cluster?",
113
+ "body": "The original cluster and all of its data are deleted once the new cluster is created. This cannot be undone.",
114
+ "label": "Type DELETE to confirm",
115
+ "primary": "Duplicate and delete",
116
+ "secondary": "Cancel"
117
+ }
118
+ },
119
+ "carryOverFailed": {
120
+ "title": "Some settings were not copied",
121
+ "subtitle": "Your new cluster is ready, but we could not copy everything. Check these on the new cluster:"
122
+ },
123
+ "carryOver": {
124
+ "clusterClients": "API clients",
125
+ "connectorSecrets": "connector secrets",
126
+ "alerts": "alerts",
127
+ "byom": "monitoring credentials",
128
+ "byoidp": "identity provider secret",
129
+ "backupSchedule": "backup schedule"
130
+ },
131
+ "sourceNotDeleted": {
132
+ "title": "The original cluster was not deleted",
133
+ "subtitle": "Your new cluster is ready, but we could not delete the original cluster. Delete it from the cluster list to free up its reservation."
134
+ }
92
135
  }
93
136
  }
@@ -30,6 +30,9 @@
30
30
  "trial": "Trial",
31
31
  "enterprise": "Enterprise",
32
32
  "internal": "Internal"
33
+ },
34
+ "items": {
35
+ "name": "Organization name"
33
36
  }
34
37
  },
35
38
  "groups": {
@@ -488,6 +491,9 @@
488
491
  "message": "Please reload",
489
492
  "button": "Reload"
490
493
  }
494
+ },
495
+ "clusterDefaults": {
496
+ "title": "Cluster defaults"
491
497
  }
492
498
  },
493
499
  "rename": {
@@ -102,6 +102,7 @@ export { C4ExternalLink } from './components/c4-external-link/c4-external-link.j
102
102
  export type { C4ExternalLinkProps } from './components/c4-external-link/c4-external-link.types.js';
103
103
  export type { C4FeedbackFormProps, C4FeedbackModalProps, C4FeedbackPayload, C4FeedbackReportType, } from './components/c4-feedback-modal/c4-feedback-modal.js';
104
104
  export { C4FeedbackForm, C4FeedbackModal, } from './components/c4-feedback-modal/c4-feedback-modal.js';
105
+ export { C4FileUploader, type C4FileUploaderProps, } from './components/c4-file-uploader/c4-file-uploader.js';
105
106
  export type { C4HelpCenterData, C4HelpCenterLink, C4HelpCenterProps, C4HelpCenterTabData, C4HelpCenterTile, } from './components/c4-help-center/c4-help-center.js';
106
107
  export { C4HelpCenter, FEEDBACK_TAB_ID, } from './components/c4-help-center/c4-help-center.js';
107
108
  export { HUB_HELP_CENTER_LINKS_FLAG, rewriteAppHostToHub, } from './components/c4-help-center/help-center-app-host.js';
@@ -144,6 +145,8 @@ export { C4OldDashboard } from './components/c4-old-dashboard/c4-old-dashboard.j
144
145
  export type { C4OldDashboardProps } from './components/c4-old-dashboard/c4-old-dashboard.types.js';
145
146
  export { C4OptimizeActivationModal } from './components/c4-optimize-activation-modal/c4-optimize-activation-modal.js';
146
147
  export type { C4OptimizeActivationModalProps } from './components/c4-optimize-activation-modal/c4-optimize-activation-modal.types.js';
148
+ export { C4OrgClusterDefaults } from './components/c4-org-cluster-defaults/c4-org-cluster-defaults.js';
149
+ export type { C4OrgClusterDefaultsProps } from './components/c4-org-cluster-defaults/c4-org-cluster-defaults.types.js';
147
150
  export { C4PageLayout } from './components/c4-page-layout/c4-page-layout.js';
148
151
  export { C4PageTemplate } from './components/c4-page-template/c4-page-template.js';
149
152
  export { C4PermissionErrorPage } from './components/c4-permission-error-page/c4-permission-error-page.js';
@@ -158,6 +161,7 @@ export { C4Search } from './components/c4-search/c4-search.js';
158
161
  export type { C4SearchProps } from './components/c4-search/c4-search.types.js';
159
162
  export { C4SearchResults } from './components/c4-search/c4-search-results.js';
160
163
  export type { C4SearchResultsProps, SearchResultEntry, SearchResults, } from './components/c4-search/c4-search-results.types.js';
164
+ export { C4SegmentedControl, type C4SegmentedControlOption, type C4SegmentedControlProps, } from './components/c4-segmented-control/c4-segmented-control.js';
161
165
  export { C4SmClusterDetails } from './components/c4-sm-cluster-details/c4-sm-cluster-details.js';
162
166
  export type { C4SmClusterDetailsProps } from './components/c4-sm-cluster-details/c4-sm-cluster-details.types.js';
163
167
  export { C4SmDashboard } from './components/c4-sm-dashboard/c4-sm-dashboard.js';
package/lib/esm/index.js CHANGED
@@ -55,6 +55,7 @@ export { C4EmptyState, } from './components/c4-empty-state/c4-empty-state.js';
55
55
  export { C4ExtendTrialModal } from './components/c4-extend-trial-modal/c4-extend-trial-modal.js';
56
56
  export { C4ExternalLink } from './components/c4-external-link/c4-external-link.js';
57
57
  export { C4FeedbackForm, C4FeedbackModal, } from './components/c4-feedback-modal/c4-feedback-modal.js';
58
+ export { C4FileUploader, } from './components/c4-file-uploader/c4-file-uploader.js';
58
59
  export { C4HelpCenter, FEEDBACK_TAB_ID, } from './components/c4-help-center/c4-help-center.js';
59
60
  export { HUB_HELP_CENTER_LINKS_FLAG, rewriteAppHostToHub, } from './components/c4-help-center/help-center-app-host.js';
60
61
  export { C4InfoTooltip } from './components/c4-info-tooltip/c4-info-tooltip.js';
@@ -77,6 +78,7 @@ export { C4Navigation, } from './components/c4-navigation/c4-navigation.js';
77
78
  export { C4NumberInput } from './components/c4-number-input/c4-number-input.js';
78
79
  export { C4OldDashboard } from './components/c4-old-dashboard/c4-old-dashboard.js';
79
80
  export { C4OptimizeActivationModal } from './components/c4-optimize-activation-modal/c4-optimize-activation-modal.js';
81
+ export { C4OrgClusterDefaults } from './components/c4-org-cluster-defaults/c4-org-cluster-defaults.js';
80
82
  export { C4PageLayout } from './components/c4-page-layout/c4-page-layout.js';
81
83
  export { C4PageTemplate } from './components/c4-page-template/c4-page-template.js';
82
84
  export { C4PermissionErrorPage } from './components/c4-permission-error-page/c4-permission-error-page.js';
@@ -85,6 +87,7 @@ export { C4PricingCard } from './components/c4-pricing-card/c4-pricing-card.js';
85
87
  export { C4RenameOrganizationModal } from './components/c4-rename-organization-modal/c4-rename-organization-modal.js';
86
88
  export { C4Search } from './components/c4-search/c4-search.js';
87
89
  export { C4SearchResults } from './components/c4-search/c4-search-results.js';
90
+ export { C4SegmentedControl, } from './components/c4-segmented-control/c4-segmented-control.js';
88
91
  export { C4SmClusterDetails } from './components/c4-sm-cluster-details/c4-sm-cluster-details.js';
89
92
  export { C4SmDashboard } from './components/c4-sm-dashboard/c4-sm-dashboard.js';
90
93
  export { C4Stat } from './components/c4-stat/c4-stat.js';
@@ -30,7 +30,7 @@ export declare const useC4ConsoleStage: () => ConsoleStage | undefined;
30
30
  * package must NOT get by default.
31
31
  *
32
32
  * The key is the dot path of the flag in `@camunda-cloud/featureflags`, for
33
- * example `console.optionalTelemetry`.
33
+ * example `console.appIntegrations`.
34
34
  *
35
35
  * The value comes from one of two places. A host that gives
36
36
  * `config.featureFlags` answers it itself. Every other host gets the flags
@@ -47,7 +47,7 @@ function useSyncCarbonThemeToDesignSystem(designSystem) {
47
47
  };
48
48
  }, [designSystem]);
49
49
  }
50
- /** Reads a dot path such as `console.optionalTelemetry` out of the flags. */
50
+ /** Reads a dot path such as `console.appIntegrations` out of the flags. */
51
51
  function readFlag(flags, flagKey) {
52
52
  if (!flags) {
53
53
  return false;
@@ -200,7 +200,7 @@ export const useC4ConsoleStage = () => {
200
200
  * package must NOT get by default.
201
201
  *
202
202
  * The key is the dot path of the flag in `@camunda-cloud/featureflags`, for
203
- * example `console.optionalTelemetry`.
203
+ * example `console.appIntegrations`.
204
204
  *
205
205
  * The value comes from one of two places. A host that gives
206
206
  * `config.featureFlags` answers it itself. Every other host gets the flags
@@ -0,0 +1,10 @@
1
+ /**
2
+ * The flag that offers a duplicate of a cluster. The create page and every menu
3
+ * that opens it read this flag, thus one name holds the dot path.
4
+ *
5
+ * console-backend answers 501 for the same flag, on
6
+ * `POST /orgs/:orgId/clusters/:clusterId/duplicate`. A host that does not know
7
+ * the flag reads it as off (see `useC4FeatureFlag`), thus no menu shows the
8
+ * entry and the create page makes a normal cluster.
9
+ */
10
+ export declare const CLUSTER_DUPLICATION_FLAG = "console.clusterDuplication";
@@ -0,0 +1,15 @@
1
+ /*
2
+ * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
3
+ * under one or more contributor license agreements. Licensed under a commercial license.
4
+ * You may not use this file except in compliance with the commercial license.
5
+ */
6
+ /**
7
+ * The flag that offers a duplicate of a cluster. The create page and every menu
8
+ * that opens it read this flag, thus one name holds the dot path.
9
+ *
10
+ * console-backend answers 501 for the same flag, on
11
+ * `POST /orgs/:orgId/clusters/:clusterId/duplicate`. A host that does not know
12
+ * the flag reads it as off (see `useC4FeatureFlag`), thus no menu shows the
13
+ * entry and the create page makes a normal cluster.
14
+ */
15
+ export const CLUSTER_DUPLICATION_FLAG = 'console.clusterDuplication';
@@ -0,0 +1,14 @@
1
+ /**
2
+ * The flag that offers the "Cluster defaults" tab of the organization
3
+ * settings (#9732). The organization sets the values that its next cluster
4
+ * starts with.
5
+ *
6
+ * The flag gates the customer surface alone. A Camundi sets the same
7
+ * defaults in Control without it, and accounts serves the route in every
8
+ * case — the route refuses a field that the caller may not write, thus a
9
+ * host that turns the flag on early can write the customer fields only.
10
+ *
11
+ * A host that does not know the flag reads it as off (see
12
+ * `useC4FeatureFlag`), thus the tab is absent.
13
+ */
14
+ export declare const ORG_CLUSTER_DEFAULTS_FLAG = "console.orgClusterDefaults";
@@ -0,0 +1,19 @@
1
+ /*
2
+ * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
3
+ * under one or more contributor license agreements. Licensed under a commercial license.
4
+ * You may not use this file except in compliance with the commercial license.
5
+ */
6
+ /**
7
+ * The flag that offers the "Cluster defaults" tab of the organization
8
+ * settings (#9732). The organization sets the values that its next cluster
9
+ * starts with.
10
+ *
11
+ * The flag gates the customer surface alone. A Camundi sets the same
12
+ * defaults in Control without it, and accounts serves the route in every
13
+ * case — the route refuses a field that the caller may not write, thus a
14
+ * host that turns the flag on early can write the customer fields only.
15
+ *
16
+ * A host that does not know the flag reads it as off (see
17
+ * `useC4FeatureFlag`), thus the tab is absent.
18
+ */
19
+ export const ORG_CLUSTER_DEFAULTS_FLAG = 'console.orgClusterDefaults';
@@ -91,5 +91,5 @@ export function C4PasswordInput({ className, defaultValue, disabled, helperText,
91
91
  return (_jsxs("div", { className: 'flex flex-col gap-1', children: [labelText !== undefined ? (_jsx("label", { htmlFor: resolvedId, className: cn('text-sm font-medium', hideLabel && 'sr-only'), children: labelText })) : null, _jsxs("div", { className: 'relative', children: [_jsx(Input, { ...omitCarbonOnly(rest), ...valueProps, id: resolvedId, type: inputType, disabled: disabled, readOnly: readOnly, placeholder: placeholder, onChange: onChange, onClick: onClick, "aria-invalid": invalid || undefined, "aria-errormessage": errorMessageId, "aria-describedby": describedBy, className: cn('pr-8', className) }), _jsx("button", { type: 'button', "aria-label": passwordIsVisible ? hidePasswordLabel : showPasswordLabel, disabled: disabled, onClick: (event) => {
92
92
  setInputType(passwordIsVisible ? 'password' : 'text');
93
93
  onTogglePasswordVisibility?.(event);
94
- }, className: 'absolute right-2 top-1/2 -translate-y-1/2 rounded-sm text-neutral-foreground-subtle hover:text-neutral-foreground-strong focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50', children: _jsx(ToggleIcon, { "aria-hidden": 'true', className: 'h-4 w-4' }) })] }), showInvalidText ? (_jsx("span", { id: errorId, className: 'text-xs text-danger-action-default', children: invalidText })) : null, showHelperText ? (_jsx("span", { id: helperId, className: 'text-xs text-neutral-foreground-subtle', children: helperText })) : null] }));
94
+ }, className: 'absolute right-2 top-1/2 -translate-y-1/2 rounded-sm text-neutral-foreground-subtle hover:text-neutral-foreground-strong focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50', children: _jsx(ToggleIcon, { "aria-hidden": 'true', className: 'h-4 w-4' }) })] }), showInvalidText ? (_jsx("span", { id: errorId, className: 'text-xs text-danger-foreground-subtle', children: invalidText })) : null, showHelperText ? (_jsx("span", { id: helperId, className: 'text-xs text-neutral-foreground-subtle', children: helperText })) : null] }));
95
95
  }
@@ -3,6 +3,7 @@ import { type ComponentProps, type ComponentType } from 'react';
3
3
  export declare const Button: ComponentType<import("@camunda/design-system/carbon-compat").ButtonProps<"button">>;
4
4
  export declare const Checkbox: ComponentType<import("@carbon/react").CheckboxProps & import("react").RefAttributes<unknown>>;
5
5
  export declare const CodeSnippet: ComponentType<import("@camunda/design-system/carbon-compat").CodeSnippetProps>;
6
+ export declare const ClusterTag: ComponentType<import("@camunda/design-system/carbon-compat").C3ClusterTagProps>;
6
7
  export declare const DefinitionTooltip: ComponentType<import("@carbon/react").DefinitionTooltipProps>;
7
8
  export declare const Dropdown: ComponentType<import("@carbon/react").DropdownProps<unknown> & {
8
9
  ref?: import("react").Ref<HTMLButtonElement>;
@@ -36,7 +36,8 @@
36
36
  * To add a leaf: import the Carbon + carbon-compat versions and wrap with
37
37
  * `switchable(...)`, then point the consuming component's import at this module.
38
38
  */
39
- import { BreadcrumbSkeleton as DsBreadcrumbSkeleton, Button as DsButton, Checkbox as DsCheckbox, CodeSnippet as DsCodeSnippet, ComposedModal as DsComposedModal, Dropdown as DsDropdown, FilterableMultiSelect as DsFilterableMultiSelect, Form as DsForm, FormGroup as DsFormGroup, IconButton as DsIconButton, Link as DsLink, ListItem as DsListItem, Loading as DsLoading, ModalBody as DsModalBody, ModalFooter as DsModalFooter, ModalHeader as DsModalHeader, MultiSelect as DsMultiSelect, OverflowMenu as DsOverflowMenu, OverflowMenuItem as DsOverflowMenuItem, ProgressBar as DsProgressBar, Search as DsSearch, SkeletonPlaceholder as DsSkeletonPlaceholder, SkeletonText as DsSkeletonText, Stack as DsStack, TabsSkeleton as DsTabsSkeleton, Tag as DsTag, TextArea as DsTextArea, TextInput as DsTextInput, Tile as DsTile, Toggle as DsToggle, Tooltip as DsTooltip, UnorderedList as DsUnorderedList, } from '@camunda/design-system/carbon-compat';
39
+ import { C3ClusterTag as CarbonClusterTag } from '@camunda/camunda-composite-components';
40
+ import { BreadcrumbSkeleton as DsBreadcrumbSkeleton, Button as DsButton, Checkbox as DsCheckbox, C3ClusterTag as DsClusterTag, CodeSnippet as DsCodeSnippet, ComposedModal as DsComposedModal, Dropdown as DsDropdown, FilterableMultiSelect as DsFilterableMultiSelect, Form as DsForm, FormGroup as DsFormGroup, IconButton as DsIconButton, Link as DsLink, ListItem as DsListItem, Loading as DsLoading, ModalBody as DsModalBody, ModalFooter as DsModalFooter, ModalHeader as DsModalHeader, MultiSelect as DsMultiSelect, OverflowMenu as DsOverflowMenu, OverflowMenuItem as DsOverflowMenuItem, ProgressBar as DsProgressBar, Search as DsSearch, SkeletonPlaceholder as DsSkeletonPlaceholder, SkeletonText as DsSkeletonText, Stack as DsStack, TabsSkeleton as DsTabsSkeleton, Tag as DsTag, TextArea as DsTextArea, TextInput as DsTextInput, Tile as DsTile, Toggle as DsToggle, Tooltip as DsTooltip, UnorderedList as DsUnorderedList, } from '@camunda/design-system/carbon-compat';
40
41
  import { BreadcrumbSkeleton as CarbonBreadcrumbSkeleton, Button as CarbonButton, Checkbox as CarbonCheckbox, CodeSnippet as CarbonCodeSnippet, ComposedModal as CarbonComposedModal, DefinitionTooltip as CarbonDefinitionTooltip, Dropdown as CarbonDropdown, FilterableMultiSelect as CarbonFilterableMultiSelect, Form as CarbonForm, FormGroup as CarbonFormGroup, IconButton as CarbonIconButton, Link as CarbonLink, ListItem as CarbonListItem, Loading as CarbonLoading, Modal as CarbonModal, ModalBody as CarbonModalBody, ModalFooter as CarbonModalFooter, ModalHeader as CarbonModalHeader, MultiSelect as CarbonMultiSelect, OverflowMenu as CarbonOverflowMenu, OverflowMenuItem as CarbonOverflowMenuItem, PasswordInput as CarbonPasswordInput, ProgressBar as CarbonProgressBar, Search as CarbonSearch, SkeletonPlaceholder as CarbonSkeletonPlaceholder, SkeletonText as CarbonSkeletonText, Stack as CarbonStack, TabsSkeleton as CarbonTabsSkeleton, Tag as CarbonTag, TextArea as CarbonTextArea, TextInput as CarbonTextInput, Tile as CarbonTile, Toggle as CarbonToggle, Tooltip as CarbonTooltip, UnorderedList as CarbonUnorderedList, } from '@carbon/react';
41
42
  import { createElement, Fragment, } from 'react';
42
43
  import { useC4DesignSystem } from '../runtime/c4-console-runtime-context.js';
@@ -47,6 +48,13 @@ import { switchable } from './switchable.js';
47
48
  export const Button = switchable(CarbonButton, DsButton);
48
49
  export const Checkbox = switchable(CarbonCheckbox, DsCheckbox);
49
50
  export const CodeSnippet = switchable(CarbonCodeSnippet, DsCodeSnippet);
51
+ // The c3 stage chip. c3 is public and renders the Carbon `Tag` itself, thus the
52
+ // ds branch is the carbon-compat adapter, which renders the DS `Badge` and
53
+ // gives each stage a semantic variant (dev/test/stage/prod →
54
+ // success/info/warning/danger). The adapter supports the `stage` form alone:
55
+ // it drops `clusterUuid` with a warning, because it cannot read the c3 profile
56
+ // store. Look the stage up at the call site before you pass it.
57
+ export const ClusterTag = switchable(CarbonClusterTag, DsClusterTag);
50
58
  // carbon-compat ships no definition-tooltip adapter, so the ds branch is the DS
51
59
  // component directly (see ./c4-definition-tooltip). Unlike Carbon's, it renders
52
60
  // the definition through a portal, so an ancestor that hides overflow does not
@@ -97,6 +105,12 @@ export const Tag = switchable(CarbonTag, DsTag);
97
105
  // TextInput adapter, which DOES render them: append a helper/error `<span>`
98
106
  // sibling after the DS TextArea, with the same classes and error-over-helper
99
107
  // precedence. Carbon mode stays byte-identical.
108
+ //
109
+ // The error class must be one that the DS stylesheet holds. A c4 consumer
110
+ // loads the built `@camunda/design-system/styles.css` and compiles no Tailwind
111
+ // of its own, thus a utility class that no DS component uses has no rule, and
112
+ // the error text then renders in the normal color. `text-danger-foreground-
113
+ // subtle` is the class of the DS TextInput adapter, so it is always there.
100
114
  function C4TextArea(props) {
101
115
  const designSystem = useC4DesignSystem();
102
116
  if (designSystem !== 'ds') {
@@ -109,7 +123,7 @@ function C4TextArea(props) {
109
123
  const { invalid, invalidText, helperText, ...dsProps } = props;
110
124
  let message;
111
125
  if (invalid && invalidText !== undefined) {
112
- message = createElement('span', { className: 'text-xs text-danger-action-default' }, invalidText);
126
+ message = createElement('span', { className: 'text-xs text-danger-foreground-subtle' }, invalidText);
113
127
  }
114
128
  else if (helperText !== undefined) {
115
129
  message = createElement('span', { className: 'text-xs text-neutral-foreground-subtle' }, helperText);
@@ -1,5 +1,5 @@
1
1
  import { type AssignableOrganizationRoleType } from '@camunda/ccma-shared-types';
2
- type TranslateFn = (key: string, options?: Record<string, unknown>) => string;
2
+ import { type TranslateFn } from './safe-translate.js';
3
3
  /** The 8.7-cluster legacy section, minus anything the aligned model promotes. */
4
4
  export declare function legacySectionRoles(permissionsReworkEnabled: boolean): AssignableOrganizationRoleType[];
5
5
  /**
@@ -35,4 +35,3 @@ export declare function roleLabelDescription(t: TranslateFn | undefined, role: s
35
35
  label: string;
36
36
  description: string;
37
37
  };
38
- export {};
@@ -4,19 +4,7 @@
4
4
  * You may not use this file except in compliance with the commercial license.
5
5
  */
6
6
  import { LegacyHeldOrganizationRole, OrganizationRole, } from '@camunda/ccma-shared-types';
7
- function safeTranslate(t, key, defaultValue) {
8
- if (!t)
9
- return defaultValue;
10
- try {
11
- const translated = t(key);
12
- return typeof translated === 'string' && translated !== key
13
- ? translated
14
- : defaultValue;
15
- }
16
- catch {
17
- return defaultValue;
18
- }
19
- }
7
+ import { safeTranslate } from './safe-translate.js';
20
8
  // Historical UI order of the 8.7-cluster roles section.
21
9
  const LEGACY_SECTION_ROLES = [
22
10
  OrganizationRole.VISITOR,