@camunda/ccma-saas-frontend 0.0.46 → 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 (371) hide show
  1. package/lib/esm/components/c4-actionable-notification/c4-actionable-notification.d.ts +20 -3
  2. package/lib/esm/components/c4-actionable-notification/c4-actionable-notification.js +50 -17
  3. package/lib/esm/components/c4-advanced-search-filters/ArrayFieldContainer.js +2 -1
  4. package/lib/esm/components/c4-advanced-search-filters/AutosuggestInput.js +1 -6
  5. package/lib/esm/components/c4-advanced-search-filters/FieldRow.js +4 -1
  6. package/lib/esm/components/c4-advanced-search-filters/FiltersSection.js +1 -6
  7. package/lib/esm/components/c4-advanced-search-filters/OrSection.js +3 -1
  8. package/lib/esm/components/c4-advanced-search-filters/c4-advanced-search-filters.js +3 -1
  9. package/lib/esm/components/c4-ai-usage/c4-ai-usage.js +2 -7
  10. package/lib/esm/components/c4-alpha-cluster-at-checkout/c4-alpha-cluster-at-checkout.js +7 -7
  11. package/lib/esm/components/c4-app-teaser-card/c4-app-teaster-card.js +1 -6
  12. package/lib/esm/components/c4-app-teaser-card/c4-app-teaster-card.spec.d.ts +1 -0
  13. package/lib/esm/components/c4-app-teaser-card/c4-app-teaster-card.spec.js +43 -0
  14. package/lib/esm/components/c4-app-teaser-cards/c4-app-teaser-cards.js +1 -1
  15. package/lib/esm/components/c4-async-modal/c4-async-modal.js +3 -2
  16. package/lib/esm/components/c4-audit-log/c4-audit-log.js +4 -3
  17. package/lib/esm/components/c4-billing-page/c4-billing-page.js +8 -6
  18. package/lib/esm/components/c4-billing-page/c4-billing-page.mocks.d.ts +3 -0
  19. package/lib/esm/components/c4-billing-page/c4-billing-page.mocks.js +154 -0
  20. package/lib/esm/components/c4-billing-page/elements/cluster-reservations.js +9 -14
  21. package/lib/esm/components/c4-billing-page/elements/current-usage-metrics.js +2 -1
  22. package/lib/esm/components/c4-billing-page/elements/usage-alerts.js +3 -8
  23. package/lib/esm/components/c4-billing-page/elements/value-metric.d.ts +2 -0
  24. package/lib/esm/components/c4-billing-page/elements/value-metric.js +15 -3
  25. package/lib/esm/components/c4-billing-page/elements/value-metric.spec.js +18 -0
  26. package/lib/esm/components/c4-bottom-links/c4-bottom-links.js +1 -6
  27. package/lib/esm/components/c4-breadcrumb/c4-breadcrumb.js +3 -6
  28. package/lib/esm/components/c4-charts-dashboard/c4-charts-dashboard.js +1 -1
  29. package/lib/esm/components/c4-charts-dashboard/elements/alluvial-chart.js +59 -2
  30. package/lib/esm/components/c4-charts-dashboard/elements/bar-chart.js +41 -7
  31. package/lib/esm/components/c4-charts-dashboard/elements/line-chart.js +7 -1
  32. package/lib/esm/components/c4-cluster-byom-clients/c4-cluster-byom-clients.js +6 -10
  33. package/lib/esm/components/c4-cluster-client-credentials/c4-cluster-client-credentials.js +8 -3
  34. package/lib/esm/components/c4-cluster-client-credentials-identity/c4-cluster-client-credentials-identity.js +8 -3
  35. package/lib/esm/components/c4-cluster-details-activity/c4-cluster-details-activity.js +6 -5
  36. package/lib/esm/components/c4-cluster-details-alerts/c4-cluster-details-alerts.js +12 -14
  37. package/lib/esm/components/c4-cluster-details-alerts/c4-cluster-details-alerts.mocks.d.ts +5 -0
  38. package/lib/esm/components/c4-cluster-details-alerts/c4-cluster-details-alerts.mocks.js +83 -0
  39. package/lib/esm/components/c4-cluster-details-clients/c4-cluster-details-clients.js +6 -10
  40. package/lib/esm/components/c4-cluster-details-clients/c4-cluster-details-clients.mocks.d.ts +6 -0
  41. package/lib/esm/components/c4-cluster-details-clients/c4-cluster-details-clients.mocks.js +79 -0
  42. package/lib/esm/components/c4-cluster-details-connector-secrets/c4-cluster-details-connector-secrets.js +8 -11
  43. package/lib/esm/components/c4-cluster-details-connector-secrets/c4-cluster-details-connector-secrets.mocks.d.ts +3 -0
  44. package/lib/esm/components/c4-cluster-details-connector-secrets/c4-cluster-details-connector-secrets.mocks.js +65 -0
  45. package/lib/esm/components/c4-cluster-details-encryption/c4-cluster-details-encryption.js +9 -4
  46. package/lib/esm/components/c4-cluster-details-hot-backups/c4-cluster-details-hot-backups.js +12 -8
  47. package/lib/esm/components/c4-cluster-details-hot-backups/c4-cluster-details-hot-backups.mocks.d.ts +60 -0
  48. package/lib/esm/components/c4-cluster-details-hot-backups/c4-cluster-details-hot-backups.mocks.js +143 -0
  49. package/lib/esm/components/c4-cluster-details-hot-backups-restore/c4-cluster-details-hot-backups-restore.js +3 -2
  50. package/lib/esm/components/c4-cluster-details-ip-whitelist/c4-cluster-details-ip-whitelist.js +7 -10
  51. package/lib/esm/components/c4-cluster-details-ip-whitelist/c4-cluster-details-ip-whitelist.mocks.d.ts +6 -0
  52. package/lib/esm/components/c4-cluster-details-ip-whitelist/c4-cluster-details-ip-whitelist.mocks.js +51 -0
  53. package/lib/esm/components/c4-cluster-details-secure-connectivity/c4-cluster-details-secure-connectivity.js +15 -21
  54. package/lib/esm/components/c4-cluster-list/c4-cluster-list.d.ts +1 -1
  55. package/lib/esm/components/c4-cluster-list/c4-cluster-list.js +69 -6
  56. package/lib/esm/components/c4-cluster-list/c4-cluster-list.mocks.d.ts +4 -0
  57. package/lib/esm/components/c4-cluster-list/c4-cluster-list.mocks.js +132 -0
  58. package/lib/esm/components/c4-cluster-list/c4-cluster-list.types.d.ts +7 -0
  59. package/lib/esm/components/c4-cluster-overview/applications.js +19 -4
  60. package/lib/esm/components/c4-cluster-overview/applications.spec.js +27 -1
  61. package/lib/esm/components/c4-cluster-overview/c4-cluster-overview.js +4 -3
  62. package/lib/esm/components/c4-cluster-overview/c4-cluster-overview.mocks.d.ts +8 -0
  63. package/lib/esm/components/c4-cluster-overview/c4-cluster-overview.mocks.js +203 -0
  64. package/lib/esm/components/c4-cluster-overview/cluster-details.d.ts +2 -0
  65. package/lib/esm/components/c4-cluster-overview/cluster-details.js +68 -16
  66. package/lib/esm/components/c4-cluster-overview/cluster-load.js +39 -4
  67. package/lib/esm/components/c4-cluster-settings/c4-cluster-settings.js +1 -6
  68. package/lib/esm/components/c4-cluster-settings/c4-cluster-settings.mocks.d.ts +16 -0
  69. package/lib/esm/components/c4-cluster-settings/c4-cluster-settings.mocks.js +104 -0
  70. package/lib/esm/components/c4-cluster-settings/elements/app-integrations-toggle.d.ts +14 -0
  71. package/lib/esm/components/c4-cluster-settings/elements/app-integrations-toggle.js +12 -0
  72. package/lib/esm/components/c4-cluster-settings/elements/cluster-settings.d.ts +5 -1
  73. package/lib/esm/components/c4-cluster-settings/elements/cluster-settings.js +10 -3
  74. package/lib/esm/components/c4-cluster-settings/elements/danger-zone.js +1 -6
  75. package/lib/esm/components/c4-cluster-settings/elements/external-identity-provider-modal.d.ts +20 -0
  76. package/lib/esm/components/c4-cluster-settings/elements/external-identity-provider-modal.js +85 -0
  77. package/lib/esm/components/c4-cluster-settings/elements/external-identity-provider-modal.spec.d.ts +1 -0
  78. package/lib/esm/components/c4-cluster-settings/elements/external-identity-provider-modal.spec.js +93 -0
  79. package/lib/esm/components/c4-cluster-settings/elements/external-identity-provider.d.ts +20 -0
  80. package/lib/esm/components/c4-cluster-settings/elements/external-identity-provider.js +15 -0
  81. package/lib/esm/components/c4-cluster-settings/elements/external-identity-provider.spec.d.ts +1 -0
  82. package/lib/esm/components/c4-cluster-settings/elements/external-identity-provider.spec.js +50 -0
  83. package/lib/esm/components/c4-cluster-settings/elements/optimize-filtering-settings.d.ts +10 -4
  84. package/lib/esm/components/c4-cluster-settings/elements/optimize-filtering-settings.js +117 -25
  85. package/lib/esm/components/c4-cluster-settings/elements/optimize-filtering-settings.spec.d.ts +1 -0
  86. package/lib/esm/components/c4-cluster-settings/elements/optimize-filtering-settings.spec.js +120 -0
  87. package/lib/esm/components/c4-cluster-settings/elements/resource-based-authorizations.js +2 -7
  88. package/lib/esm/components/c4-cluster-settings/elements/settings-tile.js +1 -6
  89. package/lib/esm/components/c4-cluster-settings/elements/tasklist-mode-toggle.js +1 -1
  90. package/lib/esm/components/c4-cluster-tag-selector/c4-cluster-tag-selector.js +23 -3
  91. package/lib/esm/components/c4-clusters-empty-state/c4-clusters-empty-state.js +18 -14
  92. package/lib/esm/components/c4-clusters-empty-state/c4-clusters-empty-state.spec.d.ts +1 -0
  93. package/lib/esm/components/c4-clusters-empty-state/c4-clusters-empty-state.spec.js +40 -0
  94. package/lib/esm/components/c4-clusters-empty-state/c4-clusters-empty-state.types.d.ts +2 -0
  95. package/lib/esm/components/c4-clusters-trial-notification/c4-clusters-trial-notification.js +4 -9
  96. package/lib/esm/components/c4-clusters-trial-notification/c4-clusters-trial-notification.types.d.ts +2 -0
  97. package/lib/esm/components/c4-console-dashboard/c4-console-dashboard.js +11 -7
  98. package/lib/esm/components/c4-console-dashboard/c4-console-dashboard.mocks.d.ts +2 -0
  99. package/lib/esm/components/c4-console-dashboard/c4-console-dashboard.mocks.js +186 -0
  100. package/lib/esm/components/c4-console-dashboard/elements/empty-state.js +2 -2
  101. package/lib/esm/components/c4-create-alert-modal/c4-create-alert-modal.d.ts +2 -0
  102. package/lib/esm/components/c4-create-alert-modal/c4-create-alert-modal.js +132 -0
  103. package/lib/esm/components/c4-create-alert-modal/c4-create-alert-modal.mocks.d.ts +2 -0
  104. package/lib/esm/components/c4-create-alert-modal/c4-create-alert-modal.mocks.js +20 -0
  105. package/lib/esm/components/c4-create-alert-modal/c4-create-alert-modal.types.d.ts +22 -0
  106. package/lib/esm/components/c4-create-alert-modal/c4-create-alert-modal.types.js +6 -0
  107. package/lib/esm/components/c4-create-cluster/c4-create-cluster-tile-grid.d.ts +32 -0
  108. package/lib/esm/components/c4-create-cluster/c4-create-cluster-tile-grid.js +71 -0
  109. package/lib/esm/components/c4-create-cluster/c4-create-cluster-tile-grid.spec.d.ts +1 -0
  110. package/lib/esm/components/c4-create-cluster/c4-create-cluster-tile-grid.spec.js +83 -0
  111. package/lib/esm/components/c4-create-cluster/c4-create-cluster.js +56 -54
  112. package/lib/esm/components/c4-create-cluster/c4-create-cluster.mocks.d.ts +64 -0
  113. package/lib/esm/components/c4-create-cluster/c4-create-cluster.mocks.js +298 -0
  114. package/lib/esm/components/c4-create-cluster-api-client-modal/c4-create-cluster-api-client-modal.js +51 -31
  115. package/lib/esm/components/c4-create-cluster-api-client-modal/c4-create-cluster-api-client-modal.mocks.d.ts +2 -0
  116. package/lib/esm/components/c4-create-cluster-api-client-modal/c4-create-cluster-api-client-modal.mocks.js +23 -0
  117. package/lib/esm/components/c4-create-cluster-api-client-modal/c4-create-cluster-api-client-modal.types.d.ts +2 -0
  118. package/lib/esm/components/c4-create-connector-secret-modal/c4-create-connector-secret-modal.js +4 -2
  119. package/lib/esm/components/c4-create-connector-secret-modal/c4-create-connector-secret-modal.mocks.d.ts +2 -0
  120. package/lib/esm/components/c4-create-connector-secret-modal/c4-create-connector-secret-modal.mocks.js +15 -0
  121. package/lib/esm/components/c4-create-console-api-client-modal/c4-create-console-api-client-modal.js +6 -5
  122. package/lib/esm/components/c4-create-console-api-client-modal/c4-create-console-api-client-modal.mocks.d.ts +2 -0
  123. package/lib/esm/components/c4-create-console-api-client-modal/c4-create-console-api-client-modal.mocks.js +13 -0
  124. package/lib/esm/components/c4-create-console-api-client-modal/c4-create-console-api-client-modal.types.d.ts +1 -0
  125. package/lib/esm/components/c4-create-ip-whitelist-modal/c4-create-ip-whitelist-modal.d.ts +2 -0
  126. package/lib/esm/components/c4-create-ip-whitelist-modal/c4-create-ip-whitelist-modal.js +77 -0
  127. package/lib/esm/components/c4-create-ip-whitelist-modal/c4-create-ip-whitelist-modal.mocks.d.ts +2 -0
  128. package/lib/esm/components/c4-create-ip-whitelist-modal/c4-create-ip-whitelist-modal.mocks.js +11 -0
  129. package/lib/esm/components/c4-create-ip-whitelist-modal/c4-create-ip-whitelist-modal.types.d.ts +14 -0
  130. package/lib/esm/components/c4-create-ip-whitelist-modal/c4-create-ip-whitelist-modal.types.js +6 -0
  131. package/lib/esm/components/c4-create-trial-organization-modal/c4-create-trial-organization-modal.js +2 -1
  132. package/lib/esm/components/c4-dashboard-first-launch/c4-dashboard-first-launch.js +1 -6
  133. package/lib/esm/components/c4-data-table/c4-data-table-skeleton.d.ts +15 -0
  134. package/lib/esm/components/c4-data-table/c4-data-table-skeleton.js +26 -0
  135. package/lib/esm/components/c4-data-table/c4-data-table.d.ts +3 -0
  136. package/lib/esm/components/c4-data-table/c4-data-table.js +277 -0
  137. package/lib/esm/components/c4-data-table/c4-data-table.spec.d.ts +1 -0
  138. package/lib/esm/components/c4-data-table/c4-data-table.spec.js +71 -0
  139. package/lib/esm/components/c4-data-table/c4-data-table.stability.spec.d.ts +1 -0
  140. package/lib/esm/components/c4-data-table/c4-data-table.stability.spec.js +151 -0
  141. package/lib/esm/components/c4-delete-organization-modal/c4-delete-organization-modal.js +3 -2
  142. package/lib/esm/components/c4-empty-state/c4-empty-state.d.ts +47 -0
  143. package/lib/esm/components/c4-empty-state/c4-empty-state.js +33 -0
  144. package/lib/esm/components/c4-extend-trial-modal/c4-extend-trial-modal.d.ts +3 -0
  145. package/lib/esm/components/c4-extend-trial-modal/c4-extend-trial-modal.js +51 -0
  146. package/lib/esm/components/c4-extend-trial-modal/c4-extend-trial-modal.spec.d.ts +1 -0
  147. package/lib/esm/components/c4-extend-trial-modal/c4-extend-trial-modal.spec.js +33 -0
  148. package/lib/esm/components/c4-extend-trial-modal/c4-extend-trial-modal.types.d.ts +8 -0
  149. package/lib/esm/components/c4-extend-trial-modal/c4-extend-trial-modal.types.js +1 -0
  150. package/lib/esm/components/c4-external-link/c4-external-link.js +1 -6
  151. package/lib/esm/components/c4-feedback-modal/c4-feedback-modal.d.ts +40 -0
  152. package/lib/esm/components/c4-feedback-modal/c4-feedback-modal.js +109 -0
  153. package/lib/esm/components/c4-help-center/c4-help-center.d.ts +50 -0
  154. package/lib/esm/components/c4-help-center/c4-help-center.js +39 -0
  155. package/lib/esm/components/c4-inline-notification/c4-inline-notification.d.ts +15 -0
  156. package/lib/esm/components/c4-inline-notification/c4-inline-notification.js +37 -0
  157. package/lib/esm/components/c4-invite-user-to-organization-modal/c4-invite-user-to-organization-modal.js +4 -3
  158. package/lib/esm/components/c4-job-dashboard-details-page/c4-job-dashboard-details-page.js +4 -2
  159. package/lib/esm/components/c4-job-dashboard-details-page/c4-job-dashboard-details-page.mocks.d.ts +2 -0
  160. package/lib/esm/components/c4-job-dashboard-details-page/c4-job-dashboard-details-page.mocks.js +231 -0
  161. package/lib/esm/components/c4-job-dashboard-details-page/elements/c4-job-dashboard-chart-heading.js +1 -1
  162. package/lib/esm/components/c4-job-dashboard-details-page/elements/c4-job-dashboard-error-table.js +3 -8
  163. package/lib/esm/components/c4-job-dashboard-details-page/elements/c4-job-dashboard-piechart.js +56 -2
  164. package/lib/esm/components/c4-job-dashboard-details-page/elements/c4-job-dashboard-time-chart.js +37 -2
  165. package/lib/esm/components/c4-job-dashboard-details-page/elements/c4-job-dashboard-worker-table.js +3 -3
  166. package/lib/esm/components/c4-job-dashboard-entry-point/c4-job-dashboard-entry-point.js +2 -1
  167. package/lib/esm/components/c4-job-dashboard-overview-page/c4-job-dashboard-overview.js +43 -46
  168. package/lib/esm/components/c4-job-dashboard-overview-page/c4-job-dashboard-overview.mocks.d.ts +2 -0
  169. package/lib/esm/components/c4-job-dashboard-overview-page/c4-job-dashboard-overview.mocks.js +102 -0
  170. package/lib/esm/components/c4-job-dashboard-shared/c4-background-fetching-indicator.js +1 -6
  171. package/lib/esm/components/c4-job-dashboard-shared/c4-job-dashboard-ds-colors.d.ts +10 -0
  172. package/lib/esm/components/c4-job-dashboard-shared/c4-job-dashboard-ds-colors.js +16 -0
  173. package/lib/esm/components/c4-job-dashboard-shared/c4-job-dashboard-error-handler.js +1 -1
  174. package/lib/esm/components/c4-job-dashboard-shared/c4-job-dashboard-table-heading-with-tooltip.js +1 -1
  175. package/lib/esm/components/c4-job-dashboard-shared/c4-job-dashboard-time-range-dropdown.js +1 -1
  176. package/lib/esm/components/c4-leave-organization-modal/c4-leave-organization-modal.js +1 -6
  177. package/lib/esm/components/c4-link-button/c4-link-button.js +1 -6
  178. package/lib/esm/components/c4-llm-usage-meter/c4-llm-usage-meter.js +1 -1
  179. package/lib/esm/components/c4-management-activity/c4-management-activity.d.ts +1 -1
  180. package/lib/esm/components/c4-management-activity/c4-management-activity.js +109 -9
  181. package/lib/esm/components/c4-management-activity/c4-management-activity.mocks.d.ts +4 -0
  182. package/lib/esm/components/c4-management-activity/c4-management-activity.mocks.js +63 -0
  183. package/lib/esm/components/c4-management-activity/c4-management-activity.types.d.ts +11 -0
  184. package/lib/esm/components/c4-management-api/c4-management-api.js +9 -11
  185. package/lib/esm/components/c4-management-api/c4-management-api.mocks.d.ts +43 -0
  186. package/lib/esm/components/c4-management-api/c4-management-api.mocks.js +118 -0
  187. package/lib/esm/components/c4-management-overview/c4-management-overview.js +12 -14
  188. package/lib/esm/components/c4-management-settings/c4-management-settings.js +9 -11
  189. package/lib/esm/components/c4-management-users/c4-management-users.js +4 -9
  190. package/lib/esm/components/c4-multi-step-modal/c4-multi-step-modal.js +4 -2
  191. package/lib/esm/components/c4-multi-step-modal-ugly/c4-multi-step-modal-ugly.js +4 -2
  192. package/lib/esm/components/c4-navigation/c4-navigation.d.ts +55 -0
  193. package/lib/esm/components/c4-navigation/c4-navigation.js +175 -0
  194. package/lib/esm/components/c4-old-dashboard/c4-old-dashboard.js +3 -2
  195. package/lib/esm/components/c4-old-dashboard/c4-old-dashboard.types.d.ts +1 -0
  196. package/lib/esm/components/c4-page-layout/c4-page-layout.d.ts +13 -0
  197. package/lib/esm/components/c4-page-layout/c4-page-layout.js +23 -0
  198. package/lib/esm/components/c4-page-template/c4-page-template.js +14 -3
  199. package/lib/esm/components/c4-permission-error-page/c4-permission-error-page.js +1 -1
  200. package/lib/esm/components/c4-pricing/c4-pricing.js +3 -7
  201. package/lib/esm/components/c4-pricing-card/c4-pricing-card.js +1 -1
  202. package/lib/esm/components/c4-rename-organization-modal/c4-rename-organization-modal.js +1 -1
  203. package/lib/esm/components/c4-search/c4-search-results.js +2 -1
  204. package/lib/esm/components/c4-selectable-tile/c4-selectable-tile.d.ts +20 -0
  205. package/lib/esm/components/c4-selectable-tile/c4-selectable-tile.js +44 -0
  206. package/lib/esm/components/c4-sm-cluster-details/automation-components.js +2 -1
  207. package/lib/esm/components/c4-sm-cluster-details/c4-sm-cluster-details.js +1 -6
  208. package/lib/esm/components/c4-sm-cluster-details/custom-properties.js +4 -8
  209. package/lib/esm/components/c4-sm-cluster-details/details.js +5 -4
  210. package/lib/esm/components/c4-sm-cluster-details/zeebe-components.js +2 -1
  211. package/lib/esm/components/c4-sm-dashboard/c4-sm-dashboard.js +1 -1
  212. package/lib/esm/components/c4-sm-dashboard/c4-sm-dashboard.types.d.ts +1 -1
  213. package/lib/esm/components/c4-sm-dashboard/cluster-tile.js +2 -1
  214. package/lib/esm/components/c4-sm-dashboard/component-tile.js +2 -1
  215. package/lib/esm/components/c4-sm-dashboard/explore.js +1 -6
  216. package/lib/esm/components/c4-sm-dashboard/overview.js +1 -1
  217. package/lib/esm/components/c4-sm-dashboard/usage-tile.js +2 -1
  218. package/lib/esm/components/c4-stat/c4-stat.js +1 -6
  219. package/lib/esm/components/c4-stateful-button/c4-stateful-button.js +2 -1
  220. package/lib/esm/components/c4-structured-list/c4-structured-list.d.ts +21 -0
  221. package/lib/esm/components/c4-structured-list/c4-structured-list.js +75 -0
  222. package/lib/esm/components/c4-tabs/c4-tabs.js +2 -1
  223. package/lib/esm/components/c4-telemetry-page/c4-telemetry-page.js +6 -2
  224. package/lib/esm/components/c4-telemetry-page/component-metrics.js +1 -6
  225. package/lib/esm/components/c4-telemetry-page/telemetry-for-component.js +60 -37
  226. package/lib/esm/components/c4-telemetry-teaser-page/c4-telemetry-teaser-page.js +1 -1
  227. package/lib/esm/components/c4-theme-switcher/c4-theme-switcher.js +1 -1
  228. package/lib/esm/components/c4-tile-with-title-and-action/c4-tile-with-title-and-action.js +1 -1
  229. package/lib/esm/components/c4-toast-notification/c4-toast-notification.d.ts +14 -0
  230. package/lib/esm/components/c4-toast-notification/c4-toast-notification.js +27 -0
  231. package/lib/esm/components/c4-toggle/c4-toggle.js +6 -8
  232. package/lib/esm/components/c4-tutorial-tile/c4-tutorial-tile.js +1 -1
  233. package/lib/esm/components/c4-usage-alert-update-modal/c4-usage-alert-update-modal.js +4 -2
  234. package/lib/esm/components/c4-usage-history/c4-usage-history.js +5 -3
  235. package/lib/esm/components/c4-usage-history/elements/usage-history-charts.js +7 -1
  236. package/lib/esm/components/c4-usage-metrics-per-cluster/c4-usage-metrics-per-cluster.js +8 -7
  237. package/lib/esm/components/c4-user-details/c4-user-details.js +2 -2
  238. package/lib/esm/components/c4-user-details/tabs/authorized-resources.js +4 -2
  239. package/lib/esm/components/c4-user-details/tabs/details.js +6 -10
  240. package/lib/esm/components/c4-user-details/tabs/roles.js +3 -8
  241. package/lib/esm/components/shared-charts/ds-charts.smoke.spec.d.ts +1 -0
  242. package/lib/esm/components/shared-charts/ds-charts.smoke.spec.js +47 -0
  243. package/lib/esm/components/shared-charts/ds-line-chart.d.ts +33 -0
  244. package/lib/esm/components/shared-charts/ds-line-chart.js +55 -0
  245. package/lib/esm/components/shared-charts/ds-meter-chart.d.ts +22 -0
  246. package/lib/esm/components/shared-charts/ds-meter-chart.js +48 -0
  247. package/lib/esm/components/shared-charts/recharts-tokens.d.ts +24 -0
  248. package/lib/esm/components/shared-charts/recharts-tokens.js +51 -0
  249. package/lib/esm/externalUrls.const.d.ts +2 -0
  250. package/lib/esm/externalUrls.const.js +7 -0
  251. package/lib/esm/externalUrls.const.spec.js +2 -0
  252. package/lib/esm/i18n/c4-console-i18n.js +8 -0
  253. package/lib/esm/i18n/en/entities/orgroles.json +0 -16
  254. package/lib/esm/i18n/en/modals/clusters.json +0 -8
  255. package/lib/esm/i18n/en/pages/clusterdetails.json +14 -2
  256. package/lib/esm/i18n/en/pages/orgmanagement.json +12 -3
  257. package/lib/esm/index.d.ts +33 -1
  258. package/lib/esm/index.js +23 -1
  259. package/lib/esm/runtime/c4-console-authz.d.ts +26 -0
  260. package/lib/esm/runtime/c4-console-authz.js +59 -29
  261. package/lib/esm/runtime/c4-console-authz.spec.js +87 -20
  262. package/lib/esm/runtime/c4-console-data-context.js +40 -0
  263. package/lib/esm/runtime/c4-console-data-context.types.d.ts +19 -1
  264. package/lib/esm/runtime/c4-console-data-store.d.ts +25 -1
  265. package/lib/esm/runtime/c4-console-data-store.js +145 -31
  266. package/lib/esm/runtime/c4-console-data-store.nav.spec.d.ts +1 -0
  267. package/lib/esm/runtime/c4-console-data-store.nav.spec.js +121 -0
  268. package/lib/esm/runtime/c4-console-data-store.spec.js +35 -6
  269. package/lib/esm/runtime/c4-console-events-context.d.ts +18 -0
  270. package/lib/esm/runtime/c4-console-events-context.js +62 -0
  271. package/lib/esm/runtime/c4-console-runtime-context.d.ts +8 -1
  272. package/lib/esm/runtime/c4-console-runtime-context.js +50 -1
  273. package/lib/esm/runtime/c4-console-runtime.types.d.ts +20 -0
  274. package/lib/esm/runtime/c4-user-notifications-context.d.ts +19 -0
  275. package/lib/esm/runtime/c4-user-notifications-context.js +201 -0
  276. package/lib/esm/runtime/c4-user-notifications-context.spec.d.ts +1 -0
  277. package/lib/esm/runtime/c4-user-notifications-context.spec.js +80 -0
  278. package/lib/esm/runtime/c4-user-notifications-context.types.d.ts +31 -0
  279. package/lib/esm/runtime/c4-user-notifications-context.types.js +6 -0
  280. package/lib/esm/runtime/c4-user-theme.d.ts +27 -0
  281. package/lib/esm/runtime/c4-user-theme.js +106 -0
  282. package/lib/esm/runtime/decode-access-token.d.ts +12 -0
  283. package/lib/esm/runtime/decode-access-token.js +39 -0
  284. package/lib/esm/runtime/nav/camunda-apps.d.ts +45 -0
  285. package/lib/esm/runtime/nav/camunda-apps.js +100 -0
  286. package/lib/esm/runtime/nav/camunda-apps.spec.d.ts +1 -0
  287. package/lib/esm/runtime/nav/camunda-apps.spec.js +90 -0
  288. package/lib/esm/runtime/nav/use-webapp-nav-data.d.ts +75 -0
  289. package/lib/esm/runtime/nav/use-webapp-nav-data.js +211 -0
  290. package/lib/esm/runtime/nav/use-webapp-nav-data.spec.d.ts +1 -0
  291. package/lib/esm/runtime/nav/use-webapp-nav-data.spec.js +91 -0
  292. package/lib/esm/runtime/to-api-config.js +4 -0
  293. package/lib/esm/ui/c4-modal-dialog.d.ts +14 -0
  294. package/lib/esm/ui/c4-modal-dialog.js +35 -0
  295. package/lib/esm/ui/families.d.ts +42 -0
  296. package/lib/esm/ui/families.js +46 -0
  297. package/lib/esm/ui/index.d.ts +32 -0
  298. package/lib/esm/ui/index.js +95 -0
  299. package/lib/esm/ui/switchable.d.ts +14 -0
  300. package/lib/esm/ui/switchable.js +27 -0
  301. package/lib/esm/ui/tabs.d.ts +21 -0
  302. package/lib/esm/ui/tabs.js +27 -0
  303. package/lib/esm/widgets/cluster-client-details/c4-cluster-client-details-app.js +7 -5
  304. package/lib/esm/widgets/cluster-details/c4-cluster-details-app.d.ts +1 -0
  305. package/lib/esm/widgets/cluster-details/c4-cluster-details-app.js +39 -15
  306. package/lib/esm/widgets/cluster-details/c4-cluster-details-app.merge.spec.d.ts +1 -0
  307. package/lib/esm/widgets/cluster-details/c4-cluster-details-app.merge.spec.js +49 -0
  308. package/lib/esm/widgets/cluster-details/c4-cluster-details-app.types.d.ts +8 -0
  309. package/lib/esm/widgets/cluster-details/c4-cluster-details-page.js +1 -1
  310. package/lib/esm/widgets/cluster-details/c4-cluster-details-page.spec.js +2 -0
  311. package/lib/esm/widgets/cluster-details/cluster-details-tabs.d.ts +23 -0
  312. package/lib/esm/widgets/cluster-details/cluster-details-tabs.js +83 -0
  313. package/lib/esm/widgets/cluster-details/cluster-details-tabs.spec.d.ts +1 -0
  314. package/lib/esm/widgets/cluster-details/cluster-details-tabs.spec.js +33 -0
  315. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-alerts-tab.js +25 -88
  316. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-byom-clients-tab.js +5 -3
  317. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-clients-tab.js +7 -5
  318. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-connector-secrets-tab.js +10 -6
  319. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-hot-backups-tab.js +3 -1
  320. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-ip-whitelist-tab.js +25 -39
  321. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-overview-tab.js +88 -35
  322. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-overview-tab.spec.js +134 -19
  323. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-secure-connectivity-tab.js +12 -9
  324. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-settings-tab.d.ts +2 -0
  325. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-settings-tab.js +194 -6
  326. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-settings-tab.spec.js +60 -1
  327. package/lib/esm/widgets/clusters/c4-clusters-page.d.ts +1 -1
  328. package/lib/esm/widgets/clusters/c4-clusters-page.js +173 -81
  329. package/lib/esm/widgets/clusters/c4-clusters-page.spec.js +146 -13
  330. package/lib/esm/widgets/clusters/c4-clusters-page.types.d.ts +3 -0
  331. package/lib/esm/widgets/connector-management/c4-connector-management-executable-details-page.js +1 -1
  332. package/lib/esm/widgets/connector-management/c4-connector-management-executables-table-page.js +3 -2
  333. package/lib/esm/widgets/connector-management/c4-connector-management-outbound-details-page.d.ts +4 -0
  334. package/lib/esm/widgets/connector-management/c4-connector-management-outbound-details-page.js +59 -0
  335. package/lib/esm/widgets/connector-management/c4-connector-management-outbound-details-page.types.d.ts +18 -0
  336. package/lib/esm/widgets/connector-management/c4-connector-management-outbound-details-page.types.js +6 -0
  337. package/lib/esm/widgets/connector-management/c4-connector-management-page.d.ts +1 -1
  338. package/lib/esm/widgets/connector-management/c4-connector-management-page.js +38 -5
  339. package/lib/esm/widgets/connector-management/c4-connector-management-page.spec.js +86 -0
  340. package/lib/esm/widgets/connector-management/c4-connector-management-page.types.d.ts +11 -0
  341. package/lib/esm/widgets/connector-management/c4-connector-management.shared.d.ts +1 -0
  342. package/lib/esm/widgets/connector-management/c4-connector-management.shared.js +14 -5
  343. package/lib/esm/widgets/create-cluster/c4-create-cluster-page.js +1 -1
  344. package/lib/esm/widgets/dashboard/c4-dashboard-app.js +21 -2
  345. package/lib/esm/widgets/group-details/c4-group-details-page.js +3 -2
  346. package/lib/esm/widgets/management/c4-management-app.d.ts +1 -1
  347. package/lib/esm/widgets/management/c4-management-app.js +132 -23
  348. package/lib/esm/widgets/management/c4-management-app.spec.js +163 -1
  349. package/lib/esm/widgets/management/c4-management-app.types.d.ts +5 -0
  350. package/lib/esm/widgets/management/c4-management-page.js +1 -6
  351. package/lib/esm/widgets/management/management-tabs.d.ts +22 -0
  352. package/lib/esm/widgets/management/management-tabs.js +76 -0
  353. package/lib/esm/widgets/management/management-tabs.spec.d.ts +1 -0
  354. package/lib/esm/widgets/management/management-tabs.spec.js +28 -0
  355. package/lib/esm/widgets/management/tabs/c4-management-api-tab.js +4 -2
  356. package/lib/esm/widgets/management/tabs/c4-management-billing-tab.js +1 -1
  357. package/lib/esm/widgets/management/tabs/c4-management-groups-tab.js +1 -1
  358. package/lib/esm/widgets/management/tabs/c4-management-overview-tab.d.ts +3 -1
  359. package/lib/esm/widgets/management/tabs/c4-management-overview-tab.js +19 -3
  360. package/lib/esm/widgets/management/tabs/c4-management-pricing-tab.js +2 -1
  361. package/lib/esm/widgets/management/tabs/c4-management-settings-tab.js +1 -1
  362. package/lib/esm/widgets/management/tabs/c4-management-usage-tab.d.ts +1 -1
  363. package/lib/esm/widgets/management/tabs/c4-management-usage-tab.js +13 -11
  364. package/lib/esm/widgets/management/tabs/c4-management-users-tab.js +37 -5
  365. package/lib/esm/widgets/management/tabs/c4-management-users-tab.spec.js +98 -0
  366. package/lib/esm/widgets/use-extend-trial.d.ts +8 -0
  367. package/lib/esm/widgets/use-extend-trial.js +36 -0
  368. package/lib/esm/widgets/use-extend-trial.spec.d.ts +1 -0
  369. package/lib/esm/widgets/use-extend-trial.spec.js +79 -0
  370. package/lib/esm/widgets/user-details/c4-user-details-page.js +5 -14
  371. package/package.json +16 -7
@@ -0,0 +1,2 @@
1
+ import type { C4CreateAlertModalProps } from './c4-create-alert-modal.types';
2
+ export declare const basicCreateAlertModalProps: C4CreateAlertModalProps;
@@ -0,0 +1,20 @@
1
+ /*
2
+ * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
3
+ * under one or more contributor license agreements. Licensed under a commercial license.
4
+ * You may not use this file except in compliance with the commercial license.
5
+ */
6
+ export const basicCreateAlertModalProps = {
7
+ t: (key) => key,
8
+ userEmail: 'user@example.com',
9
+ docsAlertsUrl: 'https://docs.camunda.io/docs/components/console/manage-clusters/manage-alerts/',
10
+ onNavigate: ({ url }) => {
11
+ console.log('Navigate requested', { url });
12
+ },
13
+ onCreateAlert: async ({ reportType, webhookUrl, hmacSecret }) => {
14
+ console.log('Create alert requested', {
15
+ reportType,
16
+ webhookUrl,
17
+ hmacSecret,
18
+ });
19
+ },
20
+ };
@@ -0,0 +1,22 @@
1
+ export type C4CreateAlertReportType = 'Email' | 'Webhook';
2
+ export interface C4CreateAlertModalHandle {
3
+ open: () => void;
4
+ close: () => void;
5
+ }
6
+ export interface C4CreateAlertModalProps {
7
+ t: (key: string, options?: Record<string, unknown>) => string;
8
+ userEmail?: string;
9
+ docsAlertsUrl: string;
10
+ onNavigate?: (action: {
11
+ kind: 'openUrl';
12
+ url: string;
13
+ }) => void;
14
+ onCreateAlert: (params: {
15
+ reportType: C4CreateAlertReportType;
16
+ webhookUrl?: string;
17
+ hmacSecret?: string;
18
+ }) => Promise<void>;
19
+ onCancel?: () => void;
20
+ onSubmitStart?: () => void;
21
+ onSubmitError?: (error: unknown) => void;
22
+ }
@@ -0,0 +1,6 @@
1
+ /*
2
+ * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
3
+ * under one or more contributor license agreements. Licensed under a commercial license.
4
+ * You may not use this file except in compliance with the commercial license.
5
+ */
6
+ export {};
@@ -0,0 +1,32 @@
1
+ import { type JSX } from 'react';
2
+ interface C4CreateClusterTileGridProps<T> {
3
+ items: T[];
4
+ getKey: (item: T) => string;
5
+ getLabel: (item: T) => string;
6
+ getDescription?: (item: T) => string | undefined;
7
+ getDisabled?: (item: T) => boolean;
8
+ /** Currently selected item key (radio value). */
9
+ value: string | undefined;
10
+ onChange: (value: string) => void;
11
+ /** Accessible name for the underlying radio group. */
12
+ ariaLabel: string;
13
+ initialCount?: number;
14
+ loadMoreIncrement?: number;
15
+ columnWidth?: string;
16
+ searchPlaceholder?: string;
17
+ emptyStateText?: string;
18
+ }
19
+ /**
20
+ * Single-selection grid of choice cards for the create-cluster form.
21
+ *
22
+ * ds mode renders the design-system `ChoiceCardGroup`/`ChoiceCard` (a radio
23
+ * group — proper single-selection + keyboard semantics). carbon mode keeps the
24
+ * `C4SelectableTile` (Carbon `RadioTile`) grid unchanged. Both are driven by the
25
+ * same `value`/`onChange`.
26
+ *
27
+ * Once `items` exceeds `initialCount` it also renders a search box (filtering by
28
+ * `getLabel`) and a "Load more" button, so small sections stay uncluttered while
29
+ * large ones (e.g. many generations/regions) don't blow up the page height.
30
+ */
31
+ export declare function C4CreateClusterTileGrid<T>({ items, getKey, getLabel, getDescription, getDisabled, value, onChange, ariaLabel, initialCount, loadMoreIncrement, columnWidth, searchPlaceholder, emptyStateText, }: C4CreateClusterTileGridProps<T>): JSX.Element;
32
+ export {};
@@ -0,0 +1,71 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } 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 { ChoiceCard, ChoiceCardGroup } from '@camunda/design-system';
8
+ import { Stack } from '@carbon/react';
9
+ import { ChevronDown } from '@carbon/react/icons/index.esm.js';
10
+ import { useState } from 'react';
11
+ import { useC4DesignSystem } from '../../runtime/c4-console-runtime-context.js';
12
+ import { Button, Search } from '../../ui/index.js';
13
+ import { C4SelectableTile } from '../c4-selectable-tile/c4-selectable-tile.js';
14
+ /**
15
+ * Normalizes a string for case-insensitive substring matching. Any run of
16
+ * whitespace (including non-breaking spaces and other Unicode whitespace that
17
+ * can sneak into labels such as generation names, e.g. "8.10 Cross...")
18
+ * collapses to a single ASCII space, and the result is trimmed. Without this,
19
+ * a label containing a non-breaking space matches "8.10" but not "8.10 " typed
20
+ * with a regular space, so the search silently stops filtering.
21
+ */
22
+ function normalizeForSearch(value) {
23
+ return value.toLowerCase().replace(/\s+/g, ' ').trim();
24
+ }
25
+ /**
26
+ * Single-selection grid of choice cards for the create-cluster form.
27
+ *
28
+ * ds mode renders the design-system `ChoiceCardGroup`/`ChoiceCard` (a radio
29
+ * group — proper single-selection + keyboard semantics). carbon mode keeps the
30
+ * `C4SelectableTile` (Carbon `RadioTile`) grid unchanged. Both are driven by the
31
+ * same `value`/`onChange`.
32
+ *
33
+ * Once `items` exceeds `initialCount` it also renders a search box (filtering by
34
+ * `getLabel`) and a "Load more" button, so small sections stay uncluttered while
35
+ * large ones (e.g. many generations/regions) don't blow up the page height.
36
+ */
37
+ export function C4CreateClusterTileGrid({ items, getKey, getLabel, getDescription, getDisabled, value, onChange, ariaLabel, initialCount = 8, loadMoreIncrement, columnWidth = '280px', searchPlaceholder = 'Search', emptyStateText = 'No matches found', }) {
38
+ const designSystem = useC4DesignSystem();
39
+ const [searchValue, setSearchValue] = useState('');
40
+ const [visibleCount, setVisibleCount] = useState(initialCount);
41
+ const increment = loadMoreIncrement ?? initialCount;
42
+ const showSearchAndLoadMore = items.length > initialCount;
43
+ const normalizedSearch = normalizeForSearch(searchValue);
44
+ const filteredItems = showSearchAndLoadMore && normalizedSearch
45
+ ? items.filter((item) => normalizeForSearch(getLabel(item)).includes(normalizedSearch))
46
+ : items;
47
+ const visibleItems = showSearchAndLoadMore
48
+ ? filteredItems.slice(0, visibleCount)
49
+ : filteredItems;
50
+ const hasMore = showSearchAndLoadMore && visibleItems.length < filteredItems.length;
51
+ const gridColumns = `repeat(auto-fill, minmax(${columnWidth}, 1fr))`;
52
+ const renderGrid = () => {
53
+ if (designSystem === 'ds') {
54
+ return (_jsx(ChoiceCardGroup, { "aria-label": ariaLabel, value: value ?? '', onValueChange: onChange, style: { gridTemplateColumns: gridColumns, gap: '1rem' }, children: visibleItems.map((item) => (_jsx(ChoiceCard, { value: getKey(item), title: getLabel(item), description: getDescription?.(item), disabled: getDisabled?.(item) }, getKey(item)))) }));
55
+ }
56
+ return (_jsx("div", { style: {
57
+ display: 'grid',
58
+ gridTemplateColumns: gridColumns,
59
+ gap: '1rem',
60
+ }, children: visibleItems.map((item) => {
61
+ const description = getDescription?.(item);
62
+ return (_jsx("div", { style: { height: '100%', display: 'grid' }, children: _jsx(C4SelectableTile, { value: getKey(item), checked: getKey(item) === value, onChange: () => onChange(getKey(item)), disabled: getDisabled?.(item), style: { height: '100%' }, children: description ? (_jsxs(Stack, { gap: 2, children: [_jsx("strong", { children: getLabel(item) }), _jsx("p", { style: { color: 'var(--cds-text-helper)' }, children: description })] })) : (getLabel(item)) }) }, getKey(item)));
63
+ }) }));
64
+ };
65
+ return (_jsxs("div", { style: designSystem === 'ds' ? { marginBottom: '0.75rem' } : undefined, children: [showSearchAndLoadMore && (_jsx("div", { style: { maxWidth: '20rem', marginBottom: '1rem' }, children: _jsx(Search, { labelText: searchPlaceholder, placeholder: searchPlaceholder, size: 'md', value: searchValue, onChange: (event) => {
66
+ setSearchValue(event.target.value);
67
+ setVisibleCount(initialCount);
68
+ } }) })), filteredItems.length === 0
69
+ ? items.length > 0 && (_jsx("p", { style: { color: 'var(--cds-text-helper)' }, children: emptyStateText }))
70
+ : renderGrid(), hasMore && (_jsx("div", { style: { marginTop: '1rem' }, children: _jsx(Button, { kind: 'ghost', size: 'sm', type: 'button', onClick: () => setVisibleCount((previous) => previous + increment), renderIcon: ChevronDown, children: `Load ${Math.min(increment, filteredItems.length - visibleItems.length)} more` }) }))] }));
71
+ }
@@ -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,19 +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 { Button, Checkbox, Column, ContentSwitcher, FormLabel, Grid, InlineLoading, InlineNotification, Link, RadioButton, RadioButtonGroup, RadioTile, SkeletonText, Stack, Switch, Tag, TextArea, TextInput, Tile, } from '@carbon/react';
9
+ import { ChoiceCard, ChoiceCardGroup, Input, Textarea, } from '@camunda/design-system';
10
+ import { Column, FormLabel, Grid, InlineLoading, Stack, TextArea, TextInput, } from '@carbon/react';
10
11
  import { ChevronDown, ChevronUp, Code, DataBase } from '@carbon/react/icons/index.esm.js';
11
12
  import { useRef, useState } from 'react';
12
13
  import styled from 'styled-components';
14
+ import { useC4DesignSystem } from '../../runtime/c4-console-runtime-context.js';
15
+ import { Button, Checkbox, Link, SkeletonText, Tag, Tile } from '../../ui/index.js';
16
+ import { useContentSwitcherFamily } from '../../ui/families.js';
13
17
  import { C4ClusterTagSelector } from '../c4-cluster-tag-selector/c4-cluster-tag-selector.js';
14
18
  import { C4Divider } from '../c4-divider/c4-divider.js';
15
19
  import { C4ExternalLink } from '../c4-external-link/c4-external-link.js';
20
+ import { C4InlineNotification } from '../c4-inline-notification/c4-inline-notification.js';
16
21
  import { C4LinkButton } from '../c4-link-button/c4-link-button.js';
22
+ import { C4SelectableTile } from '../c4-selectable-tile/c4-selectable-tile.js';
23
+ import { C4CreateClusterTileGrid } from './c4-create-cluster-tile-grid.js';
17
24
  var TasklistMode;
18
25
  (function (TasklistMode) {
19
26
  TasklistMode["V1"] = "v1";
20
27
  TasklistMode["V2"] = "v2";
21
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
+ ];
22
37
  const SummaryDesktopWrapper = styled.div `
23
38
  position: sticky;
24
39
  top: 5rem;
@@ -48,9 +63,6 @@ const FormElementTitle = (props) => _jsx("h3", { children: props.title });
48
63
  const ClusterPlanTypeTile = (props) => {
49
64
  return (_jsxs(Stack, { gap: 4, children: [props.type === 'dev' ? _jsx(Code, {}) : _jsx(DataBase, {}), _jsx("h6", { children: props.title }), _jsx("p", { children: props.description })] }));
50
65
  };
51
- const RadioButtonGroupWithGrid = (props) => {
52
- return _jsx(Grid, { children: props.children });
53
- };
54
66
  const enableMap = {
55
67
  prod: ['dev', 'test', 'stage', 'prod'],
56
68
  stage: ['dev', 'test', 'stage'],
@@ -58,6 +70,8 @@ const enableMap = {
58
70
  dev: ['dev', 'test'],
59
71
  };
60
72
  export const C4CreateCluster = ({ loading, cta, formElements, autoUpdate, tasklistModeToggle, authorizationToggle, banner: { noSlotsLeft }, }) => {
73
+ const designSystem = useC4DesignSystem();
74
+ const { ContentSwitcher, Switch } = useContentSwitcherFamily();
61
75
  const preConditions = formElements.clusterPlanType.options.length > 0 &&
62
76
  formElements.region.options.length > 0 &&
63
77
  formElements.generation.channels.length > 0 &&
@@ -376,6 +390,10 @@ export const C4CreateCluster = ({ loading, cta, formElements, autoUpdate, taskli
376
390
  : submitState === 'success'
377
391
  ? cta.states.success
378
392
  : cta.states.error;
393
+ // ds-only: FormLabel's default `--cds-text-secondary` is remapped too dark
394
+ // for the summary panel in ds dark mode; force the primary text token there.
395
+ // Carbon keeps FormLabel's own default (unchanged) by leaving style undefined.
396
+ const summaryLabelStyle = designSystem === 'ds' ? { color: 'var(--cds-text-primary)' } : undefined;
379
397
  return (_jsxs("div", { style: {
380
398
  display: 'grid',
381
399
  gridAutoFlow: 'row',
@@ -383,7 +401,7 @@ export const C4CreateCluster = ({ loading, cta, formElements, autoUpdate, taskli
383
401
  overflow: 'hidden',
384
402
  zIndex: 1,
385
403
  minHeight: '572px',
386
- }, children: [_jsxs("div", { children: [_jsx("h6", { children: "Summary" }), _jsx(C4Divider, {}), _jsxs(Stack, { gap: 4, children: [loading ? (_jsx(SkeletonText, {})) : (_jsxs("h6", { children: [summary.clusterPlanType, " - ", numberOfAllocatedHwPackages, "x"] })), _jsxs(Stack, { gap: 1, children: [_jsx(FormLabel, { children: "Provider and region" }), loading ? (_jsx(SkeletonText, {})) : summary.provider ? (`${summary.provider} - ${summary.region}`) : (summary.region)] }), formElements.region.dualRegionBackups && (_jsxs(Stack, { gap: 1, children: [_jsx(FormLabel, { children: "Backup region" }), loading ? _jsx(SkeletonText, {}) : summary.backup] })), summary.encryption && (_jsxs(Stack, { gap: 1, children: [_jsx(FormLabel, { children: encryptions?.title ?? 'Encryption at rest' }), loading ? _jsx(SkeletonText, {}) : summary.encryption] })), _jsxs(Stack, { gap: 1, children: [_jsx(FormLabel, { children: "Channel" }), loading ? _jsx(SkeletonText, {}) : summary.channel] }), _jsxs(Stack, { gap: 1, children: [_jsx(FormLabel, { children: "Generation" }), loading ? _jsx(SkeletonText, {}) : summary.generation] }), _jsxs(Stack, { gap: 1, children: [_jsx(FormLabel, { children: "Cluster tag" }), loading ? (_jsx(SkeletonText, {})) : (_jsx("span", { children: _jsx(C3ClusterTag, { stage: summary.stageTag }) }))] })] })] }), !loading && (_jsx("div", { style: { alignSelf: 'end' }, children: _jsx("div", { children: _jsxs(Stack, { gap: 3, children: [['submitting', 'success', 'error'].includes(submitState) ? (_jsx(InlineLoading, { description: submitStateDescription, status: getInlineStatusByState(submitState), style: { marginLeft: '1rem' } })) : (_jsx(Button, { disabled: !clusterCreationAllowed(), style: { width: '100%' }, onClick: handleSubmit, children: cta.label })), cta.cancel && (_jsx(Button, { onClick: () => {
404
+ }, children: [_jsxs("div", { children: [_jsx("h6", { children: "Summary" }), _jsx(C4Divider, {}), _jsxs(Stack, { gap: 4, children: [loading ? (_jsx(SkeletonText, {})) : (_jsxs("h6", { children: [summary.clusterPlanType, " - ", numberOfAllocatedHwPackages, "x"] })), _jsxs(Stack, { gap: 1, children: [_jsx(FormLabel, { style: summaryLabelStyle, children: "Provider and region" }), loading ? (_jsx(SkeletonText, {})) : summary.provider ? (`${summary.provider} - ${summary.region}`) : (summary.region)] }), formElements.region.dualRegionBackups && (_jsxs(Stack, { gap: 1, children: [_jsx(FormLabel, { style: summaryLabelStyle, children: "Backup region" }), loading ? _jsx(SkeletonText, {}) : summary.backup] })), summary.encryption && (_jsxs(Stack, { gap: 1, children: [_jsx(FormLabel, { style: summaryLabelStyle, children: encryptions?.title ?? 'Encryption at rest' }), loading ? _jsx(SkeletonText, {}) : summary.encryption] })), _jsxs(Stack, { gap: 1, children: [_jsx(FormLabel, { style: summaryLabelStyle, children: "Channel" }), loading ? _jsx(SkeletonText, {}) : summary.channel] }), _jsxs(Stack, { gap: 1, children: [_jsx(FormLabel, { style: summaryLabelStyle, children: "Generation" }), loading ? _jsx(SkeletonText, {}) : summary.generation] }), _jsxs(Stack, { gap: 1, children: [_jsx(FormLabel, { style: summaryLabelStyle, children: "Cluster tag" }), loading ? (_jsx(SkeletonText, {})) : (_jsx("span", { children: _jsx(C3ClusterTag, { stage: summary.stageTag }) }))] })] })] }), !loading && (_jsx("div", { style: { alignSelf: 'end' }, children: _jsx("div", { children: _jsxs(Stack, { gap: 3, children: [['submitting', 'success', 'error'].includes(submitState) ? (_jsx(InlineLoading, { description: submitStateDescription, status: getInlineStatusByState(submitState), style: { marginLeft: '1rem' } })) : (_jsx(Button, { disabled: !clusterCreationAllowed(), style: { width: '100%' }, onClick: handleSubmit, children: cta.label })), cta.cancel && (_jsx(Button, { onClick: () => {
387
405
  if (cta.cancel) {
388
406
  cta.cancel.onClick();
389
407
  }
@@ -393,25 +411,19 @@ export const C4CreateCluster = ({ loading, cta, formElements, autoUpdate, taskli
393
411
  if (!(tasklistModeToggle?.enabled && generationIs8_8OrAboveAndLessThan8_10())) {
394
412
  return null;
395
413
  }
396
- 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) => {
397
- setTasklistV2Enabled(selection === TasklistMode.V2);
398
- }, 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" }) }) })] }) }) })] }));
399
418
  };
400
419
  const renderAuthorizationRadio = () => {
401
420
  if (!(authorizationToggle?.enabled && generationIs8_8OrAbove())) {
402
421
  return null;
403
422
  }
404
- 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) => {
405
- setAuthorizationEnabled(selection === 'true');
406
- }, 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(InlineNotification, { 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." }) }))] }) }) })] }));
407
424
  };
408
- const renderGenerationRadioButtons = (generations) => {
409
- return (_jsx(RadioButtonGroupWithGrid, { children: generations.map((generation) => (_jsx(Column, { sm: 4, md: 4, lg: 3, style: {
410
- justifySelf: 'start',
411
- marginBottom: '0.5rem',
412
- }, children: _jsx(RadioButton, { id: generation.uuid, value: generation.uuid, labelText: generation.title, checked: selectedGeneration === generation.uuid, onChange: (value) => {
413
- updateSelectedGeneration(value);
414
- }, 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));
415
427
  };
416
428
  const renderGenerationSection = () => {
417
429
  const allGenerations = getSelectedChannel()?.generations ?? [];
@@ -424,7 +436,7 @@ export const C4CreateCluster = ({ loading, cta, formElements, autoUpdate, taskli
424
436
  const channelGenerations = allGenerations.filter((g) => g.classification !== 'existingCluster' &&
425
437
  g.classification !== 'orgUnlocked');
426
438
  const hasOlderGenerations = nonChannelGenerations.length > 0;
427
- 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: {
428
440
  marginTop: 'var(--cds-spacing-03)',
429
441
  }, children: [_jsx(Button, { kind: 'ghost', size: 'sm', type: 'button', onClick: () => {
430
442
  setShowOlderGenerations((prev) => {
@@ -437,14 +449,14 @@ export const C4CreateCluster = ({ loading, cta, formElements, autoUpdate, taskli
437
449
  }, renderIcon: showOlderGenerations ? ChevronUp : ChevronDown, "aria-expanded": showOlderGenerations, "aria-controls": 'older-generations-panel', children: formElements.generation.olderGenerationsLabel ??
438
450
  'View older generations' }), showOlderGenerations && (_jsxs("div", { id: 'older-generations-panel', style: {
439
451
  marginTop: 'var(--cds-spacing-03)',
440
- }, 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: {
441
453
  color: 'var(--cds-text-helper)',
442
454
  }, children: formElements.generation.olderGenerationsHelperText ??
443
455
  'These are older generations that are used in your organization.' })] })), orgUnlockedGenerations.length > 0 && (_jsxs("div", { style: {
444
456
  marginTop: existingClusterGenerations.length > 0
445
457
  ? 'var(--cds-spacing-05)'
446
458
  : undefined,
447
- }, children: [renderGenerationRadioButtons(orgUnlockedGenerations), _jsx("p", { style: {
459
+ }, children: [renderGenerationTiles(orgUnlockedGenerations), _jsx("p", { style: {
448
460
  color: 'var(--cds-text-helper)',
449
461
  }, children: formElements.generation
450
462
  .orgUnlockedGenerationsHelperText ??
@@ -457,41 +469,39 @@ export const C4CreateCluster = ({ loading, cta, formElements, autoUpdate, taskli
457
469
  if (!preConditions) {
458
470
  return (_jsx(Grid, { children: _jsx(Column, { span: 12, children: _jsx("p", { children: "Something went wrong. Please try again later." }) }) }));
459
471
  }
460
- return (_jsxs(Stack, { gap: 6, children: [noAvailableSlots && (_jsx(InlineNotification, { kind: 'warning', hideCloseButton: true, style: { minWidth: '0' }, title: noSlotsLeft.title, subtitle: noSlotsLeft.description })), _jsxs(Stack, { gap: 2, children: [_jsx(Grid, { children: _jsx(Column, { span: 12, children: _jsx(FormElementTitle, { title: formElements.name.title }) }) }), _jsx(Grid, { children: _jsx(Column, { span: 8, children: _jsx(TextInput, { ref: clusterNameInputFieldRef, invalidText: clusterNameValidation.message, invalid: !clusterNameValidation.isValid, type: 'text', id: 'cluster-name', placeholder: formElements.name.placeholder, onChange: (event) => updateClusterName(event.target.value), labelText: '', disabled: isSubmitting() || noAvailableSlots }) }) })] }), formElements.description && (_jsxs(Stack, { gap: 2, children: [_jsx(Grid, { children: _jsx(Column, { span: 12, children: _jsx(FormElementTitle, { title: formElements.description.title }) }) }), _jsx(Grid, { children: _jsx(Column, { span: 8, children: _jsx(TextArea, { ref: clusterDescriptionInputFieldRef, id: 'cluster-description', placeholder: formElements.description.placeholder, onChange: (event) => {
461
- setClusterDescriptionValidation({
462
- isValid: true,
463
- message: '',
464
- });
465
- setClusterDescription(event.target.value);
466
- }, labelText: '', disabled: isSubmitting() || noAvailableSlots, rows: 3, invalid: !clusterDescriptionValidation.isValid, invalidText: clusterDescriptionValidation.message }) }) })] })), _jsx(Grid, { children: _jsx(Column, { span: 12, children: _jsx(C4Divider, {}) }) }), _jsxs(Stack, { gap: 2, ref: regionSectionRef, children: [_jsx(Grid, { children: _jsxs(Column, { span: 12, children: [_jsx(FormElementTitle, { title: formElements.region.title }), !regionValidation.isValid && (_jsx("p", { style: {
472
+ return (_jsxs(Stack, { gap: 6, children: [noAvailableSlots && (_jsx(C4InlineNotification, { kind: 'warning', hideCloseButton: true, style: { minWidth: '0' }, title: noSlotsLeft.title, subtitle: noSlotsLeft.description })), _jsxs(Stack, { gap: 2, children: [_jsx(Grid, { children: _jsx(Column, { span: 12, children: _jsx(FormElementTitle, { title: formElements.name.title }) }) }), _jsx(Grid, { children: _jsx(Column, { span: 8, children: _jsx("div", { ref: clusterNameInputFieldRef, children: designSystem === 'ds' ? (_jsxs(_Fragment, { children: [_jsx(Input, { type: 'text', id: 'cluster-name', placeholder: formElements.name.placeholder, "aria-invalid": !clusterNameValidation.isValid || undefined, disabled: isSubmitting() || noAvailableSlots, onChange: (event) => updateClusterName(event.target.value) }), !clusterNameValidation.isValid && (_jsx("span", { className: 'mt-1 block text-xs text-danger-action-default', children: clusterNameValidation.message }))] })) : (_jsx(TextInput, { invalidText: clusterNameValidation.message, invalid: !clusterNameValidation.isValid, type: 'text', id: 'cluster-name', placeholder: formElements.name.placeholder, onChange: (event) => updateClusterName(event.target.value), labelText: '', disabled: isSubmitting() || noAvailableSlots })) }) }) })] }), formElements.description && (_jsxs(Stack, { gap: 2, children: [_jsx(Grid, { children: _jsx(Column, { span: 12, children: _jsx(FormElementTitle, { title: formElements.description.title }) }) }), _jsx(Grid, { children: _jsx(Column, { span: 8, children: _jsx("div", { ref: clusterDescriptionInputFieldRef, children: designSystem === 'ds' ? (_jsxs(_Fragment, { children: [_jsx(Textarea, { id: 'cluster-description', placeholder: formElements.description.placeholder, rows: 3, "aria-invalid": !clusterDescriptionValidation.isValid || undefined, disabled: isSubmitting() || noAvailableSlots, onChange: (event) => {
473
+ setClusterDescriptionValidation({
474
+ isValid: true,
475
+ message: '',
476
+ });
477
+ setClusterDescription(event.target.value);
478
+ } }), !clusterDescriptionValidation.isValid && (_jsx("span", { className: 'mt-1 block text-xs text-danger-action-default', children: clusterDescriptionValidation.message }))] })) : (_jsx(TextArea, { id: 'cluster-description', placeholder: formElements.description.placeholder, onChange: (event) => {
479
+ setClusterDescriptionValidation({
480
+ isValid: true,
481
+ message: '',
482
+ });
483
+ setClusterDescription(event.target.value);
484
+ }, labelText: '', disabled: isSubmitting() || noAvailableSlots, rows: 3, invalid: !clusterDescriptionValidation.isValid, invalidText: clusterDescriptionValidation.message })) }) }) })] })), _jsx(Grid, { children: _jsx(Column, { span: 12, children: _jsx(C4Divider, {}) }) }), _jsxs(Stack, { gap: 2, ref: regionSectionRef, children: [_jsx(Grid, { children: _jsxs(Column, { span: 12, children: [_jsx(FormElementTitle, { title: formElements.region.title }), !regionValidation.isValid && (_jsx("p", { style: {
467
485
  color: 'var(--cds-text-error)',
468
486
  marginTop: '0.25rem',
469
487
  marginBottom: '0.5rem',
470
488
  }, children: regionValidation.message })), getUniqueProviders().length > 1 && (_jsx(ContentSwitcher, { size: 'md', style: {
471
489
  width: `${7 * getUniqueProviders().length}rem`,
472
490
  marginBottom: '0.5rem',
473
- }, 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, { children: formElements.region.options
474
- .filter((option) => option.provider === provider)
475
- .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) => {
476
- updateRegion(value);
477
- } }, 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 }) }) })] }), (() => {
478
492
  if (formElements.region.dualRegionBackups) {
479
493
  const selectedRegion = formElements.region.options.find((reg) => reg.uuid === region);
480
- 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, { children: selectedRegion?.backups.map((option) => (_jsx(Column, { sm: 4, md: 6, lg: 4, style: {
481
- justifySelf: 'start',
482
- marginBottom: '0.5rem',
483
- }, children: _jsx(RadioButton, { id: option.uuid, value: option.uuid, labelText: `${option.regions.length > 1
484
- ? 'Dual region: '
485
- : 'Single region: '} ${option.regions
486
- .map((reg) => reg.label)
487
- .join(', ')}`, checked: option.uuid === backupRegion, disabled: isSubmitting() || noAvailableSlots, onChange: (value) => {
488
- updateBackupRegion(value);
489
- } }, 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 }) }) })] }));
490
497
  }
491
498
  else {
492
499
  return _jsx(_Fragment, {});
493
500
  }
494
- })(), _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: {
495
505
  display: 'grid',
496
506
  gridTemplateColumns: 'repeat(auto-fill, minmax(320px, 1fr))',
497
507
  gap: '1rem',
@@ -499,7 +509,7 @@ export const C4CreateCluster = ({ loading, cta, formElements, autoUpdate, taskli
499
509
  }, children: formElements.clusterPlanType.options.map((option) => (_jsx("div", { style: { marginBottom: '2.0rem' }, children: _jsx("div", { style: {
500
510
  height: '100%',
501
511
  display: 'grid',
502
- }, children: _jsx(RadioTile, { 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 &&
503
513
  formElements.clusterPlanType.options.find((option) => option.uuid === currentClusterPlanType &&
504
514
  option.category === ClusterPlanTypeCategory.ADVANCED_OFFERING &&
505
515
  option.availabilityClass !== 'unset' &&
@@ -535,15 +545,7 @@ export const C4CreateCluster = ({ loading, cta, formElements, autoUpdate, taskli
535
545
  ? formElements.autoUpdate?.description
536
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: () => {
537
547
  window.open(encryptions?.link.url ?? '', '_blank');
538
- } })] }) }) }), _jsx(Grid, { children: _jsx(Column, { span: 12, children: _jsx(RadioButtonGroupWithGrid, { children: encryptions.options.map((option) => (_jsxs(Column, { sm: 4, md: 6, lg: 4, style: {
539
- justifySelf: 'start',
540
- marginBottom: '0.5rem',
541
- }, children: [_jsx(RadioButton, { id: option.value, value: option.value, labelText: option.title, checked: option.value === encryption, onChange: (value) => {
542
- updateEncryption(value);
543
- } }, option.value), _jsx("p", { style: {
544
- color: 'var(--cds-text-helper)',
545
- marginLeft: '30px',
546
- }, 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, {}) }) })] }))] }));
547
549
  };
548
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: {
549
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;