@camunda/ccma-saas-frontend 0.0.45 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/esm/components/c4-actionable-notification/c4-actionable-notification.d.ts +20 -3
- package/lib/esm/components/c4-actionable-notification/c4-actionable-notification.js +50 -17
- package/lib/esm/components/c4-advanced-search-filters/ArrayFieldContainer.js +2 -1
- package/lib/esm/components/c4-advanced-search-filters/AutosuggestInput.js +1 -6
- package/lib/esm/components/c4-advanced-search-filters/FieldRow.js +4 -1
- package/lib/esm/components/c4-advanced-search-filters/FiltersSection.js +1 -6
- package/lib/esm/components/c4-advanced-search-filters/OrSection.js +3 -1
- package/lib/esm/components/c4-advanced-search-filters/c4-advanced-search-filters.js +3 -1
- package/lib/esm/components/c4-ai-usage/c4-ai-usage.js +2 -7
- package/lib/esm/components/c4-alpha-cluster-at-checkout/c4-alpha-cluster-at-checkout.js +7 -7
- package/lib/esm/components/c4-app-teaser-card/c4-app-teaster-card.js +1 -6
- package/lib/esm/components/c4-app-teaser-card/c4-app-teaster-card.spec.d.ts +1 -0
- package/lib/esm/components/c4-app-teaser-card/c4-app-teaster-card.spec.js +43 -0
- package/lib/esm/components/c4-app-teaser-cards/c4-app-teaser-cards.js +1 -1
- package/lib/esm/components/c4-async-modal/c4-async-modal.js +3 -2
- package/lib/esm/components/c4-audit-log/c4-audit-log.js +4 -3
- package/lib/esm/components/c4-billing-page/c4-billing-page.js +8 -6
- package/lib/esm/components/c4-billing-page/elements/cluster-reservations.js +9 -14
- package/lib/esm/components/c4-billing-page/elements/current-usage-metrics.js +2 -1
- package/lib/esm/components/c4-billing-page/elements/usage-alerts.js +3 -8
- package/lib/esm/components/c4-billing-page/elements/value-metric.js +2 -1
- package/lib/esm/components/c4-bottom-links/c4-bottom-links.js +1 -6
- package/lib/esm/components/c4-breadcrumb/c4-breadcrumb.js +3 -6
- package/lib/esm/components/c4-charts-dashboard/c4-charts-dashboard.js +1 -1
- package/lib/esm/components/c4-charts-dashboard/elements/alluvial-chart.js +1 -1
- package/lib/esm/components/c4-charts-dashboard/elements/bar-chart.js +1 -1
- package/lib/esm/components/c4-charts-dashboard/elements/line-chart.js +1 -1
- package/lib/esm/components/c4-cluster-byom-clients/c4-cluster-byom-clients.js +6 -10
- package/lib/esm/components/c4-cluster-client-credentials/c4-cluster-client-credentials.js +8 -3
- package/lib/esm/components/c4-cluster-client-credentials-identity/c4-cluster-client-credentials-identity.js +8 -3
- package/lib/esm/components/c4-cluster-details-activity/c4-cluster-details-activity.js +6 -5
- package/lib/esm/components/c4-cluster-details-alerts/c4-cluster-details-alerts.js +12 -14
- package/lib/esm/components/c4-cluster-details-clients/c4-cluster-details-clients.js +6 -10
- package/lib/esm/components/c4-cluster-details-connector-secrets/c4-cluster-details-connector-secrets.js +8 -11
- package/lib/esm/components/c4-cluster-details-encryption/c4-cluster-details-encryption.js +9 -4
- package/lib/esm/components/c4-cluster-details-hot-backups/c4-cluster-details-hot-backups.js +12 -8
- package/lib/esm/components/c4-cluster-details-hot-backups-restore/c4-cluster-details-hot-backups-restore.js +3 -2
- package/lib/esm/components/c4-cluster-details-ip-whitelist/c4-cluster-details-ip-whitelist.js +7 -10
- package/lib/esm/components/c4-cluster-details-secure-connectivity/c4-cluster-details-secure-connectivity.js +15 -21
- package/lib/esm/components/c4-cluster-list/c4-cluster-list.d.ts +1 -1
- package/lib/esm/components/c4-cluster-list/c4-cluster-list.js +19 -5
- package/lib/esm/components/c4-cluster-list/c4-cluster-list.types.d.ts +4 -0
- package/lib/esm/components/c4-cluster-overview/applications.js +2 -1
- package/lib/esm/components/c4-cluster-overview/c4-cluster-overview.js +4 -3
- package/lib/esm/components/c4-cluster-overview/cluster-details.js +12 -10
- package/lib/esm/components/c4-cluster-overview/cluster-load.js +1 -1
- package/lib/esm/components/c4-cluster-settings/c4-cluster-settings.d.ts +1 -1
- package/lib/esm/components/c4-cluster-settings/c4-cluster-settings.js +6 -8
- package/lib/esm/components/c4-cluster-settings/c4-cluster-settings.types.d.ts +4 -0
- package/lib/esm/components/c4-cluster-settings/elements/danger-zone.js +1 -6
- package/lib/esm/components/c4-cluster-settings/elements/optimize-filtering-settings.d.ts +17 -0
- package/lib/esm/components/c4-cluster-settings/elements/optimize-filtering-settings.js +75 -0
- package/lib/esm/components/c4-cluster-settings/elements/resource-based-authorizations.js +2 -7
- package/lib/esm/components/c4-cluster-settings/elements/settings-tile.js +1 -6
- package/lib/esm/components/c4-cluster-settings/elements/tasklist-mode-toggle.js +1 -1
- package/lib/esm/components/c4-cluster-tag-selector/c4-cluster-tag-selector.js +4 -2
- package/lib/esm/components/c4-clusters-empty-state/c4-clusters-empty-state.js +18 -14
- package/lib/esm/components/c4-clusters-empty-state/c4-clusters-empty-state.spec.d.ts +1 -0
- package/lib/esm/components/c4-clusters-empty-state/c4-clusters-empty-state.spec.js +40 -0
- package/lib/esm/components/c4-clusters-empty-state/c4-clusters-empty-state.types.d.ts +2 -0
- package/lib/esm/components/c4-clusters-trial-notification/c4-clusters-trial-notification.js +4 -9
- package/lib/esm/components/c4-clusters-trial-notification/c4-clusters-trial-notification.types.d.ts +2 -0
- package/lib/esm/components/c4-console-dashboard/c4-console-dashboard.js +11 -7
- package/lib/esm/components/c4-console-dashboard/elements/empty-state.js +2 -2
- package/lib/esm/components/c4-create-cluster/c4-create-cluster.js +44 -15
- package/lib/esm/components/c4-create-cluster-api-client-modal/c4-create-cluster-api-client-modal.js +4 -2
- package/lib/esm/components/c4-create-connector-secret-modal/c4-create-connector-secret-modal.js +4 -2
- package/lib/esm/components/c4-create-console-api-client-modal/c4-create-console-api-client-modal.js +2 -1
- package/lib/esm/components/c4-create-trial-organization-modal/c4-create-trial-organization-modal.js +2 -1
- package/lib/esm/components/c4-dashboard-first-launch/c4-dashboard-first-launch.js +1 -6
- package/lib/esm/components/c4-data-table/c4-data-table-skeleton.d.ts +15 -0
- package/lib/esm/components/c4-data-table/c4-data-table-skeleton.js +26 -0
- package/lib/esm/components/c4-data-table/c4-data-table.d.ts +3 -0
- package/lib/esm/components/c4-data-table/c4-data-table.js +194 -0
- package/lib/esm/components/c4-data-table/c4-data-table.spec.d.ts +1 -0
- package/lib/esm/components/c4-data-table/c4-data-table.spec.js +71 -0
- package/lib/esm/components/c4-delete-organization-modal/c4-delete-organization-modal.js +3 -2
- package/lib/esm/components/c4-empty-state/c4-empty-state.d.ts +47 -0
- package/lib/esm/components/c4-empty-state/c4-empty-state.js +33 -0
- package/lib/esm/components/c4-extend-trial-modal/c4-extend-trial-modal.d.ts +3 -0
- package/lib/esm/components/c4-extend-trial-modal/c4-extend-trial-modal.js +51 -0
- package/lib/esm/components/c4-extend-trial-modal/c4-extend-trial-modal.spec.d.ts +1 -0
- package/lib/esm/components/c4-extend-trial-modal/c4-extend-trial-modal.spec.js +33 -0
- package/lib/esm/components/c4-extend-trial-modal/c4-extend-trial-modal.types.d.ts +8 -0
- package/lib/esm/components/c4-extend-trial-modal/c4-extend-trial-modal.types.js +1 -0
- package/lib/esm/components/c4-external-link/c4-external-link.js +1 -6
- package/lib/esm/components/c4-feedback-modal/c4-feedback-modal.d.ts +40 -0
- package/lib/esm/components/c4-feedback-modal/c4-feedback-modal.js +109 -0
- package/lib/esm/components/c4-help-center/c4-help-center.d.ts +50 -0
- package/lib/esm/components/c4-help-center/c4-help-center.js +39 -0
- package/lib/esm/components/c4-inline-notification/c4-inline-notification.d.ts +15 -0
- package/lib/esm/components/c4-inline-notification/c4-inline-notification.js +37 -0
- package/lib/esm/components/c4-invite-user-to-organization-modal/c4-invite-user-to-organization-modal.js +4 -3
- package/lib/esm/components/c4-job-dashboard-details-page/c4-job-dashboard-details-page.js +4 -2
- package/lib/esm/components/c4-job-dashboard-details-page/elements/c4-job-dashboard-chart-heading.js +1 -1
- package/lib/esm/components/c4-job-dashboard-details-page/elements/c4-job-dashboard-error-table.js +3 -8
- package/lib/esm/components/c4-job-dashboard-details-page/elements/c4-job-dashboard-time-chart.js +1 -1
- package/lib/esm/components/c4-job-dashboard-details-page/elements/c4-job-dashboard-worker-table.js +3 -3
- package/lib/esm/components/c4-job-dashboard-entry-point/c4-job-dashboard-entry-point.js +2 -1
- package/lib/esm/components/c4-job-dashboard-overview-page/c4-job-dashboard-overview.js +43 -46
- package/lib/esm/components/c4-job-dashboard-shared/c4-background-fetching-indicator.js +1 -6
- package/lib/esm/components/c4-job-dashboard-shared/c4-job-dashboard-error-handler.js +1 -1
- package/lib/esm/components/c4-job-dashboard-shared/c4-job-dashboard-table-heading-with-tooltip.js +1 -1
- package/lib/esm/components/c4-job-dashboard-shared/c4-job-dashboard-time-range-dropdown.js +1 -1
- package/lib/esm/components/c4-leave-organization-modal/c4-leave-organization-modal.js +1 -6
- package/lib/esm/components/c4-link-button/c4-link-button.js +1 -6
- package/lib/esm/components/c4-llm-usage-meter/c4-llm-usage-meter.js +1 -1
- package/lib/esm/components/c4-management-activity/c4-management-activity.js +7 -9
- package/lib/esm/components/c4-management-api/c4-management-api.js +9 -11
- package/lib/esm/components/c4-management-overview/c4-management-overview.js +8 -12
- package/lib/esm/components/c4-management-settings/c4-management-settings.js +9 -11
- package/lib/esm/components/c4-management-users/c4-management-users.js +4 -9
- package/lib/esm/components/c4-multi-step-modal/c4-multi-step-modal.js +4 -2
- package/lib/esm/components/c4-multi-step-modal-ugly/c4-multi-step-modal-ugly.js +4 -2
- package/lib/esm/components/c4-navigation/c4-navigation.d.ts +55 -0
- package/lib/esm/components/c4-navigation/c4-navigation.js +175 -0
- package/lib/esm/components/c4-old-dashboard/c4-old-dashboard.js +2 -1
- package/lib/esm/components/c4-page-layout/c4-page-layout.d.ts +13 -0
- package/lib/esm/components/c4-page-layout/c4-page-layout.js +23 -0
- package/lib/esm/components/c4-page-template/c4-page-template.js +14 -3
- package/lib/esm/components/c4-permission-error-page/c4-permission-error-page.js +1 -1
- package/lib/esm/components/c4-pricing/c4-pricing.js +3 -7
- package/lib/esm/components/c4-pricing-card/c4-pricing-card.js +1 -1
- package/lib/esm/components/c4-rename-organization-modal/c4-rename-organization-modal.js +1 -1
- package/lib/esm/components/c4-search/c4-search-results.js +2 -1
- package/lib/esm/components/c4-selectable-tile/c4-selectable-tile.d.ts +20 -0
- package/lib/esm/components/c4-selectable-tile/c4-selectable-tile.js +41 -0
- package/lib/esm/components/c4-sm-cluster-details/automation-components.js +2 -1
- package/lib/esm/components/c4-sm-cluster-details/c4-sm-cluster-details.js +1 -6
- package/lib/esm/components/c4-sm-cluster-details/custom-properties.js +4 -8
- package/lib/esm/components/c4-sm-cluster-details/details.js +5 -4
- package/lib/esm/components/c4-sm-cluster-details/zeebe-components.js +2 -1
- package/lib/esm/components/c4-sm-dashboard/c4-sm-dashboard.js +1 -1
- package/lib/esm/components/c4-sm-dashboard/c4-sm-dashboard.types.d.ts +1 -1
- package/lib/esm/components/c4-sm-dashboard/cluster-tile.js +2 -1
- package/lib/esm/components/c4-sm-dashboard/component-tile.js +2 -1
- package/lib/esm/components/c4-sm-dashboard/explore.js +1 -6
- package/lib/esm/components/c4-sm-dashboard/overview.js +1 -1
- package/lib/esm/components/c4-sm-dashboard/usage-tile.js +2 -1
- package/lib/esm/components/c4-stat/c4-stat.js +1 -6
- package/lib/esm/components/c4-stateful-button/c4-stateful-button.js +2 -1
- package/lib/esm/components/c4-structured-list/c4-structured-list.d.ts +21 -0
- package/lib/esm/components/c4-structured-list/c4-structured-list.js +75 -0
- package/lib/esm/components/c4-tabs/c4-tabs.js +2 -1
- package/lib/esm/components/c4-telemetry-page/c4-telemetry-page.js +6 -2
- package/lib/esm/components/c4-telemetry-page/component-metrics.js +1 -6
- package/lib/esm/components/c4-telemetry-page/telemetry-for-component.js +2 -1
- package/lib/esm/components/c4-telemetry-teaser-page/c4-telemetry-teaser-page.js +1 -1
- package/lib/esm/components/c4-theme-switcher/c4-theme-switcher.js +1 -1
- package/lib/esm/components/c4-tile-with-title-and-action/c4-tile-with-title-and-action.js +1 -1
- package/lib/esm/components/c4-toast-notification/c4-toast-notification.d.ts +14 -0
- package/lib/esm/components/c4-toast-notification/c4-toast-notification.js +27 -0
- package/lib/esm/components/c4-toggle/c4-toggle.js +6 -8
- package/lib/esm/components/c4-tutorial-tile/c4-tutorial-tile.js +1 -1
- package/lib/esm/components/c4-usage-alert-update-modal/c4-usage-alert-update-modal.js +4 -2
- package/lib/esm/components/c4-usage-history/c4-usage-history.js +5 -3
- package/lib/esm/components/c4-usage-history/elements/usage-history-charts.js +1 -1
- package/lib/esm/components/c4-usage-metrics-per-cluster/c4-usage-metrics-per-cluster.js +8 -7
- package/lib/esm/components/c4-user-details/c4-user-details.js +2 -2
- package/lib/esm/components/c4-user-details/tabs/authorized-resources.js +1 -1
- package/lib/esm/components/c4-user-details/tabs/details.js +6 -10
- package/lib/esm/components/c4-user-details/tabs/roles.js +3 -8
- package/lib/esm/i18n/c4-console-i18n.js +12 -0
- package/lib/esm/i18n/en/modals/clusters.json +0 -8
- package/lib/esm/i18n/en/pages/clusterdetails.json +5 -1
- package/lib/esm/i18n/en/pages/clusters.json +5 -1
- package/lib/esm/i18n/en/pages/orgmanagement.json +3 -1
- package/lib/esm/index.d.ts +17 -0
- package/lib/esm/index.js +13 -0
- package/lib/esm/runtime/c4-console-authz.d.ts +1 -0
- package/lib/esm/runtime/c4-console-authz.js +2 -1
- package/lib/esm/runtime/c4-console-authz.spec.js +3 -3
- package/lib/esm/runtime/c4-console-runtime-context.d.ts +8 -1
- package/lib/esm/runtime/c4-console-runtime-context.js +50 -1
- package/lib/esm/runtime/c4-console-runtime.types.d.ts +8 -0
- package/lib/esm/ui/c4-modal-dialog.d.ts +14 -0
- package/lib/esm/ui/c4-modal-dialog.js +35 -0
- package/lib/esm/ui/families.d.ts +42 -0
- package/lib/esm/ui/families.js +46 -0
- package/lib/esm/ui/index.d.ts +31 -0
- package/lib/esm/ui/index.js +94 -0
- package/lib/esm/ui/switchable.d.ts +14 -0
- package/lib/esm/ui/switchable.js +27 -0
- package/lib/esm/ui/tabs.d.ts +21 -0
- package/lib/esm/ui/tabs.js +27 -0
- package/lib/esm/widgets/cluster-client-details/c4-cluster-client-details-app.js +7 -5
- package/lib/esm/widgets/cluster-details/c4-cluster-details-app.js +18 -3
- package/lib/esm/widgets/cluster-details/c4-cluster-details-page.js +1 -1
- package/lib/esm/widgets/cluster-details/c4-cluster-details-page.spec.js +2 -0
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-alerts-tab.js +10 -6
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-byom-clients-tab.js +5 -3
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-clients-tab.js +7 -5
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-connector-secrets-tab.js +10 -6
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-hot-backups-tab.d.ts +7 -0
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-hot-backups-tab.js +8 -3
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-hot-backups-tab.spec.js +49 -1
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-ip-whitelist-tab.js +7 -5
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-overview-tab.js +54 -21
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-overview-tab.spec.js +96 -5
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-secure-connectivity-tab.js +12 -9
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-settings-tab.js +58 -4
- package/lib/esm/widgets/clusters/c4-clusters-page.d.ts +1 -1
- package/lib/esm/widgets/clusters/c4-clusters-page.js +276 -40
- package/lib/esm/widgets/clusters/c4-clusters-page.spec.js +220 -0
- package/lib/esm/widgets/clusters/c4-clusters-page.types.d.ts +3 -0
- package/lib/esm/widgets/connector-management/c4-connector-management-executable-details-page.js +1 -1
- package/lib/esm/widgets/connector-management/c4-connector-management-executables-table-page.js +3 -2
- package/lib/esm/widgets/connector-management/c4-connector-management-outbound-details-page.d.ts +4 -0
- package/lib/esm/widgets/connector-management/c4-connector-management-outbound-details-page.js +59 -0
- package/lib/esm/widgets/connector-management/c4-connector-management-outbound-details-page.types.d.ts +18 -0
- package/lib/esm/widgets/connector-management/c4-connector-management-outbound-details-page.types.js +6 -0
- package/lib/esm/widgets/connector-management/c4-connector-management-page.d.ts +1 -1
- package/lib/esm/widgets/connector-management/c4-connector-management-page.js +38 -5
- package/lib/esm/widgets/connector-management/c4-connector-management-page.spec.js +54 -0
- package/lib/esm/widgets/connector-management/c4-connector-management-page.types.d.ts +11 -0
- package/lib/esm/widgets/connector-management/c4-connector-management.shared.d.ts +1 -0
- package/lib/esm/widgets/connector-management/c4-connector-management.shared.js +10 -2
- package/lib/esm/widgets/create-cluster/c4-create-cluster-page.js +1 -1
- package/lib/esm/widgets/job-worker/c4-job-worker.helpers.js +14 -2
- package/lib/esm/widgets/management/c4-management-app.d.ts +1 -1
- package/lib/esm/widgets/management/c4-management-app.js +57 -4
- package/lib/esm/widgets/management/c4-management-app.spec.js +141 -1
- package/lib/esm/widgets/management/c4-management-app.types.d.ts +5 -0
- package/lib/esm/widgets/management/c4-management-page.js +1 -6
- package/lib/esm/widgets/management/tabs/c4-management-api-tab.js +4 -2
- package/lib/esm/widgets/management/tabs/c4-management-billing-tab.js +1 -1
- package/lib/esm/widgets/management/tabs/c4-management-groups-tab.js +1 -1
- package/lib/esm/widgets/management/tabs/c4-management-overview-tab.d.ts +2 -1
- package/lib/esm/widgets/management/tabs/c4-management-overview-tab.js +10 -3
- package/lib/esm/widgets/management/tabs/c4-management-pricing-tab.js +2 -1
- package/lib/esm/widgets/management/tabs/c4-management-settings-tab.js +1 -1
- package/lib/esm/widgets/management/tabs/c4-management-usage-tab.d.ts +1 -1
- package/lib/esm/widgets/management/tabs/c4-management-usage-tab.js +13 -11
- package/lib/esm/widgets/management/tabs/c4-management-users-tab.js +47 -5
- package/lib/esm/widgets/management/tabs/c4-management-users-tab.spec.js +98 -0
- package/lib/esm/widgets/use-extend-trial.d.ts +8 -0
- package/lib/esm/widgets/use-extend-trial.js +36 -0
- package/lib/esm/widgets/use-extend-trial.spec.d.ts +1 -0
- package/lib/esm/widgets/use-extend-trial.spec.js +79 -0
- package/lib/esm/widgets/user-details/c4-user-details-page.js +5 -4
- package/package.json +21 -14
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type JSX } from 'react';
|
|
2
2
|
import type { C4ManagementAppProps } from './c4-management-app.types';
|
|
3
|
-
export declare const C4ManagementApp: (({ orgId, desiredTabId, onTabChange, onNavigate, legacyTabs, userPersonaRole, isLicensingModel2025: isLicensingModel2025Prop, urls, }: C4ManagementAppProps) => JSX.Element) & {
|
|
3
|
+
export declare const C4ManagementApp: (({ orgId, desiredTabId, onTabChange, onNavigate, legacyTabs, userPersonaRole, isLicensingModel2025: isLicensingModel2025Prop, urls, onNeedsReload, }: C4ManagementAppProps) => JSX.Element) & {
|
|
4
4
|
displayName: string;
|
|
5
5
|
};
|
|
@@ -8,17 +8,19 @@ import { C4GroupsList, C4IdentityContextProvider } from '@camunda/c4-identity';
|
|
|
8
8
|
import { useC3Profile } from '@camunda/camunda-composite-components';
|
|
9
9
|
import { AuditLoggerService, ConsoleApiClientsService, ConsoleValueMetricsService, EarlyAccessFeaturesService, HttpError, OrganizationMembersService, OrgsService, UsageAlertsService, } from '@camunda/ccma-api';
|
|
10
10
|
import { checkVersion, getDisplayedSalesPlan, getRevisitedSalesPlanName, OrganizationRole, SseEntity, VersionCheckOperator, } from '@camunda/ccma-shared-types';
|
|
11
|
-
import { Link, Stack } from '@carbon/react';
|
|
12
11
|
import { observer } from 'mobx-react-lite';
|
|
13
12
|
import { useCallback, useEffect, useMemo, useRef, useState, } from 'react';
|
|
14
13
|
import { C4AiUsage } from '../../components/c4-ai-usage/c4-ai-usage.js';
|
|
15
14
|
import { C4DeleteOrganizationModal } from '../../components/c4-delete-organization-modal/c4-delete-organization-modal.js';
|
|
15
|
+
import { C4ExtendTrialModal } from '../../components/c4-extend-trial-modal/c4-extend-trial-modal.js';
|
|
16
16
|
import { C4LeaveOrganizationModal } from '../../components/c4-leave-organization-modal/c4-leave-organization-modal.js';
|
|
17
17
|
import { getC4ManagementUrls } from '../../externalUrls.const.js';
|
|
18
18
|
import { useC4ConsoleData } from '../../runtime/c4-console-data-context.js';
|
|
19
19
|
import { useC4ConsoleRuntime } from '../../runtime/c4-console-runtime-context.js';
|
|
20
20
|
import { toApiConfig } from '../../runtime/to-api-config.js';
|
|
21
21
|
import { toIdentityApiBaseUrl } from '../../runtime/to-identity-api-base-url.js';
|
|
22
|
+
import { Link, Stack } from '../../ui/index.js';
|
|
23
|
+
import { useExtendTrial } from '../use-extend-trial.js';
|
|
22
24
|
import { C4ManagementPage } from './c4-management-page.js';
|
|
23
25
|
import { C4ManagementActivityTab } from './tabs/c4-management-activity-tab.js';
|
|
24
26
|
import { C4ManagementApiTab } from './tabs/c4-management-api-tab.js';
|
|
@@ -472,7 +474,7 @@ function themeNameToClassName(theme) {
|
|
|
472
474
|
return 'g10';
|
|
473
475
|
}
|
|
474
476
|
}
|
|
475
|
-
export const C4ManagementApp = observer(({ orgId, desiredTabId, onTabChange, onNavigate, legacyTabs, userPersonaRole, isLicensingModel2025: isLicensingModel2025Prop, urls, }) => {
|
|
477
|
+
export const C4ManagementApp = observer(({ orgId, desiredTabId, onTabChange, onNavigate, legacyTabs, userPersonaRole, isLicensingModel2025: isLicensingModel2025Prop, urls, onNeedsReload, }) => {
|
|
476
478
|
const runtime = useC4ConsoleRuntime();
|
|
477
479
|
const data = useC4ConsoleData();
|
|
478
480
|
const apiConfig = useMemo(() => toApiConfig(runtime), [runtime]);
|
|
@@ -666,6 +668,14 @@ export const C4ManagementApp = observer(({ orgId, desiredTabId, onTabChange, onN
|
|
|
666
668
|
const [leaveOrganizationOpen, setLeaveOrganizationOpen] = useState(false);
|
|
667
669
|
const [deleteOrganizationOpen, setDeleteOrganizationOpen] = useState(false);
|
|
668
670
|
const [deleteOrganizationError, setDeleteOrganizationError] = useState(false);
|
|
671
|
+
const [isExtendModalOpen, setIsExtendModalOpen] = useState(false);
|
|
672
|
+
const { submit: submitExtendTrial, isSubmitting: isExtendSubmitting, error: extendError, } = useExtendTrial(orgId, {
|
|
673
|
+
onSuccess: () => {
|
|
674
|
+
setIsExtendModalOpen(false);
|
|
675
|
+
onNeedsReload?.();
|
|
676
|
+
},
|
|
677
|
+
});
|
|
678
|
+
const openExtendTrialModal = useCallback(() => setIsExtendModalOpen(true), []);
|
|
669
679
|
const featuresOrgIdRef = useRef(undefined);
|
|
670
680
|
const orgRef = useRef(undefined);
|
|
671
681
|
const featuresRef = useRef([]);
|
|
@@ -2282,6 +2292,47 @@ export const C4ManagementApp = observer(({ orgId, desiredTabId, onTabChange, onN
|
|
|
2282
2292
|
externalUrls.aiUsageDocsUrl,
|
|
2283
2293
|
externalUrls.contactUrl,
|
|
2284
2294
|
]);
|
|
2295
|
+
const canSelfExtendForOverview = useMemo(() => {
|
|
2296
|
+
if (!org)
|
|
2297
|
+
return false;
|
|
2298
|
+
const featureEnabled = runtime.featureFlags?.isEnabled?.('accounts.trialSelfExtend') ?? false;
|
|
2299
|
+
if (!featureEnabled)
|
|
2300
|
+
return false;
|
|
2301
|
+
const isTrial = orgHasSalesPlanType(org, 'trial');
|
|
2302
|
+
const trialStateExpired = getNestedBoolean(org, [
|
|
2303
|
+
'organizationToSalesPlan',
|
|
2304
|
+
'trialStateExpired',
|
|
2305
|
+
]);
|
|
2306
|
+
const trialExpirationDateRaw = getNestedValue(org, [
|
|
2307
|
+
'organizationToSalesPlan',
|
|
2308
|
+
'trialExpirationDate',
|
|
2309
|
+
]);
|
|
2310
|
+
const trialExpirationMs = typeof trialExpirationDateRaw === 'string'
|
|
2311
|
+
? new Date(trialExpirationDateRaw).getTime()
|
|
2312
|
+
: Number.NaN;
|
|
2313
|
+
const deltaMs = Number.isFinite(trialExpirationMs)
|
|
2314
|
+
? trialExpirationMs - Date.now()
|
|
2315
|
+
: undefined;
|
|
2316
|
+
const sevenDaysMs = 7 * 24 * 60 * 60 * 1000;
|
|
2317
|
+
const extensionsUsedRaw = getNestedValue(org, [
|
|
2318
|
+
'organizationToSalesPlan',
|
|
2319
|
+
'trialExtensionsUsed',
|
|
2320
|
+
]);
|
|
2321
|
+
const extensionsUsed = typeof extensionsUsedRaw === 'number' ? extensionsUsedRaw : 0;
|
|
2322
|
+
const canBillingUpdate = getNestedBoolean(org, [
|
|
2323
|
+
'permissions',
|
|
2324
|
+
'org',
|
|
2325
|
+
'billing',
|
|
2326
|
+
'update',
|
|
2327
|
+
]);
|
|
2328
|
+
return (isTrial === true &&
|
|
2329
|
+
trialStateExpired !== true &&
|
|
2330
|
+
typeof deltaMs === 'number' &&
|
|
2331
|
+
deltaMs >= 0 &&
|
|
2332
|
+
deltaMs <= sevenDaysMs &&
|
|
2333
|
+
extensionsUsed < 3 &&
|
|
2334
|
+
canBillingUpdate === true);
|
|
2335
|
+
}, [org, runtime.featureFlags]);
|
|
2285
2336
|
const mergedTabs = useMemo(() => {
|
|
2286
2337
|
const canReadMembers = getNestedBoolean(org, [
|
|
2287
2338
|
'permissions',
|
|
@@ -2457,7 +2508,7 @@ export const C4ManagementApp = observer(({ orgId, desiredTabId, onTabChange, onN
|
|
|
2457
2508
|
params: { orgId, newOrgName: newName },
|
|
2458
2509
|
});
|
|
2459
2510
|
setOrg((current) => current ? { ...current, name: newName } : current);
|
|
2460
|
-
} })),
|
|
2511
|
+
}, onExtendTrial: canSelfExtendForOverview ? openExtendTrialModal : undefined })),
|
|
2461
2512
|
},
|
|
2462
2513
|
{
|
|
2463
2514
|
id: 'users',
|
|
@@ -2784,6 +2835,8 @@ export const C4ManagementApp = observer(({ orgId, desiredTabId, onTabChange, onN
|
|
|
2784
2835
|
setFeatures,
|
|
2785
2836
|
features,
|
|
2786
2837
|
recentlyAcceptedBeta,
|
|
2838
|
+
canSelfExtendForOverview,
|
|
2839
|
+
openExtendTrialModal,
|
|
2787
2840
|
]);
|
|
2788
2841
|
useEffect(() => {
|
|
2789
2842
|
if (loading) {
|
|
@@ -2876,7 +2929,7 @@ export const C4ManagementApp = observer(({ orgId, desiredTabId, onTabChange, onN
|
|
|
2876
2929
|
finally {
|
|
2877
2930
|
setSettingsLoading(false);
|
|
2878
2931
|
}
|
|
2879
|
-
} }), _jsx(C4ManagementPage, { loading: loading, notFound: notFound, tabs: {
|
|
2932
|
+
} }), isExtendModalOpen && (_jsx(C4ExtendTrialModal, { isOpen: isExtendModalOpen, onClose: () => setIsExtendModalOpen(false), onSubmit: submitExtendTrial, isSubmitting: isExtendSubmitting, error: extendError })), _jsx(C4ManagementPage, { loading: loading, notFound: notFound, tabs: {
|
|
2880
2933
|
list: mergedTabs,
|
|
2881
2934
|
desiredTabId: activeTabId,
|
|
2882
2935
|
onChange: (tabId) => {
|
|
@@ -44,6 +44,11 @@ vi.mock('../../components/c4-leave-organization-modal/c4-leave-organization-moda
|
|
|
44
44
|
C4LeaveOrganizationModal: () => null,
|
|
45
45
|
};
|
|
46
46
|
});
|
|
47
|
+
vi.mock('../../components/c4-extend-trial-modal/c4-extend-trial-modal', () => {
|
|
48
|
+
return {
|
|
49
|
+
C4ExtendTrialModal: ({ isOpen, onClose, }) => isOpen ? (_jsxs("div", { children: [_jsx("span", { children: "Extend trial modal" }), _jsx("button", { type: 'button', onClick: onClose, children: "Close extend modal" })] })) : null,
|
|
50
|
+
};
|
|
51
|
+
});
|
|
47
52
|
const mockedOrgsService = OrgsService;
|
|
48
53
|
const mockedEarlyAccessFeaturesService = EarlyAccessFeaturesService;
|
|
49
54
|
vi.mock('./c4-management-page', () => {
|
|
@@ -72,7 +77,7 @@ vi.mock('./tabs/c4-management-billing-tab', () => ({
|
|
|
72
77
|
C4ManagementBillingTab: () => _jsx("div", {}),
|
|
73
78
|
}));
|
|
74
79
|
vi.mock('./tabs/c4-management-overview-tab', () => ({
|
|
75
|
-
C4ManagementOverviewTab: () => _jsx("div", {}),
|
|
80
|
+
C4ManagementOverviewTab: ({ onExtendTrial, }) => (_jsx("div", { children: onExtendTrial ? (_jsx("button", { type: 'button', onClick: onExtendTrial, children: "Extend trial" })) : null })),
|
|
76
81
|
}));
|
|
77
82
|
vi.mock('./tabs/c4-management-pricing-tab', () => ({
|
|
78
83
|
C4ManagementPricingTab: () => _jsx("div", {}),
|
|
@@ -114,6 +119,37 @@ function buildOrgInfo(hasAcceptedBetaTerms) {
|
|
|
114
119
|
},
|
|
115
120
|
};
|
|
116
121
|
}
|
|
122
|
+
function buildTrialOrgInfo({ trialStateExpired = false, daysUntilExpiry = 3, extensionsUsed = 0, canBillingUpdate = true, } = {}) {
|
|
123
|
+
const trialExpirationDate = new Date(Date.now() + daysUntilExpiry * 24 * 60 * 60 * 1000).toISOString();
|
|
124
|
+
return {
|
|
125
|
+
uuid: 'org-1',
|
|
126
|
+
name: 'Trial Org',
|
|
127
|
+
hasAcceptedBetaTerms: false,
|
|
128
|
+
permissions: {
|
|
129
|
+
org: {
|
|
130
|
+
earlyAccessFeatures: {
|
|
131
|
+
read: false,
|
|
132
|
+
update: false,
|
|
133
|
+
},
|
|
134
|
+
settings: {
|
|
135
|
+
delete: false,
|
|
136
|
+
},
|
|
137
|
+
billing: {
|
|
138
|
+
update: canBillingUpdate,
|
|
139
|
+
},
|
|
140
|
+
},
|
|
141
|
+
},
|
|
142
|
+
organizationToSalesPlan: {
|
|
143
|
+
salesPlan: {
|
|
144
|
+
salesPlanType: 'trial',
|
|
145
|
+
},
|
|
146
|
+
trialStateExpired,
|
|
147
|
+
trialExpirationDate,
|
|
148
|
+
trialExtensionsUsed: extensionsUsed,
|
|
149
|
+
limits: {},
|
|
150
|
+
},
|
|
151
|
+
};
|
|
152
|
+
}
|
|
117
153
|
function buildEarlyAccessFeature() {
|
|
118
154
|
return {
|
|
119
155
|
feature: {
|
|
@@ -224,6 +260,84 @@ function renderManagementApp(props = {}) {
|
|
|
224
260
|
identityDocsUrl: '',
|
|
225
261
|
}, orgId: 'org-1', desiredTabId: 'settings', ...props }) }) }));
|
|
226
262
|
}
|
|
263
|
+
function renderTrialApp(orgData, featureEnabled) {
|
|
264
|
+
return render(_jsx(C4ConsoleRuntimeProvider, { config: {
|
|
265
|
+
stage: 'dev',
|
|
266
|
+
auth: {
|
|
267
|
+
getAccessToken: async () => 'token',
|
|
268
|
+
},
|
|
269
|
+
backendUrls: {},
|
|
270
|
+
clickwrap: {
|
|
271
|
+
accessId: 'access-id',
|
|
272
|
+
betaGroupKey: 'beta-group-key',
|
|
273
|
+
},
|
|
274
|
+
user: {
|
|
275
|
+
email: 'owner@example.com',
|
|
276
|
+
name: 'Owner Name',
|
|
277
|
+
sub: 'user-1',
|
|
278
|
+
},
|
|
279
|
+
i18n: {
|
|
280
|
+
t: (key) => key,
|
|
281
|
+
},
|
|
282
|
+
featureFlags: {
|
|
283
|
+
isEnabled: (key) => key === 'accounts.trialSelfExtend' ? featureEnabled : false,
|
|
284
|
+
},
|
|
285
|
+
}, children: _jsx(C4ConsoleDataProvider, { initialState: {
|
|
286
|
+
orgInfo: {
|
|
287
|
+
'org-1': {
|
|
288
|
+
data: orgData,
|
|
289
|
+
isLoading: false,
|
|
290
|
+
error: null,
|
|
291
|
+
lastFetched: new Date(),
|
|
292
|
+
},
|
|
293
|
+
},
|
|
294
|
+
members: {
|
|
295
|
+
'org-1': {
|
|
296
|
+
data: [
|
|
297
|
+
{
|
|
298
|
+
name: 'Owner Name',
|
|
299
|
+
email: 'owner@example.com',
|
|
300
|
+
roles: ['owner'],
|
|
301
|
+
userId: 'user-1',
|
|
302
|
+
},
|
|
303
|
+
],
|
|
304
|
+
isLoading: false,
|
|
305
|
+
error: null,
|
|
306
|
+
lastFetched: new Date(),
|
|
307
|
+
},
|
|
308
|
+
},
|
|
309
|
+
clusters: {
|
|
310
|
+
'org-1': {
|
|
311
|
+
data: [],
|
|
312
|
+
isLoading: false,
|
|
313
|
+
error: null,
|
|
314
|
+
lastFetched: new Date(),
|
|
315
|
+
},
|
|
316
|
+
},
|
|
317
|
+
earlyAccessFeatures: {
|
|
318
|
+
'org-1': {
|
|
319
|
+
data: [],
|
|
320
|
+
isLoading: false,
|
|
321
|
+
error: null,
|
|
322
|
+
lastFetched: new Date(),
|
|
323
|
+
},
|
|
324
|
+
},
|
|
325
|
+
}, children: _jsx(C4ManagementApp, { urls: {
|
|
326
|
+
earlyAccessDocsUrl: '',
|
|
327
|
+
apiClientsDocsUrl: '',
|
|
328
|
+
activityDocsUrl: '',
|
|
329
|
+
aiUsageDocsUrl: '',
|
|
330
|
+
aiBlueprintsUrl: '',
|
|
331
|
+
contactUrl: '',
|
|
332
|
+
contactEnterprisePlanUrl: '',
|
|
333
|
+
trustCenterUrl: '',
|
|
334
|
+
talkToAnExpertUrl: '',
|
|
335
|
+
requestCelpLicenceUrl: '',
|
|
336
|
+
introToIdentityDocsUrl: '',
|
|
337
|
+
identityAuthorizationsDocsUrl: '',
|
|
338
|
+
identityDocsUrl: '',
|
|
339
|
+
}, orgId: 'org-1', desiredTabId: 'overview' }) }) }));
|
|
340
|
+
}
|
|
227
341
|
describe('C4ManagementApp early access settings', () => {
|
|
228
342
|
afterEach(() => {
|
|
229
343
|
cleanup();
|
|
@@ -345,3 +459,29 @@ describe('C4ManagementApp early access settings', () => {
|
|
|
345
459
|
});
|
|
346
460
|
});
|
|
347
461
|
});
|
|
462
|
+
describe('C4ManagementApp extend trial', () => {
|
|
463
|
+
afterEach(() => {
|
|
464
|
+
cleanup();
|
|
465
|
+
});
|
|
466
|
+
beforeEach(() => {
|
|
467
|
+
mockedOrgsService.getOne.mockReset();
|
|
468
|
+
mockedEarlyAccessFeaturesService.getForOrg.mockReset();
|
|
469
|
+
});
|
|
470
|
+
it('shows the extend trial button in the overview tab when all canSelfExtend conditions are met', async () => {
|
|
471
|
+
mockedOrgsService.getOne.mockResolvedValue(buildTrialOrgInfo());
|
|
472
|
+
mockedEarlyAccessFeaturesService.getForOrg.mockResolvedValue([]);
|
|
473
|
+
renderTrialApp(buildTrialOrgInfo(), true);
|
|
474
|
+
const extendBtn = await screen.findByRole('button', {
|
|
475
|
+
name: 'Extend trial',
|
|
476
|
+
});
|
|
477
|
+
expect(extendBtn).toBeTruthy();
|
|
478
|
+
});
|
|
479
|
+
it('does not show the extend trial button when the feature flag is disabled', async () => {
|
|
480
|
+
mockedOrgsService.getOne.mockResolvedValue(buildTrialOrgInfo());
|
|
481
|
+
mockedEarlyAccessFeaturesService.getForOrg.mockResolvedValue([]);
|
|
482
|
+
renderTrialApp(buildTrialOrgInfo(), false);
|
|
483
|
+
await waitFor(() => {
|
|
484
|
+
expect(screen.queryByRole('button', { name: 'Extend trial' })).toBeNull();
|
|
485
|
+
});
|
|
486
|
+
});
|
|
487
|
+
});
|
|
@@ -62,6 +62,11 @@ export interface C4ManagementAppProps {
|
|
|
62
62
|
*/
|
|
63
63
|
isLicensingModel2025?: boolean;
|
|
64
64
|
urls?: C4ManagementUrls;
|
|
65
|
+
/**
|
|
66
|
+
* Called when the component needs the host to reload org data (e.g. after a
|
|
67
|
+
* trial extension succeeds so the new expiry date is reflected immediately).
|
|
68
|
+
*/
|
|
69
|
+
onNeedsReload?: () => void;
|
|
65
70
|
}
|
|
66
71
|
export interface C4ManagementUrls {
|
|
67
72
|
earlyAccessDocsUrl?: string;
|
|
@@ -1,12 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
/*
|
|
3
|
-
* Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
|
|
4
|
-
* under one or more contributor license agreements. Licensed under a commercial license.
|
|
5
|
-
* You may not use this file except in compliance with the commercial license.
|
|
6
|
-
*/
|
|
7
|
-
import { TabsSkeleton } from '@carbon/react';
|
|
8
2
|
import { C4PageTemplate } from '../../components/c4-page-template/c4-page-template.js';
|
|
9
3
|
import { useC4ConsoleRuntime } from '../../runtime/c4-console-runtime-context.js';
|
|
4
|
+
import { TabsSkeleton } from '../../ui/index.js';
|
|
10
5
|
function safeTranslate(t, key, fallback) {
|
|
11
6
|
try {
|
|
12
7
|
const translated = t?.(key);
|
|
@@ -4,10 +4,12 @@ import { jsxs as _jsxs, jsx as _jsx, 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 {
|
|
7
|
+
import { Form, FormGroup } from '@carbon/react';
|
|
8
8
|
import { useMemo, useState } from 'react';
|
|
9
9
|
import { C4ClusterClientCredentialsModal } from '../../../components/c4-cluster-client-credentials/c4-cluster-client-credentials.js';
|
|
10
10
|
import { C4ManagementApi } from '../../../components/c4-management-api/c4-management-api.js';
|
|
11
|
+
import { C4StructuredListBody, C4StructuredListCell, C4StructuredListRow, C4StructuredListWrapper, } from '../../../components/c4-structured-list/c4-structured-list.js';
|
|
12
|
+
import { Checkbox, Link, Modal, Stack, TextInput } from '../../../ui/index.js';
|
|
11
13
|
// Helper functions
|
|
12
14
|
function isApiClientNameValid(name) {
|
|
13
15
|
if (!name.trim()) {
|
|
@@ -657,6 +659,6 @@ export const C4ManagementApiTab = (props) => {
|
|
|
657
659
|
const filtered = details
|
|
658
660
|
.filter((d) => showIpWhitelistColumn ? true : d.id !== 'whitelist-scopes')
|
|
659
661
|
.filter((d) => showHotBackupColumn ? true : d.id !== 'hotBackups-scopes');
|
|
660
|
-
return (_jsx(
|
|
662
|
+
return (_jsx(C4StructuredListWrapper, { isCondensed: true, children: _jsx(C4StructuredListBody, { children: filtered.map((detail) => (_jsxs(C4StructuredListRow, { children: [_jsx(C4StructuredListCell, { head: true, children: detail.label }), _jsx(C4StructuredListCell, { children: detail.value })] }, detail.id))) }) }));
|
|
661
663
|
})() })) : null] }));
|
|
662
664
|
};
|
|
@@ -5,10 +5,10 @@ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-run
|
|
|
5
5
|
* You may not use this file except in compliance with the commercial license.
|
|
6
6
|
*/
|
|
7
7
|
import { UsageAlertInitValues, UsageAlertMetric, UsageAlertThresholdLimits, } from '@camunda/ccma-shared-types';
|
|
8
|
-
import { Modal, Stack } from '@carbon/react';
|
|
9
8
|
import { useState } from 'react';
|
|
10
9
|
import { C4BillingPage } from '../../../components/c4-billing-page/c4-billing-page.js';
|
|
11
10
|
import { C4UsageAlertUpdateModal } from '../../../components/c4-usage-alert-update-modal/c4-usage-alert-update-modal.js';
|
|
11
|
+
import { Modal, Stack } from '../../../ui/index.js';
|
|
12
12
|
function safeTranslate(t, key, fallback, options) {
|
|
13
13
|
try {
|
|
14
14
|
const translated = t?.(key, options);
|
|
@@ -5,7 +5,7 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
|
|
|
5
5
|
* You may not use this file except in compliance with the commercial license.
|
|
6
6
|
*/
|
|
7
7
|
import { C4GroupsList } from '@camunda/c4-identity';
|
|
8
|
-
import { Stack } from '
|
|
8
|
+
import { Stack } from '../../../ui/index.js';
|
|
9
9
|
export const C4ManagementGroupsTab = (props) => {
|
|
10
10
|
return (_jsx(Stack, { gap: 3, children: _jsx(C4GroupsList, { docsPath: '/next/components/console/manage-organization/manage-user-groups/', onGroupClick: (groupId) => {
|
|
11
11
|
props.onGroupClick(groupId);
|
|
@@ -8,5 +8,6 @@ export interface C4ManagementOverviewTabProps {
|
|
|
8
8
|
mayRename: boolean;
|
|
9
9
|
t?: (key: string, options?: Record<string, unknown>) => string;
|
|
10
10
|
onRenameOrg: (newName: string) => Promise<void>;
|
|
11
|
+
onExtendTrial?: () => void;
|
|
11
12
|
}
|
|
12
|
-
export declare const C4ManagementOverviewTab: ({ orgId, orgName, salesPlan, ownerName, loading, mayRename, t, onRenameOrg, }: C4ManagementOverviewTabProps) => JSX.Element;
|
|
13
|
+
export declare const C4ManagementOverviewTab: ({ orgId, orgName, salesPlan, ownerName, loading, mayRename, t, onRenameOrg, onExtendTrial, }: C4ManagementOverviewTabProps) => JSX.Element;
|
|
@@ -4,10 +4,10 @@ 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 { Modal, Stack, TextInput } from '@carbon/react';
|
|
8
7
|
import { Edit } from '@carbon/react/icons/index.esm.js';
|
|
9
8
|
import { useMemo, useState } from 'react';
|
|
10
9
|
import { C4ManagementOverview } from '../../../components/c4-management-overview/c4-management-overview.js';
|
|
10
|
+
import { Modal, Stack, TextInput } from '../../../ui/index.js';
|
|
11
11
|
function safeTranslate(t, key, defaultValue,
|
|
12
12
|
// biome-ignore lint/suspicious/noExplicitAny: legacy compatibility
|
|
13
13
|
opts) {
|
|
@@ -21,7 +21,7 @@ opts) {
|
|
|
21
21
|
return defaultValue;
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
|
-
export const C4ManagementOverviewTab = ({ orgId, orgName, salesPlan, ownerName, loading, mayRename, t, onRenameOrg, }) => {
|
|
24
|
+
export const C4ManagementOverviewTab = ({ orgId, orgName, salesPlan, ownerName, loading, mayRename, t, onRenameOrg, onExtendTrial, }) => {
|
|
25
25
|
const [renameModalOpen, setRenameModalOpen] = useState(false);
|
|
26
26
|
const [renameValue, setRenameValue] = useState('');
|
|
27
27
|
const [renameSaving, setRenameSaving] = useState(false);
|
|
@@ -50,6 +50,13 @@ export const C4ManagementOverviewTab = ({ orgId, orgName, salesPlan, ownerName,
|
|
|
50
50
|
id: 'organization-plan',
|
|
51
51
|
label: safeTranslate(t, 'orgmanagement:tabs.overview.tableitems.plan', 'Plan'),
|
|
52
52
|
value: salesPlan,
|
|
53
|
+
action: onExtendTrial
|
|
54
|
+
? {
|
|
55
|
+
kind: 'primary',
|
|
56
|
+
iconDescription: safeTranslate(t, 'orgmanagement:tabs.overview.actions.extendTrial', 'Extend trial'),
|
|
57
|
+
action: onExtendTrial,
|
|
58
|
+
}
|
|
59
|
+
: undefined,
|
|
53
60
|
});
|
|
54
61
|
}
|
|
55
62
|
if (ownerName) {
|
|
@@ -60,7 +67,7 @@ export const C4ManagementOverviewTab = ({ orgId, orgName, salesPlan, ownerName,
|
|
|
60
67
|
});
|
|
61
68
|
}
|
|
62
69
|
return items;
|
|
63
|
-
}, [orgName, salesPlan, ownerName, mayRename, t]);
|
|
70
|
+
}, [orgName, salesPlan, ownerName, mayRename, t, onExtendTrial]);
|
|
64
71
|
return (_jsxs(_Fragment, { children: [_jsx(C4ManagementOverview, { orgId: orgId, overviewItems: overviewItems, loading: loading }), renameModalOpen && (_jsx(Modal, { open: renameModalOpen, modalHeading: safeTranslate(t, 'orgmanagement:tabs.overview.actions.rename', 'Rename'), primaryButtonText: safeTranslate(t, 'orgmanagement:common.save', 'Save'), secondaryButtonText: safeTranslate(t, 'orgmanagement:common.cancel', 'Cancel'), onRequestClose: () => setRenameModalOpen(false), onRequestSubmit: () => {
|
|
65
72
|
void (async () => {
|
|
66
73
|
setRenameSaving(true);
|
|
@@ -5,9 +5,10 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
|
|
|
5
5
|
* You may not use this file except in compliance with the commercial license.
|
|
6
6
|
*/
|
|
7
7
|
import { getDisplayedSalesPlan, } from '@camunda/ccma-shared-types';
|
|
8
|
-
import { DefinitionTooltip
|
|
8
|
+
import { DefinitionTooltip } from '@carbon/react';
|
|
9
9
|
import { useMemo } from 'react';
|
|
10
10
|
import { C4Pricing } from '../../../components/c4-pricing/c4-pricing.js';
|
|
11
|
+
import { Link } from '../../../ui/index.js';
|
|
11
12
|
function safeTranslate(t, key, fallback, options) {
|
|
12
13
|
try {
|
|
13
14
|
return t ? t(key, options) : fallback;
|
|
@@ -4,10 +4,10 @@ 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 { Modal, Stack } from '@carbon/react';
|
|
8
7
|
import { PSClickWrap } from '@pactsafe/pactsafe-react-sdk';
|
|
9
8
|
import { useState } from 'react';
|
|
10
9
|
import { C4ManagementSettings } from '../../../components/c4-management-settings/c4-management-settings.js';
|
|
10
|
+
import { Modal, Stack } from '../../../ui/index.js';
|
|
11
11
|
function safeTranslate(t, key, defaultValue,
|
|
12
12
|
// biome-ignore lint/suspicious/noExplicitAny: legacy compatibility
|
|
13
13
|
opts) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { RowBaseProps } from '@camunda/camunda-composite-components';
|
|
2
2
|
import type { JSX } from 'react';
|
|
3
3
|
import type { UsageHistoryChartsProps } from '../../../components/c4-usage-history/elements/usage-history-charts';
|
|
4
4
|
export interface UsageHistoryEntryPerCluster {
|
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
* You may not use this file except in compliance with the commercial license.
|
|
6
|
-
*/
|
|
7
|
-
import { C3DataTable, } from '@camunda/camunda-composite-components';
|
|
8
|
-
import { DataTableSkeleton, Stack, StructuredListBody, StructuredListCell, StructuredListHead, StructuredListRow, StructuredListWrapper, } from '@carbon/react';
|
|
2
|
+
import { C4DataTable } from '../../../components/c4-data-table/c4-data-table.js';
|
|
3
|
+
import { C4DataTableSkeleton } from '../../../components/c4-data-table/c4-data-table-skeleton.js';
|
|
4
|
+
import { C4StructuredListBody, C4StructuredListCell, C4StructuredListHead, C4StructuredListRow, C4StructuredListWrapper, } from '../../../components/c4-structured-list/c4-structured-list.js';
|
|
9
5
|
import { C4UsageHistory } from '../../../components/c4-usage-history/c4-usage-history.js';
|
|
6
|
+
import { useC4DesignSystem } from '../../../runtime/c4-console-runtime-context.js';
|
|
7
|
+
import { Stack } from '../../../ui/index.js';
|
|
10
8
|
function ExpandedRow({ clusters, text, isLicensingModel2025, }) {
|
|
11
|
-
const headerRow = (_jsxs(
|
|
12
|
-
return (_jsxs(
|
|
9
|
+
const headerRow = (_jsxs(C4StructuredListRow, { head: true, children: [_jsx(C4StructuredListCell, { head: true, children: text.perCluster.clusterName }), _jsx(C4StructuredListCell, { head: true, children: text.perCluster.processInstances }), !isLicensingModel2025 && (_jsx(C4StructuredListCell, { head: true, children: text.perCluster.decisionInstances })), !isLicensingModel2025 && (_jsx(C4StructuredListCell, { head: true, children: text.perCluster.taskUsers }))] }));
|
|
10
|
+
return (_jsxs(C4StructuredListWrapper, { children: [_jsx(C4StructuredListHead, { children: headerRow }), _jsx(C4StructuredListBody, { children: clusters.map((cluster) => (_jsxs(C4StructuredListRow, { children: [_jsx(C4StructuredListCell, { noWrap: true, children: cluster.clusterName }), _jsx(C4StructuredListCell, { children: cluster.processInstances }), !isLicensingModel2025 && (_jsx(C4StructuredListCell, { children: cluster.decisionInstances })), !isLicensingModel2025 && (_jsx(C4StructuredListCell, { children: cluster.taskUsers }))] }, cluster.clusterId))) })] }));
|
|
13
11
|
}
|
|
14
12
|
export const C4ManagementUsageTab = ({ loading, groupBy, onGroupByChange, perClusterAvailable, history, charts, text, isLicensingModel2025 = false, }) => {
|
|
13
|
+
const designSystem = useC4DesignSystem();
|
|
15
14
|
const headers = [
|
|
16
15
|
{
|
|
17
16
|
label: text.headers.period,
|
|
@@ -57,14 +56,17 @@ export const C4ManagementUsageTab = ({ loading, groupBy, onGroupByChange, perClu
|
|
|
57
56
|
},
|
|
58
57
|
},
|
|
59
58
|
];
|
|
60
|
-
const tableComponent = loading ? (_jsx(
|
|
59
|
+
const tableComponent = loading ? (_jsx(C4DataTableSkeleton, { columnCount: headers.length, headers: headers.map((item) => ({ key: item.key, header: item.label })), showHeader: false, showToolbar: false })) : (_jsx(Stack, { gap: 3, children: _jsx(C4DataTable, { headers: headers, data: history.map((item) => {
|
|
61
60
|
const hasPerCluster = perClusterAvailable && (item.perCluster?.length ?? 0) > 0;
|
|
62
61
|
return {
|
|
63
62
|
...item,
|
|
64
63
|
expansion: hasPerCluster ? (_jsx(ExpandedRow, { clusters: item.perCluster, text: text, isLicensingModel2025: isLicensingModel2025 })) : null,
|
|
65
64
|
};
|
|
66
65
|
}), toolbar: toolbar, title: undefined }, `usage-history-${groupBy}`) }));
|
|
67
|
-
return (_jsx("div", { style: {
|
|
66
|
+
return (_jsx("div", { style: {
|
|
67
|
+
width: '100%',
|
|
68
|
+
overflowX: designSystem === 'ds' ? 'visible' : 'auto',
|
|
69
|
+
}, children: _jsx(Stack, { gap: 8, children: _jsx(C4UsageHistory, { title: '', description: '', descriptionTooltip: '', loading: loading, data: {
|
|
68
70
|
titles: {
|
|
69
71
|
table: text.tableTabTitle,
|
|
70
72
|
charts: text.chartsTabTitle,
|
|
@@ -5,10 +5,11 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
|
|
|
5
5
|
* You may not use this file except in compliance with the commercial license.
|
|
6
6
|
*/
|
|
7
7
|
import { OrganizationRole } from '@camunda/ccma-shared-types';
|
|
8
|
-
import { Checkbox, InlineNotification, Link, Modal, Stack, TextInput, } from '@carbon/react';
|
|
9
8
|
import { useMemo, useRef, useState } from 'react';
|
|
9
|
+
import { C4InlineNotification } from '../../../components/c4-inline-notification/c4-inline-notification.js';
|
|
10
10
|
import { C4InviteUserToOrganizationModal } from '../../../components/c4-invite-user-to-organization-modal/c4-invite-user-to-organization-modal.js';
|
|
11
11
|
import { C4ManagementUsers } from '../../../components/c4-management-users/c4-management-users.js';
|
|
12
|
+
import { Checkbox, Link, Modal, Stack, TextInput } from '../../../ui/index.js';
|
|
12
13
|
function safeTranslate(t, key, defaultValue, opts) {
|
|
13
14
|
if (!t)
|
|
14
15
|
return defaultValue;
|
|
@@ -29,6 +30,26 @@ function roleLabelDescription(t, role) {
|
|
|
29
30
|
label: safeTranslate(t, 'orgroles:admin.label', 'Admin'),
|
|
30
31
|
description: safeTranslate(t, 'orgroles:admin.description', ''),
|
|
31
32
|
};
|
|
33
|
+
case OrganizationRole.OWNER:
|
|
34
|
+
return {
|
|
35
|
+
label: safeTranslate(t, 'orgroles:owner.label', 'Owner'),
|
|
36
|
+
description: safeTranslate(t, 'orgroles:owner.description', ''),
|
|
37
|
+
};
|
|
38
|
+
case OrganizationRole.ORGANIZATION_OWNER:
|
|
39
|
+
return {
|
|
40
|
+
label: safeTranslate(t, 'orgroles:organizationowner.label', 'Organization owner'),
|
|
41
|
+
description: safeTranslate(t, 'orgroles:organizationowner.description', ''),
|
|
42
|
+
};
|
|
43
|
+
case OrganizationRole.ORGANIZATION_ADMIN:
|
|
44
|
+
return {
|
|
45
|
+
label: safeTranslate(t, 'orgroles:organizationadmin.label', 'Organization admin'),
|
|
46
|
+
description: safeTranslate(t, 'orgroles:organizationadmin.description', ''),
|
|
47
|
+
};
|
|
48
|
+
case OrganizationRole.SUPPORTAGENT:
|
|
49
|
+
return {
|
|
50
|
+
label: safeTranslate(t, 'orgroles:supportagent.label', 'Support agent'),
|
|
51
|
+
description: safeTranslate(t, 'orgroles:supportagent.description', ''),
|
|
52
|
+
};
|
|
32
53
|
case OrganizationRole.MEMBER:
|
|
33
54
|
return {
|
|
34
55
|
label: safeTranslate(t, 'orgroles:member.label', 'Member'),
|
|
@@ -64,8 +85,10 @@ function roleLabelDescription(t, role) {
|
|
|
64
85
|
label: safeTranslate(t, 'orgroles:modeler.label', 'Modeler'),
|
|
65
86
|
description: safeTranslate(t, 'orgroles:modeler.description', ''),
|
|
66
87
|
};
|
|
67
|
-
default:
|
|
68
|
-
|
|
88
|
+
default: {
|
|
89
|
+
const label = role ? role.charAt(0).toUpperCase() + role.slice(1) : role;
|
|
90
|
+
return { label, description: '' };
|
|
91
|
+
}
|
|
69
92
|
}
|
|
70
93
|
}
|
|
71
94
|
export const C4ManagementUsersTab = ({ orgId, members, loading, mayManageUsersActions, mayInviteUsers, mayAssignNewOwner, inviteModal, changeRolesModal, assignOwnerModal, currentUserEmail, onNavigateToUser, t, telemetry, onRemoveUser, onInviteUser, onResendInvite, onCancelInvite, onAssignNewOwner, onUpdateUserRoles, }) => {
|
|
@@ -123,6 +146,13 @@ export const C4ManagementUsersTab = ({ orgId, members, loading, mayManageUsersAc
|
|
|
123
146
|
}
|
|
124
147
|
return row.email.trim().toLowerCase() === normalizedCurrentEmail;
|
|
125
148
|
};
|
|
149
|
+
// Derive the role filter item set from the roles actually present in the
|
|
150
|
+
// loaded member data, so the dropdown only offers roles the user could
|
|
151
|
+
// pick — and so unusual roles (e.g. owner) appear automatically when they
|
|
152
|
+
// exist in the org.
|
|
153
|
+
const presentRoles = [
|
|
154
|
+
...new Set(members.flatMap((row) => row.rolesArray)),
|
|
155
|
+
].sort();
|
|
126
156
|
const headers = [
|
|
127
157
|
{
|
|
128
158
|
label: safeTranslate(t, 'orgmanagement:tabs.users.table.name', 'Name'),
|
|
@@ -268,6 +298,18 @@ export const C4ManagementUsersTab = ({ orgId, members, loading, mayManageUsersAc
|
|
|
268
298
|
return [name, email].some((value) => value.includes(term));
|
|
269
299
|
},
|
|
270
300
|
},
|
|
301
|
+
{
|
|
302
|
+
id: 'role-filter',
|
|
303
|
+
type: 'multiSelect',
|
|
304
|
+
label: safeTranslate(t, 'orgmanagement:tabs.users.roleFilter', 'Filter by role'),
|
|
305
|
+
queryName: 'roles',
|
|
306
|
+
items: presentRoles.map((role) => ({
|
|
307
|
+
id: role,
|
|
308
|
+
label: roleLabelDescription(t, role).label,
|
|
309
|
+
})),
|
|
310
|
+
filter: (filter) => !filter.selectedItems?.length ||
|
|
311
|
+
filter.selectedItems.some((id) => filter.row.rolesArray.includes(id)),
|
|
312
|
+
},
|
|
271
313
|
{
|
|
272
314
|
id: 'create',
|
|
273
315
|
type: 'button',
|
|
@@ -440,7 +482,7 @@ export const C4ManagementUsersTab = ({ orgId, members, loading, mayManageUsersAc
|
|
|
440
482
|
setAssignOwnerSaving(false);
|
|
441
483
|
}
|
|
442
484
|
})();
|
|
443
|
-
}, size: 'sm', children: _jsxs(Stack, { gap: 5, children: [assignOwnerError && (_jsx(
|
|
485
|
+
}, size: 'sm', children: _jsxs(Stack, { gap: 5, children: [assignOwnerError && (_jsx(C4InlineNotification, { lowContrast: true, kind: 'error', title: '', subtitle: assignOwnerError })), _jsx(C4InlineNotification, { lowContrast: true, kind: 'warning', hideCloseButton: true, title: '', subtitle: safeTranslate(t, 'users:assignNewOwner.warning', 'By assigning a new owner, you will no longer be the owner of this organization.') }), _jsx(TextInput, { id: 'c4-assign-new-owner-email', labelText: safeTranslate(t, 'users:assignNewOwner.form.email', 'New owner'), value: assignOwnerTarget.email, readOnly: true }), _jsxs("fieldset", { className: 'cds--fieldset', children: [_jsx("legend", { className: 'cds--label', children: safeTranslate(t, 'users:assignNewOwner.form.rolesDescription', 'Select your new role(s) for this organization:') }), assignOwnerPrimaryRoles.map((role) => {
|
|
444
486
|
const enriched = roleLabelDescription(t, role);
|
|
445
487
|
return (_jsxs("span", { children: [_jsx(Checkbox, { labelText: enriched.label, id: `c4-assign-new-owner-role-${role}`, checked: oldOwnerNewRoles.has(role), disabled: assignOwnerSaving, onChange: (_, { checked }) => {
|
|
446
488
|
setOldOwnerNewRoles((current) => {
|
|
@@ -502,7 +544,7 @@ export const C4ManagementUsersTab = ({ orgId, members, loading, mayManageUsersAc
|
|
|
502
544
|
setChangeRolesSaving(false);
|
|
503
545
|
}
|
|
504
546
|
})();
|
|
505
|
-
}, size: 'sm', children: _jsxs(Stack, { gap: 5, children: [_jsx(TextInput, { id: 'c4-management-change-org-roles-email', labelText: safeTranslate(t, 'users:changeOrgRoles.form.email', 'Email'), value: changeRolesTarget.email, readOnly: true }), changeRolesError && (_jsx(
|
|
547
|
+
}, size: 'sm', children: _jsxs(Stack, { gap: 5, children: [_jsx(TextInput, { id: 'c4-management-change-org-roles-email', labelText: safeTranslate(t, 'users:changeOrgRoles.form.email', 'Email'), value: changeRolesTarget.email, readOnly: true }), changeRolesError && (_jsx(C4InlineNotification, { lowContrast: true, kind: 'error', title: '', subtitle: changeRolesError })), _jsxs("fieldset", { className: 'cds--fieldset', children: [_jsx("legend", { className: 'cds--label', children: safeTranslate(t, 'users:changeOrgRoles.form.roles', 'Roles') }), changeRolesModal.editableRoles.primary.map((role) => {
|
|
506
548
|
const enriched = roleLabelDescription(t, role);
|
|
507
549
|
return (_jsxs("span", { children: [_jsx(Checkbox, { labelText: enriched.label, id: `c4-management-change-org-roles-${role}`, checked: selectedRoles.has(role), disabled: changeRolesSaving, onChange: (_, data) => {
|
|
508
550
|
setSelectedRoles((current) => {
|