@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
|
@@ -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';
|
package/lib/esm/components/c4-job-dashboard-details-page/elements/c4-job-dashboard-worker-table.js
CHANGED
|
@@ -4,8 +4,8 @@ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-run
|
|
|
4
4
|
* under one or more contributor license agreements. Licensed under a commercial license.
|
|
5
5
|
* You may not use this file except in compliance with the commercial license.
|
|
6
6
|
*/
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
7
|
+
import { Stack } from '../../../ui/index.js';
|
|
8
|
+
import { C4DataTable } from '../../c4-data-table/c4-data-table.js';
|
|
9
9
|
import { C4BackgroundFetchingIndicator } from '../../c4-job-dashboard-shared/c4-background-fetching-indicator.js';
|
|
10
10
|
import { C4JobDashboardErrorHandler } from '../../c4-job-dashboard-shared/c4-job-dashboard-error-handler.js';
|
|
11
11
|
import { headerWithTooltip } from '../../c4-job-dashboard-shared/c4-job-dashboard-table-heading-with-tooltip.js';
|
|
@@ -21,7 +21,7 @@ function C4JobDashboardWorkerTable({ workerData, error, isLoading, translations,
|
|
|
21
21
|
if (error || (!isLoading && workerData.length === 0)) {
|
|
22
22
|
return (_jsxs(_Fragment, { children: [_jsx("h2", { children: translations.workerTable.title }), _jsx(C4JobDashboardErrorHandler, { itemsLength: workerData.length, showIcons: false, error: error, translations: translations.errorHandler })] }));
|
|
23
23
|
}
|
|
24
|
-
return (_jsxs(Stack, { gap: 4, children: [_jsx("h2", { children: translations.workerTable.title }), _jsx(
|
|
24
|
+
return (_jsxs(Stack, { gap: 4, children: [_jsx("h2", { children: translations.workerTable.title }), _jsx(C4DataTable, { id: 'worker-data-table', data: tableData, headers: [
|
|
25
25
|
{ key: 'worker', label: translations.workerTable.headers.workerName },
|
|
26
26
|
{
|
|
27
27
|
key: 'completed',
|
|
@@ -4,9 +4,10 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
4
4
|
* under one or more contributor license agreements. Licensed under a commercial license.
|
|
5
5
|
* You may not use this file except in compliance with the commercial license.
|
|
6
6
|
*/
|
|
7
|
-
import {
|
|
7
|
+
import { Layer } from '@carbon/react';
|
|
8
8
|
import styled from 'styled-components';
|
|
9
9
|
import { JobsCompletedIcon, JobsCreatedIcon, JobsFailedIcon, } from '../../icons/c4-icons.js';
|
|
10
|
+
import { Button, Loading, Stack, Tile, Tooltip } from '../../ui/index.js';
|
|
10
11
|
import { C4JobDashboardErrorHandler } from '../c4-job-dashboard-shared/c4-job-dashboard-error-handler.js';
|
|
11
12
|
import C4TimestampInformation from '../c4-job-dashboard-shared/c4-timestamp-information.js';
|
|
12
13
|
const containerHeight = '30vh';
|
|
@@ -1,21 +1,18 @@
|
|
|
1
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 { C3DataTable, } from '@camunda/camunda-composite-components';
|
|
8
|
-
import { InlineNotification, Stack } from '@carbon/react';
|
|
9
2
|
import { Launch } from '@carbon/react/icons/index.esm.js';
|
|
10
3
|
import { useEffect, useState } from 'react';
|
|
11
4
|
import { C4_EXTERNAL_URLS } from '../../externalUrls.const.js';
|
|
5
|
+
import { Stack } from '../../ui/index.js';
|
|
12
6
|
import { C4Breadcrumb } from '../c4-breadcrumb/c4-breadcrumb.js';
|
|
7
|
+
import { C4DataTable } from '../c4-data-table/c4-data-table.js';
|
|
8
|
+
import { C4InlineNotification } from '../c4-inline-notification/c4-inline-notification.js';
|
|
13
9
|
import { C4BackgroundFetchingIndicator } from '../c4-job-dashboard-shared/c4-background-fetching-indicator.js';
|
|
14
10
|
import { C4JobDashboardErrorHandler } from '../c4-job-dashboard-shared/c4-job-dashboard-error-handler.js';
|
|
15
11
|
import { headerWithTooltip } from '../c4-job-dashboard-shared/c4-job-dashboard-table-heading-with-tooltip.js';
|
|
16
12
|
import C4JobDashboardTimeRangeDropdown from '../c4-job-dashboard-shared/c4-job-dashboard-time-range-dropdown.js';
|
|
17
13
|
import C4TimestampInformation from '../c4-job-dashboard-shared/c4-timestamp-information.js';
|
|
18
14
|
import { C4LinkButton } from '../c4-link-button/c4-link-button.js';
|
|
15
|
+
import { C4PageLayout } from '../c4-page-layout/c4-page-layout.js';
|
|
19
16
|
export const C4JobDashboardOverviewPage = ({ error, items, isIncomplete, config, onTimeRangeChange, breadcrumb, isLoadingConfig, isLoadingTable, translations, lastUpdatedAt, }) => {
|
|
20
17
|
const [rows, setRows] = useState([]);
|
|
21
18
|
useEffect(() => {
|
|
@@ -54,47 +51,47 @@ export const C4JobDashboardOverviewPage = ({ error, items, isIncomplete, config,
|
|
|
54
51
|
};
|
|
55
52
|
return (_jsx(C4JobDashboardErrorHandler, { itemsLength: 0, showIcons: true, translations: translations.errorHandler, error: error }));
|
|
56
53
|
}
|
|
57
|
-
return (_jsxs(Stack, { gap: 3, children: [_jsx(C4Breadcrumb, { loading: false, elements: breadcrumb.elements, title: translations.title }), _jsxs("p", { children: [translations.description, ' ', _jsx(C4LinkButton, { onClick: () => window.open(C4_EXTERNAL_URLS.docs.jobDashboard.jobWorker, '_blank', 'noopener,noreferrer'), label: translations.learnMoreLabel, icon: _jsx(Launch, {}) })] }), _jsx(C4TimestampInformation, { description: translations.lastUpdated, lastUpdatedAt: lastUpdatedAt }), _jsx(C4JobDashboardTimeRangeDropdown, { onChange: onTimeRangeChange, exportInterval: config?.exportInterval, disabled: isLoadingConfig, translations: translations.dropdown }), shouldShowErrorHandler ? (_jsx(C4JobDashboardErrorHandler, { error: error, itemsLength: items.length, showIcons: true, translations: translations.errorHandler })) : (_jsxs(_Fragment, { children: [isIncomplete && (_jsx(
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
54
|
+
return (_jsx(C4PageLayout, { children: _jsxs(Stack, { gap: 3, children: [_jsx(C4Breadcrumb, { loading: false, elements: breadcrumb.elements, title: translations.title }), _jsxs("p", { children: [translations.description, ' ', _jsx(C4LinkButton, { onClick: () => window.open(C4_EXTERNAL_URLS.docs.jobDashboard.jobWorker, '_blank', 'noopener,noreferrer'), label: translations.learnMoreLabel, icon: _jsx(Launch, {}) })] }), _jsx(C4TimestampInformation, { description: translations.lastUpdated, lastUpdatedAt: lastUpdatedAt }), _jsx(C4JobDashboardTimeRangeDropdown, { onChange: onTimeRangeChange, exportInterval: config?.exportInterval, disabled: isLoadingConfig, translations: translations.dropdown }), shouldShowErrorHandler ? (_jsx(C4JobDashboardErrorHandler, { error: error, itemsLength: items.length, showIcons: true, translations: translations.errorHandler })) : (_jsxs(_Fragment, { children: [isIncomplete && (_jsx(C4InlineNotification, { style: { maxWidth: '100%' }, lowContrast: true, kind: 'warning', title: translations.dataLimitWarning.title, subtitle: translations.dataLimitWarning.description })), _jsx(C4DataTable, { id: 'usage-history-table', data: rows, toolbar: toolbar, headers: [
|
|
55
|
+
{
|
|
56
|
+
key: 'jobType',
|
|
57
|
+
label: translations.tableHeaders.jobType,
|
|
58
|
+
type: {
|
|
59
|
+
type: 'link-button',
|
|
60
|
+
options: {
|
|
61
|
+
linkButtonOptions: {
|
|
62
|
+
onClick: (row) => {
|
|
63
|
+
if (row.onClick) {
|
|
64
|
+
row.onClick();
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
disabled: (row) => !row.onClick,
|
|
69
68
|
},
|
|
70
|
-
disabled: (row) => !row.onClick,
|
|
71
69
|
},
|
|
72
70
|
},
|
|
73
71
|
},
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
}, isLoading: items.length === 0 && isLoadingTable, queryPrefix: 'job-dashboard-overview' }), _jsx(C4BackgroundFetchingIndicator, { isLoading: isLoadingTable, itemsLength: items.length, loadingMoreDataText: translations.backgroundFetching })] }))] }));
|
|
72
|
+
{
|
|
73
|
+
key: 'workers',
|
|
74
|
+
label: translations.tableHeaders.assignedWorkers,
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
key: 'created',
|
|
78
|
+
label: headerWithTooltip(translations.tableHeaders.createdJobs, translations.tableHeaders.createdJobsTooltip, items.length === 0 && isLoadingTable),
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
key: 'completed',
|
|
82
|
+
label: headerWithTooltip(translations.tableHeaders.completedJobs, translations.tableHeaders.completedJobsTooltip, items.length === 0 && isLoadingTable),
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
key: 'failed',
|
|
86
|
+
label: headerWithTooltip(translations.tableHeaders.failedJobs, translations.tableHeaders.failedJobsTooltip, items.length === 0 && isLoadingTable),
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
key: 'lastCompleted',
|
|
90
|
+
label: translations.tableHeaders.lastCompleted,
|
|
91
|
+
},
|
|
92
|
+
], options: {
|
|
93
|
+
pageSize: 10,
|
|
94
|
+
tableSize: 'lg',
|
|
95
|
+
useZebraStyles: false,
|
|
96
|
+
}, isLoading: items.length === 0 && isLoadingTable, queryPrefix: 'job-dashboard-overview' }), _jsx(C4BackgroundFetchingIndicator, { isLoading: isLoadingTable, itemsLength: items.length, loadingMoreDataText: translations.backgroundFetching })] }))] }) }));
|
|
100
97
|
};
|
|
@@ -1,10 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
|
|
3
|
-
* Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
|
|
4
|
-
* under one or more contributor license agreements. Licensed under a commercial license.
|
|
5
|
-
* You may not use this file except in compliance with the commercial license.
|
|
6
|
-
*/
|
|
7
|
-
import { ProgressBar } from '@carbon/react';
|
|
2
|
+
import { ProgressBar } from '../../ui/index.js';
|
|
8
3
|
export const C4BackgroundFetchingIndicator = ({ itemsLength, isLoading, loadingMoreDataText }) => {
|
|
9
4
|
return (_jsx(_Fragment, { children: itemsLength > 0 && isLoading && (_jsxs(_Fragment, { children: [_jsx(ProgressBar, { hideLabel: true, label: 'background fetching data', size: 'small', type: 'inline' }), _jsx("p", { style: { color: 'var(--cds-text-secondary)' }, children: loadingMoreDataText })] })) }));
|
|
10
5
|
};
|
|
@@ -4,11 +4,11 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
|
|
|
4
4
|
* under one or more contributor license agreements. Licensed under a commercial license.
|
|
5
5
|
* You may not use this file except in compliance with the commercial license.
|
|
6
6
|
*/
|
|
7
|
-
import { Tile } from '@carbon/react';
|
|
8
7
|
import { Launch } from '@carbon/react/icons/index.esm.js';
|
|
9
8
|
import styled from 'styled-components';
|
|
10
9
|
import { C4_EXTERNAL_URLS } from '../../externalUrls.const.js';
|
|
11
10
|
import { AccessRestrictedIcon, EmptyJobsIcon, ErrorIcon, } from '../../icons/c4-icons.js';
|
|
11
|
+
import { Tile } from '../../ui/index.js';
|
|
12
12
|
import { C4LinkButton } from '../c4-link-button/c4-link-button.js';
|
|
13
13
|
const Row = styled.div `
|
|
14
14
|
display: flex;
|
package/lib/esm/components/c4-job-dashboard-shared/c4-job-dashboard-table-heading-with-tooltip.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 HeadingWithIconWrapper = styled.div `
|
|
11
11
|
display: flex;
|
|
12
12
|
gap: 0.5rem;
|
|
@@ -4,7 +4,7 @@ import { jsx as _jsx } 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 { Dropdown } from '
|
|
7
|
+
import { Dropdown } from '../../ui/index.js';
|
|
8
8
|
const FALLBACK_RESOLUTION = 30;
|
|
9
9
|
const ONE_DAY_IN_MINUTES = 24 * 60;
|
|
10
10
|
/**
|
|
@@ -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 { Modal, Stack } from '@carbon/react';
|
|
2
|
+
import { Modal, Stack } from '../../ui/index.js';
|
|
8
3
|
function safeTranslate(t, key, defaultValue, options) {
|
|
9
4
|
if (!t)
|
|
10
5
|
return defaultValue;
|
|
@@ -1,10 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
|
|
3
|
-
* Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
|
|
4
|
-
* under one or more contributor license agreements. Licensed under a commercial license.
|
|
5
|
-
* You may not use this file except in compliance with the commercial license.
|
|
6
|
-
*/
|
|
7
|
-
import { Link } from '@carbon/react';
|
|
2
|
+
import { Link } from '../../ui/index.js';
|
|
8
3
|
export const C4LinkButton = ({ label, onClick, style, inline, icon, disabled, }) => {
|
|
9
4
|
if (disabled === undefined) {
|
|
10
5
|
disabled = false;
|
|
@@ -4,8 +4,8 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
|
|
|
4
4
|
* under one or more contributor license agreements. Licensed under a commercial license.
|
|
5
5
|
* You may not use this file except in compliance with the commercial license.
|
|
6
6
|
*/
|
|
7
|
-
import { Link, ProgressBar, SkeletonPlaceholder, Stack, Tile, } from '@carbon/react';
|
|
8
7
|
import { ErrorFilled, WarningAltFilled } from '@carbon/react/icons/index.esm.js';
|
|
8
|
+
import { Link, ProgressBar, SkeletonPlaceholder, Stack, Tile } from '../../ui/index.js';
|
|
9
9
|
export const C4LLMUsageMeter = ({ usage, limit, title, description, isLoading = false, hasError = false, urls, text = {}, }) => {
|
|
10
10
|
const { usageLabel = 'Used', limitLabel = 'Limit', errorMessage = 'Failed to load usage data', cardTitle = 'Easy LLM (Camunda provided.)', learnMoreLabel = 'Learn more about Camunda provided LLM tokens', tokensRemainingLabel = 'tokens remaining', approachingLimitMessage, overLimitPrefix = 'You have reached your token limit. Please', overLimitContactLabel = 'contact our Camunda team to request more tokens', overLimitSuffix = 'and talk through your use cases.', } = text;
|
|
11
11
|
const formatCurrency = (val) => val.toLocaleString('en-US', { style: 'currency', currency: 'USD' });
|
|
@@ -1,16 +1,14 @@
|
|
|
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 { MenuButton, MenuItem, Stack, StructuredListBody, StructuredListCell, StructuredListRow, StructuredListSkeleton, StructuredListWrapper, } from '@carbon/react';
|
|
2
|
+
import { Stack } from '../../ui/index.js';
|
|
3
|
+
import { useMenuButtonFamily } from '../../ui/families.js';
|
|
4
|
+
import { C4StructuredListBody, C4StructuredListCell, C4StructuredListRow, C4StructuredListSkeleton, C4StructuredListWrapper, } from '../c4-structured-list/c4-structured-list.js';
|
|
8
5
|
export const C4ManagementActivity = ({ orgId, activities, loading, downloading, onExportJSON, onExportCSV, exportLabel, exportingLabel, exportJSONLabel, exportCSVLabel, noActivityText, }) => {
|
|
6
|
+
const { MenuButton, MenuItem } = useMenuButtonFamily();
|
|
9
7
|
if (loading) {
|
|
10
|
-
return _jsx(
|
|
8
|
+
return _jsx(C4StructuredListSkeleton, { rowCount: 6 });
|
|
11
9
|
}
|
|
12
|
-
const component = (_jsx(Stack, { gap: 8, children: activities.map((activity, index) => (_jsxs(Stack, { gap: 3, children: [_jsxs("div", { style: { display: 'flex', justifyContent: 'space-between' }, children: [_jsx("h2", { children: activity.heading }), index === 0 && (_jsxs(MenuButton, { label: downloading ? exportingLabel : exportLabel, menuAlignment: 'bottom', disabled: downloading, children: [_jsx(MenuItem, { onClick: onExportJSON, label: exportJSONLabel }), _jsx(MenuItem, { onClick: onExportCSV, label: exportCSVLabel })] }))] }), activity.entries.length > 0 ? (_jsx("div", { style: { overflowX: 'auto' }, children: _jsx(
|
|
13
|
-
return (_jsxs(
|
|
10
|
+
const component = (_jsx(Stack, { gap: 8, children: activities.map((activity, index) => (_jsxs(Stack, { gap: 3, children: [_jsxs("div", { style: { display: 'flex', justifyContent: 'space-between' }, children: [_jsx("h2", { children: activity.heading }), index === 0 && (_jsxs(MenuButton, { label: downloading ? exportingLabel : exportLabel, menuAlignment: 'bottom', disabled: downloading, children: [_jsx(MenuItem, { onClick: onExportJSON, label: exportJSONLabel }), _jsx(MenuItem, { onClick: onExportCSV, label: exportCSVLabel })] }))] }), activity.entries.length > 0 ? (_jsx("div", { style: { overflowX: 'auto' }, children: _jsx(C4StructuredListWrapper, { isCondensed: true, children: _jsx(C4StructuredListBody, { children: activity.entries.map((item, entryIndex) => {
|
|
11
|
+
return (_jsxs(C4StructuredListRow, { children: [_jsx(C4StructuredListCell, { noWrap: true, children: _jsxs(Stack, { gap: 1, children: [_jsx("strong", { children: item.date }), _jsx("span", { children: item.user })] }) }), _jsx(C4StructuredListCell, { noWrap: true, children: item.entry }), _jsx(C4StructuredListCell, { noWrap: true })] }, `activity-${orgId}-${activity.heading}-${entryIndex}`));
|
|
14
12
|
}) }) }) })) : (_jsx("p", { children: noActivityText }))] }, `activity-${orgId}-${activity.heading}-section`))) }));
|
|
15
13
|
return component;
|
|
16
14
|
};
|
|
@@ -1,18 +1,16 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
|
|
3
|
-
* Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
|
|
4
|
-
* under one or more contributor license agreements. Licensed under a commercial license.
|
|
5
|
-
* You may not use this file except in compliance with the commercial license.
|
|
6
|
-
*/
|
|
7
|
-
import { C3DataTable, C3EmptyState, } from '@camunda/camunda-composite-components';
|
|
8
|
-
import { CodeSnippet, DataTableSkeleton, ListItem, Stack, UnorderedList, } from '@carbon/react';
|
|
2
|
+
import { ListItem, UnorderedList } from '@carbon/react';
|
|
9
3
|
import { C4_ASSET_URLS } from '../../assetUrls.js';
|
|
4
|
+
import { CodeSnippet, Stack } from '../../ui/index.js';
|
|
5
|
+
import { C4DataTable } from '../c4-data-table/c4-data-table.js';
|
|
6
|
+
import { C4DataTableSkeleton } from '../c4-data-table/c4-data-table-skeleton.js';
|
|
7
|
+
import { C4EmptyState } from '../c4-empty-state/c4-empty-state.js';
|
|
10
8
|
export const C4ManagementApi = ({ clients, loading, showIpWhitelistColumn, showHotBackupColumn, text, urls, permissions, onShowDetails, onUpdateClient, onDeleteClient, onCreate, onOpenDocs, }) => {
|
|
11
9
|
if (loading) {
|
|
12
|
-
return _jsx(
|
|
10
|
+
return _jsx(C4DataTableSkeleton, { showToolbar: false, showHeader: false });
|
|
13
11
|
}
|
|
14
12
|
if (clients.length === 0) {
|
|
15
|
-
return (_jsx(
|
|
13
|
+
return (_jsx(C4EmptyState, { icon: {
|
|
16
14
|
path: C4_ASSET_URLS.consoleApiIcon,
|
|
17
15
|
altText: 'consoleAPI',
|
|
18
16
|
}, heading: text.emptyStateTitle, description: text.emptyStateDescription, button: permissions.canCreate
|
|
@@ -194,9 +192,9 @@ export const C4ManagementApi = ({ clients, loading, showIpWhitelistColumn, showH
|
|
|
194
192
|
});
|
|
195
193
|
}
|
|
196
194
|
const expandedRow = () => {
|
|
197
|
-
return (_jsxs(UnorderedList, { children: [_jsxs(ListItem, { style: { minHeight: '30px' }, children: [text.expandedClientSecret, ": ", text.expandedClientSecretNotVisible] }), _jsxs(ListItem, { style: { minHeight: '30px' }, children: [text.expandedApiUrl, ":", ' ', _jsx(CodeSnippet, { type: 'inline', feedback: text.urlCopiedFeedback, children: urls.apiUrl })] }), _jsxs(ListItem, { style: { minHeight: '30px' }, children: [text.expandedOauthUrl, ":", ' ', _jsx(CodeSnippet, { type: 'inline', feedback: text.urlCopiedFeedback, children: urls.oauthUrl })] })] }));
|
|
195
|
+
return (_jsxs(UnorderedList, { style: { color: 'var(--cds-text-primary)' }, children: [_jsxs(ListItem, { style: { minHeight: '30px' }, children: [text.expandedClientSecret, ": ", text.expandedClientSecretNotVisible] }), _jsxs(ListItem, { style: { minHeight: '30px' }, children: [text.expandedApiUrl, ":", ' ', _jsx(CodeSnippet, { type: 'inline', feedback: text.urlCopiedFeedback, children: urls.apiUrl })] }), _jsxs(ListItem, { style: { minHeight: '30px' }, children: [text.expandedOauthUrl, ":", ' ', _jsx(CodeSnippet, { type: 'inline', feedback: text.urlCopiedFeedback, children: urls.oauthUrl })] })] }));
|
|
198
196
|
};
|
|
199
|
-
const component = (_jsxs(Stack, { gap: 3, children: [_jsx("div", { style: { display: 'flex', flexDirection: 'column', overflowX: 'auto' }, children: _jsx(
|
|
197
|
+
const component = (_jsxs(Stack, { gap: 3, children: [_jsx("div", { style: { display: 'flex', flexDirection: 'column', overflowX: 'auto' }, children: _jsx(C4DataTable, { headers: headerData, data: clients.map((item) => {
|
|
200
198
|
return { ...item, expansion: expandedRow() };
|
|
201
199
|
}), title: text.title, toolbar: toolbar, actions: actions, options: {
|
|
202
200
|
actionsUseOverflowMenuMinItems: 1,
|
|
@@ -1,22 +1,18 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } 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 { Button, Link, Stack, StructuredListBody, StructuredListCell, StructuredListRow, StructuredListSkeleton, StructuredListWrapper, } from '@carbon/react';
|
|
2
|
+
import { Button, Link, Stack } from '../../ui/index.js';
|
|
3
|
+
import { C4StructuredListBody, C4StructuredListCell, C4StructuredListRow, C4StructuredListSkeleton, C4StructuredListWrapper, } from '../c4-structured-list/c4-structured-list.js';
|
|
8
4
|
export const C4ManagementOverview = ({ orgId, overviewItems, loading, }) => {
|
|
9
5
|
if (loading) {
|
|
10
|
-
return _jsx(
|
|
6
|
+
return _jsx(C4StructuredListSkeleton, { rowCount: 6 });
|
|
11
7
|
}
|
|
12
|
-
const component = (_jsx(Stack, { gap: 6, children: _jsx(
|
|
13
|
-
return (_jsxs(
|
|
8
|
+
const component = (_jsx(Stack, { gap: 6, children: _jsx(C4StructuredListWrapper, { isCondensed: true, children: _jsx(C4StructuredListBody, { children: overviewItems.map((item) => {
|
|
9
|
+
return (_jsxs(C4StructuredListRow, { children: [_jsx(C4StructuredListCell, { noWrap: true, style: {
|
|
14
10
|
width: '200px',
|
|
15
|
-
}, children: _jsx("strong", { children: item.label }) }), _jsx(
|
|
11
|
+
}, children: _jsx("strong", { children: item.label }) }), _jsx(C4StructuredListCell, { noWrap: true, style: {
|
|
16
12
|
width: '200px',
|
|
17
|
-
}, children: item.value }), _jsxs(
|
|
13
|
+
}, children: item.value }), _jsxs(C4StructuredListCell, { noWrap: true, children: [item.action?.kind === 'ghost' && (_jsx(Button, { size: 'sm', kind: item.action.kind, onClick: item.action.action, iconDescription: item.action.iconDescription, hasIconOnly: item.action.kind === 'ghost', renderIcon: item.action.renderIcon, style: { minHeight: '0px' }, children: item.action.kind !== 'ghost'
|
|
18
14
|
? item.action.iconDescription
|
|
19
|
-
: undefined })), item.action && item.action.kind !== 'ghost' && (_jsx(Link, { onClick: item.action.action, style: { cursor: 'pointer' }, children: item.action.iconDescription })), item.additionalValue && _jsx("span", { children: item.additionalValue })] }), _jsx(
|
|
15
|
+
: undefined })), item.action && item.action.kind !== 'ghost' && (_jsx(Link, { onClick: item.action.action, style: { cursor: 'pointer' }, children: item.action.iconDescription })), item.additionalValue && _jsx("span", { children: item.additionalValue })] }), _jsx(C4StructuredListCell, { children: " " })] }, `overview-${orgId}-${item.id}`));
|
|
20
16
|
}) }) }) }));
|
|
21
17
|
return component;
|
|
22
18
|
};
|
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
/*
|
|
3
|
-
* Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
|
|
4
|
-
* under one or more contributor license agreements. Licensed under a commercial license.
|
|
5
|
-
* You may not use this file except in compliance with the commercial license.
|
|
6
|
-
*/
|
|
7
|
-
import { C3DataTable, C3EmptyState, } from '@camunda/camunda-composite-components';
|
|
8
|
-
import { Button, Link, Stack, StaticNotification, StructuredListSkeleton, } from '@carbon/react';
|
|
9
2
|
import { ConnectionSend, Renew, TrashCan } from '@carbon/react/icons/index.esm.js';
|
|
10
3
|
import { C4_ASSET_URLS } from '../../assetUrls.js';
|
|
4
|
+
import { Button, Link, Stack } from '../../ui/index.js';
|
|
5
|
+
import { C4ActionableNotification } from '../c4-actionable-notification/c4-actionable-notification.js';
|
|
6
|
+
import { C4DataTable } from '../c4-data-table/c4-data-table.js';
|
|
7
|
+
import { C4EmptyState } from '../c4-empty-state/c4-empty-state.js';
|
|
11
8
|
import { C4ExternalLink } from '../c4-external-link/c4-external-link.js';
|
|
9
|
+
import { C4StructuredListSkeleton } from '../c4-structured-list/c4-structured-list.js';
|
|
12
10
|
import { C4Toggle } from '../c4-toggle/c4-toggle.js';
|
|
13
11
|
export const C4ManagementSettings = ({ orgId: _orgId, organizationName: _organizationName, hasAcceptedBetaTerms, suppressDropDisks, earlyAccessFeatures, recentlyAcceptedBeta, loading, error, permissions, onLeaveOrganization, onDeleteOrganization, onToggleSuppressDropDisks, onToggleEarlyAccessFeature, onOptInToBeta, onOpenFeatureOptIn, onShareFeedback, onRetry, text, earlyAccessDocsUrl, }) => {
|
|
14
12
|
const canBeToggled = (feature) => {
|
|
@@ -80,7 +78,7 @@ export const C4ManagementSettings = ({ orgId: _orgId, organizationName: _organiz
|
|
|
80
78
|
},
|
|
81
79
|
];
|
|
82
80
|
if (loading) {
|
|
83
|
-
return _jsx(
|
|
81
|
+
return _jsx(C4StructuredListSkeleton, { rowCount: 6 });
|
|
84
82
|
}
|
|
85
83
|
// Transform early access features to include originalIndex for C3DataTable
|
|
86
84
|
const tableData = earlyAccessFeatures.map((feature, index) => ({
|
|
@@ -104,10 +102,10 @@ export const C4ManagementSettings = ({ orgId: _orgId, organizationName: _organiz
|
|
|
104
102
|
}, children: [_jsx("h4", { children: text.earlyAccess.title }), _jsx("p", { style: { marginTop: '12px', color: 'var(--cds-text-helper)' }, children: text.earlyAccess.description0 }), _jsxs("p", { style: {
|
|
105
103
|
marginBottom: '18px',
|
|
106
104
|
color: 'var(--cds-text-helper)',
|
|
107
|
-
}, children: [text.earlyAccess.description1, ' ', _jsx(C4ExternalLink, { id: 'docs-link', label: text.earlyAccess.learnMoreLabel, href: earlyAccessDocsUrl, target: '_blank' })] }), _jsxs(Stack, { children: [recentlyAcceptedBeta && (_jsx(
|
|
105
|
+
}, children: [text.earlyAccess.description1, ' ', _jsx(C4ExternalLink, { id: 'docs-link', label: text.earlyAccess.learnMoreLabel, href: earlyAccessDocsUrl, target: '_blank' })] }), _jsxs(Stack, { children: [recentlyAcceptedBeta && (_jsx(C4ActionableNotification, { appearance: 'static', lowContrast: true, titleId: 'optInNotification-feedback', "aria-describedby": 'optInNotification-feedback', title: text.earlyAccess.optInNotificationTitle, subtitle: text.earlyAccess.optInNotificationText, actionButtonLabel: text.earlyAccess.optInNotificationFeedback, onActionButtonClick: onShareFeedback, kind: 'success', style: {
|
|
108
106
|
maxWidth: '100%',
|
|
109
107
|
marginBottom: '12px',
|
|
110
|
-
} }, 'optin-notification')), error ? (_jsx(
|
|
108
|
+
} }, 'optin-notification')), error ? (_jsx(C4EmptyState, { icon: {
|
|
111
109
|
path: C4_ASSET_URLS.fatalErrorIcon,
|
|
112
110
|
altText: 'errorIcon',
|
|
113
111
|
}, heading: text.earlyAccess.errorTitle, description: text.earlyAccess.errorMessage, button: {
|
|
@@ -127,6 +125,6 @@ export const C4ManagementSettings = ({ orgId: _orgId, organizationName: _organiz
|
|
|
127
125
|
display: 'flex',
|
|
128
126
|
flexDirection: 'column',
|
|
129
127
|
overflowX: 'auto',
|
|
130
|
-
}, children: _jsx(
|
|
128
|
+
}, children: _jsx(C4DataTable, { headers: headers, data: tableData, isLoading: false, queryPrefix: 'management-settings' }) })), !hasAcceptedBetaTerms && permissions.mayOptInToBeta && (_jsx(Button, { style: { marginTop: '16px' }, onClick: onOptInToBeta, size: 'md', children: text.earlyAccess.optInButton }))] })] }) }))] }));
|
|
131
129
|
return component;
|
|
132
130
|
};
|
|
@@ -1,15 +1,10 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
|
|
3
|
-
* Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
|
|
4
|
-
* under one or more contributor license agreements. Licensed under a commercial license.
|
|
5
|
-
* You may not use this file except in compliance with the commercial license.
|
|
6
|
-
*/
|
|
7
|
-
import { C3DataTable } from '@camunda/camunda-composite-components';
|
|
8
|
-
import { Stack } from '@carbon/react';
|
|
2
|
+
import { Stack } from '../../ui/index.js';
|
|
9
3
|
import { C4ActionableNotification } from '../c4-actionable-notification/c4-actionable-notification.js';
|
|
4
|
+
import { C4DataTable } from '../c4-data-table/c4-data-table.js';
|
|
10
5
|
export const C4ManagementUsers = ({ users, loading, headers, actions, toolbar, banner, }) => {
|
|
11
|
-
const bannerNotification = banner.show ? (_jsx(C4ActionableNotification, { kind: 'info', title: '', subtitle: banner.subtitle, actionButtonLabel: banner.actionButtonLabel, onActionButtonClick: banner.onActionClick, lowContrast: false })) : null;
|
|
12
|
-
const dataTable = (_jsx(
|
|
6
|
+
const bannerNotification = banner.show ? (_jsx(C4ActionableNotification, { appearance: 'banner', kind: 'info', title: '', subtitle: banner.subtitle, actionButtonLabel: banner.actionButtonLabel, onActionButtonClick: banner.onActionClick, lowContrast: false })) : null;
|
|
7
|
+
const dataTable = (_jsx(C4DataTable, { headers: headers, data: users, actions: actions, toolbar: toolbar, title: 'Users', isLoading: loading, options: {
|
|
13
8
|
actionsUseOverflowMenuMinItems: 2,
|
|
14
9
|
}, queryPrefix: 'management-users' }));
|
|
15
10
|
const component = (_jsxs(Stack, { gap: 3, children: [bannerNotification, _jsx("div", { style: { display: 'flex', flexDirection: 'column', overflowX: 'auto' }, children: dataTable })] }));
|
|
@@ -4,15 +4,17 @@ 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 {
|
|
7
|
+
import { InlineLoading, ProgressIndicator, ProgressStep } from '@carbon/react';
|
|
8
8
|
import { useState } from 'react';
|
|
9
|
+
import { Button, ComposedModal, ModalBody, ModalFooter, ModalHeader, Stack, } from '../../ui/index.js';
|
|
10
|
+
import { C4InlineNotification } from '../c4-inline-notification/c4-inline-notification.js';
|
|
9
11
|
export const C4MultiStepModal = ({ title, subtitle, steps, isOpen, onClose, preventCloseOnClickOutside, }) => {
|
|
10
12
|
const [step, setStep] = useState(0);
|
|
11
13
|
const [error, setError] = useState('');
|
|
12
14
|
const [asyncWork, setAsyncWork] = useState(false);
|
|
13
15
|
const currentStep = steps[step];
|
|
14
16
|
const { primary, secondary } = currentStep.actions;
|
|
15
|
-
const component = (_jsxs(ComposedModal, { open: isOpen, onClose: onClose, preventCloseOnClickOutside: preventCloseOnClickOutside ?? false, children: [_jsx(ModalHeader, { title: title, label: subtitle }), _jsx(ModalBody, { children: _jsxs(Stack, { gap: 8, children: [_jsx(ProgressIndicator, { currentIndex: step, spaceEqually: true, children: steps.map((step, index) => (_jsx(ProgressStep, { label: step.title, secondaryLabel: step.subtitle }, index))) }), currentStep.content, error.length > 0 && (_jsx(
|
|
17
|
+
const component = (_jsxs(ComposedModal, { open: isOpen, onClose: onClose, preventCloseOnClickOutside: preventCloseOnClickOutside ?? false, children: [_jsx(ModalHeader, { title: title, label: subtitle }), _jsx(ModalBody, { children: _jsxs(Stack, { gap: 8, children: [_jsx(ProgressIndicator, { currentIndex: step, spaceEqually: true, children: steps.map((step, index) => (_jsx(ProgressStep, { label: step.title, secondaryLabel: step.subtitle }, index))) }), currentStep.content, error.length > 0 && (_jsx(C4InlineNotification, { kind: 'error', title: 'Error', subtitle: error }))] }) }), _jsxs(ModalFooter, { children: [_jsx(Button, { kind: secondary.kind, disabled: asyncWork || secondary.disabled, onClick: () => {
|
|
16
18
|
if (step > 0) {
|
|
17
19
|
setError('');
|
|
18
20
|
setStep(step - 1);
|
|
@@ -4,8 +4,10 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
4
4
|
* under one or more contributor license agreements. Licensed under a commercial license.
|
|
5
5
|
* You may not use this file except in compliance with the commercial license.
|
|
6
6
|
*/
|
|
7
|
-
import {
|
|
7
|
+
import { ButtonSet, InlineLoading } from '@carbon/react';
|
|
8
8
|
import { useState } from 'react';
|
|
9
|
+
import { Button, ComposedModal, ModalBody, ModalFooter, ModalHeader, } from '../../ui/index.js';
|
|
10
|
+
import { C4InlineNotification } from '../c4-inline-notification/c4-inline-notification.js';
|
|
9
11
|
export const C4MultiStepUglyModal = ({ open, steps, onClose, size, }) => {
|
|
10
12
|
const [currentStep, setCurrentStep] = useState(1);
|
|
11
13
|
const [error, setError] = useState('');
|
|
@@ -20,7 +22,7 @@ export const C4MultiStepUglyModal = ({ open, steps, onClose, size, }) => {
|
|
|
20
22
|
const resolvedHeaderLabel = typeof headerLabel === 'string' && headerLabel.trim().length === 0
|
|
21
23
|
? undefined
|
|
22
24
|
: headerLabel;
|
|
23
|
-
return (_jsxs(ComposedModal, { open: open, size: size ?? 'sm', onClose: onClose, preventCloseOnClickOutside: true, children: [_jsx(ModalHeader, { title: step.title, label: resolvedHeaderLabel }), _jsxs(ModalBody, { children: [step.content, error.length > 0 && (_jsx(
|
|
25
|
+
return (_jsxs(ComposedModal, { open: open, size: size ?? 'sm', onClose: onClose, preventCloseOnClickOutside: true, children: [_jsx(ModalHeader, { title: step.title, label: resolvedHeaderLabel }), _jsxs(ModalBody, { children: [step.content, error.length > 0 && (_jsx(C4InlineNotification, { kind: 'error', title: 'Error', subtitle: error }))] }), _jsx(ModalFooter, { children: _jsx(ButtonSet, { style: { width: '100%' }, children: buttons.map((button, index) => {
|
|
24
26
|
return (_jsx(Button, { kind: button.kind, onClick: async () => {
|
|
25
27
|
setError('');
|
|
26
28
|
setLoadingStatus('active');
|