@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
@@ -1,10 +1,5 @@
1
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 { Stack, Tile } from '@carbon/react';
2
+ import { Stack, Tile } from '../../../ui/index.js';
8
3
  import { C4Divider } from '../../c4-divider/c4-divider.js';
9
4
  export const SettingsTile = ({ description, title, children, }) => {
10
5
  const component = (_jsx(Tile, { children: _jsxs(Stack, { gap: 6, children: [_jsxs(Stack, { gap: 4, children: [_jsx("h3", { children: title }), description && _jsx("p", { style: { maxWidth: '650px' }, children: description }), _jsx(C4Divider, {})] }), children] }) }));
@@ -4,7 +4,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
4
4
  * under one or more contributor license agreements. Licensed under a commercial license.
5
5
  * You may not use this file except in compliance with the commercial license.
6
6
  */
7
- import { Button, Stack } from '@carbon/react';
7
+ import { Button, Stack } from '../../../ui/index.js';
8
8
  export const TasklistModeToggle = (props) => {
9
9
  if (!props.enabled) {
10
10
  return null;
@@ -5,12 +5,17 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
5
5
  * You may not use this file except in compliance with the commercial license.
6
6
  */
7
7
  import { C3ClusterTag, StageClusterLabels, } from '@camunda/camunda-composite-components';
8
- import { Column, Grid, RadioTile, Stack } from '@carbon/react';
8
+ import { ChoiceCard, ChoiceCardGroup } from '@camunda/design-system';
9
+ import { Column, Grid } from '@carbon/react';
9
10
  import { Information } from '@carbon/react/icons/index.esm.js';
10
11
  import { useEffect, useState } from 'react';
12
+ import { useC4DesignSystem } from '../../runtime/c4-console-runtime-context.js';
13
+ import { Stack } from '../../ui/index.js';
11
14
  import { STYLES } from '../c4-billing-page/c4-billing-page.js';
12
15
  import { mediaSizeByWidth } from '../c4-billing-page/elements/current-usage-metrics.js';
16
+ import { C4SelectableTile } from '../c4-selectable-tile/c4-selectable-tile.js';
13
17
  export const C4ClusterTagSelector = (props) => {
18
+ const designSystem = useC4DesignSystem();
14
19
  const [mediaSize, setMediaSize] = useState(mediaSizeByWidth(window.innerWidth));
15
20
  useEffect(() => {
16
21
  const handleWindowResize = () => {
@@ -21,7 +26,23 @@ export const C4ClusterTagSelector = (props) => {
21
26
  window.removeEventListener('resize', handleWindowResize);
22
27
  };
23
28
  }, []);
24
- const buildSingleTile = (item) => (_jsxs(RadioTile, { value: item, checked: item === props.currentStage, onChange: () => {
29
+ const tagsToRender = Object.keys(StageClusterLabels).filter((item) => !props.isDevCluster || item !== 'prod');
30
+ const isTagDisabled = (item) => !props.save.allowed ||
31
+ (!!props.allowedTags && !props.allowedTags.includes(item));
32
+ if (designSystem === 'ds') {
33
+ return (_jsx(ChoiceCardGroup, { "aria-label": 'Cluster tag', value: props.currentStage ?? '', onValueChange: (value) => props.onChange(value), style: {
34
+ gridTemplateColumns: 'repeat(auto-fill, minmax(220px, 1fr))',
35
+ gap: '1rem',
36
+ }, children: tagsToRender.map((item) => {
37
+ const stage = item;
38
+ const { text, info } = props.boxes[stage];
39
+ return (_jsx(ChoiceCard, { value: item,
40
+ // ChoiceCard renders `title` as node children; pass the C3 stage
41
+ // chip so the colored badge itself serves as the card title.
42
+ title: (_jsx(C3ClusterTag, { stage: stage })), description: info ? `${text} ${info}` : text, disabled: isTagDisabled(item) }, `tag-option-${item}`));
43
+ }) }));
44
+ }
45
+ const buildSingleTile = (item) => (_jsxs(C4SelectableTile, { value: item, checked: item === props.currentStage, onChange: () => {
25
46
  props.onChange(item);
26
47
  }, disabled: !props.save.allowed ||
27
48
  (props.allowedTags && !props.allowedTags?.includes(item)), style: { height: '100%' }, children: [_jsxs("div", { style: {
@@ -41,7 +62,6 @@ export const C4ClusterTagSelector = (props) => {
41
62
  })()] }, `tag-option-${item}`));
42
63
  const buildTagTiles = () => {
43
64
  const returnValue = [];
44
- const tagsToRender = Object.keys(StageClusterLabels).filter((item) => !props.isDevCluster || item !== 'prod');
45
65
  const renderedColumns = tagsToRender.map((item) => (_jsx(Column, { span: 8, style: { ...STYLES.grid }, children: _jsx("div", { style: {
46
66
  height: '100%',
47
67
  display: 'grid',
@@ -1,13 +1,8 @@
1
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 { C3EmptyState } from '@camunda/camunda-composite-components';
8
2
  import { C4_ASSET_URLS } from '../../assetUrls.js';
3
+ import { C4EmptyState } from '../c4-empty-state/c4-empty-state.js';
9
4
  export const C4ClustersEmptyState = (props) => {
10
- const { variant, texts, onCreateCluster, createClusterButtonDisabled, docsHref, onDocsClick, onUpgrade, } = props;
5
+ const { variant, texts, onCreateCluster, createClusterButtonDisabled, docsHref, onDocsClick, onUpgrade, onExtendTrial, } = props;
11
6
  if (variant === 'noClusters') {
12
7
  const button = onCreateCluster
13
8
  ? {
@@ -24,21 +19,30 @@ export const C4ClustersEmptyState = (props) => {
24
19
  onClick: onDocsClick,
25
20
  }
26
21
  : undefined;
27
- return (_jsx(C3EmptyState, { icon: {
22
+ return (_jsx(C4EmptyState, { icon: {
28
23
  path: C4_ASSET_URLS.clusterIcon,
29
24
  altText: 'clusterIcon',
30
25
  }, heading: texts.noClusters.heading, description: texts.noClusters.description, button: button, link: link }));
31
26
  }
32
27
  if (variant === 'trialExpiredAdmin') {
33
- return (_jsx(C3EmptyState, { icon: {
28
+ const upgradeButton = {
29
+ onClick: onUpgrade ?? (() => undefined),
30
+ label: texts.trialExpired.upgradeButtonLabel,
31
+ };
32
+ return (_jsx(C4EmptyState, { icon: {
34
33
  path: C4_ASSET_URLS.upgradeIcon,
35
34
  altText: 'upgradeIcon',
36
- }, heading: texts.trialExpired.heading, description: texts.trialExpired.adminDescription, button: {
37
- onClick: onUpgrade ?? (() => undefined),
38
- label: texts.trialExpired.upgradeButtonLabel,
39
- } }));
35
+ }, heading: texts.trialExpired.heading, description: texts.trialExpired.adminDescription, button: onExtendTrial ? undefined : upgradeButton, buttons: onExtendTrial
36
+ ? [
37
+ upgradeButton,
38
+ {
39
+ onClick: onExtendTrial,
40
+ label: texts.trialExpired.extendTrialButtonLabel ?? 'Extend trial',
41
+ },
42
+ ]
43
+ : undefined }));
40
44
  }
41
- return (_jsx(C3EmptyState, { icon: {
45
+ return (_jsx(C4EmptyState, { icon: {
42
46
  path: C4_ASSET_URLS.upgradeIcon,
43
47
  altText: 'upgradeIcon',
44
48
  }, heading: texts.trialExpired.heading, description: texts.trialExpired.memberDescription }));
@@ -0,0 +1 @@
1
+ import '@testing-library/jest-dom/vitest';
@@ -0,0 +1,40 @@
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 '@testing-library/jest-dom/vitest';
8
+ import { render, screen } from '@testing-library/react';
9
+ import { describe, expect, it, vi } from 'vitest';
10
+ import { C4ClustersEmptyState } from './c4-clusters-empty-state.js';
11
+ vi.mock('../../runtime/c4-console-runtime-context', () => ({
12
+ useC4DesignSystem: () => 'carbon',
13
+ }));
14
+ const baseTexts = {
15
+ noClusters: {
16
+ heading: 'No clusters',
17
+ description: 'Create one',
18
+ createButtonLabel: 'Create',
19
+ docsLinkLabel: 'Docs',
20
+ },
21
+ trialExpired: {
22
+ heading: 'Trial expired',
23
+ adminDescription: 'Upgrade to continue',
24
+ memberDescription: 'Contact admin',
25
+ upgradeButtonLabel: 'Upgrade',
26
+ extendTrialButtonLabel: 'Extend trial',
27
+ },
28
+ };
29
+ describe('C4ClustersEmptyState — trialExpiredAdmin', () => {
30
+ it('renders Upgrade button without Extend trial when onExtendTrial is not provided', () => {
31
+ render(_jsx(C4ClustersEmptyState, { variant: 'trialExpiredAdmin', texts: baseTexts, docsHref: 'https://example.com', onUpgrade: vi.fn() }));
32
+ expect(screen.getByText('Upgrade')).toBeInTheDocument();
33
+ expect(screen.queryByText('Extend trial')).not.toBeInTheDocument();
34
+ });
35
+ it('renders both buttons when onExtendTrial is provided', () => {
36
+ render(_jsx(C4ClustersEmptyState, { variant: 'trialExpiredAdmin', texts: baseTexts, docsHref: 'https://example.com', onUpgrade: vi.fn(), onExtendTrial: vi.fn() }));
37
+ expect(screen.getByText('Upgrade')).toBeInTheDocument();
38
+ expect(screen.getByText('Extend trial')).toBeInTheDocument();
39
+ });
40
+ });
@@ -12,6 +12,7 @@ export interface C4ClustersEmptyStateTexts {
12
12
  adminDescription: string | ReactElement;
13
13
  memberDescription: string | ReactElement;
14
14
  upgradeButtonLabel: string;
15
+ extendTrialButtonLabel?: string;
15
16
  };
16
17
  }
17
18
  export interface C4ClustersEmptyStateProps {
@@ -20,6 +21,7 @@ export interface C4ClustersEmptyStateProps {
20
21
  createClusterButtonDisabled?: boolean;
21
22
  onCreateCluster?: () => void;
22
23
  onUpgrade?: () => void;
24
+ onExtendTrial?: () => void;
23
25
  docsHref: string;
24
26
  onDocsClick?: () => void;
25
27
  }
@@ -1,15 +1,10 @@
1
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 { InlineNotification } from '@carbon/react';
8
2
  import { C4ActionableNotification } from '../c4-actionable-notification/c4-actionable-notification.js';
3
+ import { C4InlineNotification } from '../c4-inline-notification/c4-inline-notification.js';
9
4
  export const C4ClustersTrialNotification = (props) => {
10
- const { title, showUpgradeAction, upgradeButtonLabel, onUpgradeClick } = props;
5
+ const { title, showUpgradeAction, upgradeButtonLabel, onUpgradeClick, extendTrialButtonLabel, onExtendTrialClick, } = props;
11
6
  if (showUpgradeAction) {
12
- return (_jsx(C4ActionableNotification, { kind: 'info', title: title, subtitle: '', lowContrast: false, actionButtonLabel: upgradeButtonLabel ?? '', onActionButtonClick: onUpgradeClick ?? (() => undefined) }));
7
+ return (_jsx(C4ActionableNotification, { appearance: 'banner', kind: 'info', title: title, subtitle: '', lowContrast: false, actionButtonLabel: upgradeButtonLabel ?? '', onActionButtonClick: onUpgradeClick ?? (() => undefined), secondaryActionButtonLabel: extendTrialButtonLabel, onSecondaryActionButtonClick: onExtendTrialClick }));
13
8
  }
14
- return (_jsx(InlineNotification, { kind: 'info', title: title, hideCloseButton: true, style: { maxWidth: '100%', marginBottom: '.5rem' } }));
9
+ return (_jsx(C4InlineNotification, { kind: 'info', title: title, hideCloseButton: true, style: { maxWidth: '100%', marginBottom: '.5rem' } }));
15
10
  };
@@ -3,4 +3,6 @@ export interface C4ClustersTrialNotificationProps {
3
3
  showUpgradeAction?: boolean;
4
4
  upgradeButtonLabel?: string;
5
5
  onUpgradeClick?: () => void;
6
+ extendTrialButtonLabel?: string;
7
+ onExtendTrialClick?: () => void;
6
8
  }
@@ -5,12 +5,16 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
5
5
  * You may not use this file except in compliance with the commercial license.
6
6
  */
7
7
  import { C3ClusterTag } from '@camunda/camunda-composite-components';
8
- import { ActionableNotification, Button, Column, Grid, Link, Stack, StructuredListBody, StructuredListCell, StructuredListHead, StructuredListRow, StructuredListWrapper, Tile, Tooltip, } from '@carbon/react';
8
+ import { Column, Grid } from '@carbon/react';
9
9
  import * as Icons from '@carbon/react/icons/index.esm.js';
10
10
  import { Chat, Help, WarningAltFilled } from '@carbon/react/icons/index.esm.js';
11
11
  import { useCallback, useMemo, useState } from 'react';
12
+ import { Button, Link, Stack, Tile, Tooltip } from '../../ui/index.js';
13
+ import { C4ActionableNotification } from '../c4-actionable-notification/c4-actionable-notification.js';
12
14
  import { ClusterStatusElement } from '../c4-cluster-overview/applications.js';
13
15
  import { C4IconAndTextElement, getClusterLoadConfig, } from '../c4-cluster-overview/c4-cluster-overview.js';
16
+ import { C4PageLayout } from '../c4-page-layout/c4-page-layout.js';
17
+ import { C4StructuredListBody, C4StructuredListCell, C4StructuredListHead, C4StructuredListRow, C4StructuredListWrapper, } from '../c4-structured-list/c4-structured-list.js';
14
18
  import { ValueMetricsLineChart } from '../c4-usage-history/elements/usage-history-charts.js';
15
19
  import { EmptyState } from './elements/empty-state.js';
16
20
  const DAY_MS = 24 * 60 * 60 * 1000;
@@ -60,7 +64,7 @@ export const C4ConsoleDashboard = ({ orgId, usersAmount, taskUsersAmount, cluste
60
64
  }
61
65
  }
62
66
  }, []);
63
- const component = (_jsx(_Fragment, { children: _jsxs(Grid, { style: { gap: '16px' }, children: [_jsx(Column, { lg: 16, md: 8, sm: 4, children: _jsx("div", { style: {
67
+ const component = (_jsx(C4PageLayout, { children: _jsxs(Grid, { style: { gap: '16px' }, children: [_jsx(Column, { lg: 16, md: 8, sm: 4, children: _jsx("div", { style: {
64
68
  display: 'flex',
65
69
  justifyContent: 'flex-end',
66
70
  }, children: _jsx(Button, { onClick: actions.onFeedbackClick, kind: 'ghost', renderIcon: Chat, style: {
@@ -91,7 +95,7 @@ export const C4ConsoleDashboard = ({ orgId, usersAmount, taskUsersAmount, cluste
91
95
  }, children: [_jsx("h3", { children: texts.clusters.title }), _jsx("div", { children: _jsx(Link, { href: urls.clusters, onClick: (e) => {
92
96
  e.preventDefault();
93
97
  actions.onNavigateToClusters();
94
- }, children: texts.clusters.viewClusters }) })] }), _jsx("div", { style: { overflowX: 'scroll' }, children: _jsx(Stack, { gap: 6, children: clusters.length > 0 ? (_jsxs(StructuredListWrapper, { isCondensed: true, children: [_jsx(StructuredListHead, { children: _jsxs(StructuredListRow, { head: true, children: [_jsx(StructuredListCell, { head: true, children: texts.clusters.table.name }), _jsx(StructuredListCell, { head: true, children: texts.clusters.table.tags }), _jsx(StructuredListCell, { head: true, children: texts.clusters.table.status }), _jsx(StructuredListCell, { head: true, children: texts.clusters.table.version }), permissions.showClusterLoad && (_jsx(StructuredListCell, { head: true, children: texts.clusters.table.load }))] }) }), _jsx(StructuredListBody, { children: clusters.slice(0, 6).map((item, index) => {
98
+ }, children: texts.clusters.viewClusters }) })] }), _jsx("div", { style: { overflowX: 'auto' }, children: _jsx(Stack, { gap: 6, children: clusters.length > 0 ? (_jsxs(C4StructuredListWrapper, { isCondensed: true, children: [_jsx(C4StructuredListHead, { children: _jsxs(C4StructuredListRow, { head: true, children: [_jsx(C4StructuredListCell, { head: true, children: texts.clusters.table.name }), _jsx(C4StructuredListCell, { head: true, children: texts.clusters.table.tags }), _jsx(C4StructuredListCell, { head: true, children: texts.clusters.table.status }), _jsx(C4StructuredListCell, { head: true, children: texts.clusters.table.version }), permissions.showClusterLoad && (_jsx(C4StructuredListCell, { head: true, children: texts.clusters.table.load }))] }) }), _jsx(C4StructuredListBody, { children: clusters.slice(0, 6).map((item, index) => {
95
99
  const currentClusterLoad = getClusterLoad?.(item.id);
96
100
  const hasClusterLoad = typeof currentClusterLoad === 'number' &&
97
101
  Number.isFinite(currentClusterLoad);
@@ -101,10 +105,10 @@ export const C4ConsoleDashboard = ({ orgId, usersAmount, taskUsersAmount, cluste
101
105
  ? getClusterLoadConfig(currentClusterLoad)
102
106
  : undefined;
103
107
  const hasWarning = item.version.includes('update available');
104
- return (_jsxs(StructuredListRow, { children: [_jsx(StructuredListCell, { children: _jsx(Link, { href: urls.clusterDetails(item.id), onClick: (e) => {
108
+ return (_jsxs(C4StructuredListRow, { children: [_jsx(C4StructuredListCell, { children: _jsx(Link, { href: urls.clusterDetails(item.id), onClick: (e) => {
105
109
  e.preventDefault();
106
110
  actions.onNavigateToClusterDetails(item.id);
107
- }, children: item.name }) }), _jsx(StructuredListCell, { children: item.tags && (_jsx(C3ClusterTag, { stage: item.tags })) }), _jsx(StructuredListCell, { children: _jsx(ClusterStatusElement, { status: item.status.toLowerCase() }) }), _jsx(StructuredListCell, { children: _jsx("div", { style: { position: 'relative' }, children: hasWarning ? (_jsxs(_Fragment, { children: [_jsx("div", { style: {
111
+ }, children: item.name }) }), _jsx(C4StructuredListCell, { children: item.tags && (_jsx(C3ClusterTag, { stage: item.tags })) }), _jsx(C4StructuredListCell, { children: _jsx(ClusterStatusElement, { status: item.status.toLowerCase() }) }), _jsx(C4StructuredListCell, { children: _jsx("div", { style: { position: 'relative' }, children: hasWarning ? (_jsxs(_Fragment, { children: [_jsx("div", { style: {
108
112
  position: 'absolute',
109
113
  top: '50%',
110
114
  transform: 'translateY(-50%)',
@@ -112,7 +116,7 @@ export const C4ConsoleDashboard = ({ orgId, usersAmount, taskUsersAmount, cluste
112
116
  color: 'var(--cds-support-warning)',
113
117
  }, children: _jsx(WarningAltFilled, {}) }), _jsx("span", { style: {
114
118
  paddingInlineStart: '1.1rem',
115
- }, children: item.version })] })) : (item.version) }) }), permissions.showClusterLoad && (_jsxs(StructuredListCell, { children: [hasClusterLoad &&
119
+ }, children: item.version })] })) : (item.version) }) }), permissions.showClusterLoad && (_jsxs(C4StructuredListCell, { children: [hasClusterLoad &&
116
120
  currentClusterLoadConfig &&
117
121
  item.status !== 'Suspended' && (_jsx(C4IconAndTextElement, { text: `${currentClusterLoad.toFixed(2)}%`, color: currentClusterLoadConfig.color, icon: currentClusterLoadConfig.icon, tooltip: {
118
122
  label: clusterLoadTooltip || '',
@@ -160,7 +164,7 @@ export const C4ConsoleDashboard = ({ orgId, usersAmount, taskUsersAmount, cluste
160
164
  e.preventDefault();
161
165
  actions.onNavigateToUsage();
162
166
  }, children: texts.charts.viewUsage }) })] }), processInstancesChartLast14Days.dataPoints.length > 0 ? (_jsx("div", { ref: piCallbackRef, style: { maxHeight: '424px', overflowY: 'auto' }, children: _jsx(ValueMetricsLineChart, { ...processInstancesChartLast14Days, height: totalPiHeight }, `${orgId}-pi`) })) : (_jsx(EmptyState, { iconName: 'ChartLine', text: texts.charts.noUsage }))] }) }) })] }) })] }) }), _jsx(Column, { lg: 5, md: 8, sm: 4, children: _jsx(Grid, { condensed: true, children: _jsx(Column, { lg: 5, md: 8, sm: 4, children: _jsxs(Stack, { gap: 5, children: [_jsx(Tile, { children: _jsxs(Stack, { gap: 6, children: [_jsx("h3", { children: texts.alerts.title }), _jsx(Stack, { gap: 4, children: alerts.length > 0 ? (alerts.map((alert) => {
163
- return (_jsx(ActionableNotification, { role: 'banner', title: alert.text, kind: alert.kind, actionButtonLabel: texts.alerts.inspectButton, lowContrast: true, onActionButtonClick: actions.onNavigateToClusters, inline: true, style: { marginBottom: '.5rem' }, onCloseButtonClick: () => {
167
+ return (_jsx(C4ActionableNotification, { role: 'banner', title: alert.text, kind: alert.kind, actionButtonLabel: texts.alerts.inspectButton, lowContrast: true, onActionButtonClick: actions.onNavigateToClusters, inline: true, style: { marginBottom: '.5rem' }, onCloseButtonClick: () => {
164
168
  actions.onCloseAlert(alert);
165
169
  } }, alert.text));
166
170
  })) : (_jsx(EmptyState, { iconName: 'CheckmarkOutline', text: texts.alerts.noAlertsFound })) })] }) }), _jsx(Tile, { children: _jsxs(Stack, { gap: 6, children: [_jsxs("div", { style: {
@@ -0,0 +1,2 @@
1
+ import type { C4ConsoleDashboardProps } from './c4-console-dashboard.types';
2
+ export declare const defaultProps: C4ConsoleDashboardProps;
@@ -0,0 +1,186 @@
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
+ const mockChartData = [
7
+ { date: '2024-07-01', value: 120, group: 'Production' },
8
+ { date: '2024-08-01', value: 150, group: 'Production' },
9
+ { date: '2024-09-01', value: 180, group: 'Production' },
10
+ { date: '2024-10-01', value: 165, group: 'Production' },
11
+ { date: '2024-11-01', value: 200, group: 'Production' },
12
+ ];
13
+ export const defaultProps = {
14
+ orgId: 'test-org-123',
15
+ usersAmount: 5,
16
+ taskUsersAmount: 3,
17
+ clustersAmount: 2,
18
+ clientsAmount: 4,
19
+ clusters: [
20
+ {
21
+ id: 'cluster-1',
22
+ name: 'Production Cluster',
23
+ status: 'Healthy',
24
+ tags: 'prod',
25
+ version: '8.5.0',
26
+ },
27
+ {
28
+ id: 'cluster-2',
29
+ name: 'Development Cluster',
30
+ status: 'Healthy',
31
+ tags: 'dev',
32
+ version: '8.4.0 - update available',
33
+ },
34
+ ],
35
+ clusterLoadAvailable: true,
36
+ processInstancesChart: {
37
+ title: '',
38
+ theme: 'g90',
39
+ axes: {
40
+ titleBottom: 'Time period',
41
+ titleLeft: 'Instances',
42
+ },
43
+ dataPoints: mockChartData,
44
+ toolbar: {
45
+ enabled: false,
46
+ },
47
+ zoomBar: {
48
+ enabled: false,
49
+ },
50
+ },
51
+ decisionInstancesChart: {
52
+ title: '',
53
+ theme: 'g90',
54
+ axes: {
55
+ titleBottom: 'Time period',
56
+ titleLeft: 'Instances',
57
+ },
58
+ dataPoints: mockChartData,
59
+ toolbar: {
60
+ enabled: false,
61
+ },
62
+ zoomBar: {
63
+ enabled: false,
64
+ },
65
+ },
66
+ activityEntries: [
67
+ {
68
+ date: '2024-11-13 10:30',
69
+ entry: "User john.doe@example.com created cluster 'Production Cluster'",
70
+ },
71
+ {
72
+ date: '2024-11-12 15:45',
73
+ entry: "User jane.smith@example.com updated API client 'api-client-1'",
74
+ },
75
+ {
76
+ date: '2024-11-11 09:15',
77
+ entry: 'User admin@example.com invited user bob@example.com',
78
+ },
79
+ ],
80
+ alerts: [
81
+ {
82
+ text: 'Unhealthy cluster detected',
83
+ kind: 'error',
84
+ key: 'unhealthy',
85
+ },
86
+ {
87
+ text: 'Update available',
88
+ kind: 'info',
89
+ key: 'updateDetected',
90
+ },
91
+ ],
92
+ quickLinks: [
93
+ {
94
+ iconName: 'SoftwareResourceCluster',
95
+ text: 'Introduction to Camunda Console',
96
+ to: 'https://docs.camunda.io',
97
+ },
98
+ {
99
+ iconName: 'Document',
100
+ text: 'Getting started with Camunda 8',
101
+ to: 'https://docs.camunda.io/guides',
102
+ },
103
+ {
104
+ iconName: 'FlowConnection',
105
+ text: 'Model a process',
106
+ to: 'https://modeler.camunda.io',
107
+ },
108
+ ],
109
+ permissions: {
110
+ showUsers: true,
111
+ showClusterLoad: true,
112
+ clusterCreateDisabled: false,
113
+ },
114
+ actions: {
115
+ onFeedbackClick: () => console.log('Feedback clicked'),
116
+ onCloseAlert: (alert) => console.log('Alert closed:', alert.key),
117
+ onCreateCluster: () => console.log('Create cluster clicked'),
118
+ onNavigateToUsers: () => console.log('Navigate to users'),
119
+ onNavigateToTaskUsers: () => console.log('Navigate to task users'),
120
+ onNavigateToClusters: () => console.log('Navigate to clusters'),
121
+ onNavigateToAdminAPIs: () => console.log('Navigate to admin APIs'),
122
+ onNavigateToClusterDetails: (clusterId) => console.log('Navigate to cluster:', clusterId),
123
+ onNavigateToUsage: () => console.log('Navigate to usage'),
124
+ onNavigateToActivity: () => console.log('Navigate to activity'),
125
+ },
126
+ urls: {
127
+ users: '/org/test-org-123/management/users',
128
+ taskUsers: '/org/test-org-123/management/users',
129
+ clusters: '/org/test-org-123/clusters',
130
+ adminAPIs: '/org/test-org-123/management/api',
131
+ clusterDetails: (clusterId) => `/org/test-org-123/cluster/${clusterId}`,
132
+ usage: '/org/test-org-123/management/usage',
133
+ activity: '/org/test-org-123/management/activity',
134
+ },
135
+ texts: {
136
+ feedback: 'Send feedback',
137
+ overview: {
138
+ title: 'Organization overview',
139
+ users: 'Users',
140
+ taskUsers: 'Task users',
141
+ clusters: 'Clusters',
142
+ adminAPIs: 'Admin APIs',
143
+ },
144
+ clusters: {
145
+ title: 'Clusters',
146
+ viewClusters: 'View clusters',
147
+ noClustersFound: 'No clusters found',
148
+ createCluster: 'Create cluster',
149
+ table: {
150
+ name: 'Name',
151
+ tags: 'Tags',
152
+ status: 'Status',
153
+ version: 'Camunda version',
154
+ load: 'Load',
155
+ },
156
+ },
157
+ alerts: {
158
+ title: 'Alerts',
159
+ noAlertsFound: 'No alerts found',
160
+ inspectButton: 'Inspect',
161
+ },
162
+ activity: {
163
+ title: 'Recent activity',
164
+ cta: 'View all activity',
165
+ noActivityFound: 'No activity found',
166
+ },
167
+ quickLinks: {
168
+ title: 'Quick links',
169
+ },
170
+ charts: {
171
+ decisionInstances: 'Decision instances',
172
+ processInstances: 'Process instances',
173
+ viewUsage: 'View usage',
174
+ noUsage: 'No usage available',
175
+ tooltipText: 'Chart only displays combined production cluster data',
176
+ },
177
+ },
178
+ getClusterLoad: (clusterId) => {
179
+ if (clusterId === 'cluster-1')
180
+ return 45.67;
181
+ if (clusterId === 'cluster-2')
182
+ return 78.9;
183
+ return undefined;
184
+ },
185
+ clusterLoadTooltip: 'Current cluster load percentage',
186
+ };
@@ -4,8 +4,8 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
4
4
  * under one or more contributor license agreements. Licensed under a commercial license.
5
5
  * You may not use this file except in compliance with the commercial license.
6
6
  */
7
- import { Button } from '@carbon/react';
8
7
  import * as Icons from '@carbon/react/icons/index.esm.js';
8
+ import { Button } from '../../../ui/index.js';
9
9
  export const EmptyState = ({ iconName, text, action }) => {
10
10
  const Icon = Icons[iconName];
11
11
  return (_jsx("div", { style: { flex: 1, height: '100%' }, children: _jsxs("div", { style: {
@@ -17,5 +17,5 @@ export const EmptyState = ({ iconName, text, action }) => {
17
17
  alignItems: 'center',
18
18
  gap: '8px',
19
19
  color: 'var(--cds-text-secondary)',
20
- }, children: [_jsx("div", { children: _jsx(Icon, { height: '24px', width: '24px', fill: 'var(--cds-text-secondary)' }) }), _jsx("p", { children: text }), action?.text && (_jsx(Button, { size: 'sm', onClick: action.onClick, disabled: action?.disabled ?? false, children: action.text }))] }) }));
20
+ }, children: [_jsx("div", { children: _jsx(Icon, { height: '24px', width: '24px', fill: 'currentColor' }) }), _jsx("p", { children: text }), action?.text && (_jsx(Button, { size: 'sm', onClick: action.onClick, disabled: action?.disabled ?? false, children: action.text }))] }) }));
21
21
  };
@@ -0,0 +1,2 @@
1
+ import type { C4CreateAlertModalHandle, C4CreateAlertModalProps } from './c4-create-alert-modal.types';
2
+ export declare const C4CreateAlertModal: import("react").ForwardRefExoticComponent<C4CreateAlertModalProps & import("react").RefAttributes<C4CreateAlertModalHandle>>;
@@ -0,0 +1,132 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } 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 { Form, PasswordInput } from '@carbon/react';
8
+ import { forwardRef, useCallback, useImperativeHandle, useState, } from 'react';
9
+ import { Checkbox, Modal, Stack, TextInput } from '../../ui/index.js';
10
+ import { useRadioFamily } from '../../ui/families.js';
11
+ import { C4ActionableNotification } from '../c4-actionable-notification/c4-actionable-notification.js';
12
+ import { C4InlineNotification } from '../c4-inline-notification/c4-inline-notification.js';
13
+ // Helper to translate with fallback
14
+ function safeTranslate(translateFn, key, fallback, options) {
15
+ try {
16
+ const result = translateFn(key, options);
17
+ // If i18next returns the key unchanged, use fallback
18
+ if (result === key) {
19
+ return fallback;
20
+ }
21
+ return result;
22
+ }
23
+ catch {
24
+ return fallback;
25
+ }
26
+ }
27
+ export const C4CreateAlertModal = forwardRef(({ t, userEmail, docsAlertsUrl, onNavigate, onCreateAlert, onCancel, onSubmitStart, onSubmitError, }, ref) => {
28
+ const { RadioButton, RadioButtonGroup } = useRadioFamily();
29
+ const [isOpen, setIsOpen] = useState(false);
30
+ const [busy, setBusy] = useState(false);
31
+ const [error, setError] = useState('');
32
+ const [reportType, setReportType] = useState('Email');
33
+ const [webhookUrl, setWebhookUrl] = useState('');
34
+ const [wantsHmac, setWantsHmac] = useState(false);
35
+ const [hmacSecret, setHmacSecret] = useState('');
36
+ const [urlInvalid, setUrlInvalid] = useState(false);
37
+ const [urlInvalidText, setUrlInvalidText] = useState('');
38
+ const [hmacInvalid, setHmacInvalid] = useState(false);
39
+ const [hmacInvalidText, setHmacInvalidText] = useState('');
40
+ const emailDestination = userEmail?.includes('@')
41
+ ? ` (to ${userEmail})`
42
+ : '';
43
+ const close = useCallback(() => {
44
+ setBusy(false);
45
+ setIsOpen(false);
46
+ }, []);
47
+ const open = useCallback(() => {
48
+ setError('');
49
+ setReportType('Email');
50
+ setWebhookUrl('');
51
+ setWantsHmac(false);
52
+ setHmacSecret('');
53
+ setUrlInvalid(false);
54
+ setUrlInvalidText('');
55
+ setHmacInvalid(false);
56
+ setHmacInvalidText('');
57
+ setBusy(false);
58
+ setIsOpen(true);
59
+ }, []);
60
+ useImperativeHandle(ref, () => ({
61
+ open,
62
+ close,
63
+ }), [open, close]);
64
+ return (_jsx(Modal, { open: isOpen, modalHeading: safeTranslate(t, 'alerts:create.heading', 'Create process incident alert'), primaryButtonText: safeTranslate(t, 'alerts:create.buttons.primary', 'Create alert'), secondaryButtonText: safeTranslate(t, 'alerts:create.buttons.secondary', 'Cancel'), primaryButtonDisabled: busy, onRequestClose: () => {
65
+ onCancel?.();
66
+ close();
67
+ }, onRequestSubmit: () => {
68
+ void (async () => {
69
+ onSubmitStart?.();
70
+ setBusy(true);
71
+ setError('');
72
+ setUrlInvalid(false);
73
+ setUrlInvalidText('');
74
+ setHmacInvalid(false);
75
+ setHmacInvalidText('');
76
+ // Validate webhook inputs
77
+ if (reportType === 'Webhook') {
78
+ if (!webhookUrl) {
79
+ setUrlInvalid(true);
80
+ setUrlInvalidText(safeTranslate(t, 'alerts:formValidation.urlEmpty', 'You must provide a URL'));
81
+ setBusy(false);
82
+ return;
83
+ }
84
+ if (wantsHmac && !hmacSecret) {
85
+ setHmacInvalid(true);
86
+ setHmacInvalidText(safeTranslate(t, 'alerts:formValidation.hmacSecretEmpty', 'You must provide the HMAC secret'));
87
+ setBusy(false);
88
+ return;
89
+ }
90
+ }
91
+ try {
92
+ await onCreateAlert({
93
+ reportType,
94
+ webhookUrl: reportType === 'Webhook' ? webhookUrl : undefined,
95
+ hmacSecret: reportType === 'Webhook' && wantsHmac
96
+ ? hmacSecret
97
+ : undefined,
98
+ });
99
+ close();
100
+ }
101
+ catch (submitError) {
102
+ setError(submitError instanceof Error ? submitError.message : 'Failed');
103
+ onSubmitError?.(submitError);
104
+ }
105
+ finally {
106
+ setBusy(false);
107
+ }
108
+ })();
109
+ }, children: _jsx(Form, { onSubmit: (e) => {
110
+ e.preventDefault();
111
+ }, children: _jsxs(Stack, { gap: 4, children: [error && (_jsx(C4InlineNotification, { kind: 'error', title: safeTranslate(t, 'alerts:create.error.generic', "We're having trouble creating the alert"), subtitle: error, lowContrast: true, hideCloseButton: true })), _jsxs(RadioButtonGroup, { name: 'alert-create-report-type', legendText: safeTranslate(t, 'alerts:create.fields.reportType.label', 'Delivery method'), valueSelected: reportType, orientation: 'vertical', onChange: (value) => {
112
+ setReportType(value);
113
+ setUrlInvalid(false);
114
+ setUrlInvalidText('');
115
+ setHmacInvalid(false);
116
+ setHmacInvalidText('');
117
+ }, children: [_jsx(RadioButton, { labelText: `${safeTranslate(t, 'alerts:create.fields.reportType.options.email', 'Email')}${emailDestination}`, value: 'Email', id: 'alert-create-email-radio' }), _jsx(RadioButton, { labelText: safeTranslate(t, 'alerts:create.fields.reportType.options.webhook', 'Webhook'), value: 'Webhook', id: 'alert-create-webhook-radio' })] }), reportType === 'Webhook' && (_jsxs(_Fragment, { children: [_jsx(TextInput, { id: 'alert-create-webhook-url', labelText: safeTranslate(t, 'alerts:create.fields.webhookUrl.label', 'Payload URL'), value: webhookUrl, maxLength: 300, invalid: urlInvalid, invalidText: urlInvalidText, onChange: (event) => {
118
+ setWebhookUrl(event.target.value);
119
+ setUrlInvalid(false);
120
+ setUrlInvalidText('');
121
+ } }), _jsxs("div", { children: [_jsx("fieldset", { className: 'cds--fieldset', children: _jsx("legend", { className: 'cds--label', children: safeTranslate(t, 'alerts:create.fields.webhookAuth.intro', 'Webhook security options') }) }), _jsx(Checkbox, { id: 'alert-create-hmac-checkbox', labelText: safeTranslate(t, 'alerts:create.fields.webhookAuth.label', 'Enable HMAC'), checked: wantsHmac, onChange: (event) => setWantsHmac(event.target.checked) })] }), wantsHmac && (_jsxs(_Fragment, { children: [_jsx(PasswordInput, { id: 'alert-create-hmac-secret', labelText: safeTranslate(t, 'alerts:create.fields.webhookAuth.secret.label', 'Secret'), value: hmacSecret, invalid: hmacInvalid, invalidText: hmacInvalidText, onChange: (event) => {
122
+ setHmacSecret(event.target.value);
123
+ setHmacInvalid(false);
124
+ setHmacInvalidText('');
125
+ } }), _jsx(C4ActionableNotification, { appearance: 'banner', lowContrast: true, kind: 'info', title: '', subtitle: safeTranslate(t, 'alerts:create.fields.webhookAuth.infoBannerForHmac.text', 'We will generate the SHA-256 hash of the request body using your HMAC secret and include it in the HTTP header X-Camunda-Signature-256.'), actionButtonLabel: safeTranslate(t, 'alerts:create.fields.webhookAuth.infoBannerForHmac.actionButtonLabel', 'Learn more'), onActionButtonClick: () => {
126
+ onNavigate?.({
127
+ kind: 'openUrl',
128
+ url: docsAlertsUrl,
129
+ });
130
+ } })] }))] }))] }) }) }));
131
+ });
132
+ C4CreateAlertModal.displayName = 'C4CreateAlertModal';