@camunda/ccma-saas-frontend 0.38.0 → 0.38.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-cluster-details-clients/c4-cluster-details-clients.js +1 -1
- package/lib/esm/components/c4-job-dashboard-details-page/elements/c4-job-dashboard-time-chart.js +1 -1
- 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 +5 -3
- package/lib/esm/components/c4-link-button/c4-link-button.types.d.ts +1 -0
- package/lib/esm/components/c4-page-layout/c4-page-layout.d.ts +3 -2
- package/lib/esm/components/c4-page-layout/c4-page-layout.js +10 -2
- package/lib/esm/components/c4-page-template/c4-page-template.js +2 -2
- package/lib/esm/components/c4-toggle/c4-toggle.js +1 -1
- package/lib/esm/components/c4-tsuga-links/c4-tsuga-links.js +1 -1
- package/package.json +1 -1
|
@@ -214,7 +214,7 @@ export const C4ClusterDetailsClients = ({ clients, isLoading, hasError, hasIdent
|
|
|
214
214
|
width: '100%',
|
|
215
215
|
}, children: _jsx(C4DataTable, { data: tableData, isLoading: isLoading, headers: headerData, actions: actions, toolbar: toolbar, title: text.title, description: (() => {
|
|
216
216
|
if (hasIdentityIntegration && hasIdentityAuthorization) {
|
|
217
|
-
return (_jsxs(Stack, { children: [_jsxs("p", { children: [text.subtitleIdentityPrefix, ' ', _jsx(C4LinkButton, { label: text.subtitleIdentityLinkLabel, onClick: onOpenDocs
|
|
217
|
+
return (_jsxs(Stack, { children: [_jsxs("p", { children: [text.subtitleIdentityPrefix, ' ', _jsx(C4LinkButton, { label: text.subtitleIdentityLinkLabel, onClick: onOpenDocs }), text.subtitleIdentitySuffix] }), _jsx(Button, { kind: 'tertiary', size: 'md', onClick: onOpenIdentity, children: text.identityButton })] }));
|
|
218
218
|
}
|
|
219
219
|
else {
|
|
220
220
|
return text.subtitle;
|
package/lib/esm/components/c4-job-dashboard-details-page/elements/c4-job-dashboard-time-chart.js
CHANGED
|
@@ -60,6 +60,6 @@ function C4JobDashboardTimeChart({ timeSeries, isLoading, translations, error, }
|
|
|
60
60
|
position: 'insideLeft',
|
|
61
61
|
fill: DS_CHART_AXIS_COLOR,
|
|
62
62
|
fontSize: 12,
|
|
63
|
-
} }), _jsx(Tooltip, { ...DS_CHART_TOOLTIP_PROPS, labelFormatter: (label) => formatTooltipTimestamp(String(label)) }), _jsx(Legend, { verticalAlign: 'top', wrapperStyle: { color: DS_CHART_AXIS_COLOR, fontSize: 12 } }), _jsx(Area, { type: 'monotone', dataKey: translations.charts.legend.created, stackId: 'status', stroke: JOB_STATUS_DS_COLORS.created, fill: JOB_STATUS_DS_COLORS.created, fillOpacity: 0.6 }), _jsx(Area, { type: 'monotone', dataKey: translations.charts.legend.completed, stackId: 'status', stroke: JOB_STATUS_DS_COLORS.completed, fill: JOB_STATUS_DS_COLORS.completed, fillOpacity: 0.6 }), _jsx(Area, { type: 'monotone', dataKey: translations.charts.legend.failed, stackId: 'status', stroke: JOB_STATUS_DS_COLORS.failed, fill: JOB_STATUS_DS_COLORS.failed, fillOpacity: 0.6 })] }) }) }))] }));
|
|
63
|
+
} }), _jsx(Tooltip, { ...DS_CHART_TOOLTIP_PROPS, labelFormatter: (label) => formatTooltipTimestamp(String(label)) }), _jsx(Legend, { verticalAlign: 'top', wrapperStyle: { color: DS_CHART_AXIS_COLOR, fontSize: 12 } }), _jsx(Area, { type: 'monotone', dataKey: translations.charts.legend.created, stackId: 'status', stroke: JOB_STATUS_DS_COLORS.created, fill: JOB_STATUS_DS_COLORS.created, fillOpacity: 0.6, isAnimationActive: false }), _jsx(Area, { type: 'monotone', dataKey: translations.charts.legend.completed, stackId: 'status', stroke: JOB_STATUS_DS_COLORS.completed, fill: JOB_STATUS_DS_COLORS.completed, fillOpacity: 0.6, isAnimationActive: false }), _jsx(Area, { type: 'monotone', dataKey: translations.charts.legend.failed, stackId: 'status', stroke: JOB_STATUS_DS_COLORS.failed, fill: JOB_STATUS_DS_COLORS.failed, fillOpacity: 0.6, isAnimationActive: false })] }) }) }))] }));
|
|
64
64
|
}
|
|
65
65
|
export default C4JobDashboardTimeChart;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { JSX } from 'react';
|
|
2
2
|
import type { C4LinkButtonProps } from './c4-link-button.types.js';
|
|
3
|
-
export declare const C4LinkButton: ({ label, onClick, style,
|
|
3
|
+
export declare const C4LinkButton: ({ label, onClick, style, icon, disabled, ariaLabel, }: C4LinkButtonProps) => JSX.Element;
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
export const C4LinkButton = ({ label, onClick, style,
|
|
2
|
+
import { DsButton } from '../../ui/index.js';
|
|
3
|
+
export const C4LinkButton = ({ label, onClick, style, icon, disabled, ariaLabel, }) => {
|
|
4
4
|
if (disabled === undefined) {
|
|
5
5
|
disabled = false;
|
|
6
6
|
}
|
|
7
7
|
const customStyle = style ? style : {};
|
|
8
|
-
const component = (
|
|
8
|
+
const component = (
|
|
9
|
+
// A DS Button (role=button), not an <a> without href: it runs an action.
|
|
10
|
+
_jsxs(DsButton, { type: 'button', variant: 'link', className: 'h-auto p-0', onClick: () => !disabled && onClick(), style: { cursor: 'pointer', ...customStyle }, disabled: disabled, "aria-label": ariaLabel ?? (label || undefined), children: [label, icon && (_jsx("span", { style: {
|
|
9
11
|
marginLeft: '0.5rem',
|
|
10
12
|
verticalAlign: 'sub',
|
|
11
13
|
}, children: icon }))] }));
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { PageLayout } from '@camunda/design-system';
|
|
2
|
-
import type
|
|
2
|
+
import { type ComponentProps, type JSX } from 'react';
|
|
3
3
|
type C4PageLayoutProps = ComponentProps<typeof PageLayout>;
|
|
4
4
|
/**
|
|
5
5
|
* The DS `PageLayout` (consistent padding + width) for bespoke pages that do
|
|
6
|
-
* not route through `C4PageTemplate`.
|
|
6
|
+
* not route through `C4PageTemplate`. It must sit inside the `<main>` of
|
|
7
|
+
* `C4Navigation`, which owns the landmark and the skip-link target.
|
|
7
8
|
*/
|
|
8
9
|
export declare function C4PageLayout(props: C4PageLayoutProps): JSX.Element;
|
|
9
10
|
export {};
|
|
@@ -5,10 +5,18 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
5
5
|
* You may not use this file except in compliance with the commercial license.
|
|
6
6
|
*/
|
|
7
7
|
import { PageLayout } from '@camunda/design-system';
|
|
8
|
+
import { useId } from 'react';
|
|
8
9
|
/**
|
|
9
10
|
* The DS `PageLayout` (consistent padding + width) for bespoke pages that do
|
|
10
|
-
* not route through `C4PageTemplate`.
|
|
11
|
+
* not route through `C4PageTemplate`. It must sit inside the `<main>` of
|
|
12
|
+
* `C4Navigation`, which owns the landmark and the skip-link target.
|
|
11
13
|
*/
|
|
12
14
|
export function C4PageLayout(props) {
|
|
13
|
-
|
|
15
|
+
// The DS PageLayout always renders <main id="main-content"> and has no prop
|
|
16
|
+
// to change the tag. Unique id + presentation role is the workaround;
|
|
17
|
+
// replace it when the DS offers a non-main variant.
|
|
18
|
+
const generatedId = useId();
|
|
19
|
+
// 'main-content' is the skip-link target of C4Navigation, so never reuse it.
|
|
20
|
+
const id = props.id && props.id !== 'main-content' ? props.id : generatedId;
|
|
21
|
+
return _jsx(PageLayout, { ...props, id: id, role: 'presentation' });
|
|
14
22
|
}
|
|
@@ -4,15 +4,15 @@ import { jsx as _jsx, jsxs as _jsxs } 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 { PageLayout } from '@camunda/design-system';
|
|
8
7
|
import { Stack } from '../../ui/index.js';
|
|
9
8
|
import { C4ActionableNotification } from '../c4-actionable-notification/c4-actionable-notification.js';
|
|
10
9
|
import { C4Breadcrumb } from '../c4-breadcrumb/c4-breadcrumb.js';
|
|
11
10
|
import { C4InlineNotification } from '../c4-inline-notification/c4-inline-notification.js';
|
|
11
|
+
import { C4PageLayout } from '../c4-page-layout/c4-page-layout.js';
|
|
12
12
|
import { C4Tabs } from '../c4-tabs/c4-tabs.js';
|
|
13
13
|
const C4PageTemplate = ({ header, tabs, banner, children, loading = false, breadcrumbs = { elements: [] }, padding = 'default', }) => {
|
|
14
14
|
const inner = (_jsxs("div", { style: { display: 'flex', gap: '2rem', flexDirection: 'column' }, children: [(breadcrumbs.elements?.length || header) && (_jsx(C4Breadcrumb, { ...breadcrumbs, title: header?.title, menu: header?.menuItems, tag: header?.tag, indicator: header?.indicator, subtitleBadges: header?.subtitleBadges, loading: loading, codeSnippet: header?.codeSnippet })), banner &&
|
|
15
15
|
(banner.action ? (_jsx(C4ActionableNotification, { appearance: 'banner', kind: banner.kind, title: banner.title, subtitle: banner.subtitle, actionButtonLabel: banner.action.label, onActionButtonClick: banner.action.onClick, lowContrast: true })) : (_jsx(C4InlineNotification, { kind: banner.kind, hideCloseButton: !banner.onDismiss, onCloseButtonClick: banner.onDismiss, title: banner.title, subtitle: banner.subtitle, lowContrast: true }))), tabs && (_jsx(Stack, { orientation: 'vertical', gap: 5, children: _jsx(C4Tabs, { tabs: tabs.list, desiredTabId: tabs?.desiredTabId, onTabChange: tabs?.onChange, loading: loading }) })), children] }));
|
|
16
|
-
return _jsx(
|
|
16
|
+
return _jsx(C4PageLayout, { padding: padding, children: inner });
|
|
17
17
|
};
|
|
18
18
|
export { C4PageTemplate };
|
|
@@ -7,6 +7,6 @@ export const C4Toggle = ({ id, enabled, notices, onClick, permissions, title, su
|
|
|
7
7
|
const notification = !supported && unsupportedNotification ? (_jsx(C4InlineNotification, { kind: unsupportedNotification.kind, hideCloseButton: true, style: { maxWidth: '100%' }, title: unsupportedNotification.title, subtitle: unsupportedNotification.subtitle })) : null;
|
|
8
8
|
const disabled = !permissions.mayToggle || !supported;
|
|
9
9
|
const toggle = (_jsx("div", { className: 'c4-toggle', children: _jsx(Toggle, { id: `c4-toggle-${id}`, toggled: enabled, disabled: disabled, "aria-disabled": disabled, "aria-label": `Switch ${title}`, labelA: label?.disabled ?? 'Disabled', labelB: label?.enabled ?? 'Enabled', onClick: permissions.mayToggle && supported ? onClick : undefined }) }));
|
|
10
|
-
const component = (_jsxs(Stack, { gap: 6, children: [_jsxs(Stack, { gap: 4, children: [_jsx("h6", { children: title }), toggle, notification] }), notices.map((notice, index) => (_jsxs("div", { style: { maxWidth: '650px' }, children: [typeof notice.notice === 'string' ? (_jsx("p", { children: notice.notice })) : (_jsx("div", { children: notice.notice })), notice.action?.onClick && (_jsxs(_Fragment, { children: [' ', _jsx(C4LinkButton, { label: notice.action.label,
|
|
10
|
+
const component = (_jsxs(Stack, { gap: 6, children: [_jsxs(Stack, { gap: 4, children: [_jsx("h6", { children: title }), toggle, notification] }), notices.map((notice, index) => (_jsxs("div", { style: { maxWidth: '650px' }, children: [typeof notice.notice === 'string' ? (_jsx("p", { children: notice.notice })) : (_jsx("div", { children: notice.notice })), notice.action?.onClick && (_jsxs(_Fragment, { children: [' ', _jsx(C4LinkButton, { label: notice.action.label, onClick: () => notice.action?.onClick?.() })] })), notice.action?.url && (_jsxs(_Fragment, { children: [' ', _jsx(C4ExternalLink, { label: notice.action.label, href: notice.action.url, inline: true, id: 'notice-action' })] }))] }, `notice-${index}`)))] }));
|
|
11
11
|
return component;
|
|
12
12
|
};
|
|
@@ -6,7 +6,7 @@ import { buildTsugaLogsUrl } from './tsuga-logs-url.js';
|
|
|
6
6
|
* the retired GCP Cloud Logging (Stackdriver) links now that CCMA logs live in
|
|
7
7
|
* Tsuga. Opened on click so the time window is fresh (see `buildTsugaLogsUrl`).
|
|
8
8
|
*/
|
|
9
|
-
export const C4TsugaLinks = ({ query }) => (_jsx(C4LinkButton, {
|
|
9
|
+
export const C4TsugaLinks = ({ query }) => (_jsx(C4LinkButton, { label: 'Logs', onClick: () => window.open(buildTsugaLogsUrl(searchTermOf(query)), '_blank', 'noopener,noreferrer') }));
|
|
10
10
|
function searchTermOf(query) {
|
|
11
11
|
if ('clusterId' in query) {
|
|
12
12
|
return query.clusterId;
|