@camunda/ccma-saas-frontend 0.7.1 → 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.
Files changed (100) hide show
  1. package/lib/esm/components/c4-breadcrumb/c4-breadcrumb.d.ts +1 -1
  2. package/lib/esm/components/c4-breadcrumb/c4-breadcrumb.js +4 -4
  3. package/lib/esm/components/c4-breadcrumb/c4-breadcrumb.types.d.ts +6 -0
  4. package/lib/esm/components/c4-cluster-details-activity/c4-cluster-details-activity.js +2 -1
  5. package/lib/esm/components/c4-cluster-details-encryption/c4-cluster-details-encryption.js +10 -5
  6. package/lib/esm/components/c4-cluster-details-hot-backups/c4-cluster-details-hot-backups.js +4 -3
  7. package/lib/esm/components/c4-cluster-details-secure-connectivity/c4-cluster-details-secure-connectivity.js +2 -1
  8. package/lib/esm/components/c4-cluster-list/c4-cluster-list.d.ts +1 -1
  9. package/lib/esm/components/c4-cluster-list/c4-cluster-list.js +6 -4
  10. package/lib/esm/components/c4-cluster-list/c4-cluster-list.types.d.ts +7 -0
  11. package/lib/esm/components/c4-cluster-overview/applications.d.ts +8 -0
  12. package/lib/esm/components/c4-cluster-overview/applications.js +28 -23
  13. package/lib/esm/components/c4-cluster-overview/c4-cluster-overview.d.ts +1 -1
  14. package/lib/esm/components/c4-cluster-overview/c4-cluster-overview.js +5 -5
  15. package/lib/esm/components/c4-cluster-overview/c4-cluster-overview.types.d.ts +10 -0
  16. package/lib/esm/components/c4-cluster-overview/cluster-details.d.ts +7 -0
  17. package/lib/esm/components/c4-cluster-overview/cluster-details.js +5 -2
  18. package/lib/esm/components/c4-cluster-overview/cluster-load.d.ts +7 -0
  19. package/lib/esm/components/c4-cluster-overview/cluster-load.js +9 -5
  20. package/lib/esm/components/c4-cluster-settings/elements/danger-zone.js +2 -1
  21. package/lib/esm/components/c4-cluster-settings/elements/settings-tile.js +2 -1
  22. package/lib/esm/components/c4-job-dashboard-details-page/c4-job-dashboard-details-page.d.ts +1 -1
  23. package/lib/esm/components/c4-job-dashboard-details-page/c4-job-dashboard-details-page.js +2 -2
  24. package/lib/esm/components/c4-job-dashboard-details-page/c4-job-dashboard-details-page.types.d.ts +10 -0
  25. package/lib/esm/components/c4-job-dashboard-details-page/elements/c4-job-dashboard-chart-heading.js +2 -1
  26. package/lib/esm/components/c4-job-dashboard-details-page/elements/c4-job-dashboard-error-table.js +3 -2
  27. package/lib/esm/components/c4-job-dashboard-details-page/elements/c4-job-dashboard-worker-table.js +3 -2
  28. package/lib/esm/components/c4-job-dashboard-entry-point/c4-job-dashboard-entry-point.d.ts +1 -1
  29. package/lib/esm/components/c4-job-dashboard-entry-point/c4-job-dashboard-entry-point.js +7 -2
  30. package/lib/esm/components/c4-job-dashboard-entry-point/c4-job-dashboard-entry-point.types.d.ts +8 -0
  31. package/lib/esm/components/c4-job-dashboard-overview-page/c4-job-dashboard-overview.d.ts +1 -1
  32. package/lib/esm/components/c4-job-dashboard-overview-page/c4-job-dashboard-overview.js +2 -2
  33. package/lib/esm/components/c4-job-dashboard-overview-page/c4-job-dashboard-overview.types.d.ts +10 -0
  34. package/lib/esm/components/c4-job-dashboard-shared/c4-job-dashboard-error-handler.js +3 -2
  35. package/lib/esm/components/c4-link-button/c4-link-button.d.ts +1 -1
  36. package/lib/esm/components/c4-link-button/c4-link-button.js +2 -2
  37. package/lib/esm/components/c4-link-button/c4-link-button.types.d.ts +6 -0
  38. package/lib/esm/components/c4-page-template/c4-page-template.d.ts +13 -1
  39. package/lib/esm/components/c4-page-template/c4-page-template.js +3 -3
  40. package/lib/esm/i18n/en/pages/clusterdetails.json +3 -0
  41. package/lib/esm/i18n/en/pages/job-dashboard.json +2 -0
  42. package/lib/esm/index.d.ts +13 -1
  43. package/lib/esm/index.js +7 -1
  44. package/lib/esm/runtime/index.d.ts +1 -0
  45. package/lib/esm/runtime/index.js +1 -0
  46. package/lib/esm/utils/safe-translate.d.ts +27 -0
  47. package/lib/esm/utils/safe-translate.js +56 -0
  48. package/lib/esm/utils/section-heading-style.d.ts +13 -0
  49. package/lib/esm/utils/section-heading-style.js +25 -0
  50. package/lib/esm/widgets/c4-widget-scope.types.d.ts +20 -0
  51. package/lib/esm/widgets/c4-widget-scope.types.js +6 -0
  52. package/lib/esm/widgets/cluster-details/c4-cluster-details-app.js +24 -55
  53. package/lib/esm/widgets/cluster-details/c4-cluster-details-app.types.d.ts +27 -0
  54. package/lib/esm/widgets/cluster-details/c4-cluster-details-page.d.ts +1 -1
  55. package/lib/esm/widgets/cluster-details/c4-cluster-details-page.js +31 -4
  56. package/lib/esm/widgets/cluster-details/c4-cluster-details-page.types.d.ts +14 -0
  57. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-byom-clients-tab.js +3 -2
  58. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-clients-tab.d.ts +9 -1
  59. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-clients-tab.js +5 -13
  60. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-connector-secrets-tab.d.ts +31 -2
  61. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-connector-secrets-tab.js +32 -22
  62. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-overview-tab.d.ts +16 -1
  63. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-overview-tab.js +7 -2
  64. package/lib/esm/widgets/clusters/c4-clusters-page.d.ts +1 -1
  65. package/lib/esm/widgets/clusters/c4-clusters-page.js +2 -2
  66. package/lib/esm/widgets/clusters/c4-clusters-page.types.d.ts +7 -0
  67. package/lib/esm/widgets/connector-management/c4-connector-management-executable-details-page.d.ts +1 -1
  68. package/lib/esm/widgets/connector-management/c4-connector-management-executable-details-page.js +10 -5
  69. package/lib/esm/widgets/connector-management/c4-connector-management-executable-details-page.types.d.ts +9 -0
  70. package/lib/esm/widgets/connector-management/c4-connector-management-executables-table-page.d.ts +1 -1
  71. package/lib/esm/widgets/connector-management/c4-connector-management-executables-table-page.js +10 -5
  72. package/lib/esm/widgets/connector-management/c4-connector-management-executables-table-page.types.d.ts +9 -0
  73. package/lib/esm/widgets/connector-management/c4-connector-management-outbound-details-page.d.ts +1 -1
  74. package/lib/esm/widgets/connector-management/c4-connector-management-outbound-details-page.js +10 -5
  75. package/lib/esm/widgets/connector-management/c4-connector-management-outbound-details-page.types.d.ts +9 -0
  76. package/lib/esm/widgets/connector-management/c4-connector-management-page.d.ts +1 -1
  77. package/lib/esm/widgets/connector-management/c4-connector-management-page.js +10 -5
  78. package/lib/esm/widgets/connector-management/c4-connector-management-page.types.d.ts +10 -0
  79. package/lib/esm/widgets/environment/c4-cluster-api-clients-widget.d.ts +5 -0
  80. package/lib/esm/widgets/environment/c4-cluster-api-clients-widget.js +61 -0
  81. package/lib/esm/widgets/environment/c4-cluster-api-clients-widget.types.d.ts +21 -0
  82. package/lib/esm/widgets/environment/c4-cluster-api-clients-widget.types.js +6 -0
  83. package/lib/esm/widgets/environment/c4-cluster-connector-secrets-widget.d.ts +5 -0
  84. package/lib/esm/widgets/environment/c4-cluster-connector-secrets-widget.js +58 -0
  85. package/lib/esm/widgets/environment/c4-cluster-connector-secrets-widget.types.d.ts +22 -0
  86. package/lib/esm/widgets/environment/c4-cluster-connector-secrets-widget.types.js +6 -0
  87. package/lib/esm/widgets/environment/use-cluster-api-clients.d.ts +26 -0
  88. package/lib/esm/widgets/environment/use-cluster-api-clients.js +48 -0
  89. package/lib/esm/widgets/environment/use-cluster-swagger-url.d.ts +19 -0
  90. package/lib/esm/widgets/environment/use-cluster-swagger-url.js +44 -0
  91. package/lib/esm/widgets/environment/use-cluster-version-flags.d.ts +16 -0
  92. package/lib/esm/widgets/environment/use-cluster-version-flags.js +40 -0
  93. package/lib/esm/widgets/job-worker/c4-job-worker-details-page.d.ts +1 -1
  94. package/lib/esm/widgets/job-worker/c4-job-worker-details-page.js +34 -25
  95. package/lib/esm/widgets/job-worker/c4-job-worker-overview-page.d.ts +1 -1
  96. package/lib/esm/widgets/job-worker/c4-job-worker-overview-page.js +26 -21
  97. package/lib/esm/widgets/job-worker/c4-job-worker.helpers.d.ts +12 -0
  98. package/lib/esm/widgets/job-worker/c4-job-worker.helpers.js +6 -0
  99. package/lib/esm/widgets/job-worker/c4-job-worker.types.d.ts +19 -0
  100. package/package.json +6 -6
@@ -1,5 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
2
  import { Stack } from '../../../ui/index.js';
3
+ import { SECTION_HEADING_STYLE } from '../../../utils/section-heading-style.js';
3
4
  import { C4DataTable } from '../../c4-data-table/c4-data-table.js';
4
5
  import { C4BackgroundFetchingIndicator } from '../../c4-job-dashboard-shared/c4-background-fetching-indicator.js';
5
6
  import { C4JobDashboardErrorHandler } from '../../c4-job-dashboard-shared/c4-job-dashboard-error-handler.js';
@@ -13,7 +14,7 @@ function C4JobDashboardErrorTable({ errors, operateBaseUrl, isLoading, translati
13
14
  originalIndex: index,
14
15
  }));
15
16
  if (error || (!isLoading && errors.length === 0)) {
16
- return (_jsxs(Stack, { gap: 4, children: [_jsx("h2", { children: translations.errorTable.title }), _jsx(C4JobDashboardErrorHandler, { itemsLength: errors.length, showIcons: false, error: error, translations: translations.errorHandler })] }));
17
+ return (_jsxs(Stack, { gap: 4, children: [_jsx("h2", { style: SECTION_HEADING_STYLE, children: translations.errorTable.title }), _jsx(C4JobDashboardErrorHandler, { itemsLength: errors.length, showIcons: false, error: error, translations: translations.errorHandler })] }));
17
18
  }
18
19
  const toolbar = [
19
20
  {
@@ -42,7 +43,7 @@ function C4JobDashboardErrorTable({ errors, operateBaseUrl, isLoading, translati
42
43
  },
43
44
  ]
44
45
  : [];
45
- return (_jsxs(_Fragment, { children: [_jsx("h2", { children: translations.errorTable.title }), _jsx(C4DataTable, { id: 'errors-data-table', data: rows, headers: [
46
+ return (_jsxs(_Fragment, { children: [_jsx("h2", { style: SECTION_HEADING_STYLE, children: translations.errorTable.title }), _jsx(C4DataTable, { id: 'errors-data-table', data: rows, headers: [
46
47
  {
47
48
  key: 'errorCode',
48
49
  label: noWrapLabel(translations.errorTable.headers.errorType),
@@ -5,6 +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 { Stack } from '../../../ui/index.js';
8
+ import { SECTION_HEADING_STYLE } from '../../../utils/section-heading-style.js';
8
9
  import { C4DataTable } from '../../c4-data-table/c4-data-table.js';
9
10
  import { C4BackgroundFetchingIndicator } from '../../c4-job-dashboard-shared/c4-background-fetching-indicator.js';
10
11
  import { C4JobDashboardErrorHandler } from '../../c4-job-dashboard-shared/c4-job-dashboard-error-handler.js';
@@ -19,9 +20,9 @@ function C4JobDashboardWorkerTable({ workerData, error, isLoading, translations,
19
20
  originalIndex: index,
20
21
  }));
21
22
  if (error || (!isLoading && workerData.length === 0)) {
22
- return (_jsxs(_Fragment, { children: [_jsx("h2", { children: translations.workerTable.title }), _jsx(C4JobDashboardErrorHandler, { itemsLength: workerData.length, showIcons: false, error: error, translations: translations.errorHandler })] }));
23
+ return (_jsxs(_Fragment, { children: [_jsx("h2", { style: SECTION_HEADING_STYLE, children: translations.workerTable.title }), _jsx(C4JobDashboardErrorHandler, { itemsLength: workerData.length, showIcons: false, error: error, translations: translations.errorHandler })] }));
23
24
  }
24
- return (_jsxs(Stack, { gap: 4, children: [_jsx("h2", { children: translations.workerTable.title }), _jsx(C4DataTable, { id: 'worker-data-table', data: tableData, headers: [
25
+ return (_jsxs(Stack, { gap: 4, children: [_jsx("h2", { style: SECTION_HEADING_STYLE, children: translations.workerTable.title }), _jsx(C4DataTable, { id: 'worker-data-table', data: tableData, headers: [
25
26
  { key: 'worker', label: translations.workerTable.headers.workerName },
26
27
  {
27
28
  key: 'completed',
@@ -1,4 +1,4 @@
1
1
  import type { JSX } from 'react';
2
2
  import type { C4JobDashboardEntryPointProps } from './c4-job-dashboard-entry-point.types.js';
3
- declare function C4JobDashboardEntryPoint({ data, error, onClick, isLoading, translations, }: C4JobDashboardEntryPointProps): JSX.Element;
3
+ declare function C4JobDashboardEntryPoint({ data, error, onClick, isLoading, translations, variant, }: C4JobDashboardEntryPointProps): JSX.Element;
4
4
  export default C4JobDashboardEntryPoint;
@@ -8,6 +8,7 @@ import { Layer } from '@carbon/react';
8
8
  import styled from 'styled-components';
9
9
  import { JobsCompletedIcon, JobsCreatedIcon, JobsFailedIcon, } from '../../icons/c4-icons.js';
10
10
  import { Button, Loading, Stack, Tile, Tooltip } from '../../ui/index.js';
11
+ import { SECTION_HEADING_STYLE } from '../../utils/section-heading-style.js';
11
12
  import { C4JobDashboardErrorHandler } from '../c4-job-dashboard-shared/c4-job-dashboard-error-handler.js';
12
13
  import C4TimestampInformation from '../c4-job-dashboard-shared/c4-timestamp-information.js';
13
14
  const containerHeight = '30vh';
@@ -40,7 +41,7 @@ const JobTilesGrid = styled.div `
40
41
  }
41
42
  `;
42
43
  const JobTile = ({ title, description, icon, tooltip, }) => (_jsx(Tooltip, { align: 'top', label: tooltip, children: _jsx("div", { children: _jsx(Layer, { children: _jsxs(Tile, { children: [_jsxs(TileHeader, { children: [_jsx("h6", { children: title }), icon] }), _jsx(TileDescription, { children: description })] }) }) }) }));
43
- function C4JobDashboardEntryPoint({ data, error, onClick, isLoading, translations, }) {
44
+ function C4JobDashboardEntryPoint({ data, error, onClick, isLoading, translations, variant = 'tile', }) {
44
45
  const hasError = !!error;
45
46
  const shouldShowEmpty = !hasError &&
46
47
  (!data ||
@@ -48,6 +49,10 @@ function C4JobDashboardEntryPoint({ data, error, onClick, isLoading, translation
48
49
  data.failed.count === 0 &&
49
50
  data.completed.count === 0));
50
51
  const getTileDescription = (count) => `${count ?? 0} ${count === 1 ? translations.jobTileSingular.toLowerCase() : translations.jobTilePlural.toLowerCase()}`;
51
- return (_jsx(Tile, { children: _jsxs(Stack, { gap: 4, children: [_jsx("h3", { children: translations.title }), _jsx("p", { children: translations.description }), isLoading ? (_jsx(LoadingContainer, { children: _jsx(Loading, { withOverlay: false }) })) : hasError || shouldShowEmpty ? (_jsxs(Container, { children: [_jsx(C4JobDashboardErrorHandler, { itemsLength: shouldShowEmpty ? 0 : 1, error: hasError ? error : null, showIcons: true, translations: translations.errorHandler }), shouldShowEmpty && (_jsx(Button, { onClick: onClick, children: translations.viewAllJobTypes }))] })) : (_jsx(Container, { children: _jsxs(Stack, { gap: 4, children: [_jsx(C4TimestampInformation, { description: translations.lastUpdated, lastUpdatedAt: data?.lastUpdatedAt ?? '' }), _jsx(JobTilesContainer, { children: _jsxs(JobTilesGrid, { children: [_jsx(JobTile, { title: translations.jobTileCompleted, description: getTileDescription(data?.completed.count), icon: _jsx(JobsCompletedIcon, {}), tooltip: translations.jobTileCompletedTooltip }), _jsx(JobTile, { title: translations.jobTileFailed, description: getTileDescription(data?.failed.count), icon: _jsx(JobsFailedIcon, {}), tooltip: translations.jobTileFailedTooltip }), _jsx(JobTile, { title: translations.jobTileCreated, description: getTileDescription(data?.created.count), icon: _jsx(JobsCreatedIcon, {}), tooltip: translations.jobTileCreatedTooltip })] }) }), _jsx(Button, { onClick: onClick, children: translations.viewAllJobTypes })] }) }))] }) }));
52
+ const content = (_jsxs(Stack, { gap: 4, children: [_jsx("h3", { style: SECTION_HEADING_STYLE, children: translations.title }), _jsx("p", { children: translations.description }), isLoading ? (_jsx(LoadingContainer, { children: _jsx(Loading, { withOverlay: false }) })) : hasError || shouldShowEmpty ? (_jsx(Container, { children: _jsxs(Stack, { gap: 4, children: [_jsx(C4JobDashboardErrorHandler, { itemsLength: shouldShowEmpty ? 0 : 1, error: hasError ? error : null, showIcons: true, translations: translations.errorHandler }), shouldShowEmpty && (_jsx(Button, { onClick: onClick, children: translations.viewAllJobTypes }))] }) })) : (_jsx(Container, { children: _jsxs(Stack, { gap: 4, children: [_jsx(C4TimestampInformation, { description: translations.lastUpdated, lastUpdatedAt: data?.lastUpdatedAt ?? '' }), _jsx(JobTilesContainer, { children: _jsxs(JobTilesGrid, { children: [_jsx(JobTile, { title: translations.jobTileCompleted, description: getTileDescription(data?.completed.count), icon: _jsx(JobsCompletedIcon, {}), tooltip: translations.jobTileCompletedTooltip }), _jsx(JobTile, { title: translations.jobTileFailed, description: getTileDescription(data?.failed.count), icon: _jsx(JobsFailedIcon, {}), tooltip: translations.jobTileFailedTooltip }), _jsx(JobTile, { title: translations.jobTileCreated, description: getTileDescription(data?.created.count), icon: _jsx(JobsCreatedIcon, {}), tooltip: translations.jobTileCreatedTooltip })] }) }), _jsx(Button, { onClick: onClick, children: translations.viewAllJobTypes })] }) }))] }));
53
+ // The empty/error state's own Tile (inside C4JobDashboardErrorHandler) and the populated state's
54
+ // job-count tiles are content under the heading, not this section's own chrome — both stay boxed
55
+ // in either variant. Only this outer card goes away in 'plain'.
56
+ return variant === 'plain' ? content : _jsx(Tile, { children: content });
52
57
  }
53
58
  export default C4JobDashboardEntryPoint;
@@ -21,4 +21,12 @@ export interface C4JobDashboardEntryPointProps {
21
21
  onClick: () => void;
22
22
  translations: JobDashboardTranslations;
23
23
  isLoading?: boolean;
24
+ /**
25
+ * `'tile'` (default) renders this section inside its own bordered card — Console's own look.
26
+ * `'plain'` drops that card in favor of a bare heading, for a host that renders this section inline
27
+ * alongside its own similarly bare sections. The empty/error states' own `Tile` (from
28
+ * `C4JobDashboardErrorHandler`) is unaffected either way — it's content under the heading, not the
29
+ * section's own chrome.
30
+ */
31
+ variant?: 'tile' | 'plain';
24
32
  }
@@ -1,3 +1,3 @@
1
1
  import { type JSX } from 'react';
2
2
  import type { C4JobDashboardOverviewPageProps } from './c4-job-dashboard-overview.types.js';
3
- export declare const C4JobDashboardOverviewPage: ({ error, items, isIncomplete, config, onTimeRangeChange, breadcrumb, isLoadingConfig, isLoadingTable, translations, lastUpdatedAt, }: C4JobDashboardOverviewPageProps) => JSX.Element;
3
+ export declare const C4JobDashboardOverviewPage: ({ error, items, isIncomplete, config, onTimeRangeChange, breadcrumb, isLoadingConfig, isLoadingTable, translations, lastUpdatedAt, padding, }: C4JobDashboardOverviewPageProps) => JSX.Element;
@@ -13,7 +13,7 @@ import C4JobDashboardTimeRangeDropdown from '../c4-job-dashboard-shared/c4-job-d
13
13
  import C4TimestampInformation from '../c4-job-dashboard-shared/c4-timestamp-information.js';
14
14
  import { C4LinkButton } from '../c4-link-button/c4-link-button.js';
15
15
  import { C4PageLayout } from '../c4-page-layout/c4-page-layout.js';
16
- export const C4JobDashboardOverviewPage = ({ error, items, isIncomplete, config, onTimeRangeChange, breadcrumb, isLoadingConfig, isLoadingTable, translations, lastUpdatedAt, }) => {
16
+ export const C4JobDashboardOverviewPage = ({ error, items, isIncomplete, config, onTimeRangeChange, breadcrumb, isLoadingConfig, isLoadingTable, translations, lastUpdatedAt, padding = 'default', }) => {
17
17
  const [rows, setRows] = useState([]);
18
18
  useEffect(() => {
19
19
  const originalRows = items.map((row, index) => ({
@@ -51,7 +51,7 @@ export const C4JobDashboardOverviewPage = ({ error, items, isIncomplete, config,
51
51
  };
52
52
  return (_jsx(C4JobDashboardErrorHandler, { itemsLength: 0, showIcons: true, translations: translations.errorHandler, error: error }));
53
53
  }
54
- return (_jsx(C4PageLayout, { children: _jsxs(Stack, { gap: 3, children: [_jsx(C4Breadcrumb, { loading: false, elements: breadcrumb.elements, title: translations.title }), _jsxs("p", { children: [translations.description, ' ', _jsx(C4LinkButton, { onClick: () => window.open(C4_EXTERNAL_URLS.docs.jobDashboard.jobWorker, '_blank', 'noopener,noreferrer'), label: translations.learnMoreLabel, icon: _jsx(Launch, {}) })] }), _jsx(C4TimestampInformation, { description: translations.lastUpdated, lastUpdatedAt: lastUpdatedAt }), _jsx(C4JobDashboardTimeRangeDropdown, { onChange: onTimeRangeChange, exportInterval: config?.exportInterval, disabled: isLoadingConfig, translations: translations.dropdown }), shouldShowErrorHandler ? (_jsx(C4JobDashboardErrorHandler, { error: error, itemsLength: items.length, showIcons: true, translations: translations.errorHandler })) : (_jsxs(_Fragment, { children: [isIncomplete && (_jsx(C4InlineNotification, { style: { maxWidth: '100%' }, lowContrast: true, kind: 'warning', title: translations.dataLimitWarning.title, subtitle: translations.dataLimitWarning.description })), _jsx(C4DataTable, { id: 'usage-history-table', data: rows, toolbar: toolbar, headers: [
54
+ return (_jsx(C4PageLayout, { padding: padding, children: _jsxs(Stack, { gap: 3, children: [_jsx(C4Breadcrumb, { loading: false, elements: breadcrumb.elements, title: translations.title }), _jsxs("p", { children: [translations.description, ' ', _jsx(C4LinkButton, { onClick: () => window.open(C4_EXTERNAL_URLS.docs.jobDashboard.jobWorker, '_blank', 'noopener,noreferrer'), label: translations.learnMoreLabel, icon: _jsx(Launch, {}) })] }), _jsx(C4TimestampInformation, { description: translations.lastUpdated, lastUpdatedAt: lastUpdatedAt }), _jsx(C4JobDashboardTimeRangeDropdown, { onChange: onTimeRangeChange, exportInterval: config?.exportInterval, disabled: isLoadingConfig, translations: translations.dropdown }), shouldShowErrorHandler ? (_jsx(C4JobDashboardErrorHandler, { error: error, itemsLength: items.length, showIcons: true, translations: translations.errorHandler })) : (_jsxs(_Fragment, { children: [isIncomplete && (_jsx(C4InlineNotification, { style: { maxWidth: '100%' }, lowContrast: true, kind: 'warning', title: translations.dataLimitWarning.title, subtitle: translations.dataLimitWarning.description })), _jsx(C4DataTable, { id: 'usage-history-table', data: rows, toolbar: toolbar, headers: [
55
55
  {
56
56
  key: 'jobType',
57
57
  label: translations.tableHeaders.jobType,
@@ -43,4 +43,14 @@ export interface C4JobDashboardOverviewPageProps {
43
43
  isLoadingConfig: boolean;
44
44
  isLoadingTable: boolean;
45
45
  translations: JobDashboardOverviewTranslations;
46
+ /**
47
+ * Side/top/bottom padding around the page content. Defaults to `'default'`.
48
+ *
49
+ * `'none'` drops it — for a widget embedded inside a host page's own tab (see
50
+ * `C4JobWorkerOverviewPage`'s `scope: 'environment'`), where the host already
51
+ * provides its own spacing and this padding would double up.
52
+ *
53
+ * ds-mode only.
54
+ */
55
+ padding?: 'default' | 'none';
46
56
  }
@@ -9,6 +9,7 @@ import styled from 'styled-components';
9
9
  import { C4_EXTERNAL_URLS } from '../../externalUrls.const.js';
10
10
  import { AccessRestrictedIcon, EmptyJobsIcon, ErrorIcon, } from '../../icons/c4-icons.js';
11
11
  import { Tile } from '../../ui/index.js';
12
+ import { SECTION_HEADING_STYLE } from '../../utils/section-heading-style.js';
12
13
  import { C4LinkButton } from '../c4-link-button/c4-link-button.js';
13
14
  const Row = styled.div `
14
15
  display: flex;
@@ -43,10 +44,10 @@ export const C4JobDashboardErrorHandler = ({ error, showIcons, itemsLength, tran
43
44
  }
44
45
  }
45
46
  return (_jsx("div", { style: { width: '100%', margin: '1rem 0' }, children: _jsx(Tile, { children: _jsxs(Row, { children: [showIcons &&
46
- (isAccessRestricted ? (_jsx(AccessRestrictedIcon, { size: 70 })) : (_jsx(ErrorIcon, { size: 80 }))), _jsxs("div", { children: [_jsx("h3", { children: title }), _jsx(Description, { children: description }), isAccessRestricted && (_jsx(C4LinkButton, { onClick: () => window.open(C4_EXTERNAL_URLS.docs.jobDashboard.roles, '_blank', 'noopener,noreferrer'), label: translations.forbidden.learnMoreLabel, icon: _jsx(Launch, {}) }))] })] }) }) }));
47
+ (isAccessRestricted ? (_jsx(AccessRestrictedIcon, { size: 70 })) : (_jsx(ErrorIcon, { size: 80 }))), _jsxs("div", { children: [_jsx("h3", { style: SECTION_HEADING_STYLE, children: title }), _jsx(Description, { children: description }), isAccessRestricted && (_jsx(C4LinkButton, { onClick: () => window.open(C4_EXTERNAL_URLS.docs.jobDashboard.roles, '_blank', 'noopener,noreferrer'), label: translations.forbidden.learnMoreLabel, icon: _jsx(Launch, {}) }))] })] }) }) }));
47
48
  }
48
49
  if (itemsLength === 0) {
49
- return (_jsx(Tile, { children: _jsxs(Row, { children: [showIcons && _jsx(EmptyJobsIcon, { size: 84 }), _jsxs("div", { children: [_jsx("h2", { children: translations.empty.title }), _jsx(Description, { children: translations.empty.description }), _jsx(C4LinkButton, { onClick: () => window.open(C4_EXTERNAL_URLS.docs.jobDashboard.jobWorker, '_blank', 'noopener,noreferrer'), label: translations.empty.learnMoreLabel, icon: _jsx(Launch, { color: 'currentColor', size: 16 }) })] })] }) }));
50
+ return (_jsx(Tile, { children: _jsxs(Row, { children: [showIcons && _jsx(EmptyJobsIcon, { size: 84 }), _jsxs("div", { children: [_jsx("h2", { style: SECTION_HEADING_STYLE, children: translations.empty.title }), _jsx(Description, { children: translations.empty.description }), _jsx(C4LinkButton, { onClick: () => window.open(C4_EXTERNAL_URLS.docs.jobDashboard.jobWorker, '_blank', 'noopener,noreferrer'), label: translations.empty.learnMoreLabel, icon: _jsx(Launch, { color: 'currentColor', size: 16 }) })] })] }) }));
50
51
  }
51
52
  return _jsx(_Fragment, {});
52
53
  };
@@ -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, inline, icon, disabled, }: C4LinkButtonProps) => JSX.Element;
3
+ export declare const C4LinkButton: ({ label, onClick, style, inline, icon, disabled, ariaLabel, }: C4LinkButtonProps) => JSX.Element;
@@ -1,11 +1,11 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Link } from '../../ui/index.js';
3
- export const C4LinkButton = ({ label, onClick, style, inline, icon, disabled, }) => {
3
+ export const C4LinkButton = ({ label, onClick, style, inline, icon, disabled, ariaLabel, }) => {
4
4
  if (disabled === undefined) {
5
5
  disabled = false;
6
6
  }
7
7
  const customStyle = style ? style : {};
8
- const component = (_jsxs(Link, { onClick: () => !disabled && onClick(), inline: inline, style: { cursor: 'pointer', ...customStyle }, disabled: disabled, children: [label, icon && (_jsx("span", { style: {
8
+ const component = (_jsxs(Link, { onClick: () => !disabled && onClick(), inline: inline, style: { cursor: 'pointer', ...customStyle }, disabled: disabled, "aria-label": ariaLabel ?? (label || undefined), children: [label, icon && (_jsx("span", { style: {
9
9
  marginLeft: '0.5rem',
10
10
  verticalAlign: 'sub',
11
11
  }, children: icon }))] }));
@@ -5,4 +5,10 @@ export interface C4LinkButtonProps {
5
5
  inline?: boolean;
6
6
  icon?: React.ReactNode;
7
7
  disabled?: boolean;
8
+ /**
9
+ * Accessible name for icon-only buttons (empty `label`). A screen reader
10
+ * has nothing else to announce when `label` is `''`, so an icon-only
11
+ * `C4LinkButton` must pass this.
12
+ */
13
+ ariaLabel?: string;
8
14
  }
@@ -2,10 +2,22 @@ import type { C4BreadcrumbProps } from '../c4-breadcrumb/c4-breadcrumb.types.js'
2
2
  import type { C4TabsProps } from '../c4-tabs/c4-tabs.types.js';
3
3
  type C4PageProps = {
4
4
  loading?: boolean;
5
+ /**
6
+ * Side/top/bottom padding around the page content. Defaults to `'default'`.
7
+ *
8
+ * `'none'` drops it — for a widget embedded inside a host page's own tab (see
9
+ * each widget's `scope: 'environment'`), where the host already provides its
10
+ * own spacing and the widget's padding would double up.
11
+ *
12
+ * ds-mode only: the Carbon branch is a `Grid` that already has no side
13
+ * padding, so this has no Carbon equivalent and is not forwarded there.
14
+ */
15
+ padding?: 'default' | 'none';
5
16
  header?: {
6
17
  title?: string;
7
18
  tag?: string;
8
19
  indicator?: React.ReactNode;
20
+ subtitleBadges?: C4BreadcrumbProps['subtitleBadges'];
9
21
  menuItems?: C4BreadcrumbProps['menu'];
10
22
  codeSnippet?: C4BreadcrumbProps['codeSnippet'];
11
23
  };
@@ -31,5 +43,5 @@ type C4PageProps = {
31
43
  });
32
44
  children?: React.ReactNode;
33
45
  };
34
- declare const C4PageTemplate: ({ header, tabs, banner, children, loading, breadcrumbs, }: C4PageProps) => import("react").JSX.Element;
46
+ declare const C4PageTemplate: ({ header, tabs, banner, children, loading, breadcrumbs, padding, }: C4PageProps) => import("react").JSX.Element;
35
47
  export { C4PageTemplate };
@@ -14,14 +14,14 @@ import { C4InlineNotification } from '../c4-inline-notification/c4-inline-notifi
14
14
  import { C4Tabs } from '../c4-tabs/c4-tabs.js';
15
15
  const gridStyles = { paddingRight: 0, paddingLeft: 0 };
16
16
  const gridColumnStyles = { marginInline: 0 };
17
- const C4PageTemplate = ({ header, tabs, banner, children, loading = false, breadcrumbs = { elements: [] }, }) => {
17
+ const C4PageTemplate = ({ header, tabs, banner, children, loading = false, breadcrumbs = { elements: [] }, padding = 'default', }) => {
18
18
  const designSystem = useC4DesignSystem();
19
- 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, loading: loading, codeSnippet: header?.codeSnippet })), banner &&
19
+ 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 &&
20
20
  (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] }));
21
21
  // ds: the DS page container (padding + max width). carbon: the original
22
22
  // Carbon grid. The inner header/tabs already switch via their own families.
23
23
  if (designSystem === 'ds') {
24
- return _jsx(PageLayout, { children: inner });
24
+ return _jsx(PageLayout, { padding: padding, children: inner });
25
25
  }
26
26
  return (_jsx(Grid, { style: gridStyles, children: _jsx(Column, { span: '100%', style: gridColumnStyles, children: inner }) }));
27
27
  };
@@ -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": {
@@ -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';
@@ -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';
@@ -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';
@@ -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';
@@ -0,0 +1,6 @@
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
+ export {};