@camunda/ccma-saas-frontend 0.11.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 +24 -2
- package/lib/esm/components/c4-cluster-list/c4-cluster-list.types.d.ts +9 -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 +11 -1
- 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/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 +1 -19
- 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 +72 -100
- package/lib/esm/widgets/clusters/c4-clusters-page.types.d.ts +7 -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 +1 -18
- 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
|
@@ -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.
|
|
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",
|