@camunda/ccma-saas-frontend 0.8.0 → 0.8.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (29) hide show
  1. package/lib/esm/components/c4-api-client-scope-picker/c4-api-client-scope-picker.d.ts +10 -0
  2. package/lib/esm/components/c4-api-client-scope-picker/c4-api-client-scope-picker.js +78 -0
  3. package/lib/esm/components/c4-api-client-scope-picker/c4-api-client-scope-picker.mocks.d.ts +6 -0
  4. package/lib/esm/components/c4-api-client-scope-picker/c4-api-client-scope-picker.mocks.js +90 -0
  5. package/lib/esm/components/c4-api-client-scope-picker/c4-api-client-scope-picker.types.d.ts +25 -0
  6. package/lib/esm/components/c4-api-client-scope-picker/c4-api-client-scope-picker.types.js +6 -0
  7. package/lib/esm/components/c4-cluster-settings/elements/external-identity-provider-modal.js +1 -2
  8. package/lib/esm/components/c4-create-alert-modal/c4-create-alert-modal.js +1 -2
  9. package/lib/esm/components/c4-create-connector-secret-modal/c4-create-connector-secret-modal.js +1 -2
  10. package/lib/esm/components/c4-create-console-api-client-modal/c4-create-console-api-client-modal.js +13 -30
  11. package/lib/esm/i18n/en/modals/apiclients.json +4 -0
  12. package/lib/esm/i18n/en/pages/orgmanagement.json +1 -0
  13. package/lib/esm/index.d.ts +3 -1
  14. package/lib/esm/index.js +2 -1
  15. package/lib/esm/runtime/c4-console-runtime-context.d.ts +10 -0
  16. package/lib/esm/runtime/c4-console-runtime-context.js +12 -0
  17. package/lib/esm/runtime/index.d.ts +1 -1
  18. package/lib/esm/runtime/index.js +1 -1
  19. package/lib/esm/runtime/use-hub-api-naming.d.ts +17 -0
  20. package/lib/esm/runtime/use-hub-api-naming.js +23 -0
  21. package/lib/esm/ui/c4-password-input.d.ts +24 -0
  22. package/lib/esm/ui/c4-password-input.js +95 -0
  23. package/lib/esm/ui/index.d.ts +1 -0
  24. package/lib/esm/ui/index.js +13 -4
  25. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-alerts-tab.js +1 -2
  26. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-connector-secrets-tab.js +2 -2
  27. package/lib/esm/widgets/management/c4-management-app.js +6 -2
  28. package/lib/esm/widgets/management/tabs/c4-management-api-tab.js +16 -31
  29. package/package.json +1 -1
@@ -0,0 +1,10 @@
1
+ import { type JSX } from 'react';
2
+ import type { C4ApiClientScopePickerProps } from './c4-api-client-scope-picker.types.js';
3
+ /**
4
+ * The scope selection of an API client, as one card per scope group.
5
+ *
6
+ * Each card has a group checkbox and one checkbox per scope. The group checkbox
7
+ * is tri-state: it selects or clears the full group, and it shows the
8
+ * indeterminate state while only some scopes of the group are selected.
9
+ */
10
+ export declare const C4ApiClientScopePicker: ({ groups, selectedScopes, onChange, disabled, idPrefix, }: C4ApiClientScopePickerProps) => JSX.Element;
@@ -0,0 +1,78 @@
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 { useCallback, useMemo } from 'react';
8
+ import { Checkbox } from '../../ui/index.js';
9
+ // Carbon emits the spacing tokens only when the host compiles the Carbon SCSS.
10
+ // The Storybook preview of this package loads the prebuilt Carbon stylesheet,
11
+ // which has no `--cds-spacing-*` rule, so an unguarded `var()` collapses the
12
+ // card to zero padding there. The fallback holds the Carbon value.
13
+ const SPACING_02 = 'var(--cds-spacing-02, 0.25rem)';
14
+ const SPACING_05 = 'var(--cds-spacing-05, 1rem)';
15
+ const SPACING_06 = 'var(--cds-spacing-06, 1.5rem)';
16
+ /**
17
+ * The scope groups flow into CSS columns instead of one tall list. The browser
18
+ * divides the available width by `columnWidth` to get the column count, so the
19
+ * picker keeps one column in a narrow dialog and gets four in a `lg` modal. No
20
+ * media query and no viewport measurement decides the count.
21
+ *
22
+ * Columns pack better than a grid here, because the groups have very different
23
+ * heights (Backups has 8 scopes, Activity has 1). A grid gives every cell in a
24
+ * row the height of the tallest cell in that row. Columns do not.
25
+ */
26
+ const COLUMNS_STYLE = {
27
+ columnWidth: '15rem',
28
+ columnGap: SPACING_05,
29
+ };
30
+ const GROUP_CARD_STYLE = {
31
+ // A group must not split over two columns. The card is the unit that moves.
32
+ breakInside: 'avoid',
33
+ border: '1px solid var(--cds-border-subtle)',
34
+ padding: SPACING_05,
35
+ margin: `0 0 ${SPACING_05} 0`,
36
+ // A fieldset defaults to `min-inline-size: min-content`, which makes it wider
37
+ // than its column when a scope label is long.
38
+ minInlineSize: 0,
39
+ };
40
+ const GROUP_SCOPES_STYLE = {
41
+ marginLeft: SPACING_06,
42
+ marginTop: SPACING_02,
43
+ };
44
+ /**
45
+ * The scope selection of an API client, as one card per scope group.
46
+ *
47
+ * Each card has a group checkbox and one checkbox per scope. The group checkbox
48
+ * is tri-state: it selects or clears the full group, and it shows the
49
+ * indeterminate state while only some scopes of the group are selected.
50
+ */
51
+ export const C4ApiClientScopePicker = ({ groups, selectedScopes, onChange, disabled, idPrefix, }) => {
52
+ const selected = useMemo(() => new Set(selectedScopes), [selectedScopes]);
53
+ const toggleGroup = useCallback((groupValues) => {
54
+ const next = new Set(selectedScopes);
55
+ const allSelected = groupValues.every((value) => next.has(value));
56
+ for (const value of groupValues) {
57
+ if (allSelected) {
58
+ next.delete(value);
59
+ }
60
+ else {
61
+ next.add(value);
62
+ }
63
+ }
64
+ onChange(Array.from(next));
65
+ }, [onChange, selectedScopes]);
66
+ const toggleScope = useCallback((value) => {
67
+ onChange(selectedScopes.includes(value)
68
+ ? selectedScopes.filter((current) => current !== value)
69
+ : [...selectedScopes, value]);
70
+ }, [onChange, selectedScopes]);
71
+ return (_jsx("div", { style: COLUMNS_STYLE, children: groups.map((group, groupIndex) => {
72
+ const groupValues = group.scopes.map((scope) => scope.value);
73
+ const selectedCount = groupValues.filter((value) => selected.has(value)).length;
74
+ const allSelected = groupValues.length > 0 && selectedCount === groupValues.length;
75
+ const indeterminate = selectedCount > 0 && !allSelected;
76
+ return (_jsxs("fieldset", { "aria-label": group.label, style: GROUP_CARD_STYLE, children: [_jsx(Checkbox, { id: `${idPrefix}-group-${groupIndex}`, labelText: group.label, checked: allSelected, indeterminate: indeterminate, onChange: () => toggleGroup(groupValues), disabled: disabled }), _jsx("div", { style: GROUP_SCOPES_STYLE, children: group.scopes.map((scope) => (_jsx(Checkbox, { id: `${idPrefix}-scope-${scope.value}`, labelText: scope.label, checked: selected.has(scope.value), onChange: () => toggleScope(scope.value), disabled: disabled }, scope.value))) })] }, `${group.label}-${groupIndex}`));
77
+ }) }));
78
+ };
@@ -0,0 +1,6 @@
1
+ import type { C4ApiClientScopeGroup } from './c4-api-client-scope-picker.types.js';
2
+ /**
3
+ * The group sizes of the real Administration API scopes, from 1 scope to 8.
4
+ * The uneven heights are what the column layout must handle.
5
+ */
6
+ export declare const basicApiClientScopeGroups: C4ApiClientScopeGroup[];
@@ -0,0 +1,90 @@
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 group sizes of the real Administration API scopes, from 1 scope to 8.
8
+ * The uneven heights are what the column layout must handle.
9
+ */
10
+ export const basicApiClientScopeGroups = [
11
+ {
12
+ label: 'Cluster',
13
+ scopes: [
14
+ { label: 'Get', value: 'GetCluster' },
15
+ { label: 'Create', value: 'CreateCluster' },
16
+ { label: 'Delete', value: 'DeleteCluster' },
17
+ { label: 'Update', value: 'UpdateCluster' },
18
+ { label: 'Update encryption', value: 'UpdateClusterEncryption' },
19
+ ],
20
+ },
21
+ {
22
+ label: 'Zeebe client',
23
+ scopes: [
24
+ { label: 'Get', value: 'GetZeebeClient' },
25
+ { label: 'Create', value: 'CreateZeebeClient' },
26
+ { label: 'Delete', value: 'DeleteZeebeClient' },
27
+ ],
28
+ },
29
+ {
30
+ label: 'External Monitoring',
31
+ scopes: [
32
+ { label: 'Get', value: 'GetByomClient' },
33
+ { label: 'Create', value: 'CreateByomClient' },
34
+ { label: 'Delete', value: 'DeleteByomClient' },
35
+ { label: 'Rotate Password', value: 'UpdateByomClient' },
36
+ { label: 'Activate', value: 'ActivateByom' },
37
+ { label: 'Deactivate', value: 'DeactivateByom' },
38
+ ],
39
+ },
40
+ {
41
+ label: 'Hub API',
42
+ scopes: [
43
+ { label: 'Get', value: 'GetModel' },
44
+ { label: 'Create', value: 'CreateModel' },
45
+ { label: 'Update', value: 'UpdateModel' },
46
+ { label: 'Delete', value: 'DeleteModel' },
47
+ ],
48
+ },
49
+ {
50
+ label: 'IP AllowList',
51
+ scopes: [
52
+ { label: 'Get', value: 'GetWhitelists' },
53
+ { label: 'Update', value: 'UpdateWhitelists' },
54
+ ],
55
+ },
56
+ {
57
+ label: 'Connector secrets',
58
+ scopes: [
59
+ { label: 'Get', value: 'GetSecrets' },
60
+ { label: 'Create', value: 'CreateSecrets' },
61
+ { label: 'Update', value: 'UpdateSecrets' },
62
+ { label: 'Delete', value: 'DeleteSecrets' },
63
+ ],
64
+ },
65
+ {
66
+ label: 'Members',
67
+ scopes: [
68
+ { label: 'Get', value: 'GetMembers' },
69
+ { label: 'Invite + Update Roles', value: 'UpdateMembers' },
70
+ { label: 'Delete', value: 'DeleteMembers' },
71
+ ],
72
+ },
73
+ {
74
+ label: 'Backups',
75
+ scopes: [
76
+ { label: 'Get', value: 'GetHotBackups' },
77
+ { label: 'Create', value: 'CreateHotBackups' },
78
+ { label: 'Delete', value: 'DeleteHotBackups' },
79
+ { label: 'Restore', value: 'RestoreHotBackup' },
80
+ { label: 'Get restore status', value: 'GetHotBackupRestore' },
81
+ { label: 'Get schedule', value: 'GetHotBackupSchedule' },
82
+ { label: 'Create + update schedule', value: 'UpdateHotBackupSchedule' },
83
+ { label: 'Delete schedule', value: 'DeleteHotBackupSchedule' },
84
+ ],
85
+ },
86
+ {
87
+ label: 'Activity Logs',
88
+ scopes: [{ label: 'Download', value: 'DownloadActivity' }],
89
+ },
90
+ ];
@@ -0,0 +1,25 @@
1
+ export interface C4ApiClientScope {
2
+ /** The text on the checkbox. The host translates it. */
3
+ label: string;
4
+ /** The permission string that the API expects, for example `GetCluster`. */
5
+ value: string;
6
+ }
7
+ export interface C4ApiClientScopeGroup {
8
+ /** The text on the group checkbox. The host translates it. */
9
+ label: string;
10
+ scopes: C4ApiClientScope[];
11
+ }
12
+ export interface C4ApiClientScopePickerProps {
13
+ groups: C4ApiClientScopeGroup[];
14
+ /** The scope values that are selected at this time. */
15
+ selectedScopes: string[];
16
+ /** Gets the full new selection. The host replaces its state with it. */
17
+ onChange: (selectedScopes: string[]) => void;
18
+ disabled?: boolean;
19
+ /**
20
+ * Prefix for the generated checkbox ids. Two pickers on one page must get
21
+ * different prefixes. A duplicate id breaks the link from the label to the
22
+ * input, so a click on one label toggles the other checkbox.
23
+ */
24
+ idPrefix: string;
25
+ }
@@ -0,0 +1,6 @@
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
+ export {};
@@ -1,7 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { PasswordInput } from '@carbon/react';
3
2
  import { useEffect, useState } from 'react';
4
- import { Checkbox, CodeSnippet, Form, Modal, Stack, TextInput, } from '../../../ui/index.js';
3
+ import { Checkbox, CodeSnippet, Form, Modal, PasswordInput, Stack, TextInput, } from '../../../ui/index.js';
5
4
  import { C4InlineNotification } from '../../c4-inline-notification/c4-inline-notification.js';
6
5
  // ponytail: English placeholder copy — final UX copy + lockout wording are a Product
7
6
  // Design action item (design §1). Kept inline until it lands.
@@ -4,9 +4,8 @@ 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 { PasswordInput } from '@carbon/react';
8
7
  import { forwardRef, useCallback, useImperativeHandle, useState, } from 'react';
9
- import { Checkbox, Form, Modal, Stack, TextInput } from '../../ui/index.js';
8
+ import { Checkbox, Form, Modal, PasswordInput, Stack, TextInput, } from '../../ui/index.js';
10
9
  import { useRadioFamily } from '../../ui/families.js';
11
10
  import { C4ActionableNotification } from '../c4-actionable-notification/c4-actionable-notification.js';
12
11
  import { C4InlineNotification } from '../c4-inline-notification/c4-inline-notification.js';
@@ -5,9 +5,8 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
5
5
  * You may not use this file except in compliance with the commercial license.
6
6
  */
7
7
  import { SECRETS_MAX_LENGTH } from '@camunda/ccma-shared-types';
8
- import { PasswordInput } from '@carbon/react';
9
8
  import { forwardRef, useCallback, useImperativeHandle, useMemo, useState, } from 'react';
10
- import { Form, Modal, Stack, TextInput } from '../../ui/index.js';
9
+ import { Form, Modal, PasswordInput, Stack, TextInput } from '../../ui/index.js';
11
10
  import { C4InlineNotification } from '../c4-inline-notification/c4-inline-notification.js';
12
11
  function safeTranslate(t, key, defaultValue, options) {
13
12
  if (!t)
@@ -5,7 +5,9 @@ import { jsxs as _jsxs, jsx as _jsx, Fragment as _Fragment } from "react/jsx-run
5
5
  * You may not use this file except in compliance with the commercial license.
6
6
  */
7
7
  import { forwardRef, useCallback, useImperativeHandle, useMemo, useState, } from 'react';
8
- import { Checkbox, Form, FormGroup, Link, Modal, Stack, TextInput, } from '../../ui/index.js';
8
+ import { useHubApiNaming } from '../../runtime/use-hub-api-naming.js';
9
+ import { Form, Link, Modal, Stack, TextInput } from '../../ui/index.js';
10
+ import { C4ApiClientScopePicker } from '../c4-api-client-scope-picker/c4-api-client-scope-picker.js';
9
11
  import { C4ClusterClientCredentialsModal } from '../c4-cluster-client-credentials/c4-cluster-client-credentials.js';
10
12
  function isApiClientNameValid(name) {
11
13
  if (!name.trim()) {
@@ -56,7 +58,7 @@ function renderInlineLink0(value, renderLink) {
56
58
  const [, before, label, after] = match;
57
59
  return (_jsxs("span", { children: [before, renderLink(label), after] }));
58
60
  }
59
- function getAvailableScopes(t) {
61
+ function getAvailableScopes(t, hubNaming) {
60
62
  return [
61
63
  {
62
64
  label: safeTranslate(t, 'apiclients:create.fields.scopes.cluster.label', 'Clusters'),
@@ -130,7 +132,9 @@ function getAvailableScopes(t) {
130
132
  ],
131
133
  },
132
134
  {
133
- label: safeTranslate(t, 'apiclients:create.fields.scopes.modeler.label', 'Modeler'),
135
+ label: safeTranslate(t, hubNaming
136
+ ? 'apiclients:create.fields.scopes.modeler.labelHub'
137
+ : 'apiclients:create.fields.scopes.modeler.label', hubNaming ? 'Hub API' : 'Web Modeler API'),
134
138
  scopes: [
135
139
  {
136
140
  label: safeTranslate(t, 'apiclients:create.fields.scopes.modeler.get', 'Get'),
@@ -241,6 +245,7 @@ function getAvailableScopes(t) {
241
245
  ];
242
246
  }
243
247
  export const C4CreateConsoleApiClientModal = forwardRef(({ t, apiBaseUrl, loginBaseUrl, onCreateApiClient, scopesDocsHref }, ref) => {
248
+ const hubNaming = useHubApiNaming();
244
249
  const [isOpen, setIsOpen] = useState(false);
245
250
  const [orgId, setOrgId] = useState('');
246
251
  const [name, setName] = useState('');
@@ -300,7 +305,7 @@ export const C4CreateConsoleApiClientModal = forwardRef(({ t, apiBaseUrl, loginB
300
305
  }
301
306
  })();
302
307
  }, [name, onCreateApiClient, orgId, permissions, t]);
303
- const scopes = useMemo(() => getAvailableScopes(t), [t]);
308
+ const scopes = useMemo(() => getAvailableScopes(t, hubNaming), [t, hubNaming]);
304
309
  const apiBase = normalizeUrlBase(apiBaseUrl);
305
310
  const loginBase = normalizeUrlBase(loginBaseUrl);
306
311
  const oauthTokenUrl = loginBase ? joinUrl(loginBase, '/oauth/token') : '';
@@ -311,32 +316,10 @@ export const C4CreateConsoleApiClientModal = forwardRef(({ t, apiBaseUrl, loginB
311
316
  const curl = response
312
317
  ? `#!/bin/sh\ncurl --header "Content-Type: application/json" --request POST --data '{"grant_type":"client_credentials", "audience":"${audience}", "client_id":"${response.clientId}", "client_secret":"${response.clientSecret}"}' ${oauthTokenUrl}`
313
318
  : '';
314
- return (_jsxs(_Fragment, { children: [_jsx(Modal, { open: isOpen, modalHeading: modalHeading, primaryButtonText: safeTranslate(t, 'apiclients:create.buttons.primary', 'Create'), secondaryButtonText: safeTranslate(t, 'apiclients:create.buttons.secondary', 'Cancel'), primaryButtonDisabled: saving, onRequestClose: close, onRequestSubmit: onSubmit, size: 'sm', id: 'c4-create-console-api-client-modal', children: _jsx(Stack, { gap: 6, children: _jsx(Form, { noValidate: true, children: _jsxs(Stack, { gap: 6, children: [_jsx(TextInput, { id: 'c4-console-api-client-name', labelText: safeTranslate(t, 'apiclients:create.fields.name.label', 'Name'), maxLength: 50, value: name, helperText: safeTranslate(t, 'apiclients:create.fields.name.helperText', ''), onChange: (e) => setName(e.currentTarget.value), invalid: Boolean(error), invalidText: error, disabled: saving }), _jsxs(Stack, { gap: 2, children: [_jsx("h3", { children: safeTranslate(t, 'apiclients:create.fields.scopes.label', 'Scopes') }), _jsx("p", { children: renderInlineLink0(safeTranslate(t, 'apiclients:create.fields.scopes.helperText', 'Select scopes for this client.'), (label) => scopesDocsHref ? (_jsx(Link, { size: 'sm', href: scopesDocsHref, children: label })) : (_jsx("span", { children: label }))) })] }), _jsx(Stack, { gap: 4, children: scopes.map((group, groupIndex) => {
315
- const groupValues = group.scopes.map((s) => s.value);
316
- const selectedCount = groupValues.filter((v) => permissions.includes(v)).length;
317
- const allSelected = selectedCount === groupValues.length;
318
- const indeterminate = selectedCount > 0 && !allSelected;
319
- return (_jsx(FormGroup, { legendText: '', children: _jsxs(Stack, { gap: 2, children: [_jsx(Checkbox, { id: `c4-console-api-scope-group-${groupIndex}`, labelText: group.label, checked: allSelected, indeterminate: indeterminate, onChange: () => {
320
- setPermissions((current) => {
321
- const currentSet = new Set(current);
322
- const isAllSelected = groupValues.every((v) => currentSet.has(v));
323
- if (isAllSelected) {
324
- groupValues.forEach((v) => currentSet.delete(v));
325
- }
326
- else {
327
- groupValues.forEach((v) => currentSet.add(v));
328
- }
329
- return Array.from(currentSet);
330
- });
331
- }, disabled: saving }), _jsx("div", { style: { marginLeft: 'var(--cds-spacing-06)' }, children: _jsx(Stack, { gap: 0, style: { rowGap: '0px' }, children: group.scopes.map((scope) => {
332
- const checked = permissions.includes(scope.value);
333
- return (_jsx(Checkbox, { id: `c4-console-api-scope-${scope.value}`, labelText: scope.label, checked: checked, onChange: () => {
334
- setPermissions((current) => checked
335
- ? current.filter((v) => v !== scope.value)
336
- : [...current, scope.value]);
337
- }, disabled: saving }, scope.value));
338
- }) }) })] }) }, `${group.label}-${groupIndex}`));
339
- }) })] }) }) }) }), responseOpen && response ? (_jsx(C4ClusterClientCredentialsModal, { isOpen: responseOpen, heading: safeTranslate(t, 'apiclients:create.heading.response', 'API client credentials'), onRequestClose: () => setResponseOpen(false), notificationText: safeTranslate(t, 'apiclients:completed.notificationText', 'Save these credentials now.'), description: _jsx("span", { children: renderInlineLink0(safeTranslate(t, 'apiclients:completed.description', 'You can use these credentials to access the Console API.'), (label) => (_jsx("span", { children: label }))) }), variants: [
319
+ return (_jsxs(_Fragment, { children: [_jsx(Modal, { open: isOpen, modalHeading: modalHeading, primaryButtonText: safeTranslate(t, 'apiclients:create.buttons.primary', 'Create'), secondaryButtonText: safeTranslate(t, 'apiclients:create.buttons.secondary', 'Cancel'), primaryButtonDisabled: saving, onRequestClose: close, onRequestSubmit: onSubmit,
320
+ // The scope picker needs the width for its columns. A narrower modal
321
+ // gives one column and about three screens of vertical scroll.
322
+ size: 'lg', id: 'c4-create-console-api-client-modal', children: _jsx(Stack, { gap: 6, children: _jsx(Form, { noValidate: true, children: _jsxs(Stack, { gap: 6, children: [_jsx(TextInput, { id: 'c4-console-api-client-name', labelText: safeTranslate(t, 'apiclients:create.fields.name.label', 'Name'), maxLength: 50, value: name, helperText: safeTranslate(t, 'apiclients:create.fields.name.helperText', ''), onChange: (e) => setName(e.currentTarget.value), invalid: Boolean(error), invalidText: error, disabled: saving }), _jsxs(Stack, { gap: 2, children: [_jsx("h3", { children: safeTranslate(t, 'apiclients:create.fields.scopes.label', 'Scopes') }), _jsx("p", { children: renderInlineLink0(safeTranslate(t, 'apiclients:create.fields.scopes.helperText', 'Select scopes for this client.'), (label) => scopesDocsHref ? (_jsx(Link, { size: 'sm', href: scopesDocsHref, children: label })) : (_jsx("span", { children: label }))) })] }), _jsx(C4ApiClientScopePicker, { groups: scopes, selectedScopes: permissions, onChange: setPermissions, disabled: saving, idPrefix: 'c4-console-api' })] }) }) }) }), responseOpen && response ? (_jsx(C4ClusterClientCredentialsModal, { isOpen: responseOpen, heading: safeTranslate(t, 'apiclients:create.heading.response', 'API client credentials'), onRequestClose: () => setResponseOpen(false), notificationText: safeTranslate(t, 'apiclients:completed.notificationText', 'Save these credentials now.'), description: _jsx("span", { children: renderInlineLink0(safeTranslate(t, 'apiclients:completed.description', 'You can use these credentials to access the Console API.'), (label) => (_jsx("span", { children: label }))) }), variants: [
340
323
  {
341
324
  key: 'envvars',
342
325
  tabTitle: safeTranslate(t, 'apiclients:completed.tabs.envvars.title', 'Env Vars'),
@@ -33,6 +33,7 @@
33
33
  },
34
34
  "modeler": {
35
35
  "label": "Web Modeler API",
36
+ "labelHub": "Hub API",
36
37
  "create": "Create",
37
38
  "delete": "Delete",
38
39
  "get": "Get",
@@ -74,6 +75,8 @@
74
75
  "delete": "Delete",
75
76
  "get": "Get",
76
77
  "update": "Update",
78
+ "restore": "Restore",
79
+ "getRestore": "Get restore status",
77
80
  "getSchedule": "Get schedule",
78
81
  "updateSchedule": "Create + update schedule",
79
82
  "deleteSchedule": "Delete schedule"
@@ -127,6 +130,7 @@
127
130
  "clusterScopes": "Cluster Scopes",
128
131
  "zeebeScopes": "Zeebe Scopes",
129
132
  "modelerScopes": "Modeler Scopes",
133
+ "modelerScopesHub": "Hub Scopes",
130
134
  "byomClientScopes": "External Monitoring Scopes",
131
135
  "ipWhiteListScopes": "IP AllowList Scopes",
132
136
  "secretScopes": "Connector Secrets Scopes",
@@ -408,6 +408,7 @@
408
408
  "byomClientScopes": "External Monitoring Scopes",
409
409
  "ipWhiteListScopes": "IP Allowlist Scopes",
410
410
  "modelerScopes": "Modeler Scopes",
411
+ "modelerScopesHub": "Hub Scopes",
411
412
  "memberScopes": "Member Scopes",
412
413
  "secretsScopes": "Connector Secrets Scopes",
413
414
  "hotBackupScopes": "Backups Scopes",
@@ -7,6 +7,8 @@ export { C4AiUsage } from './components/c4-ai-usage/c4-ai-usage.js';
7
7
  export type { C4AiUsageProps } from './components/c4-ai-usage/c4-ai-usage.types.js';
8
8
  export { C4AlphaClusterAtCheckout } from './components/c4-alpha-cluster-at-checkout/c4-alpha-cluster-at-checkout.js';
9
9
  export type { C4AlphaClusterAtCheckoutProps } from './components/c4-alpha-cluster-at-checkout/c4-alpha-cluster-at-checkout.types.js';
10
+ export { C4ApiClientScopePicker } from './components/c4-api-client-scope-picker/c4-api-client-scope-picker.js';
11
+ export type { C4ApiClientScope, C4ApiClientScopeGroup, C4ApiClientScopePickerProps, } from './components/c4-api-client-scope-picker/c4-api-client-scope-picker.types.js';
10
12
  export { C4AppTeaserCard } from './components/c4-app-teaser-card/c4-app-teaster-card.js';
11
13
  export type { C4AppTeaserCardProps } from './components/c4-app-teaser-card/c4-app-teaster-card.types.js';
12
14
  export { C4AppTeaserCards } from './components/c4-app-teaser-cards/c4-app-teaser-cards.js';
@@ -198,7 +200,7 @@ export { openC4CreateConsoleApiClientModal, setC4CreateConsoleApiClientModalHand
198
200
  export { openC4InviteUserToOrganizationModal, setC4InviteUserToOrganizationModalHandle, } from './modals/c4-invite-user-to-organization-modal-handle.js';
199
201
  export { openC4RenameOrganizationModal, setC4RenameOrganizationModalHandle, } from './modals/c4-rename-organization-modal-handle.js';
200
202
  export type { AccountsPermissions, AddC4ConsoleNotificationOptions, C4BreadcrumbCrumb, C4BreadcrumbDropdownItem, C4ClusterNavAppEntry, C4ClusterNavEntry, C4ConsoleAuthzFeatures, C4ConsoleAuthzState, C4ConsoleDataState, C4ConsoleEventsProviderProps, C4ConsoleNotification, C4ConsoleNotificationAction, C4ConsoleNotificationKind, C4ConsoleNotificationsState, C4ConsoleRuntimeConfig, C4ConsoleVisibilities, C4ResolvedTheme, C4ThemePreference, C4UserNotificationsProviderProps, C4UserNotificationsState, C4UserThemeState, CacheState, CamundaWebApp, ConsoleAuth, ConsoleBackendUrls, ConsoleClickwrapConfig, ConsoleClusterDto, ConsolePermissions, ConsolePublicUrls, ConsoleStage, ConsoleTelemetry, ConsoleUser, ExternalClusterDto, ExternalOrganizationDto, NotificationDto, OrganizationPermissions, OrganizationRole, OrgCache, SseEntity, UpgradableGenerationsDto, UseC4ClusterNavEntriesOptions, UseC4WebappBreadcrumbDataOptions, } from './runtime/index.js';
201
- export { addC4ConsoleNotification, buildClusterSsoCallbackUrl, buildClusterSwaggerUrl, buildModelerOrgUrl, C4ConsoleDataProvider, C4ConsoleEventsProvider, C4ConsoleNotificationsProvider, C4ConsoleRuntimeProvider, C4UserNotificationsProvider, DEFAULT_NAV_APPS, getClusterStage, getEndpointForApp, getReadableAppName, hasReadPermissionForApp, isAdminApp, isAppHealthyOnCluster, removeC4ConsoleNotificationById, resolveAdminAppName, setC4ConsoleNotificationsHandle, useC4ClusterNavEntries, useC4ConsoleAuthz, useC4ConsoleData, useC4ConsoleEventsState, useC4ConsoleNotifications, useC4ConsoleRuntime, useC4DesignSystem, useC4UserNotifications, useC4UserTheme, useC4WebappBreadcrumbData, } from './runtime/index.js';
203
+ export { addC4ConsoleNotification, buildClusterSsoCallbackUrl, buildClusterSwaggerUrl, buildModelerOrgUrl, C4ConsoleDataProvider, C4ConsoleEventsProvider, C4ConsoleNotificationsProvider, C4ConsoleRuntimeProvider, C4UserNotificationsProvider, DEFAULT_NAV_APPS, getClusterStage, getEndpointForApp, getReadableAppName, hasReadPermissionForApp, isAdminApp, isAppHealthyOnCluster, removeC4ConsoleNotificationById, resolveAdminAppName, setC4ConsoleNotificationsHandle, useC4ClusterNavEntries, useC4ConsoleAuthz, useC4ConsoleData, useC4ConsoleEventsState, useC4ConsoleNotifications, useC4ConsoleRuntime, useC4DesignSystem, useC4FeatureFlag, useC4UserNotifications, useC4UserTheme, useC4WebappBreadcrumbData, } from './runtime/index.js';
202
204
  export type { TranslateFn } from './utils/safe-translate.js';
203
205
  export { ENVIRONMENT_KEY_SUFFIX, safeTranslate, scopedTranslate, } from './utils/safe-translate.js';
204
206
  export type { C4WidgetScope } from './widgets/c4-widget-scope.types.js';
package/lib/esm/index.js CHANGED
@@ -8,6 +8,7 @@ export { C4ActionableNotification } from './components/c4-actionable-notificatio
8
8
  export { C4ActivityGraph } from './components/c4-activity-graph/c4-activity-graph.js';
9
9
  export { C4AiUsage } from './components/c4-ai-usage/c4-ai-usage.js';
10
10
  export { C4AlphaClusterAtCheckout } from './components/c4-alpha-cluster-at-checkout/c4-alpha-cluster-at-checkout.js';
11
+ export { C4ApiClientScopePicker } from './components/c4-api-client-scope-picker/c4-api-client-scope-picker.js';
11
12
  export { C4AppTeaserCard } from './components/c4-app-teaser-card/c4-app-teaster-card.js';
12
13
  export { C4AppTeaserCards } from './components/c4-app-teaser-cards/c4-app-teaser-cards.js';
13
14
  export { C4AsyncModal } from './components/c4-async-modal/c4-async-modal.js';
@@ -112,7 +113,7 @@ export { openC4RenameOrganizationModal, setC4RenameOrganizationModalHandle, } fr
112
113
  // re-listed per module, so the package root and the
113
114
  // `@camunda/ccma-saas-frontend/runtime` subpath expose one identical surface.
114
115
  // Add runtime exports in `src/runtime/index.ts` and mirror them here.
115
- export { addC4ConsoleNotification, buildClusterSsoCallbackUrl, buildClusterSwaggerUrl, buildModelerOrgUrl, C4ConsoleDataProvider, C4ConsoleEventsProvider, C4ConsoleNotificationsProvider, C4ConsoleRuntimeProvider, C4UserNotificationsProvider, DEFAULT_NAV_APPS, getClusterStage, getEndpointForApp, getReadableAppName, hasReadPermissionForApp, isAdminApp, isAppHealthyOnCluster, removeC4ConsoleNotificationById, resolveAdminAppName, setC4ConsoleNotificationsHandle, useC4ClusterNavEntries, useC4ConsoleAuthz, useC4ConsoleData, useC4ConsoleEventsState, useC4ConsoleNotifications, useC4ConsoleRuntime, useC4DesignSystem, useC4UserNotifications, useC4UserTheme, useC4WebappBreadcrumbData, } from './runtime/index.js';
116
+ export { addC4ConsoleNotification, buildClusterSsoCallbackUrl, buildClusterSwaggerUrl, buildModelerOrgUrl, C4ConsoleDataProvider, C4ConsoleEventsProvider, C4ConsoleNotificationsProvider, C4ConsoleRuntimeProvider, C4UserNotificationsProvider, DEFAULT_NAV_APPS, getClusterStage, getEndpointForApp, getReadableAppName, hasReadPermissionForApp, isAdminApp, isAppHealthyOnCluster, removeC4ConsoleNotificationById, resolveAdminAppName, setC4ConsoleNotificationsHandle, useC4ClusterNavEntries, useC4ConsoleAuthz, useC4ConsoleData, useC4ConsoleEventsState, useC4ConsoleNotifications, useC4ConsoleRuntime, useC4DesignSystem, useC4FeatureFlag, useC4UserNotifications, useC4UserTheme, useC4WebappBreadcrumbData, } from './runtime/index.js';
116
117
  export { ENVIRONMENT_KEY_SUFFIX, safeTranslate, scopedTranslate, } from './utils/safe-translate.js';
117
118
  export { C4ClusterClientDetailsApp } from './widgets/cluster-client-details/c4-cluster-client-details-app.js';
118
119
  export { C4ClusterDetailsApp } from './widgets/cluster-details/c4-cluster-details-app.js';
@@ -13,3 +13,13 @@ export declare const useC4ConsoleRuntime: () => C4ConsoleRuntimeConfig;
13
13
  * the Design System by setting `designSystem: 'ds'` on the runtime config.
14
14
  */
15
15
  export declare const useC4DesignSystem: () => C4DesignSystem;
16
+ /**
17
+ * Whether a feature flag is on for the host. Non-throwing and
18
+ * provider-optional, like `useC4DesignSystem`: with no runtime provider (a
19
+ * test, a Storybook story) every flag reads as off. Off is also what a
20
+ * stage-gated flag gives on prod, so the default shows the public behavior.
21
+ *
22
+ * The key is the dot path of the flag in `@camunda-cloud/featureflags`, for
23
+ * example `console.optionalTelemetry`.
24
+ */
25
+ export declare const useC4FeatureFlag: (flagKey: string) => boolean;
@@ -60,3 +60,15 @@ export const useC4ConsoleRuntime = () => {
60
60
  export const useC4DesignSystem = () => {
61
61
  return useContext(RuntimeContext)?.designSystem ?? 'carbon';
62
62
  };
63
+ /**
64
+ * Whether a feature flag is on for the host. Non-throwing and
65
+ * provider-optional, like `useC4DesignSystem`: with no runtime provider (a
66
+ * test, a Storybook story) every flag reads as off. Off is also what a
67
+ * stage-gated flag gives on prod, so the default shows the public behavior.
68
+ *
69
+ * The key is the dot path of the flag in `@camunda-cloud/featureflags`, for
70
+ * example `console.optionalTelemetry`.
71
+ */
72
+ export const useC4FeatureFlag = (flagKey) => {
73
+ return useContext(RuntimeContext)?.featureFlags?.isEnabled?.(flagKey) ?? false;
74
+ };
@@ -32,7 +32,7 @@ export { C4ConsoleEventsProvider, useC4ConsoleEventsState, } from './c4-console-
32
32
  export { C4ConsoleNotificationsProvider, useC4ConsoleNotifications, } from './c4-console-notifications-context.js';
33
33
  export type { AddC4ConsoleNotificationOptions, C4ConsoleNotification, C4ConsoleNotificationAction, C4ConsoleNotificationKind, C4ConsoleNotificationsState, } from './c4-console-notifications-context.types.js';
34
34
  export type { C4ConsoleRuntimeConfig, ConsoleAuth, ConsoleBackendUrls, ConsoleClickwrapConfig, ConsolePublicUrls, ConsoleStage, ConsoleTelemetry, ConsoleUser, } from './c4-console-runtime.types.js';
35
- export { C4ConsoleRuntimeProvider, useC4ConsoleRuntime, useC4DesignSystem, } from './c4-console-runtime-context.js';
35
+ export { C4ConsoleRuntimeProvider, useC4ConsoleRuntime, useC4DesignSystem, useC4FeatureFlag, } from './c4-console-runtime-context.js';
36
36
  export { C4UserNotificationsProvider, useC4UserNotifications, } from './c4-user-notifications-context.js';
37
37
  export type { C4UserNotificationsProviderProps, C4UserNotificationsState, } from './c4-user-notifications-context.types.js';
38
38
  export type { C4ResolvedTheme, C4ThemePreference, C4UserThemeState, } from './c4-user-theme.js';
@@ -13,7 +13,7 @@ export { useC4ConsoleAuthz } from './c4-console-authz.js';
13
13
  export { C4ConsoleDataProvider, useC4ConsoleData, } from './c4-console-data-context.js';
14
14
  export { C4ConsoleEventsProvider, useC4ConsoleEventsState, } from './c4-console-events-context.js';
15
15
  export { C4ConsoleNotificationsProvider, useC4ConsoleNotifications, } from './c4-console-notifications-context.js';
16
- export { C4ConsoleRuntimeProvider, useC4ConsoleRuntime, useC4DesignSystem, } from './c4-console-runtime-context.js';
16
+ export { C4ConsoleRuntimeProvider, useC4ConsoleRuntime, useC4DesignSystem, useC4FeatureFlag, } from './c4-console-runtime-context.js';
17
17
  export { C4UserNotificationsProvider, useC4UserNotifications, } from './c4-user-notifications-context.js';
18
18
  export { useC4UserTheme } from './c4-user-theme.js';
19
19
  export { buildModelerOrgUrl, DEFAULT_NAV_APPS, getClusterStage, getEndpointForApp, getReadableAppName, hasReadPermissionForApp, isAdminApp, isAppHealthyOnCluster, resolveAdminAppName, } from './nav/camunda-apps.js';
@@ -0,0 +1,17 @@
1
+ export declare const HUB_API_NAMING_FLAG = "console.hubApiNaming";
2
+ /**
3
+ * Whether the Administration API surfaces use the Hub wording.
4
+ *
5
+ * The Hub rollout renames the Modeler scopes: the scope group in the
6
+ * create-client modal reads "Hub API" and the scope columns read "Hub Scopes".
7
+ * The flag `console.hubApiNaming` is on for local, dev and int, so a prod user
8
+ * keeps the "Web Modeler API" and "Modeler Scopes" wording until Hub is
9
+ * public. Only the text changes. The scope values that go to the API
10
+ * (`GetModel`, `CreateModel`, ...) are the same on every stage.
11
+ *
12
+ * Each renamed i18n key has a `Hub` sibling, for example
13
+ * `apiclients:create.fields.scopes.modeler.label` and `…modeler.labelHub`.
14
+ * When the flag widens to `true`, delete this hook, the Modeler variant of
15
+ * each key, and the `hubNaming` branch at every call site.
16
+ */
17
+ export declare const useHubApiNaming: () => boolean;
@@ -0,0 +1,23 @@
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
+ import { useC4FeatureFlag } from './c4-console-runtime-context.js';
7
+ export const HUB_API_NAMING_FLAG = 'console.hubApiNaming';
8
+ /**
9
+ * Whether the Administration API surfaces use the Hub wording.
10
+ *
11
+ * The Hub rollout renames the Modeler scopes: the scope group in the
12
+ * create-client modal reads "Hub API" and the scope columns read "Hub Scopes".
13
+ * The flag `console.hubApiNaming` is on for local, dev and int, so a prod user
14
+ * keeps the "Web Modeler API" and "Modeler Scopes" wording until Hub is
15
+ * public. Only the text changes. The scope values that go to the API
16
+ * (`GetModel`, `CreateModel`, ...) are the same on every stage.
17
+ *
18
+ * Each renamed i18n key has a `Hub` sibling, for example
19
+ * `apiclients:create.fields.scopes.modeler.label` and `…modeler.labelHub`.
20
+ * When the flag widens to `true`, delete this hook, the Modeler variant of
21
+ * each key, and the `hubNaming` branch at every call site.
22
+ */
23
+ export const useHubApiNaming = () => useC4FeatureFlag(HUB_API_NAMING_FLAG);
@@ -0,0 +1,24 @@
1
+ import type { PasswordInputProps } from '@carbon/react';
2
+ import { type JSX } from 'react';
3
+ /**
4
+ * Carbon `PasswordInput` API → DS `Input` plus a visibility toggle.
5
+ *
6
+ * The ds branch of the `../ui` `PasswordInput` switch. Unlike most leaves, this
7
+ * one cannot go through `carbon-compat`: that `PasswordInput` export is a SHIM
8
+ * (`export { PasswordInput } from '@carbon/react'`, with a `MIGRATION TODO`), so
9
+ * `switchable(CarbonPasswordInput, DsPasswordInput)` renders Carbon in both
10
+ * modes. A password field next to a ds `TextInput` then keeps the Carbon label
11
+ * and the Carbon box, which is the mismatch this component removes.
12
+ *
13
+ * The markup copies the `carbon-compat` `TextInput` adapter (label, `Input`,
14
+ * then an error or helper `<span>`) so the two fields line up in a form. The
15
+ * toggle button copies the clear button of the DS `SearchInput`: a `relative`
16
+ * wrapper, an absolutely positioned button, and `pr-8` on the input to keep the
17
+ * text clear of it.
18
+ *
19
+ * Every utility class here is already in the prebuilt `dist/styles.css` of the
20
+ * DS package, because `TextInput` and `SearchInput` use it. This package runs no
21
+ * Tailwind pass of its own, so a class that those components do not use has no
22
+ * rule at all (see the note in `./c4-modal-dialog`).
23
+ */
24
+ export declare function C4PasswordInput({ className, defaultValue, disabled, helperText, hideLabel, hidePasswordLabel, id, invalid, invalidText, labelText, onChange, onClick, onTogglePasswordVisibility, placeholder, readOnly, showPasswordLabel, type, value, 'aria-describedby': ariaDescribedBy, 'aria-errormessage': ariaErrorMessage, ...rest }: PasswordInputProps): JSX.Element;
@@ -0,0 +1,95 @@
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 { cn, Input } from '@camunda/design-system';
8
+ import { Eye, EyeOff } from 'lucide-react';
9
+ import { useId, useState } from 'react';
10
+ /**
11
+ * Carbon `PasswordInput` props that the ds branch cannot honor.
12
+ *
13
+ * These leave through `omitCarbonOnly` below, not through the destructure in the
14
+ * component. `apps/accounts-frontend` compiles `@carbon/react` against its own
15
+ * `src/carbon.d.ts`, which does not declare every one of these props (#9748).
16
+ * A destructure names a prop, so a missing one is a build error in that app,
17
+ * which is what broke `@camunda-cloud/accounts-frontend#typecheck`. A key list
18
+ * only reads the object, so it holds for both declarations.
19
+ */
20
+ const CARBON_ONLY_PROPS = [
21
+ 'enableCounter',
22
+ 'inline',
23
+ 'light',
24
+ 'maxCount',
25
+ 'size',
26
+ 'tooltipAlignment',
27
+ 'tooltipPosition',
28
+ 'warn',
29
+ 'warnText',
30
+ ];
31
+ /**
32
+ * Removes the props that only Carbon reads.
33
+ *
34
+ * The DS `Input` spreads what it does not read onto the `<input>` node, so a
35
+ * Carbon prop that stays becomes an unknown DOM attribute and React warns.
36
+ * `Omit` accepts a key that the type does not have, so the signature holds
37
+ * whichever `@carbon/react` declaration the app compiles against.
38
+ */
39
+ function omitCarbonOnly(props) {
40
+ const next = { ...props };
41
+ for (const key of CARBON_ONLY_PROPS) {
42
+ delete next[key];
43
+ }
44
+ return next;
45
+ }
46
+ /**
47
+ * Carbon `PasswordInput` API → DS `Input` plus a visibility toggle.
48
+ *
49
+ * The ds branch of the `../ui` `PasswordInput` switch. Unlike most leaves, this
50
+ * one cannot go through `carbon-compat`: that `PasswordInput` export is a SHIM
51
+ * (`export { PasswordInput } from '@carbon/react'`, with a `MIGRATION TODO`), so
52
+ * `switchable(CarbonPasswordInput, DsPasswordInput)` renders Carbon in both
53
+ * modes. A password field next to a ds `TextInput` then keeps the Carbon label
54
+ * and the Carbon box, which is the mismatch this component removes.
55
+ *
56
+ * The markup copies the `carbon-compat` `TextInput` adapter (label, `Input`,
57
+ * then an error or helper `<span>`) so the two fields line up in a form. The
58
+ * toggle button copies the clear button of the DS `SearchInput`: a `relative`
59
+ * wrapper, an absolutely positioned button, and `pr-8` on the input to keep the
60
+ * text clear of it.
61
+ *
62
+ * Every utility class here is already in the prebuilt `dist/styles.css` of the
63
+ * DS package, because `TextInput` and `SearchInput` use it. This package runs no
64
+ * Tailwind pass of its own, so a class that those components do not use has no
65
+ * rule at all (see the note in `./c4-modal-dialog`).
66
+ */
67
+ export function C4PasswordInput({ className, defaultValue, disabled, helperText, hideLabel, hidePasswordLabel = 'Hide password', id, invalid, invalidText, labelText, onChange, onClick, onTogglePasswordVisibility, placeholder, readOnly, showPasswordLabel = 'Show password', type = 'password', value, 'aria-describedby': ariaDescribedBy, 'aria-errormessage': ariaErrorMessage, ...rest }) {
68
+ // Carbon seeds its own state from `type` and then owns the value, so a later
69
+ // change of the prop does not move the field back. Mirror that.
70
+ const [inputType, setInputType] = useState(type);
71
+ const generatedId = useId();
72
+ const resolvedId = id ?? generatedId;
73
+ const passwordIsVisible = inputType === 'text';
74
+ // The DS TextInput adapter drops the helper text while the field is invalid,
75
+ // and wires both messages for a screen reader through `aria-describedby`.
76
+ const showInvalidText = invalid && invalidText !== undefined;
77
+ const showHelperText = !invalid && helperText !== undefined;
78
+ const errorId = showInvalidText ? `${resolvedId}-error-msg` : undefined;
79
+ const helperId = showHelperText ? `${resolvedId}-helper-text` : undefined;
80
+ // A consumer-supplied `aria-errormessage` wins outright: the axe rule for that
81
+ // attribute rejects more than one id, unlike `aria-describedby`.
82
+ const errorMessageId = ariaErrorMessage ?? errorId;
83
+ const describedBy = [errorId, helperId, ariaDescribedBy].filter(Boolean).join(' ') || undefined;
84
+ const ToggleIcon = passwordIsVisible ? EyeOff : Eye;
85
+ // Send `value` or `defaultValue`, never both. React reads an input that has
86
+ // both as controlled, uses `value`, and warns. The result is the same, so pass
87
+ // only the prop that decides it and keep the console clean. Carbon lets both
88
+ // through to the `<input>`, and so does the DS TextInput adapter, but no call
89
+ // site sets both, so this stays consistent with them for every real input.
90
+ const valueProps = value !== undefined ? { value } : { defaultValue };
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
+ setInputType(passwordIsVisible ? 'password' : 'text');
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] }));
95
+ }
@@ -20,6 +20,7 @@ export declare const ModalBody: ComponentType<import("@carbon/react").ModalBodyP
20
20
  export declare const ModalFooter: ComponentType<import("@carbon/react").ModalFooterProps & import("react").RefAttributes<HTMLElement>>;
21
21
  export declare const MultiSelect: typeof CarbonMultiSelect;
22
22
  export declare const FilterableMultiSelect: typeof CarbonFilterableMultiSelect;
23
+ export declare const PasswordInput: ComponentType<import("@carbon/react").PasswordInputProps & import("react").RefAttributes<unknown>>;
23
24
  export declare const ProgressBar: ComponentType<import("@carbon/react").ProgressBarProps>;
24
25
  export declare const Search: ComponentType<import("@carbon/react").SearchProps & import("react").RefAttributes<HTMLInputElement>>;
25
26
  export declare const SkeletonText: ComponentType<import("@carbon/react").SkeletonTextProps>;
@@ -24,19 +24,25 @@
24
24
  * breaks state injection (checked/selected). Migrate such families as a whole
25
25
  * composite, not symbol-by-symbol.
26
26
  *
27
- * Also excluded: SHIM symbols (render identically in both modes) and prop-gap
28
- * symbols (Tooltip `autoAlign`, ref-forwarding TextInput/TextArea/Stack,
29
- * OverflowMenuItem `id`, FilterableMultiSelect item typing).
27
+ * Also excluded: prop-gap symbols (Tooltip `autoAlign`, ref-forwarding
28
+ * TextInput/TextArea/Stack, OverflowMenuItem `id`, FilterableMultiSelect item
29
+ * typing).
30
+ *
31
+ * A SHIM symbol (carbon-compat re-exports Carbon, so both modes render the
32
+ * same) belongs here only with a c4 transformation as its ds branch, the way
33
+ * `PasswordInput` uses `./c4-password-input`. A bare `switchable(...)` over a
34
+ * SHIM is a no-op that hides the component from the migration.
30
35
  *
31
36
  * To add a leaf: import the Carbon + carbon-compat versions and wrap with
32
37
  * `switchable(...)`, then point the consuming component's import at this module.
33
38
  */
34
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';
35
- 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, 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';
40
+ 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';
36
41
  import { createElement, Fragment, } from 'react';
37
42
  import { useC4DesignSystem } from '../runtime/c4-console-runtime-context.js';
38
43
  import { C4DefinitionTooltip } from './c4-definition-tooltip.js';
39
44
  import { C4ModalDialog } from './c4-modal-dialog.js';
45
+ import { C4PasswordInput } from './c4-password-input.js';
40
46
  import { switchable } from './switchable.js';
41
47
  export const Button = switchable(CarbonButton, DsButton);
42
48
  export const Checkbox = switchable(CarbonCheckbox, DsCheckbox);
@@ -69,6 +75,9 @@ export const ModalFooter = switchable(CarbonModalFooter, DsModalFooter);
69
75
  // item-type inference (carbon-compat REMAPs both onto the DS MultiSelect).
70
76
  export const MultiSelect = switchable(CarbonMultiSelect, DsMultiSelect);
71
77
  export const FilterableMultiSelect = switchable(CarbonFilterableMultiSelect, DsFilterableMultiSelect);
78
+ // carbon-compat's PasswordInput is a SHIM (it re-exports Carbon), so the ds
79
+ // branch is a c4 transformation over the DS `Input` (see ./c4-password-input).
80
+ export const PasswordInput = switchable(CarbonPasswordInput, C4PasswordInput);
72
81
  export const ProgressBar = switchable(CarbonProgressBar, DsProgressBar);
73
82
  export const Search = switchable(CarbonSearch, DsSearch);
74
83
  export const SkeletonText = switchable(CarbonSkeletonText, DsSkeletonText);
@@ -4,14 +4,13 @@ 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 { PasswordInput } from '@carbon/react';
8
7
  import { Fragment, useCallback, useRef, useState } from 'react';
9
8
  import { C4ActionableNotification } from '../../../components/c4-actionable-notification/c4-actionable-notification.js';
10
9
  import { C4ClusterDetailsAlerts } from '../../../components/c4-cluster-details-alerts/c4-cluster-details-alerts.js';
11
10
  import { C4CreateAlertModal } from '../../../components/c4-create-alert-modal/c4-create-alert-modal.js';
12
11
  import { C4InlineNotification } from '../../../components/c4-inline-notification/c4-inline-notification.js';
13
12
  import { useC4ConsoleRuntime } from '../../../runtime/c4-console-runtime-context.js';
14
- import { Checkbox, Form, Link, Modal, Stack, TextInput } from '../../../ui/index.js';
13
+ import { Checkbox, Form, Link, Modal, PasswordInput, Stack, TextInput, } from '../../../ui/index.js';
15
14
  import { useRadioFamily } from '../../../ui/families.js';
16
15
  // Helper to translate with fallback
17
16
  function safeTranslate(translateFn, key, fallback, options) {
@@ -1,14 +1,14 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
2
  import { ConsoleConnectorSecretsService } from '@camunda/ccma-api';
3
3
  import { SECRETS_MAX_LENGTH, SseEntity } from '@camunda/ccma-shared-types';
4
- import { FileUploader, InlineLoading, PasswordInput } from '@carbon/react';
4
+ import { FileUploader, InlineLoading } from '@carbon/react';
5
5
  import { observer } from 'mobx-react-lite';
6
6
  import { useCallback, useEffect, useRef, useState } from 'react';
7
7
  import { C4ClusterDetailsConnectorSecrets } from '../../../components/c4-cluster-details-connector-secrets/c4-cluster-details-connector-secrets.js';
8
8
  import { C4InlineNotification } from '../../../components/c4-inline-notification/c4-inline-notification.js';
9
9
  import { useC4ConsoleData } from '../../../runtime/c4-console-data-context.js';
10
10
  import { useC4ConsoleRuntime } from '../../../runtime/c4-console-runtime-context.js';
11
- import { CodeSnippet, Form, Link, Modal, Stack, TextArea, TextInput, } from '../../../ui/index.js';
11
+ import { CodeSnippet, Form, Link, Modal, PasswordInput, Stack, TextArea, TextInput, } from '../../../ui/index.js';
12
12
  import { useSelectFamily } from '../../../ui/families.js';
13
13
  import { safeTranslate, scopedTranslate } from '../../../utils/safe-translate.js';
14
14
  function renderInlineStrong(value) {
@@ -19,6 +19,7 @@ import { useC4ConsoleData } from '../../runtime/c4-console-data-context.js';
19
19
  import { useC4ConsoleRuntime, useC4DesignSystem, } from '../../runtime/c4-console-runtime-context.js';
20
20
  import { toApiConfig } from '../../runtime/to-api-config.js';
21
21
  import { toIdentityApiBaseUrl } from '../../runtime/to-identity-api-base-url.js';
22
+ import { useHubApiNaming } from '../../runtime/use-hub-api-naming.js';
22
23
  import { Link, Stack } from '../../ui/index.js';
23
24
  import { clientErrorMessage } from '../../utils/http-error-message.js';
24
25
  import { legacySectionRoles } from '../../utils/role-labels.js';
@@ -565,6 +566,7 @@ function themeNameToClassName(theme) {
565
566
  export const C4ManagementApp = observer(({ orgId, desiredTabId, onTabChange, onNavigate, legacyTabs, userPersonaRole, isLicensingModel2025: isLicensingModel2025Prop, tenantsValueMetricEnabled = false, hdpValueMetricsFor2025Enabled = false, permissionsReworkEnabled = false, urls, onNeedsReload, }) => {
566
567
  const runtime = useC4ConsoleRuntime();
567
568
  const designSystem = useC4DesignSystem();
569
+ const hubNaming = useHubApiNaming();
568
570
  const data = useC4ConsoleData();
569
571
  const apiConfig = useMemo(() => toApiConfig(runtime), [runtime]);
570
572
  const fetchMembers = data.fetchMembers;
@@ -2585,7 +2587,9 @@ export const C4ManagementApp = observer(({ orgId, desiredTabId, onTabChange, onN
2585
2587
  headerByomClientScopes: safeTranslate(t, 'orgmanagement:tabs.api.table.byomClientScopes', 'BYOM client scopes'),
2586
2588
  headerIpWhiteListScopes: safeTranslate(t, 'orgmanagement:tabs.api.table.ipWhiteListScopes', 'IP whitelist scopes'),
2587
2589
  headerSecretsScopes: safeTranslate(t, 'orgmanagement:tabs.api.table.secretsScopes', 'Secrets scopes'),
2588
- headerModelerScopes: safeTranslate(t, 'orgmanagement:tabs.api.table.modelerScopes', 'Modeler scopes'),
2590
+ headerModelerScopes: safeTranslate(t, hubNaming
2591
+ ? 'orgmanagement:tabs.api.table.modelerScopesHub'
2592
+ : 'orgmanagement:tabs.api.table.modelerScopes', hubNaming ? 'Hub Scopes' : 'Modeler Scopes'),
2589
2593
  headerMemberScopes: safeTranslate(t, 'orgmanagement:tabs.api.table.memberScopes', 'Member scopes'),
2590
2594
  headerHotBackupScopes: safeTranslate(t, 'orgmanagement:tabs.api.table.hotBackupScopes', 'Hot backup scopes'),
2591
2595
  headerActivityScopes: safeTranslate(t, 'orgmanagement:tabs.api.table.activityScopes', 'Activity scopes'),
@@ -2601,7 +2605,7 @@ export const C4ManagementApp = observer(({ orgId, desiredTabId, onTabChange, onN
2601
2605
  emptyStateButton: safeTranslate(t, 'orgmanagement:tabs.api.noClients.button', 'Create API client'),
2602
2606
  emptyStateLinkLabel: safeTranslate(t, 'orgmanagement:tabs.api.noClients.link', 'Learn more'),
2603
2607
  };
2604
- }, [apiUrls.docsLink, t]);
2608
+ }, [apiUrls.docsLink, t, hubNaming]);
2605
2609
  const apiTabProps = useMemo(() => {
2606
2610
  return {
2607
2611
  apiClientsItems,
@@ -1,9 +1,11 @@
1
1
  import { jsxs as _jsxs, jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
2
2
  import { useMemo, useState } from 'react';
3
+ import { C4ApiClientScopePicker } from '../../../components/c4-api-client-scope-picker/c4-api-client-scope-picker.js';
3
4
  import { C4ClusterClientCredentialsModal } from '../../../components/c4-cluster-client-credentials/c4-cluster-client-credentials.js';
4
5
  import { C4ManagementApi } from '../../../components/c4-management-api/c4-management-api.js';
5
6
  import { C4StructuredListBody, C4StructuredListCell, C4StructuredListRow, C4StructuredListWrapper, } from '../../../components/c4-structured-list/c4-structured-list.js';
6
- import { Checkbox, Form, FormGroup, Link, Modal, Stack, TextInput, } from '../../../ui/index.js';
7
+ import { useHubApiNaming } from '../../../runtime/use-hub-api-naming.js';
8
+ import { Form, Link, Modal, Stack, TextInput } from '../../../ui/index.js';
7
9
  // Helper functions
8
10
  function isApiClientNameValid(name) {
9
11
  if (!name.trim()) {
@@ -237,6 +239,7 @@ export const C4ManagementApiTab = (props) => {
237
239
  // Details modal state
238
240
  const [apiDetailsModalOpen, setApiDetailsModalOpen] = useState(false);
239
241
  const [apiDetailsTargetUuid, setApiDetailsTargetUuid] = useState(undefined);
242
+ const hubNaming = useHubApiNaming();
240
243
  // Available scopes for create modal
241
244
  const apiClientAvailableScopes = useMemo(() => {
242
245
  const scopes = [
@@ -312,7 +315,9 @@ export const C4ManagementApiTab = (props) => {
312
315
  ],
313
316
  },
314
317
  {
315
- label: safeTranslate(t, 'apiclients:create.fields.scopes.modeler.label', 'Modeler'),
318
+ label: safeTranslate(t, hubNaming
319
+ ? 'apiclients:create.fields.scopes.modeler.labelHub'
320
+ : 'apiclients:create.fields.scopes.modeler.label', hubNaming ? 'Hub API' : 'Web Modeler API'),
316
321
  scopes: [
317
322
  {
318
323
  label: safeTranslate(t, 'apiclients:create.fields.scopes.modeler.get', 'Get'),
@@ -423,7 +428,7 @@ export const C4ManagementApiTab = (props) => {
423
428
  },
424
429
  ];
425
430
  return scopes;
426
- }, [t]);
431
+ }, [t, hubNaming]);
427
432
  const docsUrl = apiUrls.docsLink;
428
433
  const openDocs = () => {
429
434
  if (!docsUrl) {
@@ -480,35 +485,13 @@ export const C4ManagementApiTab = (props) => {
480
485
  setApiCreateSaving(false);
481
486
  }
482
487
  })();
483
- }, size: 'sm', id: 'c4-create-api-client-modal', children: _jsx(Stack, { gap: 6, children: _jsx(Form, { children: _jsxs(Stack, { gap: 6, children: [_jsx(TextInput, { id: 'c4-api-client-name-create', labelText: safeTranslate(t, 'apiclients:create.fields.name.label', 'Name'), maxLength: 50, value: apiCreateName, helperText: safeTranslate(t, 'apiclients:create.fields.name.helperText', ''), onChange: (e) => setApiCreateName(e.currentTarget.value), invalid: Boolean(apiCreateError), invalidText: apiCreateError, disabled: apiCreateSaving }), _jsxs(Stack, { gap: 2, children: [_jsx("h3", { children: safeTranslate(t, 'apiclients:create.fields.scopes.label', 'Scopes') }), _jsx("p", { children: renderInlineLink0(safeTranslate(t, 'apiclients:create.fields.scopes.helperText', 'Select scopes for this client.'), (label) => docsUrl ? (_jsx(Link, { size: 'sm', href: docsUrl, onClick: (e) => {
488
+ },
489
+ // The scope picker needs the width for its columns. A narrower modal
490
+ // gives one column and about three screens of vertical scroll.
491
+ size: 'lg', id: 'c4-create-api-client-modal', children: _jsx(Stack, { gap: 6, children: _jsx(Form, { children: _jsxs(Stack, { gap: 6, children: [_jsx(TextInput, { id: 'c4-api-client-name-create', labelText: safeTranslate(t, 'apiclients:create.fields.name.label', 'Name'), maxLength: 50, value: apiCreateName, helperText: safeTranslate(t, 'apiclients:create.fields.name.helperText', ''), onChange: (e) => setApiCreateName(e.currentTarget.value), invalid: Boolean(apiCreateError), invalidText: apiCreateError, disabled: apiCreateSaving }), _jsxs(Stack, { gap: 2, children: [_jsx("h3", { children: safeTranslate(t, 'apiclients:create.fields.scopes.label', 'Scopes') }), _jsx("p", { children: renderInlineLink0(safeTranslate(t, 'apiclients:create.fields.scopes.helperText', 'Select scopes for this client.'), (label) => docsUrl ? (_jsx(Link, { size: 'sm', href: docsUrl, onClick: (e) => {
484
492
  e.preventDefault();
485
493
  openDocs();
486
- }, children: label })) : (_jsx("span", { children: label }))) })] }), _jsx(Stack, { gap: 4, children: apiClientAvailableScopes.map((group, groupIndex) => {
487
- const groupValues = group.scopes.map((s) => s.value);
488
- const selectedCount = groupValues.filter((v) => apiCreatePermissions.includes(v)).length;
489
- const allSelected = selectedCount === groupValues.length;
490
- const indeterminate = selectedCount > 0 && !allSelected;
491
- return (_jsx(FormGroup, { legendText: '', children: _jsxs(Stack, { gap: 2, children: [_jsx(Checkbox, { id: `c4-api-scope-group-${groupIndex}`, labelText: group.label, checked: allSelected, indeterminate: indeterminate, onChange: () => {
492
- setApiCreatePermissions((current) => {
493
- const currentSet = new Set(current);
494
- const isAllSelected = groupValues.every((v) => currentSet.has(v));
495
- if (isAllSelected) {
496
- groupValues.forEach((v) => currentSet.delete(v));
497
- }
498
- else {
499
- groupValues.forEach((v) => currentSet.add(v));
500
- }
501
- return Array.from(currentSet);
502
- });
503
- }, disabled: apiCreateSaving }), _jsx("div", { style: { marginLeft: 'var(--cds-spacing-06)' }, children: _jsx(Stack, { gap: 0, style: { rowGap: '0px' }, children: group.scopes.map((scope) => {
504
- const checked = apiCreatePermissions.includes(scope.value);
505
- return (_jsx(Checkbox, { id: `c4-api-scope-${scope.value}`, labelText: scope.label, checked: checked, onChange: () => {
506
- setApiCreatePermissions((current) => checked
507
- ? current.filter((v) => v !== scope.value)
508
- : [...current, scope.value]);
509
- }, disabled: apiCreateSaving }, scope.value));
510
- }) }) })] }) }, `${group.label}-${groupIndex}`));
511
- }) })] }) }) }) })), apiCreateResponseOpen && apiCreateResponse ? (_jsx(C4ClusterClientCredentialsModal, { isOpen: apiCreateResponseOpen, heading: safeTranslate(t, 'apiclients:create.heading.response', 'API client credentials'), onRequestClose: () => setApiCreateResponseOpen(false), notificationText: safeTranslate(t, 'apiclients:completed.notificationText', 'Save these credentials now.'), description: _jsx("span", { children: renderInlineLink0(safeTranslate(t, 'apiclients:completed.description', 'You can use these credentials to access the Console API.'), (label) => docsUrl ? (_jsx(Link, { size: 'sm', href: docsUrl, onClick: (e) => {
494
+ }, children: label })) : (_jsx("span", { children: label }))) })] }), _jsx(C4ApiClientScopePicker, { groups: apiClientAvailableScopes, selectedScopes: apiCreatePermissions, onChange: setApiCreatePermissions, disabled: apiCreateSaving, idPrefix: 'c4-api' })] }) }) }) })), apiCreateResponseOpen && apiCreateResponse ? (_jsx(C4ClusterClientCredentialsModal, { isOpen: apiCreateResponseOpen, heading: safeTranslate(t, 'apiclients:create.heading.response', 'API client credentials'), onRequestClose: () => setApiCreateResponseOpen(false), notificationText: safeTranslate(t, 'apiclients:completed.notificationText', 'Save these credentials now.'), description: _jsx("span", { children: renderInlineLink0(safeTranslate(t, 'apiclients:completed.description', 'You can use these credentials to access the Console API.'), (label) => docsUrl ? (_jsx(Link, { size: 'sm', href: docsUrl, onClick: (e) => {
512
495
  e.preventDefault();
513
496
  openDocs();
514
497
  }, children: label })) : (_jsx("span", { children: label }))) }), variants: (() => {
@@ -623,7 +606,9 @@ export const C4ManagementApiTab = (props) => {
623
606
  },
624
607
  {
625
608
  id: 'modeler-scopes',
626
- label: safeTranslate(t, 'apiclients:details.fields.modelerScopes', 'Modeler scopes'),
609
+ label: safeTranslate(t, hubNaming
610
+ ? 'apiclients:details.fields.modelerScopesHub'
611
+ : 'apiclients:details.fields.modelerScopes', hubNaming ? 'Hub Scopes' : 'Modeler Scopes'),
627
612
  value: scopes.modelerScopes,
628
613
  },
629
614
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camunda/ccma-saas-frontend",
3
- "version": "0.8.0",
3
+ "version": "0.8.2",
4
4
  "description": "Camunda Composite Components",
5
5
  "bugs": {
6
6
  "url": "https://github.com/camunda/camunda-cloud-management-apps/issues"