@camunda/ccma-saas-frontend 0.0.46 → 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.js +6 -4
- 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.js +1 -6
- package/lib/esm/components/c4-cluster-settings/elements/danger-zone.js +1 -6
- package/lib/esm/components/c4-cluster-settings/elements/optimize-filtering-settings.js +3 -3
- 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 +8 -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/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.js +1 -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 +7 -2
- 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.js +3 -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 +5 -4
- package/lib/esm/widgets/clusters/c4-clusters-page.d.ts +1 -1
- package/lib/esm/widgets/clusters/c4-clusters-page.js +122 -66
- package/lib/esm/widgets/clusters/c4-clusters-page.spec.js +133 -0
- package/lib/esm/widgets/clusters/c4-clusters-page.types.d.ts +1 -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/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 +13 -6
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import type { JSX, ReactElement } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Design-system-switchable empty state.
|
|
4
|
+
*
|
|
5
|
+
* Keeps the stable C3EmptyState interface for consumers: in 'carbon' mode it
|
|
6
|
+
* renders the unchanged c3 component; in 'ds' mode it transforms the same props
|
|
7
|
+
* onto the DS `EmptyState` (the APIs differ, so this is a mapping, not a swap).
|
|
8
|
+
* c3 is untouched.
|
|
9
|
+
*/
|
|
10
|
+
type EmptyStateButton = {
|
|
11
|
+
onClick: () => void;
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
label: string;
|
|
14
|
+
icon?: unknown;
|
|
15
|
+
id?: string;
|
|
16
|
+
};
|
|
17
|
+
type EmptyStateMenuButton = {
|
|
18
|
+
disabled?: boolean;
|
|
19
|
+
label: string;
|
|
20
|
+
id?: string;
|
|
21
|
+
items: EmptyStateButton[];
|
|
22
|
+
};
|
|
23
|
+
export interface C4EmptyStateProps {
|
|
24
|
+
heading: string;
|
|
25
|
+
description: string | ReactElement;
|
|
26
|
+
icon?: {
|
|
27
|
+
path: string;
|
|
28
|
+
altText: string;
|
|
29
|
+
};
|
|
30
|
+
button?: EmptyStateButton | EmptyStateMenuButton;
|
|
31
|
+
buttons?: Array<EmptyStateButton | EmptyStateMenuButton>;
|
|
32
|
+
link?: {
|
|
33
|
+
href: string;
|
|
34
|
+
label: string;
|
|
35
|
+
onClick?: () => void;
|
|
36
|
+
};
|
|
37
|
+
/**
|
|
38
|
+
* ds-mode only. When set, the empty state is wrapped in a card surface so it
|
|
39
|
+
* doesn't float in an otherwise empty tab/panel. Use it for empty states that
|
|
40
|
+
* stand alone as tab content; leave it off for full-page/centered empty states
|
|
41
|
+
* and for content that already provides its own surface. Ignored in carbon
|
|
42
|
+
* mode (the c3 empty state is unchanged).
|
|
43
|
+
*/
|
|
44
|
+
card?: boolean;
|
|
45
|
+
}
|
|
46
|
+
export declare const C4EmptyState: (props: C4EmptyStateProps) => JSX.Element;
|
|
47
|
+
export {};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
/*
|
|
3
|
+
* Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
|
|
4
|
+
* under one or more contributor license agreements. Licensed under a commercial license.
|
|
5
|
+
* You may not use this file except in compliance with the commercial license.
|
|
6
|
+
*/
|
|
7
|
+
import { C3EmptyState } from '@camunda/camunda-composite-components';
|
|
8
|
+
import { Button, DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger, EmptyState, } from '@camunda/design-system';
|
|
9
|
+
import { useC4DesignSystem } from '../../runtime/c4-console-runtime-context.js';
|
|
10
|
+
const isMenuButton = (b) => 'items' in b;
|
|
11
|
+
function renderAction(action, variant) {
|
|
12
|
+
if (isMenuButton(action)) {
|
|
13
|
+
return (_jsxs(DropdownMenu, { children: [_jsx(DropdownMenuTrigger, { asChild: true, children: _jsx(Button, { variant: variant, disabled: action.disabled, children: action.label }) }), _jsx(DropdownMenuContent, { children: action.items.map((item) => (_jsx(DropdownMenuItem, { onClick: item.onClick, disabled: item.disabled, children: item.label }, item.id ?? item.label))) })] }));
|
|
14
|
+
}
|
|
15
|
+
return (_jsx(Button, { variant: variant, onClick: action.onClick, disabled: action.disabled, children: action.label }));
|
|
16
|
+
}
|
|
17
|
+
export const C4EmptyState = (props) => {
|
|
18
|
+
const designSystem = useC4DesignSystem();
|
|
19
|
+
// `card` is a ds-only prop; strip it from the carbon passthrough so it never
|
|
20
|
+
// reaches the c3 component (and the DOM).
|
|
21
|
+
const { card, ...c3Props } = props;
|
|
22
|
+
if (designSystem !== 'ds') {
|
|
23
|
+
return _jsx(C3EmptyState, { ...c3Props });
|
|
24
|
+
}
|
|
25
|
+
const actions = [props.button, ...(props.buttons ?? [])].filter((b) => Boolean(b));
|
|
26
|
+
const action = actions[0] ? renderAction(actions[0], 'default') : undefined;
|
|
27
|
+
const secondaryAction = actions[1] ? (renderAction(actions[1], 'secondary')) : props.link ? (_jsx(Button, { variant: 'link', asChild: true, children: _jsx("a", { href: props.link.href, onClick: props.link.onClick, children: props.link.label }) })) : undefined;
|
|
28
|
+
const emptyState = (_jsx(EmptyState, { heading: props.heading, description: props.description, icon: props.icon ? (_jsx("img", { src: props.icon.path, alt: props.icon.altText, width: 48 })) : undefined, action: action, secondaryAction: secondaryAction }));
|
|
29
|
+
if (card) {
|
|
30
|
+
return (_jsx("div", { className: 'flex items-center justify-center rounded-xl border bg-neutral-background-subtle p-12', style: { minHeight: '20rem' }, children: emptyState }));
|
|
31
|
+
}
|
|
32
|
+
return emptyState;
|
|
33
|
+
};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
/*
|
|
3
|
+
* Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
|
|
4
|
+
* under one or more contributor license agreements. Licensed under a commercial license.
|
|
5
|
+
* You may not use this file except in compliance with the commercial license.
|
|
6
|
+
*/
|
|
7
|
+
import { TRIAL_EXTENSION_SURVEY_QUESTIONS, } from '@camunda/ccma-shared-types';
|
|
8
|
+
import { useState } from 'react';
|
|
9
|
+
import { Checkbox, Loading, Modal, Stack, TextArea } from '../../ui/index.js';
|
|
10
|
+
import { useRadioFamily } from '../../ui/families.js';
|
|
11
|
+
import { C4InlineNotification } from '../c4-inline-notification/c4-inline-notification.js';
|
|
12
|
+
export const C4ExtendTrialModal = ({ isOpen, onClose, onSubmit, isSubmitting, error, }) => {
|
|
13
|
+
const { RadioButton, RadioButtonGroup } = useRadioFamily();
|
|
14
|
+
const [answers, setAnswers] = useState({});
|
|
15
|
+
const setSingleAnswer = (questionId, value) => {
|
|
16
|
+
setAnswers((prev) => ({ ...prev, [questionId]: value }));
|
|
17
|
+
};
|
|
18
|
+
const toggleMultiAnswer = (questionId, option) => {
|
|
19
|
+
setAnswers((prev) => {
|
|
20
|
+
const current = prev[questionId] ?? [];
|
|
21
|
+
const next = current.includes(option)
|
|
22
|
+
? current.filter((v) => v !== option)
|
|
23
|
+
: [...current, option];
|
|
24
|
+
return { ...prev, [questionId]: next };
|
|
25
|
+
});
|
|
26
|
+
};
|
|
27
|
+
const canSubmit = !isSubmitting &&
|
|
28
|
+
TRIAL_EXTENSION_SURVEY_QUESTIONS.filter((q) => q.required).every((q) => {
|
|
29
|
+
const answer = answers[q.id];
|
|
30
|
+
if (q.type === 'multiselect') {
|
|
31
|
+
return Array.isArray(answer) && answer.length > 0;
|
|
32
|
+
}
|
|
33
|
+
return typeof answer === 'string' && answer.trim().length > 0;
|
|
34
|
+
});
|
|
35
|
+
const buildAnswers = () => TRIAL_EXTENSION_SURVEY_QUESTIONS.map((q) => ({
|
|
36
|
+
questionId: q.id,
|
|
37
|
+
answer: answers[q.id] ?? (q.type === 'multiselect' ? [] : ''),
|
|
38
|
+
}));
|
|
39
|
+
return (_jsx(Modal, { open: isOpen, modalHeading: 'Extend your trial', primaryButtonText: 'Extend trial', secondaryButtonText: 'Cancel', primaryButtonDisabled: !canSubmit, onRequestClose: onClose, onSecondarySubmit: onClose, onRequestSubmit: () => {
|
|
40
|
+
void onSubmit(buildAnswers());
|
|
41
|
+
}, children: isSubmitting ? (_jsxs(Stack, { gap: 4, children: [_jsx(Loading, { small: true, withOverlay: false }), _jsx("p", { children: "Reviewing your extension request\u2026" })] })) : (_jsxs(Stack, { gap: 6, children: [error !== undefined && (_jsx(C4InlineNotification, { kind: 'error', title: 'Extension failed.', subtitle: error, hideCloseButton: true })), TRIAL_EXTENSION_SURVEY_QUESTIONS.map((question) => {
|
|
42
|
+
if (question.type === 'select' && question.options) {
|
|
43
|
+
return (_jsxs(Stack, { gap: 2, children: [_jsx("p", { children: question.question }), _jsx(RadioButtonGroup, { name: `extend-trial-q-${question.id}`, "aria-label": question.question, valueSelected: answers[question.id] ?? '', onChange: (value) => setSingleAnswer(question.id, String(value ?? '')), children: question.options.map((opt) => (_jsx(RadioButton, { id: `extend-trial-q-${question.id}-${opt.replace(/\s+/g, '-')}`, labelText: opt, value: opt }, opt))) })] }, question.id));
|
|
44
|
+
}
|
|
45
|
+
if (question.type === 'multiselect' && question.options) {
|
|
46
|
+
const selected = answers[question.id] ?? [];
|
|
47
|
+
return (_jsxs(Stack, { gap: 2, children: [_jsxs("p", { children: [question.question, question.required && _jsx("span", { "aria-hidden": 'true', children: " *" })] }), question.options.map((opt) => (_jsx(Checkbox, { id: `extend-trial-q-${question.id}-${opt.replace(/\s+/g, '-')}`, labelText: opt, checked: selected.includes(opt), onChange: () => toggleMultiAnswer(question.id, opt) }, opt)))] }, question.id));
|
|
48
|
+
}
|
|
49
|
+
return (_jsx(TextArea, { id: `extend-trial-q-${question.id}`, labelText: question.question, value: answers[question.id] ?? '', onChange: (e) => setSingleAnswer(question.id, e.target.value) }, question.id));
|
|
50
|
+
})] })) }));
|
|
51
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@testing-library/jest-dom/vitest';
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
/*
|
|
3
|
+
* Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
|
|
4
|
+
* under one or more contributor license agreements. Licensed under a commercial license.
|
|
5
|
+
* You may not use this file except in compliance with the commercial license.
|
|
6
|
+
*/
|
|
7
|
+
import '@testing-library/jest-dom/vitest';
|
|
8
|
+
import { render, screen } from '@testing-library/react';
|
|
9
|
+
import { describe, expect, it, vi } from 'vitest';
|
|
10
|
+
import { C4ExtendTrialModal } from './c4-extend-trial-modal.js';
|
|
11
|
+
const baseProps = {
|
|
12
|
+
isOpen: true,
|
|
13
|
+
onClose: vi.fn(),
|
|
14
|
+
onSubmit: vi.fn().mockResolvedValue(undefined),
|
|
15
|
+
isSubmitting: false,
|
|
16
|
+
error: undefined,
|
|
17
|
+
};
|
|
18
|
+
describe('C4ExtendTrialModal', () => {
|
|
19
|
+
it('renders the survey form with all questions', () => {
|
|
20
|
+
render(_jsx(C4ExtendTrialModal, { ...baseProps }));
|
|
21
|
+
expect(screen.getByText('What are you evaluating during this trial?')).toBeInTheDocument();
|
|
22
|
+
expect(screen.getByText("What's your timeline for a production decision?")).toBeInTheDocument();
|
|
23
|
+
});
|
|
24
|
+
it('shows loading spinner and hides form when isSubmitting', () => {
|
|
25
|
+
render(_jsx(C4ExtendTrialModal, { ...baseProps, isSubmitting: true }));
|
|
26
|
+
expect(screen.getByText('Reviewing your extension request…')).toBeInTheDocument();
|
|
27
|
+
expect(screen.queryByText('What are you evaluating during this trial?')).not.toBeInTheDocument();
|
|
28
|
+
});
|
|
29
|
+
it('shows error notification when error prop is set', () => {
|
|
30
|
+
render(_jsx(C4ExtendTrialModal, { ...baseProps, error: 'Extension failed' }));
|
|
31
|
+
expect(screen.getByText('Extension failed')).toBeInTheDocument();
|
|
32
|
+
});
|
|
33
|
+
});
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { TrialExtensionSurveyAnswer } from '@camunda/ccma-shared-types';
|
|
2
|
+
export interface C4ExtendTrialModalProps {
|
|
3
|
+
isOpen: boolean;
|
|
4
|
+
onClose: () => void;
|
|
5
|
+
onSubmit: (answers: TrialExtensionSurveyAnswer[]) => Promise<void>;
|
|
6
|
+
isSubmitting: boolean;
|
|
7
|
+
error?: string;
|
|
8
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,10 +1,5 @@
|
|
|
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 { Link } from '@carbon/react';
|
|
2
|
+
import { Link } from '../../ui/index.js';
|
|
8
3
|
export const C4ExternalLink = ({ href, label, onClick, target, inline, }) => {
|
|
9
4
|
return (_jsx(Link, { href: href, target: target ?? '_self', inline: inline, onClick: onClick, style: { textDecoration: 'none' }, children: label }));
|
|
10
5
|
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { type JSX } from 'react';
|
|
2
|
+
export type C4FeedbackReportType = 'feedback' | 'idea' | 'bug';
|
|
3
|
+
export type C4FeedbackPayload = {
|
|
4
|
+
reportType: C4FeedbackReportType;
|
|
5
|
+
suggestion: string;
|
|
6
|
+
allowContact: boolean;
|
|
7
|
+
file?: File;
|
|
8
|
+
};
|
|
9
|
+
export interface C4FeedbackModalProps {
|
|
10
|
+
open: boolean;
|
|
11
|
+
onOpenChange: (open: boolean) => void;
|
|
12
|
+
/** Performs the submission; resolves on success, rejects on failure. */
|
|
13
|
+
onSubmit: (payload: C4FeedbackPayload) => Promise<void>;
|
|
14
|
+
/** Enterprise orgs get a Jira-support notice and only the free-text field. */
|
|
15
|
+
isEnterprise?: boolean;
|
|
16
|
+
}
|
|
17
|
+
export interface C4FeedbackFormProps {
|
|
18
|
+
onSubmit: (payload: C4FeedbackPayload) => Promise<void>;
|
|
19
|
+
isEnterprise?: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Changing this value resets the form (pass the parent's `open` state or any
|
|
22
|
+
* other value that changes when the form should be cleared).
|
|
23
|
+
*/
|
|
24
|
+
resetKey?: unknown;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Reusable feedback form body — no modal wrapper. Renders the type selector,
|
|
28
|
+
* text area, optional file upload, contact consent, and success/error states.
|
|
29
|
+
* Used both inside {@link C4FeedbackModal} and as inline tab content in
|
|
30
|
+
* {@link C4HelpCenter}.
|
|
31
|
+
*/
|
|
32
|
+
export declare function C4FeedbackForm({ onSubmit, isEnterprise, resetKey, }: C4FeedbackFormProps): JSX.Element;
|
|
33
|
+
/**
|
|
34
|
+
* Design-system-native Help Center "Share your feedback" modal. Mirrors the c3
|
|
35
|
+
* help-center feedback form (type, free text, optional screenshot, contact
|
|
36
|
+
* consent) but is built entirely from @camunda/design-system components so ds
|
|
37
|
+
* mode no longer renders the Carbon-styled c3 modal. Presentational: the host
|
|
38
|
+
* supplies `onSubmit` (which performs the actual POST).
|
|
39
|
+
*/
|
|
40
|
+
export declare function C4FeedbackModal({ open, onOpenChange, onSubmit, isEnterprise, }: C4FeedbackModalProps): JSX.Element;
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
/*
|
|
3
|
+
* Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
|
|
4
|
+
* under one or more contributor license agreements. Licensed under a commercial license.
|
|
5
|
+
* You may not use this file except in compliance with the commercial license.
|
|
6
|
+
*/
|
|
7
|
+
import { Alert, Button, Checkbox, Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle, Label, Textarea, } from '@camunda/design-system';
|
|
8
|
+
import { Bug, CheckCircle2, Lightbulb, MessageSquare, X } from 'lucide-react';
|
|
9
|
+
import { useEffect, useState } from 'react';
|
|
10
|
+
const MAX_FILE_SIZE = 5_000_000;
|
|
11
|
+
const ACCEPTED_FILE_TYPES = ['image/jpeg', 'image/jpg', 'image/png'];
|
|
12
|
+
const TYPES = [
|
|
13
|
+
{
|
|
14
|
+
value: 'feedback',
|
|
15
|
+
label: 'General feedback',
|
|
16
|
+
icon: MessageSquare,
|
|
17
|
+
title: 'Describe your thoughts',
|
|
18
|
+
placeholder: 'Tell us about your experience',
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
value: 'idea',
|
|
22
|
+
label: 'Suggest an idea',
|
|
23
|
+
icon: Lightbulb,
|
|
24
|
+
title: 'Describe your suggestion',
|
|
25
|
+
placeholder: 'Tell us how we can improve our product',
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
value: 'bug',
|
|
29
|
+
label: 'Report a bug',
|
|
30
|
+
icon: Bug,
|
|
31
|
+
title: 'Describe the issue',
|
|
32
|
+
placeholder: 'Tell us what went wrong',
|
|
33
|
+
},
|
|
34
|
+
];
|
|
35
|
+
/**
|
|
36
|
+
* Reusable feedback form body — no modal wrapper. Renders the type selector,
|
|
37
|
+
* text area, optional file upload, contact consent, and success/error states.
|
|
38
|
+
* Used both inside {@link C4FeedbackModal} and as inline tab content in
|
|
39
|
+
* {@link C4HelpCenter}.
|
|
40
|
+
*/
|
|
41
|
+
export function C4FeedbackForm({ onSubmit, isEnterprise = false, resetKey, }) {
|
|
42
|
+
const [reportType, setReportType] = useState('feedback');
|
|
43
|
+
const [suggestion, setSuggestion] = useState('');
|
|
44
|
+
const [allowContact, setAllowContact] = useState(true);
|
|
45
|
+
const [file, setFile] = useState(undefined);
|
|
46
|
+
const [submitting, setSubmitting] = useState(false);
|
|
47
|
+
const [submitted, setSubmitted] = useState(false);
|
|
48
|
+
const [error, setError] = useState(false);
|
|
49
|
+
useEffect(() => {
|
|
50
|
+
setReportType('feedback');
|
|
51
|
+
setSuggestion('');
|
|
52
|
+
setAllowContact(true);
|
|
53
|
+
setFile(undefined);
|
|
54
|
+
setSubmitting(false);
|
|
55
|
+
setSubmitted(false);
|
|
56
|
+
setError(false);
|
|
57
|
+
}, [resetKey]);
|
|
58
|
+
const activeType = TYPES.find((t) => t.value === reportType) ?? TYPES[0];
|
|
59
|
+
const fileTooLarge = file !== undefined && file.size > MAX_FILE_SIZE;
|
|
60
|
+
const canSubmit = suggestion.trim().length > 0 && !fileTooLarge && !submitting;
|
|
61
|
+
const submit = async () => {
|
|
62
|
+
setSubmitting(true);
|
|
63
|
+
setError(false);
|
|
64
|
+
try {
|
|
65
|
+
await onSubmit({
|
|
66
|
+
reportType,
|
|
67
|
+
suggestion,
|
|
68
|
+
allowContact,
|
|
69
|
+
file: isEnterprise ? undefined : file,
|
|
70
|
+
});
|
|
71
|
+
setSubmitted(true);
|
|
72
|
+
}
|
|
73
|
+
catch {
|
|
74
|
+
setError(true);
|
|
75
|
+
}
|
|
76
|
+
finally {
|
|
77
|
+
setSubmitting(false);
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
const resetForAdditional = () => {
|
|
81
|
+
setReportType('feedback');
|
|
82
|
+
setSuggestion('');
|
|
83
|
+
setAllowContact(false);
|
|
84
|
+
setFile(undefined);
|
|
85
|
+
setSubmitted(false);
|
|
86
|
+
setError(false);
|
|
87
|
+
};
|
|
88
|
+
if (submitted) {
|
|
89
|
+
return (_jsxs("div", { className: 'flex flex-col items-center gap-4 py-6 text-center', children: [_jsx(CheckCircle2, { className: 'size-10 text-success-foreground', "aria-hidden": true }), _jsx("p", { className: 'max-w-sm text-sm', children: isEnterprise
|
|
90
|
+
? 'Your feedback will be forwarded to your Customer Success Manager who will ensure that your inputs are addressed promptly.'
|
|
91
|
+
: 'Thanks for sharing your feedback. We use suggestions like yours to improve our service.' }), _jsx(Button, { variant: 'secondary', onClick: resetForAdditional, children: "Share additional feedback" })] }));
|
|
92
|
+
}
|
|
93
|
+
return (_jsxs("div", { className: 'flex flex-col gap-5', children: [isEnterprise ? (_jsxs(Alert, { variant: 'info', title: 'Looking for technical support?', children: ["Use our Jira support system to open a ticket.", ' ', _jsx(Button, { variant: 'link', className: 'h-auto p-0', asChild: true, children: _jsx("a", { href: 'https://jira.camunda.com/projects/SUPPORT/queues', target: '_blank', rel: 'noopener noreferrer', children: "Open a ticket" }) })] })) : (_jsxs("fieldset", { className: 'flex flex-col gap-2', children: [_jsx("legend", { className: 'mb-2 text-sm font-medium', children: "What type of feedback would you like to share?" }), _jsx("div", { className: 'grid grid-cols-3 gap-2', children: TYPES.map(({ value, label, icon: Icon }) => {
|
|
94
|
+
const selected = value === reportType;
|
|
95
|
+
return (_jsxs("button", { type: 'button', "aria-pressed": selected, onClick: () => setReportType(value), className: `flex flex-col items-center gap-2 rounded border p-3 text-sm ${selected
|
|
96
|
+
? 'border-primary-action-default bg-card'
|
|
97
|
+
: 'border-border'}`, children: [_jsx(Icon, { className: 'size-6', "aria-hidden": true }), _jsx("span", { children: label })] }, value));
|
|
98
|
+
}) })] })), _jsxs("div", { className: 'flex flex-col gap-2', children: [_jsx(Label, { htmlFor: 'c4-feedback-text', children: activeType.title }), _jsx(Textarea, { id: 'c4-feedback-text', rows: 4, placeholder: activeType.placeholder, value: suggestion, onChange: (event) => setSuggestion(event.target.value) })] }), !isEnterprise && (_jsxs("div", { className: 'flex flex-col gap-1', children: [_jsx(Label, { htmlFor: 'c4-feedback-file', children: "Upload file (optional)" }), _jsx("p", { className: 'text-xs text-neutral-foreground-subtle', children: "Max. file size is 5MB. Supported file types are .jpg and .png." }), file ? (_jsxs("div", { className: 'flex items-center justify-between rounded border border-border px-3 py-2 text-sm', children: [_jsxs("span", { className: fileTooLarge ? 'text-destructive' : '', children: [file.name, fileTooLarge ? ' — exceeds 5MB limit' : ''] }), _jsx(Button, { variant: 'ghost', size: 'icon', "aria-label": 'Remove file', onClick: () => setFile(undefined), children: _jsx(X, { className: 'size-4', "aria-hidden": true }) })] })) : (_jsx("input", { id: 'c4-feedback-file', type: 'file', accept: ACCEPTED_FILE_TYPES.join(','), className: 'text-sm', onChange: (event) => setFile(event.target.files?.[0]) }))] })), !isEnterprise && (_jsxs("div", { className: 'flex items-center gap-2', children: [_jsx(Checkbox, { id: 'c4-feedback-allow-contact', checked: allowContact, onCheckedChange: (checked) => setAllowContact(checked === true) }), _jsx(Label, { htmlFor: 'c4-feedback-allow-contact', children: "Camunda may contact me about my feedback" })] })), error && (_jsx(Alert, { variant: 'destructive', title: "Couldn't submit feedback", children: "Something went wrong. Please try again." })), _jsx("div", { children: _jsx(Button, { onClick: submit, disabled: !canSubmit, children: submitting ? 'Submitting…' : 'Submit feedback' }) })] }));
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Design-system-native Help Center "Share your feedback" modal. Mirrors the c3
|
|
102
|
+
* help-center feedback form (type, free text, optional screenshot, contact
|
|
103
|
+
* consent) but is built entirely from @camunda/design-system components so ds
|
|
104
|
+
* mode no longer renders the Carbon-styled c3 modal. Presentational: the host
|
|
105
|
+
* supplies `onSubmit` (which performs the actual POST).
|
|
106
|
+
*/
|
|
107
|
+
export function C4FeedbackModal({ open, onOpenChange, onSubmit, isEnterprise = false, }) {
|
|
108
|
+
return (_jsx(Dialog, { open: open, onOpenChange: onOpenChange, children: _jsxs(DialogContent, { className: 'c4-ui sm:max-w-xl', children: [_jsxs(DialogHeader, { children: [_jsx(DialogTitle, { children: "Share your feedback" }), _jsx(DialogDescription, { children: "We actively use this information to fix problems and improve your experience with our products." })] }), _jsx(C4FeedbackForm, { onSubmit: onSubmit, isEnterprise: isEnterprise, resetKey: open })] }) }));
|
|
109
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { type JSX } from 'react';
|
|
2
|
+
import { type C4FeedbackPayload } from '../c4-feedback-modal/c4-feedback-modal';
|
|
3
|
+
/** Reserved tab ID for the inline feedback form. */
|
|
4
|
+
export declare const FEEDBACK_TAB_ID = "feedback";
|
|
5
|
+
export interface C4HelpCenterTile {
|
|
6
|
+
card_id: string;
|
|
7
|
+
title: string;
|
|
8
|
+
description: string;
|
|
9
|
+
image: string;
|
|
10
|
+
timeToComplete?: string;
|
|
11
|
+
cta?: string;
|
|
12
|
+
link?: string;
|
|
13
|
+
}
|
|
14
|
+
export interface C4HelpCenterTabData {
|
|
15
|
+
id: string;
|
|
16
|
+
label: string;
|
|
17
|
+
title: string;
|
|
18
|
+
tiles: C4HelpCenterTile[];
|
|
19
|
+
}
|
|
20
|
+
export interface C4HelpCenterLink {
|
|
21
|
+
id: string;
|
|
22
|
+
label: string;
|
|
23
|
+
link: string;
|
|
24
|
+
}
|
|
25
|
+
export interface C4HelpCenterData {
|
|
26
|
+
tabs: C4HelpCenterTabData[];
|
|
27
|
+
links?: C4HelpCenterLink[];
|
|
28
|
+
}
|
|
29
|
+
export interface C4HelpCenterProps {
|
|
30
|
+
open: boolean;
|
|
31
|
+
onOpenChange: (open: boolean) => void;
|
|
32
|
+
/** CMS-driven tabs and tiles fetched from the helpcenter API. */
|
|
33
|
+
data?: C4HelpCenterData;
|
|
34
|
+
isLoading?: boolean;
|
|
35
|
+
/** Fallback links shown when no CMS data and no feedback tab is available. */
|
|
36
|
+
helpLinks?: Array<{
|
|
37
|
+
key: string;
|
|
38
|
+
label: string;
|
|
39
|
+
href: string;
|
|
40
|
+
}>;
|
|
41
|
+
/** When provided, a "Share your feedback" tab is added to the sidebar. */
|
|
42
|
+
onSubmitFeedback?: (payload: C4FeedbackPayload) => Promise<void>;
|
|
43
|
+
feedbackEnterprise?: boolean;
|
|
44
|
+
/**
|
|
45
|
+
* Tab ID to activate when the modal opens. Pass `FEEDBACK_TAB_ID` to open
|
|
46
|
+
* directly to the feedback tab (e.g. from `openHelpCenter('feedback')`).
|
|
47
|
+
*/
|
|
48
|
+
initialTabId?: string;
|
|
49
|
+
}
|
|
50
|
+
export declare function C4HelpCenter({ open, onOpenChange, data, isLoading, helpLinks, onSubmitFeedback, feedbackEnterprise, initialTabId, }: C4HelpCenterProps): JSX.Element;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
/*
|
|
3
|
+
* Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
|
|
4
|
+
* under one or more contributor license agreements. Licensed under a commercial license.
|
|
5
|
+
* You may not use this file except in compliance with the commercial license.
|
|
6
|
+
*/
|
|
7
|
+
import { Badge, Button, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Dialog, DialogContent, DialogHeader, DialogTitle, ScrollArea, Tabs, TabsContent, TabsList, TabsTrigger, } from '@camunda/design-system';
|
|
8
|
+
import { ArrowRight, ExternalLink, MessageSquare } from 'lucide-react';
|
|
9
|
+
import { useEffect, useState } from 'react';
|
|
10
|
+
import ReactMarkdown from 'react-markdown';
|
|
11
|
+
import { C4FeedbackForm, } from '../c4-feedback-modal/c4-feedback-modal.js';
|
|
12
|
+
/** Reserved tab ID for the inline feedback form. */
|
|
13
|
+
export const FEEDBACK_TAB_ID = 'feedback';
|
|
14
|
+
export function C4HelpCenter({ open, onOpenChange, data, isLoading, helpLinks, onSubmitFeedback, feedbackEnterprise, initialTabId, }) {
|
|
15
|
+
const [activeTabId, setActiveTabId] = useState('');
|
|
16
|
+
// Set the active tab when the modal opens/closes or initialTabId changes.
|
|
17
|
+
useEffect(() => {
|
|
18
|
+
if (!open) {
|
|
19
|
+
setActiveTabId('');
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
22
|
+
if (initialTabId) {
|
|
23
|
+
setActiveTabId(initialTabId);
|
|
24
|
+
}
|
|
25
|
+
}, [open, initialTabId]);
|
|
26
|
+
const tabs = data?.tabs ?? [];
|
|
27
|
+
const hasFeedbackTab = !!onSubmitFeedback;
|
|
28
|
+
const isActiveIdValid = (activeTabId === FEEDBACK_TAB_ID && hasFeedbackTab) ||
|
|
29
|
+
tabs.some((t) => t.id === activeTabId);
|
|
30
|
+
const effectiveActiveTabId = isActiveIdValid
|
|
31
|
+
? activeTabId
|
|
32
|
+
: (tabs[0]?.id ?? '');
|
|
33
|
+
const showFullUI = isLoading || tabs.length > 0 || hasFeedbackTab;
|
|
34
|
+
return (_jsx(Dialog, { open: open, onOpenChange: onOpenChange, children: _jsx(DialogContent, { className: 'c4-ui flex flex-col gap-0 overflow-hidden overflow-y-hidden p-0', style: { maxWidth: 'min(900px, calc(100% - 2rem))', height: '80vh' }, children: showFullUI ? (_jsxs(_Fragment, { children: [_jsx(DialogHeader, { className: 'flex-shrink-0 border-b px-6 py-4', children: _jsx(DialogTitle, { children: "Help Center" }) }), _jsxs(Tabs, { orientation: 'vertical', value: effectiveActiveTabId, onValueChange: (id) => setActiveTabId(id), className: 'flex min-h-0 flex-1 flex-row overflow-hidden', children: [_jsxs("div", { className: 'flex w-52 flex-shrink-0 flex-col overflow-hidden border-r', children: [_jsx("p", { className: 'px-5 pb-2 pt-4 text-xs font-semibold uppercase text-neutral-foreground-subtle', children: "Topics" }), isLoading ? (_jsx("div", { className: 'flex flex-col gap-2 px-3', children: [1, 2, 3].map((i) => (_jsx("div", { className: 'h-8 animate-pulse rounded bg-neutral-background-strong' }, i))) })) : (_jsxs(TabsList, { variant: 'line', className: 'h-auto w-full flex-col items-start gap-1 rounded-none bg-transparent px-3', children: [tabs.map((tab) => (_jsx(TabsTrigger, { value: tab.id, className: 'w-full justify-start text-sm font-normal', children: tab.label }, tab.id))), hasFeedbackTab && tabs.length > 0 && (_jsx("div", { role: 'none', className: 'my-1 w-full px-2', children: _jsx("div", { className: 'h-px bg-border' }) })), hasFeedbackTab && (_jsxs(TabsTrigger, { value: FEEDBACK_TAB_ID, className: 'w-full justify-start gap-2 text-sm font-normal', children: [_jsx(MessageSquare, { className: 'size-4', "aria-hidden": true }), "Share your feedback"] }))] })), !isLoading && data?.links && data.links.length > 0 && (_jsx("div", { className: 'border-t px-3 py-2', children: data.links.map((link) => (_jsxs("a", { href: link.link, target: '_blank', rel: 'noopener noreferrer', className: 'flex items-center gap-1 px-2 py-1 text-xs text-neutral-foreground-subtle hover:underline', children: [link.label, _jsx(ExternalLink, { className: 'size-3', "aria-hidden": true })] }, link.id))) }))] }), isLoading ? (_jsx("div", { className: 'flex-1 p-6', children: _jsx("div", { className: 'grid grid-cols-2 gap-4', children: [1, 2, 3, 4].map((i) => (_jsx("div", { className: 'h-64 animate-pulse rounded-xl bg-neutral-background-strong' }, i))) }) })) : (_jsxs(ScrollArea, { className: 'flex-1', children: [tabs.map((tab) => (_jsx(TabsContent, { value: tab.id, className: 'mt-0 p-6', children: tab.tiles.length === 0 ? (_jsx("p", { className: 'text-sm text-neutral-foreground-subtle', children: "No content available." })) : (_jsx("div", { className: 'grid grid-cols-2 gap-4', children: tab.tiles.map((tile) => (_jsxs(Card, { className: 'flex flex-col', children: [tile.image && (_jsx("img", { src: tile.image, alt: '', className: 'h-32 w-full object-cover' })), _jsxs(CardHeader, { children: [_jsx(CardTitle, { className: 'text-sm', children: tile.title }), tile.timeToComplete && (_jsx(Badge, { variant: 'neutral', className: 'self-start text-xs', children: tile.timeToComplete }))] }), _jsx(CardContent, { className: 'flex-1', children: _jsx(CardDescription, { children: _jsx(ReactMarkdown, { components: {
|
|
35
|
+
p: ({ children }) => _jsx(_Fragment, { children: children }),
|
|
36
|
+
a: ({ children, href }) => (_jsx("a", { href: href, target: '_blank', rel: 'noopener noreferrer', children: children })),
|
|
37
|
+
}, children: tile.description }) }) }), tile.link && tile.cta && (_jsx(CardFooter, { children: _jsx(Button, { variant: 'secondary', size: 'sm', asChild: true, children: _jsxs("a", { href: tile.link, target: '_blank', rel: 'noopener noreferrer', children: [tile.cta, _jsx(ArrowRight, { className: 'ml-1 size-3', "aria-hidden": true })] }) }) }))] }, tile.card_id))) })) }, tab.id))), hasFeedbackTab && onSubmitFeedback && (_jsx(TabsContent, { value: FEEDBACK_TAB_ID, className: 'mt-0 p-6', children: _jsxs("div", { className: 'max-w-xl', children: [_jsx("p", { className: 'mb-4 text-sm text-neutral-foreground-subtle', children: "We actively use this information to fix problems and improve your experience with our products." }), _jsx(C4FeedbackForm, { onSubmit: onSubmitFeedback, isEnterprise: feedbackEnterprise, resetKey: open })] }) }))] }))] })] })) : (_jsxs(_Fragment, { children: [_jsx(DialogHeader, { className: 'p-6', children: _jsx(DialogTitle, { children: "Help & support" }) }), _jsx("div", { className: 'flex flex-col gap-1 px-4', children: helpLinks &&
|
|
38
|
+
helpLinks.map((link) => (_jsx(Button, { variant: 'ghost', className: 'w-full justify-between', asChild: true, children: _jsxs("a", { href: link.href, target: '_blank', rel: 'noopener noreferrer', children: [link.label, _jsx(ExternalLink, { className: 'size-3.5 text-neutral-foreground-subtle', "aria-hidden": true })] }) }, link.key))) })] })) }) }));
|
|
39
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type AlertVariant } from '@camunda/design-system';
|
|
2
|
+
import { InlineNotification } from '@carbon/react';
|
|
3
|
+
import type { ComponentProps, JSX } from 'react';
|
|
4
|
+
type C4InlineNotificationProps = ComponentProps<typeof InlineNotification>;
|
|
5
|
+
export declare function kindToAlertVariant(kind: unknown): AlertVariant;
|
|
6
|
+
/**
|
|
7
|
+
* Design-system-switchable inline notification.
|
|
8
|
+
*
|
|
9
|
+
* Carbon mode renders Carbon's `InlineNotification` unchanged. ds mode renders
|
|
10
|
+
* the DS-native `Alert` (kind→variant, title, subtitle→description,
|
|
11
|
+
* hideCloseButton→non-dismissible). `lowContrast` has no DS analogue and is
|
|
12
|
+
* ignored in ds mode.
|
|
13
|
+
*/
|
|
14
|
+
export declare function C4InlineNotification(props: C4InlineNotificationProps): JSX.Element;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,37 @@
|
|
|
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 { Alert } from '@camunda/design-system';
|
|
8
|
+
import { InlineNotification } from '@carbon/react';
|
|
9
|
+
import { useC4DesignSystem } from '../../runtime/c4-console-runtime-context.js';
|
|
10
|
+
// Carbon notification `kind` → DS Alert variant.
|
|
11
|
+
const KIND_TO_VARIANT = {
|
|
12
|
+
error: 'destructive',
|
|
13
|
+
info: 'info',
|
|
14
|
+
'info-square': 'info',
|
|
15
|
+
success: 'success',
|
|
16
|
+
warning: 'warning',
|
|
17
|
+
'warning-alt': 'warning',
|
|
18
|
+
};
|
|
19
|
+
export function kindToAlertVariant(kind) {
|
|
20
|
+
return (typeof kind === 'string' && KIND_TO_VARIANT[kind]) || 'default';
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Design-system-switchable inline notification.
|
|
24
|
+
*
|
|
25
|
+
* Carbon mode renders Carbon's `InlineNotification` unchanged. ds mode renders
|
|
26
|
+
* the DS-native `Alert` (kind→variant, title, subtitle→description,
|
|
27
|
+
* hideCloseButton→non-dismissible). `lowContrast` has no DS analogue and is
|
|
28
|
+
* ignored in ds mode.
|
|
29
|
+
*/
|
|
30
|
+
export function C4InlineNotification(props) {
|
|
31
|
+
const designSystem = useC4DesignSystem();
|
|
32
|
+
if (designSystem !== 'ds') {
|
|
33
|
+
return _jsx(InlineNotification, { ...props });
|
|
34
|
+
}
|
|
35
|
+
const { kind, title, subtitle, hideCloseButton, onCloseButtonClick, children, } = props;
|
|
36
|
+
return (_jsx(Alert, { variant: kindToAlertVariant(kind), title: typeof title === 'string' ? title : undefined, description: subtitle, dismissible: !hideCloseButton, onDismiss: onCloseButtonClick, children: children }));
|
|
37
|
+
}
|
|
@@ -5,8 +5,9 @@ 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 { forwardRef, useCallback, useImperativeHandle, useMemo, useState, } from 'react';
|
|
9
|
+
import { Checkbox, Link, Modal, Stack, TextInput } from '../../ui/index.js';
|
|
10
|
+
import { C4InlineNotification } from '../c4-inline-notification/c4-inline-notification.js';
|
|
10
11
|
function safeTranslate(t, key, defaultValue, options) {
|
|
11
12
|
if (!t)
|
|
12
13
|
return defaultValue;
|
|
@@ -176,7 +177,7 @@ export const C4InviteUserToOrganizationModal = forwardRef(({ t, onInviteUser, sh
|
|
|
176
177
|
return (_jsx(Modal, { open: isOpen, modalHeading: modalHeading, primaryButtonText: safeTranslate(t, 'invitations:invite.buttons.primary', 'Send invite'), secondaryButtonText: safeTranslate(t, 'orgmanagement:common.cancel', 'Cancel'), primaryButtonDisabled: inviteSaving, onRequestClose: close, onRequestSubmit: onSubmit, children: _jsxs(Stack, { gap: 5, children: [_jsx(TextInput, { id: 'c4-invite-email', labelText: safeTranslate(t, 'invitations:invite.form.email', 'Email address'), value: inviteEmail, onChange: (e) => {
|
|
177
178
|
setInviteError(undefined);
|
|
178
179
|
setInviteEmail(e.currentTarget.value);
|
|
179
|
-
}, disabled: inviteSaving, invalid: Boolean(inviteError), invalidText: inviteError }), rolesError && (_jsx(
|
|
180
|
+
}, disabled: inviteSaving, invalid: Boolean(inviteError), invalidText: inviteError }), rolesError && (_jsx(C4InlineNotification, { lowContrast: true, kind: 'error', title: '', subtitle: rolesError })), _jsxs("fieldset", { className: 'cds--fieldset', children: [_jsx("legend", { className: 'cds--label', children: safeTranslate(t, 'invitations:invite.form.roles', 'Select role(s) to the platform') }), primaryRoles.map((role) => {
|
|
180
181
|
const enriched = roleLabelDescription(t, role);
|
|
181
182
|
return (_jsxs("span", { children: [_jsx(Checkbox, { labelText: enriched.label, id: `c4-invite-role-${role}`, checked: inviteRoles.has(role), disabled: inviteSaving, onChange: (_, data) => {
|
|
182
183
|
setRolesError(undefined);
|
|
@@ -191,7 +192,7 @@ export const C4InviteUserToOrganizationModal = forwardRef(({ t, onInviteUser, sh
|
|
|
191
192
|
return next;
|
|
192
193
|
});
|
|
193
194
|
} }), enriched.description && (_jsx("span", { className: 'cds--label', style: { marginLeft: '27px' }, children: enriched.description }))] }, `c4-invite-role-${role}`));
|
|
194
|
-
}), _jsxs("div", { style: { margin: '16px 0' }, children: [_jsx(
|
|
195
|
+
}), _jsxs("div", { style: { margin: '16px 0' }, children: [_jsx(C4InlineNotification, { lowContrast: true, kind: 'info', hideCloseButton: true, title: '', subtitle: safeTranslate(t, 'users:changeOrgRoles.notification.title', 'Starting with version 8.8, user access to clusters is managed independently.') }), _jsxs("p", { style: { paddingTop: '4px' }, children: [_jsx(Link, { href: learnMoreUrl, target: '_blank', rel: 'noopener noreferrer', children: safeTranslate(t, 'users:changeOrgRoles.notification.learnMore', 'Learn more') }), "."] }), _jsx("p", { style: { paddingTop: '4px' }, children: safeTranslate(t, 'invitations:invite.form.clusterAuthDisabledNote', 'If cluster authorizations are disabled, the user will have full access to the cluster and its components.') })] }), legacyClusterRoles.length > 0 && (_jsxs(_Fragment, { children: [_jsx("div", { style: {
|
|
195
196
|
color: 'var(--cds-text-secondary)',
|
|
196
197
|
letterSpacing: 'var(--cds-label-01-letter-spacing, 0.32px)',
|
|
197
198
|
fontSize: 'var(--cds-label-01-font-size, 0.75rem)',
|
|
@@ -4,12 +4,14 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
4
4
|
* under one or more contributor license agreements. Licensed under a commercial license.
|
|
5
5
|
* You may not use this file except in compliance with the commercial license.
|
|
6
6
|
*/
|
|
7
|
-
import { InlineNotification, Stack, Tile } from '@carbon/react';
|
|
8
7
|
import styled from 'styled-components';
|
|
8
|
+
import { Stack, Tile } from '../../ui/index.js';
|
|
9
9
|
import { C4Breadcrumb } from '../c4-breadcrumb/c4-breadcrumb.js';
|
|
10
|
+
import { C4InlineNotification } from '../c4-inline-notification/c4-inline-notification.js';
|
|
10
11
|
import { C4JobDashboardErrorHandler } from '../c4-job-dashboard-shared/c4-job-dashboard-error-handler.js';
|
|
11
12
|
import C4JobDashboardTimeRangeDropdown from '../c4-job-dashboard-shared/c4-job-dashboard-time-range-dropdown.js';
|
|
12
13
|
import C4TimestampInformation from '../c4-job-dashboard-shared/c4-timestamp-information.js';
|
|
14
|
+
import { C4PageLayout } from '../c4-page-layout/c4-page-layout.js';
|
|
13
15
|
import C4JobDashboardErrorTable from './elements/c4-job-dashboard-error-table.js';
|
|
14
16
|
import C4JobDashboardPieChart from './elements/c4-job-dashboard-piechart.js';
|
|
15
17
|
import C4JobDashboardTimeChart from './elements/c4-job-dashboard-time-chart.js';
|
|
@@ -53,5 +55,5 @@ export const C4JobDashboardDetailsPage = ({ jobType, config, isLoadingConfig, la
|
|
|
53
55
|
const error = { status: 403, details: 'Feature is disabled', message: '' };
|
|
54
56
|
return (_jsx(C4JobDashboardErrorHandler, { itemsLength: 0, showIcons: true, translations: translations.errorHandler, error: error }));
|
|
55
57
|
}
|
|
56
|
-
return (_jsxs(Stack, { gap: 4, children: [_jsx(C4Breadcrumb, { title: translations.title, elements: breadcrumb.elements }), _jsxs("p", { children: [translations.jobTypeLabel, " ", _jsx("strong", { children: jobType })] }), _jsx(C4TimestampInformation, { description: translations.lastUpdated, lastUpdatedAt: lastUpdatedAt }), _jsx(C4JobDashboardTimeRangeDropdown, { onChange: onTimeRangeChange, exportInterval: config?.exportInterval, disabled: isLoadingConfig, translations: translations.dropdown }), jobData.isIncomplete && (_jsx(
|
|
58
|
+
return (_jsx(C4PageLayout, { children: _jsxs(Stack, { gap: 4, children: [_jsx(C4Breadcrumb, { title: translations.title, elements: breadcrumb.elements }), _jsxs("p", { children: [translations.jobTypeLabel, " ", _jsx("strong", { children: jobType })] }), _jsx(C4TimestampInformation, { description: translations.lastUpdated, lastUpdatedAt: lastUpdatedAt }), _jsx(C4JobDashboardTimeRangeDropdown, { onChange: onTimeRangeChange, exportInterval: config?.exportInterval, disabled: isLoadingConfig, translations: translations.dropdown }), jobData.isIncomplete && (_jsx(C4InlineNotification, { style: { maxWidth: '100%' }, lowContrast: true, kind: 'warning', title: translations.dataLimitWarning.title, subtitle: translations.dataLimitWarning.description })), _jsx(ChartContainer, { children: _jsxs(ChartGrid, { children: [_jsx(TimeChartWrapper, { children: _jsx(C4JobDashboardTimeChart, { timeSeries: timeSeries.items, colorScale: colorScale, isLoading: timeSeries.isLoading, translations: translations, error: timeSeries.error }) }), _jsx(PieChartWrapper, { children: _jsx(C4JobDashboardPieChart, { jobData: jobData.data, colorScale: colorScale, isLoading: jobData.isLoading, translations: translations, error: jobData.error }) })] }) }), _jsx(TileWithShadow, { children: _jsx(C4JobDashboardWorkerTable, { workerData: workerData.items, isLoading: workerData.isLoading, translations: translations, error: workerData.error }) }), _jsx(TileWithShadow, { children: _jsx(C4JobDashboardErrorTable, { errors: errorData.items, operateBaseUrl: errorData.operateBaseUrl, isLoading: errorData.isLoading, translations: translations, error: errorData.error, trackErrorClick: trackErrorClick }) })] }) }));
|
|
57
59
|
};
|
package/lib/esm/components/c4-job-dashboard-details-page/elements/c4-job-dashboard-chart-heading.js
CHANGED
|
@@ -4,9 +4,9 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
4
4
|
* under one or more contributor license agreements. Licensed under a commercial license.
|
|
5
5
|
* You may not use this file except in compliance with the commercial license.
|
|
6
6
|
*/
|
|
7
|
-
import { Tooltip } from '@carbon/react';
|
|
8
7
|
import { Information } from '@carbon/react/icons/index.esm.js';
|
|
9
8
|
import styled from 'styled-components';
|
|
9
|
+
import { Tooltip } from '../../../ui/index.js';
|
|
10
10
|
const Wrapper = styled.div `
|
|
11
11
|
display: flex;
|
|
12
12
|
align-items: center;
|
package/lib/esm/components/c4-job-dashboard-details-page/elements/c4-job-dashboard-error-table.js
CHANGED
|
@@ -1,11 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
-
|
|
3
|
-
|
|
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 { C3DataTable, } from '@camunda/camunda-composite-components';
|
|
8
|
-
import { Stack } from '@carbon/react';
|
|
2
|
+
import { Stack } from '../../../ui/index.js';
|
|
3
|
+
import { C4DataTable } from '../../c4-data-table/c4-data-table.js';
|
|
9
4
|
import { C4BackgroundFetchingIndicator } from '../../c4-job-dashboard-shared/c4-background-fetching-indicator.js';
|
|
10
5
|
import { C4JobDashboardErrorHandler } from '../../c4-job-dashboard-shared/c4-job-dashboard-error-handler.js';
|
|
11
6
|
function noWrapLabel(label) {
|
|
@@ -47,7 +42,7 @@ function C4JobDashboardErrorTable({ errors, operateBaseUrl, isLoading, translati
|
|
|
47
42
|
},
|
|
48
43
|
]
|
|
49
44
|
: [];
|
|
50
|
-
return (_jsxs(_Fragment, { children: [_jsx("h2", { children: translations.errorTable.title }), _jsx(
|
|
45
|
+
return (_jsxs(_Fragment, { children: [_jsx("h2", { children: translations.errorTable.title }), _jsx(C4DataTable, { id: 'errors-data-table', data: rows, headers: [
|
|
51
46
|
{
|
|
52
47
|
key: 'errorCode',
|
|
53
48
|
label: noWrapLabel(translations.errorTable.headers.errorType),
|
package/lib/esm/components/c4-job-dashboard-details-page/elements/c4-job-dashboard-time-chart.js
CHANGED
|
@@ -6,7 +6,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
6
6
|
*/
|
|
7
7
|
import { TickRotations } from '@carbon/charts';
|
|
8
8
|
import { ScaleTypes, StackedAreaChart, } from '@carbon/charts-react';
|
|
9
|
-
import { Stack } from '
|
|
9
|
+
import { Stack } from '../../../ui/index.js';
|
|
10
10
|
import { C4JobDashboardErrorHandler } from '../../c4-job-dashboard-shared/c4-job-dashboard-error-handler.js';
|
|
11
11
|
import { CHART_HEIGHT } from '../c4-job-dashboard-details-page.js';
|
|
12
12
|
import C4JobDashboardChartHeading from './c4-job-dashboard-chart-heading.js';
|