@camunda/ccma-saas-frontend 0.10.0 → 0.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/esm/components/c4-cluster-list/c4-cluster-list.d.ts +1 -1
- package/lib/esm/components/c4-cluster-list/c4-cluster-list.js +40 -9
- package/lib/esm/components/c4-cluster-list/c4-cluster-list.types.d.ts +17 -0
- package/lib/esm/components/c4-cluster-settings/elements/danger-zone.js +9 -1
- package/lib/esm/components/c4-cluster-tag-selector/c4-cluster-tag-selector.js +5 -5
- package/lib/esm/components/c4-clusters-empty-state/c4-clusters-empty-state.js +3 -3
- package/lib/esm/components/c4-convert-trial-organization-modal/c4-convert-trial-organization-modal.js +1 -11
- package/lib/esm/components/c4-create-alert-modal/c4-create-alert-modal.js +1 -14
- package/lib/esm/components/c4-create-cluster/c4-create-cluster.d.ts +1 -1
- package/lib/esm/components/c4-create-cluster/c4-create-cluster.js +188 -71
- package/lib/esm/components/c4-create-cluster/c4-create-cluster.types.d.ts +52 -0
- package/lib/esm/components/c4-create-cluster-api-client-modal/c4-create-cluster-api-client-modal.js +1 -11
- package/lib/esm/components/c4-create-connector-secret-modal/c4-create-connector-secret-modal.js +6 -13
- package/lib/esm/components/c4-create-console-api-client-modal/c4-create-console-api-client-modal.js +1 -11
- package/lib/esm/components/c4-create-ip-whitelist-modal/c4-create-ip-whitelist-modal.js +1 -18
- package/lib/esm/components/c4-create-trial-organization-modal/c4-create-trial-organization-modal.js +1 -11
- package/lib/esm/components/c4-delete-account-modal/c4-delete-account-modal.d.ts +0 -7
- package/lib/esm/components/c4-delete-account-modal/c4-delete-account-modal.js +1 -24
- package/lib/esm/components/c4-delete-organization-modal/c4-delete-organization-modal.js +1 -18
- package/lib/esm/components/c4-divider/c4-divider.js +12 -0
- package/lib/esm/components/c4-empty-state/c4-empty-state.d.ts +8 -0
- package/lib/esm/components/c4-empty-state/c4-empty-state.js +32 -8
- package/lib/esm/components/c4-file-uploader/c4-file-uploader.d.ts +36 -0
- package/lib/esm/components/c4-file-uploader/c4-file-uploader.js +43 -0
- package/lib/esm/components/c4-invite-user-to-organization-modal/c4-invite-user-to-organization-modal.js +1 -11
- package/lib/esm/components/c4-leave-organization-modal/c4-leave-organization-modal.js +1 -11
- package/lib/esm/components/c4-rename-organization-modal/c4-rename-organization-modal.js +1 -11
- package/lib/esm/components/c4-segmented-control/c4-segmented-control.d.ts +46 -0
- package/lib/esm/components/c4-segmented-control/c4-segmented-control.js +117 -0
- package/lib/esm/externalUrls.const.d.ts +7 -0
- package/lib/esm/externalUrls.const.js +11 -1
- package/lib/esm/i18n/c4-console-i18n.js +3 -0
- package/lib/esm/i18n/en/modals/apiclients.json +2 -1
- package/lib/esm/i18n/en/modals/clusterclients.json +2 -1
- package/lib/esm/i18n/en/pages/clusterdetails.json +12 -1
- package/lib/esm/i18n/en/pages/clusters.json +1 -0
- package/lib/esm/i18n/en/pages/createcluster.json +43 -0
- package/lib/esm/i18n/en/pages/orgmanagement.json +3 -0
- package/lib/esm/index.d.ts +2 -0
- package/lib/esm/index.js +2 -0
- package/lib/esm/runtime/c4-console-runtime-context.d.ts +7 -0
- package/lib/esm/runtime/c4-console-runtime-context.js +130 -2
- package/lib/esm/runtime/c4-console-runtime.types.d.ts +22 -0
- package/lib/esm/runtime/cluster-creation-blocked.d.ts +16 -0
- package/lib/esm/runtime/cluster-creation-blocked.js +21 -0
- package/lib/esm/runtime/cluster-duplication.d.ts +10 -0
- package/lib/esm/runtime/cluster-duplication.js +15 -0
- package/lib/esm/ui/c4-password-input.js +1 -1
- package/lib/esm/ui/index.d.ts +1 -0
- package/lib/esm/ui/index.js +16 -2
- package/lib/esm/utils/role-labels.d.ts +1 -2
- package/lib/esm/utils/role-labels.js +1 -13
- package/lib/esm/utils/safe-translate.d.ts +4 -2
- package/lib/esm/utils/safe-translate.js +9 -2
- package/lib/esm/widgets/cluster-client-details/c4-cluster-client-details-app.js +2 -12
- package/lib/esm/widgets/cluster-details/c4-cluster-details-app.js +34 -23
- package/lib/esm/widgets/cluster-details/c4-cluster-details-app.types.d.ts +6 -0
- package/lib/esm/widgets/cluster-details/c4-cluster-details-page.js +7 -0
- package/lib/esm/widgets/cluster-details/c4-cluster-details-page.types.d.ts +3 -0
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-activity-tab.js +1 -19
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-alerts-tab.js +1 -14
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-byom-clients-tab.js +1 -18
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-clients-tab.js +1 -1
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-connector-secrets-tab.d.ts +1 -0
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-connector-secrets-tab.js +77 -28
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-hot-backups-tab.js +1 -6
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-ip-whitelist-tab.js +1 -18
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-overview-tab.js +31 -29
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-secure-connectivity-tab.js +1 -6
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-settings-tab.js +1 -16
- package/lib/esm/widgets/clusters/c4-clusters-page.js +99 -103
- package/lib/esm/widgets/clusters/c4-clusters-page.types.d.ts +9 -0
- package/lib/esm/widgets/connector-management/c4-connector-management-page.js +1 -9
- package/lib/esm/widgets/connector-management/c4-connector-management.shared.js +1 -9
- package/lib/esm/widgets/create-cluster/c4-create-cluster-page.d.ts +88 -1
- package/lib/esm/widgets/create-cluster/c4-create-cluster-page.js +285 -45
- package/lib/esm/widgets/create-cluster/c4-create-cluster-page.types.d.ts +9 -0
- package/lib/esm/widgets/dashboard/c4-dashboard-app.js +10 -24
- package/lib/esm/widgets/environment/c4-cluster-connector-secrets-widget.js +1 -1
- package/lib/esm/widgets/group-details/c4-group-details-page.js +1 -9
- package/lib/esm/widgets/job-worker/c4-job-worker.helpers.d.ts +1 -0
- package/lib/esm/widgets/job-worker/c4-job-worker.helpers.js +4 -34
- package/lib/esm/widgets/management/c4-management-app.js +1 -20
- package/lib/esm/widgets/management/c4-management-page.js +1 -9
- package/lib/esm/widgets/management/tabs/c4-management-api-tab.js +1 -13
- package/lib/esm/widgets/management/tabs/c4-management-billing-tab.js +1 -9
- package/lib/esm/widgets/management/tabs/c4-management-overview-tab.js +1 -13
- package/lib/esm/widgets/management/tabs/c4-management-pricing-tab.js +1 -8
- package/lib/esm/widgets/management/tabs/c4-management-settings-tab.js +1 -24
- package/lib/esm/widgets/management/tabs/c4-management-users-tab.js +1 -13
- package/lib/esm/widgets/user-account/c4-delete-account-widget.js +2 -1
- package/lib/esm/widgets/user-details/c4-user-details-page.js +1 -9
- package/package.json +3 -3
|
@@ -53,7 +53,7 @@ const C4ClusterConnectorSecretsWidgetImpl = ({ orgId, clusterId, scope = 'cluste
|
|
|
53
53
|
canRead: Boolean(orgPermissions?.cluster.connectorSecrets.read),
|
|
54
54
|
canUpdate: Boolean(orgPermissions?.cluster.connectorSecrets.update),
|
|
55
55
|
canDelete: Boolean(orgPermissions?.cluster.connectorSecrets.delete),
|
|
56
|
-
}, docsUrl: resolvedUrls.docs.connectorSecrets, scope: scope, t: t, onNavigate: onNavigate, onPanelState: setPanelState })] }));
|
|
56
|
+
}, docsUrl: resolvedUrls.docs.connectorSecrets, clusterSecretsDocsUrl: resolvedUrls.docs.clusterSecrets, scope: scope, t: t, onNavigate: onNavigate, onPanelState: setPanelState })] }));
|
|
57
57
|
};
|
|
58
58
|
// Reads console data during render, so it must be an observer.
|
|
59
59
|
export const C4ClusterConnectorSecretsWidget = observer(C4ClusterConnectorSecretsWidgetImpl);
|
|
@@ -14,18 +14,10 @@ import { useC4ConsoleAuthz } from '../../runtime/c4-console-authz.js';
|
|
|
14
14
|
import { useC4ConsoleData } from '../../runtime/c4-console-data-context.js';
|
|
15
15
|
import { useC4ConsoleRuntime, useC4DesignSystem, } from '../../runtime/c4-console-runtime-context.js';
|
|
16
16
|
import { toIdentityApiBaseUrl } from '../../runtime/to-identity-api-base-url.js';
|
|
17
|
+
import { safeTranslate } from '../../utils/safe-translate.js';
|
|
17
18
|
function isRecord(value) {
|
|
18
19
|
return Boolean(value) && typeof value === 'object';
|
|
19
20
|
}
|
|
20
|
-
function safeTranslate(t, key, fallback) {
|
|
21
|
-
try {
|
|
22
|
-
const translated = t?.(key);
|
|
23
|
-
return translated && translated !== key ? translated : fallback;
|
|
24
|
-
}
|
|
25
|
-
catch {
|
|
26
|
-
return fallback;
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
21
|
function sendNavigate(onNavigate, event) {
|
|
30
22
|
onNavigate?.(event);
|
|
31
23
|
}
|
|
@@ -14,6 +14,7 @@ export type Tr = (key: string, fallback: string) => string;
|
|
|
14
14
|
*/
|
|
15
15
|
export type ScopedTr = (key: string, clusterFallback: string, environmentFallback: string) => string;
|
|
16
16
|
export declare function makeScopedTr(tr: Tr, scope: C4WidgetScope): ScopedTr;
|
|
17
|
+
/** Binds `t` to the `jobDashboard:` namespace of this module. */
|
|
17
18
|
export declare function makeTr(t: TranslateFn | undefined): Tr;
|
|
18
19
|
export declare function safeT(t: TranslateFn | undefined, key: string, fallback: string): string;
|
|
19
20
|
export declare function getRegion(cluster: ConsoleClusterDto): string;
|
|
@@ -3,48 +3,18 @@
|
|
|
3
3
|
* under one or more contributor license agreements. Licensed under a commercial license.
|
|
4
4
|
* You may not use this file except in compliance with the commercial license.
|
|
5
5
|
*/
|
|
6
|
-
import { ENVIRONMENT_KEY_SUFFIX } from '../../utils/safe-translate.js';
|
|
6
|
+
import { ENVIRONMENT_KEY_SUFFIX, safeTranslate, } from '../../utils/safe-translate.js';
|
|
7
7
|
export function makeScopedTr(tr, scope) {
|
|
8
8
|
return (key, clusterFallback, environmentFallback) => scope === 'environment'
|
|
9
9
|
? tr(`${key}${ENVIRONMENT_KEY_SUFFIX}`, environmentFallback)
|
|
10
10
|
: tr(key, clusterFallback);
|
|
11
11
|
}
|
|
12
|
+
/** Binds `t` to the `jobDashboard:` namespace of this module. */
|
|
12
13
|
export function makeTr(t) {
|
|
13
|
-
return (key, fallback) => {
|
|
14
|
-
if (!t)
|
|
15
|
-
return fallback;
|
|
16
|
-
try {
|
|
17
|
-
const full = `jobDashboard:${key}`;
|
|
18
|
-
const result = t(full);
|
|
19
|
-
// Guard against the namespace-stripped form (e.g. t('jobDashboard:a.b') → 'a.b')
|
|
20
|
-
if (!result || result === full || result === key) {
|
|
21
|
-
return fallback;
|
|
22
|
-
}
|
|
23
|
-
return result;
|
|
24
|
-
}
|
|
25
|
-
catch {
|
|
26
|
-
return fallback;
|
|
27
|
-
}
|
|
28
|
-
};
|
|
14
|
+
return (key, fallback) => safeTranslate(t, `jobDashboard:${key}`, fallback);
|
|
29
15
|
}
|
|
30
16
|
export function safeT(t, key, fallback) {
|
|
31
|
-
|
|
32
|
-
return fallback;
|
|
33
|
-
try {
|
|
34
|
-
const result = t(key);
|
|
35
|
-
// Some i18n implementations return the key with the namespace prefix stripped
|
|
36
|
-
// (e.g. t('ns:a.b') → 'a.b') when a key is missing. Treat that as a miss too.
|
|
37
|
-
const keyWithoutNamespace = key.includes(':')
|
|
38
|
-
? key.split(':').slice(1).join(':')
|
|
39
|
-
: key;
|
|
40
|
-
if (!result || result === key || result === keyWithoutNamespace) {
|
|
41
|
-
return fallback;
|
|
42
|
-
}
|
|
43
|
-
return result;
|
|
44
|
-
}
|
|
45
|
-
catch {
|
|
46
|
-
return fallback;
|
|
47
|
-
}
|
|
17
|
+
return safeTranslate(t, key, fallback);
|
|
48
18
|
}
|
|
49
19
|
export function getRegion(cluster) {
|
|
50
20
|
const zeebeRestUrl = cluster.status?.zeebeRestUrl;
|
|
@@ -23,6 +23,7 @@ import { useHubApiNaming } from '../../runtime/use-hub-api-naming.js';
|
|
|
23
23
|
import { Link, Stack } from '../../ui/index.js';
|
|
24
24
|
import { clientErrorMessage } from '../../utils/http-error-message.js';
|
|
25
25
|
import { legacySectionRoles } from '../../utils/role-labels.js';
|
|
26
|
+
import { safeTranslate } from '../../utils/safe-translate.js';
|
|
26
27
|
import { useExtendTrial } from '../use-extend-trial.js';
|
|
27
28
|
import { C4ManagementPage } from './c4-management-page.js';
|
|
28
29
|
import { managementTab } from './management-tabs.js';
|
|
@@ -100,26 +101,6 @@ function getNestedValue(record, path) {
|
|
|
100
101
|
function getNestedBoolean(record, path) {
|
|
101
102
|
return getNestedValue(record, path) === true;
|
|
102
103
|
}
|
|
103
|
-
function safeTranslate(t, key, fallback, options) {
|
|
104
|
-
try {
|
|
105
|
-
const translated = t?.(key, options);
|
|
106
|
-
if (!translated || translated === key) {
|
|
107
|
-
return fallback;
|
|
108
|
-
}
|
|
109
|
-
// i18next can return the key *without* the namespace when the namespace is missing.
|
|
110
|
-
// Example: `orgmanagement:tabs.api.search` -> `tabs.api.search`
|
|
111
|
-
if (key.includes(':')) {
|
|
112
|
-
const withoutNamespace = key.split(':').slice(1).join(':');
|
|
113
|
-
if (translated === withoutNamespace) {
|
|
114
|
-
return fallback;
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
return translated;
|
|
118
|
-
}
|
|
119
|
-
catch {
|
|
120
|
-
return fallback;
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
104
|
// Usage charts render one line series (and one legend entry) per cluster. Orgs
|
|
124
105
|
// with hundreds of clusters overflow the legend and break the layout, so cap the
|
|
125
106
|
// number of distinct series to the top-N clusters by total value and roll the
|
|
@@ -2,15 +2,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { C4PageTemplate } from '../../components/c4-page-template/c4-page-template.js';
|
|
3
3
|
import { useC4ConsoleRuntime } from '../../runtime/c4-console-runtime-context.js';
|
|
4
4
|
import { TabsSkeleton } from '../../ui/index.js';
|
|
5
|
-
|
|
6
|
-
try {
|
|
7
|
-
const translated = t?.(key);
|
|
8
|
-
return translated && translated !== key ? translated : fallback;
|
|
9
|
-
}
|
|
10
|
-
catch {
|
|
11
|
-
return fallback;
|
|
12
|
-
}
|
|
13
|
-
}
|
|
5
|
+
import { safeTranslate } from '../../utils/safe-translate.js';
|
|
14
6
|
export const C4ManagementPage = ({ loading, notFound, tabs, }) => {
|
|
15
7
|
const runtime = useC4ConsoleRuntime();
|
|
16
8
|
const t = runtime.i18n?.t;
|
|
@@ -6,6 +6,7 @@ import { C4ManagementApi } from '../../../components/c4-management-api/c4-manage
|
|
|
6
6
|
import { C4StructuredListBody, C4StructuredListCell, C4StructuredListRow, C4StructuredListWrapper, } from '../../../components/c4-structured-list/c4-structured-list.js';
|
|
7
7
|
import { useHubApiNaming } from '../../../runtime/use-hub-api-naming.js';
|
|
8
8
|
import { Form, Link, Modal, Stack, TextInput } from '../../../ui/index.js';
|
|
9
|
+
import { safeTranslate } from '../../../utils/safe-translate.js';
|
|
9
10
|
// Helper functions
|
|
10
11
|
function isApiClientNameValid(name) {
|
|
11
12
|
if (!name.trim()) {
|
|
@@ -38,19 +39,6 @@ function joinUrl(baseUrl, path) {
|
|
|
38
39
|
function toAudienceFromApiBaseUrl(apiBaseUrl) {
|
|
39
40
|
return apiBaseUrl.replace(/^https?:\/\//, '');
|
|
40
41
|
}
|
|
41
|
-
function safeTranslate(t, key, defaultValue,
|
|
42
|
-
// biome-ignore lint/suspicious/noExplicitAny: legacy compatibility
|
|
43
|
-
opts) {
|
|
44
|
-
if (!t)
|
|
45
|
-
return defaultValue;
|
|
46
|
-
try {
|
|
47
|
-
const translated = t(key, opts);
|
|
48
|
-
return typeof translated === 'string' ? translated : defaultValue;
|
|
49
|
-
}
|
|
50
|
-
catch {
|
|
51
|
-
return defaultValue;
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
42
|
function renderInlineLink0(value, renderLink) {
|
|
55
43
|
const match = value.match(/^(.*)<0>(.*)<\/0>(.*)$/);
|
|
56
44
|
if (!match)
|
|
@@ -9,15 +9,7 @@ import { useState } from 'react';
|
|
|
9
9
|
import { C4BillingPage } from '../../../components/c4-billing-page/c4-billing-page.js';
|
|
10
10
|
import { C4UsageAlertUpdateModal } from '../../../components/c4-usage-alert-update-modal/c4-usage-alert-update-modal.js';
|
|
11
11
|
import { Modal, Stack } from '../../../ui/index.js';
|
|
12
|
-
|
|
13
|
-
try {
|
|
14
|
-
const translated = t?.(key, options);
|
|
15
|
-
return translated && translated !== key ? translated : fallback;
|
|
16
|
-
}
|
|
17
|
-
catch {
|
|
18
|
-
return fallback;
|
|
19
|
-
}
|
|
20
|
-
}
|
|
12
|
+
import { safeTranslate } from '../../../utils/safe-translate.js';
|
|
21
13
|
function formatDate(date) {
|
|
22
14
|
try {
|
|
23
15
|
return Intl.DateTimeFormat('en-GB', {
|
|
@@ -8,19 +8,7 @@ import { Edit } from '@carbon/react/icons/index.esm.js';
|
|
|
8
8
|
import { useMemo, useState } from 'react';
|
|
9
9
|
import { C4ManagementOverview } from '../../../components/c4-management-overview/c4-management-overview.js';
|
|
10
10
|
import { Modal, Stack, TextInput } from '../../../ui/index.js';
|
|
11
|
-
|
|
12
|
-
// biome-ignore lint/suspicious/noExplicitAny: legacy compatibility
|
|
13
|
-
opts) {
|
|
14
|
-
if (!t)
|
|
15
|
-
return defaultValue;
|
|
16
|
-
try {
|
|
17
|
-
const translated = t(key, opts);
|
|
18
|
-
return typeof translated === 'string' ? translated : defaultValue;
|
|
19
|
-
}
|
|
20
|
-
catch {
|
|
21
|
-
return defaultValue;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
11
|
+
import { safeTranslate } from '../../../utils/safe-translate.js';
|
|
24
12
|
export const C4ManagementOverviewTab = ({ orgId, orgName, salesPlan, ownerName, loading, trialExpirationLabel, mayRename, t, onRenameOrg, onExtendTrial, }) => {
|
|
25
13
|
const [renameModalOpen, setRenameModalOpen] = useState(false);
|
|
26
14
|
const [renameValue, setRenameValue] = useState('');
|
|
@@ -8,14 +8,7 @@ import { getDisplayedSalesPlan, } from '@camunda/ccma-shared-types';
|
|
|
8
8
|
import { useMemo } from 'react';
|
|
9
9
|
import { C4Pricing } from '../../../components/c4-pricing/c4-pricing.js';
|
|
10
10
|
import { DefinitionTooltip, Link } from '../../../ui/index.js';
|
|
11
|
-
|
|
12
|
-
try {
|
|
13
|
-
return t ? t(key, options) : fallback;
|
|
14
|
-
}
|
|
15
|
-
catch {
|
|
16
|
-
return fallback;
|
|
17
|
-
}
|
|
18
|
-
}
|
|
11
|
+
import { safeTranslate } from '../../../utils/safe-translate.js';
|
|
19
12
|
function getRecord(record, key) {
|
|
20
13
|
const value = record[key];
|
|
21
14
|
return value && typeof value === 'object' ? value : undefined;
|
|
@@ -8,30 +8,7 @@ import { PSClickWrap } from '@pactsafe/pactsafe-react-sdk';
|
|
|
8
8
|
import { useState } from 'react';
|
|
9
9
|
import { C4ManagementSettings } from '../../../components/c4-management-settings/c4-management-settings.js';
|
|
10
10
|
import { Modal, Stack } from '../../../ui/index.js';
|
|
11
|
-
|
|
12
|
-
// biome-ignore lint/suspicious/noExplicitAny: legacy compatibility
|
|
13
|
-
opts) {
|
|
14
|
-
if (!t)
|
|
15
|
-
return defaultValue;
|
|
16
|
-
try {
|
|
17
|
-
const translated = t(key, opts);
|
|
18
|
-
if (typeof translated !== 'string' || !translated || translated === key) {
|
|
19
|
-
return defaultValue;
|
|
20
|
-
}
|
|
21
|
-
// i18next can return the key *without* the namespace when the namespace is missing.
|
|
22
|
-
// Example: `orgmanagement:clickwrap.title` -> `clickwrap.title`
|
|
23
|
-
if (key.includes(':')) {
|
|
24
|
-
const withoutNamespace = key.split(':').slice(1).join(':');
|
|
25
|
-
if (translated === withoutNamespace) {
|
|
26
|
-
return defaultValue;
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
return translated;
|
|
30
|
-
}
|
|
31
|
-
catch {
|
|
32
|
-
return defaultValue;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
11
|
+
import { safeTranslate } from '../../../utils/safe-translate.js';
|
|
35
12
|
export const C4ManagementSettingsTab = ({ orgId, orgName, hasAcceptedBetaTerms, suppressDropDisks, earlyAccessFeatures, recentlyAcceptedBeta, loading, error, permissions, clickwrapAccessId, clickwrapBetaGroupKey, runtime, t, onLeaveOrganization, onDeleteOrganization, onToggleSuppressDropDisks, onToggleEarlyAccessFeature, onAcceptBetaTerms, onAcceptFeatureTerms, onShareFeedback, onRetry, text, earlyAccessDocsUrl, }) => {
|
|
36
13
|
const [clickwrapOpen, setClickwrapOpen] = useState(false);
|
|
37
14
|
const [clickwrapGroupKey, setClickwrapGroupKey] = useState(undefined);
|
|
@@ -11,19 +11,7 @@ import { C4InviteUserToOrganizationModal } from '../../../components/c4-invite-u
|
|
|
11
11
|
import { C4ManagementUsers } from '../../../components/c4-management-users/c4-management-users.js';
|
|
12
12
|
import { Checkbox, Link, Modal, Stack, TextInput } from '../../../ui/index.js';
|
|
13
13
|
import { isLegacyLabeledRole, isRoleAssignable, legacySectionRoles, moreRolesHeadingText, orderPrimaryRoles, roleLabelDescription, } from '../../../utils/role-labels.js';
|
|
14
|
-
|
|
15
|
-
if (!t)
|
|
16
|
-
return defaultValue;
|
|
17
|
-
try {
|
|
18
|
-
const translated = t(key, opts);
|
|
19
|
-
return typeof translated === 'string' && translated !== key
|
|
20
|
-
? translated
|
|
21
|
-
: defaultValue;
|
|
22
|
-
}
|
|
23
|
-
catch {
|
|
24
|
-
return defaultValue;
|
|
25
|
-
}
|
|
26
|
-
}
|
|
14
|
+
import { safeTranslate } from '../../../utils/safe-translate.js';
|
|
27
15
|
export const C4ManagementUsersTab = ({ orgId, members, loading, mayManageUsersActions, mayInviteUsers, mayAssignNewOwner, showLegacyClusterRoles = false, permissionsReworkEnabled = false, inviteModal, changeRolesModal, currentUserEmail, onNavigateToUser, t, telemetry, onRemoveUser, onInviteUser, onResendInvite, onCancelInvite, onAssignNewOwner, onUpdateUserRoles, }) => {
|
|
28
16
|
const trackEvent = (eventName, message, meta) => {
|
|
29
17
|
telemetry?.track?.(eventName, {
|
|
@@ -2,9 +2,10 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { UsersService } from '@camunda/ccma-api';
|
|
3
3
|
import { observer } from 'mobx-react-lite';
|
|
4
4
|
import { useMemo } from 'react';
|
|
5
|
-
import { C4DeleteAccountModal
|
|
5
|
+
import { C4DeleteAccountModal } from '../../components/c4-delete-account-modal/c4-delete-account-modal.js';
|
|
6
6
|
import { useC4ConsoleRuntime } from '../../runtime/c4-console-runtime-context.js';
|
|
7
7
|
import { toApiConfig } from '../../runtime/to-api-config.js';
|
|
8
|
+
import { safeTranslate } from '../../utils/safe-translate.js';
|
|
8
9
|
import { useDeleteAccountEligibility } from './use-delete-account-eligibility.js';
|
|
9
10
|
/**
|
|
10
11
|
* Whether the request was refused with 403.
|
|
@@ -19,18 +19,10 @@ import { toApiConfig } from '../../runtime/to-api-config.js';
|
|
|
19
19
|
import { toIdentityApiBaseUrl } from '../../runtime/to-identity-api-base-url.js';
|
|
20
20
|
import { Checkbox, Link, Modal, Stack, TextInput } from '../../ui/index.js';
|
|
21
21
|
import { isLegacyLabeledRole, isRoleAssignable, legacySectionRoles, moreRolesHeadingText, orderPrimaryRoles, roleLabelDescription, } from '../../utils/role-labels.js';
|
|
22
|
+
import { safeTranslate } from '../../utils/safe-translate.js';
|
|
22
23
|
function isRecord(value) {
|
|
23
24
|
return Boolean(value) && typeof value === 'object';
|
|
24
25
|
}
|
|
25
|
-
function safeTranslate(t, key, fallback) {
|
|
26
|
-
try {
|
|
27
|
-
const translated = t?.(key);
|
|
28
|
-
return translated && translated !== key ? translated : fallback;
|
|
29
|
-
}
|
|
30
|
-
catch {
|
|
31
|
-
return fallback;
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
26
|
function sendNavigate(onNavigate, event) {
|
|
35
27
|
onNavigate?.(event);
|
|
36
28
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camunda/ccma-saas-frontend",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.12.0",
|
|
4
4
|
"description": "Camunda Composite Components",
|
|
5
5
|
"bugs": {
|
|
6
6
|
"url": "https://github.com/camunda/camunda-cloud-management-apps/issues"
|
|
@@ -96,8 +96,8 @@
|
|
|
96
96
|
"react-markdown": "^8.0.7 || ^10.0.0"
|
|
97
97
|
},
|
|
98
98
|
"dependencies": {
|
|
99
|
-
"@camunda/ccma-api": "1.0
|
|
100
|
-
"@camunda/ccma-shared-types": "1.
|
|
99
|
+
"@camunda/ccma-api": "1.2.0",
|
|
100
|
+
"@camunda/ccma-shared-types": "1.2.0",
|
|
101
101
|
"@pactsafe/pactsafe-react-sdk": "2.15.0",
|
|
102
102
|
"cron-parser": "5.10.0",
|
|
103
103
|
"mobx": "6.16.1",
|