@camunda/ccma-saas-frontend 0.6.0 → 0.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/esm/components/c4-billing-page/elements/value-metric.js +2 -4
- package/lib/esm/components/c4-charts-dashboard/elements/bar-chart.js +24 -10
- package/lib/esm/components/c4-cluster-details-secure-connectivity/c4-cluster-details-secure-connectivity.js +6 -2
- package/lib/esm/components/c4-cluster-settings/c4-cluster-settings.d.ts +1 -1
- package/lib/esm/components/c4-cluster-settings/c4-cluster-settings.js +4 -2
- package/lib/esm/components/c4-cluster-settings/c4-cluster-settings.mocks.js +1 -1
- package/lib/esm/components/c4-cluster-settings/c4-cluster-settings.types.d.ts +4 -0
- package/lib/esm/components/c4-cluster-settings/elements/external-identity-provider-modal.js +17 -7
- package/lib/esm/components/c4-cluster-settings/elements/external-identity-provider.d.ts +12 -1
- package/lib/esm/components/c4-cluster-settings/elements/external-identity-provider.js +9 -3
- package/lib/esm/components/c4-cluster-settings/elements/session-settings.d.ts +13 -0
- package/lib/esm/components/c4-cluster-settings/elements/session-settings.js +69 -0
- package/lib/esm/components/c4-create-alert-modal/c4-create-alert-modal.js +21 -3
- package/lib/esm/components/c4-create-alert-modal/c4-create-alert-modal.mocks.js +2 -1
- package/lib/esm/components/c4-create-alert-modal/c4-create-alert-modal.types.d.ts +1 -0
- 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 +13 -2
- package/lib/esm/components/c4-create-ip-whitelist-modal/c4-create-ip-whitelist-modal.js +8 -4
- package/lib/esm/components/c4-create-trial-organization-modal/c4-create-trial-organization-modal.js +1 -2
- package/lib/esm/components/c4-delete-organization-modal/c4-delete-organization-modal.d.ts +1 -1
- package/lib/esm/components/c4-delete-organization-modal/c4-delete-organization-modal.js +3 -3
- package/lib/esm/components/c4-delete-organization-modal/c4-delete-organization-modal.types.d.ts +7 -0
- 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-management-api/c4-management-api.js +8 -3
- package/lib/esm/components/c4-navigation/c4-navigation.js +17 -9
- 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 +8 -2
- package/lib/esm/components/c4-usage-history/elements/usage-history-charts.js +2 -2
- 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/modals/apiclients.json +4 -1
- package/lib/esm/i18n/en/pages/clusterdetails.json +2 -2
- package/lib/esm/i18n/en/pages/orgmanagement.json +9 -1
- package/lib/esm/runtime/build-cluster-swagger-url.js +2 -2
- 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/http-error-message.d.ts +14 -0
- package/lib/esm/utils/http-error-message.js +35 -0
- package/lib/esm/utils/role-labels.js +5 -4
- 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.d.ts +3 -0
- package/lib/esm/widgets/cluster-details/c4-cluster-details-app.js +153 -37
- package/lib/esm/widgets/cluster-details/c4-cluster-details-app.types.d.ts +3 -0
- package/lib/esm/widgets/cluster-details/c4-cluster-details-page.js +51 -16
- package/lib/esm/widgets/cluster-details/c4-cluster-details-page.types.d.ts +5 -0
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-alerts-tab.d.ts +1 -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-clients-tab.js +3 -4
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-connector-secrets-tab.js +2 -2
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-encryption-tab.js +1 -1
- 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.d.ts +1 -1
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-ip-whitelist-tab.js +16 -5
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-overview-tab.js +16 -16
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-settings-tab.js +115 -28
- package/lib/esm/widgets/connector-management/c4-connector-management-executable-details-page.js +2 -1
- package/lib/esm/widgets/connector-management/c4-connector-management-executables-table-page.js +2 -1
- package/lib/esm/widgets/connector-management/c4-connector-management-outbound-details-page.js +2 -1
- package/lib/esm/widgets/connector-management/c4-connector-management-page.js +2 -1
- 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/group-details/c4-group-details-page.js +2 -2
- package/lib/esm/widgets/management/c4-management-app.js +369 -45
- package/lib/esm/widgets/management/tabs/c4-management-api-tab.js +22 -7
- package/lib/esm/widgets/management/tabs/c4-management-pricing-tab.js +1 -2
- package/lib/esm/widgets/management/tabs/c4-management-usage-tab.d.ts +30 -1
- package/lib/esm/widgets/management/tabs/c4-management-usage-tab.js +41 -15
- package/lib/esm/widgets/user-details/c4-user-details-page.js +3 -3
- package/package.json +4 -4
package/lib/esm/components/c4-delete-organization-modal/c4-delete-organization-modal.types.d.ts
CHANGED
|
@@ -3,6 +3,13 @@ export interface C4DeleteOrganizationModalProps {
|
|
|
3
3
|
open: boolean;
|
|
4
4
|
loading: boolean;
|
|
5
5
|
error?: boolean;
|
|
6
|
+
/**
|
|
7
|
+
* Reason the deletion failed, shown instead of the generic retry copy.
|
|
8
|
+
* The backend rejects a delete for preconditions the user can act on (org
|
|
9
|
+
* is the user's only org, an SSO connection still names it as its default
|
|
10
|
+
* org), and "please try again" is wrong advice for all of them.
|
|
11
|
+
*/
|
|
12
|
+
errorMessage?: string;
|
|
6
13
|
organizationName: string;
|
|
7
14
|
onRequestClose: () => void;
|
|
8
15
|
onRequestSubmit: () => void | Promise<void>;
|
|
@@ -34,6 +34,8 @@ export function C4HelpCenter({ open, onOpenChange, data, isLoading, helpLinks, o
|
|
|
34
34
|
return (_jsx(Dialog, { open: open, onOpenChange: onOpenChange, children: _jsx(DialogContent, { className: 'c4-ui flex flex-col gap-0 overflow-hidden overflow-y-hidden p-0', style: { maxWidth: 'min(900px, calc(100% - 2rem))', height: '80vh' }, children: showFullUI ? (_jsxs(_Fragment, { children: [_jsx(DialogHeader, { className: 'flex-shrink-0 border-b px-6 py-4', children: _jsx(DialogTitle, { children: "Help Center" }) }), _jsxs(Tabs, { orientation: 'vertical', value: effectiveActiveTabId, onValueChange: (id) => setActiveTabId(id), className: 'flex min-h-0 flex-1 flex-row overflow-hidden', children: [_jsxs("div", { className: 'flex w-52 flex-shrink-0 flex-col overflow-hidden border-r', children: [_jsx("p", { className: 'px-5 pb-2 pt-4 text-xs font-semibold uppercase text-neutral-foreground-subtle', children: "Topics" }), isLoading ? (_jsx("div", { className: 'flex flex-col gap-2 px-3', children: [1, 2, 3].map((i) => (_jsx("div", { className: 'h-8 animate-pulse rounded bg-neutral-background-strong' }, i))) })) : (_jsxs(TabsList, { variant: 'line', className: 'h-auto w-full flex-col items-start gap-1 rounded-none bg-transparent px-3', children: [tabs.map((tab) => (_jsx(TabsTrigger, { value: tab.id, className: 'w-full justify-start text-sm font-normal', children: tab.label }, tab.id))), hasFeedbackTab && tabs.length > 0 && (_jsx("div", { role: 'none', className: 'my-1 w-full px-2', children: _jsx("div", { className: 'h-px bg-border' }) })), hasFeedbackTab && (_jsxs(TabsTrigger, { value: FEEDBACK_TAB_ID, className: 'w-full justify-start gap-2 text-sm font-normal', children: [_jsx(MessageSquare, { className: 'size-4', "aria-hidden": true }), "Share your feedback"] }))] })), !isLoading && data?.links && data.links.length > 0 && (_jsx("div", { className: 'border-t px-3 py-2', children: data.links.map((link) => (_jsxs("a", { href: link.link, target: '_blank', rel: 'noopener noreferrer', className: 'flex items-center gap-1 px-2 py-1 text-xs text-neutral-foreground-subtle hover:underline', children: [link.label, _jsx(ExternalLink, { className: 'size-3', "aria-hidden": true })] }, link.id))) }))] }), isLoading ? (_jsx("div", { className: 'flex-1 p-6', children: _jsx("div", { className: 'grid grid-cols-2 gap-4', children: [1, 2, 3, 4].map((i) => (_jsx("div", { className: 'h-64 animate-pulse rounded-xl bg-neutral-background-strong' }, i))) }) })) : (_jsxs(ScrollArea, { className: 'flex-1', children: [tabs.map((tab) => (_jsx(TabsContent, { value: tab.id, className: 'mt-0 p-6', children: tab.tiles.length === 0 ? (_jsx("p", { className: 'text-sm text-neutral-foreground-subtle', children: "No content available." })) : (_jsx("div", { className: 'grid grid-cols-2 gap-4', children: tab.tiles.map((tile) => (_jsxs(Card, { className: 'flex flex-col', children: [tile.image && (_jsx("img", { src: tile.image, alt: '', className: 'h-32 w-full object-cover' })), _jsxs(CardHeader, { children: [_jsx(CardTitle, { className: 'text-sm', children: tile.title }), tile.timeToComplete && (_jsx(Badge, { variant: 'neutral', className: 'self-start text-xs', children: tile.timeToComplete }))] }), _jsx(CardContent, { className: 'flex-1', children: _jsx(CardDescription, { children: _jsx(ReactMarkdown, { components: {
|
|
35
35
|
p: ({ children }) => _jsx(_Fragment, { children: children }),
|
|
36
36
|
a: ({ children, href }) => (_jsx("a", { href: href, target: '_blank', rel: 'noopener noreferrer', children: children })),
|
|
37
|
-
}, children: tile.description }) }) }), tile.link && tile.cta && (_jsx(CardFooter, { children: _jsx(Button, { variant: 'secondary', size: 'sm', asChild: true, children: _jsxs("a", { href: tile.link, target: '_blank', rel: 'noopener noreferrer', children: [tile.cta, _jsx(ArrowRight, { className: 'ml-1 size-3', "aria-hidden": true })] }) }) }))] }, tile.card_id))) })) }, tab.id))), hasFeedbackTab && onSubmitFeedback && (_jsx(TabsContent, { value: FEEDBACK_TAB_ID, className: 'mt-0 p-6', children: _jsxs("div", { className: 'max-w-xl', children: [_jsx("p", { className: 'mb-4 text-sm text-neutral-foreground-subtle', children: "We actively use this information to fix problems and improve your experience with our products." }), _jsx(C4FeedbackForm, { onSubmit: onSubmitFeedback, isEnterprise: feedbackEnterprise, resetKey: open })] }) }))] }))] })] })) : (
|
|
37
|
+
}, children: tile.description }) }) }), tile.link && tile.cta && (_jsx(CardFooter, { children: _jsx(Button, { variant: 'secondary', size: 'sm', asChild: true, children: _jsxs("a", { href: tile.link, target: '_blank', rel: 'noopener noreferrer', children: [tile.cta, _jsx(ArrowRight, { className: 'ml-1 size-3', "aria-hidden": true })] }) }) }))] }, tile.card_id))) })) }, tab.id))), hasFeedbackTab && onSubmitFeedback && (_jsx(TabsContent, { value: FEEDBACK_TAB_ID, className: 'mt-0 p-6', children: _jsxs("div", { className: 'max-w-xl', children: [_jsx("p", { className: 'mb-4 text-sm text-neutral-foreground-subtle', children: "We actively use this information to fix problems and improve your experience with our products." }), _jsx(C4FeedbackForm, { onSubmit: onSubmitFeedback, isEnterprise: feedbackEnterprise, resetKey: open })] }) }))] }))] })] })) : (
|
|
38
|
+
/* Fallback: simple link list when no CMS data and no feedback tab */
|
|
39
|
+
_jsxs(_Fragment, { children: [_jsx(DialogHeader, { className: 'p-6', children: _jsx(DialogTitle, { children: "Help & support" }) }), _jsx("div", { className: 'flex flex-col gap-1 px-4', children: helpLinks &&
|
|
38
40
|
helpLinks.map((link) => (_jsx(Button, { variant: 'ghost', className: 'w-full justify-between', asChild: true, children: _jsxs("a", { href: link.href, target: '_blank', rel: 'noopener noreferrer', children: [link.label, _jsx(ExternalLink, { className: 'size-3.5 text-neutral-foreground-subtle', "aria-hidden": true })] }) }, link.key))) })] })) }) }));
|
|
39
41
|
}
|
|
@@ -4,8 +4,8 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
4
4
|
* under one or more contributor license agreements. Licensed under a commercial license.
|
|
5
5
|
* You may not use this file except in compliance with the commercial license.
|
|
6
6
|
*/
|
|
7
|
-
import { IconButton } from '@carbon/react';
|
|
8
7
|
import { Information } from '@carbon/react/icons/index.esm.js';
|
|
8
|
+
import { IconButton } from '../../ui/index.js';
|
|
9
9
|
export const C4InfoTooltip = ({ label, align, kind, renderIcon, }) => {
|
|
10
10
|
const config = {
|
|
11
11
|
label,
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { ListItem, UnorderedList } from '@carbon/react';
|
|
3
2
|
import { C4_ASSET_URLS } from '../../assetUrls.js';
|
|
4
|
-
import { CodeSnippet, Stack } from '../../ui/index.js';
|
|
3
|
+
import { CodeSnippet, ListItem, Stack, UnorderedList } from '../../ui/index.js';
|
|
5
4
|
import { C4DataTable } from '../c4-data-table/c4-data-table.js';
|
|
6
5
|
import { C4DataTableSkeleton } from '../c4-data-table/c4-data-table-skeleton.js';
|
|
7
6
|
import { C4EmptyState } from '../c4-empty-state/c4-empty-state.js';
|
|
@@ -192,7 +191,13 @@ export const C4ManagementApi = ({ clients, loading, showIpWhitelistColumn, showH
|
|
|
192
191
|
});
|
|
193
192
|
}
|
|
194
193
|
const expandedRow = () => {
|
|
195
|
-
return (
|
|
194
|
+
return (
|
|
195
|
+
// Force the primary text token: the ds DataTable's expansion region is
|
|
196
|
+
// styled by the design system, and the Carbon list text would otherwise
|
|
197
|
+
// inherit a colour that is too dark in ds dark mode. `--cds-text-primary`
|
|
198
|
+
// is the normal primary text in carbon and is remapped to the DS
|
|
199
|
+
// foreground (light in dark) under html.c4-ds.
|
|
200
|
+
_jsxs(UnorderedList, { style: { color: 'var(--cds-text-primary)' }, children: [_jsxs(ListItem, { style: { minHeight: '30px' }, children: [text.expandedClientSecret, ": ", text.expandedClientSecretNotVisible] }), _jsxs(ListItem, { style: { minHeight: '30px' }, children: [text.expandedApiUrl, ":", ' ', _jsx(CodeSnippet, { type: 'inline', feedback: text.urlCopiedFeedback, children: urls.apiUrl })] }), _jsxs(ListItem, { style: { minHeight: '30px' }, children: [text.expandedOauthUrl, ":", ' ', _jsx(CodeSnippet, { type: 'inline', feedback: text.urlCopiedFeedback, children: urls.oauthUrl })] })] }));
|
|
196
201
|
};
|
|
197
202
|
const component = (_jsxs(Stack, { gap: 3, children: [_jsx("div", { style: { display: 'flex', flexDirection: 'column', overflowX: 'auto' }, children: _jsx(C4DataTable, { headers: headerData, data: clients.map((item) => {
|
|
198
203
|
return { ...item, expansion: expandedRow() };
|
|
@@ -5,7 +5,7 @@ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-run
|
|
|
5
5
|
* You may not use this file except in compliance with the commercial license.
|
|
6
6
|
*/
|
|
7
7
|
import { C3Navigation, useC3HelpCenter, useC3Profile, } from '@camunda/camunda-composite-components';
|
|
8
|
-
import { AppHeader, AppSidebar, Badge, Button, DropdownMenuItem, NavBreadcrumb, NavBreadcrumbItem, SidebarProvider, TooltipProvider, UserMenu, } from '@camunda/design-system';
|
|
8
|
+
import { AppHeader, AppSidebar, Badge, Button, CamundaLogo, DropdownMenuItem, NavBreadcrumb, NavBreadcrumbItem, SidebarProvider, TooltipProvider, UserMenu, } from '@camunda/design-system';
|
|
9
9
|
import { Activity, BarChart3, HelpCircle, LayoutDashboard, ListChecks, Moon, Sun, Workflow, } from 'lucide-react';
|
|
10
10
|
import { useEffect, useRef, useState } from 'react';
|
|
11
11
|
import { useC4DesignSystem } from '../../runtime/c4-console-runtime-context.js';
|
|
@@ -19,9 +19,10 @@ import { C4HelpCenter, FEEDBACK_TAB_ID, } from '../c4-help-center/c4-help-center
|
|
|
19
19
|
*
|
|
20
20
|
* ds shell: AppSidebar (Camunda apps; cluster-scoped apps grouped with one
|
|
21
21
|
* child per cluster linking to that cluster's app endpoint) + AppHeader (a
|
|
22
|
-
* clickable
|
|
23
|
-
* switcher, and a UserMenu). Notifications and Help
|
|
24
|
-
* widgets are produced inside c3, not exposed in
|
|
22
|
+
* clickable Camunda logomark → dashboard next to the app name, a NavBreadcrumb
|
|
23
|
+
* Organization/Cluster context switcher, and a UserMenu). Notifications and Help
|
|
24
|
+
* are deferred (their data / widgets are produced inside c3, not exposed in
|
|
25
|
+
* these props).
|
|
25
26
|
*/
|
|
26
27
|
// C3 routeProps is opaque (`any`); navigate via the embedded mobx-router.
|
|
27
28
|
const navigate = (routeProps) => {
|
|
@@ -133,15 +134,22 @@ export const C4Navigation = (props) => {
|
|
|
133
134
|
const manageOrg = props.orgSideBar?.manageOrg;
|
|
134
135
|
const clustersElement = props.navbar?.elements?.find((e) => e.key === 'clusters');
|
|
135
136
|
const onConsoleClick = () => navigate(props.app?.routeProps);
|
|
136
|
-
|
|
137
|
+
// DS >= 0.46 centers `logo` in a `sidebarCollapsedWidth`-wide box (3.5rem) so
|
|
138
|
+
// the mark lines up with the collapsed rail's icons, and the header no longer
|
|
139
|
+
// pads its left edge. Only the logomark fits there — the app name used to be
|
|
140
|
+
// the `logo` itself and overflowed the box, clipping off the left of the
|
|
141
|
+
// viewport. It now rides beside the box as `appName`, and the mark keeps the
|
|
142
|
+
// click-to-dashboard affordance.
|
|
143
|
+
const appName = props.app?.name ?? 'Console';
|
|
144
|
+
const logoButton = (_jsx("button", { type: 'button', onClick: onConsoleClick, "aria-label": props.app?.ariaLabel ?? appName, style: {
|
|
137
145
|
background: 'none',
|
|
138
146
|
border: 0,
|
|
139
147
|
padding: 0,
|
|
140
148
|
cursor: 'pointer',
|
|
141
|
-
|
|
142
|
-
|
|
149
|
+
display: 'flex',
|
|
150
|
+
alignItems: 'center',
|
|
143
151
|
color: 'inherit',
|
|
144
|
-
}, children:
|
|
152
|
+
}, children: _jsx(CamundaLogo, { className: 'size-6' }) }));
|
|
145
153
|
const breadcrumb = (_jsxs(NavBreadcrumb, { "aria-label": 'Navigation', children: [_jsx(NavBreadcrumbItem, { label: activeOrg?.name ?? 'Organization', switchLabel: 'Switch organization', onClick: activeOrg && manageOrg ? () => manageOrg(activeOrg.uuid) : undefined, children: orgs && orgs.length > 0 && switchToOrg
|
|
146
154
|
? orgs.map((org) => (_jsx(DropdownMenuItem, { onClick: () => switchToOrg(org.uuid), children: org.name }, org.uuid)))
|
|
147
155
|
: undefined }), _jsx(NavBreadcrumbItem, { label: 'Clusters', switchLabel: 'Switch cluster', onClick: clustersElement
|
|
@@ -168,7 +176,7 @@ export const C4Navigation = (props) => {
|
|
|
168
176
|
const isDark = resolvedTheme === 'dark';
|
|
169
177
|
const themeToggle = (_jsx(Button, { variant: 'ghost', size: 'icon', type: 'button', "aria-label": isDark ? 'Switch to light theme' : 'Switch to dark theme', onClick: () => onThemeChange(isDark ? 'light' : 'dark'), children: isDark ? (_jsx(Sun, { "aria-hidden": true, className: 'size-4' })) : (_jsx(Moon, { "aria-hidden": true, className: 'size-4' })) }));
|
|
170
178
|
const trailing = (_jsxs(_Fragment, { children: [themeToggle, helpControl, renderUserMenu(props)] }));
|
|
171
|
-
return (_jsx(TooltipProvider, { delayDuration: 0, children: _jsx(SidebarProvider, { children: _jsxs("div", { className: 'min-h-screen bg-background text-neutral-foreground-strong', children: [_jsx(AppHeader, { skipToContentTargetId: 'main-content', logo:
|
|
179
|
+
return (_jsx(TooltipProvider, { delayDuration: 0, children: _jsx(SidebarProvider, { children: _jsxs("div", { className: 'min-h-screen bg-background text-neutral-foreground-strong', children: [_jsx(AppHeader, { skipToContentTargetId: 'main-content', logo: logoButton, appName: appName, breadcrumb: breadcrumb, trailing: trailing, children: tagBadges }), _jsx(AppSidebar, { ariaLabel: 'Camunda apps', items: appItems }), _jsx("main", { id: 'main-content', tabIndex: -1, style: { marginLeft: 'var(--app-sidebar-width, 16rem)' }, children: children }), _jsx(C4HelpCenter, { open: isHelpCenterOpen, onOpenChange: (open) => {
|
|
172
180
|
if (!open)
|
|
173
181
|
setIsHelpCenterOpen(false);
|
|
174
182
|
}, data: helpCenterData, isLoading: helpCenterLoading, helpLinks: helpLinks, onSubmitFeedback: props.onSubmitFeedback, feedbackEnterprise: props.feedbackEnterprise, initialTabId: showTabId === 'feedback' ? FEEDBACK_TAB_ID : undefined })] }) }) }));
|
|
@@ -4,8 +4,8 @@ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-run
|
|
|
4
4
|
* under one or more contributor license agreements. Licensed under a commercial license.
|
|
5
5
|
* You may not use this file except in compliance with the commercial license.
|
|
6
6
|
*/
|
|
7
|
-
import { DefinitionTooltip } from '@carbon/react';
|
|
8
7
|
import { CheckmarkFilled, WarningFilled } from '@carbon/react/icons/index.esm.js';
|
|
8
|
+
import { DefinitionTooltip } from '../../ui/index.js';
|
|
9
9
|
import { StatusColor, } from '../c4-cluster-overview/applications.js';
|
|
10
10
|
import { C4LinkButton } from '../c4-link-button/c4-link-button.js';
|
|
11
11
|
export const HealthStatus = (props) => {
|
|
@@ -30,6 +30,12 @@ export interface UsageHistoryChartsProps {
|
|
|
30
30
|
pi: LineChartConfig;
|
|
31
31
|
di?: LineChartConfig;
|
|
32
32
|
tu?: LineChartConfig;
|
|
33
|
+
/**
|
|
34
|
+
* Daily active tenants for the org. Set only when the host has enabled the
|
|
35
|
+
* tenants value metric (a staged feature flag) *and* the org is on the 2025
|
|
36
|
+
* licensing model — so treat it as optional even for a 2025 org.
|
|
37
|
+
*/
|
|
38
|
+
tenants?: LineChartConfig;
|
|
33
39
|
}
|
|
34
|
-
export declare const UsageHistoryCharts: ({ pi, di, tu, }: UsageHistoryChartsProps) => JSX.Element;
|
|
35
|
-
export declare const ValueMetricsLineChart: import("react").
|
|
40
|
+
export declare const UsageHistoryCharts: ({ pi, di, tu, tenants, }: UsageHistoryChartsProps) => JSX.Element;
|
|
41
|
+
export declare const ValueMetricsLineChart: import("react").NamedExoticComponent<LineChartConfig>;
|
|
@@ -9,8 +9,8 @@ import { memo } from 'react';
|
|
|
9
9
|
import { useC4DesignSystem } from '../../../runtime/c4-console-runtime-context.js';
|
|
10
10
|
import { Stack } from '../../../ui/index.js';
|
|
11
11
|
import { DsLineChart } from '../../shared-charts/ds-line-chart.js';
|
|
12
|
-
export const UsageHistoryCharts = ({ pi, di, tu, }) => {
|
|
13
|
-
const component = (_jsxs(Stack, { gap: 4, children: [_jsx(ValueMetricsLineChart, { ...pi }), di && _jsx(ValueMetricsLineChart, { ...di }), tu && _jsx(ValueMetricsLineChart, { ...tu })] }));
|
|
12
|
+
export const UsageHistoryCharts = ({ pi, di, tu, tenants, }) => {
|
|
13
|
+
const component = (_jsxs(Stack, { gap: 4, children: [_jsx(ValueMetricsLineChart, { ...pi }), tenants && _jsx(ValueMetricsLineChart, { ...tenants }), di && _jsx(ValueMetricsLineChart, { ...di }), tu && _jsx(ValueMetricsLineChart, { ...tu })] }));
|
|
14
14
|
return component;
|
|
15
15
|
};
|
|
16
16
|
// Memoized: the Carbon LineChart re-initializes its underlying D3 chart whenever
|
|
@@ -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": {
|
|
@@ -73,7 +73,10 @@
|
|
|
73
73
|
"create": "Create",
|
|
74
74
|
"delete": "Delete",
|
|
75
75
|
"get": "Get",
|
|
76
|
-
"update": "Update"
|
|
76
|
+
"update": "Update",
|
|
77
|
+
"getSchedule": "Get schedule",
|
|
78
|
+
"updateSchedule": "Create + update schedule",
|
|
79
|
+
"deleteSchedule": "Delete schedule"
|
|
77
80
|
},
|
|
78
81
|
"activity": {
|
|
79
82
|
"label": "Activity Logs",
|
|
@@ -585,7 +585,7 @@
|
|
|
585
585
|
"lowLatency": {
|
|
586
586
|
"title": "Low latency updates",
|
|
587
587
|
"warning": "This setting is not recommended for production environments, as it might reduce individual process instance latency but can slow down general throughput.",
|
|
588
|
-
"description": "When enabled, updates and changes in Modeler
|
|
588
|
+
"description": "When enabled, updates and changes in Modeler Test mode, Operate and Tasklist are applied quicker, which is ideal for testing purposes.",
|
|
589
589
|
"action": {
|
|
590
590
|
"enabled": "Disable low latency for this cluster",
|
|
591
591
|
"disabled": "Enable low latency for this cluster"
|
|
@@ -650,7 +650,7 @@
|
|
|
650
650
|
}
|
|
651
651
|
},
|
|
652
652
|
"appIntegrations": {
|
|
653
|
-
"title": "Enable
|
|
653
|
+
"title": "Enable app integrations extensions",
|
|
654
654
|
"description": "When enabled, this cluster exchanges events with App Integrations such as",
|
|
655
655
|
"msTeamsLinkText": "Microsoft Teams",
|
|
656
656
|
"descriptionDisabled": "When disabled, you can still use App Integrations, but they work with reduced functionality."
|
|
@@ -312,12 +312,17 @@
|
|
|
312
312
|
"processInstances": "Process instances",
|
|
313
313
|
"decisionInstances": "Decision instances",
|
|
314
314
|
"taskUsers": "Task users",
|
|
315
|
+
"tenants": "Tenants",
|
|
315
316
|
"generalUsers": "General users",
|
|
316
317
|
"deployedModels": "Deployed models",
|
|
317
318
|
"actions": {
|
|
318
319
|
"editReservations": "Edit",
|
|
319
320
|
"editGeneralUsers": "Edit"
|
|
320
321
|
},
|
|
322
|
+
"errors": {
|
|
323
|
+
"forbidden": "You do not have permission to view usage data for this organization. An organization owner or admin can see it.",
|
|
324
|
+
"default": "Usage data could not be loaded. Try again in a moment."
|
|
325
|
+
},
|
|
321
326
|
"table": {
|
|
322
327
|
"type": "Type",
|
|
323
328
|
"currentUsage": "Current usage",
|
|
@@ -432,7 +437,10 @@
|
|
|
432
437
|
"updateEncryption": "Update encryption",
|
|
433
438
|
"rotate": "Rotate Password",
|
|
434
439
|
"activate": "Activate",
|
|
435
|
-
"deactivate": "Deactivate"
|
|
440
|
+
"deactivate": "Deactivate",
|
|
441
|
+
"getSchedule": "Get schedule",
|
|
442
|
+
"updateSchedule": "Create + update schedule",
|
|
443
|
+
"deleteSchedule": "Delete schedule"
|
|
436
444
|
},
|
|
437
445
|
"description": "Client credentials can be used to request an OAuth access token. See the <0>Administration API Reference (REST)</0> documentation for details on how to retrieve an access token.",
|
|
438
446
|
"noClients": {
|
|
@@ -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) {
|
|
@@ -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
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The user-facing reason a request was rejected, or `undefined` when there
|
|
3
|
+
* isn't one worth showing.
|
|
4
|
+
*
|
|
5
|
+
* Backends send their reason as the plain-text response body (see
|
|
6
|
+
* `errorMiddleware`), and `packages/api` puts that body on `HttpError.message`
|
|
7
|
+
* (its constructor forwards its `statusText` argument to `super()`, so
|
|
8
|
+
* `.message` — not `.statusText` — is the body).
|
|
9
|
+
*
|
|
10
|
+
* Only 4xx reasons are surfaced: they indicate a client-side rejection (for
|
|
11
|
+
* example unmet preconditions like "you are not in more than one org"). 5xx
|
|
12
|
+
* bodies are our own failure text and tell the user nothing they can use.
|
|
13
|
+
*/
|
|
14
|
+
export declare function clientErrorMessage(error: unknown): string | undefined;
|