@camunda/ccma-saas-frontend 0.0.45 → 0.1.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 (241) 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/elements/cluster-reservations.js +9 -14
  19. package/lib/esm/components/c4-billing-page/elements/current-usage-metrics.js +2 -1
  20. package/lib/esm/components/c4-billing-page/elements/usage-alerts.js +3 -8
  21. package/lib/esm/components/c4-billing-page/elements/value-metric.js +2 -1
  22. package/lib/esm/components/c4-bottom-links/c4-bottom-links.js +1 -6
  23. package/lib/esm/components/c4-breadcrumb/c4-breadcrumb.js +3 -6
  24. package/lib/esm/components/c4-charts-dashboard/c4-charts-dashboard.js +1 -1
  25. package/lib/esm/components/c4-charts-dashboard/elements/alluvial-chart.js +1 -1
  26. package/lib/esm/components/c4-charts-dashboard/elements/bar-chart.js +1 -1
  27. package/lib/esm/components/c4-charts-dashboard/elements/line-chart.js +1 -1
  28. package/lib/esm/components/c4-cluster-byom-clients/c4-cluster-byom-clients.js +6 -10
  29. package/lib/esm/components/c4-cluster-client-credentials/c4-cluster-client-credentials.js +8 -3
  30. package/lib/esm/components/c4-cluster-client-credentials-identity/c4-cluster-client-credentials-identity.js +8 -3
  31. package/lib/esm/components/c4-cluster-details-activity/c4-cluster-details-activity.js +6 -5
  32. package/lib/esm/components/c4-cluster-details-alerts/c4-cluster-details-alerts.js +12 -14
  33. package/lib/esm/components/c4-cluster-details-clients/c4-cluster-details-clients.js +6 -10
  34. package/lib/esm/components/c4-cluster-details-connector-secrets/c4-cluster-details-connector-secrets.js +8 -11
  35. package/lib/esm/components/c4-cluster-details-encryption/c4-cluster-details-encryption.js +9 -4
  36. package/lib/esm/components/c4-cluster-details-hot-backups/c4-cluster-details-hot-backups.js +12 -8
  37. package/lib/esm/components/c4-cluster-details-hot-backups-restore/c4-cluster-details-hot-backups-restore.js +3 -2
  38. package/lib/esm/components/c4-cluster-details-ip-whitelist/c4-cluster-details-ip-whitelist.js +7 -10
  39. package/lib/esm/components/c4-cluster-details-secure-connectivity/c4-cluster-details-secure-connectivity.js +15 -21
  40. package/lib/esm/components/c4-cluster-list/c4-cluster-list.d.ts +1 -1
  41. package/lib/esm/components/c4-cluster-list/c4-cluster-list.js +19 -5
  42. package/lib/esm/components/c4-cluster-list/c4-cluster-list.types.d.ts +4 -0
  43. package/lib/esm/components/c4-cluster-overview/applications.js +2 -1
  44. package/lib/esm/components/c4-cluster-overview/c4-cluster-overview.js +4 -3
  45. package/lib/esm/components/c4-cluster-overview/cluster-details.js +12 -10
  46. package/lib/esm/components/c4-cluster-overview/cluster-load.js +1 -1
  47. package/lib/esm/components/c4-cluster-settings/c4-cluster-settings.d.ts +1 -1
  48. package/lib/esm/components/c4-cluster-settings/c4-cluster-settings.js +6 -8
  49. package/lib/esm/components/c4-cluster-settings/c4-cluster-settings.types.d.ts +4 -0
  50. package/lib/esm/components/c4-cluster-settings/elements/danger-zone.js +1 -6
  51. package/lib/esm/components/c4-cluster-settings/elements/optimize-filtering-settings.d.ts +17 -0
  52. package/lib/esm/components/c4-cluster-settings/elements/optimize-filtering-settings.js +75 -0
  53. package/lib/esm/components/c4-cluster-settings/elements/resource-based-authorizations.js +2 -7
  54. package/lib/esm/components/c4-cluster-settings/elements/settings-tile.js +1 -6
  55. package/lib/esm/components/c4-cluster-settings/elements/tasklist-mode-toggle.js +1 -1
  56. package/lib/esm/components/c4-cluster-tag-selector/c4-cluster-tag-selector.js +4 -2
  57. package/lib/esm/components/c4-clusters-empty-state/c4-clusters-empty-state.js +18 -14
  58. package/lib/esm/components/c4-clusters-empty-state/c4-clusters-empty-state.spec.d.ts +1 -0
  59. package/lib/esm/components/c4-clusters-empty-state/c4-clusters-empty-state.spec.js +40 -0
  60. package/lib/esm/components/c4-clusters-empty-state/c4-clusters-empty-state.types.d.ts +2 -0
  61. package/lib/esm/components/c4-clusters-trial-notification/c4-clusters-trial-notification.js +4 -9
  62. package/lib/esm/components/c4-clusters-trial-notification/c4-clusters-trial-notification.types.d.ts +2 -0
  63. package/lib/esm/components/c4-console-dashboard/c4-console-dashboard.js +11 -7
  64. package/lib/esm/components/c4-console-dashboard/elements/empty-state.js +2 -2
  65. package/lib/esm/components/c4-create-cluster/c4-create-cluster.js +44 -15
  66. package/lib/esm/components/c4-create-cluster-api-client-modal/c4-create-cluster-api-client-modal.js +4 -2
  67. package/lib/esm/components/c4-create-connector-secret-modal/c4-create-connector-secret-modal.js +4 -2
  68. package/lib/esm/components/c4-create-console-api-client-modal/c4-create-console-api-client-modal.js +2 -1
  69. package/lib/esm/components/c4-create-trial-organization-modal/c4-create-trial-organization-modal.js +2 -1
  70. package/lib/esm/components/c4-dashboard-first-launch/c4-dashboard-first-launch.js +1 -6
  71. package/lib/esm/components/c4-data-table/c4-data-table-skeleton.d.ts +15 -0
  72. package/lib/esm/components/c4-data-table/c4-data-table-skeleton.js +26 -0
  73. package/lib/esm/components/c4-data-table/c4-data-table.d.ts +3 -0
  74. package/lib/esm/components/c4-data-table/c4-data-table.js +194 -0
  75. package/lib/esm/components/c4-data-table/c4-data-table.spec.d.ts +1 -0
  76. package/lib/esm/components/c4-data-table/c4-data-table.spec.js +71 -0
  77. package/lib/esm/components/c4-delete-organization-modal/c4-delete-organization-modal.js +3 -2
  78. package/lib/esm/components/c4-empty-state/c4-empty-state.d.ts +47 -0
  79. package/lib/esm/components/c4-empty-state/c4-empty-state.js +33 -0
  80. package/lib/esm/components/c4-extend-trial-modal/c4-extend-trial-modal.d.ts +3 -0
  81. package/lib/esm/components/c4-extend-trial-modal/c4-extend-trial-modal.js +51 -0
  82. package/lib/esm/components/c4-extend-trial-modal/c4-extend-trial-modal.spec.d.ts +1 -0
  83. package/lib/esm/components/c4-extend-trial-modal/c4-extend-trial-modal.spec.js +33 -0
  84. package/lib/esm/components/c4-extend-trial-modal/c4-extend-trial-modal.types.d.ts +8 -0
  85. package/lib/esm/components/c4-extend-trial-modal/c4-extend-trial-modal.types.js +1 -0
  86. package/lib/esm/components/c4-external-link/c4-external-link.js +1 -6
  87. package/lib/esm/components/c4-feedback-modal/c4-feedback-modal.d.ts +40 -0
  88. package/lib/esm/components/c4-feedback-modal/c4-feedback-modal.js +109 -0
  89. package/lib/esm/components/c4-help-center/c4-help-center.d.ts +50 -0
  90. package/lib/esm/components/c4-help-center/c4-help-center.js +39 -0
  91. package/lib/esm/components/c4-inline-notification/c4-inline-notification.d.ts +15 -0
  92. package/lib/esm/components/c4-inline-notification/c4-inline-notification.js +37 -0
  93. package/lib/esm/components/c4-invite-user-to-organization-modal/c4-invite-user-to-organization-modal.js +4 -3
  94. package/lib/esm/components/c4-job-dashboard-details-page/c4-job-dashboard-details-page.js +4 -2
  95. package/lib/esm/components/c4-job-dashboard-details-page/elements/c4-job-dashboard-chart-heading.js +1 -1
  96. package/lib/esm/components/c4-job-dashboard-details-page/elements/c4-job-dashboard-error-table.js +3 -8
  97. package/lib/esm/components/c4-job-dashboard-details-page/elements/c4-job-dashboard-time-chart.js +1 -1
  98. package/lib/esm/components/c4-job-dashboard-details-page/elements/c4-job-dashboard-worker-table.js +3 -3
  99. package/lib/esm/components/c4-job-dashboard-entry-point/c4-job-dashboard-entry-point.js +2 -1
  100. package/lib/esm/components/c4-job-dashboard-overview-page/c4-job-dashboard-overview.js +43 -46
  101. package/lib/esm/components/c4-job-dashboard-shared/c4-background-fetching-indicator.js +1 -6
  102. package/lib/esm/components/c4-job-dashboard-shared/c4-job-dashboard-error-handler.js +1 -1
  103. package/lib/esm/components/c4-job-dashboard-shared/c4-job-dashboard-table-heading-with-tooltip.js +1 -1
  104. package/lib/esm/components/c4-job-dashboard-shared/c4-job-dashboard-time-range-dropdown.js +1 -1
  105. package/lib/esm/components/c4-leave-organization-modal/c4-leave-organization-modal.js +1 -6
  106. package/lib/esm/components/c4-link-button/c4-link-button.js +1 -6
  107. package/lib/esm/components/c4-llm-usage-meter/c4-llm-usage-meter.js +1 -1
  108. package/lib/esm/components/c4-management-activity/c4-management-activity.js +7 -9
  109. package/lib/esm/components/c4-management-api/c4-management-api.js +9 -11
  110. package/lib/esm/components/c4-management-overview/c4-management-overview.js +8 -12
  111. package/lib/esm/components/c4-management-settings/c4-management-settings.js +9 -11
  112. package/lib/esm/components/c4-management-users/c4-management-users.js +4 -9
  113. package/lib/esm/components/c4-multi-step-modal/c4-multi-step-modal.js +4 -2
  114. package/lib/esm/components/c4-multi-step-modal-ugly/c4-multi-step-modal-ugly.js +4 -2
  115. package/lib/esm/components/c4-navigation/c4-navigation.d.ts +55 -0
  116. package/lib/esm/components/c4-navigation/c4-navigation.js +175 -0
  117. package/lib/esm/components/c4-old-dashboard/c4-old-dashboard.js +2 -1
  118. package/lib/esm/components/c4-page-layout/c4-page-layout.d.ts +13 -0
  119. package/lib/esm/components/c4-page-layout/c4-page-layout.js +23 -0
  120. package/lib/esm/components/c4-page-template/c4-page-template.js +14 -3
  121. package/lib/esm/components/c4-permission-error-page/c4-permission-error-page.js +1 -1
  122. package/lib/esm/components/c4-pricing/c4-pricing.js +3 -7
  123. package/lib/esm/components/c4-pricing-card/c4-pricing-card.js +1 -1
  124. package/lib/esm/components/c4-rename-organization-modal/c4-rename-organization-modal.js +1 -1
  125. package/lib/esm/components/c4-search/c4-search-results.js +2 -1
  126. package/lib/esm/components/c4-selectable-tile/c4-selectable-tile.d.ts +20 -0
  127. package/lib/esm/components/c4-selectable-tile/c4-selectable-tile.js +41 -0
  128. package/lib/esm/components/c4-sm-cluster-details/automation-components.js +2 -1
  129. package/lib/esm/components/c4-sm-cluster-details/c4-sm-cluster-details.js +1 -6
  130. package/lib/esm/components/c4-sm-cluster-details/custom-properties.js +4 -8
  131. package/lib/esm/components/c4-sm-cluster-details/details.js +5 -4
  132. package/lib/esm/components/c4-sm-cluster-details/zeebe-components.js +2 -1
  133. package/lib/esm/components/c4-sm-dashboard/c4-sm-dashboard.js +1 -1
  134. package/lib/esm/components/c4-sm-dashboard/c4-sm-dashboard.types.d.ts +1 -1
  135. package/lib/esm/components/c4-sm-dashboard/cluster-tile.js +2 -1
  136. package/lib/esm/components/c4-sm-dashboard/component-tile.js +2 -1
  137. package/lib/esm/components/c4-sm-dashboard/explore.js +1 -6
  138. package/lib/esm/components/c4-sm-dashboard/overview.js +1 -1
  139. package/lib/esm/components/c4-sm-dashboard/usage-tile.js +2 -1
  140. package/lib/esm/components/c4-stat/c4-stat.js +1 -6
  141. package/lib/esm/components/c4-stateful-button/c4-stateful-button.js +2 -1
  142. package/lib/esm/components/c4-structured-list/c4-structured-list.d.ts +21 -0
  143. package/lib/esm/components/c4-structured-list/c4-structured-list.js +75 -0
  144. package/lib/esm/components/c4-tabs/c4-tabs.js +2 -1
  145. package/lib/esm/components/c4-telemetry-page/c4-telemetry-page.js +6 -2
  146. package/lib/esm/components/c4-telemetry-page/component-metrics.js +1 -6
  147. package/lib/esm/components/c4-telemetry-page/telemetry-for-component.js +2 -1
  148. package/lib/esm/components/c4-telemetry-teaser-page/c4-telemetry-teaser-page.js +1 -1
  149. package/lib/esm/components/c4-theme-switcher/c4-theme-switcher.js +1 -1
  150. package/lib/esm/components/c4-tile-with-title-and-action/c4-tile-with-title-and-action.js +1 -1
  151. package/lib/esm/components/c4-toast-notification/c4-toast-notification.d.ts +14 -0
  152. package/lib/esm/components/c4-toast-notification/c4-toast-notification.js +27 -0
  153. package/lib/esm/components/c4-toggle/c4-toggle.js +6 -8
  154. package/lib/esm/components/c4-tutorial-tile/c4-tutorial-tile.js +1 -1
  155. package/lib/esm/components/c4-usage-alert-update-modal/c4-usage-alert-update-modal.js +4 -2
  156. package/lib/esm/components/c4-usage-history/c4-usage-history.js +5 -3
  157. package/lib/esm/components/c4-usage-history/elements/usage-history-charts.js +1 -1
  158. package/lib/esm/components/c4-usage-metrics-per-cluster/c4-usage-metrics-per-cluster.js +8 -7
  159. package/lib/esm/components/c4-user-details/c4-user-details.js +2 -2
  160. package/lib/esm/components/c4-user-details/tabs/authorized-resources.js +1 -1
  161. package/lib/esm/components/c4-user-details/tabs/details.js +6 -10
  162. package/lib/esm/components/c4-user-details/tabs/roles.js +3 -8
  163. package/lib/esm/i18n/c4-console-i18n.js +12 -0
  164. package/lib/esm/i18n/en/modals/clusters.json +0 -8
  165. package/lib/esm/i18n/en/pages/clusterdetails.json +5 -1
  166. package/lib/esm/i18n/en/pages/clusters.json +5 -1
  167. package/lib/esm/i18n/en/pages/orgmanagement.json +3 -1
  168. package/lib/esm/index.d.ts +17 -0
  169. package/lib/esm/index.js +13 -0
  170. package/lib/esm/runtime/c4-console-authz.d.ts +1 -0
  171. package/lib/esm/runtime/c4-console-authz.js +2 -1
  172. package/lib/esm/runtime/c4-console-authz.spec.js +3 -3
  173. package/lib/esm/runtime/c4-console-runtime-context.d.ts +8 -1
  174. package/lib/esm/runtime/c4-console-runtime-context.js +50 -1
  175. package/lib/esm/runtime/c4-console-runtime.types.d.ts +8 -0
  176. package/lib/esm/ui/c4-modal-dialog.d.ts +14 -0
  177. package/lib/esm/ui/c4-modal-dialog.js +35 -0
  178. package/lib/esm/ui/families.d.ts +42 -0
  179. package/lib/esm/ui/families.js +46 -0
  180. package/lib/esm/ui/index.d.ts +31 -0
  181. package/lib/esm/ui/index.js +94 -0
  182. package/lib/esm/ui/switchable.d.ts +14 -0
  183. package/lib/esm/ui/switchable.js +27 -0
  184. package/lib/esm/ui/tabs.d.ts +21 -0
  185. package/lib/esm/ui/tabs.js +27 -0
  186. package/lib/esm/widgets/cluster-client-details/c4-cluster-client-details-app.js +7 -5
  187. package/lib/esm/widgets/cluster-details/c4-cluster-details-app.js +18 -3
  188. package/lib/esm/widgets/cluster-details/c4-cluster-details-page.js +1 -1
  189. package/lib/esm/widgets/cluster-details/c4-cluster-details-page.spec.js +2 -0
  190. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-alerts-tab.js +10 -6
  191. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-byom-clients-tab.js +5 -3
  192. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-clients-tab.js +7 -5
  193. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-connector-secrets-tab.js +10 -6
  194. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-hot-backups-tab.d.ts +7 -0
  195. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-hot-backups-tab.js +8 -3
  196. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-hot-backups-tab.spec.js +49 -1
  197. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-ip-whitelist-tab.js +7 -5
  198. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-overview-tab.js +54 -21
  199. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-overview-tab.spec.js +96 -5
  200. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-secure-connectivity-tab.js +12 -9
  201. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-settings-tab.js +58 -4
  202. package/lib/esm/widgets/clusters/c4-clusters-page.d.ts +1 -1
  203. package/lib/esm/widgets/clusters/c4-clusters-page.js +276 -40
  204. package/lib/esm/widgets/clusters/c4-clusters-page.spec.js +220 -0
  205. package/lib/esm/widgets/clusters/c4-clusters-page.types.d.ts +3 -0
  206. package/lib/esm/widgets/connector-management/c4-connector-management-executable-details-page.js +1 -1
  207. package/lib/esm/widgets/connector-management/c4-connector-management-executables-table-page.js +3 -2
  208. package/lib/esm/widgets/connector-management/c4-connector-management-outbound-details-page.d.ts +4 -0
  209. package/lib/esm/widgets/connector-management/c4-connector-management-outbound-details-page.js +59 -0
  210. package/lib/esm/widgets/connector-management/c4-connector-management-outbound-details-page.types.d.ts +18 -0
  211. package/lib/esm/widgets/connector-management/c4-connector-management-outbound-details-page.types.js +6 -0
  212. package/lib/esm/widgets/connector-management/c4-connector-management-page.d.ts +1 -1
  213. package/lib/esm/widgets/connector-management/c4-connector-management-page.js +38 -5
  214. package/lib/esm/widgets/connector-management/c4-connector-management-page.spec.js +54 -0
  215. package/lib/esm/widgets/connector-management/c4-connector-management-page.types.d.ts +11 -0
  216. package/lib/esm/widgets/connector-management/c4-connector-management.shared.d.ts +1 -0
  217. package/lib/esm/widgets/connector-management/c4-connector-management.shared.js +10 -2
  218. package/lib/esm/widgets/create-cluster/c4-create-cluster-page.js +1 -1
  219. package/lib/esm/widgets/job-worker/c4-job-worker.helpers.js +14 -2
  220. package/lib/esm/widgets/management/c4-management-app.d.ts +1 -1
  221. package/lib/esm/widgets/management/c4-management-app.js +57 -4
  222. package/lib/esm/widgets/management/c4-management-app.spec.js +141 -1
  223. package/lib/esm/widgets/management/c4-management-app.types.d.ts +5 -0
  224. package/lib/esm/widgets/management/c4-management-page.js +1 -6
  225. package/lib/esm/widgets/management/tabs/c4-management-api-tab.js +4 -2
  226. package/lib/esm/widgets/management/tabs/c4-management-billing-tab.js +1 -1
  227. package/lib/esm/widgets/management/tabs/c4-management-groups-tab.js +1 -1
  228. package/lib/esm/widgets/management/tabs/c4-management-overview-tab.d.ts +2 -1
  229. package/lib/esm/widgets/management/tabs/c4-management-overview-tab.js +10 -3
  230. package/lib/esm/widgets/management/tabs/c4-management-pricing-tab.js +2 -1
  231. package/lib/esm/widgets/management/tabs/c4-management-settings-tab.js +1 -1
  232. package/lib/esm/widgets/management/tabs/c4-management-usage-tab.d.ts +1 -1
  233. package/lib/esm/widgets/management/tabs/c4-management-usage-tab.js +13 -11
  234. package/lib/esm/widgets/management/tabs/c4-management-users-tab.js +47 -5
  235. package/lib/esm/widgets/management/tabs/c4-management-users-tab.spec.js +98 -0
  236. package/lib/esm/widgets/use-extend-trial.d.ts +8 -0
  237. package/lib/esm/widgets/use-extend-trial.js +36 -0
  238. package/lib/esm/widgets/use-extend-trial.spec.d.ts +1 -0
  239. package/lib/esm/widgets/use-extend-trial.spec.js +79 -0
  240. package/lib/esm/widgets/user-details/c4-user-details-page.js +5 -4
  241. package/package.json +21 -14
@@ -4,12 +4,14 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
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 { C3ClusterTag, C3DataTable, } from '@camunda/camunda-composite-components';
8
- import { Button, InlineNotification, Link } from '@carbon/react';
7
+ import { C3ClusterTag, } from '@camunda/camunda-composite-components';
9
8
  import { Add, WarningAltFilled } from '@carbon/react/icons/index.esm.js';
10
9
  import { useCallback, useEffect, useRef, } from 'react';
10
+ import { Button, Link } from '../../ui/index.js';
11
11
  import { ClusterStatusElement, normalizeClusterStatus, } from '../c4-cluster-overview/applications.js';
12
12
  import { C4IconAndTextElement, getClusterLoadConfig, } from '../c4-cluster-overview/c4-cluster-overview.js';
13
+ import { C4DataTable } from '../c4-data-table/c4-data-table.js';
14
+ import { C4InlineNotification } from '../c4-inline-notification/c4-inline-notification.js';
13
15
  import { C4LinkButton } from '../c4-link-button/c4-link-button.js';
14
16
  import { C4PageTemplate } from '../c4-page-template/c4-page-template.js';
15
17
  const DEFAULT_PAGE_SIZE = 10;
@@ -25,7 +27,7 @@ function isPlainLeftClick(event) {
25
27
  !event.ctrlKey &&
26
28
  !event.shiftKey);
27
29
  }
28
- export const C4ClusterList = ({ clusters, loading, urls, permissions, onNavigate, onDeleteCluster, onAssignTag, onWakeCluster, trialNotification, encryptionNotification, clusterCapMessage, emptyStateContent, translations, isClusterPaused, isRunningOnUnsupportedGeneration, }) => {
30
+ export const C4ClusterList = ({ clusters, loading, urls, permissions, onNavigate, onDeleteCluster, onAssignTag, onWakeCluster, onFailoverCluster, trialNotification, encryptionNotification, clusterCapMessage, emptyStateContent, translations, isClusterPaused, isMultiRegionCluster, isRunningOnUnsupportedGeneration, }) => {
29
31
  const tableContainerRef = useRef(null);
30
32
  const stableClustersRef = useRef(clusters.map((cluster) => ({ ...cluster })));
31
33
  const selectedPageRef = useRef(1);
@@ -307,6 +309,18 @@ export const C4ClusterList = ({ clusters, loading, urls, permissions, onNavigate
307
309
  onClick: (row) => onWakeCluster(row.id),
308
310
  visible: (row) => isClusterPaused(row.id) && permissions.canWakeCluster,
309
311
  },
312
+ ...(onFailoverCluster && isMultiRegionCluster
313
+ ? [
314
+ {
315
+ id: 'failover-cluster',
316
+ label: translations.overflowMenu.failover ?? 'Failover',
317
+ kind: 'ghost',
318
+ onClick: (row) => onFailoverCluster(row.id),
319
+ visible: (row) => (permissions.canFailoverCluster ?? false) &&
320
+ isMultiRegionCluster(row.id),
321
+ },
322
+ ]
323
+ : []),
310
324
  {
311
325
  id: 'delete-cluster',
312
326
  label: translations.overflowMenu.delete,
@@ -325,11 +339,11 @@ export const C4ClusterList = ({ clusters, loading, urls, permissions, onNavigate
325
339
  paddingBlockEnd: 'var(--cds-spacing-07)',
326
340
  }, children: [_jsx("p", { style: { color: 'var(--cds-text-secondary)' }, children: translations.emptyState.noClusters }), permissions.canCreateCluster && (_jsx("div", { style: { marginTop: 'var(--cds-spacing-05)' }, children: _jsx(Button, { kind: 'primary', onClick: () => onNavigate(urls.createCluster), disabled: permissions.createClusterButtonDisabled, children: translations.createButton }) }))] })));
327
341
  }
328
- return (_jsx("div", { ref: tableContainerRef, children: _jsx(C3DataTable, { headers: headerData, isLoading: loading, toolbar: toolbar, actions: actions, data: stableClusters, queryPrefix: 'cluster-list' }) }));
342
+ return (_jsx("div", { ref: tableContainerRef, children: _jsx(C4DataTable, { headers: headerData, isLoading: loading, toolbar: toolbar, actions: actions, data: stableClusters, queryPrefix: 'cluster-list' }) }));
329
343
  };
330
344
  return (_jsxs(_Fragment, { children: [trialNotification, _jsxs(C4PageTemplate, { loading: loading, header: {
331
345
  title: translations.title,
332
- }, children: [encryptionNotification && (_jsx(InlineNotification, { style: {
346
+ }, children: [encryptionNotification && (_jsx(C4InlineNotification, { style: {
333
347
  maxWidth: '100%',
334
348
  width: '100%',
335
349
  marginBottom: '24px',
@@ -21,6 +21,7 @@ export interface ClusterListPermissions {
21
21
  canUpdateTag: boolean;
22
22
  canSeeClusterLoad: boolean;
23
23
  canWakeCluster: boolean;
24
+ canFailoverCluster?: boolean;
24
25
  createClusterButtonDisabled: boolean;
25
26
  }
26
27
  export interface ClusterListNotification {
@@ -40,6 +41,7 @@ export interface C4ClusterListProps {
40
41
  onDeleteCluster: (clusterId: string) => void;
41
42
  onAssignTag: (clusterId: string) => void;
42
43
  onWakeCluster: (clusterId: string) => void;
44
+ onFailoverCluster?: (clusterId: string) => void;
43
45
  trialNotification?: React.ReactNode;
44
46
  encryptionNotification?: ClusterListNotification;
45
47
  clusterCapMessage?: string;
@@ -63,6 +65,7 @@ export interface C4ClusterListProps {
63
65
  overflowMenu: {
64
66
  delete: string;
65
67
  resume: string;
68
+ failover?: string;
66
69
  };
67
70
  tags: {
68
71
  addLabel: string;
@@ -72,5 +75,6 @@ export interface C4ClusterListProps {
72
75
  };
73
76
  };
74
77
  isClusterPaused: (clusterId: string) => boolean;
78
+ isMultiRegionCluster?: (clusterId: string) => boolean;
75
79
  isRunningOnUnsupportedGeneration: (clusterId: string) => boolean;
76
80
  }
@@ -4,9 +4,10 @@ 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 { preview__IconIndicator as IconIndicator, Layer, Link, Loading, Stack, Tile, Tooltip, } from '@carbon/react';
7
+ import { preview__IconIndicator as IconIndicator, Layer } from '@carbon/react';
8
8
  import { ArrowRight, CheckmarkFilled, Information, PauseOutlineFilled, PendingFilled, WarningFilled, } from '@carbon/react/icons/index.esm.js';
9
9
  import { useEffect, useState } from 'react';
10
+ import { Link, Loading, Stack, Tile, Tooltip } from '../../ui/index.js';
10
11
  import { mediaSizeByWidth } from '../c4-billing-page/elements/current-usage-metrics.js';
11
12
  import { C4TileWithTitleAndAction } from '../c4-tile-with-title-and-action/c4-tile-with-title-and-action.js';
12
13
  const MAINTENANCE_STATUS_TEXT = 'Maintenance';
@@ -4,10 +4,11 @@ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-run
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 { InlineNotification, Stack, Tooltip } from '@carbon/react';
8
7
  import { Caution, CheckmarkFilled } from '@carbon/react/icons/index.esm.js';
9
8
  import styled from 'styled-components';
9
+ import { Stack, Tooltip } from '../../ui/index.js';
10
10
  import { C4ActionableNotification } from '../c4-actionable-notification/c4-actionable-notification.js';
11
+ import { C4InlineNotification } from '../c4-inline-notification/c4-inline-notification.js';
11
12
  import C4JobDashboardEntryPoint from '../c4-job-dashboard-entry-point/c4-job-dashboard-entry-point.js';
12
13
  import { Applications } from './applications.js';
13
14
  import { ClusterDetails } from './cluster-details.js';
@@ -38,10 +39,10 @@ export const C4ClusterOverview = ({ applications, details, clusterLoad, rbaNotif
38
39
  let rbaNotificationElement = null;
39
40
  if (rbaNotification?.visible) {
40
41
  if (rbaNotification.canManageUsers) {
41
- rbaNotificationElement = (_jsx(C4ActionableNotification, { kind: 'info', actionButtonLabel: rbaNotification.texts.actionLabel, onActionButtonClick: rbaNotification.onActionButtonClick, title: rbaNotification.texts.title, subtitle: rbaNotification.texts.subtitle, lowContrast: true }));
42
+ rbaNotificationElement = (_jsx(C4ActionableNotification, { appearance: 'banner', kind: 'info', actionButtonLabel: rbaNotification.texts.actionLabel, onActionButtonClick: rbaNotification.onActionButtonClick, title: rbaNotification.texts.title, subtitle: rbaNotification.texts.subtitle, lowContrast: true }));
42
43
  }
43
44
  else {
44
- rbaNotificationElement = (_jsx(InlineNotification, { kind: 'info', hideCloseButton: true, style: { maxWidth: '100%' }, title: rbaNotification.texts.title, subtitle: '', lowContrast: true }));
45
+ rbaNotificationElement = (_jsx(C4InlineNotification, { kind: 'info', hideCloseButton: true, style: { maxWidth: '100%' }, title: rbaNotification.texts.title, subtitle: '', lowContrast: true }));
45
46
  }
46
47
  }
47
48
  let secondRow = _jsx(_Fragment, {});
@@ -5,11 +5,13 @@ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-run
5
5
  * You may not use this file except in compliance with the commercial license.
6
6
  */
7
7
  import { C3ClusterTag, } from '@camunda/camunda-composite-components';
8
- import { Button, CodeSnippet, Layer, Link, StructuredListBody, StructuredListCell, StructuredListRow, StructuredListWrapper, TextArea, Tooltip, } from '@carbon/react';
8
+ import { Layer } from '@carbon/react';
9
9
  import { Add, Information, Launch, Pause, Play, UpdateNow, WarningAltFilled, } from '@carbon/react/icons/index.esm.js';
10
10
  import { useEffect, useRef, useState } from 'react';
11
+ import { Button, CodeSnippet, Link, TextArea, Tooltip } from '../../ui/index.js';
11
12
  import { C4ActionableNotification } from '../c4-actionable-notification/c4-actionable-notification.js';
12
13
  import { C4LinkButton } from '../c4-link-button/c4-link-button.js';
14
+ import { C4StructuredListBody, C4StructuredListCell, C4StructuredListRow, C4StructuredListWrapper, } from '../c4-structured-list/c4-structured-list.js';
13
15
  import { C4TileWithTitleAndAction } from '../c4-tile-with-title-and-action/c4-tile-with-title-and-action.js';
14
16
  import { ClusterStatusElement, normalizeClusterStatus, } from './applications.js';
15
17
  export const ClusterDetails = (props) => {
@@ -66,16 +68,16 @@ export const ClusterDetails = (props) => {
66
68
  };
67
69
  const component = (_jsxs(C4TileWithTitleAndAction, { title: props.title, children: [(() => {
68
70
  if (props.cta) {
69
- return (_jsx(C4ActionableNotification, { kind: 'info', title: props.cta.title, subtitle: props.cta.text, actionButtonLabel: props.cta.actionLabel, onActionButtonClick: props.cta.action, lowContrast: true, orientation: 'vertical' }));
71
+ return (_jsx(C4ActionableNotification, { appearance: 'banner', kind: 'info', title: props.cta.title, subtitle: props.cta.text, actionButtonLabel: props.cta.actionLabel, onActionButtonClick: props.cta.action, lowContrast: true, orientation: 'vertical' }));
70
72
  }
71
73
  else {
72
74
  return _jsx(_Fragment, {});
73
75
  }
74
- })(), _jsx(StructuredListWrapper, { children: _jsxs(StructuredListBody, { children: [_jsxs(StructuredListRow, { style: rowStyle, children: [_jsx(StructuredListCell, { noWrap: true, style: { width: '10rem' }, children: props.name.label }), _jsx(StructuredListCell, { noWrap: true, children: props.name.value })] }), props.description && (_jsxs(StructuredListRow, { style: { minHeight: isEditingDescription ? 'auto' : '61px' }, children: [_jsx(StructuredListCell, { noWrap: true, style: {
76
+ })(), _jsx(C4StructuredListWrapper, { children: _jsxs(C4StructuredListBody, { children: [_jsxs(C4StructuredListRow, { style: rowStyle, children: [_jsx(C4StructuredListCell, { noWrap: true, style: { width: '10rem' }, children: props.name.label }), _jsx(C4StructuredListCell, { noWrap: true, children: props.name.value })] }), props.description && (_jsxs(C4StructuredListRow, { style: { minHeight: isEditingDescription ? 'auto' : '61px' }, children: [_jsx(C4StructuredListCell, { noWrap: true, style: {
75
77
  width: '10rem',
76
78
  verticalAlign: 'top',
77
79
  paddingTop: '1rem',
78
- }, children: props.description.label }), _jsx(StructuredListCell, { children: isEditingDescription ? (_jsxs("div", { style: {
80
+ }, children: props.description.label }), _jsx(C4StructuredListCell, { style: { verticalAlign: 'top' }, children: isEditingDescription ? (_jsxs("div", { style: {
79
81
  display: 'flex',
80
82
  flexDirection: 'column',
81
83
  gap: '0.5rem',
@@ -93,26 +95,26 @@ export const ClusterDetails = (props) => {
93
95
  : 'var(--cds-text-secondary)',
94
96
  wordBreak: 'break-word',
95
97
  }, children: props.description.value ||
96
- props.description.noDescription }), (props.description.updateVisible ?? true) && (_jsx(C4LinkButton, { label: props.description.editLabel, onClick: handleEditDescription, disabled: props.description.updateDisabled ?? false }))] })) })] })), props.status && (_jsxs(StructuredListRow, { style: rowStyle, children: [_jsx(StructuredListCell, { noWrap: true, style: { width: '10rem' }, children: props.status.label }), _jsx(StructuredListCell, { noWrap: true, children: _jsxs("div", { style: {
98
+ props.description.noDescription }), (props.description.updateVisible ?? true) && (_jsx(C4LinkButton, { label: props.description.editLabel, onClick: handleEditDescription, disabled: props.description.updateDisabled ?? false }))] })) })] })), props.status && (_jsxs(C4StructuredListRow, { style: rowStyle, children: [_jsx(C4StructuredListCell, { noWrap: true, style: { width: '10rem' }, children: props.status.label }), _jsx(C4StructuredListCell, { noWrap: true, children: _jsxs("div", { style: {
97
99
  display: 'inline-grid',
98
100
  gridAutoFlow: 'column',
99
101
  gap: '1.5rem',
100
102
  alignItems: 'center',
101
- }, children: [normalizedStatus ? (_jsx(ClusterStatusElement, { status: normalizedStatus, infoTooltip: props.status.infoTooltip, onInfoClick: props.status.onInfoClick })) : (props.status.value), renderStatusButton()] }) })] })), _jsxs(StructuredListRow, { style: rowStyle, children: [_jsx(StructuredListCell, { noWrap: true, children: props.generation.label }), _jsx(StructuredListCell, { children: _jsxs("div", { style: {
103
+ }, children: [normalizedStatus ? (_jsx(ClusterStatusElement, { status: normalizedStatus, infoTooltip: props.status.infoTooltip, onInfoClick: props.status.onInfoClick })) : (props.status.value), renderStatusButton()] }) })] })), _jsxs(C4StructuredListRow, { style: rowStyle, children: [_jsx(C4StructuredListCell, { noWrap: true, children: props.generation.label }), _jsx(C4StructuredListCell, { children: _jsxs("div", { style: {
102
104
  display: 'grid',
103
105
  gridTemplateColumns: 'auto 1fr',
104
106
  gap: '0.5rem',
105
107
  alignItems: 'center',
106
- }, children: [_jsx("p", { children: props.generation.value }), props.status?.value.toLowerCase() === 'healthy' && (_jsx(ClusterDetailsGenerationUpdate, { ...props.generation.update }))] }) })] }), props.type && (_jsxs(StructuredListRow, { style: rowStyle, children: [_jsx(StructuredListCell, { noWrap: true, children: props.type.label }), _jsx(StructuredListCell, { noWrap: true, children: _jsxs("div", { style: {
108
+ }, children: [_jsx("p", { children: props.generation.value }), props.status?.value.toLowerCase() === 'healthy' && (_jsx(ClusterDetailsGenerationUpdate, { ...props.generation.update }))] }) })] }), props.type && (_jsxs(C4StructuredListRow, { style: rowStyle, children: [_jsx(C4StructuredListCell, { noWrap: true, children: props.type.label }), _jsx(C4StructuredListCell, { noWrap: true, children: _jsxs("div", { style: {
107
109
  display: 'inline-grid',
108
110
  gridAutoFlow: 'column',
109
111
  gap: '1.5rem',
110
112
  alignItems: 'center',
111
- }, children: [props.type.value, renderUpdateHwPackageButton()] }) })] })), props.provider.value && (_jsxs(StructuredListRow, { style: rowStyle, children: [_jsx(StructuredListCell, { children: props.provider.label }), _jsx(StructuredListCell, { children: props.provider.value })] })), props.region && (_jsxs(StructuredListRow, { style: rowStyle, children: [_jsx(StructuredListCell, { noWrap: true, children: props.region.label }), _jsx(StructuredListCell, { noWrap: true, children: props.region.value })] })), props.backupRegion && (_jsxs(StructuredListRow, { style: rowStyle, children: [_jsx(StructuredListCell, { noWrap: true, children: props.backupRegion.label }), _jsx(StructuredListCell, { noWrap: true, children: props.backupRegion.value })] })), props.encryption && (_jsxs(StructuredListRow, { style: rowStyle, children: [_jsx(StructuredListCell, { noWrap: true, children: props.encryption.label }), _jsx(StructuredListCell, { noWrap: true, children: props.encryption.value })] })), props.tags && (_jsxs(StructuredListRow, { style: rowStyle, children: [_jsx(StructuredListCell, { noWrap: true, children: props.tags.label }), _jsx(StructuredListCell, { noWrap: true, children: _jsx("div", { style: {
113
+ }, children: [props.type.value, renderUpdateHwPackageButton()] }) })] })), props.provider.value && (_jsxs(C4StructuredListRow, { style: rowStyle, children: [_jsx(C4StructuredListCell, { children: props.provider.label }), _jsx(C4StructuredListCell, { children: props.provider.value })] })), props.region && (_jsxs(C4StructuredListRow, { style: rowStyle, children: [_jsx(C4StructuredListCell, { noWrap: true, children: props.region.label }), _jsx(C4StructuredListCell, { noWrap: true, children: props.region.value })] })), props.backupRegion && (_jsxs(C4StructuredListRow, { style: rowStyle, children: [_jsx(C4StructuredListCell, { noWrap: true, children: props.backupRegion.label }), _jsx(C4StructuredListCell, { noWrap: true, children: props.backupRegion.value })] })), props.encryption && (_jsxs(C4StructuredListRow, { style: rowStyle, children: [_jsx(C4StructuredListCell, { noWrap: true, children: props.encryption.label }), _jsx(C4StructuredListCell, { noWrap: true, children: props.encryption.value })] })), props.tags && (_jsxs(C4StructuredListRow, { style: rowStyle, children: [_jsx(C4StructuredListCell, { noWrap: true, children: props.tags.label }), _jsx(C4StructuredListCell, { noWrap: true, children: _jsx("div", { style: {
112
114
  display: 'grid',
113
115
  gridTemplateColumns: 'auto 1fr',
114
116
  gap: '0.5rem',
115
- }, children: props.tags.value?.length > 0 ? (_jsxs(_Fragment, { children: [_jsx("div", { children: props.tags.value.map((tag) => (_jsx(C3ClusterTag, { stage: tag }, `cluster-tag-${tag}`))) }), props.tags.updateVisible && (_jsx(C4LinkButton, { label: props.tags.updateTagLabel, onClick: () => props.tags?.updateAction(), style: { alignSelf: 'center' }, disabled: props.tags.updateDisabled }))] })) : (props.tags.updateVisible && (_jsx(C4LinkButton, { label: props.tags.addTagLabel, onClick: () => props.tags?.updateAction(), style: { alignSelf: 'center' }, icon: _jsx(Add, {}), disabled: props.tags.updateDisabled }))) }) })] })), props.regionId && (_jsxs(StructuredListRow, { style: rowStyle, children: [_jsx(StructuredListCell, { noWrap: true, children: props.regionId.label }), _jsx(StructuredListCell, { children: _jsx(Layer, { style: { height: '0px', width: 'calc(100% - 4rem)' }, children: _jsx(CodeSnippet, { type: 'single', style: { maxWidth: '22rem' }, children: props.regionId.value }) }) })] })), props.backupRegionId && (_jsxs(StructuredListRow, { style: rowStyle, children: [_jsx(StructuredListCell, { noWrap: true, children: props.backupRegionId.label }), _jsx(StructuredListCell, { noWrap: true, children: _jsx(Layer, { style: { height: '0px', width: 'calc(100% - 4rem)' }, children: _jsx(CodeSnippet, { type: 'single', style: { maxWidth: '22rem' }, children: props.backupRegionId.value }) }) })] })), _jsxs(StructuredListRow, { style: rowStyle, children: [_jsx(StructuredListCell, { noWrap: true, children: props.id.label }), _jsx(StructuredListCell, { noWrap: true, children: _jsx(Layer, { style: { height: '0px', width: 'calc(100% - 4rem)' }, children: _jsx(CodeSnippet, { type: 'single', style: { maxWidth: '22rem' }, children: props.id.value }) }) })] }), props.swaggerUrl && (_jsxs(StructuredListRow, { style: rowStyle, children: [_jsx(StructuredListCell, { noWrap: true, children: props.swaggerUrl.label }), _jsx(StructuredListCell, { noWrap: true, children: _jsxs("span", { style: {
117
+ }, children: props.tags.value?.length > 0 ? (_jsxs(_Fragment, { children: [_jsx("div", { children: props.tags.value.map((tag) => (_jsx(C3ClusterTag, { stage: tag }, `cluster-tag-${tag}`))) }), props.tags.updateVisible && (_jsx(C4LinkButton, { label: props.tags.updateTagLabel, onClick: () => props.tags?.updateAction(), style: { alignSelf: 'center' }, disabled: props.tags.updateDisabled }))] })) : (props.tags.updateVisible && (_jsx(C4LinkButton, { label: props.tags.addTagLabel, onClick: () => props.tags?.updateAction(), style: { alignSelf: 'center' }, icon: _jsx(Add, {}), disabled: props.tags.updateDisabled }))) }) })] })), props.regionId && (_jsxs(C4StructuredListRow, { style: rowStyle, children: [_jsx(C4StructuredListCell, { noWrap: true, children: props.regionId.label }), _jsx(C4StructuredListCell, { children: _jsx(Layer, { style: { height: '0px', width: 'calc(100% - 4rem)' }, children: _jsx(CodeSnippet, { type: 'single', style: { maxWidth: '22rem' }, children: props.regionId.value }) }) })] })), props.backupRegionId && (_jsxs(C4StructuredListRow, { style: rowStyle, children: [_jsx(C4StructuredListCell, { noWrap: true, children: props.backupRegionId.label }), _jsx(C4StructuredListCell, { noWrap: true, children: _jsx(Layer, { style: { height: '0px', width: 'calc(100% - 4rem)' }, children: _jsx(CodeSnippet, { type: 'single', style: { maxWidth: '22rem' }, children: props.backupRegionId.value }) }) })] })), _jsxs(C4StructuredListRow, { style: rowStyle, children: [_jsx(C4StructuredListCell, { noWrap: true, children: props.id.label }), _jsx(C4StructuredListCell, { noWrap: true, children: _jsx(Layer, { style: { height: '0px', width: 'calc(100% - 4rem)' }, children: _jsx(CodeSnippet, { type: 'single', style: { maxWidth: '22rem' }, children: props.id.value }) }) })] }), props.swaggerUrl && (_jsxs(C4StructuredListRow, { style: rowStyle, children: [_jsx(C4StructuredListCell, { noWrap: true, children: props.swaggerUrl.label }), _jsx(C4StructuredListCell, { noWrap: true, children: _jsxs("span", { style: {
116
118
  display: 'inline-flex',
117
119
  alignItems: 'center',
118
120
  gap: 'var(--cds-spacing-02)',
@@ -131,7 +133,7 @@ export const ClusterDetails = (props) => {
131
133
  }, children: _jsx(WarningAltFilled, {}) }) })), _jsxs(Link, { href: props.swaggerUrl.url, target: '_blank', rel: 'noopener noreferrer', children: [props.swaggerUrl.linkLabel, _jsx(Launch, { style: {
132
134
  marginLeft: 'var(--cds-spacing-02)',
133
135
  verticalAlign: 'middle',
134
- } })] })] }) })] })), props.created && (_jsxs(StructuredListRow, { style: rowStyle, children: [_jsx(StructuredListCell, { noWrap: true, children: props.created.label }), _jsx(StructuredListCell, { noWrap: true, children: props.created.value })] }))] }) })] }));
136
+ } })] })] }) })] })), props.created && (_jsxs(C4StructuredListRow, { style: rowStyle, children: [_jsx(C4StructuredListCell, { noWrap: true, children: props.created.label }), _jsx(C4StructuredListCell, { noWrap: true, children: props.created.value })] }))] }) })] }));
135
137
  return component;
136
138
  };
137
139
  export const ClusterDetailsGenerationUpdate = (props) => {
@@ -5,9 +5,9 @@ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-run
5
5
  * You may not use this file except in compliance with the commercial license.
6
6
  */
7
7
  import { AreaChart, MeterChart, ScaleTypes, } from '@carbon/charts-react';
8
- import { Loading, Stack, Tag, Tooltip } from '@carbon/react';
9
8
  import { Renew } from '@carbon/react/icons/index.esm.js';
10
9
  import { useState } from 'react';
10
+ import { Loading, Stack, Tag, Tooltip } from '../../ui/index.js';
11
11
  import { CHART_COLORS } from '../c4-billing-page/elements/value-metric.js';
12
12
  import { C4Divider } from '../c4-divider/c4-divider.js';
13
13
  import { C4ExternalLink } from '../c4-external-link/c4-external-link.js';
@@ -1,3 +1,3 @@
1
1
  import type { JSX } from 'react';
2
2
  import type { C4ClusterSettingsProps } from './c4-cluster-settings.types';
3
- export declare const C4ClusterSettings: ({ settings, tasklistSettings, dangerZone, }: C4ClusterSettingsProps) => JSX.Element;
3
+ export declare const C4ClusterSettings: ({ settings, tasklistSettings, optimizeFilteringSettings, dangerZone, }: C4ClusterSettingsProps) => JSX.Element;
@@ -1,17 +1,15 @@
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 } from '@carbon/react';
2
+ import { Stack } from '../../ui/index.js';
8
3
  import { ClusterSettings } from './elements/cluster-settings.js';
9
4
  import { DangerZone } from './elements/danger-zone.js';
5
+ import { OptimizeFilteringSettings } from './elements/optimize-filtering-settings.js';
6
+ import { SettingsTile } from './elements/settings-tile.js';
10
7
  import { TasklistSettings } from './elements/tasklist-mode-settings.js';
11
- export const C4ClusterSettings = ({ settings, tasklistSettings, dangerZone, }) => {
8
+ export const C4ClusterSettings = ({ settings, tasklistSettings, optimizeFilteringSettings, dangerZone, }) => {
12
9
  const settingsComponent = _jsx(ClusterSettings, { ...settings });
13
10
  const tasklistComponent = tasklistSettings?.enabled && (_jsx(TasklistSettings, { ...tasklistSettings }));
11
+ const optimizeFilteringComponent = optimizeFilteringSettings ? (_jsx(SettingsTile, { title: optimizeFilteringSettings.title, children: _jsx(OptimizeFilteringSettings, { filtering: optimizeFilteringSettings.filtering, permissions: optimizeFilteringSettings.permissions, onToggle: optimizeFilteringSettings.onToggle, onSave: optimizeFilteringSettings.onSave }) })) : undefined;
14
12
  const dangerZoneComponent = dangerZone ? (_jsx(DangerZone, { ...dangerZone })) : undefined;
15
- const component = (_jsxs(Stack, { gap: 6, children: [settingsComponent, tasklistComponent, dangerZoneComponent] }));
13
+ const component = (_jsxs(Stack, { gap: 6, children: [settingsComponent, tasklistComponent, optimizeFilteringComponent, dangerZoneComponent] }));
16
14
  return component;
17
15
  };
@@ -1,5 +1,6 @@
1
1
  import type { ClusterSettingsProps } from './elements/cluster-settings';
2
2
  import type { DangerZoneProps } from './elements/danger-zone';
3
+ import type { OptimizeFilteringSettingsProps } from './elements/optimize-filtering-settings';
3
4
  import type { SwaggerToggleProps } from './elements/swagger-toggle';
4
5
  import type { TasklistModeToggleProps } from './elements/tasklist-mode-toggle';
5
6
  export interface C4ClusterSettingsProps {
@@ -8,5 +9,8 @@ export interface C4ClusterSettingsProps {
8
9
  title: string;
9
10
  };
10
11
  swaggerToggle?: SwaggerToggleProps;
12
+ optimizeFilteringSettings?: OptimizeFilteringSettingsProps & {
13
+ title: string;
14
+ };
11
15
  dangerZone?: DangerZoneProps;
12
16
  }
@@ -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 { Button, Stack } from '@carbon/react';
2
+ import { Button, Stack } from '../../../ui/index.js';
8
3
  import { SettingsTile } from './settings-tile.js';
9
4
  export const DangerZone = ({ deleteCluster, title, permissions, }) => {
10
5
  const component = (_jsx(SettingsTile, { title: title, children: _jsx("div", { children: _jsxs(Stack, { gap: 6, children: [_jsxs(Stack, { gap: 4, children: [_jsx("h4", { children: deleteCluster.title }), _jsx("p", { children: deleteCluster.description })] }), _jsx(Button, { onClick: deleteCluster.action.onClick, kind: 'danger', disabled: !permissions.mayDeleteCluster, size: 'md', children: deleteCluster.action.label })] }) }) }));
@@ -0,0 +1,17 @@
1
+ import { type JSX } from 'react';
2
+ export interface OptimizeFilteringConfig {
3
+ includeProcessIds?: string[] | null;
4
+ excludeProcessIds?: string[] | null;
5
+ includeVariableNames?: string[] | null;
6
+ excludeVariableNames?: string[] | null;
7
+ }
8
+ export interface OptimizeFilteringSettingsProps {
9
+ /** undefined = filtering deactivated / not configured */
10
+ filtering: OptimizeFilteringConfig | undefined;
11
+ permissions: {
12
+ mayChange: boolean;
13
+ };
14
+ onToggle: (enabled: boolean) => Promise<void>;
15
+ onSave: (config: OptimizeFilteringConfig) => Promise<void>;
16
+ }
17
+ export declare const OptimizeFilteringSettings: ({ filtering, permissions, onToggle, onSave, }: OptimizeFilteringSettingsProps) => JSX.Element;
@@ -0,0 +1,75 @@
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 { useEffect, useState } from 'react';
8
+ import { Button, Stack, TextArea } from '../../../ui/index.js';
9
+ import { C4Divider } from '../../c4-divider/c4-divider.js';
10
+ import { C4Toggle } from '../../c4-toggle/c4-toggle.js';
11
+ function patternsToText(patterns) {
12
+ return patterns?.join('\n') ?? '';
13
+ }
14
+ function textToPatterns(text) {
15
+ const trimmed = text
16
+ .split('\n')
17
+ .map((s) => s.trim())
18
+ .filter(Boolean);
19
+ return trimmed.length > 0 ? trimmed : null;
20
+ }
21
+ export const OptimizeFilteringSettings = ({ filtering, permissions, onToggle, onSave, }) => {
22
+ const isActive = filtering !== undefined;
23
+ const [includeProcessIds, setIncludeProcessIds] = useState(patternsToText(filtering?.includeProcessIds));
24
+ const [excludeProcessIds, setExcludeProcessIds] = useState(patternsToText(filtering?.excludeProcessIds));
25
+ const [includeVariableNames, setIncludeVariableNames] = useState(patternsToText(filtering?.includeVariableNames));
26
+ const [excludeVariableNames, setExcludeVariableNames] = useState(patternsToText(filtering?.excludeVariableNames));
27
+ const [isSaving, setIsSaving] = useState(false);
28
+ const [isToggling, setIsToggling] = useState(false);
29
+ // Sync text fields from server state. Blocked while a toggle is in flight so
30
+ // intermediate renders (e.g. isClusterLoading flipping) don't clear edits.
31
+ useEffect(() => {
32
+ if (isToggling)
33
+ return;
34
+ setIncludeProcessIds(patternsToText(filtering?.includeProcessIds));
35
+ setExcludeProcessIds(patternsToText(filtering?.excludeProcessIds));
36
+ setIncludeVariableNames(patternsToText(filtering?.includeVariableNames));
37
+ setExcludeVariableNames(patternsToText(filtering?.excludeVariableNames));
38
+ }, [filtering, isToggling]);
39
+ const handleToggle = async () => {
40
+ setIsToggling(true);
41
+ try {
42
+ await onToggle(!isActive);
43
+ }
44
+ catch {
45
+ // error notification is shown by the parent handler
46
+ }
47
+ finally {
48
+ setIsToggling(false);
49
+ }
50
+ };
51
+ const handleSave = async () => {
52
+ setIsSaving(true);
53
+ try {
54
+ await onSave({
55
+ includeProcessIds: textToPatterns(includeProcessIds),
56
+ excludeProcessIds: textToPatterns(excludeProcessIds),
57
+ includeVariableNames: textToPatterns(includeVariableNames),
58
+ excludeVariableNames: textToPatterns(excludeVariableNames),
59
+ });
60
+ }
61
+ finally {
62
+ setIsSaving(false);
63
+ }
64
+ };
65
+ const isPending = isToggling || isSaving;
66
+ return (_jsxs(Stack, { gap: 6, children: [_jsx(C4Toggle, { id: 'optimize-filtering-toggle', supported: true, enabled: isActive, title: 'Enable data filters', notices: [
67
+ {
68
+ notice: 'When enabled, the Optimize exporter will only process data matching the configured include/exclude patterns. Patterns use prefix matching (e.g. business_).',
69
+ },
70
+ ], onClick: handleToggle, permissions: { mayToggle: permissions.mayChange && !isPending } }), isActive && (_jsxs(_Fragment, { children: [_jsx(C4Divider, {}), _jsx("p", { style: {
71
+ color: 'var(--cds-text-secondary)',
72
+ fontSize: 'var(--cds-body-compact-01-font-size)',
73
+ maxWidth: '650px',
74
+ }, children: "Enter one pattern per line. Each pattern matches by prefix." }), _jsxs(Stack, { gap: 5, style: { maxWidth: '650px' }, children: [_jsx(TextArea, { id: 'optimize-include-process-ids', labelText: 'Include process definitions', helperText: 'Only process definitions with a matching bpmnProcessId will be exported. All records for those processes follow the same rule.', value: includeProcessIds, onChange: (e) => setIncludeProcessIds(e.target.value), disabled: !permissions.mayChange || isPending, rows: 3 }), _jsx(TextArea, { id: 'optimize-exclude-process-ids', labelText: 'Exclude process definitions', helperText: 'Process definitions with a matching bpmnProcessId will not be exported. Exclusion takes precedence over inclusion.', value: excludeProcessIds, onChange: (e) => setExcludeProcessIds(e.target.value), disabled: !permissions.mayChange || isPending, rows: 3 }), _jsx(TextArea, { id: 'optimize-include-variable-names', labelText: 'Include variable names', helperText: 'Only variables with matching names will be exported', value: includeVariableNames, onChange: (e) => setIncludeVariableNames(e.target.value), disabled: !permissions.mayChange || isPending, rows: 3 }), _jsx(TextArea, { id: 'optimize-exclude-variable-names', labelText: 'Exclude variable names', helperText: 'Variables with matching names will not be exported', value: excludeVariableNames, onChange: (e) => setExcludeVariableNames(e.target.value), disabled: !permissions.mayChange || isPending, rows: 3 }), permissions.mayChange && (_jsx("div", { children: _jsx(Button, { size: 'md', kind: 'primary', onClick: handleSave, disabled: isPending, children: isSaving ? 'Saving…' : 'Save filters' }) }))] })] }))] }));
75
+ };
@@ -1,10 +1,5 @@
1
1
  import { jsx as _jsx, Fragment as _Fragment, 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 { InlineNotification } from '@carbon/react';
2
+ import { C4InlineNotification } from '../../c4-inline-notification/c4-inline-notification.js';
8
3
  import { C4Toggle } from '../../c4-toggle/c4-toggle.js';
9
4
  export const ResourceBasedAuthorizations = ({ action, notices, enabled, supported, permissions, unsupportedNotification, errorNotification, show88Notification, }) => {
10
5
  const component = (_jsxs(_Fragment, { children: [_jsx(C4Toggle, { id: 'rba-toggle', enabled: enabled, supported: supported, title: action.label, notices: notices, onClick: action.onClick, permissions: {
@@ -15,6 +10,6 @@ export const ResourceBasedAuthorizations = ({ action, notices, enabled, supporte
15
10
  title: unsupportedNotification.title,
16
11
  subtitle: unsupportedNotification.subtitle,
17
12
  }
18
- : undefined }), errorNotification && (_jsx(InlineNotification, { lowContrast: true, kind: 'error', hideCloseButton: true, title: errorNotification.title, subtitle: errorNotification.subtitle })), show88Notification && (_jsx(InlineNotification, { lowContrast: true, kind: 'info', hideCloseButton: true, title: 'Authorization updates for 8.8 clusters', subtitle: 'For clusters running 8.7, resource-based authorizations are managed at the organization level. Starting with version 8.8, resource-based authorizations will be replaced with cluster authorizations and managed at the cluster level in the cluster’s Identity.' }))] }));
13
+ : undefined }), errorNotification && (_jsx(C4InlineNotification, { lowContrast: true, kind: 'error', hideCloseButton: true, title: errorNotification.title, subtitle: errorNotification.subtitle })), show88Notification && (_jsx(C4InlineNotification, { lowContrast: true, kind: 'info', hideCloseButton: true, title: 'Authorization updates for 8.8 clusters', subtitle: 'For clusters running 8.7, resource-based authorizations are managed at the organization level. Starting with version 8.8, resource-based authorizations will be replaced with cluster authorizations and managed at the cluster level in the cluster’s Identity.' }))] }));
19
14
  return component;
20
15
  };
@@ -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,11 +5,13 @@ 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 { Column, Grid } from '@carbon/react';
9
9
  import { Information } from '@carbon/react/icons/index.esm.js';
10
10
  import { useEffect, useState } from 'react';
11
+ import { Stack } from '../../ui/index.js';
11
12
  import { STYLES } from '../c4-billing-page/c4-billing-page.js';
12
13
  import { mediaSizeByWidth } from '../c4-billing-page/elements/current-usage-metrics.js';
14
+ import { C4SelectableTile } from '../c4-selectable-tile/c4-selectable-tile.js';
13
15
  export const C4ClusterTagSelector = (props) => {
14
16
  const [mediaSize, setMediaSize] = useState(mediaSizeByWidth(window.innerWidth));
15
17
  useEffect(() => {
@@ -21,7 +23,7 @@ export const C4ClusterTagSelector = (props) => {
21
23
  window.removeEventListener('resize', handleWindowResize);
22
24
  };
23
25
  }, []);
24
- const buildSingleTile = (item) => (_jsxs(RadioTile, { value: item, checked: item === props.currentStage, onChange: () => {
26
+ const buildSingleTile = (item) => (_jsxs(C4SelectableTile, { value: item, checked: item === props.currentStage, onChange: () => {
25
27
  props.onChange(item);
26
28
  }, disabled: !props.save.allowed ||
27
29
  (props.allowedTags && !props.allowedTags?.includes(item)), style: { height: '100%' }, children: [_jsxs("div", { style: {
@@ -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
  }