@camunda/ccma-saas-frontend 0.18.10 → 0.19.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 (259) hide show
  1. package/lib/esm/components/c4-actionable-notification/c4-actionable-notification.d.ts +4 -17
  2. package/lib/esm/components/c4-actionable-notification/c4-actionable-notification.js +5 -47
  3. package/lib/esm/components/c4-actionable-notification/c4-actionable-notification.types.d.ts +14 -6
  4. package/lib/esm/components/c4-alpha-cluster-at-checkout/c4-alpha-cluster-at-checkout.js +1 -2
  5. package/lib/esm/components/c4-api-client-scope-picker/c4-api-client-scope-picker.js +4 -8
  6. package/lib/esm/components/c4-app-teaser-cards/c4-app-teaser-cards.js +3 -2
  7. package/lib/esm/components/c4-app-teaser-cards/c4-app-teaser-cards.types.d.ts +3 -0
  8. package/lib/esm/components/c4-async-modal/c4-async-modal.js +1 -1
  9. package/lib/esm/components/c4-audit-log/c4-audit-log.js +16 -32
  10. package/lib/esm/components/c4-billing-page/c4-billing-page.js +7 -15
  11. package/lib/esm/components/c4-billing-page/custom-styles.js +9 -9
  12. package/lib/esm/components/c4-billing-page/elements/current-usage-metrics.js +9 -3
  13. package/lib/esm/components/c4-billing-page/elements/plan-details.js +3 -3
  14. package/lib/esm/components/c4-billing-page/elements/value-metric.d.ts +1 -1
  15. package/lib/esm/components/c4-billing-page/elements/value-metric.js +18 -46
  16. package/lib/esm/components/c4-breadcrumb/c4-breadcrumb.js +4 -10
  17. package/lib/esm/components/c4-charts-dashboard/elements/alluvial-chart.d.ts +1 -1
  18. package/lib/esm/components/c4-charts-dashboard/elements/alluvial-chart.js +4 -15
  19. package/lib/esm/components/c4-charts-dashboard/elements/bar-chart.d.ts +1 -1
  20. package/lib/esm/components/c4-charts-dashboard/elements/bar-chart.js +14 -41
  21. package/lib/esm/components/c4-charts-dashboard/elements/line-chart.d.ts +1 -1
  22. package/lib/esm/components/c4-charts-dashboard/elements/line-chart.js +1 -38
  23. package/lib/esm/components/c4-cluster-byom-clients/c4-cluster-byom-clients.js +5 -5
  24. package/lib/esm/components/c4-cluster-client-credentials/c4-cluster-client-credentials.js +8 -22
  25. package/lib/esm/components/c4-cluster-client-credentials/ds-credential-items.d.ts +1 -1
  26. package/lib/esm/components/c4-cluster-client-credentials/ds-credential-items.js +1 -1
  27. package/lib/esm/components/c4-cluster-client-credentials-identity/c4-cluster-client-credentials-identity.js +10 -28
  28. package/lib/esm/components/c4-cluster-details-activity/c4-cluster-details-activity.js +2 -2
  29. package/lib/esm/components/c4-cluster-details-alerts/c4-cluster-details-alerts.js +2 -2
  30. package/lib/esm/components/c4-cluster-details-clients/c4-cluster-details-clients.js +4 -4
  31. package/lib/esm/components/c4-cluster-details-connector-secrets/c4-cluster-details-connector-secrets.js +2 -2
  32. package/lib/esm/components/c4-cluster-details-encryption/c4-cluster-details-encryption.js +20 -44
  33. package/lib/esm/components/c4-cluster-details-hot-backups/c4-cluster-details-hot-backups.js +8 -16
  34. package/lib/esm/components/c4-cluster-details-hot-backups-restore/c4-cluster-details-hot-backups-restore.js +1 -1
  35. package/lib/esm/components/c4-cluster-details-ip-whitelist/c4-cluster-details-ip-whitelist.js +2 -2
  36. package/lib/esm/components/c4-cluster-details-secure-connectivity/c4-cluster-details-secure-connectivity.js +35 -33
  37. package/lib/esm/components/c4-cluster-list/c4-cluster-expiry-tag.js +3 -7
  38. package/lib/esm/components/c4-cluster-list/c4-cluster-list.js +38 -157
  39. package/lib/esm/components/c4-cluster-list/c4-cluster-list.types.d.ts +1 -1
  40. package/lib/esm/components/c4-cluster-overview/applications.d.ts +7 -8
  41. package/lib/esm/components/c4-cluster-overview/applications.js +71 -157
  42. package/lib/esm/components/c4-cluster-overview/c4-cluster-overview.d.ts +4 -18
  43. package/lib/esm/components/c4-cluster-overview/c4-cluster-overview.js +11 -50
  44. package/lib/esm/components/c4-cluster-overview/cluster-details.js +19 -36
  45. package/lib/esm/components/c4-cluster-overview/cluster-load.d.ts +2 -4
  46. package/lib/esm/components/c4-cluster-overview/cluster-load.js +16 -199
  47. package/lib/esm/components/c4-cluster-overview/ds-section.d.ts +2 -2
  48. package/lib/esm/components/c4-cluster-overview/ds-section.js +2 -2
  49. package/lib/esm/components/c4-cluster-overview/ds-status-icon-text.d.ts +3 -3
  50. package/lib/esm/components/c4-cluster-overview/ds-status-icon-text.js +2 -2
  51. package/lib/esm/components/c4-cluster-settings/elements/danger-zone.js +2 -5
  52. package/lib/esm/components/c4-cluster-settings/elements/external-identity-provider-modal.js +1 -1
  53. package/lib/esm/components/c4-cluster-settings/elements/optimize-filtering-settings.js +5 -5
  54. package/lib/esm/components/c4-cluster-settings/elements/secrets-filter-mode-toggle.js +1 -2
  55. package/lib/esm/components/c4-cluster-settings/elements/session-settings.js +2 -2
  56. package/lib/esm/components/c4-cluster-settings/elements/settings-tile.d.ts +2 -2
  57. package/lib/esm/components/c4-cluster-settings/elements/settings-tile.js +1 -3
  58. package/lib/esm/components/c4-cluster-tag-selector/c4-cluster-tag-selector.d.ts +1 -1
  59. package/lib/esm/components/c4-cluster-tag-selector/c4-cluster-tag-selector.js +12 -77
  60. package/lib/esm/components/c4-cluster-tag-selector/c4-cluster-tag-selector.types.d.ts +0 -1
  61. package/lib/esm/components/c4-console-dashboard/c4-console-dashboard.js +47 -52
  62. package/lib/esm/components/c4-console-dashboard/c4-console-dashboard.types.d.ts +1 -1
  63. package/lib/esm/components/c4-console-dashboard/elements/empty-state.d.ts +11 -2
  64. package/lib/esm/components/c4-console-dashboard/elements/empty-state.js +16 -4
  65. package/lib/esm/components/c4-create-alert-modal/c4-create-alert-modal.js +3 -4
  66. package/lib/esm/components/c4-create-cluster/c4-create-cluster-tile-grid.d.ts +2 -4
  67. package/lib/esm/components/c4-create-cluster/c4-create-cluster-tile-grid.js +20 -58
  68. package/lib/esm/components/c4-create-cluster/c4-create-cluster.js +157 -189
  69. package/lib/esm/components/c4-create-cluster/c4-create-cluster.types.d.ts +1 -1
  70. package/lib/esm/components/c4-create-cluster-api-client-modal/scopes-description-text.d.ts +2 -3
  71. package/lib/esm/components/c4-create-cluster-api-client-modal/scopes-description-text.js +3 -10
  72. package/lib/esm/components/c4-data-table/c4-data-table-skeleton.d.ts +9 -10
  73. package/lib/esm/components/c4-data-table/c4-data-table-skeleton.js +3 -18
  74. package/lib/esm/components/c4-data-table/c4-data-table.d.ts +2 -2
  75. package/lib/esm/components/c4-data-table/c4-data-table.js +3 -17
  76. package/lib/esm/components/c4-delete-account-modal/c4-delete-account-modal.js +1 -2
  77. package/lib/esm/components/c4-divider/c4-divider.js +5 -13
  78. package/lib/esm/components/c4-empty-state/c4-empty-state.d.ts +6 -12
  79. package/lib/esm/components/c4-empty-state/c4-empty-state.js +1 -9
  80. package/lib/esm/components/c4-extend-trial-modal/c4-extend-trial-modal.js +1 -2
  81. package/lib/esm/components/c4-feedback-modal/c4-feedback-modal.d.ts +2 -2
  82. package/lib/esm/components/c4-feedback-modal/c4-feedback-modal.js +2 -2
  83. package/lib/esm/components/c4-file-uploader/c4-file-uploader.d.ts +4 -18
  84. package/lib/esm/components/c4-file-uploader/c4-file-uploader.js +7 -33
  85. package/lib/esm/components/c4-help-center/help-center-placeholders.d.ts +1 -1
  86. package/lib/esm/components/c4-hub-upgrade-banner/c4-hub-upgrade-banner.js +2 -2
  87. package/lib/esm/components/c4-info-tooltip/c4-info-tooltip.js +2 -2
  88. package/lib/esm/components/c4-inline-notification/c4-inline-notification.d.ts +15 -9
  89. package/lib/esm/components/c4-inline-notification/c4-inline-notification.js +7 -17
  90. package/lib/esm/components/c4-invite-user-to-organization-modal/c4-invite-user-to-organization-modal.js +6 -6
  91. package/lib/esm/components/c4-job-dashboard-details-page/c4-job-dashboard-details-page.d.ts +0 -5
  92. package/lib/esm/components/c4-job-dashboard-details-page/c4-job-dashboard-details-page.js +1 -6
  93. package/lib/esm/components/c4-job-dashboard-details-page/c4-job-dashboard-details-page.types.d.ts +0 -2
  94. package/lib/esm/components/c4-job-dashboard-details-page/elements/c4-job-dashboard-chart-heading.js +2 -2
  95. package/lib/esm/components/c4-job-dashboard-details-page/elements/c4-job-dashboard-piechart.d.ts +1 -3
  96. package/lib/esm/components/c4-job-dashboard-details-page/elements/c4-job-dashboard-piechart.js +4 -56
  97. package/lib/esm/components/c4-job-dashboard-details-page/elements/c4-job-dashboard-time-chart.d.ts +1 -3
  98. package/lib/esm/components/c4-job-dashboard-details-page/elements/c4-job-dashboard-time-chart.js +9 -88
  99. package/lib/esm/components/c4-job-dashboard-entry-point/c4-job-dashboard-entry-point.js +12 -26
  100. package/lib/esm/components/c4-job-dashboard-entry-point/c4-job-dashboard-entry-point.types.d.ts +3 -4
  101. package/lib/esm/components/c4-job-dashboard-overview-page/c4-job-dashboard-overview.js +2 -2
  102. package/lib/esm/components/c4-job-dashboard-overview-page/c4-job-dashboard-overview.types.d.ts +0 -1
  103. package/lib/esm/components/c4-job-dashboard-shared/c4-background-fetching-indicator.js +1 -1
  104. package/lib/esm/components/c4-job-dashboard-shared/c4-job-dashboard-ds-colors.d.ts +2 -3
  105. package/lib/esm/components/c4-job-dashboard-shared/c4-job-dashboard-ds-colors.js +2 -3
  106. package/lib/esm/components/c4-job-dashboard-shared/c4-job-dashboard-error-handler.js +4 -4
  107. package/lib/esm/components/c4-job-dashboard-shared/c4-job-dashboard-table-heading-with-tooltip.js +3 -3
  108. package/lib/esm/components/c4-job-dashboard-shared/c4-timestamp-information.js +3 -3
  109. package/lib/esm/components/c4-llm-usage-meter/c4-llm-usage-meter.js +25 -25
  110. package/lib/esm/components/c4-management-activity/c4-management-activity.d.ts +5 -1
  111. package/lib/esm/components/c4-management-activity/c4-management-activity.js +6 -39
  112. package/lib/esm/components/c4-management-activity/c4-management-activity.types.d.ts +1 -6
  113. package/lib/esm/components/c4-management-api/c4-management-api.js +4 -6
  114. package/lib/esm/components/c4-management-settings/c4-management-settings.js +24 -34
  115. package/lib/esm/components/c4-multi-step-modal/c4-multi-step-modal.js +7 -3
  116. package/lib/esm/components/c4-multi-step-modal-ugly/c4-multi-step-modal-ugly.js +3 -3
  117. package/lib/esm/components/c4-multi-step-modal-ugly/c4-multi-step-modal-ugly.types.d.ts +6 -3
  118. package/lib/esm/components/c4-navigation/c4-navigation.d.ts +17 -33
  119. package/lib/esm/components/c4-navigation/c4-navigation.js +12 -25
  120. package/lib/esm/components/c4-number-input/c4-number-input.js +20 -6
  121. package/lib/esm/components/c4-old-dashboard/c4-old-dashboard.js +1 -4
  122. package/lib/esm/components/c4-org-cluster-defaults/c4-org-cluster-defaults.js +2 -2
  123. package/lib/esm/components/c4-page-layout/c4-page-layout.d.ts +2 -6
  124. package/lib/esm/components/c4-page-layout/c4-page-layout.js +3 -12
  125. package/lib/esm/components/c4-page-template/c4-page-template.d.ts +0 -3
  126. package/lib/esm/components/c4-page-template/c4-page-template.js +1 -11
  127. package/lib/esm/components/c4-permission-error-page/c4-permission-error-page.js +14 -14
  128. package/lib/esm/components/c4-pricing/c4-pricing.js +1 -1
  129. package/lib/esm/components/c4-pricing-card/c4-pricing-card.js +5 -13
  130. package/lib/esm/components/c4-search/c4-search-results.js +44 -36
  131. package/lib/esm/components/c4-search/c4-search.js +5 -7
  132. package/lib/esm/components/c4-segmented-control/c4-segmented-control.d.ts +5 -19
  133. package/lib/esm/components/c4-segmented-control/c4-segmented-control.js +6 -18
  134. package/lib/esm/components/c4-selectable-tile/c4-selectable-tile.d.ts +5 -8
  135. package/lib/esm/components/c4-selectable-tile/c4-selectable-tile.js +5 -19
  136. package/lib/esm/components/c4-stateful-button/c4-stateful-button.js +12 -2
  137. package/lib/esm/components/c4-stateful-button/c4-stateful-button.types.d.ts +4 -1
  138. package/lib/esm/components/c4-structured-list/c4-structured-list.d.ts +33 -18
  139. package/lib/esm/components/c4-structured-list/c4-structured-list.js +15 -60
  140. package/lib/esm/components/c4-tabs/c4-tabs.js +4 -8
  141. package/lib/esm/components/c4-tile-with-title-and-action/c4-tile-with-title-and-action.js +3 -3
  142. package/lib/esm/components/c4-toast-notification/c4-toast-notification.d.ts +13 -9
  143. package/lib/esm/components/c4-toast-notification/c4-toast-notification.js +3 -12
  144. package/lib/esm/components/c4-toggle/c4-toggle.js +1 -3
  145. package/lib/esm/components/c4-tutorial-tile/c4-tutorial-tile.js +2 -2
  146. package/lib/esm/components/c4-usage-alert-update-modal/c4-usage-alert-update-modal.js +3 -9
  147. package/lib/esm/components/c4-usage-history/c4-usage-history.js +4 -5
  148. package/lib/esm/components/c4-usage-history/elements/usage-history-charts.js +3 -40
  149. package/lib/esm/components/c4-usage-metrics-per-cluster/c4-usage-metrics-per-cluster.js +4 -5
  150. package/lib/esm/components/c4-user-details/tabs/authorized-resources.js +1 -3
  151. package/lib/esm/components/shared-charts/ds-line-chart.d.ts +4 -6
  152. package/lib/esm/components/shared-charts/ds-line-chart.js +5 -7
  153. package/lib/esm/components/shared-charts/ds-meter-chart.d.ts +3 -5
  154. package/lib/esm/components/shared-charts/ds-meter-chart.js +8 -10
  155. package/lib/esm/components/shared-charts/recharts-tokens.d.ts +6 -7
  156. package/lib/esm/components/shared-charts/recharts-tokens.js +6 -7
  157. package/lib/esm/index.css +107 -74
  158. package/lib/esm/index.d.ts +1 -9
  159. package/lib/esm/index.js +1 -5
  160. package/lib/esm/runtime/c4-console-runtime-context.d.ts +3 -10
  161. package/lib/esm/runtime/c4-console-runtime-context.js +11 -23
  162. package/lib/esm/runtime/c4-console-runtime.types.d.ts +0 -8
  163. package/lib/esm/runtime/c4-user-theme.d.ts +4 -4
  164. package/lib/esm/runtime/c4-user-theme.js +4 -4
  165. package/lib/esm/runtime/index.d.ts +1 -1
  166. package/lib/esm/runtime/index.js +1 -1
  167. package/lib/esm/runtime/nav/use-webapp-nav-data.d.ts +2 -2
  168. package/lib/esm/runtime/nav/use-webapp-nav-data.js +2 -2
  169. package/lib/esm/ui/c4-cluster-tag.d.ts +1 -1
  170. package/lib/esm/ui/c4-cluster-tag.js +1 -1
  171. package/lib/esm/ui/c4-modal-dialog.d.ts +7 -11
  172. package/lib/esm/ui/c4-modal-dialog.js +18 -9
  173. package/lib/esm/ui/c4-password-input.d.ts +4 -8
  174. package/lib/esm/ui/c4-password-input.js +4 -8
  175. package/lib/esm/ui/c4-text-area.d.ts +19 -0
  176. package/lib/esm/ui/c4-text-area.js +30 -0
  177. package/lib/esm/ui/ds-compact-code-block.d.ts +1 -1
  178. package/lib/esm/ui/ds-compact-code-block.js +1 -1
  179. package/lib/esm/ui/families.d.ts +13 -46
  180. package/lib/esm/ui/families.js +8 -51
  181. package/lib/esm/ui/index.d.ts +11 -53
  182. package/lib/esm/ui/index.js +19 -152
  183. package/lib/esm/ui/tabs.d.ts +1 -21
  184. package/lib/esm/ui/tabs.js +1 -22
  185. package/lib/esm/widgets/cluster-details/c4-cluster-details-app.types.d.ts +2 -3
  186. package/lib/esm/widgets/cluster-details/c4-cluster-details-page.js +17 -99
  187. package/lib/esm/widgets/cluster-details/c4-cluster-details-page.types.d.ts +1 -1
  188. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-alerts-tab.js +2 -3
  189. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-byom-clients-tab.js +16 -58
  190. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-connector-secrets-tab.js +8 -16
  191. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-hot-backups-tab.js +4 -5
  192. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-ip-whitelist-tab.js +1 -1
  193. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-overview-tab.js +13 -51
  194. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-secure-connectivity-tab.js +23 -22
  195. package/lib/esm/widgets/clusters/c4-clusters-page.js +1 -2
  196. package/lib/esm/widgets/clusters/c4-clusters-page.types.d.ts +1 -1
  197. package/lib/esm/widgets/connector-management/c4-connector-management-executable-details-page.js +1 -1
  198. package/lib/esm/widgets/connector-management/c4-connector-management-executables-table-page.js +1 -1
  199. package/lib/esm/widgets/connector-management/c4-connector-management-outbound-details-page.js +1 -1
  200. package/lib/esm/widgets/connector-management/c4-connector-management-page.js +1 -1
  201. package/lib/esm/widgets/connector-management/c4-connector-management.shared.js +3 -4
  202. package/lib/esm/widgets/dashboard/c4-dashboard-app.types.d.ts +1 -1
  203. package/lib/esm/widgets/group-details/c4-group-details-page.js +2 -3
  204. package/lib/esm/widgets/management/c4-management-app.js +6 -9
  205. package/lib/esm/widgets/management/c4-management-app.types.d.ts +1 -1
  206. package/lib/esm/widgets/management/tabs/c4-management-api-tab.js +1 -1
  207. package/lib/esm/widgets/management/tabs/c4-management-billing-tab.js +2 -2
  208. package/lib/esm/widgets/management/tabs/c4-management-overview-tab.js +2 -2
  209. package/lib/esm/widgets/management/tabs/c4-management-pricing-tab.js +1 -1
  210. package/lib/esm/widgets/management/tabs/c4-management-usage-tab.js +4 -12
  211. package/lib/esm/widgets/management/tabs/c4-management-users-tab.js +12 -12
  212. package/lib/esm/widgets/user-details/c4-user-details-page.js +6 -6
  213. package/package.json +3 -14
  214. package/lib/esm/components/c4-sm-cluster-details/automation-components.d.ts +0 -3
  215. package/lib/esm/components/c4-sm-cluster-details/automation-components.js +0 -21
  216. package/lib/esm/components/c4-sm-cluster-details/c4-sm-cluster-details.d.ts +0 -3
  217. package/lib/esm/components/c4-sm-cluster-details/c4-sm-cluster-details.js +0 -22
  218. package/lib/esm/components/c4-sm-cluster-details/c4-sm-cluster-details.types.d.ts +0 -71
  219. package/lib/esm/components/c4-sm-cluster-details/c4-sm-cluster-details.types.js +0 -6
  220. package/lib/esm/components/c4-sm-cluster-details/custom-properties.d.ts +0 -4
  221. package/lib/esm/components/c4-sm-cluster-details/custom-properties.js +0 -25
  222. package/lib/esm/components/c4-sm-cluster-details/details.d.ts +0 -7
  223. package/lib/esm/components/c4-sm-cluster-details/details.js +0 -19
  224. package/lib/esm/components/c4-sm-cluster-details/zeebe-components.d.ts +0 -3
  225. package/lib/esm/components/c4-sm-cluster-details/zeebe-components.js +0 -44
  226. package/lib/esm/components/c4-sm-dashboard/c4-sm-dashboard.d.ts +0 -3
  227. package/lib/esm/components/c4-sm-dashboard/c4-sm-dashboard.js +0 -34
  228. package/lib/esm/components/c4-sm-dashboard/c4-sm-dashboard.types.d.ts +0 -40
  229. package/lib/esm/components/c4-sm-dashboard/c4-sm-dashboard.types.js +0 -6
  230. package/lib/esm/components/c4-sm-dashboard/cluster-tile.d.ts +0 -9
  231. package/lib/esm/components/c4-sm-dashboard/cluster-tile.js +0 -60
  232. package/lib/esm/components/c4-sm-dashboard/component-tile.d.ts +0 -14
  233. package/lib/esm/components/c4-sm-dashboard/component-tile.js +0 -46
  234. package/lib/esm/components/c4-sm-dashboard/explore.d.ts +0 -20
  235. package/lib/esm/components/c4-sm-dashboard/explore.js +0 -24
  236. package/lib/esm/components/c4-sm-dashboard/health-status.d.ts +0 -10
  237. package/lib/esm/components/c4-sm-dashboard/health-status.js +0 -60
  238. package/lib/esm/components/c4-sm-dashboard/overview.d.ts +0 -13
  239. package/lib/esm/components/c4-sm-dashboard/overview.js +0 -148
  240. package/lib/esm/components/c4-sm-dashboard/usage-tile.d.ts +0 -22
  241. package/lib/esm/components/c4-sm-dashboard/usage-tile.js +0 -36
  242. package/lib/esm/components/c4-telemetry-page/c4-telemetry-page.d.ts +0 -4
  243. package/lib/esm/components/c4-telemetry-page/c4-telemetry-page.js +0 -114
  244. package/lib/esm/components/c4-telemetry-page/c4-telemetry-page.types.d.ts +0 -45
  245. package/lib/esm/components/c4-telemetry-page/c4-telemetry-page.types.js +0 -6
  246. package/lib/esm/components/c4-telemetry-page/component-metrics.d.ts +0 -26
  247. package/lib/esm/components/c4-telemetry-page/component-metrics.js +0 -42
  248. package/lib/esm/components/c4-telemetry-page/metrics-empty-state-image.d.ts +0 -2
  249. package/lib/esm/components/c4-telemetry-page/metrics-empty-state-image.js +0 -6
  250. package/lib/esm/components/c4-telemetry-page/telemetry-for-component.d.ts +0 -50
  251. package/lib/esm/components/c4-telemetry-page/telemetry-for-component.js +0 -113
  252. package/lib/esm/components/c4-telemetry-teaser-page/c4-telemetry-teaser-page.d.ts +0 -3
  253. package/lib/esm/components/c4-telemetry-teaser-page/c4-telemetry-teaser-page.js +0 -80
  254. package/lib/esm/components/c4-telemetry-teaser-page/c4-telemetry-teaser-page.types.d.ts +0 -40
  255. package/lib/esm/components/c4-telemetry-teaser-page/c4-telemetry-teaser-page.types.js +0 -6
  256. package/lib/esm/ui/c4-definition-tooltip.d.ts +0 -15
  257. package/lib/esm/ui/c4-definition-tooltip.js +0 -43
  258. package/lib/esm/ui/switchable.d.ts +0 -14
  259. package/lib/esm/ui/switchable.js +0 -27
@@ -3,51 +3,37 @@ import type { C4ClusterOverviewProps } from './c4-cluster-overview.types.js';
3
3
  import { type DsStatusIcon } from './ds-status-icon-text.js';
4
4
  export declare const C4ClusterOverview: ({ applications, details, clusterLoad, rbaNotification, jobDashboard, overviewSection, }: C4ClusterOverviewProps) => JSX.Element;
5
5
  export declare const C4IconAndTextElement: (props: {
6
- icon: any;
7
6
  text: string;
8
- color: string;
7
+ /** The lucide icon and color, for example from `getDsClusterLoadPresentation`. */
8
+ dsIcon: DsStatusIcon;
9
9
  style?: CSSProperties;
10
10
  tooltip?: {
11
11
  label: string;
12
12
  align?: "top" | "bottom" | "left" | "right";
13
13
  };
14
- /**
15
- * ds-mode only. The lucide icon and color to show in ds mode, for example
16
- * from `getDsClusterLoadPresentation`. Without it, ds mode shows `icon`
17
- * and `color` in the carbon layout.
18
- */
19
- dsIcon?: DsStatusIcon;
20
14
  }) => JSX.Element;
21
15
  export type ClusterLoadType = 'green' | 'warning' | 'red' | 'unknown';
22
16
  /**
23
- * The load range of a cluster load in ds mode. It uses the same ranges as
17
+ * The load range of a cluster load. It uses the same ranges as
24
18
  * `getClusterLoadConfig`.
25
19
  */
26
20
  export declare function getDsClusterLoadType(currentValue: number): ClusterLoadType;
27
- /** The lucide icon and color for a cluster load in ds mode. */
21
+ /** The lucide icon and color for a cluster load. */
28
22
  export declare function getDsClusterLoadPresentation(currentValue: number): DsStatusIcon;
29
23
  export declare function getClusterLoadConfig(currentValue: number): {
30
24
  type: "green";
31
- color: string;
32
- icon: JSX.Element;
33
25
  min: number;
34
26
  max: number;
35
27
  } | {
36
28
  type: "warning";
37
- color: string;
38
- icon: JSX.Element;
39
29
  min: number;
40
30
  max: number;
41
31
  } | {
42
32
  type: "red";
43
- color: string;
44
- icon: JSX.Element;
45
33
  min: number;
46
34
  max: number;
47
35
  } | {
48
36
  type: "unknown";
49
- color: string;
50
- icon: JSX.Element;
51
37
  min: number;
52
38
  max: number;
53
39
  };
@@ -4,10 +4,8 @@ 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 { Caution, CheckmarkFilled } from '@carbon/react/icons/index.esm.js';
8
7
  import { Check, TriangleAlert } from 'lucide-react';
9
8
  import styled from 'styled-components';
10
- import { useC4DesignSystem } from '../../runtime/c4-console-runtime-context.js';
11
9
  import { Stack, Tooltip } from '../../ui/index.js';
12
10
  import { C4ActionableNotification } from '../c4-actionable-notification/c4-actionable-notification.js';
13
11
  import { C4InlineNotification } from '../c4-inline-notification/c4-inline-notification.js';
@@ -29,7 +27,7 @@ const ResponsiveOverviewGrid = styled.div `
29
27
  const ClusterDetailsWrapper = styled.div `
30
28
  width: calc(100vw - 64px);
31
29
  overflow-x: auto;
32
- ${({ $plain }) => !$plain && 'background-color: var(--cds-layer);'}
30
+ ${({ $plain }) => !$plain && 'background-color: var(--background);'}
33
31
 
34
32
  @media (min-width: 768px) {
35
33
  width: 100%;
@@ -58,21 +56,8 @@ export const C4ClusterOverview = ({ applications, details, clusterLoad, rbaNotif
58
56
  const component = (_jsxs(Stack, { gap: 8, children: [rbaNotificationElement, overviewSection, _jsxs(Stack, { gap: 6, children: [_jsx(Applications, { ...applications }), secondRow] })] }));
59
57
  return component;
60
58
  };
61
- export const C4IconAndTextElement = (props) => {
62
- const designSystem = useC4DesignSystem();
63
- if (designSystem === 'ds' && props.dsIcon) {
64
- return (_jsx(DsStatusIconText, { status: props.dsIcon, style: props.style, children: props.tooltip ? (_jsx(Tooltip, { align: props.tooltip.align ?? 'bottom', autoAlign: true, label: props.tooltip.label, children: _jsx("span", { children: props.text }) })) : (props.text) }));
65
- }
66
- const component = (_jsx("div", { style: { ...props.style }, children: _jsxs("div", { style: { position: 'relative' }, children: [props.icon && (_jsx("div", { style: {
67
- position: 'absolute',
68
- top: '50%',
69
- transform: 'translateY(-50%)',
70
- display: 'flex',
71
- color: props.color,
72
- }, children: props.icon })), _jsxs("span", { style: { paddingInlineStart: props.icon ? '1.2rem' : '0rem' }, children: [props.tooltip && (_jsx("span", { style: { zIndex: 999 }, children: _jsx(Tooltip, { align: props.tooltip.align ?? 'bottom', autoAlign: true, label: props.tooltip.label, children: _jsx("span", { children: props.text }) }) })), !props.tooltip && props.text] })] }) }));
73
- return component;
74
- };
75
- /** Icon and color of each cluster load range in ds mode. */
59
+ export const C4IconAndTextElement = (props) => (_jsx(DsStatusIconText, { status: props.dsIcon, style: props.style, children: props.tooltip ? (_jsx(Tooltip, { align: props.tooltip.align ?? 'bottom', label: props.tooltip.label, children: _jsx("span", { children: props.text }) })) : (props.text) }));
60
+ /** Icon and color of each cluster load range. */
76
61
  const DS_CLUSTER_LOAD_PRESENTATION = {
77
62
  green: { icon: Check, color: DS_STATUS_ICON_COLORS.success },
78
63
  warning: { icon: TriangleAlert, color: DS_STATUS_ICON_COLORS.warning },
@@ -80,19 +65,19 @@ const DS_CLUSTER_LOAD_PRESENTATION = {
80
65
  unknown: { icon: TriangleAlert, color: DS_STATUS_ICON_COLORS.warning },
81
66
  };
82
67
  /**
83
- * The load range of a cluster load in ds mode. It uses the same ranges as
68
+ * The load range of a cluster load. It uses the same ranges as
84
69
  * `getClusterLoadConfig`.
85
70
  */
86
71
  export function getDsClusterLoadType(currentValue) {
87
72
  const { type } = getClusterLoadConfig(currentValue);
88
- // The carbon ranges end below 1000 %, so a higher load is 'unknown' there.
89
- // In ds mode, every load from the start of the red range up is critical.
73
+ // The ranges end below 1000 %, so a higher load is 'unknown' there. Every
74
+ // load from the start of the red range up is critical.
90
75
  const redMin = CLUSTER_LOAD_RANGES.find((range) => range.type === 'red')?.min;
91
76
  return type === 'unknown' && redMin !== undefined && currentValue >= redMin
92
77
  ? 'red'
93
78
  : type;
94
79
  }
95
- /** The lucide icon and color for a cluster load in ds mode. */
80
+ /** The lucide icon and color for a cluster load. */
96
81
  export function getDsClusterLoadPresentation(currentValue) {
97
82
  return DS_CLUSTER_LOAD_PRESENTATION[getDsClusterLoadType(currentValue)];
98
83
  }
@@ -100,34 +85,10 @@ export function getClusterLoadConfig(currentValue) {
100
85
  const found = CLUSTER_LOAD_RANGES.find((entry) => {
101
86
  return currentValue >= entry.min && currentValue < entry.max;
102
87
  });
103
- return (found || {
104
- type: 'unknown',
105
- color: 'var(--cds-support-warning)',
106
- icon: _jsx(Caution, {}),
107
- min: 0,
108
- max: 1000,
109
- });
88
+ return found || { type: 'unknown', min: 0, max: 1000 };
110
89
  }
111
90
  const CLUSTER_LOAD_RANGES = [
112
- {
113
- type: 'green',
114
- color: 'var(--cds-support-success)',
115
- icon: _jsx(CheckmarkFilled, {}),
116
- min: 0,
117
- max: 41,
118
- },
119
- {
120
- type: 'warning',
121
- color: 'var(--cds-support-warning)',
122
- icon: _jsx(Caution, {}),
123
- min: 41,
124
- max: 71,
125
- },
126
- {
127
- type: 'red',
128
- color: 'var(--cds-support-error)',
129
- icon: _jsx(Caution, {}),
130
- min: 71,
131
- max: 1000,
132
- },
91
+ { type: 'green', min: 0, max: 41 },
92
+ { type: 'warning', min: 41, max: 71 },
93
+ { type: 'red', min: 71, max: 1000 },
133
94
  ];
@@ -1,23 +1,14 @@
1
1
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Layer } from '@carbon/react';
3
- import { Add, Information, Launch, Pause, Play, UpdateNow, WarningAltFilled, } from '@carbon/react/icons/index.esm.js';
2
+ import { ExternalLink, Info, Pause, Play, Plus, RefreshCw, TriangleAlert, } from 'lucide-react';
4
3
  import { useEffect, useRef, useState } from 'react';
5
- import { useC4DesignSystem } from '../../runtime/c4-console-runtime-context.js';
6
- import { Button, ClusterTag, CodeSnippet, DsCompactCodeBlock, Link, TextArea, Tooltip, } from '../../ui/index.js';
4
+ import { Button, ClusterTag, DsCompactCodeBlock, Link, TextArea, Tooltip, } from '../../ui/index.js';
7
5
  import { C4ActionableNotification } from '../c4-actionable-notification/c4-actionable-notification.js';
8
6
  import { C4LinkButton } from '../c4-link-button/c4-link-button.js';
9
7
  import { C4StructuredListBody, C4StructuredListCell, C4StructuredListRow, C4StructuredListWrapper, } from '../c4-structured-list/c4-structured-list.js';
10
8
  import { C4TileWithTitleAndAction } from '../c4-tile-with-title-and-action/c4-tile-with-title-and-action.js';
11
9
  import { ClusterStatusElement, normalizeClusterStatus, } from './applications.js';
12
10
  import { DsSection } from './ds-section.js';
13
- // The `height: 0` `Layer` wrapper is a Carbon-only trick to keep the snippet
14
- // from growing the fixed-height row. It does not apply in DS mode.
15
- // In DS mode, `DsCompactCodeBlock` keeps the ID row as short as the others.
16
11
  const ClusterDetailsIdValue = (props) => {
17
- const designSystem = useC4DesignSystem();
18
- if (designSystem !== 'ds') {
19
- return (_jsx(Layer, { style: { height: '0px', width: 'calc(100% - 4rem)' }, children: _jsx(CodeSnippet, { type: 'single', style: { maxWidth: '22rem' }, children: props.value }) }));
20
- }
21
12
  // '-' is the placeholder for an ID that is not known. There is nothing to
22
13
  // copy, so show plain text without a code box or a copy button.
23
14
  if (props.value === '' || props.value === '-') {
@@ -26,7 +17,6 @@ const ClusterDetailsIdValue = (props) => {
26
17
  return (_jsx(DsCompactCodeBlock, { maxWidth: '22rem', copyLabel: props.copyLabel, copiedLabel: props.copiedLabel, children: props.value }));
27
18
  };
28
19
  export const ClusterDetails = (props) => {
29
- const isDsMode = useC4DesignSystem() === 'ds';
30
20
  const [isEditingDescription, setIsEditingDescription] = useState(false);
31
21
  const [descriptionValue, setDescriptionValue] = useState('');
32
22
  const [descriptionError, setDescriptionError] = useState('');
@@ -94,22 +84,18 @@ export const ClusterDetails = (props) => {
94
84
  else {
95
85
  return _jsx(_Fragment, {});
96
86
  }
97
- })(), _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: {
98
- minHeight: isDsMode && isEditingDescription ? 'auto' : '61px',
99
- }, children: [_jsx(C4StructuredListCell, { noWrap: true, style: {
87
+ })(), _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: {
100
88
  width: '10rem',
101
- ...(isDsMode && isEditingDescription
89
+ ...(isEditingDescription
102
90
  ? { verticalAlign: 'top', paddingTop: '1rem' }
103
91
  : {}),
104
- }, children: props.description.label }), _jsx(C4StructuredListCell, { style: isDsMode && isEditingDescription
105
- ? { verticalAlign: 'top' }
106
- : {}, children: isEditingDescription ? (_jsxs("div", { style: {
92
+ }, children: props.description.label }), _jsx(C4StructuredListCell, { style: isEditingDescription ? { verticalAlign: 'top' } : {}, children: isEditingDescription ? (_jsxs("div", { style: {
107
93
  display: 'flex',
108
94
  flexDirection: 'column',
109
95
  gap: '0.5rem',
110
- // ds mode: room under the buttons, so they do not sit
111
- // on the row border.
112
- ...(isDsMode ? { paddingBottom: '1rem' } : {}),
96
+ // Room under the buttons, so they do not sit on the row
97
+ // border.
98
+ paddingBottom: '1rem',
113
99
  }, children: [_jsx(TextArea, { id: 'cluster-description', labelText: '', value: descriptionValue, onChange: (event) => {
114
100
  setDescriptionValue(event.target.value);
115
101
  setDescriptionError('');
@@ -121,7 +107,7 @@ export const ClusterDetails = (props) => {
121
107
  }, children: [_jsx("span", { style: {
122
108
  color: props.description.value
123
109
  ? 'inherit'
124
- : 'var(--cds-text-secondary)',
110
+ : 'var(--neutral-foreground-subtle)',
125
111
  wordBreak: 'break-word',
126
112
  }, children: props.description.value ||
127
113
  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: {
@@ -143,10 +129,10 @@ export const ClusterDetails = (props) => {
143
129
  display: 'grid',
144
130
  gridTemplateColumns: 'auto 1fr',
145
131
  gap: '0.5rem',
146
- }, children: props.tags.value?.length > 0 ? (_jsxs(_Fragment, { children: [_jsx("div", { children: props.tags.value.map((tag) => (_jsx(ClusterTag, { 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(ClusterDetailsIdValue, { value: props.regionId.value, copyLabel: props.copyValueLabel ?? 'Copy', copiedLabel: props.copyValueCopiedLabel ?? 'Copied!' }) })] })), props.backupRegionId && (_jsxs(C4StructuredListRow, { style: rowStyle, children: [_jsx(C4StructuredListCell, { noWrap: true, children: props.backupRegionId.label }), _jsx(C4StructuredListCell, { noWrap: true, children: _jsx(ClusterDetailsIdValue, { value: props.backupRegionId.value, copyLabel: props.copyValueLabel ?? 'Copy', copiedLabel: props.copyValueCopiedLabel ?? 'Copied!' }) })] })), _jsxs(C4StructuredListRow, { style: rowStyle, children: [_jsx(C4StructuredListCell, { noWrap: true, children: props.id.label }), _jsx(C4StructuredListCell, { noWrap: true, children: _jsx(ClusterDetailsIdValue, { value: props.id.value, copyLabel: props.copyValueLabel ?? 'Copy', copiedLabel: props.copyValueCopiedLabel ?? 'Copied!' }) })] }), props.swaggerUrl && (_jsxs(C4StructuredListRow, { style: rowStyle, children: [_jsx(C4StructuredListCell, { noWrap: true, children: props.swaggerUrl.label }), _jsx(C4StructuredListCell, { noWrap: true, children: _jsxs("span", { style: {
132
+ }, children: props.tags.value?.length > 0 ? (_jsxs(_Fragment, { children: [_jsx("div", { children: props.tags.value.map((tag) => (_jsx(ClusterTag, { 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(Plus, {}), disabled: props.tags.updateDisabled }))) }) })] })), props.regionId && (_jsxs(C4StructuredListRow, { style: rowStyle, children: [_jsx(C4StructuredListCell, { noWrap: true, children: props.regionId.label }), _jsx(C4StructuredListCell, { children: _jsx(ClusterDetailsIdValue, { value: props.regionId.value, copyLabel: props.copyValueLabel ?? 'Copy', copiedLabel: props.copyValueCopiedLabel ?? 'Copied!' }) })] })), props.backupRegionId && (_jsxs(C4StructuredListRow, { style: rowStyle, children: [_jsx(C4StructuredListCell, { noWrap: true, children: props.backupRegionId.label }), _jsx(C4StructuredListCell, { noWrap: true, children: _jsx(ClusterDetailsIdValue, { value: props.backupRegionId.value, copyLabel: props.copyValueLabel ?? 'Copy', copiedLabel: props.copyValueCopiedLabel ?? 'Copied!' }) })] })), _jsxs(C4StructuredListRow, { style: rowStyle, children: [_jsx(C4StructuredListCell, { noWrap: true, children: props.id.label }), _jsx(C4StructuredListCell, { noWrap: true, children: _jsx(ClusterDetailsIdValue, { value: props.id.value, copyLabel: props.copyValueLabel ?? 'Copy', copiedLabel: props.copyValueCopiedLabel ?? 'Copied!' }) })] }), props.swaggerUrl && (_jsxs(C4StructuredListRow, { style: rowStyle, children: [_jsx(C4StructuredListCell, { noWrap: true, children: props.swaggerUrl.label }), _jsx(C4StructuredListCell, { noWrap: true, children: _jsxs("span", { style: {
147
133
  display: 'inline-flex',
148
134
  alignItems: 'center',
149
- gap: 'var(--cds-spacing-02)',
135
+ gap: '0.25rem',
150
136
  }, children: [props.swaggerUrl.pausedWarning && (_jsx(Tooltip, { align: 'bottom', description: _jsx("span", { style: {
151
137
  display: 'block',
152
138
  whiteSpace: 'normal',
@@ -157,17 +143,14 @@ export const ClusterDetails = (props) => {
157
143
  padding: 0,
158
144
  border: 0,
159
145
  background: 'transparent',
160
- color: 'var(--cds-support-warning)',
146
+ color: 'var(--warning-action-default)',
161
147
  cursor: 'default',
162
- }, children: _jsx(WarningAltFilled, {}) }) })), _jsxs(Link, { href: props.swaggerUrl.url, target: '_blank', rel: 'noopener noreferrer', children: [props.swaggerUrl.linkLabel, _jsx(Launch, { style: {
163
- marginLeft: 'var(--cds-spacing-02)',
148
+ }, children: _jsx(TriangleAlert, { size: 16, "aria-hidden": true }) }) })), _jsxs(Link, { href: props.swaggerUrl.url, target: '_blank', rel: 'noopener noreferrer', children: [props.swaggerUrl.linkLabel, _jsx(ExternalLink, { size: 16, "aria-hidden": true, style: {
149
+ marginLeft: '0.25rem',
164
150
  verticalAlign: 'middle',
165
151
  } })] })] }) })] })), props.created && (_jsxs(C4StructuredListRow, { style: rowStyle, children: [_jsx(C4StructuredListCell, { noWrap: true, children: props.created.label }), _jsx(C4StructuredListCell, { noWrap: true, children: props.created.value })] }))] }) })] }));
166
- if (props.variant === 'plain' && isDsMode) {
167
- return _jsx(DsSection, { title: props.title, children: inner });
168
- }
169
152
  if (props.variant === 'plain') {
170
- return (_jsxs("div", { children: [_jsx("h6", { style: { fontSize: '16px', marginBottom: '16px' }, children: props.title }), inner] }));
153
+ return _jsx(DsSection, { title: props.title, children: inner });
171
154
  }
172
155
  return (_jsx(C4TileWithTitleAndAction, { title: props.title, children: inner }));
173
156
  };
@@ -176,7 +159,7 @@ export const ClusterDetailsGenerationUpdate = (props) => {
176
159
  const latestMessage = 'No updates available - running on latest available version';
177
160
  switch (props.updateType) {
178
161
  case 'update-available':
179
- component = (_jsx(Button, { onClick: () => props.updateStates.updateAvailable.action?.(), disabled: !props.updateStates.updateAvailable.action, size: 'sm', renderIcon: UpdateNow, style: { justifySelf: 'start' }, children: props.updateStates.updateAvailable.label }));
162
+ component = (_jsx(Button, { onClick: () => props.updateStates.updateAvailable.action?.(), disabled: !props.updateStates.updateAvailable.action, size: 'sm', renderIcon: RefreshCw, style: { justifySelf: 'start' }, children: props.updateStates.updateAvailable.label }));
180
163
  break;
181
164
  case 'update-available-no-permissions':
182
165
  component = (_jsxs("div", { style: {
@@ -184,7 +167,7 @@ export const ClusterDetailsGenerationUpdate = (props) => {
184
167
  gridTemplateColumns: 'auto 1fr',
185
168
  gap: '0.5rem',
186
169
  alignItems: 'start',
187
- }, children: [_jsx(Button, { size: 'sm', renderIcon: UpdateNow, style: { top: '-0.4rem' }, disabled: true, children: props.updateStates.updateAvailableNoPermission.label }), _jsx("p", { style: { wordBreak: 'break-word', overflowWrap: 'break-word' }, children: props.updateStates.updateAvailableNoPermission.description })] }));
170
+ }, children: [_jsx(Button, { size: 'sm', renderIcon: RefreshCw, style: { top: '-0.4rem' }, disabled: true, children: props.updateStates.updateAvailableNoPermission.label }), _jsx("p", { style: { wordBreak: 'break-word', overflowWrap: 'break-word' }, children: props.updateStates.updateAvailableNoPermission.description })] }));
188
171
  break;
189
172
  case 'update-available-wait-needed':
190
173
  component = (_jsxs("div", { style: {
@@ -192,7 +175,7 @@ export const ClusterDetailsGenerationUpdate = (props) => {
192
175
  gridTemplateColumns: 'auto 1fr',
193
176
  gap: '0.5rem',
194
177
  alignItems: 'start',
195
- }, children: [_jsx(Button, { size: 'sm', renderIcon: UpdateNow, style: { top: '-0.4rem' }, disabled: true, children: props.updateStates.updateAvailableWaitNeeded.label }), _jsx("p", { style: { wordBreak: 'break-word', overflowWrap: 'break-word' }, children: props.updateStates.updateAvailableWaitNeeded.description })] }));
178
+ }, children: [_jsx(Button, { size: 'sm', renderIcon: RefreshCw, style: { top: '-0.4rem' }, disabled: true, children: props.updateStates.updateAvailableWaitNeeded.label }), _jsx("p", { style: { wordBreak: 'break-word', overflowWrap: 'break-word' }, children: props.updateStates.updateAvailableWaitNeeded.description })] }));
196
179
  break;
197
180
  case 'no-update-latest': {
198
181
  const rawLabel = props.updateStates.noUpdateLatest.label.trim();
@@ -207,7 +190,7 @@ export const ClusterDetailsGenerationUpdate = (props) => {
207
190
  gridTemplateColumns: 'auto 1fr',
208
191
  gap: '0.5rem',
209
192
  alignItems: 'start',
210
- }, children: [_jsx(Information, {}), _jsx("p", { style: { wordBreak: 'break-word', overflowWrap: 'break-word' }, children: resolvedNoUpdateLatestLabel })] }));
193
+ }, children: [_jsx(Info, { size: 16, "aria-hidden": true }), _jsx("p", { style: { wordBreak: 'break-word', overflowWrap: 'break-word' }, children: resolvedNoUpdateLatestLabel })] }));
211
194
  break;
212
195
  }
213
196
  case 'creating':
@@ -26,16 +26,14 @@ export interface ClusterLoadProps {
26
26
  url: string;
27
27
  onClick: () => void;
28
28
  };
29
- theme?: any;
30
29
  suspended?: boolean;
31
30
  reload: () => void;
32
31
  loading?: boolean;
33
32
  /**
34
33
  * `'tile'` (default) renders this section inside `C4TileWithTitleAndAction`'s
35
34
  * bordered, padded card — Console's own look. `'plain'` is for a host that
36
- * renders this section inline with its own sections: in carbon mode it is a
37
- * bare heading and the content; in ds mode it is the shared section heading
38
- * with the content in a DS card.
35
+ * renders this section inline with its own sections: it is the shared
36
+ * section heading with the content in a DS card.
39
37
  */
40
38
  variant?: 'tile' | 'plain';
41
39
  }
@@ -4,32 +4,25 @@ 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 { AreaChart, MeterChart, ScaleTypes, } from '@carbon/charts-react';
8
- import { Renew } from '@carbon/react/icons/index.esm.js';
7
+ import { RefreshCw } from 'lucide-react';
9
8
  import { useState } from 'react';
10
9
  import { Area, CartesianGrid, AreaChart as DsAreaChart, Legend, Tooltip as RechartsTooltip, ResponsiveContainer, XAxis, YAxis, } from 'recharts';
11
- import { useC4DesignSystem } from '../../runtime/c4-console-runtime-context.js';
12
10
  import { DsProgress, Loading, Stack, Tag, Tooltip } from '../../ui/index.js';
13
- import { CHART_COLORS } from '../c4-billing-page/elements/value-metric.js';
14
11
  import { C4Divider } from '../c4-divider/c4-divider.js';
15
12
  import { C4ExternalLink } from '../c4-external-link/c4-external-link.js';
16
13
  import { C4LinkButton } from '../c4-link-button/c4-link-button.js';
17
14
  import { C4TileWithTitleAndAction } from '../c4-tile-with-title-and-action/c4-tile-with-title-and-action.js';
18
15
  import { DS_CHART_AXIS_COLOR, DS_CHART_GRID_COLOR, DS_CHART_TOOLTIP_PROPS, getDsSeriesColor, } from '../shared-charts/recharts-tokens.js';
19
- import { getClusterLoadConfig, getDsClusterLoadPresentation, } from './c4-cluster-overview.js';
16
+ import { getDsClusterLoadPresentation } from './c4-cluster-overview.js';
20
17
  import { DsSection } from './ds-section.js';
21
18
  export const ClusterLoad = (props) => {
22
- const designSystem = useC4DesignSystem();
23
19
  const body = props.loading ? (_jsxs(_Fragment, { children: [_jsx(Loading, {}), _jsx("div", { style: { minHeight: '465px' } })] })) : (_jsxs(Stack, { gap: 3, children: [_jsx(LatestChart, { ...props }), _jsx("span", { style: { marginTop: '0.5rem' }, children: _jsx(C4Divider, {}) }), _jsx(HistoricChart, { ...props }), _jsx("span", { style: { marginTop: '0.75rem' }, children: _jsx(C4ExternalLink, { id: 'cluster-load-documentation', label: props.texts.docs, href: props.docs.url, onClick: () => {
24
20
  props.docs.onClick();
25
21
  }, target: '_blank', hideIcon: true }) })] }));
26
- if (props.variant === 'plain' && designSystem === 'ds') {
27
- // Embedded in ds mode: the heading on top and the content in a card, the
28
- // same as the Cluster Details section.
29
- return (_jsx("div", { style: { position: 'relative' }, className: 'cluster-load', children: _jsx(DsSection, { title: props.texts.title, card: true, action: props.loading ? undefined : (_jsx(C4LinkButton, { label: '', ariaLabel: props.texts.reload, onClick: () => props.reload(), icon: _jsx(Renew, {}) })), children: body }) }));
30
- }
31
22
  if (props.variant === 'plain') {
32
- return (_jsxs("div", { style: { position: 'relative' }, className: 'cluster-load', children: [_jsxs(Stack, { orientation: 'horizontal', style: { marginBottom: '16px' }, children: [_jsx("h6", { style: { margin: 0, fontSize: '16px' }, children: props.texts.title }), !props.loading && (_jsx(C4LinkButton, { label: '', ariaLabel: props.texts.reload, onClick: () => props.reload(), style: { justifySelf: 'end', alignSelf: 'start' }, icon: _jsx(Renew, {}) }))] }), body] }));
23
+ // Embedded: the heading on top and the content in a card, the same as the
24
+ // Cluster Details section.
25
+ return (_jsx("div", { style: { position: 'relative' }, className: 'cluster-load', children: _jsx(DsSection, { title: props.texts.title, card: true, action: props.loading ? undefined : (_jsx(C4LinkButton, { label: '', ariaLabel: props.texts.reload, onClick: () => props.reload(), icon: _jsx(RefreshCw, {}) })), children: body }) }));
33
26
  }
34
27
  return (_jsx("div", { style: { position: 'relative' }, className: 'cluster-load', children: _jsx(C4TileWithTitleAndAction, { title: props.texts.title,
35
28
  // Hide the reload button during load, like the `plain` variant does.
@@ -41,12 +34,11 @@ export const ClusterLoad = (props) => {
41
34
  : {
42
35
  label: '',
43
36
  ariaLabel: props.texts.reload,
44
- icon: _jsx(Renew, {}),
37
+ icon: _jsx(RefreshCw, {}),
45
38
  onClick: () => props.reload(),
46
39
  }, children: body }) }));
47
40
  };
48
41
  const HistoricChart = (props) => {
49
- const designSystem = useC4DesignSystem();
50
42
  const initialChartOption = '24h';
51
43
  const generateChartData = (option) => {
52
44
  const data = [];
@@ -141,137 +133,19 @@ const HistoricChart = (props) => {
141
133
  minute: '2-digit',
142
134
  }).format(date);
143
135
  };
144
- const dsRows = chartData.reduce((rows, point) => {
136
+ const rowsByDate = chartData.reduce((rows, point) => {
145
137
  const row = rows[point.date] ?? { date: point.date };
146
138
  row[point.group] = point.value;
147
139
  rows[point.date] = row;
148
140
  return rows;
149
141
  }, {});
150
- const dsChartData = Object.values(dsRows);
142
+ const chartRows = Object.values(rowsByDate);
151
143
  const DsHistoricTooltip = ({ active, payload, label, }) => {
152
144
  if (!active || !payload?.length || !label)
153
145
  return null;
154
146
  const byGroup = Object.fromEntries(payload.map((entry) => [entry.dataKey, entry.value]));
155
147
  return (_jsxs("div", { style: DS_CHART_TOOLTIP_PROPS.contentStyle, children: [_jsx("div", { style: DS_CHART_TOOLTIP_PROPS.labelStyle, children: formatDateTime(new Date(label)) }), ['avg', 'max', 'min'].map((group, index) => byGroup[group] === undefined ? null : (_jsxs("div", { style: { color: getDsSeriesColor(index) }, children: [group, ": ", Number(byGroup[group]).toFixed(2), "%"] }, group)))] }));
156
148
  };
157
- const options = {
158
- axes: {
159
- bottom: {
160
- mapsTo: 'date',
161
- scaleType: ScaleTypes.TIME,
162
- },
163
- left: {
164
- mapsTo: 'value',
165
- title: 'Percentage %',
166
- scaleType: ScaleTypes.LINEAR,
167
- percentage: props.suspended === true ? true : undefined,
168
- },
169
- },
170
- legend: {
171
- enabled: true,
172
- },
173
- toolbar: {
174
- enabled: false,
175
- },
176
- tooltip: {
177
- customHTML: (data, defaultHTML) => {
178
- let updatedHTML = defaultHTML;
179
- if (Array.isArray(data) &&
180
- data.length === 3 &&
181
- data.filter((entry) => ['min', 'max', 'avg'].includes(entry.group))
182
- .length === 3) {
183
- const minValue = (data.find((entry) => entry.group === 'min')?.value).toFixed(2);
184
- const maxValue = (data.find((entry) => entry.group === 'max')?.value).toFixed(2);
185
- const avgValue = (data.find((entry) => entry.group === 'avg')?.value).toFixed(2);
186
- updatedHTML = `<ul class="multi-tooltip">
187
- <li>
188
- <div class="datapoint-tooltip">
189
- <div class="label">
190
- <p></p>
191
- </div>
192
- <p class="value">${formatDateTime(new Date(data[0].date))}</p>
193
- </div>
194
- </li>
195
- <li>
196
- <div class="datapoint-tooltip">
197
- <div class="tooltip-color tooltip-3-1-3"></div>
198
- <div class="label">
199
- <p>avg</p>
200
- </div>
201
- <p class="value">${avgValue}%</p>
202
- </div>
203
- </li>
204
- <li>
205
- <div class="datapoint-tooltip">
206
- <div class="tooltip-color tooltip-3-1-2"></div>
207
- <div class="label">
208
- <p>max</p>
209
- </div>
210
- <p class="value">${maxValue}%</p>
211
- </div>
212
- </li>
213
- <li>
214
- <div class="datapoint-tooltip">
215
- <div class="tooltip-color tooltip-3-1-1"></div>
216
- <div class="label">
217
- <p>min</p>
218
- </div>
219
- <p class="value">${minValue}%</p>
220
- </div>
221
- </li>
222
- </ul>
223
- `;
224
- }
225
- else if (Array.isArray(data) && data.length === 1) {
226
- const value = data[0].value.toFixed(2);
227
- let tooltipColorIndex = 1;
228
- switch (data[0].group) {
229
- case 'min':
230
- tooltipColorIndex = 1;
231
- break;
232
- case 'max':
233
- tooltipColorIndex = 2;
234
- break;
235
- case 'avg':
236
- tooltipColorIndex = 3;
237
- break;
238
- }
239
- updatedHTML = `<ul class="multi-tooltip">
240
- <li>
241
- <div class="datapoint-tooltip">
242
- <div class="label">
243
- <p></p>
244
- </div>
245
- <p class="value">${formatDateTime(new Date(data[0].date))}</p>
246
- </div>
247
- </li>
248
- <li>
249
- <div class="datapoint-tooltip">
250
- <div class="label">
251
- <p></p>
252
- </div>
253
- <p class="value">${value}%</p>
254
- </div>
255
- </li>
256
- <li>
257
- <div class="datapoint-tooltip">
258
- <div class="tooltip-color tooltip-3-1-${tooltipColorIndex}"></div>
259
- <div class="label">
260
- <p></p>
261
- </div>
262
- <p class="value">${data[0].group}</p>
263
- </div>
264
- </li>
265
- </ul>
266
- `;
267
- }
268
- return updatedHTML;
269
- },
270
- showTotal: false,
271
- },
272
- height: '300px',
273
- theme: props.theme,
274
- };
275
149
  const chartOptionLabels = [
276
150
  {
277
151
  text: props.texts.day30,
@@ -292,7 +166,7 @@ const HistoricChart = (props) => {
292
166
  }, type: currentOption === currentChartOption.option
293
167
  ? 'high-contrast'
294
168
  : 'outline', style: { borderWidth: '0px', cursor: 'pointer' }, children: currentChartOption.text }, `chart-option-${currentChartOption.option}`));
295
- })] }), designSystem === 'ds' ? (_jsx(ResponsiveContainer, { width: '100%', height: 300, children: _jsxs(DsAreaChart, { data: dsChartData, margin: { top: 8, right: 16, left: 8, bottom: 8 }, children: [_jsx(CartesianGrid, { stroke: DS_CHART_GRID_COLOR, vertical: false }), _jsx(XAxis, { dataKey: 'date', stroke: DS_CHART_AXIS_COLOR, tick: { fill: DS_CHART_AXIS_COLOR, fontSize: 12 }, tickFormatter: (value) => Intl.DateTimeFormat('en-US', {
169
+ })] }), _jsx(ResponsiveContainer, { width: '100%', height: 300, children: _jsxs(DsAreaChart, { data: chartRows, margin: { top: 8, right: 16, left: 8, bottom: 8 }, children: [_jsx(CartesianGrid, { stroke: DS_CHART_GRID_COLOR, vertical: false }), _jsx(XAxis, { dataKey: 'date', stroke: DS_CHART_AXIS_COLOR, tick: { fill: DS_CHART_AXIS_COLOR, fontSize: 12 }, tickFormatter: (value) => Intl.DateTimeFormat('en-US', {
296
170
  month: 'short',
297
171
  day: '2-digit',
298
172
  }).format(new Date(value)) }), _jsx(YAxis, { stroke: DS_CHART_AXIS_COLOR, tick: { fill: DS_CHART_AXIS_COLOR, fontSize: 12 }, tickFormatter: (value) => `${value}%`, label: {
@@ -301,7 +175,7 @@ const HistoricChart = (props) => {
301
175
  position: 'insideLeft',
302
176
  fill: DS_CHART_AXIS_COLOR,
303
177
  fontSize: 12,
304
- } }), _jsx(RechartsTooltip, { content: DsHistoricTooltip }), _jsx(Legend, { wrapperStyle: { color: DS_CHART_AXIS_COLOR, fontSize: 12 } }), _jsx(Area, { type: 'monotone', dataKey: 'avg', stroke: getDsSeriesColor(0), fill: getDsSeriesColor(0), fillOpacity: 0.15, dot: false }), _jsx(Area, { type: 'monotone', dataKey: 'max', stroke: getDsSeriesColor(1), fill: getDsSeriesColor(1), fillOpacity: 0.1, dot: false }), _jsx(Area, { type: 'monotone', dataKey: 'min', stroke: getDsSeriesColor(2), fill: getDsSeriesColor(2), fillOpacity: 0.1, dot: false })] }) })) : (_jsx(AreaChart, { data: chartData, options: options }, props.theme))] }));
178
+ } }), _jsx(RechartsTooltip, { content: DsHistoricTooltip }), _jsx(Legend, { wrapperStyle: { color: DS_CHART_AXIS_COLOR, fontSize: 12 } }), _jsx(Area, { type: 'monotone', dataKey: 'avg', stroke: getDsSeriesColor(0), fill: getDsSeriesColor(0), fillOpacity: 0.15, dot: false }), _jsx(Area, { type: 'monotone', dataKey: 'max', stroke: getDsSeriesColor(1), fill: getDsSeriesColor(1), fillOpacity: 0.1, dot: false }), _jsx(Area, { type: 'monotone', dataKey: 'min', stroke: getDsSeriesColor(2), fill: getDsSeriesColor(2), fillOpacity: 0.1, dot: false })] }) })] }));
305
179
  return component;
306
180
  };
307
181
  // LATEST CHART
@@ -309,73 +183,16 @@ const LatestChart = (props) => {
309
183
  return _jsx(MeterVisualization, { ...props });
310
184
  };
311
185
  export const MeterVisualization = (props) => {
312
- const designSystem = useC4DesignSystem();
313
186
  const suspended = props.suspended;
314
187
  const currentPrefix = `${props.texts.current} -`;
315
- const currentPostfix = '%';
316
- const current = props.values.latest.avg;
317
188
  const max = 100;
318
- const theme = props.theme;
319
- const currentValue = suspended ? 0 : current;
320
- const data = {
321
- current: formatNumber(currentValue),
322
- max: formatNumber(max),
323
- color: currentValue > max ? CHART_COLORS.RED : CHART_COLORS.BLUE,
324
- };
325
- const currentClusterLoadConfig = getClusterLoadConfig(currentValue);
189
+ const currentValue = suspended ? 0 : props.values.latest.avg;
326
190
  const DsLoadIcon = getDsClusterLoadPresentation(currentValue);
327
- if (suspended) {
328
- data.current = `${currentPrefix} n/a`;
329
- }
330
- else {
331
- data.current = `${formatNumber(data.current)}`;
332
- if (currentPrefix) {
333
- data.current = `${currentPrefix} ${data.current}`;
334
- }
335
- if (currentPostfix) {
336
- data.current = `${data.current} ${currentPostfix}`;
337
- }
338
- }
339
- const group = 'latest';
340
- const chartOptions = {
341
- height: '20px',
342
- meter: {
343
- showLabels: false,
344
- proportional: {
345
- total: max,
346
- },
347
- },
348
- color: {
349
- scale: {
350
- latest: currentClusterLoadConfig.color,
351
- },
352
- },
353
- legend: {
354
- enabled: false,
355
- },
356
- toolbar: {
357
- enabled: false,
358
- },
359
- theme,
360
- };
361
- if (designSystem === 'ds') {
362
- // The DS `Progress` bar. The icon next to the value carries the load range.
363
- return (_jsx(Tooltip, { align: 'bottom', label: props.texts.clusterLoadTooltip, children: _jsxs("div", { className: 'flex flex-col gap-2', children: [_jsxs("div", { className: 'flex items-center justify-between gap-2', children: [_jsx("p", { className: 'm-0', children: data.current }), !suspended && (_jsx(DsLoadIcon.icon, { className: 'size-4 shrink-0', style: { color: DsLoadIcon.color }, "aria-hidden": true }))] }), _jsx(DsProgress, { value: currentValue, max: max, "aria-label": props.texts.title, getValueLabel: () => data.current })] }) }));
364
- }
365
- const component = (_jsx(Stack, { gap: 1, children: _jsx(Tooltip, { align: 'bottom', label: props.texts.clusterLoadTooltip, children: _jsxs("div", { style: { height: '32px' }, children: [_jsxs("div", { style: {
366
- display: 'grid',
367
- gridTemplateColumns: '1fr auto',
368
- width: '100%',
369
- }, children: [_jsx("p", { children: data.current }), !suspended && (_jsx("p", { style: {
370
- color: currentClusterLoadConfig.color,
371
- alignSelf: 'end',
372
- }, children: currentClusterLoadConfig.icon }))] }), _jsx(MeterChart, { data: [
373
- {
374
- group,
375
- value: currentValue,
376
- },
377
- ], options: chartOptions }, theme)] }) }) }));
378
- return component;
191
+ const label = suspended
192
+ ? `${currentPrefix} n/a`
193
+ : `${currentPrefix} ${formatNumber(currentValue)} %`;
194
+ // The DS `Progress` bar. The icon next to the value carries the load range.
195
+ return (_jsx(Tooltip, { align: 'bottom', label: props.texts.clusterLoadTooltip, children: _jsxs("div", { className: 'flex flex-col gap-2', children: [_jsxs("div", { className: 'flex items-center justify-between gap-2', children: [_jsx("p", { className: 'm-0', children: label }), !suspended && (_jsx(DsLoadIcon.icon, { className: 'size-4 shrink-0', style: { color: DsLoadIcon.color }, "aria-hidden": true }))] }), _jsx(DsProgress, { value: currentValue, max: max, "aria-label": props.texts.title, getValueLabel: () => label })] }) }));
379
196
  };
380
197
  function formatNumber(number) {
381
198
  return new Intl.NumberFormat('en-US', {