@camunda/ccma-saas-frontend 0.15.1 → 0.17.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 (129) hide show
  1. package/lib/esm/components/c4-audit-log/c4-audit-log.js +53 -42
  2. package/lib/esm/components/c4-billing-page/c4-billing-page.js +5 -1
  3. package/lib/esm/components/c4-breadcrumb/c4-breadcrumb.js +8 -3
  4. package/lib/esm/components/c4-cluster-byom-clients/c4-cluster-byom-clients.d.ts +10 -0
  5. package/lib/esm/components/c4-cluster-byom-clients/c4-cluster-byom-clients.js +9 -1
  6. package/lib/esm/components/c4-cluster-client-credentials/c4-cluster-client-credentials.js +13 -5
  7. package/lib/esm/components/c4-cluster-client-credentials/ds-credential-items.d.ts +14 -0
  8. package/lib/esm/components/c4-cluster-client-credentials/ds-credential-items.js +18 -0
  9. package/lib/esm/components/c4-cluster-client-credentials-identity/c4-cluster-client-credentials-identity.js +18 -7
  10. package/lib/esm/components/c4-cluster-details-clients/c4-cluster-details-clients.mocks.js +2 -2
  11. package/lib/esm/components/c4-cluster-list/c4-cluster-list.js +4 -10
  12. package/lib/esm/components/c4-cluster-list/c4-cluster-list.types.d.ts +1 -4
  13. package/lib/esm/components/c4-cluster-overview/applications.d.ts +16 -0
  14. package/lib/esm/components/c4-cluster-overview/applications.js +130 -17
  15. package/lib/esm/components/c4-cluster-overview/c4-cluster-overview.d.ts +34 -1
  16. package/lib/esm/components/c4-cluster-overview/c4-cluster-overview.js +31 -0
  17. package/lib/esm/components/c4-cluster-overview/cluster-details.js +11 -9
  18. package/lib/esm/components/c4-cluster-overview/cluster-load.d.ts +4 -3
  19. package/lib/esm/components/c4-cluster-overview/cluster-load.js +17 -13
  20. package/lib/esm/components/c4-cluster-overview/ds-section.d.ts +23 -0
  21. package/lib/esm/components/c4-cluster-overview/ds-section.js +19 -0
  22. package/lib/esm/components/c4-cluster-overview/ds-status-icon-text.d.ts +33 -0
  23. package/lib/esm/components/c4-cluster-overview/ds-status-icon-text.js +34 -0
  24. package/lib/esm/components/c4-cluster-settings/elements/external-identity-provider-modal.js +7 -1
  25. package/lib/esm/components/c4-cluster-settings/elements/settings-tile.d.ts +6 -1
  26. package/lib/esm/components/c4-cluster-settings/elements/settings-tile.js +5 -2
  27. package/lib/esm/components/c4-console-dashboard/c4-console-dashboard.js +4 -5
  28. package/lib/esm/components/c4-create-cluster/c4-create-cluster-tile-grid.js +40 -15
  29. package/lib/esm/components/c4-create-cluster/c4-create-cluster.js +24 -4
  30. package/lib/esm/components/c4-create-cluster/c4-create-cluster.types.d.ts +12 -0
  31. package/lib/esm/components/c4-create-cluster-api-client-modal/c4-create-cluster-api-client-modal.js +2 -1
  32. package/lib/esm/components/c4-create-cluster-api-client-modal/scopes-description-text.d.ts +11 -0
  33. package/lib/esm/components/c4-create-cluster-api-client-modal/scopes-description-text.js +16 -0
  34. package/lib/esm/components/c4-inline-notification/c4-inline-notification.js +4 -1
  35. package/lib/esm/components/c4-invite-user-to-organization-modal/c4-invite-user-to-organization-modal.js +6 -2
  36. package/lib/esm/components/c4-invite-user-to-organization-modal/c4-invite-user-to-organization-modal.types.d.ts +6 -0
  37. package/lib/esm/components/c4-job-dashboard-details-page/c4-job-dashboard-details-page.mocks.js +1 -1
  38. package/lib/esm/components/c4-job-dashboard-details-page/elements/c4-job-dashboard-error-table.js +1 -0
  39. package/lib/esm/components/c4-job-dashboard-details-page/elements/c4-job-dashboard-piechart.js +1 -1
  40. package/lib/esm/components/c4-job-dashboard-details-page/elements/c4-job-dashboard-time-chart.js +13 -6
  41. package/lib/esm/components/c4-job-dashboard-entry-point/c4-job-dashboard-entry-point.js +24 -5
  42. package/lib/esm/components/c4-job-dashboard-entry-point/c4-job-dashboard-entry-point.types.d.ts +4 -4
  43. package/lib/esm/components/c4-job-dashboard-overview-page/c4-job-dashboard-overview.mocks.js +1 -1
  44. package/lib/esm/components/c4-job-dashboard-shared/c4-job-dashboard-ds-colors.d.ts +1 -1
  45. package/lib/esm/components/c4-job-dashboard-shared/c4-job-dashboard-ds-colors.js +3 -1
  46. package/lib/esm/components/c4-job-dashboard-shared/c4-job-dashboard-error-handler.d.ts +7 -1
  47. package/lib/esm/components/c4-job-dashboard-shared/c4-job-dashboard-error-handler.js +8 -4
  48. package/lib/esm/components/c4-job-dashboard-shared/c4-job-dashboard-time-range-dropdown.js +6 -1
  49. package/lib/esm/components/c4-management-settings/c4-management-settings.js +58 -42
  50. package/lib/esm/components/c4-multi-step-modal/c4-multi-step-modal.js +4 -0
  51. package/lib/esm/components/c4-old-dashboard/c4-old-dashboard.js +11 -10
  52. package/lib/esm/components/c4-old-dashboard/c4-old-dashboard.types.d.ts +4 -0
  53. package/lib/esm/components/c4-pricing-card/c4-pricing-card.js +9 -1
  54. package/lib/esm/components/c4-sm-cluster-details/details.js +2 -8
  55. package/lib/esm/components/c4-tabs/c4-tabs.js +6 -1
  56. package/lib/esm/components/c4-usage-history/elements/usage-history-charts.d.ts +3 -3
  57. package/lib/esm/components/c4-usage-metrics-per-cluster/c4-usage-metrics-per-cluster.js +2 -8
  58. package/lib/esm/externalUrls.const.d.ts +1 -1
  59. package/lib/esm/externalUrls.const.js +1 -2
  60. package/lib/esm/i18n/en/modals/billing.json +2 -2
  61. package/lib/esm/i18n/en/modals/clusterclients.json +6 -6
  62. package/lib/esm/i18n/en/modals/invitations.json +1 -0
  63. package/lib/esm/i18n/en/modals/users.json +1 -0
  64. package/lib/esm/i18n/en/pages/clusterdetails.json +4 -1
  65. package/lib/esm/i18n/en/pages/createcluster.json +5 -0
  66. package/lib/esm/i18n/en/pages/dashboard.json +7 -5
  67. package/lib/esm/i18n/en/pages/orgmanagement.json +4 -0
  68. package/lib/esm/index.d.ts +1 -1
  69. package/lib/esm/index.js +1 -1
  70. package/lib/esm/runtime/c4-console-events-context.d.ts +5 -1
  71. package/lib/esm/runtime/c4-console-events-context.js +16 -2
  72. package/lib/esm/runtime/c4-console-runtime-context.d.ts +7 -6
  73. package/lib/esm/runtime/c4-console-runtime-context.js +29 -12
  74. package/lib/esm/runtime/c4-console-runtime.types.d.ts +7 -7
  75. package/lib/esm/runtime/c4-user-notifications-context.js +6 -2
  76. package/lib/esm/runtime/c4-user-notifications-context.types.d.ts +5 -1
  77. package/lib/esm/runtime/use-hub-api-naming.d.ts +8 -11
  78. package/lib/esm/runtime/use-hub-api-naming.js +9 -12
  79. package/lib/esm/runtime/use-is-qa-user.d.ts +23 -0
  80. package/lib/esm/runtime/use-is-qa-user.js +64 -0
  81. package/lib/esm/ui/c4-cluster-tag.d.ts +11 -0
  82. package/lib/esm/ui/c4-cluster-tag.js +39 -0
  83. package/lib/esm/ui/ds-compact-code-block.d.ts +15 -0
  84. package/lib/esm/ui/ds-compact-code-block.js +33 -0
  85. package/lib/esm/ui/index.d.ts +13 -3
  86. package/lib/esm/ui/index.js +14 -7
  87. package/lib/esm/widgets/cluster-details/c4-cluster-details-app.js +21 -6
  88. package/lib/esm/widgets/cluster-details/c4-cluster-details-app.types.d.ts +4 -2
  89. package/lib/esm/widgets/cluster-details/c4-cluster-details-page.d.ts +1 -1
  90. package/lib/esm/widgets/cluster-details/c4-cluster-details-page.js +31 -12
  91. package/lib/esm/widgets/cluster-details/c4-cluster-details-page.types.d.ts +6 -1
  92. package/lib/esm/widgets/cluster-details/cluster-region-code.d.ts +8 -0
  93. package/lib/esm/widgets/cluster-details/cluster-region-code.js +17 -0
  94. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-byom-clients-tab.js +44 -6
  95. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-clients-tab.js +6 -4
  96. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-hot-backups-tab.js +2 -14
  97. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-overview-tab.d.ts +7 -0
  98. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-overview-tab.js +23 -11
  99. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-settings-tab.js +11 -15
  100. package/lib/esm/widgets/cluster-details/upgrade-gate.d.ts +23 -0
  101. package/lib/esm/widgets/cluster-details/upgrade-gate.js +36 -0
  102. package/lib/esm/widgets/cluster-details/use-upgrade-gate.d.ts +24 -0
  103. package/lib/esm/widgets/cluster-details/use-upgrade-gate.js +73 -0
  104. package/lib/esm/widgets/clusters/c4-clusters-page.js +0 -4
  105. package/lib/esm/widgets/create-cluster/c4-create-cluster-page.d.ts +4 -1
  106. package/lib/esm/widgets/create-cluster/c4-create-cluster-page.js +44 -17
  107. package/lib/esm/widgets/create-cluster/c4-create-cluster-page.types.d.ts +0 -3
  108. package/lib/esm/widgets/dashboard/c4-dashboard-app.js +12 -11
  109. package/lib/esm/widgets/dashboard/c4-dashboard-app.types.d.ts +2 -3
  110. package/lib/esm/widgets/group-details/c4-group-details-page.d.ts +1 -1
  111. package/lib/esm/widgets/group-details/c4-group-details-page.js +10 -3
  112. package/lib/esm/widgets/group-details/c4-group-details-page.types.d.ts +5 -0
  113. package/lib/esm/widgets/management/c4-management-app.d.ts +1 -1
  114. package/lib/esm/widgets/management/c4-management-app.js +34 -36
  115. package/lib/esm/widgets/management/c4-management-app.types.d.ts +10 -9
  116. package/lib/esm/widgets/management/tabs/c4-management-billing-tab.d.ts +0 -1
  117. package/lib/esm/widgets/management/tabs/c4-management-billing-tab.js +1 -2
  118. package/lib/esm/widgets/management/tabs/c4-management-pricing-tab.js +1 -1
  119. package/lib/esm/widgets/management/tabs/c4-management-usage-tab.d.ts +2 -2
  120. package/lib/esm/widgets/management/tabs/c4-management-users-tab.d.ts +3 -1
  121. package/lib/esm/widgets/management/tabs/c4-management-users-tab.js +2 -2
  122. package/lib/esm/widgets/user-details/c4-user-details-page.d.ts +1 -1
  123. package/lib/esm/widgets/user-details/c4-user-details-page.js +5 -2
  124. package/lib/esm/widgets/user-details/c4-user-details-page.types.d.ts +5 -0
  125. package/package.json +23 -23
  126. package/lib/esm/runtime/cluster-duplication.d.ts +0 -10
  127. package/lib/esm/runtime/cluster-duplication.js +0 -15
  128. package/lib/esm/widgets/management/tabs/c4-management-groups-tab.d.ts +0 -13
  129. package/lib/esm/widgets/management/tabs/c4-management-groups-tab.js +0 -26
@@ -65,6 +65,7 @@ export const ExternalIdentityProviderModal = ({ open, initialConfig, saving, err
65
65
  const [scopes, setScopes] = useState('openid profile');
66
66
  const [usernameClaim, setUsernameClaim] = useState('sub');
67
67
  const [clientIdClaim, setClientIdClaim] = useState('');
68
+ const [preferUsernameClaim, setPreferUsernameClaim] = useState(false);
68
69
  // Both are space-separated in the field and arrays in the config, the same
69
70
  // idiom as scopes. Space is a safe delimiter here: the CRD forbids whitespace
70
71
  // inside an audience and inside a JWKS URL.
@@ -87,6 +88,7 @@ export const ExternalIdentityProviderModal = ({ open, initialConfig, saving, err
87
88
  setScopes((initialConfig?.scopes ?? ['openid', 'profile']).join(' '));
88
89
  setUsernameClaim(initialConfig?.usernameClaim ?? 'sub');
89
90
  setClientIdClaim(initialConfig?.clientIdClaim ?? '');
91
+ setPreferUsernameClaim(initialConfig?.preferUsernameClaim ?? false);
90
92
  setAudiences((initialConfig?.audiences ?? []).join(' '));
91
93
  setAdditionalJwkSetUris((initialConfig?.additionalJwkSetUris ?? []).join(' '));
92
94
  setLockoutAck(false);
@@ -104,6 +106,9 @@ export const ExternalIdentityProviderModal = ({ open, initialConfig, saving, err
104
106
  const parsedJwkSetUris = splitOnWhitespace(additionalJwkSetUris);
105
107
  const jwkSetUrisInvalid = parsedJwkSetUris.some((uri) => !isHttpsUrl(uri));
106
108
  const parsedAudiences = splitOnWhitespace(audiences);
109
+ // The engine compares the two claims only when a client ID claim is set.
110
+ // Without one, the flag changes nothing, so the form neither offers nor sends it.
111
+ const hasClientIdClaim = clientIdClaim.trim().length > 0;
107
112
  const handleSubmit = () => {
108
113
  setShowErrors(true);
109
114
  if (nameInvalid ||
@@ -125,6 +130,7 @@ export const ExternalIdentityProviderModal = ({ open, initialConfig, saving, err
125
130
  scopes: parsedScopes.length > 0 ? parsedScopes : undefined,
126
131
  usernameClaim: usernameClaim.trim() || undefined,
127
132
  clientIdClaim: clientIdClaim.trim() || undefined,
133
+ preferUsernameClaim: (hasClientIdClaim && preferUsernameClaim) || undefined,
128
134
  audiences: parsedAudiences.length > 0 ? parsedAudiences : undefined,
129
135
  additionalJwkSetUris: parsedJwkSetUris.length > 0 ? parsedJwkSetUris : undefined,
130
136
  },
@@ -147,5 +153,5 @@ export const ExternalIdentityProviderModal = ({ open, initialConfig, saving, err
147
153
  }
148
154
  } }), _jsx(TextInput, { id: 'c4-idp-issuer', labelText: 'Issuer URL', value: issuerUri, disabled: saving, invalid: showErrors && issuerInvalid, invalidText: 'Enter a valid URL', onChange: (e) => setIssuerUri(e.target.value) }), _jsx(TextInput, { id: 'c4-idp-client-id', labelText: 'Client ID', value: clientId, disabled: saving, invalid: showErrors && clientIdInvalid, invalidText: 'Client ID is required', onChange: (e) => setClientId(e.target.value) }), _jsx(PasswordInput, { id: 'c4-idp-client-secret', labelText: 'Client secret', helperText: isEdit
149
155
  ? 'Leave blank to keep the current secret. Changes can take up to a minute to sync to the cluster.'
150
- : 'Stored securely; never displayed after saving. Can take up to a minute to sync to the cluster.', value: clientSecret, disabled: saving, invalid: showErrors && secretInvalid, invalidText: 'Client secret is required', onChange: (e) => setClientSecret(e.target.value) }), _jsx(TextInput, { id: 'c4-idp-scopes', labelText: 'Scopes', helperText: 'Space-separated. Defaults to "openid profile".', value: scopes, disabled: saving, onChange: (e) => setScopes(e.target.value) }), _jsx(TextInput, { id: 'c4-idp-username-claim', labelText: 'Username claim', helperText: 'Defaults to "sub".', value: usernameClaim, disabled: saving, onChange: (e) => setUsernameClaim(e.target.value) }), _jsx(TextInput, { id: 'c4-idp-client-id-claim', labelText: 'Client ID claim (optional)', value: clientIdClaim, disabled: saving, onChange: (e) => setClientIdClaim(e.target.value) }), _jsx(TextInput, { id: 'c4-idp-audiences', labelText: 'Audiences (optional)', helperText: 'Space-separated. Copy the audience (aud) value from a token your provider issues.', value: audiences, disabled: saving, onChange: (e) => setAudiences(e.target.value) }), _jsx(TextInput, { id: 'c4-idp-additional-jwks-uris', labelText: 'Additional JWKS URLs (optional)', helperText: 'Space-separated. Add these only if your provider publishes more than one JWKS endpoint.', value: additionalJwkSetUris, disabled: saving, invalid: showErrors && jwkSetUrisInvalid, invalidText: 'Enter https URLs, separated by spaces', onChange: (e) => setAdditionalJwkSetUris(e.target.value) }), _jsx(Checkbox, { id: 'c4-idp-lockout-ack', labelText: 'I understand that a misconfigured identity provider can lock users out of this cluster.', checked: lockoutAck, disabled: saving, invalid: showErrors && !lockoutAck, invalidText: 'Please confirm you understand the lockout risk', onChange: (_e, { checked }) => setLockoutAck(checked) })] }) })] }) }));
156
+ : 'Stored securely; never displayed after saving. Can take up to a minute to sync to the cluster.', value: clientSecret, disabled: saving, invalid: showErrors && secretInvalid, invalidText: 'Client secret is required', onChange: (e) => setClientSecret(e.target.value) }), _jsx(TextInput, { id: 'c4-idp-scopes', labelText: 'Scopes', helperText: 'Space-separated. Defaults to "openid profile".', value: scopes, disabled: saving, onChange: (e) => setScopes(e.target.value) }), _jsx(TextInput, { id: 'c4-idp-username-claim', labelText: 'Username claim', helperText: 'Defaults to "sub".', value: usernameClaim, disabled: saving, onChange: (e) => setUsernameClaim(e.target.value) }), _jsx(TextInput, { id: 'c4-idp-client-id-claim', labelText: 'Client ID claim (optional)', value: clientIdClaim, disabled: saving, onChange: (e) => setClientIdClaim(e.target.value) }), _jsx(Checkbox, { id: 'c4-idp-prefer-username-claim', labelText: 'Prefer the username claim', helperText: 'Needs a client ID claim. Select this if your provider adds that claim to user tokens too, as Microsoft Entra ID does with azp. A token with both claims then signs in as a user, not a client.', checked: hasClientIdClaim && preferUsernameClaim, disabled: saving || !hasClientIdClaim, onChange: (_e, { checked }) => setPreferUsernameClaim(checked) }), _jsx(TextInput, { id: 'c4-idp-audiences', labelText: 'Audiences (optional)', helperText: 'Space-separated. Copy the audience (aud) value from a token your provider issues.', value: audiences, disabled: saving, onChange: (e) => setAudiences(e.target.value) }), _jsx(TextInput, { id: 'c4-idp-additional-jwks-uris', labelText: 'Additional JWKS URLs (optional)', helperText: 'Space-separated. Add these only if your provider publishes more than one JWKS endpoint.', value: additionalJwkSetUris, disabled: saving, invalid: showErrors && jwkSetUrisInvalid, invalidText: 'Enter https URLs, separated by spaces', onChange: (e) => setAdditionalJwkSetUris(e.target.value) }), _jsx(Checkbox, { id: 'c4-idp-lockout-ack', labelText: 'I understand that a misconfigured identity provider can lock users out of this cluster.', checked: lockoutAck, disabled: saving, invalid: showErrors && !lockoutAck, invalidText: 'Please confirm you understand the lockout risk', onChange: (_e, { checked }) => setLockoutAck(checked) })] }) })] }) }));
151
157
  };
@@ -3,5 +3,10 @@ export interface SettingsTileProps {
3
3
  title: string;
4
4
  description?: any;
5
5
  children?: any;
6
+ /**
7
+ * The heading element of the title. Defaults to `h2` in ds mode, where the
8
+ * page title is an `h1`, and to `h3` in carbon mode.
9
+ */
10
+ headingLevel?: 'h2' | 'h3';
6
11
  }
7
- export declare const SettingsTile: ({ description, title, children, }: SettingsTileProps) => JSX.Element;
12
+ export declare const SettingsTile: ({ description, title, children, headingLevel, }: SettingsTileProps) => JSX.Element;
@@ -1,8 +1,11 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useC4DesignSystem } from '../../../runtime/c4-console-runtime-context.js';
2
3
  import { Stack, Tile } from '../../../ui/index.js';
3
4
  import { SECTION_HEADING_STYLE } from '../../../utils/section-heading-style.js';
4
5
  import { C4Divider } from '../../c4-divider/c4-divider.js';
5
- export const SettingsTile = ({ description, title, children, }) => {
6
- const component = (_jsx(Tile, { children: _jsxs(Stack, { gap: 6, children: [_jsxs(Stack, { gap: 4, children: [_jsx("h3", { style: SECTION_HEADING_STYLE, children: title }), description && _jsx("p", { style: { maxWidth: '650px' }, children: description }), _jsx(C4Divider, {})] }), children] }) }));
6
+ export const SettingsTile = ({ description, title, children, headingLevel, }) => {
7
+ const designSystem = useC4DesignSystem();
8
+ const Heading = headingLevel ?? (designSystem === 'ds' ? 'h2' : 'h3');
9
+ const component = (_jsx(Tile, { children: _jsxs(Stack, { gap: 6, children: [_jsxs(Stack, { gap: 4, children: [_jsx(Heading, { style: SECTION_HEADING_STYLE, children: title }), description && _jsx("p", { style: { maxWidth: '650px' }, children: description }), _jsx(C4Divider, {})] }), children] }) }));
7
10
  return component;
8
11
  };
@@ -4,15 +4,14 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
4
4
  * under one or more contributor license agreements. Licensed under a commercial license.
5
5
  * You may not use this file except in compliance with the commercial license.
6
6
  */
7
- import { C3ClusterTag } from '@camunda/camunda-composite-components';
8
7
  import { Column, Grid } from '@carbon/react';
9
8
  import * as Icons from '@carbon/react/icons/index.esm.js';
10
9
  import { Chat, Help, WarningAltFilled } from '@carbon/react/icons/index.esm.js';
11
10
  import { useCallback, useMemo, useState } from 'react';
12
- import { Button, Link, Stack, Tile, Tooltip } from '../../ui/index.js';
11
+ import { Button, ClusterTag, Link, Stack, Tile, Tooltip } from '../../ui/index.js';
13
12
  import { C4ActionableNotification } from '../c4-actionable-notification/c4-actionable-notification.js';
14
13
  import { ClusterStatusElement } from '../c4-cluster-overview/applications.js';
15
- import { C4IconAndTextElement, getClusterLoadConfig, } from '../c4-cluster-overview/c4-cluster-overview.js';
14
+ import { C4IconAndTextElement, getClusterLoadConfig, getDsClusterLoadPresentation, } from '../c4-cluster-overview/c4-cluster-overview.js';
16
15
  import { C4PageLayout } from '../c4-page-layout/c4-page-layout.js';
17
16
  import { C4StructuredListBody, C4StructuredListCell, C4StructuredListHead, C4StructuredListRow, C4StructuredListWrapper, } from '../c4-structured-list/c4-structured-list.js';
18
17
  import { ValueMetricsLineChart } from '../c4-usage-history/elements/usage-history-charts.js';
@@ -129,7 +128,7 @@ export const C4ConsoleDashboard = ({ orgId, embedded = false, usersAmount, taskU
129
128
  return (_jsxs(C4StructuredListRow, { children: [_jsx(C4StructuredListCell, { children: _jsx(Link, { href: urls.clusterDetails(item.id), onClick: (e) => {
130
129
  e.preventDefault();
131
130
  actions.onNavigateToClusterDetails(item.id);
132
- }, children: item.name }) }), _jsx(C4StructuredListCell, { children: item.tags && (_jsx(C3ClusterTag, { stage: item.tags })) }), _jsx(C4StructuredListCell, { children: _jsx(ClusterStatusElement, { status: item.status.toLowerCase() }) }), _jsx(C4StructuredListCell, { children: _jsx("div", { style: { position: 'relative' }, children: hasWarning ? (_jsxs(_Fragment, { children: [_jsx("div", { style: {
131
+ }, children: item.name }) }), _jsx(C4StructuredListCell, { children: item.tags && (_jsx(ClusterTag, { stage: item.tags })) }), _jsx(C4StructuredListCell, { children: _jsx(ClusterStatusElement, { status: item.status.toLowerCase() }) }), _jsx(C4StructuredListCell, { children: _jsx("div", { style: { position: 'relative' }, children: hasWarning ? (_jsxs(_Fragment, { children: [_jsx("div", { style: {
133
132
  position: 'absolute',
134
133
  top: '50%',
135
134
  transform: 'translateY(-50%)',
@@ -139,7 +138,7 @@ export const C4ConsoleDashboard = ({ orgId, embedded = false, usersAmount, taskU
139
138
  paddingInlineStart: '1.1rem',
140
139
  }, children: item.version })] })) : (item.version) }) }), permissions.showClusterLoad && (_jsxs(C4StructuredListCell, { children: [hasClusterLoad &&
141
140
  currentClusterLoadConfig &&
142
- item.status !== 'Suspended' && (_jsx(C4IconAndTextElement, { text: `${currentClusterLoad.toFixed(2)}%`, color: currentClusterLoadConfig.color, icon: currentClusterLoadConfig.icon, tooltip: {
141
+ item.status !== 'Suspended' && (_jsx(C4IconAndTextElement, { text: `${currentClusterLoad.toFixed(2)}%`, color: currentClusterLoadConfig.color, icon: currentClusterLoadConfig.icon, dsIcon: getDsClusterLoadPresentation(currentClusterLoad), tooltip: {
143
142
  label: clusterLoadTooltip || '',
144
143
  align: 'bottom',
145
144
  } })), (!hasClusterLoad ||
@@ -8,6 +8,7 @@ import { ChoiceCard, ChoiceCardGroup } from '@camunda/design-system';
8
8
  import { Stack } from '@carbon/react';
9
9
  import { ChevronDown } from '@carbon/react/icons/index.esm.js';
10
10
  import { useState } from 'react';
11
+ import styled from 'styled-components';
11
12
  import { useC4DesignSystem } from '../../runtime/c4-console-runtime-context.js';
12
13
  import { Button, Search } from '../../ui/index.js';
13
14
  import { C4SelectableTile } from '../c4-selectable-tile/c4-selectable-tile.js';
@@ -22,6 +23,30 @@ import { C4SelectableTile } from '../c4-selectable-tile/c4-selectable-tile.js';
22
23
  function normalizeForSearch(value) {
23
24
  return value.toLowerCase().replace(/\s+/g, ' ').trim();
24
25
  }
26
+ // The DS `ChoiceCard` puts its `badge` in a row above the title, at the right
27
+ // edge, next to the selection dot. Here the badge (for example "Recommended")
28
+ // belongs to the label, so this moves that row under the title and to the
29
+ // left. `ChoiceCard` takes only a string as its title, thus CSS order is the
30
+ // way to place it. It depends on the ChoiceCard markup, which
31
+ // `src/ui/ds-markup-contract.spec.tsx` pins.
32
+ const BadgeBelowTitle = styled.div `
33
+ & [data-slot='choice-card'] > div {
34
+ order: 1;
35
+ padding-right: 0;
36
+ }
37
+
38
+ /* The badge wrapper exists only with a badge, so its margin adds 4px to
39
+ the card's 4px gap (8px under the name) and leaves other cards as is. */
40
+ & [data-slot='choice-card'] > div > span {
41
+ margin-left: 0;
42
+ margin-top: 0.25rem;
43
+ }
44
+
45
+ /* The selection dot is a span too, so pick the description by its id. */
46
+ & [data-slot='choice-card'] > span[id$='-desc'] {
47
+ order: 2;
48
+ }
49
+ `;
25
50
  /**
26
51
  * Single-selection grid of choice cards for the create-cluster form.
27
52
  *
@@ -51,21 +76,21 @@ export function C4CreateClusterTileGrid({ items, getKey, getLabel, getDescriptio
51
76
  const gridColumns = `repeat(auto-fill, minmax(${columnWidth}, 1fr))`;
52
77
  const renderGrid = () => {
53
78
  if (designSystem === 'ds') {
54
- return (_jsx(ChoiceCardGroup, { "aria-label": ariaLabel, value: value ?? '', onValueChange: onChange,
55
- // ChoiceCard's title has no overflow handling of its own (no
56
- // min-width: 0 / overflow-wrap), so a long unbroken label (e.g. a
57
- // generation name with no spaces, like "GENERATED_Connectors_8.7.22-rc1")
58
- // reports its full unwrapped width as the grid item's min-content
59
- // size and spills past the card's border instead of wrapping.
60
- // `overflow-wrap: anywhere` is inherited by the title/description
61
- // text and — unlike `break-word` — also counts toward the
62
- // automatic minimum size, so it both wraps the label and stops the
63
- // grid track from blowing out to fit it.
64
- style: {
65
- gridTemplateColumns: gridColumns,
66
- gap: '1rem',
67
- overflowWrap: 'anywhere',
68
- }, children: visibleItems.map((item) => (_jsx(ChoiceCard, { value: getKey(item), title: getLabel(item), description: getDescription?.(item), badge: getBadge?.(item), disabled: getDisabled?.(item) }, getKey(item)))) }));
79
+ return (_jsx(BadgeBelowTitle, { children: _jsx(ChoiceCardGroup, { "aria-label": ariaLabel, value: value ?? '', onValueChange: onChange,
80
+ // ChoiceCard's title has no overflow handling of its own (no
81
+ // min-width: 0 / overflow-wrap), so a long unbroken label (e.g. a
82
+ // generation name with no spaces, like "GENERATED_Connectors_8.7.22-rc1")
83
+ // reports its full unwrapped width as the grid item's min-content
84
+ // size and spills past the card's border instead of wrapping.
85
+ // `overflow-wrap: anywhere` is inherited by the title/description
86
+ // text and — unlike `break-word` — also counts toward the
87
+ // automatic minimum size, so it both wraps the label and stops the
88
+ // grid track from blowing out to fit it.
89
+ style: {
90
+ gridTemplateColumns: gridColumns,
91
+ gap: '1rem',
92
+ overflowWrap: 'anywhere',
93
+ }, children: visibleItems.map((item) => (_jsx(ChoiceCard, { value: getKey(item), title: getLabel(item), description: getDescription?.(item), badge: getBadge?.(item), disabled: getDisabled?.(item) }, getKey(item)))) }) }));
69
94
  }
70
95
  return (_jsx("div", { style: {
71
96
  display: 'grid',
@@ -6,7 +6,8 @@ import { ChevronDown, ChevronUp, Code, DataBase } from '@carbon/react/icons/inde
6
6
  import { useRef, useState, } from 'react';
7
7
  import styled from 'styled-components';
8
8
  import { useC4DesignSystem } from '../../runtime/c4-console-runtime-context.js';
9
- import { Button, TextInput as C4TextInput, Checkbox, ClusterTag, Link, Modal, SkeletonText, Tag, Tile, } from '../../ui/index.js';
9
+ import { Button, TextInput as C4TextInput, Checkbox, ClusterTag, DsBadge, Link, Modal, SkeletonText, Tag, Tile, } from '../../ui/index.js';
10
+ import { useRadioFamily } from '../../ui/families.js';
10
11
  import { SECTION_HEADING_STYLE } from '../../utils/section-heading-style.js';
11
12
  import { C4ClusterTagSelector } from '../c4-cluster-tag-selector/c4-cluster-tag-selector.js';
12
13
  import { C4Divider } from '../c4-divider/c4-divider.js';
@@ -65,7 +66,10 @@ const getInlineStatusByState = (state) => {
65
66
  */
66
67
  const FormElementTitle = (props) => {
67
68
  const designSystem = useC4DesignSystem();
68
- return (_jsxs("h3", { style: designSystem === 'ds'
69
+ // ds mode: the page title is an `h1`, so a section title is an `h2` and
70
+ // the heading levels do not skip. Carbon keeps its `h3`.
71
+ const Heading = designSystem === 'ds' ? 'h2' : 'h3';
72
+ return (_jsxs(Heading, { style: designSystem === 'ds'
69
73
  ? // `SECTION_HEADING_STYLE` sets `margin: 0`, and the section around
70
74
  // the heading gives 4 pixels, thus a toggle group or an input came
71
75
  // up against its own title. Every other block of the page keeps 12
@@ -86,6 +90,8 @@ const enableMap = {
86
90
  test: ['dev', 'test'],
87
91
  dev: ['dev', 'test'],
88
92
  };
93
+ // The radio value of "no unlocked plan". A plan uuid never has this value.
94
+ const PLAN_TYPE_DEFAULT = 'default';
89
95
  export const C4CreateCluster = ({ loading, cta, formElements, autoUpdate, tasklistModeToggle, authorizationToggle, banner: { noSlotsLeft }, initialValues, duplicate, }) => {
90
96
  const designSystem = useC4DesignSystem();
91
97
  const preConditions = formElements.clusterPlanType.options.length > 0 &&
@@ -143,6 +149,8 @@ export const C4CreateCluster = ({ loading, cta, formElements, autoUpdate, taskli
143
149
  const [authorizationEnabled, setAuthorizationEnabled] = useState(initialValues?.identityBackendChecksEnabled ??
144
150
  selectedPlan?.type !== 'prod');
145
151
  const [numberOfAllocatedHwPackages, setNumberOfAllocatedHwPackages] = useState(initialValues?.numberOfAllocatedHwPackages ?? 1);
152
+ const [clusterPlan, setClusterPlan] = useState(formElements.clusterPlan?.options.find((option) => option.uuid === initialValues?.clusterPlan)?.uuid);
153
+ const { RadioButton, RadioButtonGroup } = useRadioFamily();
146
154
  const initialRegion = formElements.region.options.find((option) => option.uuid === initialValues?.region);
147
155
  const defaultProvider = initialRegion?.provider ??
148
156
  formElements.region.options.find((option) => option.default === true)
@@ -372,6 +380,7 @@ export const C4CreateCluster = ({ loading, cta, formElements, autoUpdate, taskli
372
380
  name: clusterName,
373
381
  description: clusterDescription,
374
382
  clusterPlanType: currentClusterPlanType,
383
+ clusterPlan,
375
384
  channel: selectedChannel,
376
385
  region: selectedRegion,
377
386
  backupRegion,
@@ -498,7 +507,7 @@ export const C4CreateCluster = ({ loading, cta, formElements, autoUpdate, taskli
498
507
  * says that Camunda recommends it. Carbon gets no badge, so its render does
499
508
  * not change.
500
509
  */
501
- const getRecommendedBadge = (option) => designSystem === 'ds' && option.default ? (_jsx(Tag, { type: 'blue', size: 'sm', children: "Recommended" })) : undefined;
510
+ const getRecommendedBadge = (option) => designSystem === 'ds' && option.default ? (_jsx(DsBadge, { variant: 'accent', children: "Recommended" })) : undefined;
502
511
  const renderGenerationTiles = (generations) => {
503
512
  return (_jsx(C4CreateClusterTileGrid, { items: generations, getKey: (generation) => generation.uuid, getLabel: (generation) => generation.title, getBadge: getRecommendedBadge, getDisabled: () => isSubmitting() || noAvailableSlots, value: selectedGeneration, onChange: updateSelectedGeneration, ariaLabel: 'Select generation', columnWidth: '200px', searchPlaceholder: 'Search generations' }, selectedChannel));
504
513
  };
@@ -617,7 +626,18 @@ export const C4CreateCluster = ({ loading, cta, formElements, autoUpdate, taskli
617
626
  }, children: formElements.clusterPlanType.options.map((option) => (_jsx("div", { style: { marginBottom: '2.0rem' }, children: _jsx("div", { style: {
618
627
  height: '100%',
619
628
  display: 'grid',
620
- }, children: _jsx(C4SelectableTile, { value: option.uuid, checked: option.uuid === currentClusterPlanType, onChange: () => setClusterPlanTypeWithEffects(option.uuid), disabled: option.disabled || isSubmitting() || noAvailableSlots, style: { height: '100%' }, children: _jsx(ClusterPlanTypeTile, { type: option.type, title: option.title, description: option.description }) }, option.uuid) }) }, option.uuid))) }))] }), formElements.allocatedHardwarePackages &&
629
+ }, children: _jsx(C4SelectableTile, { value: option.uuid, checked: option.uuid === currentClusterPlanType, onChange: () => setClusterPlanTypeWithEffects(option.uuid), disabled: option.disabled || isSubmitting() || noAvailableSlots, style: { height: '100%' }, children: _jsx(ClusterPlanTypeTile, { type: option.type, title: option.title, description: option.description }) }, option.uuid) }) }, option.uuid))) }))] }), formElements.clusterPlan &&
630
+ formElements.clusterPlan.options.length > 0 && (_jsxs(Stack, { gap: 2, children: [_jsx("div", { style: { marginLeft: '1rem' }, children: _jsx(RadioButtonGroup, { name: 'clusterPlan', legendText: formElements.clusterPlan.title, orientation: 'vertical', valueSelected: clusterPlan ?? PLAN_TYPE_DEFAULT, onChange: (value) => {
631
+ setClusterPlan(value === PLAN_TYPE_DEFAULT || value === undefined
632
+ ? undefined
633
+ : String(value));
634
+ }, children: [
635
+ {
636
+ uuid: PLAN_TYPE_DEFAULT,
637
+ title: formElements.clusterPlan.defaultLabel,
638
+ },
639
+ ...formElements.clusterPlan.options,
640
+ ].map((option) => (_jsx(RadioButton, { id: `clusterPlan-${option.uuid}`, labelText: option.title, value: option.uuid }, option.uuid))) }) }), _jsx("p", { style: { marginLeft: '1rem' }, children: formElements.clusterPlan.description })] })), formElements.allocatedHardwarePackages &&
621
641
  formElements.clusterPlanType.options.find((option) => option.uuid === currentClusterPlanType &&
622
642
  option.category === ClusterPlanTypeCategory.ADVANCED_OFFERING &&
623
643
  option.availabilityClass !== 'unset' &&
@@ -6,6 +6,8 @@ export interface C4CreateClusterCtaParameters {
6
6
  region: string;
7
7
  backupRegion?: string;
8
8
  clusterPlanType: string;
9
+ /** An unlocked cluster plan. Not set means the plan type default. */
10
+ clusterPlan?: string;
9
11
  channel: string;
10
12
  generation: string;
11
13
  autoUpdate?: boolean;
@@ -186,6 +188,16 @@ export interface C4CreateClusterProps {
186
188
  title: string;
187
189
  options: C4CreateClusterClusterPlanType[];
188
190
  };
191
+ /** Only when the org has unlocked cluster plans. */
192
+ clusterPlan?: {
193
+ title: string;
194
+ defaultLabel: string;
195
+ description: string;
196
+ options: {
197
+ uuid: string;
198
+ title: string;
199
+ }[];
200
+ };
189
201
  region: {
190
202
  title: string;
191
203
  backupRegionTitle: string;
@@ -9,6 +9,7 @@ import { Checkbox, Form, Link, Modal, Stack, TextInput } from '../../ui/index.js
9
9
  import { safeTranslate } from '../../utils/safe-translate.js';
10
10
  import { C4ClusterClientCredentialsModal } from '../c4-cluster-client-credentials/c4-cluster-client-credentials.js';
11
11
  import { C4InlineNotification } from '../c4-inline-notification/c4-inline-notification.js';
12
+ import { ScopesDescriptionText } from './scopes-description-text.js';
12
13
  function isClientNameValid(name) {
13
14
  if (!name.trim()) {
14
15
  return false;
@@ -133,7 +134,7 @@ export const C4CreateClusterApiClientModal = forwardRef(({ t, onCreateClusterApi
133
134
  ], [hasIdentityIntegration, t]);
134
135
  return (_jsxs(_Fragment, { children: [_jsx(Modal, { open: isOpen, modalHeading: modalHeading, primaryButtonText: safeTranslate(t, 'clusterclients:create.buttons.primary', 'Create'), secondaryButtonText: safeTranslate(t, 'clusterclients:create.buttons.secondary', 'Cancel'), primaryButtonDisabled: saving || scopes.length === 0, onRequestClose: close, onRequestSubmit: onSubmit, size: 'md', id: 'c4-create-cluster-api-client-modal', children: _jsx(Form, { noValidate: true, children: _jsxs(Stack, { gap: 6, children: [error && (_jsx(C4InlineNotification, { kind: 'error', title: 'Error', subtitle: error, hideCloseButton: true, lowContrast: true })), _jsx(TextInput, { id: 'c4-cluster-api-client-name', name: 'name', "data-modal-primary-focus": true, labelText: safeTranslate(t, 'clusterclients:create.fields.name.label', 'Client Name'), maxLength: 50, value: name, placeholder: safeTranslate(t, 'clusterclients:create.fields.name.label', 'Client Name'), helperText: safeTranslate(t, 'clusterclients:create.fields.name.helperText', 'can contain letters, dashes, underscores, and digits'), invalid: Boolean(nameInvalid), invalidText: nameInvalid
135
136
  ? safeTranslate(t, 'clusterclients:create.error.doublette', 'Name is invalid')
136
- : '', onChange: (event) => setName(event.target.value), onBlur: () => setNameTouched(true), disabled: saving }), _jsxs(Stack, { gap: 2, children: [_jsx("h3", { children: safeTranslate(t, 'clusterclients:create.fields.scopes.label', 'Scopes') }), _jsx("p", { children: safeTranslate(t, 'clusterclients:create.fields.scopes.helperText', 'Scopes define the access for client credentials.') }), hasIdentityIntegration && (_jsxs(_Fragment, { children: [_jsx("p", { children: safeTranslate(t, 'clusterclients:create.fields.scopes.helperText8_8', 'Granular authorizations for the Orchestration Cluster API can be managed via Orchestration Cluster Identity.') }), _jsxs("p", { children: ["Read more about", ' ', _jsx(Link, { href: scopesDocsUrl ?? '#', children: "Scopes for Client Credentials" }), "."] })] }))] }), _jsx("div", { children: scopeOptions.map((scope) => (_jsx(Checkbox, { labelText: scope.label, id: `c4-cluster-scope-${scope.value}`, value: scope.value, checked: scopes.includes(scope.value), onChange: () => {
137
+ : '', onChange: (event) => setName(event.target.value), onBlur: () => setNameTouched(true), disabled: saving }), _jsxs(Stack, { gap: 2, children: [_jsx("h3", { children: safeTranslate(t, 'clusterclients:create.fields.scopes.label', 'Scopes') }), _jsx(ScopesDescriptionText, { as: 'p', children: safeTranslate(t, 'clusterclients:create.fields.scopes.helperText', 'Scopes define the access for client credentials.') }), hasIdentityIntegration && (_jsxs(_Fragment, { children: [_jsx(ScopesDescriptionText, { as: 'p', children: safeTranslate(t, 'clusterclients:create.fields.scopes.helperText8_8', 'Granular authorizations for the Orchestration Cluster API can be managed via the Admin component of the orchestration cluster.') }), _jsxs(ScopesDescriptionText, { as: 'p', children: ["Read more about", ' ', _jsx(Link, { href: scopesDocsUrl ?? '#', children: "Scopes for Client Credentials" }), "."] })] }))] }), _jsx("div", { children: scopeOptions.map((scope) => (_jsx(Checkbox, { labelText: scope.label, id: `c4-cluster-scope-${scope.value}`, value: scope.value, checked: scopes.includes(scope.value), onChange: () => {
137
138
  setScopes((current) => {
138
139
  if (current.includes(scope.value)) {
139
140
  return current.filter((s) => s !== scope.value);
@@ -0,0 +1,11 @@
1
+ import type { CSSProperties, JSX, ReactNode } from 'react';
2
+ /**
3
+ * A paragraph of the Scopes description in a create cluster client dialog. ds
4
+ * mode uses the DS `Text` body style, like the other dialog text. Carbon mode
5
+ * keeps its bare element.
6
+ */
7
+ export declare function ScopesDescriptionText(props: {
8
+ as: 'p' | 'div';
9
+ style?: CSSProperties;
10
+ children: ReactNode;
11
+ }): JSX.Element;
@@ -0,0 +1,16 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { useC4DesignSystem } from '../../runtime/c4-console-runtime-context.js';
3
+ import { DsText } from '../../ui/index.js';
4
+ /**
5
+ * A paragraph of the Scopes description in a create cluster client dialog. ds
6
+ * mode uses the DS `Text` body style, like the other dialog text. Carbon mode
7
+ * keeps its bare element.
8
+ */
9
+ export function ScopesDescriptionText(props) {
10
+ const isDs = useC4DesignSystem() === 'ds';
11
+ if (isDs) {
12
+ return (_jsx(DsText, { as: props.as, variant: 'body-md', className: 'm-0', style: props.style, children: props.children }));
13
+ }
14
+ const Element = props.as;
15
+ return _jsx(Element, { style: props.style, children: props.children });
16
+ }
@@ -33,5 +33,8 @@ export function C4InlineNotification(props) {
33
33
  return _jsx(InlineNotification, { ...props });
34
34
  }
35
35
  const { kind, title, subtitle, hideCloseButton, onCloseButtonClick, children, } = props;
36
- return (_jsx(Alert, { variant: kindToAlertVariant(kind), title: typeof title === 'string' ? title : undefined, description: subtitle, dismissible: !hideCloseButton, onDismiss: onCloseButtonClick, children: children }));
36
+ return (_jsx(Alert, { variant: kindToAlertVariant(kind),
37
+ // An empty title still renders the DS title row, which pushes the text
38
+ // below the icon. Callers pass `title=''` for a text-only notification.
39
+ title: typeof title === 'string' && title !== '' ? title : undefined, description: subtitle, dismissible: !hideCloseButton, onDismiss: onCloseButtonClick, children: children }));
37
40
  }
@@ -14,7 +14,7 @@ function isValidEmail(email) {
14
14
  // Intentionally simple: enough for UI validation without being overly strict.
15
15
  return /^[^\s@]+@[^\s@]+\.[^\s@]+$/u.test(email);
16
16
  }
17
- export const C4InviteUserToOrganizationModal = forwardRef(({ t, onInviteUser, showAdminRole = true, showLegacyClusterRoles = false, permissionsReworkEnabled = false, learnMoreUrl = 'https://docs.camunda.io/', telemetry, }, ref) => {
17
+ export const C4InviteUserToOrganizationModal = forwardRef(({ t, onInviteUser, showAdminRole = true, showLegacyClusterRoles = false, permissionsReworkEnabled = false, environmentsEnabled = false, learnMoreUrl = 'https://docs.camunda.io/', telemetry, }, ref) => {
18
18
  const [isOpen, setIsOpen] = useState(false);
19
19
  const [orgId, setOrgId] = useState('');
20
20
  const [inviteEmail, setInviteEmail] = useState('');
@@ -142,7 +142,11 @@ export const C4InviteUserToOrganizationModal = forwardRef(({ t, onInviteUser, sh
142
142
  return next;
143
143
  });
144
144
  } }), enriched.description && (_jsx("span", { className: 'cds--label', style: { marginLeft: '27px' }, children: enriched.description }))] }, `c4-invite-role-${role}`));
145
- }), _jsxs("div", { style: { margin: '16px 0' }, children: [_jsx(C4InlineNotification, { lowContrast: true, kind: 'info', hideCloseButton: true, title: '', subtitle: safeTranslate(t, 'users:changeOrgRoles.notification.title', 'Starting with version 8.8, user access to clusters is managed independently.') }), _jsxs("p", { style: { paddingTop: '4px' }, children: [_jsx(Link, { href: learnMoreUrl, target: '_blank', rel: 'noopener noreferrer', children: safeTranslate(t, 'users:changeOrgRoles.notification.learnMore', 'Learn more') }), "."] }), _jsx("p", { style: { paddingTop: '4px' }, children: safeTranslate(t, 'invitations:invite.form.clusterAuthDisabledNote', 'If cluster authorizations are disabled, the user will have full access to the cluster and its components.') })] }), legacyClusterRoles.length > 0 && (_jsxs(_Fragment, { children: [_jsx("div", { style: {
145
+ }), _jsxs("div", { style: { margin: '16px 0' }, children: [_jsx(C4InlineNotification, { lowContrast: true, kind: 'info', hideCloseButton: true, title: '', subtitle: environmentsEnabled
146
+ ? safeTranslate(t, 'users:changeOrgRoles.notification.titleEnvironments', 'Starting with version 8.8, user access to environments is managed independently.')
147
+ : safeTranslate(t, 'users:changeOrgRoles.notification.title', 'Starting with version 8.8, user access to clusters is managed independently.') }), _jsxs("p", { style: { paddingTop: '4px' }, children: [_jsx(Link, { href: learnMoreUrl, target: '_blank', rel: 'noopener noreferrer', children: safeTranslate(t, 'users:changeOrgRoles.notification.learnMore', 'Learn more') }), "."] }), _jsx("p", { style: { paddingTop: '4px' }, children: environmentsEnabled
148
+ ? safeTranslate(t, 'invitations:invite.form.environmentAuthDisabledNote', "If authorizations are disabled for the environment's cluster, the user will have full access to the environment and its applications.")
149
+ : safeTranslate(t, 'invitations:invite.form.clusterAuthDisabledNote', 'If cluster authorizations are disabled, the user will have full access to the cluster and its components.') })] }), legacyClusterRoles.length > 0 && (_jsxs(_Fragment, { children: [_jsx("div", { style: {
146
150
  color: 'var(--cds-text-secondary)',
147
151
  letterSpacing: 'var(--cds-label-01-letter-spacing, 0.32px)',
148
152
  fontSize: 'var(--cds-label-01-font-size, 0.75rem)',
@@ -14,6 +14,12 @@ export interface C4InviteUserToOrganizationModalProps {
14
14
  showAdminRole?: boolean;
15
15
  showLegacyClusterRoles?: boolean;
16
16
  permissionsReworkEnabled?: boolean;
17
+ /**
18
+ * True when the organization uses environments (Hub). The notes about
19
+ * cluster access then talk about environments and their applications.
20
+ * Defaults to false: the cluster wording.
21
+ */
22
+ environmentsEnabled?: boolean;
17
23
  learnMoreUrl?: string;
18
24
  telemetry?: {
19
25
  track?: (eventName: string, data?: Record<string, unknown>) => void;
@@ -51,7 +51,7 @@ export const defaultDetailsProps = {
51
51
  onTimeRangeChange: () => { },
52
52
  translations: {
53
53
  title: 'Job type details',
54
- lastUpdated: 'Last updated:',
54
+ lastUpdated: 'Last updated',
55
55
  jobTypeLabel: 'Job type:',
56
56
  backgroundFetching: 'Loading more data...',
57
57
  dataLimitWarning: {
@@ -60,6 +60,7 @@ function C4JobDashboardErrorTable({ errors, operateBaseUrl, isLoading, translati
60
60
  pageSize: 10,
61
61
  tableSize: 'lg',
62
62
  useZebraStyles: false,
63
+ actionsUseOverflowMenuMinItems: 2,
63
64
  }, isLoading: isLoading && errors.length === 0, queryPrefix: 'job-dashboard-error-table' }), _jsx(C4BackgroundFetchingIndicator, { isLoading: isLoading, itemsLength: errors.length, loadingMoreDataText: translations.backgroundFetching })] }));
64
65
  }
65
66
  export default C4JobDashboardErrorTable;
@@ -95,7 +95,7 @@ function C4JobDashboardPieChart({ jobData, error, colorScale, isLoading, transla
95
95
  const noData = (jobData?.created.count === jobData?.failed.count &&
96
96
  jobData?.completed.count === 0) ||
97
97
  !jobData;
98
- return (_jsxs(_Fragment, { children: [_jsx("div", { style: { marginBottom: 25 }, children: _jsx(C4JobDashboardChartHeading, { title: translations.charts.createdVsCompleted.title, tooltipLabel: translations.charts.createdVsCompleted.tooltip }) }), (!jobData || noData || error) && !isLoading ? (_jsx(C4JobDashboardErrorHandler, { itemsLength: noData ? 0 : 1, showIcons: false, translations: translations.errorHandler, error: error })) : designSystem === 'ds' ? (_jsxs("div", { style: { maxWidth: PIE_CHART_MAX_WIDTH_PX, margin: '0 auto' }, children: [_jsxs("div", { style: { position: 'relative', height: CHART_HEIGHT }, children: [_jsx(ResponsiveContainer, { width: '100%', height: '100%', children: _jsxs(PieChart, { children: [_jsx(Pie, { data: dsPieData, dataKey: 'value', nameKey: 'label', innerRadius: '62%', outerRadius: '88%', paddingAngle: 2, stroke: 'none', children: dsPieData.map((entry) => (_jsx(Cell, { fill: entry.color }, entry.key))) }), _jsx(Tooltip, { ...DS_CHART_TOOLTIP_PROPS })] }) }), _jsx("div", { style: {
98
+ return (_jsxs(_Fragment, { children: [_jsx("div", { style: { marginBottom: 25 }, children: _jsx(C4JobDashboardChartHeading, { title: translations.charts.createdVsCompleted.title, tooltipLabel: translations.charts.createdVsCompleted.tooltip }) }), (!jobData || noData || error) && !isLoading ? (_jsx(C4JobDashboardErrorHandler, { itemsLength: noData ? 0 : 1, showIcons: false, translations: translations.errorHandler, error: error })) : designSystem === 'ds' ? (_jsxs("div", { style: { maxWidth: PIE_CHART_MAX_WIDTH_PX, margin: '0 auto' }, children: [_jsxs("div", { style: { position: 'relative', height: CHART_HEIGHT }, children: [_jsx(ResponsiveContainer, { width: '100%', height: '100%', children: _jsxs(PieChart, { children: [_jsx(Pie, { data: dsPieData, dataKey: 'value', nameKey: 'label', innerRadius: '62%', outerRadius: '88%', paddingAngle: 2, stroke: 'none', isAnimationActive: false, children: dsPieData.map((entry) => (_jsx(Cell, { fill: entry.color }, entry.key))) }), _jsx(Tooltip, { ...DS_CHART_TOOLTIP_PROPS })] }) }), _jsx("div", { style: {
99
99
  position: 'absolute',
100
100
  top: '50%',
101
101
  left: '50%',
@@ -55,9 +55,7 @@ function C4JobDashboardTimeChart({ timeSeries, isLoading, colorScale, translatio
55
55
  [translations.charts.legend.completed]: item.completed.count,
56
56
  [translations.charts.legend.failed]: item.failed.count,
57
57
  }));
58
- const formatDsTick = (tick, index) => {
59
- if (index % 2 !== 0)
60
- return '';
58
+ const formatDsLabel = (tick) => {
61
59
  const date = new Date(tick);
62
60
  return coversMultipleDays
63
61
  ? Intl.DateTimeFormat('en-US', { month: 'short', day: '2-digit' }).format(date)
@@ -67,6 +65,15 @@ function C4JobDashboardTimeChart({ timeSeries, isLoading, colorScale, translatio
67
65
  minute: '2-digit',
68
66
  }).format(date);
69
67
  };
68
+ // At most ~8 labels: the first row of each day for a multi-day range,
69
+ // otherwise every k-th row. Recharts does not thin an explicit list.
70
+ const MAX_TICKS = 8;
71
+ const everyKth = (rows) => rows.filter((_, i) => i % Math.ceil(rows.length / MAX_TICKS) === 0);
72
+ const dsTicks = everyKth(coversMultipleDays
73
+ ? dsRows.filter((row, i) => i === 0 ||
74
+ new Date(row.time).toDateString() !==
75
+ new Date(dsRows[i - 1].time).toDateString())
76
+ : dsRows).map((row) => row.time);
70
77
  const formattedColorScale = {
71
78
  [translations.charts.legend.completed]: colorScale.Completed,
72
79
  [translations.charts.legend.failed]: colorScale.Failed,
@@ -120,10 +127,10 @@ function C4JobDashboardTimeChart({ timeSeries, isLoading, colorScale, translatio
120
127
  scale: formattedColorScale,
121
128
  },
122
129
  };
123
- return (_jsxs(Stack, { gap: 6, children: [_jsx(C4JobDashboardChartHeading, { title: translations.charts.jobWorkload.title, tooltipLabel: translations.charts.jobWorkload.tooltip }), _jsxs("strong", { children: [translations.charts.jobWorkload.subtitle, " "] }), (!timeSeries || timeSeries.length === 0 || error) && !isLoading ? (_jsx(C4JobDashboardErrorHandler, { itemsLength: timeSeries.length, showIcons: false, translations: translations.errorHandler, error: error })) : designSystem === 'ds' ? (_jsx("div", { style: { height: CHART_HEIGHT }, children: _jsx(ResponsiveContainer, { width: '100%', height: '100%', children: _jsxs(AreaChart, { data: dsRows, margin: { top: 8, right: 16, left: 8, bottom: 8 }, children: [_jsx(CartesianGrid, { stroke: DS_CHART_GRID_COLOR, vertical: false }), _jsx(XAxis, { dataKey: 'time', tickFormatter: formatDsTick, stroke: DS_CHART_AXIS_COLOR, tick: { fill: DS_CHART_AXIS_COLOR, fontSize: 12 }, label: {
130
+ return (_jsxs(Stack, { gap: 6, children: [_jsx(C4JobDashboardChartHeading, { title: translations.charts.jobWorkload.title, tooltipLabel: translations.charts.jobWorkload.tooltip }), _jsxs("strong", { children: [translations.charts.jobWorkload.subtitle, " "] }), (!timeSeries || timeSeries.length === 0 || error) && !isLoading ? (_jsx(C4JobDashboardErrorHandler, { itemsLength: timeSeries.length, showIcons: false, translations: translations.errorHandler, error: error })) : designSystem === 'ds' ? (_jsx("div", { style: { height: CHART_HEIGHT }, children: _jsx(ResponsiveContainer, { width: '100%', height: '100%', children: _jsxs(AreaChart, { data: dsRows, margin: { top: 8, right: 16, left: 8, bottom: 24 }, children: [_jsx(CartesianGrid, { stroke: DS_CHART_GRID_COLOR, vertical: false }), _jsx(XAxis, { dataKey: 'time', ticks: dsTicks, tickFormatter: formatDsLabel, stroke: DS_CHART_AXIS_COLOR, tick: { fill: DS_CHART_AXIS_COLOR, fontSize: 12 }, label: {
124
131
  value: translations.charts.axes.time,
125
132
  position: 'insideBottom',
126
- offset: -6,
133
+ offset: -4,
127
134
  fill: DS_CHART_AXIS_COLOR,
128
135
  fontSize: 12,
129
136
  } }), _jsx(YAxis, { domain: [0, maxStackedValue], stroke: DS_CHART_AXIS_COLOR, tick: { fill: DS_CHART_AXIS_COLOR, fontSize: 12 }, label: {
@@ -132,6 +139,6 @@ function C4JobDashboardTimeChart({ timeSeries, isLoading, colorScale, translatio
132
139
  position: 'insideLeft',
133
140
  fill: DS_CHART_AXIS_COLOR,
134
141
  fontSize: 12,
135
- } }), _jsx(Tooltip, { ...DS_CHART_TOOLTIP_PROPS, labelFormatter: (label) => formatTooltipTimestamp(String(label)) }), _jsx(Legend, { wrapperStyle: { color: DS_CHART_AXIS_COLOR, fontSize: 12 } }), _jsx(Area, { type: 'monotone', dataKey: translations.charts.legend.created, stackId: 'status', stroke: JOB_STATUS_DS_COLORS.created, fill: JOB_STATUS_DS_COLORS.created, fillOpacity: 0.6 }), _jsx(Area, { type: 'monotone', dataKey: translations.charts.legend.completed, stackId: 'status', stroke: JOB_STATUS_DS_COLORS.completed, fill: JOB_STATUS_DS_COLORS.completed, fillOpacity: 0.6 }), _jsx(Area, { type: 'monotone', dataKey: translations.charts.legend.failed, stackId: 'status', stroke: JOB_STATUS_DS_COLORS.failed, fill: JOB_STATUS_DS_COLORS.failed, fillOpacity: 0.6 })] }) }) })) : (_jsx("div", { style: { height: CHART_HEIGHT }, children: _jsx(StackedAreaChart, { data: chartData, options: areaOptions }) }))] }));
142
+ } }), _jsx(Tooltip, { ...DS_CHART_TOOLTIP_PROPS, labelFormatter: (label) => formatTooltipTimestamp(String(label)) }), _jsx(Legend, { verticalAlign: 'top', wrapperStyle: { color: DS_CHART_AXIS_COLOR, fontSize: 12 } }), _jsx(Area, { type: 'monotone', dataKey: translations.charts.legend.created, stackId: 'status', stroke: JOB_STATUS_DS_COLORS.created, fill: JOB_STATUS_DS_COLORS.created, fillOpacity: 0.6 }), _jsx(Area, { type: 'monotone', dataKey: translations.charts.legend.completed, stackId: 'status', stroke: JOB_STATUS_DS_COLORS.completed, fill: JOB_STATUS_DS_COLORS.completed, fillOpacity: 0.6 }), _jsx(Area, { type: 'monotone', dataKey: translations.charts.legend.failed, stackId: 'status', stroke: JOB_STATUS_DS_COLORS.failed, fill: JOB_STATUS_DS_COLORS.failed, fillOpacity: 0.6 })] }) }) })) : (_jsx("div", { style: { height: CHART_HEIGHT }, children: _jsx(StackedAreaChart, { data: chartData, options: areaOptions }) }))] }));
136
143
  }
137
144
  export default C4JobDashboardTimeChart;
@@ -1,4 +1,4 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
2
  /*
3
3
  * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
4
4
  * under one or more contributor license agreements. Licensed under a commercial license.
@@ -7,8 +7,10 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
7
7
  import { Layer } from '@carbon/react';
8
8
  import styled from 'styled-components';
9
9
  import { JobsCompletedIcon, JobsCreatedIcon, JobsFailedIcon, } from '../../icons/c4-icons.js';
10
+ import { useC4DesignSystem } from '../../runtime/c4-console-runtime-context.js';
10
11
  import { Button, Loading, Stack, Tile, Tooltip } from '../../ui/index.js';
11
12
  import { SECTION_HEADING_STYLE } from '../../utils/section-heading-style.js';
13
+ import { DsSection } from '../c4-cluster-overview/ds-section.js';
12
14
  import { C4JobDashboardErrorHandler } from '../c4-job-dashboard-shared/c4-job-dashboard-error-handler.js';
13
15
  import C4TimestampInformation from '../c4-job-dashboard-shared/c4-timestamp-information.js';
14
16
  const containerHeight = '30vh';
@@ -42,6 +44,19 @@ const JobTilesGrid = styled.div `
42
44
  `;
43
45
  const JobTile = ({ title, description, icon, tooltip, }) => (_jsx(Tooltip, { align: 'top', label: tooltip, children: _jsx("div", { children: _jsx(Layer, { children: _jsxs(Tile, { children: [_jsxs(TileHeader, { children: [_jsx("h6", { children: title }), icon] }), _jsx(TileDescription, { children: description })] }) }) }) }));
44
46
  function C4JobDashboardEntryPoint({ data, error, onClick, isLoading, translations, variant = 'tile', }) {
47
+ const designSystem = useC4DesignSystem();
48
+ const isDs = designSystem === 'ds';
49
+ // Embedded in ds mode: only the heading stays on top. The description and
50
+ // the rest sit in one card, so the empty state drops its own card.
51
+ const isDsPlain = isDs && variant === 'plain';
52
+ // `secondary` is the DS secondary button. Carbon keeps its primary button.
53
+ const viewAllKind = isDs ? 'secondary' : undefined;
54
+ // The 30vh minimum height reserves room in the carbon tile. In the ds card
55
+ // it only leaves empty space under the content.
56
+ const dsPlainContainerStyle = isDsPlain ? { minHeight: 0 } : undefined;
57
+ // The loading state reserves about the height of the empty state, so the
58
+ // card does not collapse from 30vh when the data arrives.
59
+ const dsPlainLoadingStyle = isDsPlain ? { minHeight: '10rem' } : undefined;
45
60
  const hasError = !!error;
46
61
  const shouldShowEmpty = !hasError &&
47
62
  (!data ||
@@ -49,10 +64,14 @@ function C4JobDashboardEntryPoint({ data, error, onClick, isLoading, translation
49
64
  data.failed.count === 0 &&
50
65
  data.completed.count === 0));
51
66
  const getTileDescription = (count) => `${count ?? 0} ${count === 1 ? translations.jobTileSingular.toLowerCase() : translations.jobTilePlural.toLowerCase()}`;
52
- const content = (_jsxs(Stack, { gap: 4, children: [_jsx("h3", { style: SECTION_HEADING_STYLE, children: translations.title }), _jsx("p", { children: translations.description }), isLoading ? (_jsx(LoadingContainer, { children: _jsx(Loading, { withOverlay: false }) })) : hasError || shouldShowEmpty ? (_jsx(Container, { children: _jsxs(Stack, { gap: 4, children: [_jsx(C4JobDashboardErrorHandler, { itemsLength: shouldShowEmpty ? 0 : 1, error: hasError ? error : null, showIcons: true, translations: translations.errorHandler }), shouldShowEmpty && (_jsx(Button, { onClick: onClick, children: translations.viewAllJobTypes }))] }) })) : (_jsx(Container, { children: _jsxs(Stack, { gap: 4, children: [_jsx(C4TimestampInformation, { description: translations.lastUpdated, lastUpdatedAt: data?.lastUpdatedAt ?? '' }), _jsx(JobTilesContainer, { children: _jsxs(JobTilesGrid, { children: [_jsx(JobTile, { title: translations.jobTileCompleted, description: getTileDescription(data?.completed.count), icon: _jsx(JobsCompletedIcon, {}), tooltip: translations.jobTileCompletedTooltip }), _jsx(JobTile, { title: translations.jobTileFailed, description: getTileDescription(data?.failed.count), icon: _jsx(JobsFailedIcon, {}), tooltip: translations.jobTileFailedTooltip }), _jsx(JobTile, { title: translations.jobTileCreated, description: getTileDescription(data?.created.count), icon: _jsx(JobsCreatedIcon, {}), tooltip: translations.jobTileCreatedTooltip })] }) }), _jsx(Button, { onClick: onClick, children: translations.viewAllJobTypes })] }) }))] }));
53
- // The empty/error state's own Tile (inside C4JobDashboardErrorHandler) and the populated state's
54
- // job-count tiles are content under the heading, not this section's own chrome — both stay boxed
55
- // in either variant. Only this outer card goes away in 'plain'.
67
+ const body = (_jsxs(_Fragment, { children: [_jsx("p", { className: isDsPlain ? 'm-0' : undefined, children: translations.description }), isLoading ? (_jsx(LoadingContainer, { style: dsPlainLoadingStyle, children: _jsx(Loading, { withOverlay: false }) })) : hasError || shouldShowEmpty ? (_jsx(Container, { style: dsPlainContainerStyle, children: _jsxs(Stack, { gap: 4, children: [_jsx(C4JobDashboardErrorHandler, { itemsLength: shouldShowEmpty ? 0 : 1, error: hasError ? error : null, showIcons: true, translations: translations.errorHandler, unboxed: isDsPlain }), shouldShowEmpty && (_jsx(Button, { kind: viewAllKind, onClick: onClick, children: translations.viewAllJobTypes }))] }) })) : (_jsx(Container, { style: dsPlainContainerStyle, children: _jsxs(Stack, { gap: 4, children: [_jsx(C4TimestampInformation, { description: translations.lastUpdated, lastUpdatedAt: data?.lastUpdatedAt ?? '' }), _jsx(JobTilesContainer, { children: _jsxs(JobTilesGrid, { children: [_jsx(JobTile, { title: translations.jobTileCompleted, description: getTileDescription(data?.completed.count), icon: _jsx(JobsCompletedIcon, {}), tooltip: translations.jobTileCompletedTooltip }), _jsx(JobTile, { title: translations.jobTileFailed, description: getTileDescription(data?.failed.count), icon: _jsx(JobsFailedIcon, {}), tooltip: translations.jobTileFailedTooltip }), _jsx(JobTile, { title: translations.jobTileCreated, description: getTileDescription(data?.created.count), icon: _jsx(JobsCreatedIcon, {}), tooltip: translations.jobTileCreatedTooltip })] }) }), _jsx(Button, { kind: viewAllKind, onClick: onClick, children: translations.viewAllJobTypes })] }) }))] }));
68
+ if (isDsPlain) {
69
+ return (_jsx(DsSection, { title: translations.title, card: true, children: body }));
70
+ }
71
+ const content = (_jsxs(Stack, { gap: 4, children: [_jsx("h3", { style: SECTION_HEADING_STYLE, children: translations.title }), body] }));
72
+ // Carbon mode: the empty/error state's own Tile (inside C4JobDashboardErrorHandler) and the
73
+ // populated state's job-count tiles stay boxed in either variant. Only this outer card goes away
74
+ // in 'plain'. (ds 'plain' returned above, with one card around the whole body.)
56
75
  return variant === 'plain' ? content : _jsx(Tile, { children: content });
57
76
  }
58
77
  export default C4JobDashboardEntryPoint;
@@ -23,10 +23,10 @@ export interface C4JobDashboardEntryPointProps {
23
23
  isLoading?: boolean;
24
24
  /**
25
25
  * `'tile'` (default) renders this section inside its own bordered card — Console's own look.
26
- * `'plain'` drops that card in favor of a bare heading, for a host that renders this section inline
27
- * alongside its own similarly bare sections. The empty/error states' own `Tile` (from
28
- * `C4JobDashboardErrorHandler`) is unaffected either way — it's content under the heading, not the
29
- * section's own chrome.
26
+ * `'plain'` is for a host that renders this section inline with its own sections. In carbon mode
27
+ * it is a bare heading, and the empty/error state keeps its own `Tile` (from
28
+ * `C4JobDashboardErrorHandler`). In ds mode only the heading is outside: the description and the
29
+ * content sit in one DS card, so the empty/error state renders without its own card.
30
30
  */
31
31
  variant?: 'tile' | 'plain';
32
32
  }
@@ -50,7 +50,7 @@ export const defaultOverviewProps = {
50
50
  },
51
51
  {
52
52
  key: '2',
53
- label: 'Cluster-123',
53
+ label: 'cluster-123',
54
54
  href: '/clusters/cluster-123',
55
55
  },
56
56
  ],
@@ -6,5 +6,5 @@
6
6
  export declare const JOB_STATUS_DS_COLORS: {
7
7
  readonly created: "var(--info-action-default)";
8
8
  readonly completed: "var(--success-action-default)";
9
- readonly failed: "var(--danger-action-default)";
9
+ readonly failed: "var(--danger-border-strong)";
10
10
  };
@@ -12,5 +12,7 @@ import { DS_STATUS_COLORS } from '../shared-charts/recharts-tokens.js';
12
12
  export const JOB_STATUS_DS_COLORS = {
13
13
  created: DS_STATUS_COLORS.info,
14
14
  completed: DS_STATUS_COLORS.success,
15
- failed: DS_STATUS_COLORS.danger,
15
+ // `danger-action-default` is red-100 in light mode (a button fill), too
16
+ // pale for a chart series. The strong border token stays red in both themes.
17
+ failed: 'var(--danger-border-strong)',
16
18
  };