@camunda/ccma-saas-frontend 0.1.0 → 0.3.0

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 (189) hide show
  1. package/lib/esm/components/c4-billing-page/c4-billing-page.mocks.d.ts +3 -0
  2. package/lib/esm/components/c4-billing-page/c4-billing-page.mocks.js +154 -0
  3. package/lib/esm/components/c4-billing-page/elements/value-metric.d.ts +2 -0
  4. package/lib/esm/components/c4-billing-page/elements/value-metric.js +14 -3
  5. package/lib/esm/components/c4-billing-page/elements/value-metric.spec.js +18 -0
  6. package/lib/esm/components/c4-charts-dashboard/elements/alluvial-chart.js +58 -1
  7. package/lib/esm/components/c4-charts-dashboard/elements/bar-chart.js +40 -6
  8. package/lib/esm/components/c4-charts-dashboard/elements/line-chart.js +6 -0
  9. package/lib/esm/components/c4-cluster-details-alerts/c4-cluster-details-alerts.mocks.d.ts +5 -0
  10. package/lib/esm/components/c4-cluster-details-alerts/c4-cluster-details-alerts.mocks.js +83 -0
  11. package/lib/esm/components/c4-cluster-details-clients/c4-cluster-details-clients.mocks.d.ts +6 -0
  12. package/lib/esm/components/c4-cluster-details-clients/c4-cluster-details-clients.mocks.js +79 -0
  13. package/lib/esm/components/c4-cluster-details-connector-secrets/c4-cluster-details-connector-secrets.mocks.d.ts +3 -0
  14. package/lib/esm/components/c4-cluster-details-connector-secrets/c4-cluster-details-connector-secrets.mocks.js +65 -0
  15. package/lib/esm/components/c4-cluster-details-hot-backups/c4-cluster-details-hot-backups.mocks.d.ts +60 -0
  16. package/lib/esm/components/c4-cluster-details-hot-backups/c4-cluster-details-hot-backups.mocks.js +143 -0
  17. package/lib/esm/components/c4-cluster-details-ip-whitelist/c4-cluster-details-ip-whitelist.mocks.d.ts +6 -0
  18. package/lib/esm/components/c4-cluster-details-ip-whitelist/c4-cluster-details-ip-whitelist.mocks.js +51 -0
  19. package/lib/esm/components/c4-cluster-list/c4-cluster-list.d.ts +1 -1
  20. package/lib/esm/components/c4-cluster-list/c4-cluster-list.js +63 -2
  21. package/lib/esm/components/c4-cluster-list/c4-cluster-list.mocks.d.ts +4 -0
  22. package/lib/esm/components/c4-cluster-list/c4-cluster-list.mocks.js +132 -0
  23. package/lib/esm/components/c4-cluster-list/c4-cluster-list.types.d.ts +7 -0
  24. package/lib/esm/components/c4-cluster-overview/applications.js +17 -3
  25. package/lib/esm/components/c4-cluster-overview/applications.spec.js +27 -1
  26. package/lib/esm/components/c4-cluster-overview/c4-cluster-overview.mocks.d.ts +8 -0
  27. package/lib/esm/components/c4-cluster-overview/c4-cluster-overview.mocks.js +203 -0
  28. package/lib/esm/components/c4-cluster-overview/cluster-details.d.ts +2 -0
  29. package/lib/esm/components/c4-cluster-overview/cluster-details.js +59 -9
  30. package/lib/esm/components/c4-cluster-overview/cluster-load.js +38 -3
  31. package/lib/esm/components/c4-cluster-settings/c4-cluster-settings.mocks.d.ts +16 -0
  32. package/lib/esm/components/c4-cluster-settings/c4-cluster-settings.mocks.js +104 -0
  33. package/lib/esm/components/c4-cluster-settings/elements/app-integrations-toggle.d.ts +14 -0
  34. package/lib/esm/components/c4-cluster-settings/elements/app-integrations-toggle.js +12 -0
  35. package/lib/esm/components/c4-cluster-settings/elements/cluster-settings.d.ts +5 -1
  36. package/lib/esm/components/c4-cluster-settings/elements/cluster-settings.js +10 -3
  37. package/lib/esm/components/c4-cluster-settings/elements/external-identity-provider-modal.d.ts +20 -0
  38. package/lib/esm/components/c4-cluster-settings/elements/external-identity-provider-modal.js +85 -0
  39. package/lib/esm/components/c4-cluster-settings/elements/external-identity-provider-modal.spec.d.ts +1 -0
  40. package/lib/esm/components/c4-cluster-settings/elements/external-identity-provider-modal.spec.js +93 -0
  41. package/lib/esm/components/c4-cluster-settings/elements/external-identity-provider.d.ts +20 -0
  42. package/lib/esm/components/c4-cluster-settings/elements/external-identity-provider.js +15 -0
  43. package/lib/esm/components/c4-cluster-settings/elements/external-identity-provider.spec.d.ts +1 -0
  44. package/lib/esm/components/c4-cluster-settings/elements/external-identity-provider.spec.js +50 -0
  45. package/lib/esm/components/c4-cluster-settings/elements/optimize-filtering-settings.d.ts +10 -4
  46. package/lib/esm/components/c4-cluster-settings/elements/optimize-filtering-settings.js +116 -24
  47. package/lib/esm/components/c4-cluster-settings/elements/optimize-filtering-settings.spec.d.ts +1 -0
  48. package/lib/esm/components/c4-cluster-settings/elements/optimize-filtering-settings.spec.js +120 -0
  49. package/lib/esm/components/c4-cluster-tag-selector/c4-cluster-tag-selector.js +19 -1
  50. package/lib/esm/components/c4-console-dashboard/c4-console-dashboard.mocks.d.ts +2 -0
  51. package/lib/esm/components/c4-console-dashboard/c4-console-dashboard.mocks.js +186 -0
  52. package/lib/esm/components/c4-create-alert-modal/c4-create-alert-modal.d.ts +2 -0
  53. package/lib/esm/components/c4-create-alert-modal/c4-create-alert-modal.js +132 -0
  54. package/lib/esm/components/c4-create-alert-modal/c4-create-alert-modal.mocks.d.ts +2 -0
  55. package/lib/esm/components/c4-create-alert-modal/c4-create-alert-modal.mocks.js +20 -0
  56. package/lib/esm/components/c4-create-alert-modal/c4-create-alert-modal.types.d.ts +22 -0
  57. package/lib/esm/components/c4-create-alert-modal/c4-create-alert-modal.types.js +6 -0
  58. package/lib/esm/components/c4-create-cluster/c4-create-cluster-tile-grid.d.ts +32 -0
  59. package/lib/esm/components/c4-create-cluster/c4-create-cluster-tile-grid.js +71 -0
  60. package/lib/esm/components/c4-create-cluster/c4-create-cluster-tile-grid.spec.d.ts +1 -0
  61. package/lib/esm/components/c4-create-cluster/c4-create-cluster-tile-grid.spec.js +83 -0
  62. package/lib/esm/components/c4-create-cluster/c4-create-cluster.js +31 -58
  63. package/lib/esm/components/c4-create-cluster/c4-create-cluster.mocks.d.ts +64 -0
  64. package/lib/esm/components/c4-create-cluster/c4-create-cluster.mocks.js +298 -0
  65. package/lib/esm/components/c4-create-cluster-api-client-modal/c4-create-cluster-api-client-modal.js +48 -30
  66. package/lib/esm/components/c4-create-cluster-api-client-modal/c4-create-cluster-api-client-modal.mocks.d.ts +2 -0
  67. package/lib/esm/components/c4-create-cluster-api-client-modal/c4-create-cluster-api-client-modal.mocks.js +23 -0
  68. package/lib/esm/components/c4-create-cluster-api-client-modal/c4-create-cluster-api-client-modal.types.d.ts +2 -0
  69. package/lib/esm/components/c4-create-connector-secret-modal/c4-create-connector-secret-modal.mocks.d.ts +2 -0
  70. package/lib/esm/components/c4-create-connector-secret-modal/c4-create-connector-secret-modal.mocks.js +15 -0
  71. package/lib/esm/components/c4-create-console-api-client-modal/c4-create-console-api-client-modal.js +5 -5
  72. package/lib/esm/components/c4-create-console-api-client-modal/c4-create-console-api-client-modal.mocks.d.ts +2 -0
  73. package/lib/esm/components/c4-create-console-api-client-modal/c4-create-console-api-client-modal.mocks.js +13 -0
  74. package/lib/esm/components/c4-create-console-api-client-modal/c4-create-console-api-client-modal.types.d.ts +1 -0
  75. package/lib/esm/components/c4-create-ip-whitelist-modal/c4-create-ip-whitelist-modal.d.ts +2 -0
  76. package/lib/esm/components/c4-create-ip-whitelist-modal/c4-create-ip-whitelist-modal.js +77 -0
  77. package/lib/esm/components/c4-create-ip-whitelist-modal/c4-create-ip-whitelist-modal.mocks.d.ts +2 -0
  78. package/lib/esm/components/c4-create-ip-whitelist-modal/c4-create-ip-whitelist-modal.mocks.js +11 -0
  79. package/lib/esm/components/c4-create-ip-whitelist-modal/c4-create-ip-whitelist-modal.types.d.ts +14 -0
  80. package/lib/esm/components/c4-create-ip-whitelist-modal/c4-create-ip-whitelist-modal.types.js +6 -0
  81. package/lib/esm/components/c4-data-table/c4-data-table.js +117 -34
  82. package/lib/esm/components/c4-data-table/c4-data-table.stability.spec.d.ts +1 -0
  83. package/lib/esm/components/c4-data-table/c4-data-table.stability.spec.js +151 -0
  84. package/lib/esm/components/c4-job-dashboard-details-page/c4-job-dashboard-details-page.mocks.d.ts +2 -0
  85. package/lib/esm/components/c4-job-dashboard-details-page/c4-job-dashboard-details-page.mocks.js +231 -0
  86. package/lib/esm/components/c4-job-dashboard-details-page/elements/c4-job-dashboard-piechart.js +56 -2
  87. package/lib/esm/components/c4-job-dashboard-details-page/elements/c4-job-dashboard-time-chart.js +36 -1
  88. package/lib/esm/components/c4-job-dashboard-overview-page/c4-job-dashboard-overview.mocks.d.ts +2 -0
  89. package/lib/esm/components/c4-job-dashboard-overview-page/c4-job-dashboard-overview.mocks.js +102 -0
  90. package/lib/esm/components/c4-job-dashboard-shared/c4-job-dashboard-ds-colors.d.ts +10 -0
  91. package/lib/esm/components/c4-job-dashboard-shared/c4-job-dashboard-ds-colors.js +16 -0
  92. package/lib/esm/components/c4-management-activity/c4-management-activity.d.ts +1 -1
  93. package/lib/esm/components/c4-management-activity/c4-management-activity.js +103 -1
  94. package/lib/esm/components/c4-management-activity/c4-management-activity.mocks.d.ts +4 -0
  95. package/lib/esm/components/c4-management-activity/c4-management-activity.mocks.js +63 -0
  96. package/lib/esm/components/c4-management-activity/c4-management-activity.types.d.ts +11 -0
  97. package/lib/esm/components/c4-management-api/c4-management-api.mocks.d.ts +43 -0
  98. package/lib/esm/components/c4-management-api/c4-management-api.mocks.js +118 -0
  99. package/lib/esm/components/c4-management-overview/c4-management-overview.js +6 -4
  100. package/lib/esm/components/c4-old-dashboard/c4-old-dashboard.js +1 -1
  101. package/lib/esm/components/c4-old-dashboard/c4-old-dashboard.types.d.ts +1 -0
  102. package/lib/esm/components/c4-selectable-tile/c4-selectable-tile.js +4 -1
  103. package/lib/esm/components/c4-telemetry-page/telemetry-for-component.js +58 -36
  104. package/lib/esm/components/c4-usage-history/elements/usage-history-charts.js +6 -0
  105. package/lib/esm/components/c4-user-details/tabs/authorized-resources.js +3 -1
  106. package/lib/esm/components/shared-charts/ds-charts.smoke.spec.d.ts +1 -0
  107. package/lib/esm/components/shared-charts/ds-charts.smoke.spec.js +47 -0
  108. package/lib/esm/components/shared-charts/ds-line-chart.d.ts +33 -0
  109. package/lib/esm/components/shared-charts/ds-line-chart.js +55 -0
  110. package/lib/esm/components/shared-charts/ds-meter-chart.d.ts +22 -0
  111. package/lib/esm/components/shared-charts/ds-meter-chart.js +48 -0
  112. package/lib/esm/components/shared-charts/recharts-tokens.d.ts +24 -0
  113. package/lib/esm/components/shared-charts/recharts-tokens.js +51 -0
  114. package/lib/esm/externalUrls.const.d.ts +2 -0
  115. package/lib/esm/externalUrls.const.js +7 -0
  116. package/lib/esm/externalUrls.const.spec.js +2 -0
  117. package/lib/esm/i18n/en/entities/orgroles.json +0 -16
  118. package/lib/esm/i18n/en/pages/clusterdetails.json +9 -1
  119. package/lib/esm/i18n/en/pages/orgmanagement.json +9 -2
  120. package/lib/esm/index.d.ts +16 -1
  121. package/lib/esm/index.js +10 -1
  122. package/lib/esm/runtime/c4-console-authz.d.ts +26 -0
  123. package/lib/esm/runtime/c4-console-authz.js +58 -28
  124. package/lib/esm/runtime/c4-console-authz.spec.js +84 -17
  125. package/lib/esm/runtime/c4-console-data-context.js +40 -0
  126. package/lib/esm/runtime/c4-console-data-context.types.d.ts +19 -1
  127. package/lib/esm/runtime/c4-console-data-store.d.ts +25 -1
  128. package/lib/esm/runtime/c4-console-data-store.js +145 -31
  129. package/lib/esm/runtime/c4-console-data-store.nav.spec.d.ts +1 -0
  130. package/lib/esm/runtime/c4-console-data-store.nav.spec.js +121 -0
  131. package/lib/esm/runtime/c4-console-data-store.spec.js +35 -6
  132. package/lib/esm/runtime/c4-console-events-context.d.ts +18 -0
  133. package/lib/esm/runtime/c4-console-events-context.js +62 -0
  134. package/lib/esm/runtime/c4-console-runtime.types.d.ts +12 -0
  135. package/lib/esm/runtime/c4-user-notifications-context.d.ts +19 -0
  136. package/lib/esm/runtime/c4-user-notifications-context.js +201 -0
  137. package/lib/esm/runtime/c4-user-notifications-context.spec.d.ts +1 -0
  138. package/lib/esm/runtime/c4-user-notifications-context.spec.js +80 -0
  139. package/lib/esm/runtime/c4-user-notifications-context.types.d.ts +31 -0
  140. package/lib/esm/runtime/c4-user-notifications-context.types.js +6 -0
  141. package/lib/esm/runtime/c4-user-theme.d.ts +27 -0
  142. package/lib/esm/runtime/c4-user-theme.js +106 -0
  143. package/lib/esm/runtime/decode-access-token.d.ts +12 -0
  144. package/lib/esm/runtime/decode-access-token.js +39 -0
  145. package/lib/esm/runtime/nav/camunda-apps.d.ts +45 -0
  146. package/lib/esm/runtime/nav/camunda-apps.js +100 -0
  147. package/lib/esm/runtime/nav/camunda-apps.spec.d.ts +1 -0
  148. package/lib/esm/runtime/nav/camunda-apps.spec.js +90 -0
  149. package/lib/esm/runtime/nav/use-webapp-nav-data.d.ts +75 -0
  150. package/lib/esm/runtime/nav/use-webapp-nav-data.js +211 -0
  151. package/lib/esm/runtime/nav/use-webapp-nav-data.spec.d.ts +1 -0
  152. package/lib/esm/runtime/nav/use-webapp-nav-data.spec.js +91 -0
  153. package/lib/esm/runtime/to-api-config.js +4 -0
  154. package/lib/esm/ui/index.d.ts +1 -0
  155. package/lib/esm/ui/index.js +3 -2
  156. package/lib/esm/widgets/cluster-details/c4-cluster-details-app.d.ts +1 -0
  157. package/lib/esm/widgets/cluster-details/c4-cluster-details-app.js +32 -13
  158. package/lib/esm/widgets/cluster-details/c4-cluster-details-app.merge.spec.d.ts +1 -0
  159. package/lib/esm/widgets/cluster-details/c4-cluster-details-app.merge.spec.js +49 -0
  160. package/lib/esm/widgets/cluster-details/c4-cluster-details-app.types.d.ts +8 -0
  161. package/lib/esm/widgets/cluster-details/cluster-details-tabs.d.ts +23 -0
  162. package/lib/esm/widgets/cluster-details/cluster-details-tabs.js +83 -0
  163. package/lib/esm/widgets/cluster-details/cluster-details-tabs.spec.d.ts +1 -0
  164. package/lib/esm/widgets/cluster-details/cluster-details-tabs.spec.js +33 -0
  165. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-alerts-tab.js +17 -84
  166. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-ip-whitelist-tab.js +19 -35
  167. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-overview-tab.js +38 -18
  168. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-overview-tab.spec.js +38 -14
  169. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-settings-tab.d.ts +2 -0
  170. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-settings-tab.js +190 -3
  171. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-settings-tab.spec.js +60 -1
  172. package/lib/esm/widgets/clusters/c4-clusters-page.js +80 -44
  173. package/lib/esm/widgets/clusters/c4-clusters-page.spec.js +48 -48
  174. package/lib/esm/widgets/clusters/c4-clusters-page.types.d.ts +2 -0
  175. package/lib/esm/widgets/connector-management/c4-connector-management-page.spec.js +32 -0
  176. package/lib/esm/widgets/connector-management/c4-connector-management.shared.js +4 -3
  177. package/lib/esm/widgets/dashboard/c4-dashboard-app.js +21 -2
  178. package/lib/esm/widgets/group-details/c4-group-details-page.js +3 -2
  179. package/lib/esm/widgets/management/c4-management-app.js +80 -24
  180. package/lib/esm/widgets/management/c4-management-app.spec.js +32 -10
  181. package/lib/esm/widgets/management/management-tabs.d.ts +22 -0
  182. package/lib/esm/widgets/management/management-tabs.js +76 -0
  183. package/lib/esm/widgets/management/management-tabs.spec.d.ts +1 -0
  184. package/lib/esm/widgets/management/management-tabs.spec.js +28 -0
  185. package/lib/esm/widgets/management/tabs/c4-management-overview-tab.d.ts +2 -1
  186. package/lib/esm/widgets/management/tabs/c4-management-overview-tab.js +11 -2
  187. package/lib/esm/widgets/management/tabs/c4-management-users-tab.js +0 -10
  188. package/lib/esm/widgets/user-details/c4-user-details-page.js +0 -10
  189. package/package.json +9 -7
@@ -0,0 +1,83 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ /*
3
+ * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
4
+ * under one or more contributor license agreements. Licensed under a commercial license.
5
+ * You may not use this file except in compliance with the commercial license.
6
+ */
7
+ import { render, screen } from '@testing-library/react';
8
+ import userEvent from '@testing-library/user-event';
9
+ import { C4CreateClusterTileGrid } from './c4-create-cluster-tile-grid.js';
10
+ const makeItems = (count) => Array.from({ length: count }, (_, i) => ({
11
+ id: `id-${i}`,
12
+ label: `Region ${i}`,
13
+ }));
14
+ function renderGrid(overrides = {}) {
15
+ const onChange = vi.fn();
16
+ render(_jsx(C4CreateClusterTileGrid, { items: makeItems(6), getKey: (item) => item.id, getLabel: (item) => item.label, value: 'id-0', onChange: onChange, ariaLabel: 'Regions', initialCount: 3, searchPlaceholder: 'Search regions', ...overrides }));
17
+ return { onChange };
18
+ }
19
+ describe('C4CreateClusterTileGrid', () => {
20
+ it('hides the search box and load-more control when items fit within initialCount', () => {
21
+ renderGrid({ items: makeItems(3), initialCount: 3 });
22
+ expect(screen.queryByPlaceholderText('Search regions')).not.toBeInTheDocument();
23
+ expect(screen.queryByRole('button', { name: /load .* more/i })).not.toBeInTheDocument();
24
+ expect(screen.getAllByRole('radio')).toHaveLength(3);
25
+ });
26
+ it('shows the search box + load-more and pages through the items when over initialCount', async () => {
27
+ renderGrid({ items: makeItems(6), initialCount: 3 });
28
+ expect(screen.getByPlaceholderText('Search regions')).toBeInTheDocument();
29
+ expect(screen.getAllByRole('radio')).toHaveLength(3);
30
+ await userEvent.click(screen.getByRole('button', { name: /load 3 more/i }));
31
+ expect(screen.getAllByRole('radio')).toHaveLength(6);
32
+ expect(screen.queryByRole('button', { name: /load .* more/i })).not.toBeInTheDocument();
33
+ });
34
+ it('filters by label and shows the empty state when nothing matches', async () => {
35
+ renderGrid({ items: makeItems(6), initialCount: 3 });
36
+ const search = screen.getByPlaceholderText('Search regions');
37
+ await userEvent.type(search, 'Region 5');
38
+ expect(screen.getAllByRole('radio')).toHaveLength(1);
39
+ expect(screen.getByRole('radio', { name: 'Region 5' })).toBeInTheDocument();
40
+ await userEvent.clear(search);
41
+ await userEvent.type(search, 'nope');
42
+ expect(screen.queryAllByRole('radio')).toHaveLength(0);
43
+ expect(screen.getByText('No matches found')).toBeInTheDocument();
44
+ });
45
+ it('matches labels whose whitespace differs from the query (e.g. non-breaking spaces)', async () => {
46
+ const items = [
47
+ // "8.10" and "Cross..." are joined by a non-breaking space (U+00A0),
48
+ // as can happen with real generation names coming from the API.
49
+ { id: 'gen-1', label: '8.10 Cross Component Test Suite' },
50
+ { id: 'gen-2', label: '8.9 Stable' },
51
+ { id: 'gen-3', label: '8.8 Stable' },
52
+ { id: 'gen-4', label: '8.7 Stable' },
53
+ ];
54
+ renderGrid({ items, initialCount: 3, value: 'gen-2' });
55
+ const search = screen.getByPlaceholderText('Search regions');
56
+ // Prefix before the special character matches.
57
+ await userEvent.type(search, '8.10');
58
+ expect(screen.getAllByRole('radio')).toHaveLength(1);
59
+ // A regular space after the version (which never appears literally in the
60
+ // label) must still match.
61
+ await userEvent.clear(search);
62
+ await userEvent.type(search, '8.10 ');
63
+ expect(screen.getAllByRole('radio')).toHaveLength(1);
64
+ // The full label typed with regular spaces must match too.
65
+ await userEvent.clear(search);
66
+ await userEvent.type(search, '8.10 Cross Component Test Suite');
67
+ expect(screen.getAllByRole('radio')).toHaveLength(1);
68
+ expect(screen.getByRole('radio', { name: /Cross Component Test Suite/ })).toBeInTheDocument();
69
+ });
70
+ it('resets the visible count when the search value changes', async () => {
71
+ renderGrid({ items: makeItems(9), initialCount: 3 });
72
+ await userEvent.click(screen.getByRole('button', { name: /load 3 more/i }));
73
+ expect(screen.getAllByRole('radio')).toHaveLength(6);
74
+ // Typing (which matches all items) collapses back to initialCount.
75
+ await userEvent.type(screen.getByPlaceholderText('Search regions'), 'Region');
76
+ expect(screen.getAllByRole('radio')).toHaveLength(3);
77
+ });
78
+ it('selects an item via onChange when a tile is clicked', async () => {
79
+ const { onChange } = renderGrid({ items: makeItems(3), initialCount: 3 });
80
+ await userEvent.click(screen.getByRole('radio', { name: 'Region 2' }));
81
+ expect(onChange).toHaveBeenCalledWith('id-2');
82
+ });
83
+ });
@@ -6,25 +6,34 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
6
6
  */
7
7
  import { C3ClusterTag, } from '@camunda/camunda-composite-components';
8
8
  import { ClusterPlanTypeCategory, checkVersion, VersionCheckOperator, } from '@camunda/ccma-shared-types';
9
- import { Input, Textarea } from '@camunda/design-system';
9
+ import { ChoiceCard, ChoiceCardGroup, Input, Textarea, } from '@camunda/design-system';
10
10
  import { Column, FormLabel, Grid, InlineLoading, Stack, TextArea, TextInput, } from '@carbon/react';
11
11
  import { ChevronDown, ChevronUp, Code, DataBase } from '@carbon/react/icons/index.esm.js';
12
12
  import { useRef, useState } from 'react';
13
13
  import styled from 'styled-components';
14
14
  import { useC4DesignSystem } from '../../runtime/c4-console-runtime-context.js';
15
15
  import { Button, Checkbox, Link, SkeletonText, Tag, Tile } from '../../ui/index.js';
16
- import { useContentSwitcherFamily, useRadioFamily } from '../../ui/families.js';
16
+ import { useContentSwitcherFamily } from '../../ui/families.js';
17
17
  import { C4ClusterTagSelector } from '../c4-cluster-tag-selector/c4-cluster-tag-selector.js';
18
18
  import { C4Divider } from '../c4-divider/c4-divider.js';
19
19
  import { C4ExternalLink } from '../c4-external-link/c4-external-link.js';
20
20
  import { C4InlineNotification } from '../c4-inline-notification/c4-inline-notification.js';
21
21
  import { C4LinkButton } from '../c4-link-button/c4-link-button.js';
22
22
  import { C4SelectableTile } from '../c4-selectable-tile/c4-selectable-tile.js';
23
+ import { C4CreateClusterTileGrid } from './c4-create-cluster-tile-grid.js';
23
24
  var TasklistMode;
24
25
  (function (TasklistMode) {
25
26
  TasklistMode["V1"] = "v1";
26
27
  TasklistMode["V2"] = "v2";
27
28
  })(TasklistMode || (TasklistMode = {}));
29
+ const TASKLIST_MODE_OPTIONS = [
30
+ { value: TasklistMode.V2, label: 'Tasklist API v2' },
31
+ { value: TasklistMode.V1, label: 'Tasklist API v1 (legacy)' },
32
+ ];
33
+ const AUTHORIZATION_OPTIONS = [
34
+ { value: 'true', label: 'Enabled' },
35
+ { value: 'false', label: 'Disabled' },
36
+ ];
28
37
  const SummaryDesktopWrapper = styled.div `
29
38
  position: sticky;
30
39
  top: 5rem;
@@ -54,19 +63,6 @@ const FormElementTitle = (props) => _jsx("h3", { children: props.title });
54
63
  const ClusterPlanTypeTile = (props) => {
55
64
  return (_jsxs(Stack, { gap: 4, children: [props.type === 'dev' ? _jsx(Code, {}) : _jsx(DataBase, {}), _jsx("h6", { children: props.title }), _jsx("p", { children: props.description })] }));
56
65
  };
57
- // In ds mode the family RadioButton renders a DS RadioGroupItem (Radix), which
58
- // must live inside a RadioGroup and is driven by the group's value/onChange
59
- // (the per-item checked/onChange are dropped). So ds wraps the grid in the
60
- // family RadioButtonGroup and lifts selection to the group; carbon keeps the
61
- // plain Grid with self-managed RadioButtons (unchanged).
62
- const RadioButtonGroupWithGrid = (props) => {
63
- const designSystem = useC4DesignSystem();
64
- const { RadioButtonGroup } = useRadioFamily();
65
- if (designSystem === 'ds') {
66
- return (_jsx(RadioButtonGroup, { name: props.name ?? '', valueSelected: props.valueSelected ?? '', onChange: (value) => props.onChange?.(value), children: _jsx(Grid, { children: props.children }) }));
67
- }
68
- return _jsx(Grid, { children: props.children });
69
- };
70
66
  const enableMap = {
71
67
  prod: ['dev', 'test', 'stage', 'prod'],
72
68
  stage: ['dev', 'test', 'stage'],
@@ -75,7 +71,6 @@ const enableMap = {
75
71
  };
76
72
  export const C4CreateCluster = ({ loading, cta, formElements, autoUpdate, tasklistModeToggle, authorizationToggle, banner: { noSlotsLeft }, }) => {
77
73
  const designSystem = useC4DesignSystem();
78
- const { RadioButton, RadioButtonGroup } = useRadioFamily();
79
74
  const { ContentSwitcher, Switch } = useContentSwitcherFamily();
80
75
  const preConditions = formElements.clusterPlanType.options.length > 0 &&
81
76
  formElements.region.options.length > 0 &&
@@ -416,25 +411,19 @@ export const C4CreateCluster = ({ loading, cta, formElements, autoUpdate, taskli
416
411
  if (!(tasklistModeToggle?.enabled && generationIs8_8OrAboveAndLessThan8_10())) {
417
412
  return null;
418
413
  }
419
- return (_jsxs(Stack, { gap: 2, children: [_jsx(Grid, { children: _jsx(Column, { span: 12, children: _jsx(FormElementTitle, { title: tasklistModeToggle?.title ?? '' }) }) }), _jsx(Grid, { children: _jsx(Column, { span: 12, children: _jsxs("div", { style: { display: 'flex', flexDirection: 'column', gap: '1rem' }, children: [_jsxs(RadioButtonGroup, { defaultSelected: TasklistMode.V2, invalidText: 'Invalid selection', legendText: 'Select Tasklist version', name: 'tasklist-mode', warnText: 'Please select a Tasklist version', required: true, orientation: 'horizontal', onChange: (selection) => {
420
- setTasklistV2Enabled(selection === TasklistMode.V2);
421
- }, children: [_jsx(RadioButton, { id: TasklistMode.V2, labelText: 'Tasklist API v2', value: TasklistMode.V2 }), _jsx(RadioButton, { id: TasklistMode.V1, labelText: 'Tasklist API v1 (legacy)', value: TasklistMode.V1 })] }), _jsx("div", { children: _jsx("p", { children: _jsx("a", { href: tasklistModeToggle.tasklistApiVersionDocs, target: '_blank', rel: 'noopener', children: "Learn more about Tasklist v1 and v2" }) }) })] }) }) })] }));
414
+ return (_jsxs(Stack, { gap: 2, children: [_jsx(Grid, { children: _jsx(Column, { span: 12, children: _jsx(FormElementTitle, { title: tasklistModeToggle?.title ?? '' }) }) }), _jsx(Grid, { children: _jsx(Column, { span: 12, children: _jsxs("div", { style: { display: 'flex', flexDirection: 'column', gap: '1rem' }, children: [_jsxs("fieldset", { style: { border: 'none', margin: 0, padding: 0 }, children: [_jsx("legend", { style: {
415
+ padding: 0,
416
+ marginBottom: designSystem === 'ds' ? '0.75rem' : undefined,
417
+ }, children: "Select Tasklist version" }), _jsx(C4CreateClusterTileGrid, { items: TASKLIST_MODE_OPTIONS, getKey: (option) => option.value, getLabel: (option) => option.label, value: tasklistV2Enabled ? TasklistMode.V2 : TasklistMode.V1, onChange: (selection) => setTasklistV2Enabled(selection === TasklistMode.V2), ariaLabel: 'Select Tasklist version', columnWidth: '240px' })] }), _jsx("div", { children: _jsx("p", { children: _jsx("a", { href: tasklistModeToggle.tasklistApiVersionDocs, target: '_blank', rel: 'noopener', children: "Learn more about Tasklist v1 and v2" }) }) })] }) }) })] }));
422
418
  };
423
419
  const renderAuthorizationRadio = () => {
424
420
  if (!(authorizationToggle?.enabled && generationIs8_8OrAbove())) {
425
421
  return null;
426
422
  }
427
- return (_jsxs(Stack, { gap: 2, children: [_jsx(Grid, { children: _jsx(Column, { span: 12, children: _jsx(FormElementTitle, { title: authorizationToggle?.title ?? '' }) }) }), _jsx(Grid, { children: _jsx(Column, { span: 12, children: _jsxs("div", { style: { display: 'flex', flexDirection: 'column', gap: '1rem' }, children: [_jsxs(RadioButtonGroup, { valueSelected: authorizationEnabled ? 'true' : 'false', invalidText: 'Invalid selection', legendText: _jsx("div", {}), name: 'authorization-mode', warnText: 'Please select an option', required: true, orientation: 'horizontal', onChange: (selection) => {
428
- setAuthorizationEnabled(selection === 'true');
429
- }, children: [_jsx(RadioButton, { id: 'authorization-enabled', labelText: 'Enabled', value: 'true' }), _jsx(RadioButton, { id: 'authorization-disabled', labelText: 'Disabled', value: 'false' })] }, authorizationEnabled ? 'true' : 'false'), _jsxs("div", { children: [_jsx("p", { children: "When enabled, authorization-based access control is enforced." }), _jsxs("p", { children: ["When disabled, all users and clients will have full access to the cluster.", ' ', _jsx("a", { href: authorizationToggle.authorizationDocs, target: '_blank', rel: 'noopener', children: "Learn more" })] })] }), !authorizationEnabled && (_jsx(C4InlineNotification, { lowContrast: true, kind: ['stage', 'prod'].includes(selectedTag) ? 'warning' : 'info', hideCloseButton: true, title: 'Authorizations disabled', children: _jsx("p", { children: "All authenticated users & clients will have full access to the cluster." }) }))] }) }) })] }));
423
+ return (_jsxs(Stack, { gap: 2, children: [_jsx(Grid, { children: _jsx(Column, { span: 12, children: _jsx(FormElementTitle, { title: authorizationToggle?.title ?? '' }) }) }), _jsx(Grid, { children: _jsx(Column, { span: 12, children: _jsxs("div", { style: { display: 'flex', flexDirection: 'column', gap: '1rem' }, children: [_jsx(C4CreateClusterTileGrid, { items: AUTHORIZATION_OPTIONS, getKey: (option) => option.value, getLabel: (option) => option.label, value: authorizationEnabled ? 'true' : 'false', onChange: (selection) => setAuthorizationEnabled(selection === 'true'), ariaLabel: authorizationToggle?.title ?? 'Authorization', columnWidth: '240px' }), _jsxs("div", { children: [_jsx("p", { children: "When enabled, authorization-based access control is enforced." }), _jsxs("p", { children: ["When disabled, all users and clients will have full access to the cluster.", ' ', _jsx("a", { href: authorizationToggle.authorizationDocs, target: '_blank', rel: 'noopener', children: "Learn more" })] })] }), !authorizationEnabled && (_jsx(C4InlineNotification, { lowContrast: true, kind: ['stage', 'prod'].includes(selectedTag) ? 'warning' : 'info', hideCloseButton: true, title: 'Authorizations disabled', children: _jsx("p", { children: "All authenticated users & clients will have full access to the cluster." }) }))] }) }) })] }));
430
424
  };
431
- const renderGenerationRadioButtons = (generations) => {
432
- return (_jsx(RadioButtonGroupWithGrid, { valueSelected: selectedGeneration, onChange: (value) => updateSelectedGeneration(value), children: generations.map((generation) => (_jsx(Column, { sm: 4, md: 4, lg: 3, style: {
433
- justifySelf: 'start',
434
- marginBottom: '0.5rem',
435
- }, children: _jsx(RadioButton, { id: generation.uuid, value: generation.uuid, labelText: generation.title, checked: selectedGeneration === generation.uuid, onChange: (value) => {
436
- updateSelectedGeneration(value);
437
- }, disabled: isSubmitting() || noAvailableSlots }, generation.uuid) }, generation.uuid))) }));
425
+ const renderGenerationTiles = (generations) => {
426
+ return (_jsx(C4CreateClusterTileGrid, { items: generations, getKey: (generation) => generation.uuid, getLabel: (generation) => generation.title, getDisabled: () => isSubmitting() || noAvailableSlots, value: selectedGeneration, onChange: updateSelectedGeneration, ariaLabel: 'Select generation', columnWidth: '200px', searchPlaceholder: 'Search generations' }, selectedChannel));
438
427
  };
439
428
  const renderGenerationSection = () => {
440
429
  const allGenerations = getSelectedChannel()?.generations ?? [];
@@ -447,7 +436,7 @@ export const C4CreateCluster = ({ loading, cta, formElements, autoUpdate, taskli
447
436
  const channelGenerations = allGenerations.filter((g) => g.classification !== 'existingCluster' &&
448
437
  g.classification !== 'orgUnlocked');
449
438
  const hasOlderGenerations = nonChannelGenerations.length > 0;
450
- return (_jsx(Grid, { children: _jsx(Column, { span: 12, children: _jsxs(Stack, { gap: 2, children: [_jsx(FormLabel, { children: "Generation" }), renderGenerationRadioButtons(hasOlderGenerations ? channelGenerations : allGenerations), hasOlderGenerations && (_jsxs("div", { style: {
439
+ return (_jsx(Grid, { children: _jsx(Column, { span: 12, children: _jsxs(Stack, { gap: 2, children: [_jsx(FormLabel, { children: "Generation" }), renderGenerationTiles(hasOlderGenerations ? channelGenerations : allGenerations), hasOlderGenerations && (_jsxs("div", { style: {
451
440
  marginTop: 'var(--cds-spacing-03)',
452
441
  }, children: [_jsx(Button, { kind: 'ghost', size: 'sm', type: 'button', onClick: () => {
453
442
  setShowOlderGenerations((prev) => {
@@ -460,14 +449,14 @@ export const C4CreateCluster = ({ loading, cta, formElements, autoUpdate, taskli
460
449
  }, renderIcon: showOlderGenerations ? ChevronUp : ChevronDown, "aria-expanded": showOlderGenerations, "aria-controls": 'older-generations-panel', children: formElements.generation.olderGenerationsLabel ??
461
450
  'View older generations' }), showOlderGenerations && (_jsxs("div", { id: 'older-generations-panel', style: {
462
451
  marginTop: 'var(--cds-spacing-03)',
463
- }, children: [existingClusterGenerations.length > 0 && (_jsxs(_Fragment, { children: [renderGenerationRadioButtons(existingClusterGenerations), _jsx("p", { style: {
452
+ }, children: [existingClusterGenerations.length > 0 && (_jsxs(_Fragment, { children: [renderGenerationTiles(existingClusterGenerations), _jsx("p", { style: {
464
453
  color: 'var(--cds-text-helper)',
465
454
  }, children: formElements.generation.olderGenerationsHelperText ??
466
455
  'These are older generations that are used in your organization.' })] })), orgUnlockedGenerations.length > 0 && (_jsxs("div", { style: {
467
456
  marginTop: existingClusterGenerations.length > 0
468
457
  ? 'var(--cds-spacing-05)'
469
458
  : undefined,
470
- }, children: [renderGenerationRadioButtons(orgUnlockedGenerations), _jsx("p", { style: {
459
+ }, children: [renderGenerationTiles(orgUnlockedGenerations), _jsx("p", { style: {
471
460
  color: 'var(--cds-text-helper)',
472
461
  }, children: formElements.generation
473
462
  .orgUnlockedGenerationsHelperText ??
@@ -499,28 +488,20 @@ export const C4CreateCluster = ({ loading, cta, formElements, autoUpdate, taskli
499
488
  }, children: regionValidation.message })), getUniqueProviders().length > 1 && (_jsx(ContentSwitcher, { size: 'md', style: {
500
489
  width: `${7 * getUniqueProviders().length}rem`,
501
490
  marginBottom: '0.5rem',
502
- }, onChange: (data) => updateProvider(String(data.name ?? '')), selectedIndex: getUniqueProviders().indexOf(provider), children: getUniqueProviders().map((provider) => (_jsx(Switch, { name: provider, children: provider }, provider))) }))] }) }), _jsx(Grid, { children: _jsx(Column, { span: 12, children: _jsx(RadioButtonGroupWithGrid, { valueSelected: region, onChange: (value) => updateRegion(value), children: formElements.region.options
503
- .filter((option) => option.provider === provider)
504
- .map((option) => (_jsx(Column, { sm: 4, md: 6, lg: 4, style: { justifySelf: 'start', marginBottom: '0.5rem' }, children: _jsx(RadioButton, { id: option.uuid, value: option.uuid, labelText: option.title, checked: option.uuid === region, disabled: isSubmitting() || noAvailableSlots, onChange: (value) => {
505
- updateRegion(value);
506
- } }, option.uuid) }, option.uuid))) }) }) }), _jsx(Grid, { children: _jsx(Column, { span: 12, children: _jsx("p", { children: formElements.region.description }) }) })] }), (() => {
491
+ }, onChange: (data) => updateProvider(String(data.name ?? '')), selectedIndex: getUniqueProviders().indexOf(provider), children: getUniqueProviders().map((provider) => (_jsx(Switch, { name: provider, children: provider }, provider))) }))] }) }), _jsx(Grid, { children: _jsx(Column, { span: 12, children: _jsx(C4CreateClusterTileGrid, { items: formElements.region.options.filter((option) => option.provider === provider), getKey: (option) => option.uuid, getLabel: (option) => option.title, getDisabled: () => isSubmitting() || noAvailableSlots, value: region, onChange: updateRegion, ariaLabel: formElements.region.title, columnWidth: '220px', searchPlaceholder: 'Search regions' }, provider) }) }), _jsx(Grid, { children: _jsx(Column, { span: 12, children: _jsx("p", { children: formElements.region.description }) }) })] }), (() => {
507
492
  if (formElements.region.dualRegionBackups) {
508
493
  const selectedRegion = formElements.region.options.find((reg) => reg.uuid === region);
509
- return (_jsxs(Stack, { gap: 2, children: [_jsx(Grid, { children: _jsx(Column, { span: 12, children: _jsx(FormElementTitle, { title: formElements.region.backupRegionTitle }) }) }), _jsx(Grid, { children: _jsx(Column, { span: 12, children: _jsx(RadioButtonGroupWithGrid, { valueSelected: backupRegion, onChange: (value) => updateBackupRegion(value), children: selectedRegion?.backups.map((option) => (_jsx(Column, { sm: 4, md: 6, lg: 4, style: {
510
- justifySelf: 'start',
511
- marginBottom: '0.5rem',
512
- }, children: _jsx(RadioButton, { id: option.uuid, value: option.uuid, labelText: `${option.regions.length > 1
513
- ? 'Dual region: '
514
- : 'Single region: '} ${option.regions
515
- .map((reg) => reg.label)
516
- .join(', ')}`, checked: option.uuid === backupRegion, disabled: isSubmitting() || noAvailableSlots, onChange: (value) => {
517
- updateBackupRegion(value);
518
- } }, option.uuid) }, option.uuid))) ?? _jsx(_Fragment, {}) }) }) }), _jsx(Grid, { children: _jsx(Column, { span: 12, children: _jsx("p", { children: formElements.region.backupDescription }) }) })] }));
494
+ return (_jsxs(Stack, { gap: 2, children: [_jsx(Grid, { children: _jsx(Column, { span: 12, children: _jsx(FormElementTitle, { title: formElements.region.backupRegionTitle }) }) }), _jsx(Grid, { children: _jsx(Column, { span: 12, children: _jsx(C4CreateClusterTileGrid, { items: selectedRegion?.backups ?? [], getKey: (option) => option.uuid, getLabel: (option) => `${option.regions.length > 1
495
+ ? 'Dual region: '
496
+ : 'Single region: '}${option.regions.map((reg) => reg.label).join(', ')}`, getDisabled: () => isSubmitting() || noAvailableSlots, value: backupRegion, onChange: updateBackupRegion, ariaLabel: formElements.region.backupRegionTitle, columnWidth: '260px', searchPlaceholder: 'Search backup regions' }, region) }) }), _jsx(Grid, { children: _jsx(Column, { span: 12, children: _jsx("p", { children: formElements.region.backupDescription }) }) })] }));
519
497
  }
520
498
  else {
521
499
  return _jsx(_Fragment, {});
522
500
  }
523
- })(), _jsx(Grid, { children: _jsx(Column, { span: 12, children: _jsx(C4Divider, {}) }) }), _jsxs(Stack, { gap: 2, children: [_jsx(Grid, { children: _jsx(Column, { span: 12, children: _jsx(FormElementTitle, { title: formElements.clusterPlanType.title }) }) }), _jsx("div", { style: {
501
+ })(), _jsx(Grid, { children: _jsx(Column, { span: 12, children: _jsx(C4Divider, {}) }) }), _jsxs(Stack, { gap: 2, children: [_jsx(Grid, { children: _jsx(Column, { span: 12, children: _jsx(FormElementTitle, { title: formElements.clusterPlanType.title }) }) }), designSystem === 'ds' ? (_jsx("div", { style: { padding: '0 1rem' }, children: _jsx(ChoiceCardGroup, { "aria-label": formElements.clusterPlanType.title, value: currentClusterPlanType, onValueChange: setClusterPlanTypeWithEffects, style: {
502
+ gridTemplateColumns: 'repeat(auto-fill, minmax(320px, 1fr))',
503
+ gap: '1rem',
504
+ }, children: formElements.clusterPlanType.options.map((option) => (_jsx(ChoiceCard, { value: option.uuid, title: option.title, description: option.description, icon: option.type === 'dev' ? Code : DataBase, disabled: option.disabled || isSubmitting() || noAvailableSlots }, option.uuid))) }) })) : (_jsx("div", { style: {
524
505
  display: 'grid',
525
506
  gridTemplateColumns: 'repeat(auto-fill, minmax(320px, 1fr))',
526
507
  gap: '1rem',
@@ -528,7 +509,7 @@ export const C4CreateCluster = ({ loading, cta, formElements, autoUpdate, taskli
528
509
  }, children: formElements.clusterPlanType.options.map((option) => (_jsx("div", { style: { marginBottom: '2.0rem' }, children: _jsx("div", { style: {
529
510
  height: '100%',
530
511
  display: 'grid',
531
- }, children: _jsx(C4SelectableTile, { value: option.uuid, checked: option.uuid === currentClusterPlanType, onChange: () => setClusterPlanTypeWithEffects(option.uuid), disabled: option.disabled || isSubmitting() || noAvailableSlots, style: { height: '100%' }, children: _jsx(ClusterPlanTypeTile, { type: option.type, title: option.title, description: option.description }) }, option.uuid) }) }, option.uuid))) })] }), formElements.allocatedHardwarePackages &&
512
+ }, children: _jsx(C4SelectableTile, { value: option.uuid, checked: option.uuid === currentClusterPlanType, onChange: () => setClusterPlanTypeWithEffects(option.uuid), disabled: option.disabled || isSubmitting() || noAvailableSlots, style: { height: '100%' }, children: _jsx(ClusterPlanTypeTile, { type: option.type, title: option.title, description: option.description }) }, option.uuid) }) }, option.uuid))) }))] }), formElements.allocatedHardwarePackages &&
532
513
  formElements.clusterPlanType.options.find((option) => option.uuid === currentClusterPlanType &&
533
514
  option.category === ClusterPlanTypeCategory.ADVANCED_OFFERING &&
534
515
  option.availabilityClass !== 'unset' &&
@@ -564,15 +545,7 @@ export const C4CreateCluster = ({ loading, cta, formElements, autoUpdate, taskli
564
545
  ? formElements.autoUpdate?.description
565
546
  : formElements.autoUpdate?.descriptionIfDisabled }) }) })] })] })), _jsx(Grid, { children: _jsx(Column, { span: 12, children: _jsx(C4Divider, {}) }) }), encryptions && providerSupportsEncryption() && (_jsxs(_Fragment, { children: [_jsxs(Stack, { gap: 2, children: [_jsx(Grid, { children: _jsx(Column, { span: 12, children: _jsx(FormElementTitle, { title: encryptions.title }) }) }), _jsxs(Stack, { gap: 6, children: [_jsx(Grid, { children: _jsx(Column, { span: 12, children: _jsxs("p", { children: [encryptions.description.text, ' ', _jsx("strong", { children: encryptions.description.bold }), ' ', _jsx(C4LinkButton, { label: encryptions.link.text, onClick: () => {
566
547
  window.open(encryptions?.link.url ?? '', '_blank');
567
- } })] }) }) }), _jsx(Grid, { children: _jsx(Column, { span: 12, children: _jsx(RadioButtonGroupWithGrid, { valueSelected: encryption, onChange: (value) => updateEncryption(value), children: encryptions.options.map((option) => (_jsxs(Column, { sm: 4, md: 6, lg: 4, style: {
568
- justifySelf: 'start',
569
- marginBottom: '0.5rem',
570
- }, children: [_jsx(RadioButton, { id: option.value, value: option.value, labelText: option.title, checked: option.value === encryption, onChange: (value) => {
571
- updateEncryption(value);
572
- } }, option.value), _jsx("p", { style: {
573
- color: 'var(--cds-text-helper)',
574
- marginLeft: '30px',
575
- }, children: option.description })] }, option.value))) }) }) })] })] }), _jsx(Grid, { children: _jsx(Column, { span: 12, children: _jsx(C4Divider, {}) }) })] }))] }));
548
+ } })] }) }) }), _jsx(Grid, { children: _jsx(Column, { span: 12, children: _jsx(C4CreateClusterTileGrid, { items: encryptions.options, getKey: (option) => option.value, getLabel: (option) => option.title, getDescription: (option) => option.description, value: encryption, onChange: updateEncryption, ariaLabel: encryptions.title, columnWidth: '280px', searchPlaceholder: 'Search encryption options' }) }) })] })] }), _jsx(Grid, { children: _jsx(Column, { span: 12, children: _jsx(C4Divider, {}) }) })] }))] }));
576
549
  };
577
550
  return (_jsx(Grid, { style: { maxWidth: '1584px' }, children: _jsx(Column, { span: 16, children: _jsx(Stack, { gap: 8, children: _jsxs(Grid, { fullWidth: true, narrow: true, children: [_jsxs(Column, { span: 12, children: [renderContent(), !loading && preConditions && (_jsx(SummaryMobileWrapper, { children: _jsx(Tile, { children: renderSummary() }) }))] }), !loading && preConditions && (_jsx(SummaryDesktopWrapper, { children: _jsx(Column, { sm: { span: 4, start: 13 }, children: _jsx(Tile, { style: {
578
551
  minWidth: '243px',
@@ -0,0 +1,64 @@
1
+ import type { C4CreateClusterChannelWithGenerations, C4CreateClusterClusterPlanType, C4CreateClusterCtaParameters, C4CreateClusterProps, C4CreateClusterRegion } from './c4-create-cluster.types';
2
+ export declare const stageLabel: {
3
+ title: string;
4
+ textBelow: string;
5
+ boxes: {
6
+ dev: {
7
+ text: string;
8
+ info: string;
9
+ };
10
+ test: {
11
+ text: string;
12
+ };
13
+ stage: {
14
+ text: string;
15
+ };
16
+ prod: {
17
+ text: string;
18
+ };
19
+ };
20
+ };
21
+ export declare const generateClusterPlanTypeOptions: (options: {
22
+ additionalCount?: number;
23
+ allDisabled?: boolean;
24
+ advancedOffering?: boolean;
25
+ }) => C4CreateClusterClusterPlanType[];
26
+ export declare const generateRegions: (additionalCount?: number) => C4CreateClusterRegion[];
27
+ export declare const generateChannels: (options?: {
28
+ additionalChannels?: number;
29
+ additionalGenerations?: number;
30
+ }) => C4CreateClusterChannelWithGenerations[];
31
+ export declare const CTA: (success: boolean) => {
32
+ label: string;
33
+ states: {
34
+ submitting: string;
35
+ success: string;
36
+ error: string;
37
+ };
38
+ create: (params: C4CreateClusterCtaParameters) => Promise<{
39
+ success: boolean;
40
+ clusterId: string;
41
+ } | {
42
+ success: boolean;
43
+ clusterId?: undefined;
44
+ }>;
45
+ postCreate: (clusterId: string) => void;
46
+ cancel: {
47
+ label: string;
48
+ onClick: () => void;
49
+ };
50
+ help: {
51
+ prefix: string;
52
+ label: string;
53
+ href: string;
54
+ };
55
+ };
56
+ export declare const CLUSTER_NAME: {
57
+ title: string;
58
+ placeholder: string;
59
+ validation: (value: string) => {
60
+ isValid: boolean;
61
+ message: string;
62
+ };
63
+ };
64
+ export declare const basicCreateClusterProps: C4CreateClusterProps;