@camunda/ccma-saas-frontend 0.8.0 → 0.8.1

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.
@@ -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 {};
@@ -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);
@@ -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.1",
4
4
  "description": "Camunda Composite Components",
5
5
  "bugs": {
6
6
  "url": "https://github.com/camunda/camunda-cloud-management-apps/issues"