@camunda/ccma-saas-frontend 0.7.2 → 0.8.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.
Files changed (109) hide show
  1. package/lib/esm/components/c4-api-client-scope-picker/c4-api-client-scope-picker.d.ts +10 -0
  2. package/lib/esm/components/c4-api-client-scope-picker/c4-api-client-scope-picker.js +78 -0
  3. package/lib/esm/components/c4-api-client-scope-picker/c4-api-client-scope-picker.mocks.d.ts +6 -0
  4. package/lib/esm/components/c4-api-client-scope-picker/c4-api-client-scope-picker.mocks.js +90 -0
  5. package/lib/esm/components/c4-api-client-scope-picker/c4-api-client-scope-picker.types.d.ts +25 -0
  6. package/lib/esm/components/c4-breadcrumb/c4-breadcrumb.js +5 -1
  7. package/lib/esm/components/c4-cluster-details-clients/c4-cluster-details-clients.js +9 -0
  8. package/lib/esm/components/c4-cluster-details-clients/c4-cluster-details-clients.mocks.js +6 -3
  9. package/lib/esm/components/c4-cluster-details-clients/c4-cluster-details-clients.types.d.ts +3 -0
  10. package/lib/esm/components/c4-cluster-details-connector-secrets/c4-cluster-details-connector-secrets.js +9 -0
  11. package/lib/esm/components/c4-cluster-details-connector-secrets/c4-cluster-details-connector-secrets.mocks.js +2 -0
  12. package/lib/esm/components/c4-cluster-details-connector-secrets/c4-cluster-details-connector-secrets.types.d.ts +2 -0
  13. package/lib/esm/components/c4-cluster-details-encryption/c4-cluster-details-encryption.d.ts +1 -1
  14. package/lib/esm/components/c4-cluster-details-encryption/c4-cluster-details-encryption.js +11 -18
  15. package/lib/esm/components/c4-cluster-details-encryption/c4-cluster-details-encryption.types.d.ts +19 -2
  16. package/lib/esm/components/c4-cluster-overview/applications.d.ts +12 -0
  17. package/lib/esm/components/c4-cluster-overview/applications.js +10 -2
  18. package/lib/esm/components/c4-cluster-overview/c4-cluster-overview.mocks.d.ts +6 -1
  19. package/lib/esm/components/c4-cluster-overview/c4-cluster-overview.mocks.js +15 -2
  20. package/lib/esm/components/c4-cluster-overview/cluster-load.d.ts +1 -0
  21. package/lib/esm/components/c4-cluster-overview/cluster-load.js +14 -6
  22. package/lib/esm/components/c4-cluster-settings/c4-cluster-settings.d.ts +1 -1
  23. package/lib/esm/components/c4-cluster-settings/c4-cluster-settings.js +4 -2
  24. package/lib/esm/components/c4-cluster-settings/c4-cluster-settings.types.d.ts +4 -0
  25. package/lib/esm/components/c4-cluster-settings/elements/cluster-settings.d.ts +3 -1
  26. package/lib/esm/components/c4-cluster-settings/elements/cluster-settings.js +7 -3
  27. package/lib/esm/components/c4-cluster-settings/elements/external-identity-provider-modal.d.ts +9 -1
  28. package/lib/esm/components/c4-cluster-settings/elements/external-identity-provider-modal.js +69 -12
  29. package/lib/esm/components/c4-cluster-settings/elements/external-identity-provider.d.ts +10 -1
  30. package/lib/esm/components/c4-cluster-settings/elements/external-identity-provider.js +16 -2
  31. package/lib/esm/components/c4-cluster-settings/elements/optional-telemetry-toggle.d.ts +14 -0
  32. package/lib/esm/components/c4-cluster-settings/elements/optional-telemetry-toggle.js +12 -0
  33. package/lib/esm/components/c4-cluster-settings/elements/secrets-filter-mode-toggle.d.ts +15 -0
  34. package/lib/esm/components/c4-cluster-settings/elements/secrets-filter-mode-toggle.js +10 -0
  35. package/lib/esm/components/c4-create-cluster/c4-create-cluster-tile-grid.d.ts +4 -2
  36. package/lib/esm/components/c4-create-cluster/c4-create-cluster-tile-grid.js +24 -3
  37. package/lib/esm/components/c4-create-cluster/c4-create-cluster.js +1 -1
  38. package/lib/esm/components/c4-create-cluster/c4-create-cluster.mocks.js +1 -0
  39. package/lib/esm/components/c4-create-cluster/c4-create-cluster.types.d.ts +2 -0
  40. package/lib/esm/components/c4-create-console-api-client-modal/c4-create-console-api-client-modal.js +13 -30
  41. package/lib/esm/components/c4-job-dashboard-details-page/c4-job-dashboard-details-page.mocks.js +10 -5
  42. package/lib/esm/components/c4-job-dashboard-overview-page/c4-job-dashboard-overview.mocks.js +10 -5
  43. package/lib/esm/components/c4-tile-with-title-and-action/c4-tile-with-title-and-action.js +1 -1
  44. package/lib/esm/components/c4-tile-with-title-and-action/c4-tile-with-title-and-action.types.d.ts +5 -0
  45. package/lib/esm/components/c4-usage-metrics-per-cluster/c4-usage-metrics-per-cluster.js +2 -1
  46. package/lib/esm/externalUrls.const.d.ts +1 -1
  47. package/lib/esm/externalUrls.const.js +1 -1
  48. package/lib/esm/i18n/c4-console-i18n.js +6 -0
  49. package/lib/esm/i18n/en/modals/apiclients.json +4 -0
  50. package/lib/esm/i18n/en/pages/clusterdetails.json +25 -3
  51. package/lib/esm/i18n/en/pages/orgmanagement.json +1 -0
  52. package/lib/esm/index.d.ts +3 -3
  53. package/lib/esm/index.js +2 -3
  54. package/lib/esm/runtime/build-cluster-sso-callback-url.d.ts +34 -0
  55. package/lib/esm/runtime/build-cluster-sso-callback-url.js +49 -0
  56. package/lib/esm/runtime/build-cluster-swagger-url.d.ts +7 -2
  57. package/lib/esm/runtime/build-cluster-swagger-url.js +20 -5
  58. package/lib/esm/runtime/c4-console-runtime-context.d.ts +10 -0
  59. package/lib/esm/runtime/c4-console-runtime-context.js +12 -0
  60. package/lib/esm/runtime/index.d.ts +2 -1
  61. package/lib/esm/runtime/index.js +2 -1
  62. package/lib/esm/runtime/use-hub-api-naming.d.ts +17 -0
  63. package/lib/esm/runtime/use-hub-api-naming.js +23 -0
  64. package/lib/esm/ui/families.d.ts +4 -0
  65. package/lib/esm/ui/families.js +22 -2
  66. package/lib/esm/widgets/cluster-details/c4-cluster-details-app.d.ts +16 -1
  67. package/lib/esm/widgets/cluster-details/c4-cluster-details-app.js +70 -21
  68. package/lib/esm/widgets/cluster-details/c4-cluster-details-page.d.ts +1 -1
  69. package/lib/esm/widgets/cluster-details/c4-cluster-details-page.js +54 -13
  70. package/lib/esm/widgets/cluster-details/c4-cluster-details-page.types.d.ts +10 -0
  71. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-clients-tab.d.ts +1 -0
  72. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-clients-tab.js +3 -0
  73. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-connector-secrets-tab.d.ts +11 -0
  74. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-connector-secrets-tab.js +8 -3
  75. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-encryption-tab.d.ts +7 -0
  76. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-encryption-tab.js +26 -5
  77. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-overview-tab.js +43 -16
  78. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-settings-tab.js +174 -3
  79. package/lib/esm/widgets/cluster-details/tabs/cluster-load-texts.d.ts +13 -0
  80. package/lib/esm/widgets/cluster-details/tabs/cluster-load-texts.js +29 -0
  81. package/lib/esm/widgets/cluster-health-override.d.ts +16 -0
  82. package/lib/esm/widgets/cluster-health-override.js +33 -0
  83. package/lib/esm/widgets/clusters/c4-clusters-page.js +8 -8
  84. package/lib/esm/widgets/create-cluster/c4-create-cluster-page.js +1 -1
  85. package/lib/esm/widgets/environment/c4-cluster-api-clients-widget.js +6 -1
  86. package/lib/esm/widgets/environment/c4-cluster-connector-secrets-widget.js +2 -1
  87. package/lib/esm/widgets/environment/use-cluster-swagger-url.d.ts +7 -4
  88. package/lib/esm/widgets/environment/use-cluster-swagger-url.js +7 -4
  89. package/lib/esm/widgets/management/c4-management-app.js +6 -2
  90. package/lib/esm/widgets/management/tabs/c4-management-api-tab.js +16 -31
  91. package/package.json +24 -24
  92. package/lib/esm/components/c4-advanced-search-filters/ArrayFieldContainer.d.ts +0 -16
  93. package/lib/esm/components/c4-advanced-search-filters/ArrayFieldContainer.js +0 -40
  94. package/lib/esm/components/c4-advanced-search-filters/AutosuggestInput.d.ts +0 -16
  95. package/lib/esm/components/c4-advanced-search-filters/AutosuggestInput.js +0 -142
  96. package/lib/esm/components/c4-advanced-search-filters/FieldRow.d.ts +0 -14
  97. package/lib/esm/components/c4-advanced-search-filters/FieldRow.js +0 -136
  98. package/lib/esm/components/c4-advanced-search-filters/FiltersSection.d.ts +0 -13
  99. package/lib/esm/components/c4-advanced-search-filters/FiltersSection.js +0 -58
  100. package/lib/esm/components/c4-advanced-search-filters/OrSection.d.ts +0 -16
  101. package/lib/esm/components/c4-advanced-search-filters/OrSection.js +0 -118
  102. package/lib/esm/components/c4-advanced-search-filters/c4-advanced-search-filters.d.ts +0 -3
  103. package/lib/esm/components/c4-advanced-search-filters/c4-advanced-search-filters.js +0 -408
  104. package/lib/esm/components/c4-advanced-search-filters/c4-advanced-search-filters.types.d.ts +0 -32
  105. package/lib/esm/components/c4-advanced-search-filters/state.types.d.ts +0 -14
  106. package/lib/esm/components/c4-advanced-search-filters/state.types.js +0 -6
  107. package/lib/esm/components/c4-advanced-search-filters/utils.d.ts +0 -5
  108. package/lib/esm/components/c4-advanced-search-filters/utils.js +0 -58
  109. /package/lib/esm/components/{c4-advanced-search-filters/c4-advanced-search-filters.types.js → c4-api-client-scope-picker/c4-api-client-scope-picker.types.js} +0 -0
@@ -4,12 +4,16 @@
4
4
  * You may not use this file except in compliance with the commercial license.
5
5
  */
6
6
  import { getDropdownTranslations, getErrorHandlerTranslations, } from '../c4-job-dashboard-shared/c4-stories-data-generator.js';
7
- // All dates below are computed relative to real "now" (rather than a fixed
8
- // past date, which reads as obviously stale in a docs screenshot) - matches
9
- // this migration's dynamic-date convention (see stories/shared/billing-dates.ts).
7
+ // A mock must not read the wall clock: a story that pictures this data is
8
+ // captured as a docs screenshot, and a value that moves between two runs
9
+ // turns an unrelated pull request red. The instant matches the pin in
10
+ // packages/screenshot-tooling-storybook/.storybook/preview-head.html, and
11
+ // `isoAt` drops the milliseconds that its aria test rejects.
10
12
  const MINUTE = 60 * 1000;
11
- const now = Date.now();
12
- const isoAt = (offsetMs) => new Date(now - offsetMs).toISOString();
13
+ const now = new Date('2026-01-15T09:00:00Z').getTime();
14
+ const isoAt = (offsetMs) => `${new Date(now - offsetMs).toISOString().slice(0, 19)}Z`;
15
+ // Without `timeZone`, this reads the zone of the capturing machine, so a Mac
16
+ // and the Linux runner render the same instant as two different times.
13
17
  const lastUpdatedDisplay = new Date(now).toLocaleString('en-US', {
14
18
  month: 'long',
15
19
  day: 'numeric',
@@ -17,6 +21,7 @@ const lastUpdatedDisplay = new Date(now).toLocaleString('en-US', {
17
21
  hour: 'numeric',
18
22
  minute: '2-digit',
19
23
  hour12: true,
24
+ timeZone: 'UTC',
20
25
  });
21
26
  // [jobType, created, completed, failed, workers, minutesAgo]
22
27
  const JOB_ROWS = [
@@ -31,7 +31,7 @@ export const C4TileWithTitleAndAction = ({ title, tooltip, description, descript
31
31
  flexWrap: 'wrap',
32
32
  height: '48px',
33
33
  fontSize: '12px',
34
- }, children: [_jsx("h6", { style: { fontSize }, children: title }), tooltip && (_jsx(Tooltip, { label: tooltip, align: 'top', children: _jsx(Button, { kind: 'ghost', children: _jsx(Information, {}) }) }))] }), description && (_jsxs("p", { style: { color: 'var(--cds-text-helper)' }, children: [description, descriptionTooltip && (_jsx(C4InfoTooltip, { label: descriptionTooltip }))] }))] }), action && !isLoading && (_jsx(C4LinkButton, { label: action.label, onClick: () => action.onClick(), style: {
34
+ }, children: [_jsx("h6", { style: { fontSize }, children: title }), tooltip && (_jsx(Tooltip, { label: tooltip, align: 'top', children: _jsx(Button, { kind: 'ghost', children: _jsx(Information, {}) }) }))] }), description && (_jsxs("p", { style: { color: 'var(--cds-text-helper)' }, children: [description, descriptionTooltip && (_jsx(C4InfoTooltip, { label: descriptionTooltip }))] }))] }), action && !isLoading && (_jsx(C4LinkButton, { label: action.label, ariaLabel: action.ariaLabel, onClick: () => action.onClick(), style: {
35
35
  justifySelf: 'end',
36
36
  alignSelf: 'start',
37
37
  }, icon: action.icon }))] }), isLoading && _jsx(SkeletonPlaceholder, { style: { width: '100%' } }), !isLoading && _jsx("div", { children: children })] }) }));
@@ -6,6 +6,11 @@ export interface C4TileWithTitleAndActionProps {
6
6
  descriptionTooltip?: string;
7
7
  action?: {
8
8
  label: string;
9
+ /**
10
+ * Accessible name for an icon-only action (empty `label`). A screen
11
+ * reader has nothing else to announce when `label` is `''`.
12
+ */
13
+ ariaLabel?: string;
9
14
  icon?: any;
10
15
  kind?: 'primary' | 'secondary' | 'tertiary' | 'danger' | 'ghost';
11
16
  onClick: () => void;
@@ -5,13 +5,14 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
5
5
  * You may not use this file except in compliance with the commercial license.
6
6
  */
7
7
  import { C3ClusterTag, } from '@camunda/camunda-composite-components';
8
- import { DatePicker, DatePickerInput } from '@carbon/react';
9
8
  import { Download } from '@carbon/react/icons/index.esm.js';
10
9
  import { useMemo } from 'react';
11
10
  import { Button, MultiSelect, Stack } from '../../ui/index.js';
11
+ import { useDatePickerFamily } from '../../ui/families.js';
12
12
  import { C4DataTable } from '../c4-data-table/c4-data-table.js';
13
13
  import { C4DataTableSkeleton } from '../c4-data-table/c4-data-table-skeleton.js';
14
14
  export const C4UsageMetricsPerCluster = ({ data, range, tags, texts, loading, download, }) => {
15
+ const { DatePicker, DatePickerInput } = useDatePickerFamily();
15
16
  const compTimestampSelection = (_jsxs(DatePicker, { datePickerType: 'range', dateFormat: 'Y-m-d', value: [range.start, range.end], onChange: (newValues) => {
16
17
  range.onChange({
17
18
  start: new Date(newValues[0]).getTime(),
@@ -8,7 +8,7 @@ export declare const C4_EXTERNAL_URLS: {
8
8
  readonly docs: {
9
9
  readonly consoleApiClients: "https://docs.camunda.io/docs/next/apis-tools/administration-api/administration-api-reference/";
10
10
  readonly consoleAlerts: "https://docs.camunda.io/docs/next/components/console/manage-clusters/manage-alerts/";
11
- readonly consoleClusterClients: "https://docs.camunda.io/docs/next/components/console/manage-clusters/manage-api-clients/";
11
+ readonly consoleClusterClients: "https://docs.camunda.io/docs/next/components/hub/organization/manage-clusters/manage-api-clients";
12
12
  readonly consoleManageConnectors: "https://docs.camunda.io/docs/components/console/manage-clusters/cluster-connectors/";
13
13
  readonly connectorSecrets: "https://docs.camunda.io/docs/next/components/connectors/use-connectors/#using-secrets";
14
14
  readonly consoleIpWhitelist: "https://docs.camunda.io/docs/next/components/console/manage-clusters/manage-ip-allowlists/";
@@ -7,7 +7,7 @@ export const C4_EXTERNAL_URLS = {
7
7
  docs: {
8
8
  consoleApiClients: 'https://docs.camunda.io/docs/next/apis-tools/administration-api/administration-api-reference/',
9
9
  consoleAlerts: 'https://docs.camunda.io/docs/next/components/console/manage-clusters/manage-alerts/',
10
- consoleClusterClients: 'https://docs.camunda.io/docs/next/components/console/manage-clusters/manage-api-clients/',
10
+ consoleClusterClients: 'https://docs.camunda.io/docs/next/components/hub/organization/manage-clusters/manage-api-clients',
11
11
  consoleManageConnectors: 'https://docs.camunda.io/docs/components/console/manage-clusters/cluster-connectors/',
12
12
  connectorSecrets: 'https://docs.camunda.io/docs/next/components/connectors/use-connectors/#using-secrets',
13
13
  consoleIpWhitelist: 'https://docs.camunda.io/docs/next/components/console/manage-clusters/manage-ip-allowlists/',
@@ -99,6 +99,12 @@ const resources = {
99
99
  actionLabel: 'Learn more about managing authorizations',
100
100
  },
101
101
  },
102
+ indicator: {
103
+ secondaryReplicationNotReady: {
104
+ title: 'Secondary key not accessible',
105
+ subtitle: "Your secondary region's encryption key isn't accessible, so replication to that region isn't working. Go to the Encryption tab to review the key policy.",
106
+ },
107
+ },
102
108
  },
103
109
  orgManagement: {
104
110
  title: 'Organization management',
@@ -33,6 +33,7 @@
33
33
  },
34
34
  "modeler": {
35
35
  "label": "Web Modeler API",
36
+ "labelHub": "Hub API",
36
37
  "create": "Create",
37
38
  "delete": "Delete",
38
39
  "get": "Get",
@@ -74,6 +75,8 @@
74
75
  "delete": "Delete",
75
76
  "get": "Get",
76
77
  "update": "Update",
78
+ "restore": "Restore",
79
+ "getRestore": "Get restore status",
77
80
  "getSchedule": "Get schedule",
78
81
  "updateSchedule": "Create + update schedule",
79
82
  "deleteSchedule": "Delete schedule"
@@ -127,6 +130,7 @@
127
130
  "clusterScopes": "Cluster Scopes",
128
131
  "zeebeScopes": "Zeebe Scopes",
129
132
  "modelerScopes": "Modeler Scopes",
133
+ "modelerScopesHub": "Hub Scopes",
130
134
  "byomClientScopes": "External Monitoring Scopes",
131
135
  "ipWhiteListScopes": "IP AllowList Scopes",
132
136
  "secretScopes": "Connector Secrets Scopes",
@@ -70,6 +70,10 @@
70
70
  "title": "Use our secure, scalable API",
71
71
  "text": "Click <strong>Create your first client</strong> to deploy processes, start instances, and interact with them programmatically."
72
72
  },
73
+ "forbidden": {
74
+ "title": "You don't have access to client credentials",
75
+ "description": "You don't have permission to view client credentials for this cluster. Contact an organization owner or admin for access."
76
+ },
73
77
  "details": {
74
78
  "general": "General",
75
79
  "clientId": "Client Id",
@@ -79,7 +83,9 @@
79
83
  "createdBy": "Created by",
80
84
  "lastUsed": "Last used",
81
85
  "connectionInformation": "Connection information",
82
- "connectionInformationDocs": "To connect to this cluster, check the client configuration <0>documentation</0> to learn what information is needed from below.",
86
+ "connectionInformationDocs": {
87
+ "link": "Learn more in the documentation"
88
+ },
83
89
  "clusterId": "Cluster Id",
84
90
  "regionId": "Region Id",
85
91
  "clusterUrl": "Cluster URL",
@@ -118,6 +124,10 @@
118
124
  "button": "Create new secret",
119
125
  "link": "View the secrets documentation"
120
126
  },
127
+ "forbidden": {
128
+ "title": "You don't have access to connector secrets",
129
+ "description": "You don't have permission to view connector secrets for this cluster. Contact an organization owner or admin for access."
130
+ },
121
131
  "errorMessage": {
122
132
  "title": "Oh snap!",
123
133
  "text": "This is embarrassing, we currently can't load your secrets."
@@ -136,6 +146,10 @@
136
146
  "noSecrets": {
137
147
  "title": "Store credentials safely using Camunda cluster secrets",
138
148
  "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."
149
+ },
150
+ "forbidden": {
151
+ "title": "You don't have access to cluster secrets",
152
+ "description": "You don't have permission to view cluster secrets for this cluster. Contact an organization owner or admin for access."
139
153
  }
140
154
  },
141
155
  "hotbackups": {
@@ -328,7 +342,8 @@
328
342
  "operate": "Monitor and troubleshoot workflows",
329
343
  "optimize": "Get insights to improve your processes",
330
344
  "connectors": "Integrate with external systems",
331
- "identity": "Manage authentication and authorization"
345
+ "identity": "Manage authentication and authorization",
346
+ "connectivity": "Public access to your cluster"
332
347
  },
333
348
  "optimize": {
334
349
  "disabled": {
@@ -457,7 +472,8 @@
457
472
  },
458
473
  "current": "Current",
459
474
  "tooltip": "Cluster load: Indicates how much of the cluster's resources are in use.",
460
- "docs": "Learn more about cluster load"
475
+ "docs": "Learn more about cluster load",
476
+ "reload": "Reload"
461
477
  }
462
478
  },
463
479
  "auditLog": {
@@ -658,6 +674,12 @@
658
674
  "msTeamsLinkText": "Microsoft Teams",
659
675
  "descriptionDisabled": "When disabled, you can still use App Integrations, but they work with reduced functionality."
660
676
  },
677
+ "optionalTelemetry": {
678
+ "tileTitle": "Optional telemetry",
679
+ "description": "Camunda collects optional usage data from this cluster to improve our products. When disabled, Camunda still collects contractual telemetry, which is required and can't be turned off.",
680
+ "title": "Enable optional telemetry",
681
+ "confirmBody": "Turning off optional telemetry restarts your cluster. Your cluster is briefly unavailable while it restarts. Camunda still collects contractual telemetry, which is required and can't be turned off."
682
+ },
661
683
  "tasklistMode": {
662
684
  "title": "Upgrade to Tasklist v2",
663
685
  "warning": "This setting is not recommended for production environments, as it might reduce individual process instance latency but can slow down general throughput.",
@@ -408,6 +408,7 @@
408
408
  "byomClientScopes": "External Monitoring Scopes",
409
409
  "ipWhiteListScopes": "IP Allowlist Scopes",
410
410
  "modelerScopes": "Modeler Scopes",
411
+ "modelerScopesHub": "Hub Scopes",
411
412
  "memberScopes": "Member Scopes",
412
413
  "secretsScopes": "Connector Secrets Scopes",
413
414
  "hotBackupScopes": "Backups Scopes",
@@ -3,12 +3,12 @@ export { C4ActionableNotification } from './components/c4-actionable-notificatio
3
3
  export type { C4ActionableNotificationProps } from './components/c4-actionable-notification/c4-actionable-notification.types.js';
4
4
  export { C4ActivityGraph } from './components/c4-activity-graph/c4-activity-graph.js';
5
5
  export type { C4ActivityGraphProps } from './components/c4-activity-graph/c4-activity-graph.types.js';
6
- export { C4AdvancedSearchFilters } from './components/c4-advanced-search-filters/c4-advanced-search-filters.js';
7
- export type { AdvancedFilterOperator, C4AdvancedSearchFiltersProps, FieldSpec, FieldSpecMap, FilterPayload, } from './components/c4-advanced-search-filters/c4-advanced-search-filters.types.js';
8
6
  export { C4AiUsage } from './components/c4-ai-usage/c4-ai-usage.js';
9
7
  export type { C4AiUsageProps } from './components/c4-ai-usage/c4-ai-usage.types.js';
10
8
  export { C4AlphaClusterAtCheckout } from './components/c4-alpha-cluster-at-checkout/c4-alpha-cluster-at-checkout.js';
11
9
  export type { C4AlphaClusterAtCheckoutProps } from './components/c4-alpha-cluster-at-checkout/c4-alpha-cluster-at-checkout.types.js';
10
+ export { C4ApiClientScopePicker } from './components/c4-api-client-scope-picker/c4-api-client-scope-picker.js';
11
+ export type { C4ApiClientScope, C4ApiClientScopeGroup, C4ApiClientScopePickerProps, } from './components/c4-api-client-scope-picker/c4-api-client-scope-picker.types.js';
12
12
  export { C4AppTeaserCard } from './components/c4-app-teaser-card/c4-app-teaster-card.js';
13
13
  export type { C4AppTeaserCardProps } from './components/c4-app-teaser-card/c4-app-teaster-card.types.js';
14
14
  export { C4AppTeaserCards } from './components/c4-app-teaser-cards/c4-app-teaser-cards.js';
@@ -200,7 +200,7 @@ 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, 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';
203
+ export { addC4ConsoleNotification, buildClusterSsoCallbackUrl, 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, useC4FeatureFlag, useC4UserNotifications, useC4UserTheme, useC4WebappBreadcrumbData, } from './runtime/index.js';
204
204
  export type { TranslateFn } from './utils/safe-translate.js';
205
205
  export { ENVIRONMENT_KEY_SUFFIX, safeTranslate, scopedTranslate, } from './utils/safe-translate.js';
206
206
  export type { C4WidgetScope } from './widgets/c4-widget-scope.types.js';
package/lib/esm/index.js CHANGED
@@ -6,10 +6,9 @@
6
6
  export { C4_ASSET_URLS } from './assetUrls.js';
7
7
  export { C4ActionableNotification } from './components/c4-actionable-notification/c4-actionable-notification.js';
8
8
  export { C4ActivityGraph } from './components/c4-activity-graph/c4-activity-graph.js';
9
- // Re-export chart definition types for consumers
10
- export { C4AdvancedSearchFilters } from './components/c4-advanced-search-filters/c4-advanced-search-filters.js';
11
9
  export { C4AiUsage } from './components/c4-ai-usage/c4-ai-usage.js';
12
10
  export { C4AlphaClusterAtCheckout } from './components/c4-alpha-cluster-at-checkout/c4-alpha-cluster-at-checkout.js';
11
+ export { C4ApiClientScopePicker } from './components/c4-api-client-scope-picker/c4-api-client-scope-picker.js';
13
12
  export { C4AppTeaserCard } from './components/c4-app-teaser-card/c4-app-teaster-card.js';
14
13
  export { C4AppTeaserCards } from './components/c4-app-teaser-cards/c4-app-teaser-cards.js';
15
14
  export { C4AsyncModal } from './components/c4-async-modal/c4-async-modal.js';
@@ -114,7 +113,7 @@ export { openC4RenameOrganizationModal, setC4RenameOrganizationModalHandle, } fr
114
113
  // re-listed per module, so the package root and the
115
114
  // `@camunda/ccma-saas-frontend/runtime` subpath expose one identical surface.
116
115
  // Add runtime exports in `src/runtime/index.ts` and mirror them here.
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';
116
+ export { addC4ConsoleNotification, buildClusterSsoCallbackUrl, 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, useC4FeatureFlag, useC4UserNotifications, useC4UserTheme, useC4WebappBreadcrumbData, } from './runtime/index.js';
118
117
  export { ENVIRONMENT_KEY_SUFFIX, safeTranslate, scopedTranslate, } from './utils/safe-translate.js';
119
118
  export { C4ClusterClientDetailsApp } from './widgets/cluster-client-details/c4-cluster-client-details-app.js';
120
119
  export { C4ClusterDetailsApp } from './widgets/cluster-details/c4-cluster-details-app.js';
@@ -0,0 +1,34 @@
1
+ import type { ConsoleClusterDto } from '@camunda/ccma-shared-types';
2
+ import type { ConsoleStage } from './c4-console-runtime.types.js';
3
+ /**
4
+ * Builds the OIDC callback URL an admin registers with their own identity
5
+ * provider (#9866).
6
+ *
7
+ * The path is Spring's default (`{baseUrl}/sso-callback`) and is not
8
+ * configurable, so an admin had no way to find this out from Console and had to
9
+ * be told out of band. This is not the `post_logout_redirect_uri`, which is a
10
+ * different URL used only during logout.
11
+ *
12
+ * Shape: `https://{regionId}.api.{domain}/sso-callback?uuid={clusterId}`, for
13
+ * example `https://bru-2.api.camunda.io/sso-callback?uuid={clusterId}`.
14
+ *
15
+ * The region id comes from the first label of the operator-written
16
+ * `status.operateUrl`, the same source `buildClusterSwaggerUrl` uses. Console
17
+ * does not hold the region slug itself: `K8sContext.region` carries the cloud
18
+ * region (`us-east-1`) and `K8sContext.name` a display label, so the operator's
19
+ * own hostname is the only place the slug appears.
20
+ *
21
+ * Returns `undefined` when the URL cannot be built for certain:
22
+ * - The cluster status carries no `operateUrl` yet, because the cluster is
23
+ * still in creation.
24
+ * - The `operateUrl` does not parse, or carries no region label.
25
+ *
26
+ * A wrong redirect URI fails at login, and it fails inside the customer's
27
+ * identity provider where Console cannot see it. So this returns nothing rather
28
+ * than a guess, and the caller shows nothing rather than something to copy.
29
+ */
30
+ export declare function buildClusterSsoCallbackUrl(params: {
31
+ cluster: Pick<ConsoleClusterDto, 'status'> | undefined;
32
+ clusterId: string;
33
+ stage: ConsoleStage;
34
+ }): string | undefined;
@@ -0,0 +1,49 @@
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
+ */
5
+ import { toServiceDomain } from './to-api-domain.js';
6
+ /**
7
+ * Builds the OIDC callback URL an admin registers with their own identity
8
+ * provider (#9866).
9
+ *
10
+ * The path is Spring's default (`{baseUrl}/sso-callback`) and is not
11
+ * configurable, so an admin had no way to find this out from Console and had to
12
+ * be told out of band. This is not the `post_logout_redirect_uri`, which is a
13
+ * different URL used only during logout.
14
+ *
15
+ * Shape: `https://{regionId}.api.{domain}/sso-callback?uuid={clusterId}`, for
16
+ * example `https://bru-2.api.camunda.io/sso-callback?uuid={clusterId}`.
17
+ *
18
+ * The region id comes from the first label of the operator-written
19
+ * `status.operateUrl`, the same source `buildClusterSwaggerUrl` uses. Console
20
+ * does not hold the region slug itself: `K8sContext.region` carries the cloud
21
+ * region (`us-east-1`) and `K8sContext.name` a display label, so the operator's
22
+ * own hostname is the only place the slug appears.
23
+ *
24
+ * Returns `undefined` when the URL cannot be built for certain:
25
+ * - The cluster status carries no `operateUrl` yet, because the cluster is
26
+ * still in creation.
27
+ * - The `operateUrl` does not parse, or carries no region label.
28
+ *
29
+ * A wrong redirect URI fails at login, and it fails inside the customer's
30
+ * identity provider where Console cannot see it. So this returns nothing rather
31
+ * than a guess, and the caller shows nothing rather than something to copy.
32
+ */
33
+ export function buildClusterSsoCallbackUrl(params) {
34
+ const operateUrl = params.cluster?.status?.operateUrl;
35
+ if (!operateUrl)
36
+ return undefined;
37
+ let regionId;
38
+ try {
39
+ regionId = new URL(operateUrl).hostname.split('.')[0];
40
+ }
41
+ catch {
42
+ return undefined;
43
+ }
44
+ // A hostname with no label before the first dot, or one that is the bare
45
+ // domain, gives nothing to build on.
46
+ if (!regionId || regionId === operateUrl)
47
+ return undefined;
48
+ return `https://${regionId}.${toServiceDomain(params.stage, 'api')}/sso-callback?uuid=${params.clusterId}`;
49
+ }
@@ -3,8 +3,13 @@ import type { ConsoleStage } from './c4-console-runtime.types.js';
3
3
  /**
4
4
  * Builds the cluster-specific Swagger UI URL.
5
5
  *
6
- * Returns `undefined` when the swagger feature is disabled or when the cluster
7
- * status does not yet carry an operateUrl (e.g. cluster is still being created).
6
+ * Returns `undefined` in these cases:
7
+ * - The cluster's Zeebe version is older than `SWAGGER_MIN_VERSION`, or the
8
+ * version is missing or invalid.
9
+ * - The swagger feature is disabled for the cluster.
10
+ * - The cluster status carries no operateUrl yet, because the cluster is still
11
+ * in creation.
12
+ * - The operateUrl does not parse as a valid URL.
8
13
  *
9
14
  * URL format depends on the cluster generation version:
10
15
  * - Camunda 8.8.x: https://{regionId}.operate.{domain}/{clusterId}/swagger-ui/index.html
@@ -3,13 +3,18 @@
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, SWAGGER_URL_8_9_MIN_VERSION, VersionCheckOperator, } from '@camunda/ccma-shared-types';
6
+ import { checkVersion, SWAGGER_MIN_VERSION, 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.
10
10
  *
11
- * Returns `undefined` when the swagger feature is disabled or when the cluster
12
- * status does not yet carry an operateUrl (e.g. cluster is still being created).
11
+ * Returns `undefined` in these cases:
12
+ * - The cluster's Zeebe version is older than `SWAGGER_MIN_VERSION`, or the
13
+ * version is missing or invalid.
14
+ * - The swagger feature is disabled for the cluster.
15
+ * - The cluster status carries no operateUrl yet, because the cluster is still
16
+ * in creation.
17
+ * - The operateUrl does not parse as a valid URL.
13
18
  *
14
19
  * URL format depends on the cluster generation version:
15
20
  * - Camunda 8.8.x: https://{regionId}.operate.{domain}/{clusterId}/swagger-ui/index.html
@@ -18,7 +23,18 @@ import { toServiceDomain } from './to-api-domain.js';
18
23
  export function buildClusterSwaggerUrl(params) {
19
24
  const swaggerEnabled = params.cluster.externalMetadata?.swagger ?? true;
20
25
  const operateUrl = params.cluster?.status?.operateUrl;
21
- if (!swaggerEnabled || !operateUrl) {
26
+ const zeebeVersion = params.cluster.generation?.versions?.zeebe;
27
+ // A cluster older than this floor serves no Swagger UI at either URL shape.
28
+ // Without this gate the function still builds a correct 8.8 URL for it. A
29
+ // caller that only tests for `undefined` then shows a dead "Open Swagger UI".
30
+ const supportsSwagger = checkVersion({
31
+ possiblyVersionOrDockerPath: zeebeVersion,
32
+ trueForSnapshot: true,
33
+ trueOnInvalidVersion: false,
34
+ versionToCompareTo: SWAGGER_MIN_VERSION,
35
+ operator: VersionCheckOperator.GreaterThanOrEqual,
36
+ });
37
+ if (!supportsSwagger || !swaggerEnabled || !operateUrl) {
22
38
  return undefined;
23
39
  }
24
40
  let regionId;
@@ -28,7 +44,6 @@ export function buildClusterSwaggerUrl(params) {
28
44
  catch {
29
45
  return undefined;
30
46
  }
31
- const zeebeVersion = params.cluster.generation?.versions?.zeebe;
32
47
  const is89OrHigher = checkVersion({
33
48
  possiblyVersionOrDockerPath: zeebeVersion,
34
49
  trueForSnapshot: true,
@@ -13,3 +13,13 @@ export declare const useC4ConsoleRuntime: () => C4ConsoleRuntimeConfig;
13
13
  * the Design System by setting `designSystem: 'ds'` on the runtime config.
14
14
  */
15
15
  export declare const useC4DesignSystem: () => C4DesignSystem;
16
+ /**
17
+ * Whether a feature flag is on for the host. Non-throwing and
18
+ * provider-optional, like `useC4DesignSystem`: with no runtime provider (a
19
+ * test, a Storybook story) every flag reads as off. Off is also what a
20
+ * stage-gated flag gives on prod, so the default shows the public behavior.
21
+ *
22
+ * The key is the dot path of the flag in `@camunda-cloud/featureflags`, for
23
+ * example `console.optionalTelemetry`.
24
+ */
25
+ export declare const useC4FeatureFlag: (flagKey: string) => boolean;
@@ -60,3 +60,15 @@ export const useC4ConsoleRuntime = () => {
60
60
  export const useC4DesignSystem = () => {
61
61
  return useContext(RuntimeContext)?.designSystem ?? 'carbon';
62
62
  };
63
+ /**
64
+ * Whether a feature flag is on for the host. Non-throwing and
65
+ * provider-optional, like `useC4DesignSystem`: with no runtime provider (a
66
+ * test, a Storybook story) every flag reads as off. Off is also what a
67
+ * stage-gated flag gives on prod, so the default shows the public behavior.
68
+ *
69
+ * The key is the dot path of the flag in `@camunda-cloud/featureflags`, for
70
+ * example `console.optionalTelemetry`.
71
+ */
72
+ export const useC4FeatureFlag = (flagKey) => {
73
+ return useContext(RuntimeContext)?.featureFlags?.isEnabled?.(flagKey) ?? false;
74
+ };
@@ -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 { buildClusterSsoCallbackUrl } from './build-cluster-sso-callback-url.js';
24
25
  export { buildClusterSwaggerUrl } from './build-cluster-swagger-url.js';
25
26
  export type { C4ConsoleAuthzFeatures, C4ConsoleAuthzState, C4ConsoleVisibilities, } from './c4-console-authz.js';
26
27
  export { useC4ConsoleAuthz } from './c4-console-authz.js';
@@ -31,7 +32,7 @@ export { C4ConsoleEventsProvider, useC4ConsoleEventsState, } from './c4-console-
31
32
  export { C4ConsoleNotificationsProvider, useC4ConsoleNotifications, } from './c4-console-notifications-context.js';
32
33
  export type { AddC4ConsoleNotificationOptions, C4ConsoleNotification, C4ConsoleNotificationAction, C4ConsoleNotificationKind, C4ConsoleNotificationsState, } from './c4-console-notifications-context.types.js';
33
34
  export type { C4ConsoleRuntimeConfig, ConsoleAuth, ConsoleBackendUrls, ConsoleClickwrapConfig, ConsolePublicUrls, ConsoleStage, ConsoleTelemetry, ConsoleUser, } from './c4-console-runtime.types.js';
34
- export { C4ConsoleRuntimeProvider, useC4ConsoleRuntime, useC4DesignSystem, } from './c4-console-runtime-context.js';
35
+ export { C4ConsoleRuntimeProvider, useC4ConsoleRuntime, useC4DesignSystem, useC4FeatureFlag, } from './c4-console-runtime-context.js';
35
36
  export { C4UserNotificationsProvider, useC4UserNotifications, } from './c4-user-notifications-context.js';
36
37
  export type { C4UserNotificationsProviderProps, C4UserNotificationsState, } from './c4-user-notifications-context.types.js';
37
38
  export type { C4ResolvedTheme, C4ThemePreference, C4UserThemeState, } from './c4-user-theme.js';
@@ -7,12 +7,13 @@
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 { buildClusterSsoCallbackUrl } from './build-cluster-sso-callback-url.js';
10
11
  export { buildClusterSwaggerUrl } from './build-cluster-swagger-url.js';
11
12
  export { useC4ConsoleAuthz } from './c4-console-authz.js';
12
13
  export { C4ConsoleDataProvider, useC4ConsoleData, } from './c4-console-data-context.js';
13
14
  export { C4ConsoleEventsProvider, useC4ConsoleEventsState, } from './c4-console-events-context.js';
14
15
  export { C4ConsoleNotificationsProvider, useC4ConsoleNotifications, } from './c4-console-notifications-context.js';
15
- export { C4ConsoleRuntimeProvider, useC4ConsoleRuntime, useC4DesignSystem, } from './c4-console-runtime-context.js';
16
+ export { C4ConsoleRuntimeProvider, useC4ConsoleRuntime, useC4DesignSystem, useC4FeatureFlag, } from './c4-console-runtime-context.js';
16
17
  export { C4UserNotificationsProvider, useC4UserNotifications, } from './c4-user-notifications-context.js';
17
18
  export { useC4UserTheme } from './c4-user-theme.js';
18
19
  export { buildModelerOrgUrl, DEFAULT_NAV_APPS, getClusterStage, getEndpointForApp, getReadableAppName, hasReadPermissionForApp, isAdminApp, isAppHealthyOnCluster, resolveAdminAppName, } from './nav/camunda-apps.js';
@@ -0,0 +1,17 @@
1
+ export declare const HUB_API_NAMING_FLAG = "console.hubApiNaming";
2
+ /**
3
+ * Whether the Administration API surfaces use the Hub wording.
4
+ *
5
+ * The Hub rollout renames the Modeler scopes: the scope group in the
6
+ * create-client modal reads "Hub API" and the scope columns read "Hub Scopes".
7
+ * The flag `console.hubApiNaming` is on for local, dev and int, so a prod user
8
+ * keeps the "Web Modeler API" and "Modeler Scopes" wording until Hub is
9
+ * public. Only the text changes. The scope values that go to the API
10
+ * (`GetModel`, `CreateModel`, ...) are the same on every stage.
11
+ *
12
+ * Each renamed i18n key has a `Hub` sibling, for example
13
+ * `apiclients:create.fields.scopes.modeler.label` and `…modeler.labelHub`.
14
+ * When the flag widens to `true`, delete this hook, the Modeler variant of
15
+ * each key, and the `hubNaming` branch at every call site.
16
+ */
17
+ export declare const useHubApiNaming: () => boolean;
@@ -0,0 +1,23 @@
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
+ import { useC4FeatureFlag } from './c4-console-runtime-context.js';
7
+ export const HUB_API_NAMING_FLAG = 'console.hubApiNaming';
8
+ /**
9
+ * Whether the Administration API surfaces use the Hub wording.
10
+ *
11
+ * The Hub rollout renames the Modeler scopes: the scope group in the
12
+ * create-client modal reads "Hub API" and the scope columns read "Hub Scopes".
13
+ * The flag `console.hubApiNaming` is on for local, dev and int, so a prod user
14
+ * keeps the "Web Modeler API" and "Modeler Scopes" wording until Hub is
15
+ * public. Only the text changes. The scope values that go to the API
16
+ * (`GetModel`, `CreateModel`, ...) are the same on every stage.
17
+ *
18
+ * Each renamed i18n key has a `Hub` sibling, for example
19
+ * `apiclients:create.fields.scopes.modeler.label` and `…modeler.labelHub`.
20
+ * When the flag widens to `true`, delete this hook, the Modeler variant of
21
+ * each key, and the `hubNaming` branch at every call site.
22
+ */
23
+ export const useHubApiNaming = () => useC4FeatureFlag(HUB_API_NAMING_FLAG);
@@ -40,3 +40,7 @@ export declare const useBreadcrumbFamily: () => {
40
40
  Breadcrumb: import("react").ForwardRefExoticComponent<import("@carbon/react").BreadcrumbProps & import("react").RefAttributes<HTMLElement>>;
41
41
  BreadcrumbItem: import("react").ForwardRefExoticComponent<import("@carbon/react").BreadcrumbItemProps & import("react").RefAttributes<HTMLLIElement>>;
42
42
  };
43
+ export declare const useDatePickerFamily: () => {
44
+ DatePicker: import("react").ForwardRefExoticComponent<import("@carbon/react").DatePickerProps & import("react").RefAttributes<HTMLDivElement>>;
45
+ DatePickerInput: import("react").ForwardRefExoticComponent<import("@carbon/react").DatePickerInputProps & import("react").RefAttributes<HTMLDivElement>>;
46
+ };
@@ -3,8 +3,9 @@
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 { Breadcrumb as DsBreadcrumb, BreadcrumbItem as DsBreadcrumbItem, ContentSwitcher as DsContentSwitcher, MenuButton as DsMenuButton, MenuItem as DsMenuItem, RadioButton as DsRadioButton, RadioButtonGroup as DsRadioButtonGroup, Select as DsSelect, SelectItem as DsSelectItem, Switch as DsSwitch, } from '@camunda/design-system/carbon-compat';
7
- import { Breadcrumb as CarbonBreadcrumb, BreadcrumbItem as CarbonBreadcrumbItem, ContentSwitcher as CarbonContentSwitcher, MenuButton as CarbonMenuButton, MenuItem as CarbonMenuItem, RadioButton as CarbonRadioButton, RadioButtonGroup as CarbonRadioButtonGroup, Select as CarbonSelect, SelectItem as CarbonSelectItem, Switch as CarbonSwitch, } from '@carbon/react';
6
+ import { Breadcrumb as DsBreadcrumb, BreadcrumbItem as DsBreadcrumbItem, ContentSwitcher as DsContentSwitcher, DatePicker as DsDatePicker, DatePickerInput as DsDatePickerInput, MenuButton as DsMenuButton, MenuItem as DsMenuItem, RadioButton as DsRadioButton, RadioButtonGroup as DsRadioButtonGroup, Select as DsSelect, SelectItem as DsSelectItem, Switch as DsSwitch, } from '@camunda/design-system/carbon-compat';
7
+ import { Breadcrumb as CarbonBreadcrumb, BreadcrumbItem as CarbonBreadcrumbItem, ContentSwitcher as CarbonContentSwitcher, DatePicker as CarbonDatePicker, DatePickerInput as CarbonDatePickerInput, MenuButton as CarbonMenuButton, MenuItem as CarbonMenuItem, RadioButton as CarbonRadioButton, RadioButtonGroup as CarbonRadioButtonGroup, Select as CarbonSelect, SelectItem as CarbonSelectItem, Switch as CarbonSwitch, } from '@carbon/react';
8
+ import { createElement } from 'react';
8
9
  import { useC4DesignSystem } from '../runtime/c4-console-runtime-context.js';
9
10
  /**
10
11
  * Compound-family switching for c4.
@@ -44,3 +45,22 @@ export const useBreadcrumbFamily = makeFamily({ Breadcrumb: CarbonBreadcrumb, Br
44
45
  Breadcrumb: DsBreadcrumb,
45
46
  BreadcrumbItem: DsBreadcrumbItem,
46
47
  });
48
+ /**
49
+ * DS renders a date range as ONE control, so it composes the trigger label from
50
+ * the two `DatePickerInput` `labelText`s and joins them with a separator. The
51
+ * upstream default is the word "to", which reads badly for the relational
52
+ * labels our call sites pass ("From" + "To" -> "From to To"). An en dash reads
53
+ * better, so the label becomes "From" en dash "To".
54
+ *
55
+ * The separator goes after the spread, so a call site cannot set it: the prop
56
+ * has no Carbon equivalent, and Carbon puts props it does not know on its
57
+ * wrapper element. Call sites keep the Carbon props, which is why they can not
58
+ * name it in the first place.
59
+ */
60
+ function DsRangeLabelDatePicker(props) {
61
+ return createElement(DsDatePicker, { ...props, rangeLabelSeparator: '\u2013' });
62
+ }
63
+ export const useDatePickerFamily = makeFamily({ DatePicker: CarbonDatePicker, DatePickerInput: CarbonDatePickerInput }, {
64
+ DatePicker: DsRangeLabelDatePicker,
65
+ DatePickerInput: DsDatePickerInput,
66
+ });
@@ -1,7 +1,22 @@
1
- import { type HdpPrometheusDataCapacityDataPoint } from '@camunda/ccma-shared-types';
1
+ import { type ConsoleClusterDto, deriveSecondaryStorageStatus, type HdpPrometheusDataCapacityDataPoint } from '@camunda/ccma-shared-types';
2
2
  import { type JSX } from 'react';
3
3
  import type { C4ClusterDetailsAppProps } from './c4-cluster-details-app.types.js';
4
4
  export declare function mergeNestedSnapshot<T>(previous: T | undefined, next: T): T;
5
+ /**
6
+ * True when this is a dual-region BYOK cluster and the secondary region's
7
+ * key is not accessible. Exported (and kept pure) so both the header
8
+ * indicator and the Encryption tab's own warning read the same computation,
9
+ * and so this can be tested without rendering the full component.
10
+ *
11
+ * Gated on `encryption === 'External'` to match the Encryption tab's own
12
+ * visibility (`tab.visible` below) — otherwise the header indicator could
13
+ * tell the customer to click through to a tab that is not shown.
14
+ */
15
+ export declare function computeSecondaryReplicationNotReady(cluster: Pick<ConsoleClusterDto, 'encryption' | 'backupRegionCodes'> & {
16
+ status?: {
17
+ conditions?: Parameters<typeof deriveSecondaryStorageStatus>[0];
18
+ };
19
+ }): boolean;
5
20
  export declare function ensureClusterLoadPerDay(perDay: HdpPrometheusDataCapacityDataPoint[]): HdpPrometheusDataCapacityDataPoint[];
6
21
  export declare function ensureClusterLoad24h(last24h: HdpPrometheusDataCapacityDataPoint[]): HdpPrometheusDataCapacityDataPoint[];
7
22
  export declare const C4ClusterDetailsApp: ((props: C4ClusterDetailsAppProps) => JSX.Element) & {