@camunda/ccma-saas-frontend 0.0.46 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (371) hide show
  1. package/lib/esm/components/c4-actionable-notification/c4-actionable-notification.d.ts +20 -3
  2. package/lib/esm/components/c4-actionable-notification/c4-actionable-notification.js +50 -17
  3. package/lib/esm/components/c4-advanced-search-filters/ArrayFieldContainer.js +2 -1
  4. package/lib/esm/components/c4-advanced-search-filters/AutosuggestInput.js +1 -6
  5. package/lib/esm/components/c4-advanced-search-filters/FieldRow.js +4 -1
  6. package/lib/esm/components/c4-advanced-search-filters/FiltersSection.js +1 -6
  7. package/lib/esm/components/c4-advanced-search-filters/OrSection.js +3 -1
  8. package/lib/esm/components/c4-advanced-search-filters/c4-advanced-search-filters.js +3 -1
  9. package/lib/esm/components/c4-ai-usage/c4-ai-usage.js +2 -7
  10. package/lib/esm/components/c4-alpha-cluster-at-checkout/c4-alpha-cluster-at-checkout.js +7 -7
  11. package/lib/esm/components/c4-app-teaser-card/c4-app-teaster-card.js +1 -6
  12. package/lib/esm/components/c4-app-teaser-card/c4-app-teaster-card.spec.d.ts +1 -0
  13. package/lib/esm/components/c4-app-teaser-card/c4-app-teaster-card.spec.js +43 -0
  14. package/lib/esm/components/c4-app-teaser-cards/c4-app-teaser-cards.js +1 -1
  15. package/lib/esm/components/c4-async-modal/c4-async-modal.js +3 -2
  16. package/lib/esm/components/c4-audit-log/c4-audit-log.js +4 -3
  17. package/lib/esm/components/c4-billing-page/c4-billing-page.js +8 -6
  18. package/lib/esm/components/c4-billing-page/c4-billing-page.mocks.d.ts +3 -0
  19. package/lib/esm/components/c4-billing-page/c4-billing-page.mocks.js +154 -0
  20. package/lib/esm/components/c4-billing-page/elements/cluster-reservations.js +9 -14
  21. package/lib/esm/components/c4-billing-page/elements/current-usage-metrics.js +2 -1
  22. package/lib/esm/components/c4-billing-page/elements/usage-alerts.js +3 -8
  23. package/lib/esm/components/c4-billing-page/elements/value-metric.d.ts +2 -0
  24. package/lib/esm/components/c4-billing-page/elements/value-metric.js +15 -3
  25. package/lib/esm/components/c4-billing-page/elements/value-metric.spec.js +18 -0
  26. package/lib/esm/components/c4-bottom-links/c4-bottom-links.js +1 -6
  27. package/lib/esm/components/c4-breadcrumb/c4-breadcrumb.js +3 -6
  28. package/lib/esm/components/c4-charts-dashboard/c4-charts-dashboard.js +1 -1
  29. package/lib/esm/components/c4-charts-dashboard/elements/alluvial-chart.js +59 -2
  30. package/lib/esm/components/c4-charts-dashboard/elements/bar-chart.js +41 -7
  31. package/lib/esm/components/c4-charts-dashboard/elements/line-chart.js +7 -1
  32. package/lib/esm/components/c4-cluster-byom-clients/c4-cluster-byom-clients.js +6 -10
  33. package/lib/esm/components/c4-cluster-client-credentials/c4-cluster-client-credentials.js +8 -3
  34. package/lib/esm/components/c4-cluster-client-credentials-identity/c4-cluster-client-credentials-identity.js +8 -3
  35. package/lib/esm/components/c4-cluster-details-activity/c4-cluster-details-activity.js +6 -5
  36. package/lib/esm/components/c4-cluster-details-alerts/c4-cluster-details-alerts.js +12 -14
  37. package/lib/esm/components/c4-cluster-details-alerts/c4-cluster-details-alerts.mocks.d.ts +5 -0
  38. package/lib/esm/components/c4-cluster-details-alerts/c4-cluster-details-alerts.mocks.js +83 -0
  39. package/lib/esm/components/c4-cluster-details-clients/c4-cluster-details-clients.js +6 -10
  40. package/lib/esm/components/c4-cluster-details-clients/c4-cluster-details-clients.mocks.d.ts +6 -0
  41. package/lib/esm/components/c4-cluster-details-clients/c4-cluster-details-clients.mocks.js +79 -0
  42. package/lib/esm/components/c4-cluster-details-connector-secrets/c4-cluster-details-connector-secrets.js +8 -11
  43. package/lib/esm/components/c4-cluster-details-connector-secrets/c4-cluster-details-connector-secrets.mocks.d.ts +3 -0
  44. package/lib/esm/components/c4-cluster-details-connector-secrets/c4-cluster-details-connector-secrets.mocks.js +65 -0
  45. package/lib/esm/components/c4-cluster-details-encryption/c4-cluster-details-encryption.js +9 -4
  46. package/lib/esm/components/c4-cluster-details-hot-backups/c4-cluster-details-hot-backups.js +12 -8
  47. package/lib/esm/components/c4-cluster-details-hot-backups/c4-cluster-details-hot-backups.mocks.d.ts +60 -0
  48. package/lib/esm/components/c4-cluster-details-hot-backups/c4-cluster-details-hot-backups.mocks.js +143 -0
  49. package/lib/esm/components/c4-cluster-details-hot-backups-restore/c4-cluster-details-hot-backups-restore.js +3 -2
  50. package/lib/esm/components/c4-cluster-details-ip-whitelist/c4-cluster-details-ip-whitelist.js +7 -10
  51. package/lib/esm/components/c4-cluster-details-ip-whitelist/c4-cluster-details-ip-whitelist.mocks.d.ts +6 -0
  52. package/lib/esm/components/c4-cluster-details-ip-whitelist/c4-cluster-details-ip-whitelist.mocks.js +51 -0
  53. package/lib/esm/components/c4-cluster-details-secure-connectivity/c4-cluster-details-secure-connectivity.js +15 -21
  54. package/lib/esm/components/c4-cluster-list/c4-cluster-list.d.ts +1 -1
  55. package/lib/esm/components/c4-cluster-list/c4-cluster-list.js +69 -6
  56. package/lib/esm/components/c4-cluster-list/c4-cluster-list.mocks.d.ts +4 -0
  57. package/lib/esm/components/c4-cluster-list/c4-cluster-list.mocks.js +132 -0
  58. package/lib/esm/components/c4-cluster-list/c4-cluster-list.types.d.ts +7 -0
  59. package/lib/esm/components/c4-cluster-overview/applications.js +19 -4
  60. package/lib/esm/components/c4-cluster-overview/applications.spec.js +27 -1
  61. package/lib/esm/components/c4-cluster-overview/c4-cluster-overview.js +4 -3
  62. package/lib/esm/components/c4-cluster-overview/c4-cluster-overview.mocks.d.ts +8 -0
  63. package/lib/esm/components/c4-cluster-overview/c4-cluster-overview.mocks.js +203 -0
  64. package/lib/esm/components/c4-cluster-overview/cluster-details.d.ts +2 -0
  65. package/lib/esm/components/c4-cluster-overview/cluster-details.js +68 -16
  66. package/lib/esm/components/c4-cluster-overview/cluster-load.js +39 -4
  67. package/lib/esm/components/c4-cluster-settings/c4-cluster-settings.js +1 -6
  68. package/lib/esm/components/c4-cluster-settings/c4-cluster-settings.mocks.d.ts +16 -0
  69. package/lib/esm/components/c4-cluster-settings/c4-cluster-settings.mocks.js +104 -0
  70. package/lib/esm/components/c4-cluster-settings/elements/app-integrations-toggle.d.ts +14 -0
  71. package/lib/esm/components/c4-cluster-settings/elements/app-integrations-toggle.js +12 -0
  72. package/lib/esm/components/c4-cluster-settings/elements/cluster-settings.d.ts +5 -1
  73. package/lib/esm/components/c4-cluster-settings/elements/cluster-settings.js +10 -3
  74. package/lib/esm/components/c4-cluster-settings/elements/danger-zone.js +1 -6
  75. package/lib/esm/components/c4-cluster-settings/elements/external-identity-provider-modal.d.ts +20 -0
  76. package/lib/esm/components/c4-cluster-settings/elements/external-identity-provider-modal.js +85 -0
  77. package/lib/esm/components/c4-cluster-settings/elements/external-identity-provider-modal.spec.d.ts +1 -0
  78. package/lib/esm/components/c4-cluster-settings/elements/external-identity-provider-modal.spec.js +93 -0
  79. package/lib/esm/components/c4-cluster-settings/elements/external-identity-provider.d.ts +20 -0
  80. package/lib/esm/components/c4-cluster-settings/elements/external-identity-provider.js +15 -0
  81. package/lib/esm/components/c4-cluster-settings/elements/external-identity-provider.spec.d.ts +1 -0
  82. package/lib/esm/components/c4-cluster-settings/elements/external-identity-provider.spec.js +50 -0
  83. package/lib/esm/components/c4-cluster-settings/elements/optimize-filtering-settings.d.ts +10 -4
  84. package/lib/esm/components/c4-cluster-settings/elements/optimize-filtering-settings.js +117 -25
  85. package/lib/esm/components/c4-cluster-settings/elements/optimize-filtering-settings.spec.d.ts +1 -0
  86. package/lib/esm/components/c4-cluster-settings/elements/optimize-filtering-settings.spec.js +120 -0
  87. package/lib/esm/components/c4-cluster-settings/elements/resource-based-authorizations.js +2 -7
  88. package/lib/esm/components/c4-cluster-settings/elements/settings-tile.js +1 -6
  89. package/lib/esm/components/c4-cluster-settings/elements/tasklist-mode-toggle.js +1 -1
  90. package/lib/esm/components/c4-cluster-tag-selector/c4-cluster-tag-selector.js +23 -3
  91. package/lib/esm/components/c4-clusters-empty-state/c4-clusters-empty-state.js +18 -14
  92. package/lib/esm/components/c4-clusters-empty-state/c4-clusters-empty-state.spec.d.ts +1 -0
  93. package/lib/esm/components/c4-clusters-empty-state/c4-clusters-empty-state.spec.js +40 -0
  94. package/lib/esm/components/c4-clusters-empty-state/c4-clusters-empty-state.types.d.ts +2 -0
  95. package/lib/esm/components/c4-clusters-trial-notification/c4-clusters-trial-notification.js +4 -9
  96. package/lib/esm/components/c4-clusters-trial-notification/c4-clusters-trial-notification.types.d.ts +2 -0
  97. package/lib/esm/components/c4-console-dashboard/c4-console-dashboard.js +11 -7
  98. package/lib/esm/components/c4-console-dashboard/c4-console-dashboard.mocks.d.ts +2 -0
  99. package/lib/esm/components/c4-console-dashboard/c4-console-dashboard.mocks.js +186 -0
  100. package/lib/esm/components/c4-console-dashboard/elements/empty-state.js +2 -2
  101. package/lib/esm/components/c4-create-alert-modal/c4-create-alert-modal.d.ts +2 -0
  102. package/lib/esm/components/c4-create-alert-modal/c4-create-alert-modal.js +132 -0
  103. package/lib/esm/components/c4-create-alert-modal/c4-create-alert-modal.mocks.d.ts +2 -0
  104. package/lib/esm/components/c4-create-alert-modal/c4-create-alert-modal.mocks.js +20 -0
  105. package/lib/esm/components/c4-create-alert-modal/c4-create-alert-modal.types.d.ts +22 -0
  106. package/lib/esm/components/c4-create-alert-modal/c4-create-alert-modal.types.js +6 -0
  107. package/lib/esm/components/c4-create-cluster/c4-create-cluster-tile-grid.d.ts +32 -0
  108. package/lib/esm/components/c4-create-cluster/c4-create-cluster-tile-grid.js +71 -0
  109. package/lib/esm/components/c4-create-cluster/c4-create-cluster-tile-grid.spec.d.ts +1 -0
  110. package/lib/esm/components/c4-create-cluster/c4-create-cluster-tile-grid.spec.js +83 -0
  111. package/lib/esm/components/c4-create-cluster/c4-create-cluster.js +56 -54
  112. package/lib/esm/components/c4-create-cluster/c4-create-cluster.mocks.d.ts +64 -0
  113. package/lib/esm/components/c4-create-cluster/c4-create-cluster.mocks.js +298 -0
  114. package/lib/esm/components/c4-create-cluster-api-client-modal/c4-create-cluster-api-client-modal.js +51 -31
  115. package/lib/esm/components/c4-create-cluster-api-client-modal/c4-create-cluster-api-client-modal.mocks.d.ts +2 -0
  116. package/lib/esm/components/c4-create-cluster-api-client-modal/c4-create-cluster-api-client-modal.mocks.js +23 -0
  117. package/lib/esm/components/c4-create-cluster-api-client-modal/c4-create-cluster-api-client-modal.types.d.ts +2 -0
  118. package/lib/esm/components/c4-create-connector-secret-modal/c4-create-connector-secret-modal.js +4 -2
  119. package/lib/esm/components/c4-create-connector-secret-modal/c4-create-connector-secret-modal.mocks.d.ts +2 -0
  120. package/lib/esm/components/c4-create-connector-secret-modal/c4-create-connector-secret-modal.mocks.js +15 -0
  121. package/lib/esm/components/c4-create-console-api-client-modal/c4-create-console-api-client-modal.js +6 -5
  122. package/lib/esm/components/c4-create-console-api-client-modal/c4-create-console-api-client-modal.mocks.d.ts +2 -0
  123. package/lib/esm/components/c4-create-console-api-client-modal/c4-create-console-api-client-modal.mocks.js +13 -0
  124. package/lib/esm/components/c4-create-console-api-client-modal/c4-create-console-api-client-modal.types.d.ts +1 -0
  125. package/lib/esm/components/c4-create-ip-whitelist-modal/c4-create-ip-whitelist-modal.d.ts +2 -0
  126. package/lib/esm/components/c4-create-ip-whitelist-modal/c4-create-ip-whitelist-modal.js +77 -0
  127. package/lib/esm/components/c4-create-ip-whitelist-modal/c4-create-ip-whitelist-modal.mocks.d.ts +2 -0
  128. package/lib/esm/components/c4-create-ip-whitelist-modal/c4-create-ip-whitelist-modal.mocks.js +11 -0
  129. package/lib/esm/components/c4-create-ip-whitelist-modal/c4-create-ip-whitelist-modal.types.d.ts +14 -0
  130. package/lib/esm/components/c4-create-ip-whitelist-modal/c4-create-ip-whitelist-modal.types.js +6 -0
  131. package/lib/esm/components/c4-create-trial-organization-modal/c4-create-trial-organization-modal.js +2 -1
  132. package/lib/esm/components/c4-dashboard-first-launch/c4-dashboard-first-launch.js +1 -6
  133. package/lib/esm/components/c4-data-table/c4-data-table-skeleton.d.ts +15 -0
  134. package/lib/esm/components/c4-data-table/c4-data-table-skeleton.js +26 -0
  135. package/lib/esm/components/c4-data-table/c4-data-table.d.ts +3 -0
  136. package/lib/esm/components/c4-data-table/c4-data-table.js +277 -0
  137. package/lib/esm/components/c4-data-table/c4-data-table.spec.d.ts +1 -0
  138. package/lib/esm/components/c4-data-table/c4-data-table.spec.js +71 -0
  139. package/lib/esm/components/c4-data-table/c4-data-table.stability.spec.d.ts +1 -0
  140. package/lib/esm/components/c4-data-table/c4-data-table.stability.spec.js +151 -0
  141. package/lib/esm/components/c4-delete-organization-modal/c4-delete-organization-modal.js +3 -2
  142. package/lib/esm/components/c4-empty-state/c4-empty-state.d.ts +47 -0
  143. package/lib/esm/components/c4-empty-state/c4-empty-state.js +33 -0
  144. package/lib/esm/components/c4-extend-trial-modal/c4-extend-trial-modal.d.ts +3 -0
  145. package/lib/esm/components/c4-extend-trial-modal/c4-extend-trial-modal.js +51 -0
  146. package/lib/esm/components/c4-extend-trial-modal/c4-extend-trial-modal.spec.d.ts +1 -0
  147. package/lib/esm/components/c4-extend-trial-modal/c4-extend-trial-modal.spec.js +33 -0
  148. package/lib/esm/components/c4-extend-trial-modal/c4-extend-trial-modal.types.d.ts +8 -0
  149. package/lib/esm/components/c4-extend-trial-modal/c4-extend-trial-modal.types.js +1 -0
  150. package/lib/esm/components/c4-external-link/c4-external-link.js +1 -6
  151. package/lib/esm/components/c4-feedback-modal/c4-feedback-modal.d.ts +40 -0
  152. package/lib/esm/components/c4-feedback-modal/c4-feedback-modal.js +109 -0
  153. package/lib/esm/components/c4-help-center/c4-help-center.d.ts +50 -0
  154. package/lib/esm/components/c4-help-center/c4-help-center.js +39 -0
  155. package/lib/esm/components/c4-inline-notification/c4-inline-notification.d.ts +15 -0
  156. package/lib/esm/components/c4-inline-notification/c4-inline-notification.js +37 -0
  157. package/lib/esm/components/c4-invite-user-to-organization-modal/c4-invite-user-to-organization-modal.js +4 -3
  158. package/lib/esm/components/c4-job-dashboard-details-page/c4-job-dashboard-details-page.js +4 -2
  159. package/lib/esm/components/c4-job-dashboard-details-page/c4-job-dashboard-details-page.mocks.d.ts +2 -0
  160. package/lib/esm/components/c4-job-dashboard-details-page/c4-job-dashboard-details-page.mocks.js +231 -0
  161. package/lib/esm/components/c4-job-dashboard-details-page/elements/c4-job-dashboard-chart-heading.js +1 -1
  162. package/lib/esm/components/c4-job-dashboard-details-page/elements/c4-job-dashboard-error-table.js +3 -8
  163. package/lib/esm/components/c4-job-dashboard-details-page/elements/c4-job-dashboard-piechart.js +56 -2
  164. package/lib/esm/components/c4-job-dashboard-details-page/elements/c4-job-dashboard-time-chart.js +37 -2
  165. package/lib/esm/components/c4-job-dashboard-details-page/elements/c4-job-dashboard-worker-table.js +3 -3
  166. package/lib/esm/components/c4-job-dashboard-entry-point/c4-job-dashboard-entry-point.js +2 -1
  167. package/lib/esm/components/c4-job-dashboard-overview-page/c4-job-dashboard-overview.js +43 -46
  168. package/lib/esm/components/c4-job-dashboard-overview-page/c4-job-dashboard-overview.mocks.d.ts +2 -0
  169. package/lib/esm/components/c4-job-dashboard-overview-page/c4-job-dashboard-overview.mocks.js +102 -0
  170. package/lib/esm/components/c4-job-dashboard-shared/c4-background-fetching-indicator.js +1 -6
  171. package/lib/esm/components/c4-job-dashboard-shared/c4-job-dashboard-ds-colors.d.ts +10 -0
  172. package/lib/esm/components/c4-job-dashboard-shared/c4-job-dashboard-ds-colors.js +16 -0
  173. package/lib/esm/components/c4-job-dashboard-shared/c4-job-dashboard-error-handler.js +1 -1
  174. package/lib/esm/components/c4-job-dashboard-shared/c4-job-dashboard-table-heading-with-tooltip.js +1 -1
  175. package/lib/esm/components/c4-job-dashboard-shared/c4-job-dashboard-time-range-dropdown.js +1 -1
  176. package/lib/esm/components/c4-leave-organization-modal/c4-leave-organization-modal.js +1 -6
  177. package/lib/esm/components/c4-link-button/c4-link-button.js +1 -6
  178. package/lib/esm/components/c4-llm-usage-meter/c4-llm-usage-meter.js +1 -1
  179. package/lib/esm/components/c4-management-activity/c4-management-activity.d.ts +1 -1
  180. package/lib/esm/components/c4-management-activity/c4-management-activity.js +109 -9
  181. package/lib/esm/components/c4-management-activity/c4-management-activity.mocks.d.ts +4 -0
  182. package/lib/esm/components/c4-management-activity/c4-management-activity.mocks.js +63 -0
  183. package/lib/esm/components/c4-management-activity/c4-management-activity.types.d.ts +11 -0
  184. package/lib/esm/components/c4-management-api/c4-management-api.js +9 -11
  185. package/lib/esm/components/c4-management-api/c4-management-api.mocks.d.ts +43 -0
  186. package/lib/esm/components/c4-management-api/c4-management-api.mocks.js +118 -0
  187. package/lib/esm/components/c4-management-overview/c4-management-overview.js +12 -14
  188. package/lib/esm/components/c4-management-settings/c4-management-settings.js +9 -11
  189. package/lib/esm/components/c4-management-users/c4-management-users.js +4 -9
  190. package/lib/esm/components/c4-multi-step-modal/c4-multi-step-modal.js +4 -2
  191. package/lib/esm/components/c4-multi-step-modal-ugly/c4-multi-step-modal-ugly.js +4 -2
  192. package/lib/esm/components/c4-navigation/c4-navigation.d.ts +55 -0
  193. package/lib/esm/components/c4-navigation/c4-navigation.js +175 -0
  194. package/lib/esm/components/c4-old-dashboard/c4-old-dashboard.js +3 -2
  195. package/lib/esm/components/c4-old-dashboard/c4-old-dashboard.types.d.ts +1 -0
  196. package/lib/esm/components/c4-page-layout/c4-page-layout.d.ts +13 -0
  197. package/lib/esm/components/c4-page-layout/c4-page-layout.js +23 -0
  198. package/lib/esm/components/c4-page-template/c4-page-template.js +14 -3
  199. package/lib/esm/components/c4-permission-error-page/c4-permission-error-page.js +1 -1
  200. package/lib/esm/components/c4-pricing/c4-pricing.js +3 -7
  201. package/lib/esm/components/c4-pricing-card/c4-pricing-card.js +1 -1
  202. package/lib/esm/components/c4-rename-organization-modal/c4-rename-organization-modal.js +1 -1
  203. package/lib/esm/components/c4-search/c4-search-results.js +2 -1
  204. package/lib/esm/components/c4-selectable-tile/c4-selectable-tile.d.ts +20 -0
  205. package/lib/esm/components/c4-selectable-tile/c4-selectable-tile.js +44 -0
  206. package/lib/esm/components/c4-sm-cluster-details/automation-components.js +2 -1
  207. package/lib/esm/components/c4-sm-cluster-details/c4-sm-cluster-details.js +1 -6
  208. package/lib/esm/components/c4-sm-cluster-details/custom-properties.js +4 -8
  209. package/lib/esm/components/c4-sm-cluster-details/details.js +5 -4
  210. package/lib/esm/components/c4-sm-cluster-details/zeebe-components.js +2 -1
  211. package/lib/esm/components/c4-sm-dashboard/c4-sm-dashboard.js +1 -1
  212. package/lib/esm/components/c4-sm-dashboard/c4-sm-dashboard.types.d.ts +1 -1
  213. package/lib/esm/components/c4-sm-dashboard/cluster-tile.js +2 -1
  214. package/lib/esm/components/c4-sm-dashboard/component-tile.js +2 -1
  215. package/lib/esm/components/c4-sm-dashboard/explore.js +1 -6
  216. package/lib/esm/components/c4-sm-dashboard/overview.js +1 -1
  217. package/lib/esm/components/c4-sm-dashboard/usage-tile.js +2 -1
  218. package/lib/esm/components/c4-stat/c4-stat.js +1 -6
  219. package/lib/esm/components/c4-stateful-button/c4-stateful-button.js +2 -1
  220. package/lib/esm/components/c4-structured-list/c4-structured-list.d.ts +21 -0
  221. package/lib/esm/components/c4-structured-list/c4-structured-list.js +75 -0
  222. package/lib/esm/components/c4-tabs/c4-tabs.js +2 -1
  223. package/lib/esm/components/c4-telemetry-page/c4-telemetry-page.js +6 -2
  224. package/lib/esm/components/c4-telemetry-page/component-metrics.js +1 -6
  225. package/lib/esm/components/c4-telemetry-page/telemetry-for-component.js +60 -37
  226. package/lib/esm/components/c4-telemetry-teaser-page/c4-telemetry-teaser-page.js +1 -1
  227. package/lib/esm/components/c4-theme-switcher/c4-theme-switcher.js +1 -1
  228. package/lib/esm/components/c4-tile-with-title-and-action/c4-tile-with-title-and-action.js +1 -1
  229. package/lib/esm/components/c4-toast-notification/c4-toast-notification.d.ts +14 -0
  230. package/lib/esm/components/c4-toast-notification/c4-toast-notification.js +27 -0
  231. package/lib/esm/components/c4-toggle/c4-toggle.js +6 -8
  232. package/lib/esm/components/c4-tutorial-tile/c4-tutorial-tile.js +1 -1
  233. package/lib/esm/components/c4-usage-alert-update-modal/c4-usage-alert-update-modal.js +4 -2
  234. package/lib/esm/components/c4-usage-history/c4-usage-history.js +5 -3
  235. package/lib/esm/components/c4-usage-history/elements/usage-history-charts.js +7 -1
  236. package/lib/esm/components/c4-usage-metrics-per-cluster/c4-usage-metrics-per-cluster.js +8 -7
  237. package/lib/esm/components/c4-user-details/c4-user-details.js +2 -2
  238. package/lib/esm/components/c4-user-details/tabs/authorized-resources.js +4 -2
  239. package/lib/esm/components/c4-user-details/tabs/details.js +6 -10
  240. package/lib/esm/components/c4-user-details/tabs/roles.js +3 -8
  241. package/lib/esm/components/shared-charts/ds-charts.smoke.spec.d.ts +1 -0
  242. package/lib/esm/components/shared-charts/ds-charts.smoke.spec.js +47 -0
  243. package/lib/esm/components/shared-charts/ds-line-chart.d.ts +33 -0
  244. package/lib/esm/components/shared-charts/ds-line-chart.js +55 -0
  245. package/lib/esm/components/shared-charts/ds-meter-chart.d.ts +22 -0
  246. package/lib/esm/components/shared-charts/ds-meter-chart.js +48 -0
  247. package/lib/esm/components/shared-charts/recharts-tokens.d.ts +24 -0
  248. package/lib/esm/components/shared-charts/recharts-tokens.js +51 -0
  249. package/lib/esm/externalUrls.const.d.ts +2 -0
  250. package/lib/esm/externalUrls.const.js +7 -0
  251. package/lib/esm/externalUrls.const.spec.js +2 -0
  252. package/lib/esm/i18n/c4-console-i18n.js +8 -0
  253. package/lib/esm/i18n/en/entities/orgroles.json +0 -16
  254. package/lib/esm/i18n/en/modals/clusters.json +0 -8
  255. package/lib/esm/i18n/en/pages/clusterdetails.json +14 -2
  256. package/lib/esm/i18n/en/pages/orgmanagement.json +12 -3
  257. package/lib/esm/index.d.ts +33 -1
  258. package/lib/esm/index.js +23 -1
  259. package/lib/esm/runtime/c4-console-authz.d.ts +26 -0
  260. package/lib/esm/runtime/c4-console-authz.js +59 -29
  261. package/lib/esm/runtime/c4-console-authz.spec.js +87 -20
  262. package/lib/esm/runtime/c4-console-data-context.js +40 -0
  263. package/lib/esm/runtime/c4-console-data-context.types.d.ts +19 -1
  264. package/lib/esm/runtime/c4-console-data-store.d.ts +25 -1
  265. package/lib/esm/runtime/c4-console-data-store.js +145 -31
  266. package/lib/esm/runtime/c4-console-data-store.nav.spec.d.ts +1 -0
  267. package/lib/esm/runtime/c4-console-data-store.nav.spec.js +121 -0
  268. package/lib/esm/runtime/c4-console-data-store.spec.js +35 -6
  269. package/lib/esm/runtime/c4-console-events-context.d.ts +18 -0
  270. package/lib/esm/runtime/c4-console-events-context.js +62 -0
  271. package/lib/esm/runtime/c4-console-runtime-context.d.ts +8 -1
  272. package/lib/esm/runtime/c4-console-runtime-context.js +50 -1
  273. package/lib/esm/runtime/c4-console-runtime.types.d.ts +20 -0
  274. package/lib/esm/runtime/c4-user-notifications-context.d.ts +19 -0
  275. package/lib/esm/runtime/c4-user-notifications-context.js +201 -0
  276. package/lib/esm/runtime/c4-user-notifications-context.spec.d.ts +1 -0
  277. package/lib/esm/runtime/c4-user-notifications-context.spec.js +80 -0
  278. package/lib/esm/runtime/c4-user-notifications-context.types.d.ts +31 -0
  279. package/lib/esm/runtime/c4-user-notifications-context.types.js +6 -0
  280. package/lib/esm/runtime/c4-user-theme.d.ts +27 -0
  281. package/lib/esm/runtime/c4-user-theme.js +106 -0
  282. package/lib/esm/runtime/decode-access-token.d.ts +12 -0
  283. package/lib/esm/runtime/decode-access-token.js +39 -0
  284. package/lib/esm/runtime/nav/camunda-apps.d.ts +45 -0
  285. package/lib/esm/runtime/nav/camunda-apps.js +100 -0
  286. package/lib/esm/runtime/nav/camunda-apps.spec.d.ts +1 -0
  287. package/lib/esm/runtime/nav/camunda-apps.spec.js +90 -0
  288. package/lib/esm/runtime/nav/use-webapp-nav-data.d.ts +75 -0
  289. package/lib/esm/runtime/nav/use-webapp-nav-data.js +211 -0
  290. package/lib/esm/runtime/nav/use-webapp-nav-data.spec.d.ts +1 -0
  291. package/lib/esm/runtime/nav/use-webapp-nav-data.spec.js +91 -0
  292. package/lib/esm/runtime/to-api-config.js +4 -0
  293. package/lib/esm/ui/c4-modal-dialog.d.ts +14 -0
  294. package/lib/esm/ui/c4-modal-dialog.js +35 -0
  295. package/lib/esm/ui/families.d.ts +42 -0
  296. package/lib/esm/ui/families.js +46 -0
  297. package/lib/esm/ui/index.d.ts +32 -0
  298. package/lib/esm/ui/index.js +95 -0
  299. package/lib/esm/ui/switchable.d.ts +14 -0
  300. package/lib/esm/ui/switchable.js +27 -0
  301. package/lib/esm/ui/tabs.d.ts +21 -0
  302. package/lib/esm/ui/tabs.js +27 -0
  303. package/lib/esm/widgets/cluster-client-details/c4-cluster-client-details-app.js +7 -5
  304. package/lib/esm/widgets/cluster-details/c4-cluster-details-app.d.ts +1 -0
  305. package/lib/esm/widgets/cluster-details/c4-cluster-details-app.js +39 -15
  306. package/lib/esm/widgets/cluster-details/c4-cluster-details-app.merge.spec.d.ts +1 -0
  307. package/lib/esm/widgets/cluster-details/c4-cluster-details-app.merge.spec.js +49 -0
  308. package/lib/esm/widgets/cluster-details/c4-cluster-details-app.types.d.ts +8 -0
  309. package/lib/esm/widgets/cluster-details/c4-cluster-details-page.js +1 -1
  310. package/lib/esm/widgets/cluster-details/c4-cluster-details-page.spec.js +2 -0
  311. package/lib/esm/widgets/cluster-details/cluster-details-tabs.d.ts +23 -0
  312. package/lib/esm/widgets/cluster-details/cluster-details-tabs.js +83 -0
  313. package/lib/esm/widgets/cluster-details/cluster-details-tabs.spec.d.ts +1 -0
  314. package/lib/esm/widgets/cluster-details/cluster-details-tabs.spec.js +33 -0
  315. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-alerts-tab.js +25 -88
  316. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-byom-clients-tab.js +5 -3
  317. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-clients-tab.js +7 -5
  318. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-connector-secrets-tab.js +10 -6
  319. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-hot-backups-tab.js +3 -1
  320. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-ip-whitelist-tab.js +25 -39
  321. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-overview-tab.js +88 -35
  322. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-overview-tab.spec.js +134 -19
  323. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-secure-connectivity-tab.js +12 -9
  324. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-settings-tab.d.ts +2 -0
  325. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-settings-tab.js +194 -6
  326. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-settings-tab.spec.js +60 -1
  327. package/lib/esm/widgets/clusters/c4-clusters-page.d.ts +1 -1
  328. package/lib/esm/widgets/clusters/c4-clusters-page.js +173 -81
  329. package/lib/esm/widgets/clusters/c4-clusters-page.spec.js +146 -13
  330. package/lib/esm/widgets/clusters/c4-clusters-page.types.d.ts +3 -0
  331. package/lib/esm/widgets/connector-management/c4-connector-management-executable-details-page.js +1 -1
  332. package/lib/esm/widgets/connector-management/c4-connector-management-executables-table-page.js +3 -2
  333. package/lib/esm/widgets/connector-management/c4-connector-management-outbound-details-page.d.ts +4 -0
  334. package/lib/esm/widgets/connector-management/c4-connector-management-outbound-details-page.js +59 -0
  335. package/lib/esm/widgets/connector-management/c4-connector-management-outbound-details-page.types.d.ts +18 -0
  336. package/lib/esm/widgets/connector-management/c4-connector-management-outbound-details-page.types.js +6 -0
  337. package/lib/esm/widgets/connector-management/c4-connector-management-page.d.ts +1 -1
  338. package/lib/esm/widgets/connector-management/c4-connector-management-page.js +38 -5
  339. package/lib/esm/widgets/connector-management/c4-connector-management-page.spec.js +86 -0
  340. package/lib/esm/widgets/connector-management/c4-connector-management-page.types.d.ts +11 -0
  341. package/lib/esm/widgets/connector-management/c4-connector-management.shared.d.ts +1 -0
  342. package/lib/esm/widgets/connector-management/c4-connector-management.shared.js +14 -5
  343. package/lib/esm/widgets/create-cluster/c4-create-cluster-page.js +1 -1
  344. package/lib/esm/widgets/dashboard/c4-dashboard-app.js +21 -2
  345. package/lib/esm/widgets/group-details/c4-group-details-page.js +3 -2
  346. package/lib/esm/widgets/management/c4-management-app.d.ts +1 -1
  347. package/lib/esm/widgets/management/c4-management-app.js +132 -23
  348. package/lib/esm/widgets/management/c4-management-app.spec.js +163 -1
  349. package/lib/esm/widgets/management/c4-management-app.types.d.ts +5 -0
  350. package/lib/esm/widgets/management/c4-management-page.js +1 -6
  351. package/lib/esm/widgets/management/management-tabs.d.ts +22 -0
  352. package/lib/esm/widgets/management/management-tabs.js +76 -0
  353. package/lib/esm/widgets/management/management-tabs.spec.d.ts +1 -0
  354. package/lib/esm/widgets/management/management-tabs.spec.js +28 -0
  355. package/lib/esm/widgets/management/tabs/c4-management-api-tab.js +4 -2
  356. package/lib/esm/widgets/management/tabs/c4-management-billing-tab.js +1 -1
  357. package/lib/esm/widgets/management/tabs/c4-management-groups-tab.js +1 -1
  358. package/lib/esm/widgets/management/tabs/c4-management-overview-tab.d.ts +3 -1
  359. package/lib/esm/widgets/management/tabs/c4-management-overview-tab.js +19 -3
  360. package/lib/esm/widgets/management/tabs/c4-management-pricing-tab.js +2 -1
  361. package/lib/esm/widgets/management/tabs/c4-management-settings-tab.js +1 -1
  362. package/lib/esm/widgets/management/tabs/c4-management-usage-tab.d.ts +1 -1
  363. package/lib/esm/widgets/management/tabs/c4-management-usage-tab.js +13 -11
  364. package/lib/esm/widgets/management/tabs/c4-management-users-tab.js +37 -5
  365. package/lib/esm/widgets/management/tabs/c4-management-users-tab.spec.js +98 -0
  366. package/lib/esm/widgets/use-extend-trial.d.ts +8 -0
  367. package/lib/esm/widgets/use-extend-trial.js +36 -0
  368. package/lib/esm/widgets/use-extend-trial.spec.d.ts +1 -0
  369. package/lib/esm/widgets/use-extend-trial.spec.js +79 -0
  370. package/lib/esm/widgets/user-details/c4-user-details-page.js +5 -14
  371. package/package.json +16 -7
@@ -0,0 +1,85 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Form, PasswordInput } from '@carbon/react';
3
+ import { useEffect, useState } from 'react';
4
+ import { Checkbox, Modal, Stack, TextInput } from '../../../ui/index.js';
5
+ import { C4InlineNotification } from '../../c4-inline-notification/c4-inline-notification.js';
6
+ // ponytail: English placeholder copy — final UX copy + lockout wording are a Product
7
+ // Design action item (design §1). Kept inline until it lands.
8
+ const NAME_PATTERN = /^[A-Z][A-Z0-9]*$/;
9
+ function isValidUrl(value) {
10
+ try {
11
+ return Boolean(new URL(value));
12
+ }
13
+ catch {
14
+ return false;
15
+ }
16
+ }
17
+ export const ExternalIdentityProviderModal = ({ open, initialConfig, saving, error, onClose, onSubmit, }) => {
18
+ const isEdit = Boolean(initialConfig);
19
+ const [name, setName] = useState('');
20
+ const [clientName, setClientName] = useState('');
21
+ const [issuerUri, setIssuerUri] = useState('');
22
+ const [clientId, setClientId] = useState('');
23
+ const [clientSecret, setClientSecret] = useState('');
24
+ const [scopes, setScopes] = useState('openid profile');
25
+ const [usernameClaim, setUsernameClaim] = useState('sub');
26
+ const [groupsClaim, setGroupsClaim] = useState('');
27
+ const [clientIdClaim, setClientIdClaim] = useState('');
28
+ const [lockoutAck, setLockoutAck] = useState(false);
29
+ const [showErrors, setShowErrors] = useState(false);
30
+ // Reset the form each time the modal opens so stale values never leak between edits.
31
+ useEffect(() => {
32
+ if (!open)
33
+ return;
34
+ setName(initialConfig?.name ?? '');
35
+ setClientName(initialConfig?.clientName ?? '');
36
+ setIssuerUri(initialConfig?.issuerUri ?? '');
37
+ setClientId(initialConfig?.clientId ?? '');
38
+ setClientSecret('');
39
+ setScopes((initialConfig?.scopes ?? ['openid', 'profile']).join(' '));
40
+ setUsernameClaim(initialConfig?.usernameClaim ?? 'sub');
41
+ setGroupsClaim(initialConfig?.groupsClaim ?? '');
42
+ setClientIdClaim(initialConfig?.clientIdClaim ?? '');
43
+ setLockoutAck(false);
44
+ setShowErrors(false);
45
+ }, [open, initialConfig]);
46
+ const nameInvalid = !NAME_PATTERN.test(name);
47
+ const clientNameInvalid = clientName.trim().length === 0;
48
+ const issuerInvalid = !isValidUrl(issuerUri);
49
+ const clientIdInvalid = clientId.trim().length === 0;
50
+ // Secret required on first configuration; on edit, blank means "keep current".
51
+ const secretInvalid = !isEdit && clientSecret.length === 0;
52
+ const handleSubmit = () => {
53
+ setShowErrors(true);
54
+ if (nameInvalid ||
55
+ clientNameInvalid ||
56
+ issuerInvalid ||
57
+ clientIdInvalid ||
58
+ secretInvalid ||
59
+ !lockoutAck) {
60
+ return;
61
+ }
62
+ const parsedScopes = scopes
63
+ .split(/\s+/)
64
+ .map((s) => s.trim())
65
+ .filter(Boolean);
66
+ onSubmit({
67
+ config: {
68
+ name,
69
+ clientName: clientName.trim(),
70
+ issuerUri: issuerUri.trim(),
71
+ clientId: clientId.trim(),
72
+ scopes: parsedScopes.length > 0 ? parsedScopes : undefined,
73
+ usernameClaim: usernameClaim.trim() || undefined,
74
+ groupsClaim: groupsClaim.trim() || undefined,
75
+ clientIdClaim: clientIdClaim.trim() || undefined,
76
+ },
77
+ clientSecret: clientSecret.length > 0 ? clientSecret : undefined,
78
+ });
79
+ };
80
+ return (_jsx(Modal, { open: open, modalHeading: isEdit
81
+ ? 'Edit external identity provider'
82
+ : 'Configure external identity provider', primaryButtonText: 'Save', secondaryButtonText: 'Cancel', primaryButtonDisabled: saving, onRequestClose: onClose, onRequestSubmit: handleSubmit, id: 'c4-external-identity-provider-modal', size: 'sm', children: _jsxs(Stack, { gap: 6, children: [error && (_jsx(C4InlineNotification, { kind: 'error', title: 'Error', subtitle: error, hideCloseButton: true, lowContrast: true })), _jsx(Form, { noValidate: true, children: _jsxs(Stack, { gap: 5, children: [_jsx(TextInput, { id: 'c4-idp-name', labelText: 'Name (identifier)', helperText: 'Uppercase letters and digits, starting with a letter (e.g. ACMESSO).', value: name, disabled: saving || isEdit, invalid: showErrors && nameInvalid, invalidText: 'Must match ^[A-Z][A-Z0-9]*$', onChange: (e) => setName(e.target.value.toUpperCase()) }), _jsx(TextInput, { id: 'c4-idp-client-name', labelText: 'Display name', helperText: 'Shown on the login screen.', value: clientName, disabled: saving, invalid: showErrors && clientNameInvalid, invalidText: 'Display name is required', onChange: (e) => setClientName(e.target.value) }), _jsx(TextInput, { id: 'c4-idp-issuer', labelText: 'Issuer URL', value: issuerUri, disabled: saving, invalid: showErrors && issuerInvalid, invalidText: 'Enter a valid URL', onChange: (e) => setIssuerUri(e.target.value) }), _jsx(TextInput, { id: 'c4-idp-client-id', labelText: 'Client ID', value: clientId, disabled: saving, invalid: showErrors && clientIdInvalid, invalidText: 'Client ID is required', onChange: (e) => setClientId(e.target.value) }), _jsx(PasswordInput, { id: 'c4-idp-client-secret', labelText: 'Client secret', helperText: isEdit
83
+ ? 'Leave blank to keep the current secret.'
84
+ : 'Stored securely; never displayed after saving.', value: clientSecret, disabled: saving, invalid: showErrors && secretInvalid, invalidText: 'Client secret is required', onChange: (e) => setClientSecret(e.target.value) }), _jsx(TextInput, { id: 'c4-idp-scopes', labelText: 'Scopes', helperText: 'Space-separated. Defaults to "openid profile".', value: scopes, disabled: saving, onChange: (e) => setScopes(e.target.value) }), _jsx(TextInput, { id: 'c4-idp-username-claim', labelText: 'Username claim', helperText: 'Defaults to "sub".', value: usernameClaim, disabled: saving, onChange: (e) => setUsernameClaim(e.target.value) }), _jsx(TextInput, { id: 'c4-idp-groups-claim', labelText: 'Groups claim (optional)', value: groupsClaim, disabled: saving, onChange: (e) => setGroupsClaim(e.target.value) }), _jsx(TextInput, { id: 'c4-idp-client-id-claim', labelText: 'Client ID claim (optional)', value: clientIdClaim, disabled: saving, onChange: (e) => setClientIdClaim(e.target.value) }), _jsx(Checkbox, { id: 'c4-idp-lockout-ack', labelText: 'I understand that a misconfigured identity provider can lock users out of this cluster.', checked: lockoutAck, disabled: saving, invalid: showErrors && !lockoutAck, invalidText: 'Please confirm you understand the lockout risk', onChange: (_e, { checked }) => setLockoutAck(checked) })] }) })] }) }));
85
+ };
@@ -0,0 +1 @@
1
+ import '@testing-library/jest-dom/vitest';
@@ -0,0 +1,93 @@
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 userEvent from '@testing-library/user-event';
10
+ import { describe, expect, it, vi } from 'vitest';
11
+ import { ExternalIdentityProviderModal, } from './external-identity-provider-modal.js';
12
+ function makeProps(overrides = {}) {
13
+ return {
14
+ open: true,
15
+ onClose: vi.fn(),
16
+ onSubmit: vi.fn(),
17
+ ...overrides,
18
+ };
19
+ }
20
+ async function fillValidForm(user) {
21
+ await user.type(screen.getByLabelText(/Name \(identifier\)/), 'ACMESSO');
22
+ await user.type(screen.getByLabelText('Display name'), 'Acme SSO');
23
+ await user.type(screen.getByLabelText('Issuer URL'), 'https://issuer.acme');
24
+ await user.type(screen.getByLabelText('Client ID'), 'client-123');
25
+ await user.type(screen.getByLabelText('Client secret'), 's3cret');
26
+ }
27
+ describe('ExternalIdentityProviderModal', () => {
28
+ it('does not submit when required fields are missing', async () => {
29
+ const onSubmit = vi.fn();
30
+ render(_jsx(ExternalIdentityProviderModal, { ...makeProps({ onSubmit }) }));
31
+ await userEvent.click(screen.getByRole('button', { name: 'Save' }));
32
+ expect(onSubmit).not.toHaveBeenCalled();
33
+ });
34
+ it('requires the lockout acknowledgement before submitting', async () => {
35
+ const user = userEvent.setup();
36
+ const onSubmit = vi.fn();
37
+ render(_jsx(ExternalIdentityProviderModal, { ...makeProps({ onSubmit }) }));
38
+ await fillValidForm(user);
39
+ // No lockout checkbox → blocked
40
+ await user.click(screen.getByRole('button', { name: 'Save' }));
41
+ expect(onSubmit).not.toHaveBeenCalled();
42
+ });
43
+ it('submits parsed values including the secret on first configuration', async () => {
44
+ const user = userEvent.setup();
45
+ const onSubmit = vi.fn();
46
+ render(_jsx(ExternalIdentityProviderModal, { ...makeProps({ onSubmit }) }));
47
+ await fillValidForm(user);
48
+ await user.click(screen.getByRole('checkbox'));
49
+ await user.click(screen.getByRole('button', { name: 'Save' }));
50
+ expect(onSubmit).toHaveBeenCalledTimes(1);
51
+ expect(onSubmit).toHaveBeenCalledWith({
52
+ config: expect.objectContaining({
53
+ name: 'ACMESSO',
54
+ clientName: 'Acme SSO',
55
+ issuerUri: 'https://issuer.acme',
56
+ clientId: 'client-123',
57
+ scopes: ['openid', 'profile'],
58
+ usernameClaim: 'sub',
59
+ }),
60
+ clientSecret: 's3cret',
61
+ });
62
+ });
63
+ it('rejects an invalid name pattern', async () => {
64
+ const user = userEvent.setup();
65
+ const onSubmit = vi.fn();
66
+ render(_jsx(ExternalIdentityProviderModal, { ...makeProps({ onSubmit }) }));
67
+ await user.type(screen.getByLabelText(/Name \(identifier\)/), '1bad'); // starts with digit
68
+ await user.type(screen.getByLabelText('Display name'), 'Acme SSO');
69
+ await user.type(screen.getByLabelText('Issuer URL'), 'https://issuer.acme');
70
+ await user.type(screen.getByLabelText('Client ID'), 'client-123');
71
+ await user.type(screen.getByLabelText('Client secret'), 's3cret');
72
+ await user.click(screen.getByRole('checkbox'));
73
+ await user.click(screen.getByRole('button', { name: 'Save' }));
74
+ expect(onSubmit).not.toHaveBeenCalled();
75
+ });
76
+ it('on edit, allows a blank secret ("keep current") and omits clientSecret', async () => {
77
+ const user = userEvent.setup();
78
+ const onSubmit = vi.fn();
79
+ render(_jsx(ExternalIdentityProviderModal, { ...makeProps({
80
+ onSubmit,
81
+ initialConfig: {
82
+ name: 'ACMESSO',
83
+ clientName: 'Acme SSO',
84
+ issuerUri: 'https://issuer.acme',
85
+ clientId: 'client-123',
86
+ },
87
+ }) }));
88
+ await user.click(screen.getByRole('checkbox'));
89
+ await user.click(screen.getByRole('button', { name: 'Save' }));
90
+ expect(onSubmit).toHaveBeenCalledTimes(1);
91
+ expect(onSubmit.mock.calls[0][0].clientSecret).toBeUndefined();
92
+ });
93
+ });
@@ -0,0 +1,20 @@
1
+ import type { JSX, ReactNode } from 'react';
2
+ export interface ExternalIdentityProviderProps {
3
+ enabled: boolean;
4
+ configured: boolean;
5
+ displayName?: string;
6
+ /** Opens the configure/edit modal. `label` is "Configure" or "Edit". */
7
+ action: {
8
+ label: string;
9
+ onClick: () => void;
10
+ };
11
+ onToggle: () => void;
12
+ permissions: {
13
+ mayToggle: boolean;
14
+ mayEdit: boolean;
15
+ };
16
+ description: ReactNode;
17
+ /** Status line, e.g. "Configured: Acme SSO" / "Not configured". */
18
+ statusText: string;
19
+ }
20
+ export declare const ExternalIdentityProvider: ({ enabled, action, onToggle, permissions, description, statusText, }: ExternalIdentityProviderProps) => JSX.Element;
@@ -0,0 +1,15 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { C4Toggle } from '../../c4-toggle/c4-toggle.js';
3
+ export const ExternalIdentityProvider = ({ enabled, action, onToggle, permissions, description, statusText, }) => {
4
+ return (_jsx(C4Toggle, { id: 'external-identity-provider-toggle', enabled: enabled, supported: true, title: 'External identity provider', notices: [
5
+ { notice: description },
6
+ {
7
+ notice: statusText,
8
+ action: permissions.mayEdit
9
+ ? { label: action.label, onClick: action.onClick }
10
+ : undefined,
11
+ },
12
+ ], onClick: onToggle, permissions: {
13
+ mayToggle: permissions.mayToggle,
14
+ } }));
15
+ };
@@ -0,0 +1 @@
1
+ import '@testing-library/jest-dom/vitest';
@@ -0,0 +1,50 @@
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 userEvent from '@testing-library/user-event';
10
+ import { describe, expect, it, vi } from 'vitest';
11
+ import { ExternalIdentityProvider, } from './external-identity-provider.js';
12
+ function makeProps(overrides = {}) {
13
+ return {
14
+ enabled: false,
15
+ configured: false,
16
+ action: { label: 'Configure', onClick: vi.fn() },
17
+ onToggle: vi.fn(),
18
+ permissions: { mayToggle: true, mayEdit: true },
19
+ description: _jsx("p", { children: "Register a custom OIDC provider." }),
20
+ statusText: 'Not configured',
21
+ ...overrides,
22
+ };
23
+ }
24
+ describe('ExternalIdentityProvider', () => {
25
+ it('renders the title and status text', () => {
26
+ render(_jsx(ExternalIdentityProvider, { ...makeProps() }));
27
+ expect(screen.getByRole('heading', { name: 'External identity provider' })).toBeInTheDocument();
28
+ expect(screen.getByText('Not configured')).toBeInTheDocument();
29
+ });
30
+ it('invokes onToggle when toggled', async () => {
31
+ const onToggle = vi.fn();
32
+ render(_jsx(ExternalIdentityProvider, { ...makeProps({ onToggle }) }));
33
+ await userEvent.click(screen.getByLabelText('Switch External identity provider'));
34
+ expect(onToggle).toHaveBeenCalledTimes(1);
35
+ });
36
+ it('shows the configure/edit action when mayEdit is true', async () => {
37
+ const onClick = vi.fn();
38
+ render(_jsx(ExternalIdentityProvider, { ...makeProps({ action: { label: 'Edit', onClick } }) }));
39
+ await userEvent.click(screen.getByText('Edit'));
40
+ expect(onClick).toHaveBeenCalledTimes(1);
41
+ });
42
+ it('hides the action when mayEdit is false', () => {
43
+ render(_jsx(ExternalIdentityProvider, { ...makeProps({ permissions: { mayToggle: true, mayEdit: false } }) }));
44
+ expect(screen.queryByText('Configure')).not.toBeInTheDocument();
45
+ });
46
+ it('disables the toggle when mayToggle is false', () => {
47
+ render(_jsx(ExternalIdentityProvider, { ...makeProps({ permissions: { mayToggle: false, mayEdit: true } }) }));
48
+ expect(screen.getByLabelText('Switch External identity provider')).toBeDisabled();
49
+ });
50
+ });
@@ -1,9 +1,15 @@
1
1
  import { type JSX } from 'react';
2
2
  export interface OptimizeFilteringConfig {
3
- includeProcessIds?: string[] | null;
4
- excludeProcessIds?: string[] | null;
5
- includeVariableNames?: string[] | null;
6
- excludeVariableNames?: string[] | null;
3
+ processDefinition?: {
4
+ inclusion?: string[];
5
+ exclusion?: string[];
6
+ };
7
+ variableName?: {
8
+ startWith?: {
9
+ inclusion?: string[];
10
+ exclusion?: string[];
11
+ };
12
+ };
7
13
  }
8
14
  export interface OptimizeFilteringSettingsProps {
9
15
  /** undefined = filtering deactivated / not configured */
@@ -4,38 +4,67 @@ 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 { Button, Stack, TextArea } from '@carbon/react';
8
- import { useEffect, useState } from 'react';
7
+ import { useEffect, useRef, useState } from 'react';
8
+ import { Button, Stack, TextArea } from '../../../ui/index.js';
9
9
  import { C4Divider } from '../../c4-divider/c4-divider.js';
10
10
  import { C4Toggle } from '../../c4-toggle/c4-toggle.js';
11
+ // ponytail: FILTER_VALUE_RE / MAX_FILTER_VALUE_LENGTH are duplicated in
12
+ // apps/console-backend/src/routes/ClusterRouter.ts (c4 stays free of shared-types
13
+ // deps, so a single regex isn't worth a shared package). Keep the two in sync.
14
+ const FILTER_VALUE_RE = /^[A-Za-z_][A-Za-z0-9_.-]*$/;
15
+ const MAX_FILTER_VALUE_LENGTH = 255;
16
+ // Returns an error message for the first invalid value, else undefined.
17
+ function validateValues(values) {
18
+ for (const value of values) {
19
+ if (value.length > MAX_FILTER_VALUE_LENGTH) {
20
+ return `Each value must be ${MAX_FILTER_VALUE_LENGTH} characters or fewer.`;
21
+ }
22
+ if (!FILTER_VALUE_RE.test(value)) {
23
+ return 'Values may only contain letters, digits, ., - and _, and must start with a letter or underscore.';
24
+ }
25
+ }
26
+ return undefined;
27
+ }
11
28
  function patternsToText(patterns) {
12
29
  return patterns?.join('\n') ?? '';
13
30
  }
31
+ // Split on any whitespace (spaces, tabs, newlines) — process IDs and variable-name
32
+ // prefixes never contain whitespace, so this lets users separate terms however is
33
+ // natural without having to know newlines are required.
14
34
  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;
35
+ return text.split(/\s+/).filter(Boolean);
20
36
  }
21
37
  export const OptimizeFilteringSettings = ({ filtering, permissions, onToggle, onSave, }) => {
22
38
  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));
39
+ const [includeProcessIds, setIncludeProcessIds] = useState(patternsToText(filtering?.processDefinition?.inclusion));
40
+ const [excludeProcessIds, setExcludeProcessIds] = useState(patternsToText(filtering?.processDefinition?.exclusion));
41
+ const [includeVariableNames, setIncludeVariableNames] = useState(patternsToText(filtering?.variableName?.startWith?.inclusion));
42
+ const [excludeVariableNames, setExcludeVariableNames] = useState(patternsToText(filtering?.variableName?.startWith?.exclusion));
27
43
  const [isSaving, setIsSaving] = useState(false);
28
44
  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.
45
+ const [errors, setErrors] = useState({});
46
+ // Text fields are the local source of truth while the panel is open: we edit
47
+ // strings and only split to pattern arrays on save. We deliberately do NOT
48
+ // re-derive them from `filtering` on every prop change — that would clobber
49
+ // in-progress edits whenever a background cluster update lands. Instead we
50
+ // reseed only on the deactivated→active transition (opening the panel), so a
51
+ // toggle-off/on cycle starts from the fresh server config rather than stale
52
+ // local state. Concurrent edits from another session won't appear live; the
53
+ // user sees them after closing and reopening the panel or reloading.
54
+ const wasActive = useRef(isActive);
31
55
  useEffect(() => {
32
- if (isToggling)
56
+ const justOpened = isActive && !wasActive.current;
57
+ wasActive.current = isActive;
58
+ if (!justOpened)
33
59
  return;
34
- setIncludeProcessIds(patternsToText(filtering?.includeProcessIds));
35
- setExcludeProcessIds(patternsToText(filtering?.excludeProcessIds));
36
- setIncludeVariableNames(patternsToText(filtering?.includeVariableNames));
37
- setExcludeVariableNames(patternsToText(filtering?.excludeVariableNames));
38
- }, [filtering, isToggling]);
60
+ setIncludeProcessIds(patternsToText(filtering?.processDefinition?.inclusion));
61
+ setExcludeProcessIds(patternsToText(filtering?.processDefinition?.exclusion));
62
+ setIncludeVariableNames(patternsToText(filtering?.variableName?.startWith?.inclusion));
63
+ setExcludeVariableNames(patternsToText(filtering?.variableName?.startWith?.exclusion));
64
+ // Clear stale validation errors: the component stays mounted across a
65
+ // toggle-off/on cycle, so a fresh server config must start error-free.
66
+ setErrors({});
67
+ }, [isActive, filtering]);
39
68
  const handleToggle = async () => {
40
69
  setIsToggling(true);
41
70
  try {
@@ -49,13 +78,44 @@ export const OptimizeFilteringSettings = ({ filtering, permissions, onToggle, on
49
78
  }
50
79
  };
51
80
  const handleSave = async () => {
81
+ const processInclusion = textToPatterns(includeProcessIds);
82
+ const processExclusion = textToPatterns(excludeProcessIds);
83
+ const variableInclusion = textToPatterns(includeVariableNames);
84
+ const variableExclusion = textToPatterns(excludeVariableNames);
85
+ // #57192: enabled + all fields empty must not be saved as a no-op filter set.
86
+ const isEmpty = processInclusion.length === 0 &&
87
+ processExclusion.length === 0 &&
88
+ variableInclusion.length === 0 &&
89
+ variableExclusion.length === 0;
90
+ if (isEmpty) {
91
+ setErrors({ form: 'Enter at least one filter value.' });
92
+ return;
93
+ }
94
+ // #57194: reject invalid characters / over-length values.
95
+ const nextErrors = {
96
+ includeProcessIds: validateValues(processInclusion),
97
+ excludeProcessIds: validateValues(processExclusion),
98
+ includeVariableNames: validateValues(variableInclusion),
99
+ excludeVariableNames: validateValues(variableExclusion),
100
+ };
101
+ if (Object.values(nextErrors).some(Boolean)) {
102
+ setErrors(nextErrors);
103
+ return;
104
+ }
105
+ setErrors({});
52
106
  setIsSaving(true);
53
107
  try {
54
108
  await onSave({
55
- includeProcessIds: textToPatterns(includeProcessIds),
56
- excludeProcessIds: textToPatterns(excludeProcessIds),
57
- includeVariableNames: textToPatterns(includeVariableNames),
58
- excludeVariableNames: textToPatterns(excludeVariableNames),
109
+ processDefinition: {
110
+ inclusion: processInclusion,
111
+ exclusion: processExclusion,
112
+ },
113
+ variableName: {
114
+ startWith: {
115
+ inclusion: variableInclusion,
116
+ exclusion: variableExclusion,
117
+ },
118
+ },
59
119
  });
60
120
  }
61
121
  finally {
@@ -65,11 +125,43 @@ export const OptimizeFilteringSettings = ({ filtering, permissions, onToggle, on
65
125
  const isPending = isToggling || isSaving;
66
126
  return (_jsxs(Stack, { gap: 6, children: [_jsx(C4Toggle, { id: 'optimize-filtering-toggle', supported: true, enabled: isActive, title: 'Enable data filters', notices: [
67
127
  {
68
- notice: 'When enabled, the Optimize exporter will only process data matching the configured include/exclude patterns. Patterns support wildcards (e.g. business_*).',
128
+ notice: 'When enabled, the Optimize exporter will only process data matching the configured include/exclude filters.',
69
129
  },
70
130
  ], onClick: handleToggle, permissions: { mayToggle: permissions.mayChange && !isPending } }), isActive && (_jsxs(_Fragment, { children: [_jsx(C4Divider, {}), _jsx("p", { style: {
71
131
  color: 'var(--cds-text-secondary)',
72
132
  fontSize: 'var(--cds-body-compact-01-font-size)',
73
133
  maxWidth: '650px',
74
- }, children: "Enter one pattern per line. Wildcards (*) are supported." }), _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' }) }))] })] }))] }));
134
+ }, children: "Separate values with spaces or new lines." }), _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) => {
135
+ setIncludeProcessIds(e.target.value);
136
+ setErrors((prev) => ({
137
+ ...prev,
138
+ includeProcessIds: undefined,
139
+ form: undefined,
140
+ }));
141
+ }, disabled: !permissions.mayChange || isPending, invalid: !!errors.includeProcessIds, invalidText: errors.includeProcessIds, 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) => {
142
+ setExcludeProcessIds(e.target.value);
143
+ setErrors((prev) => ({
144
+ ...prev,
145
+ excludeProcessIds: undefined,
146
+ form: undefined,
147
+ }));
148
+ }, disabled: !permissions.mayChange || isPending, invalid: !!errors.excludeProcessIds, invalidText: errors.excludeProcessIds, rows: 3 }), _jsx(TextArea, { id: 'optimize-include-variable-names', labelText: 'Include variable names', helperText: 'Only variables whose names start with one of these prefixes will be exported (e.g. business_ matches business_amount).', value: includeVariableNames, onChange: (e) => {
149
+ setIncludeVariableNames(e.target.value);
150
+ setErrors((prev) => ({
151
+ ...prev,
152
+ includeVariableNames: undefined,
153
+ form: undefined,
154
+ }));
155
+ }, disabled: !permissions.mayChange || isPending, invalid: !!errors.includeVariableNames, invalidText: errors.includeVariableNames, rows: 3 }), _jsx(TextArea, { id: 'optimize-exclude-variable-names', labelText: 'Exclude variable names', helperText: 'Variables whose names start with one of these prefixes will not be exported. Exclusion takes precedence over inclusion.', value: excludeVariableNames, onChange: (e) => {
156
+ setExcludeVariableNames(e.target.value);
157
+ setErrors((prev) => ({
158
+ ...prev,
159
+ excludeVariableNames: undefined,
160
+ form: undefined,
161
+ }));
162
+ }, disabled: !permissions.mayChange || isPending, invalid: !!errors.excludeVariableNames, invalidText: errors.excludeVariableNames, rows: 3 }), permissions.mayChange && (_jsxs("div", { children: [errors.form && (_jsx("p", { role: 'alert', style: {
163
+ color: 'var(--cds-text-error)',
164
+ fontSize: 'var(--cds-body-compact-01-font-size)',
165
+ marginBottom: 'var(--cds-spacing-03)',
166
+ }, children: errors.form })), _jsx(Button, { size: 'md', kind: 'primary', onClick: handleSave, disabled: isPending, children: isSaving ? 'Saving…' : 'Save filters' })] }))] })] }))] }));
75
167
  };
@@ -0,0 +1 @@
1
+ import '@testing-library/jest-dom/vitest';
@@ -0,0 +1,120 @@
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 userEvent from '@testing-library/user-event';
10
+ import { describe, expect, it, vi } from 'vitest';
11
+ import { OptimizeFilteringSettings, } from './optimize-filtering-settings.js';
12
+ function makeProps(overrides = {}) {
13
+ return {
14
+ filtering: {},
15
+ permissions: { mayChange: true },
16
+ onToggle: vi.fn().mockResolvedValue(undefined),
17
+ onSave: vi.fn().mockResolvedValue(undefined),
18
+ ...overrides,
19
+ };
20
+ }
21
+ describe('OptimizeFilteringSettings', () => {
22
+ it('does not overwrite in-progress edits when the filtering prop changes underneath', async () => {
23
+ const user = userEvent.setup();
24
+ const { rerender } = render(_jsx(OptimizeFilteringSettings, { ...makeProps({
25
+ filtering: { processDefinition: { inclusion: ['order-process'] } },
26
+ }) }));
27
+ const includeProcesses = screen.getByLabelText('Include process definitions');
28
+ await user.clear(includeProcesses);
29
+ await user.type(includeProcesses, 'my-edit');
30
+ // A background cluster update arrives (new object identity, different data).
31
+ rerender(_jsx(OptimizeFilteringSettings, { ...makeProps({
32
+ filtering: { processDefinition: { inclusion: ['something-else'] } },
33
+ }) }));
34
+ expect(includeProcesses).toHaveValue('my-edit');
35
+ });
36
+ it('reseeds text fields from the server when the panel is (re)opened', () => {
37
+ const { rerender } = render(_jsx(OptimizeFilteringSettings, { ...makeProps({
38
+ filtering: { processDefinition: { inclusion: ['stale-value'] } },
39
+ }) }));
40
+ // Toggle off: panel collapses, local edit state is retained by React.
41
+ rerender(_jsx(OptimizeFilteringSettings, { ...makeProps({ filtering: undefined }) }));
42
+ // Toggle on again with a fresh (empty) server config.
43
+ rerender(_jsx(OptimizeFilteringSettings, { ...makeProps({ filtering: {} }) }));
44
+ expect(screen.getByLabelText('Include process definitions')).toHaveValue('');
45
+ });
46
+ it('converts whitespace-separated text to pattern arrays only on save', async () => {
47
+ const user = userEvent.setup();
48
+ const onSave = vi.fn().mockResolvedValue(undefined);
49
+ render(_jsx(OptimizeFilteringSettings, { ...makeProps({ onSave }) }));
50
+ await user.type(screen.getByLabelText('Include process definitions'), 'a b\nc');
51
+ await user.click(screen.getByRole('button', { name: 'Save filters' }));
52
+ expect(onSave).toHaveBeenCalledWith(expect.objectContaining({
53
+ processDefinition: expect.objectContaining({
54
+ inclusion: ['a', 'b', 'c'],
55
+ }),
56
+ }));
57
+ });
58
+ it('blocks save and shows an error when all fields are empty (#57192)', async () => {
59
+ const user = userEvent.setup();
60
+ const onSave = vi.fn().mockResolvedValue(undefined);
61
+ render(_jsx(OptimizeFilteringSettings, { ...makeProps({ onSave }) }));
62
+ await user.click(screen.getByRole('button', { name: 'Save filters' }));
63
+ expect(onSave).not.toHaveBeenCalled();
64
+ expect(screen.getByText('Enter at least one filter value.')).toBeInTheDocument();
65
+ });
66
+ it('blocks save when a value contains invalid characters (#57194)', async () => {
67
+ const user = userEvent.setup();
68
+ const onSave = vi.fn().mockResolvedValue(undefined);
69
+ render(_jsx(OptimizeFilteringSettings, { ...makeProps({ onSave }) }));
70
+ await user.type(screen.getByLabelText('Include process definitions'), 'bad@id');
71
+ await user.click(screen.getByRole('button', { name: 'Save filters' }));
72
+ expect(onSave).not.toHaveBeenCalled();
73
+ expect(screen.getByText(/may only contain letters/)).toBeInTheDocument();
74
+ });
75
+ it('blocks save when a value exceeds the maximum length (#57194)', async () => {
76
+ const user = userEvent.setup();
77
+ const onSave = vi.fn().mockResolvedValue(undefined);
78
+ render(_jsx(OptimizeFilteringSettings, { ...makeProps({ onSave }) }));
79
+ await user.type(screen.getByLabelText('Include variable names'), 'a'.repeat(256));
80
+ await user.click(screen.getByRole('button', { name: 'Save filters' }));
81
+ expect(onSave).not.toHaveBeenCalled();
82
+ expect(screen.getByText(/255 characters or fewer/)).toBeInTheDocument();
83
+ });
84
+ it('drops stale validation errors when the panel is toggled off and on', async () => {
85
+ const user = userEvent.setup();
86
+ const { rerender } = render(_jsx(OptimizeFilteringSettings, { ...makeProps({ filtering: {} }) }));
87
+ await user.click(screen.getByRole('button', { name: 'Save filters' }));
88
+ expect(screen.getByText('Enter at least one filter value.')).toBeInTheDocument();
89
+ // Toggle off, then back on with a fresh server config.
90
+ rerender(_jsx(OptimizeFilteringSettings, { ...makeProps({ filtering: undefined }) }));
91
+ rerender(_jsx(OptimizeFilteringSettings, { ...makeProps({ filtering: {} }) }));
92
+ expect(screen.queryByText('Enter at least one filter value.')).not.toBeInTheDocument();
93
+ });
94
+ it('clears an inline field error once the field is edited (#57194)', async () => {
95
+ const user = userEvent.setup();
96
+ const onSave = vi.fn().mockResolvedValue(undefined);
97
+ render(_jsx(OptimizeFilteringSettings, { ...makeProps({ onSave }) }));
98
+ const includeProcesses = screen.getByLabelText('Include process definitions');
99
+ await user.type(includeProcesses, 'bad@id');
100
+ await user.click(screen.getByRole('button', { name: 'Save filters' }));
101
+ expect(screen.getByText(/may only contain letters/)).toBeInTheDocument();
102
+ await user.type(includeProcesses, 'x');
103
+ expect(screen.queryByText(/may only contain letters/)).not.toBeInTheDocument();
104
+ });
105
+ it('clears the empty-form error once a value is entered', async () => {
106
+ const user = userEvent.setup();
107
+ const onSave = vi.fn().mockResolvedValue(undefined);
108
+ render(_jsx(OptimizeFilteringSettings, { ...makeProps({ onSave }) }));
109
+ await user.click(screen.getByRole('button', { name: 'Save filters' }));
110
+ expect(screen.getByText('Enter at least one filter value.')).toBeInTheDocument();
111
+ await user.type(screen.getByLabelText('Include process definitions'), 'order-process');
112
+ expect(screen.queryByText('Enter at least one filter value.')).not.toBeInTheDocument();
113
+ await user.click(screen.getByRole('button', { name: 'Save filters' }));
114
+ expect(onSave).toHaveBeenCalledWith(expect.objectContaining({
115
+ processDefinition: expect.objectContaining({
116
+ inclusion: ['order-process'],
117
+ }),
118
+ }));
119
+ });
120
+ });
@@ -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
  };