@camunda/ccma-saas-frontend 0.7.0 → 0.7.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.
- package/lib/esm/components/c4-billing-page/elements/value-metric.js +2 -4
- package/lib/esm/components/c4-breadcrumb/c4-breadcrumb.d.ts +1 -1
- package/lib/esm/components/c4-breadcrumb/c4-breadcrumb.js +4 -4
- package/lib/esm/components/c4-breadcrumb/c4-breadcrumb.types.d.ts +6 -0
- package/lib/esm/components/c4-charts-dashboard/elements/bar-chart.js +24 -10
- package/lib/esm/components/c4-cluster-details-activity/c4-cluster-details-activity.js +2 -1
- package/lib/esm/components/c4-cluster-details-encryption/c4-cluster-details-encryption.js +10 -5
- package/lib/esm/components/c4-cluster-details-hot-backups/c4-cluster-details-hot-backups.js +4 -3
- package/lib/esm/components/c4-cluster-details-secure-connectivity/c4-cluster-details-secure-connectivity.js +8 -3
- 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 +6 -4
- package/lib/esm/components/c4-cluster-list/c4-cluster-list.types.d.ts +7 -0
- package/lib/esm/components/c4-cluster-overview/applications.d.ts +8 -0
- package/lib/esm/components/c4-cluster-overview/applications.js +28 -23
- package/lib/esm/components/c4-cluster-overview/c4-cluster-overview.d.ts +1 -1
- package/lib/esm/components/c4-cluster-overview/c4-cluster-overview.js +5 -5
- package/lib/esm/components/c4-cluster-overview/c4-cluster-overview.types.d.ts +10 -0
- package/lib/esm/components/c4-cluster-overview/cluster-details.d.ts +7 -0
- package/lib/esm/components/c4-cluster-overview/cluster-details.js +5 -2
- package/lib/esm/components/c4-cluster-overview/cluster-load.d.ts +7 -0
- package/lib/esm/components/c4-cluster-overview/cluster-load.js +9 -5
- package/lib/esm/components/c4-cluster-settings/elements/danger-zone.js +2 -1
- package/lib/esm/components/c4-cluster-settings/elements/external-identity-provider-modal.js +2 -2
- package/lib/esm/components/c4-cluster-settings/elements/settings-tile.js +2 -1
- package/lib/esm/components/c4-create-alert-modal/c4-create-alert-modal.js +2 -2
- package/lib/esm/components/c4-create-cluster/c4-create-cluster.js +4 -4
- package/lib/esm/components/c4-create-cluster-api-client-modal/c4-create-cluster-api-client-modal.js +1 -2
- package/lib/esm/components/c4-create-connector-secret-modal/c4-create-connector-secret-modal.js +2 -2
- package/lib/esm/components/c4-create-console-api-client-modal/c4-create-console-api-client-modal.js +1 -2
- package/lib/esm/components/c4-create-ip-whitelist-modal/c4-create-ip-whitelist-modal.js +1 -2
- package/lib/esm/components/c4-create-trial-organization-modal/c4-create-trial-organization-modal.js +1 -2
- package/lib/esm/components/c4-help-center/c4-help-center.js +3 -1
- package/lib/esm/components/c4-info-tooltip/c4-info-tooltip.js +1 -1
- package/lib/esm/components/c4-job-dashboard-details-page/c4-job-dashboard-details-page.d.ts +1 -1
- package/lib/esm/components/c4-job-dashboard-details-page/c4-job-dashboard-details-page.js +2 -2
- package/lib/esm/components/c4-job-dashboard-details-page/c4-job-dashboard-details-page.types.d.ts +10 -0
- package/lib/esm/components/c4-job-dashboard-details-page/elements/c4-job-dashboard-chart-heading.js +2 -1
- package/lib/esm/components/c4-job-dashboard-details-page/elements/c4-job-dashboard-error-table.js +3 -2
- package/lib/esm/components/c4-job-dashboard-details-page/elements/c4-job-dashboard-worker-table.js +3 -2
- package/lib/esm/components/c4-job-dashboard-entry-point/c4-job-dashboard-entry-point.d.ts +1 -1
- package/lib/esm/components/c4-job-dashboard-entry-point/c4-job-dashboard-entry-point.js +7 -2
- package/lib/esm/components/c4-job-dashboard-entry-point/c4-job-dashboard-entry-point.types.d.ts +8 -0
- package/lib/esm/components/c4-job-dashboard-overview-page/c4-job-dashboard-overview.d.ts +1 -1
- package/lib/esm/components/c4-job-dashboard-overview-page/c4-job-dashboard-overview.js +2 -2
- package/lib/esm/components/c4-job-dashboard-overview-page/c4-job-dashboard-overview.types.d.ts +10 -0
- package/lib/esm/components/c4-job-dashboard-shared/c4-job-dashboard-error-handler.js +3 -2
- package/lib/esm/components/c4-link-button/c4-link-button.d.ts +1 -1
- package/lib/esm/components/c4-link-button/c4-link-button.js +2 -2
- package/lib/esm/components/c4-link-button/c4-link-button.types.d.ts +6 -0
- package/lib/esm/components/c4-management-api/c4-management-api.js +8 -3
- package/lib/esm/components/c4-page-template/c4-page-template.d.ts +13 -1
- package/lib/esm/components/c4-page-template/c4-page-template.js +3 -3
- package/lib/esm/components/c4-sm-dashboard/health-status.js +1 -1
- package/lib/esm/components/c4-usage-history/elements/usage-history-charts.d.ts +1 -1
- package/lib/esm/components/c4-usage-metrics-per-cluster/c4-usage-metrics-per-cluster.js +3 -1
- package/lib/esm/components/shared-charts/ds-line-chart.js +25 -11
- package/lib/esm/components/shared-charts/recharts-tokens.d.ts +16 -0
- package/lib/esm/components/shared-charts/recharts-tokens.js +31 -0
- package/lib/esm/i18n/en/entities/orgroles.json +2 -2
- package/lib/esm/i18n/en/pages/clusterdetails.json +3 -0
- package/lib/esm/i18n/en/pages/job-dashboard.json +2 -0
- package/lib/esm/index.d.ts +13 -1
- package/lib/esm/index.js +7 -1
- package/lib/esm/runtime/build-cluster-swagger-url.js +2 -2
- package/lib/esm/runtime/index.d.ts +1 -0
- package/lib/esm/runtime/index.js +1 -0
- package/lib/esm/runtime/nav/camunda-apps.js +2 -2
- package/lib/esm/ui/c4-definition-tooltip.d.ts +15 -0
- package/lib/esm/ui/c4-definition-tooltip.js +43 -0
- package/lib/esm/ui/index.d.ts +6 -0
- package/lib/esm/ui/index.js +20 -3
- package/lib/esm/utils/role-labels.js +5 -4
- package/lib/esm/utils/safe-translate.d.ts +27 -0
- package/lib/esm/utils/safe-translate.js +56 -0
- package/lib/esm/utils/section-heading-style.d.ts +13 -0
- package/lib/esm/utils/section-heading-style.js +25 -0
- package/lib/esm/widgets/c4-widget-scope.types.d.ts +20 -0
- package/lib/esm/widgets/c4-widget-scope.types.js +6 -0
- package/lib/esm/widgets/cluster-client-details/c4-cluster-client-details-app.js +5 -5
- package/lib/esm/widgets/cluster-details/c4-cluster-details-app.js +26 -57
- package/lib/esm/widgets/cluster-details/c4-cluster-details-app.types.d.ts +27 -0
- package/lib/esm/widgets/cluster-details/c4-cluster-details-page.d.ts +1 -1
- package/lib/esm/widgets/cluster-details/c4-cluster-details-page.js +63 -19
- package/lib/esm/widgets/cluster-details/c4-cluster-details-page.types.d.ts +14 -0
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-alerts-tab.js +2 -2
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-byom-clients-tab.js +3 -2
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-clients-tab.d.ts +9 -1
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-clients-tab.js +8 -17
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-connector-secrets-tab.d.ts +31 -2
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-connector-secrets-tab.js +34 -24
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-hot-backups-tab.js +2 -2
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-ip-whitelist-tab.js +1 -2
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-overview-tab.d.ts +16 -1
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-overview-tab.js +23 -18
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-settings-tab.js +13 -15
- package/lib/esm/widgets/clusters/c4-clusters-page.d.ts +1 -1
- package/lib/esm/widgets/clusters/c4-clusters-page.js +2 -2
- package/lib/esm/widgets/clusters/c4-clusters-page.types.d.ts +7 -0
- package/lib/esm/widgets/connector-management/c4-connector-management-executable-details-page.d.ts +1 -1
- package/lib/esm/widgets/connector-management/c4-connector-management-executable-details-page.js +12 -6
- package/lib/esm/widgets/connector-management/c4-connector-management-executable-details-page.types.d.ts +9 -0
- package/lib/esm/widgets/connector-management/c4-connector-management-executables-table-page.d.ts +1 -1
- package/lib/esm/widgets/connector-management/c4-connector-management-executables-table-page.js +12 -6
- package/lib/esm/widgets/connector-management/c4-connector-management-executables-table-page.types.d.ts +9 -0
- package/lib/esm/widgets/connector-management/c4-connector-management-outbound-details-page.d.ts +1 -1
- package/lib/esm/widgets/connector-management/c4-connector-management-outbound-details-page.js +12 -6
- package/lib/esm/widgets/connector-management/c4-connector-management-outbound-details-page.types.d.ts +9 -0
- package/lib/esm/widgets/connector-management/c4-connector-management-page.d.ts +1 -1
- package/lib/esm/widgets/connector-management/c4-connector-management-page.js +12 -6
- package/lib/esm/widgets/connector-management/c4-connector-management-page.types.d.ts +10 -0
- package/lib/esm/widgets/dashboard/c4-dashboard-app.js +177 -17
- package/lib/esm/widgets/dashboard/c4-dashboard-app.types.d.ts +15 -2
- package/lib/esm/widgets/environment/c4-cluster-api-clients-widget.d.ts +5 -0
- package/lib/esm/widgets/environment/c4-cluster-api-clients-widget.js +61 -0
- package/lib/esm/widgets/environment/c4-cluster-api-clients-widget.types.d.ts +21 -0
- package/lib/esm/widgets/environment/c4-cluster-api-clients-widget.types.js +6 -0
- package/lib/esm/widgets/environment/c4-cluster-connector-secrets-widget.d.ts +5 -0
- package/lib/esm/widgets/environment/c4-cluster-connector-secrets-widget.js +58 -0
- package/lib/esm/widgets/environment/c4-cluster-connector-secrets-widget.types.d.ts +22 -0
- package/lib/esm/widgets/environment/c4-cluster-connector-secrets-widget.types.js +6 -0
- package/lib/esm/widgets/environment/use-cluster-api-clients.d.ts +26 -0
- package/lib/esm/widgets/environment/use-cluster-api-clients.js +48 -0
- package/lib/esm/widgets/environment/use-cluster-swagger-url.d.ts +19 -0
- package/lib/esm/widgets/environment/use-cluster-swagger-url.js +44 -0
- package/lib/esm/widgets/environment/use-cluster-version-flags.d.ts +16 -0
- package/lib/esm/widgets/environment/use-cluster-version-flags.js +40 -0
- package/lib/esm/widgets/group-details/c4-group-details-page.js +2 -2
- package/lib/esm/widgets/job-worker/c4-job-worker-details-page.d.ts +1 -1
- package/lib/esm/widgets/job-worker/c4-job-worker-details-page.js +34 -25
- package/lib/esm/widgets/job-worker/c4-job-worker-overview-page.d.ts +1 -1
- package/lib/esm/widgets/job-worker/c4-job-worker-overview-page.js +26 -21
- package/lib/esm/widgets/job-worker/c4-job-worker.helpers.d.ts +12 -0
- package/lib/esm/widgets/job-worker/c4-job-worker.helpers.js +6 -0
- package/lib/esm/widgets/job-worker/c4-job-worker.types.d.ts +19 -0
- package/lib/esm/widgets/management/c4-management-app.js +3 -3
- package/lib/esm/widgets/management/tabs/c4-management-api-tab.js +1 -7
- package/lib/esm/widgets/management/tabs/c4-management-pricing-tab.js +1 -2
- package/lib/esm/widgets/management/tabs/c4-management-usage-tab.js +7 -1
- package/lib/esm/widgets/user-details/c4-user-details-page.js +3 -3
- package/package.json +7 -7
|
@@ -32,7 +32,9 @@ export const C4UsageMetricsPerCluster = ({ data, range, tags, texts, loading, do
|
|
|
32
32
|
license: licenseAvailable ? (item?.license ?? '-') : undefined,
|
|
33
33
|
originalIndex: index,
|
|
34
34
|
})), [data, licenseAvailable, tenantsAvailable]);
|
|
35
|
-
const compTagSelection = tagsAvailable ? (
|
|
35
|
+
const compTagSelection = tagsAvailable ? (
|
|
36
|
+
// hack to align date selection with tag selection
|
|
37
|
+
_jsx("div", { style: { marginTop: '-2px' }, children: _jsx(MultiSelect, { titleText: texts.tags, label: texts.tags, useTitleInItem: true, selectedItems: tags.values, id: 'cluster-usage-metrics-tag-selection', items: tags.allTags, onChange: (event) => {
|
|
36
38
|
tags.onChange(event.selectedItems);
|
|
37
39
|
} }) })) : null;
|
|
38
40
|
let compData = _jsx(_Fragment, {});
|
|
@@ -6,27 +6,40 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
6
6
|
*/
|
|
7
7
|
import { LineChart } from '@camunda/design-system';
|
|
8
8
|
import { useMemo } from 'react';
|
|
9
|
-
import { getDsSeriesToken } from './recharts-tokens.js';
|
|
9
|
+
import { getDsSeriesToken, toDsSeriesKeys } from './recharts-tokens.js';
|
|
10
10
|
function formatDate(value) {
|
|
11
11
|
const date = new Date(String(value));
|
|
12
12
|
return Number.isNaN(date.getTime())
|
|
13
13
|
? String(value)
|
|
14
14
|
: Intl.DateTimeFormat('en-US', { month: 'short', day: '2-digit' }).format(date);
|
|
15
15
|
}
|
|
16
|
-
/**
|
|
16
|
+
/**
|
|
17
|
+
* Pivots flat {group, date, value} rows into one row per date, keyed by the
|
|
18
|
+
* group's CSS-safe series key.
|
|
19
|
+
*/
|
|
17
20
|
function pivotByDate(dataPoints) {
|
|
18
21
|
const groupSet = new Set();
|
|
19
|
-
const rowsByDate = new Map();
|
|
20
22
|
for (const point of dataPoints) {
|
|
21
23
|
groupSet.add(point.group);
|
|
24
|
+
}
|
|
25
|
+
// Sort groups so the group->colour mapping stays stable regardless of the
|
|
26
|
+
// order the points arrive in.
|
|
27
|
+
const groups = Array.from(groupSet).sort();
|
|
28
|
+
const keyByGroup = toDsSeriesKeys(groups);
|
|
29
|
+
const rowsByDate = new Map();
|
|
30
|
+
for (const point of dataPoints) {
|
|
31
|
+
// `keyByGroup` is built from the groups of these same points, so this skips
|
|
32
|
+
// nothing. It keeps the row keys to the keys that `config` declares.
|
|
33
|
+
const seriesKey = keyByGroup.get(point.group);
|
|
34
|
+
if (!seriesKey) {
|
|
35
|
+
continue;
|
|
36
|
+
}
|
|
22
37
|
const row = rowsByDate.get(point.date) ?? { date: point.date };
|
|
23
|
-
row[
|
|
38
|
+
row[seriesKey] = point.value;
|
|
24
39
|
rowsByDate.set(point.date, row);
|
|
25
40
|
}
|
|
26
41
|
const rows = Array.from(rowsByDate.values()).sort((a, b) => String(a.date).localeCompare(String(b.date)));
|
|
27
|
-
|
|
28
|
-
// order the points arrive in.
|
|
29
|
-
return { rows, groups: Array.from(groupSet).sort() };
|
|
42
|
+
return { rows, keyByGroup };
|
|
30
43
|
}
|
|
31
44
|
/**
|
|
32
45
|
* ds-mode line chart, rendered with the `@camunda/design-system` `LineChart`.
|
|
@@ -37,11 +50,12 @@ function pivotByDate(dataPoints) {
|
|
|
37
50
|
* unchanged) but only the chart title is surfaced in ds mode.
|
|
38
51
|
*/
|
|
39
52
|
export function DsLineChart({ title, dataPoints, thresholds, height = 400, }) {
|
|
40
|
-
const { rows,
|
|
41
|
-
|
|
42
|
-
|
|
53
|
+
const { rows, keyByGroup } = useMemo(() => pivotByDate(dataPoints), [dataPoints]);
|
|
54
|
+
// Iterate the map, so that every config key is a key the map produced.
|
|
55
|
+
const config = useMemo(() => Object.fromEntries([...keyByGroup].map(([group, seriesKey], index) => [
|
|
56
|
+
seriesKey,
|
|
43
57
|
{ label: group, color: getDsSeriesToken(index) },
|
|
44
|
-
])), [
|
|
58
|
+
])), [keyByGroup]);
|
|
45
59
|
const referenceLines = thresholds?.map((threshold) => ({
|
|
46
60
|
value: threshold.value,
|
|
47
61
|
label: threshold.label,
|
|
@@ -49,3 +49,19 @@ export declare const DS_STATUS_COLORS: {
|
|
|
49
49
|
};
|
|
50
50
|
/** Spread onto a recharts `<Tooltip>` so its popover matches DS surfaces. */
|
|
51
51
|
export declare const DS_CHART_TOOLTIP_PROPS: Pick<TooltipProps<number, string>, 'contentStyle' | 'labelStyle' | 'itemStyle'>;
|
|
52
|
+
/**
|
|
53
|
+
* Maps series names to `ChartConfig` keys that are safe as CSS idents.
|
|
54
|
+
*
|
|
55
|
+
* The DS chart components expand every `ChartConfig` key into a
|
|
56
|
+
* `--color-<key>` custom property and read the series stroke/fill back from
|
|
57
|
+
* it. Our series names are user-supplied (cluster and organization names), so
|
|
58
|
+
* a name with a space — or any other character that a CSS ident cannot hold —
|
|
59
|
+
* makes that declaration invalid. The browser drops it, the series stroke
|
|
60
|
+
* resolves to nothing, and the chart renders axes and legend text but no
|
|
61
|
+
* lines or bars.
|
|
62
|
+
*
|
|
63
|
+
* Names that reduce to the same slug get a numeric suffix, so two clusters
|
|
64
|
+
* called "a b" and "a-b" keep separate colors. The human name stays on
|
|
65
|
+
* `ChartConfig.label`, which is what the legend and tooltip show.
|
|
66
|
+
*/
|
|
67
|
+
export declare function toDsSeriesKeys(groups: readonly string[]): Map<string, string>;
|
|
@@ -97,3 +97,34 @@ export const DS_CHART_TOOLTIP_PROPS = {
|
|
|
97
97
|
color: 'var(--popover-foreground)',
|
|
98
98
|
},
|
|
99
99
|
};
|
|
100
|
+
/**
|
|
101
|
+
* Maps series names to `ChartConfig` keys that are safe as CSS idents.
|
|
102
|
+
*
|
|
103
|
+
* The DS chart components expand every `ChartConfig` key into a
|
|
104
|
+
* `--color-<key>` custom property and read the series stroke/fill back from
|
|
105
|
+
* it. Our series names are user-supplied (cluster and organization names), so
|
|
106
|
+
* a name with a space — or any other character that a CSS ident cannot hold —
|
|
107
|
+
* makes that declaration invalid. The browser drops it, the series stroke
|
|
108
|
+
* resolves to nothing, and the chart renders axes and legend text but no
|
|
109
|
+
* lines or bars.
|
|
110
|
+
*
|
|
111
|
+
* Names that reduce to the same slug get a numeric suffix, so two clusters
|
|
112
|
+
* called "a b" and "a-b" keep separate colors. The human name stays on
|
|
113
|
+
* `ChartConfig.label`, which is what the legend and tooltip show.
|
|
114
|
+
*/
|
|
115
|
+
export function toDsSeriesKeys(groups) {
|
|
116
|
+
const keyByGroup = new Map();
|
|
117
|
+
const used = new Set();
|
|
118
|
+
for (const group of groups) {
|
|
119
|
+
const base = group.replace(/[^A-Za-z0-9_-]/g, '-') || 'series';
|
|
120
|
+
let key = base;
|
|
121
|
+
let suffix = 2;
|
|
122
|
+
while (used.has(key)) {
|
|
123
|
+
key = `${base}-${suffix}`;
|
|
124
|
+
suffix += 1;
|
|
125
|
+
}
|
|
126
|
+
used.add(key);
|
|
127
|
+
keyByGroup.set(group, key);
|
|
128
|
+
}
|
|
129
|
+
return keyByGroup;
|
|
130
|
+
}
|
|
@@ -43,11 +43,11 @@
|
|
|
43
43
|
},
|
|
44
44
|
"aligned": {
|
|
45
45
|
"owner": {
|
|
46
|
-
"label": "
|
|
46
|
+
"label": "Organization Owner",
|
|
47
47
|
"description": "All rights in the organization, including settings, billing, and ownership transfer. Formerly the Owner role."
|
|
48
48
|
},
|
|
49
49
|
"admin": {
|
|
50
|
-
"label": "
|
|
50
|
+
"label": "Organization Admin",
|
|
51
51
|
"description": "Manages the organization, its members, and workspaces, and acts as the super-user. Formerly the Admin role."
|
|
52
52
|
},
|
|
53
53
|
"member": {
|
|
@@ -50,6 +50,8 @@
|
|
|
50
50
|
"title": "API",
|
|
51
51
|
"dataTableTitle": "Client credentials",
|
|
52
52
|
"dataTableSubTitle": "Open a set of credentials to see the base URLs, connection information, and more.",
|
|
53
|
+
"subtitleIdentityPrefix": "To set up permissions, copy the client ID over to the cluster's Admin and configure the required access and roles. Learn more about",
|
|
54
|
+
"subtitleIdentityPrefix_environment": "To set up permissions, copy the client ID over to the environment's Admin and configure the required access and roles. Learn more about",
|
|
53
55
|
"createButton": "Create new client",
|
|
54
56
|
"createFirstClient": "Create your first client",
|
|
55
57
|
"header": {
|
|
@@ -130,6 +132,7 @@
|
|
|
130
132
|
"title": "Cluster secrets",
|
|
131
133
|
"emptyIconAltText": "Cluster secrets icon",
|
|
132
134
|
"infoText": "Secrets can be used to reference encrypted authentication credentials in your cluster. See the <0>secrets</0> documentation for more details.",
|
|
135
|
+
"infoText_environment": "Secrets can be used to reference encrypted authentication credentials in your environment. See the <0>secrets</0> documentation for more details.",
|
|
133
136
|
"noSecrets": {
|
|
134
137
|
"title": "Store credentials safely using Camunda cluster secrets",
|
|
135
138
|
"description": "Accessing an external system requires authentication with credentials. To ensure the credentials are secure, use the Camunda secrets vault to store usernames, passwords, or API credentials without exposing sensitive information in your BPMN processes."
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
"overview": {
|
|
3
3
|
"title": "Job types",
|
|
4
4
|
"description": "View all Job types running against the cluster.",
|
|
5
|
+
"description_environment": "View all job types running against the environment.",
|
|
5
6
|
"learnMoreLabel": "See more information about job types here.",
|
|
6
7
|
"search": {
|
|
7
8
|
"label": "Search"
|
|
@@ -80,6 +81,7 @@
|
|
|
80
81
|
"empty": {
|
|
81
82
|
"title": "No data available.",
|
|
82
83
|
"description": "No data was found for this cluster.",
|
|
84
|
+
"description_environment": "No data was found for this environment.",
|
|
83
85
|
"learnMoreLabel": "Learn more about jobs and job workers"
|
|
84
86
|
},
|
|
85
87
|
"generalError": {
|
package/lib/esm/index.d.ts
CHANGED
|
@@ -200,7 +200,10 @@ export { openC4CreateConsoleApiClientModal, setC4CreateConsoleApiClientModalHand
|
|
|
200
200
|
export { openC4InviteUserToOrganizationModal, setC4InviteUserToOrganizationModalHandle, } from './modals/c4-invite-user-to-organization-modal-handle.js';
|
|
201
201
|
export { openC4RenameOrganizationModal, setC4RenameOrganizationModalHandle, } from './modals/c4-rename-organization-modal-handle.js';
|
|
202
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';
|
|
203
|
-
export { addC4ConsoleNotification, 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, 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';
|
|
204
|
+
export type { TranslateFn } from './utils/safe-translate.js';
|
|
205
|
+
export { ENVIRONMENT_KEY_SUFFIX, safeTranslate, scopedTranslate, } from './utils/safe-translate.js';
|
|
206
|
+
export type { C4WidgetScope } from './widgets/c4-widget-scope.types.js';
|
|
204
207
|
export { C4ClusterClientDetailsApp } from './widgets/cluster-client-details/c4-cluster-client-details-app.js';
|
|
205
208
|
export type { C4ClusterClientDetailsAppProps } from './widgets/cluster-client-details/c4-cluster-client-details-app.types.js';
|
|
206
209
|
export { C4ClusterDetailsApp } from './widgets/cluster-details/c4-cluster-details-app.js';
|
|
@@ -222,6 +225,15 @@ export { C4CreateClusterPage } from './widgets/create-cluster/c4-create-cluster-
|
|
|
222
225
|
export type { C4CreateClusterExternalLinks, C4CreateClusterNavigateEvent, C4CreateClusterPageProps, } from './widgets/create-cluster/c4-create-cluster-page.types.js';
|
|
223
226
|
export { C4DashboardApp } from './widgets/dashboard/c4-dashboard-app.js';
|
|
224
227
|
export type { C4DashboardAppProps, C4DashboardNavigateEvent, } from './widgets/dashboard/c4-dashboard-app.types.js';
|
|
228
|
+
export { C4ClusterApiClientsWidget } from './widgets/environment/c4-cluster-api-clients-widget.js';
|
|
229
|
+
export type { C4ClusterApiClientsWidgetProps } from './widgets/environment/c4-cluster-api-clients-widget.types.js';
|
|
230
|
+
export { C4ClusterConnectorSecretsWidget } from './widgets/environment/c4-cluster-connector-secrets-widget.js';
|
|
231
|
+
export type { C4ClusterConnectorSecretsWidgetProps } from './widgets/environment/c4-cluster-connector-secrets-widget.types.js';
|
|
232
|
+
export type { ClusterApiClientsState } from './widgets/environment/use-cluster-api-clients.js';
|
|
233
|
+
export { useClusterApiClients } from './widgets/environment/use-cluster-api-clients.js';
|
|
234
|
+
export { useClusterSwaggerUrl } from './widgets/environment/use-cluster-swagger-url.js';
|
|
235
|
+
export type { ClusterVersionFlags } from './widgets/environment/use-cluster-version-flags.js';
|
|
236
|
+
export { useClusterVersionFlags } from './widgets/environment/use-cluster-version-flags.js';
|
|
225
237
|
export { C4GroupDetailsPage } from './widgets/group-details/c4-group-details-page.js';
|
|
226
238
|
export type { C4GroupDetailsExternalLinks, C4GroupDetailsNavigateEvent, C4GroupDetailsPageProps, } from './widgets/group-details/c4-group-details-page.types.js';
|
|
227
239
|
export type { C4JobWorkerDetailsPageProps, C4JobWorkerNavigateEvent, C4JobWorkerOverviewPageProps, } from './widgets/job-worker/c4-job-worker.types.js';
|
package/lib/esm/index.js
CHANGED
|
@@ -114,7 +114,8 @@ export { openC4RenameOrganizationModal, setC4RenameOrganizationModalHandle, } fr
|
|
|
114
114
|
// re-listed per module, so the package root and the
|
|
115
115
|
// `@camunda/ccma-saas-frontend/runtime` subpath expose one identical surface.
|
|
116
116
|
// Add runtime exports in `src/runtime/index.ts` and mirror them here.
|
|
117
|
-
export { addC4ConsoleNotification, 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';
|
|
117
|
+
export { addC4ConsoleNotification, 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';
|
|
118
|
+
export { ENVIRONMENT_KEY_SUFFIX, safeTranslate, scopedTranslate, } from './utils/safe-translate.js';
|
|
118
119
|
export { C4ClusterClientDetailsApp } from './widgets/cluster-client-details/c4-cluster-client-details-app.js';
|
|
119
120
|
export { C4ClusterDetailsApp } from './widgets/cluster-details/c4-cluster-details-app.js';
|
|
120
121
|
export { C4ClusterDetailsPage } from './widgets/cluster-details/c4-cluster-details-page.js';
|
|
@@ -126,6 +127,11 @@ export { C4ConnectorManagementOutboundDetailsPage } from './widgets/connector-ma
|
|
|
126
127
|
export { C4ConnectorManagementPage } from './widgets/connector-management/c4-connector-management-page.js';
|
|
127
128
|
export { C4CreateClusterPage } from './widgets/create-cluster/c4-create-cluster-page.js';
|
|
128
129
|
export { C4DashboardApp } from './widgets/dashboard/c4-dashboard-app.js';
|
|
130
|
+
export { C4ClusterApiClientsWidget } from './widgets/environment/c4-cluster-api-clients-widget.js';
|
|
131
|
+
export { C4ClusterConnectorSecretsWidget } from './widgets/environment/c4-cluster-connector-secrets-widget.js';
|
|
132
|
+
export { useClusterApiClients } from './widgets/environment/use-cluster-api-clients.js';
|
|
133
|
+
export { useClusterSwaggerUrl } from './widgets/environment/use-cluster-swagger-url.js';
|
|
134
|
+
export { useClusterVersionFlags } from './widgets/environment/use-cluster-version-flags.js';
|
|
129
135
|
export { C4GroupDetailsPage } from './widgets/group-details/c4-group-details-page.js';
|
|
130
136
|
export { C4JobWorkerDetailsPage } from './widgets/job-worker/c4-job-worker-details-page.js';
|
|
131
137
|
export { C4JobWorkerOverviewPage } from './widgets/job-worker/c4-job-worker-overview-page.js';
|
|
@@ -3,7 +3,7 @@
|
|
|
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 { checkVersion, VersionCheckOperator } from '@camunda/ccma-shared-types';
|
|
6
|
+
import { checkVersion, SWAGGER_URL_8_9_MIN_VERSION, VersionCheckOperator, } from '@camunda/ccma-shared-types';
|
|
7
7
|
import { toServiceDomain } from './to-api-domain.js';
|
|
8
8
|
/**
|
|
9
9
|
* Builds the cluster-specific Swagger UI URL.
|
|
@@ -33,7 +33,7 @@ export function buildClusterSwaggerUrl(params) {
|
|
|
33
33
|
possiblyVersionOrDockerPath: zeebeVersion,
|
|
34
34
|
trueForSnapshot: true,
|
|
35
35
|
trueOnInvalidVersion: false,
|
|
36
|
-
versionToCompareTo:
|
|
36
|
+
versionToCompareTo: SWAGGER_URL_8_9_MIN_VERSION,
|
|
37
37
|
operator: VersionCheckOperator.GreaterThanOrEqual,
|
|
38
38
|
});
|
|
39
39
|
if (is89OrHigher) {
|
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
*/
|
|
22
22
|
export type { AccountsPermissions, CamundaWebApp, ConsoleClusterDto, ConsolePermissions, ExternalClusterDto, ExternalOrganizationDto, NotificationDto, OrganizationPermissions, OrganizationRole, SseEntity, UpgradableGenerationsDto, } from '@camunda/ccma-shared-types';
|
|
23
23
|
export { addC4ConsoleNotification, removeC4ConsoleNotificationById, setC4ConsoleNotificationsHandle, } from '../notifications/c4-console-notifications-handle.js';
|
|
24
|
+
export { buildClusterSwaggerUrl } from './build-cluster-swagger-url.js';
|
|
24
25
|
export type { C4ConsoleAuthzFeatures, C4ConsoleAuthzState, C4ConsoleVisibilities, } from './c4-console-authz.js';
|
|
25
26
|
export { useC4ConsoleAuthz } from './c4-console-authz.js';
|
|
26
27
|
export { C4ConsoleDataProvider, useC4ConsoleData, } from './c4-console-data-context.js';
|
package/lib/esm/runtime/index.js
CHANGED
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
// request failures, and a host app calls `setC4ConsoleNotificationsHandle` to
|
|
8
8
|
// receive them. The module itself is a dependency-free leaf.
|
|
9
9
|
export { addC4ConsoleNotification, removeC4ConsoleNotificationById, setC4ConsoleNotificationsHandle, } from '../notifications/c4-console-notifications-handle.js';
|
|
10
|
+
export { buildClusterSwaggerUrl } from './build-cluster-swagger-url.js';
|
|
10
11
|
export { useC4ConsoleAuthz } from './c4-console-authz.js';
|
|
11
12
|
export { C4ConsoleDataProvider, useC4ConsoleData, } from './c4-console-data-context.js';
|
|
12
13
|
export { C4ConsoleEventsProvider, useC4ConsoleEventsState, } from './c4-console-events-context.js';
|
|
@@ -3,7 +3,7 @@
|
|
|
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 { checkVersion, VersionCheckOperator, } from '@camunda/ccma-shared-types';
|
|
6
|
+
import { ADMIN_APP_RENAME_MIN_VERSION, checkVersion, VersionCheckOperator, } from '@camunda/ccma-shared-types';
|
|
7
7
|
/**
|
|
8
8
|
* Pure, icon-free navigation domain rules ported from c3's `utils/camunda.ts`.
|
|
9
9
|
* These encode the Camunda-specific quirks (admin↔identity aliasing, zeebe as
|
|
@@ -34,7 +34,7 @@ export function resolveAdminAppName(cluster) {
|
|
|
34
34
|
return checkVersion({
|
|
35
35
|
possiblyVersionOrDockerPath: cluster.generation?.versions?.zeebe,
|
|
36
36
|
trueForSnapshot: true,
|
|
37
|
-
versionToCompareTo:
|
|
37
|
+
versionToCompareTo: ADMIN_APP_RENAME_MIN_VERSION,
|
|
38
38
|
operator: VersionCheckOperator.GreaterThanOrEqual,
|
|
39
39
|
})
|
|
40
40
|
? 'admin'
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { DefinitionTooltip as CarbonDefinitionTooltip } from '@carbon/react';
|
|
2
|
+
import type { ComponentProps, JSX } from 'react';
|
|
3
|
+
type CarbonDefinitionTooltipProps = ComponentProps<typeof CarbonDefinitionTooltip>;
|
|
4
|
+
/**
|
|
5
|
+
* Carbon `DefinitionTooltip` API → DS `DefinitionTooltip`.
|
|
6
|
+
*
|
|
7
|
+
* The ds branch of the `../ui` `DefinitionTooltip` switch. `carbon-compat` ships
|
|
8
|
+
* no adapter for this component, so the DS component is used directly. Its API
|
|
9
|
+
* already carries `definition`, `openOnHover`, and `align`.
|
|
10
|
+
*
|
|
11
|
+
* Unlike Carbon's, the DS component renders the definition through a Radix
|
|
12
|
+
* portal, so it is not clipped by an ancestor that hides overflow.
|
|
13
|
+
*/
|
|
14
|
+
export declare const C4DefinitionTooltip: ({ align, definition, children, ...rest }: CarbonDefinitionTooltipProps) => JSX.Element;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { jsx as _jsx } 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 { DefinitionTooltip as DsDefinitionTooltip, } from '@camunda/design-system';
|
|
8
|
+
/**
|
|
9
|
+
* Carbon `align` values that the DS does not accept, and their DS equivalent.
|
|
10
|
+
*
|
|
11
|
+
* Carbon takes a deprecated set (`bottom-left`) next to the modern one
|
|
12
|
+
* (`bottom-start`). `DefinitionTooltipAlign` takes only the modern set, and
|
|
13
|
+
* Radix ignores a value it does not know rather than raising, so an unmapped
|
|
14
|
+
* value moves the definition to the default side with no error.
|
|
15
|
+
*
|
|
16
|
+
* Keying the record on `DeprecatedAlign` makes a missing entry a build error.
|
|
17
|
+
* `apps/accounts-frontend` types `align` as `string` through its own
|
|
18
|
+
* `@carbon/react` declaration (#9748), so `DeprecatedAlign` widens to `string`
|
|
19
|
+
* there and the check does not apply. The c4 build keeps it.
|
|
20
|
+
*/
|
|
21
|
+
const DEPRECATED_ALIGN = {
|
|
22
|
+
'top-left': 'top-start',
|
|
23
|
+
'top-right': 'top-end',
|
|
24
|
+
'bottom-left': 'bottom-start',
|
|
25
|
+
'bottom-right': 'bottom-end',
|
|
26
|
+
'left-top': 'left-start',
|
|
27
|
+
'left-bottom': 'left-end',
|
|
28
|
+
'right-top': 'right-start',
|
|
29
|
+
'right-bottom': 'right-end',
|
|
30
|
+
};
|
|
31
|
+
const toDsAlign = (align) => DEPRECATED_ALIGN[align] ??
|
|
32
|
+
align;
|
|
33
|
+
/**
|
|
34
|
+
* Carbon `DefinitionTooltip` API → DS `DefinitionTooltip`.
|
|
35
|
+
*
|
|
36
|
+
* The ds branch of the `../ui` `DefinitionTooltip` switch. `carbon-compat` ships
|
|
37
|
+
* no adapter for this component, so the DS component is used directly. Its API
|
|
38
|
+
* already carries `definition`, `openOnHover`, and `align`.
|
|
39
|
+
*
|
|
40
|
+
* Unlike Carbon's, the DS component renders the definition through a Radix
|
|
41
|
+
* portal, so it is not clipped by an ancestor that hides overflow.
|
|
42
|
+
*/
|
|
43
|
+
export const C4DefinitionTooltip = ({ align, definition, children, ...rest }) => (_jsx(DsDefinitionTooltip, { ...rest, align: align === undefined ? undefined : toDsAlign(align), definition: definition, children: children }));
|
package/lib/esm/ui/index.d.ts
CHANGED
|
@@ -3,10 +3,15 @@ import { type ComponentType } from 'react';
|
|
|
3
3
|
export declare const Button: ComponentType<import("@camunda/design-system/carbon-compat").ButtonProps<"button">>;
|
|
4
4
|
export declare const Checkbox: ComponentType<import("@carbon/react").CheckboxProps & import("react").RefAttributes<unknown>>;
|
|
5
5
|
export declare const CodeSnippet: ComponentType<import("@camunda/design-system/carbon-compat").CodeSnippetProps>;
|
|
6
|
+
export declare const DefinitionTooltip: ComponentType<import("@carbon/react").DefinitionTooltipProps>;
|
|
6
7
|
export declare const Dropdown: ComponentType<import("@carbon/react").DropdownProps<unknown> & {
|
|
7
8
|
ref?: import("react").Ref<HTMLButtonElement>;
|
|
8
9
|
}>;
|
|
10
|
+
export declare const Form: ComponentType<import("react").DetailedHTMLProps<import("react").FormHTMLAttributes<HTMLFormElement>, HTMLFormElement>>;
|
|
11
|
+
export declare const FormGroup: ComponentType<import("@carbon/react").FormGroupProps>;
|
|
12
|
+
export declare const IconButton: ComponentType<import("@carbon/react").IconButtonProps & import("react").RefAttributes<unknown>>;
|
|
9
13
|
export declare const Link: ComponentType<import("@camunda/design-system/carbon-compat").LinkProps>;
|
|
14
|
+
export declare const ListItem: ComponentType<import("@carbon/react").ListItemProps>;
|
|
10
15
|
export declare const Loading: ComponentType<import("@carbon/react").LoadingProps>;
|
|
11
16
|
export declare const Modal: ComponentType<import("@carbon/react").ModalProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
12
17
|
export declare const ComposedModal: ComponentType<import("@carbon/react").ComposedModalProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -29,4 +34,5 @@ export declare const TextArea: typeof CarbonTextArea;
|
|
|
29
34
|
export declare const TextInput: ComponentType<import("@carbon/react").TextInputProps & import("react").RefAttributes<unknown>>;
|
|
30
35
|
export declare const Tile: ComponentType<import("@carbon/react").TileProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
31
36
|
export declare const Toggle: ComponentType<import("@carbon/react").ToggleProps>;
|
|
37
|
+
export declare const UnorderedList: ComponentType<import("@carbon/react").UnorderedListProps>;
|
|
32
38
|
export declare const Tooltip: typeof CarbonTooltip;
|
package/lib/esm/ui/index.js
CHANGED
|
@@ -18,7 +18,8 @@
|
|
|
18
18
|
* ONLY standalone *leaf* components belong here. Compound-family members
|
|
19
19
|
* (RadioButton/RadioButtonGroup, Tabs/Tab/TabList/TabPanel, Select/SelectItem,
|
|
20
20
|
* Switch (a ContentSwitcher child), MenuButton/MenuItem, Breadcrumb children,
|
|
21
|
-
* Dropdown
|
|
21
|
+
* Dropdown, DatePicker/DatePickerInput, RadioTile (a TileGroup child)) must NOT
|
|
22
|
+
* be routed: Carbon parents detect/clone their children by
|
|
22
23
|
* component identity, and the `switchable` wrapper changes that identity, which
|
|
23
24
|
* breaks state injection (checked/selected). Migrate such families as a whole
|
|
24
25
|
* composite, not symbol-by-symbol.
|
|
@@ -30,17 +31,32 @@
|
|
|
30
31
|
* To add a leaf: import the Carbon + carbon-compat versions and wrap with
|
|
31
32
|
* `switchable(...)`, then point the consuming component's import at this module.
|
|
32
33
|
*/
|
|
33
|
-
import { BreadcrumbSkeleton as DsBreadcrumbSkeleton, Button as DsButton, Checkbox as DsCheckbox, CodeSnippet as DsCodeSnippet, ComposedModal as DsComposedModal, Dropdown as DsDropdown, FilterableMultiSelect as DsFilterableMultiSelect, Link as DsLink, 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, } from '@camunda/design-system/carbon-compat';
|
|
34
|
-
import { BreadcrumbSkeleton as CarbonBreadcrumbSkeleton, Button as CarbonButton, Checkbox as CarbonCheckbox, CodeSnippet as CarbonCodeSnippet, ComposedModal as CarbonComposedModal, Dropdown as CarbonDropdown, FilterableMultiSelect as CarbonFilterableMultiSelect, Link as CarbonLink, 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, } from '@carbon/react';
|
|
34
|
+
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';
|
|
35
36
|
import { createElement, Fragment, } from 'react';
|
|
36
37
|
import { useC4DesignSystem } from '../runtime/c4-console-runtime-context.js';
|
|
38
|
+
import { C4DefinitionTooltip } from './c4-definition-tooltip.js';
|
|
37
39
|
import { C4ModalDialog } from './c4-modal-dialog.js';
|
|
38
40
|
import { switchable } from './switchable.js';
|
|
39
41
|
export const Button = switchable(CarbonButton, DsButton);
|
|
40
42
|
export const Checkbox = switchable(CarbonCheckbox, DsCheckbox);
|
|
41
43
|
export const CodeSnippet = switchable(CarbonCodeSnippet, DsCodeSnippet);
|
|
44
|
+
// carbon-compat ships no definition-tooltip adapter, so the ds branch is the DS
|
|
45
|
+
// component directly (see ./c4-definition-tooltip). Unlike Carbon's, it renders
|
|
46
|
+
// the definition through a portal, so an ancestor that hides overflow does not
|
|
47
|
+
// clip it.
|
|
48
|
+
export const DefinitionTooltip = switchable(CarbonDefinitionTooltip, C4DefinitionTooltip);
|
|
42
49
|
export const Dropdown = switchable(CarbonDropdown, DsDropdown);
|
|
50
|
+
export const Form = switchable(CarbonForm, DsForm);
|
|
51
|
+
// ds drops FormGroup `message`/`messageText` (Carbon's inline helper-text
|
|
52
|
+
// variant). No c4 call site passes them.
|
|
53
|
+
export const FormGroup = switchable(CarbonFormGroup, DsFormGroup);
|
|
54
|
+
export const IconButton = switchable(CarbonIconButton, DsIconButton);
|
|
43
55
|
export const Link = switchable(CarbonLink, DsLink);
|
|
56
|
+
// carbon-compat has no OrderedList adapter, so an `<ol>` stays Carbon in both
|
|
57
|
+
// modes and styles its items through `.cds--list__item`. A ds ListItem inside
|
|
58
|
+
// that `<ol>` loses those styles. Use this export inside UnorderedList only.
|
|
59
|
+
export const ListItem = switchable(CarbonListItem, DsListItem);
|
|
44
60
|
export const Loading = switchable(CarbonLoading, DsLoading);
|
|
45
61
|
export const Modal = switchable(CarbonModal, C4ModalDialog);
|
|
46
62
|
export const ComposedModal = switchable(CarbonComposedModal, DsComposedModal);
|
|
@@ -95,6 +111,7 @@ export const TextArea = C4TextArea;
|
|
|
95
111
|
export const TextInput = switchable(CarbonTextInput, DsTextInput);
|
|
96
112
|
export const Tile = switchable(CarbonTile, DsTile);
|
|
97
113
|
export const Toggle = switchable(CarbonToggle, DsToggle);
|
|
114
|
+
export const UnorderedList = switchable(CarbonUnorderedList, DsUnorderedList);
|
|
98
115
|
// Carbon Tooltip is generic over its trigger element; erase for the switch then
|
|
99
116
|
// restore the Carbon type so call sites keep props like `align`/`autoAlign`.
|
|
100
117
|
// Carbon mode uses them for positioning; the carbon-compat adapter has no
|
|
@@ -112,15 +112,16 @@ const ROLE_LABEL_DEFAULTS = {
|
|
|
112
112
|
* aligned model gives it new copy; anything absent keeps its pre-alignment label
|
|
113
113
|
* and description. Display projection only; raw role ids are unchanged.
|
|
114
114
|
*
|
|
115
|
-
* Org Owner
|
|
116
|
-
*
|
|
115
|
+
* Org Owner and Org Admin show the full "Organization" word, not the short
|
|
116
|
+
* form. The short form saved little space. It also forced screen readers to
|
|
117
|
+
* expand an abbreviation on every announcement. `member` is renamed
|
|
117
118
|
* because `modeler` takes over the "Member" name; it is a rename, not a
|
|
118
119
|
* promotion, so it stays legacy-marked. `analyst` is here only for its
|
|
119
120
|
* description, which now refers to Member rather than Modeler.
|
|
120
121
|
*/
|
|
121
122
|
const ALIGNED_ROLE_LABEL_DEFAULTS = {
|
|
122
|
-
[OrganizationRole.OWNER]: '
|
|
123
|
-
[OrganizationRole.ADMIN]: '
|
|
123
|
+
[OrganizationRole.OWNER]: 'Organization Owner',
|
|
124
|
+
[OrganizationRole.ADMIN]: 'Organization Admin',
|
|
124
125
|
[OrganizationRole.MODELER]: 'Member',
|
|
125
126
|
[OrganizationRole.OPERATIONS_ENGINEER]: 'DevOps',
|
|
126
127
|
[OrganizationRole.MEMBER]: 'Console Member',
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { C4WidgetScope } from '../widgets/c4-widget-scope.types.js';
|
|
2
|
+
export type TranslateFn = (key: string) => string;
|
|
3
|
+
/**
|
|
4
|
+
* Key suffix carrying the environment-scoped wording of a copy string. Follows
|
|
5
|
+
* the i18next context convention so both wordings can be translated
|
|
6
|
+
* independently.
|
|
7
|
+
*/
|
|
8
|
+
export declare const ENVIRONMENT_KEY_SUFFIX = "_environment";
|
|
9
|
+
/**
|
|
10
|
+
* A translation lookup that always yields something renderable: the fallback
|
|
11
|
+
* when there is no `t`, when `t` echoes the key back untranslated (with or
|
|
12
|
+
* without its namespace), when it returns an empty string, or when it throws.
|
|
13
|
+
*
|
|
14
|
+
* c4 widgets take `t` from the host runtime, which may not have the c4 bundles
|
|
15
|
+
* registered at all, so every lookup needs a built-in English fallback.
|
|
16
|
+
*/
|
|
17
|
+
export declare function safeTranslate(t: TranslateFn | undefined, key: string, fallback: string): string;
|
|
18
|
+
/**
|
|
19
|
+
* Resolves a copy string that reads differently per scope: `key` in `'cluster'`
|
|
20
|
+
* scope, `<key>_environment` in `'environment'` scope, each with its own English
|
|
21
|
+
* fallback.
|
|
22
|
+
*
|
|
23
|
+
* Only use this for copy that actually *describes the surface* ("…running
|
|
24
|
+
* against the cluster"). A product feature name is not scoped copy — see
|
|
25
|
+
* `docs/environment-embedding.md`.
|
|
26
|
+
*/
|
|
27
|
+
export declare function scopedTranslate(t: TranslateFn | undefined, scope: C4WidgetScope, key: string, clusterFallback: string, environmentFallback: string): string;
|
|
@@ -0,0 +1,56 @@
|
|
|
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
|
+
* Key suffix carrying the environment-scoped wording of a copy string. Follows
|
|
8
|
+
* the i18next context convention so both wordings can be translated
|
|
9
|
+
* independently.
|
|
10
|
+
*/
|
|
11
|
+
export const ENVIRONMENT_KEY_SUFFIX = '_environment';
|
|
12
|
+
/**
|
|
13
|
+
* A translation lookup that always yields something renderable: the fallback
|
|
14
|
+
* when there is no `t`, when `t` echoes the key back untranslated (with or
|
|
15
|
+
* without its namespace), when it returns an empty string, or when it throws.
|
|
16
|
+
*
|
|
17
|
+
* c4 widgets take `t` from the host runtime, which may not have the c4 bundles
|
|
18
|
+
* registered at all, so every lookup needs a built-in English fallback.
|
|
19
|
+
*/
|
|
20
|
+
export function safeTranslate(t, key, fallback) {
|
|
21
|
+
if (!t)
|
|
22
|
+
return fallback;
|
|
23
|
+
let translated;
|
|
24
|
+
try {
|
|
25
|
+
translated = t(key);
|
|
26
|
+
}
|
|
27
|
+
catch {
|
|
28
|
+
return fallback;
|
|
29
|
+
}
|
|
30
|
+
if (!translated || translated === key) {
|
|
31
|
+
return fallback;
|
|
32
|
+
}
|
|
33
|
+
// i18next can return the key *without* the namespace when the namespace is
|
|
34
|
+
// missing: `clusterdetails:searchLabel` -> `searchLabel`. That is a miss too.
|
|
35
|
+
if (key.includes(':')) {
|
|
36
|
+
const withoutNamespace = key.split(':').slice(1).join(':');
|
|
37
|
+
if (translated === withoutNamespace) {
|
|
38
|
+
return fallback;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
return translated;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Resolves a copy string that reads differently per scope: `key` in `'cluster'`
|
|
45
|
+
* scope, `<key>_environment` in `'environment'` scope, each with its own English
|
|
46
|
+
* fallback.
|
|
47
|
+
*
|
|
48
|
+
* Only use this for copy that actually *describes the surface* ("…running
|
|
49
|
+
* against the cluster"). A product feature name is not scoped copy — see
|
|
50
|
+
* `docs/environment-embedding.md`.
|
|
51
|
+
*/
|
|
52
|
+
export function scopedTranslate(t, scope, key, clusterFallback, environmentFallback) {
|
|
53
|
+
return scope === 'environment'
|
|
54
|
+
? safeTranslate(t, `${key}${ENVIRONMENT_KEY_SUFFIX}`, environmentFallback)
|
|
55
|
+
: safeTranslate(t, key, clusterFallback);
|
|
56
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { CSSProperties } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* A card's own internal title (e.g. a sub-section heading inside a Tile),
|
|
4
|
+
* pinned to an explicit size/weight so it can't inherit a host's ambient
|
|
5
|
+
* heading styles when this widget is embedded outside Console — the same bug
|
|
6
|
+
* a blanket tag-based CSS rule couldn't fix without also shrinking
|
|
7
|
+
* `C4Breadcrumb`'s page title, which uses the same bare tag for a different
|
|
8
|
+
* purpose. Bare h2-h4 elements are pinned individually at their own source
|
|
9
|
+
* with this style instead — see `c4-ui.css`.
|
|
10
|
+
*/
|
|
11
|
+
export declare const SECTION_HEADING_STYLE: CSSProperties;
|
|
12
|
+
/** A heading nested a level deeper than `SECTION_HEADING_STYLE`, inside another section's own title. */
|
|
13
|
+
export declare const SECTION_SUBHEADING_STYLE: CSSProperties;
|
|
@@ -0,0 +1,25 @@
|
|
|
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
|
+
* A card's own internal title (e.g. a sub-section heading inside a Tile),
|
|
8
|
+
* pinned to an explicit size/weight so it can't inherit a host's ambient
|
|
9
|
+
* heading styles when this widget is embedded outside Console — the same bug
|
|
10
|
+
* a blanket tag-based CSS rule couldn't fix without also shrinking
|
|
11
|
+
* `C4Breadcrumb`'s page title, which uses the same bare tag for a different
|
|
12
|
+
* purpose. Bare h2-h4 elements are pinned individually at their own source
|
|
13
|
+
* with this style instead — see `c4-ui.css`.
|
|
14
|
+
*/
|
|
15
|
+
export const SECTION_HEADING_STYLE = {
|
|
16
|
+
margin: 0,
|
|
17
|
+
fontSize: '16px',
|
|
18
|
+
fontWeight: 600,
|
|
19
|
+
};
|
|
20
|
+
/** A heading nested a level deeper than `SECTION_HEADING_STYLE`, inside another section's own title. */
|
|
21
|
+
export const SECTION_SUBHEADING_STYLE = {
|
|
22
|
+
margin: 0,
|
|
23
|
+
fontSize: '14px',
|
|
24
|
+
fontWeight: 600,
|
|
25
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The surface a widget is rendered on.
|
|
3
|
+
*
|
|
4
|
+
* On SaaS a cluster hosts exactly one environment, so several surfaces (job
|
|
5
|
+
* workers, connectors, API clients, connector secrets) are reachable from both a
|
|
6
|
+
* cluster page and an environment page. The scope tells the widget which wording
|
|
7
|
+
* to use and whether it owns its own chrome.
|
|
8
|
+
*
|
|
9
|
+
* - `'cluster'` (default) — the widget is the cluster-scoped page. It uses
|
|
10
|
+
* cluster wording and renders its own `Clusters → <cluster>` breadcrumb and
|
|
11
|
+
* page padding. This is the only behaviour that existed before the prop, and
|
|
12
|
+
* it stays byte-identical.
|
|
13
|
+
* - `'environment'` — the widget is embedded in a host's environment page. It
|
|
14
|
+
* renders **no breadcrumb of its own** and **no page padding**, because the
|
|
15
|
+
* host page owns navigation and spacing, and it uses environment wording for
|
|
16
|
+
* copy that actually describes the surface. A widget whose copy is
|
|
17
|
+
* scope-neutral has no scoped keys; there the only effects are the suppressed
|
|
18
|
+
* breadcrumb and padding. See each widget's `scope` prop for what it does.
|
|
19
|
+
*/
|
|
20
|
+
export type C4WidgetScope = 'cluster' | 'environment';
|